Trait gtk::prelude::ToolPaletteExt[][src]

pub trait ToolPaletteExt: 'static {
Show methods fn add_drag_dest<P: IsA<Widget>>(
        &self,
        widget: &P,
        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<P: IsA<ToolItemGroup>>(&self, group: &P) -> bool;
fn expands<P: IsA<ToolItemGroup>>(&self, group: &P) -> bool;
fn group_position<P: IsA<ToolItemGroup>>(&self, group: &P) -> i32;
fn icon_size(&self) -> IconSize;
fn style(&self) -> ToolbarStyle;
fn set_drag_source(&self, targets: ToolPaletteDragTargets);
fn set_exclusive<P: IsA<ToolItemGroup>>(&self, group: &P, exclusive: bool);
fn set_expand<P: IsA<ToolItemGroup>>(&self, group: &P, expand: bool);
fn set_group_position<P: IsA<ToolItemGroup>>(
        &self,
        group: &P,
        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

Required methods

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

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

selection

a SelectionData

Returns

the dragged item in selection

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

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

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

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

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

Gets the size of icons in the tool palette. See set_icon_size().

Returns

the IconSize of icons in the tool palette

Gets the style (icons, text or both) of items in the tool palette.

Returns

the ToolbarStyle of items in the tool palette.

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

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

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

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

Sets the size of icons in the tool palette.

icon_size

the IconSize that icons in the tool palette shall have

Sets the style (text, icons or both) of items in the tool palette.

style

the ToolbarStyle that items in the tool palette shall have

Unsets the tool palette icon size set with set_icon_size(), so that user preferences will be used to determine the icon size.

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

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

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

The style of items in the tool palette.

The style of items in the tool palette.

Implementors