]>
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> | |
9 | // License: wxWindows license | |
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 | ||
42 | // ---------------------------------------------------------------------------- | |
43 | // wxGauge creation | |
44 | // ---------------------------------------------------------------------------- | |
45 | ||
46 | bool wxGaugeBase::Create(wxWindow *parent, | |
47 | wxWindowID id, | |
48 | int range, | |
49 | const wxPoint& pos, | |
50 | const wxSize& size, | |
51 | long style, | |
52 | const wxValidator& validator, | |
53 | const wxString& name) | |
54 | { | |
55 | if ( !wxControl::Create(parent, id, pos, size, style, validator, name) ) | |
56 | return FALSE; | |
57 | ||
58 | SetName(name); | |
59 | ||
60 | #if wxUSE_VALIDATORS | |
61 | SetValidator(validator); | |
62 | #endif // wxUSE_VALIDATORS | |
63 | ||
64 | SetRange(range); | |
65 | SetValue(0); | |
66 | ||
67 | return TRUE; | |
68 | } | |
69 | ||
70 | // ---------------------------------------------------------------------------- | |
71 | // wxGauge range/position | |
72 | // ---------------------------------------------------------------------------- | |
73 | ||
74 | void wxGaugeBase::SetRange(int range) | |
75 | { | |
76 | m_rangeMax = range; | |
77 | } | |
78 | ||
79 | int wxGaugeBase::GetRange() const | |
80 | { | |
81 | return m_rangeMax; | |
82 | } | |
83 | ||
84 | void wxGaugeBase::SetValue(int pos) | |
85 | { | |
86 | m_gaugePos = pos; | |
87 | } | |
88 | ||
89 | int wxGaugeBase::GetValue() const | |
90 | { | |
91 | return m_gaugePos; | |
92 | } | |
93 | ||
94 | // ---------------------------------------------------------------------------- | |
95 | // wxGauge appearance params | |
96 | // ---------------------------------------------------------------------------- | |
97 | ||
98 | void wxGaugeBase::SetShadowWidth(int WXUNUSED(w)) | |
99 | { | |
100 | } | |
101 | ||
102 | int wxGaugeBase::GetShadowWidth() const | |
103 | { | |
104 | return 0; | |
105 | } | |
106 | ||
107 | ||
108 | void wxGaugeBase::SetBezelFace(int WXUNUSED(w)) | |
109 | { | |
110 | } | |
111 | ||
112 | int wxGaugeBase::GetBezelFace() const | |
113 | { | |
114 | return 0; | |
115 | } | |
116 | ||
117 | #endif // wxUSE_GAUGE |