| Gtk2Hs | Contents | Index

Graphics.UI.Gtk.TreeList.TreeViewColumn

Portability | portable (depends on GHC)
Stability | provisional
Maintainer | gtk2hs-users@lists.sourceforge.net

Contents

Detail
Class Hierarchy
Types
Constructors
Methods
Attributes
Signals

Description

A visible column in a `TreeView` widget

- This module and all other modules in Graphics.UI.Gtk.TreeList are deprecated. Please use the modules in Graphics.UI.Gtk.ModelView.

Synopsis

data TreeViewColumn
class ObjectClass o => TreeViewColumnClass o
castToTreeViewColumn :: GObjectClass obj => obj -> TreeViewColumn
toTreeViewColumn :: TreeViewColumnClass o => o -> TreeViewColumn
treeViewColumnNew :: IO TreeViewColumn
treeViewColumnNewWithAttributes :: CellRendererClass cr => String -> cr -> [(String, Int)] -> IO TreeViewColumn
treeViewColumnPackStart :: CellRendererClass cell => TreeViewColumn -> cell -> Bool -> IO ()
treeViewColumnPackEnd :: CellRendererClass cell => TreeViewColumn -> cell -> Bool -> IO ()
treeViewColumnClear :: TreeViewColumn -> IO ()
treeViewColumnGetCellRenderers :: TreeViewColumn -> IO [CellRenderer]
treeViewColumnAddAttribute :: CellRendererClass cellRenderer => TreeViewColumn -> cellRenderer -> String -> Int -> IO ()
treeViewColumnAddAttributes :: CellRendererClass cr => TreeViewColumn -> cr -> [(String, Int)] -> IO ()
treeViewColumnSetAttributes :: CellRendererClass cr => TreeViewColumn -> cr -> [(String, Int)] -> IO ()
treeViewColumnClearAttributes :: CellRendererClass cellRenderer => TreeViewColumn -> cellRenderer -> IO ()
treeViewColumnSetSpacing :: TreeViewColumn -> Int -> IO ()
treeViewColumnGetSpacing :: TreeViewColumn -> IO Int
treeViewColumnSetVisible :: TreeViewColumn -> Bool -> IO ()
treeViewColumnGetVisible :: TreeViewColumn -> IO Bool
treeViewColumnSetResizable :: TreeViewColumn -> Bool -> IO ()
treeViewColumnGetResizable :: TreeViewColumn -> IO Bool

data TreeViewColumnSizing

= TreeViewColumnGrowOnly
| TreeViewColumnAutosize
| TreeViewColumnFixed

treeViewColumnSetSizing :: TreeViewColumn -> TreeViewColumnSizing -> IO ()
treeViewColumnGetSizing :: TreeViewColumn -> IO TreeViewColumnSizing
treeViewColumnGetWidth :: TreeViewColumn -> IO Int
treeViewColumnSetFixedWidth :: TreeViewColumn -> Int -> IO ()
treeViewColumnGetFixedWidth :: TreeViewColumn -> IO Int
treeViewColumnSetMinWidth :: TreeViewColumn -> Int -> IO ()
treeViewColumnGetMinWidth :: TreeViewColumn -> IO Int
treeViewColumnSetMaxWidth :: TreeViewColumn -> Int -> IO ()
treeViewColumnGetMaxWidth :: TreeViewColumn -> IO Int
treeViewColumnClicked :: TreeViewColumn -> IO ()
treeViewColumnSetTitle :: TreeViewColumn -> String -> IO ()
treeViewColumnGetTitle :: TreeViewColumn -> IO (Maybe String)
treeViewColumnSetClickable :: TreeViewColumn -> Bool -> IO ()
treeViewColumnGetClickable :: TreeViewColumn -> IO Bool
treeViewColumnSetWidget :: WidgetClass widget => TreeViewColumn -> widget -> IO ()
treeViewColumnGetWidget :: TreeViewColumn -> IO Widget
treeViewColumnSetAlignment :: TreeViewColumn -> Float -> IO ()
treeViewColumnGetAlignment :: TreeViewColumn -> IO Float
treeViewColumnSetReorderable :: TreeViewColumn -> Bool -> IO ()
treeViewColumnGetReorderable :: TreeViewColumn -> IO Bool
treeViewColumnSetSortColumnId :: TreeViewColumn -> Int -> IO ()
treeViewColumnGetSortColumnId :: TreeViewColumn -> IO Int
treeViewColumnSetSortIndicator :: TreeViewColumn -> Bool -> IO ()
treeViewColumnGetSortIndicator :: TreeViewColumn -> IO Bool
treeViewColumnSetSortOrder :: TreeViewColumn -> SortType -> IO ()
treeViewColumnGetSortOrder :: TreeViewColumn -> IO SortType

