X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=inline;f=src%2Fdesktop.h;h=af0d41b2a573ff7335480670e114e1faee43ab77;hb=5d67bd380afd0885c8b4656cb3383aea24aedfcb;hp=1435eea6fc02da5528bf4bb5615be7a4a876cedc;hpb=5dae8b7fdd5f82060b96b68ac7abcc524b855e7b;p=inkscape.git diff --git a/src/desktop.h b/src/desktop.h index 1435eea6f..af0d41b2a 100644 --- a/src/desktop.h +++ b/src/desktop.h @@ -35,6 +35,9 @@ #include "ui/view/view.h" #include "ui/view/edit-widget-interface.h" +#include "display/rendermode.h" +#include "display/snap-indicator.h" + class NRRect; class SPCSSAttr; struct _GtkWidget; @@ -75,7 +78,7 @@ namespace Inkscape { namespace Display { class TemporaryItemList; class TemporaryItem; - class SnapIndicator; + //class SnapIndicator; } } @@ -182,14 +185,23 @@ struct SPDesktop : public Inkscape::UI::View::View return _guides_message_context; } - Inkscape::Display::TemporaryItem * add_temporary_canvasitem (SPCanvasItem *item, guint lifetime); + Inkscape::Display::TemporaryItem * add_temporary_canvasitem (SPCanvasItem *item, guint lifetime, bool move_to_bottom = true); void remove_temporary_canvasitem (Inkscape::Display::TemporaryItem * tempitem); - void setDisplayModeNormal(); - void setDisplayModeOutline(); + void _setDisplayMode(Inkscape::RenderMode mode); + void setDisplayModeNormal() { + _setDisplayMode(Inkscape::RENDERMODE_NORMAL); + } + void setDisplayModeNoFilters() { + _setDisplayMode(Inkscape::RENDERMODE_NO_FILTERS); + } + void setDisplayModeOutline() { + _setDisplayMode(Inkscape::RENDERMODE_OUTLINE); + } void displayModeToggle(); - int displayMode; - int getMode() const { return displayMode; } + Inkscape::RenderMode _display_mode; + Inkscape::RenderMode _saved_display_mode; + Inkscape::RenderMode getMode() const { return _display_mode; } Inkscape::UI::Widget::Dock* getDock() { return _widget->getDock(); } @@ -233,7 +245,7 @@ struct SPDesktop : public Inkscape::UI::View::View void zoom_drawing(); void zoom_selection(); void zoom_grab_focus(); - double current_zoom() const { return _d2w.expansion(); } + double current_zoom() const { return NR::expansion(_d2w); } void prev_zoom(); void next_zoom(); @@ -245,6 +257,7 @@ struct SPDesktop : public Inkscape::UI::View::View using NR::Y; scroll_world(scroll[X], scroll[Y], is_scrolling); } + void scroll_world_in_svg_coords (double dx, double dy, bool is_scrolling = false); void getWindowGeometry (gint &x, gint &y, gint &w, gint &h); void setWindowPosition (NR::Point p);