diff --git a/src/gui/gtk-lumiera.hpp b/src/gui/gtk-lumiera.hpp index 65ee00e9c..315ee4f2c 100644 --- a/src/gui/gtk-lumiera.hpp +++ b/src/gui/gtk-lumiera.hpp @@ -55,11 +55,15 @@ #include "gui/window-manager.hpp" #include +#include #include namespace gui { +using std::tr1::shared_ptr; + + /* ====== The Application Class ====== */ diff --git a/src/gui/model/clip-track.hpp b/src/gui/model/clip-track.hpp index e115ed415..45a067f60 100644 --- a/src/gui/model/clip-track.hpp +++ b/src/gui/model/clip-track.hpp @@ -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 >& + lumiera::observable_list >& getClipList(void); private: - lumiera::observable_list< std::tr1::shared_ptr > clips; + lumiera::observable_list > clips; }; diff --git a/src/gui/model/parent-track.cpp b/src/gui/model/parent-track.cpp index 3384227a1..45c8d13ae 100644 --- a/src/gui/model/parent-track.cpp +++ b/src/gui/model/parent-track.cpp @@ -23,7 +23,6 @@ #include "parent-track.hpp" #include -using namespace boost; using std::tr1::shared_ptr; namespace gui { @@ -33,13 +32,13 @@ ParentTrack::ParentTrack() { } -const std::list< std::tr1::shared_ptr >& +const std::list >& ParentTrack::get_child_tracks() const { return tracks.get_list(); } -lumiera::observable_list< std::tr1::shared_ptr >& +lumiera::observable_list >& 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) + const shared_ptr track) { REQUIRE(track); - std::tr1::shared_ptr parent = + shared_ptr parent = find_descendant_track_parent(track); if(parent) { @@ -68,10 +67,10 @@ ParentTrack::remove_descendant_track( return false; } -std::tr1::shared_ptr -ParentTrack::find_descendant_track_parent( - std::tr1::shared_ptr child) +shared_ptr +ParentTrack::find_descendant_track_parent(shared_ptr child) { + using namespace boost; REQUIRE(child != NULL); BOOST_FOREACH(std::tr1::shared_ptr track, tracks) diff --git a/src/gui/model/parent-track.hpp b/src/gui/model/parent-track.hpp index b23d2f07c..a1c709713 100644 --- a/src/gui/model/parent-track.hpp +++ b/src/gui/model/parent-track.hpp @@ -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 >& + const std::list >& get_child_tracks() const; /** * Gets read-write access to the list of child tracks. */ - lumiera::observable_list< std::tr1::shared_ptr >& + lumiera::observable_list >& 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); + bool remove_descendant_track (const shared_ptr 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 - find_descendant_track_parent(std::tr1::shared_ptr child); + shared_ptr + find_descendant_track_parent (shared_ptr child); protected: /** * The internal list of child tracks of this parent. */ - lumiera::observable_list< std::tr1::shared_ptr > tracks; + lumiera::observable_list > tracks; }; } // namespace model diff --git a/src/gui/model/project.hpp b/src/gui/model/project.hpp index 29e5ca2a6..f2806abca 100644 --- a/src/gui/model/project.hpp +++ b/src/gui/model/project.hpp @@ -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 >& + lumiera::observable_list >& get_sequences(); void add_new_sequence(uString name); private: - lumiera::observable_list< std::tr1::shared_ptr > sequences; + lumiera::observable_list > sequences; }; } // namespace model diff --git a/src/gui/model/sequence.hpp b/src/gui/model/sequence.hpp index 45b9a43bf..db856d29e 100644 --- a/src/gui/model/sequence.hpp +++ b/src/gui/model/sequence.hpp @@ -27,7 +27,7 @@ #ifndef SEQUENCE_HPP #define SEQUENCE_HPP -#include "parent-track.hpp" +#include "gui/model/parent-track.hpp" namespace gui { namespace model { diff --git a/src/gui/model/track.cpp b/src/gui/model/track.cpp index 5e7b4dad7..c81cc9739 100644 --- a/src/gui/model/track.cpp +++ b/src/gui/model/track.cpp @@ -35,9 +35,10 @@ const list< shared_ptr > Track::NoChildren; Track::Track() : enabled(true), locked(false) -{ +{ } + +Track::~Track() { } -} const std::list< shared_ptr >& Track::get_child_tracks() const diff --git a/src/gui/model/track.hpp b/src/gui/model/track.hpp index 46f046b99..c7472b03f 100644 --- a/src/gui/model/track.hpp +++ b/src/gui/model/track.hpp @@ -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 >& + virtual const std::list >& 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 - find_descendant_track_parent (std::tr1::shared_ptr child); + virtual shared_ptr + find_descendant_track_parent (shared_ptr 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 > NoChildren; + static const std::list< shared_ptr > NoChildren; /** * The internal implementation of print_branch. diff --git a/src/gui/panels/timeline-panel.cpp b/src/gui/panels/timeline-panel.cpp index f2ae2da56..7d5b4fa6c 100644 --- a/src/gui/panels/timeline-panel.cpp +++ b/src/gui/panels/timeline-panel.cpp @@ -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 ///////////////////////////////TICKET #796 : should use std::tr1::shared_ptr instead of boost - = *get_project().get_sequences().begin(); + shared_ptr sequence = *(get_project().get_sequences().begin()); timelineWidget.reset(new TimelineWidget(load_state(sequence))); pack_start(*timelineWidget, PACK_EXPAND_WIDGET); diff --git a/src/gui/panels/timeline-panel.hpp b/src/gui/panels/timeline-panel.hpp index 87c05425c..febcb857c 100644 --- a/src/gui/panels/timeline-panel.hpp +++ b/src/gui/panels/timeline-panel.hpp @@ -36,9 +36,15 @@ #include "lib/time/timevalue.hpp" +#include + 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 - load_state (std::tr1::weak_ptr sequence); + shared_ptr + load_state (weak_ptr 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 > + Gtk::TreeModelColumn< weak_ptr > sequenceColumn; /** @@ -169,8 +176,9 @@ private: // Body Widgets boost::scoped_ptr timelineWidget; - std::map< std::tr1::weak_ptr, - std::tr1::shared_ptr > + std::map< weak_ptr + , shared_ptr + > timelineStates; // Toolbar Widgets diff --git a/src/gui/widgets/timeline-widget.cpp b/src/gui/widgets/timeline-widget.cpp index 4af85069a..c3442902f 100644 --- a/src/gui/widgets/timeline-widget.cpp +++ b/src/gui/widgets/timeline-widget.cpp @@ -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 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 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); diff --git a/src/gui/widgets/timeline-widget.hpp b/src/gui/widgets/timeline-widget.hpp index 6bf71ef0d..39901305a 100644 --- a/src/gui/widgets/timeline-widget.hpp +++ b/src/gui/widgets/timeline-widget.hpp @@ -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 source_state); + TimelineWidget (shared_ptr 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 get_state(); + shared_ptr 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 new_state); + void set_state(shared_ptr 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 + shared_ptr get_hovering_track() const; public: /* ===== Signals ===== */ - typedef sigc::signal > TimelineStateChangeSignal; - typedef sigc::signal > HoveringTrackChangedSignal; + typedef sigc::signal > TimelineStateChangeSignal; + typedef sigc::signal > HoveringTrackChangedSignal; sigc::signal 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 modelTrack); + void + create_timeline_tracks_from_branch (shared_ptr 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 - create_timeline_track_from_modelTrack( - std::tr1::shared_ptr modelTrack); + shared_ptr + create_timeline_track_from_modelTrack(shared_ptr 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 modelTrack, - std::map, - std::tr1::shared_ptr > &orphan_track_map); + void + search_orphaned_tracks_in_branch (shared_ptr modelTrack, + std::map, + shared_ptr > &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 lookup_timeline_track( - std::tr1::shared_ptr modelTrack) const; + shared_ptr + lookup_timeline_track (shared_ptr 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 sequence() const; + shared_ptr sequence() const; // ----- Other Functions ----- // - void set_hovering_track( - std::tr1::shared_ptr hovering_track); + void + set_hovering_track (shared_ptr 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 state; + shared_ptr 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 > + std::map + ,shared_ptr > trackMap; - std::tr1::shared_ptr hoveringTrack; + shared_ptr hoveringTrack; // Helper Classes timeline::TimelineLayoutHelper layoutHelper; diff --git a/src/gui/widgets/timeline/timeline-arrow-tool.cpp b/src/gui/widgets/timeline/timeline-arrow-tool.cpp index 420d3a964..8b2e0ad37 100644 --- a/src/gui/widgets/timeline/timeline-arrow-tool.cpp +++ b/src/gui/widgets/timeline/timeline-arrow-tool.cpp @@ -55,17 +55,17 @@ namespace timeline { Tool::on_button_press_event(event); // Convert the mouse click position to a Time - std::tr1::shared_ptr state = timelineBody.getTimelineWidget().get_state(); + shared_ptr 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 track = getHoveringTrack(); - std::tr1::shared_ptr clip = track->getClipAt(tpoint); + shared_ptr track = getHoveringTrack(); + shared_ptr clip = track->getClipAt(tpoint); // Nothing to do if there is no clip - if (clip == std::tr1::shared_ptr()) + 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 track = - getHoveringTrack(); + shared_ptr track = getHoveringTrack(); } void @@ -92,10 +91,10 @@ namespace timeline { return; } - std::tr1::shared_ptr + shared_ptr ArrowTool::getHoveringTrack () { - std::tr1::shared_ptr track( + shared_ptr track( timelineBody.getTimelineWidget().get_hovering_track()); return track; } diff --git a/src/gui/widgets/timeline/timeline-arrow-tool.hpp b/src/gui/widgets/timeline/timeline-arrow-tool.hpp index c2f0df070..b390a25d5 100644 --- a/src/gui/widgets/timeline/timeline-arrow-tool.hpp +++ b/src/gui/widgets/timeline/timeline-arrow-tool.hpp @@ -81,7 +81,7 @@ namespace timeline { private: - std::tr1::shared_ptr + shared_ptr getHoveringTrack (); bool selectionRectangleActive; diff --git a/src/gui/widgets/timeline/timeline-body.hpp b/src/gui/widgets/timeline/timeline-body.hpp index dbc6697a1..25125f2cc 100644 --- a/src/gui/widgets/timeline/timeline-body.hpp +++ b/src/gui/widgets/timeline/timeline-body.hpp @@ -124,7 +124,7 @@ protected: /** * The event handler for when the TimelineWidget's state is switched. */ - void on_state_changed (std::tr1::shared_ptr newState); + void on_state_changed (shared_ptr newState); /* ===== Internals ===== */ private: @@ -142,8 +142,8 @@ private: void draw_tracks(Cairo::RefPtr cr); void draw_track(Cairo::RefPtr cr, - std::tr1::shared_ptr timeline_track, - const int view_width) const; + shared_ptr timeline_track, + const int view_width) const; /** * Draws the selected timeline period. @@ -200,7 +200,7 @@ private: Cairo::RefPtr playbackPointColour; gui::widgets::TimelineWidget &timelineWidget; - std::tr1::shared_ptr timelineState; + shared_ptr timelineState; friend class Tool; diff --git a/src/gui/widgets/timeline/timeline-clip-track.cpp b/src/gui/widgets/timeline/timeline-clip-track.cpp index 9f5438d0a..f659aa1f8 100644 --- a/src/gui/widgets/timeline/timeline-clip-track.cpp +++ b/src/gui/widgets/timeline/timeline-clip-track.cpp @@ -22,9 +22,9 @@ #include -#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 + shared_ptr ClipTrack::getClipAt(Time position) const { std::pair, shared_ptr > @@ -88,7 +88,7 @@ namespace timeline { } // Nothing found - return std::tr1::shared_ptr(); + return shared_ptr(); } //// 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 drawStrategy(new BasicDrawStrategy()); + static shared_ptr drawStrategy(new BasicDrawStrategy()); BOOST_FOREACH (shared_ptr modelClip, getModelTrack()->getClipList()) { // Is a timeline UI clip present in the map already? diff --git a/src/gui/widgets/timeline/timeline-clip-track.hpp b/src/gui/widgets/timeline/timeline-clip-track.hpp index 980c37480..32b93b321 100644 --- a/src/gui/widgets/timeline/timeline-clip-track.hpp +++ b/src/gui/widgets/timeline/timeline-clip-track.hpp @@ -52,7 +52,7 @@ namespace timeline { * Constructor. */ ClipTrack(TimelineWidget &timelineWidget, - std::tr1::shared_ptr track); + shared_ptr track); /** * Draw the track in the timeline. @@ -66,7 +66,7 @@ namespace timeline { * pointer. * @param the given time */ - std::tr1::shared_ptr + shared_ptr getClipAt(Time position) const; private: @@ -80,7 +80,7 @@ namespace timeline { /** * Gets the modelTrack as a ClipTrack. */ - std::tr1::shared_ptr + shared_ptr 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 > + std::map, + shared_ptr > clipMap; }; diff --git a/src/gui/widgets/timeline/timeline-clip.cpp b/src/gui/widgets/timeline/timeline-clip.cpp index c6d90be45..1b4e04d72 100644 --- a/src/gui/widgets/timeline/timeline-clip.cpp +++ b/src/gui/widgets/timeline/timeline-clip.cpp @@ -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 clip, - std::tr1::shared_ptr drawStrategy) + Clip::Clip (shared_ptr clip, + shared_ptr drawStrategy) : Entity(drawStrategy) , modelClip(clip) , selected(false) diff --git a/src/gui/widgets/timeline/timeline-clip.hpp b/src/gui/widgets/timeline/timeline-clip.hpp index 001fb94a0..c7e6bd64b 100644 --- a/src/gui/widgets/timeline/timeline-clip.hpp +++ b/src/gui/widgets/timeline/timeline-clip.hpp @@ -49,8 +49,8 @@ namespace timeline { class Clip : public Entity { public: - Clip (std::tr1::shared_ptr clip, - std::tr1::shared_ptr drawStrategy); + Clip (shared_ptr clip, + shared_ptr drawStrategy); Time getBegin() const; @@ -62,7 +62,7 @@ namespace timeline { private: - std::tr1::shared_ptr modelClip; + shared_ptr modelClip; /** * True when this clip is selected in the GUI. diff --git a/src/gui/widgets/timeline/timeline-entity.cpp b/src/gui/widgets/timeline/timeline-entity.cpp index bc499b3d4..3f7582375 100644 --- a/src/gui/widgets/timeline/timeline-entity.cpp +++ b/src/gui/widgets/timeline/timeline-entity.cpp @@ -29,7 +29,7 @@ namespace gui { namespace widgets { namespace timeline { - Entity::Entity(std::tr1::shared_ptr drawStrategy) + Entity::Entity (shared_ptr drawStrategy) : enabled(true), drawStrategy(drawStrategy) { } diff --git a/src/gui/widgets/timeline/timeline-entity.hpp b/src/gui/widgets/timeline/timeline-entity.hpp index bfb170aee..f30a804a1 100644 --- a/src/gui/widgets/timeline/timeline-entity.hpp +++ b/src/gui/widgets/timeline/timeline-entity.hpp @@ -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 drawStrategy); + Entity (shared_ptr drawStrategy); virtual ~Entity(); @@ -82,7 +83,7 @@ namespace timeline { bool enabled; - std::tr1::shared_ptr drawStrategy; + shared_ptr drawStrategy; }; } // namespace timeline diff --git a/src/gui/widgets/timeline/timeline-group-track.hpp b/src/gui/widgets/timeline/timeline-group-track.hpp index 822142b0d..6787c4184 100644 --- a/src/gui/widgets/timeline/timeline-group-track.hpp +++ b/src/gui/widgets/timeline/timeline-group-track.hpp @@ -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 track); + GroupTrack (TimelineWidget &timeline_widget, + shared_ptr track); - void draw_track(Cairo::RefPtr cairo, - TimelineViewWindow* constwindow) - const; + void draw_track (Cairo::RefPtr 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 diff --git a/src/gui/widgets/timeline/timeline-header-container.cpp b/src/gui/widgets/timeline/timeline-header-container.cpp index 486859845..1d1af9537 100644 --- a/src/gui/widgets/timeline/timeline-header-container.cpp +++ b/src/gui/widgets/timeline/timeline-header-container.cpp @@ -342,12 +342,9 @@ TimelineHeaderContainer::on_scroll() } void -TimelineHeaderContainer::on_hovering_track_changed( - std::tr1::shared_ptr hovering_track) +TimelineHeaderContainer::on_hovering_track_changed( shared_ptr) { - (void)hovering_track; - - + /* do nothing */ } bool diff --git a/src/gui/widgets/timeline/timeline-header-container.hpp b/src/gui/widgets/timeline/timeline-header-container.hpp index 6d40d621e..6c32d6ce4 100644 --- a/src/gui/widgets/timeline/timeline-header-container.hpp +++ b/src/gui/widgets/timeline/timeline-header-container.hpp @@ -139,8 +139,7 @@ private: */ void on_scroll(); - void on_hovering_track_changed( - std::tr1::shared_ptr hovering_track); + void on_hovering_track_changed(shared_ptr 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 modelTrack, - const Gdk::Rectangle &clip_rect); + void draw_header_decoration(shared_ptr 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 lookup_timeline_track( - std::tr1::shared_ptr modelTrack); + shared_ptr + lookup_timeline_track (shared_ptr modelTrack); void begin_drag(); @@ -248,7 +246,7 @@ private: int scrollSlideRate; //----- User Interaction State -----// - std::tr1::shared_ptr hoveringTrack; + shared_ptr hoveringTrack; Gdk::Point mousePoint; diff --git a/src/gui/widgets/timeline/timeline-layout-helper.cpp b/src/gui/widgets/timeline/timeline-layout-helper.cpp index 71a55d44a..df00dd131 100644 --- a/src/gui/widgets/timeline/timeline-layout-helper.cpp +++ b/src/gui/widgets/timeline/timeline-layout-helper.cpp @@ -112,8 +112,8 @@ TimelineLayoutHelper::header_from_point(Gdk::Point point) return shared_ptr(); } -std::tr1::shared_ptr -TimelineLayoutHelper::track_from_y(int y) +shared_ptr +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 modelTrack) +TimelineLayoutHelper::iterator_from_track(shared_ptr modelTrack) { REQUIRE(modelTrack); @@ -666,7 +665,7 @@ TimelineLayoutHelper::apply_drop_to_modelTree( timelineWidget.thaw_update_tracks(); } -std::tr1::shared_ptr +shared_ptr TimelineLayoutHelper::get_sequence() const { REQUIRE(timelineWidget.state); diff --git a/src/gui/widgets/timeline/timeline-layout-helper.hpp b/src/gui/widgets/timeline/timeline-layout-helper.hpp index 07e792e9a..2c2cca44a 100644 --- a/src/gui/widgets/timeline/timeline-layout-helper.hpp +++ b/src/gui/widgets/timeline/timeline-layout-helper.hpp @@ -114,8 +114,7 @@ public: * tracks. * @see update_layout() */ - std::tr1::shared_ptr header_from_point( - Gdk::Point point); + shared_ptr 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 track_from_y(int y); + shared_ptr 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 - begin_dragging_track(const Gdk::Point &mouse_point); + shared_ptr + 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 modelTrack); + TrackTree::pre_order_iterator + iterator_from_track (shared_ptr 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 parent); + shared_ptr 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 lookup_timeline_track( - std::tr1::shared_ptr modelTrack); + shared_ptr + lookup_timeline_track(shared_ptr 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 get_sequence() const; + shared_ptr + get_sequence() const; protected: /** diff --git a/src/gui/widgets/timeline/timeline-ruler.cpp b/src/gui/widgets/timeline/timeline-ruler.cpp index 0b8d68f22..b8725aedf 100644 --- a/src/gui/widgets/timeline/timeline-ruler.cpp +++ b/src/gui/widgets/timeline/timeline-ruler.cpp @@ -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; diff --git a/src/gui/widgets/timeline/timeline-ruler.hpp b/src/gui/widgets/timeline/timeline-ruler.hpp index 842ce6bff..3d903aaf5 100644 --- a/src/gui/widgets/timeline/timeline-ruler.hpp +++ b/src/gui/widgets/timeline/timeline-ruler.hpp @@ -111,7 +111,7 @@ private: /** * The event handler for when the TimelineWidget's state is switched. */ - void on_state_changed (std::tr1::shared_ptr newState); ////////////////////TICKET #796 : should use std::tr1::shared_ptr + void on_state_changed (shared_ptr newState); private: /* ===== Internal Methods ===== */ @@ -242,7 +242,7 @@ private: /** * the currently active timeline state object */ - std::tr1::shared_ptr timelineState; + shared_ptr timelineState; /** * The caches image of the ruler, over which the chevrons etc. will diff --git a/src/gui/widgets/timeline/timeline-state.cpp b/src/gui/widgets/timeline/timeline-state.cpp index b55589956..74042ef39 100644 --- a/src/gui/widgets/timeline/timeline-state.cpp +++ b/src/gui/widgets/timeline/timeline-state.cpp @@ -40,7 +40,7 @@ using std::tr1::shared_ptr; -TimelineState::TimelineState (std::tr1::shared_ptr source_sequence) +TimelineState::TimelineState (shared_ptr 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 source_seque //////////////////////////////////////////////////////TICKET #797 : this is cheesy. Should provide a single Mutation to change all } -std::tr1::shared_ptr +shared_ptr TimelineState::get_sequence() const { return sequence; diff --git a/src/gui/widgets/timeline/timeline-state.hpp b/src/gui/widgets/timeline/timeline-state.hpp index 23e2015e7..5542b1520 100644 --- a/src/gui/widgets/timeline/timeline-state.hpp +++ b/src/gui/widgets/timeline/timeline-state.hpp @@ -29,7 +29,6 @@ #include "gui/widgets/timeline/timeline-view-window.hpp" #include "lib/time/mutation.hpp" -#include /////////////////////////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 source_sequence); + TimelineState (shared_ptr 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 get_sequence() const; + shared_ptr 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 sequence; + shared_ptr sequence; // View State /** diff --git a/src/gui/widgets/timeline/timeline-tool.hpp b/src/gui/widgets/timeline/timeline-tool.hpp index f34cb5d32..7c54a36a5 100644 --- a/src/gui/widgets/timeline/timeline-tool.hpp +++ b/src/gui/widgets/timeline/timeline-tool.hpp @@ -133,7 +133,7 @@ protected: /** * A helper function to get the state */ - std::tr1::shared_ptr get_state() const; + shared_ptr get_state() const; /** * A helper function to get the view window diff --git a/src/gui/widgets/timeline/timeline-track.cpp b/src/gui/widgets/timeline/timeline-track.cpp index b0267dea3..ac1c6e4d1 100644 --- a/src/gui/widgets/timeline/timeline-track.cpp +++ b/src/gui/widgets/timeline/timeline-track.cpp @@ -125,7 +125,7 @@ shared_ptr Track::getClipAt(Time) const { // Default implementation returns empty pointer - return std::tr1::shared_ptr(); + return shared_ptr(); } void @@ -272,7 +272,7 @@ void Track::on_remove_track() { REQUIRE(modelTrack); - std::tr1::shared_ptr state = timelineWidget.get_state(); + shared_ptr state = timelineWidget.get_state(); REQUIRE(state); state->get_sequence()->remove_descendant_track(modelTrack); diff --git a/src/gui/widgets/timeline/timeline-track.hpp b/src/gui/widgets/timeline/timeline-track.hpp index 796b1f130..dc7b18129 100644 --- a/src/gui/widgets/timeline/timeline-track.hpp +++ b/src/gui/widgets/timeline/timeline-track.hpp @@ -72,20 +72,14 @@ public: Collapse }; - /** - * Constructor - */ Track(TimelineWidget &timeline_widget, - std::tr1::shared_ptr track); - - /** - * Destructor - */ - ~Track(); + shared_ptr track); + + virtual ~Track(); Gtk::Widget& get_header_widget(); - std::tr1::shared_ptr //////////////////////////////TICKET #796 : should use std::tr1 + shared_ptr getModelTrack() const; /** @@ -155,7 +149,7 @@ public: * The default implementation simply returns an empty pointer. * @param the given time */ - virtual std::tr1::shared_ptr //////////////////////////////TICKET #796 : should use std::tr1 + virtual shared_ptr getClipAt (Time position) const; private: @@ -209,7 +203,7 @@ private: protected: TimelineWidget &timelineWidget; - std::tr1::shared_ptr modelTrack; + shared_ptr modelTrack; private: /** diff --git a/src/gui/widgets/timeline/timeline-zoom-scale.cpp b/src/gui/widgets/timeline/timeline-zoom-scale.cpp index 083513647..7452d20cd 100644 --- a/src/gui/widgets/timeline/timeline-zoom-scale.cpp +++ b/src/gui/widgets/timeline/timeline-zoom-scale.cpp @@ -90,7 +90,7 @@ TimelineZoomScale::TimelineZoomScale() } void -TimelineZoomScale::wireTimelineState (std::tr1::shared_ptr currentState, +TimelineZoomScale::wireTimelineState (shared_ptr currentState, TimelineWidget::TimelineStateChangeSignal stateChangeSignal) { on_timeline_state_changed (currentState); @@ -98,7 +98,7 @@ TimelineZoomScale::wireTimelineState (std::tr1::shared_ptr curren } void -TimelineZoomScale::on_timeline_state_changed (std::tr1::shared_ptr newState) +TimelineZoomScale::on_timeline_state_changed (shared_ptr newState) { REQUIRE (newState); timelineState = newState; diff --git a/src/gui/widgets/timeline/timeline-zoom-scale.hpp b/src/gui/widgets/timeline/timeline-zoom-scale.hpp index ec106ad94..a57fdd6df 100644 --- a/src/gui/widgets/timeline/timeline-zoom-scale.hpp +++ b/src/gui/widgets/timeline/timeline-zoom-scale.hpp @@ -51,7 +51,7 @@ public: */ sigc::signal signal_zoom(); - void wireTimelineState (std::tr1::shared_ptr currentState, + void wireTimelineState (shared_ptr 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 newState); ////////////////////TICKET #796 : should use std::tr1::shared_ptr + void on_timeline_state_changed (shared_ptr newState); /** * Event handler for when the zoomIn Button @@ -96,7 +96,7 @@ private: const double button_step_size; - std::tr1::shared_ptr timelineState; + shared_ptr timelineState; }; } // namespace gui diff --git a/src/gui/window-manager.hpp b/src/gui/window-manager.hpp index 1f0eb3a46..e06b0f4ee 100644 --- a/src/gui/window-manager.hpp +++ b/src/gui/window-manager.hpp @@ -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 > windowList; + std::list > windowList; public: diff --git a/tests/components/proc/asset/orderingofassetstest.cpp b/tests/components/proc/asset/orderingofassetstest.cpp index cff898acd..130b55bfe 100644 --- a/tests/components/proc/asset/orderingofassetstest.cpp +++ b/tests/components/proc/asset/orderingofassetstest.cpp @@ -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 diff --git a/tests/lib/factorytest.cpp b/tests/lib/factorytest.cpp index 8e46771c2..dbf6dddb4 100644 --- a/tests/lib/factorytest.cpp +++ b/tests/lib/factorytest.cpp @@ -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 @@ -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