API reference
Preparing search index…

ElementFormControlSelect

Native Rml::ElementFormControlSelect wrapper.

Type hierarchy

Hierarchy (View Summary)

Source & inheritance
Member directory139

Constructors

Accessors

Methods

Constructors

  • Construct a detached native element, or wrap an internal native handle.

    Parameters

    tagOrHandle
    string | object

    Native tag, independent of the concrete native class.

    attributes
    Record<string, VariantValue> = {}

    Owned initial values; defaults to an empty dictionary.

    Returns

    Native allocators retain exact release provenance and initialize input defaults. No global Factory registration or plugin creation notification occurs. A JS subclass uses its nearest registered concrete native class. ElementFormControl is abstract and rejects direct tag construction.

    Source & inheritance

Accessors

  • get absoluteLeft(): number

    Read Rml::Element::GetAbsoluteLeft in context pixels.

    Returns

    number

    The horizontal context offset.

    Source & inheritance
  • get absoluteTop(): number

    Read Rml::Element::GetAbsoluteTop in context pixels.

    Returns

    number

    The vertical context offset.

    Source & inheritance
  • get baseline(): number

    Read GetBaseline: upward pixel offset from the bottom margin edge.

    Returns

    number

    The upward baseline offset in pixels.

    Source & inheritance
  • get clientHeight(): number

    Read GetClientHeight: padding height minus the horizontal scrollbar.

    Returns

    number

    The client height in pixels.

    Source & inheritance
  • get clientLeft(): number

    Read Rml::Element::GetClientLeft (left border width).

    Returns

    number

    The left border width.

    Source & inheritance
  • get clientTop(): number

    Read Rml::Element::GetClientTop (top border width).

    Returns

    number

    The top border width.

    Source & inheritance
  • get clientWidth(): number

    Read GetClientWidth: padding width minus the vertical scrollbar.

    Returns

    number

    The client width in pixels.

    Source & inheritance
  • get clipArea(): BoxArea

    Native GetClipArea/SetClipArea; Auto selects automatic clipping.

    Returns

    The clipping area.

    Source & inheritance
  • set clipArea(area: BoxArea): void

    Set the box area used for clipping.

    Parameters

    area

    Native clip box area.

    Returns

    void
    Source & inheritance
  • get id(): string

    Element id.

    Returns

    string

    Element id, empty when unset.

    Source & inheritance
  • set id(id: string): void

    Set the element id through Rml::Element::SetId.

    Parameters

    id
    string

    New element id.

    Returns

    void
    Source & inheritance
  • get innerRML(): string

    Inner RML markup.

    Returns

    string

    Inner markup string.

    Source & inheritance
  • set innerRML(rml: string): void

    Replace child markup through Rml::Element::SetInnerRML.

    Parameters

    rml
    string

    New markup; existing child wrappers become invalid.

    Returns

    void
    Source & inheritance
  • get offsetHeight(): number

    Read GetOffsetHeight: content, padding and borders, excluding margins.

    Returns

    number

    The border height in pixels.

    Source & inheritance
  • get offsetLeft(): number

    Read GetOffsetLeft: border offset relative to the offset parent.

    Returns

    number

    The horizontal border offset.

    Source & inheritance
  • get offsetParent(): null | Element

    Read GetOffsetParent; null when no native offset parent exists.

    Returns

    null | Element

    The live offset parent or null.

    Source & inheritance
  • get offsetTop(): number

    Read GetOffsetTop: border offset relative to the offset parent.

    Returns

    number

    The vertical border offset.

    Source & inheritance
  • get offsetWidth(): number

    Read GetOffsetWidth: content, padding and borders, excluding margins.

    Returns

    number

    The border width in pixels.

    Source & inheritance
  • get scrollHeight(): number

    Read GetScrollHeight, including padding and scrollable content.

    Returns

    number

    The scrollable height in pixels.

    Source & inheritance
  • get scrollLeft(): number

    Native GetScrollLeft/SetScrollLeft with native rounding and clamping. Changing the offset synchronously dispatches a scroll event.

    Returns

    number

    The horizontal scroll offset.

    Source & inheritance
  • set scrollLeft(value: number): void

    Set the horizontal scroll offset through Rml::Element::SetScrollLeft.

    Parameters

    value
    number

    Horizontal offset in pixels, clamped by RmlUi.

    Returns

    void
    Source & inheritance
  • get scrollTop(): number

    Native GetScrollTop/SetScrollTop with native rounding and clamping. Changing the offset synchronously dispatches a scroll event.

    Returns

    number

    The vertical scroll offset.

    Source & inheritance
  • set scrollTop(value: number): void

    Set the vertical scroll offset through Rml::Element::SetScrollTop.

    Parameters

    value
    number

    Vertical offset in pixels, clamped by RmlUi.

    Returns

    void
    Source & inheritance
  • get scrollWidth(): number

    Read GetScrollWidth, including padding and scrollable content.

    Returns

    number

    The scrollable width in pixels.

    Source & inheritance
  • get tagName(): string

    Tag name of the element.

    Returns

    string

    Tag name.

    Source & inheritance
  • get zIndex(): number

    Read the native GetZIndex result.

    Returns

    number

    The native z-index.

    Source & inheritance

