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$
|
2004-05-23 14:56:36 +00:00
|
|
|
// Copyright: (c) 1996-2001 wxWidgets team
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
2001-06-26 20:59:19 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
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
|
|
|
|
2003-08-09 12:38:21 +00:00
|
|
|
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
|
2002-08-31 11:29:13 +00:00
|
|
|
#pragma interface "gaugebase.h"
|
2001-06-26 20:59:19 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/defs.h"
|
|
|
|
|
|
|
|
#if wxUSE_GAUGE
|
|
|
|
|
|
|
|
#include "wx/control.h"
|
|
|
|
|
2003-09-22 12:35:21 +00:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxGauge style flags
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#define wxGA_HORIZONTAL wxHORIZONTAL
|
|
|
|
#define wxGA_VERTICAL wxVERTICAL
|
|
|
|
|
|
|
|
// Win32 only, is default (and only) on some other platforms
|
|
|
|
#define wxGA_SMOOTH 0x0020
|
|
|
|
|
|
|
|
// obsolete style
|
|
|
|
#define wxGA_PROGRESSBAR 0
|
|
|
|
|
|
|
|
|
2005-01-21 18:48:22 +00:00
|
|
|
extern WXDLLEXPORT_DATA(const wxChar*) wxGaugeNameStr;
|
2001-06-26 20:59:19 +00:00
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxGauge: a progress bar
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxGaugeBase : public wxControl
|
|
|
|
{
|
|
|
|
public:
|
2003-09-22 12:28:25 +00:00
|
|
|
wxGaugeBase() { m_rangeMax = m_gaugePos = 0; }
|
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;
|
|
|
|
|
2003-09-22 12:28:25 +00:00
|
|
|
// simple accessors
|
|
|
|
bool IsVertical() const { return HasFlag(wxGA_VERTICAL); }
|
|
|
|
|
2001-06-26 20:59:19 +00:00
|
|
|
|
2003-09-22 12:28:25 +00:00
|
|
|
// appearance params (not implemented for most ports)
|
2001-06-26 20:59:19 +00:00
|
|
|
virtual void SetShadowWidth(int w);
|
|
|
|
virtual int GetShadowWidth() const;
|
|
|
|
|
|
|
|
virtual void SetBezelFace(int w);
|
|
|
|
virtual int GetBezelFace() const;
|
|
|
|
|
|
|
|
// overriden base class virtuals
|
2004-09-15 13:20:18 +00:00
|
|
|
virtual bool AcceptsFocus() const { return false; }
|
2001-06-26 20:59:19 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
// the max position
|
|
|
|
int m_rangeMax;
|
|
|
|
|
|
|
|
// the current position
|
|
|
|
int m_gaugePos;
|
2003-07-22 00:24:07 +00:00
|
|
|
|
|
|
|
DECLARE_NO_COPY_CLASS(wxGaugeBase)
|
2001-06-26 20:59:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#if defined(__WXUNIVERSAL__)
|
|
|
|
#include "wx/univ/gauge.h"
|
|
|
|
#elif defined(__WXMSW__)
|
|
|
|
#ifdef __WIN95__
|
|
|
|
#include "wx/msw/gauge95.h"
|
|
|
|
#define wxGauge wxGauge95
|
|
|
|
#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"
|
2003-07-15 14:04:22 +00:00
|
|
|
#elif defined(__WXCOCOA__)
|
|
|
|
#include "wx/cocoa/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_
|