aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIModalScreen.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/others/irrlicht-1.8.1/source/Irrlicht/CGUIModalScreen.h')
-rw-r--r--src/others/irrlicht-1.8.1/source/Irrlicht/CGUIModalScreen.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIModalScreen.h b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIModalScreen.h
new file mode 100644
index 0000000..8548eb5
--- /dev/null
+++ b/src/others/irrlicht-1.8.1/source/Irrlicht/CGUIModalScreen.h
@@ -0,0 +1,70 @@
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
5#ifndef __C_GUI_MODAL_SCREEN_H_INCLUDED__
6#define __C_GUI_MODAL_SCREEN_H_INCLUDED__
7
8#include "IrrCompileConfig.h"
9#ifdef _IRR_COMPILE_WITH_GUI_
10
11#include "IGUIElement.h"
12
13namespace irr
14{
15namespace gui
16{
17
18 class CGUIModalScreen : public IGUIElement
19 {
20 public:
21
22 //! constructor
23 CGUIModalScreen(IGUIEnvironment* environment, IGUIElement* parent, s32 id);
24
25 //! called if an event happened.
26 virtual bool OnEvent(const SEvent& event);
27
28 //! Removes a child.
29 virtual void removeChild(IGUIElement* child);
30
31 //! Adds a child
32 virtual void addChild(IGUIElement* child);
33
34
35 //! draws the element and its children
36 virtual void draw();
37
38 //! Updates the absolute position.
39 virtual void updateAbsolutePosition();
40
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
43 //! be active when its parent is invisible or all its children are invisible.
44 virtual bool isVisible() const;
45
46 //! Modals are infinite so every point is inside
47 virtual bool isPointInside(const core::position2d<s32>& point) const;
48
49 //! Writes attributes of the element.
50 virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const;
51
52 //! Reads attributes of the element
53 virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options);
54
55 protected:
56 virtual bool canTakeFocus(IGUIElement* target) const;
57
58 private:
59
60 u32 MouseDownTime;
61 };
62
63
64} // end namespace gui
65} // end namespace irr
66
67#endif // _IRR_COMPILE_WITH_GUI_
68
69#endif
70