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

Contents

- Detail
- Class Hierarchy
- Types
- Constructors
- Methods
- Attributes

Description

The base class of widgets that can be added to `Toolbar`

- Module available since Gtk+ version 2.4

Synopsis

- data ToolItem
- class BinClass o => ToolItemClass o
- castToToolItem :: GObjectClass obj => obj -> ToolItem
- gTypeToolItem :: GType
- toToolItem :: ToolItemClass o => o -> ToolItem
- toolItemNew :: IO ToolItem
- toolItemSetHomogeneous :: ToolItemClass self => self -> Bool -> IO ()
- toolItemGetHomogeneous :: ToolItemClass self => self -> IO Bool
- toolItemSetExpand :: ToolItemClass self => self -> Bool -> IO ()
- toolItemGetExpand :: ToolItemClass self => self -> IO Bool
- toolItemSetUseDragWindow :: ToolItemClass self => self -> Bool -> IO ()
- toolItemGetUseDragWindow :: ToolItemClass self => self -> IO Bool
- toolItemSetVisibleHorizontal :: ToolItemClass self => self -> Bool -> IO ()
- toolItemGetVisibleHorizontal :: ToolItemClass self => self -> IO Bool
- toolItemSetVisibleVertical :: ToolItemClass self => self -> Bool -> IO ()
- toolItemGetVisibleVertical :: ToolItemClass self => self -> IO Bool
- toolItemSetIsImportant :: ToolItemClass self => self -> Bool -> IO ()
- toolItemGetIsImportant :: ToolItemClass self => self -> IO Bool
- data IconSize
- toolItemGetIconSize :: ToolItemClass self => self -> IO IconSize
- data Orientation
  - = OrientationHorizontal
  - | OrientationVertical
- toolItemGetOrientation :: ToolItemClass self => self -> IO Orientation
- data ToolbarStyle
  - = ToolbarIcons
  - | ToolbarText
  - | ToolbarBoth
  - | ToolbarBothHoriz
- toolItemGetToolbarStyle :: ToolItemClass self => self -> IO ToolbarStyle
- data ReliefStyle
  - = ReliefNormal
  - | ReliefHalf
  - | ReliefNone
- toolItemGetReliefStyle :: ToolItemClass self => self -> IO ReliefStyle
- toolItemRetrieveProxyMenuItem :: ToolItemClass self => self -> IO (Maybe Widget)
- toolItemGetProxyMenuItem :: (ToolItemClass self, GlibString string) => self -> string -> IO (Maybe Widget)
- toolItemSetProxyMenuItem :: (ToolItemClass self, MenuItemClass menuItem, GlibString string) => self -> string -> menuItem -> IO ()
- toolItemGetEllipsizeMode :: ToolItemClass item => item -> IO EllipsizeMode
- toolItemGetTextAlignment :: ToolItemClass item => item -> IO Double
- toolItemGetTextOrientation :: ToolItemClass item => item -> IO Orientation
- toolItemGetTextSizeGroup :: ToolItemClass item => item -> IO SizeGroup
- toolItemVisibleHorizontal :: ToolItemClass self => Attr self Bool
- toolItemVisibleVertical :: ToolItemClass self => Attr self Bool
- toolItemIsImportant :: ToolItemClass self => Attr self Bool
- toolItemExpand :: ToolItemClass self => Attr self Bool
- toolItemHomogeneous :: ToolItemClass self => Attr self Bool
- toolItemUseDragWindow :: ToolItemClass self => Attr self Bool

# Detail

`ToolItem`s are widgets that can appear on a toolbar. To create a toolbar item that contain something else than a button, use `toolItemNew`. Use `containerAdd` to add a child widget to the tool item.

For toolbar items that contain buttons, see the `ToolButton`, `ToggleToolButton` and `RadioToolButton` classes.

# Class Hierarchy

    | GObject
    | +----Object
    | +----Widget
    | +----Container
    | +----Bin
    | +----ToolItem
    | +----ToolButton
    | +----SeparatorToolItem

# Types

data ToolItem Source #

#### Instances

Instances details

