registered-enums.h revision fd4b29a5cdef220804dfed85fec8acb5daceec5f
/**
* \brief Simplified management of enumerations in the UI as combobox.
*
* Authors:
* Johan Engelen <j.b.c.engelen@ewi.utwente.nl>
*
* Copyright (C) 2007 Authors
*
* Released under GNU GPL. Read the file 'COPYING' for more information.
*/
#include "ui/widget/combo-enums.h"
#include "ui/widget/registered-widget.h"
{
RegisteredEnum() {
}
~RegisteredEnum() {
if (labelled)
}
const Util::EnumDataConverter<E>& c,
{
_changed_connection = combobox()->signal_changed().connect (sigc::mem_fun (*this, &RegisteredEnum::on_changed));
}
{
}
void set_active_by_id (E id) {
};
}
return combobox()->get_active_data();
}
ComboBoxEnum<E> * combobox() {
if (labelled) {
return labelled->getCombobox();
} else {
return NULL;
}
}
LabelledComboBoxEnum<E> * labelled;
void on_changed() {
if (combobox()->setProgrammatically) {
combobox()->setProgrammatically = false;
return;
}
if (_wr->isUpdating())
return;
_wr->setUpdating (true);
if (data) {
}
_wr->setUpdating (false);
}
};
}
}
}
#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 :