2008-04-12 22:15:07 +02:00
|
|
|
/*
|
2008-04-19 21:31:27 +02:00
|
|
|
timeline-panel.hpp - Definition of the timeline panel
|
2008-04-12 22:15:07 +02:00
|
|
|
|
|
|
|
|
Copyright (C) Lumiera.org
|
|
|
|
|
2008, Joel Holdsworth <joel@airwebreathe.org.uk>
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
*/
|
2008-04-19 21:31:27 +02:00
|
|
|
/** @file timeline-panel.hpp
|
2008-04-12 22:15:07 +02:00
|
|
|
** This file contains the definition of the timeline panel
|
|
|
|
|
*/
|
|
|
|
|
|
2008-04-19 21:31:27 +02:00
|
|
|
#ifndef TIMELINE_PANEL_HPP
|
|
|
|
|
#define TIMELINE_PANEL_HPP
|
2008-04-12 22:15:07 +02:00
|
|
|
|
|
|
|
|
#include "panel.hpp"
|
2008-04-19 21:31:27 +02:00
|
|
|
#include "../widgets/timeline-widget.hpp"
|
|
|
|
|
|
|
|
|
|
using namespace lumiera::gui::widgets;
|
2008-04-12 22:15:07 +02:00
|
|
|
|
|
|
|
|
namespace lumiera {
|
|
|
|
|
namespace gui {
|
|
|
|
|
namespace panels {
|
|
|
|
|
|
2008-08-16 18:41:57 +02:00
|
|
|
/**
|
|
|
|
|
* The definition of the timeline panel class, which holds timeline
|
|
|
|
|
* widgets.
|
|
|
|
|
*/
|
2008-07-16 23:33:42 +02:00
|
|
|
class TimelinePanel : public Panel
|
|
|
|
|
{
|
|
|
|
|
public:
|
2008-08-16 18:41:57 +02:00
|
|
|
/**
|
|
|
|
|
* Constructor
|
|
|
|
|
*/
|
2008-07-16 23:33:42 +02:00
|
|
|
TimelinePanel();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
//----- Event Handlers -----//
|
2008-07-30 01:12:37 +02:00
|
|
|
void on_arrow_tool();
|
|
|
|
|
void on_ibeam_tool();
|
|
|
|
|
|
2008-07-16 23:33:42 +02:00
|
|
|
void on_zoom_in();
|
|
|
|
|
void on_zoom_out();
|
|
|
|
|
|
2008-08-16 23:06:46 +02:00
|
|
|
void on_time_pressed();
|
|
|
|
|
|
|
|
|
|
void on_mouse_hover(gavl_time_t time);
|
|
|
|
|
|
2008-07-16 23:33:42 +02:00
|
|
|
private:
|
2008-07-30 01:12:37 +02:00
|
|
|
void update_tool_buttons();
|
2008-07-16 23:33:42 +02:00
|
|
|
void update_zoom_buttons();
|
2008-08-30 15:00:47 +02:00
|
|
|
|
|
|
|
|
void show_time(gavl_time_t time);
|
2008-07-16 23:33:42 +02:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
//----- Data -----//
|
|
|
|
|
|
|
|
|
|
// Widgets
|
|
|
|
|
Gtk::Toolbar toolbar;
|
2008-08-16 23:06:46 +02:00
|
|
|
Gtk::HBox toolStrip;
|
2008-07-16 23:33:42 +02:00
|
|
|
TimelineWidget timelineWidget;
|
|
|
|
|
|
|
|
|
|
// Toolbar Widgets
|
2008-07-30 01:12:37 +02:00
|
|
|
Gtk::ToggleToolButton arrowTool;
|
|
|
|
|
Gtk::ToggleToolButton iBeamTool;
|
|
|
|
|
|
2008-08-04 13:20:13 +02:00
|
|
|
Gtk::SeparatorToolItem seperator1;
|
|
|
|
|
|
2008-07-16 23:33:42 +02:00
|
|
|
Gtk::ToolButton zoomIn;
|
|
|
|
|
Gtk::ToolButton zoomOut;
|
|
|
|
|
|
2008-08-16 23:06:46 +02:00
|
|
|
Gtk::SeparatorToolItem seperator2;
|
|
|
|
|
|
|
|
|
|
Gtk::Label timeIndicator;
|
|
|
|
|
Gtk::ToolButton timeIndicatorButton;
|
|
|
|
|
|
2008-08-04 17:39:36 +02:00
|
|
|
// Internals
|
|
|
|
|
bool updatingToolbar;
|
|
|
|
|
|
2008-07-16 23:33:42 +02:00
|
|
|
//----- Constants -----//
|
|
|
|
|
static const int ZoomToolSteps;
|
|
|
|
|
};
|
2008-04-12 22:15:07 +02:00
|
|
|
|
|
|
|
|
} // namespace panels
|
|
|
|
|
} // namespace gui
|
|
|
|
|
} // namespace lumiera
|
|
|
|
|
|
2008-04-19 21:31:27 +02:00
|
|
|
#endif // TIMELINE_PANEL_H
|