2005-09-25 14:42:24 -04:00
|
|
|
/*
|
2009-10-14 12:10:01 -04:00
|
|
|
Copyright (C) 2003 Paul Davis
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __gtk_ardour_marker_view_h__
|
|
|
|
#define __gtk_ardour_marker_view_h__
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include "time_axis_view_item.h"
|
|
|
|
|
2005-11-23 12:21:12 -05:00
|
|
|
#include "canvas.h"
|
|
|
|
|
2005-11-28 23:41:15 -05:00
|
|
|
namespace Gdk {
|
|
|
|
class Color;
|
|
|
|
}
|
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
class MarkerTimeAxisView ;
|
|
|
|
class ImageFrameView ;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* MarkerView defines a marker item that may be placed upon a MarkerTimeAxis.
|
|
|
|
*
|
|
|
|
* The aim of the MarkerView is to provide additional timing details for visual based time axis.
|
2009-10-14 12:10:01 -04:00
|
|
|
* The MarkerView item is associated with one other TimeAxisViewItem and has a start and a duration.
|
2005-09-25 14:42:24 -04:00
|
|
|
*/
|
|
|
|
class MarkerView : public TimeAxisViewItem
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
//---------------------------------------------------------------------------------------//
|
|
|
|
// Constructor / Desctructor
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
/**
|
|
|
|
* Constructs a new MarkerView
|
2009-10-14 12:10:01 -04:00
|
|
|
*
|
2005-09-25 14:42:24 -04:00
|
|
|
* @param parent the parent canvas item
|
|
|
|
* @param tv the parent TimeAxisView of this item
|
|
|
|
* @param marked the Item that this item is to be assciated (marking) with
|
2009-10-14 12:10:01 -04:00
|
|
|
* @param spu the current samples per unit
|
2005-09-25 14:42:24 -04:00
|
|
|
* @param base_color
|
|
|
|
* @param mark_type the marker type/name text, eg fade out, pan up etc.
|
|
|
|
* @param mark_id unique name/id of this item
|
|
|
|
* @param start the start time of this item
|
|
|
|
* @param duration the duration of this item
|
|
|
|
*/
|
2005-11-23 12:21:12 -05:00
|
|
|
MarkerView(ArdourCanvas::Group *parent,
|
2005-09-25 14:42:24 -04:00
|
|
|
TimeAxisView *tv,
|
|
|
|
ImageFrameView* marked,
|
|
|
|
double spu,
|
2005-10-05 09:48:09 -04:00
|
|
|
Gdk::Color& base_color,
|
2005-09-25 14:42:24 -04:00
|
|
|
std::string mark_type,
|
|
|
|
std::string mark_id,
|
2006-09-28 13:23:52 -04:00
|
|
|
nframes_t start,
|
|
|
|
nframes_t duration) ;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Destructor
|
|
|
|
* Destroys this Marker Item and removes the association between itself and the item it is marking.
|
|
|
|
*/
|
|
|
|
~MarkerView() ;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2009-12-22 15:21:43 -05:00
|
|
|
static PBD::Signal1<void,MarkerView*> CatchDeletion;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
//---------------------------------------------------------------------------------------//
|
|
|
|
// Marker Type Methods
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
/**
|
2009-10-14 12:10:01 -04:00
|
|
|
* Sets the marker Type text of this this MarkerItem, eg fade_out, pan up etc.
|
2005-09-25 14:42:24 -04:00
|
|
|
*
|
|
|
|
* @param type_text the marker type text of this item
|
|
|
|
*/
|
|
|
|
void set_mark_type_text(std::string type_text) ;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
/**
|
2009-10-14 12:10:01 -04:00
|
|
|
* Returns the marker Type of this this MarkerItem, eg fade_out, pan up etc.
|
2005-09-25 14:42:24 -04:00
|
|
|
*
|
|
|
|
* @return the marker type text of this item
|
|
|
|
*/
|
|
|
|
std::string get_mark_type_text() const ;
|
|
|
|
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
//---------------------------------------------------------------------------------------//
|
|
|
|
// Marked Item Methods
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the time axis item being marked by this item
|
|
|
|
*
|
|
|
|
* @return the time axis item being marked by this item
|
|
|
|
*/
|
|
|
|
ImageFrameView* get_marked_item() ;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
/**
|
|
|
|
* Sets the time axis item being marker by this item
|
|
|
|
*
|
|
|
|
* @param item the time axis item to be marked by this item
|
|
|
|
* @return the previously marked item, or 0 if no previous marked item exists
|
|
|
|
*/
|
|
|
|
ImageFrameView* set_marked_item(ImageFrameView* item) ;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
//---------------------------------------------------------------------------------//
|
|
|
|
// Emitted Signals
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
/** Emitted when the mark type text is changed */
|
2005-09-25 16:33:00 -04:00
|
|
|
sigc::signal<void,std::string,void*> MarkTypeChanged ;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
/** Emitted when the Marked Item is changed */
|
2005-09-25 16:33:00 -04:00
|
|
|
sigc::signal<void,ImageFrameView*,void*> MarkedItemChanged ;
|
2005-09-25 14:42:24 -04:00
|
|
|
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
protected:
|
|
|
|
|
|
|
|
private:
|
|
|
|
/** the unique name/id of this item */
|
|
|
|
std::string mark_type_text ;
|
|
|
|
|
|
|
|
/* a pointer to the time axis item this marker is assoiated(marking up) with */
|
|
|
|
ImageFrameView* marked_item ;
|
2009-10-14 12:10:01 -04:00
|
|
|
|
2005-09-25 14:42:24 -04:00
|
|
|
} ; /* class MarkerView */
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* __gtk_ardour_imageframe_view_h__ */
|