2001-06-26 20:59:19 +00: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-15 00:23:28 +00:00
|
|
|
#ifndef _WX_GAUGE_H_BASE_
|
|
|
|
#define _WX_GAUGE_H_BASE_
|
1998-05-20 14:01:55 +00:00
|
|
|
|
2002-08-31 11:29:13 +00:00
|
|
|
#if defined(__GNUG__) && !defined(__APPLE__)
|
|
|
|
#pragma interface "gaugebase.h"
|
2001-06-26 20:59:19 +00:00
|
|
|
#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:
|
2002-01-07 21:52:28 +00:00
|
|
|
virtual ~wxGaugeBase();
|
|
|
|
|
2001-06-26 20:59:19 +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);
|
|
|
|
|
|
|
|
// 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__
|
2003-03-23 18:49:12 +00:00
|
|
|
// Gauge no longer supported on 16-bit Windows
|
2001-06-26 20:59:19 +00:00
|
|
|
#endif
|
1998-07-10 14:15:17 +00:00
|
|
|
#elif defined(__WXMOTIF__)
|
2001-06-26 20:59:19 +00:00
|
|
|
#include "wx/motif/gauge.h"
|
1998-07-10 14:15:17 +00:00
|
|
|
#elif defined(__WXGTK__)
|
2001-06-26 20:59:19 +00:00
|
|
|
#include "wx/gtk/gauge.h"
|
1998-08-15 00:23:28 +00:00
|
|
|
#elif defined(__WXMAC__)
|
2001-06-26 20:59:19 +00:00
|
|
|
#include "wx/mac/gauge.h"
|
1999-07-28 03:38:12 +00:00
|
|
|
#elif defined(__WXPM__)
|
2001-06-26 20:59:19 +00:00
|
|
|
#include "wx/os2/gauge.h"
|
1998-05-20 14:01:55 +00:00
|
|
|
#endif
|
|
|
|
|
2001-06-26 20:59:19 +00:00
|
|
|
#endif // wxUSE_GAUGE
|
|
|
|
|
1998-05-20 14:01:55 +00:00
|
|
|
#endif
|
1998-08-15 00:23:28 +00:00
|
|
|
// _WX_GAUGE_H_BASE_
|