SwamiguiTree

SwamiguiTree

Synopsis

                    SwamiguiTree;
GtkWidget *         swamigui_tree_new                   (IpatchList *stores);
void                swamigui_tree_set_store_list        (SwamiguiTree *tree,
                                                         IpatchList *list);
IpatchList *        swamigui_tree_get_store_list        (SwamiguiTree *tree);
void                swamigui_tree_set_selected_store    (SwamiguiTree *tree,
                                                         SwamiguiTreeStore *store);
SwamiguiTreeStore * swamigui_tree_get_selected_store    (SwamiguiTree *tree);
GObject *           swamigui_tree_get_selection_single  (SwamiguiTree *tree);
IpatchList *        swamigui_tree_get_selection         (SwamiguiTree *tree);
void                swamigui_tree_clear_selection       (SwamiguiTree *tree);
void                swamigui_tree_set_selection         (SwamiguiTree *tree,
                                                         IpatchList *list);
void                swamigui_tree_spotlight_item        (SwamiguiTree *tree,
                                                         GObject *item);
void                swamigui_tree_search_set_start      (SwamiguiTree *tree,
                                                         GObject *start);
void                swamigui_tree_search_set_text       (SwamiguiTree *tree,
                                                         const char *text);
void                swamigui_tree_search_set_visible    (SwamiguiTree *tree,
                                                         gboolean visible);
void                swamigui_tree_search_next           (SwamiguiTree *tree);
void                swamigui_tree_search_prev           (SwamiguiTree *tree);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBox
                                 +----GtkVBox
                                       +----SwamiguiTree

Implemented Interfaces

SwamiguiTree implements AtkImplementorIface, GtkBuildable and GtkOrientable.

Properties

  "selected-store"           SwamiguiTreeStore*    : Read / Write
  "selection"                IpatchList*           : Read / Write
  "selection-single"         GObject*              : Read / Write
  "store-list"               IpatchList*           : Read / Write

Description

Details

SwamiguiTree

typedef struct _SwamiguiTree SwamiguiTree;

swamigui_tree_new ()

GtkWidget *         swamigui_tree_new                   (IpatchList *stores);

Create a new Swami tree object

stores :

List of tree stores to use or NULL to set later (see swamigui_tree_set_store_list()).

Returns :

Swami tree object

swamigui_tree_set_store_list ()

void                swamigui_tree_set_store_list        (SwamiguiTree *tree,
                                                         IpatchList *list);

Set the tree stores of a tree view. Each tree store gets its own tab in the tabbed tree.

tree :

Swami GUI tree view

list :

List of SwamiguiTreeStore objects, this list is used directly and should not be modified after calling this function.

swamigui_tree_get_store_list ()

IpatchList *        swamigui_tree_get_store_list        (SwamiguiTree *tree);

Gets the tree stores of a tree view.

tree :

Swami GUI tree view

Returns :

List of SwamiguiTreeStore objects or NULL if none, NO reference is added and so the list should only be used within the context of the calling function unless referenced or duplicated.

swamigui_tree_set_selected_store ()

void                swamigui_tree_set_selected_store    (SwamiguiTree *tree,
                                                         SwamiguiTreeStore *store);

Sets the currently selected store. The notebook tab containing store will be selected which will cause the current tree selection to be updated to the item selection of the GtkTreeView contained therein.

tree :

Swami tree object

store :

Store to select as the active store

swamigui_tree_get_selected_store ()

SwamiguiTreeStore * swamigui_tree_get_selected_store    (SwamiguiTree *tree);

Get the currently selected tree store (displayed in the current notebook tab).

tree :

Swami tree object

Returns :

Currently selected tree store or NULL if none. Not referenced and so caller should take care to reference it if using outside of calling scope.

swamigui_tree_get_selection_single ()

GObject *           swamigui_tree_get_selection_single  (SwamiguiTree *tree);

Get and insure single item selection in Swami tree object

tree :

Swami tree object

Returns :

The currently selected single item or NULL if multiple or no items are selected. A reference is not added so caller should take care to reference it if using outside of the calling scope.

swamigui_tree_get_selection ()

IpatchList *        swamigui_tree_get_selection         (SwamiguiTree *tree);

Get Swami tree selection.

tree :

Swami tree object

Returns :

List of items in the tree selection or NULL if no items selected. The returned list object is internal and should not be modified. NOTE - The list's reference count is not incremented, so if it is desirable to use the list beyond the scope of the calling function it should be duplicated or a reference added.

swamigui_tree_clear_selection ()

void                swamigui_tree_clear_selection       (SwamiguiTree *tree);

Clear tree selection (unselect all items)

tree :

Swami tree object

swamigui_tree_set_selection ()

void                swamigui_tree_set_selection         (SwamiguiTree *tree,
                                                         IpatchList *list);

Set the tree selection. List of objects must be in the same tree store (notebook tab). If items are in a non selected store it will become selected.

tree :

Swami tree object

list :

List of objects to select

swamigui_tree_spotlight_item ()

void                swamigui_tree_spotlight_item        (SwamiguiTree *tree,
                                                         GObject *item);

Spotlights an item in a Swami tree object by recursively expanding all nodes up the tree from item and moving the view to position item in the center of the view and then selects it. If the item is part of an unselected store (i.e., notebook tab), then it will become selected.

tree :

Swami tree object

item :

Object in tree to spotlight

swamigui_tree_search_set_start ()

void                swamigui_tree_search_set_start      (SwamiguiTree *tree,
                                                         GObject *start);

Sets the beginning object in tree to start searching from, the passed object is included in the search (can match).

tree :

Tree widget

start :

Start object to begin search from (inclusive, NULL for entire tree)

swamigui_tree_search_set_text ()

void                swamigui_tree_search_set_text       (SwamiguiTree *tree,
                                                         const char *text);

Set the text of the tree's search entry and update search selection.

tree :

Tree widget

text :

Text to set search to

swamigui_tree_search_set_visible ()

void                swamigui_tree_search_set_visible    (SwamiguiTree *tree,
                                                         gboolean visible);

Shows/hides the search entry below the tree.

tree :

Tree widget

active :

TRUE to show search entry, FALSE to hide it

swamigui_tree_search_next ()

void                swamigui_tree_search_next           (SwamiguiTree *tree);

Go to the previous matching item for the current search.

tree :

Tree widget

swamigui_tree_search_prev ()

void                swamigui_tree_search_prev           (SwamiguiTree *tree);

Property Details

The "selected-store" property

  "selected-store"           SwamiguiTreeStore*    : Read / Write

Selected tree store.


The "selection" property

  "selection"                IpatchList*           : Read / Write

Selection list (static).


The "selection-single" property

  "selection-single"         GObject*              : Read / Write

Single selected object.


The "store-list" property

  "store-list"               IpatchList*           : Read / Write

Tree store list.