Eq ToolItem Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods (==) :: ToolItem -> ToolItem -> Bool Source # (/=) :: ToolItem -> ToolItem -> Bool Source #
Ord ToolItem Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods compare :: ToolItem -> ToolItem -> Ordering Source # (<) :: ToolItem -> ToolItem -> Bool Source # (<=) :: ToolItem -> ToolItem -> Bool Source # (>) :: ToolItem -> ToolItem -> Bool Source # (>=) :: ToolItem -> ToolItem -> Bool Source # max :: ToolItem -> ToolItem -> ToolItem Source # min :: ToolItem -> ToolItem -> ToolItem Source #
GObjectClass ToolItem Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods toGObject :: ToolItem -> GObject Source # unsafeCastGObject :: GObject -> ToolItem Source #
BinClass ToolItem Source # |
Instance details Defined in Graphics.UI.Gtk.Types
ContainerClass ToolItem Source # |
Instance details Defined in Graphics.UI.Gtk.Types
ToolItemClass ToolItem Source # |
Instance details Defined in Graphics.UI.Gtk.Types
WidgetClass ToolItem Source # |
Instance details Defined in Graphics.UI.Gtk.Types

class BinClass o => ToolItemClass o Source #

#### Instances

Instances details

ToolItemClass MenuToolButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types
ToolItemClass RadioToolButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types
ToolItemClass SeparatorToolItem Source # |
Instance details Defined in Graphics.UI.Gtk.Types
ToolItemClass ToggleToolButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types
ToolItemClass ToolButton Source # |
Instance details Defined in Graphics.UI.Gtk.Types
ToolItemClass ToolItem Source # |
Instance details Defined in Graphics.UI.Gtk.Types

castToToolItem :: GObjectClass obj => obj -> ToolItem Source #

gTypeToolItem :: GType Source #

toToolItem :: ToolItemClass o => o -> ToolItem Source #

# Constructors

toolItemNew :: IO ToolItem Source #

Creates a new `ToolItem`

# Methods

toolItemSetHomogeneous Source #

Arguments

:: ToolItemClass self |
=> self |
-> Bool | `homogeneous` - whether `toolItem` is the same size as other homogeneous items
-> IO () |

Sets whether the tool item is to be allocated the same size as other homogeneous items. The effect is that all homogeneous items will have the same width as the widest of the items.

toolItemGetHomogeneous :: ToolItemClass self => self -> IO Bool Source #

Returns whether the tool item is the same size as other homogeneous items. See `toolItemSetHomogeneous`.

toolItemSetExpand :: ToolItemClass self => self -> Bool -> IO () Source #

Sets whether the tool item is allocated extra space when there is more room on the toolbar then needed for the items. The effect is that the item gets bigger when the toolbar gets bigger and smaller when the toolbar gets smaller.

toolItemGetExpand :: ToolItemClass self => self -> IO Bool Source #

Returns whether the tool item is allocated extra space. See `toolItemSetExpand`.

toolItemSetUseDragWindow :: ToolItemClass self => self -> Bool -> IO () Source #

Sets whether toolitem has a drag window. When `True` the tool item can be used as a drag source through `dragSourceSet`. When the tool item has a drag window it will intercept all events, even those that would otherwise be sent to a child widget.

toolItemGetUseDragWindow :: ToolItemClass self => self -> IO Bool Source #

Returns whether the tool item has a drag window. See `toolItemSetUseDragWindow`.

toolItemSetVisibleHorizontal :: ToolItemClass self => self -> Bool -> IO () Source #

Sets whether the tool item is visible when the toolbar is docked horizontally.

toolItemGetVisibleHorizontal :: ToolItemClass self => self -> IO Bool Source #

Returns whether the tool item is visible on toolbars that are docked horizontally.

toolItemSetVisibleVertical :: ToolItemClass self => self -> Bool -> IO () Source #

Sets whether the tool item is visible when the toolbar is docked vertically. Some tool items, such as text entries, are too wide to be useful on a vertically docked toolbar. If `False` the tool item will not appear on toolbars that are docked vertically.

toolItemGetVisibleVertical :: ToolItemClass self => self -> IO Bool Source #

Returns whether the tool item is visible when the toolbar is docked vertically. See `toolItemSetVisibleVertical`.

toolItemSetIsImportant :: ToolItemClass self => self -> Bool -> IO () Source #

Sets whether the tool item should be considered important. The ToolButton class uses this property to determine whether to show or hide its label when the toolbar style is `ToolbarBothHoriz`. The result is that only tool buttons with the "is important" property set have labels, an effect known as "priority text".

toolItemGetIsImportant :: ToolItemClass self => self -> IO Bool Source #

Returns whether the tool item is considered important. See `toolItemSetIsImportant`

