GtdPanel

GtdPanel — interface for panels

Stability Level

Unstable, unless otherwise indicated

Functions

Properties

GIcon * icon Read
GMenu * menu Read
gchar * name Read
guint priority Read
gchar * subtitle Read
gchar * title Read

Types and Values

Object Hierarchy

    GInterface
    ╰── GtdPanel

Prerequisites

GtdPanel requires GtkWidget.

Description

The GtdPanel interface must be implemented by plugins that want a given widget to be shown as a panel in the main window. Examples of panels are the "Today" and "Scheduled" panels.

A panel must have a unique name (see “name”) and a title. The title can change dynamically. Avoid long titles.

The panel may also provide header widgets, which will be placed in the headerbar according to the “halign” property. See gtd_panel_get_header_widgets() for a detailed explanation.

The “icon” and “priority” properties are used by the sidebar. The former is used to display the icon, and the latter is used to determine the position of the panel relative to the others panels.

At last, a GtdPanel implementation may provide a GMenu that will be appended to the window menu.

Functions

gtd_panel_get_panel_name ()

const gchar *
gtd_panel_get_panel_name (GtdPanel *panel);

Retrieves the name of panel

Parameters

panel

a GtdPanel

 

Returns

the name of panel .

[transfer none]


gtd_panel_get_panel_title ()

const gchar *
gtd_panel_get_panel_title (GtdPanel *panel);

Retrieves the title of panel

Parameters

panel

a GtdPanel

 

Returns

the title of panel .

[transfer none]


gtd_panel_get_header_widgets ()

GList *
gtd_panel_get_header_widgets (GtdPanel *panel);

Retrieves the list of widgets to be placed at headerbar. The position of the widget is determined by the “halign” property.

Widgets with GTK_ALIGN_START halign will be packed into the start of the headerbar, and GTK_ALIGN_END at the end. Other values are silently ignored.

Parameters

panel

a GtdPanel

 

Returns

the list of GtkWidget.

[transfer container][element-type Gtk.Widget]


gtd_panel_get_menu ()

const GMenu *
gtd_panel_get_menu (GtdPanel *panel);

Retrieves the gear menu of panel .

Parameters

panel

a GtdPanel

 

Returns

a GMenu.

[transfer none]

Types and Values

GTD_TYPE_PANEL

#define GTD_TYPE_PANEL (gtd_panel_get_type ())

struct GtdPanelInterface

struct GtdPanelInterface {
  GTypeInterface parent;

  const gchar*       (*get_panel_name)                     (GtdPanel        *panel);

  const gchar*       (*get_panel_title)                    (GtdPanel        *panel);

  GList*             (*get_header_widgets)                 (GtdPanel        *panel);

  const GMenu*       (*get_menu)                           (GtdPanel        *panel);

  GIcon*            (*get_icon)                            (GtdPanel        *self);

  guint32           (*get_priority)                        (GtdPanel        *self);

  gchar*            (*get_subtitle)                        (GtdPanel        *self);
};

GtdPanel

typedef struct _GtdPanel GtdPanel;

Property Details

The “icon” property

  “icon”                     GIcon *

The icon of the panel.

Flags: Read


The “menu” property

  “menu”                     GMenu *

The user-visible title of the panel.

Flags: Read


The “name” property

  “name”                     gchar *

The identifier name of the panel.

Flags: Read

Default value: NULL


The “priority” property

  “priority”                 guint

The priority of the panel.

Flags: Read

Default value: 0


The “subtitle” property

  “subtitle”                 gchar *

The user-visible subtitle of the panel.

Flags: Read

Default value: NULL


The “title” property

  “title”                    gchar *

The user-visible title of the panel.

Flags: Read

Default value: NULL