]>
Dogcows Code - chaz/tint2/blob - src/util/area.h
0499e1a294439b630e2dd27609904e01756153ba
1 /**************************************************************************
2 * Copyright (C) 2008 thierry lorthiois (lorthiois@bbsoft.fr)
4 * base class for all graphical objects (panel, taskbar, task, systray, clock, ...).
5 * Area is at the begining of each graphical object so &object == &area.
7 * Area manage the background and border drawing, size and padding.
8 * Area also manage the tree of visible objects
9 * panel -> taskbars -> tasks
13 * draw_foreground(obj) and draw(obj) are virtual function.
15 * resize_width(obj, width) = 0 : fonction virtuelle à redéfinir
16 * recalcule la largeur de l'objet (car la hauteur est fixe)
17 * - taille systray calculée à partir de la liste des icones
18 * - taille clock calculée à partir de l'heure
19 * - taille d'une tache calculée à partir de la taskbar (ajout, suppression, taille)
20 * - taille d'une taskbar calculée à partir de la taille du panel et des autres objets
22 * voir resize_taskbar(), resize_clock() et resize_tasks()
23 * variable widthChanged ou bien emission d'un signal ???
24 * voir config(obj) configure un objet (définie les positions verticales)
26 **************************************************************************/
32 #include <pango/pangocairo.h>
55 // TODO: isoler 'draw' de 'refresh'
56 // TODO: isoler les données locales des données communes aux freres
57 // absolute coordinate in panel
62 // list of child : Area object
67 int paddingx
, paddingy
;
74 // each object can overwrite following function
75 void (*draw
)(void *obj
);
76 void (*draw_foreground
)(void *obj
, cairo_t
*c
);
77 void (*add_child
)(void *obj
);
78 int (*remove_child
)(void *obj
);
83 // draw background and foreground
84 void refresh (Area
*a
);
86 // set 'redraw' on an area and childs
87 void set_redraw (Area
*a
);
89 void draw_background (Area
*a
, cairo_t
*c
);
91 void remove_area (Area
*a
);
92 void add_area (Area
*a
);
93 void free_area (Area
*a
);
This page took 0.040383 seconds and 4 git commands to generate.