Ardour  9.0-pre0-582-g084a23a80d
RegionView Class Referenceabstract

#include <region_view.h>

Inheritance diagram for RegionView:
[legend]

Classes

struct  DisplaySuspender
 
struct  PositionOrder
 
struct  ViewCueMarker
 

Public Member Functions

 RegionView (ArdourCanvas::Container *parent, TimeAxisView &time_view, const std::shared_ptr< ARDOUR::Region > &region, double samples_per_pixel, uint32_t base_color, bool automation=false)
 
 RegionView (const RegionView &other)
 
 RegionView (const RegionView &other, const std::shared_ptr< ARDOUR::Region > &other_region)
 
 ~RegionView ()
 
virtual void set_selected (bool yn)
 
virtual void init (bool what_changed)
 
std::shared_ptr< ARDOUR::Regionregion () const
 
bool is_valid () const
 
void set_valid (bool yn)
 
virtual void set_height (double)
 
virtual void set_samples_per_pixel (double)
 
virtual bool set_duration (Temporal::timecnt_t const &, void *)
 
void move (double xdelta, double ydelta)
 
void visual_layer_on_top ()
 
void raise_to_top ()
 
void lower_to_bottom ()
 
bool set_position (Temporal::timepos_t const &pos, void *src, double *delta=0)
 
void show_region_editor ()
 
void hide_region_editor ()
 
virtual void region_changed (const PBD::PropertyChange &)
 
virtual GhostRegionadd_ghost (TimeAxisView &)=0
 
void remove_ghost_in (TimeAxisView &)
 
void remove_ghost (GhostRegion *)
 
virtual void entered ()
 
virtual void exited ()
 
bool display_enabled () const
 
virtual void redisplay (bool)=0
 
void redisplay ()
 
virtual void tempo_map_changed ()
 
virtual void update_coverage_frame (LayerDisplay)
 
virtual void trim_front_starting ()
 
bool trim_front (Temporal::timepos_t const &, bool)
 
virtual void trim_front_ending ()
 
bool trim_end (Temporal::timepos_t const &, bool)
 
void move_contents (Temporal::timecnt_t const &)
 
virtual void thaw_after_trim ()
 
void set_silent_frames (const ARDOUR::AudioIntervalResult &, double threshold)
 
void drop_silent_frames ()
 
void hide_silent_frames ()
 
Temporal::timecnt_t snap_region_time_to_region_time (Temporal::timecnt_t const &, bool ensure_snap=false) const
 
void update_visibility ()
 
ARDOUR::CueMarker find_model_cue_marker (ArdourMarker *)
 
void drop_cue_marker (ArdourMarker *)
 
virtual void color_handler ()
 
- Public Member Functions inherited from TimeAxisViewItem
virtual ~TimeAxisViewItem ()
 
Temporal::timepos_t get_position () const
 
Temporal::timecnt_t get_duration () const
 
virtual void set_max_duration (Temporal::timecnt_t const &, void *)
 
Temporal::timecnt_t get_max_duration () const
 
virtual void set_min_duration (Temporal::timecnt_t const &, void *)
 
Temporal::timecnt_t get_min_duration () const
 
virtual void set_position_locked (bool, void *)
 
bool get_position_locked () const
 
void set_max_duration_active (bool, void *)
 
bool get_max_duration_active () const
 
void set_min_duration_active (bool, void *)
 
bool get_min_duration_active () const
 
void set_item_name (std::string, void *)
 
virtual std::string get_item_name () const
 
void set_sensitive (bool yn)
 
bool sensitive () const
 
TimeAxisViewget_time_axis_view () const
 
void set_name_text (const std::string &)
 
virtual double height () const
 
void set_y (double)
 
void set_color (uint32_t)
 
void set_name_text_color ()
 
virtual void set_frame_color ()
 
virtual uint32_t get_fill_color () const
 
ArdourCanvas::Itemget_canvas_frame ()
 
ArdourCanvas::Itemget_canvas_group () const
 
ArdourCanvas::Itemget_name_highlight ()
 
double get_samples_per_pixel () const
 
virtual void drag_start ()
 
virtual void drag_end ()
 
bool dragging () const
 
virtual void raise ()
 
virtual void lower ()
 
bool name_active () const
 
- Public Member Functions inherited from Selectable
 Selectable ()
 
virtual ~Selectable ()
 
virtual bool selected () const
 
- Public Member Functions inherited from PBD::ScopedConnectionList
 ScopedConnectionList ()
 
 ScopedConnectionList (const ScopedConnectionList &)=delete
 
ScopedConnectionListoperator= (const ScopedConnectionList &)=delete
 
