safety, this only works if used directly, not through variables.)
- gui_status.c (edit_any_expr): replaced with dist_expr_store, which changes
values of "0" to "0mm"
- gui_status.c, gui_status.h (edit_dist_expr): new function to edit distance
expressions
- inst.c (obj_line_edit, obj_rect_edit, obj_arc_edit, obj_meas_edit): changed
edit_expr to edit_dist_expr
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5844 99fdad57-331a-0410-800a-d7fa5415bdb3
of the corresponding object but didn't change any table or loop selection to
make it active. (It did already change the frame reference.) This meant that,
upon clicking on an instance, often a different instance of the same object
would be selected. This was confusing at best.
With the below changes, table rows and loop iterations are adjusted such that
the instance that was clicked on becomes active. If the algorithm fails, fped
will print "__inst_select: tries exhausted" and fail safely. Please report if
this happens.
- obj.c (search_inst, find_inst, instantiate): added mechanism to search for
instances matching a previous instance
- obj.c (run_loops, iterate_tables): record matches in found_* elements of the
object's struct
- obj.c (reset_found, activate_found): helper functions to initialize and apply
the activation leading to the instance found
- inst.c (activate_item): added comment explaining how activate_item is
supposed to work and the fallacies of that logic
- inst.c (inst_select): added tries counter to avoid infinite recursion when
results don't converge
- inst.c (__inst_select): when selecting an instance in the same frame, adjust
tables and loops such that the instance becomes active
- inst.c: added call to find_inst after most instance creations (add_inst)
- obj.h: documented the meaning of the curr[ent]*, active*, and found* fields
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5792 99fdad57-331a-0410-800a-d7fa5415bdb3
- gui_status.h, gui_status.c (edit_*): edit functions now accept a tooltip
- added tooltips for editable status area items
- tooltips on setup_set_type_* looked strange. Show them only for the value
field next to the type field.
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5776 99fdad57-331a-0410-800a-d7fa5415bdb3
- gui_status.h: use macro to generate status_set_* delarations, just as we use
a macro for their definitions
- added tooltips for all non-editable fields in the status area
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5773 99fdad57-331a-0410-800a-d7fa5415bdb3
pointer position relative to the user origin in the radius/angle fields.
This helps to make quick manual measurements, e.g., of clearances.
This also fixes the following bug:
- gui_canvas.c (refresh_pos): showed canvas coordinates instead of model
coordinates
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5755 99fdad57-331a-0410-800a-d7fa5415bdb3
variable name" error was never cleared.
- inst.c (validate_pad_name): call status_begin_reporting before expanding the
string, to clear any previous error
- expr.c (expand): if the last character in the name is a dollar sign, print
"incomplete variable name" instead of "invalid character [...]"
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5731 99fdad57-331a-0410-800a-d7fa5415bdb3
but there's another problem in the dumping code that still spoils the fun.
- inst.c (do_move_to_vec): marking algorithm propagated an uninitialized value
- inst.c (do_move_to_vec): we have to clear the marks of vectors that are
before the vector being moved, because they will still be visited and
propagated
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5714 99fdad57-331a-0410-800a-d7fa5415bdb3
segfault, failure to update the screen content, and assigning of invalid
references.
- gui_tools.c: removed duplicate (harmless) line
- inst.c: when moving a vector to a new base, we may have to reorder the list
so that the assertion vectors always follow their bases is still maintained.
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5713 99fdad57-331a-0410-800a-d7fa5415bdb3
- changed pad classification in instances from bare/other to copper/special
- moved LAYER_* definitions from layer.h to layer.c
- after instantiation, we perform sanity checks on pads and remove layers from
coppery pads that are handled by a special layer
- fped.y: the line number in objects was never set
- overlap.c: fixed overlap calculations
- gui_tool.c: end_new_pad didn't initialize the pad type
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5635 99fdad57-331a-0410-800a-d7fa5415bdb3
make adjustments when removing layers provided by specialized pads
- gui_inst.c: moved gc construction from gui_draw_pad and gui_draw_rpad to
shared pad_gc
- layer.h: new home of all definitions related to pads and layers
- layer.c:
- overlap.c: functions to test for overlaps of pad shapes (in progress)
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5634 99fdad57-331a-0410-800a-d7fa5415bdb3
- gui_status.c: the x entry are is now a vbox with variable content
- the pad type is now shown in the x entry area and can be changed by clicking
on it
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5633 99fdad57-331a-0410-800a-d7fa5415bdb3
solder mask pattern
- postscript.c: don't scale fonts down to nothing to make measurement text fit
(in progress)
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5626 99fdad57-331a-0410-800a-d7fa5415bdb3
- vectors now have their own struct in inst.u and don't share inst.u.rect.end
- when selecting points for measurements, use the highlighting we've already
done and don't redo all the O(n^3) searching for each mouse pointer movement
- removed debug code that printed what new measurements are like. We can now
use the code view for that.
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5552 99fdad57-331a-0410-800a-d7fa5415bdb3
- .fpd file format: new directive "unit" to set the default unit
- new selection was too aggressive - make it only rearrange settings if we also
fail the second vector search
- gui_draw_pad_text: calculation of height vs. width lost too much precision,
causing pad text to be rotated arbitrarily
- drag_new_vec: display distance in mil if unit is mil
- end_new_raw_vec: store distance in mil if unit is mil
- gridify: use a 10 mil grid if unit is mil
- ps_hline: corrected gsave/grestore mismatch
- Makefile: made "all" a prerequisite of "install"
- Postscript output now mentions the default unit (if set)
- ps_package: height and width were swapped, oopsie !
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5525 99fdad57-331a-0410-800a-d7fa5415bdb3
- postscript.c: started adding generation of object-level frames (on-going)
- gui_canvas.c: moved call to inst_deselect into inst_select, so that
inst_select can keep track of the previous selection (if any)
- inst_select: if clicking on the location of the previous selection, try to
select the next matching item
- inst_select: if we can't find an active item, try to see if we can get
something by changing active references or - if all else fails - by
activating a different frame
- end_new_frame: reset the tool after placing the frame
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5522 99fdad57-331a-0410-800a-d7fa5415bdb3
length of the part of the diagonal that's on the pad. In the case of a
circle (BGA), this is just the diameter.
- changed label for diagonals from "r" to "d"
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5515 99fdad57-331a-0410-800a-d7fa5415bdb3
instantiation and create a partially formed instance. During measurement
instantiation, we complete that instance.
- leak.supp: finally figured out how to write a valgrind suppression file
- fped.c: we don't need the FPED_NO_GUI kludge anymore
- fped.c: moved gui_cleanup_style to gui_main
- dereference icons (seems that this doesn't deallocate everything, though)
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5514 99fdad57-331a-0410-800a-d7fa5415bdb3
- deallocate all our data structures on exit (to help find memory leaks, bad
pointers, and general logic errors)
- fixed memory leak when allocating pad names in instantiation
- added "magic" environment variable FPED_NO_GUI to run fped without
initializing Gtk+
- added valgrind wrapper "leakcheck"
- delete.c: destroy() now requires a deletion to exist
- vacate_op: free string expressions
- destroy_obj: free measurement labels
- delete_references: use do_delete_obj so the we don't bump the group number
- delete_frame: delete references after deleting the frame itself, so they end
up on the stack above the frame and get destroyed first
- do_delete_vec: like above, even though it doesn't matter here
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5506 99fdad57-331a-0410-800a-d7fa5415bdb3
- 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
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
- 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
- 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
- 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
- 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
- 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
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
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
- 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
- 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
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
- 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
- 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
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
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
- 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
- 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
- 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
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
- 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
- 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
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
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