1999-07-29 01:11:30 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2011-03-19 20:14:35 -04:00
|
|
|
// Name: wx/os2/spinbutt.h
|
1999-07-29 01:11:30 -04:00
|
|
|
// Purpose: wxSpinButton class
|
1999-10-15 17:00:38 -04:00
|
|
|
// Author: David Webster
|
1999-07-29 01:11:30 -04:00
|
|
|
// Modified by:
|
1999-10-15 17:00:38 -04:00
|
|
|
// Created: 10/15/99
|
1999-07-29 01:11:30 -04:00
|
|
|
// RCS-ID: $Id$
|
1999-10-15 17:00:38 -04:00
|
|
|
// Copyright: (c) David Webster
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
1999-07-29 01:11:30 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_SPINBUTT_H_
|
|
|
|
#define _WX_SPINBUTT_H_
|
|
|
|
|
|
|
|
#include "wx/control.h"
|
|
|
|
#include "wx/event.h"
|
|
|
|
|
2001-12-17 17:56:41 -05:00
|
|
|
extern MRESULT EXPENTRY wxSpinCtrlWndProc(
|
|
|
|
HWND hWnd
|
|
|
|
, UINT uMessage
|
|
|
|
, MPARAM wParam
|
|
|
|
, MPARAM lParam
|
|
|
|
);
|
|
|
|
|
2008-03-26 11:06:00 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxSpinButton: public wxSpinButtonBase
|
1999-07-29 01:11:30 -04:00
|
|
|
{
|
1999-10-15 17:00:38 -04:00
|
|
|
public:
|
|
|
|
// Construction
|
|
|
|
wxSpinButton() { }
|
2001-12-17 17:56:41 -05:00
|
|
|
inline wxSpinButton( wxWindow* pParent
|
|
|
|
,wxWindowID vId = -1
|
|
|
|
,const wxPoint& rPos = wxDefaultPosition
|
|
|
|
,const wxSize& rSize = wxDefaultSize
|
|
|
|
,long lStyle = wxSP_VERTICAL
|
2005-04-26 21:12:00 -04:00
|
|
|
,const wxString& rsName = wxT("wxSpinButton")
|
1999-10-15 17:00:38 -04:00
|
|
|
)
|
|
|
|
{
|
2001-12-17 17:56:41 -05:00
|
|
|
Create(pParent, vId, rPos, rSize, lStyle, rsName);
|
1999-10-15 17:00:38 -04:00
|
|
|
}
|
|
|
|
virtual ~wxSpinButton();
|
|
|
|
|
2001-12-17 17:56:41 -05:00
|
|
|
|
|
|
|
bool Create( wxWindow* pParent
|
|
|
|
,wxWindowID vId = -1
|
|
|
|
,const wxPoint& rPos = wxDefaultPosition
|
|
|
|
,const wxSize& rSize = wxDefaultSize
|
|
|
|
,long lStyle = wxSP_VERTICAL
|
2005-04-26 21:12:00 -04:00
|
|
|
,const wxString& rsName = wxT("wxSpinButton")
|
1999-10-15 17:00:38 -04:00
|
|
|
);
|
|
|
|
|
|
|
|
// Accessors
|
2001-12-17 17:56:41 -05:00
|
|
|
inline virtual int GetMax(void) const { return m_max; }
|
|
|
|
inline virtual int GetMin(void) const { return m_min; }
|
|
|
|
virtual int GetValue(void) const;
|
|
|
|
inline bool IsVertical(void) const {return ((m_windowStyle & wxSP_VERTICAL) != 0); }
|
|
|
|
virtual void SetValue(int nVal);
|
|
|
|
virtual void SetRange( int nMinVal
|
|
|
|
,int nMaxVal
|
|
|
|
);
|
1999-10-15 17:00:38 -04:00
|
|
|
|
2001-12-17 17:56:41 -05:00
|
|
|
//
|
1999-11-20 20:03:00 -05:00
|
|
|
// Implementation
|
2001-12-17 17:56:41 -05:00
|
|
|
//
|
|
|
|
virtual bool OS2Command( WXUINT wParam
|
|
|
|
,WXWORD wId
|
1999-10-15 17:00:38 -04:00
|
|
|
);
|
2001-12-17 17:56:41 -05:00
|
|
|
virtual bool OS2OnScroll( int nOrientation
|
1999-10-15 17:00:38 -04:00
|
|
|
,WXWORD wParam
|
2001-12-17 17:56:41 -05:00
|
|
|
,WXWORD wPos
|
|
|
|
,WXHWND hControl
|
1999-10-15 17:00:38 -04:00
|
|
|
);
|
1999-07-29 01:11:30 -04:00
|
|
|
|
2001-12-17 17:56:41 -05:00
|
|
|
inline virtual bool AcceptsFocus(void) const { return FALSE; }
|
1999-07-29 01:11:30 -04:00
|
|
|
protected:
|
2001-12-17 17:56:41 -05:00
|
|
|
virtual wxSize DoGetBestSize() const;
|
1999-10-15 17:00:38 -04:00
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxSpinButton)
|
2001-12-17 17:56:41 -05:00
|
|
|
}; // end of CLASS wxSpinButton
|
|
|
|
|
|
|
|
#endif // _WX_SPINBUTT_H_
|