1
0
mirror of git://projects.qi-hardware.com/fped.git synced 2024-07-02 19:15:26 +03:00
Commit Graph

41 Commits

Author SHA1 Message Date
werner
0e0e4ea32d - fixed precedence of unary minus, so that -(a+b) isn't printed as -a+b
- removed in_path logic (never missed not having it) and made selected vectors
  a little brighter



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5484 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-18 23:49:54 +00:00
werner
4920bb96fa - replaced awkward FOR_GLOBAL_INSTS / FOR_PKG_INSTS sequence with single
FOR_ALL_INSTS
- several functions only walked the active package instances, so we couldn't 
  access the origin of the root frame



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5482 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-18 22:03:51 +00:00
werner
f368014b3c - stupid typo made us crash when setting the package name
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5481 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-18 20:57:09 +00:00
werner
37b52f23fe Finally found a nice way to draw arcs in the GUI.
- we freed a package's samples list after recalculating the number of samples,
  which caused a crash after adding a new vector. We now record the original 
  list length in the package structure.
- when dragging a circle, offer the end point first, so that it becomes an arc



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5480 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-18 20:52:09 +00:00
werner
de044ca61f We can now generate part families.
- README: added build prerequisites
- "part name" is now more correctly called "package name"
- changed keyword "part" to "package"
- removed inst_debug and struct inst_ops.debug functions - never really used 
  them anyway
- we can now generate multiple packages from a single file



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5478 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-17 20:42:51 +00:00
werner
be86e276b8 - adjust measurement bbox for projection (still not perfect, but better)
- we can now scroll-wheel through table rows
- added menu branch "View" with zoom and var/code display controls
- commented out is_min_of_next until its fate is decided, so that we don't get 
  a warning



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5462 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-16 12:04:01 +00:00
werner
230de72552 - Makefile: fixed odd indentation of "clean" target
- Makfile: added "install" and "uninstall" targets
- when deleting the currently active frame reference, reset active_ref of the
  frame, so that it can be set to a new value later
- during instantiation, circles were classified as arcs
- end point of KiCad circle didn't mirror the Y axis



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5457 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-15 23:25:05 +00:00
werner
ef58598695 - added -std=gnu99 so that we can use "round" and M_PI
- added unit status and selection (in lower right corner)
- added automatic unit selection
- pointer coordinates are now shown with their unit
- updated display of X, Y, width, offset, and radius for unit selection



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5454 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-15 20:52:08 +00:00
werner
7af014b516 - when selecting an item in the canvas, we now check that the underlying object
is still connected. This prevents surprises when making extensive changes
  during instantiation failure.



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5445 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-14 15:53:21 +00:00
werner
d39ae30f6e - added rounded pads
- initialize item_widget to NULL if not showing items or bad things happen



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5440 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-14 10:18:40 +00:00
werner
dbcfae8261 - objects selected via the item view can now be edited directly, even if no
instance is found. This allows recovery from mistakes where a failing item
  never gets instantiated.



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5434 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-13 10:57:39 +00:00
werner
2bae5614d9 - when selecting an object via the item list, make its frame active
- having variables and items on the screen at the same time was too much. We 
  can now toggle with "/" while the canvas has the focus. (This needs better 
  controls.)



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5425 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-12 14:44:17 +00:00
werner
a648cb888f - changed item list font to Courier, which looks a lot tidier
- active items can now be selected from the item list (selecting inactive items
  will be a little harder)



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5424 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-12 11:26:59 +00:00
werner
e65d90947c - put hbox around frame table so that it doesn't grow when we give it more
space than it needs
- dump.c: separated ordering function from actual printing
- added list of vectors and object (on the right side of the variables)



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5423 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-12 10:45:52 +00:00
werner
fe5f824b9e Make delete feel "safer".
- objects are now deleted by selecting them, then clicking on the delete icon
- removed tool_ops.click, which was only there because of delete



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5419 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-11 20:52:33 +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
4a0fd61016 More work on measurements. Getting there ...
- removed support for old-style measurements
- new-style measurements are now embedded in "struct obj", so we can dump and 
  delete them
- "measxy" is now called "meas"
- updated examples to use new-style measurements



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5412 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-09 00:06:54 +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
751e845250 New-style measurements are coming to the GUI soon !
- moved measurement operations from gui_tools.c to new file gui_meas.c
- added support for creating new-style measurements through the GUI
- the offset is optional in new-style expressions



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5407 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-08 18:50:17 +00:00
werner
39690c9cb2 - to simplify communication between the various modules, renamed "ctx" to
draw_ctx, moved it to gui_util.c, and made it a global variable
- moved drawing logic for hovering and dragging into dedicated state machine
  in gui_over.c
- hovering now uses a pixmap to restore the background instead of redrawing
- moved hover drawing functions from gui_inst.c to gui_tools.c
- made hover circle thicker



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5405 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-08 14:11:26 +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
3ef1bb4afa - moved more common editing code from field-type specific functions into
wrappers
- editable fields can now be traversed with Tab
- Enter commits all editable fields
- Esc resets all editable fields to their initial content



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5402 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-07 18:53:01 +00:00
werner
55916cc75b - zoom out now doesn't stop before there is a significant border around the
drawing
- zoom to frame was broken because it didn't track the recent change in
  location of active flag
- we can now pan and zoom while dragging 
- gui_canvas.c:button_release_event didn't consider the button, making 
  centering also end dragging



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5401 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-07 16:19:23 +00:00
werner
d046f9306c - fpd.y: fixed check for empty part name
- added new-style measurements (experimental)



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5400 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-07 13:37:51 +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
68b4fec921 - undelete after recursive delete now brings back everything deleted in that
operation, not just one object at a time
- vector reference counting is not needed now that we have recursive delete.
  Removed it.
- completed recursive delete of vectors
- gridify: give new vectors a minimum length, so that we don't get a weird
  display when starting a new footprint.



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5391 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-06 04:33:49 +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
3db91b5c1b Added delete/undelete.
- when moving a point, we no longer restrict the area around the original
  position once the drag radius has been left
- objects can now be deleted by selecting them and pressing Delete
- deleted objects can be restored by pressing "u"



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5387 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-05 00:32:38 +00:00
werner
5d7ab083a3 - README: described use of semicolons
- README: added that loops can also execute zero times
- accept labels only at the beginning of a line
- rectangles and lines no longer use the bounding box for drawing (caused
  offset problems since we now correct for the line width)
- dist_rect and inside_rect no longer require their input pre-sorted
- pad instances now have their own structure and no longer abuse the bounding
  box to know the pad coordinates
- Makefile: use $(GEN) for fig2dev, to reduce chattiness
- when dragging a point, the symbol is now adjusted accordingly
- added moving of rects, pads, circles, and arcs
- added creation of pads 
- moved rotate_r from gui_inst.c to coord.c
- new function "theta" that combines most of the angle calculations
- save_pix_buf: y < 0 clipping changed width, not height



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5386 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-04 21:45:33 +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
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
3c026696d4 - don't crash when editing a NULL expression (e.g., default width)
- bounding boxes of silk objects now include the width
- # zooms and centers to currently active frame instance



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5378 99fdad57-331a-0410-800a-d7fa5415bdb3
2009-08-03 21:52:21 +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
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