ardour
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
EditorSummary Class Reference

#include <editor_summary.h>

Inheritance diagram for EditorSummary:
CairoWidget EditorComponent ARDOUR::SessionHandlePtr PBD::ScopedConnectionList

Public Member Functions

 EditorSummary (Editor *)
 
 ~EditorSummary ()
 
void set_session (ARDOUR::Session *)
 
void set_overlays_dirty ()
 
void set_background_dirty ()
 
void routes_added (std::list< RouteTimeAxisView * > 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 EditorComponent
 EditorComponent (Editor *)
 
virtual ~EditorComponent ()
 
- Public Member Functions inherited from ARDOUR::SessionHandlePtr
 SessionHandlePtr (ARDOUR::Session *s)
 
 SessionHandlePtr ()
 
virtual ~SessionHandlePtr ()
 
- Public Member Functions inherited from PBD::ScopedConnectionList
 ScopedConnectionList ()
 
virtual ~ScopedConnectionList ()
 
void add_connection (const UnscopedConnection &c)
 
void drop_connections ()
 

Private Types

enum  Position {
  LEFT, LEFT_TOP, TOP, RIGHT_TOP,
  RIGHT, RIGHT_BOTTOM, BOTTOM, LEFT_BOTTOM,
  INSIDE, BELOW_OR_ABOVE, TO_LEFT_OR_RIGHT, OTHERWISE_OUTSIDE
}
 

Private Member Functions

void parameter_changed (std::string)
 
void on_size_allocate (Gtk::Allocation &alloc)
 
void on_size_request (Gtk::Requisition *)
 
bool on_button_press_event (GdkEventButton *)
 
bool on_button_release_event (GdkEventButton *)
 
bool on_motion_notify_event (GdkEventMotion *)
 
bool on_scroll_event (GdkEventScroll *)
 
bool on_key_press_event (GdkEventKey *)
 
bool on_key_release_event (GdkEventKey *)
 
bool on_enter_notify_event (GdkEventCrossing *)
 
bool on_leave_notify_event (GdkEventCrossing *)
 
void centre_on_click (GdkEventButton *)
 
void render (cairo_t *, cairo_rectangle_t *)
 
void render_region (RegionView *, cairo_t *, double) const
 
void get_editor (std::pair< double, double > *, std::pair< double, double > *) const
 
void set_editor (double, double)
 
void set_editor (std::pair< double, double >, double)
 
void set_editor (std::pair< double, double >, std::pair< double, double >)
 
void set_editor_x (double)
 
void set_editor_x (std::pair< double, double >)
 
void set_editor_y (double)
 
void set_editor_y (std::pair< double, double >)
 
void playhead_position_changed (framepos_t)
 
double summary_y_to_editor (double) const
 
double editor_y_to_summary (double) const
 
Position get_position (double, double) const
 
void set_cursor (Position)
 
void route_gui_changed (std::string)
 
bool suspending_editor_updates () const
 
double playhead_frame_to_position (framepos_t) const
 
framepos_t position_to_playhead_frame_to_position (double pos) const
 
void set_overlays_dirty (int, int, int, int)
 
void render_background_image ()
 

Private Attributes

framepos_t _start
 start frame of the overview More...
 
framepos_t _end
 end frame of the overview More...
 
double _overhang_fraction
 
double _x_scale
 pixels per frame for the x axis of the pixmap More...
 
double _track_height
 
double _last_playhead
 
std::pair< double, double > _start_editor_x
 
std::pair< double, double > _start_editor_y
 
double _start_mouse_x
 
double _start_mouse_y
 
Position _start_position
 
bool _move_dragging
 
bool _moved
 
std::pair< double, double > _view_rectangle_x
 
std::pair< double, double > _view_rectangle_y
 
std::pair< double, double > _pending_editor_x
 
std::pair< double, double > _pending_editor_y
 
bool _pending_editor_changed
 
bool _zoom_dragging
 
Position _zoom_position
 
bool _old_follow_playhead
 
cairo_surface_t * _image
 
bool _background_dirty
 
PBD::ScopedConnectionList position_connection
 
PBD::ScopedConnection route_ctrl_id_connection
 
PBD::ScopedConnectionList region_property_connection
 

Additional Inherited Members

- 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 >)
 
- 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 EditorComponent
Editor_editor
 
- 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

Class to provide a visual summary of the contents of an editor window; represents the whole session as a set of lines, one per region view.

Definition at line 35 of file editor_summary.h.

Member Enumeration Documentation

Enumerator
LEFT 
LEFT_TOP 
TOP 
RIGHT_TOP 
RIGHT 
RIGHT_BOTTOM 
BOTTOM 
LEFT_BOTTOM 
INSIDE 
BELOW_OR_ABOVE 
TO_LEFT_OR_RIGHT 
OTHERWISE_OUTSIDE 

Definition at line 50 of file editor_summary.h.

Constructor & Destructor Documentation

EditorSummary::EditorSummary ( Editor e)

Construct an EditorSummary.

Parameters
eEditor to represent.

Definition at line 45 of file editor_summary.cc.

EditorSummary::~EditorSummary ( )

Definition at line 68 of file editor_summary.cc.

Member Function Documentation

void EditorSummary::centre_on_click ( GdkEventButton *  ev)
private

Definition at line 330 of file editor_summary.cc.

double EditorSummary::editor_y_to_summary ( double  y) const
private

Definition at line 1023 of file editor_summary.cc.

void EditorSummary::get_editor ( std::pair< double, double > *  ,
std::pair< double, double > *   
) const
private

Fill in x and y with the editor's current viewable area in summary coordinates

Definition at line 482 of file editor_summary.cc.

EditorSummary::Position EditorSummary::get_position ( double  x,
double  y 
) const
private

Get an expression of the position of a point with respect to the view rectangle

Definition at line 510 of file editor_summary.cc.

bool EditorSummary::on_button_press_event ( GdkEventButton *  ev)
private

Handle a button press.

Parameters
evGTK event.

Definition at line 408 of file editor_summary.cc.

bool EditorSummary::on_button_release_event ( GdkEventButton *  )
private

Definition at line 668 of file editor_summary.cc.

bool EditorSummary::on_enter_notify_event ( GdkEventCrossing *  )
private

Definition at line 356 of file editor_summary.cc.

bool EditorSummary::on_key_press_event ( GdkEventKey *  key)
private

Definition at line 374 of file editor_summary.cc.

bool EditorSummary::on_key_release_event ( GdkEventKey *  key)
private

Definition at line 392 of file editor_summary.cc.

bool EditorSummary::on_leave_notify_event ( GdkEventCrossing *  )
private

Definition at line 364 of file editor_summary.cc.

bool EditorSummary::on_motion_notify_event ( GdkEventMotion *  ev)
private

Definition at line 601 of file editor_summary.cc.

bool EditorSummary::on_scroll_event ( GdkEventScroll *  ev)
private

Definition at line 685 of file editor_summary.cc.

void EditorSummary::on_size_allocate ( Gtk::Allocation &  alloc)
private

Handle a size allocation.

Parameters
allocGTK allocation.

Definition at line 86 of file editor_summary.cc.

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

Handle a size request.

Parameters
reqGTK requisition

Definition at line 321 of file editor_summary.cc.

void EditorSummary::parameter_changed ( std::string  )
private

Definition at line 74 of file editor_summary.cc.

double EditorSummary::playhead_frame_to_position ( framepos_t  t) const
private

Definition at line 1069 of file editor_summary.cc.

void EditorSummary::playhead_position_changed ( framepos_t  p)
private

Definition at line 988 of file editor_summary.cc.

framepos_t EditorSummary::position_to_playhead_frame_to_position ( double  pos) const
private

Definition at line 1075 of file editor_summary.cc.

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

Render the required regions to a cairo context.

Parameters
crContext.

Implements CairoWidget.

Definition at line 213 of file editor_summary.cc.

void EditorSummary::render_background_image ( )
private

Definition at line 119 of file editor_summary.cc.

void EditorSummary::render_region ( RegionView r,
cairo_t *  cr,
double  y 
) const
private

Render a region for the summary.

Parameters
rRegion view.
crCairo context.
yy coordinate to render at.

Definition at line 273 of file editor_summary.cc.

void EditorSummary::route_gui_changed ( std::string  )
private

Definition at line 1061 of file editor_summary.cc.

void EditorSummary::routes_added ( std::list< RouteTimeAxisView * > const &  r)

Definition at line 1046 of file editor_summary.cc.

void EditorSummary::set_background_dirty ( )

Definition at line 294 of file editor_summary.cc.

void EditorSummary::set_cursor ( Position  p)
private

Definition at line 558 of file editor_summary.cc.

void EditorSummary::set_editor ( double  x,
double  y 
)
private

Set the editor to display a x range with the left at a given position and a y range with the top at a given position. x and y parameters are specified in summary coordinates. Zoom is not changed in either direction.

Definition at line 756 of file editor_summary.cc.

