attr-widget.h revision d754d035663e44cb000f1f2b41a2fe8bfcfebd6d
/**
* \brief Very basic interface for classes that control attributes
*
* Authors:
* Nicholas Bishop <nicholasbishop@gmail.com>
* Rodrigo Kumpera <kumpera@gmail.com>
*
* Copyright (C) 2007 Authors
*
* Released under GNU GPL. Read the file 'COPYING' for more information.
*/
#ifndef INKSCAPE_UI_WIDGET_ATTR_WIDGET_H
#define INKSCAPE_UI_WIDGET_ATTR_WIDGET_H
#include "attributes.h"
#include "sp-object.h"
#include <gtkmm/tooltips.h>
enum DefaultValueType
{
};
{
union {
double d_val;
bool b_val;
unsigned int uint_val;
} value;
//FIXME remove copy ctor and assignment operator as private to avoid double free of the vector
DefaultValueHolder () {
}
DefaultValueHolder (double d) {
}
}
DefaultValueHolder (bool d) {
}
DefaultValueHolder (unsigned int ui) {
}
~DefaultValueHolder() {
if (type == T_VECT_DOUBLE)
}
unsigned int as_uint() {
}
bool as_bool() {
}
double as_double() {
}
}
};
{
: _attr(a),
{}
: _attr(a),
{}
: _attr(a),
{}
AttrWidget(const SPAttributeEnum a)
: _attr(a),
_default()
{}
{}
SPAttributeEnum get_attribute() const
{
return _attr;
}
{
return _signal;
}
{
if(name && o) {
return val;
}
return 0;
}
const SPAttributeEnum _attr;
};
}
}
}
#endif
/*
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:encoding=utf-8:textwidth=99 :