gauge.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/motif/gauge.h
  3. // Purpose: wxGauge class
  4. // Author: Julian Smart
  5. // Modified by:
  6. // Created: 17/09/98
  7. // Copyright: (c) Julian Smart
  8. // Licence: wxWindows licence
  9. /////////////////////////////////////////////////////////////////////////////
  10. #ifndef _WX_GAUGE_H_
  11. #define _WX_GAUGE_H_
  12. // Group box
  13. class WXDLLIMPEXP_CORE wxGauge : public wxGaugeBase
  14. {
  15. DECLARE_DYNAMIC_CLASS(wxGauge)
  16. public:
  17. inline wxGauge() { m_rangeMax = 0; m_gaugePos = 0; }
  18. inline wxGauge(wxWindow *parent, wxWindowID id,
  19. int range,
  20. const wxPoint& pos = wxDefaultPosition,
  21. const wxSize& size = wxDefaultSize,
  22. long style = wxGA_HORIZONTAL,
  23. const wxValidator& validator = wxDefaultValidator,
  24. const wxString& name = wxGaugeNameStr)
  25. {
  26. Create(parent, id, range, pos, size, style, validator, name);
  27. }
  28. bool Create(wxWindow *parent, wxWindowID id,
  29. int range,
  30. const wxPoint& pos = wxDefaultPosition,
  31. const wxSize& size = wxDefaultSize,
  32. long style = wxGA_HORIZONTAL,
  33. const wxValidator& validator = wxDefaultValidator,
  34. const wxString& name = wxGaugeNameStr);
  35. void SetShadowWidth(int w);
  36. void SetRange(int r);
  37. void SetValue(int pos);
  38. int GetShadowWidth() const ;
  39. int GetRange() const ;
  40. int GetValue() const ;
  41. virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ;
  42. private:
  43. virtual wxSize DoGetBestSize() const;
  44. virtual void DoMoveWindow(int x, int y, int width, int height);
  45. };
  46. #endif
  47. // _WX_GAUGE_H_