Skip to main content

StackSwitcher

Struct StackSwitcher 

Source
pub struct StackSwitcher { /* private fields */ }
Expand description

The GtkStackSwitcher widget acts as a controller for a Stack; it shows a row of buttons to switch between the various pages of the associated stack widget.

All the content for the buttons comes from the child properties of the Stack; the button visibility in a StackSwitcher widget is controlled by the visibility of the child in the Stack.

It is possible to associate multiple StackSwitcher widgets with the same Stack widget.

The GtkStackSwitcher widget was added in 3.10.

§CSS nodes

GtkStackSwitcher has a single CSS node named stackswitcher and style class .stack-switcher.

When circumstances require it, GtkStackSwitcher adds the .needs-attention style class to the widgets representing the stack pages.

§Properties

§icon-size

Use the “icon-size” property to change the size of the image displayed when a StackSwitcher is displaying icons.

Readable | Writeable

§stack

Readable | Writeable | Construct

Box

§baseline-position

Readable | Writeable

§homogeneous

Readable | Writeable

§spacing

Readable | Writeable

Container

§border-width

Readable | Writeable

§child

Writeable

§resize-mode

Readable | Writeable

Widget

§app-paintable

Readable | Writeable

§can-default

Readable | Writeable

§can-focus

Readable | Writeable

§composite-child

Readable

§double-buffered

Whether the widget is double buffered.

Readable | Writeable

§events

Readable | Writeable

§expand

Whether to expand in both directions. Setting this sets both hexpand and vexpand

Readable | Writeable

§focus-on-click

Whether the widget should grab focus when it is clicked with the mouse.

This property is only relevant for widgets that can take focus.

Before 3.20, several widgets (GtkButton, GtkFileChooserButton, GtkComboBox) implemented this property individually.

Readable | Writeable

§halign

How to distribute horizontal space if widget gets extra space, see Align

Readable | Writeable

§has-default

Readable | Writeable

§has-focus

Readable | Writeable

§has-tooltip

Enables or disables the emission of query-tooltip on widget. A value of true indicates that widget can have a tooltip, in this case the widget will be queried using query-tooltip to determine whether it will provide a tooltip or not.

Note that setting this property to true for the first time will change the event masks of the GdkWindows of this widget to include leave-notify and motion-notify events. This cannot and will not be undone when the property is set to false again.

Readable | Writeable

§height-request

Readable | Writeable

§hexpand

Whether to expand horizontally. See WidgetExt::set_hexpand().

Readable | Writeable

§hexpand-set

Whether to use the hexpand property. See WidgetExt::is_hexpand_set().

Readable | Writeable

§is-focus

Readable | Writeable

§margin

Sets all four sides’ margin at once. If read, returns max margin on any side.

Readable | Writeable

§margin-bottom

Margin on bottom side of widget.

This property adds margin outside of the widget’s normal size request, the margin will be added in addition to the size from WidgetExt::set_size_request() for example.

Readable | Writeable

§margin-end

Margin on end of widget, horizontally. This property supports left-to-right and right-to-left text directions.

This property adds margin outside of the widget’s normal size request, the margin will be added in addition to the size from WidgetExt::set_size_request() for example.

Readable | Writeable

§margin-left

Margin on left side of widget.

This property adds margin outside of the widget’s normal size request, the margin will be added in addition to the size from WidgetExt::set_size_request() for example.

Readable | Writeable

§margin-right

Margin on right side of widget.

This property adds margin outside of the widget’s normal size request, the margin will be added in addition to the size from WidgetExt::set_size_request() for example.

Readable | Writeable

§margin-start

Margin on start of widget, horizontally. This property supports left-to-right and right-to-left text directions.

This property adds margin outside of the widget’s normal size request, the margin will be added in addition to the size from WidgetExt::set_size_request() for example.

Readable | Writeable

§margin-top

Margin on top side of widget.

This property adds margin outside of the widget’s normal size request, the margin will be added in addition to the size from WidgetExt::set_size_request() for example.

Readable | Writeable

§name

Readable | Writeable

§no-show-all

Readable | Writeable

§opacity

The requested opacity of the widget. See WidgetExt::set_opacity() for more details about window opacity.

Before 3.8 this was only available in GtkWindow

Readable | Writeable

§parent

Readable | Writeable

§receives-default

Readable | Writeable

§scale-factor

The scale factor of the widget. See WidgetExt::scale_factor() for more details about widget scaling.

Readable

§sensitive

Readable | Writeable

§style

The style of the widget, which contains information about how it will look (colors, etc).

Readable | Writeable

§tooltip-markup

Sets the text of tooltip to be the given string, which is marked up with the [Pango text markup language][PangoMarkupFormat]. Also see Tooltip::set_markup().

This is a convenience property which will take care of getting the tooltip shown if the given string is not None: has-tooltip will automatically be set to true and there will be taken care of query-tooltip in the default signal handler.

Note that if both tooltip-text and tooltip-markup are set, the last one wins.

Readable | Writeable

§tooltip-text

Sets the text of tooltip to be the given string.

Also see Tooltip::set_text().

This is a convenience property which will take care of getting the tooltip shown if the given string is not None: has-tooltip will automatically be set to true and there will be taken care of query-tooltip in the default signal handler.

Note that if both tooltip-text and tooltip-markup are set, the last one wins.

Readable | Writeable

§valign

How to distribute vertical space if widget gets extra space, see Align

Readable | Writeable

§vexpand

Whether to expand vertically. See WidgetExt::set_vexpand().

Readable | Writeable

§vexpand-set

Whether to use the vexpand property. See WidgetExt::is_vexpand_set().

Readable | Writeable

§visible

Readable | Writeable

§width-request

Readable | Writeable

§window

The widget’s window if it is realized, None otherwise.

Readable

Orientable

§orientation

The orientation of the orientable.

Readable | Writeable

§Implements

StackSwitcherExt, BoxExt, ContainerExt, WidgetExt, glib::ObjectExt, BuildableExt, OrientableExt, StackSwitcherExtManual, ContainerExtManual, WidgetExtManual, BuildableExtManual

Implementations§

Source§

impl StackSwitcher

Source

pub const NONE: Option<&'static StackSwitcher> = None

Source

pub fn new() -> StackSwitcher

Create a new StackSwitcher.

§Returns

a new StackSwitcher.

Source§

impl StackSwitcher

Source

pub fn builder() -> StackSwitcherBuilder

Creates a new builder-style object to construct a StackSwitcher.

This method returns an instance of StackSwitcherBuilder which can be used to create a StackSwitcher.

Trait Implementations§

Source§

impl Clone for StackSwitcher

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for StackSwitcher

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for StackSwitcher

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Display for StackSwitcher

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for StackSwitcher

Source§

impl HasParamSpec for StackSwitcher

Source§

type ParamSpec = ParamSpecObject

Source§

type SetValue = StackSwitcher

Preferred value to be used as setter for the associated ParamSpec.
Source§

type BuilderFn = fn(&str) -> ParamSpecObjectBuilder<'_, StackSwitcher>

Source§

fn param_spec_builder() -> Self::BuilderFn

Source§

impl Hash for StackSwitcher

Source§

fn hash<H>(&self, state: &mut H)
where H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl IsA<Box> for StackSwitcher

Source§

impl IsA<Buildable> for StackSwitcher

Source§

impl IsA<Container> for StackSwitcher

Source§

impl IsA<Orientable> for StackSwitcher

Source§

impl IsA<Widget> for StackSwitcher

Source§

impl Ord for StackSwitcher

Source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl ParentClassIs for StackSwitcher

Source§

impl<OT: ObjectType> PartialEq<OT> for StackSwitcher

Source§

fn eq(&self, other: &OT) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl<OT: ObjectType> PartialOrd<OT> for StackSwitcher

Source§

fn partial_cmp(&self, other: &OT) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl StaticType for StackSwitcher

Source§

fn static_type() -> Type

Returns the type identifier of Self.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<O> BoxExt for O
where O: IsA<Box>,

Source§

fn baseline_position(&self) -> BaselinePosition

Gets the value set by set_baseline_position(). Read more
Source§

fn center_widget(&self) -> Option<Widget>

Retrieves the center widget of the box. Read more
Source§

fn is_homogeneous(&self) -> bool

Returns whether the box is homogeneous (all children are the same size). See set_homogeneous(). Read more
Source§

fn spacing(&self) -> i32

Gets the value set by set_spacing(). Read more
Source§

fn pack_end( &self, child: &impl IsA<Widget>, expand: bool, fill: bool, padding: u32, )

Adds child to self, packed with reference to the end of self. The child is packed after (away from end of) any other child packed with reference to the end of self. Read more
Source§

fn pack_start( &self, child: &impl IsA<Widget>, expand: bool, fill: bool, padding: u32, )

Adds child to self, packed with reference to the start of self. The child is packed after any other child packed with reference to the start of self. Read more
Source§

fn query_child_packing( &self, child: &impl IsA<Widget>, ) -> (bool, bool, u32, PackType)

Obtains information about how child is packed into self. Read more
Source§

fn reorder_child(&self, child: &impl IsA<Widget>, position: i32)

Moves child to a new position in the list of self children. The list contains widgets packed PackType::Start as well as widgets packed PackType::End, in the order that these widgets were added to self. Read more
Source§

fn set_baseline_position(&self, position: BaselinePosition)

Sets the baseline position of a box. This affects only horizontal boxes with at least one baseline aligned child. If there is more vertical space available than requested, and the baseline is not allocated by the parent then position is used to allocate the baseline wrt the extra space available. Read more
Source§

fn set_center_widget(&self, widget: Option<&impl IsA<Widget>>)

Sets a center widget; that is a child widget that will be centered with respect to the full width of the box, even if the children at either side take up different amounts of space. Read more
Source§

fn set_child_packing( &self, child: &impl IsA<Widget>, expand: bool, fill: bool, padding: u32, pack_type: PackType, )

Sets the way child is packed into self. Read more
Source§

fn set_homogeneous(&self, homogeneous: bool)

Sets the homogeneous property of self, controlling whether or not all children of self are given equal space in the box. Read more
Source§

fn set_spacing(&self, spacing: i32)

Sets the spacing property of self, which is the number of pixels to place between children of self. Read more
Source§

fn child_expands<T: IsA<Widget>>(&self, item: &T) -> bool

Source§

fn set_child_expand<T: IsA<Widget>>(&self, item: &T, expand: bool)

Source§

fn child_fills<T: IsA<Widget>>(&self, item: &T) -> bool

Source§

fn set_child_fill<T: IsA<Widget>>(&self, item: &T, fill: bool)

Source§

fn child_pack_type<T: IsA<Widget>>(&self, item: &T) -> PackType

Source§

fn set_child_pack_type<T: IsA<Widget>>(&self, item: &T, pack_type: PackType)

Source§

fn child_padding<T: IsA<Widget>>(&self, item: &T) -> u32

Source§

fn set_child_padding<T: IsA<Widget>>(&self, item: &T, padding: u32)

Source§

fn child_position<T: IsA<Widget>>(&self, item: &T) -> i32

Source§

fn set_child_position<T: IsA<Widget>>(&self, item: &T, position: i32)

Source§

fn connect_baseline_position_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_homogeneous_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_spacing_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

impl<O> BuildableExt for O
where O: IsA<Buildable>,

Source§

fn add_child( &self, builder: &impl IsA<Builder>, child: &impl IsA<Object>, type_: Option<&str>, )

Adds a child to self. type_ is an optional string describing how the child should be added. Read more
Source§

fn construct_child( &self, builder: &impl IsA<Builder>, name: &str, ) -> Option<Object>

Constructs a child of self with the name name. Read more
Source§

fn internal_child( &self, builder: &impl IsA<Builder>, childname: &str, ) -> Option<Object>

Get the internal child called childname of the self object. Read more
Source§

fn parser_finished(&self, builder: &impl IsA<Builder>)

Called when the builder finishes the parsing of a [GtkBuilder UI definition][BUILDER-UI]. Note that this will be called once for each time gtk_builder_add_from_file() or BuilderExtManual::add_from_string() is called on a builder. Read more
Source§

fn set_buildable_property( &self, builder: &impl IsA<Builder>, name: &str, value: &Value, )

Sets the property name name to value on the self object. Read more
Source§

impl<O> BuildableExtManual for O
where O: IsA<Buildable>,

Source§

impl<T> Cast for T
where T: ObjectType,

Source§

fn upcast<T>(self) -> T
where T: ObjectType, Self: IsA<T>,

Upcasts an object to a superclass or interface T. Read more
Source§

fn upcast_ref<T>(&self) -> &T
where T: ObjectType, Self: IsA<T>,

Upcasts an object to a reference of its superclass or interface T. Read more
Source§

fn downcast<T>(self) -> Result<T, Self>
where T: ObjectType, Self: MayDowncastTo<T>,

Tries to downcast to a subclass or interface implementor T. Read more
Source§

fn downcast_ref<T>(&self) -> Option<&T>
where T: ObjectType, Self: MayDowncastTo<T>,

Tries to downcast to a reference of its subclass or interface implementor T. Read more
Source§

fn dynamic_cast<T>(self) -> Result<T, Self>
where T: ObjectType,

Tries to cast to an object of type T. This handles upcasting, downcasting and casting between interface and interface implementors. All checks are performed at runtime, while upcast will do many checks at compile-time already. downcast will perform the same checks at runtime as dynamic_cast, but will also ensure some amount of compile-time safety. Read more
Source§

fn dynamic_cast_ref<T>(&self) -> Option<&T>
where T: ObjectType,

Tries to cast to reference to an object of type T. This handles upcasting, downcasting and casting between interface and interface implementors. All checks are performed at runtime, while downcast and upcast will do many checks at compile-time already. Read more
Source§

unsafe fn unsafe_cast<T>(self) -> T
where T: ObjectType,

Casts to T unconditionally. Read more
Source§

unsafe fn unsafe_cast_ref<T>(&self) -> &T
where T: ObjectType,

Casts to &T unconditionally. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<O> ContainerExt for O
where O: IsA<Container>,

Source§

fn add(&self, widget: &impl IsA<Widget>)

Adds widget to self. Typically used for simple containers such as Window, Frame, or Button; for more complicated layout containers such as Box or Grid, this function will pick default packing parameters that may not be correct. So consider functions such as BoxExt::pack_start() and GridExt::attach() as an alternative to add() in those cases. A widget may be added to only one container at a time; you can’t place the same widget inside two different containers. Read more
Source§

fn check_resize(&self)

Source§

fn child_notify(&self, child: &impl IsA<Widget>, child_property: &str)

Emits a child-notify signal for the [child property][child-properties] child_property on the child. Read more
Source§

fn child_notify_by_pspec( &self, child: &impl IsA<Widget>, pspec: impl AsRef<ParamSpec>, )

Emits a child-notify signal for the [child property][child-properties] specified by pspec on the child. Read more
Source§

fn child_type(&self) -> Type

Returns the type of the children supported by the container. Read more
Source§

fn forall<P: FnMut(&Widget)>(&self, callback: P)

Invokes callback on each direct child of self, including children that are considered “internal” (implementation details of the container). “Internal” children generally weren’t added by the user of the container, but were added by the container implementation itself. Read more
Source§

fn foreach<P: FnMut(&Widget)>(&self, callback: P)

Invokes callback on each non-internal child of self. See forall() for details on what constitutes an “internal” child. For all practical purposes, this function should iterate over precisely those child widgets that were added to the container by the application with explicit add() calls. Read more
Source§

fn border_width(&self) -> u32

Retrieves the border width of the container. See set_border_width(). Read more
Source§

fn children(&self) -> Vec<Widget>

Returns the container’s non-internal children. See forall() for details on what constitutes an “internal” child. Read more
Source§

fn focus_child(&self) -> Option<Widget>

Returns the current focus child widget inside self. This is not the currently focused widget. That can be obtained by calling GtkWindowExt::focused_widget(). Read more
Source§

fn focus_hadjustment(&self) -> Option<Adjustment>

Retrieves the horizontal focus adjustment for the container. See gtk_container_set_focus_hadjustment (). Read more
Source§

fn focus_vadjustment(&self) -> Option<Adjustment>

Retrieves the vertical focus adjustment for the container. See set_focus_vadjustment(). Read more
Source§

fn path_for_child(&self, child: &impl IsA<Widget>) -> Option<WidgetPath>

Returns a newly created widget path representing all the widget hierarchy from the toplevel down to and including child. Read more
Source§

fn propagate_draw(&self, child: &impl IsA<Widget>, cr: &Context)

When a container receives a call to the draw function, it must send synthetic draw calls to all children that don’t have their own GdkWindows. This function provides a convenient way of doing this. A container, when it receives a call to its draw function, calls propagate_draw() once for each child, passing in the cr the container received. Read more
Source§

fn remove(&self, widget: &impl IsA<Widget>)

Removes widget from self. widget must be inside self. Note that self will own a reference to widget, and that this may be the last reference held; so removing a widget from its container can destroy that widget. If you want to use widget again, you need to add a reference to it before removing it from a container, using g_object_ref(). If you don’t want to use widget again it’s usually more efficient to simply destroy it directly using gtk_widget_destroy() since this will remove it from the container and help break any circular reference count cycles. Read more
Source§

