mesh-toolbar.cpp revision 214a2dca4418a9937d7142e42ed91fdfdb86ae16
1N/A#ifdef HAVE_CONFIG_H
1N/A#include "ui/widget/color-preview.h"
1N/A#include "mesh-toolbar.h"
1N/A#include "widgets/widget-sizes.h"
1N/A#include "widgets/spw-utilities.h"
1N/A#include "widgets/spinbutton-events.h"
1N/A#include "widgets/gradient-vector.h"
1N/A#include "widgets/gradient-image.h"
1N/A#include "preferences.h"
1N/A#include "document-private.h"
1N/A#include "document-undo.h"
1N/A#include "ui/tools/gradient-tool.h"
1N/A#include "ui/tools/mesh-tool.h"
1N/A#include "gradient-drag.h"
1N/A#include "sp-mesh-gradient.h"
1N/A#include "gradient-chemistry.h"
1N/A#include "gradient-selector.h"
1N/A#include "selection.h"
1N/A#include "ui/icon-names.h"
1N/A#include "widgets/ege-adjustment-action.h"
1N/A#include "widgets/ege-output-action.h"
1N/A#include "widgets/ege-select-one-action.h"
1N/A#include "widgets/ink-action.h"
1N/A#include "widgets/ink-comboboxentry-action.h"
1N/A#include "svg/css-ostringstream.h"
1N/A#include "svg/svg-color.h"
1N/A#include "desktop-style.h"
1N/A bool &ms_selected_multi,
1N/A bool &ms_smooth_multi )
1N/A if (ms_selected) {
1N/A ms_selected_multi = true;
1N/A ms_smooth_multi = true;
1N/A if (ms_selected) {
1N/A ms_selected_multi = true;
1N/A ms_smooth_multi = true;
1N/A bool ms_selected_multi = false;
1N/A bool ms_smooth_multi = false;
1N/A EgeSelectOneAction* smooth = (EgeSelectOneAction *) g_object_get_data(G_OBJECT(widget), "mesh_select_smooth_action");
1N/A if (ms_selected) {
1N/Astatic void ms_tb_selection_modified(Inkscape::Selection *selection, guint /*flags*/, gpointer data)
1N/A gint typemode = ege_select_one_action_get_active( act ) == 0 ? SP_GRADIENT_MESH_TYPE_NORMAL : SP_GRADIENT_MESH_TYPE_CONICAL;
1N/A Inkscape::PaintTarget fsmode = (ege_select_one_action_get_active( act ) == 0) ? Inkscape::FOR_FILL : Inkscape::FOR_STROKE;
1N/Astatic void mesh_toolbox_watch_ec(SPDesktop* dt, Inkscape::UI::Tools::ToolBase* ec, GObject* holder);
1N/A 0, _("conical"), 1, _("Create conical gradient"), 2, INKSCAPE_ICON("paint-gradient-conical"), -1 );
1N/A EgeSelectOneAction* act = ege_select_one_action_new( "MeshNewTypeAction", (""), (""), NULL, GTK_TREE_MODEL(model) );
1N/A gint mode = prefs->getInt("/tools/mesh/mesh_type", SP_GRADIENT_MESH_TYPE_NORMAL) != SP_GRADIENT_MESH_TYPE_NORMAL;
1N/A 0, _("stroke"), 1, _("Create gradient in the stroke"), 2, INKSCAPE_ICON("object-stroke"), -1 );
1N/A EgeSelectOneAction* act = ege_select_one_action_new( "MeshNewFillStrokeAction", (""), (""), NULL, GTK_TREE_MODEL(model) );
1N/A g_signal_connect_after( G_OBJECT(act), "changed", G_CALLBACK(ms_new_fillstroke_changed), holder );
1N/Astatic void mesh_toolbox_watch_ec(SPDesktop* desktop, Inkscape::UI::Tools::ToolBase* ec, GObject* holder)
1N/A c_selection_changed = selection->connectChanged(sigc::bind(sigc::ptr_fun(&ms_tb_selection_changed), holder));
1N/A c_selection_modified = selection->connectModified(sigc::bind(sigc::ptr_fun(&ms_tb_selection_modified), holder));
1N/A c_subselection_changed = desktop->connectToolSubselectionChanged(sigc::bind(sigc::ptr_fun(&ms_drag_selection_changed), holder));
1N/A c_defs_release = document->getDefs()->connectRelease(sigc::bind<1>(sigc::ptr_fun(&ms_defs_release), holder));
1N/A c_defs_modified = document->getDefs()->connectModified(sigc::bind<2>(sigc::ptr_fun(&ms_defs_modified), holder));
1N/A if (c_selection_changed)
1N/A if (c_selection_modified)
1N/A if (c_defs_release)
1N/A if (c_defs_modified)