]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/gauge.h
   1 ///////////////////////////////////////////////////////////////////////////// 
   2 // Name:        wx/cocoa/gauge.h 
   3 // Purpose:     wxGauge class 
   4 // Author:      David Elliott 
   8 // Copyright:   (c) 2003 David Elliott 
   9 // Licence:     wxWindows licence 
  10 ///////////////////////////////////////////////////////////////////////////// 
  12 #ifndef __WX_COCOA_GAUGE_H__ 
  13 #define __WX_COCOA_GAUGE_H__ 
  15 // #include "wx/cocoa/NSProgressIndicator.h" 
  17 DECLARE_WXCOCOA_OBJC_CLASS(NSProgressIndicator
); 
  19 // ======================================================================== 
  21 // ======================================================================== 
  22 class WXDLLEXPORT wxGauge
: public wxGaugeBase
// , protected wxCocoaNSProgressIndicator 
  24     DECLARE_DYNAMIC_CLASS(wxGauge
) 
  26 //    WX_DECLARE_COCOA_OWNER(NSProgressIndicator,NSView,NSView) 
  27 // ------------------------------------------------------------------------ 
  29 // ------------------------------------------------------------------------ 
  32     wxGauge(wxWindow 
*parent
, wxWindowID winid
, int range
, 
  33             const wxPoint
& pos 
= wxDefaultPosition
, 
  34             const wxSize
& size 
= wxDefaultSize
, 
  35             long style 
= wxGA_HORIZONTAL
, 
  36             const wxValidator
& validator 
= wxDefaultValidator
, 
  37             const wxString
& name 
= wxGaugeNameStr
) 
  39         Create(parent
, winid
, range
, pos
, size
, style
, validator
, name
); 
  42     bool Create(wxWindow 
*parent
, wxWindowID winid
, int range
, 
  43             const wxPoint
& pos 
= wxDefaultPosition
, 
  44             const wxSize
& size 
= wxDefaultSize
, 
  45             long style 
= wxGA_HORIZONTAL
, 
  46             const wxValidator
& validator 
= wxDefaultValidator
, 
  47             const wxString
& name 
= wxGaugeNameStr
); 
  50 // ------------------------------------------------------------------------ 
  52 // ------------------------------------------------------------------------ 
  54     inline WX_NSProgressIndicator 
GetNSProgressIndicator() const { return (WX_NSProgressIndicator
)m_cocoaNSView
; } 
  56     // NSProgressIndicator cannot be enabled/disabled 
  57     virtual void CocoaSetEnabled(bool enable
) { } 
  58 // ------------------------------------------------------------------------ 
  60 // ------------------------------------------------------------------------ 
  63     virtual int GetValue() const; 
  64     virtual void SetValue(int value
); 
  66     // retrieve/change the range 
  67     virtual void SetRange(int maxValue
); 
  68     int GetRange(void) const; 
  70     virtual wxSize 
DoGetBestSize() const; 
  73 #endif // __WX_COCOA_GAUGE_H__