wxSpinCtrl(wxWindow *parent,
wxWindowID id = wxID_ANY,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
wxSpinCtrl(wxWindow *parent,
wxWindowID id = wxID_ANY,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int min = 0, int max = 100, int initial = 0,
int min = 0, int max = 100, int initial = 0,
Create(parent, id, value, pos, size, style, min, max, initial, name);
}
Create(parent, id, value, pos, size, style, min, max, initial, name);
}
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
const wxString& value = wxEmptyString,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int min = 0, int max = 100, int initial = 0,
int min = 0, int max = 100, int initial = 0,
// a wxTextCtrl-like method (but we can't have GetValue returning wxString
// because the base class already has one returning int!)
// a wxTextCtrl-like method (but we can't have GetValue returning wxString
// because the base class already has one returning int!)
// wxSpinButton doesn't accept focus, but we do
virtual bool AcceptsFocus() const { return wxWindow::AcceptsFocus(); }
// wxSpinButton doesn't accept focus, but we do
virtual bool AcceptsFocus() const { return wxWindow::AcceptsFocus(); }
+ // we're like wxTextCtrl and not (default) wxButton
+ virtual wxVisualAttributes GetDefaultAttributes() const
+ {
+ return GetClassDefaultAttributes(GetWindowVariant());
+ }
+
+ static wxVisualAttributes
+ GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL)
+ {
+ return GetCompositeControlsDefaultAttributes(variant);
+ }
+
// process a WM_COMMAND generated by the buddy text control
bool ProcessTextCommand(WXWORD cmd, WXWORD id);
// process a WM_COMMAND generated by the buddy text control
bool ProcessTextCommand(WXWORD cmd, WXWORD id);
protected:
virtual void DoGetPosition(int *x, int *y) const;
virtual void DoMoveWindow(int x, int y, int width, int height);
protected:
virtual void DoGetPosition(int *x, int *y) const;
virtual void DoMoveWindow(int x, int y, int width, int height);
- // the handler for wxSpinButton events
- void OnSpinChange(wxSpinEvent& event);
+ virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
+ virtual bool MSWOnScroll(int orientation, WXWORD wParam,
+ WXWORD pos, WXHWND control);
- // all existing wxSpinCtrls - this allows to find the one corresponding to
- // the given buddy window in GetSpinForTextCtrl()
- static wxArraySpins ms_allSpins;
+ // Block text update event after SetValue()
+ bool m_blockEvent;