Lumiera  0.pre.03
»edityourfreedom«
TimelineLayoutHelper Class Reference

#include "gui/widget/timeline/timeline-layout-helper.hpp"

Description

A helper class for the TimelineWidget.

TimelineLayoutHelper is a class which calculates the layout of tracks in the timeline track tree.

See also
gui::widget::TimelineWidget

Definition at line 63 of file timeline-layout-helper.hpp.

Public Types

using TrackTree = lib::Tree< std::shared_ptr< model::Track > >
 Definition of the layout track tree type. More...
 

Public Member Functions

 TimelineLayoutHelper (TimelineWidget &owner)
 
shared_ptr< timeline::Trackbegin_dragging_track (Gdk::Point const &mouse_point)
 Begins to drag the track under mouse_point, if there is one. More...
 
void clone_tree_from_sequence ()
 Clones the timelineWidget sequence's track tree to create a layout tree which will be identical to it. More...
 
void drag_to_point (Gdk::Point const &mouse_point)
 Drags the dragging branch to a new mouse point. More...
 
void end_dragging_track (bool apply)
 Drops the dragging track. More...
 
TrackTree::pre_order_iterator get_dragging_track_iter () const
 Gets the iterator of the layout tree node that is being dragged. More...
 
TrackTreeget_layout_tree ()
 Gets a reference to the helper's layout tree. More...
 
int get_total_height () const
 Returns the total height in pixels of the layout tree. More...
 
boost::optional< Gdk::Rectangle > get_track_header_rect (std::weak_ptr< timeline::Track > track)
 Get's the header rectangle of a given timeline track. More...
 
shared_ptr< timeline::Trackheader_from_point (Gdk::Point point)
 Searches for a header which has the specified point inside of it. More...
 
bool is_animating () const
 Returns true if the layout is currently animating. More...
 
bool is_dragging_track () const
 Returns true if a track is being dragged. More...
 
TrackTree::pre_order_iterator iterator_from_track (shared_ptr< model::Track > modelTrack)
 A utility function which finds the iterator of a track in the layout tree. More...
 
int measure_branch_height (TrackTree::iterator_base parent_iterator)
 A function that recursively calculates the visible height of a branch taking into account branches that are expanded or collapsed. More...
 
shared_ptr< timeline::Tracktrack_from_y (int y)
 Searches for a tack which has the specified y-offset inside of it. More...
 
void update_layout ()
 Recalculates the track layout from layoutTree. More...
 

Classes

struct  DropPoint
 A structure used to specify where a track will be dropped when dragging ends. More...
 

Protected Types

enum  TreeRelation {
  None,
  Before,
  After,
  FirstChild,
  LastChild
}
 An enum to specify the relationship between a tree node, and another node which is going to be inserted adjacent. More...
 

Protected Member Functions

void add_branch (TrackTree::iterator_base parent_iterator, shared_ptr< model::Track > parent)
 A helper function for clone_tree_from_sequence(). More...
 
void apply_drop_to_layout_tree (DropPoint const &drop)
 Drops the dragging track to a new location in the layout tree as specified by drop. More...
 
void apply_drop_to_modelTree (DropPoint const &drop)
 Drops the dragging track to a new location in the model tree as specified by drop. More...
 
TimelineLayoutHelper::DropPoint attempt_drop (TrackTree::pre_order_iterator target, Gdk::Point const &point)
 Attempts to find a drop point on the target node at point. More...
 
void begin_animation ()
 A helper function which kicks off the animation timer. More...
 
shared_ptr< model::Sequenceget_sequence () const
 Helper to get the sequence object from the state. More...
 
int layout_headers_recursive (TrackTree::iterator_base parent_iterator, const int branch_offset, const int header_width, const int indent_width, const int depth, const bool parent_expanded)
 Recursively calculates the boxes for a given branch in the timeline tree. More...
 
shared_ptr< timeline::Tracklookup_timeline_track (shared_ptr< model::Track > modelTrack)
 A helper function which calls lookup_timeline_track within the parent timeline widget, but also applies lots of data consistency checks in the process. More...
 
