rect-toolbar.cpp revision 3fad3df12ae2d320c12871d471eb0faf5f187cbd
/**
* @file
* Rect 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 "rect-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 "../helper/unit-menu.h"
#include "../helper/unit-tracker.h"
#include "../pen-context.h"
#include "../sp-namedview.h"
#include "../sp-rect.h"
using Inkscape::UnitTracker;
using Inkscape::DocumentUndo;
//########################
//## Rect ##
//########################
{
if (gtk_adjustment_get_value(adj1) == 0 && gtk_adjustment_get_value(adj2) == 0 && g_object_get_data(tbl, "single")) { // only for a single selected rect (for now)
} else {
}
}
{
}
// quit if run by the attr_changed listener
return;
}
// in turn, prevent listener from responding
bool modmade = false;
if (gtk_adjustment_get_value(adj) != 0) {
} else {
}
modmade = true;
}
}
if (modmade) {
_("Change rectangle"));
}
}
{
}
{
}
{
}
{
}
{
GtkAdjustment *adj = 0;
// this is necessary if the previous value was 0, but we still need to run the callback to change all selected objects
}
{
// quit if run by the _changed callbacks
return;
}
// in turn, prevent callbacks from responding
{
}
{
}
{
}
{
}
}
}
NULL, /* child_added */
NULL, /* child_removed */
NULL, /* content_changed */
NULL /* order_changed */
};
/**
* \param selection should not be NULL.
*/
{
int n_selected = 0;
}
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;
{
}
//tracker->addUnit( SP_UNIT_PERCENT, 0 );
/* W */
{
_("Width"), _("W:"), _("Width of rectangle"),
}
/* H */
{
_("Height"), _("H:"), _("Height of rectangle"),
}
/* rx */
{
_("Horizontal radius"), _("Rx:"), _("Horizontal radius of rounded corners"),
}
/* ry */
{
_("Vertical radius"), _("Ry:"), _("Vertical radius of rounded corners"),
}
// add the units menu
{
}
/* Reset */
{
_("Not rounded"),
_("Make corners sharp"),
INKSCAPE_ICON("rectangle-make-corners-sharp"),
}
sp_desktop_selection(desktop)->connectChanged(sigc::bind(sigc::ptr_fun(sp_rect_toolbox_selection_changed), (GObject *)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 :