#include <desktop.h>
SPDesktop provides a certain set of SPCanvasItems, serving as GUI layers of different control objects. The one containing the whole document is the drawing layer. In addition to it, there are grid, guide, sketch and control layers. The sketch layer is used for temporary drawing objects, before the real objects in document are created. The control layer contains editing knots, rubberband and similar non-document UI objects.
Each SPDesktop is associated with a SPNamedView node of the document tree. Currently, all desktops are created from a single main named view, but in the future there may be support for different ones. SPNamedView serves as an in-document container for desktop-related data, like grid and guideline placement, snapping options and so on.
Associated with each SPDesktop are the two most important editing related objects - SPSelection and SPEventContext.
Sodipodi keeps track of the active desktop and invokes notification signals whenever it changes. UI elements can use these to update their display to the selection of the currently active editing window. (Lauris Kaplinski)
Definition at line 87 of file desktop.h.
Public Member Functions | |
unsigned | _anchored_refcount () const |
void | _setDisplayMode (Inkscape::RenderMode mode) |
void | activate_guides (bool activate) |
Inkscape::Display::TemporaryItem * | add_temporary_canvasitem (SPCanvasItem *item, guint lifetime, bool move_to_bottom=true) |
void | anchor () const |
void | change_document (SPDocument *document) |
void | clearWaitingCursor () |
void | close () |
sigc::connection | connectCurrentLayerChanged (const sigc::slot< void, SPObject * > &slot) |
sigc::connection | connectDocumentReplaced (const sigc::slot< void, SPDesktop *, SPDocument * > &slot) |
sigc::connection | connectEventContextChanged (const sigc::slot< void, SPDesktop *, SPEventContext * > &slot) |
sigc::connection | connectQueryStyle (const sigc::slot< int, SPStyle *, int > &slot) |
sigc::connection | connectSetStyle (const sigc::slot< bool, const SPCSSAttr * > &slot) |
sigc::connection | connectToolSubselectionChanged (const sigc::slot< void, gpointer > &slot) |
double | current_zoom () const |
SPObject * | currentLayer () const |
SPObject * | currentRoot () const |
Geom::Point | d2w (Geom::Point const &p) const |
void | destroy () |
void | destroyWidget () |
void | disableInteraction () |
void | displayModeToggle () |
SPDocument * | doc () const |
Returns a pointer to the view's document. | |
Geom::Point | doc2dt (Geom::Point const &p) const |
Geom::Matrix | doc2dt () const |
Geom::Point | dt2doc (Geom::Point const &p) const |
Geom::Matrix | dt2doc () const |
void | emitResized (gdouble width, gdouble height) |
void | emitToolSubselectionChanged (gpointer data) |
void | enableInteraction () |
void | focusMode (bool mode=true) |
Changes whether the user is in focus mode or not. | |
void | fullscreen () |
Geom::Rect | get_display_area () const |
Inkscape::UI::Widget::Dock * | getDock () |
Inkscape::RenderMode | getMode () const |
Gtk::Window * | getToplevel () |
void | getWindowGeometry (gint &x, gint &y, gint &w, gint &h) |
bool | gridsEnabled () const |
SPItem * | group_at_point (Geom::Point const p) const |
Inkscape::MessageContext * | guidesMessageContext () const |
void | iconify () |
void | init (SPNamedView *nv, SPCanvas *canvas, Inkscape::UI::View::EditWidgetInterface *widget) |
bool | is_focusMode () |
Checks to see if the user is working in focused mode. | |
bool | is_fullscreen () |
bool | is_iconified () |
bool | is_maximized () |
bool | isLayer (SPObject *object) const |
bool | isToolboxButtonActive (gchar const *id) |
bool | isWaitingCursor () const |
bool | isWithinViewport (SPItem *item) const |
SPItem * | item_at_point (Geom::Point const p, bool into_groups, SPItem *upto=NULL) const |
SPItem * | item_from_list_at_point_bottom (const GSList *list, Geom::Point const p) const |
bool | itemIsHidden (SPItem const *item) const |
SPObject * | layerForObject (SPObject *object) |
void | layoutWidget () |
void | maximize () |
Inkscape::MessageStack * | messageStack () const |
Returns a pointer to the view's message stack. | |
virtual void | mouseout () |
virtual void | mouseover () |
void | next_zoom () |
virtual bool | onDeleteUI (GdkEventAny *) |
virtual bool | onWindowStateEvent (GdkEventWindowState *event) |
void | operator delete (void *p) |
void * | operator new (std::size_t size, ScanPolicy scan=default_scan, CollectionPolicy collect=default_collect) throw (std::bad_alloc) |
void * | operator new[] (std::size_t size, ScanPolicy scan=default_scan, CollectionPolicy collect=default_collect) throw (std::bad_alloc) |
Geom::Point | point () const |
Returns the mouse point in document coordinates; if mouse is outside the canvas, returns the center of canvas viewpoint. | |
void | presentWindow () |
void | prev_zoom () |
void | push_event_context (GtkType type, const gchar *config, unsigned int key) |
bool | quick_zoomed (void) |
Returns whether the desktop is in quick zoom mode or not. | |
void | release () const |
void | remove_temporary_canvasitem (Inkscape::Display::TemporaryItem *tempitem) |
void | requestRedraw () |
bool | scroll_to_point (Geom::Point const &s_dt, gdouble autoscrollspeed=0) |
void | scroll_world (Geom::Point const scroll, bool is_scrolling=false) |
void | scroll_world (double dx, double dy, bool is_scrolling=false) |
void | scroll_world_in_svg_coords (double dx, double dy, bool is_scrolling=false) |
void | set_active (bool new_active) |
void | set_coordinate_status (Geom::Point p) |
void | set_display_area (Geom::Rect const &a, Geom::Coord border, bool log=true) |
void | set_display_area (double x0, double y0, double x1, double y1, double border, bool log=true) |
void | set_event_context (GtkType type, const gchar *config) |
void | setCurrentLayer (SPObject *object) |
void | setDisplayModeNoFilters () |
void | setDisplayModeNormal () |
void | setDisplayModeOutline () |
virtual void | setDocument (SPDocument *doc) |
void | setPosition (Geom::Point const &p) |
void | setPosition (gdouble x, gdouble y) |
void | setToolboxAdjustmentValue (gchar const *id, double val) |
void | setToolboxFocusTo (gchar const *label) |
void | setToolboxSelectOneValue (gchar const *id, gint val) |
void | setWaitingCursor () |
void | setWindowPosition (Geom::Point p) |
void | setWindowSize (gint w, gint h) |
void | setWindowTransient (void *p, int transient_policy=1) |
void | showGrids (bool show, bool dirty_document=true) |
virtual bool | shutdown () |
SPDesktop () | |
Inkscape::MessageContext * | tipsMessageContext () const |
Returns a pointer to the view's tipsMessageContext. | |
void | toggleColorProfAdjust () |
void | toggleGrids () |
void | toggleLayerSolo (SPObject *object) |
void | toggleRulers () |
void | toggleScrollbars () |
void | toggleSnapGlobal () |
void | updateCanvasNow () |
void | updateNow () |
Geom::Point | w2d (Geom::Point const &p) const |
Geom::Matrix | w2d () const |
bool | warnDialog (gchar *text) |
void | zoom_absolute (double cx, double cy, double zoom) |
void | zoom_absolute_keep_point (double cx, double cy, double px, double py, double zoom) |
void | zoom_drawing () |
void | zoom_grab_focus () |
void | zoom_page () |
void | zoom_page_width () |
void | zoom_quick (bool enable=true) |
Performs a quick zoom into what the user is working on. | |
void | zoom_relative (double cx, double cy, double zoom) |
void | zoom_relative_keep_point (Geom::Point const &c, double const zoom) |
void | zoom_relative_keep_point (double cx, double cy, double zoom) |
void | zoom_selection () |
Public Attributes | |
Inkscape::RenderMode | _display_mode |
Inkscape::UI::Dialog::DialogManager * | _dlg_mgr |
bool | _focusMode |
Whether we're focused working or general working. | |
sigc::signal< void, SPObject * > | _layer_changed_signal |
Inkscape::ObjectHierarchy * | _layer_hierarchy |
sigc::signal< int, SPStyle *, int >::accumulated < StopOnNonZero > | _query_style_signal |
bool | _quick_zoom_enabled |
Signifies that currently we're in quick zoom mode. | |
Geom::Rect | _quick_zoom_stored_area |
The area of the screen before quick zoom. | |
gchar * | _reconstruction_old_layer_id |
sigc::signal< bool, const SPCSSAttr * >::accumulated < StopOnTrue > | _set_style_signal |
sigc::signal< void, sp_verb_t > | _tool_changed |
SPCanvasItem * | acetate |
SPCanvas * | canvas |
SPCanvasGroup * | controls |
SPCSSAttr * | current |
current style | |
unsigned int | dkey |
SPCanvasItem * | drawing |
SPEventContext * | event_context |
Inkscape::EventLog * | event_log |
bool | gr_fill_or_stroke |
SPItem * | gr_item |
guint | gr_point_i |
guint | gr_point_type |
SPCanvasGroup * | gridgroup |
SPCanvasGroup * | guides |
guint | guides_active: 1 |
unsigned int | interaction_disabled_counter |
Inkscape::LayerManager * | layer_manager |
SPCanvasGroup * | main |
SPNamedView * | namedview |
unsigned int | number |
SPCanvasItem * | page |
page background | |
SPCanvasItem * | page_border |
page border | |
Inkscape::Selection * | selection |
current selection; will never generally be NULL | |
sigc::signal< void, double > | signal_zoom_changed |
SPCanvasGroup * | sketch |
Inkscape::Display::SnapIndicator * | snapindicator |
SPCanvasItem * | table |
outside-of-page background | |
SPCanvasGroup * | tempgroup |
contains temporary canvas items | |
Inkscape::Display::TemporaryItemList * | temporary_item_list |
bool | waiting_cursor |
guint | window_state |
GList * | zooms_future |
GList * | zooms_past |
Protected Member Functions | |
virtual void | _close () |
Protected Attributes | |
SPDocument * | _doc |
sigc::signal< void, gchar const * > | _document_uri_set_signal |
Inkscape::MessageStack * | _message_stack |
sigc::signal< void, double, double > | _position_set_signal |
sigc::signal< void > | _redraw_requested_signal |
sigc::signal< void, double, double > | _resized_signal |
Inkscape::MessageContext * | _tips_message_context |
Private Member Functions | |
virtual void | onDocumentResized (double, double) |
virtual void | onDocumentURISet (gchar const *uri) |
virtual void | onPositionSet (double, double) |
virtual void | onRedrawRequested () |
virtual void | onResized (double, double) |
virtual void | onStatusMessage (Inkscape::MessageType type, gchar const *message) |
void | push_current_zoom (GList **) |
void | set_grids_visible (bool visible) |
Static Private Member Functions | |
static void | _onActivate (SPDesktop *dt) |
static void | _onDeactivate (SPDesktop *dt) |
static void | _onSelectionModified (Inkscape::Selection *selection, guint flags, SPDesktop *dt) |
Private Attributes | |
sigc::connection | _activate_connection |
sigc::signal< void > | _activate_signal |
bool | _active |
sigc::connection | _commit_connection |
Geom::Matrix | _d2w |
sigc::connection | _deactivate_connection |
sigc::signal< void > | _deactivate_signal |
Geom::Matrix | _doc2dt |
sigc::signal< void, SPDesktop *, SPDocument * > | _document_replaced_signal |
sigc::signal< void, SPDesktop *, SPEventContext * > | _event_context_changed_signal |
Inkscape::MessageContext * | _guides_message_context |
Inkscape::Application * | _inkscape |
sigc::connection | _modified_connection |
sigc::connection | _reconstruction_finish_connection |
sigc::connection | _reconstruction_start_connection |
sigc::connection | _sel_changed_connection |
sigc::connection | _sel_modified_connection |
sigc::signal< void, gpointer > | _tool_subselection_changed |
Geom::Matrix | _w2d |
Inkscape::UI::View::EditWidgetInterface * | _widget |
bool | grids_visible |