summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d7a18d2)
raw | patch | inline | side by side (parent: d7a18d2)
author | Steren Giannini <steren.giannini@gmail.com> | |
Sun, 3 Jan 2010 20:39:52 +0000 (21:39 +0100) | ||
committer | Steren Giannini <steren.giannini@gmail.com> | |
Sun, 3 Jan 2010 20:39:52 +0000 (21:39 +0100) |
------------ This line and the following will be ignored --------------
removed:
src/ui/dialog/spray-option.cpp
src/ui/dialog/spray-option.h
modified:
src/spray-context.cpp
src/ui/dialog/Makefile_insert
src/ui/dialog/dialog-manager.cpp
src/ui/view/edit-widget.cpp
src/ui/view/edit-widget.h
src/widgets/toolbox.cpp
unknown:
backup.bzr/
description-pak
doc-pak/
po/.intltool-merge-cache
removed:
src/ui/dialog/spray-option.cpp
src/ui/dialog/spray-option.h
modified:
src/spray-context.cpp
src/ui/dialog/Makefile_insert
src/ui/dialog/dialog-manager.cpp
src/ui/view/edit-widget.cpp
src/ui/view/edit-widget.h
src/widgets/toolbox.cpp
unknown:
backup.bzr/
description-pak
doc-pak/
po/.intltool-merge-cache
src/spray-context.cpp | patch | blob | history | |
src/ui/dialog/Makefile_insert | patch | blob | history | |
src/ui/dialog/dialog-manager.cpp | patch | blob | history | |
src/ui/dialog/spray-option.cpp | [deleted file] | patch | blob | history |
src/ui/dialog/spray-option.h | [deleted file] | patch | blob | history |
src/ui/view/edit-widget.cpp | patch | blob | history | |
src/ui/view/edit-widget.h | patch | blob | history | |
src/widgets/toolbox.cpp | patch | blob | history |
diff --git a/src/spray-context.cpp b/src/spray-context.cpp
index b68fe0818cf00aef002b4d78dc32635e1a0b786a..b1ec47e02c208b23799b128428608ddcfc2cb6ae 100644 (file)
--- a/src/spray-context.cpp
+++ b/src/spray-context.cpp
* Benoît LAVORATA
* Vincent MONTAGNE
* Pierre BARBRY-BLOT
+ * Steren GIANNINI (steren.giannini@gmail.com)
*
* Copyright (C) 2009 authors
*
#include "desktop-style.h"
#include "message-context.h"
#include "pixmaps/cursor-spray.xpm"
-//#include "pixmaps/cursor-spray-move.xpm"
-//#include "pixmaps/cursor-thin.xpm"
-//#include "pixmaps/cursor-thicken.xpm"
-//#include "pixmaps/cursor-attract.xpm"
-//#include "pixmaps/cursor-repel.xpm"
-//#include "pixmaps/cursor-push.xpm"
-//#include "pixmaps/cursor-roughen.xpm"
-//#include "pixmaps/cursor-color.xpm"
#include <boost/optional.hpp>
#include "libnr/nr-matrix-ops.h"
#include "libnr/nr-scale-translate-ops.h"
#define RANDN sqrt(-2.0*log(RAND))*cos(TWOPI*RAND)
-double NormalDistribution(double mu,double sigma)
+/**
+ * This function returns pseudo-random numbers from a normal distribution
+ * @param mu : mean
+ * @param sigma : standard deviation ( > 0 )
+ */
+inline double NormalDistribution(double mu,double sigma)
{
-/*
- This function returns a pseudo-random numbers from a normal distribution with
- mean equal at mu and standard deviation equal at sigma > 0
-*/
-
return (mu+sigma*RANDN);
-
}
SPEventContext *event_context = SP_EVENT_CONTEXT(tc);
SPDesktop *desktop = event_context->desktop;
- guint num = 0;
- gchar *sel_message = NULL;
- if (!desktop->selection->isEmpty()) {
- num = g_slist_length((GSList *) desktop->selection->itemList());
- sel_message = g_strdup_printf(ngettext("<b>%i</b> object selected","<b>%i</b> objects selected",num), num);
- } else {
- sel_message = g_strdup_printf(_("<b>Nothing</b> selected"));
- }
+ guint num = 0;
+ gchar *sel_message = NULL;
+ if (!desktop->selection->isEmpty()) {
+ num = g_slist_length((GSList *) desktop->selection->itemList());
+ sel_message = g_strdup_printf(ngettext("<b>%i</b> object selected","<b>%i</b> objects selected",num), num);
+ } else {
+ sel_message = g_strdup_printf(_("<b>Nothing</b> selected"));
+ }
switch (tc->mode) {
return tc->standard_deviation;
}
-/** Method to handle the distribution of the items */
-void random_position( double &r, double &p, double &a, double &s, int choice)
+/**
+ * Method to handle the distribution of the items
+ * @param[out] radius : radius of the position of the sprayed object
+ * @param[out] angle : angle of the position of the sprayed object
+ * @param[in] a : mean
+ * @param[in] s : standard deviation
+ * @param[in] choice :
+
+ */
+void random_position( double &radius, double &angle, double &a, double &s, int choice)
{
- if (choice == 0) // 1 : uniform repartition
- {
- r = (1-pow(g_random_double_range(0, 1),2));
- p = g_random_double_range(0, M_PI*2);
- }
- if (choice == 1) // 0 : gaussian repartition
- {
- double r_temp =-1;
- while(!((r_temp>=0)&&(r_temp<=1)))
- {
- r_temp = NormalDistribution(a,s/4);
- }
- // generates a number following a normal distribution
- p = g_random_double_range(0, M_PI*2);
- r=r_temp;
+ angle = g_random_double_range(0, M_PI*2);
+
+ choice = 0;
+
+ switch(choice) {
+
+ case 0: // 0 : uniform repartition
+ radius = ( 1 - pow( g_random_double_range( 0, 1 ), 2 ) );
+ //radius = g_random_double_range( 0, 1 );
+ break;
+
+ case 1: // 1 : gaussian repartition
+ // generates a number following a normal distribution
+ double radius_temp =-1;
+ while(!((radius_temp>=0)&&(radius_temp<=1)))
+ {
+ radius_temp = NormalDistribution( a, s );
+ }
+ radius = radius_temp;
+ break;
}
+
}
double angle = g_random_double_range( - rotation_variation / 100.0 * M_PI , rotation_variation / 100.0 * M_PI );
double _scale = g_random_double_range( 1.0 - scale_variation / 100.0, 1.0 + scale_variation / 100.0 );
double dr; double dp;
- random_position(dr,dp,mean,standard_deviation,_distrib);
+ random_position( dr, dp, mean, standard_deviation, _distrib );
dr=dr*radius;
if (mode == SPRAY_MODE_COPY) {
return did;
}
-
-bool sp_spray_color_recursive(guint /*mode*/,
- SPItem */*item*/,
- SPItem */*item_at_point*/,
- guint32 /*fill_goal*/,
- bool /*do_fill*/,
- guint32 /*stroke_goal*/,
- bool /*do_stroke*/,
- float /*opacity_goal*/,
- bool /*do_opacity*/,
- bool /*do_blur*/,
- bool /*reverse*/,
- Geom::Point /*p*/,
- double /*radius*/,
- double /*force*/,
- bool /*do_h*/,
- bool /*do_s*/,
- bool /*do_l*/,
- bool /*do_o*/)
-{
- bool did = false;
-
- return did;
-}
-
-
bool sp_spray_dilate(SPSprayContext *tc, Geom::Point /*event_p*/, Geom::Point p, Geom::Point vector, bool reverse)
{
Inkscape::Selection *selection = sp_desktop_selection(SP_EVENT_CONTEXT(tc)->desktop);
void sp_spray_switch_mode(SPSprayContext *tc, gint mode, bool with_shift)
{
- SP_EVENT_CONTEXT(tc)->desktop->setToolboxSelectOneValue ("spray_tool_mode", mode); //sélectionne le bouton numéro "mode"
+ // select the button mode
+ SP_EVENT_CONTEXT(tc)->desktop->setToolboxSelectOneValue ("spray_tool_mode", mode);
// need to set explicitly, because the prefs may not have changed by the previous
tc->mode = mode;
sp_spray_update_cursor (tc, with_shift);
index fac5bad8001cd975d82fd03824ba243ac4f4f478..76cdd35178b381968b09a2d6b010535fed39e78a 100644 (file)
ui/dialog/print-colors-preview-dialog.h \
ui/dialog/scriptdialog.cpp \
ui/dialog/scriptdialog.h \
- ui/dialog/spray-option.cpp \
- ui/dialog/spray-option.h \
ui/dialog/svg-fonts-dialog.cpp \
ui/dialog/svg-fonts-dialog.h \
ui/dialog/swatches.cpp \
index 2116d46c3dff3335fe8d1eea4c1f81e185ac53b2..30cbed64932dcf5def27aed113deda903b3caad6 100644 (file)
#include "ui/dialog/icon-preview.h"
#include "ui/dialog/floating-behavior.h"
#include "ui/dialog/dock-behavior.h"
-#include "ui/dialog/spray-option.h"
#include "ui/dialog/print-colors-preview-dialog.h"
#include "preferences.h"
registerFactory("Transformation", &create<Transformation, FloatingBehavior>);
registerFactory("UndoHistory", &create<UndoHistory, FloatingBehavior>);
registerFactory("InputDevices", &create<InputDialog, FloatingBehavior>);
- registerFactory("SprayOptionClass", &create<SprayOptionClass, FloatingBehavior>);
} else {
registerFactory("Transformation", &create<Transformation, DockBehavior>);
registerFactory("UndoHistory", &create<UndoHistory, DockBehavior>);
registerFactory("InputDevices", &create<InputDialog, DockBehavior>);
- registerFactory("SprayOptionClass", &create<SprayOptionClass, DockBehavior>);
}
}
diff --git a/src/ui/dialog/spray-option.cpp b/src/ui/dialog/spray-option.cpp
+++ /dev/null
@@ -1,397 +0,0 @@
-/*Julien LERAY (julien.leray@ecl2010.ec-lyon.fr), interface for the spray tool*/
-
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <gtkmm/spinbutton.h>
-
-#include "desktop-handles.h"
-#include "unclump.h"
-#include "document.h"
-#include "enums.h"
-#include "graphlayout/graphlayout.h"
-#include "inkscape.h"
-#include "macros.h"
-#include "node-context.h"
-#include "preferences.h"
-#include "removeoverlap/removeoverlap.h"
-#include "selection.h"
-#include "shape-editor.h"
-#include "sp-flowtext.h"
-#include "sp-item-transform.h"
-#include "sp-text.h"
-#include "text-editing.h"
-#include "tools-switch.h"
-#include "ui/icon-names.h"
-#include "util/glib-list-iterators.h"
-#include "verbs.h"
-#include "widgets/icon.h"
-
-#include "spray-option.h"
-
-namespace Inkscape {
-namespace UI {
-namespace Dialog {
-
-
-//Classes qui permettent de créer les environnements Gaussienne, Witdh...
-
-
-
-class Action {
-public:
- Action(const Glib::ustring &id,
- const Glib::ustring &/*tiptext*/,
- guint /*row*/,
- guint /*column*/,
- Gtk::Table &parent,
- Gtk::Tooltips &/*tooltips*/,
- SprayOptionClass &dialog):
- _dialog(dialog),
- _id(id),
- _parent(parent) {}
-
- virtual ~Action(){}
- virtual void on_button_click(){}
- SprayOptionClass &_dialog;
-
-private :
-
- Glib::ustring _id;
- Gtk::Table &_parent;
-};
-
-class ActionE : public Action {
-private:
- Gtk::Label _Label;
- Gtk::SpinButton _Gap;
- guint _min, _max;
- Glib::ustring _pref_path;
-
-public:
- ActionE(const Glib::ustring &id,
- const Glib::ustring &tiptext,
- guint row, guint column,
- SprayOptionClass &dialog,
- guint min, guint max,
- Glib::ustring const &pref_path ):
- Action(id, tiptext, row, column,
- dialog._Table(), dialog.tooltips(), dialog),
- _min(min),
- _max(max),
- _pref_path(pref_path)
- {
- dialog._Table().set_col_spacings(3);
-
- double increm = ((double)_max - (double)_min)/10;
- double val_ini = ((double)_max + (double)_min)/2;
- _Gap.set_digits(1);
- _Gap.set_size_request(60, -1);
- _Gap.set_increments(increm , 0);
- _Gap.set_range(_min, _max);
- _Gap.set_value(val_ini);
- dialog.tooltips().set_tip(_Gap,
- tiptext);
- _Gap.signal_changed().connect(sigc::mem_fun(*this, &ActionE::on_button_click)); //rajout douteux
- _Label.set_label(id);
-
- dialog._Table().attach(_Label, column, column+1, row, row+1, Gtk::FILL, Gtk::FILL);
- dialog._Table().attach(_Gap, column+1, column+2, row, row+1, Gtk::EXPAND, Gtk::EXPAND);
- }
-
- virtual void on_button_click(){
- if (!_dialog.getDesktop()) return;
-
- Inkscape::Preferences *prefs = Inkscape::Preferences::get();
-
- prefs->setDouble(_pref_path, SP_VERB_CONTEXT_SPRAY);
-
- double const Gap = _Gap.get_value();
-
-
- prefs->setDouble(_pref_path, Gap);
-
- sp_document_done(sp_desktop_document(_dialog.getDesktop()), SP_VERB_CONTEXT_SPRAY,
- _("Remove overlaps"));
- }
-
-
-};
-
-class ActionF : public Action {
-private:
- Gtk::Label _Label;
- Gtk::Label _Label1;
- Gtk::Label _Label2;
- Gtk::SpinButton _Gap1;
- Gtk::SpinButton _Gap2;
- Glib::ustring _pref1_path;
- Glib::ustring _pref2_path;
-
-public:
- ActionF(const Glib::ustring &id,
- const Glib::ustring &tiptext,
- guint row, guint column,
- SprayOptionClass &dialog,
- Glib::ustring const &pref1_path,
- Glib::ustring const &pref2_path ):
- Action(id, tiptext, row, column,
- dialog._Table(), dialog.tooltips(), dialog),
- _pref1_path(pref1_path),
- _pref2_path(pref2_path)
- {
- dialog.F_Table().set_col_spacings(3);
-
- _Label.set_label(id);
-
- _Gap1.set_digits(1);
- _Gap1.set_size_request(60, -1);
- _Gap1.set_increments(0.1, 0);
- _Gap1.set_range(0, 10);
- _Gap1.set_value(1);
- dialog.tooltips().set_tip(_Gap1,
- _("Minimum"));
-
- _Label1.set_label(Q_("Min"));
-
- _Gap2.set_digits(1);
- _Gap2.set_size_request(60, -1);
- _Gap2.set_increments(0.1, 0);
- _Gap2.set_range(0, 10);
- _Gap2.set_value(1);
- dialog.tooltips().set_tip(_Gap2,
- _("Maximum"));
-
- _Label2.set_label(_("Max:"));
-
- _Gap1.signal_changed().connect(sigc::mem_fun(*this, &ActionF::on_button_click));
- _Gap2.signal_changed().connect(sigc::mem_fun(*this, &ActionF::on_button_click));
-
- dialog.F_Table().attach(_Label, column, column+1, row, row+1, Gtk::FILL, Gtk::FILL);
- dialog.F_Table().attach(_Label1, column+1, column+2, row, row+1, Gtk::FILL, Gtk::FILL);
- dialog.F_Table().attach(_Gap1, column+2, column+3, row, row+1, Gtk::EXPAND, Gtk::EXPAND);
- dialog.F_Table().attach(_Label2, column+3, column+4, row, row+1, Gtk::FILL, Gtk::FILL);
- dialog.F_Table().attach(_Gap2, column+4, column+5, row, row+1, Gtk::EXPAND, Gtk::EXPAND);
-
- }
-
- virtual void on_button_click(){
- if (!_dialog.getDesktop()) return;
-
- Inkscape::Preferences *prefs = Inkscape::Preferences::get();
-
- prefs->setDouble(_pref1_path, SP_VERB_CONTEXT_SPRAY);
- prefs->setDouble(_pref2_path, SP_VERB_CONTEXT_SPRAY);
-
- double const Gap1 = _Gap1.get_value();
- double const Gap2 = _Gap2.get_value();
-
- prefs->setDouble(_pref1_path, Gap1);
- prefs->setDouble(_pref2_path, Gap2);
-
- sp_document_done(sp_desktop_document(_dialog.getDesktop()), SP_VERB_CONTEXT_SPRAY,
- _("Remove overlaps"));
- }
-
-
-};
-
-
-
-void SprayOptionClass::combo_action() {
- Inkscape::Preferences *prefs = Inkscape::Preferences::get();
- cout<<"combo.get_active_row_number = "<<_combo.get_active_row_number()<<endl;
-
- int const distrib = _combo.get_active_row_number();
-
- prefs->setInt("/tools/spray/distribution", distrib);
-
-
- sp_document_done(sp_desktop_document(this->getDesktop()), SP_VERB_CONTEXT_SPRAY,
- _("Remove overlaps"));
-
-}
-
-
-
-
-void SprayOptionClass::action() {
- for (list<Action *>::iterator it = _actionList.begin(); it != _actionList.end(); ++it) {
- (*it)->on_button_click();
- }
- combo_action();
-}
-
-
-
-
-
-
-void on_selection_changed(Inkscape::Application */*inkscape*/, Inkscape::Selection */*selection*/, SprayOptionClass *daad)
-{
- daad->randomize_bbox = Geom::OptRect();
-}
-
-/////////////////////////////////////////////////////////
-//Construction de l'interface
-/////////////////////////////////////////////////////////
-
-
-SprayOptionClass::SprayOptionClass()
- : UI::Widget::Panel ("", "/dialogs/spray", SP_VERB_DIALOG_SPRAY_OPTION),
- _actionList(),
- _distributionFrame(Q_("sprayOptions|Distribution")),
- _Frame(Q_("sprayOptions|Cursor Options")),
- _FFrame(Q_("sprayOptions|Random Options")),
- _distributionTable(),
- _gaussianTable(1, 5, false),
- _ETable(3,2,false),
- _FTable(2,5,false),
- _anchorBox(),
- _unifBox(),
- _gaussianBox(),
- _HBox(),
- _FHBox(),
- _BoutonBox(),
- _distributionBox(),
- _VBox(),
- _FVBox(),
- _ActionBox(),
- _anchorLabel(Q_("sprayOptions|Distribution:")),
- _unifLabel(Q_("sprayOptions|Uniform")),
- _gaussLabel(Q_("sprayOptions|Gaussian")),
- _Label(),
- _FLabel(),
- _unif(),
- _gauss(),
- _combo(),
- _tooltips()
-{
- Inkscape::Preferences *prefs = Inkscape::Preferences::get();
-
- //ComboBoxText
-
- _combo.append_text(Q_("sprayOptions|Uniform"));
- _combo.append_text(Q_("sprayOptions|Gaussian"));
-
- _combo.set_active(prefs->getInt("/tools/spray/distribution", 1));
- _combo.signal_changed().connect(sigc::mem_fun(*this, &SprayOptionClass::combo_action));
-
- _anchorBox.pack_start(_anchorLabel);
- _anchorBox.pack_start(_combo);
-
- _gaussianBox.pack_start(_anchorBox);
-
-
- _distributionBox.pack_start(_gaussianBox);
- _distributionFrame.add(_distributionBox);
-
-
- //Hbox Random
- addFButton(Q_("sprayOptions|Scale:") ,_("Apply a scale factor"), 0, 0, "/tools/spray/scale_min","/tools/spray/scale_max");
- addFButton(Q_("sprayOptions|Rotation:") ,_("Apply rotation"), 1, 0, "/tools/spray/rot_min","/tools/spray/rot_max");
- _FHBox.pack_start(_FLabel);
- _FHBox.pack_start(_FTable);
-
- //Implementation dans la Vbox Cursor
- _FVBox.pack_start(_FHBox);
- _FFrame.add(_FVBox);
-
- //Hbox Cursor
- addEButton(Q_("sprayOptions|Ratio:") ,_("Eccentricity of the ellipse"), 0, 0, 0, 1,"/tools/spray/ratio");
- addEButton(Q_("sprayOptions|Angle:") ,_("Angle of the ellipse"), 1, 0, 0, 5,"/tools/spray/tilt");
- addEButton(Q_("sprayOptions|Width:") ,_("Size of the ellipse"), 2, 0, 0, 1,"/tools/spray/width");
- _HBox.pack_start(_Label);
- _HBox.pack_start(_ETable);
-
- //Implementation dans la Vbox Cursor
- _VBox.pack_start(_HBox);
- _Frame.add(_VBox);
-
- Gtk::Box *contents = _getContents();
- contents->set_spacing(4);
-
-
-
-
-
-
- // Crée dans l'ordre suivant les différentes Frames (cadres de réglages)
-
- contents->pack_start(_distributionFrame, true, true);
- contents->pack_start(_FFrame, true, true);
- contents->pack_start(_Frame, true, true);
-
-
-
- // Connect to the global selection change, to invalidate cached randomize_bbox
- g_signal_connect (G_OBJECT (INKSCAPE), "change_selection", G_CALLBACK (on_selection_changed), this);
- randomize_bbox = Geom::OptRect();
-
- show_all_children();
-
-
-
-}
-
-SprayOptionClass::~SprayOptionClass()
-{
- sp_signal_disconnect_by_data (G_OBJECT (INKSCAPE), this);
-
- for (std::list<Action *>::iterator it = _actionList.begin();
- it != _actionList.end();
- it ++)
- delete *it;
-}
-
-
-
-
-
-
-
-//Fonctions qui lient la demande d'ajout d'une interface graphique à l'action correspondante
-
-void SprayOptionClass::addEButton(const Glib::ustring &id,
- const Glib::ustring &tiptext,
- guint row, guint column,
- guint min, guint max,
- Glib::ustring const &pref_path)
-{
- _actionList.push_back( new ActionE(id, tiptext,row, column,*this,min ,max, pref_path ));
-}
-
-void SprayOptionClass::addFButton(const Glib::ustring &id,
- const Glib::ustring &tiptext,
- guint row, guint column,
- Glib::ustring const &pref1_path,
- Glib::ustring const &pref2_path)
-{
- _actionList.push_back( new ActionF(id, tiptext,row, column,*this,pref1_path, pref2_path ));
-}
-
-
-
-
-
-SprayOptionClass &SprayOptionClass::get_SprayOptionClass()
-{
- return *this;
-}
-
-} // namespace Dialog
-} // namespace UI
-} // namespace Inkscape
-
-/*
- Local Variables:
- mode:c++
- c-file-style:"stroustrup"
- c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
- indent-tabs-mode:nil
- fill-column:99
- End:
-*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
diff --git a/src/ui/dialog/spray-option.h b/src/ui/dialog/spray-option.h
+++ /dev/null
@@ -1,145 +0,0 @@
-
-/*Julien LERAY (julien.leray@ecl2010.ec-lyon.fr), interface for the spray tool*/
-
-#ifndef INKSCAPE_UI_DIALOG_SPRAY_OPTION_H
-#define INKSCAPE_UI_DIALOG_SPRAY_OPTION_H
-
-#include <gtkmm/notebook.h>
-#include <glibmm/i18n.h>
-
-#include <list>
-#include <gtkmm/frame.h>
-#include <gtkmm/tooltips.h>
-#include <gtkmm/comboboxtext.h>
-#include <gtkmm/table.h>
-#include <gtkmm/buttonbox.h>
-#include <gtkmm/label.h>
-#include "libnr/nr-dim2.h"
-#include "libnr/nr-rect.h"
-
-
-#include "ui/widget/panel.h"
-#include "ui/widget/notebook-page.h"
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <gtkmm/spinbutton.h>
-#include "desktop-handles.h"
-#include "unclump.h"
-#include "document.h"
-#include "enums.h"
-#include "graphlayout/graphlayout.h"
-#include "inkscape.h"
-#include "macros.h"
-#include "node-context.h"
-#include "preferences.h"
-#include "removeoverlap/removeoverlap.h"
-#include "selection.h"
-#include "shape-editor.h"
-#include "sp-flowtext.h"
-#include "sp-item-transform.h"
-#include "sp-text.h"
-#include "text-editing.h"
-#include "tools-switch.h"
-#include "ui/icon-names.h"
-#include "util/glib-list-iterators.h"
-#include "verbs.h"
-#include "widgets/icon.h"
-
-#include "spray-context.h"
-#include "verbs.h"
-
-#include <iostream>
-using namespace std;
-
-using namespace Inkscape::UI::Widget;
-
-class SPItem;
-
-
-namespace Inkscape {
-namespace UI {
-namespace Dialog {
-
-class Action;
-
-class SprayOptionClass : public Widget::Panel {
-
-private:
-
- SprayOptionClass(SprayOptionClass const &d);
- SprayOptionClass& operator=(SprayOptionClass const &d);
-
-public:
- SprayOptionClass();
- virtual ~SprayOptionClass();
- void test() { cout<<"appel de test !!"<<endl; }
- static SprayOptionClass &getInstance() { return *new SprayOptionClass(); }
-
-
- Gtk::Table &_Table(){return _ETable;}
- Gtk::Table &F_Table(){return _FTable;}
- Gtk::Tooltips &tooltips(){return _tooltips;}
- void action();
- void combo_action();
- Geom::OptRect randomize_bbox;
-
- SprayOptionClass &get_SprayOptionClass();
-
-protected:
-
- void addGaussianButton(guint row, guint col);
- void addEButton(const Glib::ustring &id, const Glib::ustring &tiptext, guint row, guint column,
- guint min, guint max, const Glib::ustring &pref_path);
- void addFButton(const Glib::ustring &id, const Glib::ustring &tiptext, guint row, guint column,
- const Glib::ustring &pref1_path, const Glib::ustring &pref2_path);
-
- std::list<Action *> _actionList;
- Gtk::Frame _distributionFrame;
- Gtk::Frame _Frame;
- Gtk::Frame _FFrame;
- Gtk::Table _distributionTable;
- Gtk::Table _gaussianTable;
- Gtk::Table _ETable;
- Gtk::Table _FTable;
- Gtk::HBox _anchorBox;
- Gtk::HBox _unifBox;
- Gtk::HBox _gaussianBox;
- Gtk::HBox _HBox;
- Gtk::HBox _FHBox;
- Gtk::HBox _BoutonBox;
- Gtk::VBox _distributionBox;
- Gtk::VBox _VBox;
- Gtk::VBox _FVBox;
- Gtk::VBox _ActionBox;
- Gtk::Label _anchorLabel;
- Gtk::Label _unifLabel;
- Gtk::Label _gaussLabel;
- Gtk::Label _Label;
- Gtk::Label _FLabel;
- Gtk::CheckButton _unif;
- Gtk::CheckButton _gauss;
- Gtk::ComboBoxText _combo;
- Gtk::Tooltips _tooltips;
-};
-
-
-} // namespace Dialog
-} // namespace UI
-} // namespace Inkscape
-
-#endif // INKSCAPE_UI_DIALOG_ALIGN_AND_DISTRIBUTE_H
-
-/*
- Local Variables:
- mode:c++
- c-file-style:"stroustrup"
- c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
- indent-tabs-mode:nil
- fill-column:99
- End:
-*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
-
index d34b18771a9bc750e5ec75d410119485d00fd7e2..770a9bf87c076472040c5f5c39a0400e106d4f12 100644 (file)
_dlg_mgr.showDialog("AlignAndDistribute");
}
-void
-EditWidget::onDialogSprayOptionClass()
-{
- _dlg_mgr.showDialog("SprayOptionClass");
-}
-
void
EditWidget::onDialogDocumentProperties()
{
index 452641e8023b2d5d27a8e901316a7912debbacf6..2bb7083054f817c459662620a6338d42f0b32dc8 100644 (file)
void onDialogAbout();
void onDialogAlignAndDistribute();
- void onDialogSprayOptionClass();
void onDialogInkscapePreferences();
void onDialogDialog();
void onDialogDocumentProperties();
index f4913c01930a8dbb3727a06c1ee8e6fdfd527995..e0a489f2d7f34bd602f5887b077685b9baceee57 100644 (file)
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
@@ -4561,6 +4561,7 @@ static void sp_spray_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainAction
1, 100, 1.0, 10.0,
labels, values, G_N_ELEMENTS(labels),
sp_spray_population_value_changed, 1, 0 );
+ ege_adjustment_action_set_appearance( eact, TOOLBAR_SLIDER_HINT );
gtk_action_group_add_action( mainActions, GTK_ACTION(eact) );
gtk_action_set_sensitive( GTK_ACTION(eact), TRUE );
g_object_set_data( holder, "spray_population", eact );
@@ -4590,6 +4591,7 @@ static void sp_spray_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainAction
0, 100, 1.0, 10.0,
labels, values, G_N_ELEMENTS(labels),
sp_spray_rotation_value_changed, 1, 0 );
+ ege_adjustment_action_set_appearance( eact, TOOLBAR_SLIDER_HINT );
gtk_action_group_add_action( mainActions, GTK_ACTION(eact) );
gtk_action_set_sensitive( GTK_ACTION(eact), TRUE );
g_object_set_data( holder, "spray_rotation", eact );
@@ -4607,6 +4609,7 @@ static void sp_spray_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainAction
0, 100, 1.0, 10.0,
labels, values, G_N_ELEMENTS(labels),
sp_spray_scale_value_changed, 1, 0 );
+ ege_adjustment_action_set_appearance( eact, TOOLBAR_SLIDER_HINT );
gtk_action_group_add_action( mainActions, GTK_ACTION(eact) );
gtk_action_set_sensitive( GTK_ACTION(eact), TRUE );
g_object_set_data( holder, "spray_scale", eact );