1998-11-14 15:20:00 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: spinbutt.h
|
|
|
|
// Purpose: wxSpinButton class
|
|
|
|
// Author: Robert Roebling
|
|
|
|
// Modified by:
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Robert Roebling
|
1999-07-23 17:03:02 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-11-14 15:20:00 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1999-10-11 06:05:36 -04:00
|
|
|
#ifndef __GTKSPINBUTTH__
|
1998-11-14 15:20:00 -05:00
|
|
|
#define __GTKSPINBUTTH__
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxSpinButton
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
1999-07-23 17:03:02 -04:00
|
|
|
class wxSpinButton : public wxSpinButtonBase
|
1998-11-14 15:20:00 -05:00
|
|
|
{
|
|
|
|
public:
|
1999-07-23 17:03:02 -04:00
|
|
|
wxSpinButton() { }
|
|
|
|
wxSpinButton( wxWindow *parent, wxWindowID id = -1,
|
|
|
|
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxSP_VERTICAL, const wxString& name = "wxSpinButton")
|
|
|
|
{
|
|
|
|
Create(parent, id, pos, size, style, name);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool Create( wxWindow *parent, wxWindowID id = -1,
|
|
|
|
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxSP_VERTICAL, const wxString& name = "wxSpinButton" );
|
|
|
|
|
|
|
|
virtual int GetValue() const;
|
|
|
|
virtual void SetValue( int value );
|
|
|
|
virtual void SetRange( int minVal, int maxVal );
|
|
|
|
virtual int GetMin() const;
|
|
|
|
virtual int GetMax() const;
|
|
|
|
|
|
|
|
// implementation
|
|
|
|
void OnSize( wxSizeEvent &event );
|
|
|
|
|
|
|
|
bool IsOwnGtkWindow( GdkWindow *window );
|
|
|
|
void ApplyWidgetStyle();
|
|
|
|
|
|
|
|
GtkAdjustment *m_adjust;
|
|
|
|
float m_oldPos;
|
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_EVENT_TABLE()
|
1999-10-11 06:05:36 -04:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxSpinButton)
|
1998-11-14 15:20:00 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
// __GTKSPINBUTTH__
|