summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1abf95e)
raw | patch | inline | side by side (parent: 1abf95e)
author | cilix42 <cilix42@users.sourceforge.net> | |
Thu, 14 Aug 2008 21:33:11 +0000 (21:33 +0000) | ||
committer | cilix42 <cilix42@users.sourceforge.net> | |
Thu, 14 Aug 2008 21:33:11 +0000 (21:33 +0000) |
diff --git a/src/box3d-context.cpp b/src/box3d-context.cpp
index 6f3b6ee510dc6913ae6184c5a59adc5855cb6bf5..393340cc4b0822a1be162af9e721683913115678 100644 (file)
--- a/src/box3d-context.cpp
+++ b/src/box3d-context.cpp
#include "xml/node-event-vector.h"
#include "prefs-utils.h"
#include "context-fns.h"
-#include "inkscape.h"
#include "desktop-style.h"
#include "transf_mat_3x4.h"
#include "perspective-line.h"
@@ -497,7 +496,7 @@ static gint sp_box3d_context_root_handler(SPEventContext *event_context, GdkEven
case GDK_g:
case GDK_G:
if (MOD__SHIFT_ONLY) {
- sp_selection_to_guides();
+ sp_selection_to_guides(desktop);
ret = true;
}
break;
diff --git a/src/eraser-context.cpp b/src/eraser-context.cpp
index f6df71dc29f73d5436e89ca78bd02ace6b1e62cf..9a8e07e668dc918b557f1bb81cf1c915bffed4e3 100644 (file)
--- a/src/eraser-context.cpp
+++ b/src/eraser-context.cpp
#include "xml/repr.h"
#include "context-fns.h"
#include "sp-item.h"
-#include "inkscape.h"
#include "color.h"
#include "rubberband.h"
#include "splivarot.h"
g_slist_free(toWorkOn);
if ( !eraserMode ) {
- //sp_selection_delete();
+ //sp_selection_delete(desktop);
remainingItems.clear();
}
diff --git a/src/nodepath.cpp b/src/nodepath.cpp
index 4260d03c88964ed8bde179eab95b80ee390d4b13..0f62240937ab024dc31cd114e0b3a14d86fb4fd4 100644 (file)
--- a/src/nodepath.cpp
+++ b/src/nodepath.cpp
//FIXME: The following line will be wrong when we have mltiple nodepaths: we only want to
//delete this nodepath's object, not the entire selection! (though at this time, this
//does not matter)
- sp_selection_delete();
+ sp_selection_delete(nodepath->desktop);
sp_document_done (document, SP_VERB_CONTEXT_NODE,
_("Delete nodes"));
} else {
if (nodepath->subpaths == NULL ||
sp_nodepath_get_node_count(nodepath) < 2) {
SPDocument *document = sp_desktop_document (nodepath->desktop);
- sp_selection_delete();
+ sp_selection_delete(nodepath->desktop);
sp_document_done (document, SP_VERB_CONTEXT_NODE,
_("Delete nodes"));
return;
diff --git a/src/pen-context.cpp b/src/pen-context.cpp
index 30b09013b09f770a37fa83d8d72d61dcd8c8895d..3cc7cc0d62a71a3e9830211f11f0000be91ca85f 100644 (file)
--- a/src/pen-context.cpp
+++ b/src/pen-context.cpp
case GDK_g:
case GDK_G:
if (MOD__SHIFT_ONLY) {
- sp_selection_to_guides();
+ sp_selection_to_guides(SP_EVENT_CONTEXT(pc)->desktop);
ret = true;
}
break;
diff --git a/src/pencil-context.cpp b/src/pencil-context.cpp
index cd0f9be7f27972f4ed5be48156bac7bc37cf6139..01f3020fda34954c0552346fae86c16088308e32 100644 (file)
--- a/src/pencil-context.cpp
+++ b/src/pencil-context.cpp
@@ -520,7 +520,7 @@ pencil_handle_key_press(SPPencilContext *const pc, guint const keyval, guint con
case GDK_g:
case GDK_G:
if (mod_shift_only(state)) {
- sp_selection_to_guides();
+ sp_selection_to_guides(SP_EVENT_CONTEXT(pc)->desktop);
ret = true;
}
break;
diff --git a/src/rect-context.cpp b/src/rect-context.cpp
index e8d7dc7dd985cd86f85b8c3e1cbb605d2f21d644..999aa03b82d5e34a4f8b8ac17f47e5d5f7ef84a1 100644 (file)
--- a/src/rect-context.cpp
+++ b/src/rect-context.cpp
*/
#include "config.h"
-#include "inkscape.h"
#include <gdk/gdkkeysyms.h>
#include <cstring>
@@ -403,23 +402,10 @@ static gint sp_rect_context_root_handler(SPEventContext *event_context, GdkEvent
}
break;
- case GDK_T:
- {
- Inkscape::Selection *selection = sp_desktop_selection (inkscape_active_desktop());
- SPItem *item = selection->singleItem();
- if (item && SP_IS_RECT (item)) {
- g_print ("Scaling transformation matrix\n");
- SP_RECT (item)->transform = NR::Matrix(NR::scale(1.25, 1.5));
- SP_OBJECT (item)->requestDisplayUpdate(SP_OBJECT_MODIFIED_FLAG);
- }
- ret = TRUE;
- }
- break;
-
case GDK_g:
case GDK_G:
if (MOD__SHIFT_ONLY) {
- sp_selection_to_guides();
+ sp_selection_to_guides(desktop);
ret = true;
}
break;
diff --git a/src/select-context.cpp b/src/select-context.cpp
index 0957b8432233000c74c91fc837e741becf0bf94f..22b358dc7ea55985bd9af6bef81946c30639db7c 100644 (file)
--- a/src/select-context.cpp
+++ b/src/select-context.cpp
@@ -726,12 +726,12 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event)
gint mul = 1 + gobble_key_events(
get_group0_keyval(&event->key), 0); // with any mask
if (MOD__ALT) { // alt
- if (MOD__SHIFT) sp_selection_move_screen(mul*-10, 0); // shift
- else sp_selection_move_screen(mul*-1, 0); // no shift
+ if (MOD__SHIFT) sp_selection_move_screen(desktop, mul*-10, 0); // shift
+ else sp_selection_move_screen(desktop, mul*-1, 0); // no shift
}
else { // no alt
- if (MOD__SHIFT) sp_selection_move(mul*-10*nudge, 0); // shift
- else sp_selection_move(mul*-nudge, 0); // no shift
+ if (MOD__SHIFT) sp_selection_move(desktop, mul*-10*nudge, 0); // shift
+ else sp_selection_move(desktop, mul*-nudge, 0); // no shift
}
ret = TRUE;
}
@@ -743,12 +743,12 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event)
gint mul = 1 + gobble_key_events(
get_group0_keyval(&event->key), 0); // with any mask
if (MOD__ALT) { // alt
- if (MOD__SHIFT) sp_selection_move_screen(0, mul*10); // shift
- else sp_selection_move_screen(0, mul*1); // no shift
+ if (MOD__SHIFT) sp_selection_move_screen(desktop, 0, mul*10); // shift
+ else sp_selection_move_screen(desktop, 0, mul*1); // no shift
}
else { // no alt
- if (MOD__SHIFT) sp_selection_move(0, mul*10*nudge); // shift
- else sp_selection_move(0, mul*nudge); // no shift
+ if (MOD__SHIFT) sp_selection_move(desktop, 0, mul*10*nudge); // shift
+ else sp_selection_move(desktop, 0, mul*nudge); // no shift
}
ret = TRUE;
}
@@ -760,12 +760,12 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event)
gint mul = 1 + gobble_key_events(
get_group0_keyval(&event->key), 0); // with any mask
if (MOD__ALT) { // alt
- if (MOD__SHIFT) sp_selection_move_screen(mul*10, 0); // shift
- else sp_selection_move_screen(mul*1, 0); // no shift
+ if (MOD__SHIFT) sp_selection_move_screen(desktop, mul*10, 0); // shift
+ else sp_selection_move_screen(desktop, mul*1, 0); // no shift
}
else { // no alt
- if (MOD__SHIFT) sp_selection_move(mul*10*nudge, 0); // shift
- else sp_selection_move(mul*nudge, 0); // no shift
+ if (MOD__SHIFT) sp_selection_move(desktop, mul*10*nudge, 0); // shift
+ else sp_selection_move(desktop, mul*nudge, 0); // no shift
}
ret = TRUE;
}
@@ -777,12 +777,12 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event)
gint mul = 1 + gobble_key_events(
get_group0_keyval(&event->key), 0); // with any mask
if (MOD__ALT) { // alt
- if (MOD__SHIFT) sp_selection_move_screen(0, mul*-10); // shift
- else sp_selection_move_screen(0, mul*-1); // no shift
+ if (MOD__SHIFT) sp_selection_move_screen(desktop, 0, mul*-10); // shift
+ else sp_selection_move_screen(desktop, 0, mul*-1); // no shift
}
else { // no alt
- if (MOD__SHIFT) sp_selection_move(0, mul*-10*nudge); // shift
- else sp_selection_move(0, mul*-nudge); // no shift
+ if (MOD__SHIFT) sp_selection_move(desktop, 0, mul*-10*nudge); // shift
+ else sp_selection_move(desktop, 0, mul*-nudge); // no shift
}
ret = TRUE;
}
case GDK_a:
case GDK_A:
if (MOD__CTRL_ONLY) {
- sp_edit_select_all();
+ sp_edit_select_all(desktop);
ret = TRUE;
}
break;
case GDK_g:
case GDK_G:
if (MOD__SHIFT_ONLY) {
- sp_selection_to_guides();
+ sp_selection_to_guides(desktop);
ret = true;
}
break;
index c6e2e615332d5f9a8afb6918180c32143878d552..f47d4b0b741fc040b6f4dd4ef5d4fa542c59c50e 100644 (file)
#include <gtkmm/clipboard.h>
#include "svg/svg.h"
-#include "inkscape.h"
#include "desktop.h"
#include "desktop-style.h"
#include "selection.h"
@@ -183,9 +182,8 @@ void sp_selection_delete_impl(GSList const *items, bool propagate = true, bool p
}
-void sp_selection_delete()
+void sp_selection_delete(SPDesktop *desktop)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if (desktop == NULL) {
return;
}
}
}
-void sp_selection_duplicate(bool suppressDone)
+void sp_selection_duplicate(SPDesktop *desktop, bool suppressDone)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if (desktop == NULL)
return;
g_slist_free(newsel);
}
-void sp_edit_clear_all()
+void sp_edit_clear_all(SPDesktop *dt)
{
- SPDesktop *dt = SP_ACTIVE_DESKTOP;
if (!dt)
return;
@@ -363,9 +359,8 @@ get_all_items (GSList *list, SPObject *from, SPDesktop *desktop, bool onlyvisibl
return list;
}
-void sp_edit_select_all_full (bool force_all_layers, bool invert)
+void sp_edit_select_all_full (SPDesktop *dt, bool force_all_layers, bool invert)
{
- SPDesktop *dt = SP_ACTIVE_DESKTOP;
if (!dt)
return;
}
}
-void sp_edit_select_all ()
+void sp_edit_select_all (SPDesktop *desktop)
{
- sp_edit_select_all_full (false, false);
+ sp_edit_select_all_full (desktop, false, false);
}
-void sp_edit_select_all_in_all_layers ()
+void sp_edit_select_all_in_all_layers (SPDesktop *desktop)
{
- sp_edit_select_all_full (true, false);
+ sp_edit_select_all_full (desktop, true, false);
}
-void sp_edit_invert ()
+void sp_edit_invert (SPDesktop *desktop)
{
- sp_edit_select_all_full (false, true);
+ sp_edit_select_all_full (desktop, false, true);
}
-void sp_edit_invert_in_all_layers ()
+void sp_edit_invert_in_all_layers (SPDesktop *desktop)
{
- sp_edit_select_all_full (true, true);
+ sp_edit_select_all_full (desktop, true, true);
}
-void sp_selection_group()
+void sp_selection_group(SPDesktop *desktop)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if (desktop == NULL)
return;
Inkscape::GC::release(group);
}
-void sp_selection_ungroup()
+void sp_selection_ungroup(SPDesktop *desktop)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if (desktop == NULL)
return;
}
void
-sp_selection_raise()
+sp_selection_raise(SPDesktop *desktop)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if (!desktop)
return;
Q_("undo_action|Raise"));
}
-void sp_selection_raise_to_top()
+void sp_selection_raise_to_top(SPDesktop *desktop)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if (desktop == NULL)
return;
}
void
-sp_selection_lower()
+sp_selection_lower(SPDesktop *desktop)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if (desktop == NULL)
return;
_("Lower"));
}
-void sp_selection_lower_to_bottom()
+void sp_selection_lower_to_bottom(SPDesktop *desktop)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if (desktop == NULL)
return;
desktop->messageStack()->flash(Inkscape::WARNING_MESSAGE, _("Nothing to redo."));
}
-void sp_selection_cut()
+void sp_selection_cut(SPDesktop *desktop)
{
sp_selection_copy();
- sp_selection_delete();
+ sp_selection_delete(desktop);
}
/**
cm->copy();
}
-void sp_selection_paste(bool in_place)
+void sp_selection_paste(SPDesktop *desktop, bool in_place)
{
Inkscape::UI::ClipboardManager *cm = Inkscape::UI::ClipboardManager::get();
if(cm->paste(in_place))
- sp_document_done(SP_ACTIVE_DOCUMENT, SP_VERB_EDIT_PASTE, _("Paste"));
+ sp_document_done(sp_desktop_document(desktop), SP_VERB_EDIT_PASTE, _("Paste"));
}
-void sp_selection_paste_style()
+void sp_selection_paste_style(SPDesktop *desktop)
{
Inkscape::UI::ClipboardManager *cm = Inkscape::UI::ClipboardManager::get();
if(cm->pasteStyle())
- sp_document_done(SP_ACTIVE_DOCUMENT, SP_VERB_EDIT_PASTE_STYLE, _("Paste style"));
+ sp_document_done(sp_desktop_document(desktop), SP_VERB_EDIT_PASTE_STYLE, _("Paste style"));
}
-void sp_selection_paste_livepatheffect()
+void sp_selection_paste_livepatheffect(SPDesktop *desktop)
{
Inkscape::UI::ClipboardManager *cm = Inkscape::UI::ClipboardManager::get();
if(cm->pastePathEffect())
- sp_document_done(SP_ACTIVE_DOCUMENT, SP_VERB_EDIT_PASTE_LIVEPATHEFFECT,
+ sp_document_done(sp_desktop_document(desktop), SP_VERB_EDIT_PASTE_LIVEPATHEFFECT,
_("Paste live path effect"));
}
}
}
-void sp_selection_remove_livepatheffect()
+void sp_selection_remove_livepatheffect(SPDesktop *desktop)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if (desktop == NULL) return;
Inkscape::Selection *selection = sp_desktop_selection(desktop);
_("Remove live path effect"));
}
-void sp_selection_remove_filter ()
+void sp_selection_remove_filter (SPDesktop *desktop)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if (desktop == NULL) return;
Inkscape::Selection *selection = sp_desktop_selection(desktop);
}
-void sp_selection_paste_size (bool apply_x, bool apply_y)
+void sp_selection_paste_size (SPDesktop *desktop, bool apply_x, bool apply_y)
{
Inkscape::UI::ClipboardManager *cm = Inkscape::UI::ClipboardManager::get();
if(cm->pasteSize(false, apply_x, apply_y))
- sp_document_done(sp_desktop_document(SP_ACTIVE_DESKTOP), SP_VERB_EDIT_PASTE_SIZE,
+ sp_document_done(sp_desktop_document(desktop), SP_VERB_EDIT_PASTE_SIZE,
_("Paste size"));
}
-void sp_selection_paste_size_separately (bool apply_x, bool apply_y)
+void sp_selection_paste_size_separately (SPDesktop *desktop, bool apply_x, bool apply_y)
{
Inkscape::UI::ClipboardManager *cm = Inkscape::UI::ClipboardManager::get();
if(cm->pasteSize(true, apply_x, apply_y))
- sp_document_done(sp_desktop_document(SP_ACTIVE_DESKTOP), SP_VERB_EDIT_PASTE_SIZE_SEPARATELY,
+ sp_document_done(sp_desktop_document(desktop), SP_VERB_EDIT_PASTE_SIZE_SEPARATELY,
_("Paste size separately"));
}
-void sp_selection_to_next_layer(bool suppressDone)
+void sp_selection_to_next_layer(SPDesktop *dt, bool suppressDone)
{
- SPDesktop *dt = SP_ACTIVE_DESKTOP;
-
Inkscape::Selection *selection = sp_desktop_selection(dt);
// check if something is selected
g_slist_free ((GSList *) items);
}
-void sp_selection_to_prev_layer(bool suppressDone)
+void sp_selection_to_prev_layer(SPDesktop *dt, bool suppressDone)
{
- SPDesktop *dt = SP_ACTIVE_DESKTOP;
-
Inkscape::Selection *selection = sp_desktop_selection(dt);
// check if something is selected
@@ -1276,9 +1259,8 @@ void sp_selection_apply_affine(Inkscape::Selection *selection, NR::Matrix const
}
}
-void sp_selection_remove_transform()
+void sp_selection_remove_transform(SPDesktop *desktop)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if (desktop == NULL)
return;
@@ -1383,10 +1365,8 @@ void sp_selection_move_relative(Inkscape::Selection *selection, double dx, doubl
*
*/
-void sp_selection_rotate_90_cw()
+void sp_selection_rotate_90_cw(SPDesktop *desktop)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
-
Inkscape::Selection *selection = sp_desktop_selection(desktop);
if (selection->isEmpty())
/**
* @brief Rotates selected objects 90 degrees counter-clockwise.
*/
-void sp_selection_rotate_90_ccw()
+void sp_selection_rotate_90_ccw(SPDesktop *desktop)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
-
Inkscape::Selection *selection = sp_desktop_selection(desktop);
if (selection->isEmpty())
}
void
-sp_selection_move(gdouble dx, gdouble dy)
+sp_selection_move(SPDesktop *desktop, gdouble dx, gdouble dy)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
Inkscape::Selection *selection = sp_desktop_selection(desktop);
if (selection->isEmpty()) {
return;
}
void
-sp_selection_move_screen(gdouble dx, gdouble dy)
+sp_selection_move_screen(SPDesktop *desktop, gdouble dx, gdouble dy)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
-
Inkscape::Selection *selection = sp_desktop_selection(desktop);
if (selection->isEmpty()) {
return;
}
void
-sp_selection_item_next(void)
+sp_selection_item_next(SPDesktop *desktop)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
g_return_if_fail(desktop != NULL);
Inkscape::Selection *selection = sp_desktop_selection(desktop);
}
void
-sp_selection_item_prev(void)
+sp_selection_item_prev(SPDesktop *desktop)
{
- SPDocument *document = SP_ACTIVE_DOCUMENT;
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
+ SPDocument *document = sp_desktop_document(desktop);
g_return_if_fail(document != NULL);
g_return_if_fail(desktop != NULL);
Inkscape::Selection *selection = sp_desktop_selection(desktop);
void
-sp_selection_clone()
+sp_selection_clone(SPDesktop *desktop)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if (desktop == NULL)
return;
}
void
-sp_selection_relink()
+sp_selection_relink(SPDesktop *desktop)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if (!desktop)
return;
void
-sp_selection_unlink()
+sp_selection_unlink(SPDesktop *desktop)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if (!desktop)
return;
}
void
-sp_select_clone_original()
+sp_select_clone_original(SPDesktop *desktop)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if (desktop == NULL)
return;
}
-void sp_selection_to_marker(bool apply)
+void sp_selection_to_marker(SPDesktop *desktop, bool apply)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if (desktop == NULL)
return;
@@ -2205,9 +2173,8 @@ static void sp_selection_to_guides_recursive(SPItem *item, bool deleteitem, bool
}
}
-void sp_selection_to_guides()
+void sp_selection_to_guides(SPDesktop *desktop)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if (desktop == NULL)
return;
}
void
-sp_selection_tile(bool apply)
+sp_selection_tile(SPDesktop *desktop, bool apply)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if (desktop == NULL)
return;
}
void
-sp_selection_untile()
+sp_selection_untile(SPDesktop *desktop)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if (desktop == NULL)
return;
@@ -2478,9 +2443,8 @@ sp_document_get_export_hints (SPDocument *doc, char const **filename, float *xdp
}
void
-sp_selection_create_bitmap_copy ()
+sp_selection_create_bitmap_copy (SPDesktop *desktop)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if (desktop == NULL)
return;
*
*/
void
-sp_selection_set_mask(bool apply_clip_path, bool apply_to_layer)
+sp_selection_set_mask(SPDesktop *desktop, bool apply_clip_path, bool apply_to_layer)
{
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
if (desktop == NULL)
return;
sp_document_done (doc, SP_VERB_OBJECT_SET_MASK, _("Set mask"));
}
-void sp_selection_unset_mask(bool apply_clip_path) {
- SPDesktop *desktop = SP_ACTIVE_DESKTOP;
+void sp_selection_unset_mask(SPDesktop *desktop, bool apply_clip_path) {
if (desktop == NULL)
return;
index 37d8a4a0911468dd5d6a12af765e205135f29d67..f6e5858a803d88ac697e3f5be924d5cf24dd38ac 100644 (file)
class SPCSSAttr;
-void sp_selection_delete();
-void sp_selection_duplicate(bool suppressDone = false);
-void sp_edit_clear_all();
+void sp_selection_delete(SPDesktop *desktop);
+void sp_selection_duplicate(SPDesktop *desktop, bool suppressDone = false);
+void sp_edit_clear_all(SPDesktop *desktop);
-void sp_edit_select_all();
-void sp_edit_select_all_in_all_layers ();
-void sp_edit_invert ();
-void sp_edit_invert_in_all_layers ();
+void sp_edit_select_all(SPDesktop *desktop);
+void sp_edit_select_all_in_all_layers (SPDesktop *desktop);
+void sp_edit_invert (SPDesktop *desktop);
+void sp_edit_invert_in_all_layers (SPDesktop *desktop);
-void sp_selection_clone();
-void sp_selection_unlink();
-void sp_selection_relink();
-void sp_select_clone_original ();
+void sp_selection_clone(SPDesktop *desktop);
+void sp_selection_unlink(SPDesktop *desktop);
+void sp_selection_relink(SPDesktop *desktop);
+void sp_select_clone_original(SPDesktop *desktop);
-void sp_selection_to_marker(bool apply = true);
-void sp_selection_to_guides();
+void sp_selection_to_marker(SPDesktop *desktop, bool apply = true);
+void sp_selection_to_guides(SPDesktop *desktop);
-void sp_selection_tile(bool apply = true);
-void sp_selection_untile();
+void sp_selection_tile(SPDesktop *desktop, bool apply = true);
+void sp_selection_untile(SPDesktop *desktop);
-void sp_selection_group();
-void sp_selection_ungroup();
+void sp_selection_group(SPDesktop *desktop);
+void sp_selection_ungroup(SPDesktop *desktop);
-void sp_selection_raise();
-void sp_selection_raise_to_top();
-void sp_selection_lower();
-void sp_selection_lower_to_bottom();
+void sp_selection_raise(SPDesktop *desktop);
+void sp_selection_raise_to_top(SPDesktop *desktop);
+void sp_selection_lower(SPDesktop *desktop);
+void sp_selection_lower_to_bottom(SPDesktop *desktop);
SPCSSAttr *take_style_from_item (SPItem *item);
-void sp_selection_cut();
+void sp_selection_cut(SPDesktop *desktop);
void sp_selection_copy();
-void sp_selection_paste(bool in_place);
-void sp_selection_paste_style();
-void sp_selection_paste_livepatheffect();
-void sp_selection_remove_livepatheffect();
+void sp_selection_paste(SPDesktop *desktop, bool in_place);
+void sp_selection_paste_style(SPDesktop *desktop);
+void sp_selection_paste_livepatheffect(SPDesktop *desktop);
+void sp_selection_remove_livepatheffect(SPDesktop *desktop);
-void sp_selection_remove_filter();
+void sp_selection_remove_filter(SPDesktop *desktop);
void sp_set_style_clipboard (SPCSSAttr *css);
-void sp_selection_paste_size(bool apply_x, bool apply_y);
-void sp_selection_paste_size_separately(bool apply_x, bool apply_y);
+void sp_selection_paste_size(SPDesktop *desktop, bool apply_x, bool apply_y);
+void sp_selection_paste_size_separately(SPDesktop *desktop, bool apply_x, bool apply_y);
-void sp_selection_to_next_layer( bool suppressDone = false );
-void sp_selection_to_prev_layer( bool suppressDone = false );
+void sp_selection_to_next_layer( SPDesktop *desktop, bool suppressDone = false );
+void sp_selection_to_prev_layer( SPDesktop *desktop, bool suppressDone = false );
void sp_selection_apply_affine(Inkscape::Selection *selection, NR::Matrix const &affine, bool set_i2d = true);
-void sp_selection_remove_transform (void);
+void sp_selection_remove_transform (SPDesktop *desktop);
void sp_selection_scale_absolute (Inkscape::Selection *selection, double x0, double x1, double y0, double y1);
void sp_selection_scale_relative(Inkscape::Selection *selection, NR::Point const &align, NR::scale const &scale);
void sp_selection_rotate_relative (Inkscape::Selection *selection, NR::Point const ¢er, gdouble angle);
void sp_selection_move_relative (Inkscape::Selection *selection, NR::Point const &move);
void sp_selection_move_relative (Inkscape::Selection *selection, double dx, double dy);
-void sp_selection_rotate_90_cw (void);
-void sp_selection_rotate_90_ccw (void);
+void sp_selection_rotate_90_cw (SPDesktop *desktop);
+void sp_selection_rotate_90_ccw (SPDesktop *desktop);
void sp_selection_rotate (Inkscape::Selection *selection, gdouble angle);
void sp_selection_rotate_screen (Inkscape::Selection *selection, gdouble angle);
void sp_selection_scale_screen (Inkscape::Selection *selection, gdouble grow_pixels);
void sp_selection_scale_times (Inkscape::Selection *selection, gdouble times);
-void sp_selection_move (gdouble dx, gdouble dy);
-void sp_selection_move_screen (gdouble dx, gdouble dy);
+void sp_selection_move (SPDesktop *desktop, gdouble dx, gdouble dy);
+void sp_selection_move_screen (SPDesktop *desktop, gdouble dx, gdouble dy);
-void sp_selection_item_next (void);
-void sp_selection_item_prev (void);
+void sp_selection_item_next (SPDesktop *desktop);
+void sp_selection_item_prev (SPDesktop *desktop);
void sp_selection_next_patheffect_param(SPDesktop * dt);
void sp_selection_get_export_hints (Inkscape::Selection *selection, const char **filename, float *xdpi, float *ydpi);
void sp_document_get_export_hints (SPDocument * doc, const char **filename, float *xdpi, float *ydpi);
-void sp_selection_create_bitmap_copy ();
+void sp_selection_create_bitmap_copy (SPDesktop *desktop);
-void sp_selection_set_mask(bool apply_clip_path, bool apply_to_layer);
-void sp_selection_unset_mask(bool apply_clip_path);
+void sp_selection_set_mask(SPDesktop *desktop, bool apply_clip_path, bool apply_to_layer);
+void sp_selection_unset_mask(SPDesktop *desktop, bool apply_clip_path);
bool fit_canvas_to_selection(SPDesktop *);
void verb_fit_canvas_to_selection(SPDesktop *);
diff --git a/src/verbs.cpp b/src/verbs.cpp
index c60ba6a5fe7c983f9a015feba63063587b673800..cacb0fa077d03a33651367e7333861c5af2acbbf 100644 (file)
--- a/src/verbs.cpp
+++ b/src/verbs.cpp
sp_redo(dt, sp_desktop_document(dt));
break;
case SP_VERB_EDIT_CUT:
- sp_selection_cut();
+ sp_selection_cut(dt);
break;
case SP_VERB_EDIT_COPY:
sp_selection_copy();
break;
case SP_VERB_EDIT_PASTE:
- sp_selection_paste(false);
+ sp_selection_paste(dt, false);
break;
case SP_VERB_EDIT_PASTE_STYLE:
- sp_selection_paste_style();
+ sp_selection_paste_style(dt);
break;
case SP_VERB_EDIT_PASTE_SIZE:
- sp_selection_paste_size(true, true);
+ sp_selection_paste_size(dt, true, true);
break;
case SP_VERB_EDIT_PASTE_SIZE_X:
- sp_selection_paste_size(true, false);
+ sp_selection_paste_size(dt, true, false);
break;
case SP_VERB_EDIT_PASTE_SIZE_Y:
- sp_selection_paste_size(false, true);
+ sp_selection_paste_size(dt, false, true);
break;
case SP_VERB_EDIT_PASTE_SIZE_SEPARATELY:
- sp_selection_paste_size_separately(true, true);
+ sp_selection_paste_size_separately(dt, true, true);
break;
case SP_VERB_EDIT_PASTE_SIZE_SEPARATELY_X:
- sp_selection_paste_size_separately(true, false);
+ sp_selection_paste_size_separately(dt, true, false);
break;
case SP_VERB_EDIT_PASTE_SIZE_SEPARATELY_Y:
- sp_selection_paste_size_separately(false, true);
+ sp_selection_paste_size_separately(dt, false, true);
break;
case SP_VERB_EDIT_PASTE_IN_PLACE:
- sp_selection_paste(true);
+ sp_selection_paste(dt, true);
break;
case SP_VERB_EDIT_PASTE_LIVEPATHEFFECT:
- sp_selection_paste_livepatheffect();
+ sp_selection_paste_livepatheffect(dt);
break;
case SP_VERB_EDIT_REMOVE_LIVEPATHEFFECT:
- sp_selection_remove_livepatheffect();
+ sp_selection_remove_livepatheffect(dt);
break;
case SP_VERB_EDIT_REMOVE_FILTER:
- sp_selection_remove_filter();
+ sp_selection_remove_filter(dt);
break;
case SP_VERB_EDIT_DELETE:
- sp_selection_delete();
+ sp_selection_delete(dt);
break;
case SP_VERB_EDIT_DUPLICATE:
- sp_selection_duplicate();
+ sp_selection_duplicate(dt);
break;
case SP_VERB_EDIT_CLONE:
- sp_selection_clone();
+ sp_selection_clone(dt);
break;
case SP_VERB_EDIT_UNLINK_CLONE:
- sp_selection_unlink();
+ sp_selection_unlink(dt);
break;
case SP_VERB_EDIT_RELINK_CLONE:
- sp_selection_relink();
+ sp_selection_relink(dt);
break;
case SP_VERB_EDIT_CLONE_SELECT_ORIGINAL:
- sp_select_clone_original();
+ sp_select_clone_original(dt);
break;
case SP_VERB_EDIT_SELECTION_2_MARKER:
- sp_selection_to_marker();
+ sp_selection_to_marker(dt);
break;
case SP_VERB_EDIT_SELECTION_2_GUIDES:
- sp_selection_to_guides();
+ sp_selection_to_guides(dt);
break;
case SP_VERB_EDIT_TILE:
- sp_selection_tile();
+ sp_selection_tile(dt);
break;
case SP_VERB_EDIT_UNTILE:
- sp_selection_untile();
+ sp_selection_untile(dt);
break;
case SP_VERB_EDIT_CLEAR_ALL:
- sp_edit_clear_all();
+ sp_edit_clear_all(dt);
break;
case SP_VERB_EDIT_SELECT_ALL:
if (tools_isactive(dt, TOOLS_NODES)) {
SP_NODE_CONTEXT(ec)->shape_editor->select_all_from_subpath(false);
} else {
- sp_edit_select_all();
+ sp_edit_select_all(dt);
}
break;
case SP_VERB_EDIT_INVERT:
if (tools_isactive(dt, TOOLS_NODES)) {
SP_NODE_CONTEXT(ec)->shape_editor->select_all_from_subpath(true);
} else {
- sp_edit_invert();
+ sp_edit_invert(dt);
}
break;
case SP_VERB_EDIT_SELECT_ALL_IN_ALL_LAYERS:
if (tools_isactive(dt, TOOLS_NODES)) {
SP_NODE_CONTEXT(ec)->shape_editor->select_all(false);
} else {
- sp_edit_select_all_in_all_layers();
+ sp_edit_select_all_in_all_layers(dt);
}
break;
case SP_VERB_EDIT_INVERT_IN_ALL_LAYERS:
if (tools_isactive(dt, TOOLS_NODES)) {
SP_NODE_CONTEXT(ec)->shape_editor->select_all(true);
} else {
- sp_edit_invert_in_all_layers();
+ sp_edit_invert_in_all_layers(dt);
}
break;
&& ec->_grdrag->isNonEmpty()) {
sp_gradient_context_select_next (ec);
} else {
- sp_selection_item_next();
+ sp_selection_item_next(dt);
}
break;
case SP_VERB_EDIT_SELECT_PREV:
&& ec->_grdrag->isNonEmpty()) {
sp_gradient_context_select_prev (ec);
} else {
- sp_selection_item_prev();
+ sp_selection_item_prev(dt);
}
break;
switch (reinterpret_cast<std::size_t>(data)) {
case SP_VERB_SELECTION_TO_FRONT:
- sp_selection_raise_to_top();
+ sp_selection_raise_to_top(dt);
break;
case SP_VERB_SELECTION_TO_BACK:
- sp_selection_lower_to_bottom();
+ sp_selection_lower_to_bottom(dt);
break;
case SP_VERB_SELECTION_RAISE:
- sp_selection_raise();
+ sp_selection_raise(dt);
break;
case SP_VERB_SELECTION_LOWER:
- sp_selection_lower();
+ sp_selection_lower(dt);
break;
case SP_VERB_SELECTION_GROUP:
- sp_selection_group();
+ sp_selection_group(dt);
break;
case SP_VERB_SELECTION_UNGROUP:
- sp_selection_ungroup();
+ sp_selection_ungroup(dt);
break;
case SP_VERB_SELECTION_TEXTTOPATH:
dt->_dlg_mgr->showDialog("Trace");
break;
case SP_VERB_SELECTION_CREATE_BITMAP:
- sp_selection_create_bitmap_copy();
+ sp_selection_create_bitmap_copy(dt);
break;
case SP_VERB_SELECTION_COMBINE:
break;
}
case SP_VERB_LAYER_MOVE_TO_NEXT: {
- sp_selection_to_next_layer();
+ sp_selection_to_next_layer(dt);
break;
}
case SP_VERB_LAYER_MOVE_TO_PREV: {
- sp_selection_to_prev_layer();
+ sp_selection_to_prev_layer(dt);
break;
}
case SP_VERB_LAYER_TO_TOP:
g_free(name);
}
- sp_edit_select_all();
- sp_selection_duplicate(true);
- sp_selection_to_prev_layer(true);
+ sp_edit_select_all(dt);
+ sp_selection_duplicate(dt, true);
+ sp_selection_to_prev_layer(dt, true);
dt->setCurrentLayer(new_layer);
- sp_edit_select_all();
+ sp_edit_select_all(dt);
sp_document_done(sp_desktop_document(dt), SP_VERB_LAYER_DUPLICATE,
_("Duplicate layer"));
switch (reinterpret_cast<std::size_t>(data)) {
case SP_VERB_OBJECT_ROTATE_90_CW:
- sp_selection_rotate_90_cw();
+ sp_selection_rotate_90_cw(dt);
break;
case SP_VERB_OBJECT_ROTATE_90_CCW:
- sp_selection_rotate_90_ccw();
+ sp_selection_rotate_90_ccw(dt);
break;
case SP_VERB_OBJECT_FLATTEN:
- sp_selection_remove_transform();
+ sp_selection_remove_transform(dt);
break;
case SP_VERB_OBJECT_TO_CURVE:
sp_selected_path_to_curves(dt);
_("Flip vertically"));
break;
case SP_VERB_OBJECT_SET_MASK:
- sp_selection_set_mask(false, false);
+ sp_selection_set_mask(dt, false, false);
break;
case SP_VERB_OBJECT_EDIT_MASK:
sp_selection_edit_clip_or_mask(dt, false);
break;
case SP_VERB_OBJECT_UNSET_MASK:
- sp_selection_unset_mask(false);
+ sp_selection_unset_mask(dt, false);
break;
case SP_VERB_OBJECT_SET_CLIPPATH:
- sp_selection_set_mask(true, false);
+ sp_selection_set_mask(dt, true, false);
break;
case SP_VERB_OBJECT_EDIT_CLIPPATH:
sp_selection_edit_clip_or_mask(dt, true);
break;
case SP_VERB_OBJECT_UNSET_CLIPPATH:
- sp_selection_unset_mask(true);
+ sp_selection_unset_mask(dt, true);
break;
default:
break;