IGUICheckBox.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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_CHECKBOX_H_INCLUDED__
  5. #define __I_GUI_CHECKBOX_H_INCLUDED__
  6. #include "IGUIElement.h"
  7. namespace irr
  8. {
  9. namespace gui
  10. {
  11. //! GUI Check box interface.
  12. /** \par This element can create the following events of type EGUI_EVENT_TYPE:
  13. \li EGET_CHECKBOX_CHANGED
  14. */
  15. class IGUICheckBox : public IGUIElement
  16. {
  17. public:
  18. //! constructor
  19. IGUICheckBox(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
  20. : IGUIElement(EGUIET_CHECK_BOX, environment, parent, id, rectangle) {}
  21. //! Set if box is checked.
  22. virtual void setChecked(bool checked) = 0;
  23. //! Returns true if box is checked.
  24. virtual bool isChecked() const = 0;
  25. //! Sets whether to draw the background
  26. virtual void setDrawBackground(bool draw) = 0;
  27. //! Checks if background drawing is enabled
  28. /** \return true if background drawing is enabled, false otherwise */
  29. virtual bool isDrawBackgroundEnabled() const = 0;
  30. //! Sets whether to draw the border
  31. virtual void setDrawBorder(bool draw) = 0;
  32. //! Checks if border drawing is enabled
  33. /** \return true if border drawing is enabled, false otherwise */
  34. virtual bool isDrawBorderEnabled() const = 0;
  35. };
  36. } // end namespace gui
  37. } // end namespace irr
  38. #endif