![]() |
![]() |
![]() |
GNOME Docking Library Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
#define GDL_DOCK_OBJECT_GET_MASTER (object) struct GdlDockMaster; enum GdlSwitcherStyle; void gdl_dock_master_add (GdlDockMaster *master
,GdlDockObject *object
); void gdl_dock_master_remove (GdlDockMaster *master
,GdlDockObject *object
); void gdl_dock_master_set_controller (GdlDockMaster *master
,GdlDockObject *new_controller
); GdlDockObject * gdl_dock_master_get_controller (GdlDockMaster *master
); GdlDockObject * gdl_dock_master_get_object (GdlDockMaster *master
,const gchar *nick_name
); void gdl_dock_master_foreach (GdlDockMaster *master
,GFunc function
,gpointer user_data
); void gdl_dock_master_foreach_toplevel (GdlDockMaster *master
,gboolean include_controller
,GFunc function
,gpointer user_data
);
"default-title" gchar* : Read / Write "locked" gint : Read / Write "switcher-style" GdlSwitcherStyle : Read / Write
For the toplevel docks to be able to interact with each other, when the user drags items from one place to another, they're all kept in a user-invisible and automatic object called the master. To participate in docking operations every GdlDockObject must have the same master, the binding to the master is done automatically.
The master also keeps track of the manual items, mostly those created with gdl_dock_*_new functions which are in the dock. This is so the user doesn't need to keep track of them, but can perform operations like hiding and such.
The master is responsible for creating automatically compound widgets. When the user drops a widget on a simple one, a notebook or a paned compound widget containing both widgets is created and replace it. Such widgets are hidden automatically when they have less than two children.
One of the top level dock item of the master is considered as the controller. This controller is an user visible representation of the master. A floating dock widget will use a dock object having the same properties than this controller. You can show or hide all dock widgets of the master by showing or hiding the controller. This controller is assigned to the master automatically. If the controller dock widget is removed, a new top level dock widget will be automatically used as controller. If there is no other dock widget, the master will be destroyed.
#define GDL_DOCK_OBJECT_GET_MASTER(object)
GDL_DOCK_OBJECT_GET_MASTER
has been deprecated since version 3.6 and should not be used in newly-written code. Use gdl_dock_object_get_master()
Retrieve the GdlDockMaster object managing the object.
|
A GdlDockObject |
typedef enum { GDL_SWITCHER_STYLE_TEXT, GDL_SWITCHER_STYLE_ICON, GDL_SWITCHER_STYLE_BOTH, GDL_SWITCHER_STYLE_TOOLBAR, GDL_SWITCHER_STYLE_TABS, GDL_SWITCHER_STYLE_NONE } GdlSwitcherStyle;
Used to customize the appearance of the tabs in GdlDockNotebook.
Tabs display only text labels. | |
Tabs display only icons. | |
Tabs display text and icons. | |
Same as GDL_SWITCHER_STYLE_BOTH .
|
|
Tabs display like notebook tabs. | |
Do not display tabs. |
void gdl_dock_master_add (GdlDockMaster *master
,GdlDockObject *object
);
Add a new dock widget to the master.
|
a GdlDockMaster |
|
a GdlDockObject |
void gdl_dock_master_remove (GdlDockMaster *master
,GdlDockObject *object
);
Remove one dock widget from the master.
|
a GdlDockMaster |
|
a GdlDockObject |
void gdl_dock_master_set_controller (GdlDockMaster *master
,GdlDockObject *new_controller
);
Set a new controller. The controller must be a top level GdlDockObject.
|
a GdlDockMaster |
|
a GdlDockObject |
GdlDockObject * gdl_dock_master_get_controller (GdlDockMaster *master
);
Retrieves the GdlDockObject acting as the controller.
|
a GdlDockMaster |
Returns : |
A GdlDockObject. [transfer none] |
GdlDockObject * gdl_dock_master_get_object (GdlDockMaster *master
,const gchar *nick_name
);
Looks for a GdlDockObject named nick_name
.
|
a GdlDockMaster |
|
the name of the dock widget. |
Returns : |
A GdlDockObject named nick_name or NULL if it does not exist. [allow-none][transfer none]
|
void gdl_dock_master_foreach (GdlDockMaster *master
,GFunc function
,gpointer user_data
);
Call function
on each dock widget of the master.
|
a GdlDockMaster |
|
the function to call with each element's data. [scope call] |
|
user data to pass to the function |
void gdl_dock_master_foreach_toplevel (GdlDockMaster *master
,gboolean include_controller
,GFunc function
,gpointer user_data
);
Call function
on each top level dock widget of the master, including or not
the controller.
|
a GdlDockMaster |
|
TRUE to include the controller |
|
the function to call with each element's data. [scope call] |
|
user data to pass to the function |
"default-title"
property "default-title" gchar* : Read / Write
Default title for newly created floating docks.
Default value: NULL
"locked"
property "locked" gint : Read / Write
If is set to 1, all the dock items bound to the master are locked; if it's 0, all are unlocked; -1 indicates inconsistency among the items.
Allowed values: [G_MAXULONG,1]
Default value: 0
"switcher-style"
property"switcher-style" GdlSwitcherStyle : Read / Write
Switcher buttons style.
Default value: GDL_SWITCHER_STYLE_BOTH
"layout-changed"
signalvoid user_function (GdlDockMaster *arg0,
gpointer user_data) : Run Last
Signals that the layout has changed, one or more widgets have been moved, added or removed.
|
user data set when the signal handler was connected. |