gi-dazzle-1.0.2: libdazzle bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Dazzle.Objects.TreeNode

Description

No description available in the introspection data.

Synopsis

Exported types

newtype TreeNode Source #

Memory-managed wrapper type.

Constructors

TreeNode (ManagedPtr TreeNode) 

Instances

Instances details
Eq TreeNode Source # 
Instance details

Defined in GI.Dazzle.Objects.TreeNode

GObject TreeNode Source # 
Instance details

Defined in GI.Dazzle.Objects.TreeNode

ManagedPtrNewtype TreeNode Source # 
Instance details

Defined in GI.Dazzle.Objects.TreeNode

Methods

toManagedPtr :: TreeNode -> ManagedPtr TreeNode

TypedObject TreeNode Source # 
Instance details

Defined in GI.Dazzle.Objects.TreeNode

Methods

glibType :: IO GType

HasParentTypes TreeNode Source # 
Instance details

Defined in GI.Dazzle.Objects.TreeNode

IsGValue (Maybe TreeNode) Source #

Convert TreeNode to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Dazzle.Objects.TreeNode

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe TreeNode -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe TreeNode)

type ParentTypes TreeNode Source # 
Instance details

Defined in GI.Dazzle.Objects.TreeNode

type ParentTypes TreeNode = '[Object]

class (GObject o, IsDescendantOf TreeNode o) => IsTreeNode o Source #

Type class for types which can be safely cast to TreeNode, for instance with toTreeNode.

Instances

Instances details
(GObject o, IsDescendantOf TreeNode o) => IsTreeNode o Source # 
Instance details

Defined in GI.Dazzle.Objects.TreeNode

toTreeNode :: (MonadIO m, IsTreeNode o) => o -> m TreeNode Source #

Cast to TreeNode, for types for which this is known to be safe. For general casts, use castTo.

Methods

addEmblem

treeNodeAddEmblem Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeNode a) 
=> a

self: An TreeNode

-> Text

emblemName: the icon-name of the emblem

-> m () 

Adds an emplem to be rendered on top of the node.

Use treeNodeRemoveEmblem to remove an emblem.

append

treeNodeAppend Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeNode a, IsTreeNode b) 
=> a

node: A TreeNode.

-> b

child: A TreeNode.

-> m () 

Appends child to the list of children owned by node.

clearEmblems

treeNodeClearEmblems :: (HasCallStack, MonadIO m, IsTreeNode a) => a -> m () Source #

Removes all emblems from self.

collapse

treeNodeCollapse :: (HasCallStack, MonadIO m, IsTreeNode a) => a -> m () Source #

No description available in the introspection data.

expand

treeNodeExpand :: (HasCallStack, MonadIO m, IsTreeNode a) => a -> Bool -> m Bool Source #

No description available in the introspection data.

getArea

treeNodeGetArea :: (HasCallStack, MonadIO m, IsTreeNode a) => a -> Rectangle -> m () Source #

No description available in the introspection data.

getChildrenPossible

treeNodeGetChildrenPossible :: (HasCallStack, MonadIO m, IsTreeNode a) => a -> m Bool Source #

No description available in the introspection data.

getExpanded

treeNodeGetExpanded :: (HasCallStack, MonadIO m, IsTreeNode a) => a -> m Bool Source #

No description available in the introspection data.

getForegroundRgba

treeNodeGetForegroundRgba Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeNode a) 
=> a

self: a TreeNode

-> m (Maybe RGBA)

Returns: A RGBA or Nothing

Gets the foreground-rgba to use for row text.

If Nothing, the default foreground color should be used.

Since: 3.28

getGicon

treeNodeGetGicon Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeNode a) 
=> a 
-> m Icon

Returns: An Icon or Nothing.

Fetch the GIcon, re-render if necessary

getIconName

treeNodeGetIconName :: (HasCallStack, MonadIO m, IsTreeNode a) => a -> m Text Source #

Fetches the icon-name of the icon to display, or NULL for no icon.

getItem

treeNodeGetItem Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeNode a) 
=> a

node: A TreeNode.

-> m Object

Returns: A Object or Nothing.

Gets a Object for the node, if one was set.

getIter

treeNodeGetIter :: (HasCallStack, MonadIO m, IsTreeNode a) => a -> TreeIter -> m Bool Source #

No description available in the introspection data.

getParent

treeNodeGetParent Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeNode a) 
=> a

node: A TreeNode.

-> m TreeNode

Returns: A TreeNode.

Retrieves the parent TreeNode for node.

getPath

treeNodeGetPath Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeNode a) 
=> a

node: A TreeNode.

-> m (Maybe TreePath)

Returns: A TreePath if successful; otherwise Nothing.

