1
0
mirror of git://projects.qi-hardware.com/fped.git synced 2024-07-02 20:24:11 +03:00
Commit Graph

27 Commits

Author SHA1 Message Date
werner
57e76aeb9e - vector labels are already in a per-frame namespace, so we don't need to add
the frame name when auto-generating them
- moved file I/O from gui.c to file.c
- ps_line used the wrong endpoint coordinate
- option -k makes fped write KiCad non-interactively
- option -p makes fped write Postscript non-interactively



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5418 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-11 20:17:39 +00:00
werner
1dfb8da99a - change file save logic to write to a temporary file first, so that we don't
leave an empty/corrupt main file if we crash during saving
- started adding Postscript output
- renamed "Save as KiCad" to "Write KiCad"
- switched from "manual" menu bar creation to GtkItemFactory



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5417 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-11 01:20:15 +00:00
werner
6f307d6ae7 - added KiCad output
- when saving a file, we now make a backup of any existing file with the same
  name



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5416 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-10 21:02:26 +00:00
werner
9c68c0de34 - File>Save now saves to a file if a second name is given on the command line,
to stdout if not
- there's no reason anymore to disallow editing the offset in new-style
  measurements
- struct inst_ops is no longer opaque, so we can avoid adding even more silly
  little access functions and open-code straightforward callbacks
- (re)stuctured hover/click/drag logic in gui_tool.c
- added optional debugging output to gui_canvas.c
- don't let a vector's base be dragged onto the vector's own end or onto one
  of its children
- measurements can now be properly changed by dragging



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5414 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-10 13:51:51 +00:00
werner
75d9780131 - band-aid: make canvas grab focus on click and scroll, so that it's easy to
get it back when we lose it
- improved heuristics for measx/measy: instead of looking for "next" or "max"
  on secondary coordinate, pick the one that's closest. I.e., if there's a
  chance to just connect with x' = 0 or y' = 0, do it.
- mouse wheel on loop value now selects next/previous value
- corrected proximity calculation for measurements
- vec/frame/meas toggle now deselects, so that we don't accidently leave a
  supposedly hidden item selected



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5413 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-09 01:51:20 +00:00
werner
851c82af6f - simplified tool_button and moved it from gui_tool.c to into gui_util.c
- moved make_image from gui_tool.c to into gui_util.c as well
- generalized set_frame_image and moved it to gui_util.c as set_image
- tool_button_press_event didn't check which button was pressed
- added buttons to switch visibility of frames, vectors, and measurements
- when creating a measurement through the GUI, don't invert if both points are
  minima (otherwise, one could never get the text point the other way)



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5411 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-08 21:59:33 +00:00
werner
e677ee1691 - for consistency, renamed gui_tools to gui_tool
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5410 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-08 19:44:17 +00:00
werner
a1de1ee2d9 - moved handling of frame area from gui.c to gui_frame.c and cleaned up their
includes



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5409 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-08 19:35:16 +00:00
werner
1a18292883 - added icons for new-style measurements (on-going)
- increased default window size for make room for new icons
- switch the canvas to dark blue when instantiation fails
- modularized point lookup logic of instantiate_meas
- added highlight mode (on-going)



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5404 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-07 21:47:51 +00:00
werner
bb7355d84b - gui_tools.c:new_vec didn't initialize vec->samples, causing fped to crash
- we didn't dehover before deleting, which could cause a crash
- added delete tool to canvas. Thus ...
- we no longer need the Delete key on the canvas, so we can ...
- always focus the (first) entry field, and ...
- removed "focus" parameter to edit functions



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5403 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-07 19:42:57 +00:00
werner
605bd52dc9 Finished deletion. Assorted bug fixes.
- columns can now be deleted/undeleted
- reset active row if deleting that row
- grammar now accepts an empty file
- when a non-canvas entry becomes editable, we set the focus to it
- when adding the first reference to a frame, make it active
- when deleting the active reference to a frame, set the pointer to NULL
- measurements didn't have a drag_new action, causing trying to create them to
  crash fped