fn set_border_width(&self, border_width: u32)

Sets the border width of the container. Read more
Source§

fn set_focus_chain(&self, focusable_widgets: &[Widget])

👎Deprecated:

Since 3.24

Sets a focus chain, overriding the one computed automatically by GTK+. Read more
Source§

fn set_focus_child(&self, child: Option<&impl IsA<Widget>>)

Sets, or unsets if child is None, the focused child of self. Read more
Source§

fn set_focus_hadjustment(&self, adjustment: &impl IsA<Adjustment>)

Hooks up an adjustment to focus handling in a container, so when a child of the container is focused, the adjustment is scrolled to show that widget. This function sets the horizontal alignment. See ScrolledWindowExt::hadjustment() for a typical way of obtaining the adjustment and set_focus_vadjustment() for setting the vertical adjustment. Read more
Source§

fn set_focus_vadjustment(&self, adjustment: &impl IsA<Adjustment>)

Hooks up an adjustment to focus handling in a container, so when a child of the container is focused, the adjustment is scrolled to show that widget. This function sets the vertical alignment. See ScrolledWindowExt::vadjustment() for a typical way of obtaining the adjustment and set_focus_hadjustment() for setting the horizontal adjustment. Read more
Source§

fn unset_focus_chain(&self)

👎Deprecated:

Since 3.24

Removes a focus chain explicitly set with set_focus_chain(). Read more
Source§

fn set_child<P: IsA<Widget>>(&self, child: Option<&P>)

Source§

fn resize_mode(&self) -> ResizeMode

Source§

fn set_resize_mode(&self, resize_mode: ResizeMode)

Source§

fn connect_add<F: Fn(&Self, &Widget) + 'static>(&self, f: F) -> SignalHandlerId

Source§

fn connect_check_resize<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Source§

fn connect_remove<F: Fn(&Self, &Widget) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_set_focus_child<F: Fn(&Self, &Widget) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_border_width_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_child_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Source§

fn connect_resize_mode_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

impl<O> ContainerExtManual for O
where O: IsA<Container>,

Source§

fn child_property_value( &self, child: &impl IsA<Widget>, property_name: &str, ) -> Value

Source§

fn child_property<V: for<'b> FromValue<'b> + 'static>( &self, child: &impl IsA<Widget>, property_name: &str, ) -> V

Source§

fn child_set_property( &self, child: &impl IsA<Widget>, property_name: &str, value: &dyn ToValue, )

Sets a child property for child and self. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for T

Source§

unsafe fn from_glib_none_num_as_vec(ptr: *const GList, num: usize) -> Vec<T>

Source§

unsafe fn from_glib_container_num_as_vec(_: *const GList, _: usize) -> Vec<T>

Source§

unsafe fn from_glib_full_num_as_vec(_: *const GList, _: usize) -> Vec<T>

Source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for T

Source§

unsafe fn from_glib_none_num_as_vec(ptr: *const GPtrArray, num: usize) -> Vec<T>

Source§

unsafe fn from_glib_container_num_as_vec( _: *const GPtrArray, _: usize, ) -> Vec<T>

Source§

unsafe fn from_glib_full_num_as_vec(_: *const GPtrArray, _: usize) -> Vec<T>

Source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for T

Source§

unsafe fn from_glib_none_num_as_vec(ptr: *const GSList, num: usize) -> Vec<T>

Source§

unsafe fn from_glib_container_num_as_vec(_: *const GSList, _: usize) -> Vec<T>

Source§

unsafe fn from_glib_full_num_as_vec(_: *const GSList, _: usize) -> Vec<T>

Source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for T

Source§

unsafe fn from_glib_none_num_as_vec(ptr: *mut GList, num: usize) -> Vec<T>

Source§

unsafe fn from_glib_container_num_as_vec(ptr: *mut GList, num: usize) -> Vec<T>

Source§

unsafe fn from_glib_full_num_as_vec(ptr: *mut GList, num: usize) -> Vec<T>

Source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for T

Source§

unsafe fn from_glib_none_num_as_vec(ptr: *mut GPtrArray, num: usize) -> Vec<T>

Source§

unsafe fn from_glib_container_num_as_vec( ptr: *mut GPtrArray, num: usize, ) -> Vec<T>

Source§

unsafe fn from_glib_full_num_as_vec(ptr: *mut GPtrArray, num: usize) -> Vec<T>

Source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for T

Source§

unsafe fn from_glib_none_num_as_vec(ptr: *mut GSList, num: usize) -> Vec<T>

Source§

unsafe fn from_glib_container_num_as_vec(ptr: *mut GSList, num: usize) -> Vec<T>

Source§

unsafe fn from_glib_full_num_as_vec(ptr: *mut GSList, num: usize) -> Vec<T>

Source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for T

Source§

unsafe fn from_glib_none_as_vec(ptr: *const GList) -> Vec<T>

Source§

unsafe fn from_glib_container_as_vec(_: *const GList) -> Vec<T>

Source§

unsafe fn from_glib_full_as_vec(_: *const GList) -> Vec<T>

Source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for T

Source§

unsafe fn from_glib_none_as_vec(ptr: *const GPtrArray) -> Vec<T>

Source§

unsafe fn from_glib_container_as_vec(_: *const GPtrArray) -> Vec<T>

Source§

unsafe fn from_glib_full_as_vec(_: *const GPtrArray) -> Vec<T>

Source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for T

Source§

unsafe fn from_glib_none_as_vec(ptr: *const GSList) -> Vec<T>

Source§

unsafe fn from_glib_container_as_vec(_: *const GSList) -> Vec<T>

Source§

unsafe fn from_glib_full_as_vec(_: *const GSList) -> Vec<T>

Source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for T

Source§

unsafe fn from_glib_none_as_vec(ptr: *mut GList) -> Vec<T>

Source§

unsafe fn from_glib_container_as_vec(ptr: *mut GList) -> Vec<T>

Source§

unsafe fn from_glib_full_as_vec(ptr: *mut GList) -> Vec<T>

Source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for T

Source§

unsafe fn from_glib_none_as_vec(ptr: *mut GPtrArray) -> Vec<T>

Source§

unsafe fn from_glib_container_as_vec(ptr: *mut GPtrArray) -> Vec<T>

Source§

unsafe fn from_glib_full_as_vec(ptr: *mut GPtrArray) -> Vec<T>

Source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for T

Source§

unsafe fn from_glib_none_as_vec(ptr: *mut GSList) -> Vec<T>

Source§

unsafe fn from_glib_container_as_vec(ptr: *mut GSList) -> Vec<T>

Source§

unsafe fn from_glib_full_as_vec(ptr: *mut GSList) -> Vec<T>

Source§

impl<'a, T, C, E> FromValueOptional<'a> for T
where T: FromValue<'a, Checker = C>, C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError<E>>, E: Error + Send + 'static,

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoClosureReturnValue for T
where T: Into<Value>,

Source§

impl<U> IsSubclassableExt for U

Source§

impl<Super, Sub> MayDowncastTo<Sub> for Super
where Super: IsA<Super>, Sub: IsA<Super>,

Source§

impl<T> ObjectExt for T
where T: ObjectType,

Source§

fn is<U>(&self) -> bool
where U: StaticType,

Returns true if the object is an instance of (can be cast to) T.
Source§

fn type_(&self) -> Type

Returns the type of the object.
Source§

fn object_class(&self) -> &Class<Object>

Returns the ObjectClass of the object. Read more
Source§

fn class(&self) -> &Class<T>
where T: IsClass,

Returns the class of the object.
Source§

fn class_of<U>(&self) -> Option<&Class<U>>
where U: IsClass,

Returns the class of the object in the given type T. Read more
Source§

fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>
where U: IsInterface,

Returns the interface T of the object. Read more
Source§

fn set_property(&self, property_name: &str, value: impl Into<Value>)

Sets the property property_name of the object to value value. Read more
Source§

fn set_property_from_value(&self, property_name: &str, value: &Value)

Sets the property property_name of the object to value value. Read more
Source§

fn set_properties(&self, property_values: &[(&str, &dyn ToValue)])

Sets multiple properties of the object at once. Read more
Source§

fn set_properties_from_value(&self, property_values: &[(&str, Value)])

Sets multiple properties of the object at once. Read more
Source§

fn property<V>(&self, property_name: &str) -> V
where V: for<'b> FromValue<'b> + 'static,

Gets the property property_name of the object and cast it to the type V. Read more
Source§

fn property_value(&self, property_name: &str) -> Value

Gets the property property_name of the object. Read more
Source§

fn has_property(&self, property_name: &str, type_: Option<Type>) -> bool

