Patch #2104 2007-07-24 21:39

pauliusz

wxPropertyGrid 1.2.6->1.2.8
Download
2104-wxPropertyGrid.patch (140.8 KB)
Category
Application::Refinement
Status
Closed
Close date
2007-11-03 15:36
Assigned to
 
Index: src/include/propgrid/include/wx/propgrid/manager.h
===================================================================
--- src/include/propgrid/include/wx/propgrid/manager.h    (revision 4307)
+++ src/include/propgrid/include/wx/propgrid/manager.h    (working copy)
@@ -925,6 +925,8 @@
 #endif
     wxPG_IMPLEMENT_PGMAN_METHOD_NORET1_INBODY(SetPropertyValuePoint,const wxPoint&)
     wxPG_IMPLEMENT_PGMAN_METHOD_NORET1_INBODY(SetPropertyValueSize,const wxSize&)
+    wxPG_IMPLEMENT_PGMAN_METHOD_NORET1_INBODY(SetPropertyValueLongLong,const wxLongLong&)
+    wxPG_IMPLEMENT_PGMAN_METHOD_NORET1_INBODY(SetPropertyValueULongLong,const wxULongLong&)
 #ifdef __WXPYTHON__
     wxPG_IMPLEMENT_PGMAN_METHOD_NORET1_INBODY(SetPropertyValuePyObject,PyObject*)
 #endif
@@ -1228,7 +1230,7 @@
 
     void RefreshHelpBox( int new_splittery, int new_width, int new_height );
 
-    void RepaintSplitter( int new_splittery, int new_width, int new_height, bool desc_too );
+    void RepaintSplitter( wxDC& dc, int new_splittery, int new_width, int new_height, bool desc_too );
 
     void SetDescribedProperty( wxPGProperty* p );
 
Index: src/include/propgrid/include/wx/propgrid/odcombo.h
===================================================================
--- src/include/propgrid/include/wx/propgrid/odcombo.h    (revision 4307)
+++ src/include/propgrid/include/wx/propgrid/odcombo.h    (working copy)
@@ -924,7 +924,7 @@
     // helpers
     inline int GetItemAtPosition( const wxPoint& pos ) { return HitTest(pos); }
     inline wxCoord GetTotalHeight() const { return EstimateTotalHeight(); }
-    inline wxCoord GetLineHeight(int line) const { return OnGetLineHeight(line); }
+    inline wxCoord GetLineHeight(int line) const { return OnMeasureItem(line); }
 
 protected:
 
@@ -938,6 +938,8 @@
     // Re-calculates width for given item
     void CheckWidth( int pos );
 
+    virtual wxCoord OnGetRowHeight(size_t n) const { return OnMeasureItem(n); }
+
     // wxVListBox implementation
     virtual void OnDrawItem(wxDC& dc, const wxRect& rect, size_t n) const;
     virtual wxCoord OnMeasureItem(size_t n) const;
Index: src/include/propgrid/include/wx/propgrid/pg_dox_mainpage.h
===================================================================
--- src/include/propgrid/include/wx/propgrid/pg_dox_mainpage.h    (revision 4307)
+++ src/include/propgrid/include/wx/propgrid/pg_dox_mainpage.h    (working copy)
@@ -13,7 +13,7 @@
 #define __WX_PG_DOX_MAINPAGE_H__
 
 /**
-    \mainpage wxPropertyGrid 1.2.6 Overview
+    \mainpage wxPropertyGrid 1.2.8 Overview
 
       wxPropertyGrid is a specialized two-column grid for editing properties
     such as strings, numbers, flagsets, fonts, and colours. It allows hierarchial,
@@ -166,7 +166,7 @@
         pg->Append( wxFileProperty(wxT("FileProperty"), wxPG_LABEL, wxEmptyString) );
 
         // Extra: set wildcard for file property (format same as in wxFileDialog).
-        pg->SetPropertyAttribute(wxT("TextFile"),
+        pg->SetPropertyAttribute(wxT("FileProperty"),
                                  wxPG_FILE_WILDCARD,
                                  wxT("All files (*.*)|*.*"));
 
@@ -217,11 +217,12 @@
         // Set new label - we need to use the new name.
         pg->SetPropertyLabel( wxT("X"), wxT("New Label") );
 
-        // Disable the property. It's text will appear greyed.
-        // This is probably the closest you can get if you want
-        // a "read-only" property.
+        // Disable the property.
         pg->DisableProperty( MyPropertyId );
 
+        // Set property as read-only.
+        pg->SetPropertyReadOnly( MyPropertyId );
+
     \endcode
 
 
@@ -1593,7 +1594,8 @@
 
         #include <wx/propgrid/propdev.h>
 
-        WX_PG_IMPLEMENT_STRING_PROPERTY(PROPNAME,FLAGS)
+        // FLAGS can be wxPG_NO_ESCAPE if escape sequences shall not be expanded.
+        WX_PG_IMPLEMENT_STRING_PROPERTY(PROPNAME, FLAGS)
 
         bool PROPNAMEClass::OnButtonClick( wxPropertyGrid* propgrid, wxString& value )
         {
@@ -1615,7 +1617,7 @@
 
         #include <wx/propgrid/propdev.h>
 
-        WX_PG_IMPLEMENT_STRING_PROPERTY_WITH_VALIDATOR(PROPNAME)
+        WX_PG_IMPLEMENT_STRING_PROPERTY_WITH_VALIDATOR(PROPNAME, FLAGS)
 
         bool PROPNAMEClass::OnButtonClick( wxPropertyGrid* propgrid, wxString& value )
         {
Index: src/include/propgrid/include/wx/propgrid/propdev.h
===================================================================
--- src/include/propgrid/include/wx/propgrid/propdev.h    (revision 4307)
+++ src/include/propgrid/include/wx/propgrid/propdev.h    (working copy)
@@ -1669,14 +1669,11 @@
 protected:
 #ifndef SWIG
 
-    const wxString* m_str;
-    const wxChar*   m_curPos;
-#if wxUSE_STL
-    //wxString        m_buffer;
+    const wxString*             m_str;
+    wxString::const_iterator    m_curPos;
+    wxString                    m_readyToken;
+    wxUniChar                   m_delimeter;
 #endif
-    wxString        m_readyToken;
-    wxChar          m_delimeter;
download for full patch...
killerbot 2007-07-26 14:39

question : do you know whzt fixes, extras it brings ??

and did you try it out in CB ? does it break something ?

pauliusz 2007-07-29 20:45

Please see the CHANGES-propgrid.txt. It is updated with this patch.

Compiles and works with CB under Windows. I haven't noticed any side effects. This patch doesn't break previous patches.

biplab 2007-11-03 15:36

Closed on request from submitter.