X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3c299c3ab663257429983c24e6fb71450f3cf9f1..9869c26285dc51d13607cddaa04f65ce983653a5:/include/wx/os2/spinctrl.h?ds=sidebyside diff --git a/include/wx/os2/spinctrl.h b/include/wx/os2/spinctrl.h index 4c39c123c7..ac81c63996 100644 --- a/include/wx/os2/spinctrl.h +++ b/include/wx/os2/spinctrl.h @@ -1,10 +1,9 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: msw/spinctrl.h +// Name: wx/os2/spinctrl.h // Purpose: wxSpinCtrl class declaration for Win32 // Author: David Webster // Modified by: // Created: 10/15/99 -// RCS-ID: $Id$ // Copyright: (c) David Webster // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -14,8 +13,8 @@ #include "wx/spinbutt.h" // the base class #include "wx/dynarray.h" -class WXDLLEXPORT wxSpinCtrl; -WX_DEFINE_EXPORTED_ARRAY(wxSpinCtrl *, wxArraySpins); +class WXDLLIMPEXP_FWD_CORE wxSpinCtrl; +WX_DEFINE_EXPORTED_ARRAY_PTR(wxSpinCtrl *, wxArraySpins); // ---------------------------------------------------------------------------- // Under Win32 and OS2 PM, wxSpinCtrl is a wxSpinButton with a buddy @@ -23,12 +22,12 @@ WX_DEFINE_EXPORTED_ARRAY(wxSpinCtrl *, wxArraySpins); // control is clicked. // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxSpinCtrl : public wxSpinButton +class WXDLLIMPEXP_CORE wxSpinCtrl : public wxSpinButton { public: wxSpinCtrl() { } wxSpinCtrl( wxWindow* pParent - ,wxWindowID vId = -1 + ,wxWindowID vId = wxID_ANY ,const wxString& rsValue = wxEmptyString ,const wxPoint& rPos = wxDefaultPosition ,const wxSize& rSize = wxDefaultSize @@ -36,7 +35,7 @@ public: ,int nMin = 0 ,int nMax = 100 ,int nInitial = 0 - ,const wxString& rsName = _T("wxSpinCtrl") + ,const wxString& rsName = wxT("wxSpinCtrl") ) { Create(pParent, vId, rsValue, rPos, rSize, lStyle, nMin, nMax, nInitial, rsName); @@ -44,7 +43,7 @@ public: virtual ~wxSpinCtrl(); bool Create(wxWindow* pParent - ,wxWindowID vId = -1 + ,wxWindowID vId = wxID_ANY ,const wxString& rsValue = wxEmptyString ,const wxPoint& rPos = wxDefaultPosition ,const wxSize& rSize = wxDefaultSize @@ -52,7 +51,7 @@ public: ,int nMin = 0 ,int nMax = 100 ,int nInitial = 0 - ,const wxString& rsName = _T("wxSpinCtrl") + ,const wxString& rsName = wxT("wxSpinCtrl") ); // @@ -65,20 +64,23 @@ public: // implementation only from now on // ------------------------------- // - virtual bool Enable(bool bEnable = TRUE); + virtual bool Enable(bool bEnable = true); - virtual int GetValue(void) const; + virtual int GetValue(void) const; + + virtual bool SetFont(const wxFont &rFont); + virtual void SetFocus(void); - virtual bool SetFont(const wxFont &rFont); - virtual void SetFocus(void); inline virtual void SetValue(int nVal) { wxSpinButton::SetValue(nVal); } - virtual bool Show(bool bShow = TRUE); + void SetSelection(long lFrom, long lTo); + + virtual bool Show(bool bShow = true); // // wxSpinButton doesn't accept focus, but we do // - inline virtual bool AcceptsFocus(void) const { return FALSE; } + inline virtual bool AcceptsFocus(void) const { return false; } // // Return the spinctrl object whose buddy is the given window or NULL @@ -112,6 +114,7 @@ protected: // void OnSpinChange(wxSpinEvent& rEvent); void OnChar(wxKeyEvent& rEvent); + void OnSetFocus(wxFocusEvent& rEvent); WXHWND m_hWndBuddy; static wxArraySpins m_svAllSpins; @@ -122,5 +125,3 @@ private: }; // end of CLASS wxSpinCtrl #endif // _WX_MSW_SPINCTRL_H_ - -