Check if the object has a property property_name of the given type_. Read more
Source§

fn property_type(&self, property_name: &str) -> Option<Type>

Get the type of the property property_name of this object. Read more
Source§

fn find_property(&self, property_name: &str) -> Option<ParamSpec>

Get the ParamSpec of the property property_name of this object.
Source§

fn list_properties(&self) -> PtrSlice<ParamSpec>

Return all ParamSpec of the properties of this object.
Source§

fn freeze_notify(&self) -> PropertyNotificationFreezeGuard

Freeze all property notifications until the return guard object is dropped. Read more
Source§

unsafe fn set_qdata<QD>(&self, key: Quark, value: QD)
where QD: 'static,

Set arbitrary data on this object with the given key. Read more
Source§

unsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>>
where QD: 'static,

Return previously set arbitrary data of this object with the given key. Read more
Source§

unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD>
where QD: 'static,

Retrieve previously set arbitrary data of this object with the given key. Read more
Source§

unsafe fn set_data<QD>(&self, key: &str, value: QD)
where QD: 'static,

Set arbitrary data on this object with the given key. Read more
Source§

unsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>>
where QD: 'static,

Return previously set arbitrary data of this object with the given key. Read more
Source§

unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD>
where QD: 'static,

Retrieve previously set arbitrary data of this object with the given key. Read more
Source§

fn block_signal(&self, handler_id: &SignalHandlerId)

Block a given signal handler. Read more
Source§

fn unblock_signal(&self, handler_id: &SignalHandlerId)

Unblock a given signal handler.
Source§

fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)

Stop emission of the currently emitted signal.
Source§

fn stop_signal_emission_by_name(&self, signal_name: &str)

Stop emission of the currently emitted signal by the (possibly detailed) signal name.
Source§

fn connect<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,

Connect to the signal signal_name on this object. Read more
Source§

fn connect_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value> + Send + Sync + 'static,

Connect to the signal signal_id on this object. Read more
Source§

fn connect_local<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value> + 'static,

Connect to the signal signal_name on this object. Read more
Source§

fn connect_local_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value> + 'static,

Connect to the signal signal_id on this object. Read more
Source§

unsafe fn connect_unsafe<F>( &self, signal_name: &str, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value>,

Connect to the signal signal_name on this object. Read more
Source§

unsafe fn connect_unsafe_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F, ) -> SignalHandlerId
where F: Fn(&[Value]) -> Option<Value>,

Connect to the signal signal_id on this object. Read more
Source§

fn connect_closure( &self, signal_name: &str, after: bool, closure: RustClosure, ) -> SignalHandlerId

Connect a closure to the signal signal_name on this object. Read more
Source§

fn connect_closure_id( &self, signal_id: SignalId, details: Option<Quark>, after: bool, closure: RustClosure, ) -> SignalHandlerId

Connect a closure to the signal signal_id on this object. Read more
Source§

fn watch_closure(&self, closure: &impl AsRef<Closure>)

Limits the lifetime of closure to the lifetime of the object. When the object’s reference count drops to zero, the closure will be invalidated. An invalidated closure will ignore any calls to invoke_with_values, or invoke when using Rust closures.
Source§

fn emit<R>(&self, signal_id: SignalId, args: &[&dyn ToValue]) -> R

Emit signal by signal id. Read more
Source§

fn emit_with_values(&self, signal_id: SignalId, args: &[Value]) -> Option<Value>

Same as Self::emit but takes Value for the arguments.
Source§

fn emit_by_name<R>(&self, signal_name: &str, args: &[&dyn ToValue]) -> R

Emit signal by its name. Read more
Source§

fn emit_by_name_with_values( &self, signal_name: &str, args: &[Value], ) -> Option<Value>

Emit signal by its name. Read more
Source§

fn emit_by_name_with_details<R>( &self, signal_name: &str, details: Quark, args: &[&dyn ToValue], ) -> R

Emit signal by its name with details. Read more
Source§

fn emit_by_name_with_details_and_values( &self, signal_name: &str, details: Quark, args: &[Value], ) -> Option<Value>

Emit signal by its name with details. Read more
Source§

fn emit_with_details<R>( &self, signal_id: SignalId, details: Quark, args: &[&dyn ToValue], ) -> R

Emit signal by signal id with details. Read more
Source§

fn emit_with_details_and_values( &self, signal_id: SignalId, details: Quark, args: &[Value], ) -> Option<Value>

Emit signal by signal id with details. Read more
Source§

fn disconnect(&self, handler_id: SignalHandlerId)

Disconnect a previously connected signal handler.
Source§

fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
where F: Fn(&T, &ParamSpec) + Send + Sync + 'static,

Connect to the notify signal of the object. Read more
Source§

fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
where F: Fn(&T, &ParamSpec) + 'static,

Connect to the notify signal of the object. Read more
Source§

unsafe fn connect_notify_unsafe<F>( &self, name: Option<&str>, f: F, ) -> SignalHandlerId
where F: Fn(&T, &ParamSpec),

Connect to the notify signal of the object. Read more
Source§

fn notify(&self, property_name: &str)

Notify that the given property has changed its value. Read more
Source§

fn notify_by_pspec(&self, pspec: &ParamSpec)

Notify that the given property has changed its value. Read more
Source§

fn downgrade(&self) -> WeakRef<T>

Downgrade this object to a weak reference.
Source§

fn add_weak_ref_notify<F>(&self, f: F) -> WeakRefNotify<T>
where F: FnOnce() + Send + 'static,

Add a callback to be notified when the Object is disposed.
Source§

fn add_weak_ref_notify_local<F>(&self, f: F) -> WeakRefNotify<T>
where F: FnOnce() + 'static,

Add a callback to be notified when the Object is disposed. Read more
Source§

fn bind_property<'a, 'f, 't, O>( &'a self, source_property: &'a str, target: &'a O, target_property: &'a str, ) -> BindingBuilder<'a, 'f, 't>
where O: ObjectType,

Bind property source_property on this object to the target_property on the target object. Read more
Source§

fn ref_count(&self) -> u32

Returns the strong reference count of this object.
Source§

unsafe fn run_dispose(&self)

Runs the dispose mechanism of the object. Read more
Source§

impl<O> OrientableExt for O
where O: IsA<Orientable>,

Source§

fn orientation(&self) -> Orientation

Retrieves the orientation of the self. Read more
Source§

fn set_orientation(&self, orientation: Orientation)

Sets the orientation of the self. Read more
Source§

fn connect_orientation_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

impl<T> Property for T
where T: HasParamSpec,

Source§

type Value = T

Source§

impl<T> PropertyGet for T
where T: HasParamSpec,

Source§

type Value = T

Source§

fn get<R, F>(&self, f: F) -> R
where F: Fn(&<T as PropertyGet>::Value) -> R,

Source§

impl<O> StackSwitcherExt for O
where O: IsA<StackSwitcher>,

Source§

fn stack(&self) -> Option<Stack>

Retrieves the stack. See set_stack(). Read more
Source§

fn set_stack(&self, stack: Option<&impl IsA<Stack>>)

Sets the stack to control. Read more
Source§

fn connect_stack_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Source§

impl<O> StackSwitcherExtManual for O
where O: IsA<StackSwitcher>,

Source§

fn icon_size(&self) -> IconSize

Source§

fn set_icon_size(&self, icon_size: IconSize)

Source§

fn connect_icon_size_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

impl<T> StaticTypeExt for T
where T: StaticType,

Source§

fn ensure_type()

Ensures that the type has been registered with the type system.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T> TransparentType for T

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T> TryFromClosureReturnValue for T
where T: for<'a> FromValue<'a> + StaticType + 'static,

Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<O> WidgetExt for O
where O: IsA<Widget>,

Source§

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. Read more
Source§