- offset field of measurements was incorrectly labeled "width"
- fixed operator precedence in gridify. Someone needs more sleep :-(



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5398 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-07 00:48:06 +00:00
werner
766efce919 - tables no longer try to fill the available space in the variables area
- added string-valued expressions (on-going)
- loops, tables, and rows can now be deleted/undeleted (still need columns)



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5397 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-06 21:57:18 +00:00
werner
30664583a1 - when dragging the endpoint of an arc, show a helper line to visually connect
the point being dragged
- added pop-up menus for all frame and variable items (on-going)
- clickable items in the frame/var area now only respond to the left button,
  unless they have a pop-up
- removed the frame delete icon - use pop-up instead



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5396 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-06 20:19:00 +00:00
werner
995aa4ca04 - added menu item "Save" to dump the footprint to stdout
- added temporary solution for having a part name
- added part name to FPD example files
- reduced area in which the frame delete button responds



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5393 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-06 06:54:41 +00:00
werner
08b788b929 - revamped delete logic: delete now always works. If there are references, we
remove them as well. (In progress.)
- added frame deletion
- gui_status.c:add_label added vertical padding to keep the input area from
  bouncing (by Alvaro Lopes)



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5390 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-05 18:43:00 +00:00
werner
5d989a3e28 - GUI: added creation and moving of vectors, measurements, and frame references
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5389 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-05 14:44:36 +00:00
werner
cdcd2f36b3 - started functions to dump .fpd files (automatic labeling doesn't quite work
yet)
- don't pass argc, argv to gui_main. They've been harvested before.



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5388 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-05 10:35:48 +00:00
werner
8377ab0e0d - previous Makefile change was: tentative fix for compatibility with older
ImageMagick versions (reported by Alvaro Lopes)
- we can now also select the frame's origin as a reference
- added general frame selection logic
- make sure we always use %s when passing names to status_set_name
- we can now drag endpoints (in progress)



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5385 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-04 18:03:06 +00:00
werner
5add8b5229 GUI can create silk screen objects.
- made xpm name manipulation compatible with older versions of ImageMagick
  (reported by Alvaro Lopes)
- corrected all lines beginning with five or more spaces
- Makefile
- README: fixed loop example (reported by Joerg Reisenweber)
- moved draw_arc and draw_circle from gui_inst.c to gui_util.c
- added dragging and hovering
- added creation of lines, rectangles, and arcs via GUI
- removed arc tool (use circle instead)
- fixed reference counting in vectors



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5384 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-04 12:06:04 +00:00
werner
0015f96f14 - renamed gui_icons to gui_tools
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5383 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-04 07:24:13 +00:00
werner
3d2748a623 Valgrind and gcc -O:
- stralloc_vprintf: used snprintf instead of vsnprintf. Oops !
- build_frames: didn't initialize "n"
- added a few initializations to stop gcc from complaining



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5382 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-04 07:04:36 +00:00
werner
7674be9b10 - fixed stupid realloc(..., len) error
- rearranged input area and added vector component edit capability



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5381 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-04 00:23:10 +00:00
werner
0ff7a6a3ab - before changing the world, always deselect (reported by Dave Ball)
- gui_draw_pad: add 10% of slack so that pad names are upright unless we really
  need to rotate



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5380 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-03 23:23:00 +00:00
werner
96d41a37ab - moved building of an activator into new function add_activator
- added loop value selection (quick and dirty)



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5379 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-03 22:58:15 +00:00
werner
6c2734f6ac - combined frame and variable view into a single table
- make_var now sets up all back pointers, so we don't crash when deselecting a
  variable (this bug was uncovered by cleanup in the previous commit)
- report_parse_error didn't print a newline at the end of the message
- introduced frame reference selection and the data structures needed for it
- bounding box calculation of arcs used x for y
- added frame reference selection example quad.fpd



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5377 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-03 21:10:49 +00:00
werner
e1e758b54f - keyboard functions for the canvas: - zoom out, + or = zoom in, . center,
* zoom and center to extents
- variables in tables weren't properly initialized, causing stray recursive
  evaluation errors
- replaced table->active index with table->active_row pointer
- added row selection
- for fun, added tab.fpd row selection example 



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5375 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-03 17:58:32 +00:00
werner
e455b37abb Moved fped over to /trunk/eda
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5374 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-03 16:12:47 +00:00