ardour
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
GroupTabs Class Referenceabstract

#include <group_tabs.h>

Inheritance diagram for GroupTabs:
CairoWidget ARDOUR::SessionHandlePtr EditorGroupTabs MixerGroupTabs

Classes

struct  Tab
 

Public Member Functions

 GroupTabs ()
 
virtual ~GroupTabs ()
 
void set_session (ARDOUR::Session *)
 
Gtk::Menu * get_menu (ARDOUR::RouteGroup *g)
 
void run_new_group_dialog (ARDOUR::RouteList const &)
 
- Public Member Functions inherited from CairoWidget
 CairoWidget ()
 
virtual ~CairoWidget ()
 
void set_dirty ()
 
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 ()
 
void set_draw_background (bool yn)
 
- Public Member Functions inherited from ARDOUR::SessionHandlePtr
 SessionHandlePtr (ARDOUR::Session *s)
 
 SessionHandlePtr ()
 
virtual ~SessionHandlePtr ()
 

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_flat_buttons (bool yn)
 
static bool flat_buttons ()
 
static void set_widget_prelight (bool yn)
 
static bool widget_prelight ()
 
static void set_source_rgb_a (cairo_t *cr, Gdk::Color, float a=1.0)
 
static void set_focus_handler (sigc::slot< void >)
 

Private Member Functions

virtual std::list< Tabcompute_tabs () const =0
 
virtual void draw_tab (cairo_t *cr, Tab const &t) const =0
 
virtual double primary_coordinate (double, double) const =0
 
virtual ARDOUR::RouteList routes_for_tab (Tab const *t) const =0
 
virtual double extent () const =0
 
virtual void add_menu_items (Gtk::Menu *, ARDOUR::RouteGroup *)
 
virtual PBD::PropertyList default_properties () const
 
virtual ARDOUR::RouteList selected_routes () const =0
 
virtual void sync_order_keys ()=0
 
void new_from_selection ()
 
void new_from_rec_enabled ()
 
void new_from_soloed ()
 
ARDOUR::RouteGroupcreate_and_add_group () 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_t *, 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 *)
 
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 *, boost::weak_ptr< ARDOUR::Route >)
 
void route_removed_from_route_group (ARDOUR::RouteGroup *, boost::weak_ptr< ARDOUR::Route >)
 

Static Private Member Functions

static void emit_gui_changed_for_members (ARDOUR::RouteGroup *)
 

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 _dragging_new_tab
 true if we're dragging a new tab More...
 
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...
 

Static Private Attributes

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

Additional Inherited Members

- Public Attributes inherited from CairoWidget
sigc::signal< void > StateChanged
 
- 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 > &)
 
bool on_button_press_event (GdkEventButton *)
 
Gdk::Color get_parent_bg ()
 
virtual void on_name_changed ()
 
- Protected Member Functions inherited from ARDOUR::SessionHandlePtr
virtual void session_going_away ()
 
- 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
 
- Static Protected Attributes inherited from CairoWidget
static bool _flat_buttons = false
 
static bool _widget_prelight = true
 
static sigc::slot< void > 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 38 of file group_tabs.h.

Constructor & Destructor Documentation

GroupTabs::GroupTabs ( )

Definition at line 43 of file group_tabs.cc.

GroupTabs::~GroupTabs ( )
virtual

Definition at line 52 of file group_tabs.cc.

Member Function Documentation

void GroupTabs::activate_all ( )
private

Definition at line 533 of file group_tabs.cc.

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

Reimplemented in EditorGroupTabs.

Definition at line 93 of file group_tabs.h.

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

Convert a click position to a tab.

Parameters
cClick position.
prevFilled in with the previous tab to the click, or _tabs.end().
nextFilled in with the next tab after the click, or _tabs.end().
Returns
Tab under the click, or 0.

Definition at line 274 of file group_tabs.cc.

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

Collect all members of a RouteGroup so that they are together in the Editor or Mixer.

Parameters
gGroup to collect.

Definition at line 489 of file group_tabs.cc.

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

Compute all the tabs for this widget.

Returns
Tabs.

Implemented in EditorGroupTabs, and MixerGroupTabs.

RouteGroup * GroupTabs::create_and_add_group ( ) const
private

Definition at line 437 of file group_tabs.cc.

PBD::PropertyList GroupTabs::default_properties ( ) const
privatevirtual

Definition at line 399 of file group_tabs.cc.

void GroupTabs::disable_all ( )
private

Definition at line 541 of file group_tabs.cc.

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

Draw a tab.

Parameters
crCairo context.
tTab.

Implemented in EditorGroupTabs, and MixerGroupTabs.

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

Definition at line 455 of file group_tabs.cc.

