]> git.saurik.com Git - wxWidgets.git/commitdiff
Moved SetPropertyAttributeAll() to wxPropertyGridInterface
authorJaakko Salli <jaakko.salli@dnainternet.net>
Sun, 21 Sep 2008 15:42:08 +0000 (15:42 +0000)
committerJaakko Salli <jaakko.salli@dnainternet.net>
Sun, 21 Sep 2008 15:42:08 +0000 (15:42 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55767 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/propgrid/manager.h
include/wx/propgrid/propgrid.h
include/wx/propgrid/propgridiface.h
interface/wx/propgrid/manager.h
interface/wx/propgrid/propgrid.h
interface/wx/propgrid/propgridiface.h
src/propgrid/manager.cpp
src/propgrid/propgrid.cpp
src/propgrid/propgridiface.cpp

index 981c00b62181f6ea586ad149db54fb6d2a24d8a5..1b84265dd0d213388e19fd935f89c0ae44f8bba1 100644 (file)
@@ -595,12 +595,6 @@ public:
     /** Sets y coordinate of the description box splitter. */
     void SetDescBoxHeight( int ht, bool refresh = true );
 
-    /** Sets property attribute for all applicapple properties.
-        Be sure to use this method after all properties have been
-        added to the grid.
-    */
-    void SetPropertyAttributeAll( const wxString& name, wxVariant value );
-
     /** Moves splitter as left as possible, while still allowing all
         labels to be shown in full.
         @param subProps
index dc75e9b1e806d2a2a053e25f65a56ab3a6d5582c..4fce66d137174555c1a86611e83dffb335eff41c 100644 (file)
@@ -966,12 +966,6 @@ public:
     /** Sets background colour of margin. */
     void SetMarginColour(const wxColour& col);
 
-    /** Sets property attribute for all applicapple properties.
-        Be sure to use this method only after all properties have been
-        added to the grid.
-    */
-    void SetPropertyAttributeAll( const wxString& attrName, wxVariant value );
-
     /** Sets background colour of property and all its children. Colours of
         captions are not affected. Background brush cache is optimized for often
         set colours to be set last.
index 76aa1afa765135a78f3faee2825ec1836f17a30a..82a47a7cfedb66c39fd414ca3300a9440aefca66 100644 (file)
@@ -908,6 +908,12 @@ public:
         DoSetPropertyAttribute(id,attrName,value,argFlags);
     }
 
+    /** Sets property attribute for all applicapple properties.
+        Be sure to use this method only after all properties have been
+        added to the grid.
+    */
+    void SetPropertyAttributeAll( const wxString& attrName, wxVariant value );
+
     /** Sets attributes from a wxPGAttributeStorage.
     */
     void SetPropertyAttributes( wxPGPropArg id,
index f838f7ca037553c2b96b7c83cc3518c07df5ec75..56c75f02181665f0f04451c1c9d58e0afee593ab 100644 (file)
@@ -483,12 +483,6 @@ public:
     /** Sets y coordinate of the description box splitter. */
     void SetDescBoxHeight( int ht, bool refresh = true );
 
-    /** Sets property attribute for all applicapple properties.
-        Be sure to use this method after all properties have been
-        added to the grid.
-    */
-    void SetPropertyAttributeAll( const wxString& name, wxVariant value );
-
     /** Moves splitter as left as possible, while still allowing all
         labels to be shown in full.
         @param subProps
index 76cd3203e799894b2d22957d2f39af5fc6844e56..367bb40e8809194221bf5775477927789be8f150 100644 (file)
@@ -647,12 +647,6 @@ public:
     /** Sets background colour of margin. */
     void SetMarginColour(const wxColour& col);
 
-    /** Sets property attribute for all applicapple properties.
-        Be sure to use this method only after all properties have been
-        added to the grid.
-    */
-    void SetPropertyAttributeAll( const wxString& attrName, wxVariant value );
-
     /** Sets background colour of property and all its children. Colours of
         captions are not affected. Background brush cache is optimized for often
         set colours to be set last.
index c273dfc161bcac08dfbca38958614e8142e73ce5..950c16c8d881b6c761ab924496b3f17555da78c7 100644 (file)
@@ -665,6 +665,12 @@ public:
         DoSetPropertyAttribute(id,attrName,value,argFlags);
     }
 
+    /** Sets property attribute for all applicapple properties.
+        Be sure to use this method only after all properties have been
+        added to the grid.
+    */
+    void SetPropertyAttributeAll( const wxString& attrName, wxVariant value );
+
     /** Sets attributes from a wxPGAttributeStorage.
     */
     void SetPropertyAttributes( wxPGPropArg id, const wxPGAttributeStorage& attributes )
index 5864d13b5eca67e79c6a6f6b4e6eae41269f0f28..d328984250d16cc9abab6c55d230c6d966f71ac4 100644 (file)
@@ -703,19 +703,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) )
index fc40bcf90b45c9ac200577d573b116d19a4a5d75..cdafad48f02e48eef792334ca4a1735d90e1dee7 100644 (file)
@@ -6016,11 +6016,6 @@ wxEvent* wxPropertyGridEvent::Clone() const
     return new wxPropertyGridEvent( *this );
 }
 
-void wxPropertyGrid::SetPropertyAttributeAll( const wxString& attrName, wxVariant value )
-{
-    DoSetPropertyAttribute(GetRoot(), attrName, value, wxPG_RECURSE);
-}
-
 // -----------------------------------------------------------------------
 // wxPropertyGridPopulator
 // -----------------------------------------------------------------------
index 74b071871db006ec16b0b1141cfd4327649acd53..78540a738f67c5bc0372c3003c4fdd5a6b56ebeb 100644 (file)
@@ -549,6 +549,24 @@ void wxPropertyGridInterface::DoSetPropertyAttribute( wxPGPropArg id, const wxSt
 
 // -----------------------------------------------------------------------
 
+void wxPropertyGridInterface::SetPropertyAttributeAll( const wxString& attrName,
+                                                       wxVariant value )
+{
+    unsigned int pageIndex = 0;
+
+    for (;;)
+    {
+        wxPropertyGridPageState* page = GetPageState(pageIndex);
+        if ( !page ) break;
+
+        DoSetPropertyAttribute(page->DoGetRoot(), attrName, value, wxPG_RECURSE);
+
+        pageIndex++;
+    }
+}
+
+// -----------------------------------------------------------------------
+
 void wxPropertyGridInterface::GetPropertiesWithFlag( wxArrayPGProperty* targetArr,
                                                      wxPGProperty::FlagType flags,
                                                      bool inverse,
@@ -874,14 +892,17 @@ wxString wxPropertyGridInterface::SaveEditableState( int includedStates ) const
 
     //
     // Save state on page basis
-    size_t pageIndex = 0;
-    wxPropertyGridPageState* pageState = GetPageState(pageIndex);
+    unsigned int pageIndex = 0;
     wxArrayPtrVoid pageStates;
-    while ( pageState )
+
+    for (;;)
     {
-        pageStates.Add(pageState);
-        pageIndex += 1;
-        pageState = GetPageState(pageIndex);
+        wxPropertyGridPageState* page = GetPageState(pageIndex);
+        if ( !page ) break;
+
+        pageStates.Add(page);
+
+        pageIndex++;
     }
 
     for ( pageIndex=0; pageIndex < pageStates.size(); pageIndex++ )