1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-27 01:59:42 +02:00
Commit Graph

283 Commits

Author SHA1 Message Date
Werner Almesberger
f5c908c36f eeshow/gui.c: proof-of-concept implementation of jumping by glabel
What's still missing:
- don't require click to dehover
- help to find glabel on destination sheet
- help with finding glabel on current sheet
- avoid darkened overlap
- maybe indicate in/out/bidir/passive
2016-08-11 01:27:59 -03:00
Werner Almesberger
cfa25b4b4c eeshow/gui.c: show glabel pop-up on glabel 2016-08-10 23:47:08 -03:00
Werner Almesberger
0fdce017fb eeshow/: make glabels hoverable (WIP) 2016-08-10 21:50:07 -03:00
Werner Almesberger
08de2f7b4b eeshow/sch.h (sch_obj_glabel): indicate global labels (in data) more clearly 2016-08-10 20:49:01 -03:00
Werner Almesberger
d63b534fb3 eeshow/gui.c: show sheet number on hover 2016-08-10 20:41:33 -03:00
Werner Almesberger
8a0a79e461 eeshow/util.h (alloc_type_n): get rid of all these alloc_size(sizeof(foo), n) 2016-08-10 20:28:31 -03:00
Werner Almesberger
2ab72ab0e3 eeshow/gui.c (sheet_selector_recurse): we can now jump to the exact sheet
No need for the "go up" hack.
2016-08-10 20:24:03 -03:00
Werner Almesberger
97de1dda47 eeshow/gui.c (struct gui_sheet): record ctx, to allow for simpler callbacks 2016-08-10 20:20:51 -03:00
Werner Almesberger
cf2ca585f5 eeshow/gui.c: write down some more thoughts on making caching better 2016-08-10 20:15:07 -03:00
Werner Almesberger
9524447bf1 eeshow/sch.h (struct sheet.parent): remove; we can just record it locally 2016-08-10 19:41:17 -03:00
Werner Almesberger
8f352832e0 eeshow/: simple caching of sheets
We only reuse previous sheets if ...

- they have no sub-sheets, and
- all the libraries are identical.

This reduces the -N-150 time from 8.3 s (caching only libraries) to 4.3 s.

Since we only need to know whether there are sub-sheets, but not what
exactly they are, we can also partially undo the previous commit,
77c0e07590
2016-08-10 19:37:44 -03:00
Werner Almesberger
77c0e07590 aeeshow/sch.h, sch-parse.c: record subsheets in parent, for future caching 2016-08-10 16:33:40 -03:00
Werner Almesberger
b6975e3998 eeshow/gui.c: only parse libraries if any have changed
This reduced the time for
./eeshow -N-150 -r neo900.lib /home/qi/kicad-libs/components/powered.lib /home/n9/ee/hw/neo900.sch

