diff options
Diffstat (limited to 'libraries/irrlicht-1.8/source/Irrlicht/CGUIModalScreen.h')
-rw-r--r-- | libraries/irrlicht-1.8/source/Irrlicht/CGUIModalScreen.h | 140 |
1 files changed, 70 insertions, 70 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/CGUIModalScreen.h b/libraries/irrlicht-1.8/source/Irrlicht/CGUIModalScreen.h index 8548eb5..273e532 100644 --- a/libraries/irrlicht-1.8/source/Irrlicht/CGUIModalScreen.h +++ b/libraries/irrlicht-1.8/source/Irrlicht/CGUIModalScreen.h | |||
@@ -1,70 +1,70 @@ | |||
1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt | 1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt |
2 | // This file is part of the "Irrlicht Engine". | 2 | // This file is part of the "Irrlicht Engine". |
3 | // For conditions of distribution and use, see copyright notice in irrlicht.h | 3 | // For conditions of distribution and use, see copyright notice in irrlicht.h |
4 | 4 | ||
5 | #ifndef __C_GUI_MODAL_SCREEN_H_INCLUDED__ | 5 | #ifndef __C_GUI_MODAL_SCREEN_H_INCLUDED__ |
6 | #define __C_GUI_MODAL_SCREEN_H_INCLUDED__ | 6 | #define __C_GUI_MODAL_SCREEN_H_INCLUDED__ |
7 | 7 | ||
8 | #include "IrrCompileConfig.h" | 8 | #include "IrrCompileConfig.h" |
9 | #ifdef _IRR_COMPILE_WITH_GUI_ | 9 | #ifdef _IRR_COMPILE_WITH_GUI_ |
10 | 10 | ||
11 | #include "IGUIElement.h" | 11 | #include "IGUIElement.h" |
12 | 12 | ||
13 | namespace irr | 13 | namespace irr |
14 | { | 14 | { |
15 | namespace gui | 15 | namespace gui |
16 | { | 16 | { |
17 | 17 | ||
18 | class CGUIModalScreen : public IGUIElement | 18 | class CGUIModalScreen : public IGUIElement |
19 | { | 19 | { |
20 | public: | 20 | public: |
21 | 21 | ||
22 | //! constructor | 22 | //! constructor |
23 | CGUIModalScreen(IGUIEnvironment* environment, IGUIElement* parent, s32 id); | 23 | CGUIModalScreen(IGUIEnvironment* environment, IGUIElement* parent, s32 id); |
24 | 24 | ||
25 | //! called if an event happened. | 25 | //! called if an event happened. |
26 | virtual bool OnEvent(const SEvent& event); | 26 | virtual bool OnEvent(const SEvent& event); |
27 | 27 | ||
28 | //! Removes a child. | 28 | //! Removes a child. |
29 | virtual void removeChild(IGUIElement* child); | 29 | virtual void removeChild(IGUIElement* child); |
30 | 30 | ||
31 | //! Adds a child | 31 | //! Adds a child |
32 | virtual void addChild(IGUIElement* child); | 32 | virtual void addChild(IGUIElement* child); |
33 | 33 | ||
34 | 34 | ||
35 | //! draws the element and its children | 35 | //! draws the element and its children |
36 | virtual void draw(); | 36 | virtual void draw(); |
37 | 37 | ||
38 | //! Updates the absolute position. | 38 | //! Updates the absolute position. |
39 | virtual void updateAbsolutePosition(); | 39 | virtual void updateAbsolutePosition(); |
40 | 40 | ||
41 | //! Modalscreen is not a typical element, but rather acts like a state for it's children. | 41 | //! Modalscreen is not a typical element, but rather acts like a state for it's children. |
42 | //! isVisible is overriden to give this a useful behavior, so that a modal will no longer | 42 | //! isVisible is overriden to give this a useful behavior, so that a modal will no longer |
43 | //! be active when its parent is invisible or all its children are invisible. | 43 | //! be active when its parent is invisible or all its children are invisible. |
44 | virtual bool isVisible() const; | 44 | virtual bool isVisible() const; |
45 | 45 | ||
46 | //! Modals are infinite so every point is inside | 46 | //! Modals are infinite so every point is inside |
47 | virtual bool isPointInside(const core::position2d<s32>& point) const; | 47 | virtual bool isPointInside(const core::position2d<s32>& point) const; |
48 | 48 | ||
49 | //! Writes attributes of the element. | 49 | //! Writes attributes of the element. |
50 | virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; | 50 | virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const; |
51 | 51 | ||
52 | //! Reads attributes of the element | 52 | //! Reads attributes of the element |
53 | virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); | 53 | virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options); |
54 | 54 | ||
55 | protected: | 55 | protected: |
56 | virtual bool canTakeFocus(IGUIElement* target) const; | 56 | virtual bool canTakeFocus(IGUIElement* target) const; |
57 | 57 | ||
58 | private: | 58 | private: |
59 | 59 | ||
60 | u32 MouseDownTime; | 60 | u32 MouseDownTime; |
61 | }; | 61 | }; |
62 | 62 | ||
63 | 63 | ||
64 | } // end namespace gui | 64 | } // end namespace gui |
65 | } // end namespace irr | 65 | } // end namespace irr |
66 | 66 | ||
67 | #endif // _IRR_COMPILE_WITH_GUI_ | 67 | #endif // _IRR_COMPILE_WITH_GUI_ |
68 | 68 | ||
69 | #endif | 69 | #endif |
70 | 70 | ||