scrolbar.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /////////////////////////////////////////////////////////////////////////////
  2. // Name: wx/gtk/scrolbar.h
  3. // Purpose:
  4. // Author: Robert Roebling
  5. // Copyright: (c) 1998 Robert Roebling
  6. // Licence: wxWindows licence
  7. /////////////////////////////////////////////////////////////////////////////
  8. #ifndef _WX_GTK_SCROLLBAR_H_
  9. #define _WX_GTK_SCROLLBAR_H_
  10. //-----------------------------------------------------------------------------
  11. // wxScrollBar
  12. //-----------------------------------------------------------------------------
  13. class WXDLLIMPEXP_CORE wxScrollBar: public wxScrollBarBase
  14. {
  15. public:
  16. wxScrollBar();
  17. inline wxScrollBar( wxWindow *parent, wxWindowID id,
  18. const wxPoint& pos = wxDefaultPosition,
  19. const wxSize& size = wxDefaultSize,
  20. long style = wxSB_HORIZONTAL,
  21. const wxValidator& validator = wxDefaultValidator,
  22. const wxString& name = wxScrollBarNameStr )
  23. {
  24. Create( parent, id, pos, size, style, validator, name );
  25. }
  26. bool Create( wxWindow *parent, wxWindowID id,
  27. const wxPoint& pos = wxDefaultPosition,
  28. const wxSize& size = wxDefaultSize,
  29. long style = wxSB_HORIZONTAL,
  30. const wxValidator& validator = wxDefaultValidator,
  31. const wxString& name = wxScrollBarNameStr );
  32. virtual ~wxScrollBar();
  33. int GetThumbPosition() const;
  34. int GetThumbSize() const;
  35. int GetPageSize() const;
  36. int GetRange() const;
  37. virtual void SetThumbPosition( int viewStart );
  38. virtual void SetScrollbar( int position, int thumbSize, int range, int pageSize,
  39. bool refresh = true );
  40. void SetThumbSize(int thumbSize);
  41. void SetPageSize( int pageLength );
  42. void SetRange(int range);
  43. static wxVisualAttributes
  44. GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
  45. DECLARE_DYNAMIC_CLASS(wxScrollBar)
  46. };
  47. #endif // _WX_GTK_SCROLLBAR_H_