Lumiera  0.pre.03
»edityourfreedom«
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ClipTrack Class Reference

#include "gui/widget/timeline/timeline-clip-track.hpp"

Description

Definition at line 49 of file timeline-clip-track.hpp.

Public Member Functions

 ClipTrack (TimelineWidget &timelineWidget, shared_ptr< model::ClipTrack > track)
 
void draw_track (Cairo::RefPtr< Cairo::Context > cairo, TimelineViewWindow *const window) const
 Draw the track in the timeline. More...
 
shared_ptr< timeline::ClipgetClipAt (Time position) const
 Gets the clip that is occupying the given time. More...
 
- Public Member Functions inherited from Track
 Track (TimelineWidget &owner, shared_ptr< model::Track > track)
 
virtual ~Track ()
 this is an abstract base class More...
 
void expand_collapse (ExpandDirection direction)
 Expands or collapses this branch. More...
 
float get_expand_animation_state () const
 The current expand state. More...
 
bool get_expanded () const
 Gets whether the descendant tracks are expanded or collapsed. More...
 
Gtk::ExpanderStyle get_expander_style () const
 Calculates the expander style, given the animation state. More...
 
Gtk::Widget & get_header_widget ()
 
int get_height () const
 Return the visual height of the track in pixels. More...
 
shared_ptr< model::TrackgetModelTrack () const
 
bool is_expand_animating () const
 Gets whether the branch is animation. More...
 
void show_header_context_menu (guint button, guint32 time)
 
void tick_expand_animation ()
 When this track is being animated, tick_expand_animation must be called repeatedly to cause the animation to progress. More...
 

Private Member Functions

void createTimelineClips ()
 Ensures timeline UI clips have been created for every model clip in track. More...
 
shared_ptr< model::ClipTrackgetModelTrack ()
 Gets the modelTrack as a ClipTrack. More...
 
void onClipListChanged ()
 An event handler that receives notifications for when the models clip list has been changed. More...
 
void removeOrphanedClips ()
 Removes any UI clips which no longer have corresponding model clips present in the sequence. More...
 
void updateClips ()
 Update the attached timeline clips. More...
 

Private Attributes

std::map< shared_ptr
< model::Clip >, shared_ptr
< timeline::Clip > > 
clipMap
 The clipMap maps model clips to timeline widget clips which are responsible for the UI representation of a clip. More...
 

Additional Inherited Members

- Public Types inherited from Track
enum  ExpandDirection {
  None,
  Expand,
  Collapse
}
 An enum used by the branch expand/collapse animation. More...
 
- Protected Attributes inherited from Track
shared_ptr< model::TrackmodelTrack
 
TimelineWidgettimelineWidget
 

Constructor & Destructor Documentation

ClipTrack ( TimelineWidget timelineWidget,
shared_ptr< model::ClipTrack track 
)

Definition at line 44 of file timeline-clip-track.cpp.

References ClipTrack::onClipListChanged(), and ClipTrack::updateClips().

+ Here is the call graph for this function:

Member Function Documentation

void draw_track ( Cairo::RefPtr< Cairo::Context >  cairo,
TimelineViewWindow *const  window 
) const
virtual

Draw the track in the timeline.

Implements Track.

Definition at line 58 of file timeline-clip-track.cpp.

References ClipTrack::clipMap, Track::get_height(), TimelineViewWindow::time_to_x(), and Time::ZERO.

+ Here is the call graph for this function:

shared_ptr< timeline::Clip > getClipAt ( Time  position) const
virtual

Gets the clip that is occupying the given time.

If there is no track, return a NULL pointer.

Parameters
thegiven time

Reimplemented from Track.

Definition at line 84 of file timeline-clip-track.cpp.

References ClipTrack::clipMap.

void createTimelineClips ( )
private

Ensures timeline UI clips have been created for every model clip in track.

Definition at line 101 of file timeline-clip-track.cpp.

References ClipTrack::clipMap, util::contains(), and ClipTrack::getModelTrack().

Referenced by ClipTrack::updateClips().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

shared_ptr< model::ClipTrack > getModelTrack ( )
private

Gets the modelTrack as a ClipTrack.

Definition at line 120 of file timeline-clip-track.cpp.

References Track::modelTrack.

Referenced by ClipTrack::createTimelineClips(), and ClipTrack::removeOrphanedClips().

+ Here is the caller graph for this function:

void onClipListChanged ( )
private

An event handler that receives notifications for when the models clip list has been changed.

Definition at line 126 of file timeline-clip-track.cpp.

References ClipTrack::updateClips().

Referenced by ClipTrack::ClipTrack().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void removeOrphanedClips ( )
private

Removes any UI clips which no longer have corresponding model clips present in the sequence.

Definition at line 132 of file timeline-clip-track.cpp.

References ClipTrack::clipMap, util::contains(), ENSURE(), and ClipTrack::getModelTrack().

Referenced by ClipTrack::updateClips().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void updateClips ( )
private

Update the attached timeline clips.

Definition at line 156 of file timeline-clip-track.cpp.

References ClipTrack::createTimelineClips(), and ClipTrack::removeOrphanedClips().

Referenced by ClipTrack::ClipTrack(), and ClipTrack::onClipListChanged().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

std::map<shared_ptr<model::Clip>, shared_ptr<timeline::Clip> > clipMap
private

The clipMap maps model clips to timeline widget clips which are responsible for the UI representation of a clip.

Definition at line 108 of file timeline-clip-track.hpp.

Referenced by ClipTrack::createTimelineClips(), ClipTrack::draw_track(), ClipTrack::getClipAt(), and ClipTrack::removeOrphanedClips().

+ Inheritance diagram for ClipTrack:
+ Collaboration diagram for ClipTrack:

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