data IconSize Source #

The size of an icon in pixels.

- This enumeration contains one case that is not exported and which is used when new sizes are registered using `iconSizeRegister`.
- Applying `show` to this type will reveal the name of the size that is registered with Gtk+.

#### Instances

Instances details

Enum IconSize Source # |

Instance details

Defined in Graphics.UI.Gtk.General.Structs

Methods

succ :: IconSize -> IconSize Source #

pred :: IconSize -> IconSize Source #

toEnum :: Int -> IconSize Source #

fromEnum :: IconSize -> Int Source #

enumFrom :: IconSize -> [IconSize] Source #

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

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

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

Show IconSize Source # |
Instance details Defined in Graphics.UI.Gtk.General.IconFactory Methods showsPrec :: Int -> IconSize -> ShowS Source # show :: IconSize -> String Source # showList :: [IconSize] -> ShowS Source #
Eq IconSize Source # |
Instance details Defined in Graphics.UI.Gtk.General.Structs Methods (==) :: IconSize -> IconSize -> Bool Source # (/=) :: IconSize -> IconSize -> Bool Source #

toolItemGetIconSize :: ToolItemClass self => self -> IO IconSize Source #

Returns the icon size used for the tool item.

data Orientation Source #

Orientation is good

Constructors

OrientationHorizontal |
OrientationVertical |

#### Instances

Instances details

Enum Orientation Source # |

Instance details

Defined in Graphics.UI.Gtk.General.Enums

Methods

succ :: Orientation -> Orientation Source #

pred :: Orientation -> Orientation Source #

toEnum :: Int -> Orientation Source #

fromEnum :: Orientation -> Int Source #

enumFrom :: Orientation -> [Orientation] Source #

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

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

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

Show Orientation Source # |
Instance details Defined in Graphics.UI.Gtk.General.Enums Methods showsPrec :: Int -> Orientation -> ShowS Source # show :: Orientation -> String Source # showList :: [Orientation] -> ShowS Source #
Eq Orientation Source # |
Instance details Defined in Graphics.UI.Gtk.General.Enums Methods (==) :: Orientation -> Orientation -> Bool Source # (/=) :: Orientation -> Orientation -> Bool Source #

toolItemGetOrientation :: ToolItemClass self => self -> IO Orientation Source #

Returns the orientation used for the tool item.

data ToolbarStyle Source #

Where to place the toolbar?

Constructors

ToolbarIcons |
ToolbarText |
ToolbarBoth |
ToolbarBothHoriz |

#### Instances

Instances details

Enum ToolbarStyle Source # |

Instance details

Defined in Graphics.UI.Gtk.General.Enums

Methods

succ :: ToolbarStyle -> ToolbarStyle Source #

pred :: ToolbarStyle -> ToolbarStyle Source #

toEnum :: Int -> ToolbarStyle Source #

fromEnum :: ToolbarStyle -> Int Source #

enumFrom :: ToolbarStyle -> [ToolbarStyle] Source #

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

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

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

Show ToolbarStyle Source # |
Instance details Defined in Graphics.UI.Gtk.General.Enums Methods showsPrec :: Int -> ToolbarStyle -> ShowS Source # show :: ToolbarStyle -> String Source # showList :: [ToolbarStyle] -> ShowS Source #
Eq ToolbarStyle Source # |
Instance details Defined in Graphics.UI.Gtk.General.Enums Methods (==) :: ToolbarStyle -> ToolbarStyle -> Bool Source # (/=) :: ToolbarStyle -> ToolbarStyle -> Bool Source #

toolItemGetToolbarStyle :: ToolItemClass self => self -> IO ToolbarStyle Source #

Returns the toolbar style used for the tool item.

Possibilities are: [`ToolbarBoth`] meaning the tool item should show both an icon and a label, stacked vertically [`ToolbarIcons`] meaning the toolbar shows only icons [`ToolbarText`] meaning the tool item should only show text [`ToolbarBothHoriz`] meaning the tool item should show both an icon and a label, arranged horizontally

data ReliefStyle Source #

I don't have a clue.

Constructors

ReliefNormal |
ReliefHalf |
ReliefNone |

#### Instances

Instances details

Enum ReliefStyle Source # |

Instance details

Defined in Graphics.UI.Gtk.General.Enums

Methods

succ :: ReliefStyle -> ReliefStyle Source #

pred :: ReliefStyle -> ReliefStyle Source #

