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.ModelView.TreeViewColumn

Contents

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

Description

A visible column in a `TreeView` widget

Synopsis

- data TreeViewColumn
- class GObjectClass o => TreeViewColumnClass o
- castToTreeViewColumn :: GObjectClass obj => obj -> TreeViewColumn
- gTypeTreeViewColumn :: GType
- toTreeViewColumn :: TreeViewColumnClass o => o -> TreeViewColumn
- treeViewColumnNew :: IO TreeViewColumn
- treeViewColumnPackStart :: CellRendererClass cell => TreeViewColumn -> cell -> Bool -> IO ()
- treeViewColumnPackEnd :: CellRendererClass cell => TreeViewColumn -> cell -> Bool -> IO ()
- treeViewColumnClear :: TreeViewColumn -> 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 :: GlibString string => TreeViewColumn -> string -> IO ()
- treeViewColumnGetTitle :: GlibString string => TreeViewColumn -> IO (Maybe string)
- treeViewColumnSetClickable :: TreeViewColumn -> Bool -> IO ()
- treeViewColumnGetClickable :: TreeViewColumn -> IO Bool
- treeViewColumnSetWidget :: WidgetClass widget => TreeViewColumn -> Maybe widget -> IO ()
- treeViewColumnGetWidget :: TreeViewColumn -> IO (Maybe Widget)
- treeViewColumnSetAlignment :: TreeViewColumn -> Float -> IO ()
- treeViewColumnGetAlignment :: TreeViewColumn -> IO Float
- treeViewColumnSetReorderable :: TreeViewColumn -> Bool -> IO ()
- treeViewColumnGetReorderable :: TreeViewColumn -> IO Bool
- treeViewColumnSetSortColumnId :: TreeViewColumn -> SortColumnId -> IO ()
- treeViewColumnGetSortColumnId :: TreeViewColumn -> IO SortColumnId
- treeViewColumnSetSortIndicator :: TreeViewColumn -> Bool -> IO ()
- treeViewColumnGetSortIndicator :: TreeViewColumn -> IO Bool
- treeViewColumnSetSortOrder :: TreeViewColumn -> SortType -> IO ()
- treeViewColumnGetSortOrder :: TreeViewColumn -> IO SortType
- data SortType
  - = SortAscending
  - | SortDescending
- treeViewColumnSetExpand :: TreeViewColumn -> Bool -> IO ()
- treeViewColumnGetExpand :: TreeViewColumn -> IO Bool
- treeViewColumnCellIsVisible :: TreeViewColumn -> IO Bool
- treeViewColumnFocusCell :: CellRendererClass cell => TreeViewColumn -> cell -> IO ()
- treeViewColumnQueueResize :: TreeViewColumn -> IO ()
- 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 :: GlibString string => ReadWriteAttr TreeViewColumn (Maybe string) string
- treeViewColumnExpand :: Attr TreeViewColumn Bool
- treeViewColumnClickable :: Attr TreeViewColumn Bool
- treeViewColumnWidget :: WidgetClass widget => ReadWriteAttr TreeViewColumn (Maybe Widget) (Maybe widget)
- treeViewColumnAlignment :: Attr TreeViewColumn Float
- treeViewColumnReorderable :: Attr TreeViewColumn Bool
- treeViewColumnSortIndicator :: Attr TreeViewColumn Bool
- treeViewColumnSortOrder :: Attr TreeViewColumn SortType
- treeViewColumnSortColumnId :: Attr TreeViewColumn SortColumnId
- 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.

# Class Hierarchy

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

# Types

data TreeViewColumn Source #

#### Instances

Instances details

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

Instance details

Defined in Graphics.UI.Gtk.Types

Methods

compare :: TreeViewColumn -> TreeViewColumn -> Ordering Source #

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

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

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

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

max :: TreeViewColumn -> TreeViewColumn -> TreeViewColumn Source #

min :: TreeViewColumn -> TreeViewColumn -> TreeViewColumn Source #

GObjectClass TreeViewColumn Source # |
Instance details Defined in Graphics.UI.Gtk.Types Methods toGObject :: TreeViewColumn -> GObject Source # unsafeCastGObject :: GObject -> TreeViewColumn Source #
CellLayoutClass TreeViewColumn Source # |
Instance details Defined in Graphics.UI.Gtk.ModelView.CellLayout
TreeViewColumnClass TreeViewColumn Source # |
Instance details Defined in Graphics.UI.Gtk.Types

class GObjectClass o => TreeViewColumnClass o Source #

#### Instances

Instances details

TreeViewColumnClass TreeViewColumn Source # |
Instance details Defined in Graphics.UI.Gtk.Types

castToTreeViewColumn :: GObjectClass obj => obj -> TreeViewColumn Source #

gTypeTreeViewColumn :: GType Source #

toTreeViewColumn :: TreeViewColumnClass o => o -> TreeViewColumn Source #

# Constructors

treeViewColumnNew :: IO TreeViewColumn Source #

