X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4cc4bfafe5a31cb96f35b3ec9b19fa2b0b3a4eef..e333075415c35d2e869ea585fa41f01a2c938897:/interface/scrolwin.h diff --git a/interface/scrolwin.h b/interface/scrolwin.h index acaf77d2f1..eb01f8d60a 100644 --- a/interface/scrolwin.h +++ b/interface/scrolwin.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: scrolwin.h -// Purpose: documentation for wxScrolledWindow class +// Purpose: interface of wxScrolledWindow // Author: wxWidgets team // RCS-ID: $Id$ // Licence: wxWindows license @@ -96,8 +96,7 @@ @library{wxcore} @category{miscwnd} - @seealso - wxScrollBar, wxClientDC, wxPaintDC, wxVScrolledWindow + @see wxScrollBar, wxClientDC, wxPaintDC, wxVScrolledWindow */ class wxScrolledWindow : public wxPanel { @@ -105,7 +104,7 @@ public: //@{ /** Constructor. - + @param parent Parent window. @param id @@ -121,7 +120,7 @@ public: Window style. See wxScrolledWindow. @param name Window name. - + @remarks The window is initially created without visible scrollbars. Call SetScrollbars() to specify how big the virtual window size should be. @@ -146,10 +145,10 @@ public: 0) (as always), but the logical coordinates are (0, 10) and so the call to CalcScrolledPosition(0, 10, xx, yy) will return 0 in yy. - + @see CalcUnscrolledPosition() */ - void CalcScrolledPosition(int x, int y, int* xx, int* yy); + void CalcScrolledPosition(int x, int y, int* xx, int* yy) const; /** Translates the device coordinates to the logical ones. For example, if a window @@ -158,10 +157,10 @@ public: 0) (as always), but the logical coordinates are (0, 10) and so the call to CalcUnscrolledPosition(0, 0, xx, yy) will return 10 in yy. - + @see CalcScrolledPosition() */ - void CalcUnscrolledPosition(int x, int y, int* xx, int* yy); + void CalcUnscrolledPosition(int x, int y, int* xx, int* yy) const; /** Creates the window for two-step construction. Derived classes @@ -196,12 +195,12 @@ public: scrolling will not work, and you should switch it off. Note that you will have to reposition child windows yourself, if physical scrolling is disabled. - + @param xScrolling If @true, enables physical scrolling in the x direction. @param yScrolling If @true, enables physical scrolling in the y direction. - + @remarks Physical scrolling may not be available on all platforms. Where it is available, it is enabled by default. */ @@ -211,24 +210,24 @@ public: Get the number of pixels per scroll unit (line), in each direction, as set by SetScrollbars(). A value of zero indicates no scrolling in that direction. - + @param xUnit Receives the number of pixels per horizontal unit. @param yUnit Receives the number of pixels per vertical unit. - + @see SetScrollbars(), GetVirtualSize() */ - void GetScrollPixelsPerUnit(int* xUnit, int* yUnit); + void GetScrollPixelsPerUnit(int* xUnit, int* yUnit) const; /** Get the position at which the visible portion of the window starts. - + @param x Receives the first visible x position in scroll units. @param y Receives the first visible y position in scroll units. - + @remarks If either of the scrollbars is not at the home position, x and/or y will be greater than zero. Combined with wxWindow::GetClientSize, the application can use this @@ -237,32 +236,32 @@ public: units, not pixels, so to convert to pixels you will have to multiply by the number of pixels per scroll increment. - + @see SetScrollbars() */ - void GetViewStart(int* x, int* y); + void GetViewStart(int* x, int* y) const; /** Gets the size in device units of the scrollable window area (as opposed to the client size, which is the area of the window currently visible). - + @param x Receives the length of the scrollable window, in pixels. @param y Receives the height of the scrollable window, in pixels. - + @remarks Use wxDC::DeviceToLogicalX and wxDC::DeviceToLogicalY to translate these units to logical units. - + @see SetScrollbars(), GetScrollPixelsPerUnit() */ - void GetVirtualSize(int* x, int* y); + void GetVirtualSize(int* x, int* y) const; /** Motif only: @true if the window has a backing bitmap. */ - bool IsRetained(); + bool IsRetained() const; /** Called by the default paint event handler to allow the application to define @@ -284,18 +283,18 @@ public: /** Scrolls a window so the view start is at the given point. - + @param x The x position to scroll to, in scroll units. @param y The y position to scroll to, in scroll units. - + @remarks The positions are in scroll units, not pixels, so to convert to pixels you will have to multiply by the number of pixels per scroll increment. If either parameter is -1, that position will be ignored (no change in that direction). - + @see SetScrollbars(), GetScrollPixelsPerUnit() */ void Scroll(int x, int y); @@ -308,7 +307,7 @@ public: /** Sets up vertical and/or horizontal scrollbars. - + @param pixelsPerUnitX Pixels per scroll unit in the horizontal direction. @param pixelsPerUnitY @@ -325,13 +324,13 @@ public: units. @param noRefresh Will not refresh window if @true. - + @remarks The first pair of parameters give the number of pixels per 'scroll step', i.e. amount moved when the up or down scroll arrows are pressed. The second pair gives the length of scrollbar in scroll steps, which sets the size of the virtual window. - + @see wxWindow::SetVirtualSize */ void SetScrollbars(int pixelsPerUnitX, int pixelsPerUnitY, @@ -347,3 +346,4 @@ public: */ void SetTargetWindow(wxWindow* window); }; +