]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/propgrid/propgrid.h
Make sure all Bakefile formats that use CRLF line feeds are set to use CRLF in SVN.
[wxWidgets.git] / samples / propgrid / propgrid.h
index ef1048a78a43da9d0cecd4e68787a01399d57f45..e3c5dc5b6ad6534bbd03e148be59333d41aab64a 100644 (file)
@@ -4,7 +4,7 @@
 // Author:      Jaakko Salli
 // Modified by:
 // Created:     2004-09-25
-// RCS-ID:      $Id:
+// RCS-ID:      $Id$
 // Copyright:   (c) Jaakko Salli
 // Licence:     wxWindows license
 /////////////////////////////////////////////////////////////////////////////
@@ -26,9 +26,11 @@ public:
 
     virtual void OnSetValue();  // Override to allow image loading.
 
-    WX_PG_DECLARE_CHOICE_METHODS()
-    WX_PG_DECLARE_EVENT_METHODS()
-    WX_PG_DECLARE_CUSTOM_PAINT_METHODS()
+    virtual bool IntToValue( wxVariant& variant, int number, int argFlags = 0 ) const;
+    virtual bool OnEvent( wxPropertyGrid* propgrid, wxWindow* primary, wxEvent& event );
+    virtual wxSize OnMeasureImage( int item ) const;
+    virtual void OnCustomPaint( wxDC& dc,
+                                const wxRect& rect, wxPGPaintData& paintdata );
 
     void LoadThumbnails( size_t n );
 
@@ -62,7 +64,7 @@ inline bool operator == (const wxVector3f& a, const wxVector3f& b)
     return (a.x == b.x && a.y == b.y && a.z == b.z);
 }
 
-WX_PG_DECLARE_VARIANT_DATA(wxVector3fVariantData, wxVector3f, wxEMPTY_PARAMETER_VALUE)
+WX_PG_DECLARE_VARIANT_DATA(wxVector3f)
 
 class wxVectorProperty : public wxPGProperty
 {
@@ -70,11 +72,14 @@ class wxVectorProperty : public wxPGProperty
 public:
 
     wxVectorProperty( const wxString& label = wxPG_LABEL,
-                      const wxString& name = wxPG_LABEL,
-                      const wxVector3f& value = wxVector3f() );
+                    const wxString& name = wxPG_LABEL,
+                    const wxVector3f& value = wxVector3f() );
     virtual ~wxVectorProperty();
 
-    WX_PG_DECLARE_PARENTAL_METHODS()
+    virtual wxVariant ChildChanged( wxVariant& thisValue,
+                                    int childIndex,
+                                    wxVariant& childValue ) const;
+    virtual void RefreshChildren();
 
 protected:
 };
@@ -92,7 +97,7 @@ inline bool operator == (const wxTriangle& a, const wxTriangle& b)
     return (a.a == b.a && a.b == b.b && a.c == b.c);
 }
 
-WX_PG_DECLARE_VARIANT_DATA(wxTriangleVariantData, wxTriangle, wxEMPTY_PARAMETER_VALUE)
+WX_PG_DECLARE_VARIANT_DATA(wxTriangle)
 
 class wxTriangleProperty : public wxPGProperty
 {
@@ -104,7 +109,10 @@ public:
                         const wxTriangle& value = wxTriangle() );
     virtual ~wxTriangleProperty();
 
-    WX_PG_DECLARE_PARENTAL_METHODS()
+    virtual wxVariant ChildChanged( wxVariant& thisValue,
+                                    int childIndex,
+                                    wxVariant& childValue ) const;
+    virtual void RefreshChildren();
 
 protected:
 };
@@ -122,7 +130,7 @@ class FormMain : public wxFrame
 {
 public:
     FormMain(const wxString& title, const wxPoint& pos, const wxSize& size );
-       ~FormMain();
+    ~FormMain();
 
     wxPropertyGridManager*  m_pPropGridManager;
     wxPropertyGrid*     m_propGrid;
@@ -131,6 +139,7 @@ public:
     wxWindow*       m_panel;
     wxBoxSizer*     m_topSizer;
 
+    wxPGEditor*     m_pSampleMultiButtonEditor;
     wxPGChoices     m_combinedFlags;
 
     wxMenuItem*     m_itemCatColours;
@@ -143,6 +152,7 @@ public:
 
 
     void CreateGrid( int style, int extraStyle );
+    void FinalizeFramePosition();
 
     // These are used in CreateGrid(), and in tests to compose
     // grids for testing purposes.
@@ -171,8 +181,10 @@ public:
 
     void OnEnableDisable( wxCommandEvent& event );
     void OnHideShow( wxCommandEvent& event );
+    void OnSetBackgroundColour( wxCommandEvent& event );
     void OnClearModifyStatusClick( wxCommandEvent& event );
     void OnFreezeClick( wxCommandEvent& event );
+    void OnEnableLabelEditing( wxCommandEvent& event );
     void OnDumpList( wxCommandEvent& event );
     void OnCatColours( wxCommandEvent& event );
     void OnSetColumns( wxCommandEvent& event );
@@ -219,6 +231,8 @@ public:
     void OnPropertyGridKeyEvent( wxKeyEvent& event );
     void OnPropertyGridItemCollapse( wxPropertyGridEvent& event );
     void OnPropertyGridItemExpand( wxPropertyGridEvent& event );
+    void OnPropertyGridLabelEditBegin( wxPropertyGridEvent& event );
+    void OnPropertyGridLabelEditEnding( wxPropertyGridEvent& event );
 
     void OnAbout( wxCommandEvent& event );