]> git.saurik.com Git - wxWidgets.git/commitdiff
Moved wxPropertyGrid::SetPropertyName() to wxPropertyGridInterface
authorJaakko Salli <jaakko.salli@dnainternet.net>
Mon, 29 Sep 2008 17:01:04 +0000 (17:01 +0000)
committerJaakko Salli <jaakko.salli@dnainternet.net>
Mon, 29 Sep 2008 17:01:04 +0000 (17:01 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55955 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

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

index 1e1163bcb255ef44c7e06168642f7795cdfaea61..e22071ab4ae86fe381d521f7b49c99f749b6e572 100644 (file)
@@ -1035,18 +1035,6 @@ public:
         virtual width should be disabled. */
     void SetVirtualWidth( int width );
 
-    /** Sets name of a property.
-        @param id
-        Name or pointer of property which name to change.
-        @param newname
-        New name.
-    */
-    void SetPropertyName( wxPGPropArg id, const wxString& newname )
-    {
-        wxPG_PROP_ARG_CALL_PROLOG()
-        DoSetPropertyName( p, newname );
-    }
-
     /**
         Moves splitter as left as possible, while still allowing all
         labels to be shown in full.
@@ -1813,8 +1801,6 @@ protected:
 
     int CacheColour( const wxColour& colour );
 
-    void DoSetPropertyName( wxPGProperty* p, const wxString& newname );
-
     // Sets up basic event handling for child control
     void SetupChildEventHandling( wxWindow* wnd, int id );
 
index d75fdf0aa656f6423549a040066c2a7c57e832a1..5698fbe393db08268a569874043483e870b053fb 100644 (file)
@@ -961,6 +961,21 @@ public:
         p->SetModifiedStatus(modified);
     }
 
+    /**
+        Sets name of a property.
+
+        @param id
+            Name or pointer of property which name to change.
+
+        @param newName
+            New name for property.
+    */
+    void SetPropertyName( wxPGPropArg id, const wxString& newName )
+    {
+        wxPG_PROP_ARG_CALL_PROLOG()
+        m_pState->DoSetPropertyName( p, newName );
+    }
+
     /**
         Sets property (and, recursively, its children) to have read-only value.
         In other words, user cannot change the value in the editor, but they
index 279c12d197371f60242775bee29a5c595f1d8456..3d6e1725250e8ffefec8a8aed7fb44da03fe2944 100644 (file)
@@ -502,6 +502,8 @@ public:
 
     wxPGProperty* DoGetRoot() const { return m_properties; }
 
+    void DoSetPropertyName( wxPGProperty* p, const wxString& newName );
+
     // Returns combined width of margin and all the columns
     int GetVirtualWidth() const
     {
index 0629ec2a1817a1f1b0ee04a26c94eb2d98ee974b..04a8ac21ad43fdab1fd5f0a71df94ad4b5d6ef2f 100644 (file)
@@ -797,17 +797,6 @@ public:
     */
     void SetSplitterPosition( int newxpos, int col = 0 );
 
-    /**
-        Sets name of a property.
-
-        @param id
-            Name or pointer of property which name to change.
-
-        @param newname
-            New name.
-    */
-    void SetPropertyName( wxPGPropArg id, const wxString& newname );
-
     /**
         Moves splitter as left as possible, while still allowing all
         labels to be shown in full.
index c92b1ac050ad7a035169ab48a7be6539f8c82181..02479c777a900e22140fe02b2d590f35c2670311 100644 (file)
@@ -658,6 +658,17 @@ public:
     */
     void SetPropertyModifiedStatus( wxPGPropArg id, bool modified );
 
+    /**
+        Sets name of a property.
+
+        @param id
+            Name or pointer of property which name to change.
+
+        @param newName
+            New name for property.
+    */
+    void SetPropertyName( wxPGPropArg id, const wxString& newName );
+
     /**
         Sets property (and, recursively, its children) to have read-only value.
         In other words, user cannot change the value in the editor, but they can
index 931633ee5a4e3065b6186914bf0b5d827468eaf8..e161307f7786dad5a87c499a52e9a052a66b3aa3 100644 (file)
@@ -1491,18 +1491,6 @@ void wxPropertyGrid::DoSetPropertyValueUnspecified( wxPGProperty* p )
 // wxPropertyGrid property operations
 // -----------------------------------------------------------------------
 
-void wxPropertyGrid::DoSetPropertyName( wxPGProperty* p, const wxString& newname )
-{
-    wxCHECK_RET( p, wxT("invalid property id") );
-
-    if ( p->GetBaseName().Len() ) m_pState->m_dictName.erase( p->GetBaseName() );
-    if ( newname.Len() ) m_pState->m_dictName[newname] = (void*) p;
-
-    p->DoSetName(newname);
-}
-
-// -----------------------------------------------------------------------
-
 bool wxPropertyGrid::EnsureVisible( wxPGPropArg id )
 {
     wxPG_PROP_ARG_CALL_PROLOG_RETVAL(false)
index 18c0369c6ce61efa02661a81f22357b0bf7e85dd..693d33921779dcbe966acac692883fef29f19711 100644 (file)
@@ -448,6 +448,19 @@ wxPGProperty* wxPropertyGridPageState::BaseGetPropertyByName( const wxString& na
     return (wxPGProperty*) NULL;
 }
 
+// -----------------------------------------------------------------------
+
+void wxPropertyGridPageState::DoSetPropertyName( wxPGProperty* p,
+                                                 const wxString& newName )
+{
+    wxCHECK_RET( p, wxT("invalid property id") );
+
+    if ( p->GetBaseName().Len() ) m_dictName.erase( p->GetBaseName() );
+    if ( newName.Len() ) m_dictName[newName] = (void*) p;
+
+    p->DoSetName(newName);
+}
+
 // -----------------------------------------------------------------------
 // wxPropertyGridPageState global operations
 // -----------------------------------------------------------------------