gtk-0.12.4: Binding to the Gtk+ graphical user interface library.

Portabilityportable (depends on GHC)
Stabilityprovisional
Maintainergtk2hs-users@lists.sourceforge.net
Safe HaskellNone

Graphics.UI.Gtk.ModelView.TreeViewColumn

Contents

Description

A visible column in a TreeView widget

Synopsis

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

Constructors

treeViewColumnNew :: IO TreeViewColumn

Generate a new TreeViewColumn widget.

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 CellRenderers that are contained in this column.

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.

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.

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 -> Maybe widget -> IO ()

Set the column's title to this widget.

treeViewColumnGetWidget

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

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

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

treeViewColumnGetSortColumnId :: TreeViewColumn -> IO SortColumnId

Get the column by which to sort.

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.

treeViewColumnGetSortOrder :: TreeViewColumn -> IO SortType

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

treeViewColumnSetExpand

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

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

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

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

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

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

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: ""

treeViewColumnExpand :: Attr TreeViewColumn Bool

Column gets share of extra width allocated to the widget.

Default value: False

treeViewColumnClickable :: Attr TreeViewColumn Bool

Whether the header can be clicked.

Default value: False

treeViewColumnWidget :: WidgetClass widget => ReadWriteAttr TreeViewColumn (Maybe Widget) (Maybe 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

Signals

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

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

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

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