]> git.saurik.com Git - wxWidgets.git/commitdiff
wxPGProperty::GenerateComposedValue() -> protected DoGenerateComposedValue(), added...
authorJaakko Salli <jaakko.salli@dnainternet.net>
Fri, 17 Oct 2008 16:46:38 +0000 (16:46 +0000)
committerJaakko Salli <jaakko.salli@dnainternet.net>
Fri, 17 Oct 2008 16:46:38 +0000 (16:46 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/propgrid/property.h
interface/wx/propgrid/property.h
src/propgrid/property.cpp
src/propgrid/props.cpp

index 13ba5c5be87438ef3789aca981defcadd127fccc..8a087be51e7c88ebd6dbc0c5f1e6a871abc91781 100644 (file)
@@ -1390,13 +1390,14 @@ public:
     }
 
     /**
-        Composes text from values of child properties. You usually do not have
-        to care about arguments other than 'text'.
+        Composes text from values of child properties.
     */
-    void GenerateComposedValue( wxString& text,
-                                int argFlags = wxPG_VALUE_IS_CURRENT,
-                                const wxVariantList* valueOverrides = NULL,
-                                wxPGHashMapS2S* childResults = NULL ) const;
+    wxString GenerateComposedValue() const
+    {
+        wxString s;
+        DoGenerateComposedValue(s);
+        return s;
+    }
 
     /** Returns property's label. */
     const wxString& GetLabel() const { return m_label; }
@@ -2054,6 +2055,11 @@ protected:
                     int index = -1,
                     bool correct_mode = true );
 
+    void DoGenerateComposedValue( wxString& text,
+                                  int argFlags = wxPG_VALUE_IS_CURRENT,
+                                  const wxVariantList* valueOverrides = NULL,
+                                  wxPGHashMapS2S* childResults = NULL ) const;
+
     void DoSetName(const wxString& str) { m_name = str; }
 
     void InitAfterAdded( wxPropertyGridPageState* pageState,
index a9ca0b8b352dbfb710ebf85ae670be7d144ee62c..4538172cc2f36ac7ce1e3125ee5d8fa13959fade 100644 (file)
@@ -929,10 +929,9 @@ public:
     void Empty();
 
     /**
-        Composes text from values of child properties. You usually do not have
-        to care about arguments other than 'text'.
+        Composes text from values of child properties.
     */
-    void GenerateComposedValue( wxString& text, int argFlags = 0 ) const;
+    wxString GenerateComposedValue() const;
 
     /**
         Returns property attribute value, null variant if not found.
index d2ad9a372d8f024ca643c61a89170284135e85b0..093793c8026a85950fa824569c32e1a0a28cf2f3 100644 (file)
@@ -664,10 +664,10 @@ wxString wxPGProperty::GetColumnText( unsigned int col ) const
     return wxEmptyString;
 }
 
-void wxPGProperty::GenerateComposedValue( wxString& text,
-                                          int argFlags,
-                                          const wxVariantList* valueOverrides,
-                                          wxPGHashMapS2S* childResults ) const
+void wxPGProperty::DoGenerateComposedValue( wxString& text,
+                                            int argFlags,
+                                            const wxVariantList* valueOverrides,
+                                            wxPGHashMapS2S* childResults ) const
 {
     int i;
     int iMax = m_children.size();
@@ -733,8 +733,8 @@ void wxPGProperty::GenerateComposedValue( wxString& text,
                  childValue.GetType() == wxPG_VARIANT_TYPE_LIST )
             {
                 wxVariantList& childList = childValue.GetList();
-                GenerateComposedValue(s, argFlags|wxPG_COMPOSITE_FRAGMENT,
-                                      &childList, childResults);
+                DoGenerateComposedValue(s, argFlags|wxPG_COMPOSITE_FRAGMENT,
+                                        &childList, childResults);
             }
             else
             {
@@ -797,7 +797,7 @@ wxString wxPGProperty::ValueToString( wxVariant& WXUNUSED(value),
                   "implementation only works if value is m_value." );
 
     wxString text;
-    GenerateComposedValue(text, argFlags);
+    DoGenerateComposedValue(text, argFlags);
     return text;
 }
 
@@ -2115,7 +2115,7 @@ wxPGProperty* wxPGProperty::UpdateParentValues()
          !parent->IsCategory() && !parent->IsRoot() )
     {
         wxString s;
-        parent->GenerateComposedValue(s);
+        parent->DoGenerateComposedValue(s);
         parent->m_value = s;
         return parent->UpdateParentValues();
     }
index 340d727a73df2e2295f27d420f9b16647ee4f93d..5c497fef72d2c09161334e92c9e61fc44c1a87f4 100644 (file)
@@ -79,7 +79,7 @@ void wxStringProperty::OnSetValue()
     if ( HasFlag(wxPG_PROP_COMPOSED_VALUE) )
     {
         wxString s;
-        GenerateComposedValue(s);
+        DoGenerateComposedValue(s);
         m_value = s;
     }
 }
@@ -101,7 +101,7 @@ wxString wxStringProperty::ValueToString( wxVariant& value,
                           "Sorry, currently default wxPGProperty::ValueToString() "
                           "implementation only works if value is m_value." );
 
-            GenerateComposedValue(s, argFlags);
+            DoGenerateComposedValue(s, argFlags);
         }
 
         return s;