7 #ifndef CAFU_GUISYS_WINDOW_HPP_INCLUDED
8 #define CAFU_GUISYS_WINDOW_HPP_INCLUDED
10 #include "CompBasics.hpp"
11 #include "CompTransform.hpp"
12 #include "Templates/Array.hpp"
13 #include "Templates/Pointer.hpp"
22 namespace cf {
namespace TypeSys {
class TypeInfoT; } }
23 namespace cf {
namespace TypeSys {
class TypeInfoManT; } }
24 namespace cf {
namespace TypeSys {
class CreateParamsT; } }
25 namespace cf {
namespace TypeSys {
class MethsDocT; } }
34 class WindowCreateParamsT;
79 GuiImplT& GetGui()
const {
return m_Gui; }
173 virtual void Render()
const;
193 bool CallLuaMethod(
const char* MethodName,
const char* Signature=
"", ...);
206 static int AddChild(lua_State* LuaState);
208 static int GetParent(lua_State* LuaState);
210 static int GetTime(lua_State* LuaState);
211 static int GetBasics(lua_State* LuaState);
214 static int RmvComponent(lua_State* LuaState);
217 static int toString(lua_State* LuaState);
220 static const char* DocClass;
227 void operator = (
const WindowT&);
IntrusivePtrT< const ComponentBaseT > GetApp() const
The const variant of the GetApp() method above. See GetApp() for details.
Definition: Window.hpp:119
This class implements smart (reference-counted) pointers.
Definition: Pointer.hpp:43
IntrusivePtrT< ComponentTransformT > GetTransform() const
Returns the "Transform" component of this window.
Definition: Window.hpp:130
IntrusivePtrT< ComponentBaseT > GetComponent(const std::string &TypeName, unsigned int n=0) const
Returns the (n-th) component of the given (type) name.
Definition: Window.cpp:221
bool RemoveChild(IntrusivePtrT< WindowT > Child)
Removes the given window from the children of this window.
Definition: Window.cpp:165
const ArrayT< IntrusivePtrT< WindowT > > & GetChildren() const
Returns the immediate children of this window.
Definition: Window.hpp:86
virtual bool OnInputEvent(const CaKeyboardEventT &KE)
Keyboard input event handler.
Definition: Window.cpp:376
IntrusivePtrT< ComponentBaseT > GetApp()
Returns the application component of this window.
Definition: Window.hpp:116
This struct describes a mouse event.
Definition: OpenGLWindow.hpp:185
bool AddComponent(IntrusivePtrT< ComponentBaseT > Comp, unsigned long Index=ULONG_MAX)
Adds the given component to this window.
Definition: Window.cpp:252
virtual bool OnClockTickEvent(float t)
The clock-tick event handler.
Definition: Window.cpp:419
const ArrayT< IntrusivePtrT< ComponentBaseT > > & GetComponents() const
Returns the components that this window is composed of.
Definition: Window.hpp:136
This class manages the type infos.
Definition: TypeSys.hpp:145
This class implements a Graphical User Interface (GUI).
Definition: GuiImpl.hpp:42
void SetApp(IntrusivePtrT< ComponentBaseT > App)
Sets the application component for this window. See GetApp() for details.
Definition: Window.cpp:211
This struct describes a keyboard event.
Definition: OpenGLWindow.hpp:20
WindowT(const WindowCreateParamsT &Params)
The normal constructor.
Definition: Window.cpp:51
This class represents a window of the GuiSys.
Definition: Window.hpp:54
virtual void Render() const
Renders this window.
Definition: Window.cpp:338
Vector2fT GetAbsolutePos() const
Returns the position of the upper left corner of this window in absolute (vs. relative to the parent)...
Definition: Window.cpp:280
virtual WindowT * Clone(bool Recursive=false) const
The virtual copy constructor.
Definition: Window.cpp:109
IntrusivePtrT< WindowT > GetParent() const
Returns the parent window of this window.
Definition: Window.hpp:82
IntrusivePtrT< ComponentBasicsT > GetBasics() const
Returns the "Basics" component of this window.
Definition: Window.hpp:126
Creation parameters for a GUI window.
Definition: WindowCreateParams.hpp:21
IntrusivePtrT< WindowT > Find(const std::string &WantedName)
Finds the window with the name WantedName in the hierachy tree of this window.
Definition: Window.cpp:300
void DeleteComponent(unsigned long CompNr)
Deletes the component at the given index from this window.
Definition: Window.cpp:267
static const luaL_Reg MethodsList[]
List of methods registered with Lua.
Definition: Window.hpp:219
virtual ~WindowT()
The virtual destructor. Deletes this window and all its children.
Definition: Window.cpp:115
bool AddChild(IntrusivePtrT< WindowT > Child, unsigned long Pos=0xFFFFFFFF)
Adds the given window to the children of this window, and sets this window as the parent of the child...
Definition: Window.cpp:146
IntrusivePtrT< WindowT > GetRoot()
Returns the top-most parent of this window, that is, the root of the hierarchy this window is in...
Definition: Window.cpp:200
Definition: Renderer.hpp:16
Definition: TypeSys.hpp:52
Definition: TypeSys.hpp:57
This class keeps type information (about an entity class that occurs in the game).
Definition: TypeSys.hpp:79
bool CallLuaMethod(const char *MethodName, const char *Signature="",...)
Calls the Lua method with name MethodName of this window.
Definition: Window.cpp:436
A base class for objects that are reference-counted with IntrusivePtrTs.
Definition: Pointer.hpp:13