]> git.lizzy.rs Git - irrlicht.git/blob - source/Irrlicht/CGUICheckBox.h
Reduce IrrCompileConfig usage to files that actually need it
[irrlicht.git] / source / Irrlicht / CGUICheckBox.h
1 // Copyright (C) 2002-2012 Nikolaus Gebhardt\r
2 // This file is part of the "Irrlicht Engine".\r
3 // For conditions of distribution and use, see copyright notice in irrlicht.h\r
4 \r
5 #ifndef __C_GUI_CHECKBOX_H_INCLUDED__\r
6 #define __C_GUI_CHECKBOX_H_INCLUDED__\r
7 \r
8 #include "IGUICheckBox.h"\r
9 \r
10 namespace irr\r
11 {\r
12 namespace gui\r
13 {\r
14 \r
15         class CGUICheckBox : public IGUICheckBox\r
16         {\r
17         public:\r
18 \r
19                 //! constructor\r
20                 CGUICheckBox(bool checked, IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle);\r
21 \r
22                 //! set if box is checked\r
23                 void setChecked(bool checked) override;\r
24 \r
25                 //! returns if box is checked\r
26                 bool isChecked() const override;\r
27 \r
28                 //! Sets whether to draw the background\r
29                 void setDrawBackground(bool draw) override;\r
30 \r
31                 //! Checks if background drawing is enabled\r
32                 /** \return true if background drawing is enabled, false otherwise */\r
33                 bool isDrawBackgroundEnabled() const override;\r
34 \r
35                 //! Sets whether to draw the border\r
36                 void setDrawBorder(bool draw) override;\r
37 \r
38                 //! Checks if border drawing is enabled\r
39                 /** \return true if border drawing is enabled, false otherwise */\r
40                 bool isDrawBorderEnabled() const override;\r
41 \r
42                 //! called if an event happened.\r
43                 bool OnEvent(const SEvent& event) override;\r
44 \r
45                 //! draws the element and its children\r
46                 void draw() override;\r
47 \r
48         private:\r
49 \r
50                 u32 CheckTime;\r
51                 bool Pressed;\r
52                 bool Checked;\r
53                 bool Border;\r
54                 bool Background;\r
55         };\r
56 \r
57 } // end namespace gui\r
58 } // end namespace irr\r
59 \r
60 #endif // __C_GUI_CHECKBOX_H_INCLUDED__\r