data SortType

= SortAscending
| SortDescending

treeViewColumnVisible :: Attr TreeViewColumn Bool
treeViewColumnResizable :: Attr TreeViewColumn Bool
treeViewColumnWidth :: ReadAttr TreeViewColumn Int
treeViewColumnSpacing :: Attr TreeViewColumn Int
treeViewColumnSizing :: Attr TreeViewColumn TreeViewColumnSizing
treeViewColumnFixedWidth :: Attr TreeViewColumn Int
treeViewColumnMinWidth :: Attr TreeViewColumn Int
treeViewColumnMaxWidth :: Attr TreeViewColumn Int
treeViewColumnTitle :: ReadWriteAttr TreeViewColumn (Maybe String) String
treeViewColumnClickable :: Attr TreeViewColumn Bool
treeViewColumnWidget :: WidgetClass widget => ReadWriteAttr TreeViewColumn Widget widget
treeViewColumnAlignment :: Attr TreeViewColumn Float
treeViewColumnReorderable :: Attr TreeViewColumn Bool
treeViewColumnSortIndicator :: Attr TreeViewColumn Bool
treeViewColumnSortOrder :: Attr TreeViewColumn SortType
treeViewColumnSortColumnId :: Attr TreeViewColumn Int
onColClicked :: TreeViewColumnClass self => self -> IO () -> IO (ConnectId self)
afterColClicked :: TreeViewColumnClass self => self -> IO () -> IO (ConnectId self)

Detail
The `TreeViewColumn` object represents a visible column in a `TreeView` widget. It allows to set properties of the column header, and functions as a holding pen for the cell renderers which determine how the data in the column is displayed. Please refer to the tree widget conceptual overview for an overview of all the objects and data types related to the tree widget and how they work together.
Class Hierarchy

     |  GObject
     |   +----Object
     |         +----TreeViewColumn

Types
data TreeViewColumn

Instances

GObjectClass TreeViewColumn
CellLayoutClass TreeViewColumn
TreeViewColumnClass TreeViewColumn
ObjectClass TreeViewColumn

class ObjectClass o => TreeViewColumnClass o

Instances

TreeViewColumnClass TreeViewColumn

castToTreeViewColumn :: GObjectClass obj => obj -> TreeViewColumn
toTreeViewColumn :: TreeViewColumnClass o => o -> TreeViewColumn
Constructors
treeViewColumnNew :: IO TreeViewColumn
Generate a new TreeViewColumn widget.
treeViewColumnNewWithAttributes :: CellRendererClass cr => String -> cr -> [(String, Int)] -> IO TreeViewColumn
Returns a new TreeViewColumn with title `title`, cell renderer `cr`, and attributes `attribs`.
Methods
treeViewColumnPackStart :: CellRendererClass cell => TreeViewColumn -> cell -> Bool -> IO ()

Add a cell renderer at the beginning of a column.

- Excess space is divided equally among all renderers which have `expand` set to True.

treeViewColumnPackEnd :: CellRendererClass cell => TreeViewColumn -> cell -> Bool -> IO ()

Add a cell renderer at the end of a column.

- Excess space is divided equally among all renderers which have `expand` set to True.

treeViewColumnClear :: TreeViewColumn -> IO ()
Remove the associations of attributes to a store for all CellRenderers.
treeViewColumnGetCellRenderers :: TreeViewColumn -> IO [CellRenderer]
Retrieve all `CellRenderer`s that are contained in this column.
treeViewColumnAddAttribute :: CellRendererClass cellRenderer => TreeViewColumn -> cellRenderer -> String -> Int -> IO ()

Insert an attribute to change the behaviour of the column's cell renderer.

- The `CellRenderer` `cr` must already be in `TreeViewColumn`.

