Code

disable Rectangle and Ellipse (Bug 407394)
[inkscape.git] / src / selection-chemistry.h
index 4a8c8901e8c2f2c3cc014dd402d5b270bfea7f88..65d1ba296a27a17ba0eb99aee6b65a0851220ed0 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __SP_SELECTION_CHEMISTRY_H__
-#define __SP_SELECTION_CHEMISTRY_H__
+#ifndef SEEN_SELECTION_CHEMISTRY_H
+#define SEEN_SELECTION_CHEMISTRY_H
 
 /*
  * Miscellanous operations on selected items
@@ -8,14 +8,17 @@
  *   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-2005 authors
+ * Copyright (C) 1999-2010 authors
  * Copyright (C) 2001-2002 Ximian, Inc.
  *
  * Released under GNU GPL, read the file 'COPYING' for more information
  */
 
 #include "forward.h"
+#include "sp-item.h"
 #include "2geom/forward.h"
 
 namespace Inkscape { class Selection; }
@@ -28,6 +31,20 @@ namespace LivePathEffect {
 
 class SPCSSAttr;
 
+namespace Inkscape {
+    class SelectionHelper {
+    public:
+        static void selectAll(SPDesktop *desktop);
+        static void selectAllInAll(SPDesktop *desktop);
+        static void selectNone(SPDesktop *desktop);
+        static void invert(SPDesktop *desktop);
+        static void invertAllInAll(SPDesktop *desktop);
+        static void reverse(SPDesktop *dt);
+        static void selectNext(SPDesktop *desktop);
+        static void selectPrev(SPDesktop *desktop);
+    };
+} // namespace Inkscape
+
 void sp_selection_delete(SPDesktop *desktop);
 void sp_selection_duplicate(SPDesktop *desktop, bool suppressDone = false);
 void sp_edit_clear_all(SPDesktop *desktop);
@@ -48,6 +65,7 @@ void sp_selection_to_guides(SPDesktop *desktop);
 void sp_selection_tile(SPDesktop *desktop, bool apply = true);
 void sp_selection_untile(SPDesktop *desktop);
 
+//void sp_selection_group_impl(GSList const *reprs_to_group, Inkscape::XML::Node *group, Inkscape::XML::Document *xml_doc, SPDocument *doc);
 void sp_selection_group(SPDesktop *desktop);
 void sp_selection_ungroup(SPDesktop *desktop);
 
@@ -59,7 +77,7 @@ void sp_selection_lower_to_bottom(SPDesktop *desktop);
 SPCSSAttr *take_style_from_item (SPItem *item);
 
 void sp_selection_cut(SPDesktop *desktop);
-void sp_selection_copy();
+void sp_selection_copy(SPDesktop *desktop);
 void sp_selection_paste(SPDesktop *desktop, bool in_place);
 void sp_selection_paste_style(SPDesktop *desktop);
 void sp_selection_paste_livepatheffect(SPDesktop *desktop);
@@ -104,20 +122,20 @@ void sp_selection_edit_clip_or_mask(SPDesktop * dt, bool clip);
 
 void scroll_to_show_item(SPDesktop *desktop, SPItem *item);
 
-void sp_undo (SPDesktop *desktop, Document *doc);
-void sp_redo (SPDesktop *desktop, Document *doc);
+void sp_undo (SPDesktop *desktop, SPDocument *doc);
+void sp_redo (SPDesktop *desktop, SPDocument *doc);
 
 void sp_selection_get_export_hints (Inkscape::Selection *selection, const char **filename, float *xdpi, float *ydpi);
-void sp_document_get_export_hints (Document * doc, 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 (SPDesktop *desktop);
 
 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 *);
+bool fit_canvas_to_selection(SPDesktop *, bool with_margins = false);
 void verb_fit_canvas_to_selection(SPDesktop *);
-bool fit_canvas_to_drawing(Document *);
+bool fit_canvas_to_drawing(SPDocument *, bool with_margins = false);
 void verb_fit_canvas_to_drawing(SPDesktop *);
 void fit_canvas_to_selection_or_drawing(SPDesktop *);
 
@@ -131,19 +149,14 @@ GSList *sp_degroup_list (GSList *items);
 /* selection cycling */
 typedef enum
 {
-       SP_CYCLE_SIMPLE,
-       SP_CYCLE_VISIBLE, /* cycle only visible items */
-       SP_CYCLE_FOCUS /* readjust visible area to view selected item */
+    SP_CYCLE_SIMPLE,
+    SP_CYCLE_VISIBLE, // cycle only visible items
+    SP_CYCLE_FOCUS // readjust visible area to view selected item
 } SPCycleType;
 
-/* fixme: This should be moved into preference repr */
-#ifndef __SP_SELECTION_CHEMISTRY_C__
-extern SPCycleType SP_CYCLING;
-#else
-SPCycleType SP_CYCLING = SP_CYCLE_FOCUS;
-#endif
-
-#endif
 
 
+// TOOD fixme: This should be moved into preference repr
+extern SPCycleType SP_CYCLING;
 
+#endif // SEEN_SELECTION_CHEMISTRY_H