virtual ~ScopedConnectionList ()
 
void add_connection (const UnscopedConnection &c)
 
void drop_connections ()
 

Static Public Attributes

static PBD::Signal< void(RegionView *)> RegionViewGoingAway
 
- Static Public Attributes inherited from TimeAxisViewItem
static Pango::FontDescription NAME_FONT
 
static const double NAME_X_OFFSET
 
static const double GRAB_HANDLE_TOP
 
static const double GRAB_HANDLE_WIDTH
 
static int NAME_HEIGHT
 
static double NAME_Y_OFFSET
 
static double NAME_HIGHLIGHT_SIZE
 
static double NAME_HIGHLIGHT_THRESH
 

Protected Member Functions

 RegionView (ArdourCanvas::Container *, TimeAxisView &, const std::shared_ptr< ARDOUR::Region > &, double samples_per_pixel, uint32_t basic_color, bool recording, TimeAxisViewItem::Visibility)
 
bool canvas_group_event (GdkEvent *)
 
virtual void region_resized (const PBD::PropertyChange &)
 
virtual void region_muted ()
 
void region_locked ()
 
void region_opacity ()
 
virtual void region_renamed ()
 
void region_sync_changed ()
 
std::string make_name () const
 
void lock_toggle ()
 
virtual void set_colors ()
 
virtual void set_sync_mark_color ()
 
virtual void reset_width_dependent_items (double pixel_width)
 
virtual void parameter_changed (std::string const &)
 
void maybe_raise_cue_markers ()
 
Temporal::timecnt_t region_relative_distance (Temporal::timecnt_t const &, Temporal::TimeDomain desired_time_domain)
 
- Protected Member Functions inherited from TimeAxisViewItem
 TimeAxisViewItem (const std::string &, ArdourCanvas::Item &, TimeAxisView &, double, uint32_t fill_color, Temporal::timepos_t const &, Temporal::timecnt_t const &, bool recording=false, bool automation=false, Visibility v=Visibility(0))
 
 TimeAxisViewItem (const TimeAxisViewItem &)
 
void init (ArdourCanvas::Item *, double, uint32_t, Temporal::timepos_t const &, Temporal::timecnt_t const &, Visibility, bool, bool)
 
virtual void set_frame_gradient ()
 
void set_trim_handle_colors ()
 
bool frame_handle_crossing (GdkEvent *, ArdourCanvas::Rectangle *)
 
void manage_name_text ()
 

Static Protected Member Functions

static gint _lock_toggle (ArdourCanvas::Item *, GdkEvent *, void *)
 
- Static Protected Member Functions inherited from TimeAxisViewItem
static gint idle_remove_this_item (TimeAxisViewItem *, void *)
 

Protected Attributes

std::shared_ptr< ARDOUR::Region_region
 
ArdourCanvas::Polygonsync_mark
 polygon for sync position More...
 
ArdourCanvas::Linesync_line
 polygon for sync position More...
 
ArdourWindow_editor
 
std::vector< ControlPoint * > control_points
 
double current_visible_sync_position
 
bool valid
 see StreamView::redisplay_diskstream() More...
 
uint32_t _disable_display
 see StreamView::redisplay_diskstream() More...
 
double _pixel_width
 
bool in_destructor
 
bool wait_for_data
 
std::vector< GhostRegion * > ghosts
 
std::list< ArdourCanvas::Rectangle * > _coverage_frame
 
std::list< ArdourCanvas::Rectangle * > _silent_frames
 
std::list< ArdourCanvas::Rectangle * > _silent_threshold_samples
 
ArdourCanvas::Text_silence_text
 
- Protected Attributes inherited from TimeAxisViewItem
TimeAxisViewtrackview
 
bool position_locked
 
Temporal::timepos_t time_position
 
Temporal::timecnt_t item_duration
 
Temporal::timecnt_t max_item_duration
 
Temporal::timecnt_t min_item_duration
 
bool max_duration_active
 
bool min_duration_active
 
double samples_per_pixel
 
bool _sensitive
 
std::string item_name
 
bool name_connected
 
uint32_t fill_color
 
uint32_t last_item_width
 
int name_text_width
 
bool wide_enough_for_name
 
bool high_enough_for_name
 
ArdourCanvas::Containergroup
 
ArdourCanvas::Rectangleframe
 
ArdourCanvas::Rectangleselection_frame
 
ArdourCanvas::Textname_text
 
ArdourCanvas::Rectanglename_highlight
 
ArdourCanvas::Rectangleframe_handle_start
 ‘frame’ (fade) handle for the start of the item, or 0 More...
 
