]> git.saurik.com Git - wxWidgets.git/commitdiff
Add GetClassDefaultAttribute. Since it is static we need to put the
authorRobin Dunn <robin@alldunn.com>
Thu, 6 May 2004 17:35:43 +0000 (17:35 +0000)
committerRobin Dunn <robin@alldunn.com>
Thu, 6 May 2004 17:35:43 +0000 (17:35 +0000)
definition in all window classes so the right one will be called on
the C++ side of the fence.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27118 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

22 files changed:
wxPython/src/_button.i
wxPython/src/_checkbox.i
wxPython/src/_choice.i
wxPython/src/_combobox.i
wxPython/src/_gauge.i
wxPython/src/_notebook.i
wxPython/src/_panel.i
wxPython/src/_radio.i
wxPython/src/_scrolbar.i
wxPython/src/_slider.i
wxPython/src/_spin.i
wxPython/src/_splitter.i
wxPython/src/_statctrls.i
wxPython/src/_statusbar.i
wxPython/src/_textctrl.i
wxPython/src/_tglbtn.i
wxPython/src/_toolbar.i
wxPython/src/_toplvl.i
wxPython/src/_window.i
wxPython/src/calendar.i
wxPython/src/grid.i
wxPython/src/html.i

index be6ec069cc9187d989bc502d2d3fd162b24097a2..40c92dd7118d3f1d37ccf31d3713979f6e132629 100644 (file)
@@ -99,6 +99,9 @@ public:
     DocDeclStr(
         static wxSize , GetDefaultSize(),
         "Returns the default button size for this platform.");   
+
+    static wxVisualAttributes
+    GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 };
 
 
index ae785bad9961e756b91e976b1645bb8be2f81077..66fb9d20703aaf3d5346ddc461c924a709c578ee 100644 (file)
@@ -150,6 +150,8 @@ state to wx.CHK_UNDETERMINED.");
         "Returns whether or not the user can set the CheckBox to the third
 state.");
     
+    static wxVisualAttributes
+    GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 };
 
 //---------------------------------------------------------------------------
index fa5deae4cac57288ed0dc3de3cd0c2800dbcc214..de2bc68844ca1f455080020e5a9f32f41a2954a4 100644 (file)
@@ -94,6 +94,9 @@ public:
     
 
     %pythoncode { Select = SetSelection }
+
+    static wxVisualAttributes
+    GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 };
 
 //---------------------------------------------------------------------------
index ab262f9bf14f7de761501e5a321cc4d01a4413a8..e07864bca58595dfdbdcf7905a96d76b61026482 100644 (file)
@@ -166,6 +166,8 @@ public:
         virtual void , Remove(long from, long to),
         "Removes the text between the two positions in the combobox text field.");
     
+    static wxVisualAttributes
+    GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 };
 
 //---------------------------------------------------------------------------
index 264683d27aea57c917b01afd4084db2d2db2e2aa..6197cde3d4a3be3aa2f2d19bab942a420ab40ef1 100644 (file)
@@ -65,6 +65,10 @@ public:
     virtual int GetShadowWidth() const;
     virtual void SetBezelFace(int w);
     virtual int GetBezelFace() const;
+
+
+    static wxVisualAttributes
+    GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 };
 
 //---------------------------------------------------------------------------
index c63e2eaa7971b551a6a8aafd827d2501fcb9f31b..abb564f6b52b098cb2d3cdcc069c50d9c21c01c2 100644 (file)
@@ -115,6 +115,9 @@ public:
 
     // cycle thru the pages
     void AdvanceSelection(bool forward = True);
+
+    static wxVisualAttributes
+    GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 };
 
 
@@ -202,6 +205,9 @@ public:
     // Windows only: attempts to apply the UX theme page background to this page
   void ApplyThemeBackground(wxWindow* window, const wxColour& colour);
 #endif
+
+    static wxVisualAttributes
+    GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 };
 
 
index b0bcc1ad56053901722d3b3c3dac0869f911da90..a20389f1f6eff3f21a84e1799296b6b69dff67a5 100644 (file)
@@ -45,6 +45,8 @@ public:
 
     void InitDialog();
 
