arc-toolbar.cpp revision aa9235c966804d9b8f8daa083a2d123d9d47d2bb
/**
* @file
* Arc 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 "arc-toolbar.h"
#include "desktop.h"
#include "document-undo.h"
#include "widgets/ege-adjustment-action.h"
#include "widgets/ege-output-action.h"
#include "widgets/ege-select-one-action.h"
#include "widgets/ink-action.h"
#include "mod360.h"
#include "preferences.h"
#include "selection.h"
#include "sp-ellipse.h"
#include "toolbox.h"
#include "ui/icon-names.h"
#include "ui/uxmanager.h"
#include "ui/tools/arc-tool.h"
#include "verbs.h"
#include "widgets/spinbutton-events.h"
#include "xml/node-event-vector.h"
using Inkscape::DocumentUndo;
//########################
//## Circle / Arc ##
//########################
{
}
} else {
}
}
static void
sp_arctb_startend_value_changed(GtkAdjustment *adj, GObject *tbl, gchar const *value_name, gchar const *other_name)
{
}
// quit if run by the attr_changed listener
return;
}
// in turn, prevent listener from responding
bool modmade = false;
if (SP_IS_GENERICELLIPSE(item)) {
} else {
}
modmade = true;
}
}
if (modmade) {
}
}
{
}
{
}
{
}
// quit if run by the attr_changed listener
return;
}
// in turn, prevent listener from responding
bool modmade = false;
if ( ege_select_one_action_get_active(act) != 0 ) {
if (SP_IS_GENERICELLIPSE(item)) {
item->updateRepr();
modmade = true;
}
}
} else {
if (SP_IS_GENERICELLIPSE(item)) {
item->updateRepr();
modmade = true;
}
}
}
if (modmade) {
}
}
{
}
{
// quit if run by the _changed callbacks
return;
}
// in turn, prevent callbacks from responding
if (openstr) {
} else {
}
}
NULL, /* child_added */
NULL, /* child_removed */
NULL, /* content_changed */
NULL /* order_changed */
};
{
int n_selected = 0;
if (SP_IS_GENERICELLIPSE(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>"));
}
}
static void arc_toolbox_check_ec(SPDesktop* dt, Inkscape::UI::Tools::ToolBase* ec, GObject* holder);
{
EgeAdjustmentAction* eact = 0;
{
}
/* Start */
{
_("Start"), _("Start:"),
_("The angle (in degrees) from the horizontal to the arc's start point"),
-360.0, 360.0, 1.0, 10.0,
0, 0, 0,
}
/* End */
{
_("End"), _("End:"),
_("The angle (in degrees) from the horizontal to the arc's end point"),
-360.0, 360.0, 1.0, 10.0,
0, 0, 0,
}
/* Segments / Pie checkbox */
{
0, _("Closed arc"),
1, _("Switch to segment (closed shape with two radii)"),
-1 );
0, _("Open Arc"),
1, _("Switch to arc (unclosed shape)"),
-1 );
EgeSelectOneAction* act = ege_select_one_action_new( "ArcOpenAction", (""), (""), NULL, GTK_TREE_MODEL(model) );
g_signal_connect_after( G_OBJECT(act), "changed", G_CALLBACK(sp_arctb_open_state_changed), holder );
}
/* Make Whole */
{
_("Make whole"),
_("Make the shape a whole ellipse, not arc or segment"),
INKSCAPE_ICON("draw-ellipse-whole"),
}
// sensitivize make whole and open checkbox
{
}
}
static void arc_toolbox_check_ec(SPDesktop* desktop, Inkscape::UI::Tools::ToolBase* ec, GObject* holder)
{
if (SP_IS_ARC_CONTEXT(ec)) {
changed = desktop->getSelection()->connectChanged(sigc::bind(sigc::ptr_fun(sp_arc_toolbox_selection_changed), holder));
} else {
if (changed)
}
}
/*
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 :