]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/wrapsizer.h
Clarified difference between wrap width and width of control in wxStaticText.
[wxWidgets.git] / interface / wrapsizer.h
index b719d1eaf3c412c26a77019cc6ed2870866321df..9a186de2fce58e6c6eada4564c46f12648d02108 100644 (file)
@@ -1,6 +1,6 @@
 /////////////////////////////////////////////////////////////////////////////
 // Name:        wrapsizer.h
-// Purpose:     documentation for wxWrapSizer class
+// Purpose:     interface of wxWrapSizer
 // Author:      wxWidgets team
 // RCS-ID:      $Id$
 // Licence:     wxWindows license
     @library{wxcore}
     @category{winlayout}
 
-    @seealso
-    wxBoxSizer, wxSizer, @ref overview_sizeroverview "Sizer overview"
+    @see wxBoxSizer, wxSizer, @ref overview_sizeroverview "Sizer overview"
 */
 class wxWrapSizer : public wxBoxSizer
 {
 public:
     /**
-        Constructor for a wxWrapSizer. @e orient determines the primary direction of
+        Constructor for a wxWrapSizer. @a orient determines the primary direction of
         the sizer (the most common case being @c wxHORIZONTAL). The flags
-        parameter may have the value @c wxEXTEND_LAST_ON_EACH_LINE which will
-        cause the last item on each line to use any remaining space on that line.
+        parameter can be a combination of the values @c
+        wxEXTEND_LAST_ON_EACH_LINE which will cause the last item on each line
+        to use any remaining space on that line and @c wxREMOVE_LEADING_SPACES
+        which removes any spacer elements from the beginning of a row. Both of
+        these flags are on by default.
     */
-    wxWrapSizer(int orient, int flags);
+    wxWrapSizer(int orient = wxHORIZONTAL,
+                int flags = wxEXTEND_LAST_ON_EACH_LINE |
+                            wxREMOVE_LEADING_SPACES);
 
     /**
         Not used by an application. This is the mechanism by which sizers can inform
         sub-items of the first determined size component. The sub-item can then better
         determine its size requirements.
-        
         Returns @true if the information was used (and the sub-item min size was
         updated).
     */
     bool InformFirstDirection(int direction, int size,
                               int availableOtherDir);
+
+protected:
+    /**
+        Can be overridden in the derived classes to treat some normal items as
+        spacers.
+
+        This method is used to determine whether the given @a item should be
+        considered to be a spacer for the purposes of @c wxREMOVE_LEADING_SPACES
+        implementation. By default only returns @true for the real spacers.
+     */
+    virtual bool IsSpaceItem(wxSizerItem *item) const;
 };
+