LUMIERA.clone/src/gui/widgets/timeline/timeline-arrow-tool.hpp

95 lines
2.4 KiB
C++
Raw Normal View History

/*
timeline-arrow-tool.hpp - Declaration of the ArrowTool class
2010-12-17 23:28:49 +01:00
Copyright (C) Lumiera.org
2008, Joel Holdsworth <joel@airwebreathe.org.uk>
2010-12-17 23:28:49 +01:00
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
2010-12-17 23:28:49 +01:00
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.
2010-12-17 23:28:49 +01:00
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.
2010-12-17 23:28:49 +01:00
*/
/** @file timeline-arrow-tool.hpp
** This file contains the definition of the arrow tool class
*/
#ifndef WIDGETS_TIMELINE_ARROW_TOOL_H
#define WIDGETS_TIMELINE_ARROW_TOOL_H
2011-01-02 16:57:14 +01:00
#include "gui/gtk-base.hpp"
2011-01-02 16:57:14 +01:00
#include "gui/widgets/timeline-widget.hpp"
#include "gui/widgets/timeline/timeline-tool.hpp"
#include "gui/widgets/timeline/timeline-body.hpp"
#include "gui/widgets/timeline/timeline-track.hpp"
#include "lib/time/timevalue.hpp"
2011-01-02 16:57:14 +01:00
namespace gui {
namespace widgets {
namespace timeline {
/**
2011-01-02 16:57:14 +01:00
* A helper class to implement the timeline arrow tool
*/
2011-01-02 16:57:14 +01:00
class ArrowTool : public Tool
{
public:
/**
* Constructor
* @param timelineBody The owner timeline body object
*/
ArrowTool(TimelineBody &timelineBody);
2011-01-02 16:57:14 +01:00
/**
* Gets the type of tool represented by this class
*/
ToolType get_type() const;
2011-01-02 16:57:14 +01:00
protected:
2011-01-02 16:57:14 +01:00
/**
* Gets the cursor to display for this tool at this moment.
*/
Gdk::Cursor get_cursor() const;
2011-01-02 16:57:14 +01:00
/**
* The event handler for button press events.
*/
void on_button_press_event(GdkEventButton* event);
2011-01-02 16:57:14 +01:00
/**
* The event handler for button release events.
*/
void on_button_release_event(GdkEventButton* event);
2011-01-02 16:57:14 +01:00
/**
* The event handler for mouse move events.
*/
void on_motion_notify_event(GdkEventMotion *event);
private:
std::tr1::shared_ptr<timeline::Track>
2011-01-02 16:57:14 +01:00
getHoveringTrack ();
bool selectionRectangleActive;
};
} // namespace timeline
} // namespace widgets
} // namespace gui
#endif // TIMELINE_ARROW_TOOL_HPP