void GroupTabs::emit_gui_changed_for_members ( ARDOUR::RouteGroup rg)
staticprivate

Definition at line 690 of file group_tabs.cc.

virtual double GroupTabs::extent ( ) const
privatepure virtual
Returns
Size of the widget along the primary axis

Implemented in EditorGroupTabs, and MixerGroupTabs.

Gtk::Menu * GroupTabs::get_menu ( ARDOUR::RouteGroup g)
Parameters
gRoute group, or 0.
Returns
Menu to be popped up on right-click over the given route group.

Definition at line 304 of file group_tabs.cc.

uint32_t GroupTabs::group_color ( ARDOUR::RouteGroup group)
static
Returns
the color to use for a route group tab

Definition at line 616 of file group_tabs.cc.

string GroupTabs::group_gui_id ( ARDOUR::RouteGroup group)
static
Returns
the ID string to use for the GUI state of a route group

Definition at line 604 of file group_tabs.cc.

void GroupTabs::new_from_rec_enabled ( )
private

Definition at line 359 of file group_tabs.cc.

void GroupTabs::new_from_selection ( )
private

Definition at line 348 of file group_tabs.cc.

void GroupTabs::new_from_soloed ( )
private

Definition at line 379 of file group_tabs.cc.

bool GroupTabs::on_button_press_event ( GdkEventButton *  ev)
private

Definition at line 90 of file group_tabs.cc.

bool GroupTabs::on_button_release_event ( GdkEventButton *  )
private

Definition at line 189 of file group_tabs.cc.

bool GroupTabs::on_motion_notify_event ( GdkEventMotion *  ev)
private

Definition at line 159 of file group_tabs.cc.

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

Handle a size request.

Parameters
reqGTK requisition

Definition at line 82 of file group_tabs.cc.

virtual double GroupTabs::primary_coordinate ( double  ,
double   
) const
privatepure virtual
Parameters
xx coordinate
yy coordinate
Returns
x or y, depending on which is the primary coordinate for this widget.

Implemented in EditorGroupTabs, and MixerGroupTabs.

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

Definition at line 555 of file group_tabs.cc.

void GroupTabs::render ( cairo_t *  cr,
cairo_rectangle_t *   
)
privatevirtual

Implements CairoWidget.

Definition at line 244 of file group_tabs.cc.

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

Definition at line 660 of file group_tabs.cc.

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

Definition at line 647 of file group_tabs.cc.

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

Definition at line 675 of file group_tabs.cc.

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

Implemented in EditorGroupTabs, and MixerGroupTabs.

void GroupTabs::run_new_group_dialog ( ARDOUR::RouteList const &  rl)

Definition at line 419 of file group_tabs.cc.

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

Implemented in EditorGroupTabs, and MixerGroupTabs.

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

Definition at line 549 of file group_tabs.cc.

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

Set the color of the tab of a route group

Definition at line 562 of file group_tabs.cc.

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

Reimplemented from ARDOUR::SessionHandlePtr.

Definition at line 58 of file group_tabs.cc.

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

Definition at line 462 of file group_tabs.cc.

virtual void GroupTabs::sync_order_keys ( )
privatepure virtual

Implemented in EditorGroupTabs, and MixerGroupTabs.

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

Definition at line 468 of file group_tabs.cc.

Member Data Documentation

double GroupTabs::_drag_first
private

first mouse pointer position during drag

Definition at line 135 of file group_tabs.h.

double GroupTabs::_drag_fixed
private

the position of the fixed end of the tab being dragged

Definition at line 130 of file group_tabs.h.

double GroupTabs::_drag_max
private

maximum position for drag

Definition at line 134 of file group_tabs.h.

double GroupTabs::_drag_min
private

minimum position for drag

Definition at line 133 of file group_tabs.h.

bool GroupTabs::_drag_moved
private

true if there has been movement during any current drag

Definition at line 129 of file group_tabs.h.

double GroupTabs::_drag_moving
private

the position of the moving end of the tab being dragged

Definition at line 131 of file group_tabs.h.

double GroupTabs::_drag_offset
private

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

Definition at line 132 of file group_tabs.h.

Tab* GroupTabs::_dragging
private

tab being dragged, or 0

Definition at line 125 of file group_tabs.h.

bool GroupTabs::_dragging_new_tab
private

true if we're dragging a new tab

Definition at line 128 of file group_tabs.h.

ARDOUR::RouteList GroupTabs::_initial_dragging_routes
private

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

Definition at line 127 of file group_tabs.h.

Gtk::Menu* GroupTabs::_menu
private

Definition at line 123 of file group_tabs.h.

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

current list of tabs

Definition at line 124 of file group_tabs.h.

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

colors that have been used for new route group tabs

Definition at line 138 of file group_tabs.h.


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