bool on_animation_tick ()
 The animation timer tick callback. More...
 

Protected Attributes

bool animating
 This value is true if the layout animation should continue. More...
 
sigc::connection animationTimer
 The connection to the animation timer. More...
 
int dragBranchHeight
 The total height of the dragging branch in pixels. More...
 
TrackTree::pre_order_iterator draggingTrackIter
 The iterator of the layoutTree node that is presently being dragged. More...
 
Gdk::Point dragPoint
 The coordinates of the dragging mouse in pixels, measured from the top left of the whole layout. More...
 
Gdk::Point dragStartOffset
 The offset of the mouse relative to the top-left corner of the dragging track. More...
 
DropPoint dropPoint
 The tree point the the user is currently hovering on. More...
 
std::map< std::weak_ptr< timeline::Track >, Gdk::Rectangle, ::util::WeakPtrComparatorheaderBoxes
 A map of tracks to the rectangles of their headers. More...
 
TrackTree layoutTree
 
TimelineWidgettimelineWidget
 owner timeline widget as provided to the constructor. More...
 
int totalHeight
 The total height of the track tree layout in pixels. More...
 

Additional Inherited Members

- Private Member Functions inherited from NonCopyable
 NonCopyable ()=default
 
 NonCopyable (NonCopyable const &)=delete
 
 ~NonCopyable ()=default
 
NonCopyableoperator= (NonCopyable const &)=delete
 

Member Typedef Documentation

◆ TrackTree

Definition of the layout track tree type.

Definition at line 68 of file timeline-layout-helper.hpp.

Member Enumeration Documentation

◆ TreeRelation

enum TreeRelation
protected

An enum to specify the relationship between a tree node, and another node which is going to be inserted adjacent.

Enumerator
None 

No relation.

Before 

The node will be inserted immediately before this one.

After 

The node will be inserted immediately after this one.

FirstChild 

The node will be inserted as the first child of this one.

LastChild 

The node will be inserted as the last child of this one.

Definition at line 211 of file timeline-layout-helper.hpp.


Class Documentation

◆ gui::widget::timeline::TimelineLayoutHelper::DropPoint

struct gui::widget::timeline::TimelineLayoutHelper::DropPoint
Class Members
pre_order_iterator target Specifies the target node onto which the dragging track will be dropped.
TreeRelation relation The where to drop the dragging track in relation to target.
+ Collaboration diagram for TimelineLayoutHelper::DropPoint:

Constructor & Destructor Documentation

◆ TimelineLayoutHelper()

Member Function Documentation

◆ clone_tree_from_sequence()

void clone_tree_from_sequence ( )

Clones the timelineWidget sequence's track tree to create a layout tree which will be identical to it.

Remarks
The current layout tree will be deleted and replaced with the clone.
See also
add_branch

Definition at line 67 of file timeline-layout-helper.cpp.

References TimelineLayoutHelper::add_branch(), Tree< T, tree_node_allocator >::clear(), TimelineLayoutHelper::get_sequence(), TimelineLayoutHelper::layoutTree, and Tree< T, tree_node_allocator >::set_head().

Referenced by TimelineLayoutHelper::end_dragging_track(), and TimelineWidget::update_tracks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_layout_tree()

TimelineLayoutHelper::TrackTree & get_layout_tree ( )

Gets a reference to the helper's layout tree.

Returns
Returns a reference to the helper's layout tree.

Definition at line 79 of file timeline-layout-helper.cpp.

References TimelineLayoutHelper::layoutTree.

Referenced by TimelineBody::draw_tracks(), TimelineHeaderContainer::layout_headers(), TimelineHeaderContainer::on_size_request(), and TimelineHeaderContainer::raise_recursive().

+ Here is the caller graph for this function:

◆ update_layout()

void update_layout ( )

◆ get_track_header_rect()

boost::optional< Gdk::Rectangle > get_track_header_rect ( std::weak_ptr< timeline::Track track)

Get's the header rectangle of a given timeline track.

Parameters
[in]trackThe track which will be looked up.
Returns
Returns the rectangle of the header offset by the y-scroll offset, or if the track is hidden, or not present in the layout tree, an empty optional will be returned.
Remarks
This function is only usable after update_layout() has been called on a valid tree of tracks.
See also
update_layout()

Definition at line 99 of file timeline-layout-helper.cpp.

References util::contains(), TimelineWidget::get_y_scroll_offset(), TimelineLayoutHelper::headerBoxes, and TimelineLayoutHelper::timelineWidget.

Referenced by TimelineBody::draw_tracks(), and TimelineHeaderContainer::layout_headers().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ header_from_point()

shared_ptr< timeline::Track > header_from_point ( Gdk::Point  point)

Searches for a header which has the specified point inside of it.

Parameters
[in]pointThe point to search with.
Returns
the header which has been found, or if no header is found, an empty shared pointer is returned.
Remarks
The point specified is relative to the scroll offset, so y = 0 is the top edge of the scroll view. This function is only usable after update_layout() has been called on a valid tree of tracks.
See also
update_layout()

Definition at line 112 of file timeline-layout-helper.cpp.

References TimelineWidget::get_y_scroll_offset(), TimelineLayoutHelper::headerBoxes, gui::draw::pt_in_rect(), and TimelineLayoutHelper::timelineWidget.

Referenced by TimelineLayoutHelper::begin_dragging_track(), TimelineHeaderContainer::on_button_press_event(), and TimelineHeaderContainer::on_motion_notify_event().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ track_from_y()

shared_ptr< timeline::Track > track_from_y ( int  y)

Searches for a tack which has the specified y-offset inside of it.

Parameters
[in]yThe y-coordinate to search with.
Returns
the track which has been found, or if no track is found, an empty shared pointer is returned.
Remarks
The point specified is relative to the scroll offset, so y = 0 is the top edge of the scroll view. This function is only usable after update_layout() has been called on a valid tree of tracks.
See also
update_layout()

Definition at line 132 of file timeline-layout-helper.cpp.

References TimelineWidget::get_y_scroll_offset(), TimelineLayoutHelper::headerBoxes, and TimelineLayoutHelper::timelineWidget.

Referenced by TimelineBody::on_motion_notify_event().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ begin_dragging_track()

shared_ptr< timeline::Track > begin_dragging_track ( Gdk::Point const &  mouse_point)

Begins to drag the track under mouse_point, if there is one.

Parameters
mouse_pointThe mouse point to begin dragging from, measured in pixels from the top left of the header container widget.

Definition at line 153 of file timeline-layout-helper.cpp.

References TimelineLayoutHelper::dragBranchHeight, TimelineLayoutHelper::draggingTrackIter, TimelineLayoutHelper::dragPoint, TimelineLayoutHelper::dragStartOffset, TimelineLayoutHelper::dropPoint, TimelineWidget::get_y_scroll_offset(), TimelineLayoutHelper::header_from_point(), TimelineLayoutHelper::headerBoxes, TimelineLayoutHelper::iterator_from_track(), TimelineLayoutHelper::measure_branch_height(), TimelineLayoutHelper::None, TimelineLayoutHelper::DropPoint::relation, and TimelineLayoutHelper::timelineWidget.

Referenced by TimelineHeaderContainer::begin_drag().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ end_dragging_track()

void end_dragging_track ( bool  apply)

Drops the dragging track.

Parameters
applytrue if the model tree should be modified.

Definition at line 180 of file timeline-layout-helper.cpp.

References TimelineLayoutHelper::apply_drop_to_modelTree(), TimelineLayoutHelper::clone_tree_from_sequence(), TimelineLayoutHelper::draggingTrackIter, TimelineLayoutHelper::dropPoint, NULL, and TimelineLayoutHelper::update_layout().