ArdourCanvas::Rectangleframe_handle_end
 ‘frame’ (fade) handle for the end of the item, or 0 More...
 
double _height
 
Visibility visibility
 
std::string fill_color_name
 
bool _recregion
 
bool _automation
 true if this is an automation region view More...
 
bool _dragging
 
double _width
 
- Protected Attributes inherited from Selectable
bool _selected
 

Private Types

typedef std::list< ViewCueMarker * > ViewCueMarkers
 

Private Member Functions

void update_xrun_markers ()
 
void update_cue_markers ()
 
void clear_coverage_frame ()
 
void enable_display (bool view_only)
 
void disable_display ()
 

Private Attributes

std::list< std::pair< samplepos_t, ArdourCanvas::Arrow * > > _xrun_markers
 
bool _xrun_markers_visible
 
ViewCueMarkers _cue_markers
 
bool _cue_markers_visible
 

Friends

struct DisplaySuspender
 

Additional Inherited Members

- Public Types inherited from TimeAxisViewItem
enum  Visibility {
  ShowFrame = 0x1 , ShowNameHighlight = 0x2 , ShowNameText = 0x4 , ShowHandles = 0x8 ,
  HideFrameLeft = 0x10 , HideFrameRight = 0x20 , HideFrameTB = 0x40 , FullWidthNameHighlight = 0x80
}
 
- Static Public Member Functions inherited from TimeAxisViewItem
static void set_constant_heights ()
 
- Public Attributes inherited from TimeAxisViewItem
sigc::signal< void, std::string, void * > ItemRemoved
 

Detailed Description

Definition at line 53 of file region_view.h.

Member Typedef Documentation

◆ ViewCueMarkers

typedef std::list<ViewCueMarker*> RegionView::ViewCueMarkers
private

Definition at line 251 of file region_view.h.

Constructor & Destructor Documentation

◆ RegionView() [1/4]

RegionView::RegionView ( ArdourCanvas::Container parent,
TimeAxisView time_view,
const std::shared_ptr< ARDOUR::Region > &  region,
double  samples_per_pixel,
uint32_t  base_color,
bool  automation = false 
)

◆ RegionView() [2/4]

RegionView::RegionView ( const RegionView other)

◆ RegionView() [3/4]

RegionView::RegionView ( const RegionView other,
const std::shared_ptr< ARDOUR::Region > &  other_region 
)

◆ ~RegionView()

RegionView::~RegionView ( )

◆ RegionView() [4/4]

RegionView::RegionView ( ArdourCanvas::Container ,
TimeAxisView ,
const std::shared_ptr< ARDOUR::Region > &  ,
double  samples_per_pixel,
uint32_t  basic_color,
bool  recording,
TimeAxisViewItem::Visibility   
)
protected

Allows derived types to specify their visibility requirements to the TimeAxisViewItem parent class

Member Function Documentation

◆ _lock_toggle()

static gint RegionView::_lock_toggle ( ArdourCanvas::Item ,
GdkEvent ,
void *   
)
staticprotected

◆ add_ghost()

virtual GhostRegion* RegionView::add_ghost ( TimeAxisView )
pure virtual

◆ canvas_group_event()

bool RegionView::canvas_group_event ( GdkEvent )
protectedvirtual

Reimplemented from TimeAxisViewItem.

◆ clear_coverage_frame()

void RegionView::clear_coverage_frame ( )
private

◆ color_handler()

virtual void RegionView::color_handler ( )
inlinevirtual

Reimplemented in MidiRegionView, and AudioRegionView.

Definition at line 161 of file region_view.h.

◆ disable_display()

void RegionView::disable_display ( )
private

◆ display_enabled()

bool RegionView::display_enabled ( ) const

◆ drop_cue_marker()

void RegionView::drop_cue_marker ( ArdourMarker )

◆ drop_silent_frames()

void RegionView::drop_silent_frames ( )

◆ enable_display()

void RegionView::enable_display ( bool  view_only)
private

◆ entered()

virtual void RegionView::entered ( )
inlinevirtual

Reimplemented in AutomationRegionView, and AudioRegionView.

Definition at line 99 of file region_view.h.

◆ exited()

virtual void RegionView::exited ( )
inlinevirtual

Reimplemented in AutomationRegionView, and AudioRegionView.

Definition at line 100 of file region_view.h.

◆ find_model_cue_marker()

ARDOUR::CueMarker RegionView::find_model_cue_marker ( ArdourMarker )

◆ hide_region_editor()

void RegionView::hide_region_editor ( )

◆ hide_silent_frames()

void RegionView::hide_silent_frames ( )

◆ init()

virtual void RegionView::init ( bool  what_changed)
virtual

◆ is_valid()

