Cairo-Dock 2.4.0~1
cairo-dock-dock-factory.h File Reference

Data Structures

struct  _CairoDockRenderer
 Dock's renderer, also known as 'view'. More...
struct  _CairoDock
 Definition of a Dock, which derives from a Container. More...

Defines

#define CAIRO_DOCK_IS_DOCK(pContainer)
#define CAIRO_DOCK(pDock)
#define cairo_dock_insert_icon_in_dock(icon, pDock, bUpdateSize, bAnimated)
#define cairo_dock_remove_one_icon_from_dock(pDock, icon)
#define cairo_dock_remove_icon_from_dock(pDock, icon)
#define cairo_dock_add_new_launcher_by_uri(cExternDesktopFileURI, pReceivingDock, fOrder)
#define cairo_dock_add_new_launcher_by_type(iType, pReceivingDock, fOrder, iGroup)

Functions

void cairo_dock_insert_icon_in_dock_full (Icon *icon, CairoDock *pDock, gboolean bUpdateSize, gboolean bAnimated, gboolean bInsertSeparator, GCompareFunc pCompareFunc)
gboolean cairo_dock_detach_icon_from_dock (Icon *icon, CairoDock *pDock, gboolean bCheckUnusedSeparator)
void cairo_dock_remove_automatic_separators (CairoDock *pDock)
void cairo_dock_insert_separators_in_dock (CairoDock *pDock)
void cairo_dock_remove_icons_from_dock (CairoDock *pDock, CairoDock *pReceivingDock, const gchar *cReceivingDockName)

Detailed Description

This class defines the Docks, and gives the way to create, destroy, and fill them.

A dock is a container that holds a set of icons and a renderer (also known as view).

It has the ability to be placed anywhere on the screen edges and to resize itself automatically to fit the screen's size.

It supports internal dragging of its icons with the mouse, and dragging of itself with alt+mouse.

A dock can be either a main-dock (not linked to any icon) or a sub-dock (linked to an icon of another dock), and there can be as many docks of each sort as you want.


Define Documentation

#define CAIRO_DOCK_IS_DOCK (   pContainer)

Say if a Container is a Dock.

Parameters:
pContainerthe container.
Returns:
TRUE if the container is a Dock.
#define CAIRO_DOCK (   pDock)

Cast a Container into a Dock.

Parameters:
pDockthe container to consider as a dock.
Returns:
the dock.
#define cairo_dock_insert_icon_in_dock (   icon,
  pDock,
  bUpdateSize,
  bAnimated 
)

Insert an icon into a dock. Insert an automatic separator if needed. Do nothing if the icon already exists inside the dock.

Parameters:
iconthe icon to be inserted. It should have been filled beforehand.
pDockthe dock to insert inside.
bUpdateSizeTRUE to update the size of the dock after the insertion.
bAnimatedTRUE to arm the icon's animation for insertion.
#define cairo_dock_remove_one_icon_from_dock (   pDock,
  icon 
)

Completely remove an icon from the dock, that is to say detach the icon, and remove all links with Cairo-Dock : its .desktop is deleted, its module is deactivated, and its Xid is removed from the Taskbar (its class is handled too). Unnecessary separators are not tested. The icon is not yet destroyed, but looses its sub-dock in case of a container launcher.

Parameters:
pDockthe dock containing the icon, or NULL if the icon is already detached.
iconthe icon to be removed.
#define cairo_dock_remove_icon_from_dock (   pDock,
  icon 
)

Completely remove an icon from the dock, that is to say detach the icon, and remove all links with Cairo-Dock : its .desktop is deleted, its module is deactivated, and its Xid is removed from the Taskbar (its class is handled too). Unnecessary separators are removed as well. The icon is not yet destroyed, but looses its sub-dock in case of a container launcher.

Parameters:
pDockthe dock containing the icon, or NULL if the icon is already detached.
iconthe icon to be removed.
#define cairo_dock_add_new_launcher_by_uri (   cExternDesktopFileURI,
  pReceivingDock,
  fOrder 
)

Add a launcher from a common desktop file : create and add the corresponding .desktop file with the others, load the corresponding icon, and insert it inside a dock with an animtion.

Parameters:
cExternDesktopFileURIpath to a desktop file.
pReceivingDockthe dock that will hold the new launcher.
fOrderthe order of the icon inside the dock.
Returns:
the newly created Icon corresponding to the file, or NULL if an error occured.
#define cairo_dock_add_new_launcher_by_type (   iType,
  pReceivingDock,
  fOrder,
  iGroup 
)

Add an empty default launcher of a given type : create and add the corresponding .desktop file with the others, load the corresponding icon, and insert it inside a dock with an animtion. The launcher is then suitable for being edited by the user to add real properties.

Parameters:
iTypetype of the launcher.
pReceivingDockthe dock that will hold the new launcher.
fOrderthe order of the icon inside the dock.
iGroupthe group it will belong to
Returns:
the newly created Icon corresponding to the type, or NULL if an error occured.

Function Documentation

void cairo_dock_insert_icon_in_dock_full ( Icon icon,
CairoDock pDock,
gboolean  bUpdateSize,
gboolean  bAnimated,
gboolean  bInsertSeparator,
GCompareFunc  pCompareFunc 
)

Insert an icon into a dock. Do nothing if the icon already exists inside the dock.

Parameters:
iconthe icon to be inserted. It should have been filled beforehand.
pDockthe dock to insert inside.
bUpdateSizeTRUE to update the size of the dock after the insertion.
bAnimatedTRUE to arm the icon's animation for insertion.
bInsertSeparatorTRUE to insert an automatic separator if needed.
pCompareFunca sorting function to place the new icon amongst the others, or NULL to sort by group/order.
gboolean cairo_dock_detach_icon_from_dock ( Icon icon,
CairoDock pDock,
gboolean  bCheckUnusedSeparator 
)

Detach an icon from its dock. The icon is not destroyed, and can be directly re-inserted in another container; it keeps its sub-dock, but looses its dialogs. Do nothing if the icon doesn't exist inside the dock.

Parameters:
iconthe icon to detach.
pDockthe dock containing the icon.
bCheckUnusedSeparatorTRUE to check and remove unnecessary separators.
Returns:
TRUE if the icon has been detached.
void cairo_dock_remove_automatic_separators ( CairoDock pDock)

Remove and destroy all automatic separators inside a dock.

Parameters:
pDockthe dock.
void cairo_dock_insert_separators_in_dock ( CairoDock pDock)

Add automatic separators between the different types of icons inside a dock.

Parameters:
pDockthe dock.
void cairo_dock_remove_icons_from_dock ( CairoDock pDock,
CairoDock pReceivingDock,
const gchar *  cReceivingDockName 
)

Remove all icons from a dock (and its sub-docks). If the receiving dock is NULL, the icons are destroyed and removed from the current theme itself.

Parameters:
pDocka dock.
pReceivingDockthe dock that will receive the icons, or NULL to destroy and remove the icons.
cReceivingDockNamename of the receiving dock.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines