Logo Search packages:      
Sourcecode: inkscape version File versions  Download package

SPDesktop Class Reference

#include <desktop.h>

Inheritance diagram for SPDesktop:

Inkscape::UI::View::View Inkscape::GC::Managed< default_scan, default_collect > Inkscape::GC::Anchored

List of all members.

Detailed Description

Editable view.

See also:
desktop-handlesh for desktop macros.
SPDesktop is a subclass of View, implementing an editable document canvas. It is extensively used by many UI controls that need certain visual representations of their own.

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 68 of file desktop.h.

Public Member Functions

unsigned _anchored_refcount () const
void activate_guides (bool activate)
void anchor () const
void change_document (SPDocument *document)
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
SPObjectcurrentLayer () const
SPObjectcurrentRoot () const
NR::Point d2w (NR::Point const &p) const
void destroy ()
void destroyWidget ()
SPDocumentdoc () const
 Returns a pointer to the view's document.
NR::Point doc2dt (NR::Point const &p) const
NR::Matrix doc2dt () const
NR::Point dt2doc (NR::Point const &p) const
void emitResized (gdouble width, gdouble height)
void emitToolSubselectionChanged (gpointer data)
void fullscreen ()
NR::Rect get_display_area () const
void getWindowGeometry (gint &x, gint &y, gint &w, gint &h)
SPItemgroup_at_point (NR::Point const p) const
Inkscape::MessageContextguidesMessageContext () const
void init (SPNamedView *nv, SPCanvas *canvas)
bool isLayer (SPObject *object) const
bool isToolboxButtonActive (gchar const *id)
bool isWithinViewport (SPItem *item) const
SPItemitem_at_point (NR::Point const p, bool into_groups, SPItem *upto=NULL) const
SPItemitem_from_list_at_point_bottom (const GSList *list, NR::Point const p) const
bool itemIsHidden (SPItem const *item) const
SPObjectlayerForObject (SPObject *object)
void layoutWidget ()
Inkscape::MessageStackmessageStack () const
 Returns a pointer to the view's message stack.
virtual void mouseout ()
virtual void mouseover ()
void next_zoom ()
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)
NR::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)
void registerEditWidget (Inkscape::UI::View::EditWidgetInterface *widget)
void release () const
void requestRedraw ()
bool scroll_to_point (NR::Point const *s_dt, gdouble autoscrollspeed=0)
void scroll_world (NR::Point const scroll)
void scroll_world (double dx, double dy)
void set_active (bool new_active)
void set_coordinate_status (NR::Point p)
void set_display_area (NR::Rect const &a, NR::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 setDisplayModeNormal ()
void setDisplayModeOutline ()
virtual void setDocument (SPDocument *doc)
void setPosition (NR::Point const &p)
void setPosition (gdouble x, gdouble y)
void setToolboxAdjustmentValue (gchar const *id, double val)
void setToolboxFocusTo (gchar const *label)
void setWindowPosition (NR::Point p)
void setWindowSize (gint w, gint h)
void setWindowTransient (void *p, int transient_policy=1)
virtual bool shutdown ()
 SPDesktop ()
Inkscape::MessageContexttipsMessageContext () const
 Returns a pointer to the view's tipsMessageContext.
void toggleRulers ()
void toggleScrollbars ()
void updateNow ()
NR::Point w2d (NR::Point const &p) const
NR::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_relative (double cx, double cy, double zoom)
void zoom_relative_keep_point (NR::Point const &c, double const zoom)
void zoom_relative_keep_point (double cx, double cy, double zoom)
void zoom_selection ()

Public Attributes

Inkscape::UI::Dialog::DialogManager * _dlg_mgr
sigc::signal< void, SPObject * > _layer_changed_signal
sigc::signal< int, SPStyle
*, int >::accumulated
< StopOnNonZero
gchar * _reconstruction_old_layer_id
sigc::signal< bool, const
SPCSSAttr * >::accumulated
< StopOnTrue
sigc::signal< void, sp_verb_t > _tool_changed
SPCSSAttr * current
 current style
unsigned int dkey
bool gr_fill_or_stroke
guint gr_point_num
guint guides_active: 1
bool is_fullscreen
Inkscape::LayerManager * layer_manager
SPNamedView * namedview
unsigned int number
 page background
 page border
 current selection; will never generally be NULL
 outside-of-page background
GList * zooms_future
GList * zooms_past

Protected Member Functions

virtual void _close ()

Protected Attributes

sigc::signal< void, gchar const * > _document_uri_set_signal
sigc::signal< void, double,
double > 
sigc::signal< void > _redraw_requested_signal
sigc::signal< void, double,
double > 

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 **)

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
NR::Matrix _d2w
sigc::connection _deactivate_connection
sigc::signal< void > _deactivate_signal
NR::Matrix _doc2dt
sigc::signal< void, SPDesktop
*, SPDocument * > 
sigc::signal< void, SPDesktop
*, SPEventContext * > 
Inkscape::Application * _inkscape
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
NR::Matrix _w2d
Inkscape::UI::View::EditWidgetInterface * _widget

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index