diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am index 0c1043661..f3bc1c063 100644 --- a/src/gui/Makefile.am +++ b/src/gui/Makefile.am @@ -82,6 +82,12 @@ lumigui_SOURCES = \ $(lumigui_srcdir)/model/project.hpp \ $(lumigui_srcdir)/model/sequence.cpp \ $(lumigui_srcdir)/model/sequence.hpp \ + $(lumigui_srcdir)/model/track.cpp \ + $(lumigui_srcdir)/model/track.hpp \ + $(lumigui_srcdir)/model/clip-track.cpp \ + $(lumigui_srcdir)/model/clip-track.hpp \ + $(lumigui_srcdir)/model/group-track.cpp \ + $(lumigui_srcdir)/model/group-track.hpp \ $(lumigui_srcdir)/output/displayer.cpp \ $(lumigui_srcdir)/output/displayer.hpp \ $(lumigui_srcdir)/output/gdkdisplayer.cpp \ diff --git a/src/gui/model/clip-track.cpp b/src/gui/model/clip-track.cpp new file mode 100644 index 000000000..5f627eeca --- /dev/null +++ b/src/gui/model/clip-track.cpp @@ -0,0 +1,33 @@ +/* + clip-track.cpp - Implementation of a clip containing track object + + Copyright (C) Lumiera.org + 2008, Joel Holdsworth + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +* *****************************************************/ + +#include "clip-track.hpp" + +namespace gui { +namespace model { + +ClipTrack::ClipTrack() +{ +} + +} // namespace model +} // namespace gui diff --git a/src/gui/model/clip-track.hpp b/src/gui/model/clip-track.hpp new file mode 100644 index 000000000..7a2b413aa --- /dev/null +++ b/src/gui/model/clip-track.hpp @@ -0,0 +1,52 @@ +/* + clip-track.hpp - Declaration of a clip containing track object + + Copyright (C) Lumiera.org + 2008, Joel Holdsworth + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ +/** + * @file widgets/timeline/clip-track.hpp + * This file contains the definition of timeline track objects which + * contain clips. + */ + +#ifndef CLIP_TRACK_HPP +#define CLIP_TRACK_HPP + +#include "track.hpp" + +namespace gui { +namespace model { + +class ClipTrack : public Track +{ +public: + ClipTrack(); + + + +private: + + //std::vector clips; + +}; + +} // namespace timeline +} // namespace gui + +#endif // CLIP_TRACK_HPP diff --git a/src/gui/model/group-track.cpp b/src/gui/model/group-track.cpp new file mode 100644 index 000000000..3cc73797c --- /dev/null +++ b/src/gui/model/group-track.cpp @@ -0,0 +1,46 @@ +/* + group-track.cpp - Implementation of the timeline group track object + + Copyright (C) Lumiera.org + 2008, Joel Holdsworth + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +* *****************************************************/ + +#include "group-track.hpp" + +namespace gui { +namespace model { + +GroupTrack::GroupTrack() +{ +} + +void +GroupTrack::add_child_track(Track* child) +{ + REQUIRE(child != NULL); + children.push_back(child); +} + +const std::vector& +GroupTrack::get_child_tracks() const +{ + return children; +} + +} // namespace model +} // namespace gui diff --git a/src/gui/model/group-track.hpp b/src/gui/model/group-track.hpp new file mode 100644 index 000000000..ce2826c6a --- /dev/null +++ b/src/gui/model/group-track.hpp @@ -0,0 +1,51 @@ +/* + group-track.hpp - Declaration of the timeline group track object + + Copyright (C) Lumiera.org + 2008, Joel Holdsworth + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ +/** @file widgets/timeline/group-track.hpp + ** This file contains the definition of group track timeline objects + */ + +#ifndef GROUP_TRACK_HPP +#define GROUP_TRACK_HPP + +#include "track.hpp" + +namespace gui { +namespace model { + +class GroupTrack : public Track +{ +public: + GroupTrack(); + + void add_child_track(Track* child); + + const std::vector& get_child_tracks() const; + +private: + //----- Data -----// + std::vector children; +}; + +} // namespace model +} // namespace gui + +#endif // GROUP_TRACK_HPP diff --git a/src/gui/model/sequence.cpp b/src/gui/model/sequence.cpp index 8631d9c55..758a5b26e 100644 --- a/src/gui/model/sequence.cpp +++ b/src/gui/model/sequence.cpp @@ -42,5 +42,11 @@ Sequence::set_name(const Glib::ustring &name) this->name = name; } +const std::list& +Sequence::get_tracks() const +{ + return tracks; +} + } // namespace model } // namespace gui diff --git a/src/gui/model/sequence.hpp b/src/gui/model/sequence.hpp index 5ea41ccec..13cf41b57 100644 --- a/src/gui/model/sequence.hpp +++ b/src/gui/model/sequence.hpp @@ -31,6 +31,8 @@ namespace gui { namespace model { + +class Track; class Sequence { @@ -41,8 +43,12 @@ public: void set_name(const Glib::ustring &name); + const std::list& get_tracks() const; + private: Glib::ustring name; + + std::list tracks; }; } // namespace model diff --git a/src/gui/model/track.cpp b/src/gui/model/track.cpp new file mode 100644 index 000000000..f6e68cc03 --- /dev/null +++ b/src/gui/model/track.cpp @@ -0,0 +1,50 @@ +/* + track.cpp - Implementation of the Track class + + Copyright (C) Lumiera.org + 2008, Joel Holdsworth + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +* *****************************************************/ + +#include + +#include "track.hpp" + +namespace gui { +namespace model { + +const std::vector Track::NoChildren; + +Track::Track() +{ + +} + +const std::vector& +Track::get_child_tracks() const +{ + return NoChildren; +} + +Glib::ustring +Track::get_title() +{ + return "Hello"; +} + +} // namespace model +} // namespace gui diff --git a/src/gui/model/track.hpp b/src/gui/model/track.hpp new file mode 100644 index 000000000..2fd39643b --- /dev/null +++ b/src/gui/model/track.hpp @@ -0,0 +1,53 @@ +/* + track.hpp - Definition of the Track class + + Copyright (C) Lumiera.org + 2008, Joel Holdsworth + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ +/** @file track.hpp + ** This file contains the definition of Track, a class which + ** represents a track, and wraps proc layer data + */ + +#include "../gtk-lumiera.hpp" + +#ifndef TRACK_HPP +#define TRACK_HPP + +namespace gui { +namespace model { + +class Track +{ +public: + Track(); + + void add_child_track(Track* child); + + virtual const std::vector& get_child_tracks() const; + + Glib::ustring get_title(); + +private: + static const std::vector NoChildren; +}; + +} // namespace model +} // namespace gui + +#endif // TRACK_HPP