Difference between revisions of "GUIComponent"
From Virtual World Web Wiki
(Documentation for the GUIComponent class) |
(Documentation for the GUIComponent class) |
||
(10 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
This is the base class for all GUI components. More | This is the base class for all GUI components. More | ||
+ | *'''Inherits class: [[GUIContainer]]''' | ||
* This is a JavaScript visible object | * This is a JavaScript visible object | ||
===Remarks <nowiki>[</nowiki>[{{fullurl:GUIComponent Remarks|action=edit}} edit]<nowiki>]</nowiki>=== | ===Remarks <nowiki>[</nowiki>[{{fullurl:GUIComponent Remarks|action=edit}} edit]<nowiki>]</nowiki>=== | ||
− | {{:GUIComponent Remarks}} | + | {{#ifexist:GUIComponent Remarks|{{:GUIComponent Remarks}}|}} |
===Properties=== | ===Properties=== | ||
Line 43: | Line 44: | ||
:{{CSharp|string Name {get; set;} }} | :{{CSharp|string Name {get; set;} }} | ||
− | + | :{{CSharp|GUIContainer Parent {get; set;} }} | |
− | :{{CSharp| | + | |
− | + | ||
− | + | ||
:: | :: | ||
− | :: | + | ::Changes the parent within the hierarchy |
− | :{{CSharp| | + | :{{CSharp|ScrollHandlerExtended ScrollHandler {get;} }} |
:{{CSharp|int SiblingIndex {get; set;} }} | :{{CSharp|int SiblingIndex {get; set;} }} | ||
Line 77: | Line 75: | ||
:{{CSharp|bool Visible {get; set;} }} | :{{CSharp|bool Visible {get; set;} }} | ||
− | |||
:{{CSharp|GUIBaseWindow Window {get; set;} }} | :{{CSharp|GUIBaseWindow Window {get; set;} }} | ||
:: | :: | ||
::Which window is this component part of? | ::Which window is this component part of? | ||
+ | |||
+ | ===Events=== | ||
+ | :{{CSharp|OnMouseEnter()}} | ||
+ | |||
+ | :{{CSharp|OnMouseExit()}} | ||
===Methods=== | ===Methods=== | ||
− | :{{CSharp|GUIComponent Clone(GUIContainer parent)}} | + | :{{CSharp|GUIComponent Clone(GUIContainer parent {{=}} NULL)}} |
:: | :: | ||
::Duplicates this component, optionally under a new parent | ::Duplicates this component, optionally under a new parent | ||
+ | |||
+ | :{{CSharp|void DropFocus()}} | ||
+ | |||
+ | :{{CSharp|void MoveToScreen()}} | ||
__NOTOC____NOEDITSECTION__ | __NOTOC____NOEDITSECTION__ |
Latest revision as of 17:18, 19 November 2018
This is the base class for all GUI components. More
- Inherits class: GUIContainer
- This is a JavaScript visible object
Remarks [edit]
Properties
- bool AllowDrag {get; set;}
- Can you drag this component?
- bool AllowDrop {get; set;}
- Can this component accept drops?
- string ContextTag {get; set;}
- Setting a ContextTag causes this component to trigger a context menu when right-clicked. The ContextTag can then be checked in the OnPrepareMenu event.
- DragItemExtended DragItem {get;}
- Details related to this item's drag capabilities
- DropTargetExtended DropTarget {get;}
- Details about this component's drop-accepting abilities
- bool Enabled {get; set;}
- Is this component enabled for interaction
- bool FitHorizontal {get; set;}
- Should this component adjust its horizontal size to accomodate its content? Note: Content does not include Children unless this component also has a LayoutGroup
- bool FitVertical {get; set;}
- Should this component adjust its vertical size to accomodate its content? Note: Content does not include Children unless this component also has a LayoutGroup
- bool IgnoreLayout {get; set;}
- Do not apply a parent LayoutGroup to this Component
- string Name {get; set;}
- GUIContainer Parent {get; set;}
- Changes the parent within the hierarchy
- ScrollHandlerExtended ScrollHandler {get;}
- int SiblingIndex {get; set;}
- What is this component's index within its parents children list
- string ToolTip {get; set;}
- Text to display when mousing over the component
- ResourceValue ToolTipCursor {get; set;}
- Cursor to display when mousing over the component
- bool ToolTipCursorMiddle {get; set;}
- When using a custom cursor, should the cursor be centered (like a crosshair?)
- ResourceValue ToolTipImage {get; set;}
- Image to display when mousing over the component
- string ToolTipTitle {get; set;}
- Title text to display when mousing over the component
- bool Visible {get; set;}
- GUIBaseWindow Window {get; set;}
- Which window is this component part of?
Events
- OnMouseEnter()
- OnMouseExit()
Methods
- GUIComponent Clone(GUIContainer parent = NULL)
- Duplicates this component, optionally under a new parent
- void DropFocus()
- void MoveToScreen()