1998-11-14 20:20:00 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2001-06-26 20:59:19 +00:00
|
|
|
// Name: wx/gtk/spinbutt.h
|
1998-11-14 20:20:00 +00:00
|
|
|
// 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
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2001-06-26 20:59:19 +00:00
|
|
|
#ifndef _WX_GTK_SPINBUTT_H_
|
|
|
|
#define _WX_GTK_SPINBUTT_H_
|
1998-11-14 20:20:00 +00:00
|
|
|
|
2003-08-09 12:38:21 +00:00
|
|
|
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
1998-11-14 20:20:00 +00:00
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// 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() { }
|
2001-06-26 20:59:19 +00: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 21:03:02 +00:00
|
|
|
{
|
|
|
|
Create(parent, id, pos, size, style, name);
|
|
|
|
}
|
|
|
|
|
2001-06-26 20:59:19 +00: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 21:03:02 +00: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 17:26:25 +00:00
|
|
|
static wxVisualAttributes
|
|
|
|
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
|
|
|
|
1999-07-23 21:03:02 +00:00
|
|
|
// 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
|
2001-06-26 20:59:19 +00:00
|
|
|
// _WX_GTK_SPINBUTT_H_
|