2016-11-30 23:12:44 +01:00
|
|
|
/*
|
|
|
|
|
TimelineWidget - custom widget for timeline display of the project
|
|
|
|
|
|
|
|
|
|
Copyright (C) Lumiera.org
|
|
|
|
|
2016, Hermann Vosseler <Ichthyostega@web.de>
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
* *****************************************************/
|
|
|
|
|
|
|
|
|
|
|
2017-04-02 04:22:51 +02:00
|
|
|
/** @file timeline/timeline-widget.cpp
|
2016-11-30 23:12:44 +01:00
|
|
|
** Implementation details of Lumiera's timeline display widget.
|
|
|
|
|
**
|
2018-10-08 02:26:38 +02:00
|
|
|
** @todo as of 10/2018 a complete rework of the timeline display is underway
|
2016-12-02 19:34:38 +01:00
|
|
|
** @see timeline-controller.cpp
|
2016-11-30 23:12:44 +01:00
|
|
|
**
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
2017-05-03 21:13:17 +02:00
|
|
|
#include "gui/gtk-base.hpp"
|
2016-11-30 23:12:44 +01:00
|
|
|
#include "gui/timeline/timeline-widget.hpp"
|
2018-10-27 01:52:46 +02:00
|
|
|
#include "gui/timeline/timeline-controller.hpp"
|
2018-10-27 17:27:29 +02:00
|
|
|
#include "gui/timeline/timeline-layout.hpp"
|
2016-11-30 23:12:44 +01:00
|
|
|
|
|
|
|
|
//#include "gui/workspace/workspace-window.hpp"
|
|
|
|
|
//#include "gui/ui-bus.hpp"
|
|
|
|
|
//#include "lib/format-string.hpp"
|
|
|
|
|
//#include "lib/format-cout.hpp"
|
|
|
|
|
|
|
|
|
|
//#include "lib/util.hpp"
|
|
|
|
|
//#include <algorithm>
|
|
|
|
|
//#include <cstdlib>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//using util::_Fmt;
|
|
|
|
|
//using std::shared_ptr;
|
|
|
|
|
//using std::weak_ptr;
|
|
|
|
|
//using util::contains;
|
|
|
|
|
//using Gtk::Widget;
|
|
|
|
|
//using sigc::mem_fun;
|
|
|
|
|
//using sigc::ptr_fun;
|
|
|
|
|
//using std::cout;
|
|
|
|
|
//using std::endl;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace gui {
|
|
|
|
|
namespace timeline {
|
|
|
|
|
|
2016-12-01 23:58:47 +01:00
|
|
|
//const int TimelineWidget::TrackPadding = 1;
|
|
|
|
|
//const int TimelineWidget::HeaderWidth = 150;
|
|
|
|
|
//const int TimelineWidget::HeaderIndentWidth = 10;
|
2016-11-30 23:12:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-12-03 19:37:52 +01:00
|
|
|
TimelineWidget::TimelineWidget (BusTerm::ID identity, BusTerm::ID trackID, BusTerm& nexus)
|
2018-10-13 21:56:10 +02:00
|
|
|
: TimelinePage{}
|
2018-10-27 17:27:29 +02:00
|
|
|
, layout_{new TimelineLayout}
|
2018-10-27 01:52:46 +02:00
|
|
|
, control_{new TimelineController{identity, trackID, nexus, *layout_}}
|
2016-11-30 23:12:44 +01:00
|
|
|
{
|
2016-12-03 05:42:34 +01:00
|
|
|
UNIMPLEMENTED ("build the timeline UI");
|
2016-11-30 23:12:44 +01:00
|
|
|
}
|
|
|
|
|
|
2018-10-13 00:25:51 +02:00
|
|
|
TimelineWidget::~TimelineWidget() { }
|
2016-11-30 23:12:44 +01:00
|
|
|
|
2018-10-13 00:25:51 +02:00
|
|
|
|
|
|
|
|
void
|
|
|
|
|
TimelineWidget::buildMutator (lib::diff::TreeMutator::Handle buff)
|
2016-11-30 23:12:44 +01:00
|
|
|
{
|
2018-10-13 00:25:51 +02:00
|
|
|
control_->buildMutator (buff);
|
2016-11-30 23:12:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2018-10-13 23:58:49 +02:00
|
|
|
cuString
|
|
|
|
|
TimelineWidget::getLabel() const
|
|
|
|
|
{
|
2018-10-27 01:52:46 +02:00
|
|
|
return control_->getName();
|
2018-10-13 23:58:49 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-30 23:12:44 +01:00
|
|
|
|
|
|
|
|
}}// namespace gui::timeline
|