treeViewColumnAddAttributes :: CellRendererClass cr => TreeViewColumn -> cr -> [(String, Int)] -> IO ()
Insert attributes `attribs` to change the behaviour of column `tvc`'s cell renderer `cr`.
treeViewColumnSetAttributes :: CellRendererClass cr => TreeViewColumn -> cr -> [(String, Int)] -> IO ()
Set the attributes of the cell renderer `cr` in the tree column `tvc` be `attribs`. The attributes are given as a list of attribute/column pairs. All existing attributes are removed, and replaced with the new attributes.
treeViewColumnClearAttributes :: CellRendererClass cellRenderer => TreeViewColumn -> cellRenderer -> IO ()
Clears all existing attributes of the column `tvc`.
treeViewColumnSetSpacing :: TreeViewColumn -> Int -> IO ()
Set the number of pixels between two cell renderers.
treeViewColumnGetSpacing :: TreeViewColumn -> IO Int
Get the number of pixels between two cell renderers.
treeViewColumnSetVisible :: TreeViewColumn -> Bool -> IO ()
Set the visibility of a given column.
treeViewColumnGetVisible :: TreeViewColumn -> IO Bool
Get the visibility of a given column.
treeViewColumnSetResizable :: TreeViewColumn -> Bool -> IO ()
Set if a given column is resizable by the user.
treeViewColumnGetResizable :: TreeViewColumn -> IO Bool
Get if a given column is resizable by the user.
data TreeViewColumnSizing

Wether columns of a tree or list widget can be resized.
Constructors

TreeViewColumnGrowOnly |
TreeViewColumnAutosize |
TreeViewColumnFixed |

Instances

Enum TreeViewColumnSizing
Eq TreeViewColumnSizing
Show TreeViewColumnSizing

treeViewColumnSetSizing :: TreeViewColumn -> TreeViewColumnSizing -> IO ()
Set wether the column can be resized.
treeViewColumnGetSizing :: TreeViewColumn -> IO TreeViewColumnSizing
Return the resizing type of the column.
treeViewColumnGetWidth :: TreeViewColumn -> IO Int
Query the current width of the column.
treeViewColumnSetFixedWidth :: TreeViewColumn -> Int -> IO ()

Set the width of the column.

- This is meaningful only if the sizing type is `TreeViewColumnFixed`.

treeViewColumnGetFixedWidth :: TreeViewColumn -> IO Int

Gets the fixed width of the column.

- This is meaningful only if the sizing type is `TreeViewColumnFixed`.
- This value is only meaning may not be the actual width of the column on the screen, just what is requested.

treeViewColumnSetMinWidth :: TreeViewColumn -> Int -> IO ()
Set minimum width of the column.
treeViewColumnGetMinWidth :: TreeViewColumn -> IO Int
Get the minimum width of a column. Returns -1 if this width was not set.
treeViewColumnSetMaxWidth :: TreeViewColumn -> Int -> IO ()
Set maximum width of the column.
treeViewColumnGetMaxWidth :: TreeViewColumn -> IO Int
Get the maximum width of a column. Returns -1 if this width was not set.
treeViewColumnClicked :: TreeViewColumn -> IO ()
Emit the `clicked` signal on the column.
treeViewColumnSetTitle :: TreeViewColumn -> String -> IO ()
Set the widget's title if a custom widget has not been set.
treeViewColumnGetTitle :: TreeViewColumn -> IO (Maybe String)
Get the widget's title.
treeViewColumnSetClickable :: TreeViewColumn -> Bool -> IO ()
Set if the column should be sensitive to mouse clicks.
treeViewColumnGetClickable :: TreeViewColumn -> IO Bool
Returns True if the user can click on the header for the column.
treeViewColumnSetWidget :: WidgetClass widget => TreeViewColumn -> widget -> IO ()
Set the column's title to this widget.
treeViewColumnGetWidget :: TreeViewColumn -> IO Widget
Retrieve the widget responsible for showing the column title. In case only a text title was set this will be a `Alignment` widget with a `Label` inside.
treeViewColumnSetAlignment

:: TreeViewColumn |
-> Float | `xalign` - The alignment, which is between [0.0 and 1.0] inclusive.
-> IO () |
Sets the alignment of the title or custom widget inside the column header. The alignment determines its location inside the button -- 0.0 for left, 0.5 for center, 1.0 for right.

