Logo Search packages:      
Sourcecode: inkscape version File versions

static void sp_desktop_widget_realize ( GtkWidget *  widget  )  [static]

Callback to realize desktop widget.

Definition at line 684 of file desktop-widget.cpp.

References SPDesktopWidget::desktop, Inkscape::UI::View::View::doc(), and SPDesktop::set_display_area().

Referenced by sp_desktop_widget_class_init().

{

    SPDesktopWidget *dtw = SP_DESKTOP_WIDGET (widget);

    if (GTK_WIDGET_CLASS (dtw_parent_class)->realize)
        (* GTK_WIDGET_CLASS (dtw_parent_class)->realize) (widget);

    NRRect d;
    d.x0 = 0.0;
    d.y0 = 0.0;
    d.x1 = sp_document_width (dtw->desktop->doc());
    d.y1 = sp_document_height (dtw->desktop->doc());

    if ((fabs (d.x1 - d.x0) < 1.0) || (fabs (d.y1 - d.y0) < 1.0)) return;

    dtw->desktop->set_display_area (d.x0, d.y0, d.x1, d.y1, 10);

    sp_desktop_widget_update_namedview(dtw);
}


Generated by  Doxygen 1.6.0   Back to index