]> git.saurik.com Git - wxWidgets.git/blame - src/mac/gauge.cpp
VTK wrapper of vtkRenderWindow for wxPython. Tested on MSW so far.
[wxWidgets.git] / src / mac / gauge.cpp
CommitLineData
e9576ca5
SC
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
19IMPLEMENT_DYNAMIC_CLASS(wxGauge, wxControl)
20#endif
21
519cb848
SC
22#include <wx/mac/uma.h>
23
e9576ca5
SC
24bool wxGauge::Create(wxWindow *parent, wxWindowID id,
25 int range,
26 const wxPoint& pos,
519cb848 27 const wxSize& s,
e9576ca5
SC
28 long style,
29 const wxValidator& validator,
30 const wxString& name)
31{
519cb848
SC
32 wxSize size = s ;
33 Rect bounds ;
34 Str255 title ;
35 m_rangeMax = range ;
36 m_macHorizontalBorder = 2 ; // additional pixels around the real control
37 m_macVerticalBorder = 2 ;
38
39 if ( size.x == wxDefaultSize.x && size.y == wxDefaultSize.y)
40 {
41 size = wxSize( 200 , 16 ) ;
42 }
43
44 MacPreControlCreate( parent , id , "" , pos , size ,style, validator , name , &bounds , title ) ;
45
46 m_macControl = UMANewControl( parent->GetMacRootWindow() , &bounds , title , true , 0 , 0 , range,
47 kControlProgressBarProc , (long) this ) ;
48
49 MacPostControlCreate() ;
50
51 return TRUE;
e9576ca5
SC
52}
53
54void wxGauge::SetShadowWidth(int w)
55{
e9576ca5
SC
56}
57
58void wxGauge::SetBezelFace(int w)
59{
e9576ca5
SC
60}
61
62void wxGauge::SetRange(int r)
63{
64 m_rangeMax = r;
519cb848 65 ::SetControlMaximum( m_macControl , m_rangeMax ) ;
e9576ca5
SC
66}
67
68void wxGauge::SetValue(int pos)
69{
70 m_gaugePos = pos;
519cb848 71 ::SetControlValue( m_macControl , m_gaugePos ) ;
e9576ca5
SC
72}
73
74int wxGauge::GetShadowWidth() const
75{
e9576ca5
SC
76 return 0;
77}
78
79int wxGauge::GetBezelFace() const
80{
e9576ca5
SC
81 return 0;
82}
83
84int wxGauge::GetRange() const
85{
86 return m_rangeMax;
87}
88
89int wxGauge::GetValue() const
90{
91 return m_gaugePos;
92}
93