]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/sizer.cpp
fixed some warnings about unused variables values
[wxWidgets.git] / src / common / sizer.cpp
index c34e5169320dcc99198eda94b9108a85990595c8..a882c510d29c075d2a673ad26a8f1fd56ecc4d6e 100644 (file)
@@ -10,7 +10,7 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation "sizer.h"
 #endif
 
@@ -43,7 +43,38 @@ IMPLEMENT_CLASS(wxNotebookSizer, wxSizer)
 
 WX_DEFINE_EXPORTED_LIST( wxSizerItemList );
 
-
+/*
+       TODO PROPERTIES
+         sizeritem
+           object
+               object_ref
+                 minsize
+                 option
+                 flag
+                 border
+     spacer
+               option
+               flag
+               borfder
+       boxsizer
+          orient
+    staticboxsizer
+          orient
+          label
+       gridsizer
+          rows
+          cols
+          vgap
+          hgap
+       flexgridsizer
+          rows
+          cols
+          vgap
+          hgap
+          growablerows
+          growablecols
+    minsize
+*/
 //---------------------------------------------------------------------------
 // wxSizerItem
 //---------------------------------------------------------------------------
@@ -94,10 +125,16 @@ wxSizerItem::wxSizerItem( wxSizer *sizer, int proportion, int flag, int border,
 
 wxSizerItem::~wxSizerItem()
 {
-    if (m_userData)
-        delete m_userData;
-    if (m_sizer)
+    delete m_userData;
+
+    if ( m_window )
+    {
+        m_window->SetContainingSizer(NULL);
+    }
+    else // we must be a sizer
+    {
         delete m_sizer;
+    }
 }