Code

fix include paths
[inkscape.git] / src / extension / internal / grid.cpp
index 061035eace22f8e733b9b25606f33c372771a8cd..57b1240352baa18bb209c34ef8d4e01651baf41e 100644 (file)
@@ -1,6 +1,6 @@
 /**
     \file grid.cpp
+
     A plug-in to add a grid creation effect into Inkscape.
 */
 /*
@@ -38,7 +38,7 @@ namespace Internal {
     \return Whether the load was sucessful
 */
 bool
-Grid::load (Inkscape::Extension::Extension *module)
+Grid::load (Inkscape::Extension::Extension */*module*/)
 {
     // std::cout << "Hey, I'm Grid, I'm loading!" << std::endl;
     return TRUE;
@@ -74,7 +74,7 @@ Glib::ustring build_lines(int axis, NR::Rect bounding_area,
     \param  document What should be edited.
 */
 void
-Grid::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View *document)
+Grid::effect (Inkscape::Extension::Effect *module, Inkscape::UI::View::View *document, Inkscape::Extension::Implementation::ImplementationDocumentCache * /*docCache*/)
 {
     Inkscape::Selection * selection     = ((SPDesktop *)document)->selection;
 
@@ -140,7 +140,7 @@ public:
                 describing the parameter. */
     PrefAdjustment(Inkscape::Extension::Extension * ext, char * pref) :
             Gtk::Adjustment(0.0, 0.0, 10.0, 0.1), _ext(ext), _pref(pref) {
-        this->set_value(_ext->get_param_float(_pref)); 
+        this->set_value(_ext->get_param_float(_pref));
         this->signal_value_changed().connect(sigc::mem_fun(this, &PrefAdjustment::val_changed));
         return;
     };
@@ -169,17 +169,17 @@ PrefAdjustment::val_changed (void)
     Uses AutoGUI for creating the GUI.
 */
 Gtk::Widget *
-Grid::prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View * view)
+Grid::prefs_effect(Inkscape::Extension::Effect *module, Inkscape::UI::View::View * view, sigc::signal<void> * changeSignal, Inkscape::Extension::Implementation::ImplementationDocumentCache * /*docCache*/)
 {
     SPDocument * current_document = view->doc();
 
     using Inkscape::Util::GSListConstIterator;
     GSListConstIterator<SPItem *> selected = sp_desktop_selection((SPDesktop *)view)->itemList();
     Inkscape::XML::Node * first_select = NULL;
-    if (selected != NULL) 
+    if (selected != NULL)
         first_select = SP_OBJECT_REPR(*selected);
 
-    return module->autogui(current_document, first_select);
+    return module->autogui(current_document, first_select, changeSignal);
 }
 
 #include "clear-n_.h"
@@ -192,10 +192,10 @@ Grid::init (void)
             "<name>" N_("Grid") "</name>\n"
             "<id>org.inkscape.effect.grid</id>\n"
             "<param name=\"lineWidth\" gui-text=\"" N_("Line Width") "\" type=\"float\">1.0</param>\n"
-            "<param name=\"xspacing\" gui-text=\"" N_("Horizontal Spacing") "\" type=\"float\">10.0</param>\n"
-            "<param name=\"yspacing\" gui-text=\"" N_("Vertical Spacing") "\" type=\"float\">10.0</param>\n"
-            "<param name=\"xoffset\" gui-text=\"" N_("Horizontal Offset") "\" type=\"float\">5.0</param>\n"
-            "<param name=\"yoffset\" gui-text=\"" N_("Vertical Offset") "\" type=\"float\">5.0</param>\n"
+            "<param name=\"xspacing\" gui-text=\"" N_("Horizontal Spacing") "\" type=\"float\" min=\"0.1\" max=\"1000\">10.0</param>\n"
+            "<param name=\"yspacing\" gui-text=\"" N_("Vertical Spacing") "\" type=\"float\" min=\"0.1\" max=\"1000\">10.0</param>\n"
+            "<param name=\"xoffset\" gui-text=\"" N_("Horizontal Offset") "\" type=\"float\" min=\"0.0\" max=\"1000\">0.0</param>\n"
+            "<param name=\"yoffset\" gui-text=\"" N_("Vertical Offset") "\" type=\"float\" min=\"0.0\" max=\"1000\">0.0</param>\n"
             "<effect>\n"
                 "<object-type>all</object-type>\n"
                 "<effects-menu>\n"