from 10.3 (not caching anything) s to 8.3 s (caching libraries).
2016-08-10 16:17:58 -03:00
Werner Almesberger
fb6d6c026b eeshow/git-file.c (related_other_repo): print warning only once 2016-08-10 16:03:16 -03:00
Werner Almesberger
ab613fcc86 eeshow/lib-parse.c (lib_parse_file): separate "core" from lib_parse 2016-08-10 15:26:03 -03:00
Werner Almesberger
4a2177e041 eeshow/gui.c (add_hist): avoid excessive use of "(*anchor)" 2016-08-10 14:07:03 -03:00
Werner Almesberger
971ba27131 eeshow/gui.c (struct gui_hist.hist): rename to vcs_hist
Removing some ambiguity.
2016-08-10 14:05:11 -03:00
Werner Almesberger
3d794c5965 eeshow/file.c, git-file.c: give access to object IDs, for caching 2016-08-10 13:52:56 -03:00
Werner Almesberger
54922dc343 eeshow/: option -N depth to limit history depth; -N-depth exits after parsing 2016-08-10 09:08:22 -03:00
Werner Almesberger
02e4d6e071 eeshow/TODO: update, add more GUI-related items 2016-08-10 09:08:15 -03:00
Werner Almesberger
539f72b0d9 eeshow/gui.c: move style definitions to gui-style.h 2016-08-09 19:21:02 -03:00
Werner Almesberger
ea3f98c569 eeshow/gui-style.h, gui-style.c: remove unused styles 2016-08-09 19:14:15 -03:00
Werner Almesberger
2682625e7d eeshow/gui.c (setup_styles): we no longer need this (compose on the fly) 2016-08-09 19:05:03 -03:00
Werner Almesberger
672228148d eeshow/gui.c: replace {curr,last}_hist with {new,old}_hist
Since we already change the UI paradigm, this greatly simplifies the code.
2016-08-09 19:01:05 -03:00
Werner Almesberger
2bd452d3b3 eeshow/gui.c: redesign selection history to use old/new paradigm (WIP)
Also improved visual representation.
2016-08-09 18:28:59 -03:00
Werner Almesberger
6bb814bae6 eeshow/gui-over.h: use struct for color, instead of array
That way, we can use assignments on them.
2016-08-09 16:01:01 -03:00
Werner Almesberger
f973abd98c eeshow/gui-over.c: move styles to gui-style.c 2016-08-09 15:30:30 -03:00
Werner Almesberger
315494d617 eeshow/diff.c: make red a little less dominant 2016-08-09 14:19:21 -03:00
Werner Almesberger
29f4db55ed eeshow/gui.c: newer revision is on top and in diffs it's green 2016-08-09 14:16:05 -03:00
Werner Almesberger
afe744c63e eeshow/gui.c: clicking outside the history list now closes it 2016-08-09 13:28:27 -03:00
Werner Almesberger
bfd2ef39a2 eeshow/gui-over.c: style is now copied, not just referenced
This way, we can generate styles on the fly and won't have to manage a
huge collection of pre-designed styles.
2016-08-09 13:13:18 -03:00
Werner Almesberger
bbb375ce26 eeshow/gui.c: show clickable overlay boxes also for parents of current sheet 2016-08-09 12:55:29 -03:00
Werner Almesberger
629b9356e2 eeshow/: fix offset calculation and also get rid of rounding artefacts 2016-08-09 12:28:21 -03:00
Werner Almesberger
cc3befe110 eeshow/diff.c (diff_to_canvas): simplify offset calculation 2016-08-09 12:08:08 -03:00
Werner Almesberger
d4e3018c12 eeshow/gui.c (go_to_sheet): don't try to access history if we have none 2016-08-09 12:03:36 -03:00
Werner Almesberger
d320dbbf2b eeshow/diff.c (diff_to_canvas): fix offset calculation 2016-08-09 11:21:52 -03:00
Werner Almesberger
20c821f0ba eeshow/gui.c (curr_sheet_size): also support diff mode 2016-08-09 11:20:54 -03:00
Werner Almesberger
eff0ad4860 eeshow/gui.c (zoom_to_extents): abstract obtaining the sheet size 2016-08-09 10:58:29 -03:00
Werner Almesberger
be43cce751 eeshow/cro.c (cro_img_end): flush surface
It worked without it, but better safe than sorry.
2016-08-09 10:27:22 -03:00
Werner Almesberger
029cc30700 eeshow/diff.c: free list of highlighted areas 2016-08-09 10:24:08 -03:00
Werner Almesberger
71e79a20d0 eeshow/diff.c (diff_to_canvas): point out flaw in offset calculation 2016-08-09 10:20:46 -03:00
Werner Almesberger
4988736351 eeshow/gui.c: experimentally use pixel differences (WIP)
This still has a number of bugs but the basics work.
The most glaring issues:
- AoI coordinates are wrong, so AoIs don't really work
- "center and zoom to extents" is all wrong
2016-08-09 10:16:31 -03:00
Werner Almesberger
e59fff3363 eeshow/diff.c (diff_to_canvas): draw pixel differences to canvas (WIP)
Offsets still aren't right.
2016-08-09 10:14:36 -03:00
Werner Almesberger
bcec5c005f eeshow/cro.c (cro_img): draw on image for external use 2016-08-09 10:09:08 -03:00
Werner Almesberger
13828eff94 eeshow/sch-parse.c (free_sheet): don't free recursively (caller frees all) 2016-08-08 23:44:27 -03:00
Werner Almesberger
cd0ee8932d eeshow/cro.c (cro_get_size): split from end_common 2016-08-08 17:16:50 -03:00
Werner Almesberger
e874d66ebb eeshow/cro.c: disentangle interfaces
They all are very similar but still differ in subtle ways.
2016-08-08 17:00:33 -03:00
Werner Almesberger
a564b5d03e eeshow/cro.c (new_cc): separate context creation from option parsing 2016-08-08 16:54:09 -03:00
Werner Almesberger
52ab16d62a eeshow/cro.c (cr_png_end): was almost identical to cro_img_end, unify 2016-08-08 16:49:37 -03:00
Werner Almesberger
f8cc8ba598 eeshow/gui.c (gui): set default size to 640 x 480 pixels 2016-08-07 22:34:01 -03:00
Werner Almesberger
24422a7721 eeshow/gui.c: show either revisions or history, never both at the same time
Also move the revisions to the left edge, to ease navigation.
2016-08-07 21:47:50 -03:00
Werner Almesberger
aeedab62f7 eeshow/git-file.c (canonical_path_into_repo): really catch divergent paths 2016-08-07 16:13:28 -03:00
Werner Almesberger
43542d6504 eeshow/diff.c (differences): clean up pixel processing 2016-08-07 16:03:56 -03:00
Werner Almesberger
3b8b8a20d2 eeshow/lib-parse.c (parse_def): don't break free'ing the component name 2016-08-07 16:03:13 -03:00
Werner Almesberger
9c988e2d7e eeshow/delta.c: compare components object by object 2016-08-07 14:31:38 -03:00
Werner Almesberger
f40f012a1e eeshow/: add color overriding; basic infrastructure for viewing deltas 2016-08-07 14:06:50 -03:00
Werner Almesberger
ba62fc4fc4 eeshow/delta.c: very coarse structural deltas (WIP) 2016-08-07 14:05:57 -03:00
Werner Almesberger
4418741fc6 eeshow/style.h, style.c: add Green, Red, Green2, Green3, and a user light grey 2016-08-07 14:05:31 -03:00
Werner Almesberger
d953345397 eeshow/cro.h, cro.c: add color override 2016-08-07 08:13:16 -03:00
Werner Almesberger
c2c58f6892 eeshow/: selection of 2nd history entry (for comparisons, WIP) 2016-08-07 07:51:56 -03:00
Werner Almesberger
15deee6955 eeshow/gui-over.c: more structured approach to composing styles 2016-08-07 06:24:10 -03:00
Werner Almesberger
cb7902fcb2 eeshow/gui.c (struct gui_ctx.vcs_overlays): rename to hist_overlays
We use "hist" everywhere else to refer to the history in the GUI context.
2016-08-07 06:23:04 -03:00
Werner Almesberger
bd7149ba0b eeshow/gui.c (setup_styles): present history "ragged right" 2016-08-07 06:16:41 -03:00
Werner Almesberger
56e36b7e9d eeshow/: move sheet overlays to right screen edge; move history left 2016-08-07 06:13:26 -03:00
Werner Almesberger
c908e4de0e eeshow/gui.c: show details also on hover in history list 2016-08-07 05:22:55 -03:00
Werner Almesberger
3c71bf7b05 eeshow/: hovering over the revision shows more details 2016-08-07 05:09:34 -03:00
Werner Almesberger
cb4ee6d5b9 eeshow/: work around the ink_rect.y bug more elegantly
Still have no clue what causes this.
2016-08-06 23:02:42 -03:00
Werner Almesberger
51f6852bf9 eeshow/: overlays can now have different styles (WIP) 2016-08-06 20:46:03 -03:00
Werner Almesberger
18c3b6e476 eeshow/: use printf-style formatting for overlay text; test mode -F fmt string 2016-08-06 19:14:31 -03:00
Werner Almesberger
45726be08f eeshow/gui-over.c (overlay_draw): use Pango 2016-08-06 13:38:13 -03:00
Werner Almesberger
3b5daecbd6 eeshow/gui.c (go_to_sheet): don't "render" (record) sheets before shown 2016-08-06 10:19:16 -03:00
Werner Almesberger
acbce9a214 eeshow/gui.c: add navigation in history 2016-08-06 10:00:29 -03:00
Werner Almesberger
b067cf9a38 eeshow/gui.c: parse sheets for each revision
We currenly make no effort to avoid duplicate work, so this is slow.
Also, we don't actually do anything with the revision information, yet.
2016-08-06 09:27:22 -03:00
Werner Almesberger
8fb867105c eeshow/git-hist.c (vcs_git_get_rev), git-hist.h: revision string from history 2016-08-06 01:18:43 -03:00
Werner Almesberger
a58bc93d69 eeshow/: more error returns in file functions; file_open_revision
file_open_revision is for opening files based on the revision history.
2016-08-06 01:15:49 -03:00
Werner Almesberger
ce5111ae07 eeshow/gui.c (gui): quit if we couldn't parse (and don't segfault) 2016-08-05 21:28:45 -03:00
Werner Almesberger
fffa29bbb3 eeshow/main.c (usage): update to show GUI invocation 2016-08-05 21:19:56 -03:00
Werner Almesberger
21c9a6e1aa eeshow/Makefile (test, testref): must use -- fig for FIG output
Anything without -- goes to the GUI (except for development options like
-C and -H).
2016-08-05 21:17:50 -03:00
Werner Almesberger
e949130daf eeshow/main.c (main): gtk_init removes --, so only call it if we have none 2016-08-05 21:14:26 -03:00
Werner Almesberger
f4944a5da9 eeshow/ (file_open, *_parse): return 0 on error (may still exit) 2016-08-05 21:02:57 -03:00
Werner Almesberger
dfebad4e6a eeshow/ (file_read, vcs_git_read): now pass 0 return from parse() 2016-08-05 20:42:42 -03:00
Werner Almesberger
e5f010797d eeshow/sch-parse.c (parse_line): no longer use return code 0 for EOF
We'll soon use it to indicate a parsing problem.
2016-08-05 20:41:35 -03:00
Werner Almesberger
59b7946a5f eeshow/lib-parse.c (lib_free): add cleanup of component data 2016-08-05 20:34:15 -03:00
Werner Almesberger
c54bf3de06 eeshow/sch-parse.c (sch_free): add cleanup of schematics data 2016-08-05 20:25:58 -03:00
Werner Almesberger
5f0678097f eeshow/gui.c: get only list of file names from main, parse on its own 2016-08-05 10:24:39 -03:00
Werner Almesberger
ba95c01249 eeshow/: detect if repo is dirty and add history entry with commit = NULL 2016-08-05 09:24:56 -03:00
Werner Almesberger
7dc1211cfd eeshow/git-util.c, git-util.h: new place for things like git_*init* 2016-08-05 08:57:44 -03:00
Werner Almesberger
3eaf4567fa eeshow/git-hist.c (vcs_git_try): ignore repo if empty or corrupted 2016-08-05 08:41:33 -03:00
Werner Almesberger
dc2b477cf8 eeshow/gui.c: show commit on sheet (if available); click to go to history 2016-08-05 08:31:50 -03:00
Werner Almesberger
17e70172bf eeshow/: if sheet is in repo, retrieve history, display in GUI on Up/Down (WIP)
This isn't useful yet.
2016-08-04 20:35:41 -03:00
Werner Almesberger
17360f7ddd eeshow/git-file.c (vcs_git_init): common initialization 2016-08-04 19:40:29 -03:00
Werner Almesberger
1c6116a8d6 eeshow/: fix some whitespace issues
- trailing space
- space before semicolon
- indentation with spaces instead of tabs (copy & paste)
2016-08-04 19:25:31 -03:00
Werner Almesberger
e18c146323 eeshow/: option -H path_into_repo to list branched history of repository 2016-08-04 16:45:48 -03:00
Werner Almesberger
9564707f83 eeshow/DEMO: add libgtk-3-dev dependency; add GUI invocation 2016-08-04 10:11:47 -03:00
Werner Almesberger
55cf36b609 eeshow/git-file.c (related_other_repo): mark warning as such; fix typo 2016-08-04 10:10:53 -03:00
Werner Almesberger
8abea1b890 eeshow/gui.c, README: PgUp/PgDn iterate through sheets in sequence 2016-08-04 09:02:33 -03:00
Werner Almesberger
ff17f0e492 eeshow/gui.c: replace ugly and fragile "prev" logic with a simple search 2016-08-04 08:49:54 -03:00
Werner Almesberger
258876ef2c eeshow/: retrieve title from *.sch; prefer over subsheet name when displaying 2016-08-04 08:42:36 -03:00
Werner Almesberger
1057f2640b eeshow/README, COPYING.GPLv2 2016-08-04 08:11:36 -03:00
Werner Almesberger
064a561285 eeshow/: add AOI to overlays; clicking on sheet name returns to previous sheet 2016-08-04 07:55:42 -03:00
Werner Almesberger
849b8f33e5 eeshow/gui-aoi.c, gui-aoi.h: split areas of interest from gui.c; abstract better 2016-08-04 07:19:18 -03:00
Werner Almesberger
18f35dc8e0 eeshow/DEMO: update URL for Neo900 "ee" repo
Out gitweb is temporarily down, but we have git-daemon up, providing
the much better (faster) git://...
2016-08-03 21:52:28 -03:00
Werner Almesberger
69497551dd eeshow/gui-over.h, gui-over.c: split overlays from gui.c 2016-08-03 20:55:51 -03:00
Werner Almesberger
2e909029bc eeshow/gui.c: add overlays; use to show sheet name (WIP) 2016-08-03 19:21:38 -03:00
Werner Almesberger
27b217d062 eeshow/gui.c (redraw): abstract gtk_widget_queue_draw() 2016-08-03 18:49:16 -03:00
Werner Almesberger
d07a5b8d8b eeshow/gui.c (key_press_event): Home returns to the topmost sheet 2016-08-03 16:00:51 -03:00
Werner Almesberger
9b81d08525 eeshow/gui.c: also zoom to extents when resizing the window 2016-08-03 13:15:25 -03:00
Werner Almesberger
92a0cfab4b eeshow/gui.c: zoom to extents on [*] and when showing a new sheet 2016-08-03 13:05:30 -03:00
Werner Almesberger
7630325ae6 eeshow/gui.c: delete/backspace return to previous sheet 2016-08-03 12:34:33 -03:00
Werner Almesberger
2135f8ffc9 eeshow/gui.c: add "areas of interest" and selection of sub-sheets 2016-08-03 12:26:22 -03:00
Werner Almesberger
95bc0f06fd eeshow/sch.h, sch-parse.c: add pointer to sub-sheet to obj.u.sheet 2016-08-03 11:53:03 -03:00
Werner Almesberger
48327e149b eeshow/sch.h, sch-parse.c, sch-render.c: rename obj.u.sheet to obj.u.name 2016-08-03 11:46:24 -03:00
Werner Almesberger
fb888f3714 eeshow/TODO: split long list by area 2016-08-03 10:57:42 -03:00
Werner Almesberger
1771c635b0 eeshow/: separate sheet context from GUI ctx; record all sheets we have
"record" as in "render with record_*"
2016-08-03 10:54:06 -03:00
Werner Almesberger
2775b5cb8d eeshow/gui.c: add zoom in/out with + (or =) and - 2016-08-03 10:05:01 -03:00
Werner Almesberger
c8b8dbd174 eeshow/: add panning (middle mouse button) 2016-08-03 09:57:58 -03:00
Werner Almesberger
e2ff07457c eeshow/: scroll wheel zooms 2016-08-03 09:33:16 -03:00
Werner Almesberger
15d434294d eeshow/cro.h (cro_img_end, cro_img_write, cro_canvas_end): don't need void *
Since we don't call these functions through gfx_ops, we don't need
a void pointer.
2016-08-03 07:41:44 -03:00
Werner Almesberger
76c1f916df eeshow/: add rendering on Gtk canvas 2016-08-03 07:38:57 -03:00
Werner Almesberger
3c13d609f7 eeshow/: implement related_same_repo 2016-08-02 19:21:43 -03:00
Werner Almesberger
a21bc66e55 eeshow/: make "related" work also for repositories (WIP)
For now, we only support the case where the file doesn't exists in any
other repo, which is a common situation with sub-sheets.
2016-08-02 19:13:28 -03:00
Werner Almesberger
ade54c6029 eeshow/cro.c: set line cap to CAIRO_LINE_CAP_ROUND or CAIRO_LINE_CAP_SQUARE
CAIRO_LINE_CAP_ROUND is the same as in FIG mode.

