X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a83f860948059b0273b5cc6d9e43fadad3ebfca..6041f69ca7bbb7c39e4ba64e407bc3ac39e3687f:/include/wx/msw/spinctrl.h?ds=inline diff --git a/include/wx/msw/spinctrl.h b/include/wx/msw/spinctrl.h index 551b632f28..fcc3a80fb1 100644 --- a/include/wx/msw/spinctrl.h +++ b/include/wx/msw/spinctrl.h @@ -1,5 +1,5 @@ //////////////////////////////////////////////////////////////////////////// -// Name: msw/spinctrl.h +// Name: wx/msw/spinctrl.h // Purpose: wxSpinCtrl class declaration for Win32 // Author: Vadim Zeitlin // Modified by: @@ -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()