pub trait WidgetExt: 'static {
Show 55 methods
// Required methods
fn action_set_enabled(&self, action_name: &str, enabled: bool);
fn close(&self);
fn focus_default(&self) -> bool;
fn force_close(&self);
fn is_busy(&self) -> bool;
fn can_maximize(&self) -> bool;
fn child(&self) -> Option<Widget>;
fn default_focus(&self) -> Option<Widget>;
fn icon(&self) -> Option<Icon>;
fn icon_name(&self) -> Option<GString>;
fn id(&self) -> GString;
fn kind(&self) -> GString;
fn menu_model(&self) -> Option<MenuModel>;
fn is_modified(&self) -> bool;
fn needs_attention(&self) -> bool;
fn position(&self) -> Option<Position>;
fn is_reorderable(&self) -> bool;
fn save_delegate(&self) -> Option<SaveDelegate>;
fn title(&self) -> Option<GString>;
fn tooltip(&self) -> Option<GString>;
fn insert_action_group(&self, prefix: &str, group: &impl IsA<ActionGroup>);
fn mark_busy(&self);
fn maximize(&self);
fn raise(&self);
fn set_can_maximize(&self, can_maximize: bool);
fn set_child(&self, child: Option<&impl IsA<Widget>>);
fn set_icon(&self, icon: Option<&impl IsA<Icon>>);
fn set_icon_name(&self, icon_name: Option<&str>);
fn set_id(&self, id: &str);
fn set_kind(&self, kind: Option<&str>);
fn set_menu_model(&self, menu_model: Option<&impl IsA<MenuModel>>);
fn set_modified(&self, modified: bool);
fn set_needs_attention(&self, needs_attention: bool);
fn set_reorderable(&self, reorderable: bool);
fn set_save_delegate(&self, save_delegate: Option<&impl IsA<SaveDelegate>>);
fn set_title(&self, title: Option<&str>);
fn set_tooltip(&self, tooltip: Option<&str>);
fn unmark_busy(&self);
fn unmaximize(&self);
fn connect_get_default_focus<F: Fn(&Self) -> Option<Widget> + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_presented<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_busy_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_can_maximize_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_child_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_icon_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_icon_name_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_id_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId;
fn connect_kind_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_menu_model_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_modified_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_needs_attention_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_reorderable_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_save_delegate_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_title_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_tooltip_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
}
Expand description
Required Methods§
fn action_set_enabled(&self, action_name: &str, enabled: bool)
fn close(&self)
fn focus_default(&self) -> bool
sourcefn force_close(&self)
fn force_close(&self)
Closes the widget without any save dialogs.
fn is_busy(&self) -> bool
fn can_maximize(&self) -> bool
sourcefn default_focus(&self) -> Option<Widget>
fn default_focus(&self) -> Option<Widget>
fn kind(&self) -> GString
Gets the gio::MenuModel
for the widget.
FrameHeader
may use this model to display additional options
for the page to the user via menus.
Returns
sourcefn is_modified(&self) -> bool
fn is_modified(&self) -> bool
fn needs_attention(&self) -> bool
fn is_reorderable(&self) -> bool
sourcefn save_delegate(&self) -> Option<SaveDelegate>
fn save_delegate(&self) -> Option<SaveDelegate>
Gets the save-delegate
property.
The save delegate may be used to perform save operations on the content within the widget.
Document editors might use this to save the file to disk.
Returns
a SaveDelegate
or None
fn insert_action_group(&self, prefix: &str, group: &impl IsA<ActionGroup>)
fn mark_busy(&self)
fn maximize(&self)
fn raise(&self)
fn set_can_maximize(&self, can_maximize: bool)
sourcefn set_icon_name(&self, icon_name: Option<&str>)
fn set_icon_name(&self, icon_name: Option<&str>)
Sets the gio::MenuModel
for the widget.
FrameHeader
may use this model to display additional options
for the page to the user via menus.
menu_model
sourcefn set_modified(&self, modified: bool)
fn set_modified(&self, modified: bool)
fn set_needs_attention(&self, needs_attention: bool)
fn set_reorderable(&self, reorderable: bool)
sourcefn set_save_delegate(&self, save_delegate: Option<&impl IsA<SaveDelegate>>)
fn set_save_delegate(&self, save_delegate: Option<&impl IsA<SaveDelegate>>)
Sets the save-delegate
property.
The save delegate may be used to perform save operations on the content within the widget.
Document editors might use this to save the file to disk.
save_delegate
a SaveDelegate
or None
sourcefn set_tooltip(&self, tooltip: Option<&str>)
fn set_tooltip(&self, tooltip: Option<&str>)
fn unmark_busy(&self)
fn unmaximize(&self)
sourcefn connect_get_default_focus<F: Fn(&Self) -> Option<Widget> + 'static>(
&self,
f: F
) -> SignalHandlerId
fn connect_get_default_focus<F: Fn(&Self) -> Option<Widget> + 'static>( &self, f: F ) -> SignalHandlerId
sourcefn connect_presented<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_presented<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
The “presented” signal is emitted when the widget is brought to the front of a frame.
fn connect_busy_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_can_maximize_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId
fn connect_child_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_icon_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_icon_name_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId
fn connect_id_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_kind_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_modified_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId
fn connect_needs_attention_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId
fn connect_reorderable_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId
fn connect_save_delegate_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId
fn connect_title_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
sourcefn connect_tooltip_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_tooltip_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
v1_2
only.