color-entry.cpp revision ace40d4908b70a23527e1e1e2cf44cb390f06340
/** @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
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#endif
#include <iomanip>
#include "color-entry.h"
namespace Inkscape {
namespace UI {
namespace Widget {
, _updating(false)
{
_color_changed_connection = color.signal_changed.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() {
}
void ColorEntry::on_changed() {
if (_updating) {
return;
}
bool changed = false;
//Coerce the value format to eight hex digits
changed = true;
// it was a standard RGB hex
}
}
if (len < 8) {
}
_updating = true;
if (changed) {
}
_updating = false;
}
}
void ColorEntry::_onColorChanged() {
if (_updating) {
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 :