Top | ![]() |
![]() |
![]() |
![]() |
const gchar * | gtd_panel_get_panel_name () |
const gchar * | gtd_panel_get_panel_title () |
GList * | gtd_panel_get_header_widgets () |
const GMenu * | gtd_panel_get_menu () |
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.
const gchar *
gtd_panel_get_panel_name (GtdPanel *panel
);
Retrieves the name of panel
const gchar *
gtd_panel_get_panel_title (GtdPanel *panel
);
Retrieves the title of panel
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.
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); };
“name”
property“name” gchar *
The identifier name of the panel.
Flags: Read
Default value: NULL
“subtitle”
property“subtitle” gchar *
The user-visible subtitle of the panel.
Flags: Read
Default value: NULL
“title”
property“title” gchar *
The user-visible title of the panel.
Flags: Read
Default value: NULL