bool RegionView::is_valid ( ) const
inline

Definition at line 74 of file region_view.h.

◆ lock_toggle()

void RegionView::lock_toggle ( )
protected

◆ lower_to_bottom()

void RegionView::lower_to_bottom ( )
virtual

Reimplemented from TimeAxisViewItem.

◆ make_name()

std::string RegionView::make_name ( ) const
protected

◆ maybe_raise_cue_markers()

void RegionView::maybe_raise_cue_markers ( )
protected

◆ move()

void RegionView::move ( double  xdelta,
double  ydelta 
)

◆ move_contents()

void RegionView::move_contents ( Temporal::timecnt_t const &  )

◆ parameter_changed()

virtual void RegionView::parameter_changed ( std::string const &  )
protectedvirtual

Reimplemented in MidiRegionView, and AudioRegionView.

◆ raise_to_top()

void RegionView::raise_to_top ( )
virtual

Reimplemented from TimeAxisViewItem.

◆ redisplay() [1/2]

void RegionView::redisplay ( )
inline

Definition at line 104 of file region_view.h.

◆ redisplay() [2/2]

virtual void RegionView::redisplay ( bool  )
pure virtual

◆ region()

std::shared_ptr<ARDOUR::Region> RegionView::region ( ) const
inline

Definition at line 72 of file region_view.h.

◆ region_changed()

virtual void RegionView::region_changed ( const PBD::PropertyChange )
virtual

Reimplemented in AudioRegionView.

◆ region_locked()

void RegionView::region_locked ( )
protected

◆ region_muted()

virtual void RegionView::region_muted ( )
protectedvirtual

Reimplemented in AudioRegionView.

◆ region_opacity()

void RegionView::region_opacity ( )
protected

◆ region_relative_distance()

Temporal::timecnt_t RegionView::region_relative_distance ( Temporal::timecnt_t const &  ,
Temporal::TimeDomain  desired_time_domain 
)
protected

◆ region_renamed()

virtual void RegionView::region_renamed ( )
protectedvirtual

Reimplemented in AudioRegionView.

◆ region_resized()

virtual void RegionView::region_resized ( const PBD::PropertyChange )
protectedvirtual

◆ region_sync_changed()

void RegionView::region_sync_changed ( )
protected

◆ remove_ghost()

void RegionView::remove_ghost ( GhostRegion )

◆ remove_ghost_in()

void RegionView::remove_ghost_in ( TimeAxisView )

◆ reset_width_dependent_items()

virtual void RegionView::reset_width_dependent_items ( double  pixel_width)
protectedvirtual

Reimplemented from TimeAxisViewItem.

Reimplemented in MidiRegionView, AutomationRegionView, and AudioRegionView.

◆ set_colors()

virtual void RegionView::set_colors ( )
protectedvirtual

Reimplemented from TimeAxisViewItem.

Reimplemented in AudioRegionView.

◆ set_duration()

virtual bool RegionView::set_duration ( Temporal::timecnt_t const &  ,
void *   
)
virtual

Reimplemented from TimeAxisViewItem.

◆ set_height()

virtual void RegionView::set_height ( double  )
virtual

Reimplemented from TimeAxisViewItem.

Reimplemented in MidiRegionView, AutomationRegionView, and AudioRegionView.

◆ set_position()

bool RegionView::set_position ( Temporal::timepos_t const &  pos,
void *  src,
double *  delta = 0 
)
virtual

Reimplemented from TimeAxisViewItem.

◆ set_samples_per_pixel()

virtual void RegionView::set_samples_per_pixel ( double  )
virtual

Reimplemented from TimeAxisViewItem.

Reimplemented in AudioRegionView.

◆ set_selected()

virtual void RegionView::set_selected ( bool  yn)
virtual

Reimplemented from TimeAxisViewItem.

Reimplemented in MidiRegionView, and AutomationRegionView.

◆ set_silent_frames()

void RegionView::set_silent_frames ( const ARDOUR::AudioIntervalResult ,
double  threshold 
)

◆ set_sync_mark_color()

virtual void RegionView::set_sync_mark_color ( )
protectedvirtual

◆ set_valid()

void RegionView::set_valid ( bool  yn)
inline

Definition at line 76 of file region_view.h.

◆ show_region_editor()

void RegionView::show_region_editor ( )

◆ snap_region_time_to_region_time()

Temporal::timecnt_t RegionView::snap_region_time_to_region_time ( Temporal::timecnt_t const &  ,
bool  ensure_snap = false 
) const

◆ tempo_map_changed()

virtual void RegionView::tempo_map_changed ( )
inlinevirtual

Reimplemented in AutomationRegionView.

