![]() |
![]() |
![]() |
adg-1 reference manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Signals |
#include <adg-1/adg.h> struct AdgStyle; struct AdgStyleClass; void adg_style_invalidate (AdgStyle *style
); void adg_style_apply (AdgStyle *style
,AdgEntity *entity
,cairo_t *cr
);
GObject +----AdgStyle +----AdgColorStyle +----AdgDimStyle +----AdgFillStyle +----AdgFontStyle +----AdgLineStyle +----AdgTableStyle
struct AdgStyle;
All fields are private and should not be used directly. Use its public methods instead.
Since 1.0
struct AdgStyleClass { /* Signals */ void (*invalidate) (AdgStyle *style); void (*apply) (AdgStyle *style, AdgEntity *entity, cairo_t *cr); };
The default invalidate
handler does not do anything.
The virtual method apply
*must* be implemented by any derived class.
The default implementation will trigger an error if called.
virtual method to reset the style. | |
abstract virtual to apply a style to a cairo context. |
Since 1.0
void adg_style_invalidate (AdgStyle *style
);
Emits the "invalidate" signal on style
. This signal
is always emitted while disposing style
, so be sure it
can be called more than once without harms.
This function is only useful in new style implementations.
|
an AdgStyle derived style |
Since 1.0
"apply"
signalvoid user_function (AdgStyle *style,
AdgEntity *entity,
gpointer cr,
gpointer user_data) : Run Last
Applies style
to cr
so the next rendering operations will be
done accordling to this style directives. The entity
parameter
is used to resolve the internal dresses of style
, if any.
|
an AdgStyle |
|
the caller AdgEntity |
|
the cairo_t context |
|
user data set when the signal handler was connected. |
Since 1.0
"invalidate"
signalvoid user_function (AdgStyle *style,
gpointer user_data) : Run Last
Invalidates the style
, that is resets all the cache, if any,
retained by the internal implementation.
This signal is emitted while disposing style
, so be sure it
can be called more than once without harms. Furthermore it
will be emitted from property setter code of new implementations
to force the recomputation of the cache.
|
an AdgStyle |
|
user data set when the signal handler was connected. |
Since 1.0