Gets a TreePath for node.

getResetOnCollapse

treeNodeGetResetOnCollapse :: (HasCallStack, MonadIO m, IsTreeNode a) => a -> m Bool Source #

No description available in the introspection data.

getText

treeNodeGetText :: (HasCallStack, MonadIO m, IsTreeNode a) => a -> m Text Source #

No description available in the introspection data.

getTree

treeNodeGetTree Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeNode a) 
=> a

node: A TreeNode.

-> m Tree

Returns: A Tree.

Fetches the Tree instance that owns the node.

getUseDimLabel

treeNodeGetUseDimLabel :: (HasCallStack, MonadIO m, IsTreeNode a) => a -> m Bool Source #

No description available in the introspection data.

getUseMarkup

treeNodeGetUseMarkup :: (HasCallStack, MonadIO m, IsTreeNode a) => a -> m Bool Source #

No description available in the introspection data.

hasEmblem

treeNodeHasEmblem Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeNode a) 
=> a

self: An TreeNode

-> Text

emblemName: a string containing the emblem name

-> m Bool

Returns: True if emblemName is used by self

Checks to see if emblemName has been added to the TreeNode.

insert

treeNodeInsert Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeNode a, IsTreeNode b) 
=> a

self: a TreeNode

-> b

child: a TreeNode

-> Word32

position: the position for the child

-> m () 

Inserts child as a child of self at position.

Since: 3.28

insertSorted

treeNodeInsertSorted Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeNode a, IsTreeNode b) 
=> a

node: A TreeNode.

-> b

child: A TreeNode.

-> TreeNodeCompareFunc

compareFunc: A compare func to compare nodes.

-> m () 

Inserts a child as a child of node, sorting it among the other children.

invalidate

treeNodeInvalidate :: (HasCallStack, MonadIO m, IsTreeNode a) => a -> m () Source #

No description available in the introspection data.

isRoot

treeNodeIsRoot :: (HasCallStack, MonadIO m, IsTreeNode a) => a -> m Bool Source #

No description available in the introspection data.

nChildren

treeNodeNChildren :: (HasCallStack, MonadIO m, IsTreeNode a) => a -> m Word32 Source #

No description available in the introspection data.

new

treeNodeNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m TreeNode

Returns: A TreeNode

Creates a new TreeNode instance. This is handy for situations where you do not want to subclass TreeNode.

nthChild

treeNodeNthChild Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeNode a) 
=> a

self: a TreeNode

-> Word32

nth: the index of the child

-> m (Maybe TreeNode)

Returns: a TreeNode or Nothing

Gets the nth child of self or Nothing if it does not exist.

prepend

treeNodePrepend Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeNode a, IsTreeNode b) 
=> a

node: A TreeNode.

-> b

child: A TreeNode.

-> m () 

Prepends child to the list of children owned by node.

rebuild

treeNodeRebuild Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeNode a) 
=> a

self: a TreeNode

-> m () 

Rebuilds a node, without invalidating children nodes. If you want to ensure that children are also rebuilt, use treeNodeInvalidate.

Since: 3.28

remove

treeNodeRemove Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeNode a, IsTreeNode b) 
=> a

node: A TreeNode.

-> b

child: A TreeNode.

-> m () 

Removes child from the list of children owned by node.

removeEmblem

treeNodeRemoveEmblem :: (HasCallStack, MonadIO m, IsTreeNode a) => a -> Text -> m () Source #

No description available in the introspection data.

select

treeNodeSelect :: (HasCallStack, MonadIO m, IsTreeNode a) => a -> m () Source #

No description available in the introspection data.

setChildrenPossible

treeNodeSetChildrenPossible Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeNode a) 
=> a

self: A TreeNode.

-> Bool

childrenPossible: If the node has children.

-> m () 

If the node has not yet been built, setting this to True will add a dummy child node. This dummy node will be removed when when the node is built by the registered TreeBuilder instances.

setEmblems

treeNodeSetEmblems :: (HasCallStack, MonadIO m, IsTreeNode a) => a -> Text -> m () Source #

No description available in the introspection data.

setForegroundRgba

treeNodeSetForegroundRgba Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeNode a) 
=> a

self: a TreeNode

-> Maybe RGBA

foregroundRgba: A RGBA or Nothing

-> m () 

Sets the foreground-rgba to be used by the row text.

If foregroundRgba is Nothing, the value is reset to the default.

Since: 3.28

setGicon

treeNodeSetGicon :: (HasCallStack, MonadIO m, IsTreeNode a, IsIcon b) => a -> b -> m () Source #

No description available in the introspection data.

setIconName

treeNodeSetIconName Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeNode a) 
=> a

node: A TreeNode.

-> Maybe Text

