]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/gtk/spinctrl.h
Dispatch pending events without waiting for idle time (closes #10994).
[wxWidgets.git] / include / wx / gtk / spinctrl.h
index da0fd6c8ce98e1ba1a6cfc12ffb7a77eb71ff0a7..cab8c7db88a2ebbc6b85a34bbdf79652648992b6 100644 (file)
@@ -30,8 +30,9 @@ public:
                 const wxString& value = wxEmptyString,
                 const wxPoint& pos = wxDefaultPosition,
                 const wxSize& size = wxDefaultSize,
-                long style = wxSP_ARROW_KEYS,
-                double min = 0, double max = 100, double initial = 0, double inc = 1,
+                long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT,
+                double min = 0, double max = 100, double initial = 0,
+                double inc = 1,
                 const wxString& name = _T("wxSpinCtrlGTKBase"));
 
     // wxSpinCtrl(Double) methods call DoXXX functions of the same name
@@ -101,7 +102,7 @@ public:
                const wxString& value = wxEmptyString,
                const wxPoint& pos = wxDefaultPosition,
                const wxSize& size = wxDefaultSize,
-               long style = wxSP_ARROW_KEYS,
+               long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT,
                int min = 0, int max = 100, int initial = 0,
                const wxString& name = _T("wxSpinCtrl"))
     {
@@ -113,18 +114,19 @@ public:
                 const wxString& value = wxEmptyString,
                 const wxPoint& pos = wxDefaultPosition,
                 const wxSize& size = wxDefaultSize,
-                long style = wxSP_ARROW_KEYS,
+                long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT,
                 int min = 0, int max = 100, int initial = 0,
                 const wxString& name = _T("wxSpinCtrl"))
     {
-        return wxSpinCtrlGTKBase::Create(parent, id, value, pos, size, style, min, max, initial, 1, name);
+        return wxSpinCtrlGTKBase::Create(parent, id, value, pos, size,
+                                         style, min, max, initial, 1, name);
     }
 
     // accessors
-    int GetValue() const     { return int(DoGetValue() + 0.5); }
-    int GetMin() const       { return int(DoGetMin() + 0.5); }
-    int GetMax() const       { return int(DoGetMax() + 0.5); }
-    int GetIncrement() const { return int(DoGetIncrement() + 0.5); }
+    int GetValue() const     { return wxRound( DoGetValue() ); }
+    int GetMin() const       { return wxRound( DoGetMin() ); }
+    int GetMax() const       { return wxRound( DoGetMax() ); }
+    int GetIncrement() const { return wxRound( DoGetIncrement() ); }
 
     // operations
     void SetValue(const wxString& value)    { wxSpinCtrlGTKBase::SetValue(value); } // visibility problem w/ gcc
@@ -149,11 +151,13 @@ public:
                      const wxString& value = wxEmptyString,
                      const wxPoint& pos = wxDefaultPosition,
                      const wxSize& size = wxDefaultSize,
-                     long style = wxSP_ARROW_KEYS,
-                     double min = 0, double max = 100, double initial = 0, double inc = 1,
+                     long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT,
+                     double min = 0, double max = 100, double initial = 0,
+                     double inc = 1,
                      const wxString& name = _T("wxSpinCtrlDouble"))
     {
-        Create(parent, id, value, pos, size, style, min, max, initial, inc, name);
+        Create(parent, id, value, pos, size, style,
+               min, max, initial, inc, name);
     }
 
     bool Create(wxWindow *parent,
@@ -161,11 +165,13 @@ public:
                 const wxString& value = wxEmptyString,
                 const wxPoint& pos = wxDefaultPosition,
                 const wxSize& size = wxDefaultSize,
-                long style = wxSP_ARROW_KEYS,
-                double min = 0, double max = 100, double initial = 0, double inc = 1,
+                long style = wxSP_ARROW_KEYS | wxALIGN_RIGHT,
+                double min = 0, double max = 100, double initial = 0,
+                double inc = 1,
                 const wxString& name = _T("wxSpinCtrlDouble"))
     {
-        return wxSpinCtrlGTKBase::Create(parent, id, value, pos, size, style, min, max, initial, inc, name);
+        return wxSpinCtrlGTKBase::Create(parent, id, value, pos, size,
+                                         style, min, max, initial, inc, name);
     }
 
     // accessors