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
|
1999-07-23 17:03:02 -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
|
|
|
|
|
|
|
#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() { }
|
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;
|
|
|
|
|
|
|
|
// implementation
|
|
|
|
void OnSize( wxSizeEvent &event );
|
|
|
|
|
|
|
|
bool IsOwnGtkWindow( GdkWindow *window );
|
|
|
|
void ApplyWidgetStyle();
|
|
|
|
|
|
|
|
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_
|