created file. This is a precaution against accidently saving to a manual work,
which would change the structure and remove all comments.
- fped.h, fped.c, file.c: moved declaration of save_file_name into shared
header
- dump.h, dump.c (MACHINE_GENERATED): moved header marking machine-generated
files into shared macro
- gui.c (save_as_fpd): added "Save as" dialog
- fped.h, fped.c (load_file), gui.c: disable "Save" if editing a file that
doesn't have the machine-generated header
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5922 99fdad57-331a-0410-800a-d7fa5415bdb3
list of frames at the end of parsing. We now tentatively append it each time
a %dump is requested.
- fpd.y: append the root frame before calling "dump"
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5921 99fdad57-331a-0410-800a-d7fa5415bdb3
of README.
- fpd.l, fpd.y, README: added debugging directives %del, %move, %print, %dump,
and %exit
- obj.h, fpd.y (find_obj, find_label, new_obj): objects can now be labeled
- obj.c (obj_anchors), inst.c (inst_anchors): gathering the list of anchors is
now a per-object function, not an instance "method". inst_anchors implements
the vector vs. object switch.
- inst.h, inst.c: removed all *_op_anchors functions
- expr.c (str_unit): in the past, we returned a malloc'ed string, but these
times are long gone. Thus, don't stralloc("").
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5919 99fdad57-331a-0410-800a-d7fa5415bdb3
unselected value was set to the background color for an inactive row. Now it's
set to the color of an active row.
- gui_frame.c (unselect_value): to detect a table, consider not only the number
of rows but also the number of columns
- gui_frame.c (unselect_value, edit_value_list): use COLOR_EXPR_* for
expressions, not COLOR_VAR_* (this has no visual effect for now, since the
colors in questions have the same value)
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5918 99fdad57-331a-0410-800a-d7fa5415bdb3
changed. This was particularly noticeable when editing variable names.
- gui_status.c (activate): reset the selection (along with all open edits) also
when nothing has changed
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5915 99fdad57-331a-0410-800a-d7fa5415bdb3
- gui_util.c: gtk_widget_get_snapshot is only available since Gtk version 2.14.
Omit debug_save_widget if using an older version of Gtk. (Reported by Igor
Almeida.)
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5853 99fdad57-331a-0410-800a-d7fa5415bdb3
Measurement lines now have a fixed size, so they can't scale to invisibility.
- Makefile: don't pass CFLAGS twice when making dependencies
- postscript.c (postscript): moved iteration over packages to new function
ps_for_all_pkg, for sharing with postscript_fullpage
- postscript.c (postscript_fullpage): print all packages
- postscript.c (ps_meas): use real size for measurement lines
- postscript.c (PS_MEAS_LINE): changed measurement line width from 0.015 scaled
mm to 0.1 real mm
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5851 99fdad57-331a-0410-800a-d7fa5415bdb3
quite a bit. We now use per-file granularity for dependencies, reducing the
overhead by about a factor of 30.
- Makefile: generate per-file dependencies (.d) when compiling, based on
http://scottmcpeak.com/autodepend/autodepend.html
- Makefile: "depend" target is no longer used
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5850 99fdad57-331a-0410-800a-d7fa5415bdb3
- gui_frame.c (build_table): don't add an extra column for wrapped tables. They
look better without it.
- gui_frame.c (build_table): add two pixels of background color between parts
of a wrapped table
- gui_style.h (FRAME_AREA_MISC_WIDTH): reduced to better fit real layout
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5848 99fdad57-331a-0410-800a-d7fa5415bdb3
- gui_frame.c (build_table): restructured code to build tables column by column
instead of row by row
- gui_frame.c (build_table): wrap tables wider than the screen area available
for variables and tables
- gui_util.h, gui_util.c (get_widget_width): new helper function that returns a
widget's requested width
- gui.c, gui_style.h: replace hard-coded initial pane size with constants
DEFAULT_FRAME_AREA_WIDTH and DEFAULT_FRAME_AREA_HEIGHT
- gui.c (change_world): pass the width of the left pane as a wrapping hint to
build_frames
- gui_frame.c (build_frames): subtract width of longest package template or
frame name from available width
- gui.c (change_world): moved call to build_frames to separate function
do_build_frames
- gui.c (gui_main): used g_signal_connect_swapped instead of g_signal_connect
for no good reason
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5847 99fdad57-331a-0410-800a-d7fa5415bdb3
- Makefile: pass SVN version and commit status to CPP
- gui.c (gui_main): show SVN revision in the title bar, if available
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5845 99fdad57-331a-0410-800a-d7fa5415bdb3
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
having to go all the way up to the frame.
- gui_frame.c: factory tables had very ragged indentation
- gui_frame.c: added "Add variable" and "Add loop" to variable, table, and loop
pop-up
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5843 99fdad57-331a-0410-800a-d7fa5415bdb3
etc. We restore sanity by resetting the locale to "C". Reported by Nick
Oestergaard.
- gui.c (gui_init): reset the locale to "C" after calling gtk_init
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5793 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
of active frame reference, row, and loop instance affects this value, as it
should.
- obj.c (run_loops): reset loop->curr_value to UNDEF when instantiation is done
- obj.c (generate_frame): reset frame->curr_parent to NULL when instantiation
is done
- expr.c (eval_var, eval_string_var): distinguish beteen instantiation and
editing mode, and use "active" values in the latter
- gui_frame.c (edit_var, edit_value, edit_value_list): display the value of the
variable or the active expression in the "X" field
- gui_frame.c (assignment_value_select_event, table_value_select_event,
loop_from_select_event, loop_to_select_event): pass the frame to edit_value
and edit_value_list
- expr.c (str_unit): since we may now accidently expose a wider range of
exponents, removed -2 ... 2 exponent range limitation
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5788 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
This often caused accidental builds without proper dependencies.
- Makefile: include .depend also if it doesn't exist yet. This way, GNU make
will build it and all is fine.
- Makefile: use "-include" instead of "include" to avoid unnecessary nagging
- Makefile: make .depend depend on *.h and *.c, so that we catch all changes
that _might_ affect the dependencies (this is a little inefficient but better
safe than sorry)
- README: "make dep" is no longer needed
- TODO: added thoughts for more improvements
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5774 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
click on an anchor point of the selected object would be treated as a drag,
even if the click was very short. This created a very confusing user
experience.
- gui_canvas.c (button_release_event): if we didn't "escape" the drag radius,
don't treat the click as a drag but run the click-to-select process instead
(note: the drag visualization still flickers briefly)
- gui_canvas.c (button_release_event): to find out if we've escaped the drag
radius, just call drag_left instead of duplicating some of its code
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5772 99fdad57-331a-0410-800a-d7fa5415bdb3
be active, while in truth it had been reset internally.
- gui_canvas.c (button_press_event): if a click is used for selection (and not
dragging), reset the tool first
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5771 99fdad57-331a-0410-800a-d7fa5415bdb3
region to only cover the newly exposed area. This prevented the general
redrawing from clearing areas that still contained hovering and dragging
items. However,the paint region has no effect on reading from the drawable.
Thus when rebuilding the hover and drag stack, the still tainted image was
stored.
This issue could be solved by either introducing a separate mode where the
stack is redrawn instead of rebuilt, or by turning off double-buffering.
The former would complicate the already fickle logic of overlays, and not
having double-buffering doesn't seem to cause any ill effects.
- gui_canvas.c (make_canvas): disable double-buffering of canvas so that the
paint region is not restricted in expose events
- gui_tool.c (tool_tip): enabled canvas tooltips
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5770 99fdad57-331a-0410-800a-d7fa5415bdb3
- Makefile: use PID in temporary file name in PPM to XPM conversion, so that we
don't get mysterious failures in parallel builds
- gui_util.c (debug_save_pixbuf, debug_save_widget): helper functions to debug
pixbuf and widget content
- Makefile: added target "montage" to show the images recorded with
debug_save_pixbuf and debug_save_widget
- gui_over.c: when debugging, record the saves pixbuf in files
- gui_tool.c (tool_hover): removed unnecessary initialization
- added infrastructure for tooltips on the canvas (doesn't work properly yet)
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5769 99fdad57-331a-0410-800a-d7fa5415bdb3
existed, thus creating a structure that could be saved but no longer loaded.
Likewise, one could add new variables/loops/columns if there was already one
named "_", thus creating the same problem.
- gui_frame.c (pop_up_frame): disable "Add frame" if we already have a frame
named "_"
- gui_frame.c (pop_up_frame): disable "Add variable" and "Add loop" if we
already have a variable or loop named "_"
- gui_frame.c (pop_up_single_var, pop_up_table_var): disable "Add column" if
we already have a variable or loop named "_"
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5765 99fdad57-331a-0410-800a-d7fa5415bdb3
- gui_frame.c (popup_del_frame): when deleting a frame, notify the frame tool
so that it can undo any locking
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5764 99fdad57-331a-0410-800a-d7fa5415bdb3
expression, the background of the first expression did not revert to its
original color.
- gui_style.h (COLOR_CHOICE_SELECTED): made blue a bit lighter, to improve
contrast of black foreground text
- gui_frame.c (unselect_value): build_assignment uses COLOR_EXPR_PASSIVE for
expressions in assignments, so we also have to do the same here.
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5763 99fdad57-331a-0410-800a-d7fa5415bdb3
blends in and won't be mistaken for a button.
- Makefile: generate icon XPMs with transparent background
- gui_util.c (make_image): set transparency color to white
- gui_util.c (make_transparent_image): new function to return a transparent
image created from an XPM
- gui_tool.c (get_icon_by_inst): make the returned image transparent instead of
opaque
- icons/vec.fig, icons/arc.fig, icons/line.fig, icons/rect.fig, icons/circ.fig:
darkened to increase contrast on grey background
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5758 99fdad57-331a-0410-800a-d7fa5415bdb3
such a vectors pointing in the wrong direction. They were caused by overflows
due to inadequate zoom settings.
- gui.c (change_world): if the extents have grown, zoom to extents
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5756 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
be necessary if printing unusually large components.)
- postscript.c: in "maxfont", if we get a zero-sized font, dodge the division
by zero
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5752 99fdad57-331a-0410-800a-d7fa5415bdb3
- moved all examples to examples/
- README: updated and corrected example invocation
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5748 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
- dump.c (print_obj): removed free(s2) left over from before the reduction of
allocations
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5728 99fdad57-331a-0410-800a-d7fa5415bdb3
- gui_tool.c (end_new_rpad): didn't initialize obj->u.pad.type, which could
cause pad_type_to_layers to abort
- postscript.c: added experimental code for full-page printing (doesn't work
properly yet)
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5727 99fdad57-331a-0410-800a-d7fa5415bdb3
deleted. The new algorithm checks for collisions and also reduces the number
of allocations.
- dump.c (generate_name): store the name in the vector being named
- dump.c (generate_name): compare the new name against all names in use
- dump.c (base_name, obj_base_name, print_label): don't allocate the name
- dump.c: changed all users of the above functions accordingly
git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5715 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