1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2006-10-17 10:44:52 -04:00
|
|
|
// Name: wx/gtk/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
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2006-08-30 01:55:56 -04:00
|
|
|
#ifndef _WX_GTK_GAUGE_H_
|
|
|
|
#define _WX_GTK_GAUGE_H_
|
1998-05-28 18:05:55 -04:00
|
|
|
|
1998-05-20 10:01:55 -04:00
|
|
|
//-----------------------------------------------------------------------------
|
2006-08-30 01:55:56 -04:00
|
|
|
// wxGauge
|
1998-05-20 10:01:55 -04:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
2005-08-02 18:58:06 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxGauge: public wxControl
|
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) ) { }
|
1999-01-24 10:07:54 -05:00
|
|
|
int GetShadowWidth() const { return 0; };
|
|
|
|
int GetBezelFace() const { return 0; };
|
2006-09-09 09:36:54 -04:00
|
|
|
|
|
|
|
// determinate mode API
|
|
|
|
void SetRange( int r );
|
|
|
|
void SetValue( int pos );
|
|
|
|
|
1999-01-24 10:07:54 -05:00
|
|
|
int GetRange() const;
|
|
|
|
int GetValue() const;
|
1998-08-14 06:07:38 -04:00
|
|
|
|
2006-09-09 09:36:54 -04:00
|
|
|
// indeterminate mode API
|
|
|
|
virtual void Pulse();
|
|
|
|
|
2003-09-24 16:08:25 -04:00
|
|
|
bool IsVertical() const { return HasFlag(wxGA_VERTICAL); }
|
2006-10-17 10:44:52 -04:00
|
|
|
|
2004-05-06 13:26:25 -04:00
|
|
|
static wxVisualAttributes
|
|
|
|
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
|
2006-02-08 16:47:09 -05:00
|
|
|
|
|
|
|
virtual wxVisualAttributes GetDefaultAttributes() const;
|
2006-10-17 10:44:52 -04: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;
|
|
|
|
|
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
|
|
|
|
// _WX_GTK_GAUGE_H_
|