a bit of stylistic cleanup
- using std::tr1::shared_ptr in namespace gui - thus removing a lot of std::tr1 qualifications - fix some includes. Should be relative to 'src' - interface classes should declare a virtual dtor!
This commit is contained in:
parent
c9a0209a0b
commit
2730fa8d7a
38 changed files with 173 additions and 183 deletions
|
|
@ -55,11 +55,15 @@
|
|||
#include "gui/window-manager.hpp"
|
||||
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <tr1/memory>
|
||||
#include <vector>
|
||||
|
||||
|
||||
namespace gui {
|
||||
|
||||
using std::tr1::shared_ptr;
|
||||
|
||||
|
||||
|
||||
/* ====== The Application Class ====== */
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
#ifndef CLIP_TRACK_HPP
|
||||
#define CLIP_TRACK_HPP
|
||||
|
||||
#include "track.hpp"
|
||||
#include "gui/model/track.hpp"
|
||||
#include "lib/observable-list.hpp"
|
||||
|
||||
namespace gui {
|
||||
|
|
@ -53,12 +53,12 @@ namespace model {
|
|||
/**
|
||||
* Gets the list of clips associated with this track.
|
||||
*/
|
||||
lumiera::observable_list< std::tr1::shared_ptr<Clip> >&
|
||||
lumiera::observable_list<shared_ptr<Clip> >&
|
||||
getClipList(void);
|
||||
|
||||
private:
|
||||
|
||||
lumiera::observable_list< std::tr1::shared_ptr<Clip> > clips;
|
||||
lumiera::observable_list<shared_ptr<Clip> > clips;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
#include "parent-track.hpp"
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
using namespace boost;
|
||||
using std::tr1::shared_ptr;
|
||||
|
||||
namespace gui {
|
||||
|
|
@ -33,13 +32,13 @@ ParentTrack::ParentTrack()
|
|||
{
|
||||
}
|
||||
|
||||
const std::list< std::tr1::shared_ptr<Track> >&
|
||||
const std::list<shared_ptr<Track> >&
|
||||
ParentTrack::get_child_tracks() const
|
||||
{
|
||||
return tracks.get_list();
|
||||
}
|
||||
|
||||
lumiera::observable_list< std::tr1::shared_ptr<Track> >&
|
||||
lumiera::observable_list<shared_ptr<Track> >&
|
||||
ParentTrack::get_child_track_list()
|
||||
{
|
||||
return tracks;
|
||||
|
|
@ -53,11 +52,11 @@ ParentTrack::can_host_children() const
|
|||
|
||||
bool
|
||||
ParentTrack::remove_descendant_track(
|
||||
const std::tr1::shared_ptr<Track> track)
|
||||
const shared_ptr<Track> track)
|
||||
{
|
||||
REQUIRE(track);
|
||||
|
||||
std::tr1::shared_ptr<ParentTrack> parent =
|
||||
shared_ptr<ParentTrack> parent =
|
||||
find_descendant_track_parent(track);
|
||||
if(parent)
|
||||
{
|
||||
|
|
@ -68,10 +67,10 @@ ParentTrack::remove_descendant_track(
|
|||
return false;
|
||||
}
|
||||
|
||||
std::tr1::shared_ptr<ParentTrack>
|
||||
ParentTrack::find_descendant_track_parent(
|
||||
std::tr1::shared_ptr<Track> child)
|
||||
shared_ptr<ParentTrack>
|
||||
ParentTrack::find_descendant_track_parent(shared_ptr<Track> child)
|
||||
{
|
||||
using namespace boost;
|
||||
|
||||
REQUIRE(child != NULL);
|
||||
BOOST_FOREACH(std::tr1::shared_ptr<Track> track, tracks)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
#ifndef PARENT_TRACK_HPP
|
||||
#define PARENT_TRACK_HPP
|
||||
|
||||
#include "track.hpp"
|
||||
#include "gui/model/track.hpp"
|
||||
#include "lib/observable-list.hpp"
|
||||
|
||||
namespace gui {
|
||||
|
|
@ -53,13 +53,13 @@ public:
|
|||
/**
|
||||
* Gets a read-only reference to the the list of child tracks.
|
||||
*/
|
||||
const std::list< std::tr1::shared_ptr<Track> >&
|
||||
const std::list<shared_ptr<Track> >&
|
||||
get_child_tracks() const;
|
||||
|
||||
/**
|
||||
* Gets read-write access to the list of child tracks.
|
||||
*/
|
||||
lumiera::observable_list< std::tr1::shared_ptr<Track> >&
|
||||
lumiera::observable_list<shared_ptr<Track> >&
|
||||
get_child_track_list();
|
||||
|
||||
/**
|
||||
|
|
@ -75,7 +75,7 @@ public:
|
|||
* @param The model track to try and remove.
|
||||
* @return Returns true if the track was successfully removed.
|
||||
*/
|
||||
bool remove_descendant_track(const std::tr1::shared_ptr<Track> track);
|
||||
bool remove_descendant_track (const shared_ptr<Track> track);
|
||||
|
||||
/**
|
||||
* A utility function that attempts to find the parent of a track by
|
||||
|
|
@ -84,14 +84,14 @@ public:
|
|||
* @return Returns the parent track if one was found, or an empty
|
||||
* shared_ptr if none was found.
|
||||
*/
|
||||
std::tr1::shared_ptr<ParentTrack>
|
||||
find_descendant_track_parent(std::tr1::shared_ptr<Track> child);
|
||||
shared_ptr<ParentTrack>
|
||||
find_descendant_track_parent (shared_ptr<Track> child);
|
||||
|
||||
protected:
|
||||
/**
|
||||
* The internal list of child tracks of this parent.
|
||||
*/
|
||||
lumiera::observable_list< std::tr1::shared_ptr<Track> > tracks;
|
||||
lumiera::observable_list<shared_ptr<Track> > tracks;
|
||||
};
|
||||
|
||||
} // namespace model
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#ifndef PROJECT_HPP
|
||||
#define PROJECT_HPP
|
||||
|
||||
#include "sequence.hpp"
|
||||
#include "gui/model/sequence.hpp"
|
||||
#include "lib/observable-list.hpp"
|
||||
|
||||
namespace gui {
|
||||
|
|
@ -40,14 +40,14 @@ public:
|
|||
|
||||
~Project();
|
||||
|
||||
lumiera::observable_list< std::tr1::shared_ptr<Sequence> >&
|
||||
lumiera::observable_list<shared_ptr<Sequence> >&
|
||||
get_sequences();
|
||||
|
||||
void add_new_sequence(uString name);
|
||||
|
||||
private:
|
||||
|
||||
lumiera::observable_list< std::tr1::shared_ptr<Sequence> > sequences;
|
||||
lumiera::observable_list<shared_ptr<Sequence> > sequences;
|
||||
};
|
||||
|
||||
} // namespace model
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#ifndef SEQUENCE_HPP
|
||||
#define SEQUENCE_HPP
|
||||
|
||||
#include "parent-track.hpp"
|
||||
#include "gui/model/parent-track.hpp"
|
||||
|
||||
namespace gui {
|
||||
namespace model {
|
||||
|
|
|
|||
|
|
@ -35,9 +35,10 @@ const list< shared_ptr<Track> > Track::NoChildren;
|
|||
Track::Track()
|
||||
: enabled(true),
|
||||
locked(false)
|
||||
{
|
||||
{ }
|
||||
|
||||
Track::~Track() { }
|
||||
|
||||
}
|
||||
|
||||
const std::list< shared_ptr<Track> >&
|
||||
Track::get_child_tracks() const
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ protected:
|
|||
Track();
|
||||
|
||||
public:
|
||||
virtual ~Track(); /// this is an interface
|
||||
|
||||
/**
|
||||
* Returns true if this track can own any child tracks.
|
||||
|
|
@ -57,7 +58,7 @@ public:
|
|||
/**
|
||||
* Gets the list of child tracks.
|
||||
*/
|
||||
virtual const std::list< std::tr1::shared_ptr<Track> >&
|
||||
virtual const std::list<shared_ptr<Track> >&
|
||||
get_child_tracks () const;
|
||||
|
||||
/**
|
||||
|
|
@ -106,8 +107,8 @@ public:
|
|||
* @return Returns the parent track if one was found, or an empty
|
||||
* shared_ptr if none was found.
|
||||
*/
|
||||
virtual std::tr1::shared_ptr<ParentTrack>
|
||||
find_descendant_track_parent (std::tr1::shared_ptr<Track> child);
|
||||
virtual shared_ptr<ParentTrack>
|
||||
find_descendant_track_parent (shared_ptr<Track> child);
|
||||
|
||||
/**
|
||||
* A signal which fires when the enabled status changes.
|
||||
|
|
@ -154,7 +155,7 @@ protected:
|
|||
* An object used internally as a return value for when there's no
|
||||
* children.
|
||||
*/
|
||||
static const std::list< std::tr1::shared_ptr<Track> > NoChildren;
|
||||
static const std::list< shared_ptr<Track> > NoChildren;
|
||||
|
||||
/**
|
||||
* The internal implementation of print_branch.
|
||||
|
|
|
|||
|
|
@ -130,8 +130,7 @@ TimelinePanel::TimelinePanel (workspace::PanelManager &panel_manager,
|
|||
zoomScale .set_tooltip_text(_("Adjust timeline zoom scale"));
|
||||
|
||||
// Setup the timeline widget
|
||||
shared_ptr<Sequence> sequence ///////////////////////////////TICKET #796 : should use std::tr1::shared_ptr instead of boost
|
||||
= *get_project().get_sequences().begin();
|
||||
shared_ptr<Sequence> sequence = *(get_project().get_sequences().begin());
|
||||
timelineWidget.reset(new TimelineWidget(load_state(sequence)));
|
||||
pack_start(*timelineWidget, PACK_EXPAND_WIDGET);
|
||||
|
||||
|
|
|
|||
|
|
@ -36,9 +36,15 @@
|
|||
|
||||
#include "lib/time/timevalue.hpp"
|
||||
|
||||
#include <tr1/memory>
|
||||
|
||||
using namespace gui::widgets;
|
||||
|
||||
namespace gui {
|
||||
|
||||
using std::tr1::shared_ptr;
|
||||
using std::tr1::weak_ptr;
|
||||
|
||||
|
||||
namespace model {
|
||||
class Sequence;
|
||||
|
|
@ -49,6 +55,7 @@ namespace panels {
|
|||
using lib::time::Time;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* The definition of the timeline panel class, which holds timeline
|
||||
* widgets.
|
||||
|
|
@ -123,8 +130,8 @@ private:
|
|||
|
||||
void show_time (Time);
|
||||
|
||||
std::tr1::shared_ptr<widgets::timeline::TimelineState>
|
||||
load_state (std::tr1::weak_ptr<model::Sequence> sequence);
|
||||
shared_ptr<widgets::timeline::TimelineState>
|
||||
load_state (weak_ptr<model::Sequence> sequence);
|
||||
|
||||
private:
|
||||
|
||||
|
|
@ -144,7 +151,7 @@ private:
|
|||
* An invisible column which will be used to identify the sequence
|
||||
* of a row.
|
||||
*/
|
||||
Gtk::TreeModelColumn< std::tr1::weak_ptr<model::Sequence> >
|
||||
Gtk::TreeModelColumn< weak_ptr<model::Sequence> >
|
||||
sequenceColumn;
|
||||
|
||||
/**
|
||||
|
|
@ -169,8 +176,9 @@ private:
|
|||
// Body Widgets
|
||||
boost::scoped_ptr<TimelineWidget> timelineWidget;
|
||||
|
||||
std::map< std::tr1::weak_ptr<model::Sequence>,
|
||||
std::tr1::shared_ptr<widgets::timeline::TimelineState> >
|
||||
std::map< weak_ptr<model::Sequence>
|
||||
, shared_ptr<widgets::timeline::TimelineState>
|
||||
>
|
||||
timelineStates;
|
||||
|
||||
// Toolbar Widgets
|
||||
|
|
|
|||
|
|
@ -44,18 +44,17 @@ const int TimelineWidget::HeaderIndentWidth = 10;
|
|||
const double TimelineWidget::ZoomIncrement = 1.25;
|
||||
const int64_t TimelineWidget::MaxScale = 30000000; // 30 Million
|
||||
|
||||
TimelineWidget::TimelineWidget(
|
||||
std::tr1::shared_ptr<timeline::TimelineState> source_state) :
|
||||
Table(2, 2),
|
||||
layoutHelper(*this),
|
||||
headerContainer(NULL),
|
||||
body(NULL),
|
||||
ruler(NULL),
|
||||
horizontalAdjustment(0, 0, 0),
|
||||
verticalAdjustment(0, 0, 0),
|
||||
horizontalScroll(horizontalAdjustment),
|
||||
verticalScroll(verticalAdjustment),
|
||||
update_tracks_frozen(false)
|
||||
TimelineWidget::TimelineWidget(shared_ptr<timeline::TimelineState> source_state)
|
||||
: Table(2, 2)
|
||||
, layoutHelper(*this)
|
||||
, headerContainer(NULL)
|
||||
, body(NULL)
|
||||
, ruler(NULL)
|
||||
, horizontalAdjustment(0, 0, 0)
|
||||
, verticalAdjustment(0, 0, 0)
|
||||
, horizontalScroll(horizontalAdjustment)
|
||||
, verticalScroll(verticalAdjustment)
|
||||
, update_tracks_frozen(false)
|
||||
{
|
||||
body = manage(new TimelineBody(*this));
|
||||
ENSURE(body != NULL);
|
||||
|
|
|
|||
|
|
@ -64,17 +64,13 @@ class TimelineWidget : public Gtk::Table
|
|||
{
|
||||
public:
|
||||
/**
|
||||
* Constructor
|
||||
* @param source_state The state that will be used as the data source
|
||||
* for this timeline widget.
|
||||
*/
|
||||
TimelineWidget(
|
||||
std::tr1::shared_ptr<timeline::TimelineState> source_state);
|
||||
TimelineWidget (shared_ptr<timeline::TimelineState> source_state);
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
~TimelineWidget();
|
||||
virtual ~TimelineWidget();
|
||||
|
||||
|
||||
/* ===== Data Access ===== */
|
||||
public:
|
||||
|
|
@ -84,13 +80,13 @@ public:
|
|||
* @return The state object that the timeline widget is currently
|
||||
* working with.
|
||||
*/
|
||||
std::tr1::shared_ptr<timeline::TimelineState> get_state();
|
||||
shared_ptr<timeline::TimelineState> get_state();
|
||||
|
||||
/**
|
||||
* Replaces the current TimelineState object with another.
|
||||
* @param new_state The new state to swap in.
|
||||
*/
|
||||
void set_state(std::tr1::shared_ptr<timeline::TimelineState> new_state);
|
||||
void set_state(shared_ptr<timeline::TimelineState> new_state);
|
||||
|
||||
/**
|
||||
* Zooms the view in or out as by a number of steps while keeping a
|
||||
|
|
@ -110,13 +106,13 @@ public:
|
|||
*/
|
||||
void set_tool(timeline::ToolType tool_type);
|
||||
|
||||
std::tr1::shared_ptr<timeline::Track>
|
||||
shared_ptr<timeline::Track>
|
||||
get_hovering_track() const;
|
||||
|
||||
public:
|
||||
/* ===== Signals ===== */
|
||||
typedef sigc::signal<void, std::tr1::shared_ptr<timeline::TimelineState> > TimelineStateChangeSignal;
|
||||
typedef sigc::signal<void, std::tr1::shared_ptr<timeline::Track> > HoveringTrackChangedSignal;
|
||||
typedef sigc::signal<void, shared_ptr<timeline::TimelineState> > TimelineStateChangeSignal;
|
||||
typedef sigc::signal<void, shared_ptr<timeline::Track> > HoveringTrackChangedSignal;
|
||||
|
||||
sigc::signal<void, lib::time::Time> mouse_hover_signal() const;
|
||||
|
||||
|
|
@ -169,8 +165,8 @@ private:
|
|||
* already exist in trackMap.
|
||||
* @param list The parent track of the branch.
|
||||
*/
|
||||
void create_timeline_tracks_from_branch(
|
||||
std::tr1::shared_ptr<model::Track> modelTrack);
|
||||
void
|
||||
create_timeline_tracks_from_branch (shared_ptr<model::Track> modelTrack);
|
||||
|
||||
/**
|
||||
* Creates a timeline UI track to correspond to a model track.
|
||||
|
|
@ -178,9 +174,8 @@ private:
|
|||
* @return The timeline track created, or an empty shared_ptr if
|
||||
* modelTrack has an unreckognised type (this is an error condition).
|
||||
*/
|
||||
std::tr1::shared_ptr<timeline::Track>
|
||||
create_timeline_track_from_modelTrack(
|
||||
std::tr1::shared_ptr<model::Track> modelTrack);
|
||||
shared_ptr<timeline::Track>
|
||||
create_timeline_track_from_modelTrack(shared_ptr<model::Track> modelTrack);
|
||||
|
||||
/**
|
||||
* Removes any UI tracks which no longer have corresponding model
|
||||
|
|
@ -188,10 +183,10 @@ private:
|
|||
*/
|
||||
void remove_orphaned_tracks();
|
||||
|
||||
void search_orphaned_tracks_in_branch(
|
||||
std::tr1::shared_ptr<model::Track> modelTrack,
|
||||
std::map<std::tr1::shared_ptr<model::Track>,
|
||||
std::tr1::shared_ptr<timeline::Track> > &orphan_track_map);
|
||||
void
|
||||
search_orphaned_tracks_in_branch (shared_ptr<model::Track> modelTrack,
|
||||
std::map<shared_ptr<model::Track>,
|
||||
shared_ptr<timeline::Track> > &orphan_track_map);
|
||||
|
||||
/**
|
||||
* Looks up a timeline UI track in trackMap that corresponds to a
|
||||
|
|
@ -201,8 +196,8 @@ private:
|
|||
* modelTrack has no corresponding timeline UI track (this is an
|
||||
* error condition).
|
||||
*/
|
||||
std::tr1::shared_ptr<timeline::Track> lookup_timeline_track(
|
||||
std::tr1::shared_ptr<model::Track> modelTrack) const;
|
||||
shared_ptr<timeline::Track>
|
||||
lookup_timeline_track (shared_ptr<model::Track> modelTrack) const;
|
||||
|
||||
// ----- Layout Functions ----- //
|
||||
|
||||
|
|
@ -232,12 +227,12 @@ private:
|
|||
* Helper to get the sequence object from the state.
|
||||
* @return Returns a shared pointer to the sequence.
|
||||
*/
|
||||
std::tr1::shared_ptr<model::Sequence> sequence() const;
|
||||
shared_ptr<model::Sequence> sequence() const;
|
||||
|
||||
// ----- Other Functions ----- //
|
||||
|
||||
void set_hovering_track(
|
||||
std::tr1::shared_ptr<timeline::Track> hovering_track);
|
||||
void
|
||||
set_hovering_track (shared_ptr<timeline::Track> hovering_track);
|
||||
|
||||
protected:
|
||||
|
||||
|
|
@ -245,7 +240,7 @@ protected:
|
|||
* The state that will be used as the data source for this timeline
|
||||
* widget.
|
||||
*/
|
||||
std::tr1::shared_ptr<timeline::TimelineState> state;
|
||||
shared_ptr<timeline::TimelineState> state;
|
||||
|
||||
// Model Data
|
||||
|
||||
|
|
@ -256,11 +251,11 @@ protected:
|
|||
* widget is updated with update_tracks, timeline tracks are added and
|
||||
* removed from the map in correspondence with the tree.
|
||||
*/
|
||||
std::map<std::tr1::shared_ptr<model::Track>,
|
||||
std::tr1::shared_ptr<timeline::Track> >
|
||||
std::map<shared_ptr<model::Track>
|
||||
,shared_ptr<timeline::Track> >
|
||||
trackMap;
|
||||
|
||||
std::tr1::shared_ptr<timeline::Track> hoveringTrack;
|
||||
shared_ptr<timeline::Track> hoveringTrack;
|
||||
|
||||
// Helper Classes
|
||||
timeline::TimelineLayoutHelper layoutHelper;
|
||||
|
|
|
|||
|
|
@ -55,17 +55,17 @@ namespace timeline {
|
|||
Tool::on_button_press_event(event);
|
||||
|
||||
// Convert the mouse click position to a Time
|
||||
std::tr1::shared_ptr<TimelineState> state = timelineBody.getTimelineWidget().get_state();
|
||||
shared_ptr<TimelineState> state = timelineBody.getTimelineWidget().get_state();
|
||||
REQUIRE(state);
|
||||
TimelineViewWindow const& window = state->get_view_window();
|
||||
Time tpoint = window.x_to_time(mousePoint.get_x());
|
||||
|
||||
// Get the clip, if any
|
||||
std::tr1::shared_ptr<timeline::Track> track = getHoveringTrack();
|
||||
std::tr1::shared_ptr<Clip> clip = track->getClipAt(tpoint);
|
||||
shared_ptr<timeline::Track> track = getHoveringTrack();
|
||||
shared_ptr<Clip> clip = track->getClipAt(tpoint);
|
||||
|
||||
// Nothing to do if there is no clip
|
||||
if (clip == std::tr1::shared_ptr<Clip>())
|
||||
if (!clip)
|
||||
return;
|
||||
|
||||
clip->setSelected(true);
|
||||
|
|
@ -77,8 +77,7 @@ namespace timeline {
|
|||
REQUIRE (event != NULL);
|
||||
Tool::on_button_release_event(event);
|
||||
|
||||
std::tr1::shared_ptr<timeline::Track> track =
|
||||
getHoveringTrack();
|
||||
shared_ptr<timeline::Track> track = getHoveringTrack();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -92,10 +91,10 @@ namespace timeline {
|
|||
return;
|
||||
}
|
||||
|
||||
std::tr1::shared_ptr<timeline::Track>
|
||||
shared_ptr<timeline::Track>
|
||||
ArrowTool::getHoveringTrack ()
|
||||
{
|
||||
std::tr1::shared_ptr<timeline::Track> track(
|
||||
shared_ptr<timeline::Track> track(
|
||||
timelineBody.getTimelineWidget().get_hovering_track());
|
||||
return track;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ namespace timeline {
|
|||
|
||||
private:
|
||||
|
||||
std::tr1::shared_ptr<timeline::Track>
|
||||
shared_ptr<timeline::Track>
|
||||
getHoveringTrack ();
|
||||
|
||||
bool selectionRectangleActive;
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ protected:
|
|||
/**
|
||||
* The event handler for when the TimelineWidget's state is switched.
|
||||
*/
|
||||
void on_state_changed (std::tr1::shared_ptr<TimelineState> newState);
|
||||
void on_state_changed (shared_ptr<TimelineState> newState);
|
||||
|
||||
/* ===== Internals ===== */
|
||||
private:
|
||||
|
|
@ -142,8 +142,8 @@ private:
|
|||
void draw_tracks(Cairo::RefPtr<Cairo::Context> cr);
|
||||
|
||||
void draw_track(Cairo::RefPtr<Cairo::Context> cr,
|
||||
std::tr1::shared_ptr<timeline::Track> timeline_track,
|
||||
const int view_width) const;
|
||||
shared_ptr<timeline::Track> timeline_track,
|
||||
const int view_width) const;
|
||||
|
||||
/**
|
||||
* Draws the selected timeline period.
|
||||
|
|
@ -200,7 +200,7 @@ private:
|
|||
Cairo::RefPtr<Cairo::SolidPattern> playbackPointColour;
|
||||
|
||||
gui::widgets::TimelineWidget &timelineWidget;
|
||||
std::tr1::shared_ptr<TimelineState> timelineState;
|
||||
shared_ptr<TimelineState> timelineState;
|
||||
|
||||
|
||||
friend class Tool;
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@
|
|||
|
||||
#include <boost/foreach.hpp>
|
||||
|
||||
#include "timeline-clip.hpp"
|
||||
#include "timeline-clip-track.hpp"
|
||||
#include "timeline-view-window.hpp"
|
||||
#include "gui/widgets/timeline/timeline-clip.hpp"
|
||||
#include "gui/widgets/timeline/timeline-clip-track.hpp"
|
||||
#include "gui/widgets/timeline/timeline-view-window.hpp"
|
||||
|
||||
using namespace Gtk;
|
||||
|
||||
|
|
@ -76,7 +76,7 @@ namespace timeline {
|
|||
}
|
||||
}
|
||||
|
||||
std::tr1::shared_ptr<timeline::Clip>
|
||||
shared_ptr<timeline::Clip>
|
||||
ClipTrack::getClipAt(Time position) const
|
||||
{
|
||||
std::pair<shared_ptr<model::Clip>, shared_ptr<timeline::Clip> >
|
||||
|
|
@ -88,7 +88,7 @@ namespace timeline {
|
|||
}
|
||||
|
||||
// Nothing found
|
||||
return std::tr1::shared_ptr<timeline::Clip>();
|
||||
return shared_ptr<timeline::Clip>();
|
||||
}
|
||||
|
||||
//// private methods
|
||||
|
|
@ -98,7 +98,7 @@ namespace timeline {
|
|||
{
|
||||
// Share the draw strategy between all objects
|
||||
TODO("Use factory/builder to create Timline Clips");
|
||||
static std::tr1::shared_ptr<timeline::DrawStrategy> drawStrategy(new BasicDrawStrategy());
|
||||
static shared_ptr<timeline::DrawStrategy> drawStrategy(new BasicDrawStrategy());
|
||||
BOOST_FOREACH (shared_ptr<model::Clip> modelClip, getModelTrack()->getClipList())
|
||||
{
|
||||
// Is a timeline UI clip present in the map already?
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ namespace timeline {
|
|||
* Constructor.
|
||||
*/
|
||||
ClipTrack(TimelineWidget &timelineWidget,
|
||||
std::tr1::shared_ptr<model::ClipTrack> track);
|
||||
shared_ptr<model::ClipTrack> track);
|
||||
|
||||
/**
|
||||
* Draw the track in the timeline.
|
||||
|
|
@ -66,7 +66,7 @@ namespace timeline {
|
|||
* pointer.
|
||||
* @param the given time
|
||||
*/
|
||||
std::tr1::shared_ptr<timeline::Clip>
|
||||
shared_ptr<timeline::Clip>
|
||||
getClipAt(Time position) const;
|
||||
|
||||
private:
|
||||
|
|
@ -80,7 +80,7 @@ namespace timeline {
|
|||
/**
|
||||
* Gets the modelTrack as a ClipTrack.
|
||||
*/
|
||||
std::tr1::shared_ptr<model::ClipTrack>
|
||||
shared_ptr<model::ClipTrack>
|
||||
getModelTrack ();
|
||||
|
||||
/**
|
||||
|
|
@ -107,8 +107,8 @@ namespace timeline {
|
|||
* The clipMap maps model clips to timeline widget clips which are responsible for the
|
||||
* UI representation of a clip.
|
||||
*/
|
||||
std::map<std::tr1::shared_ptr<model::Clip>,
|
||||
std::tr1::shared_ptr<timeline::Clip> >
|
||||
std::map<shared_ptr<model::Clip>,
|
||||
shared_ptr<timeline::Clip> >
|
||||
clipMap;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -27,11 +27,11 @@ namespace gui {
|
|||
namespace widgets {
|
||||
namespace timeline {
|
||||
|
||||
using std::tr1::shared_ptr; //////////////////////TICKET #796
|
||||
using std::tr1::shared_ptr;
|
||||
|
||||
|
||||
Clip::Clip (std::tr1::shared_ptr<model::Clip> clip,
|
||||
std::tr1::shared_ptr<timeline::DrawStrategy> drawStrategy)
|
||||
Clip::Clip (shared_ptr<model::Clip> clip,
|
||||
shared_ptr<timeline::DrawStrategy> drawStrategy)
|
||||
: Entity(drawStrategy)
|
||||
, modelClip(clip)
|
||||
, selected(false)
|
||||
|
|
|
|||
|
|
@ -49,8 +49,8 @@ namespace timeline {
|
|||
class Clip : public Entity
|
||||
{
|
||||
public:
|
||||
Clip (std::tr1::shared_ptr<model::Clip> clip,
|
||||
std::tr1::shared_ptr<timeline::DrawStrategy> drawStrategy);
|
||||
Clip (shared_ptr<model::Clip> clip,
|
||||
shared_ptr<timeline::DrawStrategy> drawStrategy);
|
||||
|
||||
|
||||
Time getBegin() const;
|
||||
|
|
@ -62,7 +62,7 @@ namespace timeline {
|
|||
|
||||
private:
|
||||
|
||||
std::tr1::shared_ptr<model::Clip> modelClip;
|
||||
shared_ptr<model::Clip> modelClip;
|
||||
|
||||
/**
|
||||
* True when this clip is selected in the GUI.
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ namespace gui {
|
|||
namespace widgets {
|
||||
namespace timeline {
|
||||
|
||||
Entity::Entity(std::tr1::shared_ptr<timeline::DrawStrategy> drawStrategy)
|
||||
Entity::Entity (shared_ptr<timeline::DrawStrategy> drawStrategy)
|
||||
: enabled(true),
|
||||
drawStrategy(drawStrategy)
|
||||
{ }
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ namespace widgets {
|
|||
namespace timeline {
|
||||
|
||||
using lib::time::Time;
|
||||
using std::tr1::shared_ptr;
|
||||
|
||||
|
||||
class DrawStrategy;
|
||||
|
|
@ -52,7 +53,7 @@ namespace timeline {
|
|||
class Entity {
|
||||
protected:
|
||||
|
||||
Entity(std::tr1::shared_ptr<timeline::DrawStrategy> drawStrategy);
|
||||
Entity (shared_ptr<timeline::DrawStrategy> drawStrategy);
|
||||
|
||||
virtual ~Entity();
|
||||
|
||||
|
|
@ -82,7 +83,7 @@ namespace timeline {
|
|||
|
||||
bool enabled;
|
||||
|
||||
std::tr1::shared_ptr<timeline::DrawStrategy> drawStrategy;
|
||||
shared_ptr<timeline::DrawStrategy> drawStrategy;
|
||||
};
|
||||
|
||||
} // namespace timeline
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#ifndef TIMELINE_GROUP_TRACK_HPP
|
||||
#define TIMELINE_GROUP_TRACK_HPP
|
||||
|
||||
#include "timeline-track.hpp"
|
||||
#include "gui/widgets/timeline/timeline-track.hpp"
|
||||
#include "gui/model/group-track.hpp"
|
||||
|
||||
namespace gui {
|
||||
|
|
@ -36,19 +36,16 @@ namespace timeline {
|
|||
class GroupTrack : public timeline::Track
|
||||
{
|
||||
public:
|
||||
GroupTrack(TimelineWidget &timeline_widget,
|
||||
std::tr1::shared_ptr<model::GroupTrack> track);
|
||||
GroupTrack (TimelineWidget &timeline_widget,
|
||||
shared_ptr<model::GroupTrack> track);
|
||||
|
||||
void draw_track(Cairo::RefPtr<Cairo::Context> cairo,
|
||||
TimelineViewWindow* constwindow)
|
||||
const;
|
||||
void draw_track (Cairo::RefPtr<Cairo::Context> cairo,
|
||||
TimelineViewWindow* constwindow) const;
|
||||
|
||||
protected:
|
||||
void on_child_list_changed();
|
||||
};
|
||||
|
||||
} // namespace timeline
|
||||
} // namespace widgets
|
||||
} // namespace gui
|
||||
|
||||
}}} // namespace gui::widgets::timeline
|
||||
#endif // TIMELINE_GROUP_TRACK_HPP
|
||||
|
|
|
|||
|
|
@ -342,12 +342,9 @@ TimelineHeaderContainer::on_scroll()
|
|||
}
|
||||
|
||||
void
|
||||
TimelineHeaderContainer::on_hovering_track_changed(
|
||||
std::tr1::shared_ptr<timeline::Track> hovering_track)
|
||||
TimelineHeaderContainer::on_hovering_track_changed( shared_ptr<timeline::Track>)
|
||||
{
|
||||
(void)hovering_track;
|
||||
|
||||
|
||||
/* do nothing */
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
|||
|
|
@ -139,8 +139,7 @@ private:
|
|||
*/
|
||||
void on_scroll();
|
||||
|
||||
void on_hovering_track_changed(
|
||||
std::tr1::shared_ptr<timeline::Track> hovering_track);
|
||||
void on_hovering_track_changed(shared_ptr<timeline::Track> hovering_track);
|
||||
|
||||
private:
|
||||
/* ===== Internal Event Handlers ===== */
|
||||
|
|
@ -168,9 +167,8 @@ private:
|
|||
* to control the amount of indention.
|
||||
* @param offset The vertical offset of the headers in pixels.
|
||||
*/
|
||||
void draw_header_decoration(
|
||||
std::tr1::shared_ptr<model::Track> modelTrack,
|
||||
const Gdk::Rectangle &clip_rect);
|
||||
void draw_header_decoration(shared_ptr<model::Track> modelTrack,
|
||||
const Gdk::Rectangle &clip_rect);
|
||||
|
||||
/**
|
||||
* A helper function which calls lookup_timeline_track within the
|
||||
|
|
@ -182,8 +180,8 @@ private:
|
|||
* @remarks If the return value is going to be NULL, an ENSURE will
|
||||
* fail.
|
||||
*/
|
||||
std::tr1::shared_ptr<timeline::Track> lookup_timeline_track(
|
||||
std::tr1::shared_ptr<model::Track> modelTrack);
|
||||
shared_ptr<timeline::Track>
|
||||
lookup_timeline_track (shared_ptr<model::Track> modelTrack);
|
||||
|
||||
void begin_drag();
|
||||
|
||||
|
|
@ -248,7 +246,7 @@ private:
|
|||
int scrollSlideRate;
|
||||
|
||||
//----- User Interaction State -----//
|
||||
std::tr1::shared_ptr<timeline::Track> hoveringTrack;
|
||||
shared_ptr<timeline::Track> hoveringTrack;
|
||||
|
||||
Gdk::Point mousePoint;
|
||||
|
||||
|
|
|
|||
|
|
@ -112,8 +112,8 @@ TimelineLayoutHelper::header_from_point(Gdk::Point point)
|
|||
return shared_ptr<timeline::Track>();
|
||||
}
|
||||
|
||||
std::tr1::shared_ptr<timeline::Track>
|
||||
TimelineLayoutHelper::track_from_y(int y)
|
||||
shared_ptr<timeline::Track>
|
||||
TimelineLayoutHelper::track_from_y (int y)
|
||||
{
|
||||
// Apply the scroll offset
|
||||
y += timelineWidget.get_y_scroll_offset();
|
||||
|
|
@ -299,8 +299,7 @@ TimelineLayoutHelper::is_animating() const
|
|||
}
|
||||
|
||||
TimelineLayoutHelper::TrackTree::pre_order_iterator
|
||||
TimelineLayoutHelper::iterator_from_track(
|
||||
std::tr1::shared_ptr<model::Track> modelTrack)
|
||||
TimelineLayoutHelper::iterator_from_track(shared_ptr<model::Track> modelTrack)
|
||||
{
|
||||
REQUIRE(modelTrack);
|
||||
|
||||
|
|
@ -666,7 +665,7 @@ TimelineLayoutHelper::apply_drop_to_modelTree(
|
|||
timelineWidget.thaw_update_tracks();
|
||||
}
|
||||
|
||||
std::tr1::shared_ptr<model::Sequence>
|
||||
shared_ptr<model::Sequence>
|
||||
TimelineLayoutHelper::get_sequence() const
|
||||
{
|
||||
REQUIRE(timelineWidget.state);
|
||||
|
|
|
|||
|
|
@ -114,8 +114,7 @@ public:
|
|||
* tracks.
|
||||
* @see update_layout()
|
||||
*/
|
||||
std::tr1::shared_ptr<timeline::Track> header_from_point(
|
||||
Gdk::Point point);
|
||||
shared_ptr<timeline::Track> header_from_point (Gdk::Point point);
|
||||
|
||||
/**
|
||||
* Searches for a tack which has the specified y-offset inside of it.
|
||||
|
|
@ -128,15 +127,15 @@ public:
|
|||
* tracks.
|
||||
* @see update_layout()
|
||||
*/
|
||||
std::tr1::shared_ptr<timeline::Track> track_from_y(int y);
|
||||
shared_ptr<timeline::Track> track_from_y (int y);
|
||||
|
||||
/**
|
||||
* Begins to drag the track under mouse_point, if there is one.
|
||||
* @param mouse_point The mouse point to begin dragging from, measured
|
||||
* in pixels from the top left of the header container widget.
|
||||
*/
|
||||
std::tr1::shared_ptr<timeline::Track>
|
||||
begin_dragging_track(const Gdk::Point &mouse_point);
|
||||
shared_ptr<timeline::Track>
|
||||
begin_dragging_track (Gdk::Point const& mouse_point);
|
||||
|
||||
/**
|
||||
* Drops the dragging track.
|
||||
|
|
@ -185,8 +184,8 @@ public:
|
|||
* @return Returns the model iterator of layoutTree.end() if no
|
||||
* iterator was found.
|
||||
*/
|
||||
TrackTree::pre_order_iterator iterator_from_track(
|
||||
std::tr1::shared_ptr<model::Track> modelTrack);
|
||||
TrackTree::pre_order_iterator
|
||||
iterator_from_track (shared_ptr<model::Track> modelTrack);
|
||||
|
||||
/**
|
||||
* A function that recursively calculates the visible height of a
|
||||
|
|
@ -262,7 +261,7 @@ protected:
|
|||
* @see clone_tree_from_sequence()
|
||||
*/
|
||||
void add_branch(TrackTree::iterator_base parent_iterator,
|
||||
std::tr1::shared_ptr<model::Track> parent);
|
||||
shared_ptr<model::Track> parent);
|
||||
|
||||
/**
|
||||
* Recursively calculates the boxes for a given branch in the timeline
|
||||
|
|
@ -298,8 +297,8 @@ protected:
|
|||
* @remarks If the return value is going to be NULL, an ENSURE will
|
||||
* fail.
|
||||
*/
|
||||
std::tr1::shared_ptr<timeline::Track> lookup_timeline_track(
|
||||
std::tr1::shared_ptr<model::Track> modelTrack);
|
||||
shared_ptr<timeline::Track>
|
||||
lookup_timeline_track(shared_ptr<model::Track> modelTrack);
|
||||
|
||||
/**
|
||||
* A helper function which kicks off the animation timer.
|
||||
|
|
@ -343,7 +342,8 @@ protected:
|
|||
* Helper to get the sequence object from the state.
|
||||
* @return Returns a shared pointer to the sequence.
|
||||
*/
|
||||
std::tr1::shared_ptr<model::Sequence> get_sequence() const;
|
||||
shared_ptr<model::Sequence>
|
||||
get_sequence() const;
|
||||
|
||||
protected:
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ using namespace gui;
|
|||
using namespace gui::widgets;
|
||||
using namespace gui::widgets::timeline;
|
||||
|
||||
using std::tr1::shared_ptr; ////////////////////TICKET #796
|
||||
using std::tr1::shared_ptr;
|
||||
using gui::util::CairoUtil;
|
||||
using lib::time::Time;
|
||||
using lib::time::TimeVar;
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ private:
|
|||
/**
|
||||
* The event handler for when the TimelineWidget's state is switched.
|
||||
*/
|
||||
void on_state_changed (std::tr1::shared_ptr<TimelineState> newState); ////////////////////TICKET #796 : should use std::tr1::shared_ptr
|
||||
void on_state_changed (shared_ptr<TimelineState> newState);
|
||||
|
||||
private:
|
||||
/* ===== Internal Methods ===== */
|
||||
|
|
@ -242,7 +242,7 @@ private:
|
|||
/**
|
||||
* the currently active timeline state object
|
||||
*/
|
||||
std::tr1::shared_ptr<TimelineState> timelineState;
|
||||
shared_ptr<TimelineState> timelineState;
|
||||
|
||||
/**
|
||||
* The caches image of the ruler, over which the chevrons etc. will
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ using std::tr1::shared_ptr;
|
|||
|
||||
|
||||
|
||||
TimelineState::TimelineState (std::tr1::shared_ptr<model::Sequence> source_sequence)
|
||||
TimelineState::TimelineState (shared_ptr<model::Sequence> source_sequence)
|
||||
: sequence(source_sequence)
|
||||
, viewWindow(Offset(Time::ZERO), 1)
|
||||
, selection_(Time::ZERO, Duration::NIL)
|
||||
|
|
@ -60,7 +60,7 @@ TimelineState::TimelineState (std::tr1::shared_ptr<model::Sequence> source_seque
|
|||
//////////////////////////////////////////////////////TICKET #797 : this is cheesy. Should provide a single Mutation to change all
|
||||
}
|
||||
|
||||
std::tr1::shared_ptr<model::Sequence>
|
||||
shared_ptr<model::Sequence>
|
||||
TimelineState::get_sequence() const
|
||||
{
|
||||
return sequence;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@
|
|||
#include "gui/widgets/timeline/timeline-view-window.hpp"
|
||||
#include "lib/time/mutation.hpp"
|
||||
|
||||
#include <boost/shared_ptr.hpp> /////////////////////////TICKET #796
|
||||
|
||||
namespace gui {
|
||||
|
||||
|
|
@ -52,11 +51,10 @@ class TimelineState
|
|||
public:
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
* @param source_sequence The sequence on which the TimelineWidget
|
||||
* will operate when this TimelineState is attached.
|
||||
*/
|
||||
TimelineState(std::tr1::shared_ptr<model::Sequence> source_sequence);
|
||||
TimelineState (shared_ptr<model::Sequence> source_sequence);
|
||||
|
||||
public:
|
||||
|
||||
|
|
@ -64,7 +62,7 @@ public:
|
|||
* Gets the sequence that is attached to this timeline state object.
|
||||
* @return Returns a shared_ptr to the sequence object.
|
||||
*/
|
||||
std::tr1::shared_ptr<model::Sequence> get_sequence() const;
|
||||
shared_ptr<model::Sequence> get_sequence() const;
|
||||
|
||||
/**
|
||||
* Gets a reference to the timeline view window object.
|
||||
|
|
@ -122,7 +120,7 @@ private:
|
|||
* @remarks This pointer is set by the constructor and is constant, so
|
||||
* will not change in value during the lifetime of the class.
|
||||
*/
|
||||
std::tr1::shared_ptr<model::Sequence> sequence;
|
||||
shared_ptr<model::Sequence> sequence;
|
||||
|
||||
// View State
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ protected:
|
|||
/**
|
||||
* A helper function to get the state
|
||||
*/
|
||||
std::tr1::shared_ptr<TimelineState> get_state() const;
|
||||
shared_ptr<TimelineState> get_state() const;
|
||||
|
||||
/**
|
||||
* A helper function to get the view window
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ shared_ptr<timeline::Clip>
|
|||
Track::getClipAt(Time) const
|
||||
{
|
||||
// Default implementation returns empty pointer
|
||||
return std::tr1::shared_ptr<timeline::Clip>();
|
||||
return shared_ptr<timeline::Clip>();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -272,7 +272,7 @@ void
|
|||
Track::on_remove_track()
|
||||
{
|
||||
REQUIRE(modelTrack);
|
||||
std::tr1::shared_ptr<TimelineState> state = timelineWidget.get_state();
|
||||
shared_ptr<TimelineState> state = timelineWidget.get_state();
|
||||
REQUIRE(state);
|
||||
|
||||
state->get_sequence()->remove_descendant_track(modelTrack);
|
||||
|
|
|
|||
|
|
@ -72,20 +72,14 @@ public:
|
|||
Collapse
|
||||
};
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
Track(TimelineWidget &timeline_widget,
|
||||
std::tr1::shared_ptr<model::Track> track);
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
*/
|
||||
~Track();
|
||||
shared_ptr<model::Track> track);
|
||||
|
||||
virtual ~Track();
|
||||
|
||||
Gtk::Widget& get_header_widget();
|
||||
|
||||
std::tr1::shared_ptr<model::Track> //////////////////////////////TICKET #796 : should use std::tr1
|
||||
shared_ptr<model::Track>
|
||||
getModelTrack() const;
|
||||
|
||||
/**
|
||||
|
|
@ -155,7 +149,7 @@ public:
|
|||
* The default implementation simply returns an empty pointer.
|
||||
* @param the given time
|
||||
*/
|
||||
virtual std::tr1::shared_ptr<timeline::Clip> //////////////////////////////TICKET #796 : should use std::tr1
|
||||
virtual shared_ptr<timeline::Clip>
|
||||
getClipAt (Time position) const;
|
||||
|
||||
private:
|
||||
|
|
@ -209,7 +203,7 @@ private:
|
|||
protected:
|
||||
|
||||
TimelineWidget &timelineWidget;
|
||||
std::tr1::shared_ptr<model::Track> modelTrack;
|
||||
shared_ptr<model::Track> modelTrack;
|
||||
|
||||
private:
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ TimelineZoomScale::TimelineZoomScale()
|
|||
}
|
||||
|
||||
void
|
||||
TimelineZoomScale::wireTimelineState (std::tr1::shared_ptr<TimelineState> currentState,
|
||||
TimelineZoomScale::wireTimelineState (shared_ptr<TimelineState> currentState,
|
||||
TimelineWidget::TimelineStateChangeSignal stateChangeSignal)
|
||||
{
|
||||
on_timeline_state_changed (currentState);
|
||||
|
|
@ -98,7 +98,7 @@ TimelineZoomScale::wireTimelineState (std::tr1::shared_ptr<TimelineState> curren
|
|||
}
|
||||
|
||||
void
|
||||
TimelineZoomScale::on_timeline_state_changed (std::tr1::shared_ptr<TimelineState> newState)
|
||||
TimelineZoomScale::on_timeline_state_changed (shared_ptr<TimelineState> newState)
|
||||
{
|
||||
REQUIRE (newState);
|
||||
timelineState = newState;
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ public:
|
|||
*/
|
||||
sigc::signal<void, double> signal_zoom();
|
||||
|
||||
void wireTimelineState (std::tr1::shared_ptr<TimelineState> currentState,
|
||||
void wireTimelineState (shared_ptr<TimelineState> currentState,
|
||||
TimelineWidget::TimelineStateChangeSignal);
|
||||
|
||||
private:
|
||||
|
|
@ -61,7 +61,7 @@ private:
|
|||
* Update the slider position when the timeline state
|
||||
* is changed.
|
||||
*/
|
||||
void on_timeline_state_changed (std::tr1::shared_ptr<TimelineState> newState); ////////////////////TICKET #796 : should use std::tr1::shared_ptr
|
||||
void on_timeline_state_changed (shared_ptr<TimelineState> newState);
|
||||
|
||||
/**
|
||||
* Event handler for when the zoomIn Button
|
||||
|
|
@ -96,7 +96,7 @@ private:
|
|||
|
||||
const double button_step_size;
|
||||
|
||||
std::tr1::shared_ptr<TimelineState> timelineState;
|
||||
shared_ptr<TimelineState> timelineState;
|
||||
};
|
||||
|
||||
} // namespace gui
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@
|
|||
namespace gui {
|
||||
|
||||
using std::string;
|
||||
using std::tr1::shared_ptr;
|
||||
|
||||
|
||||
namespace model { class Project; }
|
||||
|
|
@ -194,7 +195,7 @@ private:
|
|||
|
||||
private:
|
||||
|
||||
std::list< std::tr1::shared_ptr<workspace::WorkspaceWindow> > windowList;
|
||||
std::list<shared_ptr<workspace::WorkspaceWindow> > windowList;
|
||||
|
||||
public:
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ namespace asset {
|
|||
* or resort to template metaprogramming tricks.
|
||||
* Just providing templated comparison operators
|
||||
* would generally override the behaviour of
|
||||
* boost::shared_ptr, which is not desirable.
|
||||
* std::shared_ptr, which is not desirable.
|
||||
* @see Asset::Ident#compare
|
||||
*/
|
||||
class OrderingOfAssets_test : public Test
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ namespace test{
|
|||
|
||||
/** Test-Factory specialised to create TargetObj instances
|
||||
* using the 1-argument constructor TargetObj::TargetObj(int).
|
||||
* It will create boost::shared_ptr instances, because
|
||||
* It will create std::shared_ptr instances, because
|
||||
* factory::RefcountFac was parametrised with this smart pointer type.
|
||||
*/
|
||||
class ObjFactory : public factory::RefcountFac<TargetObj>
|
||||
|
|
@ -79,7 +79,7 @@ namespace test{
|
|||
|
||||
|
||||
/** shorthand for the created smart-pointer class,
|
||||
* here it's a (refcounting) boost::shared_ptr
|
||||
* here it's a (refcounting) std::shared_ptr
|
||||
*/
|
||||
typedef ObjFactory::PType pTarget;
|
||||
|
||||
|
|
@ -93,7 +93,7 @@ namespace test{
|
|||
/*******************************************************************
|
||||
* @test the basic object creation Factory behaviour: We declared
|
||||
* a static field TargetObj::create to be a ObjFactory. So,
|
||||
* by invoking this functor, we get a boost::shared_ptr
|
||||
* by invoking this functor, we get a std::shared_ptr
|
||||
* wrapping a new TargetObj instance. From this we copy
|
||||
* further shared-ptrs, invoke a member function and
|
||||
* finally, when leaving the scope, our TargetObj
|
||||
|
|
|
|||
Loading…
Reference in a new issue