## RBDisplayPageTree

RBDisplayPageTree — widget displaying the tree of RBDisplayPage instances

## Functions

RBDisplayPageTree * | rb_display_page_tree_new ()
void | rb_display_page_tree_edit_source_name ()
void | rb_display_page_tree_select ()
void | rb_display_page_tree_toggle_expanded ()

## Properties

GtkTreeModel * | model | Read
RBShell * | shell | Read / Write / Construct Only

## Signals

void | drop-received | Run Last
void | selected | Run Last

## Types and Values

struct | RBDisplayPageTree
struct | RBDisplayPageTreeClass

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkGrid
                        ╰── RBDisplayPageTree

## Implemented Interfaces

RBDisplayPageTree implements AtkImplementorIface, GtkBuildable and GtkOrientable.

## Description

The display page tree widget is a GtkTreeView backed by a GtkListStore containing the display page instances (sources and other things). Display pages include sources, such as the library and playlists, and other things like the visualization display.

Display pages are shown in the list with an icon and the name. The current playing source is displayed in bold.

Sources are divided into groups - library, stores, playlists, devices, network shares. Groups are displayed as headers, with expanders for hiding and showing the sources in the group. Sources themselves may also have child sources, such as playlists on portable audio players.

## Functions

### rb_display_page_tree_new ()

    RBDisplayPageTree *
    rb_display_page_tree_new (RBShell *shell);

Creates the display page tree widget.

#### Parameters

shell | the RBShell instance |

#### Returns

the display page tree widget.

### rb_display_page_tree_edit_source_name ()

    void
    rb_display_page_tree_edit_source_name (RBDisplayPageTree *display_page_tree,
                                           RBSource *source);

Initiates editing of the name of the specified source. The row for the source is selected and given input focus, allowing the user to edit the name. source_name_edited_cb is called when the user finishes editing.

#### Parameters

display_page_tree | the RBDisplayPageTree |
source | the RBSource to edit |

### rb_display_page_tree_select ()

    void
    rb_display_page_tree_select (RBDisplayPageTree *display_page_tree,
                                 RBDisplayPage *page);

Selects the specified page in the tree. This will result in the 'selected' signal being emitted.

#### Parameters

display_page_tree | the RBDisplayPageTree |
page | the RBDisplayPage to select |

### rb_display_page_tree_toggle_expanded ()

    void
    rb_display_page_tree_toggle_expanded (RBDisplayPageTree *display_page_tree,
                                          RBDisplayPage *page);

If `page` is expanded (children visible), collapses it, otherwise expands it.

#### Parameters

display_page_tree | the RBDisplayPageTree |
page | the RBDisplayPage to toggle |

## Types and Values

### struct RBDisplayPageTree

    struct RBDisplayPageTree;

### struct RBDisplayPageTreeClass

    struct RBDisplayPageTreeClass {
    	GtkGridClass parent_class;

    	/* signals */
    	void (*selected) (RBDisplayPageTree *tree, RBDisplayPage *page);
    	void (*drop_received) (RBDisplayPageTree *tree, RBDisplayPage *page, GtkSelectionData *data);
    };

## Property Details

### The `“model”` property

      “model”                    GtkTreeModel *

The GtkTreeModel for the display page tree

Flags: Read

### The `“shell”` property

      “shell”                    RBShell *

The RBShell instance

Flags: Read / Write / Construct Only

## Signal Details

### The `“drop-received”` signal

    void
    user_function (RBDisplayPageTree *tree,
                   gpointer           page,
                   gpointer           data,
                   gpointer           user_data)

Emitted when a drag and drop to the tree completes.

#### Parameters

tree | the RBDisplayPageTree |
page | the RBDisplagePage receiving the drop |
data | the drop data |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

### The `“selected”` signal

    void
    user_function (RBDisplayPageTree *tree,
                   GObject           *page,
                   gpointer           user_data)

Emitted when a page is selected from the tree

#### Parameters

tree | the RBDisplayPageTree |
page | the newly selected RBDisplayPage |
user_data | user data set when the signal handler was connected. |

Flags: Run Last