Note that all non-dashed lines disappear when generating PDF and
CAIRO_LINE_CAP_ROUND is set. For now, we just use CAIRO_LINE_CAP_SQUARE.
2016-08-02 17:26:02 -03:00
Werner Almesberger
56b4cb89cc eeshow/cro.c (cr_pdf_end): reduce line width to 0.5 * scale
With 2, lines were far too thick. Note that the 0.5 points (1/72 in) we
have now are roughly twice what XFig uses (1/160 in for PDF or PNG),
yet things don't look very fat there.
2016-08-02 17:16:43 -03:00
Werner Almesberger
0d41488f93 eeshow/sch-parse.c (recurse_sheet): clean up handling of next_obj 2016-08-02 17:12:33 -03:00
Werner Almesberger
9182b9ce48 eeshow/fig.c; define color 32 also when using a template 2016-08-02 16:46:50 -03:00
Werner Almesberger
49a6ebd797 eeshow/: make libraries "related" to the [main] schematics sheet
That way, we can use relative paths on the command line, ideally just
./eeshow foo.lib bar.lib com/plex/path/foo.sch
2016-08-02 16:38:21 -03:00
Werner Almesberger
24522c45e0 eeshow/sch-parse.c (recurse_sheet): move parent/related logic to file.c 2016-08-02 16:27:08 -03:00
Werner Almesberger
4721cdea83 eeshow/Makefile (pdf): new test target to exercise eeshow -r 2016-08-02 16:26:33 -03:00
Werner Almesberger
6793f06aeb eeshow/sch-parse.c, lib-parse.c: use file name and line number from "file" 2016-08-02 15:44:28 -03:00
Werner Almesberger
05af03a0fd eeshow/: split file_read into open/read/close
This is to allow for a better implementation of "related" in the future.
2016-08-02 15:36:18 -03:00
Werner Almesberger
86feabf49c sch2fig/git-file.c, git-file.h: start our git_* identifiers with vcs_git_
Since we'll use this name space more intensely, we don't want to risk
clashes
2016-08-02 14:49:54 -03:00
Werner Almesberger
3864743280 eeshow/: PNG and PDF now write to standard output if -o outfile is absent 2016-08-02 11:46:30 -03:00
Werner Almesberger
a941a5f246 rename sch2fig to eeshow 2016-08-02 11:00:08 -03:00