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
|
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
|
|
|
}
|
|
|
|
|
2014-09-10 14:56:29 +00:00
|
|
|
virtual ~wxGauge();
|
|
|
|
|
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
|
2016-09-23 14:59:11 +00:00
|
|
|
virtual void SetRange(int range) wxOVERRIDE;
|
|
|
|
virtual void SetValue(int pos) wxOVERRIDE;
|
1999-02-22 11:01:13 +00:00
|
|
|
|
2011-03-22 14:17:38 +00:00
|
|
|
// overridden base class virtuals
|
2016-09-23 14:59:11 +00:00
|
|
|
virtual bool SetForegroundColour(const wxColour& col) wxOVERRIDE;
|
|
|
|
virtual bool SetBackgroundColour(const wxColour& col) wxOVERRIDE;
|
1998-06-28 11:34:42 +00:00
|
|
|
|
2016-09-23 14:59:11 +00:00
|
|
|
virtual void Pulse() wxOVERRIDE;
|
2006-02-08 21:47:09 +00:00
|
|
|
|
2016-09-23 14:59:11 +00:00
|
|
|
WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const wxOVERRIDE;
|
2006-12-09 19:48:21 +00:00
|
|
|
|
2007-08-07 19:22:43 +00:00
|
|
|
// returns true if the platform should explicitly apply a theme border
|
2016-09-23 14:59:11 +00:00
|
|
|
virtual bool CanApplyThemeBorder() const wxOVERRIDE { return false; }
|
2007-08-07 19:22:43 +00:00
|
|
|
|
2006-02-08 21:47:09 +00:00
|
|
|
protected:
|
2016-09-23 14:59:11 +00:00
|
|
|
virtual wxSize DoGetBestSize() const wxOVERRIDE;
|
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();
|
|
|
|
|
2015-04-23 11:49:01 +00:00
|
|
|
wxDECLARE_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_
|