spiral-toolbar.cpp revision 02db7fad736ff0812658ef9c5f82ac2e64ffdefc
/**
* @file
* Spiral aux toolbar
*/
/* Authors:
* MenTaLguY <mental@rydia.net>
* Lauris Kaplinski <lauris@kaplinski.com>
* bulia byak <buliabyak@users.sf.net>
* Frank Felfe <innerspace@iname.com>
* John Cliff <simarilius@yahoo.com>
* David Turner <novalis@gnu.org>
* Josh Andler <scislac@scislac.com>
* Jon A. Cruz <jon@joncruz.org>
* Maximilian Albert <maximilian.albert@gmail.com>
* Tavmjong Bah <tavmjong@free.fr>
* Abhishek Sharma
* Kris De Gussem <Kris.DeGussem@gmail.com>
*
* Copyright (C) 2004 David Turner
* Copyright (C) 2003 MenTaLguY
* Copyright (C) 1999-2011 authors
* Copyright (C) 2001-2002 Ximian, Inc.
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "ui/widget/spinbutton.h"
#include "toolbox.h"
#include "spiral-toolbar.h"
#include "../desktop.h"
#include "../desktop-handles.h"
#include "document-undo.h"
#include "../verbs.h"
#include "../inkscape.h"
#include "../selection-chemistry.h"
#include "../selection.h"
#include "../ege-adjustment-action.h"
#include "../ege-output-action.h"
#include "../ege-select-one-action.h"
#include "../ink-action.h"
#include "../ink-comboboxentry-action.h"
#include "../widgets/spinbutton-events.h"
#include "../widgets/spw-utilities.h"
#include "../widgets/widget-sizes.h"
#include "../xml/node-event-vector.h"
#include "ui/uxmanager.h"
#include "../ui/icon-names.h"
#include "ui/tools/pen-tool.h"
#include "../sp-spiral.h"
using Inkscape::DocumentUndo;
//########################
//## Spiral ##
//########################
static void sp_spl_tb_value_changed(GtkAdjustment *adj, GObject *tbl, Glib::ustring const &value_name)
{
}
// quit if run by the attr_changed listener
return;
}
// in turn, prevent listener from responding
bool modmade = false;
{
if (SP_IS_SPIRAL(item)) {
item->updateRepr();
modmade = true;
}
}
if (modmade) {
_("Change spiral"));
}
}
{
}
{
}
{
}
{
// fixme: make settable
}
gchar const * /*name*/,
gchar const * /*old_value*/,
gchar const * /*new_value*/,
bool /*is_interactive*/,
{
// quit if run by the _changed callbacks
return;
}
// in turn, prevent callbacks from responding
double revolution = 3.0;
double expansion = 1.0;
double t0 = 0.0;
}
NULL, /* child_added */
NULL, /* child_removed */
NULL, /* content_changed */
NULL /* order_changed */
};
{
int n_selected = 0;
{
if (SP_IS_SPIRAL(item)) {
n_selected++;
}
}
if (n_selected == 0) {
} else if (n_selected == 1) {
if (repr) {
}
} else {
// FIXME: implement averaging of all parameters for multiple selected
//gtk_label_set_markup(GTK_LABEL(l), _("<b>Average:</b>"));
}
}
{
EgeAdjustmentAction* eact = 0;
{
}
/* Revolution */
{
_("Number of turns"), _("Turns:"), _("Number of revolutions"),
"/tools/shapes/spiral/revolution", 3.0,
0.01, 1024.0, 0.1, 1.0,
}
/* Expansion */
{
gchar const* labels[] = {_("circle"), _("edge is much denser"), _("edge is denser"), _("even"), _("center is denser"), _("center is much denser"), 0};
0.0, 1000.0, 0.01, 1.0,
}
/* T0 */
{
_("Inner radius"), _("Inner radius:"), _("Radius of the innermost revolution (relative to the spiral size)"),
0.0, 0.999, 0.01, 1.0,
}
/* Reset */
{
_("Defaults"),
_("Reset shape parameters to defaults (use Inkscape Preferences > Tools to change defaults)"),
INKSCAPE_ICON("edit-clear"),
}
sp_desktop_selection(desktop)->connectChanged(sigc::bind(sigc::ptr_fun(sp_spiral_toolbox_selection_changed), holder))
);
}
/*
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:fileencoding=utf-8:textwidth=99 :