Referenced by TimelineHeaderContainer::end_drag().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ is_dragging_track()

bool is_dragging_track ( ) const

Returns true if a track is being dragged.

Definition at line 192 of file timeline-layout-helper.cpp.

References TimelineLayoutHelper::draggingTrackIter, and NULL.

Referenced by TimelineLayoutHelper::drag_to_point(), TimelineHeaderContainer::end_drag(), TimelineHeaderContainer::layout_headers(), TimelineLayoutHelper::layout_headers_recursive(), TimelineHeaderWidget::on_button_release_event(), and TimelineHeaderContainer::on_motion_notify_event().

+ Here is the caller graph for this function:

◆ get_dragging_track_iter()

TimelineLayoutHelper::TrackTree::pre_order_iterator get_dragging_track_iter ( ) const

Gets the iterator of the layout tree node that is being dragged.

Definition at line 199 of file timeline-layout-helper.cpp.

References TimelineLayoutHelper::draggingTrackIter.

Referenced by TimelineHeaderContainer::begin_drag(), and TimelineHeaderContainer::layout_headers().

+ Here is the caller graph for this function:

◆ drag_to_point()

void drag_to_point ( Gdk::Point const &  mouse_point)

Drags the dragging branch to a new mouse point.

Parameters
mouse_pointpoint to drag the dragging track to. This point is in pixels relative to the top left of the header container.
Remarks
drag_to_point may only be called after begin_dragging_track and before #end_dragging_point have been called.

Definition at line 206 of file timeline-layout-helper.cpp.

References TimelineLayoutHelper::After, TimelineLayoutHelper::apply_drop_to_layout_tree(), TimelineLayoutHelper::attempt_drop(), TimelineLayoutHelper::Before, Tree< T, tree_node_allocator >::begin(), TimelineLayoutHelper::dragBranchHeight, TimelineLayoutHelper::draggingTrackIter, TimelineLayoutHelper::dragPoint, TimelineLayoutHelper::dragStartOffset, TimelineLayoutHelper::dropPoint, Tree< T, tree_node_allocator >::end(), Track::Expand, TimelineLayoutHelper::FirstChild, TimelineWidget::get_y_scroll_offset(), TimelineLayoutHelper::is_dragging_track(), TimelineLayoutHelper::LastChild, TimelineLayoutHelper::layoutTree, TimelineLayoutHelper::lookup_timeline_track(), TimelineLayoutHelper::None, TimelineLayoutHelper::DropPoint::relation, TimelineLayoutHelper::DropPoint::target, TimelineLayoutHelper::timelineWidget, TimelineLayoutHelper::totalHeight, and TimelineLayoutHelper::update_layout().

Referenced by TimelineHeaderContainer::on_motion_notify_event(), and TimelineHeaderContainer::on_scroll_slide_timer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_total_height()

int get_total_height ( ) const

Returns the total height in pixels of the layout tree.

Remarks
This function is only on returns a valid value after update_layout() has been called on a valid tree of tracks.
See also
update_layout()

Definition at line 310 of file timeline-layout-helper.cpp.

References ENSURE(), and TimelineLayoutHelper::totalHeight.

Referenced by TimelineWidget::update_scroll().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ is_animating()

bool is_animating ( ) const

Returns true if the layout is currently animating.

Definition at line 318 of file timeline-layout-helper.cpp.

References TimelineLayoutHelper::animating.

◆ iterator_from_track()

TimelineLayoutHelper::TrackTree::pre_order_iterator iterator_from_track ( shared_ptr< model::Track modelTrack)

A utility function which finds the iterator of a track in the layout tree.

Parameters
modelTrackThe model track to look for.
Returns
the model iterator of layoutTree.end() if no iterator was found.

Definition at line 325 of file timeline-layout-helper.cpp.

References Tree< T, tree_node_allocator >::begin(), Tree< T, tree_node_allocator >::end(), and TimelineLayoutHelper::layoutTree.

Referenced by TimelineLayoutHelper::begin_dragging_track().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ measure_branch_height()

