Skip to main content

Type Alias: WidgetProps

WidgetProps = EventControllerProps & DragSourceProps & DropTargetProps & GestureDragProps & object

Defined in: generated/jsx.ts:49

Type Declaration

NameTypeDescriptionDefined in
accessibleRole?Gtk.AccessibleRoleThe accessible role of the given GtkAccessible implementation. The accessible role cannot be changed once set.generated/jsx.ts:216
canFocus?booleanWhether the widget or any of its descendents can accept the input focus. This property is meant to be set by widget implementations, typically in their instance init function.generated/jsx.ts:60
canTarget?booleanWhether the widget can receive pointer events.generated/jsx.ts:62
cssClasses?string[]A list of css classes applied to this widget.generated/jsx.ts:64
cursor?Gdk.Cursor | nullThe cursor used by widget.generated/jsx.ts:66
focusable?booleanWhether this widget itself will accept the input focus.generated/jsx.ts:74
focusOnClick?booleanWhether the widget should grab focus when it is clicked with the mouse. This property is only relevant for widgets that can take focus.generated/jsx.ts:72
grabFocus?booleanWhen set to true, the widget will grab focus. Useful for focusing a widget when a condition becomes true.generated/jsx.ts:319
halign?Gtk.AlignHow to distribute horizontal space if widget gets extra space.generated/jsx.ts:76
hasTooltip?booleanEnables or disables the emission of the Widget.:query-tooltip signal on widget. A true value indicates that widget can have a tooltip, in this case the widget will be queried using Widget.:query-tooltip to determine whether it will provide a tooltip or not.generated/jsx.ts:85
heightRequest?numberOverrides for height request of the widget. If this is -1, the natural request will be used.generated/jsx.ts:91
hexpand?booleanWhether to expand horizontally.generated/jsx.ts:93
hexpandSet?booleanWhether to use the hexpand property.generated/jsx.ts:95
layoutManager?Gtk.LayoutManager | nullThe LayoutManager instance to use to compute the preferred size of the widget, and allocate its children. This property is meant to be set by widget implementations, typically in their instance init function.generated/jsx.ts:103
limitEvents?booleanMakes this widget act like a modal dialog, with respect to event delivery. Global event controllers will not handle events with targets inside the widget, unless they are set up to ignore propagation limits. See EventController.set_propagation_limit.generated/jsx.ts:112
marginBottom?numberMargin on bottom side of widget. This property adds margin outside of the widget's normal size request, the margin will be added in addition to the size from Widget.set_size_request for example.generated/jsx.ts:120
marginEnd?numberMargin on end of widget, horizontally. This property supports left-to-right and right-to-left text directions. This property adds margin outside of the widget's normal size request, the margin will be added in addition to the size from Widget.set_size_request for example.generated/jsx.ts:131
marginStart?numberMargin on start of widget, horizontally. This property supports left-to-right and right-to-left text directions. This property adds margin outside of the widget's normal size request, the margin will be added in addition to the size from Widget.set_size_request for example.generated/jsx.ts:142
marginTop?numberMargin on top side of widget. This property adds margin outside of the widget's normal size request, the margin will be added in addition to the size from Widget.set_size_request for example.generated/jsx.ts:150
name?stringThe name of the widget.generated/jsx.ts:152
onDestroy()?(self) => void | nullSignals that all holders of a reference to the widget should release the reference that they hold. May result in finalization of the widget if all references are released. This signal is not suitable for saving widget state.generated/jsx.ts:225
onDirectionChanged()?(self, previousDirection) => void | nullEmitted when the text direction of a widget changes.generated/jsx.ts:227
onHide()?(self) => void | nullEmitted when widget is hidden.generated/jsx.ts:229
onKeynavFailed()?(self, direction) => boolean | nullEmitted if keyboard navigation fails. See Widget.keynav_failed for details.generated/jsx.ts:235
onMap()?(self) => void | nullEmitted when widget is going to be mapped. A widget is mapped when the widget is visible (which is controlled with Widget.visible) and all its parents up to the toplevel widget are also visible. The ::map signal can be used to determine whether a widget will be drawn, for instance it can resume an animation that was stopped during the emission of Widget.:unmap.generated/jsx.ts:247
onMnemonicActivate()?(self, groupCycling) => boolean | nullEmitted when a widget is activated via a mnemonic. The default handler for this signal activates widget if group_cycling is false, or just makes widget grab focus if group_cycling is true.generated/jsx.ts:254
onMoveFocus()?(self, direction) => void | nullEmitted when the focus is moved. The ::move-focus signal is a keybinding signal. The default bindings for this signal are Tab to move forward, and Shift+Tab to move backward.generated/jsx.ts:263
onQueryTooltip()?(self, x, y, keyboardMode, tooltip) => boolean | nullEmitted when the widget’s tooltip is about to be shown. This happens when the Widget.has-tooltip property is true and the hover timeout has expired with the cursor hovering above widget; or emitted when widget got focus in keyboard mode. Using the given coordinates, the signal handler should determine whether a tooltip should be shown for widget. If this is the case true should be returned, false otherwise. Note that if keyboard_mode is true, the values of x and y are undefined and should not be used. The signal handler is free to manipulate tooltip with the therefore destined function calls.generated/jsx.ts:279
onRealize()?(self) => void | nullEmitted when widget is associated with a GdkSurface. This means that Widget.realize has been called or the widget has been mapped (that is, it is going to be drawn).generated/jsx.ts:292
onShow()?(self) => void | nullEmitted when widget is shown.generated/jsx.ts:294
onStateFlagsChanged()?(self, flags) => void | nullEmitted when the widget state changes. See Widget.get_state_flags.generated/jsx.ts:300
onUnmap()?(self) => void | nullEmitted when widget is going to be unmapped. A widget is unmapped when either it or any of its parents up to the toplevel widget have been set as hidden. As ::unmap indicates that a widget will not be shown any longer, it can be used to, for example, stop an animation on the widget.generated/jsx.ts:310
onUnrealize()?(self) => void | nullEmitted when the GdkSurface associated with widget is destroyed. This means that Widget.unrealize has been called or the widget has been unmapped (that is, it is going to be hidden).generated/jsx.ts:317
opacity?numberThe requested opacity of the widget.generated/jsx.ts:154
overflow?Gtk.OverflowHow content outside the widget's content area is treated. This property is meant to be set by widget implementations, typically in their instance init function.generated/jsx.ts:161
receivesDefault?booleanWhether the widget will receive the default action when it is focused.generated/jsx.ts:163
sensitive?booleanWhether the widget responds to input.generated/jsx.ts:165
tooltipMarkup?string | nullSets the text of tooltip to be the given string, which is marked up with Pango markup. Also see Tooltip.set_markup. This is a convenience property which will take care of getting the tooltip shown if the given string is not NULL: Widget.has-tooltip will automatically be set to true and there will be taken care of Widget.:query-tooltip in the default signal handler. Note that if both Widget.tooltip-text and Widget.tooltip-markup are set, the last one wins.generated/jsx.ts:181
tooltipText?string | nullSets the text of tooltip to be the given string. Also see Tooltip.set_text. This is a convenience property which will take care of getting the tooltip shown if the given string is not NULL: Widget.has-tooltip will automatically be set to true and there will be taken care of Widget.:query-tooltip in the default signal handler. Note that if both Widget.tooltip-text and Widget.tooltip-markup are set, the last one wins.generated/jsx.ts:196
valign?Gtk.AlignHow to distribute vertical space if widget gets extra space.generated/jsx.ts:198
vexpand?booleanWhether to expand vertically.generated/jsx.ts:200
vexpandSet?booleanWhether to use the vexpand property.generated/jsx.ts:202
visible?booleanWhether the widget is visible.generated/jsx.ts:204
widthRequest?numberOverrides for width request of the widget. If this is -1, the natural request will be used.generated/jsx.ts:210