fn add_accelerator( &self, accel_signal: &str, accel_group: &impl IsA<AccelGroup>, 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 G_SIGNAL_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 gtk_accel_map_add_entry() and set_accel_path() or GtkMenuItemExt::set_accel_path() instead. Read more
Source§

fn add_device_events(&self, device: &Device, events: EventMask)

Adds the device events in the bitfield events to the event mask for self. See set_device_events() for details. Read more
Source§

fn add_mnemonic_label(&self, label: &impl IsA<Widget>)

Adds a widget to the list of mnemonic labels for this widget. (See 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 destroy signal or a weak notifier. Read more
Source§

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 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. Read more
Source§

fn child_focus(&self, direction: DirectionType) -> bool

This function is used by custom widget implementations; if you’re writing an app, you’d use 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. Read more
Source§

fn child_notify(&self, child_property: &str)

Emits a child-notify signal for the [child property][child-properties] child_property on self. Read more
Source§

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 hexpands() or vexpands(). Read more
Source§

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 pango_context(). Read more
Source§

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. Read more
Source§

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 grab-notify signal to check for specific devices. See device_grab_add(). Read more
Source§

fn drag_begin_with_coordinates( &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 WidgetExtManual::drag_source_set() is used. Read more
Source§

fn drag_check_threshold( &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. Read more
Source§

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 drag_dest_set_target_list().
Source§

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 drag_dest_set_target_list().
Source§

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 drag_dest_set_target_list().
Source§

fn drag_dest_find_target( &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 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. Read more
Source§

fn drag_dest_get_target_list(&self) -> Option<TargetList>

Returns the list of targets this widget can accept from drag-and-drop. Read more
Source§

fn drag_dest_get_track_motion(&self) -> bool

Returns whether the widget has been configured to always emit drag-motion signals. Read more
Source§

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 WidgetExtManual::drag_dest_set(). Read more
Source§

fn drag_dest_set_track_motion(&self, track_motion: bool)

Tells the widget to emit drag-motion and drag-leave events regardless of the targets and the DestDefaults::MOTION flag. Read more
Source§

fn drag_dest_unset(&self)

Clears information about a drop destination set with WidgetExtManual::drag_dest_set(). The widget will no longer receive notification of drags.
Source§

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 drag-data-received signal. Failure of the retrieval is indicated by the length field of the selection_data signal parameter being negative. However, when drag_get_data() is called implicitely because the DestDefaults::DROP was set, then the widget will not receive notification of failed drops. Read more
Source§

fn drag_highlight(&self)

Highlights a widget as a currently hovered drop target. To end the highlight, call drag_unhighlight(). GTK+ calls this automatically if DestDefaults::HIGHLIGHT is set.
Source§

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 drag_source_set_target_list().
Source§

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 drag_source_set_target_list().
Source§

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 drag_source_set_target_list().
Source§

fn drag_source_get_target_list(&self) -> Option<TargetList>

Gets the list of targets this widget can provide for drag-and-drop. Read more
Source§

fn drag_source_set_icon_gicon(&self, icon: &impl IsA<Icon>)

Sets the icon that will be used for drags from a particular source to icon. See the docs for IconTheme for more details. Read more
Source§

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. Read more
Source§

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. Read more
Source§

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 WidgetExtManual::drag_source_set(). Read more
Source§

fn drag_source_unset(&self)

Undoes the effects of WidgetExtManual::drag_source_set().
Source§

fn drag_unhighlight(&self)

Removes a highlight set by drag_highlight() from a widget.
Source§

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. Read more
Source§

fn error_bell(&self)

Notifies the user about an input-related error on this widget. If the gtk-error-bell setting is true, it calls Window::beep(), otherwise it does nothing. Read more
Source§

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 main_do_event() so the event will behave as if it were in the event queue. Don’t synthesize expose events; instead, use Window::invalidate_rect() to invalidate a region of the window. Read more
Source§

fn freeze_child_notify(&self)

Stops emission of child-notify signals on self. The signals are queued until thaw_child_notify() is called on self. Read more
Source§

fn accessible(&self) -> Option<Object>

Returns the accessible object that describes the widget to an assistive technology. Read more
Source§

fn 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. Read more
Source§

fn 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 draw function, and when allocating child widgets in size_allocate. Read more
Source§

fn 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 draw function. Read more
Source§

fn allocated_size(&self) -> (Allocation, i32)

Retrieves the widget’s allocated size. Read more
Source§

fn 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 draw function. Read more
Source§

fn allocation(&self) -> Allocation

Retrieves the widget’s allocation. Read more
Source§

fn 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 toplevel(). Read more
Source§

fn is_app_paintable(&self) -> bool

Determines whether the application intends to draw on the widget in an draw handler. Read more
Source§

fn can_default(&self) -> bool

Determines whether self can be a default widget. See set_can_default(). Read more
Source§

fn can_focus(&self) -> bool

Determines whether self can own the input focus. See set_can_focus(). Read more
Source§

fn is_child_visible(&self) -> bool

Gets the value set with set_child_visible(). If you feel a need to use this function, your code probably needs reorganization. Read more
Source§

fn clip(&self) -> Allocation

Retrieves the widget’s clip area. Read more
Source§

fn 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. Read more
Source§

fn device_is_enabled(&self, device: &Device) -> bool

Returns whether device can interact with self and its children. See set_device_enabled(). Read more
Source§

fn 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. Read more
Source§

fn direction(&self) -> TextDirection

Gets the reading direction for a particular widget. See set_direction(). Read more
Source§

fn 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. Read more
Source§

fn is_double_buffered(&self) -> bool

Determines whether the widget is double buffered. Read more
Source§

fn gets_focus_on_click(&self) -> bool

Returns whether the widget should grab focus when it is clicked with the mouse. See set_focus_on_click(). Read more
Source§

fn font_map(&self) -> Option<FontMap>

Gets the font map that has been set with set_font_map(). Read more
Source§

fn 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. Read more
Source§

fn 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 FrameClock::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 FrameClock::frame_time(), and then update the animation by calling FrameClock::frame_time() again during each repaint. Read more
Source§

fn halign(&self) -> Align

Gets the value of the halign property. Read more
Source§

fn has_tooltip(&self) -> bool

Returns the current value of the has-tooltip property. See has-tooltip for more information. Read more
Source§

fn has_window(&self) -> bool

Determines whether self has a gdk::Window of its own. See set_has_window(). Read more
Source§

fn hexpands(&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. Read more
Source§

fn is_hexpand_set(&self) -> bool

Gets whether set_hexpand() has been used to explicitly set the expand flag on this widget. Read more
Source§

fn is_mapped(&self) -> bool

Whether the widget is mapped. Read more
Source§

fn margin_bottom(&self) -> i32

Gets the value of the margin-bottom property. Read more
Source§

fn margin_end(&self) -> i32

Gets the value of the margin-end property. Read more
Source§

fn margin_start(&self) -> i32

Gets the value of the margin-start property. Read more
Source§

fn margin_top(&self) -> i32

Gets the value of the margin-top property. Read more
Source§

fn modifier_mask(&self, intent: ModifierIntent) -> ModifierType

Returns the modifier mask the self’s windowing system backend uses for a particular purpose. Read more
Source§

fn widget_name(&self) -> GString

Retrieves the name of a widget. See set_widget_name() for the significance of widget names. Read more
Source§

fn is_no_show_all(&self) -> bool

Returns the current value of the no-show-all property, which determines whether calls to show_all() will affect this widget. Read more
Source§

fn opacity(&self) -> f64

Fetches the requested opacity for this widget. See set_opacity(). Read more
Source§

fn 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 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 screen-changed signal on the widget. Read more
Source§

fn parent(&self) -> Option<Widget>

Returns the parent container of self. Read more
Source§

fn parent_window(&self) -> Option<Window>

Gets self’s parent window, or None if it does not have one. Read more
Source§

fn path(&self) -> WidgetPath

Returns the WidgetPath representing self, if the widget is not connected to a toplevel widget, a partial path will be created. Read more
Source§

fn preferred_height(&self) -> (i32, i32)

Retrieves a widget’s initial minimum and natural height. Read more
Source§

fn preferred_height_and_baseline_for_width( &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. Read more
Source§

fn 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. Read more
Source§

fn 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. Read more
Source§

fn preferred_width(&self) -> (i32, i32)

Retrieves a widget’s initial minimum and natural width. Read more
Source§

fn 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. Read more
Source§

fn is_realized(&self) -> bool

Determines whether self is realized. Read more
Source§

fn 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. Read more
Source§

fn request_mode(&self) -> SizeRequestMode

Gets whether the widget prefers a height-for-width layout or a width-for-height layout. Read more
Source§

fn 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). Read more
Source§

fn 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. Read more
Source§

fn get_sensitive(&self) -> bool

Returns the widget’s sensitivity (in the sense of returning the value that has been set using set_sensitive()). Read more
Source§

fn settings(&self) -> Option<Settings>

Gets the settings object holding the settings used for this widget. Read more
Source§

fn size_request(&self) -> (i32, i32)

Gets the size request that was explicitly set for the widget using 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 set_size_request(). To get the size a widget will actually request, call preferred_size() instead of this function. Read more
Source§

fn 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. Read more
Source§

fn 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. Read more
Source§

fn supports_multidevice(&self) -> bool

Returns true if self is multiple pointer aware. See set_support_multidevice() for more information. Read more
Source§

fn 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. Read more
Source§

fn tooltip_markup(&self) -> Option<GString>

Gets the contents of the tooltip for self. Read more
Source§

fn tooltip_text(&self) -> Option<GString>

Gets the contents of the tooltip for self. Read more
Source§

fn tooltip_window(&self) -> Option<Window>

Returns the Window of the current tooltip. This can be the GtkWindow created by default, or the custom tooltip window set using set_tooltip_window(). Read more
Source§

fn 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. Read more
Source§

fn valign(&self) -> Align

Gets the value of the valign property. Read more
Source§

fn valign_with_baseline(&self) -> Align

Gets the value of the valign property, including Align::Baseline. Read more
Source§

fn vexpands(&self) -> bool

Gets whether the widget would like any available extra vertical space. Read more
Source§

fn is_vexpand_set(&self) -> bool

Gets whether set_vexpand() has been used to explicitly set the expand flag on this widget. Read more
Source§

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 is_visible() instead. Read more
Source§

fn visual(&self) -> Option<Visual>

Gets the visual that will be used to render self. Read more
Source§

fn window(&self) -> Option<Window>

Returns the widget’s window if it is realized, None otherwise Read more
Source§

fn grab_add(&self)

Makes self the current grabbed widget. Read more
Source§

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 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, 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.
Source§

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. Read more
Source§

fn grab_remove(&self)

Removes the grab from the given widget. Read more
Source§

fn has_default(&self) -> bool

Determines whether self is the current default widget within its toplevel. See set_can_default(). Read more
Source§

fn has_focus(&self) -> bool

Determines if the widget has the global input focus. See is_focus() for the difference between having the global input focus, and only having the focus within a toplevel. Read more
Source§

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). Read more
Source§

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. Read more
Source§

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::gets_focus_visible() for more information about focus indication. Read more
Source§

fn hide(&self)

Reverses the effects of show(), causing the widget to be hidden (invisible to the user).
Source§

fn in_destruction(&self) -> bool

Returns whether the widget is currently being destroyed. This information can sometimes be used to avoid doing unnecessary work. Read more
Source§

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 gtk_widget_class_set_template() Read more
Source§

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 Window::input_shape_combine_region() for more information. Read more
Source§

fn insert_action_group(&self, name: &str, group: Option<&impl IsA<ActionGroup>>)

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. Read more
Source§

fn is_ancestor(&self, ancestor: &impl IsA<Widget>) -> bool

Determines whether self is somewhere inside ancestor, possibly with intermediate containers. Read more
Source§

fn is_drawable(&self) -> bool

Determines whether self can be drawn to. A widget can be drawn to if it is mapped and visible. Read more
Source§

fn is_focus(&self) -> bool

Determines if the widget is the focus widget within its toplevel. (This does not mean that the has-focus property is necessarily set; has-focus will only be set if the toplevel widget additionally has the global input focus.) Read more
Source§

fn is_sensitive(&self) -> bool

Returns the widget’s effective sensitivity, which means it is sensitive itself and also its parent widget is sensitive Read more
Source§

fn is_toplevel(&self) -> bool

Determines whether self is a toplevel widget. Read more
Source§

fn is_visible(&self) -> bool

Determines whether the widget and all its parents are marked as visible. Read more
Source§

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 keynav-failed signal on the widget and its return value should be interpreted in a way similar to the return value of child_focus(): Read more
Source§

fn list_accel_closures(&self) -> Vec<Closure>

Lists the closures used by self for accelerator group connections with AccelGroupExtManual::connect_accel_group_by_path() or AccelGroupExtManual::connect_accel_group(). The closures can be used to monitor accelerator changes on self, by connecting to the AccelGroup signal of the AccelGroup of a closure which can be found out with AccelGroup::from_accel_closure(). Read more
Source§

fn list_action_prefixes(&self) -> Vec<GString>

Retrieves a None-terminated array of strings containing the prefixes of gio::ActionGroup’s available to self. Read more
Source§

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()). Read more
Source§

fn map(&self)

This function is only for use in widget implementations. Causes a widget to be mapped if it isn’t already.
Source§

fn mnemonic_activate(&self, group_cycling: bool) -> bool

Emits the mnemonic-activate signal. Read more
Source§

fn queue_allocate(&self)

This function is only for use in widget implementations. Read more
Source§

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. Read more
Source§

fn queue_draw(&self)

Equivalent to calling queue_draw_area() for the entire area of a widget.
Source§

fn queue_draw_area(&self, x: i32, y: i32, width: i32, height: i32)

Convenience function that calls queue_draw_region() on the region created from the given coordinates. Read more
Source§

fn queue_draw_region(&self, region: &Region)

Invalidates the area of self defined by region by calling Window::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. Read more
Source§

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. Read more
Source§

fn queue_resize_no_redraw(&self)

This function works like queue_resize(), except that the widget is not invalidated.
Source§

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. Read more
Source§

fn register_window(&self, window: &Window)

Registers a gdk::Window with the widget and sets it up so that the widget receives events for it. Call unregister_window() when destroying the window. Read more
Source§

fn remove_accelerator( &self, accel_group: &impl IsA<AccelGroup>, accel_key: u32, accel_mods: ModifierType, ) -> bool

Removes an accelerator from self, previously installed with add_accelerator(). Read more
Source§

fn remove_mnemonic_label(&self, label: &impl IsA<Widget>)

Removes a widget from the list of mnemonic labels for this widget. (See list_mnemonic_labels()). The widget must have previously been added to the list with add_mnemonic_label(). Read more
Source§

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::path_for_child().
Source§

fn send_focus_change(&self, event: &Event) -> bool

Sends the focus change event to self Read more
Source§

fn set_accel_path( &self, accel_path: Option<&str>, accel_group: Option<&impl IsA<AccelGroup>>, )

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 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 gtk_accel_map_save().) Read more
Source§

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. Read more
Source§

fn set_app_paintable(&self, app_paintable: bool)

Sets whether the application intends to draw on the widget in an draw handler. Read more
Source§

fn set_can_default(&self, can_default: bool)

Specifies whether self can be a default widget. See grab_default() for details about the meaning of “default”. Read more
Source§

fn set_can_focus(&self, can_focus: bool)

Specifies whether self can own the input focus. See grab_focus() for actually setting the input focus on a widget. Read more
Source§

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 show(). Read more
Source§

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 set_allocation() (or after chaining up to the parent class), because that function resets the clip. Read more
Source§

fn set_device_enabled(&self, device: &Device, enabled: bool)

Enables or disables a gdk::Device to interact with self and all its children. Read more
Source§

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 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 has_window()); to get events on those widgets, place them inside a EventBox and receive events on the event box. Read more
Source§

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). Read more
Source§

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. Read more
Source§

fn set_font_map(&self, font_map: Option<&impl IsA<FontMap>>)

Sets the font map to use for Pango rendering. When not set, the widget will inherit the font map from its parent. Read more
Source§

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. Read more
Source§

fn set_halign(&self, align: Align)

Sets the horizontal alignment of self. See the halign property. Read more
Source§

fn set_has_tooltip(&self, has_tooltip: bool)

Sets the has-tooltip property on self to has_tooltip. See has-tooltip for more information. Read more
Source§

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 (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 realize must announce this by calling this function with has_window = false. Read more
Source§

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. Read more
Source§

fn set_hexpand_set(&self, set: bool)

Sets whether the hexpand flag (see hexpands()) will be used. Read more
Source§

fn set_mapped(&self, mapped: bool)

Marks the widget as being mapped. Read more
Source§

fn set_margin_bottom(&self, margin: i32)

Sets the bottom margin of self. See the margin-bottom property. Read more
Source§

fn set_margin_end(&self, margin: i32)

Sets the end margin of self. See the margin-end property. Read more
Source§

fn set_margin_start(&self, margin: i32)

Sets the start margin of self. See the margin-start property. Read more
Source§

fn set_margin_top(&self, margin: i32)

Sets the top margin of self. See the margin-top property. Read more
Source§

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). Read more
Source§

fn set_no_show_all(&self, no_show_all: bool)

Sets the no-show-all property, which determines whether calls to show_all() will affect this widget. Read more
Source§

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: Read more
Source§

fn set_parent(&self, parent: &impl IsA<Widget>)

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 unparent(). Read more
Source§

fn set_parent_window(&self, parent_window: &Window)

Sets a non default parent window for self. Read more
Source§

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. Read more
Source§

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. Read more
Source§

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. Read more
Source§

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. Read more
Source§

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. Read more
Source§

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.). Read more
Source§

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 realize, Window::set_support_multidevice() will have to be called manually on them. Read more
Source§

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][PangoMarkupFormat]. Read more
Source§

