static void smallpackage_save(SmallPackage *pkg, ObjectNode obj_node, const char *filename) { element_save(&pkg->element, obj_node); data_add_text(new_attribute(obj_node, "text"), pkg->text); }
static void flow_save(Flow *flow, ObjectNode obj_node, const char *filename) { connection_save(&flow->connection, obj_node); data_add_text(new_attribute(obj_node, "text"), flow->text) ; data_add_int(new_attribute(obj_node, "type"), flow->type); }
static void flow_save(Flow *flow, ObjectNode obj_node, DiaContext *ctx) { connection_save(&flow->connection, obj_node, ctx); data_add_text(new_attribute(obj_node, "text"), flow->text, ctx) ; data_add_int(new_attribute(obj_node, "type"), flow->type, ctx); }
static void state_save(State *state, ObjectNode obj_node, const char *filename) { element_save(&state->element, obj_node); data_add_text(new_attribute(obj_node, "text"), state->text); data_add_int(new_attribute(obj_node, "type"), state->state_type); }
void render_object_save(RenderObject *rend_obj, ObjectNode obj_node) { element_save(&rend_obj->element, obj_node); data_add_real(new_attribute(obj_node, "magnify"), rend_obj->magnify); if (rend_obj->desc->use_text) { data_add_text(new_attribute(obj_node, "text"), rend_obj->text); } }
static void function_save(Function *pkg, ObjectNode obj_node, const char *filename) { element_save(&pkg->element, obj_node); data_add_text(new_attribute(obj_node, "text"), pkg->text); data_add_boolean(new_attribute(obj_node, "is_wish"), pkg->is_wish); data_add_boolean(new_attribute(obj_node, "is_user"), pkg->is_user); }
static void textobj_save(Textobj *textobj, ObjectNode obj_node, const char *filename) { object_save(&textobj->object, obj_node); data_add_text(new_attribute(obj_node, "text"), textobj->text); data_add_enum(new_attribute(obj_node, "valign"), textobj->vert_align); if (textobj->show_background) { data_add_color(new_attribute(obj_node, "fill_color"), &textobj->fill_color); data_add_boolean(new_attribute(obj_node, "show_background"), textobj->show_background); } }
static void textobj_save(Textobj *textobj, ObjectNode obj_node, DiaContext *ctx) { object_save(&textobj->object, obj_node, ctx); data_add_text(new_attribute(obj_node, "text"), textobj->text, ctx); data_add_enum(new_attribute(obj_node, "valign"), textobj->vert_align, ctx); if (textobj->show_background) { data_add_color(new_attribute(obj_node, "fill_color"), &textobj->fill_color, ctx); data_add_boolean(new_attribute(obj_node, "show_background"), textobj->show_background, ctx); } if (textobj->margin > 0.0) data_add_real(new_attribute(obj_node, "margin"), textobj->margin, ctx); if (textobj->text_angle != 0.0) data_add_real(new_attribute(obj_node, "text_angle"), textobj->text_angle, ctx); }
static void box_save(Box *box, ObjectNode obj_node, const char *filename) { element_save(&box->element, obj_node); if (box->border_width != 0.1) data_add_real(new_attribute(obj_node, "border_width"), box->border_width); if (!color_equals(&box->border_color, &color_black)) data_add_color(new_attribute(obj_node, "border_color"), &box->border_color); if (!color_equals(&box->inner_color, &color_white)) data_add_color(new_attribute(obj_node, "inner_color"), &box->inner_color); data_add_boolean(new_attribute(obj_node, "show_background"), box->show_background); if (box->line_style != LINESTYLE_SOLID) data_add_enum(new_attribute(obj_node, "line_style"), box->line_style); if (box->line_style != LINESTYLE_SOLID && box->dashlength != DEFAULT_LINESTYLE_DASHLEN) data_add_real(new_attribute(obj_node, "dashlength"), box->dashlength); if (box->corner_radius > 0.0) data_add_real(new_attribute(obj_node, "corner_radius"), box->corner_radius); data_add_real(new_attribute(obj_node, "padding"), box->padding); data_add_text(new_attribute(obj_node, "text"), box->text); if (box->text_fitting != TEXTFIT_WHEN_NEEDED) data_add_enum(new_attribute(obj_node, PROP_STDNAME_TEXT_FITTING), box->text_fitting); }
static void ellipse_save(Ellipse *ellipse, ObjectNode obj_node, DiaContext *ctx) { element_save(&ellipse->element, obj_node, ctx); if (ellipse->border_width != 0.1) data_add_real(new_attribute(obj_node, "border_width"), ellipse->border_width, ctx); if (!color_equals(&ellipse->border_color, &color_black)) data_add_color(new_attribute(obj_node, "border_color"), &ellipse->border_color, ctx); if (!color_equals(&ellipse->inner_color, &color_white)) data_add_color(new_attribute(obj_node, "inner_color"), &ellipse->inner_color, ctx); data_add_boolean(new_attribute(obj_node, "show_background"), ellipse->show_background, ctx); if (ellipse->line_style != LINESTYLE_SOLID) data_add_enum(new_attribute(obj_node, "line_style"), ellipse->line_style, ctx); if (ellipse->line_style != LINESTYLE_SOLID && ellipse->dashlength != DEFAULT_LINESTYLE_DASHLEN) data_add_real(new_attribute(obj_node, "dashlength"), ellipse->dashlength, ctx); data_add_real(new_attribute(obj_node, "padding"), ellipse->padding, ctx); data_add_text(new_attribute(obj_node, "text"), ellipse->text, ctx); if (ellipse->text_fitting != TEXTFIT_WHEN_NEEDED) data_add_enum(new_attribute(obj_node, PROP_STDNAME_TEXT_FITTING), ellipse->text_fitting, ctx); }