X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fsurfaces%2Ffaderport8%2Ffp8_strip.h;h=200dae86cb9da725b6274ef1a2354ef430dc52cc;hb=318600d05eb2cd6ac14b5fa9ffeb2d4dae9c6aaf;hp=fd6d7d10dd05453fd158dbbc3596c05f2fdb91e6;hpb=d43a23fe28c6f54ed8ca6cde6497661c6cb73ce0;p=ardour.git diff --git a/libs/surfaces/faderport8/fp8_strip.h b/libs/surfaces/faderport8/fp8_strip.h index fd6d7d10dd..200dae86cb 100644 --- a/libs/surfaces/faderport8/fp8_strip.h +++ b/libs/surfaces/faderport8/fp8_strip.h @@ -23,6 +23,7 @@ #include #include "pbd/signals.h" +#include "pbd/controllable.h" #include "fp8_base.h" #include "fp8_button.h" @@ -59,15 +60,14 @@ public: Stripables, PluginSelect, // no clock display PluginParam, // param value + SendDisplay, // param value + select-bar }; - void set_periodic_display_mode (DisplayMode m) { - _displaymode = m; - } + void set_periodic_display_mode (DisplayMode m); // convenience function to call all set_XXX_controllable void set_stripable (boost::shared_ptr, bool panmode); - void set_text_line (uint8_t, std::string const&); + void set_text_line (uint8_t, std::string const&, bool inv = false); enum CtrlMask { CTRL_FADER = 0x001, @@ -76,22 +76,24 @@ public: CTRL_REC = 0x004, CTRL_PAN = 0x008, CTRL_SELECT = 0x010, - CTRL_TEXT1 = 0x100, - CTRL_TEXT2 = 0x200, - CTRL_TEXT3 = 0x400, - CTRL_TEXT4 = 0x800, + CTRL_TEXT0 = 0x100, + CTRL_TEXT1 = 0x200, + CTRL_TEXT2 = 0x400, + CTRL_TEXT3 = 0x800, + CTRL_TEXT01 = 0x300, CTRL_TEXT = 0xf00, CTRL_ALL = 0xfff, }; void unset_controllables (int which = CTRL_ALL); - void set_fader_controllable (boost::shared_ptr); - void set_mute_controllable (boost::shared_ptr); - void set_solo_controllable (boost::shared_ptr); - void set_rec_controllable (boost::shared_ptr); - void set_pan_controllable (boost::shared_ptr); + void set_fader_controllable (boost::shared_ptr); + void set_mute_controllable (boost::shared_ptr); + void set_solo_controllable (boost::shared_ptr); + void set_rec_controllable (boost::shared_ptr); + void set_pan_controllable (boost::shared_ptr); + void set_select_controllable (boost::shared_ptr); private: FP8Base& _base; @@ -105,30 +107,39 @@ private: PBD::ScopedConnection _base_connection; // periodic PBD::ScopedConnectionList _button_connections; - boost::shared_ptr _stripable; + std::string _stripable_name; boost::shared_ptr _fader_ctrl; boost::shared_ptr _mute_ctrl; boost::shared_ptr _solo_ctrl; boost::shared_ptr _rec_ctrl; boost::shared_ptr _pan_ctrl; + boost::shared_ptr _x_select_ctrl; PBD::ScopedConnection _fader_connection; PBD::ScopedConnection _mute_connection; PBD::ScopedConnection _solo_connection; PBD::ScopedConnection _rec_connection; PBD::ScopedConnection _pan_connection; + PBD::ScopedConnection _x_select_connection; boost::shared_ptr _peak_meter; boost::shared_ptr _redux_ctrl; + + void set_x_select_controllable (boost::shared_ptr); boost::function _select_plugin_functor; + void drop_automation_controls (); + + PBD::Controllable::GroupControlDisposition group_mode () const; + /* notifications, update view */ void notify_fader_changed (); void notify_solo_changed (); void notify_mute_changed (); void notify_rec_changed (); void notify_pan_changed (); + void notify_x_select_changed (); /* actions, update model */ void set_mute (bool); @@ -137,20 +148,21 @@ private: void set_recarm (); /* periodic poll, update view */ + void set_strip_name (); void periodic_update_fader (); void periodic_update_meter (); - void periodic_update_timecode (); + void periodic_update_timecode (uint32_t); void periodic (); /* cache */ unsigned short _last_fader; uint8_t _last_meter; uint8_t _last_redux; - uint8_t _last_panpos; + uint8_t _last_barpos; /* display */ void set_strip_mode (uint8_t, bool clear = false); - void set_bar_mode (uint8_t); + void set_bar_mode (uint8_t, bool force = false); uint8_t _strip_mode; uint8_t _bar_mode;