Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
GtkTreeListRow
is used by GtkTreeListModel
to represent items.
It allows navigating the model as a tree and modify the state of rows.
GtkTreeListRow
instances are created by a GtkTreeListModel
only
when the TreeListModel:passthrough property is not set.
There are various support objects that can make use of GtkTreeListRow
objects, such as the TreeExpander
widget that allows displaying
an icon to expand or collapse a row or TreeListRowSorter
that
makes it possible to sort trees properly.
Synopsis
- newtype TreeListRow = TreeListRow (ManagedPtr TreeListRow)
- class (GObject o, IsDescendantOf TreeListRow o) => IsTreeListRow o
- toTreeListRow :: (MonadIO m, IsTreeListRow o) => o -> m TreeListRow
- treeListRowGetChildRow :: (HasCallStack, MonadIO m, IsTreeListRow a) => a -> Word32 -> m (Maybe TreeListRow)
- treeListRowGetChildren :: (HasCallStack, MonadIO m, IsTreeListRow a) => a -> m (Maybe ListModel)
- treeListRowGetDepth :: (HasCallStack, MonadIO m, IsTreeListRow a) => a -> m Word32
- treeListRowGetExpanded :: (HasCallStack, MonadIO m, IsTreeListRow a) => a -> m Bool
- treeListRowGetItem :: (HasCallStack, MonadIO m, IsTreeListRow a) => a -> m (Maybe Object)
- treeListRowGetParent :: (HasCallStack, MonadIO m, IsTreeListRow a) => a -> m (Maybe TreeListRow)
- treeListRowGetPosition :: (HasCallStack, MonadIO m, IsTreeListRow a) => a -> m Word32
- treeListRowIsExpandable :: (HasCallStack, MonadIO m, IsTreeListRow a) => a -> m Bool
- treeListRowSetExpanded :: (HasCallStack, MonadIO m, IsTreeListRow a) => a -> Bool -> m ()
- getTreeListRowChildren :: (MonadIO m, IsTreeListRow o) => o -> m (Maybe ListModel)
- getTreeListRowDepth :: (MonadIO m, IsTreeListRow o) => o -> m Word32
- getTreeListRowExpandable :: (MonadIO m, IsTreeListRow o) => o -> m Bool
- constructTreeListRowExpanded :: (IsTreeListRow o, MonadIO m) => Bool -> m (GValueConstruct o)
- getTreeListRowExpanded :: (MonadIO m, IsTreeListRow o) => o -> m Bool
- setTreeListRowExpanded :: (MonadIO m, IsTreeListRow o) => o -> Bool -> m ()
- getTreeListRowItem :: (MonadIO m, IsTreeListRow o) => o -> m (Maybe Object)
Exported types
newtype TreeListRow Source #
Memory-managed wrapper type.
TreeListRow (ManagedPtr TreeListRow) |
Instances
Eq TreeListRow Source # | |
Defined in GI.Gtk.Objects.TreeListRow (==) :: TreeListRow -> TreeListRow -> Bool # (/=) :: TreeListRow -> TreeListRow -> Bool # | |
GObject TreeListRow Source # | |
Defined in GI.Gtk.Objects.TreeListRow | |
ManagedPtrNewtype TreeListRow Source # | |
Defined in GI.Gtk.Objects.TreeListRow toManagedPtr :: TreeListRow -> ManagedPtr TreeListRow | |
TypedObject TreeListRow Source # | |
Defined in GI.Gtk.Objects.TreeListRow | |
HasParentTypes TreeListRow Source # | |
Defined in GI.Gtk.Objects.TreeListRow | |
IsGValue (Maybe TreeListRow) Source # | Convert |
Defined in GI.Gtk.Objects.TreeListRow gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe TreeListRow -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe TreeListRow) | |
type ParentTypes TreeListRow Source # | |
Defined in GI.Gtk.Objects.TreeListRow type ParentTypes TreeListRow = '[Object] |
class (GObject o, IsDescendantOf TreeListRow o) => IsTreeListRow o Source #
Type class for types which can be safely cast to TreeListRow
, for instance with toTreeListRow
.
Instances
(GObject o, IsDescendantOf TreeListRow o) => IsTreeListRow o Source # | |
Defined in GI.Gtk.Objects.TreeListRow |
toTreeListRow :: (MonadIO m, IsTreeListRow o) => o -> m TreeListRow Source #
Cast to TreeListRow
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isExpandable, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getChildRow, getChildren, getData, getDepth, getExpanded, getItem, getParent, getPosition, getProperty, getQdata.
Setters
getChildRow
treeListRowGetChildRow Source #
:: (HasCallStack, MonadIO m, IsTreeListRow a) | |
=> a |
|
-> Word32 |
|
-> m (Maybe TreeListRow) | Returns: the child in |
If self
is not expanded or position
is greater than the
number of children, Nothing
is returned.
getChildren
treeListRowGetChildren Source #
:: (HasCallStack, MonadIO m, IsTreeListRow a) | |
=> a |
|
-> m (Maybe ListModel) | Returns: The model containing the children |
If the row is expanded, gets the model holding the children of self
.
This model is the model created by the
[callbackgtk
.TreeListModelCreateModelFunc]
and contains the original items, no matter what value
TreeListModel:passthrough is set to.
getDepth
:: (HasCallStack, MonadIO m, IsTreeListRow a) | |
=> a |
|
-> m Word32 | Returns: The depth of this row |
Gets the depth of this row.
Rows that correspond to items in the root model have a depth of zero, rows corresponding to items of models of direct children of the root model have a depth of 1 and so on.
The depth of a row never changes until the row is destroyed.
getExpanded
treeListRowGetExpanded Source #
:: (HasCallStack, MonadIO m, IsTreeListRow a) | |
=> a |
|
-> m Bool | Returns: |
Gets if a row is currently expanded.
getItem
:: (HasCallStack, MonadIO m, IsTreeListRow a) | |
=> a |
|
-> m (Maybe Object) | Returns: The item
of this row or |
Gets the item corresponding to this row,
The value returned by this function never changes until the row is destroyed.
getParent
:: (HasCallStack, MonadIO m, IsTreeListRow a) | |
=> a |
|
-> m (Maybe TreeListRow) | Returns: The parent of |
Gets the row representing the parent for self
.
That is the row that would need to be collapsed to make this row disappear.
If self
is a row corresponding to the root model,
Nothing
is returned.
The value returned by this function never changes until the row is destroyed.
getPosition
treeListRowGetPosition Source #
:: (HasCallStack, MonadIO m, IsTreeListRow a) | |
=> a |
|
-> m Word32 | Returns: The position in the model |
Returns the position in the GtkTreeListModel
that self
occupies
at the moment.
isExpandable
treeListRowIsExpandable Source #
:: (HasCallStack, MonadIO m, IsTreeListRow a) | |
=> a |
|
-> m Bool | Returns: |
Checks if a row can be expanded.
This does not mean that the row is actually expanded,
this can be checked with treeListRowGetExpanded
.
If a row is expandable never changes until the row is destroyed.
setExpanded
treeListRowSetExpanded Source #
:: (HasCallStack, MonadIO m, IsTreeListRow a) | |
=> a |
|
-> Bool |
|
-> m () |
Expands or collapses a row.
If a row is expanded, the model of calling the
[callbackgtk
.TreeListModelCreateModelFunc] for the row's
item will be inserted after this row. If a row is collapsed,
those items will be removed from the model.
If the row is not expandable, this function does nothing.
Properties
children
The model holding the row's children.
getTreeListRowChildren :: (MonadIO m, IsTreeListRow o) => o -> m (Maybe ListModel) Source #
Get the value of the “children
” property.
When overloading is enabled, this is equivalent to
get
treeListRow #children
depth
The depth in the tree of this row.
getTreeListRowDepth :: (MonadIO m, IsTreeListRow o) => o -> m Word32 Source #
Get the value of the “depth
” property.
When overloading is enabled, this is equivalent to
get
treeListRow #depth
expandable
If this row can ever be expanded.
getTreeListRowExpandable :: (MonadIO m, IsTreeListRow o) => o -> m Bool Source #
Get the value of the “expandable
” property.
When overloading is enabled, this is equivalent to
get
treeListRow #expandable
expanded
If this row is currently expanded.
constructTreeListRowExpanded :: (IsTreeListRow o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “expanded
” property. This is rarely needed directly, but it is used by new
.
getTreeListRowExpanded :: (MonadIO m, IsTreeListRow o) => o -> m Bool Source #
Get the value of the “expanded
” property.
When overloading is enabled, this is equivalent to
get
treeListRow #expanded
setTreeListRowExpanded :: (MonadIO m, IsTreeListRow o) => o -> Bool -> m () Source #
Set the value of the “expanded
” property.
When overloading is enabled, this is equivalent to
set
treeListRow [ #expanded:=
value ]
item
The item held in this row.
getTreeListRowItem :: (MonadIO m, IsTreeListRow o) => o -> m (Maybe Object) Source #
Get the value of the “item
” property.
When overloading is enabled, this is equivalent to
get
treeListRow #item