]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/generic/spinctlg.h
added wxHtmlHelpController::GetHelpData and removed SetBookBasePath (you can use...
[wxWidgets.git] / include / wx / generic / spinctlg.h
index 8d791d1106b04e4ef13761cbdd313d1cc944a1db..2ea44a673811065d0e549c39ecc8f83a21c7b792 100644 (file)
 #ifndef _WX_GENERIC_SPINCTRL_H_
 #define _WX_GENERIC_SPINCTRL_H_
 
+#ifdef __GNUG__
+    #pragma interface "spinctlg.h"
+#endif
+
 #include "wx/textctrl.h"
 
 // ----------------------------------------------------------------------------
 class WXDLLEXPORT wxSpinCtrl : public wxTextCtrl
 {
 public:
-    wxSpinCtrlBase() { Init(); }
+    wxSpinCtrl() { Init(); }
+
+    wxSpinCtrl(wxWindow *parent,
+               wxWindowID id = -1,
+               const wxString& value = wxEmptyString,
+               const wxPoint& pos = wxDefaultPosition,
+               const wxSize& size = wxDefaultSize,
+               long style = wxSP_ARROW_KEYS,
+               int min = 0, int max = 100, int initial = 0,
+               const wxString& name = _T("wxSpinCtrl"))
+    {
+        Create(parent, id, value, pos, size, style, min, max, initial, name);
+    }
+
+    bool Create(wxWindow *parent,
+                wxWindowID id = -1,
+                const wxString& value = wxEmptyString,
+                const wxPoint& pos = wxDefaultPosition,
+                const wxSize& size = wxDefaultSize,
+                long style = wxSP_ARROW_KEYS,
+                int min = 0, int max = 100, int initial = 0,
+                const wxString& name = _T("wxSpinCtrl"))
+    {
+        SetRange(min, max);
+
+        bool ok = wxTextCtrl::Create(parent, id, value, pos, size, style,
+                                     wxDefaultValidator, name);
+        SetValue(initial);
+
+        return ok;
+    }
 
     // accessors
-    int GetValue() const
+    int GetValue(int WXUNUSED(dummy) = 1) const
     {
         int n;
         if ( (wxSscanf(wxTextCtrl::GetValue(), wxT("%d"), &n) != 1) )
@@ -47,6 +81,9 @@ protected:
 
     int   m_min;
     int   m_max;
+
+private:
+    DECLARE_DYNAMIC_CLASS(wxSpinCtrl)
 };
 
 #endif // _WX_GENERIC_SPINCTRL_H_