void EditorSummary::set_editor ( std::pair< double, double >  ,
double   
)
private
void EditorSummary::set_editor ( std::pair< double, double >  ,
std::pair< double, double >   
)
private
void EditorSummary::set_editor_x ( double  x)
private

Set the left of the x range visible in the editor. Caller should have checked that Editor::pending_visual_change.idle_handler_id is < 0

Parameters
xnew x left position in summary coordinates.

Definition at line 819 of file editor_summary.cc.

void EditorSummary::set_editor_x ( std::pair< double, double >  )
private
void EditorSummary::set_editor_y ( double  y)
private

Set the top of the y range visible in the editor. Caller should have checked that Editor::pending_visual_change.idle_handler_id is < 0

Parameters
ynew editor top in summary coodinates.

Definition at line 874 of file editor_summary.cc.

void EditorSummary::set_editor_y ( std::pair< double, double >  )
private
void EditorSummary::set_overlays_dirty ( )

Set the summary so that just the overlays (viewbox, playhead etc.) will be re-rendered

Definition at line 302 of file editor_summary.cc.

void EditorSummary::set_overlays_dirty ( int  x,
int  y,
int  w,
int  h 
)
private

Set the summary so that just the overlays (viewbox, playhead etc.) in a given area will be re-rendered

Definition at line 310 of file editor_summary.cc.

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

Connect to a session.

Parameters
sSession.

Reimplemented from ARDOUR::SessionHandlePtr.

Definition at line 97 of file editor_summary.cc.

double EditorSummary::summary_y_to_editor ( double  y) const
private

Definition at line 1000 of file editor_summary.cc.

bool EditorSummary::suspending_editor_updates ( ) const
private
Returns
true if we are currently suspending updates to the editor's viewport, which we do if configured to do so, and if in a drag of some kind.

Definition at line 475 of file editor_summary.cc.

Member Data Documentation

bool EditorSummary::_background_dirty
private

Definition at line 129 of file editor_summary.h.

framepos_t EditorSummary::_end
private

end frame of the overview

Definition at line 98 of file editor_summary.h.

cairo_surface_t* EditorSummary::_image
private

Definition at line 127 of file editor_summary.h.

double EditorSummary::_last_playhead
private

Definition at line 105 of file editor_summary.h.

bool EditorSummary::_move_dragging
private

Definition at line 114 of file editor_summary.h.

bool EditorSummary::_moved
private

Definition at line 115 of file editor_summary.h.

bool EditorSummary::_old_follow_playhead
private

Definition at line 126 of file editor_summary.h.

double EditorSummary::_overhang_fraction
private

fraction of the session length by which the overview size should extend past the start and end markers

Definition at line 101 of file editor_summary.h.

bool EditorSummary::_pending_editor_changed
private

Definition at line 121 of file editor_summary.h.

std::pair<double, double> EditorSummary::_pending_editor_x
private

Definition at line 119 of file editor_summary.h.

std::pair<double, double> EditorSummary::_pending_editor_y
private

Definition at line 120 of file editor_summary.h.

framepos_t EditorSummary::_start
private

start frame of the overview

Definition at line 97 of file editor_summary.h.

std::pair<double, double> EditorSummary::_start_editor_x
private

Definition at line 107 of file editor_summary.h.

std::pair<double, double> EditorSummary::_start_editor_y
private

Definition at line 108 of file editor_summary.h.

double EditorSummary::_start_mouse_x
private

Definition at line 109 of file editor_summary.h.

double EditorSummary::_start_mouse_y
private

Definition at line 110 of file editor_summary.h.

Position EditorSummary::_start_position
private

Definition at line 112 of file editor_summary.h.

double EditorSummary::_track_height
private

Definition at line 104 of file editor_summary.h.

std::pair<double, double> EditorSummary::_view_rectangle_x
private

Definition at line 116 of file editor_summary.h.

std::pair<double, double> EditorSummary::_view_rectangle_y
private

Definition at line 117 of file editor_summary.h.

double EditorSummary::_x_scale
private

pixels per frame for the x axis of the pixmap

Definition at line 103 of file editor_summary.h.

bool EditorSummary::_zoom_dragging
private

Definition at line 123 of file editor_summary.h.

Position EditorSummary::_zoom_position
private

Definition at line 124 of file editor_summary.h.

PBD::ScopedConnectionList EditorSummary::position_connection
private

Definition at line 131 of file editor_summary.h.

PBD::ScopedConnectionList EditorSummary::region_property_connection
private

Definition at line 133 of file editor_summary.h.

PBD::ScopedConnection EditorSummary::route_ctrl_id_connection
private

Definition at line 132 of file editor_summary.h.


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