]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/gauge.h
reset m_selection in DeleteAllPages() (patch 1922215); some cleanup of DoRemovePage...
[wxWidgets.git] / include / wx / gtk1 / gauge.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk1/gauge.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Id: $Id$
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 #ifndef __GTKGAUGEH__
11 #define __GTKGAUGEH__
12
13 //-----------------------------------------------------------------------------
14 // wxGaugeBox
15 //-----------------------------------------------------------------------------
16
17 class WXDLLIMPEXP_CORE wxGauge: public wxGaugeBase
18 {
19 public:
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 )
30 {
31 Init();
32
33 Create(parent, id, range, pos, size, style, validator, name);
34 }
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) ) { }
46 void SetRange( int r );
47 void SetValue( int pos );
48 int GetShadowWidth() const { return 0; };
49 int GetBezelFace() const { return 0; };
50 int GetRange() const;
51 int GetValue() const;
52
53 bool IsVertical() const { return HasFlag(wxGA_VERTICAL); }
54
55 static wxVisualAttributes
56 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
57
58 // implementation
59 // -------------
60
61 // the max and current gauge values
62 int m_rangeMax,
63 m_gaugePos;
64
65 protected:
66 // common part of all ctors
67 void Init() { m_rangeMax = m_gaugePos = 0; }
68
69 // set the gauge value to the value of m_gaugePos
70 void DoSetGauge();
71
72 virtual wxSize DoGetBestSize() const;
73
74 virtual wxVisualAttributes GetDefaultAttributes() const;
75
76 private:
77 DECLARE_DYNAMIC_CLASS(wxGauge)
78 };
79
80 #endif
81 // __GTKGAUGEH__