2011-01-12 23:59:12 +01:00
|
|
|
/*
|
2015-05-29 04:44:58 +02:00
|
|
|
DRAW-STRATEGY.hpp - Definition the timeline draw strategy interface
|
2011-01-12 23:59:12 +01:00
|
|
|
|
|
|
|
|
Copyright (C) Lumiera.org
|
|
|
|
|
2010, Stefan Kangas <skangas@skangas.se
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
* *****************************************************/
|
2011-05-16 08:38:01 +02:00
|
|
|
|
2011-01-12 23:59:12 +01:00
|
|
|
|
2015-05-29 04:44:58 +02:00
|
|
|
|
|
|
|
|
#ifndef GUI_WIDGET_TIMELINE_DRAW_STRATEGY_HPP
|
|
|
|
|
#define GUI_WIDGET_TIMELINE_DRAW_STRATEGY_HPP
|
2011-01-12 23:59:12 +01:00
|
|
|
|
2011-05-16 08:38:01 +02:00
|
|
|
#include "gui/gtk-base.hpp"
|
2015-05-29 04:44:58 +02:00
|
|
|
#include "gui/widget/timeline/timeline-entity.hpp"
|
|
|
|
|
#include "gui/widget/timeline/timeline-view-window.hpp"
|
2011-01-12 23:59:12 +01:00
|
|
|
|
|
|
|
|
namespace gui {
|
2015-05-29 04:44:58 +02:00
|
|
|
namespace widget {
|
2011-01-12 23:59:12 +01:00
|
|
|
namespace timeline {
|
2011-05-16 08:38:01 +02:00
|
|
|
|
|
|
|
|
/////////TODO some questions:
|
|
|
|
|
///////// 1) who is allowed to destroy DrawStrategy objects
|
|
|
|
|
///////// 2) shouldn't DrawStragegy be boost::noncopyable?
|
|
|
|
|
|
|
|
|
|
|
2011-01-12 23:59:12 +01:00
|
|
|
/**
|
|
|
|
|
* An interface for drawing strategies for timeline entities.
|
|
|
|
|
*/
|
|
|
|
|
class DrawStrategy
|
2011-05-16 08:38:01 +02:00
|
|
|
{
|
|
|
|
|
protected:
|
2015-05-29 04:44:58 +02:00
|
|
|
|
2011-05-16 08:38:01 +02:00
|
|
|
DrawStrategy() { }
|
2015-05-29 04:44:58 +02:00
|
|
|
|
2011-05-16 08:38:01 +02:00
|
|
|
virtual ~DrawStrategy();
|
2015-05-29 04:44:58 +02:00
|
|
|
|
2011-05-16 08:38:01 +02:00
|
|
|
public:
|
2015-05-29 04:44:58 +02:00
|
|
|
|
2011-05-16 08:38:01 +02:00
|
|
|
virtual void
|
|
|
|
|
draw (const Entity &entity,
|
|
|
|
|
Cairo::RefPtr<Cairo::Context> cr,
|
|
|
|
|
TimelineViewWindow* const window) const = 0;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2015-05-29 04:44:58 +02:00
|
|
|
}}}// namespace gui::widget::timeline
|
|
|
|
|
#endif /*GUI_WIDGET_TIMELINE_DRAW_STRATEGY_HPP*/
|