midori-panel

midori-panel

Functions

Includes

#include <midori/midori.h>

Description

Functions

midori_panel_new ()

GtkWidget *
midori_panel_new (void);

Creates a new empty panel.

Returns

a new MidoriPanel.

[transfer full]


midori_panel_set_right_aligned ()

void
midori_panel_set_right_aligned (MidoriPanel *panel,
                                gboolean right_aligned);

Determines if the panel should be right aligned.

Parameters

right_aligned

TRUE if the panel should be aligned to the right

 

Since: 0.1.3


midori_panel_append_page ()

gint
midori_panel_append_page (MidoriPanel *panel,
                          MidoriViewable *viewable);

Appends a new page to the panel. If toolbar is specified it will be packed above viewable .

Since 0.1.3 destroying the viewable implicitly removes the page including the menu and eventual toolbar.

Since 0.2.1 a hidden viewable will not be shown in the panel.

Since 0.2.1 an action with an accelerator is created implicitly.

In the case of an error, -1 is returned.

Parameters

panel

a MidoriPanel

 

viewable

a viewable widget

 

Returns

the index of the new page, or -1


midori_panel_get_current_page ()

gint
midori_panel_get_current_page (MidoriPanel *panel);

Retrieves the index of the currently selected page.

If panel has no children, -1 is returned.

Parameters

panel

a MidoriPanel

 

Returns

the index of the current page, or -1


midori_panel_get_nth_page ()

GtkWidget *
midori_panel_get_nth_page (MidoriPanel *panel,
                           guint page_num);

Retrieves the child widget of the nth page.

If panel has no children, NULL is returned.

Parameters

panel

a MidoriPanel

 

Returns

the child widget of the new page, or NULL.

[transfer none]


midori_panel_get_n_pages ()

guint
midori_panel_get_n_pages (MidoriPanel *panel);

Retrieves the number of pages contained in the panel.

Parameters

panel

a MidoriPanel

 

Returns

the number of pages


midori_panel_page_num ()

gint
midori_panel_page_num (MidoriPanel *panel,
                       GtkWidget *child);

Retrieves the index of the page associated to widget .

If panel has no children, -1 is returned.

Parameters

panel

a MidoriPanel

 

Returns

the index of page associated to widget , or -1


midori_panel_set_current_page ()

void
midori_panel_set_current_page (MidoriPanel *panel,
                               gint n);

Switches to the page with the given index.

The child must be visible, otherwise the underlying GtkNotebook will silently ignore the attempt to switch the page.

Since 0.1.8 the "page" property is notifying changes.

Since 0.2.1 switching to hidden pages fails silently.

Parameters

panel

a MidoriPanel

 

n

index of the page to switch to, or -1 to mean the last page

 

midori_panel_append_widget ()

gint
midori_panel_append_widget (MidoriPanel *panel,
                            GtkWidget *widget,
                            const gchar *stock_id,
                            const gchar *label,
                            GtkWidget *toolbar);

Appends an arbitrary widget to the panel by wrapping it in a MidoriViewable created on the fly.

Actually implementing MidoriViewable instead of using this convenience is recommended.

Since 0.1.3 destroying the widget implicitly removes the page including the menu and eventual toolbar.

In the case of an error, -1 is returned.

Parameters

panel

a MidoriPanel

 

widget

the child widget

 

stock_id

a stock ID

 

label

a string to use as the label, or NULL

 

toolbar

a toolbar widget, or NULL

 

Returns

the index of the new page, or -1

Types and Values