]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/propgrid/editors.h
move virtual GetPath() implementation out of line to work around an apparent Fedora...
[wxWidgets.git] / include / wx / propgrid / editors.h
index 912d888397a8702da8204497cc3a95bb701d4bfa..dcc66671e580a20b92c793b93ab9146ebbe4bae4 100644 (file)
@@ -114,17 +114,10 @@ public:
         @remarks
         - Primary control shall use id wxPG_SUBID1, and secondary (button)
           control shall use wxPG_SUBID2.
         @remarks
         - Primary control shall use id wxPG_SUBID1, and secondary (button)
           control shall use wxPG_SUBID2.
-        - Implementation shoud connect all necessary events to the
-          wxPropertyGrid::OnCustomEditorEvent. For Example:
-            @code
-                // Relays wxEVT_COMMAND_TEXT_UPDATED events of primary editor
-                // control to the OnEvent.
-                control->Connect(control->GetId(), wxEVT_COMMAND_TEXT_UPDATED,
-                                 wxCommandEventHandler(wxPropertyGrid::OnCustomEditorEvent),
-                                 NULL, propgrid);
-            @endcode
-          OnCustomEditorEvent will then forward events, first to
-          wxPGEditor::OnEvent() and then to wxPGProperty::OnEvent().
+        - Unlike in previous version of wxPropertyGrid, it is no longer
+          necessary to call wxEvtHandler::Connect() for interesting editor
+          events. Instead, all events from control are now automatically
+          forwarded to wxPGEditor::OnEvent() and wxPGProperty::OnEvent().
     */
     virtual wxPGWindowList CreateControls(wxPropertyGrid* propgrid,
                                           wxPGProperty* property,
     */
     virtual wxPGWindowList CreateControls(wxPropertyGrid* propgrid,
                                           wxPGProperty* property,
@@ -221,7 +214,7 @@ wxString CLASSNAME::GetName() const \
 { \
     return wxS(#EDITOR); \
 } \
 { \
     return wxS(#EDITOR); \
 } \
-wxPGEditor* wxPGEditor_##EDITOR = (wxPGEditor*) NULL;
+wxPGEditor* wxPGEditor_##EDITOR = NULL;
 
 
 //
 
 
 //
@@ -391,7 +384,7 @@ public:
 #endif  // !SWIG
 
 
 #endif  // !SWIG
 
 
-#if wxPG_INCLUDE_CHECKBOX || defined(DOXYGEN)
+#if wxPG_INCLUDE_CHECKBOX
 
 //
 // Use custom check box code instead of native control
 
 //
 // Use custom check box code instead of native control
@@ -441,7 +434,7 @@ public:
 // Editor class registeration macro (mostly for internal use)
 
 #define wxPGRegisterEditorClass(EDITOR) \
 // Editor class registeration macro (mostly for internal use)
 
 #define wxPGRegisterEditorClass(EDITOR) \
-    if ( wxPGEditor_##EDITOR == (wxPGEditor*) NULL ) \
+    if ( wxPGEditor_##EDITOR == NULL ) \
     { \
         wxPGEditor_##EDITOR = wxPropertyGrid::RegisterEditorClass( \
                 new wxPG##EDITOR##Editor ); \
     { \
         wxPGEditor_##EDITOR = wxPropertyGrid::RegisterEditorClass( \
                 new wxPG##EDITOR##Editor ); \
@@ -525,7 +518,7 @@ public:
 
     /** Returns number of buttons.
     */
 
     /** Returns number of buttons.
     */
-    int GetCount() const { return m_buttons.Count(); }
+    unsigned int GetCount() const { return (unsigned int) m_buttons.size(); }
 
     void Add( const wxString& label, int id = -2 );
 #if wxUSE_BMPBUTTON
 
     void Add( const wxString& label, int id = -2 );
 #if wxUSE_BMPBUTTON
@@ -539,15 +532,15 @@ public:
 
     void Finalize( wxPropertyGrid* propGrid, const wxPoint& pos );
 
 
     void Finalize( wxPropertyGrid* propGrid, const wxPoint& pos );
 
-#ifndef DOXYGEN
 protected:
 
 protected:
 
+    void DoAddButton( wxWindow* button, const wxSize& sz );
+
     int GenId( int id ) const;
 
     wxArrayPtrVoid  m_buttons;
     wxSize          m_fullEditorSize;
     int             m_buttonsWidth;
     int GenId( int id ) const;
 
     wxArrayPtrVoid  m_buttons;
     wxSize          m_fullEditorSize;
     int             m_buttonsWidth;
-#endif // !DOXYGEN
 };
 
 // -----------------------------------------------------------------------
 };
 
 // -----------------------------------------------------------------------