]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/gauge.h
Move column organizing code to ports, away from common code
[wxWidgets.git] / include / wx / gtk / gauge.h
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
1b88201f 2// Name: wx/gtk/gauge.h
c801d85f
KB
3// Purpose:
4// Author: Robert Roebling
58614078
RR
5// Id: $Id$
6// Copyright: (c) 1998 Robert Roebling
1b88201f 7// Licence: wxWindows licence
c801d85f
KB
8/////////////////////////////////////////////////////////////////////////////
9
0416c418
PC
10#ifndef _WX_GTK_GAUGE_H_
11#define _WX_GTK_GAUGE_H_
1a56f55c 12
c801d85f 13//-----------------------------------------------------------------------------
0416c418 14// wxGauge
c801d85f
KB
15//-----------------------------------------------------------------------------
16
20123d49 17class WXDLLIMPEXP_CORE wxGauge: public wxControl
1a56f55c 18{
20e05ffb 19public:
2b5f62a0
VZ
20 wxGauge() { Init(); }
21
22 wxGauge( wxWindow *parent,
23 wxWindowID id,
24 int range,
25 const wxPoint& pos = wxDefaultPosition,
26 const wxSize& size = wxDefaultSize,
27 long style = wxGA_HORIZONTAL,
28 const wxValidator& validator = wxDefaultValidator,
29 const wxString& name = wxGaugeNameStr )
6de97a3b 30 {
2b5f62a0
VZ
31 Init();
32
33 Create(parent, id, range, pos, size, style, validator, name);
6de97a3b 34 }
2b5f62a0
VZ
35
36 bool Create( wxWindow *parent,
37 wxWindowID id, int range,
38 const wxPoint& pos = wxDefaultPosition,
39 const wxSize& size = wxDefaultSize,
40 long style = wxGA_HORIZONTAL,
41 const wxValidator& validator = wxDefaultValidator,
42 const wxString& name = wxGaugeNameStr );
43
44 void SetShadowWidth( int WXUNUSED(w) ) { }
45 void SetBezelFace( int WXUNUSED(w) ) { }
36b3b54a
RR
46 int GetShadowWidth() const { return 0; };
47 int GetBezelFace() const { return 0; };
fe8635a7
RR
48
49 // determinate mode API
50 void SetRange( int r );
51 void SetValue( int pos );
52
36b3b54a
RR
53 int GetRange() const;
54 int GetValue() const;
6de97a3b 55
fe8635a7
RR
56 // indeterminate mode API
57 virtual void Pulse();
58
e04fe03d 59 bool IsVertical() const { return HasFlag(wxGA_VERTICAL); }
1b88201f 60
9d522606
RD
61 static wxVisualAttributes
62 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
6f02a879
VZ
63
64 virtual wxVisualAttributes GetDefaultAttributes() const;
1b88201f 65
20e05ffb
RR
66 // implementation
67 // -------------
2b5f62a0 68
2b5f62a0
VZ
69 // the max and current gauge values
70 int m_rangeMax,
71 m_gaugePos;
72
2b5f62a0
VZ
73protected:
74 // common part of all ctors
75 void Init() { m_rangeMax = m_gaugePos = 0; }
76
77 // set the gauge value to the value of m_gaugePos
78 void DoSetGauge();
79
3a12cb0a
RD
80 virtual wxSize DoGetBestSize() const;
81
20e05ffb
RR
82private:
83 DECLARE_DYNAMIC_CLASS(wxGauge)
1a56f55c
RR
84};
85
1b88201f
WS
86#endif
87 // _WX_GTK_GAUGE_H_