This components add the behaviour of a choice field to its window. More...
#include "CompChoice.hpp"
Public Member Functions | |
ComponentChoiceT () | |
The constructor. More... | |
ComponentChoiceT (const ComponentChoiceT &Comp) | |
The copy constructor. More... | |
ComponentChoiceT * | Clone () const |
The virtual copy constructor. More... | |
const char * | GetName () const |
Returns the name of this component. More... | |
void | UpdateDependencies (WindowT *Window) |
This method is called whenever something "external" to this component has changed: More... | |
void | OnPostLoad (bool OnlyStatic) |
This method is called after all windows and their components have been loaded. More... | |
bool | OnInputEvent (const CaKeyboardEventT &KE) |
This method handles keyboard input events. More... | |
bool | OnInputEvent (const CaMouseEventT &ME, float PosX, float PosY) |
This method handles mouse input events. More... | |
const cf::TypeSys::TypeInfoT * | GetType () const |
![]() | |
ComponentBaseT () | |
The constructor. More... | |
ComponentBaseT (const ComponentBaseT &Comp) | |
The copy constructor. More... | |
virtual | ~ComponentBaseT () |
The virtual destructor. More... | |
WindowT * | GetWindow () const |
Returns the parent window that contains this component, or NULL if this component is currently not a part of any window. More... | |
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. More... | |
bool | CallLuaMethod (const char *MethodName, const char *Signature="",...) |
Calls the given Lua method of this component. More... | |
virtual void | Render () const |
This method implements the graphical output of this component. More... | |
virtual void | OnClockTickEvent (float t) |
This method handles clock-tick events. More... | |
![]() | |
unsigned int | GetRefCount () const |
Static Public Member Functions | |
static void * | CreateInstance (const cf::TypeSys::CreateParamsT &Params) |
![]() | |
static void * | CreateInstance (const cf::TypeSys::CreateParamsT &Params) |
Static Public Attributes | |
static const cf::TypeSys::TypeInfoT | TypeInfo |
![]() | |
static const cf::TypeSys::TypeInfoT | TypeInfo |
Static Protected Member Functions | |
static int | Set (lua_State *LuaState) |
static int | GetSelItem (lua_State *LuaState) |
static int | toString (lua_State *LuaState) |
![]() | |
static int | Get (lua_State *LuaState) |
static int | Set (lua_State *LuaState) |
static int | GetExtraMessage (lua_State *LuaState) |
static int | Interpolate (lua_State *LuaState) |
static int | toString (lua_State *LuaState) |
Static Protected Attributes | |
static const luaL_Reg | MethodsList [] |
The list of Lua methods for this class. More... | |
static const char * | DocClass |
static const cf::TypeSys::MethsDocT | DocMethods [] |
static const cf::TypeSys::MethsDocT | DocCallbacks [] |
static const cf::TypeSys::VarsDocT | DocVars [] |
![]() | |
static const luaL_Reg | MethodsList [] |
The list of Lua methods for this class. More... | |
static const char * | DocClass |
static const cf::TypeSys::MethsDocT | DocMethods [] |
Additional Inherited Members | |
![]() | |
RefCountedT (const RefCountedT &) | |
RefCountedT & | operator= (const RefCountedT &) |
This components add the behaviour of a choice field to its window.
It requires that the window also has a text component, whose value it updates according to user interaction to one of the available choices.
ComponentChoiceT::ComponentChoiceT | ( | ) |
The constructor.
ComponentChoiceT::ComponentChoiceT | ( | const ComponentChoiceT & | Comp | ) |
The copy constructor.
Comp | The component to create a copy of. |
|
virtual |
The virtual copy constructor.
Callers can use this method to create a copy of this component without knowing its concrete type. Overrides in derived classes use a covariant return type to facilitate use when the concrete type is known. The newly cloned component is initially not a part of any window, even if the source component was.
Reimplemented from cf::GuiSys::ComponentBaseT.
|
inlinevirtual |
Returns the name of this component.
Reimplemented from cf::GuiSys::ComponentBaseT.
|
virtual |
This method handles keyboard input events.
KE | Keyboard event instance. |
Reimplemented from cf::GuiSys::ComponentBaseT.
|
virtual |
This method handles mouse input events.
ME | Mouse event instance. |
PosX | x-coordinate of the mouse cursor position. |
PosY | y-coordinate of the mouse cursor position. |
Reimplemented from cf::GuiSys::ComponentBaseT.
|
virtual |
This method is called after all windows and their components have been loaded.
It is called only once when the static part of GUI initializatzion is complete, i.e. after the initial values of all windows and their components have been set. Components can override this method in order act / do something / add custom behaviour at that time.
For example, a choice component can use it to set the associated text component to the initial selection, a script component can forward it to the script by calling a related script function, a component that for backwards-compatibility supports reading old variables can convert to new ones, etc.
OnlyStatic | true if only the loading of static data is desired, e.g. when the world is instantiated in the GUI Editor, false if also user-defined scripts with custom, initial behaviour should be loaded. |
Reimplemented from cf::GuiSys::ComponentBaseT.
|
virtual |
This method is called whenever something "external" to this component has changed:
Window | The parent window that contains this component, or NULL to indicate that this component is removed from the window that it used to be a part of. |
Reimplemented from cf::GuiSys::ComponentBaseT.
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
The list of Lua methods for this class.