Definition at line 108 of file region_view.h.

◆ thaw_after_trim()

virtual void RegionView::thaw_after_trim ( )
virtual

Reimplemented in AudioRegionView.

◆ trim_end()

bool RegionView::trim_end ( Temporal::timepos_t const &  ,
bool   
)

◆ trim_front()

bool RegionView::trim_front ( Temporal::timepos_t const &  ,
bool   
)

◆ trim_front_ending()

virtual void RegionView::trim_front_ending ( )
inlinevirtual

Called when a start trim has finished

Definition at line 138 of file region_view.h.

◆ trim_front_starting()

virtual void RegionView::trim_front_starting ( )
inlinevirtual

Called when a front trim is about to begin

Definition at line 133 of file region_view.h.

◆ update_coverage_frame()

virtual void RegionView::update_coverage_frame ( LayerDisplay  )
virtual

Reimplemented in AudioRegionView.

◆ update_cue_markers()

void RegionView::update_cue_markers ( )
private

◆ update_visibility()

void RegionView::update_visibility ( )
virtual

Reimplemented from TimeAxisViewItem.

◆ update_xrun_markers()

void RegionView::update_xrun_markers ( )
private

◆ visual_layer_on_top()

void RegionView::visual_layer_on_top ( )
virtual

Reimplemented from TimeAxisViewItem.

Friends And Related Function Documentation

◆ DisplaySuspender

friend struct DisplaySuspender
friend

Definition at line 256 of file region_view.h.

Member Data Documentation

◆ _coverage_frame

std::list<ArdourCanvas::Rectangle*> RegionView::_coverage_frame
protected

a list of rectangles which are used in stacked display mode to colour different bits of regions according to whether or not they are the one that will be played at any given time.

Definition at line 223 of file region_view.h.

◆ _cue_markers

ViewCueMarkers RegionView::_cue_markers
private

Definition at line 252 of file region_view.h.

◆ _cue_markers_visible

bool RegionView::_cue_markers_visible
private

Definition at line 253 of file region_view.h.

◆ _disable_display

uint32_t RegionView::_disable_display
protected

see StreamView::redisplay_diskstream()

Definition at line 211 of file region_view.h.

◆ _editor

ArdourWindow* RegionView::_editor
protected

Definition at line 205 of file region_view.h.

◆ _pixel_width

double RegionView::_pixel_width
protected

Definition at line 212 of file region_view.h.

◆ _region

std::shared_ptr<ARDOUR::Region> RegionView::_region
protected

Definition at line 200 of file region_view.h.

◆ _silence_text

ArdourCanvas::Text* RegionView::_silence_text
protected

a text item to display strip silence statistics

Definition at line 232 of file region_view.h.

◆ _silent_frames

std::list<ArdourCanvas::Rectangle*> RegionView::_silent_frames
protected

a list of rectangles used to show silent segments

Definition at line 227 of file region_view.h.

◆ _silent_threshold_samples

std::list<ArdourCanvas::Rectangle*> RegionView::_silent_threshold_samples
protected

a list of rectangles used to show the current silence threshold

Definition at line 230 of file region_view.h.

◆ _xrun_markers

std::list<std::pair<samplepos_t, ArdourCanvas::Arrow*> > RegionView::_xrun_markers
private

Definition at line 236 of file region_view.h.

◆ _xrun_markers_visible

bool RegionView::_xrun_markers_visible
private

Definition at line 237 of file region_view.h.

◆ control_points

std::vector<ControlPoint *> RegionView::control_points
protected

Definition at line 207 of file region_view.h.

◆ current_visible_sync_position

double RegionView::current_visible_sync_position
protected

Definition at line 208 of file region_view.h.

◆ ghosts

std::vector<GhostRegion*> RegionView::ghosts
protected

Definition at line 217 of file region_view.h.

◆ in_destructor

bool RegionView::in_destructor
protected

Definition at line 213 of file region_view.h.

◆ RegionViewGoingAway

PBD::Signal<void(RegionView*)> RegionView::RegionViewGoingAway
static

Definition at line 130 of file region_view.h.

◆ sync_line

ArdourCanvas::Line* RegionView::sync_line
protected

polygon for sync position

Definition at line 203 of file region_view.h.

◆ sync_mark

ArdourCanvas::Polygon* RegionView::sync_mark
protected

polygon for sync position

Definition at line 202 of file region_view.h.

◆ valid

bool RegionView::valid
protected

see StreamView::redisplay_diskstream()

Definition at line 210 of file region_view.h.

◆ wait_for_data

bool RegionView::wait_for_data
protected

Definition at line 215 of file region_view.h.


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