1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
// SPDX-License-Identifier: GPL-2.0-or-later
#ifndef SEEN_SELECTION_CHEMISTRY_H
#define SEEN_SELECTION_CHEMISTRY_H
/*
* Miscellaneous operations on selected items
*
* Authors:
* Lauris Kaplinski <lauris@kaplinski.com>
* Frank Felfe <innerspace@iname.com>
* bulia byak <buliabyak@users.sf.net>
* Jon A. Cruz <jon@joncruz.org>
* Abhishek Sharma
*
* Copyright (C) 1999-2012 authors
* Copyright (C) 2001-2002 Ximian, Inc.
*
* Released under GNU GPL v2+, read the file 'COPYING' for more information.
*/
#include <2geom/forward.h>
#include <vector>
#include <glibmm/ustring.h>
class SPCSSAttr;
class SPDesktop;
class SPDocument;
class SPItem;
class SPObject;
namespace Inkscape {
class Selection;
class ObjectSet;
namespace LivePathEffect {
class PathParam;
}
class SelectionHelper {
public:
static void selectAll(SPDesktop *desktop);
static void selectAllInAll(SPDesktop *desktop);
static void selectNone(SPDesktop *desktop);
static void selectSameFillStroke(SPDesktop *dt);
static void selectSameFillColor(SPDesktop *dt);
static void selectSameStrokeColor(SPDesktop *dt);
static void selectSameStrokeStyle(SPDesktop *dt);
static void selectSameObjectType(SPDesktop *dt);
static void invert(SPDesktop *desktop);
static void invertAllInAll(SPDesktop *desktop);
static void reverse(SPDesktop *dt);
static void fixSelection(SPDesktop *desktop);
};
} // namespace Inkscape
void sp_edit_clear_all(Inkscape::Selection *selection);
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);
SPCSSAttr *take_style_from_item (SPObject *object);
void sp_selection_paste(SPDesktop *desktop, bool in_place);
void sp_set_style_clipboard (SPCSSAttr *css);
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_edit_clip_or_mask(SPDesktop * dt, bool clip);
enum SPSelectStrokeStyleType {
SP_FILL_COLOR = 0,
SP_STROKE_COLOR = 1,
SP_STROKE_STYLE_WIDTH = 2,
SP_STROKE_STYLE_DASHES = 3,
SP_STROKE_STYLE_MARKERS = 4,
SP_STROKE_STYLE_ALL = 5,
SP_STYLE_ALL = 6
};
void sp_select_same_fill_stroke_style(SPDesktop *desktop, gboolean fill, gboolean strok, gboolean style);
void sp_select_same_object_type(SPDesktop *desktop);
std::vector<SPItem*> sp_get_same_style(SPItem *sel, std::vector<SPItem*> &src, SPSelectStrokeStyleType type=SP_STYLE_ALL);
std::vector<SPItem*> sp_get_same_object_type(SPItem *sel, std::vector<SPItem*> &src);
void scroll_to_show_item(SPDesktop *desktop, SPItem *item);
void sp_undo (SPDesktop *desktop, SPDocument *doc);
void sp_redo (SPDesktop *desktop, SPDocument *doc);
bool fit_canvas_to_drawing(SPDocument *, bool with_margins = false);
void fit_canvas_to_drawing(SPDesktop *);
void unlock_all(SPDesktop *dt);
void unlock_all_in_all_layers(SPDesktop *dt);
void unhide_all(SPDesktop *dt);
void unhide_all_in_all_layers(SPDesktop *dt);
std::vector<SPItem*> &get_all_items(std::vector<SPItem*> &list, SPObject *from, SPDesktop *desktop, bool onlyvisible, bool onlysensitive, bool ingroups, std::vector<SPItem*> const &exclude);
std::vector<SPItem*> sp_degroup_list (std::vector<SPItem*> &items);
/* selection cycling */
enum SPCycleType
{
SP_CYCLE_SIMPLE,
SP_CYCLE_VISIBLE, // cycle only visible items
SP_CYCLE_FOCUS // readjust visible area to view selected item
};
// TODO FIXME: This should be moved into preference repr
extern SPCycleType SP_CYCLING;
#endif // SEEN_SELECTION_CHEMISTRY_H
|