/*! \todo Finish function documentation!!! * \brief * \par Function Description * */ void o_text_edit(GschemToplevel *w_current, OBJECT *o_current) { /* you need to check to make sure only one object is selected */ /* no actually this is okay... not here in o_edit */ text_edit_dialog(w_current, o_text_get_string (w_current->toplevel, o_current), o_current->text->size, o_current->text->alignment); }
/*! \todo Finish function documentation!!! * \brief * \par Function Description * */ void o_edit(GschemToplevel *w_current, GList *list) { OBJECT *o_current; const gchar *str = NULL; if (list == NULL) { return; } o_current = (OBJECT *) list->data; if (o_current == NULL) { fprintf(stderr, _("Got an unexpected NULL in o_edit\n")); exit(-1); } /* for now deal with only the first item */ switch(o_current->type) { /* also add the ability to multi attrib edit: nets, busses, pins */ case(OBJ_COMPLEX): case(OBJ_PLACEHOLDER): case(OBJ_NET): case(OBJ_PIN): case(OBJ_BUS): x_multiattrib_open (w_current); break; case(OBJ_PICTURE): picture_change_filename_dialog(w_current); break; case(OBJ_ARC): arc_angle_dialog(w_current, o_current); break; case(OBJ_TEXT): str = o_text_get_string (w_current->toplevel, o_current); if (o_attrib_get_name_value (o_current, NULL, NULL) && /* attribute editor only accept 1-line values for attribute */ o_text_num_lines (str) == 1) { attrib_edit_dialog(w_current,o_current, FROM_MENU); } else { text_edit_dialog (w_current); } break; } /* has to be more extensive in the future */ /* some sort of redrawing? */ }