Inkscape
Vector Graphics Editor
|
Simplified management of enumerations in the UI as combobox. More...
#include <combo-enums.h>
Classes | |
struct | Data |
Public Member Functions | |
ComboBoxEnum (E const default_value, const Util::EnumDataConverter< E > &c, SPAttr const a=SPAttr::INVALID, bool const sort=true, const char *translation_context=nullptr) | |
ComboBoxEnum (Util::EnumDataConverter< E > const &c, SPAttr const a=SPAttr::INVALID, bool const sort=true, const char *const translation_context=nullptr) | |
void | set_active (unsigned int pos) |
unsigned int | get_active () const |
Glib::ustring | get_as_attribute () const final |
void | set_from_attribute (SPObject *const o) final |
std::optional< E > | get_selected_id () const |
void | set_active_by_id (E id) |
void | set_active_by_key (const Glib::ustring &key) |
![]() | |
DropDownList () | |
DropDownList (BaseObjectType *cobject, const Glib::RefPtr< Gtk::Builder > &builder) | |
unsigned int | append (const Glib::ustring &item) |
Glib::ustring | get_string (unsigned int position) const |
unsigned int | get_item_count () const |
void | remove_all () |
Glib::SignalProxyProperty | signal_changed () |
void | enable_search (bool enable=true) |
void | set_row_separator_func (std::function< bool(unsigned int)> callback) |
![]() | |
AttrWidget (const SPAttr a, unsigned int value) | |
AttrWidget (const SPAttr a, double value) | |
AttrWidget (const SPAttr a, bool value) | |
AttrWidget (const SPAttr a, char *value) | |
AttrWidget (const SPAttr a) | |
virtual | ~AttrWidget ()=default |
SPAttr | get_attribute () const |
sigc::signal< void()> & | signal_attr_changed () |
Public Attributes | |
bool | setProgrammatically = false |
Private Member Functions | |
ComboBoxEnum (Util::EnumDataConverter< E > const &c, SPAttr const a, bool const sort, const char *const translation_context, unsigned const default_value) | |
int | get_active_by_id (E const id) const |
Private Attributes | |
std::vector< Data > | _enums |
const Util::EnumDataConverter< E > & | _converter |
Additional Inherited Members | |
![]() | |
DefaultValueHolder * | get_default () |
const gchar * | attribute_value (SPObject *o) const |
Simplified management of enumerations in the UI as combobox.
Definition at line 34 of file combo-enums.h.
|
inline |
Definition at line 39 of file combo-enums.h.
References Inkscape::UI::Widget::ComboBoxEnum< E >::set_active_by_id().
|
inline |
Definition at line 47 of file combo-enums.h.
References Inkscape::UI::Widget::ComboBoxEnum< E >::set_active().
|
inlineprivate |
Definition at line 72 of file combo-enums.h.
References Inkscape::UI::Widget::ComboBoxEnum< E >::_converter, Inkscape::UI::Widget::ComboBoxEnum< E >::_enums, Inkscape::UI::Widget::DropDownList::append(), data, Inkscape::UI::end, Inkscape::UI::Widget::ComboBoxEnum< E >::Data::id, Inkscape::UI::Widget::DropDownList::set_row_separator_func(), and Inkscape::UI::Widget::AttrWidget::signal_attr_changed().
|
inline |
Definition at line 59 of file combo-enums.h.
|
inlineprivate |
Definition at line 157 of file combo-enums.h.
References Inkscape::UI::Widget::ComboBoxEnum< E >::_enums, and Inkscape::UI::end.
Referenced by Inkscape::UI::Widget::ComboBoxEnum< E >::set_active_by_id().
|
inlinefinalvirtual |
Implements Inkscape::UI::Widget::AttrWidget.
Definition at line 113 of file combo-enums.h.
References Inkscape::UI::Widget::ComboBoxEnum< E >::_enums.
|
inline |
Definition at line 133 of file combo-enums.h.
References Inkscape::UI::Widget::ComboBoxEnum< E >::_enums.
Referenced by Inkscape::UI::Dialog::FilterEffectsDialog::add_primitive(), and Inkscape::UI::Widget::SimpleFilterModifier::get_blend_mode().
|
inline |
Definition at line 55 of file combo-enums.h.
Referenced by Inkscape::UI::Widget::ComboBoxEnum< E >::ComboBoxEnum(), Inkscape::UI::Widget::ComboBoxEnum< E >::set_active_by_id(), and Inkscape::UI::Widget::ComboBoxEnum< E >::set_from_attribute().
|
inline |
Definition at line 141 of file combo-enums.h.
References Inkscape::UI::Widget::ComboBoxEnum< E >::get_active_by_id(), index, Inkscape::UI::Widget::ComboBoxEnum< E >::set_active(), and Inkscape::UI::Widget::ComboBoxEnum< E >::setProgrammatically.
Referenced by Inkscape::UI::Widget::ComboBoxEnum< E >::ComboBoxEnum(), Inkscape::UI::Widget::ComboBoxEnum< E >::set_active_by_key(), Inkscape::UI::Widget::SimpleFilterModifier::set_blend_mode(), and Inkscape::UI::Widget::ComboBoxEnum< E >::set_from_attribute().
|
inline |
Definition at line 149 of file combo-enums.h.
References Inkscape::UI::Widget::ComboBoxEnum< E >::_converter, key, Inkscape::UI::Widget::ComboBoxEnum< E >::set_active_by_id(), and Inkscape::UI::Widget::ComboBoxEnum< E >::setProgrammatically.
|
inlinefinalvirtual |
Implements Inkscape::UI::Widget::AttrWidget.
Definition at line 122 of file combo-enums.h.
References Inkscape::UI::Widget::ComboBoxEnum< E >::_converter, Inkscape::UI::Widget::AttrWidget::attribute_value(), Inkscape::UI::Widget::AttrWidget::get_default(), Inkscape::UI::Widget::ComboBoxEnum< E >::set_active(), Inkscape::UI::Widget::ComboBoxEnum< E >::set_active_by_id(), and Inkscape::UI::Widget::ComboBoxEnum< E >::setProgrammatically.
|
private |
Definition at line 163 of file combo-enums.h.
Referenced by Inkscape::UI::Widget::ComboBoxEnum< E >::ComboBoxEnum(), Inkscape::UI::Widget::ComboBoxEnum< E >::set_active_by_key(), and Inkscape::UI::Widget::ComboBoxEnum< E >::set_from_attribute().
|
private |
Definition at line 70 of file combo-enums.h.
Referenced by Inkscape::UI::Widget::ComboBoxEnum< E >::ComboBoxEnum(), Inkscape::UI::Widget::ComboBoxEnum< E >::get_active_by_id(), Inkscape::UI::Widget::ComboBoxEnum< E >::get_as_attribute(), and Inkscape::UI::Widget::ComboBoxEnum< E >::get_selected_id().
bool Inkscape::UI::Widget::ComboBoxEnum< E >::setProgrammatically = false |
Definition at line 154 of file combo-enums.h.
Referenced by Inkscape::UI::Widget::ComboBoxEnum< E >::set_active_by_id(), Inkscape::UI::Widget::ComboBoxEnum< E >::set_active_by_key(), and Inkscape::UI::Widget::ComboBoxEnum< E >::set_from_attribute().