diff options
author | Thomas White <taw@bitwiz.org.uk> | 2011-10-17 22:13:51 +0100 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2011-10-17 22:13:51 +0100 |
commit | a11196f4e47c312ff787d3990e0aa8edefa3e395 (patch) | |
tree | b43a99972750dc62aae39380e3bbdc2e9b856984 /src/presentation.h | |
parent | c124f153354b6f63aa5f40dbe8e99b6b23cb416b (diff) |
New slide redraw logic
This way is much more straightforward, and allows rendering in many different sizes
Diffstat (limited to 'src/presentation.h')
-rw-r--r-- | src/presentation.h | 43 |
1 files changed, 30 insertions, 13 deletions
diff --git a/src/presentation.h b/src/presentation.h index ed962a8..fdf36b3 100644 --- a/src/presentation.h +++ b/src/presentation.h @@ -37,12 +37,15 @@ struct slide { struct presentation *parent; - cairo_surface_t *render_cache; - int render_cache_seq; + /* Any of these may be NULL */ + cairo_surface_t *rendered_proj; + cairo_surface_t *rendered_edit; + + /* This should always be present (and up to date). */ + cairo_surface_t *rendered_thumb; int num_objects; struct object **objects; - int object_seq; }; @@ -108,6 +111,28 @@ struct presentation GtkIMContext *im_context; GtkWidget *tbox; + /* Pointers to the current "editing" and "projection" slides */ + struct slide *cur_edit_slide; + struct slide *cur_proj_slide; + + /* This is the "native" size of the slide. It only exists to give + * font size some meaning in the context of a somewhat arbitrary DPI */ + double slide_width; + double slide_height; + + /* Width of a slide in the editor, projector or thumbnail (pixels) */ + int edit_slide_width; + int proj_slide_width; + int thumb_slide_width; + + /* This is just to help with rendering the slides within the + * editing window. */ + double border_offs_x; + double border_offs_y; + + /* FIXME: Might have more than one object selected at a time. */ + struct object *editing_object; + /* Stylesheet */ StyleSheet *ss; struct style *default_style; @@ -122,16 +147,6 @@ struct presentation int ss_blank; char ss_geom[256]; - double slide_width; - double slide_height; - double border_offs_x; - double border_offs_y; - - /* The slide currently being displayed */ - unsigned int view_slide_number; - struct slide *view_slide; - struct object *editing_object; - /* Tool status */ struct toolinfo *cur_tool; @@ -166,4 +181,6 @@ extern void remove_object_from_slide(struct slide *s, struct object *o); extern struct object *find_object_at_position(struct slide *s, double x, double y); +extern int slide_number(struct presentation *p, struct slide *s); + #endif /* PRESENTATION_H */ |