]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/wx/sizer.h
remove ancient defines left over from GTK1
[wxWidgets.git] / interface / wx / sizer.h
index 7bc97a6e788d92c8ef82277474e317745263f0eb..e4dde3e69419e2692286a695d2dd4b8b8002182f 100644 (file)
@@ -2,7 +2,6 @@
 // Name:        sizer.h
 // Purpose:     interface of wxStdDialogButtonSizer
 // Author:      wxWidgets team
 // Name:        sizer.h
 // Purpose:     interface of wxStdDialogButtonSizer
 // Author:      wxWidgets team
-// RCS-ID:      $Id$
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
     window, the library wouldn't be able to delete such an orphan sizer and in
     this, and only this, case it should be deleted explicitly.
 
     window, the library wouldn't be able to delete such an orphan sizer and in
     this, and only this, case it should be deleted explicitly.
 
-    @beginWxPythonOnly
-    If you wish to create a sizer class in wxPython you should
-    derive the class from @c wxPySizer in order to get Python-aware
-    capabilities for the various virtual methods.
-    @endWxPythonOnly
-
     @section wxsizer_flags wxSizer flags
 
     The "flag" argument accepted by wxSizeItem constructors and other
     @section wxsizer_flags wxSizer flags
 
     The "flag" argument accepted by wxSizeItem constructors and other
@@ -289,6 +282,19 @@ public:
                      int flag = 0,
                      int border = 0,
                      wxObject* userData = NULL);
                      int flag = 0,
                      int border = 0,
                      wxObject* userData = NULL);
+    
+    /**
+        Appends a spacer child to the sizer.
+
+        @param width
+            Width of the spacer.
+        @param height
+            Height of the spacer.
+        @param flags
+            A wxSizerFlags object that enables you to specify most of the other
+            parameters more conveniently.
+    */
+    wxSizerItem* Add( int width, int height, const wxSizerFlags& flags);
 
     wxSizerItem* Add(wxSizerItem* item);
     
 
     wxSizerItem* Add(wxSizerItem* item);
     
@@ -432,6 +438,11 @@ public:
     */
     wxWindow* GetContainingWindow() const;
 
     */
     wxWindow* GetContainingWindow() const;
 
+    /**
+       Set the window this sizer is used in.
+    */
+    void SetContainingWindow(wxWindow *window);
+    
     /**
        Returns the number of items in the sizer.
 
     /**
        Returns the number of items in the sizer.
 
@@ -577,6 +588,15 @@ public:
                         int flag = 0,
                         int border = 0,
                         wxObject* userData = NULL);
                         int flag = 0,
                         int border = 0,
                         wxObject* userData = NULL);
+    /**
+        Insert a child into the sizer before any existing item at @a index.
+
+        See Add() for the meaning of the other parameters.
+    */
+    wxSizerItem* Insert(size_t index,
+                        int width,
+                        int height,
+                        const wxSizerFlags& flags);
 
     wxSizerItem* Insert(size_t index, wxSizerItem* item);
     
 
     wxSizerItem* Insert(size_t index, wxSizerItem* item);
     
@@ -621,7 +641,7 @@ public:
     bool IsShown(size_t index) const;
 
     /**
     bool IsShown(size_t index) const;
 
     /**
-        Call this to force layout of the children anew, e.g. after having added a child
+        Call this to force layout of the children anew, e.g.\ after having added a child
         to or removed a child (window, other sizer or space) from the sizer while
         keeping the current dimension.
     */
         to or removed a child (window, other sizer or space) from the sizer while
         keeping the current dimension.
     */
@@ -668,6 +688,12 @@ public:
                          int border = 0,
                          wxObject* userData = NULL);
 
                          int border = 0,
                          wxObject* userData = NULL);
 
+    /**
+        Same as Add(), but prepends the items to the beginning of the
+        list of items (windows, subsizers or spaces) owned by this sizer.
+    */
+    wxSizerItem* Prepend(int width, int height, const wxSizerFlags& flags);
+
     wxSizerItem* Prepend(wxSizerItem* item);
     
     /**
     wxSizerItem* Prepend(wxSizerItem* item);
     
     /**
@@ -899,6 +925,13 @@ public:
         @see Hide(), IsShown()
     */
     bool Show(size_t index, bool show = true);
         @see Hide(), IsShown()
     */
     bool Show(size_t index, bool show = true);
+
+
+    /**
+       Show or hide all items managed by the sizer.
+    */
+    virtual void ShowItems(bool show);
+
 };
 
 
 };
 
 
@@ -1849,6 +1882,12 @@ public:
     */
     int GetOrientation() const;
 
     */
     int GetOrientation() const;
 
+    /**
+        Sets the orientation of the box sizer, either wxVERTICAL
+        or wxHORIZONTAL.
+    */
+    void SetOrientation(int orient);
+
     /**
         Implements the calculation of a box sizer's dimensions and then sets
         the size of its children (calling wxWindow::SetSize if the child is a window).
     /**
         Implements the calculation of a box sizer's dimensions and then sets
         the size of its children (calling wxWindow::SetSize if the child is a window).