7 #ifndef CAFU_GUISYS_COMPONENT_BASE_HPP_INCLUDED
8 #define CAFU_GUISYS_COMPONENT_BASE_HPP_INCLUDED
10 #include "Variables.hpp"
11 #include "Templates/Pointer.hpp"
17 namespace cf {
namespace TypeSys {
class TypeInfoT; } }
18 namespace cf {
namespace TypeSys {
class CreateParamsT; } }
19 namespace cf {
namespace TypeSys {
class MethsDocT; } }
20 namespace cf {
namespace TypeSys {
class VarsDocT; } }
86 bool CallLuaMethod(
const char* MethodName,
const char* Signature=
"", ...);
89 virtual const char*
GetName()
const {
return "Base"; }
146 static int Get(lua_State* LuaState);
147 static int Set(lua_State* LuaState);
148 static int GetExtraMessage(lua_State* LuaState);
149 static int Interpolate(lua_State* LuaState);
150 static int toString(lua_State* LuaState);
153 static const char* DocClass;
160 struct InterpolationT
169 float GetCurrentValue()
const {
return StartValue + (EndValue-StartValue)*CurrentTime/TotalTime; }
virtual void OnPostLoad(bool OnlyStatic)
This method is called after all windows and their components have been loaded.
Definition: CompBase.hpp:118
This class is a simple container for pointers to VarBaseTs.
Definition: Variables.hpp:326
virtual ComponentBaseT * Clone() const
The virtual copy constructor.
Definition: CompBase.cpp:44
TypeSys::VarManT & GetMemberVars()
Returns the variable manager that keeps generic references to our member variables, providing a simple kind of "reflection" or "type introspection" feature.
Definition: CompBase.hpp:80
virtual void Render() const
This method implements the graphical output of this component.
Definition: CompBase.hpp:103
This struct describes a mouse event.
Definition: OpenGLWindow.hpp:185
virtual bool OnInputEvent(const CaMouseEventT &ME, float PosX, float PosY)
This method handles mouse input events.
Definition: CompBase.hpp:130
bool CallLuaMethod(const char *MethodName, const char *Signature="",...)
Calls the given Lua method of this component.
Definition: CompBase.cpp:50
This is the base class for the components that a window is composed/aggregated of.
Definition: CompBase.hpp:51
ComponentBaseT()
The constructor.
Definition: CompBase.cpp:30
virtual ~ComponentBaseT()
The virtual destructor.
Definition: CompBase.hpp:71
This struct describes a keyboard event.
Definition: OpenGLWindow.hpp:20
static const luaL_Reg MethodsList[]
The list of Lua methods for this class.
Definition: CompBase.hpp:152
virtual void OnClockTickEvent(float t)
This method handles clock-tick events.
Definition: CompBase.cpp:68
This class represents a window of the GuiSys.
Definition: Window.hpp:54
WindowT * GetWindow() const
Returns the parent window that contains this component, or NULL if this component is currently not a ...
Definition: CompBase.hpp:76
This is the common base class for the VarT classes.
Definition: Variables.hpp:113
virtual const char * GetName() const
Returns the name of this component.
Definition: CompBase.hpp:89
virtual bool OnInputEvent(const CaKeyboardEventT &KE)
This method handles keyboard input events.
Definition: CompBase.hpp:123
virtual void UpdateDependencies(WindowT *Window)
This method is called whenever something "external" to this component has changed: ...
Definition: CompBase.cpp:62
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
A base class for objects that are reference-counted with IntrusivePtrTs.
Definition: Pointer.hpp:13