-
Notifications
You must be signed in to change notification settings - Fork 0
Control
Home | API by Category | Complete API Index | API Compatibility
| Field | Value |
|---|---|
| Full name | Electron2D.Control |
| Namespace | Electron2D |
| Kind | class |
| Category | UI and Text |
Provides the Electron2D base node for 2D user interface controls.
public class Electron2D.Control : Electron2D.CanvasItemControl inherits from Electron2D.CanvasItem and adds a rectangular
UI area, theme font overrides, GUI input callbacks, mouse filtering and
focus ownership used by Electron2D UI nodes.
Anchors, offsets, minimum-size clamping, focus navigation and the baseline input pipeline are available in this preview. Containers and full widgets are implemented by later UI tasks.
This type is not synchronized. Create and mutate controls on the main scene thread.
This type is available since Electron2D 0.1.0 Preview.
Electron2D.CanvasItemElectron2D.Label
| Member | Kind | Summary |
|---|---|---|
AnchorBottom |
Property | Gets or sets the bottom anchor of this control. |
AnchorLeft |
Property | Gets or sets the left anchor of this control. |
AnchorRight |
Property | Gets or sets the right anchor of this control. |
AnchorTop |
Property | Gets or sets the top anchor of this control. |
ClipContents |
Property | Gets or sets whether this control clips GUI hit-testing for its descendants. |
CustomMinimumSize |
Property | Gets or sets the custom minimum size of this control. |
FocusMode |
Property | Gets or sets how this control can receive focus. |
FocusNeighborBottom |
Property | Gets or sets the explicit focus target used for bottom-direction navigation. |
FocusNeighborLeft |
Property | Gets or sets the explicit focus target used for left-direction navigation. |
FocusNeighborRight |
Property | Gets or sets the explicit focus target used for right-direction navigation. |
FocusNeighborTop |
Property | Gets or sets the explicit focus target used for top-direction navigation. |
FocusNext |
Property | Gets or sets the explicit focus target used when navigating to the next control. |
FocusPrevious |
Property | Gets or sets the explicit focus target used when navigating to the previous control. |
GrowHorizontal |
Property | Gets or sets the horizontal grow direction used when minimum size expands this control. |
GrowVertical |
Property | Gets or sets the vertical grow direction used when minimum size expands this control. |
MouseFilter |
Property | Gets or sets how this control receives and consumes mouse input. |
OffsetBottom |
Property | Gets or sets the bottom offset of this control. |
OffsetLeft |
Property | Gets or sets the left offset of this control. |
OffsetRight |
Property | Gets or sets the right offset of this control. |
OffsetTop |
Property | Gets or sets the top offset of this control. |
Position |
Property | Gets or sets the local position of this control. |
Size |
Property | Gets or sets the local size of this control. |
SizeFlagsHorizontal |
Property | Gets or sets the horizontal size flags used by a parent Electron2D.Container. |
SizeFlagsStretchRatio |
Property | Gets or sets the expansion weight used by a parent Electron2D.Container. |
SizeFlagsVertical |
Property | Gets or sets the vertical size flags used by a parent Electron2D.Container. |
Electron2D.Control() |
Constructor | Initializes a new instance of the Control type. |
AcceptEvent() |
Method | Marks the current GUI input event as handled. |
AddThemeConstantOverride(System.String, System.Int32) |
Method | Adds or replaces an integer theme constant override for this control. |
AddThemeFontOverride(System.String, Electron2D.Font) |
Method | Adds or replaces a font theme override for this control. |
AddThemeFontSizeOverride(System.String, System.Int32) |
Method | Adds or replaces a font size theme override for this control. |
FindNextValidFocus() |
Method | Finds the next focusable control in this viewport. |
FindPrevValidFocus() |
Method | Finds the previous focusable control in this viewport. |
GetCombinedMinimumSize() |
Method | Gets the minimum size used by layout calculations. |
GetGlobalRect() |
Method | Gets the rectangle occupied by this control in root viewport coordinates. |
GetMinimumSize() |
Method | Gets the minimum size requested by this control. |
GetRect() |
Method | Gets the local rectangle occupied by this control. |
GetThemeConstant(System.String) |
Method | Gets an integer theme constant override by name. |
GetThemeFont(System.String) |
Method | Gets a font theme override by name. |
GetThemeFontSize(System.String) |
Method | Gets a font size theme override by name. |
GrabFocus() |
Method | Gives keyboard and gamepad focus to this control. |
HasFocus() |
Method | Checks whether this control currently owns focus in its viewport. |
HasThemeConstantOverride(System.String) |
Method | Reports whether this control has a theme constant override by name. |
ReleaseFocus() |
Method | Releases focus from this control when it currently owns it. |
ResetSize() |
Method | Resets this control size to its combined minimum size. |
SetSize(Electron2D.Vector2) |
Method | Sets the computed size of this control. |
_GetMinimumSize() |
Method | Called to compute the control-specific minimum size. |
_GuiInput(Electron2D.InputEvent) |
Method | Called when a GUI input event is delivered to this control. |
Kind: Property
public System.Single AnchorBottom { get; set; }Gets or sets the bottom anchor of this control.
The final bottom edge is calculated as the parent layout height
multiplied by this value, plus Electron2D.Control.OffsetBottom.
The bottom anchor as a fraction of the parent layout size.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Control.AnchorTopElectron2D.Control.OffsetBottom
Kind: Property
public System.Single AnchorLeft { get; set; }Gets or sets the left anchor of this control.
The final left edge is calculated as the parent layout width multiplied
by this value, plus Electron2D.Control.OffsetLeft.
The left anchor as a fraction of the parent layout size.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Control.AnchorRightElectron2D.Control.OffsetLeft
Kind: Property
public System.Single AnchorRight { get; set; }Gets or sets the right anchor of this control.
The final right edge is calculated as the parent layout width multiplied
by this value, plus Electron2D.Control.OffsetRight.
The right anchor as a fraction of the parent layout size.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Control.AnchorLeftElectron2D.Control.OffsetRight
Kind: Property
public System.Single AnchorTop { get; set; }Gets or sets the top anchor of this control.
The final top edge is calculated as the parent layout height multiplied
by this value, plus Electron2D.Control.OffsetTop.
The top anchor as a fraction of the parent layout size.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Control.AnchorBottomElectron2D.Control.OffsetTop
Kind: Property
public System.Boolean ClipContents { get; set; }Gets or sets whether this control clips GUI hit-testing for its descendants.
The 0.1.0 Preview baseline applies this flag to mouse and touch dispatch. Renderer scissor integration is handled by later rendering backend work.
true to prevent descendants from receiving pointer input outside
this control's global rectangle; otherwise, false.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Control.GetGlobalRectElectron2D.Control.MouseFilter
Kind: Property
public Electron2D.Vector2 CustomMinimumSize { get; set; }Gets or sets the custom minimum size of this control.
This value is combined with Electron2D.Control._GetMinimumSize by
Electron2D.Control.GetMinimumSize.
The user-defined minimum size. Components must be finite and non-negative.
-
System.ArgumentOutOfRangeException: Thrown when a component is negative or not finite.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Control.GetCombinedMinimumSizeElectron2D.Control._GetMinimumSize
Kind: Property
public Electron2D.FocusMode FocusMode { get; set; }Gets or sets how this control can receive focus.
Focus is owned by the nearest Electron2D.Viewport. Only one visible
control inside that viewport can report Electron2D.Control.HasFocus at a
time.
Electron2D.FocusMode.Click and
Electron2D.FocusMode.All allow mouse press events to focus
this control before Electron2D.Control._GuiInput(Electron2D.InputEvent) is called.
The current Electron2D.FocusMode value. The default is
Electron2D.FocusMode.None.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Control.FocusModeElectron2D.Control.GrabFocusElectron2D.Control.HasFocus
Kind: Property
public Electron2D.NodePath FocusNeighborBottom { get; set; }Gets or sets the explicit focus target used for bottom-direction navigation.
Directional focus paths are used by the viewport keyboard navigation baseline when arrow-key navigation is requested.
A Electron2D.NodePath resolved from this control. The default value is
an empty path.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Control.FocusNeighborTop
Kind: Property
public Electron2D.NodePath FocusNeighborLeft { get; set; }Gets or sets the explicit focus target used for left-direction navigation.
Directional focus paths are used by the viewport keyboard navigation baseline when arrow-key navigation is requested.
A Electron2D.NodePath resolved from this control. The default value is
an empty path.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Control.FocusNeighborRight
Kind: Property
public Electron2D.NodePath FocusNeighborRight { get; set; }Gets or sets the explicit focus target used for right-direction navigation.
Directional focus paths are used by the viewport keyboard navigation baseline when arrow-key navigation is requested.
A Electron2D.NodePath resolved from this control. The default value is
an empty path.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Control.FocusNeighborLeft
Kind: Property
public Electron2D.NodePath FocusNeighborTop { get; set; }Gets or sets the explicit focus target used for top-direction navigation.
Directional focus paths are used by the viewport keyboard navigation baseline when arrow-key navigation is requested.
A Electron2D.NodePath resolved from this control. The default value is
an empty path.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Control.FocusNeighborBottom
Kind: Property
public Electron2D.NodePath FocusNext { get; set; }Gets or sets the explicit focus target used when navigating to the next control.
Electron2D.Control.FindNextValidFocus uses this path before falling back to
viewport tree order.
A Electron2D.NodePath resolved from this control. The default value is
an empty path.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Control.FindNextValidFocusElectron2D.Control.FocusPrevious
Kind: Property
public Electron2D.NodePath FocusPrevious { get; set; }Gets or sets the explicit focus target used when navigating to the previous control.
Electron2D.Control.FindPrevValidFocus uses this path before falling back to
viewport tree order.
A Electron2D.NodePath resolved from this control. The default value is
an empty path.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Control.FindPrevValidFocusElectron2D.Control.FocusNext
Kind: Property
public Electron2D.GrowDirection GrowHorizontal { get; set; }Gets or sets the horizontal grow direction used when minimum size expands this control.
This value is used by Electron2D.Control.SetSize(Electron2D.Vector2) and
Electron2D.Control.ResetSize when the requested width is smaller than the
minimum width.
The horizontal Electron2D.GrowDirection. The default is
Electron2D.GrowDirection.End.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Control.GrowVerticalElectron2D.GrowDirection
Kind: Property
public Electron2D.GrowDirection GrowVertical { get; set; }Gets or sets the vertical grow direction used when minimum size expands this control.
This value is used by Electron2D.Control.SetSize(Electron2D.Vector2) and
Electron2D.Control.ResetSize when the requested height is smaller than the
minimum height.
The vertical Electron2D.GrowDirection. The default is
Electron2D.GrowDirection.End.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Control.GrowHorizontalElectron2D.GrowDirection
Kind: Property
public Electron2D.MouseFilter MouseFilter { get; set; }Gets or sets how this control receives and consumes mouse input.
The root Electron2D.Viewport reads this property while routing
Electron2D.InputEventMouse events to Electron2D.Control._GuiInput(Electron2D.InputEvent).
Electron2D.MouseFilter.Stop handles the event after this control
receives it. Electron2D.MouseFilter.Pass lets unhandled events bubble
to the parent control. Electron2D.MouseFilter.Ignore skips this
control for mouse hit-testing.
The current Electron2D.Control.MouseFilter value. The default is
Electron2D.MouseFilter.Stop.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Control.MouseFilterElectron2D.Control._GuiInput(Electron2D.InputEvent)
Kind: Property
public System.Single OffsetBottom { get; set; }Gets or sets the bottom offset of this control.
The bottom offset can be negative when the bottom edge should stay inset from the parent layout rectangle.
The pixel offset applied to Electron2D.Control.AnchorBottom.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Control.AnchorBottomElectron2D.Control.OffsetTop
Kind: Property
public System.Single OffsetLeft { get; set; }Gets or sets the left offset of this control.
Offsets are expressed in the local coordinate space of the parent layout rectangle.
The pixel offset applied to Electron2D.Control.AnchorLeft.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Control.AnchorLeftElectron2D.Control.OffsetRight
Kind: Property
public System.Single OffsetRight { get; set; }Gets or sets the right offset of this control.
The right offset can be negative when the right edge should stay inset from the parent layout rectangle.
The pixel offset applied to Electron2D.Control.AnchorRight.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Control.AnchorRightElectron2D.Control.OffsetLeft
Kind: Property
public System.Single OffsetTop { get; set; }Gets or sets the top offset of this control.
Offsets are expressed in the local coordinate space of the parent layout rectangle.
The pixel offset applied to Electron2D.Control.AnchorTop.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Control.AnchorTopElectron2D.Control.OffsetBottom
Kind: Property
public Electron2D.Vector2 Position { get; set; }Gets or sets the local position of this control.
Setting this property updates offsets while preserving anchors and the
current computed Electron2D.Control.Size.
The top-left corner of the computed local rectangle.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Control.GetGlobalRectElectron2D.Control.GetRect
Kind: Property
public Electron2D.Vector2 Size { get; set; }Gets or sets the local size of this control.
Setting this property is equivalent to calling
Electron2D.Control.SetSize(Electron2D.Vector2).
The computed local rectangle size.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Control.GetCombinedMinimumSizeElectron2D.Control.SetSize(Electron2D.Vector2)
Kind: Property
public Electron2D.SizeFlags SizeFlagsHorizontal { get; set; }Gets or sets the horizontal size flags used by a parent Electron2D.Container.
This property is read by layout containers only. It does not change this control's rectangle until a parent container performs layout.
A Electron2D.SizeFlags value that describes how this control should
use horizontal space allocated by a container.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.ContainerElectron2D.Control.SizeFlagsStretchRatioElectron2D.Control.SizeFlagsVertical
Kind: Property
public System.Single SizeFlagsStretchRatio { get; set; }Gets or sets the expansion weight used by a parent Electron2D.Container.
The value is considered only when the relevant size flag contains
Electron2D.SizeFlags.Expand or Electron2D.SizeFlags.ExpandFill.
The positive finite ratio used when a container distributes free space between expanding children.
-
System.ArgumentOutOfRangeException: Thrown when the value is not finite or is less than or equal to zero.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Control.SizeFlagsHorizontalElectron2D.Control.SizeFlagsVertical
Kind: Property
public Electron2D.SizeFlags SizeFlagsVertical { get; set; }Gets or sets the vertical size flags used by a parent Electron2D.Container.
This property is read by layout containers only. It does not change this control's rectangle until a parent container performs layout.
A Electron2D.SizeFlags value that describes how this control should
use vertical space allocated by a container.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.ContainerElectron2D.Control.SizeFlagsHorizontalElectron2D.Control.SizeFlagsStretchRatio
Kind: Constructor
public Electron2D.Control()Initializes a new instance of the Control type.
The new instance follows the lifetime and validation rules of its declaring type.
This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.
This API is available since Electron2D 0.1.0 Preview.
Electron2D.Control
Kind: Method
public System.Void AcceptEvent()()Marks the current GUI input event as handled.
This method forwards to Electron2D.Viewport.SetInputAsHandled on the
containing viewport. It has no effect when this control is outside a
scene tree or when no input event is currently being dispatched.
This method is not synchronized. Call it on the main scene thread while
handling Electron2D.Control._GuiInput(Electron2D.InputEvent).
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Control._GuiInput(Electron2D.InputEvent)Electron2D.Viewport.SetInputAsHandled
Kind: Method
public System.Void AddThemeConstantOverride(System.String, System.Int32)(System.String name, System.Int32 constant)Adds or replaces an integer theme constant override for this control.
The 0.1.0 Preview UI containers use this baseline for spacing and margins before full theme resources are introduced.
-
name: The theme constant name, for exampleseparationormargin_left. -
constant: The non-negative constant value in pixels.
-
System.ArgumentException: Thrown whennameisnull, empty or whitespace. -
System.ArgumentOutOfRangeException: Thrown whenconstantis less than zero.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.ContainerElectron2D.Control.GetThemeConstant(System.String)Electron2D.Control.HasThemeConstantOverride(System.String)
Kind: Method
public System.Void AddThemeFontOverride(System.String, Electron2D.Font)(System.String name, Electron2D.Font font)Adds or replaces a font theme override for this control.
This method follows the validation and lifetime rules of its declaring type.
-
name: The theme font name, for examplefont. -
font: The font resource to use.
-
System.ArgumentException: Thrown whennameisnull, empty or whitespace. -
System.ArgumentNullException: Thrown whenfontisnull.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Control
Kind: Method
public System.Void AddThemeFontSizeOverride(System.String, System.Int32)(System.String name, System.Int32 fontSize)Adds or replaces a font size theme override for this control.
This method follows the validation and lifetime rules of its declaring type.
-
name: The theme font size name, for examplefont_size. -
fontSize: The font size in pixels. It must be greater than zero.
-
System.ArgumentException: Thrown whennameisnull, empty or whitespace. -
System.ArgumentOutOfRangeException: Thrown whenfontSizeis less than or equal to zero.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Control
Kind: Method
public Electron2D.Control FindNextValidFocus()()Finds the next focusable control in this viewport.
Controls are valid focus targets only when they are inside the same
Electron2D.Viewport, visible in tree and have Electron2D.Control.FocusMode
set to a value other than Electron2D.FocusMode.None.
The explicit Electron2D.Control.FocusNext target when it is valid; otherwise,
the next focusable control in viewport tree order, or null when no
valid control exists.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Control.FindPrevValidFocusElectron2D.Control.FocusNext
Kind: Method
public Electron2D.Control FindPrevValidFocus()()Finds the previous focusable control in this viewport.
Controls are valid focus targets only when they are inside the same
Electron2D.Viewport, visible in tree and have Electron2D.Control.FocusMode
set to a value other than Electron2D.FocusMode.None.
The explicit Electron2D.Control.FocusPrevious target when it is valid;
otherwise, the previous focusable control in viewport tree order, or
null when no valid control exists.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Control.FindNextValidFocusElectron2D.Control.FocusPrevious
Kind: Method
public Electron2D.Vector2 GetCombinedMinimumSize()()Gets the minimum size used by layout calculations.
In the 0.1.0 Preview layout baseline this is the same value as
Electron2D.Control.GetMinimumSize. Future container and theme work can add
style contributions without changing the public call site.
The combined minimum size for this control.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Control.GetMinimumSizeElectron2D.Control.SetSize(Electron2D.Vector2)
Kind: Method
public Electron2D.Rect2 GetGlobalRect()()Gets the rectangle occupied by this control in root viewport coordinates.
Parent Electron2D.Control positions are accumulated. A
Electron2D.Node2D parent applies its global transform to the local
position baseline.
A Electron2D.Rect2 containing the global position and computed
Electron2D.Control.Size.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Control.GetRectElectron2D.Control.Position
Kind: Method
public Electron2D.Vector2 GetMinimumSize()()Gets the minimum size requested by this control.
This method is the minimum-size baseline used before container and theme contributions are introduced.
The component-wise maximum of Electron2D.Control.CustomMinimumSize and
Electron2D.Control._GetMinimumSize.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Control.GetCombinedMinimumSizeElectron2D.Control._GetMinimumSize
Kind: Method
public Electron2D.Rect2 GetRect()()Gets the local rectangle occupied by this control.
The rectangle is computed from anchors and offsets against the current parent layout size.
A Electron2D.Rect2 containing Electron2D.Control.Position and
Electron2D.Control.Size.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Control.AnchorLeftElectron2D.Control.GetGlobalRect
Kind: Method
public System.Int32 GetThemeConstant(System.String)(System.String name)Gets an integer theme constant override by name.
Containers use this method for spacing and margin values. Missing values deliberately resolve to zero so a caller can supply its own default.
-
name: The theme constant name.
The overridden constant value, or 0 when no override exists.
-
System.ArgumentException: Thrown whennameisnull, empty or whitespace.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Control.AddThemeConstantOverride(System.String,System.Int32)Electron2D.Control.HasThemeConstantOverride(System.String)
Kind: Method
public Electron2D.Font GetThemeFont(System.String)(System.String name)Gets a font theme override by name.
This method follows the validation and lifetime rules of its declaring type.
-
name: The theme font name.
The overridden font, or null when no override exists.
-
System.ArgumentException: Thrown whennameisnull, empty or whitespace.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Control
Kind: Method
public System.Int32 GetThemeFontSize(System.String)(System.String name)Gets a font size theme override by name.
This method follows the validation and lifetime rules of its declaring type.
-
name: The theme font size name.
The overridden font size in pixels, or 16 when no override exists.
-
System.ArgumentException: Thrown whennameisnull, empty or whitespace.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Control
Kind: Method
public System.Void GrabFocus()()Gives keyboard and gamepad focus to this control.
The control must be inside a scene tree, visible in that tree and have
Electron2D.Control.FocusMode set to a value other than
Electron2D.FocusMode.None. If any of those conditions is
not met, the call has no effect.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Control.FocusModeElectron2D.Control.HasFocusElectron2D.Control.ReleaseFocus
Kind: Method
public System.Boolean HasFocus()()Checks whether this control currently owns focus in its viewport.
Hidden controls and controls outside a scene tree do not report focus, even if they were the last control selected before becoming invalid for focus dispatch.
true when this control is the focused visible control in its
viewport; otherwise, false.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Control.GrabFocusElectron2D.Control.ReleaseFocus
Kind: Method
public System.Boolean HasThemeConstantOverride(System.String)(System.String name)Reports whether this control has a theme constant override by name.
This method lets container code distinguish a missing value from an explicit zero value.
-
name: The theme constant name.
true when an override exists; otherwise, false.
-
System.ArgumentException: Thrown whennameisnull, empty or whitespace.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Control.AddThemeConstantOverride(System.String,System.Int32)Electron2D.Control.GetThemeConstant(System.String)
Kind: Method
public System.Void ReleaseFocus()()Releases focus from this control when it currently owns it.
Calling this method on a control that does not currently own focus is a no-op.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Control.GrabFocusElectron2D.Control.HasFocus
Kind: Method
public System.Void ResetSize()()Resets this control size to its combined minimum size.
The current Electron2D.Control.GrowHorizontal and Electron2D.Control.GrowVertical
values decide whether the beginning side, ending side or both sides move
while the rectangle changes.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Control.GetCombinedMinimumSizeElectron2D.Control.SetSize(Electron2D.Vector2)
Kind: Method
public System.Void SetSize(Electron2D.Vector2)(Electron2D.Vector2 size)Sets the computed size of this control.
If size is smaller than
Electron2D.Control.GetCombinedMinimumSize, this method grows the final
rectangle according to Electron2D.Control.GrowHorizontal and
Electron2D.Control.GrowVertical.
-
size: The requested size in local coordinates.
-
System.ArgumentOutOfRangeException: Thrown when a component ofsizeis negative or not finite.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Control.ResetSizeElectron2D.Control.Size
Kind: Method
public Electron2D.Vector2 _GetMinimumSize()()Called to compute the control-specific minimum size.
Derived controls can override this method to reserve space for text,
textures or other content. Negative or non-finite components returned
by an override are treated as 0.
User code should normally call Electron2D.Control.GetMinimumSize or
Electron2D.Control.GetCombinedMinimumSize instead of calling this method
directly.
The minimum size requested by this control implementation.
This method is not synchronized. It is called on the main scene thread during layout calculations.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Control.CustomMinimumSizeElectron2D.Control.GetMinimumSize
Kind: Method
public System.Void _GuiInput(Electron2D.InputEvent)(Electron2D.InputEvent inputEvent)Called when a GUI input event is delivered to this control.
Mouse events reach this method when the event position falls inside the
control rectangle and Electron2D.Control.MouseFilter is not
Electron2D.MouseFilter.Ignore. Non-mouse events reach only the
currently focused control.
Call Electron2D.Control.AcceptEvent to stop further propagation of the
current event.
-
inputEvent: The input event delivered by the containingElectron2D.Viewport.
This method is not synchronized. It is called on the main scene thread during input dispatch.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Control.AcceptEventElectron2D.Control.FocusModeElectron2D.Control.MouseFilter
Electron2D 0.1.0 Preview API reference. Generated from 175 public runtime types.