Skip to main content

ToolPaletteExt

Trait ToolPaletteExt 

Source
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

Trait containing all ToolPalette methods.

§Implementors

ToolPalette

Provided Methods§

Source

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

Source

fn drag_item(&self, selection: &SelectionData) -> Option<Widget>

Get the dragged item from the selection. This could be a ToolItem or a ToolItemGroup.

§selection

a SelectionData

§Returns

the dragged item in selection

Source

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

Source

fn drop_item(&self, x: i32, y: i32) -> Option<ToolItem>

Gets the item at position (x, y). See drop_group().

§x

the x position

§y

the y position

§Returns

the ToolItem at position or None if there is no such item

Source

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

Source

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

true if group should be given extra space, false otherwise

Source

fn group_position(&self, group: &impl IsA<ToolItemGroup>) -> i32

Gets the position of group in self as index. See set_group_position().

§group

a ToolItemGroup

§Returns

the index of group or -1 if group is not a child of self

Source

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

Source

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.

Source

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

Source

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

Source

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

Source

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

Source

fn set_icon_size(&self, icon_size: IconSize)

Sets the size of icons in the tool palette.

§icon_size

the IconSize that icons in the tool palette shall have

Source

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

Source

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.

Source

fn unset_style(&self)

Unsets a toolbar style set with set_style(), so that user preferences will be used to determine the toolbar style.

Source

fn is_icon_size_set(&self) -> bool

Is true if the icon-size property has been set.

Source

fn set_icon_size_set(&self, icon_size_set: bool)

Is true if the icon-size property has been set.

Source

fn toolbar_style(&self) -> ToolbarStyle

The style of items in the tool palette.

Source

fn set_toolbar_style(&self, toolbar_style: ToolbarStyle)

The style of items in the tool palette.

Source

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

Source

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

Source

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".

Implementors§