fn set_tooltip_text(&self, text: Option<&str>)

Sets text as the contents of the tooltip. This function will take care of setting has-tooltip to true and of the default handler for the query-tooltip signal. Read more
Source§

fn set_tooltip_window(&self, custom_window: Option<&impl IsA<Window>>)

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. Read more
Source§

fn set_valign(&self, align: Align)

Sets the vertical alignment of self. See the valign property. Read more
Source§

fn set_vexpand(&self, expand: bool)

Sets whether the widget would like any available extra vertical space. Read more
Source§

fn set_vexpand_set(&self, set: bool)

Sets whether the vexpand flag (see vexpands()) will be used. Read more
Source§

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 get_visible(). Read more
Source§

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 screen(), so handling the screen-changed signal is necessary. Read more
Source§

fn set_window(&self, window: Window)

Sets a widget’s window. This function should only be used in a widget’s 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 parent_window(). Read more
Source§

fn shape_combine_region(&self, region: Option<&Region>)

Sets a shape for this widget’s GDK window. This allows for transparent windows etc., see Window::shape_combine_region() for more information. Read more
Source§

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 show_all() on the container, instead of individually showing the widgets. Read more
Source§

fn show_all(&self)

Recursively shows a widget, and any child widgets (if the widget is a container).
Source§

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.
Source§

