mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
Improve connection button labels for internal connections
* Update button when the name of a connected route changes
* Indicate partial internal connections (previously only the
client name ("ardour") was displayed.
* Escape markup in I/O plugin and client names
* Refactor code, use a common base-class for route and
route-less I/O Buttons
This commit is contained in:
parent
de84ac2d6f
commit
19e190cc93
4 changed files with 403 additions and 354 deletions
|
|
@ -25,20 +25,44 @@
|
|||
#include <boost/shared_ptr.hpp>
|
||||
#include <gtkmm/menu.h>
|
||||
|
||||
#include "ardour/data_type.h"
|
||||
|
||||
#include "widgets/ardour_button.h"
|
||||
|
||||
namespace PBD
|
||||
{
|
||||
class PropertyChange;
|
||||
}
|
||||
|
||||
namespace ARDOUR
|
||||
{
|
||||
class Bundle;
|
||||
class IO;
|
||||
class Route;
|
||||
class Session;
|
||||
class Track;
|
||||
class Port;
|
||||
}
|
||||
|
||||
class RouteUI;
|
||||
|
||||
class IOButton : public ArdourWidgets::ArdourButton
|
||||
class IOButtonBase : public ArdourWidgets::ArdourButton
|
||||
{
|
||||
public:
|
||||
virtual ~IOButtonBase () {}
|
||||
|
||||
protected:
|
||||
static void set_label (IOButtonBase&, ARDOUR::Session&, boost::shared_ptr<ARDOUR::Bundle>&, boost::shared_ptr<ARDOUR::IO>);
|
||||
static ARDOUR::DataType guess_main_type (boost::shared_ptr<ARDOUR::IO>);
|
||||
|
||||
virtual void update () = 0;
|
||||
void maybe_update (PBD::PropertyChange const& what_changed);
|
||||
|
||||
PBD::ScopedConnectionList _connections;
|
||||
PBD::ScopedConnectionList _bundle_connections;
|
||||
};
|
||||
|
||||
class IOButton : public IOButtonBase
|
||||
{
|
||||
public:
|
||||
IOButton (bool input);
|
||||
|
|
@ -46,9 +70,6 @@ public:
|
|||
|
||||
void set_route (boost::shared_ptr<ARDOUR::Route>, RouteUI*);
|
||||
|
||||
static ARDOUR::DataType guess_main_type (boost::shared_ptr<ARDOUR::IO>);
|
||||
static void set_label (ArdourWidgets::ArdourButton&, ARDOUR::Session&, boost::shared_ptr<ARDOUR::Bundle>&, boost::shared_ptr<ARDOUR::IO>);
|
||||
|
||||
private:
|
||||
void update ();
|
||||
bool button_press (GdkEventButton*);
|
||||
|
|
@ -69,8 +90,6 @@ private:
|
|||
RouteUI* _route_ui;
|
||||
Gtk::Menu _menu;
|
||||
std::list<boost::shared_ptr<ARDOUR::Bundle> > _menu_bundles;
|
||||
PBD::ScopedConnectionList _connections;
|
||||
PBD::ScopedConnectionList _bundle_connections;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue