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

Data Structures

struct  _IconInterface
 Icon's interface. More...
struct  _Icon
 Definition of an Icon. More...
struct  _CairoIconContainerRenderer
 Definition of an Icon container (= an icon holding a sub-dock) renderer. More...

Defines

#define CAIRO_DOCK_IS_APPLI(icon)
#define CAIRO_DOCK_IS_APPLET(icon)
#define CAIRO_DOCK_IS_MULTI_APPLI(icon)
#define CAIRO_DOCK_IS_AUTOMATIC_SEPARATOR(icon)
#define CAIRO_DOCK_IS_USER_SEPARATOR(icon)
#define CAIRO_DOCK_IS_NORMAL_APPLI(icon)
#define CAIRO_DOCK_IS_DETACHABLE_APPLET(icon)

Enumerations

enum  CairoDockIconTrueType
 Definition of the type of icons.
enum  CairoDockIconGroup
 Definition of the groups of icons.
enum  CairoDockAnimationState
 Animation state of an icon, sorted by priority.

Functions

Iconcairo_dock_new_icon (void)
void cairo_dock_load_icon_image (Icon *icon, CairoContainer *pContainer)
void cairo_dock_load_icon_text (Icon *icon, CairoDockLabelDescription *pTextDescription)
void cairo_dock_load_icon_quickinfo (Icon *icon, CairoDockLabelDescription *pTextDescription, double fMaxScale)
void cairo_dock_load_icon_buffers (Icon *pIcon, CairoContainer *pContainer)

Detailed Description

This class defines the items contained in containers : Icons. An icon can either be:

  • a launcher (it has a command, a class, and possible an X window ID)
  • an appli (it has a X window ID and a class, no command)
  • an applet (it has a module instance and no command, possibly a class)
  • a container (it has a sub-dock and no class nor command)
  • a class icon (it has a bsub-dock and a class, but no command nor X ID)
  • a separator (it has nothing)

The class defines the methods used to create a generic Icon and to load its various buffers. Specialized Icons are created by the corresponding factory.


Define Documentation

#define CAIRO_DOCK_IS_APPLI (   icon)

TRUE if the icon holds a window.

Parameters:
iconan icon.
#define CAIRO_DOCK_IS_APPLET (   icon)

TRUE if the icon holds an instance of a module.

Parameters:
iconan icon.
#define CAIRO_DOCK_IS_MULTI_APPLI (   icon)

TRUE if the icon is an icon pointing on the sub-dock of a class.

Parameters:
iconan icon.
#define CAIRO_DOCK_IS_AUTOMATIC_SEPARATOR (   icon)

TRUE if the icon is an automatic separator.

Parameters:
iconan icon.
#define CAIRO_DOCK_IS_USER_SEPARATOR (   icon)

TRUE if the icon is a separator added by the user.

Parameters:
iconan icon.
#define CAIRO_DOCK_IS_NORMAL_APPLI (   icon)

TRUE if the icon is an icon d'appli only.

Parameters:
iconan icon.
#define CAIRO_DOCK_IS_DETACHABLE_APPLET (   icon)

TRUE if the icon is an icon d'applet detachable en desklet.

Parameters:
iconan icon.

Function Documentation

Icon* cairo_dock_new_icon ( void  )

Create an empty icon.

Returns:
the newly allocated icon object.
void cairo_dock_load_icon_image ( Icon icon,
CairoContainer pContainer 
)

Fill the image buffer (surface & texture) of a given icon, according to its type. Set its size if necessary, and fills the reflection buffer for cairo.

Parameters:
iconthe icon.
pContainerits container.
void cairo_dock_load_icon_text ( Icon icon,
CairoDockLabelDescription pTextDescription 
)

Fill the label buffer (surface & texture) of a given icon, according to a text description.

Parameters:
iconthe icon.
pTextDescriptiondesctiption of the text rendering.
void cairo_dock_load_icon_quickinfo ( Icon icon,
CairoDockLabelDescription pTextDescription,
double  fMaxScale 
)

Fill the quick-info buffer (surface & texture) of a given icon, according to a text description.

Parameters:
iconthe icon.
pTextDescriptiondesctiption of the text rendering.
fMaxScalemaximum zoom.
void cairo_dock_load_icon_buffers ( Icon pIcon,
CairoContainer pContainer 
)

Fill all the buffers (surfaces & textures) of a given icon, according to its type. Set its size accordingly, and fills the reflection buffer for cairo. Label and quick-info are loaded with the current global text description.

Parameters:
pIconthe icon.
pContainerits container.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines