1998-05-20 10:01:55 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: gauge.h
|
|
|
|
// Purpose:
|
|
|
|
// Author: Robert Roebling
|
|
|
|
// Created: 01/02/97
|
|
|
|
// Id:
|
|
|
|
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __GTKGAUGEH__
|
|
|
|
#define __GTKGAUGEH__
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/defs.h"
|
|
|
|
#include "wx/object.h"
|
|
|
|
#include "wx/list.h"
|
|
|
|
#include "wx/control.h"
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// classes
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class wxGauge;
|
|
|
|
|
1998-05-28 18:05:55 -04:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// global data
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
extern const char* wxGaugeNameStr;
|
|
|
|
|
1998-05-20 10:01:55 -04:00
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
// wxGaugeBox
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
1998-05-28 18:05:55 -04:00
|
|
|
class wxGauge: public wxControl
|
|
|
|
{
|
|
|
|
DECLARE_DYNAMIC_CLASS(wxGauge)
|
|
|
|
|
|
|
|
public:
|
|
|
|
inline wxGauge(void) { m_rangeMax = 0; m_gaugePos = 0; m_useProgressBar = TRUE; }
|
|
|
|
|
1998-08-14 06:07:38 -04:00
|
|
|
inline wxGauge( wxWindow *parent, wxWindowID id,
|
1998-07-04 11:17:59 -04:00
|
|
|
int range,
|
1998-05-28 18:05:55 -04:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
1998-07-04 11:17:59 -04:00
|
|
|
long style = wxGA_HORIZONTAL,
|
1998-08-14 06:07:38 -04:00
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
|
|
|
const wxString& name = wxGaugeNameStr )
|
|
|
|
{
|
|
|
|
Create(parent, id, range, pos, size, style, validator, name);
|
|
|
|
}
|
|
|
|
bool Create( wxWindow *parent, wxWindowID id,
|
1998-07-04 11:17:59 -04:00
|
|
|
int range,
|
1998-05-28 18:05:55 -04:00
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
1998-07-04 11:17:59 -04:00
|
|
|
long style = wxGA_HORIZONTAL,
|
1998-08-14 06:07:38 -04:00
|
|
|
const wxValidator& validator = wxDefaultValidator,
|
1998-05-28 18:05:55 -04:00
|
|
|
const wxString& name = wxGaugeNameStr );
|
1998-08-14 06:07:38 -04:00
|
|
|
void SetShadowWidth( int WXUNUSED(w) ) {};
|
|
|
|
void SetBezelFace( int WXUNUSED(w) ) {};
|
|
|
|
void SetRange( int r );
|
|
|
|
void SetValue( int pos );
|
|
|
|
int GetShadowWidth(void) const { return 0; };
|
|
|
|
int GetBezelFace(void) const { return 0; };
|
|
|
|
int GetRange(void) const;
|
|
|
|
int GetValue(void) const;
|
|
|
|
|
|
|
|
// Are we a Win95/GTK progress bar, or a normal gauge?
|
|
|
|
inline bool GetProgressBar(void) const { return m_useProgressBar; }
|
1998-05-28 18:05:55 -04:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
int m_rangeMax;
|
|
|
|
int m_gaugePos;
|
|
|
|
bool m_useProgressBar;
|
|
|
|
};
|
|
|
|
|
1998-05-20 10:01:55 -04:00
|
|
|
#endif // __GTKGAUGEH__
|