1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2006-01-23 02:28:01 +00:00
|
|
|
// Name: wx/gtk1/gauge.h
|
1998-05-20 14:01:55 +00:00
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
1998-10-29 18:03:18 +00:00
|
|
|
// Id: $Id$
|
|
|
|
// Copyright: (c) 1998 Robert Roebling
|
2006-10-17 14:44:52 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef __GTKGAUGEH__
|
|
|
|
#define __GTKGAUGEH__
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxGaugeBox
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2006-09-28 09:09:06 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxGauge: public wxGaugeBase
|
1998-05-28 22:05:55 +00:00
|
|
|
{
|
1999-11-22 19:44:25 +00:00
|
|
|
public:
|
2002-12-04 14:11:26 +00: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 10:07:38 +00:00
|
|
|
{
|
2002-12-04 14:11:26 +00:00
|
|
|
Init();
|
|
|
|
|
|
|
|
Create(parent, id, range, pos, size, style, validator, name);
|
1998-08-14 10:07:38 +00:00
|
|
|
}
|
2002-12-04 14:11:26 +00: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 10:07:38 +00:00
|
|
|
void SetRange( int r );
|
|
|
|
void SetValue( int pos );
|
1999-01-24 15:07:54 +00:00
|
|
|
int GetShadowWidth() const { return 0; };
|
|
|
|
int GetBezelFace() const { return 0; };
|
|
|
|
int GetRange() const;
|
|
|
|
int GetValue() const;
|
1998-08-14 10:07:38 +00:00
|
|
|
|
2003-09-24 20:08:25 +00:00
|
|
|
bool IsVertical() const { return HasFlag(wxGA_VERTICAL); }
|
2006-01-23 02:28:01 +00:00
|
|
|
|
2004-05-06 17:26:25 +00:00
|
|
|
static wxVisualAttributes
|
|
|
|
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
2006-01-23 02:28:01 +00:00
|
|
|
|
1999-11-22 19:44:25 +00:00
|
|
|
// implementation
|
|
|
|
// -------------
|
2002-12-04 14:11:26 +00: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-10 01:15:30 +00:00
|
|
|
virtual wxSize DoGetBestSize() const;
|
|
|
|
|
2004-05-06 17:26:25 +00:00
|
|
|
virtual wxVisualAttributes GetDefaultAttributes() const;
|
|
|
|
|
1999-11-22 19:44:25 +00:00
|
|
|
private:
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxGauge)
|
1998-05-28 22:05:55 +00:00
|
|
|
};
|
|
|
|
|
2006-10-17 14:44:52 +00:00
|
|
|
#endif
|
|
|
|
// __GTKGAUGEH__
|