{-# LINE 2 "./Graphics/UI/Gtk/MenuComboToolbar/ToolPalette.chs" #-}-- -*-haskell-*--- GIMP Toolkit (GTK) Widget ToolPalette---- Author : Andy Stewart---- Created: 08 Sep 2010---- Copyright (C) 2010 Andy Stewart---- This library is free software; you can redistribute it and/or-- modify it under the terms of the GNU Lesser General Public-- License as published by the Free Software Foundation; either-- version 2.1 of the License, or (at your option) any later version.---- This library is distributed in the hope that it will be useful,-- but WITHOUT ANY WARRANTY; without even the implied warranty of-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU-- Lesser General Public License for more details.---- |-- Maintainer : gtk2hs-users@lists.sourceforge.net-- Stability : provisional-- Portability : portable (depends on GHC)---- 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--moduleGraphics.UI.Gtk.MenuComboToolbar.ToolPalette(-- * 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'-- @-- * TypesToolPalette,ToolPaletteClass,castToToolPalette,toToolPalette,-- * EnumsToolPaletteDragTargets(..),-- * ConstructorstoolPaletteNew,-- * MethodstoolPaletteUnsetIconSize,toolPaletteUnsetStyle,toolPaletteGetHAdjustment,toolPaletteGetVAdjustment,-- * AttributestoolPaletteSetGroupPosition,toolPaletteGetGroupPosition,toolPaletteIconSize,toolPaletteIconSizeSet,toolPaletteToolbarStyle,-- * Child AttributestoolPaletteChildExclusive,toolPaletteChildExpand,-- * SignalstoolPaletteSetScrollAdjustments,)whereimportControl.Monad(liftM)importSystem.Glib.FFIimportSystem.Glib.AttributesimportSystem.Glib.PropertiesimportSystem.Glib.GListimportSystem.Glib.UTFStringimportGraphics.UI.Gtk.General.Structs(IconSize(..))importGraphics.UI.Gtk.General.Enums(ToolbarStyle(..))importGraphics.UI.Gtk.Abstract.Object(makeNewObject)importGraphics.UI.Gtk.Types{-# LINE 112 "./Graphics/UI/Gtk/MenuComboToolbar/ToolPalette.chs" #-}importGraphics.UI.Gtk.Signals{-# LINE 113 "./Graphics/UI/Gtk/MenuComboToolbar/ToolPalette.chs" #-}{-# LINE 115 "./Graphics/UI/Gtk/MenuComboToolbar/ToolPalette.chs" #-}-- | Flags used to specify the supported drag targets.dataToolPaletteDragTargets=ToolPaletteDragItems|ToolPaletteDragGroupsderiving(Eq)instanceEnumToolPaletteDragTargetswherefromEnumToolPaletteDragItems=1fromEnumToolPaletteDragGroups=2toEnum1=ToolPaletteDragItemstoEnum2=ToolPaletteDragGroupstoEnumunmatched=error("ToolPaletteDragTargets.toEnum: Cannot match "++showunmatched)succToolPaletteDragItems=ToolPaletteDragGroupssucc_=undefinedpredToolPaletteDragGroups=ToolPaletteDragItemspred_=undefinedenumFromToxy|fromEnumx==fromEnumy=[y]|otherwise=x:enumFromTo(succx)yenumFromx=enumFromToxToolPaletteDragGroupsenumFromThen__=error"Enum ToolPaletteDragTargets: enumFromThen not implemented"enumFromThenTo___=error"Enum ToolPaletteDragTargets: enumFromThenTo not implemented"{-# LINE 120 "./Graphics/UI/Gtk/MenuComboToolbar/ToolPalette.chs" #-}-- | Creates a new tool palette.---- * Available since Gtk+ version 2.20--toolPaletteNew::IOToolPalettetoolPaletteNew=makeNewObjectmkToolPalette$liftM(castPtr::PtrWidget->PtrToolPalette)$gtk_tool_palette_new{-# LINE 130 "./Graphics/UI/Gtk/MenuComboToolbar/ToolPalette.chs" #-}-- | 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--toolPaletteUnsetIconSize::ToolPaletteClassself=>self->IO()toolPaletteUnsetIconSizepalette=(\(ToolPalettearg1)->withForeignPtrarg1$\argPtr1->gtk_tool_palette_unset_icon_sizeargPtr1){-# LINE 139 "./Graphics/UI/Gtk/MenuComboToolbar/ToolPalette.chs" #-}(toToolPalettepalette)-- | 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--toolPaletteUnsetStyle::ToolPaletteClassself=>self->IO()toolPaletteUnsetStylepalette=(\(ToolPalettearg1)->withForeignPtrarg1$\argPtr1->gtk_tool_palette_unset_styleargPtr1){-# LINE 149 "./Graphics/UI/Gtk/MenuComboToolbar/ToolPalette.chs" #-}(toToolPalettepalette)-- | Gets the horizontal adjustment of the tool palette.---- * Available since Gtk+ version 2.20--toolPaletteGetHAdjustment::ToolPaletteClassself=>self->IOAdjustmenttoolPaletteGetHAdjustmentpalette=makeNewObjectmkAdjustment$(\(ToolPalettearg1)->withForeignPtrarg1$\argPtr1->gtk_tool_palette_get_hadjustmentargPtr1){-# LINE 160 "./Graphics/UI/Gtk/MenuComboToolbar/ToolPalette.chs" #-}(toToolPalettepalette)-- | Gets the vertical adjustment of the tool palette.---- * Available since Gtk+ version 2.20--toolPaletteGetVAdjustment::ToolPaletteClassself=>self->IOAdjustmenttoolPaletteGetVAdjustmentpalette=makeNewObjectmkAdjustment$(\(ToolPalettearg1)->withForeignPtrarg1$\argPtr1->gtk_tool_palette_get_vadjustmentargPtr1){-# LINE 171 "./Graphics/UI/Gtk/MenuComboToolbar/ToolPalette.chs" #-}(toToolPalettepalette)-- | Gets the position of group in palette as index. See 'toolPaletteSetGroupPosition'.---- * Available since Gtk+ version 2.20--toolPaletteGetGroupPosition::(ToolPaletteClasspalette,ToolItemGroupClassgroup)=>palette->group->IOInt-- ^ returns the index of group or -1 if group is not a child of palettetoolPaletteGetGroupPositionpalettegroup=liftMfromIntegral$(\(ToolPalettearg1)(ToolItemGrouparg2)->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gtk_tool_palette_get_group_positionargPtr1argPtr2){-# LINE 184 "./Graphics/UI/Gtk/MenuComboToolbar/ToolPalette.chs" #-}(toToolPalettepalette)(toToolItemGroupgroup)-- | 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--toolPaletteSetGroupPosition::(ToolPaletteClasspalette,ToolItemGroupClassgroup)=>palette->group->Int->IO()toolPaletteSetGroupPositionpalettegroupposition=(\(ToolPalettearg1)(ToolItemGrouparg2)arg3->withForeignPtrarg1$\argPtr1->withForeignPtrarg2$\argPtr2->gtk_tool_palette_set_group_positionargPtr1argPtr2arg3){-# LINE 199 "./Graphics/UI/Gtk/MenuComboToolbar/ToolPalette.chs" #-}(toToolPalettepalette)(toToolItemGroupgroup)(fromIntegralposition)-- | 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--toolPaletteIconSize::ToolPaletteClassself=>AttrselfIconSizetoolPaletteIconSize=newAttrFromEnumProperty"icon-size"gtk_icon_size_get_type{-# LINE 217 "./Graphics/UI/Gtk/MenuComboToolbar/ToolPalette.chs" #-}-- | Is 'True' if the 'iconSize' property has been set.---- Default value: 'False'---- * Available since Gtk+ version 2.20--toolPaletteIconSizeSet::ToolPaletteClassself=>AttrselfBooltoolPaletteIconSizeSet=newAttrFromBoolProperty"icon-size-set"-- | The style of items in the tool palette.---- Default value: 'ToolbarIcons'---- * Available since Gtk+ version 2.20--toolPaletteToolbarStyle::ToolPaletteClassself=>AttrselfToolbarStyletoolPaletteToolbarStyle=newAttrFromEnumProperty"toolbar-style"gtk_toolbar_style_get_type{-# LINE 238 "./Graphics/UI/Gtk/MenuComboToolbar/ToolPalette.chs" #-}-- | 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--toolPaletteChildExclusive::ToolPaletteClassself=>AttrselfBooltoolPaletteChildExclusive=newAttrFromBoolProperty"exclusive"-- | 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--toolPaletteChildExpand::ToolPaletteClassself=>AttrselfBooltoolPaletteChildExpand=newAttrFromBoolProperty"expand"-- | 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--toolPaletteSetScrollAdjustments::ToolPaletteClassself=>Signalself(Adjustment->Adjustment->IO())toolPaletteSetScrollAdjustments=Signal(connect_OBJECT_OBJECT__NONE"set-scroll-adjustments")foreignimportccallsafe"gtk_tool_palette_new"gtk_tool_palette_new::(IO(PtrWidget))foreignimportccallsafe"gtk_tool_palette_unset_icon_size"gtk_tool_palette_unset_icon_size::((PtrToolPalette)->(IO()))foreignimportccallsafe"gtk_tool_palette_unset_style"gtk_tool_palette_unset_style::((PtrToolPalette)->(IO()))foreignimportccallsafe"gtk_tool_palette_get_hadjustment"gtk_tool_palette_get_hadjustment::((PtrToolPalette)->(IO(PtrAdjustment)))foreignimportccallsafe"gtk_tool_palette_get_vadjustment"gtk_tool_palette_get_vadjustment::((PtrToolPalette)->(IO(PtrAdjustment)))foreignimportccallsafe"gtk_tool_palette_get_group_position"gtk_tool_palette_get_group_position::((PtrToolPalette)->((PtrToolItemGroup)->(IOCInt)))foreignimportccallsafe"gtk_tool_palette_set_group_position"gtk_tool_palette_set_group_position::((PtrToolPalette)->((PtrToolItemGroup)->(CInt->(IO()))))foreignimportccallunsafe"gtk_icon_size_get_type"gtk_icon_size_get_type::CUIntforeignimportccallunsafe"gtk_toolbar_style_get_type"gtk_toolbar_style_get_type::CUInt