IGUIScrollBar.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. // Copyright (C) 2002-2012 Nikolaus Gebhardt
  2. // This file is part of the "Irrlicht Engine".
  3. // For conditions of distribution and use, see copyright notice in irrlicht.h
  4. #ifndef IRR_I_GUI_SCROLL_BAR_H_INCLUDED
  5. #define IRR_I_GUI_SCROLL_BAR_H_INCLUDED
  6. #include "IGUIElement.h"
  7. namespace irr
  8. {
  9. namespace gui
  10. {
  11. //! Default scroll bar GUI element.
  12. /** \par This element can create the following events of type EGUI_EVENT_TYPE:
  13. \li EGET_SCROLL_BAR_CHANGED
  14. */
  15. class IGUIScrollBar : public IGUIElement
  16. {
  17. public:
  18. //! constructor
  19. IGUIScrollBar(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
  20. : IGUIElement(EGUIET_SCROLL_BAR, environment, parent, id, rectangle) {}
  21. //! sets the maximum value of the scrollbar.
  22. virtual void setMax(s32 max) = 0;
  23. //! gets the maximum value of the scrollbar.
  24. virtual s32 getMax() const = 0;
  25. //! sets the minimum value of the scrollbar.
  26. virtual void setMin(s32 min) = 0;
  27. //! gets the minimum value of the scrollbar.
  28. virtual s32 getMin() const = 0;
  29. //! gets the small step value
  30. virtual s32 getSmallStep() const = 0;
  31. //! Sets the small step
  32. /** That is the amount that the value changes by when clicking
  33. on the buttons or using the cursor keys. */
  34. virtual void setSmallStep(s32 step) = 0;
  35. //! gets the large step value
  36. virtual s32 getLargeStep() const = 0;
  37. //! Sets the large step
  38. /** That is the amount that the value changes by when clicking
  39. in the tray, or using the page up and page down keys. */
  40. virtual void setLargeStep(s32 step) = 0;
  41. //! gets the current position of the scrollbar
  42. virtual s32 getPos() const = 0;
  43. //! sets the current position of the scrollbar
  44. virtual void setPos(s32 pos) = 0;
  45. };
  46. } // end namespace gui
  47. } // end namespace irr
  48. #endif