]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/control.h
Fixes so joystick not only compiles on Linux, but it actually works too!
[wxWidgets.git] / include / wx / control.h
index bcfe71a48fee5e71c19b9da45053aab17cc195a6..b891236e4a4c3bf25485c022c660f9be40ffd0aa 100644 (file)
@@ -74,12 +74,20 @@ protected:
                        const wxValidator& validator,
                        const wxString& name);
 
                        const wxValidator& validator,
                        const wxString& name);
 
-    // inherit colour and font settings from the parent window
-    void InheritAttributes();
-
     // initialize the common fields of wxCommandEvent
     void InitCommandEvent(wxCommandEvent& event) const;
 
     // initialize the common fields of wxCommandEvent
     void InitCommandEvent(wxCommandEvent& event) const;
 
+    // set the initial window size if none is given (i.e. at least one of the
+    // components of the size passed to ctor/Create() is -1)
+    //
+    // normally just calls SetBestSize() but can be overridden not to do it for
+    // the controls which have to do some additional initialization (e.g. add
+    // strings to list box) before their best size can be accurately calculated
+    virtual void SetInitialBestSize(const wxSize& size)
+    {
+        SetBestSize(size);
+    }
+
     DECLARE_NO_COPY_CLASS(wxControlBase)
 };
 
     DECLARE_NO_COPY_CLASS(wxControlBase)
 };