]>
Commit | Line | Data |
---|---|---|
21709999 JS |
1 | /////////////////////////////////////////////////////////////////////////////// |
2 | // Name: src/common/gaugecmn.cpp | |
3 | // Purpose: wxGaugeBase: common to all ports methods of wxGauge | |
4 | // Author: Vadim Zeitlin | |
5 | // Modified by: | |
6 | // Created: 20.02.01 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) 2001 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr> | |
55d99c7a | 9 | // License: wxWindows licence |
21709999 JS |
10 | /////////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | // ============================================================================ | |
13 | // declarations | |
14 | // ============================================================================ | |
15 | ||
16 | // ---------------------------------------------------------------------------- | |
17 | // headers | |
18 | // ---------------------------------------------------------------------------- | |
19 | ||
20 | #ifdef __GNUG__ | |
21 | #pragma implementation "gaugebase.h" | |
22 | #endif | |
23 | ||
24 | // For compilers that support precompilation, includes "wx.h". | |
25 | #include "wx/wxprec.h" | |
26 | ||
27 | #ifdef __BORLANDC__ | |
28 | #pragma hdrstop | |
29 | #endif | |
30 | ||
31 | #ifndef WX_PRECOMP | |
32 | #endif //WX_PRECOMP | |
33 | ||
34 | #include "wx/gauge.h" | |
35 | ||
36 | #if wxUSE_GAUGE | |
37 | ||
38 | // ============================================================================ | |
39 | // implementation | |
40 | // ============================================================================ | |
41 | ||
799ea011 GD |
42 | wxGaugeBase::~wxGaugeBase() |
43 | { | |
44 | // this destructor is required for Darwin | |
45 | } | |
46 | ||
21709999 JS |
47 | // ---------------------------------------------------------------------------- |
48 | // wxGauge creation | |
49 | // ---------------------------------------------------------------------------- | |
50 | ||
51 | bool wxGaugeBase::Create(wxWindow *parent, | |
52 | wxWindowID id, | |
53 | int range, | |
54 | const wxPoint& pos, | |
55 | const wxSize& size, | |
56 | long style, | |
57 | const wxValidator& validator, | |
58 | const wxString& name) | |
59 | { | |
60 | if ( !wxControl::Create(parent, id, pos, size, style, validator, name) ) | |
61 | return FALSE; | |
62 | ||
63 | SetName(name); | |
64 | ||
65 | #if wxUSE_VALIDATORS | |
66 | SetValidator(validator); | |
67 | #endif // wxUSE_VALIDATORS | |
68 | ||
69 | SetRange(range); | |
70 | SetValue(0); | |
71 | ||
72 | return TRUE; | |
73 | } | |
74 | ||
75 | // ---------------------------------------------------------------------------- | |
76 | // wxGauge range/position | |
77 | // ---------------------------------------------------------------------------- | |
78 | ||
79 | void wxGaugeBase::SetRange(int range) | |
80 | { | |
81 | m_rangeMax = range; | |
82 | } | |
83 | ||
84 | int wxGaugeBase::GetRange() const | |
85 | { | |
86 | return m_rangeMax; | |
87 | } | |
88 | ||
89 | void wxGaugeBase::SetValue(int pos) | |
90 | { | |
91 | m_gaugePos = pos; | |
92 | } | |
93 | ||
94 | int wxGaugeBase::GetValue() const | |
95 | { | |
96 | return m_gaugePos; | |
97 | } | |
98 | ||
99 | // ---------------------------------------------------------------------------- | |
100 | // wxGauge appearance params | |
101 | // ---------------------------------------------------------------------------- | |
102 | ||
103 | void wxGaugeBase::SetShadowWidth(int WXUNUSED(w)) | |
104 | { | |
105 | } | |
106 | ||
107 | int wxGaugeBase::GetShadowWidth() const | |
108 | { | |
109 | return 0; | |
110 | } | |
111 | ||
112 | ||
113 | void wxGaugeBase::SetBezelFace(int WXUNUSED(w)) | |
114 | { | |
115 | } | |
116 | ||
117 | int wxGaugeBase::GetBezelFace() const | |
118 | { | |
119 | return 0; | |
120 | } | |
121 | ||
122 | #endif // wxUSE_GAUGE |