pub trait ToolPaletteExt: IsA<ToolPalette> + 'static {
Show 24 methods
// Provided methods
fn add_drag_dest(
&self,
widget: &impl IsA<Widget>,
flags: DestDefaults,
targets: ToolPaletteDragTargets,
actions: DragAction,
) { ... }
fn drag_item(&self, selection: &SelectionData) -> Option<Widget> { ... }
fn drop_group(&self, x: i32, y: i32) -> Option<ToolItemGroup> { ... }
fn drop_item(&self, x: i32, y: i32) -> Option<ToolItem> { ... }
fn is_exclusive(&self, group: &impl IsA<ToolItemGroup>) -> bool { ... }
fn expands(&self, group: &impl IsA<ToolItemGroup>) -> bool { ... }
fn group_position(&self, group: &impl IsA<ToolItemGroup>) -> i32 { ... }
fn icon_size(&self) -> IconSize { ... }
fn style(&self) -> ToolbarStyle { ... }
fn set_drag_source(&self, targets: ToolPaletteDragTargets) { ... }
fn set_exclusive(&self, group: &impl IsA<ToolItemGroup>, exclusive: bool) { ... }
fn set_expand(&self, group: &impl IsA<ToolItemGroup>, expand: bool) { ... }
fn set_group_position(&self, group: &impl IsA<ToolItemGroup>, position: i32) { ... }
fn set_icon_size(&self, icon_size: IconSize) { ... }
fn set_style(&self, style: ToolbarStyle) { ... }
fn unset_icon_size(&self) { ... }
fn unset_style(&self) { ... }
fn is_icon_size_set(&self) -> bool { ... }
fn set_icon_size_set(&self, icon_size_set: bool) { ... }
fn toolbar_style(&self) -> ToolbarStyle { ... }
fn set_toolbar_style(&self, toolbar_style: ToolbarStyle) { ... }
fn connect_icon_size_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_icon_size_set_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_toolbar_style_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}Expand description
Provided Methods§
Sourcefn add_drag_dest(
&self,
widget: &impl IsA<Widget>,
flags: DestDefaults,
targets: ToolPaletteDragTargets,
actions: DragAction,
)
fn add_drag_dest( &self, widget: &impl IsA<Widget>, flags: DestDefaults, targets: ToolPaletteDragTargets, actions: DragAction, )
Sets self as drag source (see set_drag_source())
and sets widget as a drag destination for drags from self.
See WidgetExtManual::drag_dest_set().
§widget
a Widget which should be a drag destination for self
§flags
the flags that specify what actions GTK+ should take for drops on that widget
§targets
the ToolPaletteDragTargets which the widget
should support
§actions
the GdkDragActions which the widget should suppport
Sourcefn drag_item(&self, selection: &SelectionData) -> Option<Widget>
fn drag_item(&self, selection: &SelectionData) -> Option<Widget>
Get the dragged item from the selection.
This could be a ToolItem or a ToolItemGroup.
§selection
§Returns
the dragged item in selection
Sourcefn drop_group(&self, x: i32, y: i32) -> Option<ToolItemGroup>
fn drop_group(&self, x: i32, y: i32) -> Option<ToolItemGroup>
Gets the group at position (x, y).
§x
the x position
§y
the y position
§Returns
the ToolItemGroup at position
or None if there is no such group
Sourcefn is_exclusive(&self, group: &impl IsA<ToolItemGroup>) -> bool
fn is_exclusive(&self, group: &impl IsA<ToolItemGroup>) -> bool
Gets whether group is exclusive or not.
See set_exclusive().
§group
a ToolItemGroup which is a child of palette
§Returns
true if group is exclusive
Sourcefn expands(&self, group: &impl IsA<ToolItemGroup>) -> bool
fn expands(&self, group: &impl IsA<ToolItemGroup>) -> bool
Gets whether group should be given extra space.
See set_expand().
§group
a ToolItemGroup which is a child of palette
§Returns
Sourcefn group_position(&self, group: &impl IsA<ToolItemGroup>) -> i32
fn group_position(&self, group: &impl IsA<ToolItemGroup>) -> i32
Gets the position of group in self as index.
See set_group_position().
§group
§Returns
the index of group or -1 if group is not a child of self
Sourcefn icon_size(&self) -> IconSize
fn icon_size(&self) -> IconSize
Gets the size of icons in the tool palette.
See set_icon_size().
§Returns
the IconSize of icons in the tool palette
Sourcefn style(&self) -> ToolbarStyle
fn style(&self) -> ToolbarStyle
Gets the style (icons, text or both) of items in the tool palette.
§Returns
the ToolbarStyle of items in the tool palette.
Sourcefn set_drag_source(&self, targets: ToolPaletteDragTargets)
fn set_drag_source(&self, targets: ToolPaletteDragTargets)
Sets the tool palette as a drag source.
Enables all groups and items in the tool palette as drag sources
on button 1 and button 3 press with copy and move actions.
See WidgetExtManual::drag_source_set().
§targets
the ToolPaletteDragTargets
which the widget should support
Sourcefn set_exclusive(&self, group: &impl IsA<ToolItemGroup>, exclusive: bool)
fn set_exclusive(&self, group: &impl IsA<ToolItemGroup>, exclusive: bool)
Sets whether the group should be exclusive or not. If an exclusive group is expanded all other groups are collapsed.
§group
a ToolItemGroup which is a child of palette
§exclusive
whether the group should be exclusive or not
Sourcefn set_expand(&self, group: &impl IsA<ToolItemGroup>, expand: bool)
fn set_expand(&self, group: &impl IsA<ToolItemGroup>, expand: bool)
Sets whether the group should be given extra space.
§group
a ToolItemGroup which is a child of palette
§expand
whether the group should be given extra space
Sourcefn set_group_position(&self, group: &impl IsA<ToolItemGroup>, position: i32)
fn set_group_position(&self, group: &impl IsA<ToolItemGroup>, position: i32)
Sets the position of the group as an index of the tool palette. If position is 0 the group will become the first child, if position is -1 it will become the last child.
§group
a ToolItemGroup which is a child of palette
§position
a new index for group
Sourcefn set_icon_size(&self, icon_size: IconSize)
fn set_icon_size(&self, icon_size: IconSize)
Sourcefn set_style(&self, style: ToolbarStyle)
fn set_style(&self, style: ToolbarStyle)
Sets the style (text, icons or both) of items in the tool palette.
§style
the ToolbarStyle that items in the tool palette shall have
Sourcefn unset_icon_size(&self)
fn unset_icon_size(&self)
Unsets the tool palette icon size set with set_icon_size(),
so that user preferences will be used to determine the icon size.
Sourcefn unset_style(&self)
fn unset_style(&self)
Unsets a toolbar style set with set_style(),
so that user preferences will be used to determine the toolbar style.
Sourcefn is_icon_size_set(&self) -> bool
fn is_icon_size_set(&self) -> bool
Sourcefn set_icon_size_set(&self, icon_size_set: bool)
fn set_icon_size_set(&self, icon_size_set: bool)
Sourcefn toolbar_style(&self) -> ToolbarStyle
fn toolbar_style(&self) -> ToolbarStyle
The style of items in the tool palette.
Sourcefn set_toolbar_style(&self, toolbar_style: ToolbarStyle)
fn set_toolbar_style(&self, toolbar_style: ToolbarStyle)
The style of items in the tool palette.
fn connect_icon_size_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_icon_size_set_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_toolbar_style_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".