gtk3-0.15.10: Binding to the Gtk+ 3 graphical user interface library

Maintainer | gtk2hs-users@lists.sourceforge.net
Stability | provisional
Portability | portable (depends on GHC)
Safe Haskell | None
Language | Haskell98

Graphics.UI.Gtk.MenuComboToolbar.ToolPalette

Contents

- Detail
- Class Hierarchy
- Types
- Enums
- Constructors
- Methods
- Attributes
- Child Attributes
- Signals

Description

A tool palette with categories

- Module available since Gtk+ version 2.20

TODO:

gtk_tool_palette_add_drag_dest gtk_tool_palette_get_drag_item gtk_tool_palette_get_drag_target_group gtk_tool_palette_get_drag_target_item gtk_tool_palette_get_drop_group gtk_tool_palette_get_drop_item

Synopsis

- data ToolPalette
- class ContainerClass o => ToolPaletteClass o
- castToToolPalette :: GObjectClass obj => obj -> ToolPalette
- toToolPalette :: ToolPaletteClass o => o -> ToolPalette
- data ToolPaletteDragTargets
  - = ToolPaletteDragItems
  - | ToolPaletteDragGroups
- toolPaletteNew :: IO ToolPalette
- toolPaletteUnsetIconSize :: ToolPaletteClass self => self -> IO ()
- toolPaletteUnsetStyle :: ToolPaletteClass self => self -> IO ()
- toolPaletteGetHAdjustment :: ToolPaletteClass self => self -> IO Adjustment
- toolPaletteGetVAdjustment :: ToolPaletteClass self => self -> IO Adjustment
- toolPaletteSetGroupPosition :: (ToolPaletteClass palette, ToolItemGroupClass group) => palette -> group -> Int -> IO ()
- toolPaletteGetGroupPosition :: (ToolPaletteClass palette, ToolItemGroupClass group) => palette -> group -> IO Int
- toolPaletteIconSize :: ToolPaletteClass self => Attr self IconSize
- toolPaletteIconSizeSet :: ToolPaletteClass self => Attr self Bool
- toolPaletteToolbarStyle :: ToolPaletteClass self => Attr self ToolbarStyle
- toolPaletteChildExclusive :: ToolPaletteClass self => Attr self Bool
- toolPaletteChildExpand :: ToolPaletteClass self => Attr self Bool
- toolPaletteSetScrollAdjustments :: ToolPaletteClass self => Signal self (Adjustment -> Adjustment -> IO ())

# Detail

A `ToolPalette` allows you to add `ToolItems` to a palette-like container with different categories and drag and drop support.

A `ToolPalette` is created with a call to `toolPaletteNew`.

`ToolItems` cannot be added directly to a `ToolPalette` - instead they are added to a `ToolItemGroup` which can than be added to a `ToolPalette`. To add a `ToolItemGroup` to a `ToolPalette`, use `containerAdd`.

The easiest way to use drag and drop with `ToolPalette` is to call `toolPaletteAddDragDest` with the desired drag source palette and the desired drag target widget. Then `toolPaletteGetDragItem` can be used to get the dragged item in the `dragDataReceived` signal handler of the drag target.

# Class Hierarchy

    | GObject
    | +----Object
    | +----Widget
    | +----Container
    | +----ToolPalette

# Types

data ToolPalette Source #

#### Instances

Instances details

Eq ToolPalette Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods (==) :: ToolPalette -> ToolPalette -> Bool Source # (/=) :: ToolPalette -> ToolPalette -> Bool Source #
Ord ToolPalette Source # |

Instance details

Defined in Graphics.UI.Gtk.Types

Methods

compare :: ToolPalette -> ToolPalette -> Ordering Source #

(<) :: ToolPalette -> ToolPalette -> Bool Source #

(<=) :: ToolPalette -> ToolPalette -> Bool Source #

(>) :: ToolPalette -> ToolPalette -> Bool Source #

(>=) :: ToolPalette -> ToolPalette -> Bool Source #

max :: ToolPalette -> ToolPalette -> ToolPalette Source #

min :: ToolPalette -> ToolPalette -> ToolPalette Source #

GObjectClass ToolPalette Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods toGObject :: ToolPalette -> GObject Source # unsafeCastGObject :: GObject -> ToolPalette Source #
ContainerClass ToolPalette Source # |
Instance details Defined in Graphics.UI.Gtk.Types
ToolPaletteClass ToolPalette Source # |
Instance details Defined in Graphics.UI.Gtk.Types
WidgetClass ToolPalette Source # |
Instance details Defined in Graphics.UI.Gtk.Types

class ContainerClass o => ToolPaletteClass o Source #

#### Instances

Instances details

ToolPaletteClass ToolPalette Source # |
Instance details Defined in Graphics.UI.Gtk.Types

castToToolPalette :: GObjectClass obj => obj -> ToolPalette Source #

