1998-11-14 15:20:00 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2006-01-22 21:28:01 -05:00
|
|
|
// Name: wx/gtk1/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:
|
1999-07-23 17:03:02 -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);
|
2006-01-22 21:28:01 -05:00
|
|
|
|
1999-07-23 17:03:02 -04:00
|
|
|
// implementation
|
|
|
|
void OnSize( wxSizeEvent &event );
|
|
|
|
|
|
|
|
bool IsOwnGtkWindow( GdkWindow *window );
|
|
|
|
|
|
|
|
GtkAdjustment *m_adjust;
|
|
|
|
float m_oldPos;
|
|
|
|
|
1999-12-29 14:18:01 -05:00
|
|
|
protected:
|
|
|
|
virtual wxSize DoGetBestSize() const;
|
|
|
|
|
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_
|