1998-11-14 20:20:00 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: spinbutt.h
|
|
|
|
// Purpose: wxSpinButton class
|
|
|
|
// Author: Robert Roebling
|
|
|
|
// Modified by:
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Robert Roebling
|
1999-07-23 21:03:02 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-11-14 20:20:00 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1999-10-11 10:05:36 +00:00
|
|
|
#ifndef __GTKSPINBUTTH__
|
1998-11-14 20:20:00 +00:00
|
|
|
#define __GTKSPINBUTTH__
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
1999-11-27 16:43:47 +00:00
|
|
|
#include "wx/defs.h"
|
|
|
|
|
|
|
|
#if wxUSE_SPINBTN
|
|
|
|
|
|
|
|
#include "wx/control.h"
|
|
|
|
|
1998-11-14 20:20:00 +00:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxSpinButton
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
1999-07-23 21:03:02 +00:00
|
|
|
class wxSpinButton : public wxSpinButtonBase
|
1998-11-14 20:20:00 +00:00
|
|
|
{
|
|
|
|
public:
|
1999-07-23 21:03:02 +00: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;
|
|
|
|
|
1999-12-29 19:18:01 +00:00
|
|
|
protected:
|
|
|
|
virtual wxSize DoGetBestSize() const;
|
|
|
|
|
1999-07-23 21:03:02 +00:00
|
|
|
private:
|
|
|
|
DECLARE_EVENT_TABLE()
|
1999-10-11 10:05:36 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxSpinButton)
|
1998-11-14 20:20:00 +00:00
|
|
|
};
|
|
|
|
|
1999-11-27 16:43:47 +00:00
|
|
|
#endif
|
|
|
|
// wxUSE_SPINBTN
|
|
|
|
|
1998-11-14 20:20:00 +00:00
|
|
|
#endif
|
|
|
|
// __GTKSPINBUTTH__
|