]>
git.saurik.com Git - wxWidgets.git/blob - src/mac/carbon/gauge.cpp
   1 ///////////////////////////////////////////////////////////////////////////// 
   3 // Purpose:     wxGauge class 
   4 // Author:      Stefan Csomor 
   8 // Copyright:   (c) Stefan Csomor 
   9 // Licence:       wxWindows licence 
  10 ///////////////////////////////////////////////////////////////////////////// 
  13 #pragma implementation "gauge.h" 
  18 #if !USE_SHARED_LIBRARY 
  19 IMPLEMENT_DYNAMIC_CLASS(wxGauge
, wxControl
) 
  22 #include "wx/mac/uma.h" 
  24 bool wxGauge::Create(wxWindow 
*parent
, wxWindowID id
, 
  29            const wxValidator
& validator
, 
  32     if ( !wxGaugeBase::Create(parent
, id
, range
, pos
, s
, style
, validator
, name
) ) 
  41     if ( size
.x 
== wxDefaultSize
.x 
&& size
.y 
== wxDefaultSize
.y
) 
  43         size 
= wxSize( 200 , 16 ) ; 
  46     MacPreControlCreate( parent 
, id 
,  wxEmptyString 
, pos 
, size 
,style 
& 0xE0FFFFFF /* no borders on mac */ , validator 
, name 
, &bounds 
, title 
) ; 
  48     m_macControl 
= ::NewControl( MAC_WXHWND(parent
->MacGetRootWindow()) , &bounds 
, title 
, false , 0 , 0 , range
,  
  49         kControlProgressBarProc 
, (long) this ) ; 
  51     MacPostControlCreate() ; 
  56 void wxGauge::SetShadowWidth(int w
) 
  60 void wxGauge::SetBezelFace(int w
) 
  64 void wxGauge::SetRange(int r
) 
  67     ::SetControl32BitMaximum( (ControlHandle
) m_macControl 
, m_rangeMax 
) ; 
  70 void wxGauge::SetValue(int pos
) 
  73        ::SetControl32BitValue( (ControlHandle
) m_macControl 
, m_gaugePos 
) ; 
  76 int wxGauge::GetShadowWidth() const 
  81 int wxGauge::GetBezelFace() const 
  86 int wxGauge::GetRange() const 
  91 int wxGauge::GetValue() const