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!)
// another wxTextCtrl-like method
void SetSelection(long from, long to);
// another wxTextCtrl-like method
void SetSelection(long from, long to);
// 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);
virtual wxSize DoGetBestSize() const;
protected:
virtual void DoGetPosition(int *x, int *y) const;
virtual void DoMoveWindow(int x, int y, int width, int height);
virtual wxSize DoGetBestSize() const;
virtual void DoGetSize(int *width, int *height) const;
virtual void DoGetClientSize(int *x, int *y) const;
#if wxUSE_TOOLTIPS
virtual void DoGetSize(int *width, int *height) const;
virtual void DoGetClientSize(int *x, int *y) const;
#if wxUSE_TOOLTIPS
+ // Common part of all ctors.
+ void Init();
+
+ // Adjust the text control style depending on whether we need to enter only
+ // digits or may need to enter something else (e.g. "-" sign, "x"
+ // hexadecimal prefix, ...) in it.
+ void UpdateBuddyStyle();
+
+