iconName: The icon name.

-> m () 

Sets the icon name of the node. This is displayed in the pixbuf cell of the DzlTree.

setItem

treeNodeSetItem Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeNode a, IsObject b) 
=> a

node: A TreeNode.

-> b

item: A Object.

-> m () 

An optional object to associate with the node. This is handy to save needing to subclass the TreeNode class.

setResetOnCollapse

treeNodeSetResetOnCollapse :: (HasCallStack, MonadIO m, IsTreeNode a) => a -> Bool -> m () Source #

No description available in the introspection data.

setText

treeNodeSetText Source #

Arguments

:: (HasCallStack, MonadIO m, IsTreeNode a) 
=> a

node: A TreeNode.

-> Maybe Text

text: The node text.

-> m () 

Sets the text of the node. This is displayed in the text cell of the DzlTree.

setUseDimLabel

treeNodeSetUseDimLabel :: (HasCallStack, MonadIO m, IsTreeNode a) => a -> Bool -> m () Source #

No description available in the introspection data.

setUseMarkup

treeNodeSetUseMarkup :: (HasCallStack, MonadIO m, IsTreeNode a) => a -> Bool -> m () Source #

No description available in the introspection data.

showPopover

treeNodeShowPopover :: (HasCallStack, MonadIO m, IsTreeNode a, IsPopover b) => a -> b -> m () Source #

No description available in the introspection data.

Properties

childrenPossible

This property allows for more lazy loading of nodes.

When a node becomes visible, we normally build its children nodes so that we know if we need an expansion arrow. However, that can be expensive when rendering directories with lots of subdirectories.

Using this, you can always show an arrow without building the children and simply hide the arrow if there were in fact no children (upon expansion).

