summaryrefslogtreecommitdiff
path: root/gui/common.h
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-24 00:00:42 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-24 01:55:49 -0300
commit6e07f89c6fd2cf86e25fa245c2688d8c2e20be95 (patch)
treef7f89de51a6e9bdbfa1ae075f22681093fa71b22 /gui/common.h
parent03a241809ee91fb0addd685a71d3c98c69e4c868 (diff)
downloadeeshow-6e07f89c6fd2cf86e25fa245c2688d8c2e20be95.tar.gz
eeshow-6e07f89c6fd2cf86e25fa245c2688d8c2e20be95.tar.bz2
eeshow-6e07f89c6fd2cf86e25fa245c2688d8c2e20be95.zip
gui/: experimental sheet index (WIP)
We also change the way the sheet overlays work: now clicking on the subsheet (which, in the case of the bottom-most sheet did nothing) goes back to the parent and clicking on the root opens the index.
Diffstat (limited to 'gui/common.h')
-rw-r--r--gui/common.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/gui/common.h b/gui/common.h
index 1398931..ace8f82 100644
--- a/gui/common.h
+++ b/gui/common.h
@@ -43,6 +43,12 @@ struct gui_sheet {
struct overlay *over; /* current overlay */
struct aoi *aois; /* areas of interest; in schematics coord */
+ /* thumbnails, for index */
+ struct cro_ctx *gfx_ctx_thumb; /* NULL if not yet rendered */
+ cairo_surface_t *thumb_surf; /* for caching */
+ unsigned thumb_w, thumb_h; /* size for which we cached */
+ struct overlay *thumb_over; /* thumb overlay */
+
struct gui_sheet *next;
};
@@ -74,7 +80,12 @@ struct gui_ctx {
struct gui_hist *hist; /* revision history; NULL if none */
struct hist *vcs_hist; /* underlying VCS data; NULL if none */
- bool showing_history;
+ enum gui_mode {
+ showing_sheet,
+ showing_history,
+ showing_index,
+ } mode;
+
enum selecting {
sel_only, /* select the only revision we show */
sel_split, /* select revision to compare with */
@@ -84,6 +95,7 @@ struct gui_ctx {
struct overlay *sheet_overlays;
struct overlay *hist_overlays;
+ struct overlay *thumb_overlays;
struct overlay *pop_overlays; /* pop-up dialogs */
struct overlay *pop_underlays;
@@ -152,6 +164,11 @@ void sheet_setup(struct gui_ctx *ctx);
void show_history(struct gui_ctx *ctx, enum selecting sel);
+/* index.c */
+
+void index_draw_event(const struct gui_ctx *ctx, cairo_t *cr);
+void show_index(struct gui_ctx *ctx);
+
/* gui.c */
struct gui_sheet *find_corresponding_sheet(struct gui_sheet *pick_from,