fn size_allocate(&self, allocation: &Allocation)

This function is only used by Container subclasses, to assign a size and position to their child widgets. Read more
Source§

fn size_allocate_with_baseline( &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. Read more
Source§

fn style_get_property(&self, property_name: &str) -> Value

Gets the value of a style property of self. Read more
Source§

fn thaw_child_notify(&self)

Reverts the effect of a previous call to freeze_child_notify(). This causes all queued child-notify signals on self to be emitted.
Source§

fn translate_coordinates( &self, dest_widget: &impl IsA<Widget>, 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. Read more
Source§

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.
Source§

fn unmap(&self)

This function is only for use in widget implementations. Causes a widget to be unmapped if it’s currently mapped.
Source§

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.
Source§

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).
Source§

fn unregister_window(&self, window: &Window)

Unregisters a gdk::Window from the widget that was previously set up with register_window(). You need to call this when the window is no longer used by the widget, such as when you destroy it. Read more
Source§

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 set_state_flags(). Read more
Source§

fn is_composite_child(&self) -> bool

Source§

fn expands(&self) -> bool

Whether to expand in both directions. Setting this sets both hexpand and vexpand
Source§

fn set_expand(&self, expand: bool)

Whether to expand in both directions. Setting this sets both hexpand and vexpand
Source§

fn set_has_default(&self, has_default: bool)

Source§

fn set_has_focus(&self, has_focus: bool)

Source§

fn height_request(&self) -> i32

Source§

fn set_height_request(&self, height_request: i32)

Source§

fn set_is_focus(&self, is_focus: bool)

Source§

fn margin(&self) -> i32

Sets all four sides’ margin at once. If read, returns max margin on any side.
Source§

fn set_margin(&self, margin: i32)

Sets all four sides’ margin at once. If read, returns max margin on any side.
Source§

fn width_request(&self) -> i32

Source§

fn set_width_request(&self, width_request: i32)

Source§

fn connect_accel_closures_changed<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_button_press_event<F: Fn(&Self, &EventButton) -> Propagation + 'static>( &self, f: F, ) -> SignalHandlerId

The ::button-press-event signal will be emitted when a button (typically from a mouse) is pressed. Read more
Source§

fn connect_button_release_event<F: Fn(&Self, &EventButton) -> Propagation + 'static>( &self, f: F, ) -> SignalHandlerId

The ::button-release-event signal will be emitted when a button (typically from a mouse) is released. Read more
Source§

fn connect_can_activate_accel<F: Fn(&Self, u32) -> bool + 'static>( &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. Read more
Source§

fn connect_child_notify<F: Fn(&Self, &ParamSpec) + 'static>( &self, detail: Option<&str>, 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. Read more
Source§

fn connect_configure_event<F: Fn(&Self, &EventConfigure) -> bool + 'static>( &self, f: F, ) -> SignalHandlerId

The ::configure-event signal will be emitted when the size, position or stacking of the widget’s window has changed. Read more
Source§

fn connect_damage_event<F: Fn(&Self, &EventExpose) -> bool + 'static>( &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. Read more
Source§

fn connect_delete_event<F: Fn(&Self, &Event) -> Propagation + 'static>( &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 WidgetExtManual::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. Read more
Source§

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. Read more
Source§

fn connect_destroy_event<F: Fn(&Self, &Event) -> Propagation + 'static>( &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. Read more
Source§

fn connect_direction_changed<F: Fn(&Self, TextDirection) + 'static>( &self, f: F, ) -> SignalHandlerId

The ::direction-changed signal is emitted when the text direction of a widget changes. Read more
Source§

fn connect_drag_begin<F: Fn(&Self, &DragContext) + 'static>( &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. drag_source_set_icon_pixbuf(). Read more
Source§

fn connect_drag_data_delete<F: Fn(&Self, &DragContext) + 'static>( &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. Read more
Source§

fn connect_drag_data_get<F: Fn(&Self, &DragContext, &SelectionData, u32, u32) + 'static>( &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(). Read more
Source§

fn connect_drag_data_received<F: Fn(&Self, &DragContext, i32, i32, &SelectionData, u32, u32) + 'static>( &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 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. Read more
Source§

fn connect_drag_drop<F: Fn(&Self, &DragContext, i32, i32, u32) -> bool + 'static>( &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 drag-data-received handler which gets triggered by calling drag_get_data() to receive the data for one or more of the supported targets. Read more
Source§

fn connect_drag_end<F: Fn(&Self, &DragContext) + 'static>( &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 drag-begin. Read more
Source§

fn connect_drag_failed<F: Fn(&Self, &DragContext, DragResult) -> Propagation + 'static>( &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. Read more
Source§

fn connect_drag_leave<F: Fn(&Self, &DragContext, u32) + 'static>( &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 drag-motion, e.g. undo highlighting with drag_unhighlight(). Read more
Source§

fn connect_drag_motion<F: Fn(&Self, &DragContext, i32, i32, u32) -> bool + 'static>( &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(). Read more
Source§

fn connect_draw<F: Fn(&Self, &Context) -> Propagation + 'static>( &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 allocated_width() and allocated_height(). Read more
Source§

fn connect_enter_notify_event<F: Fn(&Self, &EventCrossing) -> Propagation + 'static>( &self, f: F, ) -> SignalHandlerId

The ::enter-notify-event will be emitted when the pointer enters the widget’s window. Read more
Source§

fn connect_event<F: Fn(&Self, &Event) -> Propagation + 'static>( &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. key-press-event) and finally a generic event-after signal. Read more
Source§

fn connect_event_after<F: Fn(&Self, &Event) + 'static>( &self, f: F, ) -> SignalHandlerId

After the emission of the event signal and (optionally) the second more specific signal, ::event-after will be emitted regardless of the previous two signals handlers return values. Read more
Source§

fn connect_focus<F: Fn(&Self, DirectionType) -> Propagation + 'static>( &self, f: F, ) -> SignalHandlerId

Returns Read more
Source§

fn connect_focus_in_event<F: Fn(&Self, &EventFocus) -> Propagation + 'static>( &self, f: F, ) -> SignalHandlerId

The ::focus-in-event signal will be emitted when the keyboard focus enters the widget’s window. Read more
Source§

fn connect_focus_out_event<F: Fn(&Self, &EventFocus) -> Propagation + 'static>( &self, f: F, ) -> SignalHandlerId

The ::focus-out-event signal will be emitted when the keyboard focus leaves the widget’s window. Read more
Source§

fn connect_grab_broken_event<F: Fn(&Self, &EventGrabBroken) -> Propagation + 'static>( &self, f: F, ) -> SignalHandlerId

Emitted when a pointer or keyboard grab on a window belonging to widget gets broken. Read more
Source§

fn connect_grab_focus<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Source§

fn emit_grab_focus(&self)

Source§

fn connect_grab_notify<F: Fn(&Self, bool) + 'static>( &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. Read more
Source§

fn connect_hide<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

The ::hide signal is emitted when widget is hidden, for example with hide().
Source§

fn connect_hierarchy_changed<F: Fn(&Self, Option<&Widget>) + 'static>( &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. Read more
Source§

fn connect_key_press_event<F: Fn(&Self, &EventKey) -> Propagation + 'static>( &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. Read more
Source§

fn connect_key_release_event<F: Fn(&Self, &EventKey) -> Propagation + 'static>( &self, f: F, ) -> SignalHandlerId

The ::key-release-event signal is emitted when a key is released. Read more
Source§

fn connect_keynav_failed<F: Fn(&Self, DirectionType) -> Propagation + 'static>( &self, f: F, ) -> SignalHandlerId

Gets emitted if keyboard navigation fails. See keynav_failed() for details. Read more
Source§

fn connect_leave_notify_event<F: Fn(&Self, &EventCrossing) -> Propagation + 'static>( &self, f: F, ) -> SignalHandlerId

The ::leave-notify-event will be emitted when the pointer leaves the widget’s window. Read more
Source§

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 set_visible()) and all its parents up to the toplevel widget are also visible. Once the map has occurred, map-event will be emitted. Read more
Source§

