class ComponentScope
source · line 10public class ComponentScope internal constructor(private val node: MountedNode)
Owns the resources of one mount; applications do not close individual components.
Extensions
public fun ComponentScope.declareMenuBar(create: () -> UiMenuBarContent): UiMenuBarDeclaration· scoop:scoop.ui:0.1.0public fun ComponentScope.press(area: InputArea, options: PressOptions = PressOptions(), onPress: () -> Unit): Press· scoop:scoop.ui:0.1.0public fun ComponentScope.notificationController(center: NotificationCenter): NativeNotificationController· scoop:scoop.ui.component.desktop:0.1.0public fun ComponentScope.dragSource(area: InputArea, options: DragSourceOptions = DragSourceOptions(), prepare: (DragSourceStart) -> DragSourceData?): DragSource· scoop:scoop.ui:0.1.0public fun ComponentScope.activeItems(source: NavigationSource, active: Binding<ViewKey?>, options: ActiveItemOptions = ActiveItemOptions(), reveal: (ViewKey) -> Unit = { _ -> Unit }): ActiveItems· scoop:scoop.ui:0.1.0public fun ComponentScope.longPress(area: InputArea, options: LongPressOptions = LongPressOptions(), onLongPress: (LongPressSample) -> Unit): LongPress· scoop:scoop.ui:0.1.0public fun <T> ComponentScope.observeFileDialog(session: FileDialogSession<T>, action: (FileDialogResult<T>) -> Unit): Closeable· scoop:scoop.ui:0.1.0public fun ComponentScope.transformGesture(area: InputArea, options: TransformGestureOptions = TransformGestureOptions(), handler: (TransformGestureEvent) -> Unit): TransformGesture· scoop:scoop.ui:0.1.0public fun ComponentScope.semantics(role: SemanticRole, parent: SemanticsHandle? = None): SemanticsHandle· scoop:scoop.ui:0.1.0public fun ComponentScope.hover(trigger: InputArea, open: Binding<Boolean>, options: HoverOptions = HoverOptions()): Hover· scoop:scoop.ui:0.1.0public fun ComponentScope.observePopup(session: PopupSession, action: (PopupResult) -> Unit): Closeable· scoop:scoop.ui:0.1.0public fun ComponentScope.dropTarget(area: InputArea, handlers: DropAreaHandlers, enabled: Boolean = true): DropArea· scoop:scoop.ui:0.1.0public fun ComponentScope.observeMenu(menu: Menu, action: (MenuActivation) -> Unit): Closeable· scoop:scoop.ui:0.1.0public fun ComponentScope.claimWindowFrame(): Closeable· scoop:scoop.ui:0.1.0public fun ComponentScope.createWindowRegion(kind: WindowRegionKind): WindowRegionHandle· scoop:scoop.ui:0.1.0public fun ComponentScope.observeFrameMetrics(action: (WindowFrameMetrics?) -> Unit): Closeable· scoop:scoop.ui:0.1.0public fun <T> ComponentScope.nativeDialogController(target: DialogTarget): NativeDialogController< T >· scoop:scoop.ui.component:0.1.0public fun ComponentScope.nativeToolWindowController(): NativeToolWindowController· scoop:scoop.ui.component:0.1.0public fun ComponentScope.drag(area: InputArea, options: DragOptions, accepts: (Point) -> Boolean = { _ -> true }, handler: (DragEvent) -> Unit): Drag· scoop:scoop.ui:0.1.0public fun ComponentScope.swipeGesture(area: InputArea, options: SwipeGestureOptions = SwipeGestureOptions(), accepts: (Point) -> Boolean = { _ -> true }, onSwipe: (SwipeGestureSample) -> Unit): SwipeGesture· scoop:scoop.ui:0.1.0public fun ComponentScope.presence(open: Boolean = false, options: PresenceOptions = PresenceOptions()): Presence· scoop:scoop.ui:0.1.0public fun ComponentScope.fileDialogController(): FileDialogController· scoop:scoop.ui.component:0.1.0public fun ComponentScope.typeahead(source: NavigationSource, currentKey: () -> ViewKey?, onMatch: (ViewKey) -> Unit, options: TypeaheadOptions = TypeaheadOptions()): Typeahead· scoop:scoop.ui:0.1.0public fun ComponentScope.observeModal(session: ModalSession, action: (ModalResult) -> Unit): Closeable· scoop:scoop.ui:0.1.0public fun ComponentScope.textInputStarter(area: InputArea, enabled: Boolean = true, onStart: (TextEditorState) -> TextInputStartOptions?): TextInputStarter· scoop:scoop.ui:0.1.0
function requestLayout
source · line 291public fun requestLayout(): Unit
function focusScope
source · line 326public fun focusScope(options: FocusScopeOptions = FocusScopeOptions()): FocusScope
parameter options
source · line 326options: FocusScopeOptions = FocusScopeOptions()
function animation
source · line 413public fun animation(initial: Point): Animatable<Point>
parameter initial
source · line 413initial: Point
function observeInteractionPreferences
source · line 138public fun observeInteractionPreferences(action: (InteractionPreferences) -> Unit): Closeable
Observes later effective changes and retires the registration with this mount.
parameter action
source · line 138action: (InteractionPreferences) -> Unit
function dispatch
source · line 168public fun dispatch(action: () -> Unit): Boolean
parameter action
source · line 168action: () -> Unit
property defaultFonts
source · line 110public val defaultFonts: FontCollection
get: public read-only
The root owns its fallback collection; explicit application collections remain borrowed.
getter get
source · line 110get(): FontCollection
property uiHost
source · line 164public val uiHost: UiHost
get: public read-only
getter get
source · line 164get(): UiHost
function keyNavigation
source · line 338public fun keyNavigation(options: NavigationOptions): KeyNavigation
parameter options
source · line 338options: NavigationOptions
property layoutDirection
source · line 150public val layoutDirection: LayoutDirection
get: public read-only
The borrowed native owner; the mount does not acquire or transfer its lifetime.
getter get
source · line 150get(): LayoutDirection
function observeWindow
source · line 177public fun observeWindow(window: Window, action: (WindowEvent) -> Unit): Closeable
parameter action
source · line 177action: (WindowEvent) -> Unit
parameter window
source · line 177window: Window
property isFrameEnabled
source · line 277public var isFrameEnabled: Boolean
get: public set: public
Local frame-request eligibility; ancestor and submitted placement gates still apply.
setter set
source · line 282set(value: Boolean)
parameter value
source · line 282value
getter get
source · line 278get(): Boolean
function animation
source · line 415public fun animation(initial: Size): Animatable<Size>
parameter initial
source · line 415initial: Size
function scrollViewport
source · line 357public fun scrollViewport(state: ScrollState): ScrollViewport
parameter state
source · line 357state: ScrollState
function animation
source · line 411public fun animation(initial: Double): Animatable<Double>
parameter initial
source · line 411initial: Double
function scrollPan
source · line 371public fun scrollPan(area: InputArea, viewport: ScrollViewport, axes: ScrollAxes = ScrollAxes.Both, chain: ScrollChain = ScrollChain.Chain, options: TouchScrollOptions = TouchScrollOptions()): ScrollPan
parameter area
source · line 372area: InputArea
parameter chain
source · line 375chain: ScrollChain = ScrollChain.Chain
parameter options
source · line 376options: TouchScrollOptions = TouchScrollOptions()
parameter axes
source · line 374axes: ScrollAxes = ScrollAxes.Both
parameter viewport
source · line 373viewport: ScrollViewport
function observeWindowActivity
source · line 266public fun observeWindowActivity(action: (WindowActivity) -> Unit): Closeable
Observes the native window while preserving this root's callback ownership.
parameter action
source · line 266action: (WindowActivity) -> Unit
function animation
source · line 419public fun <T> animation(initial: T, converter: AnimationConverter<T>): Animatable<T>
type parameter T
source · line 419T
parameter initial
source · line 419initial: T
parameter converter
source · line 419converter: AnimationConverter<T>
property application
source · line 160public val application: ActiveApplication
get: public read-only
getter get
source · line 160get(): ActiveApplication
function lazyFocus
source · line 383public fun lazyFocus(viewport: ScrollViewport, options: LazyFocusOptions = LazyFocusOptions()): LazyFocus
parameter viewport
source · line 384viewport: ScrollViewport
parameter options
source · line 385options: LazyFocusOptions = LazyFocusOptions()
property nativeWindow
source · line 155public val nativeWindow: Window
get: public read-only
getter get
source · line 155get(): Window
function layoutAnchor
source · line 350public fun layoutAnchor(handle: LayoutAnchor): Closeable
parameter handle
source · line 350handle: LayoutAnchor
property isMounted
source · line 230public val isMounted: Boolean
get: public read-only
getter get
source · line 230get(): Boolean
function onDispose
source · line 250public fun onDispose(action: () -> Unit): Unit
parameter action
source · line 250action: () -> Unit
function requestFrame
source · line 287public fun requestFrame(): Unit
function bindGridColumns
source · line 406public fun bindGridColumns(table: SemanticsHandle, row: ViewKey): Unit
Binds this row's actual lazy column container to its ancestor table collection.
parameter row
source · line 406row: ViewKey
parameter table
source · line 406table: SemanticsHandle
function createArea
source · line 295public fun createArea(focusable: Boolean = false, textInput: Boolean = false, parent: InputArea? = None, handler: (RoutedEventContext, InputEvent) -> Unit = { _, _ -> Unit }): InputArea
parameter parent
source · line 298parent: InputArea? = None
parameter textInput
source · line 297textInput: Boolean = false
parameter handler
source · line 299handler: (RoutedEventContext, InputEvent) -> Unit = { _, _ -> Unit }
parameter focusable
source · line 296focusable: Boolean = false
function focusTarget
source · line 314public fun focusTarget(area: InputArea, options: FocusOptions = FocusOptions()): FocusTarget
parameter options
source · line 314options: FocusOptions = FocusOptions()
parameter area
source · line 314area: InputArea
property interactionPreferences
source · line 124public val interactionPreferences: InteractionPreferences
get: public read-only
Effective root preferences, tracked by render, update and cached frame readers.
getter get
source · line 124get(): InteractionPreferences
function resource
source · line 244public fun <R: Closeable> resource(create: () -> R): R
parameter create
source · line 244create: () -> R
type parameter R
source · line 244R: Closeable
function routeChildren
source · line 201public fun routeChildren(area: InputArea): Unit
Routes logical descendants through an area owned by this mount.
parameter area
source · line 201area: InputArea
function animation
source · line 417public fun animation(initial: Color): Animatable<Color>
parameter initial
source · line 417initial: Color
function routeSemanticsChildren
source · line 93public fun routeSemanticsChildren(parent: SemanticsHandle?): Unit
Selects the semantic parent for child mounts without changing this mount's siblings.
parameter parent
source · line 93parent: SemanticsHandle?
property input
source · line 179public val input: InputScope
get: public read-only
getter get
source · line 179get(): InputScope
function createDeadline
source · line 255public fun createDeadline(action: () -> Unit): WindowDeadline
Uses the native deadline while keeping callbacks inside this root's failure boundary.
parameter action
source · line 255action: () -> Unit
function moveFocus
source · line 235public fun moveFocus(reverse: Boolean = false): Boolean
Continues ordinary Tab navigation through parent groups from the current focus within this owner.
parameter reverse
source · line 235reverse: Boolean = false