constructTreeNodeChildrenPossible :: (IsTreeNode o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “children-possible” property. This is rarely needed directly, but it is used by new.

getTreeNodeChildrenPossible :: (MonadIO m, IsTreeNode o) => o -> m Bool Source #

Get the value of the “children-possible” property. When overloading is enabled, this is equivalent to

get treeNode #childrenPossible

setTreeNodeChildrenPossible :: (MonadIO m, IsTreeNode o) => o -> Bool -> m () Source #

Set the value of the “children-possible” property. When overloading is enabled, this is equivalent to

set treeNode [ #childrenPossible := value ]

expandedIconName

No description available in the introspection data.

clearTreeNodeExpandedIconName :: (MonadIO m, IsTreeNode o) => o -> m () Source #

Set the value of the “expanded-icon-name” property to Nothing. When overloading is enabled, this is equivalent to

clear #expandedIconName

constructTreeNodeExpandedIconName :: (IsTreeNode o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “expanded-icon-name” property. This is rarely needed directly, but it is used by new.

getTreeNodeExpandedIconName :: (MonadIO m, IsTreeNode o) => o -> m (Maybe Text) Source #

Get the value of the “expanded-icon-name” property. When overloading is enabled, this is equivalent to

get treeNode #expandedIconName

setTreeNodeExpandedIconName :: (MonadIO m, IsTreeNode o) => o -> Text -> m () Source #

Set the value of the “expanded-icon-name” property. When overloading is enabled, this is equivalent to

set treeNode [ #expandedIconName := value ]

gicon

The cached GIcon to display.

constructTreeNodeGicon :: (IsTreeNode o, MonadIO m, IsIcon a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “gicon” property. This is rarely needed directly, but it is used by new.

getTreeNodeGicon :: (MonadIO m, IsTreeNode o) => o -> m Icon Source #

Get the value of the “gicon” property. When overloading is enabled, this is equivalent to

get treeNode #gicon

setTreeNodeGicon :: (MonadIO m, IsTreeNode o, IsIcon a) => o -> a -> m () Source #

Set the value of the “gicon” property. When overloading is enabled, this is equivalent to

set treeNode [ #gicon := value ]

iconName

An icon-name to display on the row.

clearTreeNodeIconName :: (MonadIO m, IsTreeNode o) => o -> m () Source #

Set the value of the “icon-name” property to Nothing. When overloading is enabled, this is equivalent to

clear #iconName

constructTreeNodeIconName :: (IsTreeNode o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “icon-name” property. This is rarely needed directly, but it is used by new.

getTreeNodeIconName :: (MonadIO m, IsTreeNode o) => o -> m Text Source #

Get the value of the “icon-name” property. When overloading is enabled, this is equivalent to

get treeNode #iconName

setTreeNodeIconName :: (MonadIO m, IsTreeNode o) => o -> Text -> m () Source #

Set the value of the “icon-name” property. When overloading is enabled, this is equivalent to

set treeNode [ #iconName := value ]

item

An optional Object to associate with the node.

constructTreeNodeItem :: (IsTreeNode o, MonadIO m, IsObject a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “item” property. This is rarely needed directly, but it is used by new.

getTreeNodeItem :: (MonadIO m, IsTreeNode o) => o -> m Object Source #

Get the value of the “item” property. When overloading is enabled, this is equivalent to

get treeNode #item

setTreeNodeItem :: (MonadIO m, IsTreeNode o, IsObject a) => o -> a -> m () Source #

Set the value of the “item” property. When overloading is enabled, this is equivalent to

set treeNode [ #item := value ]

parent

The parent of the node.

getTreeNodeParent :: (MonadIO m, IsTreeNode o) => o -> m TreeNode Source #

Get the value of the “parent” property. When overloading is enabled, this is equivalent to

get treeNode #parent

resetOnCollapse

The "reset-on-collapse" property denotes that all children should be removed from the node when it's row is collapsed. It will also set TreeNode:needs-build to True so the next expansion rebuilds the children. This is useful for situations where you want to ensure the nodes are up to date (refreshed) on every expansion.

Since: 3.28

constructTreeNodeResetOnCollapse :: (IsTreeNode o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “reset-on-collapse” property. This is rarely needed directly, but it is used by new.

getTreeNodeResetOnCollapse :: (MonadIO m, IsTreeNode o) => o -> m Bool Source #

Get the value of the “reset-on-collapse” property. When overloading is enabled, this is equivalent to

get treeNode #resetOnCollapse

setTreeNodeResetOnCollapse :: (MonadIO m, IsTreeNode o) => o -> Bool -> m () Source #

Set the value of the “reset-on-collapse” property. When overloading is enabled, this is equivalent to

set treeNode [ #resetOnCollapse := value ]

text

Text to display on the tree node.

clearTreeNodeText :: (MonadIO m, IsTreeNode o) => o -> m () Source #

Set the value of the “text” property to Nothing. When overloading is enabled, this is equivalent to

clear #text

constructTreeNodeText :: (IsTreeNode o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “text” property. This is rarely needed directly, but it is used by new.

getTreeNodeText :: (MonadIO m, IsTreeNode o) => o -> m Text Source #

Get the value of the “text” property. When overloading is enabled, this is equivalent to

get treeNode #text

setTreeNodeText :: (MonadIO m, IsTreeNode o) => o -> Text -> m () Source #

Set the value of the “text” property. When overloading is enabled, this is equivalent to

set treeNode [ #text := value ]

tree

The tree the node belongs to.

clearTreeNodeTree :: (MonadIO m, IsTreeNode o) => o -> m () Source #

Set the value of the “tree” property to Nothing. When overloading is enabled, this is equivalent to

clear #tree

constructTreeNodeTree :: (IsTreeNode o, MonadIO m, IsTree a) => a -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “tree” property. This is rarely needed directly, but it is used by new.

getTreeNodeTree :: (MonadIO m, IsTreeNode o) => o -> m Tree Source #

Get the value of the “tree” property. When overloading is enabled, this is equivalent to

get treeNode #tree

setTreeNodeTree :: (MonadIO m, IsTreeNode o, IsTree a) => o -> a -> m () Source #

Set the value of the “tree” property. When overloading is enabled, this is equivalent to

set treeNode [ #tree := value ]

useDimLabel

No description available in the introspection data.

constructTreeNodeUseDimLabel :: (IsTreeNode o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “use-dim-label” property. This is rarely needed directly, but it is used by new.

getTreeNodeUseDimLabel :: (MonadIO m, IsTreeNode o) => o -> m Bool Source #

Get the value of the “use-dim-label” property. When overloading is enabled, this is equivalent to

get treeNode #useDimLabel

setTreeNodeUseDimLabel :: (MonadIO m, IsTreeNode o) => o -> Bool -> m () Source #

Set the value of the “use-dim-label” property. When overloading is enabled, this is equivalent to

set treeNode [ #useDimLabel := value ]

useMarkup

If the "text" property includes GMarkup.

constructTreeNodeUseMarkup :: (IsTreeNode o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a GValueConstruct with valid value for the “use-markup” property. This is rarely needed directly, but it is used by new.

getTreeNodeUseMarkup :: (MonadIO m, IsTreeNode o) => o -> m Bool Source #

Get the value of the “use-markup” property. When overloading is enabled, this is equivalent to

get treeNode #useMarkup

setTreeNodeUseMarkup :: (MonadIO m, IsTreeNode o) => o -> Bool -> m () Source #

Set the value of the “use-markup” property. When overloading is enabled, this is equivalent to

set treeNode [ #useMarkup := value ]