X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a83f860948059b0273b5cc6d9e43fadad3ebfca..711a481223e50d08205648cf67b82d0d8b8ed335:/include/wx/msw/spinctrl.h diff --git a/include/wx/msw/spinctrl.h b/include/wx/msw/spinctrl.h index 551b632f28..dd178b6c82 100644 --- a/include/wx/msw/spinctrl.h +++ b/include/wx/msw/spinctrl.h @@ -67,6 +67,7 @@ public: virtual void SetValue(int val); virtual int GetValue() const; + virtual void SetRange(int minVal, int maxVal); virtual bool SetFont(const wxFont &font); virtual void SetFocus(); @@ -78,6 +79,18 @@ public: // 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); + } + // for internal use only // get the subclassed window proc of the buddy text @@ -89,6 +102,9 @@ public: // process a WM_COMMAND generated by the buddy text control bool ProcessTextCommand(WXWORD cmd, WXWORD id); + // recognize buddy window as part of this control at wx level + virtual bool ContainsHWND(WXHWND hWnd) const { return hWnd == m_hwndBuddy; } + protected: virtual void DoGetPosition(int *x, int *y) const; virtual void DoMoveWindow(int x, int y, int width, int height); @@ -123,13 +139,9 @@ protected: WXHWND m_hwndBuddy; WXFARPROC m_wndProcBuddy; - // Block text update event after SetValue() + // Block text update event after SetValue() bool m_blockEvent; - // all existing wxSpinCtrls - this allows to find the one corresponding to - // the given buddy window in GetSpinForTextCtrl() - static wxArraySpins ms_allSpins; - private: DECLARE_DYNAMIC_CLASS(wxSpinCtrl) DECLARE_EVENT_TABLE()