1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: gauge.h
|
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
1998-10-29 18:03:18 +00:00
|
|
|
// Id: $Id$
|
|
|
|
// Copyright: (c) 1998 Robert Roebling
|
1998-05-20 14:01:55 +00:00
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __GTKGAUGEH__
|
|
|
|
#define __GTKGAUGEH__
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/defs.h"
|
1999-06-14 23:04:05 +00:00
|
|
|
|
|
|
|
#if wxUSE_GAUGE
|
|
|
|
|
1998-05-20 14:01:55 +00:00
|
|
|
#include "wx/object.h"
|
|
|
|
#include "wx/list.h"
|
|
|
|
#include "wx/control.h"
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// classes
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class wxGauge;
|
|
|
|
|
1998-05-28 22:05:55 +00:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// global data
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
extern const char* wxGaugeNameStr;
|
|
|
|
|
1998-05-20 14:01:55 +00:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxGaugeBox
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
1998-05-28 22:05:55 +00:00
|
|
|
class wxGauge: public wxControl
|
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxGauge)
|
|
|
|
|
|
|
|
public:
|
1999-01-24 15:07:54 +00:00
|
|
|
inline wxGauge() { m_rangeMax = 0; m_gaugePos = 0; m_useProgressBar = TRUE; }
|
1998-05-28 22:05:55 +00:00
|
|
|
|
1999-01-24 15:07:54 +00:00
|
|
|
inline wxGauge( wxWindow *parent, wxWindowID id, int range,
|
1998-05-28 22:05:55 +00:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
1998-07-04 15:17:59 +00:00
|
|
|
long style = wxGA_HORIZONTAL,
|
1998-08-14 10:07:38 +00:00
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxGaugeNameStr )
|
|
|
|
{
|
|
|
|
Create(parent, id, range, pos, size, style, validator, name);
|
|
|
|
}
|
1999-01-24 15:07:54 +00:00
|
|
|
bool Create( wxWindow *parent, wxWindowID id, int range,
|
1998-05-28 22:05:55 +00:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
1998-07-04 15:17:59 +00:00
|
|
|
long style = wxGA_HORIZONTAL,
|
1998-08-14 10:07:38 +00:00
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
1998-05-28 22:05:55 +00:00
|
|
|
const wxString& name = wxGaugeNameStr );
|
1998-08-14 10:07:38 +00:00
|
|
|
void SetShadowWidth( int WXUNUSED(w) ) {};
|
|
|
|
void SetBezelFace( int WXUNUSED(w) ) {};
|
|
|
|
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
|
|
|
|
|
|
|
// Are we a Win95/GTK progress bar, or a normal gauge?
|
1999-01-24 15:07:54 +00:00
|
|
|
inline bool GetProgressBar() const { return m_useProgressBar; }
|
1998-10-29 18:03:18 +00:00
|
|
|
|
|
|
|
// implementation
|
|
|
|
|
|
|
|
void ApplyWidgetStyle();
|
|
|
|
|
1998-05-28 22:05:55 +00:00
|
|
|
int m_rangeMax;
|
|
|
|
int m_gaugePos;
|
|
|
|
bool m_useProgressBar;
|
|
|
|
};
|
|
|
|
|
1999-06-14 23:04:05 +00:00
|
|
|
#endif
|
|
|
|
|
1998-05-20 14:01:55 +00:00
|
|
|
#endif // __GTKGAUGEH__
|