Changeset 5414
- Timestamp:
- 08/10/09 15:51:51 (4 years ago)
- Location:
- trunk/eda/fped
- Files:
-
- 12 edited
-
TODO (modified) (2 diffs)
-
fped.c (modified) (4 diffs)
-
gui.c (modified) (3 diffs)
-
gui_canvas.c (modified) (7 diffs)
-
gui_meas.c (modified) (10 diffs)
-
gui_meas.h (modified) (1 diff)
-
gui_tool.c (modified) (12 diffs)
-
gui_tool.h (modified) (2 diffs)
-
inst.c (modified) (8 diffs)
-
inst.h (modified) (3 diffs)
-
meas.c (modified) (1 diff)
-
meas.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/eda/fped/TODO
r5413 r5414 3 3 - add default unit (combine with grid unit selection ?) 4 4 - consider adding auto/mm/mil selection for each dimension 5 - add measurements (partly done. still needed: find out how to define6 non-trivial endpoints, e.g., some vector in last iteration of loop)7 5 - add KiCad output 8 6 - add postscript output … … 36 34 - merge find_var_in_frame with similar mechanisms in expr.c and fpd.y 37 35 - add regression tests 36 - the drag logic is too complex. Better: let tool/instance just generate the 37 list of points at each stage, then handle the highlighting and hovering 38 inside a dragging module. 38 39 39 40 Open decisions: -
trunk/eda/fped/fped.c
r5398 r5414 12 12 13 13 14 #include <stdlib.h> 15 #include <stdio.h> 14 16 15 17 #include "cpp.h" … … 24 26 extern int yyparse(void); 25 27 28 char *save_file = NULL; 29 26 30 27 31 static void load_file(const char *name) … … 33 37 34 38 39 static void usage(const char *name) 40 { 41 fprintf(stderr, "usage: %s [in_file [out_file]]\n", name); 42 exit(1); 43 } 44 45 35 46 int main(int argc, char **argv) 36 47 { 48 const char *name = *argv; 37 49 int error; 38 50 … … 40 52 if (error) 41 53 return error; 42 if (argc == 1) { 54 switch (argc) { 55 case 1: 43 56 scan_empty(); 44 57 (void) yyparse(); 45 } else { 58 break; 59 case 3: 60 save_file = argv[2]; 61 /* fall through */ 62 case 2: 46 63 load_file(argv[1]); 47 argc--; 48 argv++; 64 break; 65 default: 66 usage(name); 49 67 } 50 68 -
trunk/eda/fped/gui.c
r5413 r5414 12 12 13 13 14 #include <stdio.h> 14 15 #include <gtk/gtk.h> 15 16 … … 31 32 32 33 34 extern char *save_file; 35 33 36 GtkWidget *root; 34 37 int show_stuff = 1; … … 46 49 static void menu_save(GtkWidget *widget, gpointer user) 47 50 { 48 dump(stdout); 51 FILE *file; 52 53 if (!save_file) { 54 if (!dump(stdout)) 55 perror("stdout"); 56 return; 57 } 58 file = fopen(save_file, "w"); 59 if (!file) { 60 perror(save_file); 61 return; 62 } 63 if (!dump(file)) 64 perror(save_file); 65 if (fclose(file) == EOF) 66 perror(save_file); 49 67 } 50 68 -
trunk/eda/fped/gui_canvas.c
r5413 r5414 26 26 #include "gui.h" 27 27 #include "gui_canvas.h" 28 29 30 #if 0 31 #define DPRINTF(fmt, ...) fprintf(stderr, fmt "\n", ##__VA_ARGS__) 32 #else 33 #define DPRINTF(fmt, ...) 34 #endif 28 35 29 36 … … 140 147 struct coord pos = canvas_to_coord(event->x, event->y); 141 148 149 DPRINTF("--- motion ---"); 142 150 curr_pos.x = event->x; 143 151 curr_pos.y = event->y; … … 162 170 int res; 163 171 172 DPRINTF("--- button press ---"); 164 173 gtk_widget_grab_focus(widget); 165 174 switch (event->button) { … … 207 216 struct coord pos = canvas_to_coord(event->x, event->y); 208 217 218 DPRINTF("--- button release ---"); 209 219 switch (event->button) { 210 220 case 1: … … 292 302 struct coord pos = canvas_to_coord(curr_pos.x, curr_pos.y); 293 303 304 DPRINTF("--- key press ---"); 294 305 switch (event->keyval) { 295 306 case ' ': … … 351 362 { 352 363 static int first = 1; 364 365 DPRINTF("--- expose ---"); 353 366 if (first) { 354 367 init_canvas(); 355 368 first = 0; 356 369 } 370 tool_dehover(); 357 371 redraw(); 358 372 return TRUE; … … 374 388 gpointer data) 375 389 { 390 DPRINTF("--- leave ---"); 376 391 if (dragging) 377 392 tool_cancel_drag(); -
trunk/eda/fped/gui_meas.c
r5413 r5414 13 13 14 14 #include "util.h" 15 #include "coord.h" 15 16 #include "meas.h" 17 #include "inst.h" 16 18 #include "gui_canvas.h" 17 19 #include "gui_tool.h" … … 154 156 return is_min(meas_dsc->lt, inst); 155 157 case next_to_min: 156 return is_min_of_next(meas_dsc->lt, inst, a); 158 if (!is_min(meas_dsc->lt, inst)) 159 return 0; 160 return is_next(meas_dsc->lt, a, inst); 161 // return is_min_of_next(meas_dsc->lt, inst, a); 157 162 default: 158 163 abort(); … … 223 228 224 229 225 /* ----- find point ------------------------------------------------------- */226 227 228 static struct inst *find_point_meas (struct coord pos)230 /* ----- find start point (new measurement) -------------------------------- */ 231 232 233 static struct inst *find_point_meas_new(struct coord pos) 229 234 { 230 235 if (meas_inst) … … 261 266 262 267 meas_inst = NULL; 268 highlight = NULL; 263 269 if (from == to) 264 270 return 0; … … 291 297 } 292 298 meas->inverted = 293 mode == min_to_next_or_max && is_min(meas_dsc->lt, to) ? 0 :294 meas_dsc->lt(from->u.rect.end, to->u.rect.end) !=295 (mode == min_to_next_or_max);299 mode == min_to_next_or_max && is_min(meas_dsc->lt, to) ? 0 : 300 meas_dsc->lt(from->u.rect.end, to->u.rect.end) != 301 (mode == min_to_next_or_max); 296 302 { 297 303 char *sm[] = { "min_to", "max_to", "next_to" }; … … 306 312 307 313 314 static void cancel_drag_new_meas(void) 315 { 316 meas_inst = NULL; 317 highlight = NULL; 318 redraw(); 319 } 320 321 308 322 /* ----- begin dragging existing measurement ------------------------------- */ 323 324 325 /* 326 * We didn't record which instance provided the vector we're using here, so we 327 * have to search for it now. 328 */ 329 330 static struct inst *vec_at(const struct vec *vec, struct coord pos) 331 { 332 struct inst *inst; 333 const struct sample *s; 334 335 for (inst = insts_ip_vec(); inst; inst = inst->next) 336 if (inst->vec == vec) 337 for (s = vec->samples; s; s = s->next) 338 if (coord_eq(s->pos, pos)) 339 return inst; 340 abort(); 341 } 309 342 310 343 … … 329 362 abort(); 330 363 } 364 highlight = meas_highlight_b; 331 365 switch (i) { 332 366 case 0: 333 highlight = meas_highlight_a;334 367 mode = meas->type < 3 ? next_to_min : max_to_min; 368 meas_inst = vec_at(inst->obj->u.meas.high, inst->u.meas.end); 335 369 break; 336 370 case 1: 337 highlight = meas_highlight_b;338 371 mode = min_to_next_or_max; 372 meas_inst = vec_at(inst->obj->base, inst->base); 339 373 break; 340 374 default: 341 375 abort(); 342 376 } 377 // redraw(); 378 } 379 380 381 /* ----- find end point (existing measurement) ----------------------------- */ 382 383 384 struct inst *find_point_meas_move(struct inst *inst, struct coord pos) 385 { 386 return inst_find_vec(pos, meas_pick_vec_b, meas_inst); 387 } 388 389 390 /* ----- end dragging existing measurements -------------------------------- */ 391 392 393 void end_drag_move_meas(void) 394 { 395 highlight = NULL; 343 396 redraw(); 344 397 } 345 398 346 399 347 /* ----- operations ------------------------------------------------------- */ 400 void do_move_to_meas(struct inst *inst, struct inst *to, int i) 401 { 402 struct meas *meas = &inst->obj->u.meas; 403 404 switch (i) { 405 case 0: 406 inst->obj->base = inst_get_vec(to); 407 break; 408 case 1: 409 meas->high = inst_get_vec(to); 410 if (is_max(meas_dsc->lt, to)) 411 meas->type = (meas->type % 3)+3; 412 else 413 meas->type = (meas->type % 3); 414 break; 415 default: 416 abort(); 417 } 418 } 419 420 421 /* ----- operations -------------------------------------------------------- */ 348 422 349 423 … … 351 425 .tool_selected = tool_selected_meas_xy, 352 426 .tool_deselected= tool_deselected_meas, 353 .find_point = find_point_meas ,427 .find_point = find_point_meas_new, 354 428 .begin_drag_new = begin_drag_new_meas, 355 429 .drag_new = drag_new_line, 356 430 .end_new = end_new_meas, 431 .cancel_drag_new= cancel_drag_new_meas, 357 432 }; 358 433 … … 360 435 .tool_selected = tool_selected_meas_x, 361 436 .tool_deselected= tool_deselected_meas, 362 .find_point = find_point_meas ,437 .find_point = find_point_meas_new, 363 438 .begin_drag_new = begin_drag_new_meas, 364 439 .drag_new = drag_new_line, 365 440 .end_new = end_new_meas, 441 .cancel_drag_new= cancel_drag_new_meas, 366 442 }; 367 443 … … 370 446 .tool_selected = tool_selected_meas_y, 371 447 .tool_deselected= tool_deselected_meas, 372 .find_point = find_point_meas ,448 .find_point = find_point_meas_new, 373 449 .begin_drag_new = begin_drag_new_meas, 374 450 .drag_new = drag_new_line, 375 451 .end_new = end_new_meas, 376 }; 452 .cancel_drag_new= cancel_drag_new_meas, 453 }; -
trunk/eda/fped/gui_meas.h
r5413 r5414 24 24 25 25 void begin_drag_move_meas(struct inst *inst, int i); 26 struct inst *find_point_meas_move(struct inst *inst, struct coord pos); 27 void end_drag_move_meas(void); 28 void do_move_to_meas(struct inst *inst, struct inst *to, int i); 26 29 27 30 #endif /* !GUI_MEAS_H */ -
trunk/eda/fped/gui_tool.c
r5413 r5414 458 458 459 459 460 void do_move_to_arc(struct inst *inst, struct vec *vec, int i) 461 { 460 void do_move_to_arc(struct inst *inst, struct inst *to, int i) 461 { 462 struct vec *vec = inst_get_vec(to); 462 463 struct obj *obj = inst->obj; 463 464 int is_circle; … … 592 593 593 594 595 #if 0 594 596 static int may_move(struct inst *curr) 595 597 { … … 606 608 return 0; 607 609 } 610 #endif 608 611 609 612 … … 643 646 static void do_move_to(struct drag_state *state, struct inst *curr) 644 647 { 645 assert( may_move_to(state, curr));648 assert(state->inst->ops->find_point || may_move_to(state, curr)); 646 649 *state->anchors[state->anchor_i] = inst_get_vec(curr); 647 650 } … … 666 669 667 670 671 /* 672 * When hovering, we have to consider the following states: 673 * 674 * selected (selected_inst != NULL) 675 * | dragging new (drag.new != NULL) 676 * | | dragging existing (drag.anchors_n != 0) 677 * | | | tool selected (active_ops) 678 * | | | | 679 * Y N N N highlight if inst_find_point_selected else don't 680 * Y N N Y highlight if inst_find_point_selected else fall over to tool 681 * - Y N - highlight if inst_find_point / active_ops->find_point else don't 682 * - N Y - highlight if may_move_to else don't 683 * - Y Y - invalid state 684 * N N N Y highlight if inst_find_point / active_ops->find_point else don't 685 * N N N N don't highlight 686 */ 687 688 static struct inst *get_hover_inst(struct coord pos) 689 { 690 struct inst *inst; 691 int i; 692 693 if (drag.new) { 694 if (active_ops->find_point) 695 return active_ops->find_point(pos); 696 return inst_find_point(pos); 697 } 698 if (drag.anchors_n) { 699 if (drag.inst->ops->find_point) 700 return drag.inst->ops->find_point(drag.inst, pos); 701 inst = inst_find_point(pos); 702 if (!inst) 703 return NULL; 704 return may_move_to(&drag, inst) ? inst : NULL; 705 } 706 if (selected_inst) { 707 i = inst_find_point_selected(pos, &inst); 708 if (i != -1) 709 return inst; 710 } 711 if (!active_ops) 712 return NULL; 713 if (active_ops->find_point) 714 return active_ops->find_point(pos); 715 return inst_find_point(pos); 716 } 717 718 668 719 void tool_hover(struct coord pos) 669 720 { 670 struct inst *curr; 671 672 if (active_ops && active_ops->find_point) 673 curr = active_ops->find_point(pos); 674 else 675 curr = inst_find_point(pos); 721 struct inst *curr = NULL; 722 723 curr = get_hover_inst(pos); 724 #if 0 676 725 if ((drag.new && curr == drag.new) || (drag.inst && curr == drag.inst)) 677 726 return; … … 686 735 } 687 736 } 737 got: 738 #endif 739 688 740 if (curr == hover_inst) 689 741 return; … … 713 765 714 766 767 /* 768 * When considering dragging, we have the following states: 769 * 770 * selected (selected_inst != NULL) 771 * | tool selected (active_ops) 772 * | | 773 * N N don't 774 * Y - if we could drag, drag_new/end_new, else fall over to tool 775 * N Y click, else single-click creation, else drag_new/end_new 776 */ 777 715 778 int tool_consider_drag(struct coord pos) 716 779 { … … 720 783 assert(!drag.anchors_n); 721 784 last_canvas_pos = translate(pos); 722 if (active_ops && active_ops->click) { 785 786 if (!selected_inst && !active_ops) 787 return 0; 788 if (selected_inst) { 789 drag.anchor_i = inst_find_point_selected(pos, NULL); 790 if (drag.anchor_i != -1) { 791 tool_dehover(); 792 drag.inst = selected_inst; 793 drag.new = NULL; 794 drag.anchors_n = 795 inst_anchors(selected_inst, drag.anchors); 796 over_begin(drag_save_and_draw, NULL, pos); 797 inst_begin_drag_move(selected_inst, drag.anchor_i); 798 return 1; 799 } 800 } 801 if (!active_ops) 802 return 0; 803 if (active_ops->click) { 723 804 active_ops->click(pos); 724 805 return 0; 725 806 } 726 if (active_ops && active_ops->find_point) 727 curr = active_ops->find_point(pos); 728 else 729 curr = inst_find_point(pos); 807 808 curr = get_hover_inst(pos); 730 809 if (!curr) 731 810 return 0; 811 732 812 tool_dehover(); 733 if (active_ops) { 734 if (active_ops->drag_new) { 735 if (active_ops->begin_drag_new) 736 active_ops->begin_drag_new(curr); 737 drag.inst = NULL; 738 drag.new = curr; 739 over_begin(drag_save_and_draw, NULL, pos); 740 return 1; 741 } else { 742 /* object is created without dragging */ 743 if (active_ops->end_new(curr, NULL)) { 744 tool_cancel_drag(); 745 return -1; 746 } 747 return 0; 748 } 749 } 750 if (!may_move(curr)) 751 return 0; 752 drag.inst = selected_inst; 753 drag.new = NULL; 754 inst_begin_drag_move(selected_inst, drag.anchor_i); 755 over_begin(drag_save_and_draw, NULL, pos); 756 return 1; 813 814 if (active_ops->drag_new) { 815 if (active_ops->begin_drag_new) 816 active_ops->begin_drag_new(curr); 817 drag.inst = NULL; 818 drag.new = curr; 819 over_begin(drag_save_and_draw, NULL, pos); 820 return 1; 821 } 822 823 /* object is created without dragging */ 824 if (active_ops->end_new(curr, NULL)) { 825 tool_cancel_drag(); 826 return -1; 827 } 828 return 0; 829 757 830 } 758 831 … … 767 840 void tool_cancel_drag(void) 768 841 { 842 if (drag.anchors_n && drag.inst->ops->end_drag_move) 843 if (drag.anchors_n && drag.inst->ops->end_drag_move) 844 drag.inst->ops->end_drag_move(); 845 drag.new = NULL; 846 active_ops = NULL; 847 drag.anchors_n = 0; 769 848 over_end(); 770 849 tool_dehover(); 771 850 tool_reset(); 772 drag.new = NULL;773 active_ops = NULL;774 drag.anchors_n = 0;775 851 } 776 852 … … 785 861 if (state.new && ops->end_new_raw) 786 862 return ops->end_new_raw(state.new, to); 787 if ( ops->find_point)863 if (state.new && ops->find_point) 788 864 end = ops->find_point(to); 789 else 790 end = inst_find_point(to); 791 if (!end) 792 return 0; 865 else { 866 if (state.inst && state.inst->ops->find_point) 867 end = state.inst->ops->find_point(state.inst, to); 868 else 869 end = inst_find_point(to); 870 } 871 if (!end) { 872 if (state.new && ops->cancel_drag_new) 873 ops->cancel_drag_new(); 874 return 0; 875 } 793 876 if (state.new) 794 877 return ops->end_new(state.new, end); 795 if (!may_move_to(&state, end)) 796 return 0; 797 if (!inst_do_move_to(drag.inst, inst_get_vec(end), state.anchor_i)) 878 879 /* if we got the point from find_point, it's authoritative */ 880 if (!state.inst->ops->find_point && !may_move_to(&state, end)) 881 return 0; 882 if (!inst_do_move_to(state.inst, end, state.anchor_i)) 798 883 do_move_to(&state, end); 799 884 return 1; … … 803 888 void tool_redraw(void) 804 889 { 890 struct coord pos; 891 805 892 over_reset(); 893 hover_inst = NULL; 806 894 if (!drag.new && !drag.anchors_n) 807 895 return; 808 tool_hover(last_canvas_pos);809 over_begin(drag_save_and_draw, NULL,810 canvas_to_coord(last_canvas_pos.x, last_canvas_pos.y));896 pos = canvas_to_coord(last_canvas_pos.x, last_canvas_pos.y); 897 tool_hover(pos); 898 over_begin(drag_save_and_draw, NULL, pos); 811 899 } 812 900 … … 838 926 { 839 927 over_reset(); 928 hover_inst = NULL; 840 929 tool_select(ev_point, NULL); 841 930 } -
trunk/eda/fped/gui_tool.h
r5413 r5414 29 29 int (*end_new_raw)(struct inst *from, struct coord to); 30 30 int (*end_new)(struct inst *from, struct inst *to); 31 void (*cancel_drag_new)(void); 31 32 }; 32 33 … … 43 44 struct pix_buf *gui_hover_frame(struct inst *self); 44 45 45 void do_move_to_arc(struct inst *inst, struct vec *vec, int i);46 void do_move_to_arc(struct inst *inst, struct inst *to, int i); 46 47 47 48 void tool_dehover(void); -
trunk/eda/fped/inst.c
r5413 r5414 29 29 #include "inst.h" 30 30 31 32 struct inst_ops {33 void (*debug)(struct inst *self);34 void (*save)(FILE *file, struct inst *self);35 void (*draw)(struct inst *self);36 struct pix_buf *(*hover)(struct inst *self);37 unit_type (*distance)(struct inst *self, struct coord pos,38 unit_type scale);39 void (*select)(struct inst *self);40 int (*anchors)(struct inst *self, struct vec ***anchors);41 void (*begin_drag_move)(struct inst *from, int i);42 struct pix_buf *(*draw_move)(struct inst *inst,43 struct coord pos, int i);44 /* arcs and measurements need this special override */45 void (*do_move_to)(struct inst *inst, struct vec *vec, int i);46 };47 31 48 32 enum inst_prio { … … 236 220 237 221 222 int inst_find_point_selected(struct coord pos, struct inst **res) 223 { 224 struct vec **anchors[3]; 225 int n, best_i, i; 226 struct inst *best = NULL; 227 struct inst *inst; 228 int d_min, d; 229 230 assert(selected_inst); 231 n = inst_anchors(selected_inst, anchors); 232 for (i = 0; i != n; i++) { 233 if (*anchors[i]) { 234 for (inst = insts[ip_vec]; inst; inst = inst->next) { 235 if (inst->vec != *anchors[i]) 236 continue; 237 d = gui_dist_vec(inst, pos, draw_ctx.scale); 238 if (d != -1 && (!best || d < d_min)) { 239 best = inst; 240 best_i = i; 241 d_min = d; 242 } 243 } 244 } else { 245 for (inst = insts[ip_frame]; inst; inst = inst->next) { 246 if (inst != selected_inst->outer) 247 continue; 248 d = gui_dist_frame(inst, pos, draw_ctx.scale); 249 if (d != -1 && (!best || d < d_min)) { 250 best = inst; 251 best_i = i; 252 d_min = d; 253 } 254 } 255 } 256 } 257 if (!best) 258 return -1; 259 if (res) 260 *res = best; 261 return best_i; 262 } 263 264 238 265 struct coord inst_get_point(const struct inst *inst) 239 266 { … … 318 345 static void propagate_bbox(const struct inst *inst) 319 346 { 320 /* @@@ for new-style measurements */321 347 struct inst *frame = curr_frame ? curr_frame : insts[ip_frame]; 322 348 … … 389 415 390 416 417 /* 418 * @@@ The logic of gui_find_point_vec isn't great. Instead of selecting a 419 * point and then filtering, we should filter the candidates, so that a point 420 * that's close end eligible can win against one that's closer but not 421 * eligible. 422 */ 423 424 static struct inst *find_point_vec(struct inst *self, struct coord pos) 425 { 426 struct inst *inst; 427 const struct vec *vec; 428 429 inst = inst_find_point(pos); 430 if (!inst) 431 return NULL; 432 if (inst->ops == &frame_ops) 433 return inst; 434 for (vec = inst->vec; vec; vec = vec->base) 435 if (vec == self->vec) 436 return NULL; 437 return inst; 438 } 439 440 391 441 static int vec_op_anchors(struct inst *inst, struct vec ***anchors) 392 442 { … … 402 452 .distance = gui_dist_vec, 403 453 .select = vec_op_select, 454 .find_point = find_point_vec, 404 455 .anchors = vec_op_anchors, 405 456 .draw_move = draw_move_vec, … … 670 721 status_set_type_entry("offset ="); 671 722 status_set_name("%5.2f mm", units_to_mm(self->u.meas.offset)); 672 if (!self->obj)673 return; /* @@@ new-style measurements */674 723 edit_expr(&self->obj->u.meas.offset); 675 724 } … … 693 742 .anchors = meas_op_anchors, 694 743 .begin_drag_move= begin_drag_move_meas, 744 .find_point = find_point_meas_move, 695 745 .draw_move = draw_move_meas, 746 .end_drag_move = end_drag_move_meas, 747 .do_move_to = do_move_to_meas, 696 748 }; 697 749 … … 912 964 913 965 914 int inst_do_move_to(struct inst *inst, struct vec *vec, int i)966 int inst_do_move_to(struct inst *inst, struct inst *to, int i) 915 967 { 916 968 if (!inst->ops->do_move_to) 917 969 return 0; 918 inst->ops->do_move_to(inst, vec, i);970 inst->ops->do_move_to(inst, to, i); 919 971 return 1; 920 972 } -
trunk/eda/fped/inst.h
r5413 r5414 37 37 }; 38 38 39 struct inst_ops; 39 struct inst; 40 41 struct inst_ops { 42 void (*debug)(struct inst *self); 43 void (*save)(FILE *file, struct inst *self); 44 void (*draw)(struct inst *self); 45 struct pix_buf *(*hover)(struct inst *self); 46 unit_type (*distance)(struct inst *self, struct coord pos, 47 unit_type scale); 48 void (*select)(struct inst *self); 49 int (*anchors)(struct inst *self, struct vec ***anchors); 50 void (*begin_drag_move)(struct inst *from, int i); 51 struct inst *(*find_point)(struct inst *self, struct coord pos); 52 struct pix_buf *(*draw_move)(struct inst *inst, 53 struct coord pos, int i); 54 void (*end_drag_move)(void); 55 /* arcs and measurements need this special override */ 56 void (*do_move_to)(struct inst *inst, struct inst *to, int i); 57 }; 40 58 41 59 struct inst { … … 86 104 87 105 struct inst *inst_find_point(struct coord pos); 106 int inst_find_point_selected(struct coord pos, struct inst **res); 88 107 struct coord inst_get_point(const struct inst *inst); 89 108 int inst_anchors(struct inst *inst, struct vec ***anchors); … … 120 139 121 140 struct pix_buf *inst_draw_move(struct inst *inst, struct coord pos, int i); 122 int inst_do_move_to(struct inst *inst, struct vec *vec, int i);141 int inst_do_move_to(struct inst *inst, struct inst *to, int i); 123 142 struct pix_buf *inst_hover(struct inst *inst); 124 143 void inst_begin_drag_move(struct inst *inst, int i); -
trunk/eda/fped/meas.c
r5413 r5414 24 24 struct num eval_unit(const struct expr *expr, const struct frame *frame); 25 25 26 struct sample {27 struct coord pos;28 struct sample *next;29 };30 31 26 32 27 static void reset_samples(struct sample **samples) -
trunk/eda/fped/meas.h
r5412 r5414 42 42 }; 43 43 44 struct sample; 44 struct sample { 45 struct coord pos; 46 struct sample *next; 47 }; 45 48 46 49
Note: See TracChangeset
for help on using the changeset viewer.
