TreeView —
This widget constitutes the main widget for displaying lists and other structured data.
type
TreeViewColumnDropFunc |
type
TreeViewMappingFunc |
treeViewNew:: IO TreeView |
treeViewNewWithModel:: TreeModelClass tm => tm -> IO TreeView |
treeViewAppendColumn:: TreeViewClass tv => tv -> TreeViewColumn -> IO Int |
treeViewCollapseAll:: TreeViewClass tv => tv -> IO () |
treeViewCollapseRow:: TreeViewClass tv => tv -> TreePath -> IO Bool |
treeViewColumnsAutosize:: TreeViewClass tv => tv -> IO () |
treeViewExpandAll:: TreeViewClass tv => tv -> IO () |
treeViewExpandRow:: TreeViewClass tv => TreePath -> Bool -> tv -> IO Bool |
treeViewExpandToPath:: TreeViewClass tv => tv -> TreePath -> IO () |
treeViewGetColumn:: TreeViewClass tv => tv -> Int -> IO (Maybe TreeViewColumn) |
treeViewGetColumns:: TreeViewClass tv => tv -> IO [TreeViewColumn] |
treeViewGetCursor:: TreeViewClass tv => tv -> IO (Maybe TreePath,Maybe TreeViewColumn) |
treeViewGetExpanderColumn:: TreeViewClass tv => tv -> IO TreeViewColumn |
treeViewGetHadjustment:: TreeViewClass tv => tv -> IO (Maybe Adjustment) |
treeViewGetHeadersVisible:: TreeViewClass tv => tv -> IO Bool |
treeViewGetModel:: TreeViewClass tv => tv -> IO (Maybe TreeModel) |
treeViewGetPathAtPos <no type information> |
treeViewGetReorderable:: TreeViewClass tv => tv -> IO Bool |
treeViewGetRulesHint:: TreeViewClass tv => tv -> IO Bool |
treeViewGetSelection:: TreeViewClass tv => tv -> IO TreeSelection |
treeViewGetVadjustment:: TreeViewClass tv => tv -> IO (Maybe Adjustment) |
treeViewInsertColumn:: TreeViewClass tv => tv -> TreeViewColumn -> Int -> IO Int |
treeViewInsertColumnWithAttributes:: (TreeViewClass tv, CellRendererClass cr) => tv -> Int -> String -> cr -> [(String,Int)] -> IO () |
treeViewMapExpandedRows:: TreeViewClass tv => tv -> (TreePath -> IO ()) -> IO () |
treeViewMoveColumnAfter:: TreeViewClass tv => tv -> TreeViewColumn -> TreeViewColumn -> IO () |
treeViewMoveColumnFirst:: TreeViewClass tv => tv -> TreeViewColumn -> IO () |
treeViewRemoveColumn:: TreeViewClass tv => tv -> TreeViewColumn -> IO Int |
treeViewRowActivated:: TreeViewClass tv => tv -> TreePath -> TreeViewColumn -> IO () |
treeViewRowExpanded:: TreeViewClass tv => tv -> TreePath -> IO Bool |
treeViewScrollToCell:: TreeViewClass tv => tv -> TreePath -> TreeViewColumn -> Maybe (Float,Float) -> IO () |
treeViewScrollToPoint:: TreeViewClass tv => tv -> Int -> Int -> IO () |
treeViewSetColumnDragFunction:: TreeViewClass tv => tv -> Maybe (TreeViewColumn -> Maybe TreeViewColumn -> Maybe TreeViewColumn -> IO Bool) -> IO () |
treeViewSetCursor:: TreeViewClass tv => tv -> TreePath -> (Maybe (TreeViewColumn,Bool)) -> IO () |
treeViewSetCursorOnCell:: TreeViewClass tv => tv -> TreePath -> TreeViewColumn -> CellRenderer -> Bool -> IO () |
treeViewSetExpanderColumn:: TreeViewClass tv => tv -> Maybe TreeViewColumn -> IO () |
treeViewSetHadjustment:: TreeViewClass tv => (Maybe Adjustment) -> tv -> IO () |
treeViewSetHeadersClickable:: TreeViewClass tv => tv -> Bool -> IO () |
treeViewSetHeadersVisible:: TreeViewClass tv => tv -> Bool -> IO () |
treeViewSetModel:: (TreeViewClass tv, TreeModelClass tm) => tv -> tm -> IO () |
treeViewSetReorderable:: TreeViewClass tv => tv -> Bool -> IO () |
treeViewSetRulesHint:: TreeViewClass tv => tv -> Bool -> IO () |
treeViewSetVadjustment:: TreeViewClass tv => (Maybe Adjustment) -> tv -> IO () |
The widget supports scrolling natively. This implies that pixel coordinates can be given in two formats: relative to the current view's upper left corner or relative to the whole list's coordinates. The former are called widget coordinates while the letter are called tree coordinates.
treeViewMoveColumnAfter and treeViewMoveColumnFirst are not dealt with in Mogul
gtk_tree_view_get_bin_window is to compare the GDK window from incoming events. We don't marshal that window parameter, so this function is not bound either.
All functions related to drag and drop are missing.
get_search_equal_func is missing: proper memory management is impossible
gtk_tree_view_set_destroy_count_func is not meant to be useful
expand-collapse-cursor-row needs to be bound if it is useful to expand and collapse rows in a user-defined manner. Would only work on Gtk 2.2 and higher since the return parameter changed
move_cursor, select_all, select_cursor_parent, select_cursor_row toggle_cursor_row, unselect_all are not bound. These functions are only useful to change the widgets behaviour for these actions. Everything else can be done with cursor_changed and columns_changed
set_scroll_adjustment makes sense if the user monitors the scroll bars *and* the scroll bars can be replaced anytime (the latter is odd) Let's hope this file will always only contain macros.
Create a new TreeView widget with tm as the storage model.
| treeViewNewWithModel | :: tm | :: IO TreeView |
| tm |
Append a new column to the TreeView. Returns the new number of columns.
| treeViewAppendColumn | :: tv | :: TreeViewColumn | :: IO Int |
| tv | tvc |
Collapse a row. Returns True if the row existed.
| treeViewCollapseRow | :: tv | :: TreePath | :: IO Bool |
| tv | path |
Resize the columns to their optimal size.
| treeViewColumnsAutosize | :: tv | :: IO () |
| tv |
Expand a row.
| treeViewExpandRow | :: TreePath | :: Bool | :: tv | :: IO Bool |
| path | all | tv |
Expand a node that is specified by path. If the all is True every child will be expanded recursively. Returns True if the row existed and had children.
Make a certain path visible.
| treeViewExpandToPath | :: tv | :: TreePath | :: IO () |
| tv | tp |
This will expand all parent rows of tp as necessary.
Only available in Gtk 2.2 and higher.
Retrieve a TreeViewColumn.
| treeViewGetColumn | :: tv | :: Int | :: IO (Maybe TreeViewColumn) |
| tv | pos |
Retrieve the pos th columns of TreeView. If the index is out of range Nothing is returned.
Return all TreeViewColumns in this TreeView.
| treeViewGetColumns | :: tv | :: IO [TreeViewColumn] |
| tv |
Retrieves the position of the focus.
| treeViewGetCursor | :: tv | :: IO (Maybe TreePath,Maybe TreeViewColumn) |
| tv |
Returns a pair (path, column).If the cursor is not currently set, path will be Nothing. If no column is currently selected, column will be Nothing.
Get location of hierarchy controls.
| treeViewGetExpanderColumn | :: tv | :: IO TreeViewColumn |
| tv |
Gets the column to draw the expander arrow at. If col is Nothing, then the expander arrow is always at the first visible column.
Get the Adjustment that represents the horizontal aspect.
| treeViewGetHadjustment | :: tv | :: IO (Maybe Adjustment) |
| tv |
Query if the column headers are visible.
| treeViewGetHeadersVisible | :: tv | :: IO Bool |
| tv |
Retrieve the TreeModel that supplies the data for this TreeView. Returns Nothing if no model is currently set.
| treeViewGetModel | :: tv | :: IO (Maybe TreeModel) |
| tv |
Give visual aid for wide columns.
| treeViewGetRulesHint | :: tv | :: IO Bool |
| tv |
This function tells GTK+ that the user interface for your application requires users to read across tree columns. By default, GTK+ will then render the tree with alternating row colors. Do not use it just because you prefer the appearance of the ruled tree; that's a question for the theme. Some themes will draw tree rows in alternating colors even when rules are turned off, and users who prefer that appearance all the time can choose those themes. You should call this function only as a semantic hint to the theme engine that your tree makes alternating colors useful from a functional standpoint (since it has lots of columns, generally).
Retrieve a TreeSelection that holds the current selected nodes of the View.
| treeViewGetSelection | :: tv | :: IO TreeSelection |
| tv |
Get the Adjustment that represents the vertical aspect.
| treeViewGetVadjustment | :: tv | :: IO (Maybe Adjustment) |
| tv |
Inserts column tvc into the TreeView widget at the position pos. Returns the number of columns after insertion. Specify -1 for pos to insert the column at the end.
| treeViewInsertColumn | :: tv | :: TreeViewColumn | :: Int | :: IO Int |
| tv | tvc | pos |
Insert new TreeViewColumn.
| treeViewInsertColumnWithAttributes | :: tv | :: Int | :: String | :: cr | :: [(String,Int)] | :: IO () |
| tv | pos | title | cr | attribs |
Inserts new column into the TreeView tv at position pos with title title, cell renderer cr and attributes attribs. Specify -1 for pos to insert the column at the end.
Call function for every expaned row.
| treeViewMapExpandedRows | :: tv | :: (TreePath -> IO ()) | :: IO () |
| tv | func |
Move a specific column.
| treeViewMoveColumnAfter | :: tv | :: TreeViewColumn | :: TreeViewColumn | :: IO () |
| tv | which | after |
Use treeViewMoveColumnToFront if you want to move the column to the left end of the TreeView.
Move a specific column.
| treeViewMoveColumnFirst | :: tv | :: TreeViewColumn | :: IO () |
| tv | which |
Use treeViewMoveColumnAfter if you want to move the column somewhere else than to the leftmost position.
Remove column tvc from the TreeView widget. The number of remaining columns is returned.
| treeViewRemoveColumn | :: tv | :: TreeViewColumn | :: IO Int |
| tv | tvc |
Emit the activated signal on a cell.
| treeViewRowActivated | :: tv | :: TreePath | :: TreeViewColumn | :: IO () |
| tv | tp | tvc |
Scroll to a cell.
| treeViewScrollToCell | :: tv | :: TreePath | :: TreeViewColumn | :: Maybe (Float,Float) | :: IO () |
| tv | path | tvc | Nothing | ||
| tv | path | tvc | (Just (ver, hor)) |
Scroll to a cell as specified by path and tvc. The cell is aligned within the TreeView widget as follows: horizontally by hor from left ( 0.0) to right ( 1.0) and vertically by ver from top ( 0.0) to buttom ( 1.0).
Scroll to a coordinate.
| treeViewScrollToPoint | :: tv | :: Int | :: Int | :: IO () |
| tv | treeX | treeY |
Scrolls the tree view such that the top-left corner of the visible area is treeX, treeY, where treeX and treeY are specified in tree window coordinates. The TreeView must be realized before this function is called. If it isn't, you probably want to use treeViewScrollToCell.
Specify where a column may be dropped.
| treeViewSetColumnDragFunction | :: tv | :: Maybe (TreeViewColumn -> Maybe TreeViewColumn -> Maybe TreeViewColumn -> IO Bool) | :: IO () |
| tv | (Just pred) | ||
| tv | Nothing |
Sets a user function for determining where a column may be dropped when dragged. This function is called on every column pair in turn at the beginning of a column drag to determine where a drop can take place.
The callback function take the TreeViewColumn to be moved, the second and third arguments are the columns on the left and right side of the new location. At most one of them might be Nothing which indicates that the column is about to be dropped at the left or right end of the TreeView.
The predicate pred should return True if it is ok to insert the column at this place.
Use Nothing for the predicate if columns can be inserted anywhere.
Selects a specific row.
| treeViewSetCursor | :: tv | :: TreePath | :: (Maybe (TreeViewColumn,Bool)) | :: IO () |
| tv | tp | (Just (focusColumn, startEditing)) | ||
| tv | tp | Nothing |
Sets the current keyboard focus to be at path, and selects it. This is useful when you want to focus the user's attention on a particular row. If focusColumn is given, then the input focus is given to the column specified by it. Additionally, if focusColumn is specified, and startEditing is True, then editing will be started in the specified cell. This function is often followed by a widgetGrabFocus to the TreeView in order to give keyboard focus to the widget.
Selects a cell in a specific row.
| treeViewSetCursorOnCell | :: tv | :: TreePath | :: TreeViewColumn | :: CellRenderer | :: Bool | :: IO () |
| tv | tp | focusColumn | focusCell | startEditing |
Similar to treeViewSetCursor but allows a column to containt several CellRenderers.
Only available in Gtk 2.2 and higher.
Set location of hierarchy controls.
| treeViewSetExpanderColumn | :: tv | :: Maybe TreeViewColumn | :: IO () |
| tv | Nothing | ||
| tv | (Just tvc) |
Sets the column to draw the expander arrow at. If col is Nothing, then the expander arrow is always at the first visible column.
Set the Adjustment that controls the horizontal aspect. If adj is Nothing then set no Adjustment widget.
| treeViewSetHadjustment | :: (Maybe Adjustment) | :: tv | :: IO () |
| adj | tv |
Set wether the columns headers are sensitive to mouse clicks.
| treeViewSetHeadersClickable | :: tv | :: Bool | :: IO () |
| tv | click |
Set the visibility state of the column headers.
| treeViewSetHeadersVisible | :: tv | :: Bool | :: IO () |
| tv | vis |
Check if rows can be moved around.
| treeViewSetReorderable | :: tv | :: Bool | :: IO () |
| tv | ro |
Set whether the user can use drag and drop (DND) to reorder the rows in the store. This works on both TreeStore and ListStore models. If ro is True, then the user can reorder the model by dragging and dropping rows. The developer can listen to these changes by connecting to the model's signals. This function does not give you any degree of control over the order -- any reorderering is allowed. If more control is needed, you should probably handle drag and drop manually.
Query if visual aid for wide columns is turned on.
| treeViewSetRulesHint | :: tv | :: Bool | :: IO () |
| tv | vis |
Set the Adjustment that controls the vertical aspect. If adj is Nothing then set no Adjustment widget.
| treeViewSetVadjustment | :: (Maybe Adjustment) | :: tv | :: IO () |
| adj | tv |