Generate a new TreeViewColumn widget.

# Methods

treeViewColumnPackStart :: CellRendererClass cell => TreeViewColumn -> cell -> Bool -> IO () Source #

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 () Source #

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 () Source #

Remove the associations of attributes to a store for all `CellRenderer`s.

treeViewColumnSetSpacing :: TreeViewColumn -> Int -> IO () Source #

Set the number of pixels between two cell renderers.

treeViewColumnGetSpacing :: TreeViewColumn -> IO Int Source #

Get the number of pixels between two cell renderers.

treeViewColumnSetVisible :: TreeViewColumn -> Bool -> IO () Source #

Set the visibility of a given column.

treeViewColumnGetVisible :: TreeViewColumn -> IO Bool Source #

Get the visibility of a given column.

treeViewColumnSetResizable :: TreeViewColumn -> Bool -> IO () Source #

Set if a given column is resizable by the user.

treeViewColumnGetResizable :: TreeViewColumn -> IO Bool Source #

Get if a given column is resizable by the user.

data TreeViewColumnSizing Source #

Whether columns of a tree or list widget can be resized.

Constructors

TreeViewColumnGrowOnly |
TreeViewColumnAutosize |
TreeViewColumnFixed |

#### Instances

Instances details

Enum TreeViewColumnSizing Source # |

Instance details

Defined in Graphics.UI.Gtk.General.Enums

Methods

succ :: TreeViewColumnSizing -> TreeViewColumnSizing Source #

pred :: TreeViewColumnSizing -> TreeViewColumnSizing Source #

toEnum :: Int -> TreeViewColumnSizing Source #

fromEnum :: TreeViewColumnSizing -> Int Source #

enumFrom :: TreeViewColumnSizing -> [TreeViewColumnSizing] Source #

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

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

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

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

treeViewColumnSetSizing :: TreeViewColumn -> TreeViewColumnSizing -> IO () Source #

Set whether the column can be resized.

treeViewColumnGetSizing :: TreeViewColumn -> IO TreeViewColumnSizing Source #

Return the resizing type of the column.

treeViewColumnGetWidth :: TreeViewColumn -> IO Int Source #

Query the current width of the column.

treeViewColumnSetFixedWidth :: TreeViewColumn -> Int -> IO () Source #

Set the width of the column.

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

treeViewColumnGetFixedWidth :: TreeViewColumn -> IO Int Source #

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 () Source #

Set minimum width of the column.

treeViewColumnGetMinWidth :: TreeViewColumn -> IO Int Source #

Get the minimum width of a column. Returns -1 if this width was not set.

treeViewColumnSetMaxWidth :: TreeViewColumn -> Int -> IO () Source #

Set maximum width of the column.

treeViewColumnGetMaxWidth :: TreeViewColumn -> IO Int Source #

Get the maximum width of a column. Returns -1 if this width was not set.

treeViewColumnClicked :: TreeViewColumn -> IO () Source #

Emit the `clicked` signal on the column.

treeViewColumnSetTitle :: GlibString string => TreeViewColumn -> string -> IO () Source #

Set the widget's title if a custom widget has not been set.

treeViewColumnGetTitle :: GlibString string => TreeViewColumn -> IO (Maybe string) Source #

Get the widget's title.

treeViewColumnSetClickable :: TreeViewColumn -> Bool -> IO () Source #

Set if the column should be sensitive to mouse clicks.

treeViewColumnGetClickable :: TreeViewColumn -> IO Bool Source #

Returns True if the user can click on the header for the column.

treeViewColumnSetWidget :: WidgetClass widget => TreeViewColumn -> Maybe widget -> IO () Source #

Set the column's title to this widget.

treeViewColumnGetWidget Source #

Arguments

:: TreeViewColumn |
-> IO (Maybe Widget) | returns the `Widget` in the column header, or `Nothing`

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 Source #

Arguments

:: 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 Source #

Returns the current x alignment of the tree column. This value can range between 0.0 and 1.0.

treeViewColumnSetReorderable :: TreeViewColumn -> Bool -> IO () Source #

Set if the column can be reordered by the end user dragging the header.

treeViewColumnGetReorderable :: TreeViewColumn -> IO Bool Source #

Returns whether the column can be reordered by the user.

treeViewColumnSetSortColumnId :: TreeViewColumn -> SortColumnId -> IO () Source #

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 `SortColumnId` for which a comparison function was set.

treeViewColumnGetSortColumnId :: TreeViewColumn -> IO SortColumnId Source #

Get the column by which to sort.

- Retrieves the logical `columnId` that the model sorts on when this column is selected for sorting.
- Returns `treeSortableDefaultSortColumnId` if this tree view column has no `SortColumnId` associated with it.

treeViewColumnSetSortIndicator :: TreeViewColumn -> Bool -> IO () Source #

Set if a given column has sorting arrows in its heading.

treeViewColumnGetSortIndicator :: TreeViewColumn -> IO Bool Source #

