access to custom object properties in plugin



lidiriel wrote:
Hello,

now i stop my python development and i began a new export filter in C.
I created fews objects in new lib and i try to generate an export file.
I use the method :
static void draw_object(DiaRenderer *self, DiaObject *object) for detected each object and generate a piece of export file.
it 's work but i have many warning message in terminal like :

** (dia:12635): WARNING **: IvrRenderer::draw_line not implemented!
** (dia:12635): WARNING **: IvrRenderer::draw_line not implemented!
** (dia:12635): WARNING **: IvrRenderer::draw_line not implemented!
** (dia:12635): WARNING **: IvrRenderer::set_line_style not implemented!
** (dia:12635): WARNING **: IvrRenderer::set_line_join not implemented!
** (dia:12635): WARNING **: IvrRenderer::set_line_caps not implemented!
** (dia:12635): WARNING **: IvrRenderer::fill_polygon not implemented!
** (dia:12635): WARNING **: IvrRenderer::draw_line not implemented!
** (dia:12635): WARNING **: IvrRenderer::draw_line not implemented!
** (dia:12635): WARNING **: IvrRenderer::draw_line not implemented!

In my code i'm not implemented this method because i would like work only with my object.
How to make this normally ? (and for suppress the message)
Ok I don't use "data_render" methode in my export plugin.
for the same use i create a new function (for no warning message :) ) It's work perfectly i detect the type of my object. But for the core of plugin i must use the property of object. Example i have an object :

dia/objects/Bay/boundary.c
...
typedef enum { BAY_BOUNDARY_BEGIN, BAY_BOUNDARY_END } BayBoundaryValue;

/* Object Boundary definition */
typedef struct _Boundary {
  Element element;

  ConnectionPoint connections[BAY_BOUNDARY_NUM_CNX];

        /* Custom inner color */
  Color fill_color;

        /* boundary type */
  BayBoundaryValue value;
}
...

and in my plugin  : dia/plugin/foo/render_foo.c
I have an object DiaObject *obj with the type defined in boundary.c
it's good BUT now i would like acces to property "value" ??
My question is  : How to do that ?

Lidiriel.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]