int measure_branch_height ( TrackTree::iterator_base  parent_iterator)

A function that recursively calculates the visible height of a branch taking into account branches that are expanded or collapsed.

Parameters
parent_iteratorparent of the branch to measure. This node and all the child nodes will be included in the measurement.
Returns
the height of the branch in pixels.

Definition at line 341 of file timeline-layout-helper.cpp.

References Tree< T, tree_node_allocator >::begin(), Tree< T, tree_node_allocator >::end(), TimelineLayoutHelper::layoutTree, TimelineLayoutHelper::lookup_timeline_track(), and TimelineWidget::TrackPadding.

Referenced by TimelineLayoutHelper::begin_dragging_track().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ add_branch()

void add_branch ( TrackTree::iterator_base  parent_iterator,
shared_ptr< model::Track parent 
)
protected

A helper function for clone_tree_from_sequence().

This function clones a branch within the model tree into the specified point in that layout tree.

Parameters
[in]parent_iteratorThe iterator of the node in the tree which will become the parent of any tracks added.
[in]parentA pointer to the model track whose children will be added to the layout tree branch.
See also
clone_tree_from_sequence()

Definition at line 86 of file timeline-layout-helper.cpp.

References Tree< T, tree_node_allocator >::append_child(), and TimelineLayoutHelper::layoutTree.

Referenced by TimelineLayoutHelper::clone_tree_from_sequence().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ layout_headers_recursive()

int layout_headers_recursive ( TrackTree::iterator_base  parent_iterator,
const int  branch_offset,
const int  header_width,
const int  indent_width,
const int  depth,
const bool  parent_expanded 
)
protected

Recursively calculates the boxes for a given branch in the timeline tree.

Parameters
[in]parent_iteratorThe iterator of the parent of the branch whose boxes will be laid out.
[in]branch_offsetThe y-coordinate of the start of this branch as measured in pixels from the origin.
[in]header_widthThe width of the header container widget in pixels.
[in]header_widthThe width of indentation per branch in pixels.
[in]depthThe depth within the tree of tracks. depth = 0 for root tracks.
[in]parent_expandedThis value is set to true if all of the ancestors of this track, up to the root are expanded and visible, false if any of them are collapsed.
Returns
Returns the height of the branch in pixels.
See also
update_layout()

Definition at line 393 of file timeline-layout-helper.cpp.

References TimelineLayoutHelper::animating, Tree< T, tree_node_allocator >::begin(), TimelineLayoutHelper::draggingTrackIter, TimelineLayoutHelper::dragPoint, TimelineLayoutHelper::dragStartOffset, Tree< T, tree_node_allocator >::end(), TimelineLayoutHelper::headerBoxes, TimelineLayoutHelper::is_dragging_track(), TimelineLayoutHelper::layoutTree, TimelineLayoutHelper::lookup_timeline_track(), lib::meta::max(), and TimelineWidget::TrackPadding.

Referenced by TimelineLayoutHelper::update_layout().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lookup_timeline_track()

shared_ptr< timeline::Track > lookup_timeline_track ( shared_ptr< model::Track modelTrack)
protected

A helper function which calls lookup_timeline_track within the parent timeline widget, but also applies lots of data consistency checks in the process.

Parameters
modelTrackThe model track to look up in the parent widget.
Returns
Returns the track found, or returns NULL if no matching track was found.
Remarks
If the return value is going to be NULL, an ENSURE will fail.

Definition at line 500 of file timeline-layout-helper.cpp.

References ENSURE(), TimelineWidget::lookup_timeline_track(), NULL, and TimelineLayoutHelper::timelineWidget.

Referenced by TimelineLayoutHelper::attempt_drop(), TimelineLayoutHelper::drag_to_point(), TimelineLayoutHelper::layout_headers_recursive(), and TimelineLayoutHelper::measure_branch_height().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ begin_animation()

void begin_animation ( )
protected

A helper function which kicks off the animation timer.

