Ardour  9.0-pre0-822-g12e3bc5c20
GroupTabs Class Referenceabstract

#include <group_tabs.h>

Inheritance diagram for GroupTabs:
[legend]

Classes

struct  Tab
 

Public Member Functions

 GroupTabs ()
 
virtual ~GroupTabs ()
 
void set_session (ARDOUR::Session *)
 
Gtk::Menu * get_menu (ARDOUR::RouteGroup *g, bool tabArea=false)
 
void run_new_group_dialog (ARDOUR::RouteList const *, bool with_master)
 
void set_extent (double)
 
void set_offset (double)
 
- Public Member Functions inherited from CairoWidget
 CairoWidget ()
 
virtual ~CairoWidget ()
 
void set_canvas_widget ()
 
void use_nsglview (bool retina=true)
 
void use_image_surface (bool yn=true)
 
void queue_draw ()
 
void queue_resize ()
 
int get_width () const
 
int get_height () const
 
void size_allocate (Gtk::Allocation &)
 
void set_dirty (cairo_rectangle_t *area=0)
 
Gtkmm2ext::ActiveState active_state () const
 
Gtkmm2ext::VisualState visual_state () const
 
virtual void set_active_state (Gtkmm2ext::ActiveState)
 
virtual void set_visual_state (Gtkmm2ext::VisualState)
 
void unset_active_state ()
 
void unset_visual_state ()
 
void set_active (bool)
 
bool get_active () const
 
void set_draw_background (bool yn)
 
uint32_t background_color ()
 
- Public Member Functions inherited from Gtkmm2ext::CairoCanvas
virtual ~CairoCanvas ()
 
- Public Member Functions inherited from ARDOUR::SessionHandlePtr
 SessionHandlePtr (ARDOUR::Session *s)
 
 SessionHandlePtr ()
 
virtual ~SessionHandlePtr ()
 
virtual ARDOUR::Sessionsession () const
 

Static Public Member Functions

static void set_group_color (ARDOUR::RouteGroup *, uint32_t)
 
static std::string group_gui_id (ARDOUR::RouteGroup *)
 
static uint32_t group_color (ARDOUR::RouteGroup *)
 
- Static Public Member Functions inherited from CairoWidget
static void provide_background_for_cairo_widget (Gtk::Widget &w, const Gdk::Color &bg)
 
static void set_source_rgb_a (cairo_t *cr, Gdk::Color, float a=1.0)
 
static void set_source_rgb_a (cairo_t *cr, Gtkmm2ext::Color, float a=1.0)
 
static void set_focus_handler (sigc::slot< void, Gtk::Widget * >)
 
- Static Public Member Functions inherited from Gtkmm2ext::CairoTheme
static void set_flat_buttons (bool yn)
 
static void set_boxy_buttons (bool yn)
 
static void set_widget_prelight (bool yn)
 
static bool flat_buttons ()
 
static bool boxy_buttons ()
 
static bool widget_prelight ()
 

Protected Member Functions

virtual double visible_extent () const =0
 
double extent () const
 
double offset () const
 
- Protected Member Functions inherited from CairoWidget
virtual bool on_expose_event (GdkEventExpose *)
 
void on_size_allocate (Gtk::Allocation &)
 
void on_state_changed (Gtk::StateType)
 
void on_style_changed (const Glib::RefPtr< Gtk::Style > &)
 
void on_realize ()
 
bool on_button_press_event (GdkEventButton *)
 
Gdk::Color get_parent_bg ()
 
void on_map ()
 
void on_unmap ()
 
virtual void on_name_changed ()
 
- Protected Member Functions inherited from ARDOUR::SessionHandlePtr
virtual void session_going_away ()
 

Protected Attributes

bool _dragging_new_tab
 true if we're dragging a new tab More...
 
- Protected Attributes inherited from CairoWidget
Gtkmm2ext::ActiveState _active_state
 
Gtkmm2ext::VisualState _visual_state
 
bool _need_bg
 
bool _grabbed
 
- Protected Attributes inherited from ARDOUR::SessionHandlePtr
ARDOUR::Session_session
 
PBD::ScopedConnectionList _session_connections
 

Private Member Functions

virtual std::list< Tabcompute_tabs () const =0
 
virtual void draw_tab (cairo_t *cr, Tab const &t)=0
 
virtual double primary_coordinate (double x, double y) const =0
 
virtual ARDOUR::RouteList routes_for_tab (Tab const *t) const =0
 
virtual void add_menu_items (Gtk::Menu *, ARDOUR::RouteGroup *)
 
virtual ARDOUR::RouteList selected_routes () const =0
 
void add_new_from_items (Gtk::Menu_Helpers::MenuList &)
 
void new_from_selection (bool with_master)
 
