Logo Search packages:      
Sourcecode: inkscape version File versions

static void sp_canvas_init ( SPCanvas canvas  )  [static]

Callback: object initialization for SPCanvas.

Definition at line 1010 of file sp-canvas.cpp.

References SPCanvasItem::canvas, SPCanvas::forced_redraw_count, SPCanvas::forced_redraw_limit, SPCanvas::gen_all_enter_events, SPCanvas::is_scrolling, SPCanvas::need_repick, SPCanvas::pick_event, SPCanvas::root, sp_canvas_group_get_type(), SPCanvas::tBottom, SPCanvas::tileH, SPCanvas::tiles, SPCanvas::tileV, SPCanvas::tLeft, SPCanvas::tRight, and SPCanvas::tTop.

Referenced by sp_canvas_get_type().

{
    GTK_WIDGET_UNSET_FLAGS (canvas, GTK_NO_WINDOW);
    GTK_WIDGET_UNSET_FLAGS (canvas, GTK_DOUBLE_BUFFERED);
    GTK_WIDGET_SET_FLAGS (canvas, GTK_CAN_FOCUS);

    canvas->pick_event.type = GDK_LEAVE_NOTIFY;
    canvas->pick_event.crossing.x = 0;
    canvas->pick_event.crossing.y = 0;

    /* Create the root item as a special case */
    canvas->root = SP_CANVAS_ITEM (gtk_type_new (sp_canvas_group_get_type ()));
    canvas->root->canvas = canvas;

    gtk_object_ref (GTK_OBJECT (canvas->root));
    gtk_object_sink (GTK_OBJECT (canvas->root));

    canvas->need_repick = TRUE;

    // See comment at in sp-canvas.h.
    canvas->gen_all_enter_events = false;

    canvas->tiles=NULL;
    canvas->tLeft=canvas->tTop=canvas->tRight=canvas->tBottom=0;
    canvas->tileH=canvas->tileV=0;

    canvas->forced_redraw_count = 0;
    canvas->forced_redraw_limit = -1;

#if ENABLE_LCMS
    canvas->enable_cms_display_adj = false;
    canvas->cms_key = new Glib::ustring("");
#endif // ENABLE_LCMS

    canvas->is_scrolling = false;
}


Generated by  Doxygen 1.6.0   Back to index