Query if a given column has sorting arrows in its heading.

treeViewColumnSetSortOrder :: TreeViewColumn -> SortType -> IO () Source #

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 Source #

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

data SortType Source #

Constructors

SortAscending |
SortDescending |

#### Instances

Instances details

Enum SortType Source # |

Instance details

Defined in Graphics.UI.Gtk.General.Enums

Methods

succ :: SortType -> SortType Source #

pred :: SortType -> SortType Source #

toEnum :: Int -> SortType Source #

fromEnum :: SortType -> Int Source #

enumFrom :: SortType -> [SortType] Source #

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

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

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

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

treeViewColumnSetExpand Source #

Arguments

:: TreeViewColumn |
-> Bool | `expand` - `True` if the column should take available extra space, `False` if not
-> IO () |

Sets the column to take available extra space. This space is shared equally amongst all columns that have the expand set to `True`. If no column has this option set, then the last column gets all extra space. By default, every column is created with this `False`.

- Available since Gtk+ version 2.4

treeViewColumnGetExpand Source #

Arguments

:: TreeViewColumn |
-> IO Bool | returns `True`, if the column expands

Return `True` if the column expands to take any available space.

- Available since Gtk+ version 2.4

treeViewColumnCellIsVisible Source #

Arguments

:: TreeViewColumn |
-> IO Bool | returns `True`, if any of the cells packed into the `treeColumn` are currently visible

Returns `True` if any of the cells packed into the `treeColumn` are visible. For this to be meaningful, you must first initialize the cells with `treeViewColumnCellSetCellData`

treeViewColumnFocusCell Source #

Arguments

:: CellRendererClass cell |
=> TreeViewColumn |
-> cell | `cell` - A `CellRenderer`
-> IO () |

Sets the current keyboard focus to be at `cell`, if the column contains 2 or more editable and activatable cells.

- Available since Gtk+ version 2.2

treeViewColumnQueueResize :: TreeViewColumn -> IO () Source #

Flags the column, and the cell renderers added to this column, to have their sizes renegotiated.

- Available since Gtk+ version 2.8

# Attributes

treeViewColumnVisible :: Attr TreeViewColumn Bool Source #

Whether to display the column.

Default value: `True`

treeViewColumnResizable :: Attr TreeViewColumn Bool Source #

Column is user-resizable.

Default value: `False`

treeViewColumnWidth :: ReadAttr TreeViewColumn Int Source #

Current width of the column.

Allowed values: >= 0

Default value: 0

treeViewColumnSpacing :: Attr TreeViewColumn Int Source #

Space which is inserted between cells.

Allowed values: >= 0

Default value: 0

treeViewColumnSizing :: Attr TreeViewColumn TreeViewColumnSizing Source #

Resize mode of the column.

Default value: `TreeViewColumnGrowOnly`

treeViewColumnFixedWidth :: Attr TreeViewColumn Int Source #

Current fixed width of the column.

Allowed values: >= 1

Default value: 1

treeViewColumnMinWidth :: Attr TreeViewColumn Int Source #

Minimum allowed width of the column.

Allowed values: >= -1

Default value: -1

treeViewColumnMaxWidth :: Attr TreeViewColumn Int Source #

Maximum allowed width of the column.

Allowed values: >= -1

Default value: -1

treeViewColumnTitle :: GlibString string => ReadWriteAttr TreeViewColumn (Maybe string) string Source #

Title to appear in column header.

Default value: ""

treeViewColumnExpand :: Attr TreeViewColumn Bool Source #

Column gets share of extra width allocated to the widget.

Default value: `False`

treeViewColumnClickable :: Attr TreeViewColumn Bool Source #

Whether the header can be clicked.

Default value: `False`

treeViewColumnWidget :: WidgetClass widget => ReadWriteAttr TreeViewColumn (Maybe Widget) (Maybe widget) Source #

Widget to put in column header button instead of column title.

treeViewColumnAlignment :: Attr TreeViewColumn Float Source #

X Alignment of the column header text or widget.

Allowed values: [0,1]

Default value: 0

treeViewColumnReorderable :: Attr TreeViewColumn Bool Source #

Whether the column can be reordered around the headers.

Default value: `False`

treeViewColumnSortIndicator :: Attr TreeViewColumn Bool Source #

Whether to show a sort indicator.

Default value: `False`

treeViewColumnSortOrder :: Attr TreeViewColumn SortType Source #

Sort direction the sort indicator should indicate.

Default value: `SortAscending`

treeViewColumnSortColumnId :: Attr TreeViewColumn SortColumnId Source #

'sortColumnId' property. See `treeViewColumnGetSortColumnId` and `treeViewColumnSetSortColumnId`

# Signals

onColClicked :: TreeViewColumnClass self => self -> IO () -> IO (ConnectId self) Source #

Emitted when the header of this column has been clicked on.

afterColClicked :: TreeViewColumnClass self => self -> IO () -> IO (ConnectId self) Source #

Emitted when the header of this column has been clicked on.