void new_from_rec_enabled (bool with_master)
 
void new_from_soloed (bool with_master)
 
void new_group_dialog_finished (int, RouteGroupDialog *, ARDOUR::RouteList const *, bool with_master) const
 
void edit_group_dialog_finished (int, RouteGroupDialog *) const
 
void collect (ARDOUR::RouteGroup *)
 
void set_activation (ARDOUR::RouteGroup *, bool)
 
void edit_group (ARDOUR::RouteGroup *)
 
void subgroup (ARDOUR::RouteGroup *, bool, ARDOUR::Placement)
 
void un_subgroup (ARDOUR::RouteGroup *)
 
void activate_all ()
 
void disable_all ()
 
void remove_group (ARDOUR::RouteGroup *)
 
void render (Cairo::RefPtr< Cairo::Context > const &, cairo_rectangle_t *)
 
void on_size_request (Gtk::Requisition *)
 
bool on_button_press_event (GdkEventButton *)
 
bool on_motion_notify_event (GdkEventMotion *)
 
bool on_button_release_event (GdkEventButton *)
 
bool on_enter_notify_event (GdkEventCrossing *)
 
bool on_leave_notify_event (GdkEventCrossing *)
 
Tabclick_to_tab (double, std::list< Tab >::iterator *, std::list< Tab >::iterator *)
 
void route_group_property_changed (ARDOUR::RouteGroup *)
 
void route_added_to_route_group (ARDOUR::RouteGroup *, std::weak_ptr< ARDOUR::Route >)
 
void route_removed_from_route_group (ARDOUR::RouteGroup *, std::weak_ptr< ARDOUR::Route >)
 
void assign_group_to_master (uint32_t which, ARDOUR::RouteGroup *, bool rename_master) const
 
void unassign_group_to_master (uint32_t which, ARDOUR::RouteGroup *) const
 
void assign_selection_to_master (uint32_t which)
 
void assign_recenabled_to_master (uint32_t which)
 
void assign_soloed_to_master (uint32_t which)
 
void assign_some_to_master (uint32_t which, ARDOUR::RouteList, std::string vcaname="")
 
ARDOUR::RouteList get_soloed ()
 
ARDOUR::RouteList get_rec_enabled ()
 

Static Private Member Functions

static void emit_gui_changed_for_members (std::shared_ptr< ARDOUR::RouteList >)
 

Private Attributes

Gtk::Menu * _menu
 
std::list< Tab_tabs
 current list of tabs More...
 
Tab_dragging
 tab being dragged, or 0 More...
 
ARDOUR::RouteList _initial_dragging_routes
 
bool _drag_moved
 true if there has been movement during any current drag More...
 
double _drag_fixed
 the position of the fixed end of the tab being dragged More...
 
double _drag_moving
 the position of the moving end of the tab being dragged More...
 
double _drag_offset
 offset from the mouse to the end of the tab being dragged More...
 
double _drag_min
 minimum position for drag More...
 
double _drag_max
 maximum position for drag More...
 
double _drag_first
 first mouse pointer position during drag More...
 
double _extent
 
double _offset
 
bool _hovering
 
PBD::ScopedConnection _new_route_group_connection
 

Static Private Attributes

static std::list< Gdk::Color > _used_colors
 

Additional Inherited Members

- Public Attributes inherited from CairoWidget
sigc::signal< void > StateChanged
 
sigc::signal< bool > QueueDraw
 
sigc::signal< bool > QueueResize
 
- Static Protected Attributes inherited from CairoWidget
static sigc::slot< void, Gtk::Widget * > focus_handler
 

Detailed Description

Parent class for tabs which represent route groups as colored tabs; Currently used on the left-hand side of the editor and at the top of the mixer.

This class also contains a fair bit of code to handle changes to route group colours; it seems a bit out of place, but I could not really think of a better place to put it.

Definition at line 48 of file group_tabs.h.

Constructor & Destructor Documentation

◆ GroupTabs()

GroupTabs::GroupTabs ( )

◆ ~GroupTabs()

virtual GroupTabs::~GroupTabs ( )
virtual

Member Function Documentation

◆ activate_all()

void GroupTabs::activate_all ( )
private

◆ add_menu_items()

virtual void GroupTabs::add_menu_items ( Gtk::Menu *  ,
ARDOUR::RouteGroup  
)
inlineprivatevirtual

Reimplemented in EditorGroupTabs.

Definition at line 118 of file group_tabs.h.

◆ add_new_from_items()

void GroupTabs::add_new_from_items ( Gtk::Menu_Helpers::MenuList &  )
private

◆ assign_group_to_master()

void GroupTabs::assign_group_to_master ( uint32_t  which,
ARDOUR::RouteGroup ,
bool  rename_master 
) const
private

