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


Public Member Functions

void activate_guides (bool activate)
void anchor () const
template<typename T>
void cancelClearOnceInaccessible (T **p_ptr)
 Cancels the registration of a pointer, so it will not be cleared when this object becomes inacessible.
void change_document (SPDocument *document)
template<typename T>
void clearOnceInaccessible (T **p_ptr)
 Registers a pointer to be cleared when this object becomes inaccessible.
void close ()
sigc::connection connectCurrentLayerChanged (const sigc::slot< void, SPObject * > &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
void destroy ()
SPDocumentdoc () const
 Returns a pointer to the view's document.
void emitResized (gdouble width, gdouble height)
void emitToolSubselectionChanged (gpointer data)
void fullscreen ()
NRRect * get_display_area (NRRect *area) const
SPItemgroup_at_point (NR::Point const p) const
Inkscape::MessageContextguidesMessageContext () const
void init (SPNamedView *nv, SPCanvas *canvas)
bool isLayer (SPObject *object) const
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)
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 prev_zoom ()
void push_event_context (GtkType type, const gchar *config, unsigned int key)
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, guint underline)
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 setDocument (SPDocument *doc)
void setPosition (NR::Point const &p)
void setPosition (gdouble x, gdouble y)
virtual bool shutdown ()
 SPDesktop ()
Inkscape::MessageContexttipsMessageContext () const
 Returns a pointer to the view's tipsMessageContext.
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_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
Inkscape::ObjectHierarchy_layer_hierarchy
sigc::signal< int, SPStyle
*, int >::accumulated
< StopOnTrue
_query_style_signal
gchar * _reconstruction_old_layer_id
sigc::signal< bool, const
SPCSSAttr * >::accumulated
< StopOnTrue
_set_style_signal
sigc::signal< void, sp_verb_t > _tool_changed
SPCanvasItemacetate
SPCanvasGroupcontrols
SPCSSAttr * current
 current style
NR::Matrix d2w
unsigned int dkey
NR::Matrix doc2dt
SPCanvasItemdrawing
SPEventContextevent_context
bool gr_fill_or_stroke
SPItemgr_item
guint gr_point_num
SPCanvasGroupgrid
SPCanvasGroupguides
guint guides_active: 1
bool is_fullscreen
SPCanvasGroupmain
SPNamedView * namedview
unsigned int number
SPDesktopWidgetowner
SPCanvasItempage
 page background
SPCanvasItempage_border
 page border
Inkscape::Selectionselection
SPCanvasGroupsketch
SPCanvasItemtable
 outside-of-page background
NR::Matrix w2d
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 **)
virtual void setDoc (SPDocument *doc)

Private Attributes

sigc::connection _activate_connection
sigc::signal< void > _activate_signal
sigc::connection _deactivate_connection
sigc::signal< void > _deactivate_signal
sigc::signal< void, SPDesktop
*, SPEventContext * > 
_event_context_changed_signal
Inkscape::MessageContext_guides_message_context
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
bool active
Inkscape::Application * inkscape

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

Generated by  Doxygen 1.6.0   Back to index