toEnum :: Int -> ReliefStyle Source #

fromEnum :: ReliefStyle -> Int Source #

enumFrom :: ReliefStyle -> [ReliefStyle] Source #

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

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

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

Show ReliefStyle Source # |
Instance details Defined in Graphics.UI.Gtk.General.Enums Methods showsPrec :: Int -> ReliefStyle -> ShowS Source # show :: ReliefStyle -> String Source # showList :: [ReliefStyle] -> ShowS Source #
Eq ReliefStyle Source # |
Instance details Defined in Graphics.UI.Gtk.General.Enums Methods (==) :: ReliefStyle -> ReliefStyle -> Bool Source # (/=) :: ReliefStyle -> ReliefStyle -> Bool Source #

toolItemGetReliefStyle :: ToolItemClass self => self -> IO ReliefStyle Source #

Returns the relief style of the tool item. See `buttonSetReliefStyle`.

toolItemRetrieveProxyMenuItem :: ToolItemClass self => self -> IO (Maybe Widget) Source #

Returns the `MenuItem` that was last set by `toolItemSetProxyMenuItem`, ie. the `MenuItem` that is going to appear in the overflow menu.

toolItemGetProxyMenuItem Source #

Arguments

:: (ToolItemClass self, GlibString string) |
=> self |
-> string | `menuItemId` - a string used to identify the menu item
-> IO (Maybe Widget) | returns The `MenuItem` passed to `toolItemSetProxyMenuItem`, if the `menuItemId`s match.

If `menuItemId` matches the string passed to `toolItemSetProxyMenuItem` return the corresponding `MenuItem`.

toolItemSetProxyMenuItem Source #

Arguments

:: (ToolItemClass self, MenuItemClass menuItem, GlibString string) |
=> self |
-> string | `menuItemId` - a string used to identify `menuItem`
-> menuItem | `menuItem` - a `MenuItem` to be used in the overflow menu
-> IO () |

Sets the `MenuItem` used in the toolbar overflow menu. The `menuItemId` is used to identify the caller of this function and should also be used with `toolItemGetProxyMenuItem`.

toolItemGetEllipsizeMode Source #

Arguments

:: ToolItemClass item |
=> item |
-> IO EllipsizeMode | returns a PangoEllipsizeMode indicating how text in `toolItem` should be ellipsized.

Returns the ellipsize mode used for `toolItem`. Custom subclasses of `ToolItem` should call this function to find out how text should be ellipsized.

- Available since Gtk+ version 2.20

toolItemGetTextAlignment Source #

Arguments

:: ToolItemClass item |
=> item |
-> IO Double | returns a gfloat indicating the horizontal text alignment used for `toolItem`

Returns the text alignment used for `toolItem`. Custom subclasses of `ToolItem` should call this function to find out how text should be aligned.

toolItemGetTextOrientation Source #

Arguments

:: ToolItemClass item |
=> item |
-> IO Orientation | returns a `Orientation` indicating the orientation used for `toolItem`

Returns the text orientation used for `toolItem`. Custom subclasses of `ToolItem` should call this function to find out how text should be orientated.

toolItemGetTextSizeGroup :: ToolItemClass item => item -> IO SizeGroup Source #

Returns the size group used for labels in `toolItem`. Custom subclasses of `ToolItem` should call this function and use the size group for labels.

# Attributes

toolItemVisibleHorizontal :: ToolItemClass self => Attr self Bool Source #

Whether the toolbar item is visible when the toolbar is in a horizontal orientation.

Default value: `True`

toolItemVisibleVertical :: ToolItemClass self => Attr self Bool Source #

Whether the toolbar item is visible when the toolbar is in a vertical orientation.

Default value: `True`

toolItemIsImportant :: ToolItemClass self => Attr self Bool Source #

Whether the toolbar item is considered important. When `True`, toolbar buttons show text in `ToolbarBothHoriz` mode.

Default value: `False`

toolItemExpand :: ToolItemClass self => Attr self Bool Source #

'expand' property. See `toolItemGetExpand` and `toolItemSetExpand`

toolItemHomogeneous :: ToolItemClass self => Attr self Bool Source #

'homogeneous' property. See `toolItemGetHomogeneous` and `toolItemSetHomogeneous`

toolItemUseDragWindow :: ToolItemClass self => Attr self Bool Source #

'useDragWindow' property. See `toolItemGetUseDragWindow` and `toolItemSetUseDragWindow`