RBDisplayPageTree

## RBDisplayPageTree RBDisplayPageTree — widget displaying the tree of RBDisplayPage instances |

## Synopsis

    struct              RBDisplayPageTree;
    struct              RBDisplayPageTreeClass;
    RBDisplayPageTree * rb_display_page_tree_new            (RBShell *shell);
    void                rb_display_page_tree_edit_source_name
                                                            (RBDisplayPageTree *display_page_tree,
                                                             RBSource *source);
    void                rb_display_page_tree_select         (RBDisplayPageTree *display_page_tree,
                                                             RBDisplayPage *page);
    void                rb_display_page_tree_toggle_expanded
                                                            (RBDisplayPageTree *display_page_tree,
                                                             RBDisplayPage *page);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GtkWidget
                   +----GtkContainer
                         +----GtkGrid
                               +----RBDisplayPageTree

## Implemented Interfaces

RBDisplayPageTree implements AtkImplementorIface, GtkBuildable and GtkOrientable.

## Properties

      "model"                    GtkTreeModel*         : Read
      "shell"                    RBShell*              : Read / Write / Construct Only

## Signals

      "drop-received"                                  : Run Last
      "selected"                                       : Run Last

## 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.

## Details

### 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);
    };

### rb_display_page_tree_new ()

    RBDisplayPageTree * rb_display_page_tree_new            (RBShell *shell);

Creates the display page tree widget.

`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.

`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.

`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.

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

## Property Details

### The `"model"` property

      "model"                    GtkTreeModel*         : Read

The GtkTreeModel for the display page tree

### The `"shell"` property

      "shell"                    RBShell*              : Read / Write / Construct Only

The RBShell instance

## Signal Details

### The `"drop-received"` signal

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

Emitted when a drag and drop to the tree completes.

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

### The `"selected"` signal

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

Emitted when a page is selected from the tree

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