Code

Add possibility to convert objects (only rectangles and 3D boxes currently) to guidel...
[inkscape.git] / src / selection-chemistry.h
1 #ifndef __SP_SELECTION_CHEMISTRY_H__
2 #define __SP_SELECTION_CHEMISTRY_H__
4 /*
5  * Miscellanous operations on selected items
6  *
7  * Authors:
8  *   Lauris Kaplinski <lauris@kaplinski.com>
9  *   Frank Felfe <innerspace@iname.com>
10  *   bulia byak <buliabyak@users.sf.net>
11  *
12  * Copyright (C) 1999-2005 authors
13  * Copyright (C) 2001-2002 Ximian, Inc.
14  *
15  * Released under GNU GPL, read the file 'COPYING' for more information
16  */
18 #include "forward.h"
19 #include "libnr/nr-forward.h"
21 namespace Inkscape { class Selection; }
23 class SPCSSAttr;
25 void sp_selection_delete();
26 void sp_selection_duplicate();
27 void sp_edit_clear_all();
29 void sp_edit_select_all();
30 void sp_edit_select_all_in_all_layers ();
31 void sp_edit_invert ();
32 void sp_edit_invert_in_all_layers ();
34 void sp_selection_clone();
35 void sp_selection_unlink();
36 void sp_select_clone_original ();
38 void sp_selection_to_marker(bool apply = true);
39 void sp_selection_to_guides();
41 void sp_selection_tile(bool apply = true);
42 void sp_selection_untile();
44 void sp_selection_group();
45 void sp_selection_ungroup();
47 void sp_selection_raise();
48 void sp_selection_raise_to_top();
49 void sp_selection_lower();
50 void sp_selection_lower_to_bottom();
52 SPCSSAttr *take_style_from_item (SPItem *item);
54 void sp_selection_cut();
55 void sp_selection_copy();
56 void sp_selection_paste(bool in_place);
57 void sp_selection_paste_style();
58 void sp_selection_paste_livepatheffect();
60 void sp_set_style_clipboard (SPCSSAttr *css);
62 void sp_selection_paste_size(bool apply_x, bool apply_y);
63 void sp_selection_paste_size_separately(bool apply_x, bool apply_y);
65 void sp_selection_to_next_layer ();
66 void sp_selection_to_prev_layer ();
68 void sp_selection_apply_affine(Inkscape::Selection *selection, NR::Matrix const &affine, bool set_i2d = true);
69 void sp_selection_remove_transform (void);
70 void sp_selection_scale_absolute (Inkscape::Selection *selection, double x0, double x1, double y0, double y1);
71 void sp_selection_scale_relative(Inkscape::Selection *selection, NR::Point const &align, NR::scale const &scale);
72 void sp_selection_rotate_relative (Inkscape::Selection *selection, NR::Point const &center, gdouble angle);
73 void sp_selection_skew_relative (Inkscape::Selection *selection, NR::Point const &align, double dx, double dy);
74 void sp_selection_move_relative (Inkscape::Selection *selection, NR::Point const &move);
75 void sp_selection_move_relative (Inkscape::Selection *selection, double dx, double dy);
77 void sp_selection_rotate_90_cw (void);
78 void sp_selection_rotate_90_ccw (void);
79 void sp_selection_rotate (Inkscape::Selection *selection, gdouble angle);
80 void sp_selection_rotate_screen (Inkscape::Selection *selection, gdouble angle);
82 void sp_selection_scale (Inkscape::Selection *selection, gdouble grow);
83 void sp_selection_scale_screen (Inkscape::Selection *selection, gdouble grow_pixels);
84 void sp_selection_scale_times (Inkscape::Selection *selection, gdouble times);
86 void sp_selection_move (gdouble dx, gdouble dy);
87 void sp_selection_move_screen (gdouble dx, gdouble dy);
89 void sp_selection_item_next (void);
90 void sp_selection_item_prev (void);
92 void sp_selection_next_patheffect_param(SPDesktop * dt);
94 void scroll_to_show_item(SPDesktop *desktop, SPItem *item);
96 void sp_undo (SPDesktop *desktop, SPDocument *doc);
97 void sp_redo (SPDesktop *desktop, SPDocument *doc);
99 void sp_selection_get_export_hints (Inkscape::Selection *selection, const char **filename, float *xdpi, float *ydpi);
100 void sp_document_get_export_hints (SPDocument * doc, const char **filename, float *xdpi, float *ydpi);
102 void sp_selection_create_bitmap_copy ();
104 void sp_selection_set_mask(bool apply_clip_path, bool apply_to_layer);
105 void sp_selection_unset_mask(bool apply_clip_path);
107 void fit_canvas_to_selection(SPDesktop *desktop);
108 void fit_canvas_to_drawing(SPDocument *doc);
109 void fit_canvas_to_selection_or_drawing(SPDesktop *desktop);
111 void unlock_all(SPDesktop *dt);
112 void unlock_all_in_all_layers(SPDesktop *dt);
113 void unhide_all(SPDesktop *dt);
114 void unhide_all_in_all_layers(SPDesktop *dt);
116 GSList * sp_selection_get_clipboard();
118 /* selection cycling */
120 typedef enum
122         SP_CYCLE_SIMPLE,
123         SP_CYCLE_VISIBLE, /* cycle only visible items */
124         SP_CYCLE_FOCUS /* readjust visible area to view selected item */
125 } SPCycleType;
127 /* fixme: This should be moved into preference repr */
128 #ifndef __SP_SELECTION_CHEMISTRY_C__
129 extern SPCycleType SP_CYCLING;
130 #else
131 SPCycleType SP_CYCLING = SP_CYCLE_FOCUS;
132 #endif
134 #endif