From 9a5060c094813d908d4c9ef7b8631916939bb53d Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sat, 1 Oct 2011 20:51:22 +0200 Subject: Use function pointers for object rendering and overlays --- src/mainwindow.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/mainwindow.c') 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); -- cgit v1.2.3