+    static wxVisualAttributes
+    GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 };
 
 //---------------------------------------------------------------------------
@@ -156,6 +158,9 @@ public:
     void SetTargetRect(const wxRect& rect);
     wxRect GetTargetRect() const;
 #endif
+
+    static wxVisualAttributes
+    GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 };
 
     
index 4e4dde6728b8bb2b0f1b7dfc28238f9a26115abb..c70ce8c11cd829ac961e4e2932795c17162c5419 100644 (file)
@@ -86,6 +86,8 @@ public:
     }
 #endif
         
+    static wxVisualAttributes
+    GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 };
     
 
@@ -117,6 +119,9 @@ public:
 
     bool GetValue();
     void SetValue(bool value);
+
+    static wxVisualAttributes
+    GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 };
 
 //---------------------------------------------------------------------------
index 8155c4502eb943c98277c1b8a27d195470a0c3d6..2cdd1836399b29a9b6bb3aeec01fbf220bf7502c 100644 (file)
@@ -52,6 +52,9 @@ public:
     virtual void SetScrollbar(int position, int thumbSize,
                               int range, int pageSize,
                               bool refresh = True);
+
+    static wxVisualAttributes
+    GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 };
 
 //---------------------------------------------------------------------------
index 5d4e64329c933e96f6dd09335dcfeac2971a6606..7ecf040a2e5b61eee95d4202dd38f85c156d0134 100644 (file)
@@ -83,6 +83,9 @@ public:
     virtual int GetSelStart() const;
     virtual void SetSelection(int min, int max);
 
+
+    static wxVisualAttributes
+    GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 };
 
 //---------------------------------------------------------------------------
index 1b100a21e5b521844d4380c66cc5b750b6346ece..29b9ca22abf776e84f21ca98a4db3b98cefdcd50 100644 (file)
@@ -68,6 +68,9 @@ public:
 
     // is this spin button vertically oriented?
     bool IsVertical() const;
+
+    static wxVisualAttributes
+    GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 };
 
 
@@ -110,6 +113,9 @@ public:
     virtual int GetMin() const;
     virtual int GetMax() const;
     void SetSelection(long from, long to);
+
+    static wxVisualAttributes
+    GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 };
 
 
index b149bb8bd2a1900bc9449ddfaa317d5af5ed2ef0..458abf420c48772f0079829a818e2d32dc3e32dd 100644 (file)
@@ -334,6 +334,9 @@ unsplit even if minimum size is non-zero.");
 
     void SetNeedUpdating(bool needUpdating);
     bool GetNeedUpdating() const;
+
+    static wxVisualAttributes
+    GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 };
 
 
index 6ada254ec40fcdcf31d5179218009f3bbec8e0bd..c407a4d799e1feaf3a47fed0902439863b1d5a36 100644 (file)
@@ -40,6 +40,9 @@ public:
                 const wxSize& size = wxDefaultSize,
                 long style = 0,
                 const wxString& name = wxPyStaticBoxNameStr);
+
+    static wxVisualAttributes
+    GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 };
 
 
@@ -71,6 +74,8 @@ public:
     // get the default size for the "lesser" dimension of the static line
     static int GetDefaultSize();
 
+    static wxVisualAttributes
+    GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 };
 
 
@@ -94,6 +99,9 @@ public:
                  const wxSize& size = wxDefaultSize,
                  long style = 0,
                  const wxString& name = wxPyStaticTextNameStr);
+
+    static wxVisualAttributes
+    GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 };
 
 //---------------------------------------------------------------------------
@@ -122,6 +130,9 @@ public:
     wxBitmap GetBitmap();
     void SetBitmap(const wxBitmap& bitmap);
     void SetIcon(const wxIcon& icon);
+
+    static wxVisualAttributes
+    GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 };
 
 //---------------------------------------------------------------------------
index ba4a4b92c0627e0bb9ad7d0c912fe18d3530b22a..e3a0d66c3bbb5948e555d2955ea45e64df514820 100644 (file)
@@ -74,6 +74,9 @@ public:
     // get the dimensions of the horizontal and vertical borders
     virtual int GetBorderX() const;
     virtual int GetBorderY() const;
