Replaced model::Track* with boost::shared_ptr<Track>
This commit is contained in:
parent
f54595b17e
commit
19c97fd52a
12 changed files with 105 additions and 78 deletions
|
|
@ -28,15 +28,8 @@ namespace model {
|
|||
GroupTrack::GroupTrack()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
GroupTrack::add_child_track(Track* child)
|
||||
{
|
||||
REQUIRE(child != NULL);
|
||||
children.push_back(child);
|
||||
}
|
||||
|
||||
const std::list<Track*>&
|
||||
const std::list< boost::shared_ptr<model::Track> >&
|
||||
GroupTrack::get_child_tracks() const
|
||||
{
|
||||
return children;
|
||||
|
|
|
|||
|
|
@ -36,13 +36,12 @@ class GroupTrack : public Track
|
|||
public:
|
||||
GroupTrack();
|
||||
|
||||
void add_child_track(Track* child);
|
||||
|
||||
const std::list<Track*>& get_child_tracks() const;
|
||||
const std::list< boost::shared_ptr<model::Track> >&
|
||||
get_child_tracks() const;
|
||||
|
||||
private:
|
||||
//----- Data -----//
|
||||
std::list<Track*> children;
|
||||
std::list< boost::shared_ptr<Track> > children;
|
||||
};
|
||||
|
||||
} // namespace model
|
||||
|
|
|
|||
|
|
@ -22,13 +22,15 @@
|
|||
|
||||
#include "sequence.hpp"
|
||||
|
||||
using namespace boost;
|
||||
|
||||
namespace gui {
|
||||
namespace model {
|
||||
|
||||
Sequence::Sequence()
|
||||
{
|
||||
// TEST CODE
|
||||
static bool first = true;
|
||||
/*static bool first = true;
|
||||
|
||||
tracks.push_back(&video1);
|
||||
|
||||
|
|
@ -40,7 +42,7 @@ Sequence::Sequence()
|
|||
first = false;
|
||||
}
|
||||
|
||||
tracks.push_back(&video2);
|
||||
tracks.push_back(&video2);*/
|
||||
|
||||
// END TEST CODE
|
||||
}
|
||||
|
|
@ -57,11 +59,17 @@ Sequence::set_name(const Glib::ustring &name)
|
|||
this->name = name;
|
||||
}
|
||||
|
||||
const std::list<Track*>&
|
||||
const std::list< boost::shared_ptr<Track> >&
|
||||
Sequence::get_tracks() const
|
||||
{
|
||||
return tracks;
|
||||
}
|
||||
|
||||
void
|
||||
Sequence::add_track(shared_ptr<Track> track)
|
||||
{
|
||||
tracks.push_back(track);
|
||||
}
|
||||
|
||||
} // namespace model
|
||||
} // namespace gui
|
||||
|
|
|
|||
|
|
@ -47,7 +47,9 @@ public:
|
|||
|
||||
void set_name(const Glib::ustring &name);
|
||||
|
||||
const std::list<Track*>& get_tracks() const;
|
||||
const std::list< boost::shared_ptr<Track> >& get_tracks() const;
|
||||
|
||||
void add_track(boost::shared_ptr<Track> track);
|
||||
|
||||
private:
|
||||
Glib::ustring name;
|
||||
|
|
@ -60,7 +62,7 @@ private:
|
|||
ClipTrack video2;
|
||||
// END TEST CODE
|
||||
|
||||
std::list<Track*> tracks;
|
||||
std::list< boost::shared_ptr<Track> > tracks;
|
||||
};
|
||||
|
||||
} // namespace model
|
||||
|
|
|
|||
|
|
@ -27,14 +27,14 @@
|
|||
namespace gui {
|
||||
namespace model {
|
||||
|
||||
const std::list<Track*> Track::NoChildren;
|
||||
const std::list< boost::shared_ptr<model::Track> > Track::NoChildren;
|
||||
|
||||
Track::Track()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
const std::list<Track*>&
|
||||
const std::list< boost::shared_ptr<model::Track> >&
|
||||
Track::get_child_tracks() const
|
||||
{
|
||||
return NoChildren;
|
||||
|
|
|
|||
|
|
@ -39,12 +39,13 @@ public:
|
|||
|
||||
virtual void add_child_track(Track* child) {};
|
||||
|
||||
virtual const std::list<Track*>& get_child_tracks() const;
|
||||
virtual const std::list< boost::shared_ptr<model::Track> >&
|
||||
get_child_tracks() const;
|
||||
|
||||
Glib::ustring get_title();
|
||||
|
||||
private:
|
||||
static const std::list<Track*> NoChildren;
|
||||
static const std::list< boost::shared_ptr<model::Track> > NoChildren;
|
||||
};
|
||||
|
||||
} // namespace model
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
using namespace Gtk;
|
||||
using namespace std;
|
||||
using namespace boost;
|
||||
using namespace gui::widgets::timeline;
|
||||
|
||||
namespace gui {
|
||||
|
|
@ -102,7 +103,7 @@ TimelineWidget::~TimelineWidget()
|
|||
ruler->unreference();
|
||||
|
||||
// Free allocated timeline tracks
|
||||
pair<model::Track*, timeline::Track*> pair;
|
||||
pair<const model::Track*, timeline::Track*> pair;
|
||||
BOOST_FOREACH( pair, trackMap )
|
||||
delete pair.second;
|
||||
}
|
||||
|
|
@ -288,9 +289,9 @@ TimelineWidget::update_tracks()
|
|||
|
||||
// Recalculate the total height of the timeline scrolled area
|
||||
totalHeight = 0;
|
||||
BOOST_FOREACH(model::Track* track, sequence->get_tracks())
|
||||
BOOST_FOREACH(shared_ptr<model::Track> track, sequence->get_tracks())
|
||||
{
|
||||
ASSERT(track != NULL);
|
||||
ASSERT(track);
|
||||
totalHeight += measure_branch_height(track);
|
||||
}
|
||||
}
|
||||
|
|
@ -300,35 +301,36 @@ TimelineWidget::create_timeline_tracks()
|
|||
{
|
||||
REQUIRE(sequence);
|
||||
|
||||
BOOST_FOREACH(model::Track* child, sequence->get_tracks())
|
||||
BOOST_FOREACH(shared_ptr<model::Track> child, sequence->get_tracks())
|
||||
create_timeline_tracks_from_branch(child);
|
||||
}
|
||||
|
||||
void
|
||||
TimelineWidget::create_timeline_tracks_from_branch(
|
||||
model::Track* const model_track)
|
||||
shared_ptr<model::Track> model_track)
|
||||
{
|
||||
REQUIRE(model_track != NULL);
|
||||
|
||||
// Is a timeline UI track present in the map already?
|
||||
std::map<model::Track*, timeline::Track*>::const_iterator iterator
|
||||
= trackMap.find(model_track);
|
||||
std::map<const model::Track*, timeline::Track*>::const_iterator
|
||||
iterator = trackMap.find(model_track.get());
|
||||
if(iterator == trackMap.end())
|
||||
{
|
||||
// The timeline UI track is not present
|
||||
// We will need to create one
|
||||
trackMap[model_track] =
|
||||
trackMap[model_track.get()] =
|
||||
create_timeline_track_from_model_track(model_track);
|
||||
}
|
||||
|
||||
// Recurse to child tracks
|
||||
BOOST_FOREACH(model::Track* child, model_track->get_child_tracks())
|
||||
BOOST_FOREACH(boost::shared_ptr<model::Track> child,
|
||||
model_track->get_child_tracks())
|
||||
create_timeline_tracks_from_branch(child);
|
||||
}
|
||||
|
||||
timeline::Track*
|
||||
TimelineWidget::create_timeline_track_from_model_track(
|
||||
model::Track* const model_track)
|
||||
boost::shared_ptr<model::Track> model_track)
|
||||
{
|
||||
REQUIRE(model_track);
|
||||
|
||||
|
|
@ -344,11 +346,12 @@ TimelineWidget::create_timeline_track_from_model_track(
|
|||
}
|
||||
|
||||
timeline::Track*
|
||||
TimelineWidget::lookup_timeline_track(model::Track *model_track)
|
||||
TimelineWidget::lookup_timeline_track(
|
||||
boost::shared_ptr<model::Track> model_track)
|
||||
{
|
||||
REQUIRE(sequence);
|
||||
std::map<model::Track*, timeline::Track*>::const_iterator iterator =
|
||||
trackMap.find(model_track);
|
||||
std::map<const model::Track*, timeline::Track*>::const_iterator
|
||||
iterator = trackMap.find(model_track.get());
|
||||
if(iterator == trackMap.end())
|
||||
{
|
||||
// The track is not present in the map
|
||||
|
|
@ -405,7 +408,8 @@ TimelineWidget::update_scroll()
|
|||
}
|
||||
|
||||
int
|
||||
TimelineWidget::measure_branch_height(model::Track* model_track)
|
||||
TimelineWidget::measure_branch_height(
|
||||
boost::shared_ptr<model::Track> model_track)
|
||||
{
|
||||
REQUIRE(model_track != NULL);
|
||||
|
||||
|
|
@ -416,7 +420,8 @@ TimelineWidget::measure_branch_height(model::Track* model_track)
|
|||
int height = timeline_track->get_height() + TrackPadding;
|
||||
|
||||
// Recurse through all the children
|
||||
BOOST_FOREACH( model::Track* child, model_track->get_child_tracks() )
|
||||
BOOST_FOREACH( boost::shared_ptr<model::Track> child,
|
||||
model_track->get_child_tracks() )
|
||||
height += measure_branch_height(child);
|
||||
|
||||
return height;
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ private:
|
|||
* @param list The parent track of the branch.
|
||||
**/
|
||||
void create_timeline_tracks_from_branch(
|
||||
model::Track* const model_track);
|
||||
boost::shared_ptr<model::Track> model_track);
|
||||
|
||||
/**
|
||||
* Creates a timeline UI track to correspond to a model track.
|
||||
|
|
@ -185,7 +185,7 @@ private:
|
|||
* unreckognised type (this is an error condition).
|
||||
**/
|
||||
static timeline::Track* create_timeline_track_from_model_track(
|
||||
model::Track* const model_track);
|
||||
boost::shared_ptr<model::Track> model_track);
|
||||
|
||||
/**
|
||||
* Looks up a timeline UI track in trackMap that corresponds to a
|
||||
|
|
@ -194,11 +194,13 @@ private:
|
|||
* @returns The timeline UI track found, or NULL if model_track has no
|
||||
* corresponding timeline UI track (this is an error condition).
|
||||
**/
|
||||
timeline::Track* lookup_timeline_track(model::Track *model_track);
|
||||
timeline::Track* lookup_timeline_track(
|
||||
boost::shared_ptr<model::Track> model_track);
|
||||
|
||||
void update_scroll();
|
||||
|
||||
int measure_branch_height(model::Track* model_track);
|
||||
int measure_branch_height(
|
||||
boost::shared_ptr<model::Track> model_track);
|
||||
|
||||
int get_y_scroll_offset() const;
|
||||
|
||||
|
|
@ -212,7 +214,7 @@ protected:
|
|||
|
||||
// Model Data
|
||||
const boost::shared_ptr<model::Sequence> sequence;
|
||||
std::map<model::Track*, timeline::Track*> trackMap;
|
||||
std::map<const model::Track*, timeline::Track*> trackMap;
|
||||
|
||||
// View State
|
||||
timeline::TimelineViewWindow viewWindow;
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
using namespace Gtk;
|
||||
using namespace std;
|
||||
using namespace boost;
|
||||
|
||||
namespace gui {
|
||||
namespace widgets {
|
||||
|
|
@ -281,7 +282,7 @@ TimelineBody::draw_tracks(Cairo::RefPtr<Cairo::Context> cr)
|
|||
cr->translate(0, -get_vertical_offset());
|
||||
|
||||
// Interate drawing each track
|
||||
BOOST_FOREACH( model::Track* model_track,
|
||||
BOOST_FOREACH( shared_ptr<model::Track> model_track,
|
||||
timelineWidget->sequence->get_tracks() )
|
||||
draw_track_recursive(cr, model_track, allocation.get_width());
|
||||
|
||||
|
|
@ -291,7 +292,7 @@ TimelineBody::draw_tracks(Cairo::RefPtr<Cairo::Context> cr)
|
|||
|
||||
void
|
||||
TimelineBody::draw_track_recursive(Cairo::RefPtr<Cairo::Context> cr,
|
||||
model::Track *model_track, const int view_width) const
|
||||
shared_ptr<model::Track> model_track, const int view_width) const
|
||||
{
|
||||
REQUIRE(cr);
|
||||
REQUIRE(model_track != NULL);
|
||||
|
|
@ -319,7 +320,8 @@ TimelineBody::draw_track_recursive(Cairo::RefPtr<Cairo::Context> cr,
|
|||
cr->translate(0, height + TimelineWidget::TrackPadding);
|
||||
|
||||
// Recurse drawing into children
|
||||
BOOST_FOREACH( model::Track* child, model_track->get_child_tracks() )
|
||||
BOOST_FOREACH( shared_ptr<model::Track> child,
|
||||
model_track->get_child_tracks() )
|
||||
draw_track_recursive(cr, child, view_width);
|
||||
}
|
||||
|
||||
|
|
@ -428,7 +430,7 @@ TimelineBody::track_from_point(const int y) const
|
|||
|
||||
int offset = -get_vertical_offset();
|
||||
|
||||
BOOST_FOREACH( model::Track* model_track,
|
||||
BOOST_FOREACH( shared_ptr<model::Track> model_track,
|
||||
timelineWidget->sequence->get_tracks() )
|
||||
{
|
||||
timeline::Track* result = track_from_branch(
|
||||
|
|
@ -442,7 +444,7 @@ TimelineBody::track_from_point(const int y) const
|
|||
}
|
||||
|
||||
timeline::Track* TimelineBody::track_from_branch(
|
||||
model::Track *model_track,
|
||||
shared_ptr<model::Track> model_track,
|
||||
const int y, int &offset) const
|
||||
{
|
||||
REQUIRE(timelineWidget != NULL);
|
||||
|
|
@ -462,7 +464,8 @@ timeline::Track* TimelineBody::track_from_branch(
|
|||
offset += height;
|
||||
|
||||
// Recurse drawing into children
|
||||
BOOST_FOREACH( model::Track* child, model_track->get_child_tracks() )
|
||||
BOOST_FOREACH( shared_ptr<model::Track> child,
|
||||
model_track->get_child_tracks() )
|
||||
{
|
||||
timeline::Track* result = track_from_branch(child, y, offset);
|
||||
if(result != NULL)
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ private:
|
|||
void draw_tracks(Cairo::RefPtr<Cairo::Context> cr);
|
||||
|
||||
void draw_track_recursive(Cairo::RefPtr<Cairo::Context> cr,
|
||||
model::Track *track, const int view_width) const;
|
||||
boost::shared_ptr<model::Track> track, const int view_width) const;
|
||||
|
||||
/**
|
||||
* Draws the selected timeline period.
|
||||
|
|
@ -141,7 +141,8 @@ private:
|
|||
|
||||
timeline::Track* track_from_point(const int y) const;
|
||||
|
||||
timeline::Track* track_from_branch(model::Track *model_track,
|
||||
timeline::Track* track_from_branch(
|
||||
boost::shared_ptr<model::Track> model_track,
|
||||
const int y, int &offset) const;
|
||||
|
||||
/**
|
||||
|
|
@ -177,7 +178,7 @@ private:
|
|||
float selectionAlpha;
|
||||
GdkColor playbackPointColour;
|
||||
|
||||
gui::widgets::TimelineWidget *timelineWidget;
|
||||
gui::widgets::TimelineWidget* const timelineWidget;
|
||||
|
||||
friend class Tool;
|
||||
friend class ArrowTool;
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
using namespace Gtk;
|
||||
using namespace std;
|
||||
using namespace boost;
|
||||
|
||||
namespace gui {
|
||||
namespace widgets {
|
||||
|
|
@ -69,7 +70,7 @@ void
|
|||
TimelineHeaderContainer::update_headers()
|
||||
{
|
||||
// Add fresh headers
|
||||
BOOST_FOREACH( model::Track* model_track, get_tracks() )
|
||||
BOOST_FOREACH( shared_ptr<model::Track> model_track, get_tracks() )
|
||||
set_parent_recursive(model_track);
|
||||
}
|
||||
|
||||
|
|
@ -179,7 +180,7 @@ TimelineHeaderContainer::on_size_request (Requisition* requisition)
|
|||
// We don't care about the size of all the child widgets, but if we
|
||||
// don't send the size request down the tree, some widgets fail to
|
||||
// calculate their text layout correctly.
|
||||
BOOST_FOREACH( model::Track* model_track, get_tracks() )
|
||||
BOOST_FOREACH( shared_ptr<model::Track> model_track, get_tracks() )
|
||||
size_request_recursive(model_track);
|
||||
|
||||
// Initialize the output parameter:
|
||||
|
|
@ -208,7 +209,7 @@ TimelineHeaderContainer::forall_vfunc(gboolean /* include_internals */,
|
|||
{
|
||||
REQUIRE(callback != NULL);
|
||||
|
||||
BOOST_FOREACH( model::Track* track, get_tracks() )
|
||||
BOOST_FOREACH( shared_ptr<model::Track> track, get_tracks() )
|
||||
{
|
||||
ASSERT(track != NULL);
|
||||
forall_vfunc_recursive(track, callback, callback_data);
|
||||
|
|
@ -228,7 +229,8 @@ TimelineHeaderContainer::on_expose_event(GdkEventExpose *event)
|
|||
read_styles();
|
||||
|
||||
// Paint a border underneath all the root headers
|
||||
BOOST_FOREACH( model::Track* model_track, get_tracks() )
|
||||
BOOST_FOREACH( shared_ptr<model::Track> model_track,
|
||||
get_tracks() )
|
||||
{
|
||||
ASSERT(model_track != NULL);
|
||||
|
||||
|
|
@ -277,7 +279,7 @@ TimelineHeaderContainer::layout_headers()
|
|||
const Allocation container_allocation = get_allocation();
|
||||
const int header_width = container_allocation.get_width();
|
||||
|
||||
BOOST_FOREACH( model::Track* model_track, get_tracks() )
|
||||
BOOST_FOREACH( shared_ptr<model::Track> model_track, get_tracks() )
|
||||
layout_headers_recursive(
|
||||
model_track, offset, header_width, 0, true);
|
||||
|
||||
|
|
@ -287,8 +289,8 @@ TimelineHeaderContainer::layout_headers()
|
|||
|
||||
void
|
||||
TimelineHeaderContainer::layout_headers_recursive(
|
||||
model::Track *model_track, int &offset, const int header_width,
|
||||
const int depth, bool parent_expanded)
|
||||
shared_ptr<model::Track> model_track, int &offset,
|
||||
const int header_width, const int depth, bool parent_expanded)
|
||||
{
|
||||
REQUIRE(depth >= 0);
|
||||
REQUIRE(model_track != NULL);
|
||||
|
|
@ -335,7 +337,8 @@ TimelineHeaderContainer::layout_headers_recursive(
|
|||
widget.hide();
|
||||
|
||||
// Recurse through all the children
|
||||
BOOST_FOREACH( model::Track* child, model_track->get_child_tracks() )
|
||||
BOOST_FOREACH( boost::shared_ptr<model::Track> child,
|
||||
model_track->get_child_tracks() )
|
||||
layout_headers_recursive(
|
||||
child, offset, header_width, depth + 1,
|
||||
timeline_track->get_expanded() && parent_expanded);
|
||||
|
|
@ -343,19 +346,20 @@ TimelineHeaderContainer::layout_headers_recursive(
|
|||
|
||||
void
|
||||
TimelineHeaderContainer::set_parent_recursive(
|
||||
model::Track* const model_track)
|
||||
boost::shared_ptr<model::Track> model_track)
|
||||
{
|
||||
lookup_timeline_track(model_track)->
|
||||
get_header_widget().set_parent(*this);
|
||||
|
||||
// Recurse through all the children
|
||||
BOOST_FOREACH( model::Track* child, model_track->get_child_tracks() )
|
||||
BOOST_FOREACH( boost::shared_ptr<model::Track> child,
|
||||
model_track->get_child_tracks() )
|
||||
set_parent_recursive(child);
|
||||
}
|
||||
|
||||
void
|
||||
TimelineHeaderContainer::size_request_recursive(
|
||||
model::Track* const model_track)
|
||||
shared_ptr<model::Track> const model_track)
|
||||
{
|
||||
Widget &widget =
|
||||
lookup_timeline_track(model_track)->get_header_widget();
|
||||
|
|
@ -363,13 +367,14 @@ TimelineHeaderContainer::size_request_recursive(
|
|||
widget.size_request();
|
||||
|
||||
// Recurse through all the children
|
||||
BOOST_FOREACH( model::Track* child, model_track->get_child_tracks() )
|
||||
BOOST_FOREACH( shared_ptr<model::Track> child,
|
||||
model_track->get_child_tracks() )
|
||||
size_request_recursive(child);
|
||||
}
|
||||
|
||||
void
|
||||
TimelineHeaderContainer::forall_vfunc_recursive(
|
||||
model::Track* const model_track, GtkCallback callback,
|
||||
shared_ptr<model::Track> model_track, GtkCallback callback,
|
||||
gpointer callback_data)
|
||||
{
|
||||
REQUIRE(callback != NULL);
|
||||
|
|
@ -378,13 +383,14 @@ TimelineHeaderContainer::forall_vfunc_recursive(
|
|||
get_header_widget().gobj(), callback_data) ;
|
||||
|
||||
// Recurse through all the children
|
||||
BOOST_FOREACH( model::Track* child, model_track->get_child_tracks() )
|
||||
BOOST_FOREACH( shared_ptr<model::Track> child,
|
||||
model_track->get_child_tracks() )
|
||||
forall_vfunc_recursive(child, callback, callback_data);
|
||||
}
|
||||
|
||||
void
|
||||
TimelineHeaderContainer::draw_header_decoration(
|
||||
model::Track* const model_track,
|
||||
shared_ptr<model::Track> model_track,
|
||||
const Gdk::Rectangle &clip_rect)
|
||||
{
|
||||
REQUIRE(model_track != NULL);
|
||||
|
|
@ -435,7 +441,7 @@ TimelineHeaderContainer::draw_header_decoration(
|
|||
|
||||
// Recurse through all the children
|
||||
if(timeline_track->get_expanded())
|
||||
BOOST_FOREACH( model::Track* child,
|
||||
BOOST_FOREACH( shared_ptr<model::Track> child,
|
||||
model_track->get_child_tracks() )
|
||||
draw_header_decoration(child, clip_rect);
|
||||
}
|
||||
|
|
@ -476,7 +482,7 @@ TimelineHeaderContainer::get_expander_button_rectangle(
|
|||
|
||||
timeline::Track*
|
||||
TimelineHeaderContainer::lookup_timeline_track(
|
||||
model::Track *model_track)
|
||||
shared_ptr<model::Track> model_track)
|
||||
{
|
||||
REQUIRE(model_track != NULL);
|
||||
REQUIRE(timelineWidget != NULL);
|
||||
|
|
@ -488,7 +494,7 @@ TimelineHeaderContainer::lookup_timeline_track(
|
|||
return timeline_track;
|
||||
}
|
||||
|
||||
const std::list<model::Track*>&
|
||||
const std::list< boost::shared_ptr<model::Track> >&
|
||||
TimelineHeaderContainer::get_tracks() const
|
||||
{
|
||||
REQUIRE(timelineWidget != NULL);
|
||||
|
|
|
|||
|
|
@ -152,34 +152,39 @@ private:
|
|||
* @param header_width The width of this widget in pixels.
|
||||
* @param depth The depth within the tree of track.
|
||||
**/
|
||||
void layout_headers_recursive(model::Track *track, int &offset,
|
||||
const int header_width, const int depth, bool parent_expanded);
|
||||
void layout_headers_recursive(boost::shared_ptr<model::Track> track,
|
||||
int &offset, const int header_width, const int depth,
|
||||
bool parent_expanded);
|
||||
|
||||
/**
|
||||
* Recursively sets all the track header widgets to be child widgets
|
||||
* of this widget.
|
||||
* @param track The parent track object which will be recursed into.
|
||||
**/
|
||||
void set_parent_recursive(model::Track* const model_track);
|
||||
void set_parent_recursive(boost::shared_ptr<model::Track> const
|
||||
model_track);
|
||||
|
||||
/**
|
||||
* Recursively causes all the visible track header widgets to call
|
||||
* size_request( ).
|
||||
**/
|
||||
void size_request_recursive(model::Track* const model_track);
|
||||
void size_request_recursive(
|
||||
boost::shared_ptr<model::Track> model_track);
|
||||
|
||||
void forall_vfunc_recursive(model::Track* const model_track,
|
||||
void forall_vfunc_recursive(
|
||||
boost::shared_ptr<model::Track> model_track,
|
||||
GtkCallback callback, gpointer callback_data);
|
||||
|
||||
/**
|
||||
* Draws the border decoration around the track header.
|
||||
* @param track The track to draw the decoration for.
|
||||
* @param model_track The track to draw the decoration for.
|
||||
* @param clip_rect The clip to drawing to.
|
||||
* @param depth The depth within the tree of this track. This is used
|
||||
* to control the amount of indention.
|
||||
* @param offset The vertical offset of the headers in pixels.
|
||||
**/
|
||||
void draw_header_decoration(model::Track* const track,
|
||||
void draw_header_decoration(
|
||||
boost::shared_ptr<model::Track> model_track,
|
||||
const Gdk::Rectangle &clip_rect);
|
||||
|
||||
Track* expander_button_from_point(const Gdk::Point &point);
|
||||
|
|
@ -197,7 +202,8 @@ private:
|
|||
* @remarks If the return value is going to be NULL, an ENSURE will
|
||||
* fail.
|
||||
**/
|
||||
timeline::Track* lookup_timeline_track(model::Track *model_track);
|
||||
timeline::Track* lookup_timeline_track(
|
||||
boost::shared_ptr<model::Track> model_track);
|
||||
|
||||
/**
|
||||
* A helper function which calls get_tracks within the sequence of the
|
||||
|
|
@ -207,7 +213,8 @@ private:
|
|||
* @return Returns the track found, or returns NULL if no matching
|
||||
* track was found.
|
||||
**/
|
||||
const std::list<model::Track*>& get_tracks() const;
|
||||
const std::list< boost::shared_ptr<model::Track> >&
|
||||
get_tracks() const;
|
||||
|
||||
/**
|
||||
* Registers all the styles that this class will respond to.
|
||||
|
|
@ -224,7 +231,7 @@ private:
|
|||
/**
|
||||
* The owner TimelineWidget of which this class is a helper
|
||||
*/
|
||||
gui::widgets::TimelineWidget *timelineWidget;
|
||||
gui::widgets::TimelineWidget* const timelineWidget;
|
||||
|
||||
/**
|
||||
* The widget's window object.
|
||||
|
|
|
|||
Loading…
Reference in a new issue