1998-09-18 10:19:10 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: gauge.h
|
|
|
|
// Purpose: wxGauge class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 17/09/98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Julian Smart
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_GAUGE_H_
|
|
|
|
#define _WX_GAUGE_H_
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface "gauge.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/control.h"
|
|
|
|
|
|
|
|
WXDLLEXPORT_DATA(extern const char*) wxGaugeNameStr;
|
|
|
|
|
|
|
|
// Group box
|
1999-02-22 11:01:13 +00:00
|
|
|
class WXDLLEXPORT wxGauge : public wxControl
|
1998-09-18 10:19:10 +00:00
|
|
|
{
|
1999-02-22 11:01:13 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxGauge)
|
1998-09-18 10:19:10 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
public:
|
|
|
|
inline wxGauge() { m_rangeMax = 0; m_gaugePos = 0; }
|
1998-09-18 10:19:10 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
inline 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)
|
|
|
|
{
|
|
|
|
Create(parent, id, range, pos, size, style, validator, name);
|
|
|
|
}
|
1998-09-18 10:19:10 +00:00
|
|
|
|
1999-02-22 11:01:13 +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);
|
1998-09-18 10:19:10 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
void SetShadowWidth(int w);
|
|
|
|
void SetBezelFace(int w);
|
|
|
|
void SetRange(int r);
|
|
|
|
void SetValue(int pos);
|
1998-09-18 10:19:10 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
int GetShadowWidth() const ;
|
|
|
|
int GetBezelFace() const ;
|
|
|
|
int GetRange() const ;
|
|
|
|
int GetValue() const ;
|
1998-09-18 10:19:10 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ;
|
1998-09-18 10:19:10 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
// Implementation
|
|
|
|
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
|
|
|
virtual void ChangeBackgroundColour();
|
|
|
|
virtual void ChangeForegroundColour();
|
1998-10-21 21:43:20 +00:00
|
|
|
|
1999-02-22 11:01:13 +00:00
|
|
|
protected:
|
|
|
|
int m_rangeMax;
|
|
|
|
int m_gaugePos;
|
1998-09-18 10:19:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
// _WX_GAUGE_H_
|