treeViewColumnGetAlignment :: TreeViewColumn -> IO Float
Returns the current x alignment of the tree column. This value can range between 0.0 and 1.0.
treeViewColumnSetReorderable :: TreeViewColumn -> Bool -> IO ()
Set if the column can be reordered by the end user dragging the header.
treeViewColumnGetReorderable :: TreeViewColumn -> IO Bool
Returns whether the column can be reordered by the user.
treeViewColumnSetSortColumnId :: TreeViewColumn -> Int -> IO ()

Set the column by which to sort.

- Sets the logical `columnId` that this column sorts on when this column is selected for sorting. The selected column's header will be clickable after this call. Logical refers to the column in the `TreeModel`.

treeViewColumnGetSortColumnId :: TreeViewColumn -> IO Int

Get the column by which to sort.

- Retrieves the logical `columnId` that the model sorts on when this column is selected for sorting.
- Returns -1 if this column can't be used for sorting.

treeViewColumnSetSortIndicator :: TreeViewColumn -> Bool -> IO ()
Set if a given column has sorting arrows in its heading.
treeViewColumnGetSortIndicator :: TreeViewColumn -> IO Bool
Query if a given column has sorting arrows in its heading.
treeViewColumnSetSortOrder :: TreeViewColumn -> SortType -> IO ()

Set if a given column is sorted in ascending or descending order.

- In order for sorting to work, it is necessary to either use automatic sorting via `treeViewColumnSetSortColumnId` or to use a user defined sorting on the elements in a `TreeModel`.

treeViewColumnGetSortOrder :: TreeViewColumn -> IO SortType
Query if a given column is sorted in ascending or descending order.
data SortType

Constructors

SortAscending |
SortDescending |

Instances

Enum SortType
Eq SortType
Show SortType

Attributes
treeViewColumnVisible :: Attr TreeViewColumn Bool
Whether to display the column. Default value: `True`
treeViewColumnResizable :: Attr TreeViewColumn Bool
Column is user-resizable. Default value: `False`
treeViewColumnWidth :: ReadAttr TreeViewColumn Int
Current width of the column. Allowed values: >= 0 Default value: 0
treeViewColumnSpacing :: Attr TreeViewColumn Int
Space which is inserted between cells. Allowed values: >= 0 Default value: 0
treeViewColumnSizing :: Attr TreeViewColumn TreeViewColumnSizing
Resize mode of the column. Default value: `TreeViewColumnGrowOnly`
treeViewColumnFixedWidth :: Attr TreeViewColumn Int
Current fixed width of the column. Allowed values: >= 1 Default value: 1
treeViewColumnMinWidth :: Attr TreeViewColumn Int
Minimum allowed width of the column. Allowed values: >= -1 Default value: -1
treeViewColumnMaxWidth :: Attr TreeViewColumn Int
Maximum allowed width of the column. Allowed values: >= -1 Default value: -1
treeViewColumnTitle :: ReadWriteAttr TreeViewColumn (Maybe String) String
Title to appear in column header. Default value: ""
treeViewColumnClickable :: Attr TreeViewColumn Bool
Whether the header can be clicked. Default value: `False`
treeViewColumnWidget :: WidgetClass widget => ReadWriteAttr TreeViewColumn Widget widget
Widget to put in column header button instead of column title.
treeViewColumnAlignment :: Attr TreeViewColumn Float
X Alignment of the column header text or widget. Allowed values: [0,1] Default value: 0
treeViewColumnReorderable :: Attr TreeViewColumn Bool
Whether the column can be reordered around the headers. Default value: `False`
treeViewColumnSortIndicator :: Attr TreeViewColumn Bool
Whether to show a sort indicator. Default value: `False`
treeViewColumnSortOrder :: Attr TreeViewColumn SortType
Sort direction the sort indicator should indicate. Default value: `SortAscending`
treeViewColumnSortColumnId :: Attr TreeViewColumn Int
'sortColumnId' property. See `treeViewColumnGetSortColumnId` and `treeViewColumnSetSortColumnId`
Signals
onColClicked :: TreeViewColumnClass self => self -> IO () -> IO (ConnectId self)
afterColClicked :: TreeViewColumnClass self => self -> IO () -> IO (ConnectId self)
Emitted when the header of this column has been clicked on.
Produced by Haddock version 2.4.2