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
Required methods
fn add_drag_dest<P: IsA<Widget>>(
&self,
widget: &P,
flags: DestDefaults,
targets: ToolPaletteDragTargets,
actions: DragAction
)
fn add_drag_dest<P: IsA<Widget>>(
&self,
widget: &P,
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
fn 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
fn 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
fn is_exclusive<P: IsA<ToolItemGroup>>(&self, group: &P) -> bool
fn is_exclusive<P: IsA<ToolItemGroup>>(&self, group: &P) -> 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
Gets whether group should be given extra space.
See set_expand()
.
group
a ToolItemGroup
which is a child of palette
Returns
fn group_position<P: IsA<ToolItemGroup>>(&self, group: &P) -> i32
fn group_position<P: IsA<ToolItemGroup>>(&self, group: &P) -> 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
Gets the size of icons in the tool palette.
See set_icon_size()
.
Returns
the IconSize
of icons in the tool palette
fn 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.
fn 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
fn set_exclusive<P: IsA<ToolItemGroup>>(&self, group: &P, exclusive: bool)
fn set_exclusive<P: IsA<ToolItemGroup>>(&self, group: &P, 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
fn set_expand<P: IsA<ToolItemGroup>>(&self, group: &P, expand: bool)
fn set_expand<P: IsA<ToolItemGroup>>(&self, group: &P, 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
fn set_group_position<P: IsA<ToolItemGroup>>(&self, group: &P, position: i32)
fn set_group_position<P: IsA<ToolItemGroup>>(&self, group: &P, 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
fn set_icon_size(&self, icon_size: IconSize)
fn set_icon_size(&self, icon_size: IconSize)
fn 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
fn 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.
fn 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.
fn is_icon_size_set(&self) -> bool
fn is_icon_size_set(&self) -> bool
Is true
if the property::ToolPalette::icon-size
property has been set.
fn set_icon_size_set(&self, icon_size_set: bool)
fn set_icon_size_set(&self, icon_size_set: bool)
Is true
if the property::ToolPalette::icon-size
property has been set.
fn toolbar_style(&self) -> ToolbarStyle
fn toolbar_style(&self) -> ToolbarStyle
The style of items in the tool palette.
fn 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