Methods

  • Add RML content through native Add(rml, value, before, selectable).

    Parameters

    rml
    string

    Option contents; may contain markup.

    value
    string

    Submitted value.

    beforeOptional
    number

    Int32 insertion index; out-of-range appends. Default -1.

    selectableOptional
    boolean

    False adds disabled; default true.

    Returns

    number

    New option index.

    Source & inheritance
  • Transfer a detached owned option through native Add(ElementPtr, before).

    Parameters

    element

    Detached owned option; wrapper identity is preserved.

    beforeOptional
    number

    Int32 insertion index; default -1 appends.

    Returns

    number

    New option index.

    Source & inheritance
  • Append a copied key with Rml::Element::AddAnimationKey.

    Parameters

    property
    string | PropertyId

    Native property name or id.

    target

    Typed target value.

    duration
    number

    Additional nonnegative duration in seconds.

    tweenOptional

    Easing; defaults to native Linear/Out.

    Returns

    boolean

    Native success, including false when no animation exists.

    Source & inheritance
  • Attach an event listener.

    Parameters

    type
    string | number

    Event name or registered native EventId.

    listener

    Synchronous callback, shareable between registrations.

    capture
    boolean = false

    Listen in capture phase; defaults to false.

    Returns

    void

    Identical element/type/callback/capture registrations are idempotent. Removing the registration or destroying the element releases its callback. Listeners may remove themselves or other listeners during dispatch. Exceptions propagate from the native entry that dispatched the event. Classes, styles, target-local ordinary attributes, titles and unrelated subtrees may change synchronously. Removing active event targets or native call receivers is rejected, as are teardown and recursive update/input. Attribute set/removal also rejects ancestors of active targets. Setting or removing an active input's type is rejected to protect its widget. Schedule those operations after dispatch, for example with queueMicrotask.

    Source & inheritance
  • Start or replace Rml::Element::Animate for a property name or id.

    Parameters

    property
    string | PropertyId

    Native property name or id.

    target

    Typed target value, copied by RmlUi.

    duration
    number

    Nonnegative duration in seconds.

    tweenOptional

    Easing; defaults to native Linear/Out.

    iterations
    number = 1

    Iteration count; defaults to 1; -1 repeats forever.

    alternate
    boolean = true

    Reverse every second iteration; defaults to true.

    delay
    number = 0

    Delay in seconds; defaults to zero.

    start
    null | Property = null

    Copied start value; null uses the current property value.

    Returns

    boolean

    Native success; false for unknown or unsupported properties.

    Source & inheritance
  • Transfer a detached child through Rml::Element::AppendChild.

    Parameters

    child

    Owned detached node; remove an attached node first.

    domElement
    boolean = true

    Include in DOM traversal; defaults to true.

    Returns

    The same child wrapper.

    Rejects cycles, context roots and active native/event subtrees. Documents retain their context and can move only within that live context. A context root accepts only its own documents as DOM children. Ownership transfers once; listeners survive detaching and reinsertion. Native widget internals are readable but cannot be removed or replaced; non-DOM children inserted through these APIs remain transferable.

    Source & inheritance
  • Query Rml::Element::ArePseudoClassesSet for every name.

    Parameters

    names
    readonly string[]

    Names to check; an empty list returns true.

    Returns

    boolean

    Whether all names are active.

    Source & inheritance
  • Call CancelSelectBox, restoring the opening value and closing the box.

    Returns

    void

    May run in a keydown listener before stopping Escape propagation.

    Source & inheritance
  • Dispatch through Rml::Element::DispatchEvent, allowing nested dispatch.

    Parameters

    type
    string | number

    Event name or registered native EventId.

    parameters
    Readonly<Record<string, VariantValue>> = {}

    Typed native Variant values; defaults to empty.

    optionsOptional

    Omit to use the upstream event specification defaults.

    Returns

    boolean

    Whether the event remains propagating.

    Parameter getters run before native element validation. Destroying the receiver or a referenced element in a getter makes dispatch throw. Element parameters cannot be destroyed by subtree replacement in listeners.

    Source & inheritance
  • Request focus through Rml::Element::Focus.

    Parameters

    focusVisible
    boolean = false

    Activate focus-visible feedback; default false.

    Returns

    boolean

    Whether the native focus request succeeded.

    Source & inheritance
  • Format Rml::Element::GetAddress, from this leaf toward its parents.

    Parameters

    includePseudoClasses
    boolean = false

    Include pseudo-classes; defaults to false.

    includeParents
    boolean = true

    Include ancestor addresses; defaults to true.

    Returns

    string

    Native address string, not a CSS selector.

    Source & inheritance
  • Read an attribute as a string.

    Parameters

    name
    string

    Attribute name.

    Returns

    null | string

    Attribute value or null when absent.

    Source & inheritance
  • Read Rml::Element::GetAttribute using the default's native type.

    Type Parameters

    Parameters

    name
    string

    Attribute name.

    defaultValue

    Non-null fallback, selecting native conversion.

    Returns

    Native converted value, initialized with the fallback.

    Numbers select double; BigInt selects int64, or uint64 above INT64_MAX. Unsafe number-to-integer conversions throw. Vectors and colours are copied. Missing keys retain the fallback; invalid numeric strings become zero for a number default, following native atof conversion.

    Source & inheritance
  • Read Rml::Element::GetClosestScrollableContainer, including this element.

    Returns

    null | Element

    Nearest native scroll container or null.

    Call context.update() to resolve styles and layout first. Auto/scroll overflow qualifies only when content exceeds the client size on that axis. Overscroll containment also qualifies, even without overflowing content.

    Source & inheritance
  • Find an element by id in the owning document.

    Parameters

    id
    string

    Element id.

    Returns

    null | Element

    Matching element or null.

    Searches the whole owning document breadth first, including siblings. Without an owner, searches from this element. Special tokens are #self, #document and #parent. Use querySelector for descendant searches.

    Source & inheritance
  • Count children through Rml::Element::GetNumChildren.

    Parameters

    includeNonDomElements
    boolean = false

    Include internal children; default false.

    Returns

    number

    Native child count.

    Source & inheritance
  • Count options through native GetNumOptions, preparing pending children.

    Returns

    number

    Option count; prohibited during callbacks, like getOption.

    Source & inheritance
  • Call native GetOption, moving pending children into the widget.

    Parameters

    index
    number

    Int32 option index.

    Returns

    null | Element

    Canonical option wrapper, or null outside the list.

    This may destroy non-option children and is prohibited during callbacks.

    Source & inheritance
  • Read native GetSelection without preparing pending options.

    Returns

    number

    Selected index, or -1 when none is selected.

    Source & inheritance
  • Read Rml::Element::GetStyleSheet, including the document override.

    Returns

    null | StyleSheet

    Read-only compiled view, or null when no stylesheet is available.

    The view retains its container after document destruction or replacement. Any recompilation of that container invalidates earlier compiled views.

    Source & inheritance
  • Call native IsVisible, optionally checking ancestors.

    Parameters

    includeAncestors
    boolean = false

    Also test ancestors; defaults to false.

    Returns

    boolean

    The native visibility result.

    Source & inheritance
  • Snapshot Rml::Element::IterateLocalProperties in one native traversal.

    Parameters

    filterInheritedBy
    null | Element = null

    Keep only properties inherited by this element.

    Returns

    [string, Property][]

    Native-order name/property pairs with independent owned values.

    Includes inline and stylesheet/class properties, custom variables and variable shorthands. Native override and inheritance filtering apply. Copies remain readable after later style mutation or element destruction.

    Source & inheritance
  • Invoke virtual Rml::Element::ProcessDefaultAction with a live event.

    Parameters

    event

    Event from this element's currently executing listener.

    Returns

    void

    The receiver must equal event.currentTarget. Preserves phase, parameters and propagation state; even a stopped event runs its action. This does not cancel the later automatic action. Use stopPropagation on an interruptible event if it should run only manually. Sequential calls repeat native side effects; reentry with the same event during a manual action is rejected.

    Source & inheritance
  • Release this detached owned native subtree through its original allocator.

    Returns

    void

    Attached, borrowed and active subtrees are rejected. Native destructors run synchronously and invalidate every surviving wrapper in the subtree.

    Source & inheritance
  • Rml::Element::ResolveNumericValue with native unit conversion.

    Parameters

    value

    Numeric value. NUMBER multiplies the base; PERCENT scales it by number / 100; angles return radians; non-numeric units return zero.

    baseValue
    number

    Finite base for NUMBER and PERCENT.

    Returns

    number

    Resolved native value; invalid fields or overflow throw.

    Source & inheritance
  • Merge attributes through Rml::Element::SetAttributes.

    Parameters

    attributes
    Readonly<Record<string, VariantValue>>

    Owned values, fully converted before native mutation.

    Returns

    void

    Other keys remain. Native OnAttributeChange runs once for this group.

    Source & inheritance
  • Copy a value into Rml::Element::SetBox, clearing additional boxes.

    Parameters

    box

    Finite box value; later changes do not affect this element.

    Returns

    void

    Layout may replace manually assigned boxes on a subsequent update.

    Source & inheritance
  • Set the native layout base through Rml::Element::SetOffset.

    Parameters

    offset

    Finite pixel coordinates; native position rules apply.

    offsetParent
    null | Element

    Strict ancestor or null for an independent base.

    offsetFixed
    boolean = false

    Ignore ancestor scrolling; defaults to false.

    Returns

    void

    Native layout may replace this base on the next update. Fixed positioning implies offsetFixed. Ancestor validation prevents cycles and dangling native layout pointers; detachment clears outgoing offset parents.

    Source & inheritance
  • Set a local RCSS property through Rml::Element::SetProperty.

    Parameters

    name
    string

    Property name for RCSS text, or PropertyId for a typed value.

    value
    string

    RCSS text or a native Property copied by value.

    Returns

    boolean

    Whether the property was applied.

    Source & inheritance
  • Set a local RCSS property through Rml::Element::SetProperty.

    Parameters

    name

    Property name for RCSS text, or PropertyId for a typed value.

    value

    RCSS text or a native Property copied by value.

    Returns

    boolean

    Whether the property was applied.

    Source & inheritance
  • Set a native pseudo-class through Rml::Element::SetPseudoClass.

    Parameters

    name
    string

    Pseudo-class name without a colon.

    active
    boolean

    Whether to activate it.

    Returns

    void
    Source & inheritance
  • Register a managed native script object, preserving DOM ownership.

    Parameters

    object
    null | object

    Host object, or null to clear the association.

    Returns

    void

    Attached native trees retain the object. Detached closure cycles remain collectible; clones start with null. Native RTTI stays unchanged.

    Source & inheritance
  • Call native SetSelection, preparing options before selecting.

    Parameters

    index
    number

    Int32 option index; out-of-range clears the selection.

    Returns

    void
    Source & inheritance
  • Create a native allocator storing abstract control values in attributes.

    Parameters

    valueAttribute
    string = 'value'

    Non-empty attribute key without null characters.

    Returns

    Owned native ElementInstancer, invalidated on shutdown.

    GetValue reads this attribute as a native string, defaulting to empty; SetValue writes it. Name, disabled, focus and IsSubmitted use the real ElementFormControl base. Values and data-attr updates execute in Native without JS virtual callbacks. JS subclass overrides do not override native virtuals. Factory applies attributes; direct instanceElement does not. Direct control clones retain the original allocator and key, copying release observers without replaying JS allocation callbacks. Ancestor clones reparse descendants through current Factory registrations. Native Form::Submit selects only input, textarea and select tags.

    Source & inheritance

Icons made by Lorc, Delapouite & Skoll · game-icons.net · CC BY 3.0