1998-06-28 11:34:42 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2008-03-15 16:53:06 +00:00
|
|
|
// Name: wx/msw/gauge.h
|
|
|
|
// Purpose: wxGauge implementation for MSW
|
1998-06-28 11:34:42 +00:00
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 01/02/97
|
|
|
|
// RCS-ID: $Id$
|
1998-08-07 23:52:45 +00:00
|
|
|
// Copyright: (c) Julian Smart
|
2004-05-23 20:53:33 +00:00
|
|
|
// Licence: wxWindows licence
|
1998-06-28 11:34:42 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2008-03-15 16:53:06 +00:00
|
|
|
#ifndef _WX_MSW_GAUGE_H_
|
|
|
|
#define _WX_MSW_GAUGE_H_
|
1998-06-28 11:34:42 +00:00
|
|
|
|
2003-09-28 13:57:52 +00:00
|
|
|
#if wxUSE_GAUGE
|
1998-06-28 11:34:42 +00:00
|
|
|
|
2008-03-26 15:06:00 +00:00
|
|
|
extern WXDLLIMPEXP_DATA_CORE(const char) wxGaugeNameStr[];
|
1998-06-28 11:34:42 +00:00
|
|
|
|
|
|
|
// Group box
|
2008-03-26 15:06:00 +00:00
|
|
|
class WXDLLIMPEXP_CORE wxGauge : public wxGaugeBase
|
1998-06-28 11:34:42 +00:00
|
|
|
{
|
1999-02-22 11:01:13 +00:00
|
|
|
public:
|
2008-03-15 16:53:06 +00:00
|
|
|
wxGauge() { }
|
|
|
|
|
|
|
|
wxGauge(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)
|
1999-02-22 11:01:13 +00:00
|
|
|
{
|
2003-09-22 12:31:58 +00:00
|
|
|
(void)Create(parent, id, range, pos, size, style, validator, name);
|
1999-02-22 11:01:13 +00:00
|
|
|
}
|
|
|
|
|
2003-09-22 12:31:58 +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);
|
1999-02-22 11:01:13 +00:00
|
|
|
|
2003-09-22 12:31:58 +00:00
|
|
|
// set gauge range/value
|
|
|
|
virtual void SetRange(int range);
|
|
|
|
virtual void SetValue(int pos);
|
1999-02-22 11:01:13 +00:00
|
|
|
|
2000-01-13 23:39:48 +00:00
|
|
|
// overriden base class virtuals
|
2003-09-22 12:31:58 +00:00
|
|
|
virtual bool SetForegroundColour(const wxColour& col);
|
|
|
|
virtual bool SetBackgroundColour(const wxColour& col);
|
1998-06-28 11:34:42 +00:00
|
|
|
|
2010-06-20 17:43:02 +00:00
|
|
|
virtual void Pulse();
|
2006-02-08 21:47:09 +00:00
|
|
|
|
2006-12-09 19:48:21 +00:00
|
|
|
WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
|
|
|
|
|
2007-08-07 19:22:43 +00:00
|
|
|
// returns true if the platform should explicitly apply a theme border
|
|
|
|
virtual bool CanApplyThemeBorder() const { return false; }
|
|
|
|
|
2006-02-08 21:47:09 +00:00
|
|
|
protected:
|
2003-09-22 12:31:58 +00:00
|
|
|
virtual wxSize DoGetBestSize() const;
|
2003-07-22 00:24:07 +00:00
|
|
|
|
2010-06-20 17:43:02 +00:00
|
|
|
private:
|
|
|
|
// returns true if the control is currently in indeterminate (a.k.a.
|
|
|
|
// "marquee") mode
|
|
|
|
bool IsInIndeterminateMode() const;
|
|
|
|
|
|
|
|
// switch to/from indeterminate mode
|
|
|
|
void SetIndeterminateMode();
|
|
|
|
void SetDeterminateMode();
|
|
|
|
|
2008-03-15 16:53:06 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS_NO_COPY(wxGauge)
|
1998-06-28 11:34:42 +00:00
|
|
|
};
|
|
|
|
|
2001-06-26 20:59:19 +00:00
|
|
|
#endif // wxUSE_GAUGE
|
|
|
|
|
2008-03-15 16:53:06 +00:00
|
|
|
#endif // _WX_MSW_GAUGE_H_
|