rect-toolbar.cpp revision 911c522a24e8ac54344f02666351562845904c73
/**
* @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 "rect-toolbar.h"
#include "desktop.h"
#include "document-undo.h"
#include "widgets/ege-adjustment-action.h"
#include "widgets/ege-output-action.h"
#include "widgets/ink-action.h"
#include "inkscape.h"
#include "preferences.h"
#include "selection.h"
#include "sp-namedview.h"
#include "sp-rect.h"
#include "toolbox.h"
#include "ui/icon-names.h"
#include "ui/tools/rect-tool.h"
#include "ui/uxmanager.h"
#include "ui/widget/unit-tracker.h"
#include "verbs.h"
#include "widgets/widget-sizes.h"
#include "xml/node-event-vector.h"
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>"));
}
}
static void rect_toolbox_watch_ec(SPDesktop* dt, Inkscape::UI::Tools::ToolBase* ec, GObject* holder);
{
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"),
}
}
static void rect_toolbox_watch_ec(SPDesktop* desktop, Inkscape::UI::Tools::ToolBase* ec, GObject* holder)
{
// use of dynamic_cast<> seems wrong here -- we just need to check the current tool
changed = sel->connectChanged(sigc::bind(sigc::ptr_fun(sp_rect_toolbox_selection_changed), holder));
// Synthesize an emission to trigger the update
} 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 :