]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/sizer.h
fix bug with deleting and recreating entries in wxFileConfig (patch 1796866)
[wxWidgets.git] / include / wx / sizer.h
index ea5803beba060ac018b8bc52426a047cca75ec68..443cd5757deaf556694be41874088256bc713d24 100644 (file)
 // classes
 //---------------------------------------------------------------------------
 
-class WXDLLEXPORT wxButton;
-class WXDLLEXPORT wxBoxSizer;
-class WXDLLEXPORT wxSizerItem;
-class WXDLLEXPORT wxSizer;
+class WXDLLIMPEXP_FWD_CORE wxButton;
+class WXDLLIMPEXP_FWD_CORE wxBoxSizer;
+class WXDLLIMPEXP_FWD_CORE wxSizerItem;
+class WXDLLIMPEXP_FWD_CORE wxSizer;
 
 #ifndef wxUSE_BORDER_BY_DEFAULT
     #ifdef __SMARTPHONE__
@@ -298,6 +298,11 @@ public:
 
     virtual wxRect GetRect() { return m_rect; }
 
+    // set a sizer item id (different from a window id, all sizer items,
+    // including spacers, can have an associated id)
+    void SetId(int id) { m_id = id; }
+    int GetId() const { return m_id; }
+
     bool IsWindow() const { return m_kind == Item_Window; }
     bool IsSizer() const { return m_kind == Item_Sizer; }
     bool IsSpacer() const { return m_kind == Item_Spacer; }
@@ -407,6 +412,7 @@ protected:
     int          m_proportion;
     int          m_border;
     int          m_flag;
+    int          m_id;
 
     // on screen rectangle of this item (not including borders)
     wxRect       m_rect;
@@ -593,6 +599,7 @@ public:
     wxSizerItem* GetItem( wxWindow *window, bool recursive = false );
     wxSizerItem* GetItem( wxSizer *sizer, bool recursive = false );
     wxSizerItem* GetItem( size_t index );
+    wxSizerItem* GetItemById( int id, bool recursive = false );
 
     // Manage whether individual scene items are considered
     // in the layout calculations or not.
@@ -853,7 +860,7 @@ private:
 
 #if wxUSE_STATBOX
 
-class WXDLLEXPORT wxStaticBox;
+class WXDLLIMPEXP_FWD_CORE wxStaticBox;
 
 class WXDLLEXPORT wxStaticBoxSizer: public wxBoxSizer
 {