EinaDock

EinaDock

Synopsis

                    EinaDock;
                    EinaDockClass;
enum                EinaDockFlag;
EinaDockTab *       eina_dock_add_widget                (EinaDock *self,
                                                         const gchar *id,
                                                         GtkWidget *widget,
                                                         GtkWidget *label,
                                                         EinaDockFlag flags);
gboolean            eina_dock_get_expanded              (EinaDock *self);
guint               eina_dock_get_n_widgets             (EinaDock *self);
gchar **            eina_dock_get_page_order            (EinaDock *self);
gboolean            eina_dock_get_resizable             (EinaDock *self);
EinaDock *          eina_dock_new                       (void);
gboolean            eina_dock_remove_widget             (EinaDock *self,
                                                         EinaDockTab *tab);
void                eina_dock_set_expanded              (EinaDock *self,
                                                         gboolean expanded);
void                eina_dock_set_page_order            (EinaDock *self,
                                                         gchar **order);
void                eina_dock_set_resizable             (EinaDock *self,
                                                         gboolean resizable);
gboolean            eina_dock_switch_widget             (EinaDock *self,
                                                         EinaDockTab *tab);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkWidget
               +----GtkContainer
                     +----GtkBox
                           +----EinaDock

Implemented Interfaces

EinaDock implements AtkImplementorIface, GtkBuildable and GtkOrientable.

Properties

  "page-order"               GStrv                 : Read / Write
  "resizable"                gboolean              : Read / Write

Signals

  "widget-add"                                     : Run Last
  "widget-remove"                                  : Run Last

Description

Details

EinaDock

typedef struct _EinaDock EinaDock;

EinaDockClass

typedef struct {
	GtkBoxClass parent_class;
	void (*widget_add)    (EinaDock *self, const gchar *id);
	void (*widget_remove) (EinaDock *self, const gchar *id);
} EinaDockClass;

enum EinaDockFlag

typedef enum {
	EINA_DOCK_FLAG_DEFAULT = 0,
	EINA_DOCK_FLAG_PRIMARY = 1
} EinaDockFlag;

Define how EinaDockTab are added to EinaDock

EINA_DOCK_FLAG_DEFAULT

Add EinaDockTab whatever fits better

EINA_DOCK_FLAG_PRIMARY

Add EinaDockTab as primary if possible

eina_dock_add_widget ()

EinaDockTab *       eina_dock_add_widget                (EinaDock *self,
                                                         const gchar *id,
                                                         GtkWidget *widget,
                                                         GtkWidget *label,
                                                         EinaDockFlag flags);

self: The EinaDock object id: A string identifying the widget, must be unique widget: The GtkWidget to add into the dock label: (allow-none): Optional label, if NULL a GtkLabel will be generated. This widget can be used to represent a shortcut to the item. flags: EinaDockFlag to use when adding the widget

Adds a new widget to the dock

Returns :

A EinaDockTab representing the widget. [transfer none]

eina_dock_get_expanded ()

gboolean            eina_dock_get_expanded              (EinaDock *self);

eina_dock_get_n_widgets ()

guint               eina_dock_get_n_widgets             (EinaDock *self);

Gets the number of widgets in the dock

self :

The EinaDock object

Returns :

Number of widgets in the dock

eina_dock_get_page_order ()

gchar **            eina_dock_get_page_order            (EinaDock *self);

self: The EinaDock object

Gets the value of the property 'page-order' as a NULL-terminated array of strings representing the order of the widgets based on they IDs

Returns :

the page-order property value. [element-type utf8][transfer full]

eina_dock_get_resizable ()

gboolean            eina_dock_get_resizable             (EinaDock *self);

self: The EinaDock object

Gets the value of the property 'resizable'

Returns :

the resizable property value

eina_dock_new ()

EinaDock *          eina_dock_new                       (void);

eina_dock_remove_widget ()

gboolean            eina_dock_remove_widget             (EinaDock *self,
                                                         EinaDockTab *tab);

Removes the widget described by tab from the EinaDock object.

self :

The EinaDock object.

tab :

A EinaDockTab representing the widget to remove.

Returns :

TRUE is operation is completed, FALSE otherwise.

eina_dock_set_expanded ()

void                eina_dock_set_expanded              (EinaDock *self,
                                                         gboolean expanded);

eina_dock_set_page_order ()

void                eina_dock_set_page_order            (EinaDock *self,
                                                         gchar **order);

self: The EinaDock object order: (transfer none): A NULL-terminated array of strings representing the order of widgets based on they IDs

Sets the value of the property page-order


eina_dock_set_resizable ()

void                eina_dock_set_resizable             (EinaDock *self,
                                                         gboolean resizable);

self: The EinaDock object resizable: Value for the resizable property

Sets the value of the property 'resizable'


eina_dock_switch_widget ()

gboolean            eina_dock_switch_widget             (EinaDock *self,
                                                         EinaDockTab *tab);

Forces the dock to show the widget represented by tab.

self :

The EinaDock object.

tab :

A EinaDockTab object representing the widget.

Returns :

TRUE is successful, FALSE otherwise

Property Details

The "page-order" property

  "page-order"               GStrv                 : Read / Write

page-order.


The "resizable" property

  "resizable"                gboolean              : Read / Write

resizable.

Default value: FALSE

Signal Details

The "widget-add" signal

void                user_function                      (EinaDock *einadock,
                                                        gchar    *arg1,
                                                        gpointer  user_data)      : Run Last

The "widget-remove" signal

void                user_function                      (EinaDock *einadock,
                                                        gchar    *arg1,
                                                        gpointer  user_data)      : Run Last