/** @file
* Entry widget for typing color value in css form
*//*
* Authors:
* Tomasz Boczkowski <penginsbacon@gmail.com>
*
* Copyright (C) 2014 Authors
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include <glibmm.h>
#include <iomanip>
#include "color-entry.h"
namespace Inkscape {
namespace UI {
namespace Widget {
, _updating(false)
, _updatingrgba(false)
{
_color_changed_connection = color.signal_changed.connect(sigc::mem_fun(this, &ColorEntry::_onColorChanged));
_color_dragged_connection = color.signal_dragged.connect(sigc::mem_fun(this, &ColorEntry::_onColorChanged));
set_max_length(8);
set_width_chars(8);
set_tooltip_text(_("Hexadecimal RGBA value of the color"));
}
ColorEntry::~ColorEntry()
{
}
{
if (_updating) {
return;
}
if (_updatingrgba) {
return; // Typing text into entry box
}
bool changed = false;
// Coerce the value format to eight hex digits
changed = true;
// it was a standard RGB hex
}
}
if (len < 8) {
}
_updatingrgba = true;
if (changed) {
}
_updatingrgba = false;
}
}
{
if (_updatingrgba) {
return;
}
_updating = true;
_updating = false;
}
}
}
}
}
/*
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 :