## GtdPanel GtdPanel — interface for panels |

## Stability Level

Unstable, unless otherwise indicated

## Functions

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 ()

## Properties

GMenu * | menu | Read
gchar * | name | Read
gchar * | title | Read

## Types and Values

#define | GTD_TYPE_PANEL
struct | GtdPanelInterface
| GtdPanel

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

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);
    };

### GtdPanel

    typedef struct _GtdPanel GtdPanel;

## Property Details

### 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 `“title”` property

      “title”                    gchar *

The user-visible title of the panel.

Flags: Read

Default value: NULL