]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/gtk1/control.h
wxRegion should work with wxCoord, not long
[wxWidgets.git] / include / wx / gtk1 / control.h
index 3b19b4c98c962b7ba33d20951b6feab35cab1015..2a5227180e02ba15c2ddffc6f47d466e029a80bd 100644 (file)
@@ -29,16 +29,34 @@ class wxControl;
 // wxControl
 //-----------------------------------------------------------------------------
 
-class wxControl : public wxWindow
+extern const wxChar* wxControlNameStr;
+
+class wxControl : public wxControlBase
 {
 public:
     wxControl();
-    wxControl( wxWindow *parent,
-               wxWindowID id,
-               const wxPoint &pos = wxDefaultPosition,
-               const wxSize &size = wxDefaultSize,
-               long style = 0,
-               const wxString &name = wxPanelNameStr );
+    wxControl(wxWindow *parent, wxWindowID id,
+             const wxPoint& pos = wxDefaultPosition,
+             const wxSize& size = wxDefaultSize, long style = 0,
+#if wxUSE_VALIDATORS
+             const wxValidator& validator = wxDefaultValidator,
+#endif
+             const wxString& name = wxControlNameStr)
+    {
+        Create(parent, id, pos, size, style,
+#if wxUSE_VALIDATORS
+            validator, 
+#endif
+            name);
+    }
+
+    bool Create(wxWindow *parent, wxWindowID id,
+            const wxPoint& pos = wxDefaultPosition,
+            const wxSize& size = wxDefaultSize, long style = 0,
+#if wxUSE_VALIDATORS
+            const wxValidator& validator = wxDefaultValidator,
+#endif
+            const wxString& name = wxControlNameStr);
 
     // this function will filter out '&' characters and will put the accelerator
     // char (the one immediately after '&') into m_chAccel (TODO not yet)
@@ -46,9 +64,11 @@ public:
     virtual wxString GetLabel() const;
 
 protected:
+    virtual wxSize DoGetBestSize() const;
+
     wxString   m_label;
     char       m_chAccel;  // enabled to avoid breaking binary compatibility later on
-    
+
 private:
     DECLARE_DYNAMIC_CLASS(wxControl)
 };