fn connect_mnemonic_activate<F: Fn(&Self, bool) -> Propagation + 'static>( &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. Read more
Source§

fn connect_motion_notify_event<F: Fn(&Self, &EventMotion) -> Propagation + 'static>( &self, f: F, ) -> SignalHandlerId

The ::motion-notify-event signal is emitted when the pointer moves over the widget’s gdk::Window. Read more
Source§

fn connect_move_focus<F: Fn(&Self, DirectionType) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn emit_move_focus(&self, direction: DirectionType)

Source§

fn connect_parent_set<F: Fn(&Self, Option<&Widget>) + 'static>( &self, f: F, ) -> SignalHandlerId

The ::parent-set signal is emitted when a new parent has been set on a widget. Read more
Source§

fn connect_popup_menu<F: Fn(&Self) -> bool + 'static>( &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. Read more
Source§

fn emit_popup_menu(&self) -> bool

Source§

fn connect_property_notify_event<F: Fn(&Self, &EventProperty) -> Propagation + 'static>( &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. Read more
Source§

fn connect_proximity_in_event<F: Fn(&Self, &EventProximity) -> Propagation + 'static>( &self, f: F, ) -> SignalHandlerId

To receive this signal the gdk::Window associated to the widget needs to enable the gdk::EventMask::PROXIMITY_IN_MASK mask. Read more
Source§

fn connect_proximity_out_event<F: Fn(&Self, &EventProximity) -> Propagation + 'static>( &self, f: F, ) -> SignalHandlerId

To receive this signal the gdk::Window associated to the widget needs to enable the gdk::EventMask::PROXIMITY_OUT_MASK mask. Read more
Source§

fn connect_query_tooltip<F: Fn(&Self, i32, i32, bool, &Tooltip) -> bool + 'static>( &self, f: F, ) -> SignalHandlerId

Emitted when 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. Read more
Source§

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 realize() has been called or the widget has been mapped (that is, it is going to be drawn).
Source§

fn connect_screen_changed<F: Fn(&Self, Option<&Screen>) + 'static>( &self, f: F, ) -> SignalHandlerId

The ::screen-changed signal gets emitted when the screen of a widget has changed. Read more
Source§

fn connect_scroll_event<F: Fn(&Self, &EventScroll) -> Propagation + 'static>( &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. Read more
Source§

fn connect_selection_clear_event<F: Fn(&Self, &EventSelection) -> Propagation + 'static>( &self, f: F, ) -> SignalHandlerId

The ::selection-clear-event signal will be emitted when the the widget’s window has lost ownership of a selection. Read more
Source§

fn connect_selection_get<F: Fn(&Self, &SelectionData, u32, u32) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_selection_notify_event<F: Fn(&Self, &EventSelection) -> Propagation + 'static>( &self, f: F, ) -> SignalHandlerId

Returns Read more
Source§

fn connect_selection_received<F: Fn(&Self, &SelectionData, u32) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_selection_request_event<F: Fn(&Self, &EventSelection) -> Propagation + 'static>( &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. Read more
Source§

fn connect_show<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

The ::show signal is emitted when widget is shown, for example with show().
Source§

fn connect_show_help<F: Fn(&Self, WidgetHelpType) -> bool + 'static>( &self, f: F, ) -> SignalHandlerId

Returns Read more
Source§

fn emit_show_help(&self, help_type: WidgetHelpType) -> bool

Source§

fn connect_size_allocate<F: Fn(&Self, &Allocation) + 'static>( &self, f: F, ) -> SignalHandlerId

allocation Read more
Source§

fn connect_state_flags_changed<F: Fn(&Self, StateFlags) + 'static>( &self, f: F, ) -> SignalHandlerId

The ::state-flags-changed signal is emitted when the widget state changes, see state_flags(). Read more
Source§

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 changed signal is emitted on the widget’s associated StyleContext as returned by style_context(). Read more
Source§

fn connect_touch_event<F: Fn(&Self, &Event) -> Propagation + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

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. Read more
Source§

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 unrealize() has been called or the widget has been unmapped (that is, it is going to be hidden).
Source§

fn connect_window_state_event<F: Fn(&Self, &EventWindowState) -> Propagation + 'static>( &self, f: F, ) -> SignalHandlerId

The ::window-state-event will be emitted when the state of the toplevel window associated to the widget changes. Read more
Source§

fn connect_app_paintable_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_can_default_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_can_focus_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_composite_child_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_events_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Source§

fn connect_expand_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Source§

fn connect_focus_on_click_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_halign_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Source§

fn connect_has_default_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_has_focus_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_has_tooltip_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_height_request_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_hexpand_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_hexpand_set_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_is_focus_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_margin_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Source§

fn connect_margin_bottom_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_margin_end_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_margin_start_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_margin_top_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Source§

fn connect_no_show_all_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_opacity_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_parent_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Source§

fn connect_receives_default_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_scale_factor_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_sensitive_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_tooltip_markup_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_tooltip_text_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_valign_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Source§

fn connect_vexpand_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_vexpand_set_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_visible_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_width_request_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source§

fn connect_window_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

Source§

impl<O> WidgetExtManual for O
where O: IsA<Widget>,

Source§

fn drag_dest_set( &self, flags: DestDefaults, targets: &[TargetEntry], actions: DragAction, )

Sets a widget as a potential drop destination, and adds default behaviors. Read more
Source§

fn drag_source_set( &self, start_button_mask: ModifierType, targets: &[TargetEntry], actions: DragAction, )

Sets up a widget so that GTK+ will start a drag operation when the user clicks and drags on the widget. The widget must have a window. Read more
Source§

fn intersect( &self, area: &Rectangle, intersection: Option<&mut Rectangle>, ) -> bool

Computes the intersection of a self’s area and area, storing the intersection in intersection, and returns true if there was an intersection. intersection may be None if you’re only interested in whether there was an intersection. Read more
Source§

fn connect_map_event<F: Fn(&Self, &Event) -> Propagation + 'static>( &self, f: F, ) -> SignalHandlerId

The ::map-event signal will be emitted when the widget’s window is mapped. A window is mapped when it becomes visible on the screen. Read more
Source§

fn connect_unmap_event<F: Fn(&Self, &Event) -> Propagation + 'static>( &self, f: F, ) -> SignalHandlerId

The ::unmap-event signal will be emitted when the widget’s window is unmapped. A window is unmapped when it becomes invisible on the screen. Read more
Source§

fn add_tick_callback<P: Fn(&Self, &FrameClock) -> ControlFlow + 'static>( &self, callback: P, ) -> TickCallbackId

Queues an animation frame update and adds a callback to be called before each frame. Until the tick callback is removed, it will be called frequently (usually at the frame rate of the output device or as quickly as the application can be repainted, whichever is slower). For this reason, is most suitable for handling graphics that change every frame or every few frames. The tick callback does not automatically imply a relayout or repaint. If you want a repaint or relayout, and aren’t changing widget properties that would trigger that (for example, changing the text of a Label), then you will have to call WidgetExt::queue_resize() or WidgetExt::queue_draw_area() yourself. Read more
Source§

fn add_events(&self, events: EventMask)

Adds the events in the bitfield events to the event mask for self. See WidgetExtManual::set_events() and the [input handling overview][event-masks] for details. Read more
Source§

fn events(&self) -> EventMask

Returns the event mask (see gdk::EventMask) for the widget. These are the events that the widget will receive. Read more
Source§

fn set_events(&self, events: EventMask)

Sets the event mask (see gdk::EventMask) for a widget. The event mask determines which events a widget will receive. 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 WidgetExtManual::add_events() for widgets that are already realized, or if you want to preserve the existing event mask. This function can’t be used with widgets that have no window. (See WidgetExt::has_window()). To get events on those widgets, place them inside a EventBox and receive events on the event box. Read more
Source§

unsafe fn destroy(&self)

Calls gtk_widget_destroy() on this widget. Read more
Source§

fn hide_on_delete(&self) -> Propagation

Utility function; intended to be connected to the delete-event signal on a Window. The function calls WidgetExt::hide() on its argument, then returns true. If connected to ::delete-event, the result is that clicking the close button for a window (on the window frame, top right corner usually) will hide but not destroy the window. By default, GTK+ destroys windows when ::delete-event is received. Read more