Definition at line 512 of file timeline-layout-helper.cpp.

References TimelineLayoutHelper::animationTimer, and TimelineLayoutHelper::on_animation_tick().

Referenced by TimelineLayoutHelper::update_layout().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ on_animation_tick()

bool on_animation_tick ( )
protected

The animation timer tick callback.

Definition at line 521 of file timeline-layout-helper.cpp.

References TimelineLayoutHelper::animating, and TimelineLayoutHelper::update_layout().

Referenced by TimelineLayoutHelper::begin_animation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ attempt_drop()

TimelineLayoutHelper::DropPoint attempt_drop ( TrackTree::pre_order_iterator  target,
Gdk::Point const &  point 
)
protected

Attempts to find a drop point on the target node at point.

Parameters
[in]targetThe iterator of the target node on which to make the attempt.
[in]pointThe point on which do to the test.
Remarks
This function hit-tests a header looking to see if the point is hovering over it, and if it is, it works out what part of the header, and therefore what drop location the user us gesturally pointing to.

Definition at line 529 of file timeline-layout-helper.cpp.

References TimelineLayoutHelper::After, TimelineLayoutHelper::Before, TimelineLayoutHelper::dragPoint, TimelineLayoutHelper::FirstChild, TimelineLayoutHelper::headerBoxes, TimelineLayoutHelper::lookup_timeline_track(), TimelineLayoutHelper::None, gui::draw::pt_in_rect(), and TimelineLayoutHelper::DropPoint::relation.

Referenced by TimelineLayoutHelper::drag_to_point().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ apply_drop_to_layout_tree()

void apply_drop_to_layout_tree ( TimelineLayoutHelper::DropPoint const &  drop)
protected

Drops the dragging track to a new location in the layout tree as specified by drop.

Parameters
[in]dropThe point in the tree to drop onto.

Definition at line 586 of file timeline-layout-helper.cpp.

References TimelineLayoutHelper::After, Tree< T, tree_node_allocator >::append_child(), TimelineLayoutHelper::Before, TimelineLayoutHelper::draggingTrackIter, TimelineLayoutHelper::FirstChild, TimelineLayoutHelper::LastChild, TimelineLayoutHelper::layoutTree, Tree< T, tree_node_allocator >::move_after(), Tree< T, tree_node_allocator >::move_before(), Tree< T, tree_node_allocator >::move_ontop(), TimelineLayoutHelper::None, Tree< T, tree_node_allocator >::prepend_child(), TimelineLayoutHelper::DropPoint::relation, and TimelineLayoutHelper::DropPoint::target.

Referenced by TimelineLayoutHelper::drag_to_point().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ apply_drop_to_modelTree()

void apply_drop_to_modelTree ( TimelineLayoutHelper::DropPoint const &  drop)
protected

Drops the dragging track to a new location in the model tree as specified by drop.

Parameters
[in]dropThe point in the tree to drop onto.

Definition at line 627 of file timeline-layout-helper.cpp.

References TimelineLayoutHelper::After, TimelineLayoutHelper::Before, observable_list< T, Allocator >::begin(), TimelineLayoutHelper::draggingTrackIter, observable_list< T, Allocator >::end(), TimelineLayoutHelper::FirstChild, TimelineWidget::freeze_update_tracks(), TimelineLayoutHelper::get_sequence(), observable_list< T, Allocator >::insert(), TimelineLayoutHelper::LastChild, TimelineLayoutHelper::None, TimelineLayoutHelper::DropPoint::relation, TimelineLayoutHelper::DropPoint::target, TimelineWidget::thaw_update_tracks(), and TimelineLayoutHelper::timelineWidget.

Referenced by TimelineLayoutHelper::end_dragging_track().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get_sequence()

shared_ptr< model::Sequence > get_sequence ( ) const
protected

Helper to get the sequence object from the state.

Returns
Returns a shared pointer to the sequence.

Definition at line 699 of file timeline-layout-helper.cpp.