+
+    static wxVisualAttributes
+    GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 };
 
 
index 01cad4d056e129ccf5effce8b89e0ece9035d992..be3b7727a8b41febf71341541d5357a53b62be43 100644 (file)
@@ -309,6 +309,8 @@ public:
         }
     }
 
+    static wxVisualAttributes
+    GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 };
 
 //---------------------------------------------------------------------------
index e2cf914b5823153b30c62fa54dbf5fe9a3e78540..9fde315a8e44cc5b4bde1f8025092ba96e467a3b 100644 (file)
@@ -78,6 +78,9 @@ public:
     void SetValue(bool value);
     bool GetValue() const ;
     void SetLabel(const wxString& label);
+
+    static wxVisualAttributes
+    GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 };
 
 //---------------------------------------------------------------------------
index 4286bb886f2c5d6a14a63b7960b18d6af521dcbb..16db24619b6f2f0aa9f4bd94f27ac1a73904cc13 100644 (file)
@@ -405,6 +405,9 @@ public:
               const wxString& name = wxPyToolBarNameStr);
 
     wxToolBarToolBase *FindToolForPosition(wxCoord x, wxCoord y);
+
+    static wxVisualAttributes
+    GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 };
 
 //---------------------------------------------------------------------------
index 8da7a55a3150a41d83bb5c69c560556eb1f797f4..5dc4b3068488ffefacc62bef8a9a1cf3571cd18e 100644 (file)
@@ -247,6 +247,9 @@ public:
     // send wxUpdateUIEvents for all menu items in the menubar,
     // or just for menu if non-NULL
     void DoMenuUpdates(wxMenu* menu = NULL);
+
+    static wxVisualAttributes
+    GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 };
 
 //---------------------------------------------------------------------------
@@ -299,6 +302,9 @@ public:
 
     // may be called to terminate the dialog with the given return code
     virtual void EndModal(int retCode);
+
+    static wxVisualAttributes
+    GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 };
 
 //---------------------------------------------------------------------------
index 70e855e1d34226fddaf52a6232f4ff0142548002..8802ae8895c127a74085470ff6f3da3e08ed70e3 100644 (file)
@@ -31,7 +31,7 @@ struct wxVisualAttributes
 {
     %extend {
         wxVisualAttributes() { return new wxVisualAttributes; }
-        ~wxVisualAttributes() {}
+        ~wxVisualAttributes() { delete self; }
     }
     
     // the font used for control label/text inside it
@@ -1190,7 +1190,7 @@ exposed.");
 
 
     DocDeclStr(
-        wxVisualAttributes , GetDefaultAttributes() const,
+        virtual wxVisualAttributes , GetDefaultAttributes() const,
         "Get the default attributes for an instance of this class.  This
 is useful if you want to use the same font or colour in your own
 control as in a standard control -- which is a much better idea
index 262170001e0d1b6dce7b35dfb3659b01f7c3bc6d..c046cd14f41ae42bb970f40d0e86ff7f4959bad8 100644 (file)
@@ -399,6 +399,9 @@ are:
     DocDeclStr(
         wxControl*, GetYearControl() const,
         "Get the currently shown control for year.");
+
+    static wxVisualAttributes
+    GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 };
 
 
index e0e0ae42b1d85e73286783df13906edbf479e422..51f571f8e4dc979e50189ecdd3c20e35375f15bb 100644 (file)
@@ -1938,6 +1938,8 @@ public:
     wxWindow* GetGridCornerLabelWindow();
 
 
+    static wxVisualAttributes
+    GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 };
 
 
index 164183844e2a74df81dd42877cd1a3196714196a..ea6150011341d568abc73834f44e8241997c7c56 100644 (file)
@@ -903,6 +903,9 @@ public:
     void base_OnCellClicked(wxHtmlCell *cell,
                             wxCoord x, wxCoord y,
                             const wxMouseEvent& event);
+
+    static wxVisualAttributes
+    GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
 };