◆ assign_recenabled_to_master()

void GroupTabs::assign_recenabled_to_master ( uint32_t  which)
private

◆ assign_selection_to_master()

void GroupTabs::assign_selection_to_master ( uint32_t  which)
private

◆ assign_soloed_to_master()

void GroupTabs::assign_soloed_to_master ( uint32_t  which)
private

◆ assign_some_to_master()

void GroupTabs::assign_some_to_master ( uint32_t  which,
ARDOUR::RouteList  ,
std::string  vcaname = "" 
)
private

◆ click_to_tab()

Tab* GroupTabs::click_to_tab ( double  ,
std::list< Tab >::iterator *  ,
std::list< Tab >::iterator *   
)
private

◆ collect()

void GroupTabs::collect ( ARDOUR::RouteGroup )
private

◆ compute_tabs()

virtual std::list<Tab> GroupTabs::compute_tabs ( ) const
privatepure virtual

Compute all the tabs for this widget.

Returns
Tabs.

Implemented in RecorderGroupTabs, MixerGroupTabs, and EditorGroupTabs.

◆ disable_all()

void GroupTabs::disable_all ( )
private

◆ draw_tab()

virtual void GroupTabs::draw_tab ( cairo_t *  cr,
Tab const &  t 
)
privatepure virtual

Draw a tab.

Parameters
crCairo context.
tTab.

Implemented in RecorderGroupTabs, MixerGroupTabs, and EditorGroupTabs.

◆ edit_group()

void GroupTabs::edit_group ( ARDOUR::RouteGroup )
private

◆ edit_group_dialog_finished()

void GroupTabs::edit_group_dialog_finished ( int  ,
RouteGroupDialog  
) const
private

◆ emit_gui_changed_for_members()

static void GroupTabs::emit_gui_changed_for_members ( std::shared_ptr< ARDOUR::RouteList )
staticprivate

◆ extent()

double GroupTabs::extent ( ) const
inlineprotected
Returns
Size of all contained strips along the primary axis

Definition at line 89 of file group_tabs.h.

◆ get_menu()

Gtk::Menu* GroupTabs::get_menu ( ARDOUR::RouteGroup g,
bool  tabArea = false 
)

Create route-group context menu

Parameters
gRoute group, or 0.
tabAreafalse if context menu is not for a group tab, show the "create new from" items here. When true a given group's context menu for the group g is displayed.
Returns
Menu to be popped up on right-click over the given route group.

◆ get_rec_enabled()

ARDOUR::RouteList GroupTabs::get_rec_enabled ( )
private

◆ get_soloed()

ARDOUR::RouteList GroupTabs::get_soloed ( )
private

◆ group_color()

static uint32_t GroupTabs::group_color ( ARDOUR::RouteGroup )
static

◆ group_gui_id()

static std::string GroupTabs::group_gui_id ( ARDOUR::RouteGroup )
static

◆ new_from_rec_enabled()

void GroupTabs::new_from_rec_enabled ( bool  with_master)
private

◆ new_from_selection()

void GroupTabs::new_from_selection ( bool  with_master)
private

◆ new_from_soloed()

void GroupTabs::new_from_soloed ( bool  with_master)
private

◆ new_group_dialog_finished()

void GroupTabs::new_group_dialog_finished ( int  ,
RouteGroupDialog ,
ARDOUR::RouteList const *  ,
bool  with_master 
) const
private

◆ offset()

double GroupTabs::offset ( ) const
inlineprotected
Returns
Scroll offset of visible_extent along the primary axis

Definition at line 92 of file group_tabs.h.

◆ on_button_press_event()

bool GroupTabs::on_button_press_event ( GdkEventButton *  )
private

◆ on_button_release_event()

bool GroupTabs::on_button_release_event ( GdkEventButton *  )
private

◆ on_enter_notify_event()

bool GroupTabs::on_enter_notify_event ( GdkEventCrossing *  )
private

◆ on_leave_notify_event()

bool GroupTabs::on_leave_notify_event ( GdkEventCrossing *  )
private

◆ on_motion_notify_event()

bool GroupTabs::on_motion_notify_event ( GdkEventMotion *  )
private

◆ on_size_request()

void GroupTabs::on_size_request ( Gtk::Requisition *  )
private

◆ primary_coordinate()

virtual double GroupTabs::primary_coordinate ( double  x,
double  y 
) const
privatepure virtual

Coordinate map (editor, mixer)

Parameters
xx-coordinate
yy-coordinate
Returns
x or y, depending on which is the primary coordinate for this widget.

Implemented in RecorderGroupTabs, MixerGroupTabs, and EditorGroupTabs.

◆ remove_group()

void GroupTabs::remove_group ( ARDOUR::RouteGroup )
private

◆ render()

