|
Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
|
Item factory for column views. More...
#include <src/gui/backend/gtk_widgets/item_factory.h>
Public Types | |
| enum class | Type { Toggle , Text , Integer , Icon , IconAndText , Position , Color } |
| Item factory column type. More... | |
Public Member Functions | |
| ItemFactory (Type type, bool editable, std::string column_name) | |
| Creates a new item factory. | |
Static Public Member Functions | |
| static std::unique_ptr< ItemFactory > & | generate_and_append_column (GtkColumnView *column_view, std::vector< std::unique_ptr< ItemFactory > > &item_factories, Type type, bool editable, bool resizable, GtkSorter *sorter, std::string column_name) |
| Shorthand to generate and append a column to a column view. | |
Data Fields | |
| GtkListItemFactory * | list_item_factory_ = nullptr |
| An owned GtkListItemFactory. | |
| Type | type_ = Type::Text |
| bool | editable_ = false |
| bool | ellipsize_label_ = true |
| gulong | setup_id_ = 0 |
| gulong | bind_id_ = 0 |
| gulong | unbind_id_ = 0 |
| gulong | teardown_id_ = 0 |
| std::string | column_name_ |
| Column name, or empty if used for list views. | |
Item factory for column views.
The owner widget is expected to have a std::vector<ItemFactory> that holds an ItemFactory for each column. 1 column = 1 ItemFactory.
This can also be used on listviews (ie, only 1 ItemFactory would be needed).
Definition at line 28 of file item_factory.h.
|
strong |
Item factory column type.
| Enumerator | |
|---|---|
| Integer | Integer display. |
| Icon | Icon. |
| IconAndText | Composite type (eg, used in plugin browser). |
| Position | Position. |
| Color | Color. |
Definition at line 34 of file item_factory.h.
| ItemFactory::ItemFactory | ( | Type | type, |
| bool | editable, | ||
| std::string | column_name ) |
Creates a new item factory.
| editable | Whether the item should be editable. |
| column_name | Column name, if column view, otherwise NULL. |
| gulong ItemFactory::bind_id_ = 0 |
Definition at line 91 of file item_factory.h.
| std::string ItemFactory::column_name_ |
Column name, or empty if used for list views.
Definition at line 96 of file item_factory.h.
| bool ItemFactory::editable_ = false |
Definition at line 86 of file item_factory.h.
| bool ItemFactory::ellipsize_label_ = true |
Definition at line 88 of file item_factory.h.
| GtkListItemFactory* ItemFactory::list_item_factory_ = nullptr |
An owned GtkListItemFactory.
Definition at line 82 of file item_factory.h.
| gulong ItemFactory::setup_id_ = 0 |
Definition at line 90 of file item_factory.h.
| gulong ItemFactory::teardown_id_ = 0 |
Definition at line 93 of file item_factory.h.
| Type ItemFactory::type_ = Type::Text |
Definition at line 84 of file item_factory.h.
| gulong ItemFactory::unbind_id_ = 0 |
Definition at line 92 of file item_factory.h.