toToolPalette :: ToolPaletteClass o => o -> ToolPalette Source #

# Enums

data ToolPaletteDragTargets Source #

Flags used to specify the supported drag targets.

Constructors

ToolPaletteDragItems |
ToolPaletteDragGroups |

#### Instances

Instances details

Enum ToolPaletteDragTargets Source #

Creates a new tool palette.

- Available since Gtk+ version 2.20

Instance details

Defined in Graphics.UI.Gtk.MenuComboToolbar.ToolPalette

Methods

succ :: ToolPaletteDragTargets -> ToolPaletteDragTargets Source #

pred :: ToolPaletteDragTargets -> ToolPaletteDragTargets Source #

toEnum :: Int -> ToolPaletteDragTargets Source #

fromEnum :: ToolPaletteDragTargets -> Int Source #

enumFrom :: ToolPaletteDragTargets -> [ToolPaletteDragTargets] Source #

enumFromThen :: ToolPaletteDragTargets -> ToolPaletteDragTargets -> [ToolPaletteDragTargets] Source #

enumFromTo :: ToolPaletteDragTargets -> ToolPaletteDragTargets -> [ToolPaletteDragTargets] Source #

enumFromThenTo :: ToolPaletteDragTargets -> ToolPaletteDragTargets -> ToolPaletteDragTargets -> [ToolPaletteDragTargets] Source #

Eq ToolPaletteDragTargets Source # |
Instance details Defined in Graphics.UI.Gtk.MenuComboToolbar.ToolPalette Methods (==) :: ToolPaletteDragTargets -> ToolPaletteDragTargets -> Bool Source # (/=) :: ToolPaletteDragTargets -> ToolPaletteDragTargets -> Bool Source #

# Constructors

toolPaletteNew :: IO ToolPalette Source #

# Methods

toolPaletteUnsetIconSize :: ToolPaletteClass self => self -> IO () Source #

Unsets the tool palette icon size set with `toolPaletteSetIconSize`, so that user preferences will be used to determine the icon size.

- Available since Gtk+ version 2.20

toolPaletteUnsetStyle :: ToolPaletteClass self => self -> IO () Source #

Unsets a toolbar style set with `toolPaletteSetStyle`, so that user preferences will be used to determine the toolbar style.

- Available since Gtk+ version 2.20

toolPaletteGetHAdjustment :: ToolPaletteClass self => self -> IO Adjustment Source #

Gets the horizontal adjustment of the tool palette.

- Available since Gtk+ version 2.20

toolPaletteGetVAdjustment :: ToolPaletteClass self => self -> IO Adjustment Source #

Gets the vertical adjustment of the tool palette.

- Available since Gtk+ version 2.20

# Attributes

toolPaletteSetGroupPosition :: (ToolPaletteClass palette, ToolItemGroupClass group) => palette -> group -> Int -> IO () Source #

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.

- Available since Gtk+ version 2.20

toolPaletteGetGroupPosition Source #

Arguments

:: (ToolPaletteClass palette, ToolItemGroupClass group) |
=> palette |
-> group |
-> IO Int | returns the index of group or -1 if group is not a child of palette

Gets the position of group in palette as index. See `toolPaletteSetGroupPosition`.

- Available since Gtk+ version 2.20

toolPaletteIconSize :: ToolPaletteClass self => Attr self IconSize Source #

The size of the icons in a tool palette is normally determined by the `toolbarIconSize` setting. When this property is set, it overrides the setting.

This should only be used for special-purpose tool palettes, normal application tool palettes should respect the user preferences for the size of icons.

Default value: `IconSizeSmallToolbar`

- Available since Gtk+ version 2.20

toolPaletteIconSizeSet :: ToolPaletteClass self => Attr self Bool Source #

Is `True` if the `iconSize` property has been set.

Default value: `False`

- Available since Gtk+ version 2.20

toolPaletteToolbarStyle :: ToolPaletteClass self => Attr self ToolbarStyle Source #

The style of items in the tool palette.

Default value: `ToolbarIcons`

- Available since Gtk+ version 2.20

# Child Attributes

toolPaletteChildExclusive :: ToolPaletteClass self => Attr self Bool Source #

Whether the item group should be the only one that is expanded at a given time.

Default value: `False`

- Available since Gtk+ version 2.20

toolPaletteChildExpand :: ToolPaletteClass self => Attr self Bool Source #

Whether the item group should receive extra space when the palette grows. at a given time.

Default value: `False`

- Available since Gtk+ version 2.20

# Signals

toolPaletteSetScrollAdjustments :: ToolPaletteClass self => Signal self (Adjustment -> Adjustment -> IO ()) Source #

Set the scroll adjustments for the viewport. Usually scrolled containers like `ScrolledWindow` will emit this signal to connect two instances of `Scrollbar` to the scroll directions of the `Toolpalette`.

- Available since Gtk+ version 2.20