2001-06-26 16:59:19 -04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/gauge.h
|
|
|
|
// Purpose: wxGauge interface
|
|
|
|
// Author: Vadim Zeitlin
|
|
|
|
// Modified by:
|
|
|
|
// Created: 20.02.01
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) 1996-2001 wxWindows team
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1998-08-14 20:23:28 -04:00
|
|
|
#ifndef _WX_GAUGE_H_BASE_
|
|
|
|
#define _WX_GAUGE_H_BASE_
|
1998-05-20 10:01:55 -04:00
|
|
|
|
2001-06-26 16:59:19 -04:00
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma implementation "gaugebase.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/defs.h"
|
|
|
|
|
|
|
|
#if wxUSE_GAUGE
|
|
|
|
|
|
|
|
#include "wx/control.h"
|
|
|
|
|
|
|
|
WXDLLEXPORT_DATA(extern const wxChar*) wxGaugeNameStr;
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxGauge: a progress bar
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxGaugeBase : public wxControl
|
|
|
|
{
|
|
|
|
public:
|
2001-07-15 14:47:13 -04:00
|
|
|
#ifdef __DARWIN__
|
2001-07-08 11:36:31 -04:00
|
|
|
virtual ~wxGaugeBase() { }
|
|
|
|
#endif
|
2001-06-26 16:59:19 -04: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);
|
|
|
|
|
|
|
|
// set/get the control range
|
|
|
|
virtual void SetRange(int range);
|
|
|
|
virtual int GetRange() const;
|
|
|
|
|
|
|
|
// position
|
|
|
|
virtual void SetValue(int pos);
|
|
|
|
virtual int GetValue() const;
|
|
|
|
|
|
|
|
// appearance params (not implemented for most ports)
|
|
|
|
|
|
|
|
virtual void SetShadowWidth(int w);
|
|
|
|
virtual int GetShadowWidth() const;
|
|
|
|
|
|
|
|
virtual void SetBezelFace(int w);
|
|
|
|
virtual int GetBezelFace() const;
|
|
|
|
|
|
|
|
// overriden base class virtuals
|
|
|
|
virtual bool AcceptsFocus() const { return FALSE; }
|
|
|
|
|
|
|
|
protected:
|
|
|
|
// the max position
|
|
|
|
int m_rangeMax;
|
|
|
|
|
|
|
|
// the current position
|
|
|
|
int m_gaugePos;
|
|
|
|
};
|
|
|
|
|
|
|
|
#if defined(__WXUNIVERSAL__)
|
|
|
|
#include "wx/univ/gauge.h"
|
|
|
|
#elif defined(__WXMSW__)
|
|
|
|
#ifdef __WIN95__
|
|
|
|
#include "wx/msw/gauge95.h"
|
|
|
|
#define wxGauge wxGauge95
|
|
|
|
#define sm_classwxGauge sm_classwxGauge95
|
|
|
|
#else // !__WIN95__
|
|
|
|
#include "wx/msw/gaugemsw.h"
|
|
|
|
#define wxGauge wxGaugeMSW
|
|
|
|
#define sm_classwxGauge sm_classwxGaugeMSW
|
|
|
|
#endif
|
1998-07-10 10:15:17 -04:00
|
|
|
#elif defined(__WXMOTIF__)
|
2001-06-26 16:59:19 -04:00
|
|
|
#include "wx/motif/gauge.h"
|
1998-07-10 10:15:17 -04:00
|
|
|
#elif defined(__WXGTK__)
|
2001-06-26 16:59:19 -04:00
|
|
|
#include "wx/gtk/gauge.h"
|
1998-08-07 16:23:17 -04:00
|
|
|
#elif defined(__WXQT__)
|
2001-06-26 16:59:19 -04:00
|
|
|
#include "wx/qt/gauge.h"
|
1998-08-14 20:23:28 -04:00
|
|
|
#elif defined(__WXMAC__)
|
2001-06-26 16:59:19 -04:00
|
|
|
#include "wx/mac/gauge.h"
|
1999-07-27 23:38:12 -04:00
|
|
|
#elif defined(__WXPM__)
|
2001-06-26 16:59:19 -04:00
|
|
|
#include "wx/os2/gauge.h"
|
1998-08-14 20:23:28 -04:00
|
|
|
#elif defined(__WXSTUBS__)
|
2001-06-26 16:59:19 -04:00
|
|
|
#include "wx/stubs/gauge.h"
|
1998-05-20 10:01:55 -04:00
|
|
|
#endif
|
|
|
|
|
2001-06-26 16:59:19 -04:00
|
|
|
#endif // wxUSE_GAUGE
|
|
|
|
|
1998-05-20 10:01:55 -04:00
|
|
|
#endif
|
1998-08-14 20:23:28 -04:00
|
|
|
// _WX_GAUGE_H_BASE_
|