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

## Functions

gboolean | rb_display_page_receive_drag ()
gboolean | rb_display_page_selectable ()
void | rb_display_page_selected ()
void | rb_display_page_deselected ()
void | rb_display_page_activate ()
GtkWidget * | rb_display_page_get_config_widget ()
void | rb_display_page_get_status ()
void | rb_display_page_delete_thyself ()
gboolean | rb_display_page_can_remove ()
void | rb_display_page_remove ()
void | rb_display_page_notify_status_changed ()

## Properties

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

## Signals

void | deleted | Run Last
void | status-changed | Run Last

## Types and Values

#define | RB_DISPLAY_PAGE_ICON_SIZE
struct | RBDisplayPage
struct | RBDisplayPageClass

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkBox
                        ╰── RBDisplayPage
                            ├── RBSource
                            ╰── RBDisplayPageGroup

## Implemented Interfaces

RBDisplayPage implements AtkImplementorIface, GtkBuildable and GtkOrientable.

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

## Functions

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

#### Parameters

page | a RBDisplayPage |

### rb_display_page_selected ()

    void
    rb_display_page_selected (RBDisplayPage *page);

Called when the page is selected in the page tree.

#### Parameters

page | a RBDisplayPage |

### rb_display_page_deselected ()

    void
    rb_display_page_deselected (RBDisplayPage *page);

Called when the page is deselected in the page tree.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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.

#### Parameters

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

#### Parameters

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.

#### Parameters

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.

#### Parameters

page | a RBDisplayPage |

## Types and Values

### RB_DISPLAY_PAGE_ICON_SIZE

    #define RB_DISPLAY_PAGE_ICON_SIZE GTK_ICON_SIZE_MENU

### struct RBDisplayPage

    struct RBDisplayPage;

### struct RBDisplayPageClass

    struct RBDisplayPageClass {
    	GtkBoxClass 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);
    };

## Property Details

### The `“icon”` property

      “icon”                     GIcon *

Icon to display in the page tree

Flags: Read / Write / Construct

### The `“name”` property

      “name”                     gchar *

Page name as displayed in the tree

Flags: Read / Write

Default value: NULL

### The `“parent”` property

      “parent”                   RBDisplayPage *

The parent page in the tree (may be NULL)

Flags: Read / Write / Construct Only

### The `“plugin”` property

      “plugin”                   GObject *

The plugin that created this page.

Flags: Read / Write / Construct

### The `“selected”` property

      “selected”                 gboolean

TRUE when the page is selected in the page tree.

Flags: Read

Default value: FALSE

### The `“shell”` property

      “shell”                    RBShell *

The rhythmbox shell object

Flags: Read / Write / Construct Only

### The `“visibility”` property

      “visibility”               gboolean

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

Flags: Read / Write

Default value: TRUE

## Signal Details

### The `“deleted”` signal

    void
    user_function (RBDisplayPage *page,
                   gpointer       user_data)

Emitted when the page is being deleted.

#### Parameters

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

Flags: Run Last

### The `“status-changed”` signal

    void
    user_function (RBDisplayPage *page,
                   gpointer       user_data)

Emitted when the page's status changes.

#### Parameters

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

Flags: Run Last