void GroupTabs::render ( Cairo::RefPtr< Cairo::Context > const &  ,
cairo_rectangle_t *   
)
privatevirtual

◆ route_added_to_route_group()

void GroupTabs::route_added_to_route_group ( ARDOUR::RouteGroup ,
std::weak_ptr< ARDOUR::Route  
)
private

◆ route_group_property_changed()

void GroupTabs::route_group_property_changed ( ARDOUR::RouteGroup )
private

◆ route_removed_from_route_group()

void GroupTabs::route_removed_from_route_group ( ARDOUR::RouteGroup ,
std::weak_ptr< ARDOUR::Route  
)
private

◆ routes_for_tab()

virtual ARDOUR::RouteList GroupTabs::routes_for_tab ( Tab const *  t) const
privatepure virtual

◆ run_new_group_dialog()

void GroupTabs::run_new_group_dialog ( ARDOUR::RouteList const *  ,
bool  with_master 
)

◆ selected_routes()

virtual ARDOUR::RouteList GroupTabs::selected_routes ( ) const
privatepure virtual

◆ set_activation()

void GroupTabs::set_activation ( ARDOUR::RouteGroup ,
bool   
)
private

◆ set_extent()

void GroupTabs::set_extent ( double  )

◆ set_group_color()

static void GroupTabs::set_group_color ( ARDOUR::RouteGroup ,
uint32_t   
)
static

◆ set_offset()

void GroupTabs::set_offset ( double  )

◆ set_session()

void GroupTabs::set_session ( ARDOUR::Session )
virtual

Reimplemented from ARDOUR::SessionHandlePtr.

◆ subgroup()

void GroupTabs::subgroup ( ARDOUR::RouteGroup ,
bool  ,
ARDOUR::Placement   
)
private

◆ un_subgroup()

void GroupTabs::un_subgroup ( ARDOUR::RouteGroup )
private

◆ unassign_group_to_master()

void GroupTabs::unassign_group_to_master ( uint32_t  which,
ARDOUR::RouteGroup  
) const
private

◆ visible_extent()

virtual double GroupTabs::visible_extent ( ) const
protectedpure virtual
Returns
Size of the widget along the primary axis

Implemented in RecorderGroupTabs, MixerGroupTabs, and EditorGroupTabs.

Member Data Documentation

◆ _drag_first

double GroupTabs::_drag_first
private

first mouse pointer position during drag

Definition at line 175 of file group_tabs.h.

◆ _drag_fixed

double GroupTabs::_drag_fixed
private

the position of the fixed end of the tab being dragged

Definition at line 170 of file group_tabs.h.

◆ _drag_max

double GroupTabs::_drag_max
private

maximum position for drag

Definition at line 174 of file group_tabs.h.

◆ _drag_min

double GroupTabs::_drag_min
private

minimum position for drag

Definition at line 173 of file group_tabs.h.

◆ _drag_moved

bool GroupTabs::_drag_moved
private

true if there has been movement during any current drag

Definition at line 169 of file group_tabs.h.

◆ _drag_moving

double GroupTabs::_drag_moving
private

the position of the moving end of the tab being dragged

Definition at line 171 of file group_tabs.h.

◆ _drag_offset

double GroupTabs::_drag_offset
private

offset from the mouse to the end of the tab being dragged

Definition at line 172 of file group_tabs.h.

◆ _dragging

Tab* GroupTabs::_dragging
private

tab being dragged, or 0

Definition at line 166 of file group_tabs.h.

◆ _dragging_new_tab

bool GroupTabs::_dragging_new_tab
protected

true if we're dragging a new tab

Definition at line 94 of file group_tabs.h.

◆ _extent

double GroupTabs::_extent
private

Definition at line 176 of file group_tabs.h.

◆ _hovering

bool GroupTabs::_hovering
private

Definition at line 179 of file group_tabs.h.

◆ _initial_dragging_routes

ARDOUR::RouteList GroupTabs::_initial_dragging_routes
private

routes that were in the tab that is being dragged when the drag started

Definition at line 168 of file group_tabs.h.

◆ _menu

Gtk::Menu* GroupTabs::_menu
private

Definition at line 164 of file group_tabs.h.

◆ _new_route_group_connection

PBD::ScopedConnection GroupTabs::_new_route_group_connection
mutableprivate

Definition at line 181 of file group_tabs.h.

◆ _offset

double GroupTabs::_offset
private

Definition at line 177 of file group_tabs.h.

◆ _tabs

std::list<Tab> GroupTabs::_tabs
private

current list of tabs

Definition at line 165 of file group_tabs.h.

◆ _used_colors

std::list<Gdk::Color> GroupTabs::_used_colors
staticprivate

colors that have been used for new route group tabs

Definition at line 184 of file group_tabs.h.


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