Difference between revisions of "Lua:Class:Component"
Jump to navigation
Jump to search
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | ''' | + | [[Category:Lua]] |
+ | Component '''class''': ('''Inheritance''': ''[[Lua:Class:Object|Object]]'') | ||
− | Base class for components | + | Base class for components. |
− | + | == Properties == | |
− | + | ; ComponentCount : integer : ''Readonly'' | |
− | + | : Number of child components. | |
− | |||
− | |||
− | |||
− | |||
− | + | ; Component[''index''] : Component : ''Readonly'' | |
− | + | : Array containing the child components. Starts at 0. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | ; ComponentByName[''name''] : Component : ''Readonly'' | |
+ | : Returns a component based on the name. | ||
− | * [[Lua|Lua | + | ; Name : string |
+ | : The name of the component. | ||
+ | |||
+ | ; Tag : integer | ||
+ | : Free to use storage space. (Usefull for id's) | ||
+ | |||
+ | ; Owner : Component | ||
+ | : Returns the owner of this object. Nil if it has none. | ||
+ | |||
+ | == Methods == | ||
+ | ; getComponentCount() : integer | ||
+ | : Returns the number of components attached to his component. | ||
+ | |||
+ | ; getComponent(''index'') : Component | ||
+ | : Returns the specific component. | ||
+ | |||
+ | ; findComponentByName(''name'') : Component | ||
+ | : Returns the component with this name. | ||
+ | |||
+ | ; getName() : string | ||
+ | : Return the name. | ||
+ | |||
+ | ; setName(''newName'') | ||
+ | : Changes the name. | ||
+ | |||
+ | ; getTag() : integer | ||
+ | : Get the tag value. | ||
+ | |||
+ | ; setTag(''tagValue'') | ||
+ | : Sets an integer value. You can use this for ID's. | ||
+ | |||
+ | ; getOwner() : Component | ||
+ | : Returns the owner of this component | ||
+ | |||
+ | {{LuaSeeAlso}} | ||
+ | |||
+ | === Related Functions === | ||
+ | * [[Lua:createClass|createClass]] | ||
+ | * [[Lua:inheritsFromObject|inheritsFromObject]] | ||
+ | * [[Lua:inheritsFromComponent|inheritsFromComponent]] | ||
+ | * [[Lua:inheritsFromControl|inheritsFromControl]] | ||
+ | * [[Lua:inheritsFromWinControl|inheritsFromWinControl]] | ||
+ | |||
+ | === Related Classes === | ||
+ | * [[Lua:Class:Object|Object]] | ||
+ | * [[Lua:Class:Control|Control]] | ||
+ | * [[Lua:Class:WinControl|WinControl]] | ||
+ | * [[Lua:Class:Application|Application]] | ||
+ | * [[Lua:Class:Form|Form]] |
Latest revision as of 01:47, 25 January 2018
Component class: (Inheritance: Object)
Base class for components.
Properties[edit]
- ComponentCount : integer : Readonly
- Number of child components.
- Component[index] : Component : Readonly
- Array containing the child components. Starts at 0.
- ComponentByName[name] : Component : Readonly
- Returns a component based on the name.
- Name : string
- The name of the component.
- Tag : integer
- Free to use storage space. (Usefull for id's)
- Owner : Component
- Returns the owner of this object. Nil if it has none.
Methods[edit]
- getComponentCount() : integer
- Returns the number of components attached to his component.
- getComponent(index) : Component
- Returns the specific component.
- findComponentByName(name) : Component
- Returns the component with this name.
- getName() : string
- Return the name.
- setName(newName)
- Changes the name.
- getTag() : integer
- Get the tag value.
- setTag(tagValue)
- Sets an integer value. You can use this for ID's.
- getOwner() : Component
- Returns the owner of this component