aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2011-10-01 20:51:22 +0200
committerThomas White <taw@bitwiz.org.uk>2011-10-01 20:51:22 +0200
commit9a5060c094813d908d4c9ef7b8631916939bb53d (patch)
tree06dbcf835efc3be3e32ce9c72a604ace1a52a6be /src/mainwindow.c
parente705f42069f505bb8111a1fd7d8534ab3cacd5b8 (diff)
Use function pointers for object rendering and overlays
Diffstat (limited to 'src/mainwindow.c')
-rw-r--r--src/mainwindow.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/mainwindow.c b/src/mainwindow.c
index 4cbe7ef..84926f3 100644
--- a/src/mainwindow.c
+++ b/src/mainwindow.c
@@ -696,16 +696,9 @@ static void draw_editing_bits(cairo_t *cr, struct presentation *p,
{
draw_editing_box(cr, o->x, o->y, o->bb_width, o->bb_height);
- /* FIXME: Dispatch table */
- switch ( o->type ) {
-
- case TEXT :
-
- if ( p->tool == TOOL_TEXT ) draw_caret(cr, o);
- break;
-
- }
+ o->draw_editing_overlay(cr, o);
+ /* Draw margins */
cairo_move_to(cr, o->style->margin_left, -p->border_offs_y);
cairo_line_to(cr, o->style->margin_left,
p->slide_height+p->border_offs_y);