From 30a7cc7bfa2ced2bcf809c75616f3a24e2ee96f8 Mon Sep 17 00:00:00 2001 From: Bryan Petty Date: Thu, 1 May 2008 05:38:05 +0000 Subject: [PATCH] Finished initial review of [v*] interface headers. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53425 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- interface/vlbox.h | 219 +++++++------ interface/vscroll.h | 733 +++++++++++++++++++++++--------------------- 2 files changed, 510 insertions(+), 442 deletions(-) diff --git a/interface/vlbox.h b/interface/vlbox.h index 6b06db28f1..85ea204a98 100644 --- a/interface/vlbox.h +++ b/interface/vlbox.h @@ -10,46 +10,51 @@ @class wxVListBox @wxheader{vlbox.h} - wxVListBox is a listbox-like control with the following two main differences - from a regular listbox: it can have an arbitrarily huge number of items because - it doesn't store them itself but uses wxVListBox::OnDrawItem - callback to draw them (so it is a Virtual listbox) and its items can - have variable height as determined by - wxVListBox::OnMeasureItem (so it is also a listbox - with the lines of Variable height). - - Also, as a consequence of its virtual nature, it doesn't have any methods to - append or insert items in it as it isn't necessary to do it: you just have to - call wxVListBox::SetItemCount to tell the control how - many items it should display. Of course, this also means that you will never - use this class directly because it has pure virtual functions, but will need to - derive your own class, such as wxHtmlListBox, from it. - - However it emits the same events as wxListBox and the same - event macros may be used with it. Since wxVListBox does not store its items - itself, the events will only contain the index, not any contents such as the - string of an item. + wxVListBox is a wxListBox-like control with the following two main + differences from a regular wxListBox: it can have an arbitrarily huge + number of items because it doesn't store them itself but uses the + OnDrawItem() callback to draw them (so it is a virtual listbox) and its + items can have variable height as determined by OnMeasureItem() (so it is + also a listbox with the lines of variable height). + + Also, as a consequence of its virtual nature, it doesn't have any methods + to append or insert items in it as it isn't necessary to do it: you just + have to call SetItemCount() to tell the control how many items it should + display. Of course, this also means that you will never use this class + directly because it has pure virtual functions, but will need to derive + your own class from it (for example, wxHtmlListBox). + + However it emits the same events as wxListBox and the same event macros may + be used with it. Since wxVListBox does not store its items itself, the + events will only contain the index, not any contents such as the string of + an item. @library{wxcore} @category{ctrl} - @appearance{vlistbox.png} + @see wxSimpleHtmlListBox, wxHtmlListBox */ class wxVListBox : public wxVScrolledWindow { public: - //@{ /** Default constructor, you must call Create() later. */ + wxVListBox(); + /** + Normal constructor which calls Create() internally. + */ wxVListBox(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, size_t countItems = 0, long style = 0, const wxString& name = wxVListBoxNameStr); - wxVListBox(); - //@} + + /** + Destructor. + */ + virtual ~wxVListBox(); /** Deletes all items from the control. @@ -58,23 +63,26 @@ public: /** Creates the control. To finish creating it you also should call - SetItemCount() to let it know about the - number of items it contains. - The only special style which may be used with wxVListBox is @c wxLB_MULTIPLE - which indicates that the listbox should support multiple selection. - Returns @true on success or @false if the control couldn't be created + SetItemCount() to let it know about the number of items it contains. + + The only special style which may be used with wxVListBox is + @c wxLB_MULTIPLE which indicates that the listbox should support + multiple selection. + + @returns @true on success or @false if the control couldn't be created. */ bool Create(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, + const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxVListBoxNameStr); /** - Deselects all the items in the listbox. - Returns @true if any items were changed, i.e. if there had been any - selected items before, or @false if all the items were already deselected. - This method is only valid for multi selection listboxes. + Deselects all the items in the listbox. This method is only valid for + multi selection listboxes. + + @returns @true if any items were changed, i.e. if there had been any + selected items before, or @false if all the items were already + deselected. @see SelectAll(), Select() */ @@ -83,11 +91,23 @@ public: /** Returns the index of the first selected item in the listbox or @c wxNOT_FOUND if no items are currently selected. - @a cookie is an opaque parameter which should be passed to the subsequent - calls to GetNextSelected(). It is needed in - order to allow parallel iterations over the selected items. + + @a cookie is an opaque parameter which should be passed to the + subsequent calls to GetNextSelected(). It is needed in order to allow + parallel iterations over the selected items. + Here is a typical example of using these functions: + @code + unsigned long cookie; + int item = hlbox->GetFirstSelected(cookie); + while ( item != wxNOT_FOUND ) + { + // ... process item ... + item = hlbox->GetNextSelected(cookie); + } + @endcode + This method is only valid for multi selection listboxes. */ int GetFirstSelected(unsigned long& cookie) const; @@ -108,8 +128,9 @@ public: wxPoint GetMargins() const; /** - Returns the index of the next selected item or @c wxNOT_FOUND if there are - no more. + Returns the index of the next selected item or @c wxNOT_FOUND if there + are no more. + This method is only valid for multi selection listboxes. @see GetFirstSelected() @@ -118,41 +139,42 @@ public: /** Returns the number of the items currently selected. - It is valid for both single and multi selection controls. In the former case it - may only return 0 or 1 however. - @see IsSelected(), GetFirstSelected(), - GetNextSelected() + It is valid for both single and multi selection controls. In the former + case it may only return 0 or 1 however. + + @see IsSelected(), GetFirstSelected(), GetNextSelected() */ size_t GetSelectedCount() const; /** - Get the currently selected item or @c wxNOT_FOUND if there is no selection. + Get the currently selected item or @c wxNOT_FOUND if there is no + selection. */ int GetSelection() const; /** - Returns the background colour used for the selected cells. By default the - standard system colour is used. + Returns the background colour used for the selected cells. By default + the standard system colour is used. - @see wxSystemSettings::GetColour, SetSelectionBackground() + @see wxSystemSettings::GetColour(), SetSelectionBackground() */ - const wxColour GetSelectionBackground() const; + const wxColour& GetSelectionBackground() const; /** Returns @true if the listbox was created with @c wxLB_MULTIPLE style - and so supports multiple selection or @false if it is a single selection - listbox. + and so supports multiple selection or @false if it is a single + selection listbox. */ bool HasMultipleSelection() const; /** Returns @true if this item is the current one, @false otherwise. - Current item is always the same as selected one for the single selection - listbox and in this case this method is equivalent to - IsSelected() but they are different for multi - selection listboxes where many items may be selected but only one (at most) is - current. + + The current item is always the same as selected one for the single + selection listbox and in this case this method is equivalent to + IsSelected() but they are different for multi selection listboxes where + many items may be selected but only one (at most) is current. */ bool IsCurrent(size_t item) const; @@ -164,6 +186,7 @@ public: /** This method is used to draw the items background and, maybe, a border around it. + The base class version implements a reasonable default behaviour which consists in drawing the selected item with the standard background colour and drawing a border around the item if it is either selected or @@ -172,45 +195,48 @@ public: void OnDrawBackground(wxDC& dc, const wxRect& rect, size_t n) const; /** - The derived class must implement this function to actually draw the item - with the given index on the provided DC. + The derived class must implement this function to actually draw the + item with the given index on the provided DC. @param dc - The device context to use for drawing + The device context to use for drawing. @param rect The bounding rectangle for the item being drawn (DC clipping - region is set to this rectangle before calling this function) + region is set to this rectangle before calling this function). @param n - The index of the item to be drawn + The index of the item to be drawn. */ - void OnDrawItem(wxDC& dc, const wxRect& rect, size_t n) const; + virtual void OnDrawItem(wxDC& dc, const wxRect& rect, size_t n) const; /** - This method may be used to draw separators between the lines. The rectangle - passed to it may be modified, typically to deflate it a bit before passing to - OnDrawItem(). + This method may be used to draw separators between the lines. The + rectangle passed to it may be modified, typically to deflate it a bit + before passing to OnDrawItem(). + The base class version of this method doesn't do anything. @param dc - The device context to use for drawing + The device context to use for drawing. @param rect - The bounding rectangle for the item + The bounding rectangle for the item. @param n - The index of the item + The index of the item. */ - void OnDrawSeparator(wxDC& dc, wxRect& rect, size_t n) const; + virtual void OnDrawSeparator(wxDC& dc, wxRect& rect, size_t n) const; /** - The derived class must implement this method to return the height of the - specified item (in pixels). + The derived class must implement this method to return the height of + the specified item (in pixels). */ - wxCoord OnMeasureItem(size_t n) const; + virtual wxCoord OnMeasureItem(size_t n) const; /** Selects or deselects the specified item which must be valid (i.e. not equal to @c wxNOT_FOUND). - Return @true if the items selection status has changed or @false - otherwise. + + @returns @true if the items selection status has changed or @false + otherwise. + This function is only valid for the multiple selection listboxes, use SetSelection() for the single selection ones. */ @@ -218,8 +244,11 @@ public: /** Selects all the items in the listbox. - Returns @true if any items were changed, i.e. if there had been any - unselected items before, or @false if all the items were already selected. + + @returns @true if any items were changed, i.e. if there had been any + unselected items before, or @false if all the items were + already selected. + This method is only valid for multi selection listboxes. @see DeselectAll(), Select() @@ -227,9 +256,12 @@ public: bool SelectAll(); /** - Selects all items in the specified range which may be given in any order. - Return @true if the items selection status has changed or @false - otherwise. + Selects all items in the specified range which may be given in any + order. + + @returns @true if the items selection status has changed or @false + otherwise. + This method is only valid for multi selection listboxes. @see SelectAll(), Select() @@ -238,8 +270,8 @@ public: /** Set the number of items to be shown in the control. - This is just a synonym for - wxVScrolledWindow::SetRowCount. + + This is just a synonym for wxVScrolledWindow::SetRowCount(). */ void SetItemCount(size_t count); @@ -248,6 +280,7 @@ public: Set the margins: horizontal margin is the distance between the window border and the item contents while vertical margin is half of the distance between items. + By default both margins are 0. */ void SetMargins(const wxPoint& pt); @@ -256,28 +289,34 @@ public: /** Set the selection to the specified item, if it is -1 the selection is - unset. The selected item will be automatically scrolled into view if it isn't - currently visible. - This method may be used both with single and multiple selection listboxes. + unset. The selected item will be automatically scrolled into view if it + isn't currently visible. + + This method may be used both with single and multiple selection + listboxes. */ void SetSelection(int selection); /** - Sets the colour to be used for the selected cells background. The background of - the standard cells may be changed by simply calling - wxWindow::SetBackgroundColour. - Notice that using non-default background colour may result in control having - appearance different from the similar native controls and so should in general - be avoided. + Sets the colour to be used for the selected cells background. The + background of the standard cells may be changed by simply calling + wxWindow::SetBackgroundColour(). + + @note Using a non-default background colour may result in control + having an appearance different from the similar native controls + and should be avoided in general. @see GetSelectionBackground() */ void SetSelectionBackground(const wxColour& col); /** - Toggles the state of the specified @e item, i.e. selects it if it was + Toggles the state of the specified @a item, i.e. selects it if it was unselected and deselects it if it was selected. + This method is only valid for multi selection listboxes. + + @see Select() */ void Toggle(size_t item); }; diff --git a/interface/vscroll.h b/interface/vscroll.h index 33f866bd08..bf58f2023d 100644 --- a/interface/vscroll.h +++ b/interface/vscroll.h @@ -23,7 +23,7 @@ from wxVarScrollHelperBase directly. @library{wxcore} - @category{FIXME} + @category{miscwnd} @see wxHScrolledWindow, wxHVScrolledWindow, wxVScrolledWindow */ @@ -31,24 +31,24 @@ class wxVarScrollHelperBase { public: /** - Constructor taking the target window to be scrolled by this helper class. - This will attach scroll event handlers to the target window to catch and - handle scroll events appropriately. + Constructor taking the target window to be scrolled by this helper + class. This will attach scroll event handlers to the target window to + catch and handle scroll events appropriately. */ wxVarScrollHelperBase(wxWindow* winToScroll); /** - Virtual destructor for detaching scroll event handlers attached with this - helper class. + Virtual destructor for detaching scroll event handlers attached with + this helper class. */ - ~wxVarScrollHelperBase(); + virtual ~wxVarScrollHelperBase(); /** - Translates the logical coordinate given to the current device coordinate. - For example, if the window is scrolled 10 units and each scroll unit - represents 10 device units (which may not be the case since this class allows - for variable scroll unit sizes), a call to this function with a coordinate of - 15 will return -85. + Translates the logical coordinate given to the current device + coordinate. For example, if the window is scrolled 10 units and each + scroll unit represents 10 device units (which may not be the case since + this class allows for variable scroll unit sizes), a call to this + function with a coordinate of 15 will return -85. @see CalcUnscrolledPosition() */ @@ -56,10 +56,10 @@ public: /** Translates the device coordinate given to the corresponding logical - coordinate. For example, if the window is scrolled 10 units and each scroll - unit represents 10 device units (which may not be the case since this class - allows for variable scroll unit sizes), a call to this function with a - coordinate of 15 will return 115. + coordinate. For example, if the window is scrolled 10 units and each + scroll unit represents 10 device units (which may not be the case since + this class allows for variable scroll unit sizes), a call to this + function with a coordinate of 15 will return 115. @see CalcScrolledPosition() */ @@ -67,93 +67,101 @@ public: /** With physical scrolling on (when this is @true), the device origin is - changed properly when a wxPaintDC is prepared, - children are actually moved and laid out properly, and the contents of the - window (pixels) are actually moved. When this is @false, you are - responsible for repainting any invalidated areas of the window yourself to - account for the new scroll position. + changed properly when a wxPaintDC is prepared, children are actually + moved and laid out properly, and the contents of the window (pixels) + are actually moved. When this is @false, you are responsible for + repainting any invalidated areas of the window yourself to account for + the new scroll position. */ void EnablePhysicalScrolling(bool scrolling = true); /** - When the number of scroll units change, we try to estimate the total size of - all units when the full window size is needed (i.e. to calculate the scrollbar - thumb size). This is a rather expensive operation in terms of unit access, so - if the user code may estimate the average size better or faster than we do, it - should override this function to implement its own logic. This function should - return the best guess for the total virtual window size. - Note that although returning a totally wrong value would still work, it risks - resulting in very strange scrollbar behaviour so this function should really - try to make the best guess possible. + When the number of scroll units change, we try to estimate the total + size of all units when the full window size is needed (i.e. to + calculate the scrollbar thumb size). This is a rather expensive + operation in terms of unit access, so if the user code may estimate the + average size better or faster than we do, it should override this + function to implement its own logic. This function should return the + best guess for the total virtual window size. + + @note Although returning a totally wrong value would still work, it + risks resulting in very strange scrollbar behaviour so this + function should really try to make the best guess possible. */ virtual wxCoord EstimateTotalSize() const; /** - This function needs to be overridden in the in the derived class to return the - window size with respect to the opposing orientation. If this is a vertical - scrolled window, it should return the height. + This function needs to be overridden in the in the derived class to + return the window size with respect to the opposing orientation. If + this is a vertical scrolled window, it should return the height. @see GetOrientationTargetSize() */ virtual int GetNonOrientationTargetSize() const; /** - This function need to be overridden to return the orientation that this helper - is working with, either @c wxHORIZONTAL or @c wxVERTICAL. + This function need to be overridden to return the orientation that this + helper is working with, either @c wxHORIZONTAL or @c wxVERTICAL. */ virtual wxOrientation GetOrientation() const; /** - This function needs to be overridden in the in the derived class to return the - window size with respect to the orientation this helper is working with. If - this is a vertical scrolled window, it should return the width. + This function needs to be overridden in the in the derived class to + return the window size with respect to the orientation this helper is + working with. If this is a vertical scrolled window, it should return + the width. @see GetNonOrientationTargetSize() */ virtual int GetOrientationTargetSize() const; /** - This function will return the target window this helper class is currently - scrolling. + This function will return the target window this helper class is + currently scrolling. @see SetTargetWindow() */ wxWindow* GetTargetWindow() const; /** - Returns the index of the first visible unit based on the scroll position. + Returns the index of the first visible unit based on the scroll + position. */ size_t GetVisibleBegin() const; /** - Returns the index of the last visible unit based on the scroll position. This - includes the last unit even if it is only partially visible. + Returns the index of the last visible unit based on the scroll + position. This includes the last unit even if it is only partially + visible. */ size_t GetVisibleEnd() const; /** - Returns @true if the given scroll unit is currently visible (even if only - partially visible) or @false otherwise. + Returns @true if the given scroll unit is currently visible (even if + only partially visible) or @false otherwise. */ bool IsVisible(size_t unit) const; /** - This function must be overridden in the derived class, and should return the - size of the given unit in pixels. + This function must be overridden in the derived class, and should + return the size of the given unit in pixels. */ virtual wxCoord OnGetUnitSize(size_t unit) const; /** - This function doesn't have to be overridden but it may be useful to do so if - calculating the units' sizes is a relatively expensive operation as it gives - your code a chance to calculate several of them at once and cache the result - if necessary. - @c OnGetUnitsSizeHint() is normally called just before - OnGetUnitSize() but you - shouldn't rely on the latter being called for all units in the interval - specified here. It is also possible that OnGetUnitSize() will be called for - units outside of this interval, so this is really just a hint, not a promise. - Finally, note that unitMin is inclusive, while unitMax is exclusive. + This function doesn't have to be overridden but it may be useful to do + so if calculating the units' sizes is a relatively expensive operation + as it gives your code a chance to calculate several of them at once and + cache the result if necessary. + + OnGetUnitsSizeHint() is normally called just before OnGetUnitSize() but + you shouldn't rely on the latter being called for all units in the + interval specified here. It is also possible that OnGetUnitSize() will + be called for units outside of this interval, so this is really just a + hint, not a promise. + + Finally, note that @a unitMin is inclusive, while @a unitMax is + exclusive. */ virtual void OnGetUnitsSizeHint(size_t unitMin, size_t unitMax) const; @@ -163,10 +171,10 @@ public: virtual void RefreshAll(); /** - Normally the window will scroll itself, but in some rare occasions you might - want it to scroll (part of) another window (e.g. a child of it in order to - scroll only a portion the area between the scrollbars like a spreadsheet where - only the cell area will move). + Normally the window will scroll itself, but in some rare occasions you + might want it to scroll (part of) another window (e.g. a child of it in + order to scroll only a portion the area between the scrollbars like a + spreadsheet where only the cell area will move). @see GetTargetWindow() */ @@ -178,9 +186,9 @@ public: virtual void UpdateScrollbar(); /** - Returns the virtual scroll unit under the device unit given accounting for - scroll position or @c wxNOT_FOUND if none (i.e. if it is below the last - item). + Returns the virtual scroll unit under the device unit given accounting + for scroll position or @c wxNOT_FOUND if none (i.e. if it is below the + last item). */ int VirtualHitTest(wxCoord coord) const; }; @@ -191,17 +199,17 @@ public: @class wxVarVScrollHelper @wxheader{vscroll.h} - This class provides functions wrapping the - wxVarScrollHelperBase class, targeted for - vertical-specific scrolling using wxVScrolledWindow. + This class provides functions wrapping the wxVarScrollHelperBase class, + targeted for vertical-specific scrolling. - Like wxVarScrollHelperBase, this class is mostly only useful to those classes - built into wxWidgets deriving from here, and this documentation is mostly - only provided for referencing those functions provided. You will likely want - to derive your window from wxVScrolledWindow rather than from here directly. + Like wxVarScrollHelperBase, this class is mostly only useful to those + classes built into wxWidgets deriving from here, and this documentation is + mostly only provided for referencing the functions provided by this class. + You will likely want to derive your window from wxVScrolledWindow rather + than from here directly. @library{wxcore} - @category{FIXME} + @category{miscwnd} @see wxHScrolledWindow, wxHVScrolledWindow, wxVScrolledWindow */ @@ -209,20 +217,20 @@ class wxVarVScrollHelper : public wxVarScrollHelperBase { public: /** - Constructor taking the target window to be scrolled by this helper class. - This will attach scroll event handlers to the target window to catch and - handle scroll events appropriately. + Constructor taking the target window to be scrolled by this helper + class. This will attach scroll event handlers to the target window to + catch and handle scroll events appropriately. */ wxVarVScrollHelper(wxWindow* winToScroll); /** - This class forwards calls from - wxVarScrollHelperBase::EstimateTotalSize - to this function so derived classes can override either just the height or - the width estimation, or just estimate both differently if desired in any + This class forwards calls from EstimateTotalSize() to this function so + derived classes can override either just the height or the width + estimation, or just estimate both differently if desired in any wxHVScrolledWindow derived class. - Please note that this function will not be called if @c EstimateTotalSize() - is overridden in your derived class. + + @note This function will not be called if EstimateTotalSize() is + overridden in your derived class. */ virtual wxCoord EstimateTotalHeight() const; @@ -234,13 +242,14 @@ public: size_t GetRowCount() const; /** - Returns the index of the first visible row based on the scroll position. + Returns the index of the first visible row based on the scroll + position. */ size_t GetVisibleRowsBegin() const; /** - Returns the index of the last visible row based on the scroll position. This - includes the last row even if it is only partially visible. + Returns the index of the last visible row based on the scroll position. + This includes the last row even if it is only partially visible. */ size_t GetVisibleRowsEnd() const; @@ -251,61 +260,70 @@ public: bool IsRowVisible(size_t row) const; /** - This function must be overridden in the derived class, and should return the - height of the given row in pixels. + This function must be overridden in the derived class, and should + return the height of the given row in pixels. */ virtual wxCoord OnGetRowHeight(size_t row) const; /** - This function doesn't have to be overridden but it may be useful to do so if - calculating the rows' sizes is a relatively expensive operation as it gives - your code a chance to calculate several of them at once and cache the result - if necessary. - @c OnGetRowsHeightHint() is normally called just before - OnGetRowHeight() but you - shouldn't rely on the latter being called for all rows in the interval - specified here. It is also possible that OnGetRowHeight() will be called for - units outside of this interval, so this is really just a hint, not a promise. - Finally, note that rowMin is inclusive, while rowMax is exclusive. + This function doesn't have to be overridden but it may be useful to do + so if calculating the rows' sizes is a relatively expensive operation + as it gives your code a chance to calculate several of them at once and + cache the result if necessary. + + OnGetRowsHeightHint() is normally called just before OnGetRowHeight() + but you shouldn't rely on the latter being called for all rows in the + interval specified here. It is also possible that OnGetRowHeight() will + be called for units outside of this interval, so this is really just a + hint, not a promise. + + Finally, note that @a rowMin is inclusive, while @a rowMax is + exclusive. */ virtual void OnGetRowsHeightHint(size_t rowMin, size_t rowMax) const; /** - Triggers a refresh for just the given row's area of the window if it's visible. + Triggers a refresh for just the given row's area of the window if it's + visible. */ virtual void RefreshRow(size_t row); /** - Triggers a refresh for the area between the specified range of rows given - (inclusively). + Triggers a refresh for the area between the specified range of rows + given (inclusively). */ virtual void RefreshRows(size_t from, size_t to); /** - Scroll by the specified number of pages which may be positive (to scroll down) - or negative (to scroll up). + Scroll by the specified number of pages which may be positive (to + scroll down) or negative (to scroll up). */ virtual bool ScrollRowPages(int pages); /** - Scroll by the specified number of rows which may be positive (to scroll down) - or negative (to scroll up). - Returns @true if the window was scrolled, @false otherwise (for - example, if we're trying to scroll down but we are already showing the last - row). + Scroll by the specified number of rows which may be positive (to scroll + down) or negative (to scroll up). + + @returns @true if the window was scrolled, @false otherwise (for + example, if we're trying to scroll down but we are already + showing the last row). */ virtual bool ScrollRows(int rows); /** - Scroll to the specified row. It will become the first visible row in the window. - Returns @true if we scrolled the window, @false if nothing was done. + Scroll to the specified row. It will become the first visible row in + the window. + + @returns @true if we scrolled the window, @false if nothing was done. */ bool ScrollToRow(size_t row); /** - Set the number of rows the window contains. The derived class must provide the - heights for all rows with indices up to the one given here in it's - OnGetRowHeight() implementation. + Set the number of rows the window contains. The derived class must + provide the heights for all rows with indices up to the one given here + in it's OnGetRowHeight() implementation. + + @see GetRowCount() */ void SetRowCount(size_t rowCount); }; @@ -316,17 +334,17 @@ public: @class wxVarHScrollHelper @wxheader{vscroll.h} - This class provides functions wrapping the - wxVarScrollHelperBase class, targeted for - horizontal-specific scrolling using wxHScrolledWindow. + This class provides functions wrapping the wxVarScrollHelperBase class, + targeted for horizontal-specific scrolling. - Like wxVarScrollHelperBase, this class is mostly only useful to those classes - built into wxWidgets deriving from here, and this documentation is mostly - only provided for referencing those functions provided. You will likely want - to derive your window from wxHScrolledWindow rather than from here directly. + Like wxVarScrollHelperBase, this class is mostly only useful to those + classes built into wxWidgets deriving from here, and this documentation is + mostly only provided for referencing the functions provided by this class. + You will likely want to derive your window from wxHScrolledWindow rather + than from here directly. @library{wxcore} - @category{FIXME} + @category{miscwnd} @see wxHScrolledWindow, wxHVScrolledWindow, wxVScrolledWindow */ @@ -334,20 +352,20 @@ class wxVarHScrollHelper : public wxVarScrollHelperBase { public: /** - Constructor taking the target window to be scrolled by this helper class. - This will attach scroll event handlers to the target window to catch and - handle scroll events appropriately. + Constructor taking the target window to be scrolled by this helper + class. This will attach scroll event handlers to the target window to + catch and handle scroll events appropriately. */ wxVarHScrollHelper(wxWindow* winToScroll); /** - This class forwards calls from - wxVarScrollHelperBase::EstimateTotalSize - to this function so derived classes can override either just the height or - the width estimation, or just estimate both differently if desired in any + This class forwards calls from EstimateTotalSize() to this function so + derived classes can override either just the height or the width + estimation, or just estimate both differently if desired in any wxHVScrolledWindow derived class. - Please note that this function will not be called if @c EstimateTotalSize() - is overridden in your derived class. + + @note This function will not be called if EstimateTotalSize() is + overridden in your derived class. */ virtual wxCoord EstimateTotalWidth() const; @@ -359,13 +377,15 @@ public: size_t GetColumnCount() const; /** - Returns the index of the first visible column based on the scroll position. + Returns the index of the first visible column based on the scroll + position. */ size_t GetVisibleColumnsBegin() const; /** - Returns the index of the last visible column based on the scroll position. This - includes the last column even if it is only partially visible. + Returns the index of the last visible column based on the scroll + position. This includes the last column even if it is only partially + visible. */ size_t GetVisibleColumnsEnd() const; @@ -376,65 +396,71 @@ public: bool IsColumnVisible(size_t column) const; /** - This function must be overridden in the derived class, and should return the - width of the given column in pixels. + This function must be overridden in the derived class, and should + return the width of the given column in pixels. */ virtual wxCoord OnGetColumnWidth(size_t column) const; /** - This function doesn't have to be overridden but it may be useful to do so if - calculating the columns' sizes is a relatively expensive operation as it gives - your code a chance to calculate several of them at once and cache the result - if necessary. - @c OnGetColumnsWidthHint() is normally called just before - OnGetColumnWidth() but you - shouldn't rely on the latter being called for all columns in the interval - specified here. It is also possible that OnGetColumnWidth() will be called for - units outside of this interval, so this is really just a hint, not a promise. - Finally, note that columnMin is inclusive, while columnMax is exclusive. + This function doesn't have to be overridden but it may be useful to do + so if calculating the columns' sizes is a relatively expensive + operation as it gives your code a chance to calculate several of them + at once and cache the result if necessary. + + OnGetColumnsWidthHint() is normally called just before + OnGetColumnWidth() but you shouldn't rely on the latter being called + for all columns in the interval specified here. It is also possible + that OnGetColumnWidth() will be called for units outside of this + interval, so this is really just a hint, not a promise. + + Finally, note that @a columnMin is inclusive, while @a columnMax is + exclusive. */ virtual void OnGetColumnsWidthHint(size_t columnMin, size_t columnMax) const; /** - Triggers a refresh for just the given column's area of the window if it's - visible. + Triggers a refresh for just the given column's area of the window if + it's visible. */ virtual void RefreshColumn(size_t column); /** - Triggers a refresh for the area between the specified range of columns given - (inclusively). + Triggers a refresh for the area between the specified range of columns + given (inclusively). */ virtual void RefreshColumns(size_t from, size_t to); /** - Scroll by the specified number of pages which may be positive (to scroll right) - or negative (to scroll left). + Scroll by the specified number of pages which may be positive (to + scroll right) or negative (to scroll left). */ virtual bool ScrollColumnPages(int pages); /** - Scroll by the specified number of columns which may be positive (to scroll - right) - or negative (to scroll left). - Returns @true if the window was scrolled, @false otherwise (for - example, if we're trying to scroll right but we are already showing the last - column). + Scroll by the specified number of columns which may be positive (to + scroll right) or negative (to scroll left). + + @returns @true if the window was scrolled, @false otherwise (for + example, if we're trying to scroll right but we are already + showing the last column). */ virtual bool ScrollColumns(int columns); /** - Scroll to the specified column. It will become the first visible column in the - window. - Returns @true if we scrolled the window, @false if nothing was done. + Scroll to the specified column. It will become the first visible column + in the window. + + @returns @true if we scrolled the window, @false if nothing was done. */ bool ScrollToColumn(size_t column); /** - Set the number of columns the window contains. The derived class must provide - the widths for all columns with indices up to the one given here in it's - OnGetColumnWidth() implementation. + Set the number of columns the window contains. The derived class must + provide the widths for all columns with indices up to the one given + here in it's OnGetColumnWidth() implementation. + + @see GetColumnCount() */ void SetColumnCount(size_t columnCount); }; @@ -445,24 +471,21 @@ public: @class wxVarHVScrollHelper @wxheader{vscroll.h} - This class provides functions wrapping the - wxVarHScrollHelper and - wxVarVScrollHelper classes, targeted for - scrolling a window in both axis using - wxHVScrolledWindow. Since this class is also - the join class of the horizontal and vertical scrolling functionality, it - also addresses some wrappers that help avoid the need to specify class scope - in your wxHVScrolledWindow-derived class when using wxVarScrollHelperBase - functionality. - - Like all three of it's scroll helper base classes, this class is mostly only - useful to those classes built into wxWidgets deriving from here, and this - documentation is mostly only provided for referencing those functions - provided. You will likely want to derive your window from wxHVScrolledWindow - rather than from here directly. + This class provides functions wrapping the wxVarHScrollHelper and + wxVarVScrollHelper classes, targeted for scrolling a window in both axis. + Since this class is also the join class of the horizontal and vertical + scrolling functionality, it also addresses some wrappers that help avoid + the need to specify class scope in your wxHVScrolledWindow derived class + when using wxVarScrollHelperBase functionality. + + Like all three of it's scroll helper base classes, this class is mostly + only useful to those classes built into wxWidgets deriving from here, and + this documentation is mostly only provided for referencing the functions + provided by this class. You will likely want to derive your window from + wxHVScrolledWindow rather than from here directly. @library{wxcore} - @category{FIXME} + @category{miscwnd} @see wxHScrolledWindow, wxHVScrolledWindow, wxVScrolledWindow */ @@ -471,26 +494,26 @@ class wxVarHVScrollHelper : public wxVarVScrollHelper, { public: /** - Constructor taking the target window to be scrolled by this helper class. - This will attach scroll event handlers to the target window to catch and - handle scroll events appropriately. + Constructor taking the target window to be scrolled by this helper + class. This will attach scroll event handlers to the target window to + catch and handle scroll events appropriately. */ wxVarHVScrollHelper(wxWindow* winToScroll); /** With physical scrolling on (when this is @true), the device origin is - changed properly when a wxPaintDC is prepared, - children are actually moved and laid out properly, and the contents of the - window (pixels) are actually moved. When this is @false, you are - responsible for repainting any invalidated areas of the window yourself to - account for the new scroll position. + changed properly when a wxPaintDC is prepared, children are actually + moved and laid out properly, and the contents of the window (pixels) + are actually moved. When this is @false, you are responsible for + repainting any invalidated areas of the window yourself to account for + the new scroll position. @param vscrolling Specifies if physical scrolling should be turned on when scrolling - vertically. + vertically. @param hscrolling Specifies if physical scrolling should be turned on when scrolling - horizontally. + horizontally. */ void EnablePhysicalScrolling(bool vscrolling = true, bool hscrolling = true); @@ -503,14 +526,14 @@ public: wxSize GetRowColumnCount() const; /** - Returns the index of the first visible column and row based on the current - scroll position. + Returns the index of the first visible column and row based on the + current scroll position. */ wxPosition GetVisibleBegin() const; /** - Returns the index of the last visible column and row based on the scroll - position. This includes any partially visible columns or rows. + Returns the index of the last visible column and row based on the + scroll position. This includes any partially visible columns or rows. */ wxPosition GetVisibleEnd() const; @@ -520,13 +543,13 @@ public: (even if only partially visible) or @false otherwise. */ bool IsVisible(size_t row, size_t column) const; - const bool IsVisible(const wxPosition& pos) const; + bool IsVisible(const wxPosition& pos) const; //@} //@{ /** - Triggers a refresh for just the area shared between the given row and column - of the window if it is visible. + Triggers a refresh for just the area shared between the given row and + column of the window if it is visible. */ virtual void RefreshRowColumn(size_t row, size_t column); virtual void RefreshRowColumn(const wxPosition& pos); @@ -534,24 +557,23 @@ public: //@{ /** - Triggers a refresh for the visible area shared between all given rows and - columns (inclusive) of the window. If the target window for both orientations - is the same, the rectangle of cells is refreshed; if the target windows - differ, the entire client size opposite the orientation direction is - refreshed between the specified limits. + Triggers a refresh for the visible area shared between all given rows + and columns (inclusive) of the window. If the target window for both + orientations is the same, the rectangle of cells is refreshed; if the + target windows differ, the entire client size opposite the orientation + direction is refreshed between the specified limits. */ virtual void RefreshRowsColumns(size_t fromRow, size_t toRow, - size_t fromColumn, - size_t toColumn); + size_t fromColumn, size_t toColumn); virtual void RefreshRowsColumns(const wxPosition& from, const wxPosition& to); //@} //@{ /** - Scroll to the specified row and column. It will become the first visible row - and column in the window. Returns @true if we scrolled the window, - @false if nothing was done. + Scroll to the specified row and column. It will become the first + visible row and column in the window. Returns @true if we scrolled the + window, @false if nothing was done. */ bool ScrollToRowColumn(size_t row, size_t column); bool ScrollToRowColumn(const wxPosition& pos); @@ -559,21 +581,22 @@ public: /** Set the number of rows and columns the target window will contain. The - derived class must provide the sizes for all rows and columns with indices up - to the ones given here in it's wxVarVScrollHelper::OnGetRowHeight - and wxVarHScrollHelper::OnGetColumnWidth implementations, - respectively. + derived class must provide the sizes for all rows and columns with + indices up to the ones given here in it's OnGetRowHeight() and + OnGetColumnWidth() implementations, respectively. + + @see GetRowColumnCount() */ void SetRowColumnCount(size_t rowCount, size_t columnCount); //@{ /** - Returns the virtual scroll unit under the device unit given accounting for - scroll position or @c wxNOT_FOUND (for the row, column, or possibly both - values) if none. + Returns the virtual scroll unit under the device unit given accounting + for scroll position or @c wxNOT_FOUND (for the row, column, or possibly + both values) if none. */ wxPosition VirtualHitTest(wxCoord x, wxCoord y) const; - const wxPosition VirtualHitTest(const wxPoint& pos) const; + wxPosition VirtualHitTest(const wxPoint& pos) const; //@} }; @@ -591,20 +614,65 @@ public: In any case, this is a generalization of wxScrolled which can be only used when all rows have the same heights. It lacks some other wxScrolled - features however, notably it can't scroll only a rectangle of the window - and not its entire client area. + features however, notably it can't scroll specific pixel sizes of the + window or its exact client area size. To use this class, you need to derive from it and implement the - wxVarVScrollHelper::OnGetRowHeight pure virtual - method. You also must call wxVarVScrollHelper::SetRowCount - to let the base class know how many rows it should display, but from that + OnGetRowHeight() pure virtual method. You also must call SetRowCount() to + let the base class know how many rows it should display, but from that moment on the scrolling is handled entirely by wxVScrolledWindow. You only need to draw the visible part of contents in your @c OnPaint() method as - usual. You should use wxVarVScrollHelper::GetVisibleRowsBegin - and wxVarVScrollHelper::GetVisibleRowsEnd to - select the lines to display. Note that the device context origin is not shifted - so the first visible row always appears at the point (0, 0) in physical as - well as logical coordinates. + usual. You should use GetVisibleRowsBegin() and GetVisibleRowsEnd() to + select the lines to display. Note that the device context origin is not + shifted so the first visible row always appears at the point (0, 0) in + physical as well as logical coordinates. + + @section wxWidgets 2.8 Compatibility Functions + + The following functions provide backwards compatibility for applications + originally built using wxVScrolledWindow in 2.6 or 2.8. Originally, + wxVScrolledWindow referred to scrolling "lines". We now use "units" in + wxVarScrollHelperBase to avoid implying any orientation (since the + functions are used for both horizontal and vertical scrolling in derived + classes). And in the new wxVScrolledWindow and wxHScrolledWindow classes, + we refer to them as "rows" and "columns", respectively. This is to help + clear some confusion in not only those classes, but also in + wxHVScrolledWindow where functions are inherited from both. + + You are encouraged to update any existing code using these function to use + the new replacements mentioned below, and avoid using these functions for + any new code as they are deprecated. + + @beginTable + @row2col{ size_t %GetFirstVisibleLine() const, + Deprecated for GetVisibleRowsBegin(). } + @row2col{ size_t %GetLastVisibleLine() const, + Deprecated for GetVisibleRowsEnd(). This function originally had a + slight design flaw in that it was possible to return + (size_t)-1 (ie: a large positive number) if the scroll + position was 0 and the first line wasn't completely visible. } + @row2col{ size_t %GetLineCount() const, + Deprecated for GetRowCount(). } + @row2col{ int %HitTest(wxCoord x\, wxCoord y) const + @n int %HitTest(const wxPoint& pt) const, + Deprecated for VirtualHitTest(). } + @row2col{ virtual wxCoord %OnGetLineHeight(size_t line) const, + Deprecated for OnGetRowHeight(). } + @row2col{ virtual void %OnGetLinesHint(size_t lineMin\, size_t lineMax) const, + Deprecated for OnGetRowsHeightHint(). } + @row2col{ virtual void %RefreshLine(size_t line), + Deprecated for RefreshRow(). } + @row2col{ virtual void %RefreshLines(size_t from\, size_t to), + Deprecated for RefreshRows(). } + @row2col{ virtual bool %ScrollLines(int lines), + Deprecated for ScrollRows(). } + @row2col{ virtual bool %ScrollPages(int pages), + Deprecated for ScrollRowPages(). } + @row2col{ bool %ScrollToLine(size_t line), + Deprecated for ScrollToRow(). } + @row2col{ void %SetLineCount(size_t count), + Deprecated for SetRowCount(). } + @endTable @library{wxcore} @category{miscwnd} @@ -614,80 +682,47 @@ public: class wxVScrolledWindow : public wxPanel, public wxVarVScrollHelper { public: - //@{ /** - This is the normal constructor, no need to call @c Create() after using this - one. - Note that @c wxVSCROLL is always automatically added to our style, there is - no need to specify it explicitly. + Default constructor, you must call Create() later. + */ + wxVScrolledWindow(); + /** + This is the normal constructor, no need to call Create() after using + this constructor. + + @note @c wxVSCROLL is always automatically added to the style, there is + no need to specify it explicitly. @param parent - The parent window, must not be @NULL + The parent window, must not be @NULL. @param id - The identifier of this window, wxID_ANY by default + The identifier of this window, wxID_ANY by default. @param pos - The initial window position + The initial window position. @param size - The initial window size + The initial window size. @param style - The window style. There are no special style bits defined for - this class. + The window style. There are no special style bits defined for this + class. @param name - The name for this window; usually not used + The name for this window; usually not used. */ - wxVScrolledWindow(); wxVScrolledWindow(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, + const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxPanelNameStr); - //@} /** - Same as the @ref wxvscrolledwindow() "non-default constuctor" - but returns status code: @true if ok, @false if the window couldn't - be created. - Just as with the constructor above, the @c wxVSCROLL style is always used, + Same as the non-default constuctor, but returns a status code: @true if + ok, @false if the window couldn't be created. + + Just as with the constructor, the @c wxVSCROLL style is always used, there is no need to specify it explicitly. */ bool Create(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, + const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxPanelNameStr); - - //@{ - /** - The following functions provide backwards compatibility for applications - originally built using wxVScrolledWindow in 2.6 or 2.8. Originally, - wxVScrolledWindow referred to scrolling "lines". We now use "units" in - wxVarScrollHelperBase to avoid implying any orientation (since the functions - are used for both horizontal and vertical scrolling in derived classes). And - in the new wxVScrolledWindow and wxHScrolledWindow classes, we refer to them - as "rows" and "columns", respectively. This is to help clear some confusion - in not only those classes, but also in wxHVScrolledWindow where functions - are inherited from both. - You are encouraged to update any existing code using these function to use - the new replacements mentioned below, and avoid using these functions for - any new code as they are deprecated. - - Deprecated for wxVarVScrollHelper::SetRowCount. - */ - size_t GetFirstVisibleLine(); - const size_t GetLastVisibleLine(); - const size_t GetLineCount(); - const int HitTest(wxCoord x, wxCoord y); - const int HitTest(const wxPoint& pt); - const virtual wxCoord OnGetLineHeight(size_t line); - const virtual void OnGetLinesHint(size_t lineMin, - size_t lineMax); - const virtual void RefreshLine(size_t line); - virtual void RefreshLines(size_t from, size_t to); - virtual bool ScrollLines(int lines); - virtual bool ScrollPages(int pages); - bool ScrollToLine(size_t line); - void SetLineCount(size_t count); - //@} }; @@ -703,69 +738,67 @@ public: In any case, this is a generalization of wxScrolled which can be only used when all columns have the same widths. It lacks some other wxScrolled - features however, notably it can't scroll only a rectangle of the window - and not its entire client area. + features however, notably it can't scroll specific pixel sizes of the + window or its exact client area size. To use this class, you need to derive from it and implement the - wxVarHScrollHelper::OnGetColumnWidth pure virtual - method. You also must call wxVarHScrollHelper::SetColumnCount - to let the base class know how many columns it should display, but from that - moment on the scrolling is handled entirely by wxHScrolledWindow. You only - need to draw the visible part of contents in your @c OnPaint() method as - usual. You should use wxVarHScrollHelper::GetVisibleColumnsBegin - and wxVarHScrollHelper::GetVisibleColumnsEnd to - select the lines to display. Note that the device context origin is not shifted - so the first visible column always appears at the point (0, 0) in physical as - well as logical coordinates. + OnGetColumnWidth() pure virtual method. You also must call SetColumnCount() + to let the base class know how many columns it should display, but from + that moment on the scrolling is handled entirely by wxHScrolledWindow. You + only need to draw the visible part of contents in your @c OnPaint() method + as usual. You should use GetVisibleColumnsBegin() and + GetVisibleColumnsEnd() to select the lines to display. Note that the device + context origin is not shifted so the first visible column always appears at + the point (0, 0) in physical as well as logical coordinates. @library{wxcore} - @category{FIXME} + @category{miscwnd} @see wxHVScrolledWindow, wxVScrolledWindow */ class wxHScrolledWindow : public wxPanel, public wxVarHScrollHelper { public: - //@{ /** - This is the normal constructor, no need to call @c Create() after using this - one. - Note that @c wxHSCROLL is always automatically added to our style, there is - no need to specify it explicitly. + Default constructor, you must call Create() later. + */ + wxHScrolledWindow(); + /** + This is the normal constructor, no need to call Create() after using + this constructor. + + @note @c wxHSCROLL is always automatically added to the style, there is + no need to specify it explicitly. @param parent - The parent window, must not be @NULL + The parent window, must not be @NULL. @param id - The identifier of this window, wxID_ANY by default + The identifier of this window, wxID_ANY by default. @param pos - The initial window position + The initial window position. @param size - The initial window size + The initial window size. @param style - The window style. There are no special style bits defined for - this class. + The window style. There are no special style bits defined for this + class. @param name - The name for this window; usually not used + The name for this window; usually not used. */ - wxHScrolledWindow(); wxHScrolledWindow(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, + const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxPanelNameStr); - //@} /** - Same as the @ref wxhscrolledwindow() "non-default constuctor" - but returns status code: @true if ok, @false if the window couldn't - be created. - Just as with the constructor above, the @c wxHSCROLL style is always used, + Same as the non-default constuctor, but returns a status code: @true if + ok, @false if the window couldn't be created. + + Just as with the constructor, the @c wxHSCROLL style is always used, there is no need to specify it explicitly. */ bool Create(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, + const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxPanelNameStr); }; @@ -782,72 +815,68 @@ public: In any case, this is a generalization of wxScrolled which can be only used when all rows and columns are the same size. It lacks some other wxScrolled - features however, notably it can't scroll only a rectangle of the window - and not its entire client area. + features however, notably it can't scroll specific pixel sizes of the + window or its exact client area size. To use this class, you must derive from it and implement both the - wxVarVScrollHelper::OnGetRowHeight and - wxVarHScrollHelper::OnGetColumnWidth pure virtual - methods to let the base class know how many rows and columns it should - display. You also need to set the total rows and columns the window contains, - but from that moment on the scrolling is handled entirely by - wxHVScrolledWindow. You only need to draw the visible part of contents in - your @c OnPaint() method as usual. You should use - wxVarHVScrollHelper::GetVisibleBegin - and wxVarHVScrollHelper::GetVisibleEnd to select the - lines to display. Note that the device context origin is not shifted so the - first visible row and column always appear at the point (0, 0) in physical - as well as logical coordinates. + OnGetRowHeight() and OnGetColumnWidth() pure virtual methods to let the + base class know how many rows and columns it should display. You also need + to set the total rows and columns the window contains, but from that moment + on the scrolling is handled entirely by wxHVScrolledWindow. You only need + to draw the visible part of contents in your @c OnPaint() method as usual. + You should use GetVisibleBegin() and GetVisibleEnd() to select the lines to + display. Note that the device context origin is not shifted so the first + visible row and column always appear at the point (0, 0) in physical as + well as logical coordinates. @library{wxcore} - @category{FIXME} + @category{miscwnd} @see wxHScrolledWindow, wxVScrolledWindow */ class wxHVScrolledWindow : public wxPanel, public wxVarHVScrollHelper { public: - //@{ /** - This is the normal constructor, no need to call @c Create() after using this - one. - Note that @c wxHSCROLL and @c wxVSCROLL are always automatically added - to our styles, there is no need to specify it explicitly. + Default constructor, you must call Create() later. + */ + wxHVScrolledWindow(); + /** + This is the normal constructor, no need to call Create() after using + this constructor. + + @note @c wxHSCROLL and @c wxVSCROLL are always automatically added to + the style, there is no need to specify it explicitly. @param parent - The parent window, must not be @NULL + The parent window, must not be @NULL. @param id - The identifier of this window, wxID_ANY by default + The identifier of this window, wxID_ANY by default. @param pos - The initial window position + The initial window position. @param size - The initial window size + The initial window size. @param style - The window style. There are no special style bits defined for - this class. + The window style. There are no special style bits defined for this + class. @param name - The name for this window; usually not used + The name for this window; usually not used. */ - wxHVScrolledWindow(); - wxHVScrolledWindow(wxWindow* parent, - wxWindowID id = wxID_ANY, + wxHVScrolledWindow(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, + const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxPanelNameStr); - //@} /** - Same as the @ref wxhvscrolledwindow() "non-default constuctor" - but returns status code: @true if ok, @false if the window couldn't - be created. - Just as with the constructor above, the @c wxHSCROLL and @c wxVSCROLL - styles are always used, there is no need to specify it explicitly. + Same as the non-default constuctor, but returns a status code: @true if + ok, @false if the window couldn't be created. + + Just as with the constructor, the @c wxHSCROLL and @c wxVSCROLL styles + are always used, there is no need to specify them explicitly. */ bool Create(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, + const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = wxPanelNameStr); }; -- 2.45.2