Ardour  9.0-pre0-582-g084a23a80d
ArdourSurface::FaderPort::Button Class Reference

Classes

struct  ToDo
 

Public Types

enum  ActionType { NamedAction , InternalFunction }
 

Public Member Functions

 Button (FaderPort &f, std::string const &str, ButtonID i, int o)
 
void set_action (std::string const &action_name, bool on_press, FaderPort::ButtonState=ButtonState(0))
 
void set_action (std::function< void()> function, bool on_press, FaderPort::ButtonState=ButtonState(0))
 
std::string get_action (bool press, FaderPort::ButtonState bs=ButtonState(0))
 
void set_led_state (bool onoff)
 
bool invoke (ButtonState bs, bool press)
 
bool uses_flash () const
 
void set_flash (bool yn)
 
XMLNodeget_state () const
 
int set_state (XMLNode const &)
 

Public Attributes

sigc::connection timeout_connection
 

Private Types

typedef std::map< FaderPort::ButtonState, ToDoToDoMap
 

Private Attributes

FaderPortfp
 
std::string name
 
ButtonID id
 
int out
 
bool flash
 
ToDoMap on_press
 
ToDoMap on_release
 

Detailed Description

Definition at line 178 of file faderport.h.

Member Typedef Documentation

◆ ToDoMap

Definition at line 224 of file faderport.h.

Member Enumeration Documentation

◆ ActionType

Enumerator
NamedAction 
InternalFunction 

Definition at line 181 of file faderport.h.

Constructor & Destructor Documentation

◆ Button()

ArdourSurface::FaderPort::Button::Button ( FaderPort f,
std::string const &  str,
ButtonID  i,
int  o 
)
inline

Definition at line 186 of file faderport.h.

Member Function Documentation

◆ get_action()

std::string ArdourSurface::FaderPort::Button::get_action ( bool  press,
FaderPort::ButtonState  bs = ButtonState(0) 
)

◆ get_state()

XMLNode& ArdourSurface::FaderPort::Button::get_state ( ) const

◆ invoke()

bool ArdourSurface::FaderPort::Button::invoke ( ButtonState  bs,
bool  press 
)

◆ set_action() [1/2]

void ArdourSurface::FaderPort::Button::set_action ( std::function< void()>  function,
bool  on_press,
FaderPort::ButtonState  = ButtonState(0) 
)

◆ set_action() [2/2]

void ArdourSurface::FaderPort::Button::set_action ( std::string const &  action_name,
bool  on_press,
FaderPort::ButtonState  = ButtonState(0) 
)

◆ set_flash()

void ArdourSurface::FaderPort::Button::set_flash ( bool  yn)
inline

Definition at line 201 of file faderport.h.

◆ set_led_state()

void ArdourSurface::FaderPort::Button::set_led_state ( bool  onoff)

◆ set_state()

int ArdourSurface::FaderPort::Button::set_state ( XMLNode const &  )

◆ uses_flash()

bool ArdourSurface::FaderPort::Button::uses_flash ( ) const
inline

Definition at line 200 of file faderport.h.

Member Data Documentation

◆ flash

bool ArdourSurface::FaderPort::Button::flash
private

Definition at line 213 of file faderport.h.

◆ fp

FaderPort& ArdourSurface::FaderPort::Button::fp
private

Definition at line 209 of file faderport.h.

◆ id

ButtonID ArdourSurface::FaderPort::Button::id
private

Definition at line 211 of file faderport.h.

◆ name

std::string ArdourSurface::FaderPort::Button::name
private

Definition at line 210 of file faderport.h.

◆ on_press

ToDoMap ArdourSurface::FaderPort::Button::on_press
private

Definition at line 225 of file faderport.h.

◆ on_release

ToDoMap ArdourSurface::FaderPort::Button::on_release
private

Definition at line 226 of file faderport.h.

◆ out

int ArdourSurface::FaderPort::Button::out
private

Definition at line 212 of file faderport.h.

◆ timeout_connection

sigc::connection ArdourSurface::FaderPort::Button::timeout_connection

Definition at line 206 of file faderport.h.


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