paintbucket-toolbar.cpp revision 3dcfa632213c32e2ccb126ec4e0d29e0172ea2b3
/**
* @file
* Paint bucket 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 "paintbucket-toolbar.h"
#include "../desktop.h"
#include "../desktop-handles.h"
#include "document-undo.h"
#include "../verbs.h"
#include "../inkscape.h"
#include "../connection-pool.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/widget/unit-tracker.h"
#include "../pen-context.h"
#include "../sp-namedview.h"
#include "../flood-context.h"
using Inkscape::DocumentUndo;
//#########################
//## Paintbucket ##
//#########################
{
}
{
}
{
}
{
// Don't adjust the offset value because we're saving the
// unit and it'll be correctly handled on load.
}
{
// FIXME: make defaults settable via Inkscape Options
struct KeyValue {
char const *key;
double value;
} const key_values[] = {
{"threshold", 15},
{"offset", 0.0}
};
for (unsigned i = 0; i < G_N_ELEMENTS(key_values); ++i) {
if ( adj ) {
}
}
EgeSelectOneAction* channels_action = EGE_SELECT_ONE_ACTION( g_object_get_data (tbl, "channels_action" ) );
EgeSelectOneAction* autogap_action = EGE_SELECT_ONE_ACTION( g_object_get_data (tbl, "autogap_action" ) );
}
{
EgeAdjustmentAction* eact = 0;
{
{
count++;
}
g_list_free( items );
items = 0;
EgeSelectOneAction* act1 = ege_select_one_action_new( "ChannelsAction", _("Fill by"), (""), NULL, GTK_TREE_MODEL(model) );
}
// Spacing spinbox
{
"ThresholdAction",
_("Fill Threshold"), _("Threshold:"),
_("The maximum allowed difference between the clicked pixel and the neighboring pixels to be counted in the fill"),
"inkscape:paintbucket-threshold", 0, 100.0, 1.0, 10.0,
0, 0, 0,
paintbucket_threshold_changed, 1, 0 );
}
// Create the units menu.
if (!stored_unit.empty()) {
tracker->setActiveUnit(&u);
}
{
}
// Offset spinbox
{
"OffsetAction",
_("The amount to grow (positive) or shrink (negative) the created fill path"),
"inkscape:paintbucket-offset", -1e4, 1e4, 0.1, 0.5,
0, 0, 0,
}
/* Auto Gap */
{
{
count++;
}
g_list_free( items );
items = 0;
EgeSelectOneAction* act2 = ege_select_one_action_new( "AutoGapAction", _("Close gaps"), (""), NULL, GTK_TREE_MODEL(model) );
}
/* Reset */
{
_("Defaults"),
_("Reset paint bucket parameters to defaults (use Inkscape Preferences > Tools to change defaults)"),
}
}
/*
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 :