Ardour  9.0-pre0-582-g084a23a80d
ComboOption< T > Class Template Reference

#include <option_editor.h>

Inheritance diagram for ComboOption< T >:
[legend]

Public Member Functions

 ComboOption (std::string const &i, std::string const &n, sigc::slot< T > g, sigc::slot< bool, T > s)
 
void set_state_from_config ()
 
void add_to_page (OptionEditorPage *p)
 
void add (T e, std::string const &o)
 
void clear ()
 
void changed ()
 
void set_sensitive (bool yn)
 
Gtk::Widgettip_widget ()
 
- Public Member Functions inherited from Option
 Option (std::string const &i, std::string const &n)
 
void parameter_changed (std::string const &p)
 
std::string id () const
 
- Public Member Functions inherited from OptionEditorComponent
 OptionEditorComponent ()
 
virtual ~OptionEditorComponent ()
 
void add_widget_to_page (OptionEditorPage *, Gtk::Widget *)
 
void add_widgets_to_page (OptionEditorPage *, Gtk::Widget *, Gtk::Widget *, bool expand=true)
 
void set_note (std::string const &)
 
virtual PBD::Configuration::Metadata const * get_metadata () const
 
void set_metadata (PBD::Configuration::Metadata const &)
 
void highlight ()
 
void end_highlight ()
 

Private Attributes

sigc::slot< T > _get
 
sigc::slot< bool, T > _set
 
Gtk::Label_label
 
Gtk::ComboBoxText_combo
 
std::vector< T > _options
 

Additional Inherited Members

- Protected Member Functions inherited from OptionEditorComponent
void maybe_add_note (OptionEditorPage *, int)
 
- Protected Attributes inherited from Option
std::string _id
 
std::string _name
 
- Protected Attributes inherited from OptionEditorComponent
std::string _note
 
ArdourWidgets::Frame_frame
 
PBD::Configuration::Metadata const * _metadata
 

Detailed Description

template<class T>
class ComboOption< T >

Component which provides the UI to handle an enumerated option using a GTK ComboBox. The template parameter is the enumeration.

Definition at line 312 of file option_editor.h.

Constructor & Destructor Documentation

◆ ComboOption()

template<class T >
ComboOption< T >::ComboOption ( std::string const &  i,
std::string const &  n,
sigc::slot< T >  g,
sigc::slot< bool, T >  s 
)
inline

Construct an ComboOption.

Parameters
iid
nUser-visible name.
gSlot to get the variable's value.
sSlot to set the variable's value.

Definition at line 321 of file option_editor.h.

Member Function Documentation

◆ add()

template<class T >
void ComboOption< T >::add ( e,
std::string const &  o 
)
inline

Add an allowed value for this option.

Parameters
eEnumeration.
oUser-visible name for this value.

Definition at line 358 of file option_editor.h.

◆ add_to_page()

template<class T >
void ComboOption< T >::add_to_page ( OptionEditorPage )
inlinevirtual

Called to instruct the object to add itself to an OptionEditorPage

Implements Option.

Definition at line 349 of file option_editor.h.

◆ changed()

template<class T >
void ComboOption< T >::changed ( )
inline

Definition at line 384 of file option_editor.h.

◆ clear()

template<class T >
void ComboOption< T >::clear ( )
inline

Definition at line 378 of file option_editor.h.

◆ set_sensitive()

template<class T >
void ComboOption< T >::set_sensitive ( bool  yn)
inline

Definition at line 391 of file option_editor.h.

◆ set_state_from_config()

template<class T >
void ComboOption< T >::set_state_from_config ( )
inlinevirtual

Called to instruct the object to set its UI state from the configuration

Implements Option.

Definition at line 337 of file option_editor.h.

◆ tip_widget()

template<class T >
Gtk::Widget& ComboOption< T >::tip_widget ( )
inlinevirtual

Implements OptionEditorComponent.

Definition at line 396 of file option_editor.h.

Member Data Documentation

◆ _combo

template<class T >
Gtk::ComboBoxText* ComboOption< T >::_combo
private

Definition at line 402 of file option_editor.h.

◆ _get

template<class T >
sigc::slot<T> ComboOption< T >::_get
private

Definition at line 399 of file option_editor.h.

◆ _label

template<class T >
Gtk::Label* ComboOption< T >::_label
private

Definition at line 401 of file option_editor.h.

◆ _options

template<class T >
std::vector<T> ComboOption< T >::_options
private

Definition at line 403 of file option_editor.h.

◆ _set

template<class T >
sigc::slot<bool, T> ComboOption< T >::_set
private

Definition at line 400 of file option_editor.h.


The documentation for this class was generated from the following file: