paintbucket-toolbar.cpp revision a4142717644b885998f4de2b27be4e8648315dec
/**
* @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 "paintbucket-toolbar.h"
#include "desktop.h"
#include "document-undo.h"
#include "ege-adjustment-action.h"
#include "ege-select-one-action.h"
#include "preferences.h"
#include "toolbox.h"
#include "ui/icon-names.h"
#include "ui/tools/flood-tool.h"
#include "ui/uxmanager.h"
#include "ui/widget/unit-tracker.h"
using Inkscape::DocumentUndo;
//#########################
//## Paintbucket ##
//#########################
{
//flood_channels_set_channels( channels );
}
{
}
{
}
{
// 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;
{
for ( items = Inkscape::UI::Tools::flood_channels_dropdown_items_list(); items ; items = g_list_next(items) )
{
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,
}
// 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 */
{
for ( items = Inkscape::UI::Tools::flood_autogap_dropdown_items_list(); items ; items = g_list_next(items) )
{
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)"),
INKSCAPE_ICON("edit-clear"));
}
}
/*
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 :