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

Classes

struct  ToDo
 

Public Types

enum  ActionType { NamedAction , InternalFunction }
 

Public Member Functions

 Button (CC121 &f, std::string const &str, ButtonID i)
 
void set_action (std::string const &action_name, bool on_press, CC121::ButtonState=ButtonState(0))
 
void set_action (std::function< void()> function, bool on_press, CC121::ButtonState=ButtonState(0))
 
std::string get_action (bool press, CC121::ButtonState bs=ButtonState(0))
 
void set_led_state (std::shared_ptr< MIDI::Port >, bool onoff)
 
void 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< CC121::ButtonState, ToDoToDoMap
 

Private Attributes

CC121fp
 
std::string name
 
ButtonID id
 
bool flash
 
ToDoMap on_press
 
ToDoMap on_release
 

Detailed Description

Definition at line 212 of file cc121.h.

Member Typedef Documentation

◆ ToDoMap

Definition at line 256 of file cc121.h.

Member Enumeration Documentation

◆ ActionType

Enumerator
NamedAction 
InternalFunction 

Definition at line 215 of file cc121.h.

Constructor & Destructor Documentation

◆ Button()

ArdourSurface::CC121::Button::Button ( CC121 f,
std::string const &  str,
ButtonID  i 
)
inline

Definition at line 220 of file cc121.h.

Member Function Documentation

◆ get_action()

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

◆ get_state()

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

◆ invoke()

void ArdourSurface::CC121::Button::invoke ( ButtonState  bs,
bool  press 
)

◆ set_action() [1/2]

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

◆ set_action() [2/2]

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

◆ set_flash()

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

Definition at line 234 of file cc121.h.

◆ set_led_state()

void ArdourSurface::CC121::Button::set_led_state ( std::shared_ptr< MIDI::Port ,
bool  onoff 
)

◆ set_state()

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

◆ uses_flash()

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

Definition at line 233 of file cc121.h.

Member Data Documentation

◆ flash

bool ArdourSurface::CC121::Button::flash
private

Definition at line 245 of file cc121.h.

◆ fp

CC121& ArdourSurface::CC121::Button::fp
private

Definition at line 242 of file cc121.h.

◆ id

ButtonID ArdourSurface::CC121::Button::id
private

Definition at line 244 of file cc121.h.

◆ name

std::string ArdourSurface::CC121::Button::name
private

Definition at line 243 of file cc121.h.

◆ on_press

ToDoMap ArdourSurface::CC121::Button::on_press
private

Definition at line 257 of file cc121.h.

◆ on_release

ToDoMap ArdourSurface::CC121::Button::on_release
private

Definition at line 258 of file cc121.h.

◆ timeout_connection

sigc::connection ArdourSurface::CC121::Button::timeout_connection

Definition at line 239 of file cc121.h.


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