1998-11-14 15:20:00 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2001-06-26 16:59:19 -04:00
|
|
|
// Name: wx/gtk/spinbutt.h
|
1998-11-14 15:20:00 -05:00
|
|
|
// Purpose: wxSpinButton class
|
|
|
|
// Author: Robert Roebling
|
|
|
|
// Modified by:
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Robert Roebling
|
2004-05-23 16:53:33 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-11-14 15:20:00 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2001-06-26 16:59:19 -04:00
|
|
|
#ifndef _WX_GTK_SPINBUTT_H_
|
|
|
|
#define _WX_GTK_SPINBUTT_H_
|
1998-11-14 15:20:00 -05:00
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxSpinButton
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2005-08-02 18:58:06 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxSpinButton : public wxSpinButtonBase
|
1998-11-14 15:20:00 -05:00
|
|
|
{
|
|
|
|
public:
|
2006-05-17 23:08:25 -04:00
|
|
|
wxSpinButton();
|
2001-06-26 16:59:19 -04:00
|
|
|
wxSpinButton(wxWindow *parent,
|
|
|
|
wxWindowID id = -1,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxSP_VERTICAL,
|
|
|
|
const wxString& name = wxSPIN_BUTTON_NAME)
|
1999-07-23 17:03:02 -04:00
|
|
|
{
|
|
|
|
Create(parent, id, pos, size, style, name);
|
|
|
|
}
|
|
|
|
|
2001-06-26 16:59:19 -04:00
|
|
|
bool Create(wxWindow *parent,
|
|
|
|
wxWindowID id = -1,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxSP_VERTICAL,
|
|
|
|
const wxString& name = wxSPIN_BUTTON_NAME);
|
1999-07-23 17:03:02 -04:00
|
|
|
|
|
|
|
virtual int GetValue() const;
|
|
|
|
virtual void SetValue( int value );
|
|
|
|
virtual void SetRange( int minVal, int maxVal );
|
|
|
|
virtual int GetMin() const;
|
|
|
|
virtual int GetMax() const;
|
|
|
|
|
2004-05-06 13:26:25 -04:00
|
|
|
static wxVisualAttributes
|
|
|
|
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
|
|
|
|
2009-01-18 07:34:23 -05:00
|
|
|
virtual bool Enable( bool enable = true );
|
|
|
|
|
1999-07-23 17:03:02 -04:00
|
|
|
// implementation
|
|
|
|
void OnSize( wxSizeEvent &event );
|
|
|
|
|
2006-05-17 23:08:25 -04:00
|
|
|
int m_pos;
|
1999-07-23 17:03:02 -04:00
|
|
|
|
1999-12-29 14:18:01 -05:00
|
|
|
protected:
|
2007-07-10 07:58:03 -04:00
|
|
|
void GtkDisableEvents() const;
|
|
|
|
void GtkEnableEvents() const;
|
|
|
|
|
1999-12-29 14:18:01 -05:00
|
|
|
virtual wxSize DoGetBestSize() const;
|
2006-08-25 08:59:28 -04:00
|
|
|
virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
|
1999-12-29 14:18:01 -05:00
|
|
|
|
1999-07-23 17:03:02 -04:00
|
|
|
private:
|
|
|
|
DECLARE_EVENT_TABLE()
|
1999-10-11 06:05:36 -04:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxSpinButton)
|
1998-11-14 15:20:00 -05:00
|
|
|
};
|
|
|
|
|
1999-11-27 11:43:47 -05:00
|
|
|
#endif
|
2001-06-26 16:59:19 -04:00
|
|
|
// _WX_GTK_SPINBUTT_H_
|