2
0

IGUIScrollBar.h 1.6 KB

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