Difference between revisions of "GUIComponent"
From Virtual World Web Wiki
(Documentation for the GUIComponent class) |
(Documentation for the GUIComponent class) |
||
Line 1: | Line 1: | ||
+ | This is the base class for all GUI components. More | ||
+ | |||
*'''Inherits class: [[GUIContainer]]''' | *'''Inherits class: [[GUIContainer]]''' | ||
* This is a JavaScript visible object | * This is a JavaScript visible object | ||
Line 6: | Line 8: | ||
===Properties=== | ===Properties=== | ||
:{{CSharp|bool AllowDrag {get; set;} }} | :{{CSharp|bool AllowDrag {get; set;} }} | ||
+ | :: | ||
+ | ::Can you drag this component? | ||
:{{CSharp|bool AllowDrop {get; set;} }} | :{{CSharp|bool AllowDrop {get; set;} }} | ||
+ | :: | ||
+ | ::Can this component accept drops? | ||
:{{CSharp|string ContextTag {get; set;} }} | :{{CSharp|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. | ||
:{{CSharp|DragItemExtended DragItem {get;} }} | :{{CSharp|DragItemExtended DragItem {get;} }} | ||
+ | :: | ||
+ | ::Details related to this item's drag capabilities | ||
:{{CSharp|DropTargetExtended DropTarget {get;} }} | :{{CSharp|DropTargetExtended DropTarget {get;} }} | ||
+ | :: | ||
+ | ::Details about this component's drop-accepting abilities | ||
:{{CSharp|bool Enabled {get; set;} }} | :{{CSharp|bool Enabled {get; set;} }} | ||
+ | :: | ||
+ | ::Is this component enabled for interaction | ||
:{{CSharp|bool FitHorizontal {get; set;} }} | :{{CSharp|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 | ||
:{{CSharp|bool FitVertical {get; set;} }} | :{{CSharp|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 | ||
:{{CSharp|bool IgnoreLayout {get; set;} }} | :{{CSharp|bool IgnoreLayout {get; set;} }} | ||
+ | :: | ||
+ | ::Do not apply a parent LayoutGroup to this Component | ||
:{{CSharp|string Name {get; set;} }} | :{{CSharp|string Name {get; set;} }} | ||
− | |||
:{{CSharp|ComponentLayoutExtended PanelLayoutExtended {get;} }} | :{{CSharp|ComponentLayoutExtended PanelLayoutExtended {get;} }} | ||
+ | :: | ||
+ | ::The component's layout properties if it's in a layout group | ||
:{{CSharp|GUIContainer Parent {get; set;} }} | :{{CSharp|GUIContainer Parent {get; set;} }} | ||
+ | :: | ||
+ | ::Changes the parent within the hierarchy | ||
:{{CSharp|int SiblingIndex {get; set;} }} | :{{CSharp|int SiblingIndex {get; set;} }} | ||
+ | :: | ||
+ | ::What is this component's index within its parents children list | ||
:{{CSharp|string ToolTip {get; set;} }} | :{{CSharp|string ToolTip {get; set;} }} | ||
+ | :: | ||
+ | ::Text to display when mousing over the component | ||
:{{CSharp|ResourceValue ToolTipCursor {get; set;} }} | :{{CSharp|ResourceValue ToolTipCursor {get; set;} }} | ||
+ | :: | ||
+ | ::Cursor to display when mousing over the component | ||
:{{CSharp|bool ToolTipCursorMiddle {get; set;} }} | :{{CSharp|bool ToolTipCursorMiddle {get; set;} }} | ||
+ | :: | ||
+ | ::When using a custom cursor, should the cursor be centered (like a crosshair?) | ||
:{{CSharp|ResourceValue ToolTipImage {get; set;} }} | :{{CSharp|ResourceValue ToolTipImage {get; set;} }} | ||
+ | :: | ||
+ | ::Image to display when mousing over the component | ||
:{{CSharp|string ToolTipTitle {get; set;} }} | :{{CSharp|string ToolTipTitle {get; set;} }} | ||
+ | :: | ||
+ | ::Title text to display when mousing over the component | ||
:{{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? | ||
===Methods=== | ===Methods=== | ||
:{{CSharp|GUIComponent Clone(GUIContainer parent {{=}} NULL)}} | :{{CSharp|GUIComponent Clone(GUIContainer parent {{=}} NULL)}} | ||
+ | :: | ||
+ | ::Duplicates this component, optionally under a new parent | ||
__NOTOC____NOEDITSECTION__ | __NOTOC____NOEDITSECTION__ |
Revision as of 14:26, 15 January 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;}
- ComponentLayoutExtended PanelLayoutExtended {get;}
- The component's layout properties if it's in a layout group
- GUIContainer Parent {get; set;}
- Changes the parent within the hierarchy
- 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?
Methods
- GUIComponent Clone(GUIContainer parent = NULL)
- Duplicates this component, optionally under a new parent