## DhBookTree DhBookTree — A GtkTreeView containing the tree structure of all enabled DhBook's |

## Functions

DhBookTree * | dh_book_tree_new ()
void | dh_book_tree_select_uri ()
DhLink * | dh_book_tree_get_selected_book ()

## Signals

void | link-selected | Run Last

## Types and Values

struct | DhBookTree

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkTreeView
                        ╰── DhBookTree

## Implemented Interfaces

DhBookTree implements AtkImplementorIface, GtkBuildable and GtkScrollable.

## Includes

    #include <devhelp/devhelp.h>

## Description

DhBookTree is a GtkTreeView (showing a tree, not a list) containing the general tree structure of all enabled DhBook's.

The `dh_book_get_tree()` function is called to get the tree structure of a DhBook. As such the tree contains only DhLink's of type `DH_LINK_TYPE_BOOK` or `DH_LINK_TYPE_PAGE`.

When an element is selected, the “link-selected” signal is emitted. Only one element can be selected at a time.

## Functions

### dh_book_tree_new ()

    DhBookTree *
    dh_book_tree_new (void);

#### Returns

a new DhBookTree widget.

[transfer floating]

### dh_book_tree_select_uri ()

    void
    dh_book_tree_select_uri (DhBookTree *tree,
                             const gchar *uri);

Selects the given `uri` .

#### Parameters

tree | a DhBookTree. |
uri | the URI to select. |

### dh_book_tree_get_selected_book ()

    DhLink *
    dh_book_tree_get_selected_book (DhBookTree *tree);

#### Parameters

tree | a DhBookTree. |

#### Returns

the DhLink of the selected book, or `NULL` if there is no selection.

[nullable][transfer none]

## Types and Values

### struct DhBookTree

    struct DhBookTree;

## Signal Details

### The `“link-selected”` signal

    void
    user_function (DhBookTree *tree,
                   DhLink     *link,
                   gpointer    user_data)

#### Parameters

tree | the DhBookTree. |
link | the selected DhLink. |
user_data | user data set when the signal handler was connected. |

Flags: Run Last