[−][src]Trait gtk::WidgetExt
Trait containing all Widget
methods.
Implementors
Actionable
, AppChooser
, Calendar
, CellEditable
, CellView
, Container
, DrawingArea
, Entry
, GLArea
, Invisible
, LevelBar
, Misc
, ProgressBar
, Range
, Separator
, Spinner
, Switch
, ToolShell
, Widget
Required methods
fn activate(&self) -> bool
For widgets that can be “activated” (buttons, menu items, etc.)
this function activates them. Activation is what happens when you
press Enter on a widget during key navigation. If self
isn't
activatable, the function returns false
.
Returns
true
if the widget was activatable
fn add_accelerator<P: IsA<AccelGroup>>(
&self,
accel_signal: &str,
accel_group: &P,
accel_key: u32,
accel_mods: ModifierType,
accel_flags: AccelFlags
)
&self,
accel_signal: &str,
accel_group: &P,
accel_key: u32,
accel_mods: ModifierType,
accel_flags: AccelFlags
)
Installs an accelerator for this self
in accel_group
that causes
accel_signal
to be emitted if the accelerator is activated.
The accel_group
needs to be added to the widget’s toplevel via
GtkWindowExt::add_accel_group
, and the signal must be of type gobject::SignalFlags::Action
.
Accelerators added through this function are not user changeable during
runtime. If you want to support accelerators that can be changed by the
user, use AccelMap::add_entry
and WidgetExt::set_accel_path
or
GtkMenuItemExt::set_accel_path
instead.
accel_signal
widget signal to emit on accelerator activation
accel_group
accel group for this widget, added to its toplevel
accel_key
GDK keyval of the accelerator
accel_mods
modifier key combination of the accelerator
accel_flags
flag accelerators, e.g. AccelFlags::Visible
fn add_device_events(&self, device: &Device, events: EventMask)
Adds the device events in the bitfield events
to the event mask for
self
. See WidgetExt::set_device_events
for details.
device
a gdk::Device
events
an event mask, see gdk::EventMask
fn add_mnemonic_label<P: IsA<Widget>>(&self, label: &P)
Adds a widget to the list of mnemonic labels for
this widget. (See WidgetExt::list_mnemonic_labels
). Note 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, by using a connection
to the Widget::destroy
signal or a weak notifier.
label
a Widget
that acts as a mnemonic label for self
fn can_activate_accel(&self, signal_id: u32) -> bool
Determines whether an accelerator that activates the signal
identified by signal_id
can currently be activated.
This is done by emitting the Widget::can-activate-accel
signal on self
; if the signal isn’t overridden by a
handler or in a derived widget, then the default check is
that the widget must be sensitive, and the widget and all
its ancestors mapped.
signal_id
the ID of a signal installed on self
Returns
true
if the accelerator can be activated.
fn child_focus(&self, direction: DirectionType) -> bool
This function is used by custom widget implementations; if you're
writing an app, you’d use WidgetExt::grab_focus
to move the focus
to a particular widget, and ContainerExt::set_focus_chain
to
change the focus tab order. So you may want to investigate those
functions instead.
WidgetExt::child_focus
is called by containers as the user moves
around the window using keyboard shortcuts. direction
indicates
what kind of motion is taking place (up, down, left, right, tab
forward, tab backward). WidgetExt::child_focus
emits the
Widget::focus
signal; widgets override the default handler
for this signal in order to implement appropriate focus behavior.
The default ::focus handler 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. If returning true
, widgets normally
call WidgetExt::grab_focus
to place the focus accordingly;
if returning false
, they don’t modify the current focus location.
direction
direction of focus movement
Returns
true
if focus ended up inside self
fn child_notify(&self, child_property: &str)
Emits a Widget::child-notify
signal for the
[child property][child-properties] child_property
on self
.
This is the analogue of gobject::ObjectExt::notify
for child properties.
Also see ContainerExt::child_notify
.
child_property
the name of a child property installed on the
class of self
’s parent
fn compute_expand(&self, orientation: Orientation) -> bool
Computes whether a container should give this widget extra space
when possible. Containers should check this, rather than
looking at WidgetExt::get_hexpand
or WidgetExt::get_vexpand
.
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.
orientation
expand direction
Returns
whether widget tree rooted here should be expanded
fn create_pango_context(&self) -> Context
Creates a new pango::Context
with the appropriate font map,
font options, font description, and base direction for drawing
text for this widget. See also WidgetExt::get_pango_context
.
Returns
the new pango::Context
fn create_pango_layout(&self, text: Option<&str>) -> Layout
Creates a new pango::Layout
with the appropriate font map,
font description, and base direction for drawing text for
this widget.
If you keep a pango::Layout
created in this way around, you need
to re-create it when the widget pango::Context
is replaced.
This can be tracked by using the Widget::screen-changed
signal
on the widget.
text
text to set on the layout (can be None
)
Returns
the new pango::Layout
fn device_is_shadowed(&self, device: &Device) -> bool
Returns true
if device
has been shadowed by a GTK+
device grab on another widget, so it would stop sending
events to self
. This may be used in the
Widget::grab-notify
signal to check for specific
devices. See gtk_device_grab_add
.
device
a gdk::Device
Returns
true
if there is an ongoing grab on device
by another Widget
than self
.
fn drag_begin_with_coordinates(
&self,
targets: &TargetList,
actions: DragAction,
button: i32,
event: Option<&Event>,
x: i32,
y: i32
) -> Option<DragContext>
&self,
targets: &TargetList,
actions: DragAction,
button: i32,
event: Option<&Event>,
x: i32,
y: i32
) -> Option<DragContext>
Initiates a drag on the source side. The function only needs to be used
when the application is starting drags itself, and is not needed when
Widget::drag_source_set
is used.
The event
is used to retrieve the timestamp that will be used internally to
grab the pointer. If event
is None
, then GDK_CURRENT_TIME
will be used.
However, you should try to pass a real event in all cases, since that can be
used to get information about the drag.
Generally there are three cases when you want to start a drag by hand by calling this function:
-
During a
Widget::button-press-event
handler, if you want to start a drag immediately when the user presses the mouse button. Pass theevent
that you have in yourWidget::button-press-event
handler. -
During a
Widget::motion-notify-event
handler, if you want to start a drag when the mouse moves past a certain threshold distance after a button-press. Pass theevent
that you have in yourWidget::motion-notify-event
handler. -
During a timeout handler, if you want to start a drag after the mouse button is held down for some time. Try to save the last event that you got from the mouse, using
gdk_event_copy
, and pass it to this function (remember to free the event withgdk_event_free
when you are done). If you really cannot pass a real event, passNone
instead.
targets
The targets (data formats) in which the source can provide the data
actions
A bitmask of the allowed drag actions for this drag
button
The button the user clicked to start the drag
event
The event that triggered the start of the drag,
or None
if none can be obtained.
x
The initial x coordinate to start dragging from, in the coordinate space
of self
. If -1 is passed, the coordinates are retrieved from event
or
the current pointer position
y
The initial y coordinate to start dragging from, in the coordinate space
of self
. If -1 is passed, the coordinates are retrieved from event
or
the current pointer position
Returns
the context for this drag
fn drag_check_threshold(
&self,
start_x: i32,
start_y: i32,
current_x: i32,
current_y: i32
) -> bool
&self,
start_x: i32,
start_y: i32,
current_x: i32,
current_y: i32
) -> bool
Checks to see if a mouse drag starting at (start_x
, start_y
) and ending
at (current_x
, current_y
) has passed the GTK+ drag threshold, and thus
should trigger the beginning of a drag-and-drop operation.
start_x
X coordinate of start of drag
start_y
Y coordinate of start of drag
current_x
current X coordinate
current_y
current Y coordinate
Returns
true
if the drag threshold has been passed.
fn drag_dest_add_image_targets(&self)
Add the image targets supported by SelectionData
to
the target list of the drag destination. The targets
are added with info
= 0. If you need another value,
use TargetList::add_image_targets
and
WidgetExt::drag_dest_set_target_list
.
fn drag_dest_add_text_targets(&self)
Add the text targets supported by SelectionData
to
the target list of the drag destination. The targets
are added with info
= 0. If you need another value,
use TargetList::add_text_targets
and
WidgetExt::drag_dest_set_target_list
.
fn drag_dest_add_uri_targets(&self)
Add the URI targets supported by SelectionData
to
the target list of the drag destination. The targets
are added with info
= 0. If you need another value,
use TargetList::add_uri_targets
and
WidgetExt::drag_dest_set_target_list
.
fn drag_dest_find_target(
&self,
context: &DragContext,
target_list: Option<&TargetList>
) -> Option<Atom>
&self,
context: &DragContext,
target_list: Option<&TargetList>
) -> Option<Atom>
Looks for a match between the supported targets of context
and the
dest_target_list
, returning the first matching target, otherwise
returning GDK_NONE
. dest_target_list
should usually be the return
value from WidgetExt::drag_dest_get_target_list
, but some widgets may
have different valid targets for different parts of the widget; in
that case, they will have to implement a drag_motion handler that
passes the correct target list to this function.
context
drag context
target_list
list of droppable targets, or None
to use
gtk_drag_dest_get_target_list (self
).
Returns
first target that the source offers
and the dest can accept, or GDK_NONE
fn drag_dest_get_target_list(&self) -> Option<TargetList>
Returns the list of targets this widget can accept from drag-and-drop.
Returns
the TargetList
, or None
if none
fn drag_dest_get_track_motion(&self) -> bool
Returns whether the widget has been configured to always
emit Widget::drag-motion
signals.
Returns
true
if the widget always emits
Widget::drag-motion
events
fn drag_dest_set_proxy<P: IsA<Window>>(
&self,
proxy_window: &P,
protocol: DragProtocol,
use_coordinates: bool
)
&self,
proxy_window: &P,
protocol: DragProtocol,
use_coordinates: bool
)
Sets this widget as a proxy for drops to another window.
Deprecated since 3.22
proxy_window
the window to which to forward drag events
protocol
the drag protocol which the proxy_window
accepts
(You can use gdk_drag_get_protocol
to determine this)
use_coordinates
If true
, send the same coordinates to the
destination, because it is an embedded
subwindow.
fn drag_dest_set_target_list(&self, target_list: Option<&TargetList>)
Sets the target types that this widget can accept from drag-and-drop.
The widget must first be made into a drag destination with
Widget::drag_dest_set
.
target_list
list of droppable targets, or None
for none
fn drag_dest_set_track_motion(&self, track_motion: bool)
Tells the widget to emit Widget::drag-motion
and
Widget::drag-leave
events regardless of the targets and the
DestDefaults::Motion
flag.
This may be used when a widget wants to do generic actions regardless of the targets that the source offers.
track_motion
whether to accept all targets
fn drag_dest_unset(&self)
Clears information about a drop destination set with
Widget::drag_dest_set
. The widget will no longer receive
notification of drags.
fn drag_get_data(&self, context: &DragContext, target: &Atom, time_: u32)
Gets the data associated with a drag. When the data
is received or the retrieval fails, GTK+ will emit a
Widget::drag-data-received
signal. Failure of the retrieval
is indicated by the length field of the selection_data
signal parameter being negative. However, when WidgetExt::drag_get_data
is called implicitely because the DestDefaults::Drop
was set,
then the widget will not receive notification of failed
drops.
context
the drag context
target
the target (form of the data) to retrieve
time_
a timestamp for retrieving the data. This will
generally be the time received in a Widget::drag-motion
or Widget::drag-drop
signal
fn drag_highlight(&self)
Highlights a widget as a currently hovered drop target.
To end the highlight, call WidgetExt::drag_unhighlight
.
GTK+ calls this automatically if DestDefaults::Highlight
is set.
fn drag_source_add_image_targets(&self)
Add the writable image targets supported by SelectionData
to
the target list of the drag source. The targets
are added with info
= 0. If you need another value,
use TargetList::add_image_targets
and
WidgetExt::drag_source_set_target_list
.
fn drag_source_add_text_targets(&self)
Add the text targets supported by SelectionData
to
the target list of the drag source. The targets
are added with info
= 0. If you need another value,
use TargetList::add_text_targets
and
WidgetExt::drag_source_set_target_list
.
fn drag_source_add_uri_targets(&self)
Add the URI targets supported by SelectionData
to
the target list of the drag source. The targets
are added with info
= 0. If you need another value,
use TargetList::add_uri_targets
and
WidgetExt::drag_source_set_target_list
.
fn drag_source_get_target_list(&self) -> Option<TargetList>
Gets the list of targets this widget can provide for drag-and-drop.
Returns
the TargetList
, or None
if none
fn drag_source_set_icon_gicon<P: IsA<Icon>>(&self, icon: &P)
Sets the icon that will be used for drags from a particular source
to icon
. See the docs for IconTheme
for more details.
icon
A gio::Icon
fn drag_source_set_icon_name(&self, icon_name: &str)
Sets the icon that will be used for drags from a particular source
to a themed icon. See the docs for IconTheme
for more details.
icon_name
name of icon to use
fn drag_source_set_icon_pixbuf(&self, pixbuf: &Pixbuf)
Sets the icon that will be used for drags from a particular widget
from a gdk_pixbuf::Pixbuf
. GTK+ retains a reference for pixbuf
and will
release it when it is no longer needed.
pixbuf
the gdk_pixbuf::Pixbuf
for the drag icon
fn drag_source_set_target_list(&self, target_list: Option<&TargetList>)
Changes the target types that this widget offers for drag-and-drop.
The widget must first be made into a drag source with
Widget::drag_source_set
.
target_list
list of draggable targets, or None
for none
fn drag_source_unset(&self)
Undoes the effects of Widget::drag_source_set
.
fn drag_unhighlight(&self)
Removes a highlight set by WidgetExt::drag_highlight
from
a widget.
fn draw(&self, cr: &Context)
Draws self
to cr
. The top left corner of the widget will be
drawn to the currently set origin point of cr
.
You should pass a cairo context as cr
argument that is in an
original state. Otherwise the resulting drawing is undefined. For
example changing the operator using cairo_set_operator
or the
line width using cairo_set_line_width
might have unwanted side
effects.
You may however change the context’s transform matrix - like with
cairo_scale
, cairo_translate
or cairo_set_matrix
and clip
region with cairo_clip
prior to calling this function. Also, it
is fine to modify the context with cairo_save
and
cairo_push_group
prior to calling this function.
Note that special-purpose widgets may contain special code for
rendering to the screen and might appear differently on screen
and when rendered using WidgetExt::draw
.
cr
a cairo context to draw to
fn error_bell(&self)
Notifies the user about an input-related error on this widget.
If the Settings:gtk-error-bell
setting is true
, it calls
gdk::WindowExt::beep
, otherwise it does nothing.
Note that the effect of gdk::WindowExt::beep
can be configured in many
ways, depending on the windowing backend and the desktop environment
or window manager that is used.
fn event(&self, event: &Event) -> bool
Rarely-used function. This function is used to emit
the event signals on a widget (those signals should never
be emitted without using this function to do so).
If you want to synthesize an event though, don’t use this function;
instead, use gtk_main_do_event
so the event will behave as if
it were in the event queue. Don’t synthesize expose events; instead,
use gdk::WindowExt::invalidate_rect
to invalidate a region of the
window.
event
a GdkEvent
Returns
return from the event signal emission (true
if
the event was handled)
fn freeze_child_notify(&self)
Stops emission of Widget::child-notify
signals on self
. The
signals are queued until WidgetExt::thaw_child_notify
is called
on self
.
This is the analogue of gobject::ObjectExt::freeze_notify
for child properties.
fn get_accessible(&self) -> Option<Object>
Returns the accessible object that describes the widget to an assistive technology.
If accessibility support is not available, this atk::Object
instance may be a no-op. Likewise, if no class-specific atk::Object
implementation is available for the widget instance in question,
it will inherit an atk::Object
implementation from the first ancestor
class for which such an implementation is defined.
The documentation of the ATK library contains more information about accessible objects and their uses.
Returns
the atk::Object
associated with self
fn get_action_group(&self, prefix: &str) -> Option<ActionGroup>
Retrieves the gio::ActionGroup
that was registered using prefix
. The resulting
gio::ActionGroup
may have been registered to self
or any Widget
in its
ancestry.
If no action group was found matching prefix
, then None
is returned.
Feature: v3_16
prefix
The “prefix” of the action group.
Returns
A gio::ActionGroup
or None
.
fn get_allocated_baseline(&self) -> i32
Returns the baseline that has currently been allocated to self
.
This function is intended to be used when implementing handlers
for the Widget::draw
function, and when allocating child
widgets in Widget::size_allocate
.
Returns
the baseline of the self
, or -1 if none
fn get_allocated_height(&self) -> i32
Returns the height that has currently been allocated to self
.
This function is intended to be used when implementing handlers
for the Widget::draw
function.
Returns
the height of the self
fn get_allocated_size(&self) -> (Allocation, i32)
Retrieves the widget’s allocated size.
This function returns the last values passed to
WidgetExt::size_allocate_with_baseline
. The value differs from
the size returned in WidgetExt::get_allocation
in that functions
like WidgetExt::set_halign
can adjust the allocation, but not
the value returned by this function.
If a widget is not visible, its allocated size is 0.
Feature: v3_20
allocation
a pointer to a Allocation
to copy to
baseline
a pointer to an integer to copy to
fn get_allocated_width(&self) -> i32
Returns the width that has currently been allocated to self
.
This function is intended to be used when implementing handlers
for the Widget::draw
function.
Returns
the width of the self
fn get_allocation(&self) -> Allocation
Retrieves the widget’s allocation.
Note, when implementing a Container
: a widget’s allocation will
be its “adjusted” allocation, that is, the widget’s parent
container typically calls WidgetExt::size_allocate
with an
allocation, and that allocation is then adjusted (to handle margin
and alignment for example) before assignment to the widget.
WidgetExt::get_allocation
returns the adjusted allocation that
was actually assigned to the widget. The adjusted allocation is
guaranteed to be completely contained within the
WidgetExt::size_allocate
allocation, however. So a Container
is guaranteed that its children stay inside the assigned bounds,
but not that they have exactly the bounds the container assigned.
There is no way to get the original allocation assigned by
WidgetExt::size_allocate
, since it isn’t stored; if a container
implementation needs that information it will have to track it itself.
allocation
a pointer to a Allocation
to copy to
fn get_ancestor(&self, widget_type: Type) -> Option<Widget>
Gets the first ancestor of self
with type widget_type
. For example,
gtk_widget_get_ancestor (widget, GTK_TYPE_BOX)
gets
the first Box
that’s an ancestor of self
. No reference will be
added to the returned widget; it should not be unreferenced. See note
about checking for a toplevel Window
in the docs for
WidgetExt::get_toplevel
.
Note that unlike WidgetExt::is_ancestor
, WidgetExt::get_ancestor
considers self
to be an ancestor of itself.
widget_type
ancestor type
Returns
the ancestor widget, or None
if not found
fn get_app_paintable(&self) -> bool
Determines whether the application intends to draw on the widget in
an Widget::draw
handler.
See WidgetExt::set_app_paintable
Returns
true
if the widget is app paintable
fn get_can_default(&self) -> bool
Determines whether self
can be a default widget. See
WidgetExt::set_can_default
.
Returns
true
if self
can be a default widget, false
otherwise
fn get_can_focus(&self) -> bool
Determines whether self
can own the input focus. See
WidgetExt::set_can_focus
.
Returns
true
if self
can own the input focus, false
otherwise
fn get_child_visible(&self) -> bool
Gets the value set with WidgetExt::set_child_visible
.
If you feel a need to use this function, your code probably
needs reorganization.
This function is only useful for container implementations and never should be called by an application.
Returns
true
if the widget is mapped with the parent.
fn get_clip(&self) -> Allocation
Retrieves the widget’s clip area.
The clip area is the area in which all of self
's drawing will
happen. Other toolkits call it the bounding box.
Historically, in GTK+ the clip area has been equal to the allocation
retrieved via WidgetExt::get_allocation
.
clip
a pointer to a Allocation
to copy to
fn get_clipboard(&self, selection: &Atom) -> Clipboard
Returns the clipboard object for the given selection to
be used with self
. self
must have a gdk::Display
associated with it, so must be attached to a toplevel
window.
selection
a gdk::Atom
which identifies the clipboard
to use. GDK_SELECTION_CLIPBOARD
gives the
default clipboard. Another common value
is GDK_SELECTION_PRIMARY
, which gives
the primary X selection.
Returns
the appropriate clipboard object. If no clipboard already exists, a new one will be created. Once a clipboard object has been created, it is persistent for all time.
fn get_device_enabled(&self, device: &Device) -> bool
Returns whether device
can interact with self
and its
children. See WidgetExt::set_device_enabled
.
device
a gdk::Device
Returns
true
is device
is enabled for self
fn get_device_events(&self, device: &Device) -> EventMask
Returns the events mask for the widget corresponding to an specific device. These
are the events that the widget will receive when device
operates on it.
device
a gdk::Device
Returns
device event mask for self
fn get_direction(&self) -> TextDirection
Gets the reading direction for a particular widget. See
WidgetExt::set_direction
.
Returns
the reading direction for the widget.
fn get_display(&self) -> Display
Get the gdk::Display
for the toplevel window associated with
this widget. This function can only be called after the widget
has been added to a widget hierarchy with a Window
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.
Returns
the gdk::Display
for the toplevel for this widget.
fn get_double_buffered(&self) -> bool
Determines whether the widget is double buffered.
See Widget::set_double_buffered
Returns
true
if the widget is double buffered
fn get_focus_on_click(&self) -> bool
Returns whether the widget should grab focus when it is clicked with the mouse.
See WidgetExt::set_focus_on_click
.
Feature: v3_20
Returns
true
if the widget should grab focus when it is clicked with
the mouse.
fn get_font_map(&self) -> Option<FontMap>
Gets the font map that has been set with WidgetExt::set_font_map
.
Feature: v3_18
Returns
A pango::FontMap
, or None
fn get_font_options(&self) -> Option<FontOptions>
Returns the cairo::FontOptions
used for Pango rendering. When not set,
the defaults font options for the gdk::Screen
will be used.
Feature: v3_18
Returns
the cairo::FontOptions
or None
if not set
fn get_frame_clock(&self) -> Option<FrameClock>
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
gdk::FrameClock::get_frame_time
, 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 gdk::FrameClock::get_frame_time
, and
then update the animation by calling
gdk::FrameClock::get_frame_time
again during each repaint.
gdk::FrameClock::request_phase
will result in a new frame on the
clock, but won’t necessarily repaint any widgets. To repaint a
widget, you have to use WidgetExt::queue_draw
which invalidates
the widget (thus scheduling it to receive a draw on the next
frame). WidgetExt::queue_draw
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.
Returns
a gdk::FrameClock
,
or None
if widget is unrealized
fn get_halign(&self) -> Align
Gets the value of the Widget:halign
property.
For backwards compatibility reasons this method will never return
Align::Baseline
, but instead it will convert it to
Align::Fill
. Baselines are not supported for horizontal
alignment.
Returns
the horizontal alignment of self
fn get_has_tooltip(&self) -> bool
Returns the current value of the has-tooltip property. See
Widget:has-tooltip
for more information.
Returns
current value of has-tooltip on self
.
fn get_has_window(&self) -> bool
Determines whether self
has a gdk::Window
of its own. See
WidgetExt::set_has_window
.
Returns
true
if self
has a window, false
otherwise
fn get_hexpand(&self) -> bool
Gets whether the widget would like any available extra horizontal
space. When a user resizes a Window
, widgets with expand=TRUE
generally receive the extra space. For example, a list or
scrollable area or document in your window would often be set to
expand.
Containers should use WidgetExt::compute_expand
rather than
this function, to see whether a widget, or 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.
Returns
whether hexpand flag is set
fn get_hexpand_set(&self) -> bool
Gets whether WidgetExt::set_hexpand
has been used to
explicitly set the expand flag on this widget.
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.
Returns
whether hexpand has been explicitly set
fn get_mapped(&self) -> bool
fn get_margin_bottom(&self) -> i32
fn get_margin_end(&self) -> i32
fn get_margin_start(&self) -> i32
fn get_margin_top(&self) -> i32
fn get_modifier_mask(&self, intent: ModifierIntent) -> ModifierType
Returns the modifier mask the self
’s windowing system backend
uses for a particular purpose.
See gdk::Keymap::get_modifier_mask
.
intent
the use case for the modifier mask
Returns
the modifier mask used for intent
.
fn get_widget_name(&self) -> GString
Retrieves the name of a widget. See WidgetExt::set_name
for the
significance of widget names.
Returns
name of the widget. This string is owned by GTK+ and should not be modified or freed
fn get_no_show_all(&self) -> bool
Returns the current value of the Widget:no-show-all
property,
which determines whether calls to WidgetExt::show_all
will affect this widget.
Returns
the current value of the “no-show-all” property.
fn get_opacity(&self) -> f64
Fetches the requested opacity for this widget.
See WidgetExt::set_opacity
.
Returns
the requested opacity for this widget.
fn get_pango_context(&self) -> Context
Gets a pango::Context
with the appropriate font map, font description,
and base direction for this widget. Unlike the context returned
by WidgetExt::create_pango_context
, 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 using the Widget::screen-changed
signal on the widget.
Returns
the pango::Context
for the widget.
fn get_parent(&self) -> Option<Widget>
fn get_parent_window(&self) -> Option<Window>
Gets self
’s parent window, or None
if it does not have one.
Returns
the parent window of self
, or None
if it does not have a parent window.
fn get_path(&self) -> WidgetPath
Returns the WidgetPath
representing self
, if the widget
is not connected to a toplevel widget, a partial path will be
created.
Returns
The WidgetPath
representing self
fn get_preferred_height(&self) -> (i32, i32)
Retrieves a widget’s initial minimum and natural height.
This call is specific to width-for-height requests.
The returned request will be modified by the
WidgetClass
::adjust_size_request virtual method and by any
GtkSizeGroups
that have been applied. That is, the returned request
is the one that should be used for layout, not necessarily the one
returned by the widget itself.
minimum_height
location to store the minimum height, or None
natural_height
location to store the natural height, or None
fn get_preferred_height_and_baseline_for_width(
&self,
width: i32
) -> (i32, i32, i32, i32)
&self,
width: i32
) -> (i32, i32, i32, i32)
Retrieves a widget’s minimum and natural height and the corresponding baselines if it would be given
the specified width
, or the default height if width
is -1. The baselines may be -1 which means
that no baseline is requested for this widget.
The returned request will be modified by the
WidgetClass
::adjust_size_request and WidgetClass
::adjust_baseline_request virtual methods
and by any GtkSizeGroups
that have been applied. That is, the returned request
is the one that should be used for layout, not necessarily the one
returned by the widget itself.
width
the width which is available for allocation, or -1 if none
minimum_height
location for storing the minimum height, or None
natural_height
location for storing the natural height, or None
minimum_baseline
location for storing the baseline for the minimum height, or None
natural_baseline
location for storing the baseline for the natural height, or None
fn get_preferred_height_for_width(&self, width: i32) -> (i32, i32)
Retrieves a widget’s minimum and natural height if it would be given
the specified width
.
The returned request will be modified by the
WidgetClass
::adjust_size_request virtual method and by any
GtkSizeGroups
that have been applied. That is, the returned request
is the one that should be used for layout, not necessarily the one
returned by the widget itself.
width
the width which is available for allocation
minimum_height
location for storing the minimum height, or None
natural_height
location for storing the natural height, or None
fn get_preferred_size(&self) -> (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 Layout
.
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 WidgetExt::get_preferred_height_and_baseline_for_width
if you want to support
baseline alignment.
minimum_size
location for storing the minimum size, or None
natural_size
location for storing the natural size, or None
fn get_preferred_width(&self) -> (i32, i32)
Retrieves a widget’s initial minimum and natural width.
This call is specific to height-for-width requests.
The returned request will be modified by the
WidgetClass
::adjust_size_request virtual method and by any
GtkSizeGroups
that have been applied. That is, the returned request
is the one that should be used for layout, not necessarily the one
returned by the widget itself.
minimum_width
location to store the minimum width, or None
natural_width
location to store the natural width, or None
fn get_preferred_width_for_height(&self, height: i32) -> (i32, i32)
Retrieves a widget’s minimum and natural width if it would be given
the specified height
.
The returned request will be modified by the
WidgetClass
::adjust_size_request virtual method and by any
GtkSizeGroups
that have been applied. That is, the returned request
is the one that should be used for layout, not necessarily the one
returned by the widget itself.
height
the height which is available for allocation
minimum_width
location for storing the minimum width, or None
natural_width
location for storing the natural width, or None
fn get_realized(&self) -> bool
fn get_receives_default(&self) -> bool
Determines whether self
is always treated as the default widget
within its toplevel when it has the focus, even if another widget
is the default.
See WidgetExt::set_receives_default
.
Returns
true
if self
acts as the default widget when focused,
false
otherwise
fn get_request_mode(&self) -> SizeRequestMode
Gets whether the widget prefers a height-for-width layout or a width-for-height layout.
Bin
widgets generally propagate the preference of
their child, container widgets need to request something either in
context of their children or in context of their allocation
capabilities.
Returns
The SizeRequestMode
preferred by self
.
fn get_scale_factor(&self) -> i32
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).
See gdk::WindowExt::get_scale_factor
.
Returns
the scale factor for self
fn get_screen(&self) -> Option<Screen>
Get the gdk::Screen
from the toplevel window associated with
this widget. This function can only be called after the widget
has been added to a widget hierarchy with a Window
at the top.
In general, you should only create screen specific resources when a widget has been realized, and you should free those resources when the widget is unrealized.
Returns
the gdk::Screen
for the toplevel for this widget.
fn get_sensitive(&self) -> bool
Returns the widget’s sensitivity (in the sense of returning
the value that has been set using WidgetExt::set_sensitive
).
The effective sensitivity of a widget is however determined by both its
own and its parent widget’s sensitivity. See WidgetExt::is_sensitive
.
Returns
true
if the widget is sensitive
fn get_settings(&self) -> Option<Settings>
Gets the settings object holding the settings used for this widget.
Note that this function can only be called when the Widget
is attached to a toplevel, since the settings object is specific
to a particular gdk::Screen
.
Returns
the relevant Settings
object
fn get_size_request(&self) -> (i32, i32)
Gets the size request that was explicitly set for the widget using
WidgetExt::set_size_request
. 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
WidgetExt::set_size_request
. To get the size a widget will
actually request, call WidgetExt::get_preferred_size
instead of
this function.
width
return location for width, or None
height
return location for height, or None
fn get_state_flags(&self) -> StateFlags
Returns the widget state as a flag set. It is worth mentioning
that the effective StateFlags::Insensitive
state will be
returned, that is, also based on parent insensitivity, even if
self
itself is sensitive.
Also note that if you are looking for a way to obtain the
StateFlags
to pass to a StyleContext
method, you
should look at StyleContextExt::get_state
.
Returns
The state flags for widget
fn get_style_context(&self) -> StyleContext
Returns the style context associated to self
. The returned object is
guaranteed to be the same for the lifetime of self
.
Returns
a StyleContext
. This memory is owned by self
and
must not be freed.
fn get_support_multidevice(&self) -> bool
Returns true
if self
is multiple pointer aware. See
WidgetExt::set_support_multidevice
for more information.
Returns
true
if self
is multidevice aware.
fn get_template_child(&self, widget_type: Type, name: &str) -> Option<Object>
Fetch an object build from the template XML for widget_type
in this self
instance.
This will only report children which were previously declared with
WidgetClass::bind_template_child_full
or one of its
variants.
This function is only meant to be called for code which is private to the widget_type
which
declared the child and is meant for language bindings which cannot easily make use
of the GObject structure offsets.
widget_type
The glib::Type
to get a template child for
name
The “id” of the child defined in the template XML
Returns
The object built in the template XML with the id name
fn get_tooltip_markup(&self) -> Option<GString>
Gets the contents of the tooltip for self
.
Returns
the tooltip text, or None
. You should free the
returned string with g_free
when done.
fn get_tooltip_text(&self) -> Option<GString>
Gets the contents of the tooltip for self
.
Returns
the tooltip text, or None
. You should free the
returned string with g_free
when done.
fn get_tooltip_window(&self) -> Option<Window>
Returns the Window
of the current tooltip. This can be the
Window
created by default, or the custom tooltip window set
using WidgetExt::set_tooltip_window
.
Returns
The Window
of the current tooltip.
fn get_toplevel(&self) -> Option<Widget>
This function returns the topmost widget in the container hierarchy
self
is a part of. If self
has no parent widgets, it will be
returned as the topmost widget. No reference will be added to the
returned widget; it should not be unreferenced.
Note the difference in behavior vs. WidgetExt::get_ancestor
;
gtk_widget_get_ancestor (widget, GTK_TYPE_WINDOW)
would return
None
if self
wasn’t inside a toplevel window, and if the
window was inside a Window
-derived widget which was in turn
inside the toplevel Window
. While the second case may
seem unlikely, it actually happens when a Plug
is embedded
inside a Socket
within the same application.
To reliably find the toplevel Window
, use
WidgetExt::get_toplevel
and call GTK_IS_WINDOW()
on the result. For instance, to get the title of a widget's toplevel
window, one might use:
static const char *
get_widget_toplevel_title (GtkWidget *widget)
{
GtkWidget *toplevel = gtk_widget_get_toplevel (widget);
if (GTK_IS_WINDOW (toplevel))
{
return gtk_window_get_title (GTK_WINDOW (toplevel));
}
return NULL;
}
Returns
the topmost ancestor of self
, or self
itself
if there’s no ancestor.
fn get_valign(&self) -> Align
Gets the value of the Widget:valign
property.
For backwards compatibility reasons this method will never return
Align::Baseline
, but instead it will convert it to
Align::Fill
. If your widget want to support baseline aligned
children it must use WidgetExt::get_valign_with_baseline
, or
g_object_get (widget, "valign", &value, NULL)
, which will
also report the true value.
Returns
the vertical alignment of self
, ignoring baseline alignment
fn get_valign_with_baseline(&self) -> Align
Gets the value of the Widget:valign
property, including
Align::Baseline
.
Returns
the vertical alignment of self
fn get_vexpand(&self) -> bool
Gets whether the widget would like any available extra vertical space.
See WidgetExt::get_hexpand
for more detail.
Returns
whether vexpand flag is set
fn get_vexpand_set(&self) -> bool
Gets whether WidgetExt::set_vexpand
has been used to
explicitly set the expand flag on this widget.
See WidgetExt::get_hexpand_set
for more detail.
Returns
whether vexpand has been explicitly set
fn get_visible(&self) -> bool
Determines whether the widget is visible. If you want to
take into account whether the widget’s parent is also marked as
visible, use WidgetExt::is_visible
instead.
This function does not check if the widget is obscured in any way.
See WidgetExt::set_visible
.
Returns
true
if the widget is visible
fn get_visual(&self) -> Option<Visual>
fn get_window(&self) -> Option<Window>
fn grab_add(&self)
Makes self
the current grabbed widget.
This means that interaction with other widgets in the same application is blocked and mouse as well as keyboard events are delivered to this widget.
If self
is not sensitive, it is not set as the current
grabbed widget and this function does nothing.
fn grab_default(&self)
Causes self
to become the default widget. self
must be able to be
a default widget; typically you would ensure this yourself
by calling WidgetExt::set_can_default
with a true
value.
The default widget is activated when
the user presses Enter in a window. Default widgets must be
activatable, that is, WidgetExt::activate
should affect them. Note
that Entry
widgets require the “activates-default” property
set to true
before they activate the default widget when Enter
is pressed and the Entry
is focused.
fn grab_focus(&self)
Causes self
to have the keyboard focus for the Window
it's
inside. self
must be a focusable widget, such as a Entry
;
something like Frame
won’t work.
More precisely, it must have the GTK_CAN_FOCUS
flag set. Use
WidgetExt::set_can_focus
to modify that flag.
The widget also needs to be realized and mapped. This is indicated by the related signals. Grabbing the focus immediately after creating the widget will likely fail and cause critical warnings.
fn grab_remove(&self)
Removes the grab from the given widget.
You have to pair calls to WidgetExt::grab_add
and WidgetExt::grab_remove
.
If self
does not have the grab, this function does nothing.
fn has_default(&self) -> bool
Determines whether self
is the current default widget within its
toplevel. See WidgetExt::set_can_default
.
Returns
true
if self
is the current default widget within
its toplevel, false
otherwise
fn has_focus(&self) -> bool
Determines if the widget has the global input focus. See
WidgetExt::is_focus
for the difference between having the global
input focus, and only having the focus within a toplevel.
Returns
true
if the widget has the global input focus.
fn has_grab(&self) -> bool
Determines whether the widget is currently grabbing events, so it is the only widget receiving input events (keyboard and mouse).
See also WidgetExt::grab_add
.
Returns
true
if the widget is in the grab_widgets stack
fn has_screen(&self) -> bool
Checks whether there is a gdk::Screen
is associated with
this widget. All toplevel widgets have an associated
screen, and all widgets added into a hierarchy with a toplevel
window at the top.
Returns
true
if there is a gdk::Screen
associated
with the widget.
fn has_visible_focus(&self) -> bool
Determines if the widget should show a visible indication that
it has the global input focus. This is a convenience function for
use in ::draw handlers that takes into account whether focus
indication should currently be shown in the toplevel window of
self
. See GtkWindowExt::get_focus_visible
for more information
about focus indication.
To find out if the widget has the global input focus, use
WidgetExt::has_focus
.
Returns
true
if the widget should display a “focus rectangle”
fn hide(&self)
Reverses the effects of WidgetExt::show
, causing the widget to be
hidden (invisible to the user).
fn in_destruction(&self) -> bool
Returns whether the widget is currently being destroyed. This information can sometimes be used to avoid doing unnecessary work.
Returns
true
if self
is being destroyed
fn init_template(&self)
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 WidgetClass::set_template
It is important to call this function in the instance initializer
of a Widget
subclass and not in gobject::Object.constructed
() or
gobject::Object.constructor
() for two reasons.
One reason is that generally derived widgets will assume that parent class composite widgets have been created in their instance initializers.
Another reason is that when calling gobject::Object::new
on a widget with
composite templates, it’s important to build the composite widgets
before the construct properties are set. Properties passed to gobject::Object::new
should take precedence over properties set in the private template XML.
fn input_shape_combine_region(&self, region: Option<&Region>)
Sets an input shape for this widget’s GDK window. This allows for
windows which react to mouse click in a nonrectangular region, see
gdk::WindowExt::input_shape_combine_region
for more information.
region
shape to be added, or None
to remove an existing shape
fn insert_action_group<P: IsA<ActionGroup>>(
&self,
name: &str,
group: Option<&P>
)
&self,
name: &str,
group: Option<&P>
)
Inserts group
into self
. Children of self
that implement
Actionable
can then be associated with actions in group
by
setting their “action-name” to
prefix
.action-name
.
If group
is None
, a previously inserted group for name
is removed
from self
.
name
the prefix for actions in group
group
a gio::ActionGroup
, or None
fn is_ancestor<P: IsA<Widget>>(&self, ancestor: &P) -> bool
Determines whether self
is somewhere inside ancestor
, possibly with
intermediate containers.
ancestor
another Widget
Returns
true
if ancestor
contains self
as a child,
grandchild, great grandchild, etc.
fn is_composited(&self) -> bool
Whether self
can rely on having its alpha channel
drawn correctly. On X11 this function returns whether a
compositing manager is running for self
’s screen.
Please note that the semantics of this call will change
in the future if used on a widget that has a composited
window in its hierarchy (as set by gdk::WindowExt::set_composited
).
Deprecated since 3.22
Use gdk::Screen::is_composited
instead.
Returns
true
if the widget can rely on its alpha
channel being drawn correctly.
fn is_drawable(&self) -> bool
Determines whether self
can be drawn to. A widget can be drawn
to if it is mapped and visible.
Returns
true
if self
is drawable, false
otherwise
fn is_focus(&self) -> bool
Determines if the widget is the focus widget within its
toplevel. (This does not mean that the Widget:has-focus
property is
necessarily set; Widget:has-focus
will only be set if the
toplevel widget additionally has the global input focus.)
Returns
true
if the widget is the focus widget.
fn is_sensitive(&self) -> bool
Returns the widget’s effective sensitivity, which means it is sensitive itself and also its parent widget is sensitive
Returns
true
if the widget is effectively sensitive
fn is_toplevel(&self) -> bool
Determines whether self
is a toplevel widget.
Currently only Window
and Invisible
(and out-of-process
GtkPlugs
) are toplevel widgets. Toplevel widgets have no parent
widget.
Returns
true
if self
is a toplevel, false
otherwise
fn is_visible(&self) -> bool
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 WidgetExt::get_visible
and WidgetExt::set_visible
Returns
true
if the widget and all its parents are visible
fn keynav_failed(&self, direction: DirectionType) -> bool
This function should be called whenever keyboard navigation within
a single widget hits a boundary. The function emits the
Widget::keynav-failed
signal on the widget and its return
value should be interpreted in a way similar to the return value of
WidgetExt::child_focus
:
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
WidgetExt::child_focus
on the widget’s toplevel.
The default ::keynav-failed handler returns false
for
DirectionType::TabForward
and DirectionType::TabBackward
. For the other
values of DirectionType
it returns true
.
Whenever the default handler returns true
, it also calls
WidgetExt::error_bell
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.
direction
direction of focus movement
Returns
true
if stopping keyboard navigation is fine, false
if the emitting widget should try to handle the keyboard
navigation attempt in its parent container(s).
fn list_accel_closures(&self) -> Vec<Closure>
Lists the closures used by self
for accelerator group connections
with AccelGroup::connect_by_path
or AccelGroup::connect
.
The closures can be used to monitor accelerator changes on self
,
by connecting to the AccelGroup::accel-changed
signal of the
AccelGroup
of a closure which can be found out with
AccelGroup::from_accel_closure
.
Returns
a newly allocated glib::List
of closures
fn list_action_prefixes(&self) -> Vec<GString>
Retrieves a None
-terminated array of strings containing the prefixes of
gio::ActionGroup
's available to self
.
Feature: v3_16
Returns
a None
-terminated array of strings.
fn list_mnemonic_labels(&self) -> Vec<Widget>
Returns a newly allocated list of the widgets, normally labels, for
which this widget is the target of a mnemonic (see for example,
LabelExt::set_mnemonic_widget
).
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.
Returns
the list of
mnemonic labels; free this list
with glib::List::free
when you are done with it.
fn map(&self)
This function is only for use in widget implementations. Causes a widget to be mapped if it isn’t already.
fn mnemonic_activate(&self, group_cycling: bool) -> bool
Emits the Widget::mnemonic-activate
signal.
group_cycling
true
if there are other widgets with the same mnemonic
Returns
true
if the signal has been handled
fn override_background_color(&self, state: StateFlags, color: Option<&RGBA>)
Sets the background color to use for a widget.
All other style values are left untouched.
See WidgetExt::override_color
.
Deprecated since 3.16
This function is not useful in the context of CSS-based
rendering. If you wish to change the way a widget renders its background
you should use a custom CSS style, through an application-specific
StyleProvider
and a CSS style class. You can also override the default
drawing of a widget through the Widget::draw
signal, and use Cairo to
draw a specific color, regardless of the CSS style.
state
the state for which to set the background color
color
the color to assign, or None
to undo the effect
of previous calls to WidgetExt::override_background_color
fn override_color(&self, state: StateFlags, color: Option<&RGBA>)
Sets the color to use for a widget.
All other style values are left untouched.
This function does not act recursively. Setting the color of a
container does not affect its children. Note that some widgets that
you may not think of as containers, for instance GtkButtons
,
are actually containers.
This API is mostly meant as a quick way for applications to
change a widget appearance. If you are developing a widgets
library and intend this change to be themeable, it is better
done by setting meaningful CSS classes in your
widget/container implementation through StyleContextExt::add_class
.
This way, your widget library can install a CssProvider
with the GTK_STYLE_PROVIDER_PRIORITY_FALLBACK
priority in order
to provide a default styling for those widgets that need so, and
this theming may fully overridden by the user’s theme.
Note that for complex widgets this may bring in undesired
results (such as uniform background color everywhere), in
these cases it is better to fully style such widgets through a
CssProvider
with the GTK_STYLE_PROVIDER_PRIORITY_APPLICATION
priority.
Deprecated since 3.16
Use a custom style provider and style classes instead
state
the state for which to set the color
color
the color to assign, or None
to undo the effect
of previous calls to WidgetExt::override_color
fn override_cursor(
&self,
cursor: Option<&RGBA>,
secondary_cursor: Option<&RGBA>
)
&self,
cursor: Option<&RGBA>,
secondary_cursor: Option<&RGBA>
)
Sets the cursor color to use in a widget, overriding the
cursor-color and secondary-cursor-color
style properties. All other style values are left untouched.
See also Widget::modify_style
.
Note that the underlying properties have the gdk::Color
type,
so the alpha value in primary
and secondary
will be ignored.
Deprecated since 3.16
This function is not useful in the context of CSS-based
rendering. If you wish to change the color used to render the primary
and secondary cursors you should use a custom CSS style, through an
application-specific StyleProvider
and a CSS style class.
cursor
the color to use for primary cursor (does not need to be
allocated), or None
to undo the effect of previous calls to
of WidgetExt::override_cursor
.
secondary_cursor
the color to use for secondary cursor (does not
need to be allocated), or None
to undo the effect of previous
calls to of WidgetExt::override_cursor
.
fn override_font(&self, font_desc: &FontDescription)
Sets the font to use for a widget. All other style values are
left untouched. See WidgetExt::override_color
.
Deprecated since 3.16
This function is not useful in the context of CSS-based
rendering. If you wish to change the font a widget uses to render its text
you should use a custom CSS style, through an application-specific
StyleProvider
and a CSS style class.
font_desc
the font description to use, or None
to undo
the effect of previous calls to WidgetExt::override_font
fn override_symbolic_color(&self, name: &str, color: Option<&RGBA>)
Sets a symbolic color for a widget.
All other style values are left untouched.
See WidgetExt::override_color
for overriding the foreground
or background color.
Deprecated since 3.16
This function is not useful in the context of CSS-based
rendering. If you wish to change the color used to render symbolic icons
you should use a custom CSS style, through an application-specific
StyleProvider
and a CSS style class.
name
the name of the symbolic color to modify
color
the color to assign (does not need
to be allocated), or None
to undo the effect of previous
calls to WidgetExt::override_symbolic_color
fn queue_allocate(&self)
This function is only for use in widget implementations.
Flags the widget for a rerun of the WidgetClass
::size_allocate
function. Use this function instead of WidgetExt::queue_resize
when the self
's size request didn't change but it wants to
reposition its contents.
An example user of this function is WidgetExt::set_halign
.
Feature: v3_20
fn queue_compute_expand(&self)
Mark self
as needing to recompute its expand flags. Call
this function when setting legacy expand child properties
on the child of a container.
See WidgetExt::compute_expand
.
fn queue_draw(&self)
Equivalent to calling WidgetExt::queue_draw_area
for the
entire area of a widget.
fn queue_draw_area(&self, x: i32, y: i32, width: i32, height: i32)
Convenience function that calls WidgetExt::queue_draw_region
on
the region created from the given coordinates.
The region here is specified in widget coordinates.
Widget coordinates are a bit odd; for historical reasons, they are
defined as self
->window coordinates for widgets that return true
for
WidgetExt::get_has_window
, and are relative to self
->allocation.x,
self
->allocation.y otherwise.
width
or height
may be 0, in this case this function does
nothing. Negative values for width
and height
are not allowed.
x
x coordinate of upper-left corner of rectangle to redraw
y
y coordinate of upper-left corner of rectangle to redraw
width
width of region to draw
height
height of region to draw
fn queue_draw_region(&self, region: &Region)
Invalidates the area of self
defined by region
by calling
gdk::WindowExt::invalidate_region
on the widget’s window and all its
child windows. Once the main loop becomes idle (after the current
batch of events has been processed, roughly), the window will
receive expose events for the union of all regions that have been
invalidated.
Normally you would only use this function in widget
implementations. You might also use it to schedule a redraw of a
DrawingArea
or some portion thereof.
region
region to draw
fn queue_resize(&self)
This function is only for use in widget implementations.
Flags a widget to have its size renegotiated; should
be called when a widget for some reason has a new size request.
For example, when you change the text in a Label
, Label
queues a resize to ensure there’s enough space for the new text.
Note that you cannot call WidgetExt::queue_resize
on a widget
from inside its implementation of the WidgetClass
::size_allocate
virtual method. Calls to WidgetExt::queue_resize
from inside
WidgetClass
::size_allocate will be silently ignored.
fn queue_resize_no_redraw(&self)
This function works like WidgetExt::queue_resize
,
except that the widget is not invalidated.
fn realize(&self)
Creates the GDK (windowing system) resources associated with a
widget. For example, self
->window will be created when a widget
is realized. 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
WidgetExt::realize
realizes the widget’s parents in addition to
self
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::draw
. Or simply g_signal_connect () to the
Widget::realize
signal.
fn register_window<P: IsA<Window>>(&self, window: &P)
Registers a gdk::Window
with the widget and sets it up so that
the widget receives events for it. Call WidgetExt::unregister_window
when destroying the window.
Before 3.8 you needed to call gdk::WindowExt::set_user_data
directly to set
this up. This is now deprecated and you should use WidgetExt::register_window
instead. Old code will keep working as is, although some new features like
transparency might not work perfectly.
window
a gdk::Window
fn remove_accelerator<P: IsA<AccelGroup>>(
&self,
accel_group: &P,
accel_key: u32,
accel_mods: ModifierType
) -> bool
&self,
accel_group: &P,
accel_key: u32,
accel_mods: ModifierType
) -> bool
Removes an accelerator from self
, previously installed with
WidgetExt::add_accelerator
.
accel_group
accel group for this widget
accel_key
GDK keyval of the accelerator
accel_mods
modifier key combination of the accelerator
Returns
whether an accelerator was installed and could be removed
fn remove_mnemonic_label<P: IsA<Widget>>(&self, label: &P)
Removes a widget from the list of mnemonic labels for
this widget. (See WidgetExt::list_mnemonic_labels
). The widget
must have previously been added to the list with
WidgetExt::add_mnemonic_label
.
label
a Widget
that was previously set as a mnemonic label for
self
with WidgetExt::add_mnemonic_label
.
fn reset_style(&self)
Updates the style context of self
and all descendants
by updating its widget path. GtkContainers
may want
to use this on a child when reordering it in a way that a different
style might apply to it. See also ContainerExt::get_path_for_child
.
fn send_expose(&self, event: &Event) -> i32
Very rarely-used function. This function is used to emit
an expose event on a widget. This function is not normally used
directly. The only time it is used is when propagating an expose
event to a windowless child widget (WidgetExt::get_has_window
is false
),
and that is normally done using ContainerExt::propagate_draw
.
If you want to force an area of a window to be redrawn,
use gdk::WindowExt::invalidate_rect
or gdk::WindowExt::invalidate_region
.
To cause the redraw to be done immediately, follow that call
with a call to gdk::WindowExt::process_updates
.
Deprecated since 3.22
Application and widget code should not handle
expose events directly; invalidation should use the Widget
API, and drawing should only happen inside Widget::draw
implementations
event
a expose GdkEvent
Returns
return from the event signal emission (true
if
the event was handled)
fn send_focus_change(&self, event: &Event) -> bool
Sends the focus change event
to self
This function is not meant to be used by applications. The only time it
should be used is when it is necessary for a Widget
to assign focus
to a widget that is semantically owned by the first widget even though
it’s not a direct child - for instance, a search entry in a floating
window similar to the quick search in TreeView
.
An example of its usage is:
GdkEvent *fevent = gdk_event_new (GDK_FOCUS_CHANGE);
fevent->focus_change.type = GDK_FOCUS_CHANGE;
fevent->focus_change.in = TRUE;
fevent->focus_change.window = _gtk_widget_get_window (widget);
if (fevent->focus_change.window != NULL)
g_object_ref (fevent->focus_change.window);
gtk_widget_send_focus_change (widget, fevent);
gdk_event_free (event);
event
a GdkEvent
of type GDK_FOCUS_CHANGE
Returns
the return value from the event signal emission: true
if the event was handled, and false
otherwise
fn set_accel_path<P: IsA<AccelGroup>>(
&self,
accel_path: Option<&str>,
accel_group: Option<&P>
)
&self,
accel_path: Option<&str>,
accel_group: Option<&P>
)
Given an accelerator group, accel_group
, and an accelerator path,
accel_path
, sets up an accelerator in accel_group
so whenever the
key binding that is defined for accel_path
is pressed, self
will be activated. This removes any accelerators (for any
accelerator group) installed by previous calls to
WidgetExt::set_accel_path
. Associating accelerators with
paths allows them to be modified by the user and the modifications
to be saved for future use. (See AccelMap::save
.)
This function is a low level function that would most likely
be used by a menu creation system like UIManager
. If you
use UIManager
, setting up accelerator paths will be done
automatically.
Even when you you aren’t using UIManager
, if you only want to
set up accelerators on menu items GtkMenuItemExt::set_accel_path
provides a somewhat more convenient interface.
Note that accel_path
string will be stored in a glib::Quark
. Therefore, if you
pass a static string, you can save some memory by interning it first with
g_intern_static_string
.
accel_path
path used to look up the accelerator
accel_group
a AccelGroup
.
fn set_allocation(&self, allocation: &Allocation)
Sets the widget’s allocation. This should not be used directly, but from within a widget’s size_allocate method.
The allocation set should be the “adjusted” or actual
allocation. If you’re implementing a Container
, you want to use
WidgetExt::size_allocate
instead of WidgetExt::set_allocation
.
The WidgetClass
::adjust_size_allocation virtual method adjusts the
allocation inside WidgetExt::size_allocate
to create an adjusted
allocation.
allocation
a pointer to a Allocation
to copy from
fn set_app_paintable(&self, app_paintable: bool)
Sets whether the application intends to draw on the widget in
an Widget::draw
handler.
This is a hint to the widget and does not affect the behavior of
the GTK+ core; many widgets ignore this flag entirely. For widgets
that do pay attention to the flag, such as EventBox
and Window
,
the effect is to suppress default themed drawing of the widget's
background. (Children of the widget will still be drawn.) The application
is then entirely responsible for drawing the widget background.
Note that the background is still drawn when the widget is mapped.
app_paintable
true
if the application will paint on the widget
fn set_can_default(&self, can_default: bool)
Specifies whether self
can be a default widget. See
WidgetExt::grab_default
for details about the meaning of
“default”.
can_default
whether or not self
can be a default widget.
fn set_can_focus(&self, can_focus: bool)
Specifies whether self
can own the input focus. See
WidgetExt::grab_focus
for actually setting the input focus on a
widget.
can_focus
whether or not self
can own the input focus.
fn set_child_visible(&self, is_visible: bool)
Sets whether self
should be mapped along with its when its parent
is mapped and self
has been shown with WidgetExt::show
.
The child visibility can be set for widget before it is added to
a container with WidgetExt::set_parent
, 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 container implementations and never should be called by an application.
is_visible
if true
, self
should be mapped along with its parent.
fn set_clip(&self, clip: &Allocation)
Sets the widget’s clip. This must not be used directly,
but from within a widget’s size_allocate method.
It must be called after WidgetExt::set_allocation
(or after chaining up
to the parent class), because that function resets the clip.
The clip set should be the area that self
draws on. If self
is a
Container
, the area must contain all children's clips.
If this function is not called by self
during a ::size-allocate handler,
the clip will be set to self
's allocation.
clip
a pointer to a Allocation
to copy from
fn set_device_enabled(&self, device: &Device, enabled: bool)
Enables or disables a gdk::Device
to interact with self
and all its children.
It does so by descending through the gdk::Window
hierarchy
and enabling the same mask that is has for core events
(i.e. the one that gdk::WindowExt::get_events
returns).
device
a gdk::Device
enabled
whether to enable the device
fn set_device_events(&self, device: &Device, events: EventMask)
Sets the device event mask (see gdk::EventMask
) for a widget. The event
mask determines which events a widget will receive from device
. Keep
in mind that different widgets have different default event masks, and by
changing the event mask you may disrupt a widget’s functionality,
so be careful. This function must be called while a widget is
unrealized. Consider WidgetExt::add_device_events
for widgets that are
already realized, or if you want to preserve the existing event
mask. This function can’t be used with windowless widgets (which return
false
from WidgetExt::get_has_window
);
to get events on those widgets, place them inside a EventBox
and receive events on the event box.
device
a gdk::Device
events
event mask
fn set_direction(&self, dir: TextDirection)
Sets the reading direction on a particular 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 present, except for containers where the containers are arranged in an order that is explicitly visual rather than logical (such as buttons for text justification).
If the direction is set to TextDirection::None
, then the value
set by Widget::set_default_direction
will be used.
dir
the new direction
fn set_focus_on_click(&self, focus_on_click: bool)
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.
Feature: v3_20
focus_on_click
whether the widget should grab focus when clicked with the mouse
fn set_font_map<P: IsA<FontMap>>(&self, font_map: Option<&P>)
Sets the font map to use for Pango rendering. When not set, the widget will inherit the font map from its parent.
Feature: v3_18
font_map
a pango::FontMap
, or None
to unset any previously
set font map
fn set_font_options(&self, options: Option<&FontOptions>)
Sets the cairo::FontOptions
used for Pango rendering in this widget.
When not set, the default font options for the gdk::Screen
will be used.
Feature: v3_18
options
a cairo::FontOptions
, or None
to unset any
previously set default font options.
fn set_halign(&self, align: Align)
Sets the horizontal alignment of self
.
See the Widget:halign
property.
align
the horizontal alignment
fn set_has_tooltip(&self, has_tooltip: bool)
Sets the has-tooltip property on self
to has_tooltip
. See
Widget:has-tooltip
for more information.
has_tooltip
whether or not self
has a tooltip.
fn set_has_window(&self, has_window: bool)
Specifies whether self
has a gdk::Window
of its own. Note that
all realized widgets have a non-None
“window” pointer
(WidgetExt::get_window
never returns a None
window when a widget
is realized), but for many of them it’s actually the gdk::Window
of
one of its parent widgets. Widgets that do not create a window
for
themselves in Widget::realize
must announce this by
calling this function with has_window
= false
.
This function should only be called by widget implementations,
and they should call it in their init
function.
has_window
whether or not self
has a window.
fn set_hexpand(&self, expand: bool)
Sets whether the widget would like any available extra horizontal
space. When a user resizes a Window
, widgets with expand=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 WidgetExt::compute_expand
. A
container can decide how the expandability of children affects the
expansion of the container by overriding the compute_expand virtual
method on Widget
.).
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
WidgetExt::set_hexpand
sets the hexpand-set property (see
WidgetExt::set_hexpand_set
) which causes the widget’s hexpand
value to be used, rather than looking at children and widget state.
expand
whether to expand
fn set_hexpand_set(&self, set: bool)
Sets whether the hexpand flag (see WidgetExt::get_hexpand
) will
be used.
The hexpand-set property will be set automatically when you call
WidgetExt::set_hexpand
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.
set
value for hexpand-set property
fn set_mapped(&self, mapped: bool)
Marks the widget as being mapped.
This function should only ever be called in a derived widget's “map” or “unmap” implementation.
mapped
true
to mark the widget as mapped
fn set_margin_bottom(&self, margin: i32)
fn set_margin_end(&self, margin: i32)
fn set_margin_start(&self, margin: i32)
fn set_margin_top(&self, margin: i32)
fn set_widget_name(&self, name: &str)
Widgets can be named, which allows you to refer to them 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.
name
name for the widget
fn set_no_show_all(&self, no_show_all: bool)
Sets the Widget:no-show-all
property, which determines whether
calls to WidgetExt::show_all
will affect this widget.
This is mostly for use in constructing widget hierarchies with externally
controlled visibility, see UIManager
.
no_show_all
the new value for the “no-show-all” property
fn set_opacity(&self, opacity: f64)
Request the self
to be rendered partially transparent,
with opacity 0 being fully transparent and 1 fully opaque. (Opacity values
are clamped to the [0,1] range.).
This works on both toplevel widget, and child widgets, although there
are some limitations:
For toplevel widgets this depends on the capabilities of the windowing
system. On X11 this has any effect only on X screens with a compositing manager
running. See WidgetExt::is_composited
. On Windows it should work
always, although setting a window’s opacity after the window has been
shown causes it to flicker once on Windows.
For child widgets it doesn’t work if any affected widget has a native window, or disables double buffering.
opacity
desired opacity, between 0 and 1
fn set_parent<P: IsA<Widget>>(&self, parent: &P)
This function is useful only when implementing subclasses of
Container
.
Sets the container as the parent of self
, and takes care of
some details such as updating the state and style of the child
to reflect its new location. The opposite function is
WidgetExt::unparent
.
parent
parent container
fn set_parent_window<P: IsA<Window>>(&self, parent_window: &P)
Sets a non default parent window for self
.
For Window
classes, setting a parent_window
effects whether
the window is a toplevel window or can be embedded into other
widgets.
For Window
classes, this needs to be called before the
window is realized.
parent_window
the new parent window.
fn set_realized(&self, realized: bool)
Marks the widget as being realized. This function must only be
called after all GdkWindows
for the self
have been created
and registered.
This function should only ever be called in a derived widget's “realize” or “unrealize” implementation.
realized
true
to mark the widget as realized
fn set_receives_default(&self, receives_default: bool)
Specifies whether self
will be treated as the default widget
within its toplevel when it has the focus, even if another widget
is the default.
See WidgetExt::grab_default
for details about the meaning of
“default”.
receives_default
whether or not self
can be a default widget.
fn set_redraw_on_allocate(&self, redraw_on_allocate: bool)
Sets whether the entire widget is queued for drawing when its size
allocation changes. By default, this setting is true
and
the entire widget is redrawn on every size change. If your widget
leaves the upper left unchanged when made bigger, turning this
setting off will improve performance.
Note that for widgets where WidgetExt::get_has_window
is false
setting this flag to false
turns off all allocation on resizing:
the widget will not even redraw if its position changes; this is to
allow containers that don’t draw anything to avoid excess
invalidations. If you set this flag on a widget with no window that
does draw on self
->window, you are
responsible for invalidating both the old and new allocation of the
widget when the widget is moved and responsible for invalidating
regions newly when the widget increases size.
redraw_on_allocate
if true
, the entire widget will be redrawn
when it is allocated to a new size. Otherwise, only the
new portion of the widget will be redrawn.
fn set_sensitive(&self, sensitive: bool)
Sets the sensitivity of a 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.
sensitive
true
to make the widget sensitive
fn set_size_request(&self, width: i32, height: i32)
Sets the minimum size of a 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, GtkWindowExt::set_default_size
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. When dealing with window sizes,
GtkWindowExt::set_geometry_hints
can be a useful function as well.
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's basically impossible to hardcode a size that will always be correct.
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
Widget
properties margin-left, margin-right, margin-top, and
margin-bottom, but it does include pretty much all other padding
or border properties set by any subclass of Widget
.
width
width self
should request, or -1 to unset
height
height self
should request, or -1 to unset
fn set_state_flags(&self, flags: StateFlags, clear: bool)
This function is for use in widget implementations. Turns on flag values in the current widget state (insensitive, prelighted, etc.).
This function accepts the values StateFlags::DirLtr
and
StateFlags::DirRtl
but ignores them. If you want to set the widget's
direction, use WidgetExt::set_direction
.
It is worth mentioning that any other state than StateFlags::Insensitive
,
will be propagated down to all non-internal children if self
is a
Container
, while StateFlags::Insensitive
itself will be propagated
down to all Container
children by different means than turning on the
state flag down the hierarchy, both WidgetExt::get_state_flags
and
WidgetExt::is_sensitive
will make use of these.
flags
State flags to turn on
clear
Whether to clear state before turning on flags
fn set_support_multidevice(&self, support_multidevice: bool)
Enables or disables multiple pointer awareness. If this setting is true
,
self
will start receiving multiple, per device enter/leave events. Note
that if custom GdkWindows
are created in Widget::realize
,
gdk::WindowExt::set_support_multidevice
will have to be called manually on them.
support_multidevice
true
to support input from multiple devices.
fn set_tooltip_markup(&self, markup: Option<&str>)
Sets markup
as the contents of the tooltip, which is marked up with
the Pango text markup language.
This function will take care of setting Widget:has-tooltip
to true
and of the default handler for the Widget::query-tooltip
signal.
See also the Widget:tooltip-markup
property and
Tooltip::set_markup
.
markup
the contents of the tooltip for self
, or None
fn set_tooltip_text(&self, text: Option<&str>)
Sets text
as the contents of the tooltip. This function will take
care of setting Widget:has-tooltip
to true
and of the default
handler for the Widget::query-tooltip
signal.
See also the Widget:tooltip-text
property and Tooltip::set_text
.
text
the contents of the tooltip for self
fn set_tooltip_window<P: IsA<Window>>(&self, custom_window: Option<&P>)
Replaces the default window used for displaying
tooltips with custom_window
. GTK+ will take care of showing and
hiding custom_window
at the right moment, to behave likewise as
the default tooltip window. If custom_window
is None
, the default
tooltip window will be used.
custom_window
a Window
, or None
fn set_valign(&self, align: Align)
fn set_vexpand(&self, expand: bool)
Sets whether the widget would like any available extra vertical space.
See WidgetExt::set_hexpand
for more detail.
expand
whether to expand
fn set_vexpand_set(&self, set: bool)
Sets whether the vexpand flag (see WidgetExt::get_vexpand
) will
be used.
See WidgetExt::set_hexpand_set
for more detail.
set
value for vexpand-set property
fn set_visible(&self, visible: bool)
Sets the visibility state of self
. Note that setting this to
true
doesn’t mean the widget is actually viewable, see
WidgetExt::get_visible
.
This function simply calls WidgetExt::show
or WidgetExt::hide
but is nicer to use when the visibility of the widget depends on
some condition.
visible
whether the widget should be shown or not
fn set_visual(&self, visual: Option<&Visual>)
Sets the visual that should be used for by widget and its children for
creating GdkWindows
. The visual must be on the same gdk::Screen
as
returned by WidgetExt::get_screen
, so handling the
Widget::screen-changed
signal is necessary.
Setting a new visual
will not cause self
to recreate its windows,
so you should call this function before self
is realized.
visual
visual to be used or None
to unset a previous one
fn set_window<P: IsA<Window>>(&self, window: &P)
Sets a widget’s window. This function should only be used in a
widget’s Widget::realize
implementation. The window
passed is
usually either new window created with gdk::Window::new
, or the
window of its parent widget as returned by
WidgetExt::get_parent_window
.
Widgets must indicate whether they will create their own gdk::Window
by calling WidgetExt::set_has_window
. This is usually done in the
widget’s init
function.
Note that this function does not add any reference to window
.
window
a gdk::Window
fn shape_combine_region(&self, region: Option<&Region>)
Sets a shape for this widget’s GDK window. This allows for
transparent windows etc., see gdk::WindowExt::shape_combine_region
for more information.
region
shape to be added, or None
to remove an existing shape
fn show(&self)
Flags a widget to be displayed. Any widget that isn’t shown will
not appear on the screen. If you want to show all the widgets in a
container, it’s easier to call WidgetExt::show_all
on the
container, instead of individually showing the widgets.
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 container is shown, it is immediately realized and mapped; other shown widgets are realized and mapped when their toplevel container is realized and mapped.
fn show_all(&self)
Recursively shows a widget, and any child widgets (if the widget is a container).
fn show_now(&self)
Shows a widget. If the widget is an unmapped toplevel widget
(i.e. a Window
that has not yet been shown), enter the main
loop and wait for the window to actually be mapped. Be careful;
because the main loop is running, anything can happen during
this function.
fn size_allocate(&self, allocation: &Allocation)
This function is only used by Container
subclasses, to assign a size
and position to their child widgets.
In this function, the allocation may be adjusted. It will be forced
to a 1x1 minimum size, and the adjust_size_allocation virtual
method on the child will be used to adjust the allocation. Standard
adjustments include removing the widget’s margins, and applying the
widget’s Widget:halign
and Widget:valign
properties.
For baseline support in containers you need to use WidgetExt::size_allocate_with_baseline
instead.
allocation
position and size to be allocated to self
fn size_allocate_with_baseline(
&self,
allocation: &mut Allocation,
baseline: i32
)
&self,
allocation: &mut Allocation,
baseline: i32
)
This function is only used by Container
subclasses, to assign a size,
position and (optionally) baseline to their child widgets.
In this function, the allocation and baseline may be adjusted. It
will be forced to a 1x1 minimum size, and the
adjust_size_allocation virtual and adjust_baseline_allocation
methods on the child will be used to adjust the allocation and
baseline. Standard adjustments include removing the widget's
margins, and applying the widget’s Widget:halign
and
Widget:valign
properties.
If the child widget does not have a valign of Align::Baseline
the
baseline argument is ignored and -1 is used instead.
allocation
position and size to be allocated to self
baseline
The baseline of the child, or -1
fn style_get_property(&self, property_name: &str) -> Value
Gets the value of a style property of self
.
property_name
the name of a style property
value
location to return the property value
fn thaw_child_notify(&self)
Reverts the effect of a previous call to WidgetExt::freeze_child_notify
.
This causes all queued Widget::child-notify
signals on self
to be
emitted.
fn translate_coordinates<P: IsA<Widget>>(
&self,
dest_widget: &P,
src_x: i32,
src_y: i32
) -> Option<(i32, i32)>
&self,
dest_widget: &P,
src_x: i32,
src_y: i32
) -> Option<(i32, i32)>
Translate coordinates relative to self
’s allocation to coordinates
relative to dest_widget
’s allocations. In order to perform this
operation, both widgets must be realized, and must share a common
toplevel.
dest_widget
a Widget
src_x
X position relative to self
src_y
Y position relative to self
dest_x
location to store X position relative to dest_widget
dest_y
location to store Y position relative to dest_widget
Returns
false
if either widget was not realized, or there
was no common ancestor. In this case, nothing is stored in
*dest_x
and *dest_y
. Otherwise true
.
fn trigger_tooltip_query(&self)
Triggers a tooltip query on the display where the toplevel of self
is located. See Tooltip::trigger_tooltip_query
for more
information.
fn unmap(&self)
This function is only for use in widget implementations. Causes a widget to be unmapped if it’s currently mapped.
fn unparent(&self)
This function is only for use in widget implementations.
Should be called by implementations of the remove method
on Container
, to dissociate a child from the container.
fn unrealize(&self)
This function is only useful in widget implementations.
Causes a widget to be unrealized (frees all GDK resources
associated with the widget, such as self
->window).
fn unregister_window<P: IsA<Window>>(&self, window: &P)
Unregisters a gdk::Window
from the widget that was previously set up with
WidgetExt::register_window
. You need to call this when the window is
no longer used by the widget, such as when you destroy it.
window
a gdk::Window
fn unset_state_flags(&self, flags: StateFlags)
This function is for use in widget implementations. Turns off flag
values for the current widget state (insensitive, prelighted, etc.).
See WidgetExt::set_state_flags
.
flags
State flags to turn off
fn get_property_composite_child(&self) -> bool
fn get_property_expand(&self) -> bool
Whether to expand in both directions. Setting this sets both Widget:hexpand
and Widget:vexpand
fn set_property_expand(&self, expand: bool)
Whether to expand in both directions. Setting this sets both Widget:hexpand
and Widget:vexpand
fn get_property_has_default(&self) -> bool
fn set_property_has_default(&self, has_default: bool)
fn get_property_has_focus(&self) -> bool
fn set_property_has_focus(&self, has_focus: bool)
fn get_property_height_request(&self) -> i32
fn set_property_height_request(&self, height_request: i32)
fn get_property_is_focus(&self) -> bool
fn set_property_is_focus(&self, is_focus: bool)
fn get_property_margin(&self) -> i32
Sets all four sides' margin at once. If read, returns max margin on any side.
fn set_property_margin(&self, margin: i32)
Sets all four sides' margin at once. If read, returns max margin on any side.
fn get_property_width_request(&self) -> i32
fn set_property_width_request(&self, width_request: i32)
fn connect_accel_closures_changed<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_button_press_event<F: Fn(&Self, &EventButton) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::button-press-event signal will be emitted when a button (typically from a mouse) is pressed.
To receive this signal, the gdk::Window
associated to the
widget needs to enable the gdk::EventMask::ButtonPressMask
mask.
This signal will be sent to the grab widget if there is one.
event
the gdk::EventButton
which triggered
this signal.
Returns
true
to stop other handlers from being invoked for the event.
false
to propagate the event further.
fn connect_button_release_event<F: Fn(&Self, &EventButton) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::button-release-event signal will be emitted when a button (typically from a mouse) is released.
To receive this signal, the gdk::Window
associated to the
widget needs to enable the gdk::EventMask::ButtonReleaseMask
mask.
This signal will be sent to the grab widget if there is one.
event
the gdk::EventButton
which triggered
this signal.
Returns
true
to stop other handlers from being invoked for the event.
false
to propagate the event further.
fn connect_can_activate_accel<F: Fn(&Self, u32) -> bool + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
Determines whether an accelerator that activates the signal
identified by signal_id
can currently be activated.
This signal is present to allow applications and derived
widgets to override the default Widget
handling
for determining whether an accelerator can be activated.
signal_id
the ID of a signal installed on widget
Returns
true
if the signal can be activated.
fn connect_child_notify<F: Fn(&Self, &ParamSpec) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::child-notify signal is emitted for each [child property][child-properties] that has changed on an object. The signal's detail holds the property name.
child_property
the gobject::ParamSpec
of the changed child property
fn connect_composited_changed<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::composited-changed signal is emitted when the composited
status of widgets
screen changes.
See gdk::Screen::is_composited
.
Deprecated since 3.22
Use gdk::Screen
::composited-changed instead.
fn emit_composited_changed(&self)
fn connect_configure_event<F: Fn(&Self, &EventConfigure) -> bool + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::configure-event signal will be emitted when the size, position or
stacking of the widget
's window has changed.
To receive this signal, the gdk::Window
associated to the widget needs
to enable the gdk::EventMask::StructureMask
mask. GDK will enable this mask
automatically for all new windows.
event
the gdk::EventConfigure
which triggered
this signal.
Returns
true
to stop other handlers from being invoked for the event.
false
to propagate the event further.
fn connect_damage_event<F: Fn(&Self, &EventExpose) -> bool + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
Emitted when a redirected window belonging to widget
gets drawn into.
The region/area members of the event shows what area of the redirected
drawable was drawn into.
event
the gdk::EventExpose
event
Returns
true
to stop other handlers from being invoked for the event.
false
to propagate the event further.
fn connect_delete_event<F: Fn(&Self, &Event) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::delete-event signal is emitted if a user requests that
a toplevel window is closed. The default handler for this signal
destroys the window. Connecting Widget::hide_on_delete
to
this signal will cause the window to be hidden instead, so that
it can later be shown again without reconstructing it.
event
the event which triggered this signal
Returns
true
to stop other handlers from being invoked for the event.
false
to propagate the event further.
fn connect_destroy<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
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.
fn connect_destroy_event<F: Fn(&Self, &Event) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::destroy-event signal is emitted when a gdk::Window
is destroyed.
You rarely get this signal, because most widgets disconnect themselves
from their window before they destroy it, so no widget owns the
window at destroy time.
To receive this signal, the gdk::Window
associated to the widget needs
to enable the gdk::EventMask::StructureMask
mask. GDK will enable this mask
automatically for all new windows.
event
the event which triggered this signal
Returns
true
to stop other handlers from being invoked for the event.
false
to propagate the event further.
fn connect_direction_changed<F: Fn(&Self, TextDirection) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::direction-changed signal is emitted when the text direction of a widget changes.
previous_direction
the previous text direction of widget
fn connect_drag_begin<F: Fn(&Self, &DragContext) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::drag-begin signal is emitted on the drag source when a drag is
started. A typical reason to connect to this signal is to set up a
custom drag icon with e.g. WidgetExt::drag_source_set_icon_pixbuf
.
Note that some widgets set up a drag icon in the default handler of
this signal, so you may have to use g_signal_connect_after
to
override what the default handler did.
context
the drag context
fn connect_drag_data_delete<F: Fn(&Self, &DragContext) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::drag-data-delete signal is emitted on the drag source when a drag
with the action gdk::DragAction::Move
is successfully completed. The signal
handler is responsible for deleting the data that has been dropped. What
"delete" means depends on the context of the drag operation.
context
the drag context
fn connect_drag_data_get<F: Fn(&Self, &DragContext, &SelectionData, u32, u32) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::drag-data-get signal is emitted on the drag source when the drop
site requests the data which is dragged. It is the responsibility of
the signal handler to fill data
with the data in the format which
is indicated by info
. See SelectionData::set
and
SelectionData::set_text
.
context
the drag context
data
the SelectionData
to be filled with the dragged data
info
the info that has been registered with the target in the
TargetList
time
the timestamp at which the data was requested
fn connect_drag_data_received<F: Fn(&Self, &DragContext, i32, i32, &SelectionData, u32, u32) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::drag-data-received signal is emitted on the drop site when the
dragged data has been received. If the data was received in order to
determine whether the drop will be accepted, the handler is expected
to call gdk_drag_status
and not finish the drag.
If the data was received in response to a Widget::drag-drop
signal
(and this is the last target to be received), the handler for this
signal is expected to process the received data and then call
gtk_drag_finish
, setting the success
parameter depending on
whether the data was processed successfully.
Applications must create some means to determine why the signal was emitted
and therefore whether to call gdk_drag_status
or gtk_drag_finish
.
The handler may inspect the selected action with
gdk::DragContext::get_selected_action
before calling
gtk_drag_finish
, e.g. to implement gdk::DragAction::Ask
as
shown in the following example:
void
drag_data_received (GtkWidget *widget,
GdkDragContext *context,
gint x,
gint y,
GtkSelectionData *data,
guint info,
guint time)
{
if ((data->length >= 0) && (data->format == 8))
{
GdkDragAction action;
// handle data here
action = gdk_drag_context_get_selected_action (context);
if (action == GDK_ACTION_ASK)
{
GtkWidget *dialog;
gint response;
dialog = gtk_message_dialog_new (NULL,
GTK_DIALOG_MODAL |
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_INFO,
GTK_BUTTONS_YES_NO,
"Move the data ?\n");
response = gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
if (response == GTK_RESPONSE_YES)
action = GDK_ACTION_MOVE;
else
action = GDK_ACTION_COPY;
}
gtk_drag_finish (context, TRUE, action == GDK_ACTION_MOVE, time);
}
else
gtk_drag_finish (context, FALSE, FALSE, time);
}
context
the drag context
x
where the drop happened
y
where the drop happened
data
the received data
info
the info that has been registered with the target in the
TargetList
time
the timestamp at which the data was received
fn connect_drag_drop<F: Fn(&Self, &DragContext, i32, i32, u32) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::drag-drop signal is emitted on the drop site when the user drops
the data onto the widget. The signal handler must determine whether
the cursor position is in a drop zone or not. If it is not in a drop
zone, it returns false
and no further processing is necessary.
Otherwise, the handler returns true
. In this case, the handler must
ensure that gtk_drag_finish
is called to let the source know that
the drop is done. The call to gtk_drag_finish
can be done either
directly or in a Widget::drag-data-received
handler which gets
triggered by calling WidgetExt::drag_get_data
to receive the data for one
or more of the supported targets.
context
the drag context
x
the x coordinate of the current cursor position
y
the y coordinate of the current cursor position
time
the timestamp of the motion event
Returns
whether the cursor position is in a drop zone
fn connect_drag_end<F: Fn(&Self, &DragContext) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::drag-end signal is emitted on the drag source when a drag is
finished. A typical reason to connect to this signal is to undo
things done in Widget::drag-begin
.
context
the drag context
fn connect_drag_failed<F: Fn(&Self, &DragContext, DragResult) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::drag-failed signal is emitted on the drag source when a drag has
failed. The signal handler may hook custom code to handle a failed DnD
operation based on the type of error, it returns true
is the failure has
been already handled (not showing the default "drag operation failed"
animation), otherwise it returns false
.
context
the drag context
result
the result of the drag operation
Returns
true
if the failed drag operation has been already handled.
fn connect_drag_leave<F: Fn(&Self, &DragContext, u32) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::drag-leave signal is emitted on the drop site when the cursor
leaves the widget. A typical reason to connect to this signal is to
undo things done in Widget::drag-motion
, e.g. undo highlighting
with WidgetExt::drag_unhighlight
.
Likewise, the Widget::drag-leave
signal is also emitted before the
::drag-drop signal, for instance to allow cleaning up of a preview item
created in the Widget::drag-motion
signal handler.
context
the drag context
time
the timestamp of the motion event
fn connect_drag_motion<F: Fn(&Self, &DragContext, i32, i32, u32) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::drag-motion signal is emitted on the drop site when the user
moves the cursor over the widget during a drag. The signal handler
must determine whether the cursor position is in a drop zone or not.
If it is not in a drop zone, it returns false
and no further processing
is necessary. Otherwise, the handler returns true
. In this case, the
handler is responsible for providing the necessary information for
displaying feedback to the user, by calling gdk_drag_status
.
If the decision whether the drop will be accepted or rejected can't be
made based solely on the cursor position and the type of the data, the
handler may inspect the dragged data by calling WidgetExt::drag_get_data
and
defer the gdk_drag_status
call to the Widget::drag-data-received
handler. Note that you must pass DestDefaults::Drop
,
DestDefaults::Motion
or DestDefaults::All
to Widget::drag_dest_set
when using the drag-motion signal that way.
Also note that there is no drag-enter signal. The drag receiver has to
keep track of whether he has received any drag-motion signals since the
last Widget::drag-leave
and if not, treat the drag-motion signal as
an "enter" signal. Upon an "enter", the handler will typically highlight
the drop site with WidgetExt::drag_highlight
.
static void
drag_motion (GtkWidget *widget,
GdkDragContext *context,
gint x,
gint y,
guint time)
{
GdkAtom target;
PrivateData *private_data = GET_PRIVATE_DATA (widget);
if (!private_data->drag_highlight)
{
private_data->drag_highlight = 1;
gtk_drag_highlight (widget);
}
target = gtk_drag_dest_find_target (widget, context, NULL);
if (target == GDK_NONE)
gdk_drag_status (context, 0, time);
else
{
private_data->pending_status
= gdk_drag_context_get_suggested_action (context);
gtk_drag_get_data (widget, context, target, time);
}
return TRUE;
}
static void
drag_data_received (GtkWidget *widget,
GdkDragContext *context,
gint x,
gint y,
GtkSelectionData *selection_data,
guint info,
guint time)
{
PrivateData *private_data = GET_PRIVATE_DATA (widget);
if (private_data->suggested_action)
{
private_data->suggested_action = 0;
// We are getting this data due to a request in drag_motion,
// rather than due to a request in drag_drop, so we are just
// supposed to call gdk_drag_status(), not actually paste in
// the data.
str = gtk_selection_data_get_text (selection_data);
if (!data_is_acceptable (str))
gdk_drag_status (context, 0, time);
else
gdk_drag_status (context,
private_data->suggested_action,
time);
}
else
{
// accept the drop
}
}
context
the drag context
x
the x coordinate of the current cursor position
y
the y coordinate of the current cursor position
time
the timestamp of the motion event
Returns
whether the cursor position is in a drop zone
fn connect_draw<F: Fn(&Self, &Context) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
This signal is emitted when a widget is supposed to render itself.
The widget
's top left corner must be painted at the origin of
the passed in context and be sized to the values returned by
WidgetExt::get_allocated_width
and
WidgetExt::get_allocated_height
.
Signal handlers connected to this signal can modify the cairo
context passed as cr
in any way they like and don't need to
restore it. The signal emission takes care of calling cairo_save
before and cairo_restore
after invoking the handler.
The signal handler will get a cr
with a clip region already set to the
widget's dirty region, i.e. to the area that needs repainting. Complicated
widgets that want to avoid redrawing themselves completely can get the full
extents of the clip region with gdk_cairo_get_clip_rectangle
, or they can
get a finer-grained representation of the dirty region with
cairo_copy_clip_rectangle_list
.
cr
the cairo context to draw to
Returns
true
to stop other handlers from being invoked for the event.
false
to propagate the event further.
fn connect_enter_notify_event<F: Fn(&Self, &EventCrossing) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::enter-notify-event will be emitted when the pointer enters
the widget
's window.
To receive this signal, the gdk::Window
associated to the widget needs
to enable the gdk::EventMask::EnterNotifyMask
mask.
This signal will be sent to the grab widget if there is one.
event
the gdk::EventCrossing
which triggered
this signal.
Returns
true
to stop other handlers from being invoked for the event.
false
to propagate the event further.
fn connect_event<F: Fn(&Self, &Event) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The GTK+ main loop will emit three signals for each GDK event delivered
to a widget: one generic ::event signal, another, more specific,
signal that matches the type of event delivered (e.g.
Widget::key-press-event
) and finally a generic
Widget::event-after
signal.
event
the GdkEvent
which triggered this signal
Returns
true
to stop other handlers from being invoked for the event
and to cancel the emission of the second specific ::event signal.
false
to propagate the event further and to allow the emission of
the second signal. The ::event-after signal is emitted regardless of
the return value.
fn connect_event_after<F: Fn(&Self, &Event) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
After the emission of the Widget::event
signal and (optionally)
the second more specific signal, ::event-after will be emitted
regardless of the previous two signals handlers return values.
event
the GdkEvent
which triggered this signal
fn connect_focus<F: Fn(&Self, DirectionType) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
Returns
true
to stop other handlers from being invoked for the event. false
to propagate the event further.
fn connect_focus_in_event<F: Fn(&Self, &EventFocus) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::focus-in-event signal will be emitted when the keyboard focus
enters the widget
's window.
To receive this signal, the gdk::Window
associated to the widget needs
to enable the gdk::EventMask::FocusChangeMask
mask.
event
the gdk::EventFocus
which triggered
this signal.
Returns
true
to stop other handlers from being invoked for the event.
false
to propagate the event further.
fn connect_focus_out_event<F: Fn(&Self, &EventFocus) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::focus-out-event signal will be emitted when the keyboard focus
leaves the widget
's window.
To receive this signal, the gdk::Window
associated to the widget needs
to enable the gdk::EventMask::FocusChangeMask
mask.
event
the gdk::EventFocus
which triggered this
signal.
Returns
true
to stop other handlers from being invoked for the event.
false
to propagate the event further.
fn connect_grab_broken_event<F: Fn(&Self, &EventGrabBroken) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
Emitted when a pointer or keyboard grab on a window belonging
to widget
gets broken.
On X11, this happens when the grab window becomes unviewable (i.e. it or one of its ancestors is unmapped), or if the same application grabs the pointer or keyboard again.
event
the gdk::EventGrabBroken
event
Returns
true
to stop other handlers from being invoked for
the event. false
to propagate the event further.
fn connect_grab_focus<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn emit_grab_focus(&self)
fn connect_grab_notify<F: Fn(&Self, bool) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::grab-notify signal is emitted when a widget becomes shadowed by a GTK+ grab (not a pointer or keyboard grab) on another widget, or when it becomes unshadowed due to a grab being removed.
A widget is shadowed by a WidgetExt::grab_add
when the topmost
grab widget in the grab stack of its window group is not
its ancestor.
was_grabbed
false
if the widget becomes shadowed, true
if it becomes unshadowed
fn connect_hide<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
The ::hide signal is emitted when widget
is hidden, for example with
WidgetExt::hide
.
fn connect_hierarchy_changed<F: Fn(&Self, Option<&Widget>) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::hierarchy-changed signal is emitted when the
anchored state of a widget changes. A widget is
“anchored” when its toplevel
ancestor is a Window
. This signal is emitted when
a widget changes from un-anchored to anchored or vice-versa.
previous_toplevel
the previous toplevel ancestor, or None
if the widget was previously unanchored
fn connect_key_press_event<F: Fn(&Self, &EventKey) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::key-press-event signal is emitted when a key is pressed. The signal emission will reoccur at the key-repeat rate when the key is kept pressed.
To receive this signal, the gdk::Window
associated to the widget needs
to enable the gdk::EventMask::KeyPressMask
mask.
This signal will be sent to the grab widget if there is one.
event
the gdk::EventKey
which triggered this signal.
Returns
true
to stop other handlers from being invoked for the event.
false
to propagate the event further.
fn connect_key_release_event<F: Fn(&Self, &EventKey) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::key-release-event signal is emitted when a key is released.
To receive this signal, the gdk::Window
associated to the widget needs
to enable the gdk::EventMask::KeyReleaseMask
mask.
This signal will be sent to the grab widget if there is one.
event
the gdk::EventKey
which triggered this signal.
Returns
true
to stop other handlers from being invoked for the event.
false
to propagate the event further.
fn connect_keynav_failed<F: Fn(&Self, DirectionType) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
Gets emitted if keyboard navigation fails.
See WidgetExt::keynav_failed
for details.
direction
the direction of movement
Returns
true
if stopping keyboard navigation is fine, false
if the emitting widget should try to handle the keyboard
navigation attempt in its parent container(s).
fn connect_leave_notify_event<F: Fn(&Self, &EventCrossing) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::leave-notify-event will be emitted when the pointer leaves
the widget
's window.
To receive this signal, the gdk::Window
associated to the widget needs
to enable the gdk::EventMask::LeaveNotifyMask
mask.
This signal will be sent to the grab widget if there is one.
event
the gdk::EventCrossing
which triggered
this signal.
Returns
true
to stop other handlers from being invoked for the event.
false
to propagate the event further.
fn connect_map<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
The ::map signal is emitted when widget
is going to be mapped, that is
when the widget is visible (which is controlled with
WidgetExt::set_visible
) and all its parents up to the toplevel widget
are also visible. Once the map has occurred, Widget::map-event
will
be emitted.
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
.
fn connect_mnemonic_activate<F: Fn(&Self, bool) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The default handler for this signal activates widget
if group_cycling
is false
, or just makes widget
grab focus if group_cycling
is true
.
group_cycling
true
if there are other widgets with the same mnemonic
Returns
true
to stop other handlers from being invoked for the event.
false
to propagate the event further.
fn connect_motion_notify_event<F: Fn(&Self, &EventMotion) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::motion-notify-event signal is emitted when the pointer moves
over the widget's gdk::Window
.
To receive this signal, the gdk::Window
associated to the widget
needs to enable the gdk::EventMask::PointerMotionMask
mask.
This signal will be sent to the grab widget if there is one.
event
the gdk::EventMotion
which triggered
this signal.
Returns
true
to stop other handlers from being invoked for the event.
false
to propagate the event further.
fn connect_move_focus<F: Fn(&Self, DirectionType) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn emit_move_focus(&self, direction: DirectionType)
fn connect_parent_set<F: Fn(&Self, Option<&Widget>) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::parent-set signal is emitted when a new parent has been set on a widget.
old_parent
the previous parent, or None
if the widget
just got its initial parent.
fn connect_popup_menu<F: Fn(&Self) -> bool + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
This signal gets emitted whenever a widget should pop up a context
menu. This usually happens through the standard key binding mechanism;
by pressing a certain key while a widget is focused, the user can cause
the widget to pop up a menu. For example, the Entry
widget creates
a menu with clipboard commands. See the
[Popup Menu Migration Checklist][checklist-popup-menu]
for an example of how to use this signal.
Returns
true
if a menu was activated
fn emit_popup_menu(&self) -> bool
fn connect_property_notify_event<F: Fn(&Self, &EventProperty) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::property-notify-event signal will be emitted when a property on
the widget
's window has been changed or deleted.
To receive this signal, the gdk::Window
associated to the widget needs
to enable the gdk::EventMask::PropertyChangeMask
mask.
event
the gdk::EventProperty
which triggered
this signal.
Returns
true
to stop other handlers from being invoked for the event.
false
to propagate the event further.
fn connect_proximity_in_event<F: Fn(&Self, &EventProximity) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
To receive this signal the gdk::Window
associated to the widget needs
to enable the gdk::EventMask::ProximityInMask
mask.
This signal will be sent to the grab widget if there is one.
event
the gdk::EventProximity
which triggered
this signal.
Returns
true
to stop other handlers from being invoked for the event.
false
to propagate the event further.
fn connect_proximity_out_event<F: Fn(&Self, &EventProximity) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
To receive this signal the gdk::Window
associated to the widget needs
to enable the gdk::EventMask::ProximityOutMask
mask.
This signal will be sent to the grab widget if there is one.
event
the gdk::EventProximity
which triggered
this signal.
Returns
true
to stop other handlers from being invoked for the event.
false
to propagate the event further.
fn connect_query_tooltip<F: Fn(&Self, i32, i32, bool, &Tooltip) -> bool + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
Emitted when Widget:has-tooltip
is true
and the hover timeout
has expired with the cursor hovering "above" widget
; or emitted when widget
got
focus in keyboard mode.
Using the given coordinates, the signal handler should determine
whether a tooltip should be shown for widget
. If this is the case
true
should be returned, false
otherwise. Note that if
keyboard_mode
is true
, the values of x
and y
are undefined and
should not be used.
The signal handler is free to manipulate tooltip
with the therefore
destined function calls.
x
the x coordinate of the cursor position where the request has
been emitted, relative to widget
's left side
y
the y coordinate of the cursor position where the request has
been emitted, relative to widget
's top
keyboard_mode
true
if the tooltip was triggered using the keyboard
tooltip
a Tooltip
Returns
true
if tooltip
should be shown right now, false
otherwise.
fn connect_realize<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
The ::realize signal is emitted when widget
is associated with a
gdk::Window
, which means that WidgetExt::realize
has been called or the
widget has been mapped (that is, it is going to be drawn).
fn connect_screen_changed<F: Fn(&Self, Option<&Screen>) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::screen-changed signal gets emitted when the screen of a widget has changed.
previous_screen
the previous screen, or None
if the
widget was not associated with a screen before
fn connect_scroll_event<F: Fn(&Self, &EventScroll) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::scroll-event signal is emitted when a button in the 4 to 7 range is pressed. Wheel mice are usually configured to generate button press events for buttons 4 and 5 when the wheel is turned.
To receive this signal, the gdk::Window
associated to the widget needs
to enable the gdk::EventMask::ScrollMask
mask.
This signal will be sent to the grab widget if there is one.
event
the gdk::EventScroll
which triggered
this signal.
Returns
true
to stop other handlers from being invoked for the event.
false
to propagate the event further.
fn connect_selection_clear_event<F: Fn(&Self, &EventSelection) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::selection-clear-event signal will be emitted when the
the widget
's window has lost ownership of a selection.
event
the gdk::EventSelection
which triggered
this signal.
Returns
true
to stop other handlers from being invoked for the event.
false
to propagate the event further.
fn connect_selection_get<F: Fn(&Self, &SelectionData, u32, u32) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_selection_notify_event<F: Fn(&Self, &EventSelection) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
Returns
true
to stop other handlers from being invoked for the event. false
to propagate the event further.
fn connect_selection_received<F: Fn(&Self, &SelectionData, u32) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_selection_request_event<F: Fn(&Self, &EventSelection) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::selection-request-event signal will be emitted when
another client requests ownership of the selection owned by
the widget
's window.
event
the gdk::EventSelection
which triggered
this signal.
Returns
true
to stop other handlers from being invoked for the event.
false
to propagate the event further.
fn connect_show<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
The ::show signal is emitted when widget
is shown, for example with
WidgetExt::show
.
fn connect_show_help<F: Fn(&Self, WidgetHelpType) -> bool + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
Returns
true
to stop other handlers from being invoked for the event.
false
to propagate the event further.
fn emit_show_help(&self, help_type: WidgetHelpType) -> bool
fn connect_size_allocate<F: Fn(&Self, &Allocation) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
allocation
the region which has been allocated to the widget.
fn connect_state_flags_changed<F: Fn(&Self, StateFlags) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::state-flags-changed signal is emitted when the widget state
changes, see WidgetExt::get_state_flags
.
flags
The previous state flags.
fn connect_style_updated<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
The ::style-updated signal is a convenience signal that is emitted when the
StyleContext::changed
signal is emitted on the widget
's associated
StyleContext
as returned by WidgetExt::get_style_context
.
Note that style-modifying functions like WidgetExt::override_color
also
cause this signal to be emitted.
fn connect_touch_event<F: Fn(&Self, &Event) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_unmap<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
The ::unmap signal is emitted when widget
is going to be unmapped, which
means that 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.
fn connect_unrealize<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
The ::unrealize signal is emitted when the gdk::Window
associated with
widget
is destroyed, which means that WidgetExt::unrealize
has been
called or the widget has been unmapped (that is, it is going to be
hidden).
fn connect_window_state_event<F: Fn(&Self, &EventWindowState) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
The ::window-state-event will be emitted when the state of the
toplevel window associated to the widget
changes.
To receive this signal the gdk::Window
associated to the widget
needs to enable the gdk::EventMask::StructureMask
mask. GDK will enable
this mask automatically for all new windows.
event
the gdk::EventWindowState
which
triggered this signal.
Returns
true
to stop other handlers from being invoked for the
event. false
to propagate the event further.
fn connect_property_app_paintable_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_can_default_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_can_focus_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_composite_child_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_events_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_expand_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_focus_on_click_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_halign_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_has_default_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_has_focus_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_has_tooltip_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_height_request_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_hexpand_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_hexpand_set_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_is_focus_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_margin_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_margin_bottom_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_margin_end_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_margin_start_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_margin_top_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_name_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_no_show_all_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_opacity_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_parent_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_receives_default_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_scale_factor_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_sensitive_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_tooltip_markup_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_tooltip_text_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_valign_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_vexpand_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_vexpand_set_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_visible_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_width_request_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_window_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
Implementors
impl<O: IsA<Widget>> WidgetExt for O
[src]
fn activate(&self) -> bool
[src]
fn add_accelerator<P: IsA<AccelGroup>>(
&self,
accel_signal: &str,
accel_group: &P,
accel_key: u32,
accel_mods: ModifierType,
accel_flags: AccelFlags
)
[src]
&self,
accel_signal: &str,
accel_group: &P,
accel_key: u32,
accel_mods: ModifierType,
accel_flags: AccelFlags
)
fn add_device_events(&self, device: &Device, events: EventMask)
[src]
fn add_mnemonic_label<P: IsA<Widget>>(&self, label: &P)
[src]
fn can_activate_accel(&self, signal_id: u32) -> bool
[src]
fn child_focus(&self, direction: DirectionType) -> bool
[src]
fn child_notify(&self, child_property: &str)
[src]
fn compute_expand(&self, orientation: Orientation) -> bool
[src]
fn create_pango_context(&self) -> Context
[src]
fn create_pango_layout(&self, text: Option<&str>) -> Layout
[src]
fn device_is_shadowed(&self, device: &Device) -> bool
[src]
fn drag_begin_with_coordinates(
&self,
targets: &TargetList,
actions: DragAction,
button: i32,
event: Option<&Event>,
x: i32,
y: i32
) -> Option<DragContext>
[src]
&self,
targets: &TargetList,
actions: DragAction,
button: i32,
event: Option<&Event>,
x: i32,
y: i32
) -> Option<DragContext>
fn drag_check_threshold(
&self,
start_x: i32,
start_y: i32,
current_x: i32,
current_y: i32
) -> bool
[src]
&self,
start_x: i32,
start_y: i32,
current_x: i32,
current_y: i32
) -> bool
fn drag_dest_add_image_targets(&self)
[src]
fn drag_dest_add_text_targets(&self)
[src]
fn drag_dest_add_uri_targets(&self)
[src]
fn drag_dest_find_target(
&self,
context: &DragContext,
target_list: Option<&TargetList>
) -> Option<Atom>
[src]
&self,
context: &DragContext,
target_list: Option<&TargetList>
) -> Option<Atom>
fn drag_dest_get_target_list(&self) -> Option<TargetList>
[src]
fn drag_dest_get_track_motion(&self) -> bool
[src]
fn drag_dest_set_proxy<P: IsA<Window>>(
&self,
proxy_window: &P,
protocol: DragProtocol,
use_coordinates: bool
)
[src]
&self,
proxy_window: &P,
protocol: DragProtocol,
use_coordinates: bool
)
fn drag_dest_set_target_list(&self, target_list: Option<&TargetList>)
[src]
fn drag_dest_set_track_motion(&self, track_motion: bool)
[src]
fn drag_dest_unset(&self)
[src]
fn drag_get_data(&self, context: &DragContext, target: &Atom, time_: u32)
[src]
fn drag_highlight(&self)
[src]
fn drag_source_add_image_targets(&self)
[src]
fn drag_source_add_text_targets(&self)
[src]
fn drag_source_add_uri_targets(&self)
[src]
fn drag_source_get_target_list(&self) -> Option<TargetList>
[src]
fn drag_source_set_icon_gicon<P: IsA<Icon>>(&self, icon: &P)
[src]
fn drag_source_set_icon_name(&self, icon_name: &str)
[src]
fn drag_source_set_icon_pixbuf(&self, pixbuf: &Pixbuf)
[src]
fn drag_source_set_target_list(&self, target_list: Option<&TargetList>)
[src]
fn drag_source_unset(&self)
[src]
fn drag_unhighlight(&self)
[src]
fn draw(&self, cr: &Context)
[src]
fn error_bell(&self)
[src]
fn event(&self, event: &Event) -> bool
[src]
fn freeze_child_notify(&self)
[src]
fn get_accessible(&self) -> Option<Object>
[src]
fn get_action_group(&self, prefix: &str) -> Option<ActionGroup>
[src]
fn get_allocated_baseline(&self) -> i32
[src]
fn get_allocated_height(&self) -> i32
[src]
fn get_allocated_size(&self) -> (Allocation, i32)
[src]
fn get_allocated_width(&self) -> i32
[src]
fn get_allocation(&self) -> Allocation
[src]
fn get_ancestor(&self, widget_type: Type) -> Option<Widget>
[src]
fn get_app_paintable(&self) -> bool
[src]
fn get_can_default(&self) -> bool
[src]
fn get_can_focus(&self) -> bool
[src]
fn get_child_visible(&self) -> bool
[src]
fn get_clip(&self) -> Allocation
[src]
fn get_clipboard(&self, selection: &Atom) -> Clipboard
[src]
fn get_device_enabled(&self, device: &Device) -> bool
[src]
fn get_device_events(&self, device: &Device) -> EventMask
[src]
fn get_direction(&self) -> TextDirection
[src]
fn get_display(&self) -> Display
[src]
fn get_double_buffered(&self) -> bool
[src]
fn get_focus_on_click(&self) -> bool
[src]
fn get_font_map(&self) -> Option<FontMap>
[src]
fn get_font_options(&self) -> Option<FontOptions>
[src]
fn get_frame_clock(&self) -> Option<FrameClock>
[src]
fn get_halign(&self) -> Align
[src]
fn get_has_tooltip(&self) -> bool
[src]
fn get_has_window(&self) -> bool
[src]
fn get_hexpand(&self) -> bool
[src]
fn get_hexpand_set(&self) -> bool
[src]
fn get_mapped(&self) -> bool
[src]
fn get_margin_bottom(&self) -> i32
[src]
fn get_margin_end(&self) -> i32
[src]
fn get_margin_start(&self) -> i32
[src]
fn get_margin_top(&self) -> i32
[src]
fn get_modifier_mask(&self, intent: ModifierIntent) -> ModifierType
[src]
fn get_widget_name(&self) -> GString
[src]
fn get_no_show_all(&self) -> bool
[src]
fn get_opacity(&self) -> f64
[src]
fn get_pango_context(&self) -> Context
[src]
fn get_parent(&self) -> Option<Widget>
[src]
fn get_parent_window(&self) -> Option<Window>
[src]
fn get_path(&self) -> WidgetPath
[src]
fn get_preferred_height(&self) -> (i32, i32)
[src]
fn get_preferred_height_and_baseline_for_width(
&self,
width: i32
) -> (i32, i32, i32, i32)
[src]
&self,
width: i32
) -> (i32, i32, i32, i32)
fn get_preferred_height_for_width(&self, width: i32) -> (i32, i32)
[src]
fn get_preferred_size(&self) -> (Requisition, Requisition)
[src]
fn get_preferred_width(&self) -> (i32, i32)
[src]
fn get_preferred_width_for_height(&self, height: i32) -> (i32, i32)
[src]
fn get_realized(&self) -> bool
[src]
fn get_receives_default(&self) -> bool
[src]
fn get_request_mode(&self) -> SizeRequestMode
[src]
fn get_scale_factor(&self) -> i32
[src]
fn get_screen(&self) -> Option<Screen>
[src]
fn get_sensitive(&self) -> bool
[src]
fn get_settings(&self) -> Option<Settings>
[src]
fn get_size_request(&self) -> (i32, i32)
[src]
fn get_state_flags(&self) -> StateFlags
[src]
fn get_style_context(&self) -> StyleContext
[src]
fn get_support_multidevice(&self) -> bool
[src]
fn get_template_child(&self, widget_type: Type, name: &str) -> Option<Object>
[src]
fn get_tooltip_markup(&self) -> Option<GString>
[src]
fn get_tooltip_text(&self) -> Option<GString>
[src]
fn get_tooltip_window(&self) -> Option<Window>
[src]
fn get_toplevel(&self) -> Option<Widget>
[src]
fn get_valign(&self) -> Align
[src]
fn get_valign_with_baseline(&self) -> Align
[src]
fn get_vexpand(&self) -> bool
[src]
fn get_vexpand_set(&self) -> bool
[src]
fn get_visible(&self) -> bool
[src]
fn get_visual(&self) -> Option<Visual>
[src]
fn get_window(&self) -> Option<Window>
[src]
fn grab_add(&self)
[src]
fn grab_default(&self)
[src]
fn grab_focus(&self)
[src]
fn grab_remove(&self)
[src]
fn has_default(&self) -> bool
[src]
fn has_focus(&self) -> bool
[src]
fn has_grab(&self) -> bool
[src]
fn has_screen(&self) -> bool
[src]
fn has_visible_focus(&self) -> bool
[src]
fn hide(&self)
[src]
fn in_destruction(&self) -> bool
[src]
fn init_template(&self)
[src]
fn input_shape_combine_region(&self, region: Option<&Region>)
[src]
fn insert_action_group<P: IsA<ActionGroup>>(
&self,
name: &str,
group: Option<&P>
)
[src]
&self,
name: &str,
group: Option<&P>
)
fn is_ancestor<P: IsA<Widget>>(&self, ancestor: &P) -> bool
[src]
fn is_composited(&self) -> bool
[src]
fn is_drawable(&self) -> bool
[src]
fn is_focus(&self) -> bool
[src]
fn is_sensitive(&self) -> bool
[src]
fn is_toplevel(&self) -> bool
[src]
fn is_visible(&self) -> bool
[src]
fn keynav_failed(&self, direction: DirectionType) -> bool
[src]
fn list_accel_closures(&self) -> Vec<Closure>
[src]
fn list_action_prefixes(&self) -> Vec<GString>
[src]
fn list_mnemonic_labels(&self) -> Vec<Widget>
[src]
fn map(&self)
[src]
fn mnemonic_activate(&self, group_cycling: bool) -> bool
[src]
fn override_background_color(&self, state: StateFlags, color: Option<&RGBA>)
[src]
fn override_color(&self, state: StateFlags, color: Option<&RGBA>)
[src]
fn override_cursor(
&self,
cursor: Option<&RGBA>,
secondary_cursor: Option<&RGBA>
)
[src]
&self,
cursor: Option<&RGBA>,
secondary_cursor: Option<&RGBA>
)
fn override_font(&self, font_desc: &FontDescription)
[src]
fn override_symbolic_color(&self, name: &str, color: Option<&RGBA>)
[src]
fn queue_allocate(&self)
[src]
fn queue_compute_expand(&self)
[src]
fn queue_draw(&self)
[src]
fn queue_draw_area(&self, x: i32, y: i32, width: i32, height: i32)
[src]
fn queue_draw_region(&self, region: &Region)
[src]
fn queue_resize(&self)
[src]
fn queue_resize_no_redraw(&self)
[src]
fn realize(&self)
[src]
fn register_window<P: IsA<Window>>(&self, window: &P)
[src]
fn remove_accelerator<P: IsA<AccelGroup>>(
&self,
accel_group: &P,
accel_key: u32,
accel_mods: ModifierType
) -> bool
[src]
&self,
accel_group: &P,
accel_key: u32,
accel_mods: ModifierType
) -> bool
fn remove_mnemonic_label<P: IsA<Widget>>(&self, label: &P)
[src]
fn reset_style(&self)
[src]
fn send_expose(&self, event: &Event) -> i32
[src]
fn send_focus_change(&self, event: &Event) -> bool
[src]
fn set_accel_path<P: IsA<AccelGroup>>(
&self,
accel_path: Option<&str>,
accel_group: Option<&P>
)
[src]
&self,
accel_path: Option<&str>,
accel_group: Option<&P>
)
fn set_allocation(&self, allocation: &Allocation)
[src]
fn set_app_paintable(&self, app_paintable: bool)
[src]
fn set_can_default(&self, can_default: bool)
[src]
fn set_can_focus(&self, can_focus: bool)
[src]
fn set_child_visible(&self, is_visible: bool)
[src]
fn set_clip(&self, clip: &Allocation)
[src]
fn set_device_enabled(&self, device: &Device, enabled: bool)
[src]
fn set_device_events(&self, device: &Device, events: EventMask)
[src]
fn set_direction(&self, dir: TextDirection)
[src]
fn set_focus_on_click(&self, focus_on_click: bool)
[src]
fn set_font_map<P: IsA<FontMap>>(&self, font_map: Option<&P>)
[src]
fn set_font_options(&self, options: Option<&FontOptions>)
[src]
fn set_halign(&self, align: Align)
[src]
fn set_has_tooltip(&self, has_tooltip: bool)
[src]
fn set_has_window(&self, has_window: bool)
[src]
fn set_hexpand(&self, expand: bool)
[src]
fn set_hexpand_set(&self, set: bool)
[src]
fn set_mapped(&self, mapped: bool)
[src]
fn set_margin_bottom(&self, margin: i32)
[src]
fn set_margin_end(&self, margin: i32)
[src]
fn set_margin_start(&self, margin: i32)
[src]
fn set_margin_top(&self, margin: i32)
[src]
fn set_widget_name(&self, name: &str)
[src]
fn set_no_show_all(&self, no_show_all: bool)
[src]
fn set_opacity(&self, opacity: f64)
[src]
fn set_parent<P: IsA<Widget>>(&self, parent: &P)
[src]
fn set_parent_window<P: IsA<Window>>(&self, parent_window: &P)
[src]
fn set_realized(&self, realized: bool)
[src]
fn set_receives_default(&self, receives_default: bool)
[src]
fn set_redraw_on_allocate(&self, redraw_on_allocate: bool)
[src]
fn set_sensitive(&self, sensitive: bool)
[src]
fn set_size_request(&self, width: i32, height: i32)
[src]
fn set_state_flags(&self, flags: StateFlags, clear: bool)
[src]
fn set_support_multidevice(&self, support_multidevice: bool)
[src]
fn set_tooltip_markup(&self, markup: Option<&str>)
[src]
fn set_tooltip_text(&self, text: Option<&str>)
[src]
fn set_tooltip_window<P: IsA<Window>>(&self, custom_window: Option<&P>)
[src]
fn set_valign(&self, align: Align)
[src]
fn set_vexpand(&self, expand: bool)
[src]
fn set_vexpand_set(&self, set: bool)
[src]
fn set_visible(&self, visible: bool)
[src]
fn set_visual(&self, visual: Option<&Visual>)
[src]
fn set_window<P: IsA<Window>>(&self, window: &P)
[src]
fn shape_combine_region(&self, region: Option<&Region>)
[src]
fn show(&self)
[src]
fn show_all(&self)
[src]
fn show_now(&self)
[src]
fn size_allocate(&self, allocation: &Allocation)
[src]
fn size_allocate_with_baseline(
&self,
allocation: &mut Allocation,
baseline: i32
)
[src]
&self,
allocation: &mut Allocation,
baseline: i32
)
fn style_get_property(&self, property_name: &str) -> Value
[src]
fn thaw_child_notify(&self)
[src]
fn translate_coordinates<P: IsA<Widget>>(
&self,
dest_widget: &P,
src_x: i32,
src_y: i32
) -> Option<(i32, i32)>
[src]
&self,
dest_widget: &P,
src_x: i32,
src_y: i32
) -> Option<(i32, i32)>
fn trigger_tooltip_query(&self)
[src]
fn unmap(&self)
[src]
fn unparent(&self)
[src]
fn unrealize(&self)
[src]
fn unregister_window<P: IsA<Window>>(&self, window: &P)
[src]
fn unset_state_flags(&self, flags: StateFlags)
[src]
fn get_property_composite_child(&self) -> bool
[src]
fn get_property_expand(&self) -> bool
[src]
fn set_property_expand(&self, expand: bool)
[src]
fn get_property_has_default(&self) -> bool
[src]
fn set_property_has_default(&self, has_default: bool)
[src]
fn get_property_has_focus(&self) -> bool
[src]
fn set_property_has_focus(&self, has_focus: bool)
[src]
fn get_property_height_request(&self) -> i32
[src]
fn set_property_height_request(&self, height_request: i32)
[src]
fn get_property_is_focus(&self) -> bool
[src]
fn set_property_is_focus(&self, is_focus: bool)
[src]
fn get_property_margin(&self) -> i32
[src]
fn set_property_margin(&self, margin: i32)
[src]
fn get_property_width_request(&self) -> i32
[src]
fn set_property_width_request(&self, width_request: i32)
[src]
fn connect_accel_closures_changed<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_button_press_event<F: Fn(&Self, &EventButton) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_button_release_event<F: Fn(&Self, &EventButton) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_can_activate_accel<F: Fn(&Self, u32) -> bool + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_child_notify<F: Fn(&Self, &ParamSpec) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_composited_changed<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn emit_composited_changed(&self)
[src]
fn connect_configure_event<F: Fn(&Self, &EventConfigure) -> bool + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_damage_event<F: Fn(&Self, &EventExpose) -> bool + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_delete_event<F: Fn(&Self, &Event) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_destroy<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
[src]
fn connect_destroy_event<F: Fn(&Self, &Event) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_direction_changed<F: Fn(&Self, TextDirection) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_drag_begin<F: Fn(&Self, &DragContext) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_drag_data_delete<F: Fn(&Self, &DragContext) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_drag_data_get<F: Fn(&Self, &DragContext, &SelectionData, u32, u32) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_drag_data_received<F: Fn(&Self, &DragContext, i32, i32, &SelectionData, u32, u32) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_drag_drop<F: Fn(&Self, &DragContext, i32, i32, u32) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_drag_end<F: Fn(&Self, &DragContext) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_drag_failed<F: Fn(&Self, &DragContext, DragResult) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_drag_leave<F: Fn(&Self, &DragContext, u32) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_drag_motion<F: Fn(&Self, &DragContext, i32, i32, u32) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_draw<F: Fn(&Self, &Context) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_enter_notify_event<F: Fn(&Self, &EventCrossing) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_event<F: Fn(&Self, &Event) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_event_after<F: Fn(&Self, &Event) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_focus<F: Fn(&Self, DirectionType) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_focus_in_event<F: Fn(&Self, &EventFocus) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_focus_out_event<F: Fn(&Self, &EventFocus) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_grab_broken_event<F: Fn(&Self, &EventGrabBroken) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_grab_focus<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
[src]
fn emit_grab_focus(&self)
[src]
fn connect_grab_notify<F: Fn(&Self, bool) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_hide<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
[src]
fn connect_hierarchy_changed<F: Fn(&Self, Option<&Widget>) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_key_press_event<F: Fn(&Self, &EventKey) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_key_release_event<F: Fn(&Self, &EventKey) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_keynav_failed<F: Fn(&Self, DirectionType) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_leave_notify_event<F: Fn(&Self, &EventCrossing) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_map<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
[src]
fn connect_mnemonic_activate<F: Fn(&Self, bool) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_motion_notify_event<F: Fn(&Self, &EventMotion) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_move_focus<F: Fn(&Self, DirectionType) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn emit_move_focus(&self, direction: DirectionType)
[src]
fn connect_parent_set<F: Fn(&Self, Option<&Widget>) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_popup_menu<F: Fn(&Self) -> bool + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn emit_popup_menu(&self) -> bool
[src]
fn connect_property_notify_event<F: Fn(&Self, &EventProperty) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_proximity_in_event<F: Fn(&Self, &EventProximity) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_proximity_out_event<F: Fn(&Self, &EventProximity) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_query_tooltip<F: Fn(&Self, i32, i32, bool, &Tooltip) -> bool + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_realize<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
[src]
fn connect_screen_changed<F: Fn(&Self, Option<&Screen>) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_scroll_event<F: Fn(&Self, &EventScroll) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_selection_clear_event<F: Fn(&Self, &EventSelection) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_selection_get<F: Fn(&Self, &SelectionData, u32, u32) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_selection_notify_event<F: Fn(&Self, &EventSelection) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_selection_received<F: Fn(&Self, &SelectionData, u32) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_selection_request_event<F: Fn(&Self, &EventSelection) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_show<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
[src]
fn connect_show_help<F: Fn(&Self, WidgetHelpType) -> bool + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn emit_show_help(&self, help_type: WidgetHelpType) -> bool
[src]
fn connect_size_allocate<F: Fn(&Self, &Allocation) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_state_flags_changed<F: Fn(&Self, StateFlags) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_style_updated<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
[src]
fn connect_touch_event<F: Fn(&Self, &Event) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_unmap<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
[src]
fn connect_unrealize<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
[src]
fn connect_window_state_event<F: Fn(&Self, &EventWindowState) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_app_paintable_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_can_default_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_can_focus_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_composite_child_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_events_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_expand_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_focus_on_click_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_halign_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_has_default_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_has_focus_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_has_tooltip_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_height_request_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_hexpand_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_hexpand_set_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_is_focus_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_margin_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_margin_bottom_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_margin_end_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_margin_start_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_margin_top_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_name_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_no_show_all_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_opacity_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_parent_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_receives_default_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_scale_factor_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_sensitive_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_tooltip_markup_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_tooltip_text_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_valign_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_vexpand_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_vexpand_set_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_visible_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_width_request_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_window_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId