RBDisplayPage

## RBDisplayPage RBDisplayPage — base class for items that appear in the display page tree |

## Synopsis

    #define             RB_DISPLAY_PAGE_ICON_SIZE
    struct              RBDisplayPage;
    struct              RBDisplayPageClass;
    gboolean            rb_display_page_receive_drag        (RBDisplayPage *page,
                                                             GtkSelectionData *data);
    gboolean            rb_display_page_selectable          (RBDisplayPage *page);
    void                rb_display_page_selected            (RBDisplayPage *page);
    void                rb_display_page_deselected          (RBDisplayPage *page);
    void                rb_display_page_activate            (RBDisplayPage *page);
    GtkWidget *         rb_display_page_get_config_widget   (RBDisplayPage *page,
                                                             RBShellPreferences *prefs);
    void                rb_display_page_get_status          (RBDisplayPage *page,
                                                             char **text,
                                                             char **progress_text,
                                                             float *progress);
    void                rb_display_page_delete_thyself      (RBDisplayPage *page);
    gboolean            rb_display_page_can_remove          (RBDisplayPage *page);
    void                rb_display_page_remove              (RBDisplayPage *page);
    void                rb_display_page_notify_status_changed
                                                            (RBDisplayPage *page);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GtkWidget
                   +----GtkContainer
                         +----GtkBox
                               +----GtkHBox
                                     +----RBDisplayPage
                                           +----RBSource
                                           +----RBDisplayPageGroup

## Implemented Interfaces

RBDisplayPage implements AtkImplementorIface, GtkBuildable and GtkOrientable.

## Properties

      "icon"                     GIcon*                : Read / Write / Construct
      "name"                     gchar*                : Read / Write
      "parent"                   RBDisplayPage*        : Read / Write / Construct Only
      "plugin"                   GObject*              : Read / Write / Construct
      "selected"                 gboolean              : Read
      "shell"                    RBShell*              : Read / Write / Construct Only
      "visibility"               gboolean              : Read / Write

## Signals

      "deleted"                                        : Run Last
      "status-changed"                                 : Run Last

## Description

This is the base class for items that appear in the display page tree and can occupy the main display area. Sources and source groups are display pages. Other types of display, such as music visualization, could be implemented as display pages too.

The display page object itself is the widget shown in the main display area. The icon and name properties control its appearance in the display page tree, and its location is determined by its parent display page, the sorting rules for its source group (if any), and insertion order. The visibility property controls whether the display page is actually shown in the display page tree at all.

## Details

### RB_DISPLAY_PAGE_ICON_SIZE

    #define RB_DISPLAY_PAGE_ICON_SIZE GTK_ICON_SIZE_MENU

### struct RBDisplayPage

    struct RBDisplayPage;

### struct RBDisplayPageClass

    struct RBDisplayPageClass {
    	GtkHBoxClass parent_class;

    	/* signals */
    	void (*status_changed) (RBDisplayPage *page);
    	void (*deleted)		(RBDisplayPage *page);

    	/* methods */
    	gboolean (*selectable)		(RBDisplayPage *page);
    	void (*selected)		(RBDisplayPage *page);
    	void (*deselected)		(RBDisplayPage *page);
    	void (*activate)		(RBDisplayPage *page);

    	GtkWidget *(*get_config_widget) (RBDisplayPage *page, RBShellPreferences *prefs);

    	void (*get_status)		(RBDisplayPage *page, char **text, char **progress_text, float *progress);
    	gboolean (*receive_drag) (RBDisplayPage *page, GtkSelectionData *data);
    	void (*delete_thyself) (RBDisplayPage *page);

    	gboolean (*can_remove)		(RBDisplayPage *page);
    	void (*remove)		(RBDisplayPage *page);
    };

### rb_display_page_receive_drag ()

    gboolean            rb_display_page_receive_drag        (RBDisplayPage *page,
                                                             GtkSelectionData *data);

### rb_display_page_selectable ()

    gboolean            rb_display_page_selectable          (RBDisplayPage *page);

Checks if `page` can be selected

`page` : | a RBDisplayPage

### rb_display_page_selected ()

    void                rb_display_page_selected            (RBDisplayPage *page);

Called when the page is selected in the page tree.

`page` : | a RBDisplayPage

### rb_display_page_deselected ()

    void                rb_display_page_deselected          (RBDisplayPage *page);

Called when the page is deselected in the page tree.

`page` : | a RBDisplayPage

### rb_display_page_activate ()

    void                rb_display_page_activate            (RBDisplayPage *page);

Called when the page is activated (double clicked, etc.) in the page tree.

`page` : | a RBDisplayPage

### rb_display_page_get_config_widget ()

    GtkWidget *         rb_display_page_get_config_widget   (RBDisplayPage *page,
                                                             RBShellPreferences *prefs);

Source implementations can use this to return an optional configuration widget. The widget will be displayed in a page in the preferences dialog.

`page` : | a RBDisplayPage
`prefs` : | the RBShellPreferences object
Returns : | configuration widget. [transfer none]

### rb_display_page_get_status ()

    void                rb_display_page_get_status          (RBDisplayPage *page,
                                                             char **text,
                                                             char **progress_text,
                                                             float *progress);

Retrieves the details to display in the status bar for the page. If the progress value returned is less than zero, the progress bar will pulse. If the progress value is greater than or equal to 1, the progress bar will be hidden.

`page` : | a RBDisplayPage
`text` : | holds the returned status text. [inout][allow-none][transfer full]
`progress_text` : | holds the returned text for the progress bar. [inout][allow-none][transfer full]
`progress` : | holds the progress value. [inout][allow-none]

### rb_display_page_delete_thyself ()

    void                rb_display_page_delete_thyself      (RBDisplayPage *page);

This is called when the page should delete itself. The 'deleted' signal will be emitted, which removes the page from the page model. This will not actually dispose of the page object, so reference counting must still be handled correctly.

`page` : | a RBDisplayPage

### rb_display_page_can_remove ()

    gboolean            rb_display_page_can_remove          (RBDisplayPage *page);

Called to check whether the user is able to remove the page

`page` : | a RBDisplayPage
Returns : | `TRUE` if the page can be removed

### rb_display_page_remove ()

    void                rb_display_page_remove              (RBDisplayPage *page);

Called when the user requests removal of a page.

`page` : | a RBDisplayPage

### rb_display_page_notify_status_changed ()

    void                rb_display_page_notify_status_changed
                                                            (RBDisplayPage *page);

Page implementations call this when their status bar information changes.

`page` : | a RBDisplayPage

## Property Details

### The `"icon"` property

      "icon"                     GIcon*                : Read / Write / Construct

Icon to display in the page tree

### The `"name"` property

      "name"                     gchar*                : Read / Write

Page name as displayed in the tree

Default value: NULL

### The `"parent"` property

      "parent"                   RBDisplayPage*        : Read / Write / Construct Only

The parent page in the tree (may be NULL)

### The `"plugin"` property

      "plugin"                   GObject*              : Read / Write / Construct

The plugin that created this page.

### The `"selected"` property

      "selected"                 gboolean              : Read

TRUE when the page is selected in the page tree.

Default value: FALSE

### The `"shell"` property

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

The rhythmbox shell object

### The `"visibility"` property

      "visibility"               gboolean              : Read / Write

If FALSE, the page will not be displayed in the tree

Default value: TRUE

## Signal Details

### The `"deleted"` signal

    void                user_function                      (RBDisplayPage *page,
                                                            gpointer       user_data)      : Run Last

Emitted when the page is being deleted.

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

### The `"status-changed"` signal

    void                user_function                      (RBDisplayPage *page,
                                                            gpointer       user_data)      : Run Last

Emitted when the page's status changes.

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