X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1c4293cb91327247ad69e6ec8d589bfaa299db28..9932114546651c2c3cc5f28ee22fb9786a403e6e:/src/propgrid/manager.cpp?ds=sidebyside diff --git a/src/propgrid/manager.cpp b/src/propgrid/manager.cpp index 6d7338d824..333a758b9d 100644 --- a/src/propgrid/manager.cpp +++ b/src/propgrid/manager.cpp @@ -16,6 +16,8 @@ #pragma hdrstop #endif +#if wxUSE_PROPGRID + #ifndef WX_PRECOMP #include "wx/defs.h" #include "wx/object.h" @@ -29,17 +31,9 @@ #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; iGetStatePtr()->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