IGUIScrollBar.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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 __I_GUI_SCROLL_BAR_H_INCLUDED__
  5. #define __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