Repository navigation
Control
Home | API by Category | Complete API Index | API Status
| Field | Value |
|---|---|
| Full name | Electron2D.Control |
| Namespace | Electron2D |
| Kind | class |
| Category | API Scene |
A canvas item with a rectangular layout and a pivot-based transform.
public class Electron2D.ControlAnchors and offsets resolve against the direct canvas parent's rectangle or the viewport. The root viewport routes pointer and focused keyboard input to controls. Container flags drive concrete layout; typed themes supply inherited appearance values and local overrides.
Inherits: CanvasItem
| Member | Kind | Summary |
|---|---|---|
public const System.Int32 NotificationFocusEnter = 43 |
constant | This control gained keyboard focus, before Electron2D.Control.FocusEntered. |
public const System.Int32 NotificationFocusExit = 44 |
constant | This control lost keyboard focus, before Electron2D.Control.FocusExited. |
public const System.Int32 NotificationLayoutDirectionChanged = 49 |
constant | Identifies a layout-direction change propagated through the scene subtree. |
public const System.Int32 NotificationMouseEnter = 41 |
constant | Pointer entered this control or a reachable child control. |
public const System.Int32 NotificationMouseEnterSelf = 60 |
constant | This control became the directly hovered control. |
public const System.Int32 NotificationMouseExit = 42 |
constant | Pointer exited this control and all reachable child controls. |
public const System.Int32 NotificationMouseExitSelf = 61 |
constant | This control stopped being the directly hovered control. |
public const System.Int32 NotificationResized = 40 |
constant | Identifies a size change delivered after the new rectangle and transform are committed. |
public const System.Int32 NotificationScrollBegin = 47 |
constant | A touch-scroll gesture crossed its deadzone in an ancestor scroll container. |
public const System.Int32 NotificationScrollEnd = 48 |
constant | A touch-scroll gesture or its inertial continuation ended in an ancestor scroll container. |
public const System.Int32 NotificationThemeChanged = 45 |
constant | Identifies a theme refresh before cached values are invalidated and dependent state is updated. |
public Control() |
constructor | Creates a detached control with zero size, zero anchors and identity transform. |
public event System.Action FocusEntered |
event | Occurs after Electron2D.Control.NotificationFocusEnter when this control becomes the keyboard input target. |
public event System.Action FocusExited |
event | Occurs after Electron2D.Control.NotificationFocusExit when this control loses keyboard focus. |
public event System.Action<Electron2D.InputEvent> GUIInput |
event | Receives a temporary control-local input event after Electron2D.Control.OnGUIInput(Electron2D.InputEvent). |
public event System.Action<System.String, Electron2D.Vector2i> IMECompositionChanged |
event | Occurs when the focused control's uncommitted IME composition changes. |
public event System.Action MaximumSizeChanged |
event | Occurs after a changed maximum size has been applied in the scene tree. |
public event System.Action MinimumSizeChanged |
event | Occurs after a changed minimum size has been applied in the scene tree. |
public event System.Action MouseEntered |
event | Occurs when the pointer enters this control or its reachable child area. |
public event System.Action MouseExited |
event | Occurs when the pointer leaves this control and its reachable child area. |
public event System.Action Resized |
event | Occurs after a size change while attached to the scene tree. |
public event System.Action SizeFlagsChanged |
event | Occurs after an actual size flag or stretch ratio change. |
public event System.Action<System.String> TextInput |
event | Occurs when the native input method commits one complete text string to this focused control. |
public event System.Action ThemeChanged |
event | Occurs during a theme refresh, before the previous lookup cache is cleared. |
public System.Void AcceptEvent() |
method | Marks the current GUI event handled, preventing further delivery. |
public System.Void AddThemeColorOverride(System.String name, Electron2D.Color color) |
method | Stores a local color override and refreshes this node's theme state. |
public System.Void AddThemeConstantOverride(System.String name, System.Int32 constant) |
method | Stores a local constant override and refreshes this node's theme state. |
public System.Void AddThemeFontOverride(System.String name, Electron2D.Font font) |
method | Stores a local font override and refreshes this node's theme state. |
public System.Void AddThemeFontSizeOverride(System.String name, System.Int32 fontSize) |
method | Stores a local font size override and refreshes this node's theme state. |
public System.Void AddThemeIconOverride(System.String name, Electron2D.Texture texture) |
method | Stores a local icon override and refreshes this node's theme state. |
public System.Void AddThemeStyleBoxOverride(System.String name, Electron2D.StyleBox styleBox) |
method | Stores a local style box override and refreshes this node's theme state. |
public System.Void BeginBulkThemeOverride() |
method | Suppresses local override notifications until EndBulkThemeOverride. Repeated begins do not nest. |
public System.Boolean CanDropData(Electron2D.Vector2 atPosition, Electron2D.DragPayload payload) |
method | Tests whether this control accepts a typed payload at a local position. |
protected override System.Func<Electron2D.Node> CreateSceneInstanceFactory() |
method | |
protected override System.Void Dispose(System.Boolean disposing) |
method | |
public System.Void DropData(Electron2D.Vector2 atPosition, Electron2D.DragPayload payload) |
method | Delivers an accepted payload to this control. |
public System.Void EndBulkThemeOverride() |
method | Ends local override batching and emits one refresh while attached, even when no values changed. |
public Electron2D.Control FindNextValidFocus() |
method | Finds the next visible keyboard-navigable control, wrapping within the viewport. |
public Electron2D.Control FindPrevValidFocus() |
method | Finds the previous visible keyboard-navigable control, wrapping within the viewport. |
public Electron2D.Control FindValidFocusNeighbor(Electron2D.Side side) |
method | Finds a visible focus target in one direction, checking explicit paths first. |
public System.Void ForceDrag(Electron2D.DragPayload payload, Electron2D.Control preview = null) |
method | Starts a drag immediately, optionally using a detached preview control. |
public System.Single GetAnchor(Electron2D.Side side) |
method | Gets the anchor for a rectangle side. |
public Electron2D.Vector2 GetBegin() |
method | Gets the left and top offsets as a pair. |
public Electron2D.Vector2 GetBoundMinimumSize() |
method | Gets the combined minimum capped by each enabled maximum component. |
public Electron2D.Vector2 GetCombinedMaximumSize() |
method | Gets the effective maximum from intrinsic, custom and propagated bounds. |
public Electron2D.Vector2 GetCombinedMinimumSize() |
method | Gets the componentwise maximum of the intrinsic minimum, custom minimum, and zero. |
public Electron2D.Vector2 GetCombinedPivotOffset() |
method | Gets the absolute pivot plus its current size-relative component. |
public Electron2D.CursorShape GetCursorShape(Electron2D.Vector2 atPosition = default) |
method | Returns the cursor shape for a position in this control's local coordinates. |
public Electron2D.DragPayload GetDragData(Electron2D.Vector2 atPosition) |
method | Produces a typed payload for a drag beginning at a control-local position. |
public Electron2D.Vector2 GetEnd() |
method | Gets the right and bottom offsets as a pair. |
public Electron2D.FocusMode GetFocusModeWithOverride() |
method | Returns the focus mode after applying the inherited recursive policy. |
public System.String GetFocusNeighbor(Electron2D.Side side) |
method | Gets the relative path for a directional focus neighbor. |
public Electron2D.Rect2 GetGlobalRect() |
method | Returns the unrotated global rectangle after pivot and scale. |
public Electron2D.Vector2 GetMaximumSize() |
method | Gets the intrinsic maximum size, with negative components meaning unbounded. |
public Electron2D.Vector2 GetMinimumSize() |
method | Gets the intrinsic minimum size supplied by this control type. |
public Electron2D.MouseFilter GetMouseFilterWithOverride() |
method | Returns the pointer filter after applying the inherited recursive policy. |
public System.Single GetOffset(Electron2D.Side side) |
method | Gets the offset for a rectangle side. |
public Electron2D.Vector2 GetParentAreaSize() |
method | Returns the size used to resolve anchors, or zero while detached. |
public Electron2D.Control GetParentControl() |
method | Returns the direct parent when it is a Control. |
protected override System.Collections.Generic.IEnumerable<Electron2D.PropertyDescriptor> GetPropertyDescriptors() |
method | |
public Electron2D.Rect2 GetRect() |
method | Returns the unrotated local rectangle after pivot and scale. |
public Electron2D.Vector2 GetScreenPosition() |
method | Returns this control's local origin in its popup host's screen coordinate space. |
public Electron2D.Color GetThemeColor(System.String name, System.String themeType = "") |
method | Gets a typed theme color using local override, branch themes, native defaults and universal fallback. |
public System.Int32 GetThemeConstant(System.String name, System.String themeType = "") |
method | Gets a typed theme constant using local override, branch themes, native defaults and universal fallback. |
public System.Single GetThemeDefaultBaseScale() |
method | Gets the first positive branch/default theme scale, or the universal scale fallback. |
public Electron2D.Font GetThemeDefaultFont() |
method | Gets the first nonnull branch/default theme font, or the universal font fallback. |
public System.Int32 GetThemeDefaultFontSize() |
method | Gets the first positive branch/default font-size value, or the universal integer fallback. |
public Electron2D.Font GetThemeFont(System.String name, System.String themeType = "") |
method | Gets a typed theme font using local override, branch themes, native defaults and universal fallback. |
public System.Int32 GetThemeFontSize(System.String name, System.String themeType = "") |
method | Gets a typed theme font size using local override, branch themes, native defaults and universal fallback. |
public Electron2D.Texture GetThemeIcon(System.String name, System.String themeType = "") |
method | Gets a typed theme icon using local override, branch themes, native defaults and universal fallback. |
public Electron2D.StyleBox GetThemeStyleBox(System.String name, System.String themeType = "") |
method | Gets a typed theme style box using local override, branch themes, native defaults and universal fallback. |
public System.String GetTooltip(Electron2D.Vector2 atPosition = default) |
method | Gets the untranslated tooltip for a local position through the overridable tooltip hook. |
public override Electron2D.Transform GetTransform() |
method | |
public System.Void GrabClickFocus() |
method | Transfers an existing pointer-button capture to this control at the deferred boundary. |
public System.Void GrabFocus(System.Boolean hideFocus = false) |
method | Requests keyboard focus for this visible control in its viewport. Embedded focus also focuses containing viewport controls. |
public System.Boolean HasFocus(System.Boolean ignoreHiddenFocus = false) |
method | Returns whether this control has keyboard focus. |
protected virtual System.Boolean HasPoint(Electron2D.Vector2 point) |
method | Tests a point in this control's local rectangle. Override for a custom hit shape. |
public System.Boolean HasThemeColor(System.String name, System.String themeType = "") |
method | Tests whether an override or a branch/default theme provides a color, excluding universal fallback. |
public System.Boolean HasThemeColorOverride(System.String name) |
method | Tests for a local color override, without inherited lookup. |
public System.Boolean HasThemeConstant(System.String name, System.String themeType = "") |
method | Tests whether an override or a branch/default theme provides a constant, excluding universal fallback. |
public System.Boolean HasThemeConstantOverride(System.String name) |
method | Tests for a local constant override, without inherited lookup. |
public System.Boolean HasThemeFont(System.String name, System.String themeType = "") |
method | Tests whether an override or a branch/default theme provides a font, excluding universal fallback. |
public System.Boolean HasThemeFontOverride(System.String name) |
method | Tests for a local font override, without inherited lookup. |
public System.Boolean HasThemeFontSize(System.String name, System.String themeType = "") |
method | Tests whether an override or a branch/default theme provides a font size, excluding universal fallback. |
public System.Boolean HasThemeFontSizeOverride(System.String name) |
method | Tests for a local font size override, without inherited lookup. |
public System.Boolean HasThemeIcon(System.String name, System.String themeType = "") |
method | Tests whether an override or a branch/default theme provides a icon, excluding universal fallback. |
public System.Boolean HasThemeIconOverride(System.String name) |
method | Tests for a local icon override, without inherited lookup. |
public System.Boolean HasThemeStyleBox(System.String name, System.String themeType = "") |
method | Tests whether an override or a branch/default theme provides a style box, excluding universal fallback. |
public System.Boolean HasThemeStyleBoxOverride(System.String name) |
method | Tests for a local style box override, without inherited lookup. |
public System.Boolean IsDragSuccessful() |
method | Reports the result of the most recently completed GUI drag in this viewport. |
public System.Boolean IsLayoutRTL() |
method | Reports whether this control currently resolves its layout from right to left. |
protected virtual System.Boolean OnCanDropData(Electron2D.Vector2 atPosition, Electron2D.DragPayload payload) |
method | Tests a potential drop target; false rejects it. |
protected virtual System.Void OnDropData(Electron2D.Vector2 atPosition, Electron2D.DragPayload payload) |
method | Consumes an accepted drop after the target test succeeds. |
protected virtual System.Void OnGUIInput(Electron2D.InputEvent inputEvent) |
method | Processes a temporary control-local event before Electron2D.Control.GUIInput subscribers. |
protected virtual Electron2D.CursorShape OnGetCursorShape(Electron2D.Vector2 atPosition) |
method | Chooses a cursor for a control-local position; defaults to Electron2D.Control.MouseDefaultCursorShape. |
protected virtual Electron2D.DragPayload OnGetDragData(Electron2D.Vector2 atPosition) |
method | Produces drag data for an automatic pointer drag; null rejects the attempt. |
protected virtual Electron2D.Vector2 OnGetMaximumSize() |
method | Supplies the intrinsic maximum size; the base control is unbounded. |
protected virtual Electron2D.Vector2 OnGetMinimumSize() |
method | Supplies the intrinsic minimum size; the base control has none. |
protected virtual System.String OnGetTooltip(Electron2D.Vector2 atPosition) |
method | Supplies untranslated tooltip text for a local control position. |
protected virtual Electron2D.NodeAutoTranslateMode OnGetTooltipAutoTranslateModeAt(Electron2D.Vector2 atPosition) |
method | Supplies the default tooltip label's translation policy at a local position. |
protected virtual System.Void OnIMECompositionChanged(System.String text, Electron2D.Vector2i selection) |
method | Receives an uncommitted composition update before Electron2D.Control.IMECompositionChanged subscribers. |
protected virtual Electron2D.Control OnMakeCustomTooltip(System.String forText) |
method | Creates an optional custom tooltip control. |
protected override System.Void OnNotification(System.Int32 what) |
method | |
protected virtual Electron2D.TextBIDIRange[] OnStructuredTextParser(System.Collections.Generic.IReadOnlyList<System.String> options, System.String text) |
method | Supplies independent bidirectional contexts when a text control selects a custom parser. |
protected virtual System.Void OnTextInput(System.String text) |
method | Receives one committed text string before Electron2D.Control.TextInput subscribers. |
public System.Void ReleaseFocus() |
method | Releases keyboard focus if held by this control. |
public System.Void RemoveThemeColorOverride(System.String name) |
method | Removes a local color override and refreshes even when the key was absent. |
public System.Void RemoveThemeConstantOverride(System.String name) |
method | Removes a local constant override and refreshes even when the key was absent. |
public System.Void RemoveThemeFontOverride(System.String name) |
method | Removes a local font override and refreshes even when the key was absent. |
public System.Void RemoveThemeFontSizeOverride(System.String name) |
method | Removes a local font size override and refreshes even when the key was absent. |
public System.Void RemoveThemeIconOverride(System.String name) |
method | Removes a local icon override and refreshes even when the key was absent. |
public System.Void RemoveThemeStyleBoxOverride(System.String name) |
method | Removes a local style box override and refreshes even when the key was absent. |
public override System.Void Reparent(Electron2D.Node newParent, System.Boolean keepGlobalTransform = true) |
method | Moves this control under another node, preserving its global position by default. |
public System.Void ResetSize() |
method | Resets size to its effective minimum, capped by any maximum. |
public System.Void SetAnchor(Electron2D.Side side, System.Single anchor, System.Boolean keepOffset = false, System.Boolean pushOppositeAnchor = true) |
method | Sets an anchor, optionally preserving its offset and moving the opposite anchor. |
public System.Void SetAnchorAndOffset(Electron2D.Side side, System.Single anchor, System.Single offset, System.Boolean pushOppositeAnchor = false) |
method | Sets one anchor and its local offset in sequence. |
public System.Void SetAnchorsAndOffsetsPreset(Electron2D.LayoutPreset preset, Electron2D.LayoutPresetMode resizeMode = MinSize, System.Int32 margin = 0) |
method | Applies an anchor preset followed by the matching offset preset. |
public System.Void SetAnchorsPreset(Electron2D.LayoutPreset preset, System.Boolean keepOffsets = false) |
method | Arranges all four anchors in a standard layout preset. |
public System.Void SetBegin(Electron2D.Vector2 position) |
method | Sets the left and top offsets together and resolves the rectangle once. |
public System.Void SetDragForwarding(System.Func<Electron2D.Vector2, Electron2D.DragPayload> getData, System.Func<Electron2D.Vector2, Electron2D.DragPayload, System.Boolean> canDrop, System.Action<Electron2D.Vector2, Electron2D.DragPayload> drop) |
method | Sets typed delegates that replace the three virtual drag hooks when supplied. |
public System.Void SetDragPreview(Electron2D.Control preview) |
method | Replaces the visual preview of the active or preparing drag. |
public System.Void SetEnd(Electron2D.Vector2 position) |
method | Sets the right and bottom offsets together and resolves the rectangle once. |
public System.Void SetFocusNeighbor(Electron2D.Side side, System.String neighbor) |
method | Sets the relative path for a directional focus neighbor. |
public System.Void SetGlobalPosition(Electron2D.Vector2 position, System.Boolean keepOffsets = false) |
method | Sets physical global position while keeping the local pivot transform. |
public System.Void SetOffset(Electron2D.Side side, System.Single offset) |
method | Sets the offset for a rectangle side and resolves the rectangle. |
public System.Void SetOffsetsPreset(Electron2D.LayoutPreset preset, Electron2D.LayoutPresetMode resizeMode = MinSize, System.Int32 margin = 0) |
method | Places this control at a standard preset without changing its anchors. |
public System.Void SetPosition(Electron2D.Vector2 position, System.Boolean keepOffsets = false) |
method | Sets physical local position by changing offsets or, when requested, anchors. |
public System.Void SetSize(Electron2D.Vector2 size, System.Boolean keepOffsets = false) |
method | Sets size within its minimum and maximum bounds, changing offsets or anchors. |
public System.Void UpdateMaximumSize() |
method | Requests a coalesced maximum-size update, invalidates child allocation caches and refreshes child bounds. |
public System.Void UpdateMinimumSize() |
method | Requests a coalesced minimum-size update after an intrinsic minimum changes. |
public System.Void WarpMouse(Electron2D.Vector2 position) |
method | Requests a native pointer move to a finite control-local position. |
public System.Single AnchorBottom { get; set; } |
property | Gets or sets the bottom anchor fraction. |
public System.Single AnchorLeft { get; set; } |
property | Gets or sets the left anchor fraction. |
public System.Single AnchorRight { get; set; } |
property | Gets or sets the right anchor fraction. |
public System.Single AnchorTop { get; set; } |
property | Gets or sets the top anchor fraction. |
public System.Boolean ClipContents { get; set; } |
property | Gets or sets whether this control clips its canvas descendants and pointer targeting to its rectangle. |
public Electron2D.Vector2 CustomMaximumSize { get; set; } |
property | Gets or sets the finite caller-supplied maximum size; a negative component disables its bound. |
public Electron2D.Vector2 CustomMinimumSize { get; set; } |
property | Gets or sets the caller-supplied lower bound for layout size. |
public Electron2D.RecursiveBehavior FocusBehaviorRecursive { get; set; } |
property | Gets or sets the inherited keyboard focus policy for this control and its descendants. |
public Electron2D.FocusMode FocusMode { get; set; } |
property | Gets or sets whether this control can become the keyboard input target. |
public System.String FocusNeighborBottom { get; set; } |
property | Gets or sets the relative path used before automatic downward focus search. |
public System.String FocusNeighborLeft { get; set; } |
property | Gets or sets the relative path used before automatic leftward focus search. |
public System.String FocusNeighborRight { get; set; } |
property | Gets or sets the relative path used before automatic rightward focus search. |
public System.String FocusNeighborTop { get; set; } |
property | Gets or sets the relative path used before automatic upward focus search. |
public System.String FocusNext { get; set; } |
property | Gets or sets the relative path used before automatic forward focus traversal. |
public System.String FocusPrevious { get; set; } |
property | Gets or sets the relative path used before automatic backward focus traversal. |
public Electron2D.Vector2 GlobalPosition { get; set; } |
property | Gets or sets the transformed origin in global canvas coordinates. |
public Electron2D.GrowDirection GrowHorizontal { get; set; } |
property | Gets or sets which horizontal edge stays fixed when the minimum width grows. |
public Electron2D.GrowDirection GrowVertical { get; set; } |
property | Gets or sets which vertical edge stays fixed when the minimum height grows. |
public Electron2D.LayoutDirection LayoutDirection { get; set; } |
property | Gets or sets the horizontal layout direction policy. |
public System.Boolean LocalizeNumeralSystem { get; set; } |
property | Gets or sets using the locale's numeral system for generated numeric control text. |
public Electron2D.RecursiveBehavior MouseBehaviorRecursive { get; set; } |
property | Gets or sets the inherited pointer input policy for this control and its descendants. |
public Electron2D.CursorShape MouseDefaultCursorShape { get; set; } |
property | Gets or sets the cursor shape used when this control is hovered. |
public Electron2D.MouseFilter MouseFilter { get; set; } |
property | Gets or sets how pointer input reaches this control. |
public System.Boolean MouseForcePassScrollEvents { get; set; } |
property | Lets wheel input continue to the parent even when Electron2D.Control.MouseFilter is Stop. |
public System.Single OffsetBottom { get; set; } |
property | Gets or sets the bottom offset. |
public System.Single OffsetLeft { get; set; } |
property | Gets or sets the left offset. |
public System.Single OffsetRight { get; set; } |
property | Gets or sets the right offset. |
public System.Single OffsetTop { get; set; } |
property | Gets or sets the top offset. |
public System.Boolean OffsetTransformEnabled { get; set; } |
property | Gets or sets whether the additional transform affects this control. |
public Electron2D.Vector2 OffsetTransformPivot { get; set; } |
property | Gets or sets the absolute pivot of the additional transform. |
public Electron2D.Vector2 OffsetTransformPivotRatio { get; set; } |
property | Gets or sets the size-relative pivot of the additional transform. |
public Electron2D.Vector2 OffsetTransformPosition { get; set; } |
property | Gets or sets the absolute translation of the additional transform. |
public Electron2D.Vector2 OffsetTransformPositionRatio { get; set; } |
property | Gets or sets the size-relative translation of the additional transform. |
public System.Single OffsetTransformRotation { get; set; } |
property | Gets or sets the rotation in radians of the additional transform. |
public Electron2D.Vector2 OffsetTransformScale { get; set; } |
property | Gets or sets the componentwise scale of the additional transform. |
public System.Boolean OffsetTransformVisualOnly { get; set; } |
property | Gets or sets whether the additional transform affects drawing only. |
public Electron2D.Vector2 PivotOffset { get; set; } |
property | Gets or sets the point around which local rotation and scale are applied. |
public Electron2D.Vector2 PivotOffsetRatio { get; set; } |
property | Gets or sets the portion of the current size added to PivotOffset. |
public Electron2D.Vector2 Position { get; set; } |
property | Gets or sets the local rectangle's upper-left point. |
public System.Boolean PropagateMaximumSize { get; set; } |
property | Gets or sets whether this control's maximum size constrains direct child controls. |
public System.Single Rotation { get; set; } |
property | Gets or sets the local rotation in radians around PivotOffset. |
public System.Single RotationDegrees { get; set; } |
property | Gets or sets the local rotation in degrees. |
public Electron2D.Vector2 Scale { get; set; } |
property | Gets or sets the local scale around PivotOffset. |
public Electron2D.Node ShortcutContext { get; set; } |
property | Gets or sets the weak scene context that restricts this control's shortcuts. |
public Electron2D.Vector2 Size { get; set; } |
property | Gets or sets the local rectangle's size before rotation and scale. |
public Electron2D.Control.SizeFlags SizeFlagsHorizontal { get; set; } |
property | Gets or sets the horizontal container sizing/alignment bits. |
public System.Single SizeFlagsStretchRatio { get; set; } |
property | Gets or sets the finite weighted expansion ratio. |
public Electron2D.Control.SizeFlags SizeFlagsVertical { get; set; } |
property | Gets or sets the vertical container sizing/alignment bits. |
public Electron2D.Theme Theme { get; set; } |
property | Gets or sets the borrowed theme supplying this branch's typed appearance values. |
public System.String ThemeTypeVariation { get; set; } |
property | Gets or sets the variation name used before this node's native type hierarchy. |
public Electron2D.NodeAutoTranslateMode TooltipAutoTranslateMode { get; set; } |
property | Gets or sets automatic translation of the default tooltip label. |
public System.String TooltipText { get; set; } |
property | Gets or sets the untranslated tooltip text. |
public System.String TranslationContext { get; set; } |
property | Gets or sets the default context used by this control's automatic message translation. |
Kind: constant
public const System.Int32 NotificationFocusEnter = 43This control gained keyboard focus, before Electron2D.Control.FocusEntered.
Kind: constant
public const System.Int32 NotificationFocusExit = 44This control lost keyboard focus, before Electron2D.Control.FocusExited.
Kind: constant
public const System.Int32 NotificationLayoutDirectionChanged = 49Identifies a layout-direction change propagated through the scene subtree.
Kind: constant
public const System.Int32 NotificationMouseEnter = 41Pointer entered this control or a reachable child control.
Kind: constant
public const System.Int32 NotificationMouseEnterSelf = 60This control became the directly hovered control.
Kind: constant
public const System.Int32 NotificationMouseExit = 42Pointer exited this control and all reachable child controls.
Kind: constant
public const System.Int32 NotificationMouseExitSelf = 61This control stopped being the directly hovered control.
Kind: constant
public const System.Int32 NotificationResized = 40Identifies a size change delivered after the new rectangle and transform are committed.
Kind: constant
public const System.Int32 NotificationScrollBegin = 47A touch-scroll gesture crossed its deadzone in an ancestor scroll container.
Kind: constant
public const System.Int32 NotificationScrollEnd = 48A touch-scroll gesture or its inertial continuation ended in an ancestor scroll container.
Kind: constant
public const System.Int32 NotificationThemeChanged = 45Identifies a theme refresh before cached values are invalidated and dependent state is updated.
Kind: constructor
public Control()Creates a detached control with zero size, zero anchors and identity transform.
Kind: event
public event System.Action FocusEnteredOccurs after Electron2D.Control.NotificationFocusEnter when this control becomes the keyboard input target.
Kind: event
public event System.Action FocusExitedOccurs after Electron2D.Control.NotificationFocusExit when this control loses keyboard focus.
Kind: event
public event System.Action<Electron2D.InputEvent> GUIInputReceives a temporary control-local input event after Electron2D.Control.OnGUIInput(Electron2D.InputEvent).
The event is borrowed for the duration of the callback. Pointer input targets one hit control, then may bubble to parent controls; keyboard input targets only the focused control.
Kind: event
public event System.Action<System.String, Electron2D.Vector2i> IMECompositionChangedOccurs when the focused control's uncommitted IME composition changes.
The selection uses Unicode-codepoint start and length, matching the current DisplayServer state.
Kind: event
public event System.Action MaximumSizeChangedOccurs after a changed maximum size has been applied in the scene tree.
Kind: event
public event System.Action MinimumSizeChangedOccurs after a changed minimum size has been applied in the scene tree.
Kind: event
public event System.Action MouseEnteredOccurs when the pointer enters this control or its reachable child area.
Raised after Electron2D.Control.NotificationMouseEnter on the scene owner thread. Ancestors enter before descendants.
Kind: event
public event System.Action MouseExitedOccurs when the pointer leaves this control and its reachable child area.
Raised after Electron2D.Control.NotificationMouseExit on the scene owner thread. Descendants exit before ancestors.
Kind: event
public event System.Action ResizedOccurs after a size change while attached to the scene tree.
Kind: event
public event System.Action SizeFlagsChangedOccurs after an actual size flag or stretch ratio change.
Container listeners coalesce the next layout pass. State is committed when a subscriber throws.
Kind: event
public event System.Action<System.String> TextInputOccurs when the native input method commits one complete text string to this focused control.
A commit may contain multiple Unicode scalars. It is not attributed to a key press.
Kind: event
public event System.Action ThemeChangedOccurs during a theme refresh, before the previous lookup cache is cleared.
Resource changes are deferred to the scene owner. Local overrides refresh synchronously unless bulk editing is active. Required invalidation continues after a subscriber fails.
Kind: method
public System.Void AcceptEvent()Marks the current GUI event handled, preventing further delivery.
-
T:System.InvalidOperationException: No scene input is currently being delivered.
Kind: method
public System.Void AddThemeColorOverride(System.String name, Electron2D.Color color)Stores a local color override and refreshes this node's theme state.
Equal assignments still refresh. Overrides apply only to implicit, own-class or own-variation queries.
-
name: The item key. -
color: The typed override value.
-
T:System.ArgumentException: A key is invalid; color overrides must be finite and resource overrides must be nonnull. -
T:System.InvalidOperationException: Mutation is off-owner or capture-owned. -
T:System.ObjectDisposedException: The node or assigned resource is disposed.
Kind: method
public System.Void AddThemeConstantOverride(System.String name, System.Int32 constant)Stores a local constant override and refreshes this node's theme state.
Equal assignments still refresh. Overrides apply only to implicit, own-class or own-variation queries.
-
name: The item key. -
constant: The typed override value.
-
T:System.ArgumentException: A key is invalid; color overrides must be finite and resource overrides must be nonnull. -
T:System.InvalidOperationException: Mutation is off-owner or capture-owned. -
T:System.ObjectDisposedException: The node or assigned resource is disposed.
Kind: method
public System.Void AddThemeFontOverride(System.String name, Electron2D.Font font)Stores a local font override and refreshes this node's theme state.
Equal assignments still refresh. Overrides apply only to implicit, own-class or own-variation queries.
-
name: The item key. -
font: The typed override value.
-
T:System.ArgumentException: A key is invalid; color overrides must be finite and resource overrides must be nonnull. -
T:System.InvalidOperationException: Mutation is off-owner or capture-owned. -
T:System.ObjectDisposedException: The node or assigned resource is disposed.
Kind: method
public System.Void AddThemeFontSizeOverride(System.String name, System.Int32 fontSize)Stores a local font size override and refreshes this node's theme state.
Equal assignments still refresh. Overrides apply only to implicit, own-class or own-variation queries.
-
name: The item key. -
fontSize: The typed override value.
-
T:System.ArgumentException: A key is invalid; color overrides must be finite and resource overrides must be nonnull. -
T:System.InvalidOperationException: Mutation is off-owner or capture-owned. -
T:System.ObjectDisposedException: The node or assigned resource is disposed.
Kind: method
public System.Void AddThemeIconOverride(System.String name, Electron2D.Texture texture)Stores a local icon override and refreshes this node's theme state.
Equal assignments still refresh. Overrides apply only to implicit, own-class or own-variation queries.
-
name: The item key. -
texture: The typed override value.
-
T:System.ArgumentException: A key is invalid; color overrides must be finite and resource overrides must be nonnull. -
T:System.InvalidOperationException: Mutation is off-owner or capture-owned. -
T:System.ObjectDisposedException: The node or assigned resource is disposed.
Kind: method
public System.Void AddThemeStyleBoxOverride(System.String name, Electron2D.StyleBox styleBox)Stores a local style box override and refreshes this node's theme state.
Equal assignments still refresh. Overrides apply only to implicit, own-class or own-variation queries.
-
name: The item key. -
styleBox: The live borrowed style.
-
T:System.ArgumentException: A key is invalid; color overrides must be finite and resource overrides must be nonnull. -
T:System.InvalidOperationException: Mutation is off-owner or capture-owned. -
T:System.ObjectDisposedException: The node or assigned resource is disposed.
Kind: method
public System.Void BeginBulkThemeOverride()Suppresses local override notifications until EndBulkThemeOverride. Repeated begins do not nest.
Kind: method
public System.Boolean CanDropData(Electron2D.Vector2 atPosition, Electron2D.DragPayload payload)Tests whether this control accepts a typed payload at a local position.
Whether this control accepts the payload.
-
atPosition: Finite local pointer coordinates. -
payload: The live borrowed drag payload.
Kind: method
protected override System.Func<Electron2D.Node> CreateSceneInstanceFactory()Kind: method
protected override System.Void Dispose(System.Boolean disposing)Kind: method
public System.Void DropData(Electron2D.Vector2 atPosition, Electron2D.DragPayload payload)Delivers an accepted payload to this control.
-
atPosition: Finite local pointer coordinates. -
payload: The live borrowed drag payload.
Kind: method
public System.Void EndBulkThemeOverride()Ends local override batching and emits one refresh while attached, even when no values changed.
-
T:System.InvalidOperationException: No batch is active, or mutation is off-owner/capture-owned.
Kind: method
public Electron2D.Control FindNextValidFocus()Finds the next visible keyboard-navigable control, wrapping within the viewport.
The next focus target, or null when none exists.
Kind: method
public Electron2D.Control FindPrevValidFocus()Finds the previous visible keyboard-navigable control, wrapping within the viewport.
The previous focus target, or null when none exists.
Kind: method
public Electron2D.Control FindValidFocusNeighbor(Electron2D.Side side)Finds a visible focus target in one direction, checking explicit paths first.
The nearest eligible control, or null when none exists.
-
side: The search direction.
Kind: method
public System.Void ForceDrag(Electron2D.DragPayload payload, Electron2D.Control preview = null)Starts a drag immediately, optionally using a detached preview control.
-
payload: A nonnull typed payload borrowed until the drag ends. -
preview: A live parentless control transferred to the scene tree and disposed at drag end.
Kind: method
public System.Single GetAnchor(Electron2D.Side side)Gets the anchor for a rectangle side.
The fraction of the parent area's corresponding axis.
-
side: The side to query.
Kind: method
public Electron2D.Vector2 GetBegin()Gets the left and top offsets as a pair.
Kind: method
public Electron2D.Vector2 GetBoundMinimumSize()Gets the combined minimum capped by each enabled maximum component.
Kind: method
public Electron2D.Vector2 GetCombinedMaximumSize()Gets the effective maximum from intrinsic, custom and propagated bounds.
Kind: method
public Electron2D.Vector2 GetCombinedMinimumSize()Gets the componentwise maximum of the intrinsic minimum, custom minimum, and zero.
Kind: method
public Electron2D.Vector2 GetCombinedPivotOffset()Gets the absolute pivot plus its current size-relative component.
The scene owner or an active processing-group thread may read this value; coordinate concurrent writes.
-
T:System.InvalidOperationException: An attached query is outside the owner/processing groups. -
T:System.ObjectDisposedException: The control is disposed.
Kind: method
public Electron2D.CursorShape GetCursorShape(Electron2D.Vector2 atPosition = default)Returns the cursor shape for a position in this control's local coordinates.
The virtual override's shape, or Electron2D.Control.MouseDefaultCursorShape.
-
atPosition: Finite local coordinates; the point need not be inside the rectangle.
-
T:System.ArgumentException: The local position is not finite. -
T:System.ArgumentOutOfRangeException: The virtual override returns an undefined shape. -
T:System.ObjectDisposedException: This control is disposed.
Kind: method
public Electron2D.DragPayload GetDragData(Electron2D.Vector2 atPosition)Produces a typed payload for a drag beginning at a control-local position.
A borrowed payload, or null when no drag can begin.
-
atPosition: Finite local pointer coordinates.
Kind: method
public Electron2D.Vector2 GetEnd()Gets the right and bottom offsets as a pair.
Kind: method
public Electron2D.FocusMode GetFocusModeWithOverride()Returns the focus mode after applying the inherited recursive policy.
Electron2D.FocusMode.None when this control's focus behavior is disabled; otherwise Electron2D.Control.FocusMode.
Kind: method
public System.String GetFocusNeighbor(Electron2D.Side side)Gets the relative path for a directional focus neighbor.
The configured path, or an empty string.
-
side: The side to query.
Kind: method
public Electron2D.Rect2 GetGlobalRect()Returns the unrotated global rectangle after pivot and scale.
The global transformed origin and scaled size.
Kind: method
public Electron2D.Vector2 GetMaximumSize()Gets the intrinsic maximum size, with negative components meaning unbounded.
Kind: method
public Electron2D.Vector2 GetMinimumSize()Gets the intrinsic minimum size supplied by this control type.
Kind: method
public Electron2D.MouseFilter GetMouseFilterWithOverride()Returns the pointer filter after applying the inherited recursive policy.
Electron2D.MouseFilter.Ignore when this control's pointer behavior is disabled; otherwise Electron2D.Control.MouseFilter.
Kind: method
public System.Single GetOffset(Electron2D.Side side)Gets the offset for a rectangle side.
The offset in local canvas units.
-
side: The side to query.
Kind: method
public Electron2D.Vector2 GetParentAreaSize()Returns the size used to resolve anchors, or zero while detached.
The direct parent control's size or the viewport's visible size.
Kind: method
public Electron2D.Control GetParentControl()Returns the direct parent when it is a Control.
The parent control or null.
Kind: method
protected override System.Collections.Generic.IEnumerable<Electron2D.PropertyDescriptor> GetPropertyDescriptors()Kind: method
public Electron2D.Rect2 GetRect()Returns the unrotated local rectangle after pivot and scale.
The transformed origin and scaled size.
Kind: method
public Electron2D.Vector2 GetScreenPosition()Returns this control's local origin in its popup host's screen coordinate space.
The origin of GetScreenTransform, stopping at an embedding viewport or including native desktop placement when needed.
-
T:System.NotSupportedException: Required native desktop window placement is unavailable. -
T:System.InvalidOperationException: There is no active viewport or the caller is off-owner. -
T:System.ObjectDisposedException: The control is disposed.
Kind: method
public Electron2D.Color GetThemeColor(System.String name, System.String themeType = "")Gets a typed theme color using local override, branch themes, native defaults and universal fallback.
The resolved value; resources are borrowed.
-
name: The item key. -
themeType: An explicit type, or empty for this node and its variation.
-
T:System.ArgumentException: A key is null or contains a null character. -
T:System.InvalidOperationException: Access is off-owner or a variation chain cycles. -
T:System.ObjectDisposedException: The node or queried service is disposed.
Kind: method
public System.Int32 GetThemeConstant(System.String name, System.String themeType = "")Gets a typed theme constant using local override, branch themes, native defaults and universal fallback.
The resolved value; resources are borrowed.
-
name: The item key. -
themeType: An explicit type, or empty for this node and its variation.
-
T:System.ArgumentException: A key is null or contains a null character. -
T:System.InvalidOperationException: Access is off-owner or a variation chain cycles. -
T:System.ObjectDisposedException: The node or queried service is disposed.
Kind: method
public System.Single GetThemeDefaultBaseScale()Gets the first positive branch/default theme scale, or the universal scale fallback.
The resolved scale.
Kind: method
public Electron2D.Font GetThemeDefaultFont()Gets the first nonnull branch/default theme font, or the universal font fallback.
The borrowed font, which may be null when no fallback exists.
Kind: method
public System.Int32 GetThemeDefaultFontSize()Gets the first positive branch/default font-size value, or the universal integer fallback.
The resolved font size.
Kind: method
public Electron2D.Font GetThemeFont(System.String name, System.String themeType = "")Gets a typed theme font using local override, branch themes, native defaults and universal fallback.
The resolved value; resources are borrowed.
-
name: The item key. -
themeType: An explicit type, or empty for this node and its variation.
-
T:System.ArgumentException: A key is null or contains a null character. -
T:System.InvalidOperationException: Access is off-owner or a variation chain cycles. -
T:System.ObjectDisposedException: The node or queried service is disposed.
Kind: method
public System.Int32 GetThemeFontSize(System.String name, System.String themeType = "")Gets a typed theme font size using local override, branch themes, native defaults and universal fallback.
The resolved value; resources are borrowed.
-
name: The item key. -
themeType: An explicit type, or empty for this node and its variation.
-
T:System.ArgumentException: A key is null or contains a null character. -
T:System.InvalidOperationException: Access is off-owner or a variation chain cycles. -
T:System.ObjectDisposedException: The node or queried service is disposed.
Kind: method
public Electron2D.Texture GetThemeIcon(System.String name, System.String themeType = "")Gets a typed theme icon using local override, branch themes, native defaults and universal fallback.
The resolved value; resources are borrowed.
-
name: The item key. -
themeType: An explicit type, or empty for this node and its variation.
-
T:System.ArgumentException: A key is null or contains a null character. -
T:System.InvalidOperationException: Access is off-owner or a variation chain cycles. -
T:System.ObjectDisposedException: The node or queried service is disposed.
Kind: method
public Electron2D.StyleBox GetThemeStyleBox(System.String name, System.String themeType = "")Gets a typed theme style box using local override, branch themes, native defaults and universal fallback.
The resolved value; resources are borrowed.
-
name: The item key. -
themeType: An explicit type, or empty for this node and its variation.
-
T:System.ArgumentException: A key is null or contains a null character. -
T:System.InvalidOperationException: Access is off-owner or a variation chain cycles. -
T:System.ObjectDisposedException: The node or queried service is disposed.
Kind: method
public System.String GetTooltip(Electron2D.Vector2 atPosition = default)Gets the untranslated tooltip for a local position through the overridable tooltip hook.
The tooltip text, or an empty string to allow eligible parent lookup.
-
atPosition: The local control position; zero by default.
-
T:System.ArgumentOutOfRangeException: The position is nonfinite. -
T:System.InvalidOperationException: An attached control is queried off its owner thread. -
T:System.ObjectDisposedException: This control is disposed.
Kind: method
public override Electron2D.Transform GetTransform()Kind: method
public System.Void GrabClickFocus()Transfers an existing pointer-button capture to this control at the deferred boundary.
The last request in this viewport wins. No active capture means no change. The previous control receives internal releases for held left/right/middle buttons; this control receives corresponding internal presses in the next deferred batch. Keyboard focus and global input state are unaffected.
-
T:System.InvalidOperationException: The control is detached or accessed off its scene owner. -
T:System.ObjectDisposedException: The control is disposed.
Kind: method
public System.Void GrabFocus(System.Boolean hideFocus = false)Requests keyboard focus for this visible control in its viewport. Embedded focus also focuses containing viewport controls.
-
hideFocus: Whether Electron2D.Control.HasFocus(System.Boolean) should ignore this focus when requested.
Kind: method
public System.Boolean HasFocus(System.Boolean ignoreHiddenFocus = false)Returns whether this control has keyboard focus.
True if this is the current keyboard input target.
-
ignoreHiddenFocus: Treat focus hidden by a pointer request as absent.
Kind: method
protected virtual System.Boolean HasPoint(Electron2D.Vector2 point)Tests a point in this control's local rectangle. Override for a custom hit shape.
True for points inside the half-open rectangle from zero to Electron2D.Control.Size.
-
point: Point in control-local coordinates.
Kind: method
public System.Boolean HasThemeColor(System.String name, System.String themeType = "")Tests whether an override or a branch/default theme provides a color, excluding universal fallback.
True when lookup finds a defined value.
-
name: The item key. -
themeType: An explicit type, or empty for this node and its variation.
Kind: method
public System.Boolean HasThemeColorOverride(System.String name)Tests for a local color override, without inherited lookup.
True when an override slot exists.
-
name: The item key.
Kind: method
public System.Boolean HasThemeConstant(System.String name, System.String themeType = "")Tests whether an override or a branch/default theme provides a constant, excluding universal fallback.
True when lookup finds a defined value.
-
name: The item key. -
themeType: An explicit type, or empty for this node and its variation.
Kind: method
public System.Boolean HasThemeConstantOverride(System.String name)Tests for a local constant override, without inherited lookup.
True when an override slot exists.
-
name: The item key.
Kind: method
public System.Boolean HasThemeFont(System.String name, System.String themeType = "")Tests whether an override or a branch/default theme provides a font, excluding universal fallback.
True when lookup finds a defined value.
-
name: The item key. -
themeType: An explicit type, or empty for this node and its variation.
Kind: method
public System.Boolean HasThemeFontOverride(System.String name)Tests for a local font override, without inherited lookup.
True when an override slot exists.
-
name: The item key.
Kind: method
public System.Boolean HasThemeFontSize(System.String name, System.String themeType = "")Tests whether an override or a branch/default theme provides a font size, excluding universal fallback.
True when lookup finds a defined value.
-
name: The item key. -
themeType: An explicit type, or empty for this node and its variation.
Kind: method
public System.Boolean HasThemeFontSizeOverride(System.String name)Tests for a local font size override, without inherited lookup.
True when an override slot exists.
-
name: The item key.
Kind: method
public System.Boolean HasThemeIcon(System.String name, System.String themeType = "")Tests whether an override or a branch/default theme provides a icon, excluding universal fallback.
True when lookup finds a defined value.
-
name: The item key. -
themeType: An explicit type, or empty for this node and its variation.
Kind: method
public System.Boolean HasThemeIconOverride(System.String name)Tests for a local icon override, without inherited lookup.
True when an override slot exists.
-
name: The item key.
Kind: method
public System.Boolean HasThemeStyleBox(System.String name, System.String themeType = "")Tests whether an override or a branch/default theme provides a style box, excluding universal fallback.
True when lookup finds a defined value.
-
name: The item key. -
themeType: An explicit type, or empty for this node and its variation.
Kind: method
public System.Boolean HasThemeStyleBoxOverride(System.String name)Tests for a local style box override, without inherited lookup.
True when an override slot exists.
-
name: The item key.
Kind: method
public System.Boolean IsDragSuccessful()Reports the result of the most recently completed GUI drag in this viewport.
True when an accepted target received the most recent drop.
Kind: method
public System.Boolean IsLayoutRTL()Reports whether this control currently resolves its layout from right to left.
Inherited nodes follow same-domain Window/Control ancestry, then the project root policy. Forced RTL applies to inherited and locale modes; explicit LTR/RTL remain authoritative. Tree policies are sampled at activation.
Kind: method
protected virtual System.Boolean OnCanDropData(Electron2D.Vector2 atPosition, Electron2D.DragPayload payload)Tests a potential drop target; false rejects it.
Whether the target accepts the payload.
-
atPosition: The current local pointer position. -
payload: The borrowed typed payload.
Kind: method
protected virtual System.Void OnDropData(Electron2D.Vector2 atPosition, Electron2D.DragPayload payload)Consumes an accepted drop after the target test succeeds.
-
atPosition: The current local pointer position. -
payload: The borrowed typed payload.
Kind: method
protected virtual System.Void OnGUIInput(Electron2D.InputEvent inputEvent)Processes a temporary control-local event before Electron2D.Control.GUIInput subscribers.
-
inputEvent: Borrowed event valid only during synchronous dispatch.
Kind: method
protected virtual Electron2D.CursorShape OnGetCursorShape(Electron2D.Vector2 atPosition)Chooses a cursor for a control-local position; defaults to Electron2D.Control.MouseDefaultCursorShape.
The shape selected for the given position.
-
atPosition: Finite coordinates local to this control.
Kind: method
protected virtual Electron2D.DragPayload OnGetDragData(Electron2D.Vector2 atPosition)Produces drag data for an automatic pointer drag; null rejects the attempt.
A typed payload, or null.
-
atPosition: The original left-press position in local coordinates.
Kind: method
protected virtual Electron2D.Vector2 OnGetMaximumSize()Supplies the intrinsic maximum size; the base control is unbounded.
Kind: method
protected virtual Electron2D.Vector2 OnGetMinimumSize()Supplies the intrinsic minimum size; the base control has none.
Kind: method
protected virtual System.String OnGetTooltip(Electron2D.Vector2 atPosition)Supplies untranslated tooltip text for a local control position.
TooltipText by default; an empty string permits eligible parent lookup.
-
atPosition: The finite local cursor position.
Kind: method
protected virtual Electron2D.NodeAutoTranslateMode OnGetTooltipAutoTranslateModeAt(Electron2D.Vector2 atPosition)Supplies the default tooltip label's translation policy at a local position.
TooltipAutoTranslateMode by default.
-
atPosition: The finite local cursor position.
Kind: method
protected virtual System.Void OnIMECompositionChanged(System.String text, Electron2D.Vector2i selection)Receives an uncommitted composition update before Electron2D.Control.IMECompositionChanged subscribers.
-
text: The current preedit text; empty clears it. -
selection: Unicode-codepoint selection start and length.
Kind: method
protected virtual Electron2D.Control OnMakeCustomTooltip(System.String forText)Creates an optional custom tooltip control.
Ownership of a valid detached result transfers to the presenter, which disposes it when the tooltip closes. Do not return this control, an ancestor, or a control already parented or attached to a scene tree.
A newly owned detached control, or null to use the default label. A hidden returned control suppresses display.
-
forText: The trimmed untranslated tooltip text, which may be empty.
Kind: method
protected override System.Void OnNotification(System.Int32 what)Kind: method
protected virtual Electron2D.TextBIDIRange[] OnStructuredTextParser(System.Collections.Generic.IReadOnlyList<System.String> options, System.String text)Supplies independent bidirectional contexts when a text control selects a custom parser.
Ranges must stay within the text and use a defined TextDirection. The text consumer calls this hook on its scene owner thread. The default implementation returns no overrides.
Logical scalar ranges in display order. Empty output retains the ordinary paragraph context.
-
options: Read-only typed parser options. -
text: The text being parsed.
Kind: method
protected virtual System.Void OnTextInput(System.String text)Receives one committed text string before Electron2D.Control.TextInput subscribers.
-
text: The complete committed text, including multiple Unicode scalars when supplied.
Kind: method
public System.Void ReleaseFocus()Releases keyboard focus if held by this control.
Kind: method
public System.Void RemoveThemeColorOverride(System.String name)Removes a local color override and refreshes even when the key was absent.
-
name: The item key.
-
T:System.InvalidOperationException: Mutation is off-owner or capture-owned.
Kind: method
public System.Void RemoveThemeConstantOverride(System.String name)Removes a local constant override and refreshes even when the key was absent.
-
name: The item key.
-
T:System.InvalidOperationException: Mutation is off-owner or capture-owned.
Kind: method
public System.Void RemoveThemeFontOverride(System.String name)Removes a local font override and refreshes even when the key was absent.
-
name: The item key.
-
T:System.InvalidOperationException: Mutation is off-owner or capture-owned.
Kind: method
public System.Void RemoveThemeFontSizeOverride(System.String name)Removes a local font size override and refreshes even when the key was absent.
-
name: The item key.
-
T:System.InvalidOperationException: Mutation is off-owner or capture-owned.
Kind: method
public System.Void RemoveThemeIconOverride(System.String name)Removes a local icon override and refreshes even when the key was absent.
-
name: The item key.
-
T:System.InvalidOperationException: Mutation is off-owner or capture-owned.
Kind: method
public System.Void RemoveThemeStyleBoxOverride(System.String name)Removes a local style box override and refreshes even when the key was absent.
-
name: The item key.
-
T:System.InvalidOperationException: Mutation is off-owner or capture-owned.
Kind: method
public override System.Void Reparent(Electron2D.Node newParent, System.Boolean keepGlobalTransform = true)Moves this control under another node, preserving its global position by default.
Validates the destination canvas inverse before changing the hierarchy. Size and anchors reflow against the new parent; only the global origin is preserved. Same-parent calls retain the inherited lifecycle, capture and owner-thread checks. Callback errors aggregate after possible insertion and position restoration.
-
newParent: The destination parent. -
keepGlobalTransform: Preserve the transformed origin in global canvas coordinates.
Kind: method
public System.Void ResetSize()Resets size to its effective minimum, capped by any maximum.
Kind: method
public System.Void SetAnchor(Electron2D.Side side, System.Single anchor, System.Boolean keepOffset = false, System.Boolean pushOppositeAnchor = true)Sets an anchor, optionally preserving its offset and moving the opposite anchor.
-
side: The side to update. -
anchor: A finite fraction of the parent area. -
keepOffset: Keep the current offset instead of the current edge position. -
pushOppositeAnchor: Move the opposite anchor when the anchors cross.
Kind: method
public System.Void SetAnchorAndOffset(Electron2D.Side side, System.Single anchor, System.Single offset, System.Boolean pushOppositeAnchor = false)Sets one anchor and its local offset in sequence.
-
side: The rectangle side to update. -
anchor: A finite anchor fraction. -
offset: A finite local offset. -
pushOppositeAnchor: Move the opposite anchor when they cross.
Kind: method
public System.Void SetAnchorsAndOffsetsPreset(Electron2D.LayoutPreset preset, Electron2D.LayoutPresetMode resizeMode = MinSize, System.Int32 margin = 0)Applies an anchor preset followed by the matching offset preset.
The anchor step is retained if the following offset step rejects an invalid resize mode.
-
preset: The standard arrangement. -
resizeMode: Which current size components to preserve. -
margin: The signed gap from edges used by the preset.
Kind: method
public System.Void SetAnchorsPreset(Electron2D.LayoutPreset preset, System.Boolean keepOffsets = false)Arranges all four anchors in a standard layout preset.
Applies left, top, right, then bottom through Electron2D.Control.SetAnchor(Electron2D.Side,System.Single,System.Boolean,System.Boolean); attached controls reflow after each side.
-
preset: The arrangement to apply. -
keepOffsets: Keep each local offset instead of preserving the current rectangle edges.
-
T:System.ArgumentOutOfRangeException: The preset is not defined.
Kind: method
public System.Void SetBegin(Electron2D.Vector2 position)Sets the left and top offsets together and resolves the rectangle once.
SetDragForwarding(System.Func<Electron2D.Vector2, Electron2D.DragPayload>, System.Func<Electron2D.Vector2, Electron2D.DragPayload, System.Boolean>, System.Action<Electron2D.Vector2, Electron2D.DragPayload>)
Kind: method
public System.Void SetDragForwarding(System.Func<Electron2D.Vector2, Electron2D.DragPayload> getData, System.Func<Electron2D.Vector2, Electron2D.DragPayload, System.Boolean> canDrop, System.Action<Electron2D.Vector2, Electron2D.DragPayload> drop)Sets typed delegates that replace the three virtual drag hooks when supplied.
Delegates are borrowed and cleared on disposal. A supplied delegate returning null or false does not fall back to the corresponding virtual hook.
-
getData: Produces a payload from a local pointer position, or null to use the virtual hook. -
canDrop: Tests an incoming payload, or null to use the virtual hook. -
drop: Consumes an accepted payload, or null to use the virtual hook.
Kind: method
public System.Void SetDragPreview(Electron2D.Control preview)Replaces the visual preview of the active or preparing drag.
-
preview: A live parentless control transferred to the tree and disposed at drag end.
Kind: method
public System.Void SetEnd(Electron2D.Vector2 position)Sets the right and bottom offsets together and resolves the rectangle once.
Kind: method
public System.Void SetFocusNeighbor(Electron2D.Side side, System.String neighbor)Sets the relative path for a directional focus neighbor.
-
side: The side to configure. -
neighbor: A relative node path, or empty for automatic search.
Kind: method
public System.Void SetGlobalPosition(Electron2D.Vector2 position, System.Boolean keepOffsets = false)Sets physical global position while keeping the local pivot transform.
-
position: The finite global canvas point. -
keepOffsets: Keep offsets and recompute anchors; requires a nonzero parent area.
Kind: method
public System.Void SetOffset(Electron2D.Side side, System.Single offset)Sets the offset for a rectangle side and resolves the rectangle.
-
side: The side to update. -
offset: A finite local offset.
Kind: method
public System.Void SetOffsetsPreset(Electron2D.LayoutPreset preset, Electron2D.LayoutPresetMode resizeMode = MinSize, System.Int32 margin = 0)Places this control at a standard preset without changing its anchors.
All four offsets are committed before one rectangle reflow. Wide presets span their selected parent axis regardless of resize mode.
-
preset: The target placement. -
resizeMode: Which current size components to preserve. -
margin: The signed gap from edges used by the preset.
Kind: method
public System.Void SetPosition(Electron2D.Vector2 position, System.Boolean keepOffsets = false)Sets physical local position by changing offsets or, when requested, anchors.
-
position: The finite upper-left point. -
keepOffsets: Keep offsets and recompute anchors; requires a nonzero parent area.
Kind: method
public System.Void SetSize(Electron2D.Vector2 size, System.Boolean keepOffsets = false)Sets size within its minimum and maximum bounds, changing offsets or anchors.
-
size: The finite requested size, clamped to the current bounds. -
keepOffsets: Keep offsets and recompute anchors; requires a nonzero parent area.
Kind: method
public System.Void UpdateMaximumSize()Requests a coalesced maximum-size update, invalidates child allocation caches and refreshes child bounds.
Kind: method
public System.Void UpdateMinimumSize()Requests a coalesced minimum-size update after an intrinsic minimum changes.
Kind: method
public System.Void WarpMouse(Electron2D.Vector2 position)Requests a native pointer move to a finite control-local position.
-
position: The position transformed through the canvas and containing viewport.
-
T:System.ArgumentException: The input/transformed position is nonfinite or outside native limits. -
T:System.InvalidOperationException: No active containing window exists or the caller is off-owner. -
T:System.NotSupportedException: The native backend does not support pointer warping. -
T:System.ObjectDisposedException: The control is disposed.
Kind: property
public System.Single AnchorBottom { get; set; }Gets or sets the bottom anchor fraction.
Kind: property
public System.Single AnchorLeft { get; set; }Gets or sets the left anchor fraction.
Kind: property
public System.Single AnchorRight { get; set; }Gets or sets the right anchor fraction.
Kind: property
public System.Single AnchorTop { get; set; }Gets or sets the top anchor fraction.
Kind: property
public System.Boolean ClipContents { get; set; }Gets or sets whether this control clips its canvas descendants and pointer targeting to its rectangle.
Only direct canvas descendants inherit clipping; a top-level or non-canvas boundary starts a new canvas branch. Changes refresh root-viewport hover and affect the next rendered frame without rerecording retained commands.
False by default. The control's own drawing is not clipped while its clip has visible area.
-
T:System.InvalidOperationException: An attached mutation is off the scene owner thread or occurs during scene capture. -
T:System.ObjectDisposedException: The control is disposed.
Kind: property
public Electron2D.Vector2 CustomMaximumSize { get; set; }Gets or sets the finite caller-supplied maximum size; a negative component disables its bound.
Kind: property
public Electron2D.Vector2 CustomMinimumSize { get; set; }Gets or sets the caller-supplied lower bound for layout size.
Each component is combined with the intrinsic minimum and zero. Updates in a scene tree are coalesced for deferred delivery.
Kind: property
public Electron2D.RecursiveBehavior FocusBehaviorRecursive { get; set; }Gets or sets the inherited keyboard focus policy for this control and its descendants.
Electron2D.RecursiveBehavior.Inherited by default. An enabled descendant overrides a disabled ancestor.
Kind: property
public Electron2D.FocusMode FocusMode { get; set; }Gets or sets whether this control can become the keyboard input target.
Electron2D.FocusMode.None by default.
Kind: property
public System.String FocusNeighborBottom { get; set; }Gets or sets the relative path used before automatic downward focus search.
An empty path by default.
Kind: property
public System.String FocusNeighborLeft { get; set; }Gets or sets the relative path used before automatic leftward focus search.
An empty path by default.
Kind: property
public System.String FocusNeighborRight { get; set; }Gets or sets the relative path used before automatic rightward focus search.
An empty path by default.
Kind: property
public System.String FocusNeighborTop { get; set; }Gets or sets the relative path used before automatic upward focus search.
An empty path by default.
Kind: property
public System.String FocusNext { get; set; }Gets or sets the relative path used before automatic forward focus traversal.
An empty path by default.
Kind: property
public System.String FocusPrevious { get; set; }Gets or sets the relative path used before automatic backward focus traversal.
An empty path by default.
Kind: property
public Electron2D.Vector2 GlobalPosition { get; set; }Gets or sets the transformed origin in global canvas coordinates.
Kind: property
public Electron2D.GrowDirection GrowHorizontal { get; set; }Gets or sets which horizontal edge stays fixed when the minimum width grows.
Kind: property
public Electron2D.GrowDirection GrowVertical { get; set; }Gets or sets which vertical edge stays fixed when the minimum height grows.
Kind: property
public Electron2D.LayoutDirection LayoutDirection { get; set; }Gets or sets the horizontal layout direction policy.
Changes notify the subtree before the resulting rectangles are observed by callers.
Kind: property
public System.Boolean LocalizeNumeralSystem { get; set; }Gets or sets using the locale's numeral system for generated numeric control text.
Numeric producers consume this policy; changing it refreshes translation-dependent presentation.
True initially. Ordinary caller-authored text is not converted.
Kind: property
public Electron2D.RecursiveBehavior MouseBehaviorRecursive { get; set; }Gets or sets the inherited pointer input policy for this control and its descendants.
Electron2D.RecursiveBehavior.Inherited by default. An enabled descendant overrides a disabled ancestor.
Kind: property
public Electron2D.CursorShape MouseDefaultCursorShape { get; set; }Gets or sets the cursor shape used when this control is hovered.
Arrow by default. A change on a hovered control refreshes the native cursor immediately.
-
T:System.ArgumentOutOfRangeException: The value is not a defined cursor shape. -
T:System.ObjectDisposedException: This control is disposed.
Kind: property
public Electron2D.MouseFilter MouseFilter { get; set; }Gets or sets how pointer input reaches this control.
Electron2D.MouseFilter.Stop by default.
Kind: property
public System.Boolean MouseForcePassScrollEvents { get; set; }Lets wheel input continue to the parent even when Electron2D.Control.MouseFilter is Stop.
True by default.
Kind: property
public System.Single OffsetBottom { get; set; }Gets or sets the bottom offset.
Kind: property
public System.Single OffsetLeft { get; set; }Gets or sets the left offset.
Kind: property
public System.Single OffsetRight { get; set; }Gets or sets the right offset.
Kind: property
public System.Single OffsetTop { get; set; }Gets or sets the top offset.
Kind: property
public System.Boolean OffsetTransformEnabled { get; set; }Gets or sets whether the additional transform affects this control.
Kind: property
public Electron2D.Vector2 OffsetTransformPivot { get; set; }Gets or sets the absolute pivot of the additional transform.
Kind: property
public Electron2D.Vector2 OffsetTransformPivotRatio { get; set; }Gets or sets the size-relative pivot of the additional transform.
Kind: property
public Electron2D.Vector2 OffsetTransformPosition { get; set; }Gets or sets the absolute translation of the additional transform.
Kind: property
public Electron2D.Vector2 OffsetTransformPositionRatio { get; set; }Gets or sets the size-relative translation of the additional transform.
Kind: property
public System.Single OffsetTransformRotation { get; set; }Gets or sets the rotation in radians of the additional transform.
Kind: property
public Electron2D.Vector2 OffsetTransformScale { get; set; }Gets or sets the componentwise scale of the additional transform.
Kind: property
public System.Boolean OffsetTransformVisualOnly { get; set; }Gets or sets whether the additional transform affects drawing only.
Kind: property
public Electron2D.Vector2 PivotOffset { get; set; }Gets or sets the point around which local rotation and scale are applied.
Kind: property
public Electron2D.Vector2 PivotOffsetRatio { get; set; }Gets or sets the portion of the current size added to PivotOffset.
Kind: property
public Electron2D.Vector2 Position { get; set; }Gets or sets the local rectangle's upper-left point.
The position before pivot, rotation and scale.
Kind: property
public System.Boolean PropagateMaximumSize { get; set; }Gets or sets whether this control's maximum size constrains direct child controls.
Kind: property
public System.Single Rotation { get; set; }Gets or sets the local rotation in radians around PivotOffset.
Kind: property
public System.Single RotationDegrees { get; set; }Gets or sets the local rotation in degrees.
Kind: property
public Electron2D.Vector2 Scale { get; set; }Gets or sets the local scale around PivotOffset.
Zero components are replaced by a small positive epsilon to keep the transform invertible.
Kind: property
public Electron2D.Node ShortcutContext { get; set; }Gets or sets the weak scene context that restricts this control's shortcuts.
Packed scenes save the relative node path and resolve it after constructing the complete hierarchy.
Null initially, meaning global shortcuts. A context permits only focus on itself or its descendants. A freed context is returned as null but continues to disable shortcuts until explicitly cleared.
-
T:System.ObjectDisposedException: This control or an assigned context is disposed. -
T:System.InvalidOperationException: Access violates the scene owner thread or capture boundary.
Kind: property
public Electron2D.Vector2 Size { get; set; }Gets or sets the local rectangle's size before rotation and scale.
A finite requested size clamped to the effective minimum and maximum.
Kind: property
public Electron2D.Control.SizeFlags SizeFlagsHorizontal { get; set; }Gets or sets the horizontal container sizing/alignment bits.
Fill initially; unknown bits are retained and ignored by current consumers.
-
T:System.InvalidOperationException: Mutation is off-owner or during scene capture. -
T:System.ObjectDisposedException: The control is disposed.
Kind: property
public System.Single SizeFlagsStretchRatio { get; set; }Gets or sets the finite weighted expansion ratio.
One initially. Zero/negative ratios are retained; positive total weights govern allocation.
-
T:System.ArgumentOutOfRangeException: The ratio is nonfinite. -
T:System.InvalidOperationException: Mutation is off-owner or during scene capture. -
T:System.ObjectDisposedException: The control is disposed.
Kind: property
public Electron2D.Control.SizeFlags SizeFlagsVertical { get; set; }Gets or sets the vertical container sizing/alignment bits.
Fill initially; Range supplies ShrinkBegin, texture progress supplies Fill.
-
T:System.InvalidOperationException: Mutation is off-owner or during scene capture. -
T:System.ObjectDisposedException: The control is disposed.
Kind: property
public Electron2D.Theme Theme { get; set; }Gets or sets the borrowed theme supplying this branch's typed appearance values.
Null initially; lookup continues through consecutive Control/Window ancestors and built-in defaults.
-
T:System.ObjectDisposedException: The node or assigned theme is disposed. -
T:System.InvalidOperationException: Mutation is capture-owned or access is off the scene owner.
Kind: property
public System.String ThemeTypeVariation { get; set; }Gets or sets the variation name used before this node's native type hierarchy.
Empty initially. The nearest theme defining its base supplies the variation chain.
-
T:System.ArgumentNullException: The name is null. -
T:System.ArgumentException: The name contains a null character. -
T:System.InvalidOperationException: Mutation is capture-owned or access is off the scene owner.
Kind: property
public Electron2D.NodeAutoTranslateMode TooltipAutoTranslateMode { get; set; }Gets or sets automatic translation of the default tooltip label.
The stored enum identity is retained; a default label validates the mode when shown.
Inherit initially. Always enables translation and Disabled suppresses it.
-
T:System.InvalidOperationException: Access violates the scene owner thread or capture boundary. -
T:System.ObjectDisposedException: This control is disposed.
Kind: property
public System.String TooltipText { get; set; }Gets or sets the untranslated tooltip text.
An empty string initially. Whitespace is retained; the presenter trims its outer edges.
-
T:System.ArgumentNullException: The assigned text is null. -
T:System.InvalidOperationException: Access violates the scene owner thread or capture boundary. -
T:System.ObjectDisposedException: This control is disposed.
Kind: property
public System.String TranslationContext { get; set; }Gets or sets the default context used by this control's automatic message translation.
A null or empty context passed to Electron2D.Node.Atr(System.String,System.String) or Electron2D.Node.AtrN(System.String,System.String,System.Int64,System.String) uses this value; a nonempty argument overrides it. Explicit Electron2D.ElectronObject.Tr(System.String,System.String) and Electron2D.ElectronObject.TrN(System.String,System.String,System.Int64,System.String) calls keep their supplied context. Setting this property does not invalidate cached captions or send a translation-change notification; set it before assigning text, or explicitly notify the control afterward.
An empty string initially. The value is local to this control and is stored in scene files.
-
T:System.ArgumentNullException: The assigned value is null. -
T:System.InvalidOperationException: An attached access is off the scene owner thread, or a mutation occurs during scene capture. -
T:System.ObjectDisposedException: The control is disposed.