attr-widget.h revision 27cd20fac1bf623cddbe1cba2f35ed5767a90cd3
/**
* \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;
char* cptr_val;
} value;
//FIXME remove copy ctor and assignment operator as private to avoid double free of the vector
DefaultValueHolder () {
}
DefaultValueHolder (double d) {
}
}
DefaultValueHolder (char* c) {
}
DefaultValueHolder (bool d) {
}
DefaultValueHolder (unsigned int ui) {
}
~DefaultValueHolder() {
if (type == T_VECT_DOUBLE)
}
unsigned int as_uint() {
}
bool as_bool() {
}
double as_double() {
}
}
char* as_charptr() {
}
};
{
: _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 :