]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/gauge.h
   1 ///////////////////////////////////////////////////////////////////////////// 
   2 // Name:        wx/gtk/gauge.h 
   4 // Author:      Robert Roebling 
   6 // Copyright:   (c) 1998 Robert Roebling 
   7 // Licence:     wxWindows licence 
   8 ///////////////////////////////////////////////////////////////////////////// 
  10 #ifndef _WX_GTK_GAUGE_H_ 
  11 #define _WX_GTK_GAUGE_H_ 
  13 //----------------------------------------------------------------------------- 
  15 //----------------------------------------------------------------------------- 
  17 class WXDLLIMPEXP_CORE wxGauge
: public wxControl
 
  22     wxGauge( wxWindow 
*parent
, 
  25              const wxPoint
& pos 
= wxDefaultPosition
, 
  26              const wxSize
& size 
= wxDefaultSize
, 
  27              long style 
= wxGA_HORIZONTAL
, 
  28              const wxValidator
& validator 
= wxDefaultValidator
, 
  29              const wxString
& name 
= wxGaugeNameStr 
) 
  33         Create(parent
, id
, range
, pos
, size
, style
, validator
, name
); 
  36     bool Create( wxWindow 
*parent
, 
  37                  wxWindowID id
, int range
, 
  38                  const wxPoint
& pos 
= wxDefaultPosition
, 
  39                  const wxSize
& size 
= wxDefaultSize
, 
  40                  long style 
= wxGA_HORIZONTAL
, 
  41                  const wxValidator
& validator 
= wxDefaultValidator
, 
  42                  const wxString
& name 
= wxGaugeNameStr 
); 
  44     void SetShadowWidth( int WXUNUSED(w
) ) { } 
  45     void SetBezelFace( int WXUNUSED(w
) ) { } 
  46     int GetShadowWidth() const { return 0; }; 
  47     int GetBezelFace() const { return 0; }; 
  49     // determinate mode API 
  50     void SetRange( int r 
); 
  51     void SetValue( int pos 
); 
  56     // indeterminate mode API 
  59     bool IsVertical() const { return HasFlag(wxGA_VERTICAL
); } 
  61     static wxVisualAttributes
 
  62     GetClassDefaultAttributes(wxWindowVariant variant 
= wxWINDOW_VARIANT_NORMAL
); 
  64     virtual wxVisualAttributes 
GetDefaultAttributes() const; 
  69     // the max and current gauge values 
  74     // common part of all ctors 
  75     void Init() { m_rangeMax 
= m_gaugePos 
= 0; } 
  77     // set the gauge value to the value of m_gaugePos 
  80     virtual wxSize 
DoGetBestSize() const; 
  83     DECLARE_DYNAMIC_CLASS(wxGauge
)