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

#include <option_editor.h>

Inheritance diagram for SpinOption< T >:
[legend]

Public Member Functions

 SpinOption (std::string const &i, std::string const &n, sigc::slot< T > g, sigc::slot< bool, T > s, T min, T max, T step, T page, std::string const &unit="", float scale=1, unsigned digits=0)
 
void set_state_from_config ()
 
void add_to_page (OptionEditorPage *p)
 
void changed ()
 
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
 
float _scale
 
Gtk::Label_label
 
Gtk::HBox_box
 
Gtk::SpinButton_spin
 

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 SpinOption< T >

Component which provides the UI to handle an numeric option using a GTK SpinButton

Definition at line 516 of file option_editor.h.

Constructor & Destructor Documentation

◆ SpinOption()

template<class T >
SpinOption< T >::SpinOption ( std::string const &  i,
std::string const &  n,
sigc::slot< T >  g,
sigc::slot< bool, T >  s,
min,
max,
step,
page,
std::string const &  unit = "",
float  scale = 1,
unsigned  digits = 0 
)
inline

Construct an SpinOption.

Parameters
iid
nUser-visible name.
gSlot to get the variable's value.
sSlot to set the variable's value.
minVariable minimum value.
maxVariable maximum value.
stepStep for the spin button.
pagePage step for the spin button.
unitUnit name.
scaleScaling factor (such that for a value x in the spinbutton, x * scale is written to the config)
digitsNumber of decimal digits to show.

Definition at line 532 of file option_editor.h.

Member Function Documentation

◆ add_to_page()

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

Called to instruct the object to add itself to an OptionEditorPage

Implements Option.

Definition at line 573 of file option_editor.h.

◆ changed()

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

Definition at line 578 of file option_editor.h.

◆ set_state_from_config()

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

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

Implements Option.

Definition at line 568 of file option_editor.h.

◆ tip_widget()

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

Implements OptionEditorComponent.

Definition at line 583 of file option_editor.h.

Member Data Documentation

◆ _box

template<class T >
Gtk::HBox* SpinOption< T >::_box
private

Definition at line 590 of file option_editor.h.

◆ _get

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

Definition at line 586 of file option_editor.h.

◆ _label

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

Definition at line 589 of file option_editor.h.

◆ _scale

template<class T >
float SpinOption< T >::_scale
private

Definition at line 588 of file option_editor.h.

◆ _set

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

Definition at line 587 of file option_editor.h.

◆ _spin

template<class T >
Gtk::SpinButton* SpinOption< T >::_spin
private

Definition at line 591 of file option_editor.h.


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