Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
GI.Gtk.Objects.Widget
Contents
- Exported types
- Methods
- actionSetEnabled
- activate
- activateAction
- activateDefault
- addController
- addCssClass
- addMnemonicLabel
- addTickCallback
- allocate
- childFocus
- computeBounds
- computeExpand
- computePoint
- computeTransform
- contains
- createPangoContext
- createPangoLayout
- disposeTemplate
- dragCheckThreshold
- errorBell
- getAllocatedBaseline
- getAllocatedHeight
- getAllocatedWidth
- getAllocation
- getAncestor
- getBaseline
- getCanFocus
- getCanTarget
- getChildVisible
- getClipboard
- getColor
- getCssClasses
- getCssName
- getCursor
- getDefaultDirection
- getDirection
- getDisplay
- getFirstChild
- getFocusChild
- getFocusOnClick
- getFocusable
- getFontMap
- getFontOptions
- getFrameClock
- getHalign
- getHasTooltip
- getHeight
- getHexpand
- getHexpandSet
- getLastChild
- getLayoutManager
- getLimitEvents
- getMapped
- getMarginBottom
- getMarginEnd
- getMarginStart
- getMarginTop
- getName
- getNative
- getNextSibling
- getOpacity
- getOverflow
- getPangoContext
- getParent
- getPreferredSize
- getPrevSibling
- getPrimaryClipboard
- getRealized
- getReceivesDefault
- getRequestMode
- getRoot
- getScaleFactor
- getSensitive
- getSettings
- getSize
- getSizeRequest
- getStateFlags
- getStyleContext
- getTemplateChild
- getTooltipMarkup
- getTooltipText
- getValign
- getVexpand
- getVexpandSet
- getVisible
- getWidth
- grabFocus
- hasCssClass
- hasDefault
- hasFocus
- hasVisibleFocus
- hide
- inDestruction
- initTemplate
- insertActionGroup
- insertAfter
- insertBefore
- isAncestor
- isDrawable
- isFocus
- isSensitive
- isVisible
- keynavFailed
- listMnemonicLabels
- map
- measure
- mnemonicActivate
- observeChildren
- observeControllers
- pick
- queueAllocate
- queueDraw
- queueResize
- realize
- removeController
- removeCssClass
- removeMnemonicLabel
- removeTickCallback
- setCanFocus
- setCanTarget
- setChildVisible
- setCssClasses
- setCursor
- setCursorFromName
- setDefaultDirection
- setDirection
- setFocusChild
- setFocusOnClick
- setFocusable
- setFontMap
- setFontOptions
- setHalign
- setHasTooltip
- setHexpand
- setHexpandSet
- setLayoutManager
- setLimitEvents
- setMarginBottom
- setMarginEnd
- setMarginStart
- setMarginTop
- setName
- setOpacity
- setOverflow
- setParent
- setReceivesDefault
- setSensitive
- setSizeRequest
- setStateFlags
- setTooltipMarkup
- setTooltipText
- setValign
- setVexpand
- setVexpandSet
- setVisible
- shouldLayout
- show
- sizeAllocate
- snapshotChild
- translateCoordinates
- triggerTooltipQuery
- unmap
- unparent
- unrealize
- unsetStateFlags
- Properties
- canFocus
- canTarget
- cssClasses
- cssName
- cursor
- focusOnClick
- focusable
- halign
- hasDefault
- hasFocus
- hasTooltip
- heightRequest
- hexpand
- hexpandSet
- layoutManager
- limitEvents
- marginBottom
- marginEnd
- marginStart
- marginTop
- name
- opacity
- overflow
- parent
- receivesDefault
- root
- scaleFactor
- sensitive
- tooltipMarkup
- tooltipText
- valign
- vexpand
- vexpandSet
- visible
- widthRequest
- Signals
Description
The base class for all widgets.
It manages the widget lifecycle, layout, states and style.
Height-for-width Geometry Management
GTK uses a height-for-width (and width-for-height) geometry management system. Height-for-width means that a widget can change how much vertical space it needs, depending on the amount of horizontal space that it is given (and similar for width-for-height). The most common example is a label that reflows to fill up the available width, wraps to fewer lines, and therefore needs less height.
Height-for-width geometry management is implemented in GTK by way of two virtual methods:
There are some important things to keep in mind when implementing height-for-width and when using it in widget implementations.
If you implement a direct GtkWidget
subclass that supports
height-for-width or width-for-height geometry management for itself
or its child widgets, the Widget
.get_request_mode
() virtual
function must be implemented as well and return the widget's preferred
request mode. The default implementation of this virtual function
returns SizeRequestModeConstantSize
, which means that the widget will
only ever get -1 passed as the for_size value to its
Widget
.measure
() implementation.
The geometry management system will query a widget hierarchy in
only one orientation at a time. When widgets are initially queried
for their minimum sizes it is generally done in two initial passes
in the SizeRequestMode
chosen by the toplevel.
For example, when queried in the normal SizeRequestModeHeightForWidth
mode:
First, the default minimum and natural width for each widget
in the interface will be computed using widgetMeasure
with an
orientation of OrientationHorizontal
and a for_size of -1.
Because the preferred widths for each widget depend on the preferred
widths of their children, this information propagates up the hierarchy,
and finally a minimum and natural width is determined for the entire
toplevel. Next, the toplevel will use the minimum width to query for the
minimum height contextual to that width using widgetMeasure
with an
orientation of OrientationVertical
and a for_size of the just computed
width. This will also be a highly recursive operation. The minimum height
for the minimum width is normally used to set the minimum size constraint
on the toplevel.
After the toplevel window has initially requested its size in both
dimensions it can go on to allocate itself a reasonable size (or a size
previously specified with windowSetDefaultSize
). During the
recursive allocation process it’s important to note that request cycles
will be recursively executed while widgets allocate their children.
Each widget, once allocated a size, will go on to first share the
space in one orientation among its children and then request each child's
height for its target allocated width or its width for allocated height,
depending. In this way a widget will typically be requested its size
a number of times before actually being allocated a size. The size a
widget is finally allocated can of course differ from the size it has
requested. For this reason, GtkWidget
caches a small number of results
to avoid re-querying for the same sizes in one allocation cycle.
If a widget does move content around to intelligently use up the
allocated size then it must support the request in both
GtkSizeRequestMode
s even if the widget in question only
trades sizes in a single orientation.
For instance, a Label
that does height-for-width word wrapping
will not expect to have Widget
.measure
() with an orientation of
OrientationVertical
called because that call is specific to a
width-for-height request. In this case the label must return the height
required for its own minimum possible width. By following this rule any
widget that handles height-for-width or width-for-height requests will
always be allocated at least enough space to fit its own content.
Here are some examples of how a SizeRequestModeHeightForWidth
widget
generally deals with width-for-height requests:
c code
static void foo_widget_measure (GtkWidget *widget, GtkOrientation orientation, int for_size, int *minimum_size, int *natural_size, int *minimum_baseline, int *natural_baseline) { if (orientation == GTK_ORIENTATION_HORIZONTAL) { // Calculate minimum and natural width } else // VERTICAL { if (i_am_in_height_for_width_mode) { int min_width, dummy; // First, get the minimum width of our widget GTK_WIDGET_GET_CLASS (widget)->measure (widget, GTK_ORIENTATION_HORIZONTAL, -1, &min_width, &dummy, &dummy, &dummy); // Now use the minimum width to retrieve the minimum and natural height to display // that width. GTK_WIDGET_GET_CLASS (widget)->measure (widget, GTK_ORIENTATION_VERTICAL, min_width, minimum_size, natural_size, &dummy, &dummy); } else { // ... some widgets do both. } } }
Often a widget needs to get its own request during size request or allocation. For example, when computing height it may need to also compute width. Or when deciding how to use an allocation, the widget may need to know its natural size. In these cases, the widget should be careful to call its virtual methods directly, like in the code example above.
It will not work to use the wrapper function widgetMeasure
inside your own Widget
.size_allocate
() implementation.
These return a request adjusted by SizeGroup
, the widget's
align and expand flags, as well as its CSS style.
If a widget used the wrappers inside its virtual method implementations, then the adjustments (such as widget margins) would be applied twice. GTK therefore does not allow this and will warn if you try to do it.
Of course if you are getting the size request for another widget, such
as a child widget, you must use widgetMeasure
; otherwise, you
would not properly consider widget margins, SizeGroup
, and
so forth.
GTK also supports baseline vertical alignment of widgets. This means that widgets are positioned such that the typographical baseline of widgets in the same row are aligned. This happens if a widget supports baselines, has a vertical alignment using baselines, and is inside a widget that supports baselines and has a natural “row” that it aligns to the baseline, or a baseline assigned to it by the grandparent.
Baseline alignment support for a widget is also done by the
Widget
.measure
() virtual function. It allows you to report
both a minimum and natural size.
If a widget ends up baseline aligned it will be allocated all the space in
the parent as if it was AlignFill
, but the selected baseline can be
found via widgetGetBaseline
. If the baseline has a
value other than -1 you need to align the widget such that the baseline
appears at the position.
GtkWidget as GtkBuildable
The GtkWidget
implementation of the GtkBuildable
interface
supports various custom elements to specify additional aspects of widgets
that are not directly expressed as properties.
If the widget uses a LayoutManager
, GtkWidget
supports
a custom <layout>
element, used to define layout properties:
xml code
<object class="GtkGrid" id="my_grid"> <child> <object class="GtkLabel" id="label1"> <property name="label">Description</property> <layout> <property name="column">0</property> <property name="row">0</property> <property name="row-span">1</property> <property name="column-span">1</property> </layout> </object> </child> <child> <object class="GtkEntry" id="description_entry"> <layout> <property name="column">1</property> <property name="row">0</property> <property name="row-span">1</property> <property name="column-span">1</property> </layout> </object> </child> </object>
GtkWidget
allows style information such as style classes to
be associated with widgets, using the custom <style>
element:
xml code
<object class="GtkButton" id="button1"> <style> <class name="my-special-button-class"/> <class name="dark-button"/> </style> </object>
GtkWidget
allows defining accessibility information, such as properties,
relations, and states, using the custom <accessibility>
element:
xml code
<object class="GtkButton" id="button1"> <accessibility> <property name="label">Download</property> <relation name="labelled-by">label1</relation> </accessibility> </object>
Building composite widgets from template XML
GtkWidget
exposes some facilities to automate the procedure
of creating composite widgets using "templates".
To create composite widgets with GtkBuilder
XML, one must associate
the interface description with the widget class at class initialization
time using widgetClassSetTemplate
.
The interface description semantics expected in composite template descriptions
is slightly different from regular Builder
XML.
Unlike regular interface descriptions, widgetClassSetTemplate
will expect a <template>
tag as a direct child of the toplevel
<interface>
tag. The <template>
tag must specify the “class” attribute
which must be the type name of the widget. Optionally, the “parent”
attribute may be specified to specify the direct parent type of the widget
type; this is ignored by GtkBuilder
but can be used by UI design tools to
introspect what kind of properties and internal children exist for a given
type when the actual type does not exist.
The XML which is contained inside the <template>
tag behaves as if it were
added to the <object>
tag defining the widget itself. You may set properties
on a widget by inserting <property>
tags into the <template>
tag, and also
add <child>
tags to add children and extend a widget in the normal way you
would with <object>
tags.
Additionally, <object>
tags can also be added before and after the initial
<template>
tag in the normal way, allowing one to define auxiliary objects
which might be referenced by other widgets declared as children of the
<template>
tag.
Since, unlike the <object>
tag, the <template>
tag does not contain an
“id” attribute, if you need to refer to the instance of the object itself that
the template will create, simply refer to the template class name in an
applicable element content.
Here is an example of a template definition, which includes an example of
this in the <signal>
tag:
xml code
<interface> <template class="FooWidget" parent="GtkBox"> <property name="orientation">horizontal</property> <property name="spacing">4</property> <child> <object class="GtkButton" id="hello_button"> <property name="label">Hello World</property> <signal name="clicked" handler="hello_button_clicked" object="FooWidget" swapped="yes"/> </object> </child> <child> <object class="GtkButton" id="goodbye_button"> <property name="label">Goodbye World</property> </object> </child> </template> </interface>
Typically, you'll place the template fragment into a file that is
bundled with your project, using GResource
. In order to load the
template, you need to call widgetClassSetTemplateFromResource
from the class initialization of your GtkWidget
type:
c code
static void foo_widget_class_init (FooWidgetClass *klass) { // ... gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/com/example/ui/foowidget.ui"); }
You will also need to call widgetInitTemplate
from the
instance initialization function:
c code
static void foo_widget_init (FooWidget *self) { gtk_widget_init_template (GTK_WIDGET (self)); // Initialize the rest of the widget... }
as well as calling widgetDisposeTemplate
from the dispose
function:
c code
static void foo_widget_dispose (GObject *gobject) { FooWidget *self = FOO_WIDGET (gobject); // Dispose objects for which you have a reference... // Clear the template children for this widget type gtk_widget_dispose_template (GTK_WIDGET (self), FOO_TYPE_WIDGET); G_OBJECT_CLASS (foo_widget_parent_class)->dispose (gobject); }
You can access widgets defined in the template using the
widgetGetTemplateChild
function, but you will typically declare
a pointer in the instance private data structure of your type using the same
name as the widget in the template definition, and call
widgetClassBindTemplateChildFull
(or one of its wrapper macros
Gtk.widget_class_bind_template_child
and Gtk.widget_class_bind_template_child_private
)
with that name, e.g.
c code
typedef struct { GtkWidget *hello_button; GtkWidget *goodbye_button; } FooWidgetPrivate; G_DEFINE_TYPE_WITH_PRIVATE (FooWidget, foo_widget, GTK_TYPE_BOX) static void foo_widget_dispose (GObject *gobject) { gtk_widget_dispose_template (GTK_WIDGET (gobject), FOO_TYPE_WIDGET); G_OBJECT_CLASS (foo_widget_parent_class)->dispose (gobject); } static void foo_widget_class_init (FooWidgetClass *klass) { // ... G_OBJECT_CLASS (klass)->dispose = foo_widget_dispose; gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/com/example/ui/foowidget.ui"); gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass), FooWidget, hello_button); gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass), FooWidget, goodbye_button); } static void foo_widget_init (FooWidget *widget) { gtk_widget_init_template (GTK_WIDGET (widget)); }
You can also use widgetClassBindTemplateCallbackFull
(or
is wrapper macro Gtk.widget_class_bind_template_callback
) to connect
a signal callback defined in the template with a function visible in the
scope of the class, e.g.
c code
// the signal handler has the instance and user data swapped // because of the swapped="yes" attribute in the template XML static void hello_button_clicked (FooWidget *self, GtkButton *button) { g_print ("Hello, world!\n"); } static void foo_widget_class_init (FooWidgetClass *klass) { // ... gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/com/example/ui/foowidget.ui"); gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (klass), hello_button_clicked); }
Synopsis
- newtype Widget = Widget (ManagedPtr Widget)
- class (GObject o, IsDescendantOf Widget o) => IsWidget o
- toWidget :: (MonadIO m, IsWidget o) => o -> m Widget
- widgetActionSetEnabled :: (HasCallStack, MonadIO m, IsWidget a) => a -> Text -> Bool -> m ()
- widgetActivate :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Bool
- widgetActivateAction :: (HasCallStack, MonadIO m, IsWidget a) => a -> Text -> Maybe GVariant -> m Bool
- widgetActivateDefault :: (HasCallStack, MonadIO m, IsWidget a) => a -> m ()
- widgetAddController :: (HasCallStack, MonadIO m, IsWidget a, IsEventController b) => a -> b -> m ()
- widgetAddCssClass :: (HasCallStack, MonadIO m, IsWidget a) => a -> Text -> m ()
- widgetAddMnemonicLabel :: (HasCallStack, MonadIO m, IsWidget a, IsWidget b) => a -> b -> m ()
- widgetAddTickCallback :: (HasCallStack, MonadIO m, IsWidget a) => a -> TickCallback -> m Word32
- widgetAllocate :: (HasCallStack, MonadIO m, IsWidget a) => a -> Int32 -> Int32 -> Int32 -> Maybe Transform -> m ()
- widgetChildFocus :: (HasCallStack, MonadIO m, IsWidget a) => a -> DirectionType -> m Bool
- widgetComputeBounds :: (HasCallStack, MonadIO m, IsWidget a, IsWidget b) => a -> b -> m (Bool, Rect)
- widgetComputeExpand :: (HasCallStack, MonadIO m, IsWidget a) => a -> Orientation -> m Bool
- widgetComputePoint :: (HasCallStack, MonadIO m, IsWidget a, IsWidget b) => a -> b -> Point -> m (Bool, Point)
- widgetComputeTransform :: (HasCallStack, MonadIO m, IsWidget a, IsWidget b) => a -> b -> m (Bool, Matrix)
- widgetContains :: (HasCallStack, MonadIO m, IsWidget a) => a -> Double -> Double -> m Bool
- widgetCreatePangoContext :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Context
- widgetCreatePangoLayout :: (HasCallStack, MonadIO m, IsWidget a) => a -> Maybe Text -> m Layout
- widgetDisposeTemplate :: (HasCallStack, MonadIO m, IsWidget a) => a -> GType -> m ()
- widgetDragCheckThreshold :: (HasCallStack, MonadIO m, IsWidget a) => a -> Int32 -> Int32 -> Int32 -> Int32 -> m Bool
- widgetErrorBell :: (HasCallStack, MonadIO m, IsWidget a) => a -> m ()
- widgetGetAllocatedBaseline :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Int32
- widgetGetAllocatedHeight :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Int32
- widgetGetAllocatedWidth :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Int32
- widgetGetAllocation :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Rectangle
- widgetGetAncestor :: (HasCallStack, MonadIO m, IsWidget a) => a -> GType -> m (Maybe Widget)
- widgetGetBaseline :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Int32
- widgetGetCanFocus :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Bool
- widgetGetCanTarget :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Bool
- widgetGetChildVisible :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Bool
- widgetGetClipboard :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Clipboard
- widgetGetColor :: (HasCallStack, MonadIO m, IsWidget a) => a -> m RGBA
- widgetGetCssClasses :: (HasCallStack, MonadIO m, IsWidget a) => a -> m [Text]
- widgetGetCssName :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Text
- widgetGetCursor :: (HasCallStack, MonadIO m, IsWidget a) => a -> m (Maybe Cursor)
- widgetGetDefaultDirection :: (HasCallStack, MonadIO m) => m TextDirection
- widgetGetDirection :: (HasCallStack, MonadIO m, IsWidget a) => a -> m TextDirection
- widgetGetDisplay :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Display
- widgetGetFirstChild :: (HasCallStack, MonadIO m, IsWidget a) => a -> m (Maybe Widget)
- widgetGetFocusChild :: (HasCallStack, MonadIO m, IsWidget a) => a -> m (Maybe Widget)
- widgetGetFocusOnClick :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Bool
- widgetGetFocusable :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Bool
- widgetGetFontMap :: (HasCallStack, MonadIO m, IsWidget a) => a -> m (Maybe FontMap)
- widgetGetFontOptions :: (HasCallStack, MonadIO m, IsWidget a) => a -> m (Maybe FontOptions)
- widgetGetFrameClock :: (HasCallStack, MonadIO m, IsWidget a) => a -> m (Maybe FrameClock)
- widgetGetHalign :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Align
- widgetGetHasTooltip :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Bool
- widgetGetHeight :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Int32
- widgetGetHexpand :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Bool
- widgetGetHexpandSet :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Bool
- widgetGetLastChild :: (HasCallStack, MonadIO m, IsWidget a) => a -> m (Maybe Widget)
- widgetGetLayoutManager :: (HasCallStack, MonadIO m, IsWidget a) => a -> m (Maybe LayoutManager)
- widgetGetLimitEvents :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Bool
- widgetGetMapped :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Bool
- widgetGetMarginBottom :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Int32
- widgetGetMarginEnd :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Int32
- widgetGetMarginStart :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Int32
- widgetGetMarginTop :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Int32
- widgetGetName :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Text
- widgetGetNative :: (HasCallStack, MonadIO m, IsWidget a) => a -> m (Maybe Native)
- widgetGetNextSibling :: (HasCallStack, MonadIO m, IsWidget a) => a -> m (Maybe Widget)
- widgetGetOpacity :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Double
- widgetGetOverflow :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Overflow
- widgetGetPangoContext :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Context
- widgetGetParent :: (HasCallStack, MonadIO m, IsWidget a) => a -> m (Maybe Widget)
- widgetGetPreferredSize :: (HasCallStack, MonadIO m, IsWidget a) => a -> m (Requisition, Requisition)
- widgetGetPrevSibling :: (HasCallStack, MonadIO m, IsWidget a) => a -> m (Maybe Widget)
- widgetGetPrimaryClipboard :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Clipboard
- widgetGetRealized :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Bool
- widgetGetReceivesDefault :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Bool
- widgetGetRequestMode :: (HasCallStack, MonadIO m, IsWidget a) => a -> m SizeRequestMode
- widgetGetRoot :: (HasCallStack, MonadIO m, IsWidget a) => a -> m (Maybe Root)
- widgetGetScaleFactor :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Int32
- widgetGetSensitive :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Bool
- widgetGetSettings :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Settings
- widgetGetSize :: (HasCallStack, MonadIO m, IsWidget a) => a -> Orientation -> m Int32
- widgetGetSizeRequest :: (HasCallStack, MonadIO m, IsWidget a) => a -> m (Int32, Int32)
- widgetGetStateFlags :: (HasCallStack, MonadIO m, IsWidget a) => a -> m [StateFlags]
- widgetGetStyleContext :: (HasCallStack, MonadIO m, IsWidget a) => a -> m StyleContext
- widgetGetTemplateChild :: (HasCallStack, MonadIO m, IsWidget a) => a -> GType -> Text -> m Object
- widgetGetTooltipMarkup :: (HasCallStack, MonadIO m, IsWidget a) => a -> m (Maybe Text)
- widgetGetTooltipText :: (HasCallStack, MonadIO m, IsWidget a) => a -> m (Maybe Text)
- widgetGetValign :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Align
- widgetGetVexpand :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Bool
- widgetGetVexpandSet :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Bool
- widgetGetVisible :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Bool
- widgetGetWidth :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Int32
- widgetGrabFocus :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Bool
- widgetHasCssClass :: (HasCallStack, MonadIO m, IsWidget a) => a -> Text -> m Bool
- widgetHasDefault :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Bool
- widgetHasFocus :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Bool
- widgetHasVisibleFocus :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Bool
- widgetHide :: (HasCallStack, MonadIO m, IsWidget a) => a -> m ()
- widgetInDestruction :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Bool
- widgetInitTemplate :: (HasCallStack, MonadIO m, IsWidget a) => a -> m ()
- widgetInsertActionGroup :: (HasCallStack, MonadIO m, IsWidget a, IsActionGroup b) => a -> Text -> Maybe b -> m ()
- widgetInsertAfter :: (HasCallStack, MonadIO m, IsWidget a, IsWidget b, IsWidget c) => a -> b -> Maybe c -> m ()
- widgetInsertBefore :: (HasCallStack, MonadIO m, IsWidget a, IsWidget b, IsWidget c) => a -> b -> Maybe c -> m ()
- widgetIsAncestor :: (HasCallStack, MonadIO m, IsWidget a, IsWidget b) => a -> b -> m Bool
- widgetIsDrawable :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Bool
- widgetIsFocus :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Bool
- widgetIsSensitive :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Bool
- widgetIsVisible :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Bool
- widgetKeynavFailed :: (HasCallStack, MonadIO m, IsWidget a) => a -> DirectionType -> m Bool
- widgetListMnemonicLabels :: (HasCallStack, MonadIO m, IsWidget a) => a -> m [Widget]
- widgetMap :: (HasCallStack, MonadIO m, IsWidget a) => a -> m ()
- widgetMeasure :: (HasCallStack, MonadIO m, IsWidget a) => a -> Orientation -> Int32 -> m (Int32, Int32, Int32, Int32)
- widgetMnemonicActivate :: (HasCallStack, MonadIO m, IsWidget a) => a -> Bool -> m Bool
- widgetObserveChildren :: (HasCallStack, MonadIO m, IsWidget a) => a -> m ListModel
- widgetObserveControllers :: (HasCallStack, MonadIO m, IsWidget a) => a -> m ListModel
- widgetPick :: (HasCallStack, MonadIO m, IsWidget a) => a -> Double -> Double -> [PickFlags] -> m (Maybe Widget)
- widgetQueueAllocate :: (HasCallStack, MonadIO m, IsWidget a) => a -> m ()
- widgetQueueDraw :: (HasCallStack, MonadIO m, IsWidget a) => a -> m ()
- widgetQueueResize :: (HasCallStack, MonadIO m, IsWidget a) => a -> m ()
- widgetRealize :: (HasCallStack, MonadIO m, IsWidget a) => a -> m ()
- widgetRemoveController :: (HasCallStack, MonadIO m, IsWidget a, IsEventController b) => a -> b -> m ()
- widgetRemoveCssClass :: (HasCallStack, MonadIO m, IsWidget a) => a -> Text -> m ()
- widgetRemoveMnemonicLabel :: (HasCallStack, MonadIO m, IsWidget a, IsWidget b) => a -> b -> m ()
- widgetRemoveTickCallback :: (HasCallStack, MonadIO m, IsWidget a) => a -> Word32 -> m ()
- widgetSetCanFocus :: (HasCallStack, MonadIO m, IsWidget a) => a -> Bool -> m ()
- widgetSetCanTarget :: (HasCallStack, MonadIO m, IsWidget a) => a -> Bool -> m ()
- widgetSetChildVisible :: (HasCallStack, MonadIO m, IsWidget a) => a -> Bool -> m ()
- widgetSetCssClasses :: (HasCallStack, MonadIO m, IsWidget a) => a -> [Text] -> m ()
- widgetSetCursor :: (HasCallStack, MonadIO m, IsWidget a, IsCursor b) => a -> Maybe b -> m ()
- widgetSetCursorFromName :: (HasCallStack, MonadIO m, IsWidget a) => a -> Maybe Text -> m ()
- widgetSetDefaultDirection :: (HasCallStack, MonadIO m) => TextDirection -> m ()
- widgetSetDirection :: (HasCallStack, MonadIO m, IsWidget a) => a -> TextDirection -> m ()
- widgetSetFocusChild :: (HasCallStack, MonadIO m, IsWidget a, IsWidget b) => a -> Maybe b -> m ()
- widgetSetFocusOnClick :: (HasCallStack, MonadIO m, IsWidget a) => a -> Bool -> m ()
- widgetSetFocusable :: (HasCallStack, MonadIO m, IsWidget a) => a -> Bool -> m ()
- widgetSetFontMap :: (HasCallStack, MonadIO m, IsWidget a, IsFontMap b) => a -> Maybe b -> m ()
- widgetSetFontOptions :: (HasCallStack, MonadIO m, IsWidget a) => a -> Maybe FontOptions -> m ()
- widgetSetHalign :: (HasCallStack, MonadIO m, IsWidget a) => a -> Align -> m ()
- widgetSetHasTooltip :: (HasCallStack, MonadIO m, IsWidget a) => a -> Bool -> m ()
- widgetSetHexpand :: (HasCallStack, MonadIO m, IsWidget a) => a -> Bool -> m ()
- widgetSetHexpandSet :: (HasCallStack, MonadIO m, IsWidget a) => a -> Bool -> m ()
- widgetSetLayoutManager :: (HasCallStack, MonadIO m, IsWidget a, IsLayoutManager b) => a -> Maybe b -> m ()
- widgetSetLimitEvents :: (HasCallStack, MonadIO m, IsWidget a) => a -> Bool -> m ()
- widgetSetMarginBottom :: (HasCallStack, MonadIO m, IsWidget a) => a -> Int32 -> m ()
- widgetSetMarginEnd :: (HasCallStack, MonadIO m, IsWidget a) => a -> Int32 -> m ()
- widgetSetMarginStart :: (HasCallStack, MonadIO m, IsWidget a) => a -> Int32 -> m ()
- widgetSetMarginTop :: (HasCallStack, MonadIO m, IsWidget a) => a -> Int32 -> m ()
- widgetSetName :: (HasCallStack, MonadIO m, IsWidget a) => a -> Text -> m ()
- widgetSetOpacity :: (HasCallStack, MonadIO m, IsWidget a) => a -> Double -> m ()
- widgetSetOverflow :: (HasCallStack, MonadIO m, IsWidget a) => a -> Overflow -> m ()
- widgetSetParent :: (HasCallStack, MonadIO m, IsWidget a, IsWidget b) => a -> b -> m ()
- widgetSetReceivesDefault :: (HasCallStack, MonadIO m, IsWidget a) => a -> Bool -> m ()
- widgetSetSensitive :: (HasCallStack, MonadIO m, IsWidget a) => a -> Bool -> m ()
- widgetSetSizeRequest :: (HasCallStack, MonadIO m, IsWidget a) => a -> Int32 -> Int32 -> m ()
- widgetSetStateFlags :: (HasCallStack, MonadIO m, IsWidget a) => a -> [StateFlags] -> Bool -> m ()
- widgetSetTooltipMarkup :: (HasCallStack, MonadIO m, IsWidget a) => a -> Maybe Text -> m ()
- widgetSetTooltipText :: (HasCallStack, MonadIO m, IsWidget a) => a -> Maybe Text -> m ()
- widgetSetValign :: (HasCallStack, MonadIO m, IsWidget a) => a -> Align -> m ()
- widgetSetVexpand :: (HasCallStack, MonadIO m, IsWidget a) => a -> Bool -> m ()
- widgetSetVexpandSet :: (HasCallStack, MonadIO m, IsWidget a) => a -> Bool -> m ()
- widgetSetVisible :: (HasCallStack, MonadIO m, IsWidget a) => a -> Bool -> m ()
- widgetShouldLayout :: (HasCallStack, MonadIO m, IsWidget a) => a -> m Bool
- widgetShow :: (HasCallStack, MonadIO m, IsWidget a) => a -> m ()
- widgetSizeAllocate :: (HasCallStack, MonadIO m, IsWidget a) => a -> Rectangle -> Int32 -> m ()
- widgetSnapshotChild :: (HasCallStack, MonadIO m, IsWidget a, IsWidget b, IsSnapshot c) => a -> b -> c -> m ()
- widgetTranslateCoordinates :: (HasCallStack, MonadIO m, IsWidget a, IsWidget b) => a -> b -> Double -> Double -> m (Bool, Double, Double)
- widgetTriggerTooltipQuery :: (HasCallStack, MonadIO m, IsWidget a) => a -> m ()
- widgetUnmap :: (HasCallStack, MonadIO m, IsWidget a) => a -> m ()
- widgetUnparent :: (HasCallStack, MonadIO m, IsWidget a) => a -> m ()
- widgetUnrealize :: (HasCallStack, MonadIO m, IsWidget a) => a -> m ()
- widgetUnsetStateFlags :: (HasCallStack, MonadIO m, IsWidget a) => a -> [StateFlags] -> m ()
- constructWidgetCanFocus :: (IsWidget o, MonadIO m) => Bool -> m (GValueConstruct o)
- getWidgetCanFocus :: (MonadIO m, IsWidget o) => o -> m Bool
- setWidgetCanFocus :: (MonadIO m, IsWidget o) => o -> Bool -> m ()
- constructWidgetCanTarget :: (IsWidget o, MonadIO m) => Bool -> m (GValueConstruct o)
- getWidgetCanTarget :: (MonadIO m, IsWidget o) => o -> m Bool
- setWidgetCanTarget :: (MonadIO m, IsWidget o) => o -> Bool -> m ()
- constructWidgetCssClasses :: (IsWidget o, MonadIO m) => [Text] -> m (GValueConstruct o)
- getWidgetCssClasses :: (MonadIO m, IsWidget o) => o -> m (Maybe [Text])
- setWidgetCssClasses :: (MonadIO m, IsWidget o) => o -> [Text] -> m ()
- constructWidgetCssName :: (IsWidget o, MonadIO m) => Text -> m (GValueConstruct o)
- getWidgetCssName :: (MonadIO m, IsWidget o) => o -> m Text
- clearWidgetCursor :: (MonadIO m, IsWidget o) => o -> m ()
- constructWidgetCursor :: (IsWidget o, MonadIO m, IsCursor a) => a -> m (GValueConstruct o)
- getWidgetCursor :: (MonadIO m, IsWidget o) => o -> m (Maybe Cursor)
- setWidgetCursor :: (MonadIO m, IsWidget o, IsCursor a) => o -> a -> m ()
- constructWidgetFocusOnClick :: (IsWidget o, MonadIO m) => Bool -> m (GValueConstruct o)
- getWidgetFocusOnClick :: (MonadIO m, IsWidget o) => o -> m Bool
- setWidgetFocusOnClick :: (MonadIO m, IsWidget o) => o -> Bool -> m ()
- constructWidgetFocusable :: (IsWidget o, MonadIO m) => Bool -> m (GValueConstruct o)
- getWidgetFocusable :: (MonadIO m, IsWidget o) => o -> m Bool
- setWidgetFocusable :: (MonadIO m, IsWidget o) => o -> Bool -> m ()
- constructWidgetHalign :: (IsWidget o, MonadIO m) => Align -> m (GValueConstruct o)
- getWidgetHalign :: (MonadIO m, IsWidget o) => o -> m Align
- setWidgetHalign :: (MonadIO m, IsWidget o) => o -> Align -> m ()
- getWidgetHasDefault :: (MonadIO m, IsWidget o) => o -> m Bool
- getWidgetHasFocus :: (MonadIO m, IsWidget o) => o -> m Bool
- constructWidgetHasTooltip :: (IsWidget o, MonadIO m) => Bool -> m (GValueConstruct o)
- getWidgetHasTooltip :: (MonadIO m, IsWidget o) => o -> m Bool
- setWidgetHasTooltip :: (MonadIO m, IsWidget o) => o -> Bool -> m ()
- constructWidgetHeightRequest :: (IsWidget o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getWidgetHeightRequest :: (MonadIO m, IsWidget o) => o -> m Int32
- setWidgetHeightRequest :: (MonadIO m, IsWidget o) => o -> Int32 -> m ()
- constructWidgetHexpand :: (IsWidget o, MonadIO m) => Bool -> m (GValueConstruct o)
- getWidgetHexpand :: (MonadIO m, IsWidget o) => o -> m Bool
- setWidgetHexpand :: (MonadIO m, IsWidget o) => o -> Bool -> m ()
- constructWidgetHexpandSet :: (IsWidget o, MonadIO m) => Bool -> m (GValueConstruct o)
- getWidgetHexpandSet :: (MonadIO m, IsWidget o) => o -> m Bool
- setWidgetHexpandSet :: (MonadIO m, IsWidget o) => o -> Bool -> m ()
- clearWidgetLayoutManager :: (MonadIO m, IsWidget o) => o -> m ()
- constructWidgetLayoutManager :: (IsWidget o, MonadIO m, IsLayoutManager a) => a -> m (GValueConstruct o)
- getWidgetLayoutManager :: (MonadIO m, IsWidget o) => o -> m (Maybe LayoutManager)
- setWidgetLayoutManager :: (MonadIO m, IsWidget o, IsLayoutManager a) => o -> a -> m ()
- constructWidgetLimitEvents :: (IsWidget o, MonadIO m) => Bool -> m (GValueConstruct o)
- getWidgetLimitEvents :: (MonadIO m, IsWidget o) => o -> m Bool
- setWidgetLimitEvents :: (MonadIO m, IsWidget o) => o -> Bool -> m ()
- constructWidgetMarginBottom :: (IsWidget o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getWidgetMarginBottom :: (MonadIO m, IsWidget o) => o -> m Int32
- setWidgetMarginBottom :: (MonadIO m, IsWidget o) => o -> Int32 -> m ()
- constructWidgetMarginEnd :: (IsWidget o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getWidgetMarginEnd :: (MonadIO m, IsWidget o) => o -> m Int32
- setWidgetMarginEnd :: (MonadIO m, IsWidget o) => o -> Int32 -> m ()
- constructWidgetMarginStart :: (IsWidget o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getWidgetMarginStart :: (MonadIO m, IsWidget o) => o -> m Int32
- setWidgetMarginStart :: (MonadIO m, IsWidget o) => o -> Int32 -> m ()
- constructWidgetMarginTop :: (IsWidget o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getWidgetMarginTop :: (MonadIO m, IsWidget o) => o -> m Int32
- setWidgetMarginTop :: (MonadIO m, IsWidget o) => o -> Int32 -> m ()
- constructWidgetName :: (IsWidget o, MonadIO m) => Text -> m (GValueConstruct o)
- getWidgetName :: (MonadIO m, IsWidget o) => o -> m Text
- setWidgetName :: (MonadIO m, IsWidget o) => o -> Text -> m ()
- constructWidgetOpacity :: (IsWidget o, MonadIO m) => Double -> m (GValueConstruct o)
- getWidgetOpacity :: (MonadIO m, IsWidget o) => o -> m Double
- setWidgetOpacity :: (MonadIO m, IsWidget o) => o -> Double -> m ()
- constructWidgetOverflow :: (IsWidget o, MonadIO m) => Overflow -> m (GValueConstruct o)
- getWidgetOverflow :: (MonadIO m, IsWidget o) => o -> m Overflow
- setWidgetOverflow :: (MonadIO m, IsWidget o) => o -> Overflow -> m ()
- getWidgetParent :: (MonadIO m, IsWidget o) => o -> m (Maybe Widget)
- constructWidgetReceivesDefault :: (IsWidget o, MonadIO m) => Bool -> m (GValueConstruct o)
- getWidgetReceivesDefault :: (MonadIO m, IsWidget o) => o -> m Bool
- setWidgetReceivesDefault :: (MonadIO m, IsWidget o) => o -> Bool -> m ()
- getWidgetRoot :: (MonadIO m, IsWidget o) => o -> m (Maybe Root)
- getWidgetScaleFactor :: (MonadIO m, IsWidget o) => o -> m Int32
- constructWidgetSensitive :: (IsWidget o, MonadIO m) => Bool -> m (GValueConstruct o)
- getWidgetSensitive :: (MonadIO m, IsWidget o) => o -> m Bool
- setWidgetSensitive :: (MonadIO m, IsWidget o) => o -> Bool -> m ()
- clearWidgetTooltipMarkup :: (MonadIO m, IsWidget o) => o -> m ()
- constructWidgetTooltipMarkup :: (IsWidget o, MonadIO m) => Text -> m (GValueConstruct o)
- getWidgetTooltipMarkup :: (MonadIO m, IsWidget o) => o -> m (Maybe Text)
- setWidgetTooltipMarkup :: (MonadIO m, IsWidget o) => o -> Text -> m ()
- clearWidgetTooltipText :: (MonadIO m, IsWidget o) => o -> m ()
- constructWidgetTooltipText :: (IsWidget o, MonadIO m) => Text -> m (GValueConstruct o)
- getWidgetTooltipText :: (MonadIO m, IsWidget o) => o -> m (Maybe Text)
- setWidgetTooltipText :: (MonadIO m, IsWidget o) => o -> Text -> m ()
- constructWidgetValign :: (IsWidget o, MonadIO m) => Align -> m (GValueConstruct o)
- getWidgetValign :: (MonadIO m, IsWidget o) => o -> m Align
- setWidgetValign :: (MonadIO m, IsWidget o) => o -> Align -> m ()
- constructWidgetVexpand :: (IsWidget o, MonadIO m) => Bool -> m (GValueConstruct o)
- getWidgetVexpand :: (MonadIO m, IsWidget o) => o -> m Bool
- setWidgetVexpand :: (MonadIO m, IsWidget o) => o -> Bool -> m ()
- constructWidgetVexpandSet :: (IsWidget o, MonadIO m) => Bool -> m (GValueConstruct o)
- getWidgetVexpandSet :: (MonadIO m, IsWidget o) => o -> m Bool
- setWidgetVexpandSet :: (MonadIO m, IsWidget o) => o -> Bool -> m ()
- constructWidgetVisible :: (IsWidget o, MonadIO m) => Bool -> m (GValueConstruct o)
- getWidgetVisible :: (MonadIO m, IsWidget o) => o -> m Bool
- setWidgetVisible :: (MonadIO m, IsWidget o) => o -> Bool -> m ()
- constructWidgetWidthRequest :: (IsWidget o, MonadIO m) => Int32 -> m (GValueConstruct o)
- getWidgetWidthRequest :: (MonadIO m, IsWidget o) => o -> m Int32
- setWidgetWidthRequest :: (MonadIO m, IsWidget o) => o -> Int32 -> m ()
- type WidgetDestroyCallback = IO ()
- afterWidgetDestroy :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetDestroyCallback) -> m SignalHandlerId
- onWidgetDestroy :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetDestroyCallback) -> m SignalHandlerId
- type WidgetDirectionChangedCallback = TextDirection -> IO ()
- afterWidgetDirectionChanged :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetDirectionChangedCallback) -> m SignalHandlerId
- onWidgetDirectionChanged :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetDirectionChangedCallback) -> m SignalHandlerId
- type WidgetHideCallback = IO ()
- afterWidgetHide :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetHideCallback) -> m SignalHandlerId
- onWidgetHide :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetHideCallback) -> m SignalHandlerId
- type WidgetKeynavFailedCallback = DirectionType -> IO Bool
- afterWidgetKeynavFailed :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetKeynavFailedCallback) -> m SignalHandlerId
- onWidgetKeynavFailed :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetKeynavFailedCallback) -> m SignalHandlerId
- type WidgetMapCallback = IO ()
- afterWidgetMap :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetMapCallback) -> m SignalHandlerId
- onWidgetMap :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetMapCallback) -> m SignalHandlerId
- type WidgetMnemonicActivateCallback = Bool -> IO Bool
- afterWidgetMnemonicActivate :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetMnemonicActivateCallback) -> m SignalHandlerId
- onWidgetMnemonicActivate :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetMnemonicActivateCallback) -> m SignalHandlerId
- type WidgetMoveFocusCallback = DirectionType -> IO ()
- afterWidgetMoveFocus :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetMoveFocusCallback) -> m SignalHandlerId
- onWidgetMoveFocus :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetMoveFocusCallback) -> m SignalHandlerId
- type WidgetQueryTooltipCallback = Int32 -> Int32 -> Bool -> Tooltip -> IO Bool
- afterWidgetQueryTooltip :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetQueryTooltipCallback) -> m SignalHandlerId
- onWidgetQueryTooltip :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetQueryTooltipCallback) -> m SignalHandlerId
- type WidgetRealizeCallback = IO ()
- afterWidgetRealize :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetRealizeCallback) -> m SignalHandlerId
- onWidgetRealize :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetRealizeCallback) -> m SignalHandlerId
- type WidgetShowCallback = IO ()
- afterWidgetShow :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetShowCallback) -> m SignalHandlerId
- onWidgetShow :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetShowCallback) -> m SignalHandlerId
- type WidgetStateFlagsChangedCallback = [StateFlags] -> IO ()
- afterWidgetStateFlagsChanged :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetStateFlagsChangedCallback) -> m SignalHandlerId
- onWidgetStateFlagsChanged :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetStateFlagsChangedCallback) -> m SignalHandlerId
- type WidgetUnmapCallback = IO ()
- afterWidgetUnmap :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetUnmapCallback) -> m SignalHandlerId
- onWidgetUnmap :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetUnmapCallback) -> m SignalHandlerId
- type WidgetUnrealizeCallback = IO ()
- afterWidgetUnrealize :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetUnrealizeCallback) -> m SignalHandlerId
- onWidgetUnrealize :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetUnrealizeCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Constructors
Widget (ManagedPtr Widget) |
Instances
Eq Widget Source # | |
GObject Widget Source # | |
Defined in GI.Gtk.Objects.Widget | |
ManagedPtrNewtype Widget Source # | |
Defined in GI.Gtk.Objects.Widget Methods toManagedPtr :: Widget -> ManagedPtr Widget # | |
TypedObject Widget Source # | |
Defined in GI.Gtk.Objects.Widget | |
HasParentTypes Widget Source # | |
Defined in GI.Gtk.Objects.Widget | |
IsGValue (Maybe Widget) Source # | Convert |
Defined in GI.Gtk.Objects.Widget | |
type ParentTypes Widget Source # | |
Defined in GI.Gtk.Objects.Widget |
Methods
Click to display all available methods, including inherited ones
Methods
actionSetEnabled, activate, activateAction, activateDefault, addController, addCssClass, addMnemonicLabel, addTickCallback, allocate, announce, bindProperty, bindPropertyFull, childFocus, computeBounds, computeExpand, computePoint, computeTransform, contains, createPangoContext, createPangoLayout, disposeTemplate, dragCheckThreshold, errorBell, forceFloating, freezeNotify, getv, grabFocus, hasCssClass, hasDefault, hasFocus, hasVisibleFocus, hide, inDestruction, initTemplate, insertActionGroup, insertAfter, insertBefore, isAncestor, isDrawable, isFloating, isFocus, isSensitive, isVisible, keynavFailed, listMnemonicLabels, map, measure, mnemonicActivate, notify, notifyByPspec, observeChildren, observeControllers, pick, queueAllocate, queueDraw, queueResize, realize, ref, refSink, removeController, removeCssClass, removeMnemonicLabel, removeTickCallback, resetProperty, resetRelation, resetState, runDispose, shouldLayout, show, sizeAllocate, snapshotChild, stealData, stealQdata, thawNotify, translateCoordinates, triggerTooltipQuery, unmap, unparent, unrealize, unref, unsetStateFlags, updateNextAccessibleSibling, updatePlatformState, updateProperty, updateRelation, updateState, watchClosure.
Getters
getAccessibleParent, getAccessibleRole, getAllocatedBaseline, getAllocatedHeight, getAllocatedWidth, getAllocation, getAncestor, getAtContext, getBaseline, getBounds, getBuildableId, getCanFocus, getCanTarget, getChildVisible, getClipboard, getColor, getCssClasses, getCssName, getCursor, getData, getDirection, getDisplay, getFirstAccessibleChild, getFirstChild, getFocusChild, getFocusOnClick, getFocusable, getFontMap, getFontOptions, getFrameClock, getHalign, getHasTooltip, getHeight, getHexpand, getHexpandSet, getLastChild, getLayoutManager, getLimitEvents, getMapped, getMarginBottom, getMarginEnd, getMarginStart, getMarginTop, getName, getNative, getNextAccessibleSibling, getNextSibling, getOpacity, getOverflow, getPangoContext, getParent, getPlatformState, getPreferredSize, getPrevSibling, getPrimaryClipboard, getProperty, getQdata, getRealized, getReceivesDefault, getRequestMode, getRoot, getScaleFactor, getSensitive, getSettings, getSize, getSizeRequest, getStateFlags, getStyleContext, getTemplateChild, getTooltipMarkup, getTooltipText, getValign, getVexpand, getVexpandSet, getVisible, getWidth.
Setters
setAccessibleParent, setCanFocus, setCanTarget, setChildVisible, setCssClasses, setCursor, setCursorFromName, setData, setDataFull, setDirection, setFocusChild, setFocusOnClick, setFocusable, setFontMap, setFontOptions, setHalign, setHasTooltip, setHexpand, setHexpandSet, setLayoutManager, setLimitEvents, setMarginBottom, setMarginEnd, setMarginStart, setMarginTop, setName, setOpacity, setOverflow, setParent, setProperty, setReceivesDefault, setSensitive, setSizeRequest, setStateFlags, setTooltipMarkup, setTooltipText, setValign, setVexpand, setVexpandSet, setVisible.
actionSetEnabled
widgetActionSetEnabled Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Text |
|
-> Bool |
|
-> m () |
Enables or disables an action installed with
widgetClassInstallAction
.
activate
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Bool | Returns: true if the widget was activated |
Activates the widget.
The activation will emit the signal set using
widgetClassSetActivateSignal
during class initialization.
Activation is what happens when you press <kbd>Enter</kbd> on a widget.
If you wish to handle the activation keybinding yourself,
it is recommended to use widgetClassAddShortcut
with an action created with signalActionNew
.
If widget
is not activatable, the function returns false.
activateAction
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Text |
|
-> Maybe GVariant |
|
-> m Bool | Returns: true if the action was activated |
Activates an action for the widget.
The action is looked up in the action groups associated with
widget
and its ancestors.
If the action is in an action group added with
widgetInsertActionGroup
, the name
is expected
to be prefixed with the prefix that was used when the group was
inserted.
The arguments must match the actions expected parameter type,
as returned by actionGetParameterType
.
activateDefault
widgetActivateDefault Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m () |
Activates the default.activate
action for the widget.
The action is looked up in the same was as for
widgetActivateAction
.
addController
Arguments
:: (HasCallStack, MonadIO m, IsWidget a, IsEventController b) | |
=> a |
|
-> b |
|
-> m () |
Adds an event controller to the widget.
The event controllers of a widget handle the events that are propagated to the widget.
You will usually want to call this function right after
creating any kind of EventController
.
addCssClass
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Text |
|
-> m () |
Adds a style class to the widget.
After calling this function, the widget’s style will match
for cssClass
, according to CSS matching rules.
Use widgetRemoveCssClass
to remove the
style again.
addMnemonicLabel
widgetAddMnemonicLabel Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a, IsWidget b) | |
=> a |
|
-> b |
|
-> m () |
Adds a widget to the list of mnemonic labels for this widget.
Note that the list of mnemonic labels for the widget is cleared when the widget is destroyed, so the caller must make sure to update its internal state at this point as well.
addTickCallback
widgetAddTickCallback Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> TickCallback |
|
-> m Word32 | Returns: an ID for this callback |
Queues an animation frame update and adds a callback to be called before each frame.
Until the tick callback is removed, it will be called frequently (usually at the frame rate of the output device or as quickly as the application can be repainted, whichever is slower). For this reason, is most suitable for handling graphics that change every frame or every few frames.
The tick callback does not automatically imply a relayout or repaint.
If you want a repaint or relayout, and aren’t changing widget properties
that would trigger that (for example, changing the text of a label),
then you will have to call widgetQueueResize
or
widgetQueueDraw
yourself.
frameClockGetFrameTime
should generally be used
for timing continuous animations and
frameTimingsGetPredictedPresentationTime
should be
used if you are trying to display isolated frames at particular times.
This is a more convenient alternative to connecting directly to the FrameClock::update signal of the frame clock, since you don't have to worry about when a frame clock is assigned to a widget.
To remove a tick callback, pass the ID that is returned by this function
to widgetRemoveTickCallback
.
allocate
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> Int32 |
|
-> Maybe Transform |
|
-> m () |
Assigns size, position, (optionally) a baseline and transform to a child widget.
In this function, the allocation and baseline may be adjusted. The given allocation will be forced to be bigger than the widget's minimum size, as well as at least 0×0 in size.
This function is only used by widget implementations.
For a version that does not take a transform, see
widgetSizeAllocate
.
childFocus
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> DirectionType |
|
-> m Bool | Returns: true if focus ended up inside |
Called by widgets as the user moves around the window using keyboard shortcuts.
The direction
argument indicates what kind of motion is taking
place (up, down, left, right, tab forward, tab backward).
This function calls the Widget
.focus
() virtual function;
widgets can override the virtual function in order to implement
appropriate focus behavior.
The default focus()
virtual function for a widget should return
true if moving in direction
left the focus on a focusable location
inside that widget, and false if moving in direction
moved the focus
outside the widget. When returning true, widgets normally call
widgetGrabFocus
to place the focus accordingly;
when returning false, they don’t modify the current focus location.
This function is used by custom widget implementations; if you're
writing an app, you’d use widgetGrabFocus
to move
the focus to a particular widget.
computeBounds
Arguments
:: (HasCallStack, MonadIO m, IsWidget a, IsWidget b) | |
=> a |
|
-> b |
|
-> m (Bool, Rect) | Returns: true if the bounds could be computed |
Computes the bounds for widget
in the coordinate space of target
.
The bounds of widget are (the bounding box of) the region that it is expected to draw in. See the coordinate system overview to learn more.
If the operation is successful, true is returned. If widget
has no
bounds or the bounds cannot be expressed in target
's coordinate space
(for example if both widgets are in different windows), false is
returned and bounds
is set to the zero rectangle.
It is valid for widget
and target
to be the same widget.
computeExpand
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Orientation |
|
-> m Bool | Returns: whether widget tree rooted here should be expanded |
Computes whether a parent widget should give this widget extra space when possible.
Widgets with children should check this, rather than looking at
widgetGetHexpand
or widgetGetVexpand
.
This function already checks whether the widget is visible, so visibility does not need to be checked separately. Non-visible widgets are not expanded.
The computed expand value uses either the expand setting explicitly set on the widget itself, or, if none has been explicitly set, the widget may expand if some of its children do.
computePoint
Arguments
:: (HasCallStack, MonadIO m, IsWidget a, IsWidget b) | |
=> a |
|
-> b |
|
-> Point |
|
-> m (Bool, Point) | Returns: true if |
Translates the given point
in widget
's coordinates to coordinates
in target
’s coordinate system.
In order to perform this operation, both widgets must share a
a common ancestor. If that is not the case, outPoint
is set
to (0, 0) and false is returned.
computeTransform
widgetComputeTransform Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a, IsWidget b) | |
=> a |
|
-> b |
|
-> m (Bool, Matrix) | Returns: true if the transform could be computed |
Computes a matrix suitable to describe a transformation from
widget
's coordinate system into target
's coordinate system.
The transform can not be computed in certain cases, for example
when widget
and target
do not share a common ancestor. In that
case outTransform
gets set to the identity matrix.
To learn more about widget coordinate systems, see the coordinate system overview.
contains
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Double |
|
-> Double |
|
-> m Bool | Returns: true if |
Tests if a given point is contained in the widget.
The coordinates for (x, y) must be in widget coordinates, so
(0, 0) is assumed to be the top left of widget
's content area.
createPangoContext
widgetCreatePangoContext Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Context | Returns: the new |
Creates a new PangoContext
that is configured for the widget.
The PangoContext
will have the appropriate font map,
font options, font description, and base direction set.
See also widgetGetPangoContext
.
createPangoLayout
widgetCreatePangoLayout Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Maybe Text |
|
-> m Layout | Returns: the new |
Creates a new PangoLayout
that is configured for the widget.
The PangoLayout
will have the appropriate font map,
font description, and base direction set.
If you keep a PangoLayout
created in this way around,
you need to re-create it when the widgets PangoContext
is replaced. This can be tracked by listening to changes
of the Widget:root property on the widget.
disposeTemplate
widgetDisposeTemplate Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> GType |
|
-> m () |
Clears the template children for the widget.
This function is the opposite of widgetInitTemplate
,
and it is used to clear all the template children from a widget
instance. If you bound a template child to a field in the instance
structure, or in the instance private data structure, the field will
be set to NULL
after this function returns.
You should call this function inside the GObjectClass.dispose()
implementation of any widget that called widgetInitTemplate
.
Typically, you will want to call this function last, right before
chaining up to the parent type's dispose implementation, e.g.
c code
static void some_widget_dispose (GObject *gobject) { SomeWidget *self = SOME_WIDGET (gobject); // Clear the template data for SomeWidget gtk_widget_dispose_template (GTK_WIDGET (self), SOME_TYPE_WIDGET); G_OBJECT_CLASS (some_widget_parent_class)->dispose (gobject); }
Since: 4.8
dragCheckThreshold
widgetDragCheckThreshold Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> Int32 |
|
-> Int32 |
|
-> m Bool | Returns: true if the drag threshold has been passed |
Checks to see if a drag movement has passed the GTK drag threshold.
errorBell
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m () |
Notifies the user about an input-related error on the widget.
If the Settings:gtkErrorBell setting is true,
it calls surfaceBeep
, otherwise it does nothing.
Note that the effect of surfaceBeep
can be configured
in many ways, depending on the windowing backend and the desktop
environment or window manager that is used.
getAllocatedBaseline
widgetGetAllocatedBaseline Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Int32 | Returns: the baseline of the |
Deprecated: (Since version 4.12)Use widgetGetBaseline
instead
Returns the baseline that has currently been allocated to the widget.
This function is intended to be used when implementing handlers
for the GtkWidget
Class.snapshot()
function, and when allocating
child widgets in GtkWidget
Class.size_allocate()
.
getAllocatedHeight
widgetGetAllocatedHeight Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Int32 | Returns: the height of the |
Deprecated: (Since version 4.12)Use widgetGetHeight
instead
Returns the height that has currently been allocated to the widget.
To learn more about widget sizes, see the coordinate system overview.
getAllocatedWidth
widgetGetAllocatedWidth Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Int32 | Returns: the width of the |
Deprecated: (Since version 4.12)Use widgetGetWidth
instead
Returns the width that has currently been allocated to the widget.
To learn more about widget sizes, see the coordinate system overview.
getAllocation
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Rectangle |
Deprecated: (Since version 4.12)Use widgetComputeBounds
,widgetGetWidth
or widgetGetHeight
instead.
Retrieves the widget’s allocation.
Note, when implementing a layout widget: a widget’s allocation
will be its “adjusted” allocation, that is, the widget’s parent
typically calls widgetSizeAllocate
with an allocation,
and that allocation is then adjusted (to handle margin
and alignment for example) before assignment to the widget.
widgetGetAllocation
returns the adjusted allocation that
was actually assigned to the widget. The adjusted allocation is
guaranteed to be completely contained within the
widgetSizeAllocate
allocation, however.
So a layout widget is guaranteed that its children stay inside the assigned bounds, but not that they have exactly the bounds the widget assigned.
getAncestor
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> GType |
|
-> m (Maybe Widget) | Returns: the ancestor widget |
Gets the first ancestor of the widget with type widgetType
.
For example, gtk_widget_get_ancestor (widget, GTK_TYPE_BOX)
gets the first GtkBox
that’s an ancestor of widget
. No
reference will be added to the returned widget; it should
not be unreferenced.
Note that unlike widgetIsAncestor
, this function
considers widget
to be an ancestor of itself.
getBaseline
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Int32 | Returns: the baseline of the |
Returns the baseline that has currently been allocated to the widget.
This function is intended to be used when implementing handlers
for the GtkWidgetClass.snapshot()
function, and when allocating
child widgets in GtkWidgetClass.size_allocate()
.
Since: 4.12
getCanFocus
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Bool | Returns: true if the input focus can enter |
Determines whether the input focus can enter the widget or any of its children.
See widgetSetCanFocus
.
getCanTarget
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Bool | Returns: true if |
Queries whether the widget can be the target of pointer events.
getChildVisible
widgetGetChildVisible Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Bool | Returns: true if the widget is mapped with the parent |
Gets the value set with widgetSetChildVisible
.
If you feel a need to use this function, your code probably needs reorganization.
This function is only useful for widget implementations and should never be called by an application.
getClipboard
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Clipboard | Returns: the appropriate clipboard object |
Gets the clipboard object for the widget.
This is a utility function to get the clipboard object for the
display that widget
is using.
Note that this function always works, even when widget
is not
realized yet.
getColor
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m RGBA |
Gets the current foreground color for the widget’s style.
This function should only be used in snapshot implementations that need to do custom drawing with the foreground color.
Since: 4.10
getCssClasses
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m [Text] | Returns: a |
Returns the list of style classes applied to the widget.
getCssName
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Text | Returns: the CSS name |
Returns the CSS name of the widget.
getCursor
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m (Maybe Cursor) | Returns: the cursor
that is set on |
Gets the cursor set on the widget.
See widgetSetCursor
for details.
getDefaultDirection
widgetGetDefaultDirection Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> m TextDirection | Returns: the current default direction |
Obtains the default reading direction.
getDirection
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m TextDirection | Returns: the reading direction for the widget |
Gets the reading direction for the widget.
See widgetSetDirection
.
getDisplay
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Display | Returns: the display for this widget |
Get the display for the window that the widget belongs to.
This function can only be called after the widget has been
added to a widget hierarchy with a GtkRoot
at the top.
In general, you should only create display-specific resources when a widget has been realized, and you should free those resources when the widget is unrealized.
getFirstChild
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m (Maybe Widget) | Returns: the widget's first child |
Returns the widget’s first child.
This function is primarily meant for widget implementations.
getFocusChild
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m (Maybe Widget) | Returns: the current focus
child of |
Returns the focus child of the widget.
getFocusOnClick
widgetGetFocusOnClick Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Bool | Returns: true if the widget should grab focus when it is clicked with the mouse |
Returns whether the widget should grab focus when it is clicked with the mouse.
getFocusable
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Bool | Returns: true if |
Determines whether the widget can own the input focus.
See widgetSetFocusable
.
getFontMap
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m (Maybe FontMap) | Returns: the font map of |
Gets the font map of the widget.
See widgetSetFontMap
.
getFontOptions
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m (Maybe FontOptions) | Returns: the |
Deprecated: (Since version 4.16)
Returns the cairo_font_options_t
of the widget.
Seee widgetSetFontOptions
.
getFrameClock
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m (Maybe FrameClock) | Returns: the frame clock |
Obtains the frame clock for a widget.
The frame clock is a global “ticker” that can be used to drive
animations and repaints. The most common reason to get the frame
clock is to call frameClockGetFrameTime
, in order
to get a time to use for animating. For example you might record
the start of the animation with an initial value from
frameClockGetFrameTime
, and then update the animation
by calling frameClockGetFrameTime
again during each repaint.
frameClockRequestPhase
will result in a new frame on the
clock, but won’t necessarily repaint any widgets. To repaint a widget,
you have to use widgetQueueDraw
which invalidates the
widget (thus scheduling it to receive a draw on the next frame).
widgetQueueDraw
will also end up requesting a frame
on the appropriate frame clock.
A widget’s frame clock will not change while the widget is mapped. Reparenting a widget (which implies a temporary unmap) can change the widget’s frame clock.
Unrealized widgets do not have a frame clock.
getHalign
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Align | Returns: the horizontal alignment of |
Gets the horizontal alignment of the widget.
For backwards compatibility reasons this method will never return
one of the baseline alignments, but instead it will convert it to
AlignFill
or AlignCenter
.
Baselines are not supported for horizontal alignment.
getHasTooltip
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Bool | Returns: current value of |
Returns the current value of the has-tooltip
property.
getHeight
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Int32 | Returns: The height of |
Returns the content height of the widget.
This function returns the height passed to its
size-allocate implementation, which is the height you
should be using in Widget
.snapshot
().
For pointer events, see widgetContains
.
To learn more about widget sizes, see the coordinate system overview.
getHexpand
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Bool | Returns: whether hexpand flag is set |
Gets whether the widget would like any available extra horizontal space.
When a user resizes a window, widgets with expand set to true generally receive the extra space. For example, a list or scrollable area or document in your window would often be set to expand.
Widgets with children should use widgetComputeExpand
rather than this function, to see whether any of its children,
has the expand flag set. If any child of a widget wants to
expand, the parent may ask to expand also.
This function only looks at the widget’s own hexpand flag, rather than computing whether the entire widget tree rooted at this widget wants to expand.
getHexpandSet
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Bool | Returns: whether hexpand has been explicitly set |
Gets whether the hexpand
flag has been explicitly set.
If Widget:hexpand property is set, then it
overrides any computed expand value based on child widgets.
If hexpand
is not set, then the expand value depends on
whether any children of the widget would like to expand.
There are few reasons to use this function, but it’s here for completeness and consistency.
getLastChild
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m (Maybe Widget) | Returns: the widget's last child |
Returns the widget’s last child.
This function is primarily meant for widget implementations.
getLayoutManager
widgetGetLayoutManager Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m (Maybe LayoutManager) | Returns: the layout manager of |
Retrieves the layout manager of the widget.
getLimitEvents
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Bool |
Gets the value of the Widget:limitEvents property.
Since: 4.18
getMapped
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Bool | Returns: true if the widget is mapped |
Returns whether the widget is mapped.
getMarginBottom
widgetGetMarginBottom Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Int32 | Returns: The bottom margin of |
Gets the bottom margin of the widget.
getMarginEnd
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Int32 | Returns: The end margin of |
Gets the end margin of the widget.
getMarginStart
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Int32 | Returns: The start margin of |
Gets the start margin of the widget.
getMarginTop
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Int32 | Returns: The top margin of |
Gets the top margin of the widget.
getName
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Text | Returns: name of the widget |
Retrieves the name of a widget.
See widgetSetName
for the significance of widget names.
getNative
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m (Maybe Native) | Returns: the |
Returns the nearest GtkNative
ancestor of the widget.
This function will return NULL
if the widget is not
contained inside a widget tree with a native ancestor.
GtkNative
widgets will return themselves here.
getNextSibling
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m (Maybe Widget) | Returns: the widget's next sibling |
Returns the widget’s next sibling.
This function is primarily meant for widget implementations.
getOpacity
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Double | Returns: the requested opacity for this widget |
Fetches the requested opacity for the widget.
See widgetSetOpacity
.
getOverflow
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Overflow | Returns: The widget's overflow value |
Returns the widget’s overflow value.
getPangoContext
widgetGetPangoContext Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Context | Returns: the |
Gets a PangoContext
that is configured for the widget.
The PangoContext
will have the appropriate font map, font description,
and base direction set.
Unlike the context returned by widgetCreatePangoContext
,
this context is owned by the widget (it can be used until the screen
for the widget changes or the widget is removed from its toplevel),
and will be updated to match any changes to the widget’s attributes.
This can be tracked by listening to changes of the
Widget:root property on the widget.
getParent
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m (Maybe Widget) | Returns: the parent widget of |
Returns the parent widget of the widget.
getPreferredSize
widgetGetPreferredSize Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m (Requisition, Requisition) |
Retrieves the minimum and natural size of a widget, taking into account the widget’s preference for height-for-width management.
This is used to retrieve a suitable size by container widgets which do
not impose any restrictions on the child placement. It can be used
to deduce toplevel window and menu sizes as well as child widgets in
free-form containers such as GtkFixed
.
Handle with care. Note that the natural height of a height-for-width widget will generally be a smaller size than the minimum height, since the required height for the natural width is generally smaller than the required height for the minimum width.
Use widgetMeasure
if you want to support baseline alignment.
getPrevSibling
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m (Maybe Widget) | Returns: the widget's previous sibling |
Returns the widget’s previous sibling.
This function is primarily meant for widget implementations.
getPrimaryClipboard
widgetGetPrimaryClipboard Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Clipboard | Returns: the appropriate clipboard object |
Gets the primary clipboard of the widget.
This is a utility function to get the primary clipboard object
for the display that widget
is using.
Note that this function always works, even when widget
is not
realized yet.
getRealized
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Bool | Returns: true if |
Determines whether the widget is realized.
getReceivesDefault
widgetGetReceivesDefault Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Bool | Returns: true if |
Determines whether the widget is always treated as the default widget within its toplevel when it has the focus, even if another widget is the default.
getRequestMode
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m SizeRequestMode | Returns: The |
Gets whether the widget prefers a height-for-width layout or a width-for-height layout.
Single-child widgets generally propagate the preference of their child, more complex widgets need to request something either in context of their children or in context of their allocation capabilities.
getRoot
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m (Maybe Root) | Returns: the root widget of |
Returns the GtkRoot
widget of the widget.
This function will return NULL
if the widget is not contained
inside a widget tree with a root widget.
GtkRoot
widgets will return themselves here.
getScaleFactor
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Int32 | Returns: the scale factor for |
Retrieves the internal scale factor that maps from window coordinates to the actual device pixels.
On traditional systems this is 1, on high density outputs, it can be a higher value (typically 2).
Note that modern systems may support *fractional* scaling,
where the scale factor is not an integer. On such systems,
this function will return the next higher integer value,
but you probably want to use surfaceGetScale
to get the fractional scale value.
getSensitive
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Bool | Returns: true if the widget is sensitive |
Returns the widget’s sensitivity.
This function returns the value that has been set using
widgetSetSensitive
).
The effective sensitivity of a widget is however determined
by both its own and its parent widget’s sensitivity.
See widgetIsSensitive
.
getSettings
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Settings | Returns: the relevant settings object |
Gets the settings object holding the settings used for the widget.
Note that this function can only be called when the GtkWidget
is attached to a toplevel, since the settings object is specific
to a particular display. If you want to monitor the widget for
changes in its settings, connect to the notify::display
signal.
getSize
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Orientation |
|
-> m Int32 | Returns: the size of |
Returns the content width or height of the widget.
Which dimension is returned depends on orientation
.
This is equivalent to calling widgetGetWidth
for OrientationHorizontal
or widgetGetHeight
for OrientationVertical
, but can be used when
writing orientation-independent code, such as when
implementing Orientable
widgets.
To learn more about widget sizes, see the coordinate system overview.
getSizeRequest
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m (Int32, Int32) |
Gets the size request that was explicitly set for the widget.
A value of -1 stored in width
or height
indicates that that
dimension has not been set explicitly and the natural requisition
of the widget will be used instead.
See widgetSetSizeRequest
.
To get the size a widget will actually request, call
widgetMeasure
instead of this function.
getStateFlags
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m [StateFlags] | Returns: the state flags of widget |
Returns the widget state as a flag set.
It is worth mentioning that the effective [flagsgtk
.StateFlags.insensitive]
state will be returned, that is, also based on parent insensitivity,
even if widget
itself is sensitive.
Also note that if you are looking for a way to obtain the
[flagsgtk
.StateFlags] to pass to a StyleContext
method, you should look at styleContextGetState
.
getStyleContext
widgetGetStyleContext Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m StyleContext | Returns: the widgets style context |
Deprecated: (Since version 4.10)Style contexts will be removed in GTK 5
Returns the style context associated to the widget.
The returned object is guaranteed to be the same
for the lifetime of widget
.
getTemplateChild
widgetGetTemplateChild Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> GType |
|
-> Text |
|
-> m Object | Returns: the object built in the template XML with
the id |
Fetches an object build from the template XML for widgetType
in
the widget.
This will only report children which were previously declared
with widgetClassBindTemplateChildFull
or one of its
variants.
This function is only meant to be called for code which is private
to the widgetType
which declared the child and is meant for language
bindings which cannot easily make use of the GObject structure offsets.
getTooltipMarkup
widgetGetTooltipMarkup Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m (Maybe Text) | Returns: the tooltip text |
Gets the contents of the tooltip for the widget.
If the tooltip has not been set using
widgetSetTooltipMarkup
, this
function returns NULL
.
getTooltipText
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m (Maybe Text) | Returns: the tooltip text |
Gets the contents of the tooltip for the widget.
If the widget
's tooltip was set using
widgetSetTooltipMarkup
,
this function will return the escaped text.
getValign
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Align | Returns: the vertical alignment of |
Gets the vertical alignment of the widget.
getVexpand
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Bool | Returns: whether vexpand flag is set |
Gets whether the widget would like any available extra vertical space.
See widgetGetHexpand
for more detail.
getVexpandSet
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Bool | Returns: whether vexpand has been explicitly set |
Gets whether the vexpand
flag has been explicitly set.
See widgetGetHexpandSet
for more detail.
getVisible
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Bool | Returns: true if the widget is visible |
Determines whether the widget is visible.
If you want to take into account whether the widget’s
parent is also marked as visible, use
widgetIsVisible
instead.
This function does not check if the widget is obscured in any way.
See widgetSetVisible
.
getWidth
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Int32 | Returns: The width of |
Returns the content width of the widget.
This function returns the width passed to its
size-allocate implementation, which is the width you
should be using in Widget
.snapshot
().
For pointer events, see widgetContains
.
To learn more about widget sizes, see the coordinate system overview.
grabFocus
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Bool | Returns: true if focus is now inside |
Causes widget
to have the keyboard focus for the window
that it belongs to.
If widget
is not focusable, or its Widget
.grab_focus
()
implementation cannot transfer the focus to a descendant of widget
that is focusable, it will not take focus and false will be returned.
Calling widgetGrabFocus
on an already focused widget
is allowed, should not have an effect, and return true.
hasCssClass
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Text |
|
-> m Bool | Returns: true if |
Returns whether a style class is currently applied to the widget.
hasDefault
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Bool | Returns: true if |
Determines whether the widget is the current default widget within its toplevel.
hasFocus
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Bool | Returns: true if the widget has the global input focus |
Determines if the widget has the global input focus.
See widgetIsFocus
for the difference between
having the global input focus, and only having the focus
within a toplevel.
hasVisibleFocus
widgetHasVisibleFocus Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Bool | Returns: true if the widget should display a “focus rectangle” |
Determines if the widget should show a visible indication that it has the global input focus.
This is a convenience function that takes into account whether
focus indication should currently be shown in the toplevel window
of widget
. See windowGetFocusVisible
for more
information about focus indication.
To find out if the widget has the global input focus, use
widgetHasFocus
.
hide
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m () |
Deprecated: (Since version 4.10)Use widgetSetVisible
instead
Reverses the effects of [method.Gtk.Widget.show].
This is causing the widget to be hidden (invisible to the user).
inDestruction
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Bool | Returns: true if |
Returns whether the widget is currently being destroyed.
This information can sometimes be used to avoid doing unnecessary work.
initTemplate
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m () |
Creates and initializes child widgets defined in templates.
This function must be called in the instance initializer
for any class which assigned itself a template using
widgetClassSetTemplate
.
It is important to call this function in the instance initializer
of a widget subclass and not in GObject.constructed()
or
GObject.constructor()
for two reasons:
- derived widgets will assume that the composite widgets defined by its parent classes have been created in their relative instance initializers
- when calling
g_object_new()
on a widget with composite templates, it’s important to build the composite widgets before the construct properties are set. Properties passed tog_object_new()
should take precedence over properties set in the private template XML
A good rule of thumb is to call this function as the first thing in an instance initialization function.
insertActionGroup
widgetInsertActionGroup Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a, IsActionGroup b) | |
=> a |
|
-> Text |
|
-> Maybe b |
|
-> m () |
Inserts an action group into the widget's actions.
Children of widget
that implement Actionable
can
then be associated with actions in group
by setting their
“action-name” to prefix
.action-name
.
Note that inheritance is defined for individual actions. I.e.
even if you insert a group with prefix prefix
, actions with
the same prefix will still be inherited from the parent, unless
the group contains an action with the same name.
If group
is NULL
, a previously inserted group for name
is
removed from widget
.
insertAfter
Arguments
:: (HasCallStack, MonadIO m, IsWidget a, IsWidget b, IsWidget c) | |
=> a |
|
-> b |
|
-> Maybe c |
|
-> m () |
Sets the parent widget of the widget.
In contrast to widgetSetParent
, this function
inserts widget
at a specific position into the list of children
of the parent
widget.
It will be placed after previousSibling
, or at the beginning if
previousSibling
is NULL
.
After calling this function, gtk_widget_get_prev_sibling (widget)
will return previousSibling
.
If parent
is already set as the parent widget of widget
, this
function can also be used to reorder widget
in the child widget
list of parent
.
This function is primarily meant for widget implementations; if you are just using a widget, you *must* use its own API for adding children.
insertBefore
Arguments
:: (HasCallStack, MonadIO m, IsWidget a, IsWidget b, IsWidget c) | |
=> a |
|
-> b |
|
-> Maybe c |
|
-> m () |
Sets the parent widget of the widget.
In contrast to widgetSetParent
, this function
inserts widget
at a specific position into the list of children
of the parent
widget.
It will be placed before nextSibling
, or at the end if
nextSibling
is NULL
.
After calling this function, gtk_widget_get_next_sibling (widget)
will return nextSibling
.
If parent
is already set as the parent widget of widget
, this function
can also be used to reorder widget
in the child widget list of parent
.
This function is primarily meant for widget implementations; if you are just using a widget, you *must* use its own API for adding children.
isAncestor
Arguments
:: (HasCallStack, MonadIO m, IsWidget a, IsWidget b) | |
=> a |
|
-> b |
|
-> m Bool | Returns: true if |
Determines whether the widget is a descendent of ancestor
.
isDrawable
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Bool | Returns: true if |
Determines whether the widget can be drawn to.
A widget can be drawn if it is mapped and visible.
isFocus
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Bool | Returns: true if the widget is the focus widget |
Determines if the widget is the focus widget within its toplevel.
This does not mean that the Widget:hasFocus property is necessarily set; Widget:hasFocus will only be set if the toplevel widget additionally has the global input focus.
isSensitive
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Bool | Returns: true if the widget is effectively sensitive |
Returns the widget’s effective sensitivity.
This means it is sensitive itself and also its parent widget is sensitive.
isVisible
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Bool | Returns: true if the widget and all its parents are visible |
Determines whether the widget and all its parents are marked as visible.
This function does not check if the widget is obscured in any way.
See also widgetGetVisible
and
widgetSetVisible
.
keynavFailed
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> DirectionType |
|
-> m Bool | Returns: true if stopping keyboard navigation is fine, false if the emitting widget should try to handle the keyboard navigation attempt in its parent widget |
Emits the Widget::keynavFailed signal on the widget.
This function should be called whenever keyboard navigation within a single widget hits a boundary.
The return value of this function should be interpreted
in a way similar to the return value of
widgetChildFocus
. When true is returned,
stay in the widget, the failed keyboard navigation is ok
and/or there is nowhere we can/should move the focus to.
When false is returned, the caller should continue with
keyboard navigation outside the widget, e.g. by calling
widgetChildFocus
on the widget’s toplevel.
The default Widget::keynavFailed handler returns
false for [enumgtk
.DirectionType.tab-forward] and
[enumgtk
.DirectionType.tab-backward]. For the other values
of DirectionType
it returns true.
Whenever the default handler returns true, it also calls
widgetErrorBell
to notify the user of the
failed keyboard navigation.
A use case for providing an own implementation of ::keynav-failed
(either by connecting to it or by overriding it) would be a row of
Entry
widgets where the user should be able to navigate
the entire row with the cursor keys, as e.g. known from user
interfaces that require entering license keys.
listMnemonicLabels
widgetListMnemonicLabels Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m [Widget] | Returns: the list of mnemonic labels |
Returns the widgets for which this widget is the target of a mnemonic.
Typically, these widgets will be labels. See, for example,
labelSetMnemonicWidget
.
The widgets in the list are not individually referenced.
If you want to iterate through the list and perform actions
involving callbacks that might destroy the widgets, you
must call g_list_foreach (result, (GFunc)g_object_ref, NULL)
first, and then unref all the widgets afterwards.
map
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m () |
Causes a widget to be mapped if it isn’t already.
This function is only for use in widget implementations.
measure
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Orientation |
|
-> Int32 |
|
-> m (Int32, Int32, Int32, Int32) |
Measures widget
in the orientation orientation
and for the given forSize
.
As an example, if orientation
is OrientationHorizontal
and forSize
is 300, this functions will compute the minimum and natural width of widget
if it is allocated at a height of 300 pixels.
See GtkWidget’s geometry management section for
a more details on implementing GtkWidgetClass.measure()
.
mnemonicActivate
widgetMnemonicActivate Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Bool |
|
-> m Bool | Returns: true if the signal has been handled |
Emits the Widget::mnemonicActivate signal.
observeChildren
widgetObserveChildren Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m ListModel | Returns:
a list model tracking |
Returns a list model to track the children of the widget.
Calling this function will enable extra internal bookkeeping to track children and emit signals on the returned listmodel. It may slow down operations a lot.
Applications should try hard to avoid calling this function because of the slowdowns.
observeControllers
widgetObserveControllers Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m ListModel | Returns:
a list model tracking |
Returns a list model to track the event controllers of the widget.
Calling this function will enable extra internal bookkeeping to track controllers and emit signals on the returned listmodel. It may slow down operations a lot.
Applications should try hard to avoid calling this function because of the slowdowns.
pick
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Double |
|
-> Double |
|
-> [PickFlags] |
|
-> m (Maybe Widget) | Returns: the widget's descendant at (x, y) |
Finds the descendant of the widget closest to a point.
The point (x, y) must be given in widget coordinates, so (0, 0)
is assumed to be the top left of widget
's content area.
Usually widgets will return NULL
if the given coordinate is not
contained in widget
checked via widgetContains
.
Otherwise they will recursively try to find a child that does
not return NULL
. Widgets are however free to customize their
picking algorithm.
This function is used on the toplevel to determine the widget below the mouse cursor for purposes of hover highlighting and delivering events.
queueAllocate
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m () |
Flags the widget for a rerun of the Widget
.size_allocate
()
function.
Use this function instead of widgetQueueResize
when the widget
's size request didn't change but it wants to
reposition its contents.
An example user of this function is widgetSetHalign
.
This function is only for use in widget implementations.
queueDraw
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m () |
Schedules this widget to be redrawn.
The redraw will happen in the paint phase of the current or the next frame.
This means widget
's Widget
.snapshot
()
implementation will be called.
queueResize
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m () |
Flags a widget to have its size renegotiated.
This should be called when a widget for some reason has a new
size request. For example, when you change the text in a
Label
, the label queues a resize to ensure there’s
enough space for the new text.
Note that you cannot call widgetQueueResize
on a widget
from inside its implementation of the Widget
.size_allocate
()
virtual method. Calls to widgetQueueResize
from inside
Widget
.size_allocate
() will be silently ignored.
This function is only for use in widget implementations.
realize
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m () |
Creates the GDK resources associated with a widget.
Normally realization happens implicitly; if you show a widget and all its parent containers, then the widget will be realized and mapped automatically.
Realizing a widget requires all the widget’s parent widgets to be
realized; calling this function realizes the widget’s parents
in addition to widget
itself. If a widget is not yet inside a
toplevel window when you realize it, bad things will happen.
This function is primarily used in widget implementations, and isn’t very useful otherwise. Many times when you think you might need it, a better approach is to connect to a signal that will be called after the widget is realized automatically, such as Widget::realize.
removeController
widgetRemoveController Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a, IsEventController b) | |
=> a |
|
-> b |
|
-> m () |
Removes an event controller from the widget.
The removed event controller will not receive any more events, and should not be used again.
Widgets will remove all event controllers automatically when they are destroyed, there is normally no need to call this function.
removeCssClass
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Text |
|
-> m () |
Removes a style from the widget.
After this, the style of widget
will stop matching for cssClass
.
removeMnemonicLabel
widgetRemoveMnemonicLabel Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a, IsWidget b) | |
=> a |
|
-> b |
|
-> m () |
Removes a widget from the list of mnemonic labels for this widget.
The widget must have previously been added to the list with
widgetAddMnemonicLabel
.
removeTickCallback
widgetRemoveTickCallback Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Word32 |
|
-> m () |
Removes a tick callback previously registered with
widgetAddTickCallback
.
setCanFocus
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether the input focus can enter the widget or any of its children.
Applications should set canFocus
to false to mark a
widget as for pointer/touch use only.
Note that having canFocus
be true is only one of the
necessary conditions for being focusable. A widget must
also be sensitive and focusable and not have an ancestor
that is marked as not can-focus in order to receive input
focus.
See widgetGrabFocus
for actually setting
the input focus on a widget.
setCanTarget
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether the widget can be the target of pointer events.
setChildVisible
widgetSetChildVisible Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether the widget should be mapped along with its parent.
The child visibility can be set for widget before it is added
to a container with widgetSetParent
, to avoid
mapping children unnecessary before immediately unmapping them.
However it will be reset to its default state of true when the
widget is removed from a container.
Note that changing the child visibility of a widget does not queue a resize on the widget. Most of the time, the size of a widget is computed from all visible children, whether or not they are mapped. If this is not the case, the container can queue a resize itself.
This function is only useful for widget implementations and should never be called by an application.
setCssClasses
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> [Text] |
|
-> m () |
Replaces the current style classes of the widget with classes
.
setCursor
Arguments
:: (HasCallStack, MonadIO m, IsWidget a, IsCursor b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets the cursor to be shown when the pointer hovers over the widget.
If the cursor
is NULL
, widget
will use the cursor
inherited from its parent.
setCursorFromName
widgetSetCursorFromName Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Maybe Text |
|
-> m () |
Sets the cursor to be shown when the pointer hovers over the widget.
This is a utility function that creates a cursor via
cursorNewFromName
and then sets it on widget
with widgetSetCursor
. See those functions for
details.
On top of that, this function allows name
to be NULL
, which
will do the same as calling widgetSetCursor
with a NULL
cursor.
setDefaultDirection
widgetSetDefaultDirection Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> TextDirection |
|
-> m () |
Sets the default reading direction for widgets.
See widgetSetDirection
.
setDirection
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> TextDirection |
|
-> m () |
Sets the reading direction on the widget.
This direction controls the primary direction for widgets containing text, and also the direction in which the children of a container are packed. The ability to set the direction is present in order so that correct localization into languages with right-to-left reading directions can be done.
Generally, applications will let the default reading direction prevail, except for widgets where the children are arranged in an order that is explicitly visual rather than logical (such as buttons for text justification).
If the direction is set to TextDirectionNone
, then
the value set by widgetSetDefaultDirection
will be used.
setFocusChild
Arguments
:: (HasCallStack, MonadIO m, IsWidget a, IsWidget b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Set the focus child of the widget.
This function is only suitable for widget implementations.
If you want a certain widget to get the input focus, call
widgetGrabFocus
on it.
setFocusOnClick
widgetSetFocusOnClick Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether the widget should grab focus when it is clicked with the mouse.
Making mouse clicks not grab focus is useful in places like toolbars where you don’t want the keyboard focus removed from the main area of the application.
setFocusable
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether the widget can own the input focus.
Widget implementations should set focusable
to true in
their init()
function if they want to receive keyboard input.
Note that having focusable
be true is only one of the
necessary conditions for being focusable. A widget must
also be sensitive and can-focus and not have an ancestor
that is marked as not can-focus in order to receive input
focus.
See widgetGrabFocus
for actually setting
the input focus on a widget.
setFontMap
Arguments
:: (HasCallStack, MonadIO m, IsWidget a, IsFontMap b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets the font map to use for text rendering in the widget.
The font map is the object that is used to look up fonts. Setting a custom font map can be useful in special situations, e.g. when you need to add application-specific fonts to the set of available fonts.
When not set, the widget will inherit the font map from its parent.
setFontOptions
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Maybe FontOptions |
|
-> m () |
Deprecated: (Since version 4.16)
Sets the cairo_font_options_t
used for text rendering
in the widget.
When not set, the default font options for the GdkDisplay
will be used.
setHalign
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Align |
|
-> m () |
Sets the horizontal alignment of the widget.
setHasTooltip
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets the has-tooltip
property on the widget.
setHexpand
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether the widget would like any available extra horizontal space.
When a user resizes a window, widgets with expand set to true generally receive the extra space. For example, a list or scrollable area or document in your window would often be set to expand.
Call this function to set the expand flag if you would like your widget to become larger horizontally when the window has extra room.
By default, widgets automatically expand if any of their children
want to expand. (To see if a widget will automatically expand given
its current children and state, call widgetComputeExpand
.
A widget can decide how the expandability of children affects its
own expansion by overriding the compute_expand
virtual method on
GtkWidget
.).
Setting hexpand explicitly with this function will override the automatic expand behavior.
This function forces the widget to expand or not to expand,
regardless of children. The override occurs because
widgetSetHexpand
sets the hexpand-set property (see
widgetSetHexpandSet
) which causes the widget’s hexpand
value to be used, rather than looking at children and widget state.
setHexpandSet
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether the hexpand flag will be used.
The Widget:hexpandSet property will be set
automatically when you call widgetSetHexpand
to set hexpand, so the most likely reason to use this function
would be to unset an explicit expand flag.
If hexpand is set, then it overrides any computed expand value based on child widgets. If hexpand is not set, then the expand value depends on whether any children of the widget would like to expand.
There are few reasons to use this function, but it’s here for completeness and consistency.
setLayoutManager
widgetSetLayoutManager Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a, IsLayoutManager b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets the layout manager to use for measuring and allocating children of the widget.
setLimitEvents
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether the widget acts like a modal dialog, with respect to event delivery.
Since: 4.18
setMarginBottom
widgetSetMarginBottom Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Int32 |
|
-> m () |
Sets the bottom margin of the widget.
setMarginEnd
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Int32 |
|
-> m () |
Sets the end margin of the widget.
setMarginStart
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Int32 |
|
-> m () |
Sets the start margin of the widget.
setMarginTop
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Int32 |
|
-> m () |
Sets the top margin of the widget.
setName
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Text |
|
-> m () |
Sets a widgets name.
Setting a name allows you to refer to the widget from a
CSS file. You can apply a style to widgets with a particular name
in the CSS file. See the documentation for the CSS syntax (on the
same page as the docs for StyleContext
.
Note that the CSS syntax has certain special characters to delimit and represent elements in a selector (period, #, >, *...), so using these will make your widget impossible to match by name. Any combination of alphanumeric symbols, dashes and underscores will suffice.
setOpacity
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Double |
|
-> m () |
Requests the widget to be rendered partially transparent.
An opacity of 0 is fully transparent and an opacity of 1 is fully opaque.
Opacity works on both toplevel widgets and child widgets, although
there are some limitations: For toplevel widgets, applying opacity
depends on the capabilities of the windowing system. On X11, this
has any effect only on X displays with a compositing manager, see
displayIsComposited
. On Windows and Wayland it will
always work, although setting a window’s opacity after the window
has been shown may cause some flicker.
Note that the opacity is inherited through inclusion — if you set
a toplevel to be partially translucent, all of its content will
appear translucent, since it is ultimatively rendered on that
toplevel. The opacity value itself is not inherited by child
widgets (since that would make widgets deeper in the hierarchy
progressively more translucent). As a consequence, Popover
instances and other Native
widgets with their own surface
will use their own opacity value, and thus by default appear
non-translucent, even if they are attached to a toplevel that
is translucent.
setOverflow
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Overflow |
|
-> m () |
Sets how the widget treats content that is drawn outside the it's content area.
See the definition of Overflow
for details.
This setting is provided for widget implementations and should not be used by application code.
The default value is OverflowVisible
.
setParent
Arguments
:: (HasCallStack, MonadIO m, IsWidget a, IsWidget b) | |
=> a |
|
-> b |
|
-> m () |
Sets the parent widget of the widget.
This takes care of details such as updating the state and style
of the child to reflect its new location and resizing the parent.
The opposite function is widgetUnparent
.
This function is useful only when implementing subclasses of
GtkWidget
.
setReceivesDefault
widgetSetReceivesDefault Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether the widget will be treated as the default widget within its toplevel when it has the focus, even if another widget is the default.
setSensitive
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets the sensitivity of the widget.
A widget is sensitive if the user can interact with it. Insensitive widgets are “grayed out” and the user can’t interact with them. Insensitive widgets are known as “inactive”, “disabled”, or “ghosted” in some other toolkits.
setSizeRequest
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Int32 |
|
-> Int32 |
|
-> m () |
Sets the minimum size of the widget.
That is, the widget’s size request will be at least width
by height
. You can use this function to force a widget to
be larger than it normally would be.
In most cases, windowSetDefaultSize
is a better
choice for toplevel windows than this function; setting the default
size will still allow users to shrink the window. Setting the size
request will force them to leave the window at least as large as
the size request.
Note the inherent danger of setting any fixed size - themes, translations into other languages, different fonts, and user action can all change the appropriate size for a given widget. So, it is basically impossible to hardcode a size that will always work.
The size request of a widget is the smallest size a widget can accept while still functioning well and drawing itself correctly. However in some strange cases a widget may be allocated less than its requested size, and in many cases a widget may be allocated more space than it requested.
If the size request in a given direction is -1 (unset), then the “natural” size request of the widget will be used instead.
The size request set here does not include any margin from the
properties
Widget:marginStart,
Widget:marginEnd,
Widget:marginTop, and
Widget:marginBottom, but it does include pretty
much all other padding or border properties set by any subclass
of GtkWidget
.
setStateFlags
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> [StateFlags] |
|
-> Bool |
|
-> m () |
Turns on flag values in the current widget state.
Typical widget states are insensitive, prelighted, etc.
This function accepts the values [flagsgtk
.StateFlags.dir-ltr] and
[flagsgtk
.StateFlags.dir-rtl] but ignores them. If you want to set
the widget's direction, use widgetSetDirection
.
This function is for use in widget implementations.
setTooltipMarkup
widgetSetTooltipMarkup Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Maybe Text |
|
-> m () |
Sets the contents of the tooltip for widget.
markup
must contain Pango markup.
This function will take care of setting the Widget:hasTooltip as a side effect, and of the default handler for the Widget::queryTooltip signal.
See also tooltipSetMarkup
.
setTooltipText
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Maybe Text |
|
-> m () |
Sets the contents of the tooltip for the widget.
If text
contains any markup, it will be escaped.
This function will take care of setting Widget:hasTooltip as a side effect, and of the default handler for the Widget::queryTooltip signal.
See also tooltipSetText
.
setValign
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Align |
|
-> m () |
Sets the vertical alignment of the widget.
setVexpand
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether the widget would like any available extra vertical space.
See widgetSetHexpand
for more detail.
setVexpandSet
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets whether the vexpand flag will be used.
See widgetSetHexpandSet
for more detail.
setVisible
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Bool |
|
-> m () |
Sets the visibility state of widget
.
Note that setting this to true doesn’t mean the widget is
actually viewable, see widgetGetVisible
.
shouldLayout
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m Bool | Returns: true if child should be included in measuring and allocating |
Returns whether the widget should contribute to the measuring and allocation of its parent.
This is false for invisible children, but also
for children that have their own surface, such
as Popover
instances.
show
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m () |
Deprecated: (Since version 4.10)Use widgetSetVisible
instead
Flags a widget to be displayed.
Any widget that isn’t shown will not appear on the screen.
Remember that you have to show the containers containing a widget, in addition to the widget itself, before it will appear onscreen.
When a toplevel widget is shown, it is immediately realized and mapped; other shown widgets are realized and mapped when their toplevel widget is realized and mapped.
sizeAllocate
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> Rectangle |
|
-> Int32 |
|
-> m () |
Allocates widget with a transformation that translates
the origin to the position in allocation
.
This is a simple form of widgetAllocate
.
snapshotChild
Arguments
:: (HasCallStack, MonadIO m, IsWidget a, IsWidget b, IsSnapshot c) | |
=> a |
|
-> b |
|
-> c |
|
-> m () |
Snapshots a child of the widget.
When a widget receives a call to the snapshot function,
it must send synthetic Widget
.snapshot
() calls
to all children. This function provides a convenient way
of doing this. A widget, when it receives a call to its
Widget
.snapshot
() function, calls
widgetSnapshotChild
once for each child, passing in
the snapshot
the widget received.
This function takes care of translating the origin of snapshot
,
and deciding whether the child needs to be snapshot.
It does nothing for children that implement GtkNative
.
translateCoordinates
widgetTranslateCoordinates Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a, IsWidget b) | |
=> a |
|
-> b |
|
-> Double |
|
-> Double |
|
-> m (Bool, Double, Double) | Returns: true if |
Deprecated: (Since version 4.12)Use widgetComputePoint
instead
Translates coordinates relative to srcWidget
’s allocation
to coordinates relative to destWidget
’s allocations.
In order to perform this operation, both widget must share
a common ancestor. If that is not the case, destX
and destY
are set to 0 and false is returned.
triggerTooltipQuery
widgetTriggerTooltipQuery Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m () |
Triggers a tooltip query on the display of the widget.
unmap
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m () |
Causes a widget to be unmapped if it’s currently mapped.
This function is only for use in widget implementations.
unparent
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m () |
Removes widget
from its parent.
This function is only for use in widget implementations, typically in dispose.
unrealize
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> m () |
Causes a widget to be unrealized.
This frees all GDK resources associated with the widget.
This function is only useful in widget implementations.
unsetStateFlags
widgetUnsetStateFlags Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a |
|
-> [StateFlags] |
|
-> m () |
Turns off flag values for the current widget state.
See widgetSetStateFlags
.
This function is for use in widget implementations.
Properties
canFocus
Whether 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.
constructWidgetCanFocus :: (IsWidget o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “can-focus
” property. This is rarely needed directly, but it is used by new
.
getWidgetCanFocus :: (MonadIO m, IsWidget o) => o -> m Bool Source #
Get the value of the “can-focus
” property.
When overloading is enabled, this is equivalent to
get
widget #canFocus
setWidgetCanFocus :: (MonadIO m, IsWidget o) => o -> Bool -> m () Source #
Set the value of the “can-focus
” property.
When overloading is enabled, this is equivalent to
set
widget [ #canFocus:=
value ]
canTarget
Whether the widget can receive pointer events.
constructWidgetCanTarget :: (IsWidget o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “can-target
” property. This is rarely needed directly, but it is used by new
.
getWidgetCanTarget :: (MonadIO m, IsWidget o) => o -> m Bool Source #
Get the value of the “can-target
” property.
When overloading is enabled, this is equivalent to
get
widget #canTarget
setWidgetCanTarget :: (MonadIO m, IsWidget o) => o -> Bool -> m () Source #
Set the value of the “can-target
” property.
When overloading is enabled, this is equivalent to
set
widget [ #canTarget:=
value ]
cssClasses
A list of css classes applied to this widget.
constructWidgetCssClasses :: (IsWidget o, MonadIO m) => [Text] -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “css-classes
” property. This is rarely needed directly, but it is used by new
.
getWidgetCssClasses :: (MonadIO m, IsWidget o) => o -> m (Maybe [Text]) Source #
Get the value of the “css-classes
” property.
When overloading is enabled, this is equivalent to
get
widget #cssClasses
setWidgetCssClasses :: (MonadIO m, IsWidget o) => o -> [Text] -> m () Source #
Set the value of the “css-classes
” property.
When overloading is enabled, this is equivalent to
set
widget [ #cssClasses:=
value ]
cssName
The name of this widget in the CSS tree.
This property is meant to be set by widget implementations, typically in their instance init function.
constructWidgetCssName :: (IsWidget o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “css-name
” property. This is rarely needed directly, but it is used by new
.
getWidgetCssName :: (MonadIO m, IsWidget o) => o -> m Text Source #
Get the value of the “css-name
” property.
When overloading is enabled, this is equivalent to
get
widget #cssName
cursor
The cursor used by widget
.
clearWidgetCursor :: (MonadIO m, IsWidget o) => o -> m () Source #
Set the value of the “cursor
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#cursor
constructWidgetCursor :: (IsWidget o, MonadIO m, IsCursor a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “cursor
” property. This is rarely needed directly, but it is used by new
.
getWidgetCursor :: (MonadIO m, IsWidget o) => o -> m (Maybe Cursor) Source #
Get the value of the “cursor
” property.
When overloading is enabled, this is equivalent to
get
widget #cursor
setWidgetCursor :: (MonadIO m, IsWidget o, IsCursor a) => o -> a -> m () Source #
Set the value of the “cursor
” property.
When overloading is enabled, this is equivalent to
set
widget [ #cursor:=
value ]
focusOnClick
Whether the widget should grab focus when it is clicked with the mouse.
This property is only relevant for widgets that can take focus.
constructWidgetFocusOnClick :: (IsWidget o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “focus-on-click
” property. This is rarely needed directly, but it is used by new
.
getWidgetFocusOnClick :: (MonadIO m, IsWidget o) => o -> m Bool Source #
Get the value of the “focus-on-click
” property.
When overloading is enabled, this is equivalent to
get
widget #focusOnClick
setWidgetFocusOnClick :: (MonadIO m, IsWidget o) => o -> Bool -> m () Source #
Set the value of the “focus-on-click
” property.
When overloading is enabled, this is equivalent to
set
widget [ #focusOnClick:=
value ]
focusable
Whether this widget itself will accept the input focus.
constructWidgetFocusable :: (IsWidget o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “focusable
” property. This is rarely needed directly, but it is used by new
.
getWidgetFocusable :: (MonadIO m, IsWidget o) => o -> m Bool Source #
Get the value of the “focusable
” property.
When overloading is enabled, this is equivalent to
get
widget #focusable
setWidgetFocusable :: (MonadIO m, IsWidget o) => o -> Bool -> m () Source #
Set the value of the “focusable
” property.
When overloading is enabled, this is equivalent to
set
widget [ #focusable:=
value ]
halign
How to distribute horizontal space if widget gets extra space.
constructWidgetHalign :: (IsWidget o, MonadIO m) => Align -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “halign
” property. This is rarely needed directly, but it is used by new
.
getWidgetHalign :: (MonadIO m, IsWidget o) => o -> m Align Source #
Get the value of the “halign
” property.
When overloading is enabled, this is equivalent to
get
widget #halign
setWidgetHalign :: (MonadIO m, IsWidget o) => o -> Align -> m () Source #
Set the value of the “halign
” property.
When overloading is enabled, this is equivalent to
set
widget [ #halign:=
value ]
hasDefault
Whether the widget is the default widget.
getWidgetHasDefault :: (MonadIO m, IsWidget o) => o -> m Bool Source #
Get the value of the “has-default
” property.
When overloading is enabled, this is equivalent to
get
widget #hasDefault
hasFocus
Whether the widget has the input focus.
getWidgetHasFocus :: (MonadIO m, IsWidget o) => o -> m Bool Source #
Get the value of the “has-focus
” property.
When overloading is enabled, this is equivalent to
get
widget #hasFocus
hasTooltip
Enables or disables the emission of the Widget::queryTooltip
signal on widget
.
A true value indicates that widget
can have a tooltip, in this case
the widget will be queried using Widget::queryTooltip to
determine whether it will provide a tooltip or not.
constructWidgetHasTooltip :: (IsWidget o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “has-tooltip
” property. This is rarely needed directly, but it is used by new
.
getWidgetHasTooltip :: (MonadIO m, IsWidget o) => o -> m Bool Source #
Get the value of the “has-tooltip
” property.
When overloading is enabled, this is equivalent to
get
widget #hasTooltip
setWidgetHasTooltip :: (MonadIO m, IsWidget o) => o -> Bool -> m () Source #
Set the value of the “has-tooltip
” property.
When overloading is enabled, this is equivalent to
set
widget [ #hasTooltip:=
value ]
heightRequest
Overrides for height request of the widget.
If this is -1, the natural request will be used.
constructWidgetHeightRequest :: (IsWidget o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “height-request
” property. This is rarely needed directly, but it is used by new
.
getWidgetHeightRequest :: (MonadIO m, IsWidget o) => o -> m Int32 Source #
Get the value of the “height-request
” property.
When overloading is enabled, this is equivalent to
get
widget #heightRequest
setWidgetHeightRequest :: (MonadIO m, IsWidget o) => o -> Int32 -> m () Source #
Set the value of the “height-request
” property.
When overloading is enabled, this is equivalent to
set
widget [ #heightRequest:=
value ]
hexpand
Whether to expand horizontally.
constructWidgetHexpand :: (IsWidget o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “hexpand
” property. This is rarely needed directly, but it is used by new
.
getWidgetHexpand :: (MonadIO m, IsWidget o) => o -> m Bool Source #
Get the value of the “hexpand
” property.
When overloading is enabled, this is equivalent to
get
widget #hexpand
setWidgetHexpand :: (MonadIO m, IsWidget o) => o -> Bool -> m () Source #
Set the value of the “hexpand
” property.
When overloading is enabled, this is equivalent to
set
widget [ #hexpand:=
value ]
hexpandSet
Whether to use the hexpand
property.
constructWidgetHexpandSet :: (IsWidget o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “hexpand-set
” property. This is rarely needed directly, but it is used by new
.
getWidgetHexpandSet :: (MonadIO m, IsWidget o) => o -> m Bool Source #
Get the value of the “hexpand-set
” property.
When overloading is enabled, this is equivalent to
get
widget #hexpandSet
setWidgetHexpandSet :: (MonadIO m, IsWidget o) => o -> Bool -> m () Source #
Set the value of the “hexpand-set
” property.
When overloading is enabled, this is equivalent to
set
widget [ #hexpandSet:=
value ]
layoutManager
The 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.
clearWidgetLayoutManager :: (MonadIO m, IsWidget o) => o -> m () Source #
Set the value of the “layout-manager
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#layoutManager
constructWidgetLayoutManager :: (IsWidget o, MonadIO m, IsLayoutManager a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “layout-manager
” property. This is rarely needed directly, but it is used by new
.
getWidgetLayoutManager :: (MonadIO m, IsWidget o) => o -> m (Maybe LayoutManager) Source #
Get the value of the “layout-manager
” property.
When overloading is enabled, this is equivalent to
get
widget #layoutManager
setWidgetLayoutManager :: (MonadIO m, IsWidget o, IsLayoutManager a) => o -> a -> m () Source #
Set the value of the “layout-manager
” property.
When overloading is enabled, this is equivalent to
set
widget [ #layoutManager:=
value ]
limitEvents
Makes 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 eventControllerSetPropagationLimit
.
Since: 4.18
constructWidgetLimitEvents :: (IsWidget o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “limit-events
” property. This is rarely needed directly, but it is used by new
.
getWidgetLimitEvents :: (MonadIO m, IsWidget o) => o -> m Bool Source #
Get the value of the “limit-events
” property.
When overloading is enabled, this is equivalent to
get
widget #limitEvents
setWidgetLimitEvents :: (MonadIO m, IsWidget o) => o -> Bool -> m () Source #
Set the value of the “limit-events
” property.
When overloading is enabled, this is equivalent to
set
widget [ #limitEvents:=
value ]
marginBottom
Margin 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
widgetSetSizeRequest
for example.
constructWidgetMarginBottom :: (IsWidget o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “margin-bottom
” property. This is rarely needed directly, but it is used by new
.
getWidgetMarginBottom :: (MonadIO m, IsWidget o) => o -> m Int32 Source #
Get the value of the “margin-bottom
” property.
When overloading is enabled, this is equivalent to
get
widget #marginBottom
setWidgetMarginBottom :: (MonadIO m, IsWidget o) => o -> Int32 -> m () Source #
Set the value of the “margin-bottom
” property.
When overloading is enabled, this is equivalent to
set
widget [ #marginBottom:=
value ]
marginEnd
Margin 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
widgetSetSizeRequest
for example.
constructWidgetMarginEnd :: (IsWidget o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “margin-end
” property. This is rarely needed directly, but it is used by new
.
getWidgetMarginEnd :: (MonadIO m, IsWidget o) => o -> m Int32 Source #
Get the value of the “margin-end
” property.
When overloading is enabled, this is equivalent to
get
widget #marginEnd
setWidgetMarginEnd :: (MonadIO m, IsWidget o) => o -> Int32 -> m () Source #
Set the value of the “margin-end
” property.
When overloading is enabled, this is equivalent to
set
widget [ #marginEnd:=
value ]
marginStart
Margin 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
widgetSetSizeRequest
for example.
constructWidgetMarginStart :: (IsWidget o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “margin-start
” property. This is rarely needed directly, but it is used by new
.
getWidgetMarginStart :: (MonadIO m, IsWidget o) => o -> m Int32 Source #
Get the value of the “margin-start
” property.
When overloading is enabled, this is equivalent to
get
widget #marginStart
setWidgetMarginStart :: (MonadIO m, IsWidget o) => o -> Int32 -> m () Source #
Set the value of the “margin-start
” property.
When overloading is enabled, this is equivalent to
set
widget [ #marginStart:=
value ]
marginTop
Margin 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
widgetSetSizeRequest
for example.
constructWidgetMarginTop :: (IsWidget o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “margin-top
” property. This is rarely needed directly, but it is used by new
.
getWidgetMarginTop :: (MonadIO m, IsWidget o) => o -> m Int32 Source #
Get the value of the “margin-top
” property.
When overloading is enabled, this is equivalent to
get
widget #marginTop
setWidgetMarginTop :: (MonadIO m, IsWidget o) => o -> Int32 -> m () Source #
Set the value of the “margin-top
” property.
When overloading is enabled, this is equivalent to
set
widget [ #marginTop:=
value ]
name
The name of the widget.
constructWidgetName :: (IsWidget o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “name
” property. This is rarely needed directly, but it is used by new
.
getWidgetName :: (MonadIO m, IsWidget o) => o -> m Text Source #
Get the value of the “name
” property.
When overloading is enabled, this is equivalent to
get
widget #name
setWidgetName :: (MonadIO m, IsWidget o) => o -> Text -> m () Source #
Set the value of the “name
” property.
When overloading is enabled, this is equivalent to
set
widget [ #name:=
value ]
opacity
The requested opacity of the widget.
constructWidgetOpacity :: (IsWidget o, MonadIO m) => Double -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “opacity
” property. This is rarely needed directly, but it is used by new
.
getWidgetOpacity :: (MonadIO m, IsWidget o) => o -> m Double Source #
Get the value of the “opacity
” property.
When overloading is enabled, this is equivalent to
get
widget #opacity
setWidgetOpacity :: (MonadIO m, IsWidget o) => o -> Double -> m () Source #
Set the value of the “opacity
” property.
When overloading is enabled, this is equivalent to
set
widget [ #opacity:=
value ]
overflow
How 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.
constructWidgetOverflow :: (IsWidget o, MonadIO m) => Overflow -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “overflow
” property. This is rarely needed directly, but it is used by new
.
getWidgetOverflow :: (MonadIO m, IsWidget o) => o -> m Overflow Source #
Get the value of the “overflow
” property.
When overloading is enabled, this is equivalent to
get
widget #overflow
setWidgetOverflow :: (MonadIO m, IsWidget o) => o -> Overflow -> m () Source #
Set the value of the “overflow
” property.
When overloading is enabled, this is equivalent to
set
widget [ #overflow:=
value ]
parent
The parent widget of this widget.
getWidgetParent :: (MonadIO m, IsWidget o) => o -> m (Maybe Widget) Source #
Get the value of the “parent
” property.
When overloading is enabled, this is equivalent to
get
widget #parent
receivesDefault
Whether the widget will receive the default action when it is focused.
constructWidgetReceivesDefault :: (IsWidget o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “receives-default
” property. This is rarely needed directly, but it is used by new
.
getWidgetReceivesDefault :: (MonadIO m, IsWidget o) => o -> m Bool Source #
Get the value of the “receives-default
” property.
When overloading is enabled, this is equivalent to
get
widget #receivesDefault
setWidgetReceivesDefault :: (MonadIO m, IsWidget o) => o -> Bool -> m () Source #
Set the value of the “receives-default
” property.
When overloading is enabled, this is equivalent to
set
widget [ #receivesDefault:=
value ]
root
The GtkRoot
widget of the widget tree containing this widget.
This will be NULL
if the widget is not contained in a root widget.
getWidgetRoot :: (MonadIO m, IsWidget o) => o -> m (Maybe Root) Source #
Get the value of the “root
” property.
When overloading is enabled, this is equivalent to
get
widget #root
scaleFactor
The scale factor of the widget.
getWidgetScaleFactor :: (MonadIO m, IsWidget o) => o -> m Int32 Source #
Get the value of the “scale-factor
” property.
When overloading is enabled, this is equivalent to
get
widget #scaleFactor
sensitive
Whether the widget responds to input.
constructWidgetSensitive :: (IsWidget o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “sensitive
” property. This is rarely needed directly, but it is used by new
.
getWidgetSensitive :: (MonadIO m, IsWidget o) => o -> m Bool Source #
Get the value of the “sensitive
” property.
When overloading is enabled, this is equivalent to
get
widget #sensitive
setWidgetSensitive :: (MonadIO m, IsWidget o) => o -> Bool -> m () Source #
Set the value of the “sensitive
” property.
When overloading is enabled, this is equivalent to
set
widget [ #sensitive:=
value ]
tooltipMarkup
Sets the text of tooltip to be the given string, which is marked up with Pango markup.
Also see tooltipSetMarkup
.
This is a convenience property which will take care of getting the
tooltip shown if the given string is not NULL
:
Widget:hasTooltip will automatically be set to true
and there will be taken care of Widget::queryTooltip in
the default signal handler.
Note that if both Widget:tooltipText and Widget:tooltipMarkup are set, the last one wins.
clearWidgetTooltipMarkup :: (MonadIO m, IsWidget o) => o -> m () Source #
Set the value of the “tooltip-markup
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#tooltipMarkup
constructWidgetTooltipMarkup :: (IsWidget o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “tooltip-markup
” property. This is rarely needed directly, but it is used by new
.
getWidgetTooltipMarkup :: (MonadIO m, IsWidget o) => o -> m (Maybe Text) Source #
Get the value of the “tooltip-markup
” property.
When overloading is enabled, this is equivalent to
get
widget #tooltipMarkup
setWidgetTooltipMarkup :: (MonadIO m, IsWidget o) => o -> Text -> m () Source #
Set the value of the “tooltip-markup
” property.
When overloading is enabled, this is equivalent to
set
widget [ #tooltipMarkup:=
value ]
tooltipText
Sets the text of tooltip to be the given string.
Also see tooltipSetText
.
This is a convenience property which will take care of getting the
tooltip shown if the given string is not NULL
:
Widget:hasTooltip will automatically be set to true
and there will be taken care of Widget::queryTooltip in
the default signal handler.
Note that if both Widget:tooltipText and Widget:tooltipMarkup are set, the last one wins.
clearWidgetTooltipText :: (MonadIO m, IsWidget o) => o -> m () Source #
Set the value of the “tooltip-text
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#tooltipText
constructWidgetTooltipText :: (IsWidget o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “tooltip-text
” property. This is rarely needed directly, but it is used by new
.
getWidgetTooltipText :: (MonadIO m, IsWidget o) => o -> m (Maybe Text) Source #
Get the value of the “tooltip-text
” property.
When overloading is enabled, this is equivalent to
get
widget #tooltipText
setWidgetTooltipText :: (MonadIO m, IsWidget o) => o -> Text -> m () Source #
Set the value of the “tooltip-text
” property.
When overloading is enabled, this is equivalent to
set
widget [ #tooltipText:=
value ]
valign
How to distribute vertical space if widget gets extra space.
constructWidgetValign :: (IsWidget o, MonadIO m) => Align -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “valign
” property. This is rarely needed directly, but it is used by new
.
getWidgetValign :: (MonadIO m, IsWidget o) => o -> m Align Source #
Get the value of the “valign
” property.
When overloading is enabled, this is equivalent to
get
widget #valign
setWidgetValign :: (MonadIO m, IsWidget o) => o -> Align -> m () Source #
Set the value of the “valign
” property.
When overloading is enabled, this is equivalent to
set
widget [ #valign:=
value ]
vexpand
Whether to expand vertically.
constructWidgetVexpand :: (IsWidget o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “vexpand
” property. This is rarely needed directly, but it is used by new
.
getWidgetVexpand :: (MonadIO m, IsWidget o) => o -> m Bool Source #
Get the value of the “vexpand
” property.
When overloading is enabled, this is equivalent to
get
widget #vexpand
setWidgetVexpand :: (MonadIO m, IsWidget o) => o -> Bool -> m () Source #
Set the value of the “vexpand
” property.
When overloading is enabled, this is equivalent to
set
widget [ #vexpand:=
value ]
vexpandSet
Whether to use the vexpand
property.
constructWidgetVexpandSet :: (IsWidget o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “vexpand-set
” property. This is rarely needed directly, but it is used by new
.
getWidgetVexpandSet :: (MonadIO m, IsWidget o) => o -> m Bool Source #
Get the value of the “vexpand-set
” property.
When overloading is enabled, this is equivalent to
get
widget #vexpandSet
setWidgetVexpandSet :: (MonadIO m, IsWidget o) => o -> Bool -> m () Source #
Set the value of the “vexpand-set
” property.
When overloading is enabled, this is equivalent to
set
widget [ #vexpandSet:=
value ]
visible
Whether the widget is visible.
constructWidgetVisible :: (IsWidget o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “visible
” property. This is rarely needed directly, but it is used by new
.
getWidgetVisible :: (MonadIO m, IsWidget o) => o -> m Bool Source #
Get the value of the “visible
” property.
When overloading is enabled, this is equivalent to
get
widget #visible
setWidgetVisible :: (MonadIO m, IsWidget o) => o -> Bool -> m () Source #
Set the value of the “visible
” property.
When overloading is enabled, this is equivalent to
set
widget [ #visible:=
value ]
widthRequest
Overrides for width request of the widget.
If this is -1, the natural request will be used.
constructWidgetWidthRequest :: (IsWidget o, MonadIO m) => Int32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “width-request
” property. This is rarely needed directly, but it is used by new
.
getWidgetWidthRequest :: (MonadIO m, IsWidget o) => o -> m Int32 Source #
Get the value of the “width-request
” property.
When overloading is enabled, this is equivalent to
get
widget #widthRequest
setWidgetWidthRequest :: (MonadIO m, IsWidget o) => o -> Int32 -> m () Source #
Set the value of the “width-request
” property.
When overloading is enabled, this is equivalent to
set
widget [ #widthRequest:=
value ]
Signals
destroy
type WidgetDestroyCallback = IO () Source #
Signals 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.
afterWidgetDestroy :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetDestroyCallback) -> m SignalHandlerId Source #
Connect a signal handler for the destroy signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
widget #destroy callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onWidgetDestroy :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetDestroyCallback) -> m SignalHandlerId Source #
Connect a signal handler for the destroy signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
widget #destroy callback
directionChanged
type WidgetDirectionChangedCallback Source #
Arguments
= TextDirection |
|
-> IO () |
Emitted when the text direction of a widget changes.
afterWidgetDirectionChanged :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetDirectionChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the directionChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
widget #directionChanged callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onWidgetDirectionChanged :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetDirectionChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the directionChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
widget #directionChanged callback
hide
type WidgetHideCallback = IO () Source #
Emitted when widget
is hidden.
afterWidgetHide :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetHideCallback) -> m SignalHandlerId Source #
Connect a signal handler for the hide signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
widget #hide callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onWidgetHide :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetHideCallback) -> m SignalHandlerId Source #
Connect a signal handler for the hide signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
widget #hide callback
keynavFailed
type WidgetKeynavFailedCallback Source #
Arguments
= DirectionType |
|
-> IO Bool | Returns: true if stopping keyboard navigation is fine, false if the emitting widget should try to handle the keyboard navigation attempt in its parent widget |
Emitted if keyboard navigation fails.
See widgetKeynavFailed
for details.
afterWidgetKeynavFailed :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetKeynavFailedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the keynavFailed signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
widget #keynavFailed callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onWidgetKeynavFailed :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetKeynavFailedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the keynavFailed signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
widget #keynavFailed callback
map
type WidgetMapCallback = IO () Source #
Emitted 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.
afterWidgetMap :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetMapCallback) -> m SignalHandlerId Source #
Connect a signal handler for the map signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
widget #map callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onWidgetMap :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetMapCallback) -> m SignalHandlerId Source #
Connect a signal handler for the map signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
widget #map callback
mnemonicActivate
type WidgetMnemonicActivateCallback Source #
Arguments
= Bool |
|
-> IO Bool | Returns: true to stop other handlers from being invoked for the event, false to propagate the event further |
Emitted when a widget is activated via a mnemonic.
The default handler for this signal activates widget
if groupCycling
is false, or just makes widget
grab focus if groupCycling
is true.
afterWidgetMnemonicActivate :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetMnemonicActivateCallback) -> m SignalHandlerId Source #
Connect a signal handler for the mnemonicActivate signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
widget #mnemonicActivate callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onWidgetMnemonicActivate :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetMnemonicActivateCallback) -> m SignalHandlerId Source #
Connect a signal handler for the mnemonicActivate signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
widget #mnemonicActivate callback
moveFocus
type WidgetMoveFocusCallback Source #
Arguments
= DirectionType |
|
-> IO () |
Emitted when the focus is moved.
The ::move-focus
signal is a keybinding signal.
The default bindings for this signal are <kbd>Tab</kbd> to move forward, and <kbd>Shift</kbd>+<kbd>Tab</kbd> to move backward.
afterWidgetMoveFocus :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetMoveFocusCallback) -> m SignalHandlerId Source #
Connect a signal handler for the moveFocus signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
widget #moveFocus callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onWidgetMoveFocus :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetMoveFocusCallback) -> m SignalHandlerId Source #
Connect a signal handler for the moveFocus signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
widget #moveFocus callback
queryTooltip
type WidgetQueryTooltipCallback Source #
Arguments
= Int32 |
|
-> Int32 |
|
-> Bool |
|
-> Tooltip |
|
-> IO Bool | Returns: true if |
Emitted when the widget’s tooltip is about to be shown.
This happens when the Widget:hasTooltip 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 keyboardMode
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.
afterWidgetQueryTooltip :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetQueryTooltipCallback) -> m SignalHandlerId Source #
Connect a signal handler for the queryTooltip signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
widget #queryTooltip callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onWidgetQueryTooltip :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetQueryTooltipCallback) -> m SignalHandlerId Source #
Connect a signal handler for the queryTooltip signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
widget #queryTooltip callback
realize
type WidgetRealizeCallback = IO () Source #
Emitted when widget
is associated with a GdkSurface
.
This means that widgetRealize
has been called
or the widget has been mapped (that is, it is going to be drawn).
afterWidgetRealize :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetRealizeCallback) -> m SignalHandlerId Source #
Connect a signal handler for the realize signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
widget #realize callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onWidgetRealize :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetRealizeCallback) -> m SignalHandlerId Source #
Connect a signal handler for the realize signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
widget #realize callback
show
type WidgetShowCallback = IO () Source #
Emitted when widget
is shown.
afterWidgetShow :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetShowCallback) -> m SignalHandlerId Source #
Connect a signal handler for the show signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
widget #show callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onWidgetShow :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetShowCallback) -> m SignalHandlerId Source #
Connect a signal handler for the show signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
widget #show callback
stateFlagsChanged
type WidgetStateFlagsChangedCallback Source #
Arguments
= [StateFlags] |
|
-> IO () |
Emitted when the widget state changes.
See widgetGetStateFlags
.
afterWidgetStateFlagsChanged :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetStateFlagsChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the stateFlagsChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
widget #stateFlagsChanged callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onWidgetStateFlagsChanged :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetStateFlagsChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the stateFlagsChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
widget #stateFlagsChanged callback
unmap
type WidgetUnmapCallback = IO () Source #
Emitted 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.
afterWidgetUnmap :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetUnmapCallback) -> m SignalHandlerId Source #
Connect a signal handler for the unmap signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
widget #unmap callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onWidgetUnmap :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetUnmapCallback) -> m SignalHandlerId Source #
Connect a signal handler for the unmap signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
widget #unmap callback
unrealize
type WidgetUnrealizeCallback = IO () Source #
Emitted when the GdkSurface
associated with widget
is destroyed.
This means that widgetUnrealize
has been called
or the widget has been unmapped (that is, it is going to be hidden).
afterWidgetUnrealize :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetUnrealizeCallback) -> m SignalHandlerId Source #
Connect a signal handler for the unrealize signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
widget #unrealize callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onWidgetUnrealize :: (IsWidget a, MonadIO m) => a -> ((?self :: a) => WidgetUnrealizeCallback) -> m SignalHandlerId Source #
Connect a signal handler for the unrealize signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
widget #unrealize callback