-/// A widget which provides a set of rotated text labels
-class RotatedLabelSet : public Gtk::Widget {
- public:
- RotatedLabelSet (PortGroupList&);
- virtual ~RotatedLabelSet ();
-
- void set_angle (int);
- void set_base_width (int);
- void update_visibility ();
-
- protected:
- virtual void on_size_request (Gtk::Requisition*);
- virtual void on_size_allocate (Gtk::Allocation&);
- virtual void on_realize ();
- virtual void on_unrealize ();
- virtual bool on_expose_event (GdkEventExpose*);
-
- Glib::RefPtr<Gdk::Window> _gdk_window;
-
- private:
- std::pair<int, int> setup_layout (std::string const &);
-
- PortGroupList& _port_group_list; ///< list of ports to display
- int _angle_degrees; ///< label rotation angle in degrees
- double _angle_radians; ///< label rotation angle in radians
- int _base_width; ///< width of labels; see set_base_width() for more details
- Glib::RefPtr<Pango::Context> _pango_context;
- Glib::RefPtr<Pango::Layout> _pango_layout;
- Glib::RefPtr<Gdk::GC> _gc;
- Gdk::Color _fg_colour;
- Gdk::Color _bg_colour;
-};
-
-
-
-/// Widget for selecting what an IO is connected to
-class IOSelector : public Gtk::VBox {
- public:
- IOSelector (ARDOUR::Session&, boost::shared_ptr<ARDOUR::IO>, bool);
- ~IOSelector ();
-
- void redisplay ();
-
- enum Result {
- Cancelled,
- Accepted
- };
-
- sigc::signal<void, Result> Finished;
-
- private:
- void setup ();
- void clear ();
- void setup_dimensions ();
- void ports_changed (ARDOUR::IOChange, void*);
- bool row_label_button_pressed (GdkEventButton*, int);
- void add_port ();
- void remove_port (int);
- void group_visible_toggled (Gtk::CheckButton*, std::string const &);
-
- PortGroupList _port_group_list;