public abstract class Widget:
label = Label("Hello")
label.margin = (8, 4, 8, 4)
label.setBounds(10, 20, 120, 26)| Modifier and Type | Member | Description |
|---|---|---|
| public property | accentColoraccentColor as Color |
Accent color used by focused and primary controls. |
| public property | backgroundColorbackgroundColor as Color |
Background color used by filled controls. |
| public property | borderColorborderColor as Color |
Border color used by framed controls. |
| public readonly property | bottombottom as Int: |
Bottom edge of the widget. |
| public property | canFocuscanFocus as Boolean |
Whether the widget can own keyboard focus. |
| public property | cornerRadiuscornerRadius as Int |
Default corner radius for rounded controls. |
| public property | fontfont as String |
Default font used to render this widget. |
| public property | foregroundColorforegroundColor as Color |
Main text and icon color. |
| public property | hasFocushasFocus as Boolean |
Focus flag maintained by the GUI backend. |
| public property | heightheight as Int |
Computed height. |
| public property | isEnabledisEnabled as Boolean |
Enabled flag. |
| public property | isHoveredisHovered as Boolean |
Hover flag maintained by the GUI backend. |
| public property | isManagedisManaged as Boolean |
When false, layout managers ignore this widget. |
| public property | isVisibleisVisible as Boolean |
Visibility flag. |
| public property | layoutParamslayoutParams as Object = null |
Optional layout-specific metadata. |
| public property | margin | Outer margins expressed as `(left, top, right, bottom)`. |
| public property | maxHeightmaxHeight as Int |
Maximal allowed height. |
| public property | maxWidthmaxWidth as Int |
Maximal allowed width. |
| public property | minHeightminHeight as Int |
Minimal allowed height. |
| public property | minWidthminWidth as Int |
Minimal allowed width. |
| public property | parentparent as Container |
Parent container of this widget. |
| public property | preferredHeightpreferredHeight as Int |
Preferred height used by layout managers. |
| public property | preferredWidthpreferredWidth as Int |
Preferred width used by layout managers. |
| public readonly property | rightright as Int: |
Right edge of the widget. |
| public property | styleClassstyleClass as String |
Optional KSS class name. |
| public property | widthwidth as Int |
Computed width. |
| public property | windowwindow as Window |
Owning window, propagated when the widget is inserted in a window tree. |
| public property | xx as Int |
Computed left position. |
| public propert | yy y as Int |
Computed top position. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | blurblur() as Void: |
Clears keyboard focus on this widget. |
| public | containsPoint | Returns true when a point is inside this widget bounds. |
| public | paintpaint(painter as Painter) as Void: |
Paint hook used by the future graphical backend. |
| public | requestFocusrequestFocus() as Boolean: |
Requests keyboard focus for this widget. |
| public | resolvePreferredHeightresolvePreferredHeight() as Int: |
Resolved preferred height after min/max constraints. |
| public | resolvePreferredWidthresolvePreferredWidth() as Int: |
Resolved preferred width after min/max constraints. |
| public | resolvedFontresolvedFont() as String: |
Returns the effective font description used by painter-based renderers. |
| public | setBounds | Updates the computed widget bounds. |