Dazzle.Tree

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget Dazzle.Tree Dazzle.Tree GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.Scrollable Gtk.Scrollable GObject.GInterface->Gtk.Scrollable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container Gtk.TreeView Gtk.TreeView Gtk.Container->Gtk.TreeView Gtk.Scrollable->Gtk.TreeView Gtk.TreeView->Dazzle.Tree Gtk.Widget->Gtk.Container

Subclasses:

None

Methods

Inherited:

Gtk.TreeView (98), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.Scrollable (9)

Structs:

Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5)

add_builder (builder)

expand_to_node (node)

find_child_node (node, find_func, *user_data)

find_custom (equal_func, key)

find_item (item)

get_context_menu ()

get_root ()

get_selected ()

get_show_icons ()

rebuild ()

remove_builder (builder)

scroll_to_node (node)

set_context_menu (context_menu)

set_filter (filter_func, *filter_data)

set_root (node)

set_show_icons (show_icons)

unselect_all ()

Virtual Methods

Inherited:

Gtk.TreeView (15), Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10), Gtk.Scrollable (1)

do_action (action_group, action_name, param)

do_populate_popup (widget)

Properties

Inherited:

Gtk.TreeView (18), Gtk.Container (3), Gtk.Widget (39), Gtk.Scrollable (4)

Name

Type

Flags

Short Description

always-expand

bool

r/w/co

Always expand

context-menu

Gio.MenuModel

r/w

The context menu to display

root

Dazzle.TreeNode

r/w

The root object of the tree

selection

Dazzle.TreeNode

r/w

The node selection

show-icons

bool

r/w

Show Icons

Style Properties

Inherited:

Gtk.TreeView (11), Gtk.Widget (17)

Signals

Inherited:

Gtk.TreeView (15), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Name

Short Description

action

populate-popup

Fields

Inherited:

Gtk.TreeView (15), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)

Name

Type

Access

Description

parent_instance

Gtk.TreeView

r

Class Details

class Dazzle.Tree(*args, **kwargs)
Bases:

Gtk.TreeView

Abstract:

No

Structure:

Dazzle.TreeClass

add_builder(builder)
Parameters:

builder (Dazzle.TreeBuilder) – A Dazzle.TreeBuilder to add.

Add a builder to the tree.

expand_to_node(node)
Parameters:

node (Dazzle.TreeNode) –

find_child_node(node, find_func, *user_data)
Parameters:
Returns:

A Dazzle.TreeNode or None.

Return type:

Dazzle.TreeNode or None

Searches through the direct children of node for a matching child. find_func should return True if the child matches, otherwise False.

find_custom(equal_func, key)
Parameters:
Returns:

A Dazzle.TreeNode or None.

Return type:

Dazzle.TreeNode or None

Walks the entire tree looking for the first item that matches given equal_func and key.

The first parameter to equal_func will always be key. The second parameter will be the nodes Dazzle.TreeNode :item property.

find_item(item)
Parameters:

item (GObject.Object or None) – A GObject.Object or None.

Returns:

A Dazzle.TreeNode or None.

Return type:

Dazzle.TreeNode or None

Finds a Dazzle.TreeNode with an item property matching item.

get_context_menu()
Returns:

A Gio.MenuModel or None.

Return type:

Gio.MenuModel or None

get_root()
Returns:

A Dazzle.TreeNode or None.

Return type:

Dazzle.TreeNode or None

Retrieves the root node of the tree. The root node is not a visible node in the self, but a placeholder for all other builders to build upon.

get_selected()
Returns:

A Dazzle.TreeNode.

Return type:

Dazzle.TreeNode

Gets the currently selected node in the tree.

get_show_icons()
Return type:

bool

rebuild()
remove_builder(builder)
Parameters:

builder (Dazzle.TreeBuilder) – A Dazzle.TreeBuilder to remove.

Removes a builder from the tree.

scroll_to_node(node)
Parameters:

node (Dazzle.TreeNode) –

set_context_menu(context_menu)
Parameters:

context_menu (Gio.MenuModel) –

set_filter(filter_func, *filter_data)
Parameters:

Sets the filter function to be used to determine visability of a tree node.

set_root(node)
Parameters:

node (Dazzle.TreeNode) – A Dazzle.TreeNode.

Sets the root node of the Dazzle.Tree widget. This is used to build the items within the treeview. The item itself will not be added to the self, but the direct children will be.

set_show_icons(show_icons)
Parameters:

show_icons (bool) –

unselect_all()

Unselects the currently selected node in the tree.

do_action(action_group, action_name, param) virtual
Parameters:
  • action_group (str) –

  • action_name (str) –

  • param (str) –

do_populate_popup(widget) virtual
Parameters:

widget (Gtk.Widget) –

Signal Details

Dazzle.Tree.signals.action(tree, object, p0, p1)
Signal Name:

action

Flags:

RUN_LAST, ACTION

Parameters:
  • tree (Dazzle.Tree) – The object which received the signal

  • object (str) –

  • p0 (str) –

  • p1 (str) –

Dazzle.Tree.signals.populate_popup(tree, object)
Signal Name:

populate-popup

Flags:

RUN_LAST

Parameters:

Property Details

Dazzle.Tree.props.always_expand
Name:

always-expand

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Always expand

Dazzle.Tree.props.context_menu
Name:

context-menu

Type:

Gio.MenuModel

Default Value:

None

Flags:

READABLE, WRITABLE

The context menu to display

Dazzle.Tree.props.root
Name:

root

Type:

Dazzle.TreeNode

Default Value:

None

Flags:

READABLE, WRITABLE

The root object of the tree

Dazzle.Tree.props.selection
Name:

selection

Type:

Dazzle.TreeNode

Default Value:

None

Flags:

READABLE, WRITABLE

The node selection

Dazzle.Tree.props.show_icons
Name:

show-icons

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Show Icons