]> git.saurik.com Git - wxWidgets.git/blobdiff - src/propgrid/manager.cpp
Update from Brian.
[wxWidgets.git] / src / propgrid / manager.cpp
index 6d7338d824480be78408332b2b73cb65cbbbad8e..333a758b9d60bf89cb84dbaebed47821662a52c7 100644 (file)
@@ -16,6 +16,8 @@
     #pragma hdrstop
 #endif
 
+#if wxUSE_PROPGRID
+
 #ifndef WX_PRECOMP
     #include "wx/defs.h"
     #include "wx/object.h"
     #include "wx/pen.h"
     #include "wx/brush.h"
     #include "wx/cursor.h"
-    #include "wx/dialog.h"
     #include "wx/settings.h"
-    #include "wx/msgdlg.h"
-    #include "wx/choice.h"
     #include "wx/textctrl.h"
-    #include "wx/dirdlg.h"
-    #include "wx/combobox.h"
-    #include "wx/layout.h"
     #include "wx/sizer.h"
-    #include "wx/textdlg.h"
-    #include "wx/filedlg.h"
     #include "wx/statusbr.h"
     #include "wx/intl.h"
 #endif
@@ -701,19 +695,6 @@ void wxPropertyGridManager::SetColumnCount( int colCount, int page )
 }
 // -----------------------------------------------------------------------
 
-void wxPropertyGridManager::SetPropertyAttributeAll( const wxString& attrName, wxVariant value )
-{
-    size_t i;
-    for ( i=0; i<GetPageCount(); i++ )
-    {
-        wxPropertyGridPage* page = (wxPropertyGridPage*)m_arrPages.Item(i);
-
-        DoSetPropertyAttribute(page->GetStatePtr()->m_properties, attrName, value, wxPG_RECURSE);
-    }
-}
-
-// -----------------------------------------------------------------------
-
 size_t wxPropertyGridManager::GetPageCount() const
 {
        if ( !(m_iFlags & wxPG_MAN_FL_PAGE_INSERTED) )
@@ -724,13 +705,15 @@ size_t wxPropertyGridManager::GetPageCount() const
 
 // -----------------------------------------------------------------------
 
-int wxPropertyGridManager::InsertPage( int index, const wxString& label,
-                                       const wxBitmap& bmp, wxPropertyGridPage* pageObj )
+wxPropertyGridPage* wxPropertyGridManager::InsertPage( int index,
+                                                       const wxString& label,
+                                                       const wxBitmap& bmp,
+                                                       wxPropertyGridPage* pageObj )
 {
     if ( index < 0 )
         index = GetPageCount();
 
-    wxCHECK_MSG( (size_t)index == GetPageCount(), -1,
+    wxCHECK_MSG( (size_t)index == GetPageCount(), NULL,
         wxT("wxPropertyGridManager currently only supports appending pages (due to wxToolBar limitation)."));
 
     bool needInit = true;
@@ -845,7 +828,7 @@ int wxPropertyGridManager::InsertPage( int index, const wxString& label,
 
     wxASSERT( pageObj->GetGrid() );
 
-    return index;
+    return pageObj;
 }
 
 // -----------------------------------------------------------------------
@@ -1354,13 +1337,6 @@ bool wxPropertyGridManager::EnsureVisible( wxPGPropArg id )
 
 // -----------------------------------------------------------------------
 
-size_t wxPropertyGridManager::GetChildrenCount( int page_index )
-{
-    return GetChildrenCount( GetPage(page_index)->GetStatePtr()->m_properties );
-}
-
-// -----------------------------------------------------------------------
-
 void wxPropertyGridManager::OnToolbarClick( wxCommandEvent &event )
 {
     int id = event.GetId();
@@ -1690,3 +1666,5 @@ wxPGVIterator wxPropertyGridManager::GetVIterator( int flags ) const
 {
     return wxPGVIterator( new wxPGVIteratorBase_Manager( (wxPropertyGridManager*)this, flags ) );
 }
+
+#endif  // wxUSE_PROPGRID