References ENSURE(), TimelineWidget::state, and TimelineLayoutHelper::timelineWidget.

Referenced by TimelineLayoutHelper::apply_drop_to_modelTree(), and TimelineLayoutHelper::clone_tree_from_sequence().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ timelineWidget

◆ layoutTree

◆ headerBoxes

std::map< std::weak_ptr<timeline::Track> , Gdk::Rectangle , ::util::WeakPtrComparator > headerBoxes
protected

A map of tracks to the rectangles of their headers.

Remarks
This map is used as a cache, so that the rectangles don't need to be perpetually recalculated. This cache is regenerated by the update_layout method.
See also
update_layout()

Definition at line 375 of file timeline-layout-helper.hpp.

Referenced by TimelineLayoutHelper::attempt_drop(), TimelineLayoutHelper::begin_dragging_track(), TimelineLayoutHelper::get_track_header_rect(), TimelineLayoutHelper::header_from_point(), TimelineLayoutHelper::layout_headers_recursive(), TimelineLayoutHelper::track_from_y(), and TimelineLayoutHelper::update_layout().

◆ totalHeight

int totalHeight
protected

The total height of the track tree layout in pixels.

This value is only valid after layout_headers has been called.

See also
update_layout()

Definition at line 382 of file timeline-layout-helper.hpp.

Referenced by TimelineLayoutHelper::drag_to_point(), TimelineLayoutHelper::get_total_height(), and TimelineLayoutHelper::update_layout().

◆ draggingTrackIter

◆ dragStartOffset

Gdk::Point dragStartOffset
protected

The offset of the mouse relative to the top-left corner of the dragging track.

Definition at line 396 of file timeline-layout-helper.hpp.

Referenced by TimelineLayoutHelper::begin_dragging_track(), TimelineLayoutHelper::drag_to_point(), and TimelineLayoutHelper::layout_headers_recursive().

◆ dragPoint

Gdk::Point dragPoint
protected

The coordinates of the dragging mouse in pixels, measured from the top left of the whole layout.

Remarks
This value is changed by begin_dragging_track and drag_to_point

Definition at line 404 of file timeline-layout-helper.hpp.

Referenced by TimelineLayoutHelper::attempt_drop(), TimelineLayoutHelper::begin_dragging_track(), TimelineLayoutHelper::drag_to_point(), and TimelineLayoutHelper::layout_headers_recursive().

◆ dragBranchHeight

int dragBranchHeight
protected

The total height of the dragging branch in pixels.

Remarks
This value is updated by begin_dragging_track

Definition at line 410 of file timeline-layout-helper.hpp.

Referenced by TimelineLayoutHelper::begin_dragging_track(), and TimelineLayoutHelper::drag_to_point().

◆ dropPoint

DropPoint dropPoint
protected

The tree point the the user is currently hovering on.

Remarks
This value is updated by drag_to_point.

Definition at line 416 of file timeline-layout-helper.hpp.

Referenced by TimelineLayoutHelper::begin_dragging_track(), TimelineLayoutHelper::drag_to_point(), and TimelineLayoutHelper::end_dragging_track().

◆ animationTimer

sigc::connection animationTimer
protected

The connection to the animation timer.

See also
begin_animation()
on_animation_tick()

Definition at line 423 of file timeline-layout-helper.hpp.

Referenced by TimelineLayoutHelper::begin_animation(), and TimelineLayoutHelper::update_layout().

◆ animating

bool animating
protected

This value is true if the layout animation should continue.

Remarks
This value is recalculated by update_layout()
See also
update_layout()
on_animation_tick()

Definition at line 431 of file timeline-layout-helper.hpp.

Referenced by TimelineLayoutHelper::is_animating(), TimelineLayoutHelper::layout_headers_recursive(), TimelineLayoutHelper::on_animation_tick(), and TimelineLayoutHelper::update_layout().

+ Inheritance diagram for TimelineLayoutHelper:
+ Collaboration diagram for TimelineLayoutHelper:

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