| 1 | ///////////////////////////////////////////////////////////////////////////// |
| 2 | // Name: gauge.cpp |
| 3 | // Purpose: wxGauge class |
| 4 | // Author: AUTHOR |
| 5 | // Modified by: |
| 6 | // Created: ??/??/98 |
| 7 | // RCS-ID: $Id$ |
| 8 | // Copyright: (c) AUTHOR |
| 9 | // Licence: wxWindows licence |
| 10 | ///////////////////////////////////////////////////////////////////////////// |
| 11 | |
| 12 | #ifdef __GNUG__ |
| 13 | #pragma implementation "gauge.h" |
| 14 | #endif |
| 15 | |
| 16 | #include "wx/gauge.h" |
| 17 | |
| 18 | #if !USE_SHARED_LIBRARY |
| 19 | IMPLEMENT_DYNAMIC_CLASS(wxGauge, wxControl) |
| 20 | #endif |
| 21 | |
| 22 | bool wxGauge::Create(wxWindow *parent, wxWindowID id, |
| 23 | int range, |
| 24 | const wxPoint& pos, |
| 25 | const wxSize& size, |
| 26 | long style, |
| 27 | const wxValidator& validator, |
| 28 | const wxString& name) |
| 29 | { |
| 30 | SetName(name); |
| 31 | SetValidator(validator); |
| 32 | m_rangeMax = range; |
| 33 | m_windowStyle = style; |
| 34 | |
| 35 | if (parent) parent->AddChild(this); |
| 36 | |
| 37 | if ( id == -1 ) |
| 38 | m_windowId = (int)NewControlId(); |
| 39 | else |
| 40 | m_windowId = id; |
| 41 | |
| 42 | |
| 43 | // TODO |
| 44 | return FALSE; |
| 45 | } |
| 46 | |
| 47 | void wxGauge::SetSize(int x, int y, int width, int height, int sizeFlags) |
| 48 | { |
| 49 | // TODO |
| 50 | } |
| 51 | |
| 52 | void wxGauge::SetShadowWidth(int w) |
| 53 | { |
| 54 | // TODO optional |
| 55 | } |
| 56 | |
| 57 | void wxGauge::SetBezelFace(int w) |
| 58 | { |
| 59 | // TODO optional |
| 60 | } |
| 61 | |
| 62 | void wxGauge::SetRange(int r) |
| 63 | { |
| 64 | m_rangeMax = r; |
| 65 | // TODO |
| 66 | } |
| 67 | |
| 68 | void wxGauge::SetValue(int pos) |
| 69 | { |
| 70 | m_gaugePos = pos; |
| 71 | // TODO |
| 72 | } |
| 73 | |
| 74 | int wxGauge::GetShadowWidth() const |
| 75 | { |
| 76 | // TODO optional |
| 77 | return 0; |
| 78 | } |
| 79 | |
| 80 | int wxGauge::GetBezelFace() const |
| 81 | { |
| 82 | // TODO optional |
| 83 | return 0; |
| 84 | } |
| 85 | |
| 86 | int wxGauge::GetRange() const |
| 87 | { |
| 88 | return m_rangeMax; |
| 89 | } |
| 90 | |
| 91 | int wxGauge::GetValue() const |
| 92 | { |
| 93 | return m_gaugePos; |
| 94 | } |
| 95 | |