[−][src]Trait gtk::ToolPaletteExt
Required methods
fn add_drag_dest<P: IsA<Widget>>(
&self,
widget: &P,
flags: DestDefaults,
targets: ToolPaletteDragTargets,
actions: DragAction
)
&self,
widget: &P,
flags: DestDefaults,
targets: ToolPaletteDragTargets,
actions: DragAction
)
Sets self
as drag source (see ToolPaletteExt::set_drag_source
)
and sets widget
as a drag destination for drags from self
.
See Widget::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 get_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
fn get_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 get_drop_item(&self, x: i32, y: i32) -> Option<ToolItem>
Gets the item at position (x, y).
See ToolPaletteExt::get_drop_group
.
x
the x position
y
the y position
Returns
the ToolItem
at position or None
if there is no such item
fn get_exclusive<P: IsA<ToolItemGroup>>(&self, group: &P) -> bool
Gets whether group
is exclusive or not.
See ToolPaletteExt::set_exclusive
.
group
a ToolItemGroup
which is a child of palette
Returns
true
if group
is exclusive
fn get_expand<P: IsA<ToolItemGroup>>(&self, group: &P) -> bool
Gets whether group should be given extra space.
See ToolPaletteExt::set_expand
.
group
a ToolItemGroup
which is a child of palette
Returns
true
if group should be given extra space, false
otherwise
fn get_group_position<P: IsA<ToolItemGroup>>(&self, group: &P) -> i32
Gets the position of group
in self
as index.
See ToolPaletteExt::set_group_position
.
group
a ToolItemGroup
Returns
the index of group or -1 if group
is not a child of self
fn get_icon_size(&self) -> IconSize
Gets the size of icons in the tool palette.
See ToolPaletteExt::set_icon_size
.
Returns
the IconSize
of icons in the tool palette
fn get_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)
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 Widget::drag_source_set
.
targets
the ToolPaletteDragTargets
which the widget should support
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)
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)
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)
Sets the size of icons in the tool palette.
icon_size
the IconSize
that icons in the tool
palette shall have
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)
Unsets the tool palette icon size set with ToolPaletteExt::set_icon_size
,
so that user preferences will be used to determine the icon size.
fn unset_style(&self)
Unsets a toolbar style set with ToolPaletteExt::set_style
,
so that user preferences will be used to determine the toolbar style.
fn get_property_icon_size_set(&self) -> bool
Is true
if the ToolPalette:icon-size
property has been set.
fn set_property_icon_size_set(&self, icon_size_set: bool)
Is true
if the ToolPalette:icon-size
property has been set.
fn get_property_toolbar_style(&self) -> ToolbarStyle
The style of items in the tool palette.
fn set_property_toolbar_style(&self, toolbar_style: ToolbarStyle)
The style of items in the tool palette.
fn connect_property_icon_size_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_icon_size_set_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
fn connect_property_toolbar_style_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
&self,
f: F
) -> SignalHandlerId
Implementors
impl<O: IsA<ToolPalette>> ToolPaletteExt for O
[src]
fn add_drag_dest<P: IsA<Widget>>(
&self,
widget: &P,
flags: DestDefaults,
targets: ToolPaletteDragTargets,
actions: DragAction
)
[src]
&self,
widget: &P,
flags: DestDefaults,
targets: ToolPaletteDragTargets,
actions: DragAction
)
fn get_drag_item(&self, selection: &SelectionData) -> Option<Widget>
[src]
fn get_drop_group(&self, x: i32, y: i32) -> Option<ToolItemGroup>
[src]
fn get_drop_item(&self, x: i32, y: i32) -> Option<ToolItem>
[src]
fn get_exclusive<P: IsA<ToolItemGroup>>(&self, group: &P) -> bool
[src]
fn get_expand<P: IsA<ToolItemGroup>>(&self, group: &P) -> bool
[src]
fn get_group_position<P: IsA<ToolItemGroup>>(&self, group: &P) -> i32
[src]
fn get_icon_size(&self) -> IconSize
[src]
fn get_style(&self) -> ToolbarStyle
[src]
fn set_drag_source(&self, targets: ToolPaletteDragTargets)
[src]
fn set_exclusive<P: IsA<ToolItemGroup>>(&self, group: &P, exclusive: bool)
[src]
fn set_expand<P: IsA<ToolItemGroup>>(&self, group: &P, expand: bool)
[src]
fn set_group_position<P: IsA<ToolItemGroup>>(&self, group: &P, position: i32)
[src]
fn set_icon_size(&self, icon_size: IconSize)
[src]
fn set_style(&self, style: ToolbarStyle)
[src]
fn unset_icon_size(&self)
[src]
fn unset_style(&self)
[src]
fn get_property_icon_size_set(&self) -> bool
[src]
fn set_property_icon_size_set(&self, icon_size_set: bool)
[src]
fn get_property_toolbar_style(&self) -> ToolbarStyle
[src]
fn set_property_toolbar_style(&self, toolbar_style: ToolbarStyle)
[src]
fn connect_property_icon_size_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_icon_size_set_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
fn connect_property_toolbar_style_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId