1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2006-01-22 21:28:01 -05:00
|
|
|
// Name: wx/gtk1/gauge.h
|
1998-05-20 10:01:55 -04:00
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
1998-10-29 13:03:18 -05:00
|
|
|
// Id: $Id$
|
|
|
|
// Copyright: (c) 1998 Robert Roebling
|
2006-10-17 10:44:52 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef __GTKGAUGEH__
|
|
|
|
#define __GTKGAUGEH__
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxGaugeBox
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2006-09-28 05:09:06 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxGauge: public wxGaugeBase
|
1998-05-28 18:05:55 -04:00
|
|
|
{
|
1999-11-22 14:44:25 -05:00
|
|
|
public:
|
2002-12-04 09:11:26 -05:00
|
|
|
wxGauge() { Init(); }
|
|
|
|
|
|
|
|
wxGauge( wxWindow *parent,
|
|
|
|
wxWindowID id,
|
|
|
|
int range,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxGA_HORIZONTAL,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxGaugeNameStr )
|
1998-08-14 06:07:38 -04:00
|
|
|
{
|
2002-12-04 09:11:26 -05:00
|
|
|
Init();
|
|
|
|
|
|
|
|
Create(parent, id, range, pos, size, style, validator, name);
|
1998-08-14 06:07:38 -04:00
|
|
|
}
|
2002-12-04 09:11:26 -05:00
|
|
|
|
|
|
|
bool Create( wxWindow *parent,
|
|
|
|
wxWindowID id, int range,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxGA_HORIZONTAL,
|
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxGaugeNameStr );
|
|
|
|
|
|
|
|
void SetShadowWidth( int WXUNUSED(w) ) { }
|
|
|
|
void SetBezelFace( int WXUNUSED(w) ) { }
|
1998-08-14 06:07:38 -04:00
|
|
|
void SetRange( int r );
|
|
|
|
void SetValue( int pos );
|
1999-01-24 10:07:54 -05:00
|
|
|
int GetShadowWidth() const { return 0; };
|
|
|
|
int GetBezelFace() const { return 0; };
|
|
|
|
int GetRange() const;
|
|
|
|
int GetValue() const;
|
1998-08-14 06:07:38 -04:00
|
|
|
|
2003-09-24 16:08:25 -04:00
|
|
|
bool IsVertical() const { return HasFlag(wxGA_VERTICAL); }
|
2006-01-22 21:28:01 -05:00
|
|
|
|
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-11-22 14:44:25 -05:00
|
|
|
// implementation
|
|
|
|
// -------------
|
2002-12-04 09:11:26 -05:00
|
|
|
|
|
|
|
// the max and current gauge values
|
|
|
|
int m_rangeMax,
|
|
|
|
m_gaugePos;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
// common part of all ctors
|
|
|
|
void Init() { m_rangeMax = m_gaugePos = 0; }
|
|
|
|
|
|
|
|
// set the gauge value to the value of m_gaugePos
|
|
|
|
void DoSetGauge();
|
|
|
|
|
2004-03-09 20:15:30 -05:00
|
|
|
virtual wxSize DoGetBestSize() const;
|
|
|
|
|
2004-05-06 13:26:25 -04:00
|
|
|
virtual wxVisualAttributes GetDefaultAttributes() const;
|
|
|
|
|
1999-11-22 14:44:25 -05:00
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxGauge)
|
1998-05-28 18:05:55 -04:00
|
|
|
};
|
|
|
|
|
2006-10-17 10:44:52 -04:00
|
|
|
#endif
|
|
|
|
// __GTKGAUGEH__
|