HWWidget class sealed
Abstract base class for all DSL widgets used in widgetBuilder. Subclasses: HWText (v3), HWColumn, HWRow (v4).
- Implemented types
- Implementers
Properties
-
androidChildWidgets
→ List<
HWWidget> -
The widgets this one renders on Android.
no setter
-
androidDescendants
→ Iterable<
HWWidget> -
Every widget Android renders in this subtree,
thisfirst, in render order.no setter -
childWidgets
→ List<
HWWidget> -
The widgets this one renders, if any.
no setter
-
dataDependencies
→ Set<
HWDataType> -
The set of data dependencies required by this widget.
no setter
-
descendants
→ Iterable<
HWWidget> -
Every widget in this subtree,
thisfirst, in render order.no setter -
fontVariants
→ Set<
HWFontVariant> -
Every custom font file this subtree renders text with.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
iconCodePoints
→ Map<
HWIconFont, Set< int> > -
Every icon glyph this subtree can render, per icon font.
no setter
-
kotlinImports
→ Set<
String> -
The set of Kotlin imports required by this element.
no setteroverride
- kotlinPaddingAddsRoom → bool
-
Whether a padding put on this widget's outermost Glance composable adds
room around what it draws.
no setter
- kotlinRendersBitmapText → bool
-
Whether this widget's Glance output is a bitmap the core plugin draws the
text into, rather than something Glance renders itself.
no setter
- kotlinRendersNothing → bool
-
Whether this widget's Glance output is empty.
no setter
- kotlinReportsBaseline → bool
-
Whether this widget's Glance output is a
Text, and so reports a text baseline to the horizontalLinearLayouta GlanceRowbecomes.no setter -
nativeHelpers
→ Set<
HWNativeHelper> -
The native functions this subtree calls, before their own dependencies
are resolved.
no setter
-
ownIconCodePoints
→ Map<
HWIconFont, Set< int> > -
The icon glyphs this one widget can render, per icon font.
no setter
-
renderHelpers
→ Set<
HWNativeHelper> -
The native functions displaying this one widget, before their own
dependencies are resolved.
no setter
- rendersAndroidBitmapText → bool
-
Whether anything in this subtree draws its text into a bitmap on Android.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- swiftClipsFrame → bool
-
Whether a SwiftUI frame around this widget has to cut off what it draws
past the frame.
no setter
- swiftFrameAlignment → String
-
The place a SwiftUI frame wider or taller than this widget puts it, as an
Alignmentliteral.no setter - swiftRendersNothing → bool
-
Whether this widget's SwiftUI output is empty.
no setter
-
swiftViewModifiers
→ Set<
String> -
The set of Swift view declarations/modifiers required by this element
(e.g.,
@Environment(\\.colorScheme) var colorScheme).no setteroverride
Methods
-
kotlinBaselineText(
[HWEmitContext? context]) → HWKotlinBaselineText? - The text a baseline-aligned HWRow lines this child up by, or null when the emitted view is not one it can place.
-
kotlinImportsIn(
HWAxis? enclosingLinearAxis) → Set< String> -
kotlinImports, for a widget emitted directly inside a Glance
ColumnorRowrunning alongenclosingLinearAxis. -
kotlinRendersBitmapTextIn(
HWEmitContext? context) → bool - Whether Android draws any text of this subtree into a bitmap.
-
kotlinRoomIn(
HWAxis? enclosingLinearAxis) → HWKotlinRoom -
The room this widget's outermost Glance composable asks for, emitted
directly inside a Glance
ColumnorRowrunning alongenclosingLinearAxis. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toKotlin(
int indent, {required String dataExpr, HWEmitContext? context}) → String -
Generates the Kotlin code for this widget.
indentis the number of indentation levels (4 spaces each).dataExpris the Kotlin expression to access data fields.dataFieldsmaps field keys to their types.contextcarries what the platform decides rather than the tree, and is forwarded unchanged to every child.override -
toString(
) → String -
A string representation of this object.
inherited
-
toSwift(
int indent, {required String dataExpr, HWEmitContext? context}) → String -
Generates the SwiftUI code for this widget.
indentis the number of indentation levels (4 spaces each).dataExpris the Swift expression to access data fields (e.g. "entry.widgetData").dataFieldsmaps field keys to their types (e.g. 'title' -> HWString()).contextcarries what the platform decides rather than the tree, and is forwarded unchanged to every child.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited