projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
packaging tweaks for OS X
[ardour.git]
/
gtk2_ardour
/
marker_time_axis_view.h
diff --git
a/gtk2_ardour/marker_time_axis_view.h
b/gtk2_ardour/marker_time_axis_view.h
index 26b070ef6ac3b6c67fdcac40985e193340863b8c..caf022178b42211dfaf96d69c02e83a98d47a781 100644
(file)
--- a/
gtk2_ardour/marker_time_axis_view.h
+++ b/
gtk2_ardour/marker_time_axis_view.h
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2003 Paul Davis
+ Copyright (C) 2003 Paul Davis
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
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
@@
-15,18
+15,18
@@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id$
*/
#ifndef __ardour_marker_time_axis_view_h__
#define __ardour_marker_time_axis_view_h__
#include <list>
*/
#ifndef __ardour_marker_time_axis_view_h__
#define __ardour_marker_time_axis_view_h__
#include <list>
+#include <gdkmm/color.h>
+#include <libgnomecanvasmm/group.h>
-#include <gtkmm.h>
-#include <gtk-canvas.h>
-
-#include <ardour/location.h>
+#include "ardour/location.h"
+#include "simplerect.h"
+#include "canvas.h"
class PublicEditor;
class MarkerTimeAxis;
class PublicEditor;
class MarkerTimeAxis;
@@
-38,44
+38,44
@@
class TimeAxisViewItem ;
/**
* A view helper for handling MarkerView objects.
* This object is responsible for the time axis canvas view, and
/**
* A view helper for handling MarkerView objects.
* This object is responsible for the time axis canvas view, and
- * maintains the list of items that have been added to it
+ * maintains the list of items that have been added to it
*/
class MarkerTimeAxisView : public sigc::trackable
{
public:
//---------------------------------------------------------------------------------------//
// Constructor / Desctructor
*/
class MarkerTimeAxisView : public sigc::trackable
{
public:
//---------------------------------------------------------------------------------------//
// Constructor / Desctructor
-
+
/**
* Construct a new MarkerTimeAxisView helper time axis helper
*
* @param mta the TimeAxsiView that this objbect is the helper for
*/
MarkerTimeAxisView(MarkerTimeAxis& mta) ;
/**
* Construct a new MarkerTimeAxisView helper time axis helper
*
* @param mta the TimeAxsiView that this objbect is the helper for
*/
MarkerTimeAxisView(MarkerTimeAxis& mta) ;
-
+
/**
* Destructor
* Reposinsibly for destroying all marker items that may have been added to this time axis view
*
*/
~MarkerTimeAxisView () ;
/**
* Destructor
* Reposinsibly for destroying all marker items that may have been added to this time axis view
*
*/
~MarkerTimeAxisView () ;
-
+
//---------------------------------------------------------------------------------------//
// Parent/Child helper object accessors
//---------------------------------------------------------------------------------------//
// Parent/Child helper object accessors
-
+
/**
* Returns the TimeAxisView thatt his object is acting as a helper for
*
* @return the TimeAxisView that this object is acting as a view helper for
*/
MarkerTimeAxis& trackview() { return _trackview; }
/**
* Returns the TimeAxisView thatt his object is acting as a helper for
*
* @return the TimeAxisView that this object is acting as a view helper for
*/
MarkerTimeAxis& trackview() { return _trackview; }
-
+
/**
*
*/
/**
*
*/
-
GtkCanvas
Item *canvas_item() { return canvas_group; }
-
-
+
ArdourCanvas::
Item *canvas_item() { return canvas_group; }
+
+
//---------------------------------------------------------------------------------------//
// ui methods & data
//---------------------------------------------------------------------------------------//
// ui methods & data
@@
-85,7
+85,7
@@
class MarkerTimeAxisView : public sigc::trackable
* @param height the new height
*/
int set_height(gdouble height) ;
* @param height the new height
*/
int set_height(gdouble height) ;
-
+
/**
* Sets the position of this view helper on the canvas
*
/**
* Sets the position of this view helper on the canvas
*
@@
-93,32
+93,32
@@
class MarkerTimeAxisView : public sigc::trackable
* @param y the y position upon the canvas
*/
int set_position(gdouble x, gdouble y) ;
* @param y the y position upon the canvas
*/
int set_position(gdouble x, gdouble y) ;
-
+
/**
* Sets the current samples per unit.
* this method tells each item upon the time axis of the change
/**
* Sets the current samples per unit.
* this method tells each item upon the time axis of the change
- *
+ *
* @param spu the new samples per canvas unit value
*/
int set_samples_per_unit(gdouble spu) ;
* @param spu the new samples per canvas unit value
*/
int set_samples_per_unit(gdouble spu) ;
-
+
/**
* Returns the current samples per unit of this time axis view helper
*
* @return the current samples per unit of this time axis view helper
*/
gdouble get_samples_per_unit() { return _samples_per_unit; }
/**
* Returns the current samples per unit of this time axis view helper
*
* @return the current samples per unit of this time axis view helper
*/
gdouble get_samples_per_unit() { return _samples_per_unit; }
-
+
/**
* Sets the color of the items contained upon this view helper
*
* @param color the new base color
*/
/**
* Sets the color of the items contained upon this view helper
*
* @param color the new base color
*/
- void apply_color(GdkColor& color) ;
+ void apply_color(Gdk
::
Color& color) ;
//---------------------------------------------------------------------------------------//
// Child MarkerView Accessors/Mutators
//---------------------------------------------------------------------------------------//
// Child MarkerView Accessors/Mutators
-
+
/**
* Adds a marker view to the list of items upon this time axis view helper
* the new MarkerView is returned
/**
* Adds a marker view to the list of items upon this time axis view helper
* the new MarkerView is returned
@@
-130,8
+130,8
@@
class MarkerTimeAxisView : public sigc::trackable
* @param duration the duration the new item should be placed upon the timeline
* @param src the identity of the object that initiated the change
*/
* @param duration the duration the new item should be placed upon the timeline
* @param src the identity of the object that initiated the change
*/
- MarkerView* add_marker_view(ImageFrameView* ifv, std::string mark_type, std::string mark_id,
jack_nframes_t start, jack_
nframes_t dur, void* src) ;
-
+ MarkerView* add_marker_view(ImageFrameView* ifv, std::string mark_type, std::string mark_id,
nframes_t start,
nframes_t dur, void* src) ;
+
/**
* Returns the named MarkerView or 0 if the named marker does not exist
*
/**
* Returns the named MarkerView or 0 if the named marker does not exist
*
@@
-139,7
+139,7
@@
class MarkerTimeAxisView : public sigc::trackable
* @return the named MarkerView, or 0 if it is not held upon this view
*/
MarkerView* get_named_marker_view(std::string item_id) ;
* @return the named MarkerView, or 0 if it is not held upon this view
*/
MarkerView* get_named_marker_view(std::string item_id) ;
-
+
/**
* Removes the currently selected MarverView
* Note that this method actually destroys the MarkerView too.
/**
* Removes the currently selected MarverView
* Note that this method actually destroys the MarkerView too.
@@
-149,7
+149,7
@@
class MarkerTimeAxisView : public sigc::trackable
* @see add_marker_view
*/
void remove_selected_marker_view(void* src) ;
* @see add_marker_view
*/
void remove_selected_marker_view(void* src) ;
-
+
/**
* Removes and returns the named MarkerView from the list of MarkerView held by this view helper
*
/**
* Removes and returns the named MarkerView from the list of MarkerView held by this view helper
*
@@
-158,7
+158,7
@@
class MarkerTimeAxisView : public sigc::trackable
* @see add_marker_view
*/
MarkerView* remove_named_marker_view(std::string item_id, void* src) ;
* @see add_marker_view
*/
MarkerView* remove_named_marker_view(std::string item_id, void* src) ;
-
+
/**
* Removes mv from the list of MarkerView upon this TimeAxis
*
/**
* Removes mv from the list of MarkerView upon this TimeAxis
*
@@
-166,7
+166,7
@@
class MarkerTimeAxisView : public sigc::trackable
* @param src the identity of the object that initiated the change
*/
void remove_marker_view(MarkerView* item, void* src) ;
* @param src the identity of the object that initiated the change
*/
void remove_marker_view(MarkerView* item, void* src) ;
-
+
//---------------------------------------------------------------------------------------//
// Selected item methods
//---------------------------------------------------------------------------------------//
// Selected item methods
@@
-176,21
+176,21
@@
class MarkerTimeAxisView : public sigc::trackable
* @param mv the item to set selected
*/
void set_selected_time_axis_item(MarkerView* mv) ;
* @param mv the item to set selected
*/
void set_selected_time_axis_item(MarkerView* mv) ;
-
+
/**
* Clears any selected item upon this time axis
*
*/
void clear_selected_time_axis_item() ;
/**
* Clears any selected item upon this time axis
*
*/
void clear_selected_time_axis_item() ;
-
+
/**
* Returnsthe currently selected item upon this time axis
*
* @return the currently selected item pon this time axis
*/
MarkerView* get_selected_time_axis_item() ;
/**
* Returnsthe currently selected item upon this time axis
*
* @return the currently selected item pon this time axis
*/
MarkerView* get_selected_time_axis_item() ;
-
-
+
+
/**
* Sets the duration of the selected MarkerView to the specified number of seconds
*
/**
* Sets the duration of the selected MarkerView to the specified number of seconds
*
@@
-200,40
+200,40
@@
class MarkerTimeAxisView : public sigc::trackable
//---------------------------------------------------------------------------------//
// Emitted Signals
//---------------------------------------------------------------------------------//
// Emitted Signals
-
+
/** Emitted when a MarkerView is Added */
sigc::signal<void,MarkerView*,void*> MarkerViewAdded ;
/** Emitted when a MarkerView is Added */
sigc::signal<void,MarkerView*,void*> MarkerViewAdded ;
-
+
/** Emitted when a MarkerView Item is removed */
sigc::signal<void,std::string,void*> MarkerViewRemoved ;
/** Emitted when a MarkerView Item is removed */
sigc::signal<void,std::string,void*> MarkerViewRemoved ;
-
+
private:
/**
* convenience method to re-get the samples per unit and tell items upon this view
*
*/
void reset_samples_per_unit() ;
private:
/**
* convenience method to re-get the samples per unit and tell items upon this view
*
*/
void reset_samples_per_unit() ;
-
+
/** The list of items held by this time axis view helper */
typedef std::list<MarkerView *> MarkerViewList ;
MarkerViewList marker_view_list;
/** The list of items held by this time axis view helper */
typedef std::list<MarkerView *> MarkerViewList ;
MarkerViewList marker_view_list;
-
+
/** the currently selected time axis item upon this time axis */
MarkerView* selected_time_axis_item ;
/** the currently selected time axis item upon this time axis */
MarkerView* selected_time_axis_item ;
-
+
/* the TimeAxisView that this object is acting as the view helper for */
MarkerTimeAxis& _trackview ;
/* the TimeAxisView that this object is acting as the view helper for */
MarkerTimeAxis& _trackview ;
-
-
GtkCanvasItem
*canvas_group ;
-
GtkCanvasItem
*canvas_rect ; /* frame around the whole thing */
+
+
ArdourCanvas::Group
*canvas_group ;
+
ArdourCanvas::SimpleRect
*canvas_rect ; /* frame around the whole thing */
/** the current samples per unit */
double _samples_per_unit;
/* XXX why are these different? */
/** the current samples per unit */
double _samples_per_unit;
/* XXX why are these different? */
- GdkColor region_color;
+ Gdk
::
Color region_color;
uint32_t stream_base_color;
uint32_t stream_base_color;
-
+
}; /* class MarkerTimeAxisView */
#endif /* __ardour_marker_time_axis_view_h__ */
}; /* class MarkerTimeAxisView */
#endif /* __ardour_marker_time_axis_view_h__ */