imageframe_view.cc
io_selector.cc
keyboard.cc
-keyboard_target.cc
location_ui.cc
main.cc
marker.cc
{
ui_manager.insert_action_group (grp);
}
+
+Widget*
+ActionManager::get_widget (ustring name)
+{
+ return ui_manager.get_widget (name);
+}
+
+RefPtr<Action>
+ActionManager::get_action (ustring name)
+{
+ return ui_manager.get_action (name);
+}
static std::string unbound_string; /* the key string returned if an action is not bound */
static Gtk::UIManager ui_manager;
+ static Gtk::Widget* get_widget (Glib::ustring name);
+ static Glib::RefPtr<Gtk::Action> get_action (Glib::ustring name);
+
static void add_action_group (Glib::RefPtr<Gtk::ActionGroup>);
static Glib::RefPtr<Gtk::Action> register_action (Glib::RefPtr<Gtk::ActionGroup> group,
class WaveView;
class Text;
class Line;
+ class Points;
+ class ImageFrame;
}
}
#include "i18n.h"
using namespace Gtk;
+using namespace Glib;
using namespace std;
using namespace sigc;
using namespace ARDOUR;
void
Editor::register_actions ()
{
-
- Glib::RefPtr<ActionGroup> editor_actions = ActionGroup::create (X_("Editor"));
+ RefPtr<Action> act;
+ RefPtr<ActionGroup> editor_actions = ActionGroup::create (X_("Editor"));
/* add named actions for the editor */
RadioAction::Group sort_type_group;
RadioAction::Group sort_order_group;
- ActionManager::register_action (rl_actions, X_("rlAudition"), _("Audition"), mem_fun(*this, &Editor::audition_region_from_region_list));
- ActionManager::register_action (rl_actions, X_("rlHide"), _("Hide"), mem_fun(*this, &Editor::hide_region_from_region_list));
- ActionManager::register_action (rl_actions, X_("rlRemove"), _("Remove"), mem_fun (*this, &Editor::remove_region_from_region_list));
+ act = ActionManager::register_action (rl_actions, X_("rlAudition"), _("Audition"), mem_fun(*this, &Editor::audition_region_from_region_list));
+ ActionManager::region_list_selection_sensitive_actions.push_back (act);
+ act = ActionManager::register_action (rl_actions, X_("rlHide"), _("Hide"), mem_fun(*this, &Editor::hide_region_from_region_list));
+ ActionManager::region_list_selection_sensitive_actions.push_back (act);
+ act = ActionManager::register_action (rl_actions, X_("rlRemove"), _("Remove"), mem_fun (*this, &Editor::remove_region_from_region_list));
+ ActionManager::region_list_selection_sensitive_actions.push_back (act);
ActionManager::register_action (rl_actions, X_("rlShowAll"), _("Show all"), mem_fun(*this, &Editor::toggle_full_region_list));
ActionManager::register_radio_action (rl_actions, sort_order_group, X_("SortAscending"), _("Ascending"),
ActionManager::register_radio_action (rl_actions, sort_type_group, X_("SortBySourceFilesystem"), _("By Source Filesystem"),
bind (mem_fun(*this, &Editor::reset_region_list_sort_type), BySourceFileFS));
- ActionManager::register_action (rl_actions, X_("rlEmbedAudio"), _("Embed audio (link)"), mem_fun(*this, &Editor::embed_audio));
- ActionManager::register_action (rl_actions, X_("rlImportAudio"), _("Embed audio (link)"), bind (mem_fun(*this, &Editor::import_audio), false));
-
+ act = ActionManager::register_action (rl_actions, X_("rlEmbedAudio"), _("Embed audio (link)"), mem_fun(*this, &Editor::embed_audio));
+ ActionManager::session_sensitive_actions.push_back (act);
+ act = ActionManager::register_action (rl_actions, X_("rlImportAudio"), _("Embed audio (link)"), bind (mem_fun(*this, &Editor::import_audio), false));
+ ActionManager::session_sensitive_actions.push_back (act);
ActionManager::add_action_group (rl_actions);
ActionManager::add_action_group (mouse_mode_actions);
ActionManager::add_action_group (snap_actions);
ActionManager::add_action_group (editor_actions);
-
}
#include "simplerect.h"
#include "editing.h"
#include "gui_thread.h"
+#include "simplerect.h"
#include "i18n.h"
}
if (location->is_mark()) {
- lam->start = new Marker (*this, *marker_group, color,
- location->name(), Marker::Mark, PublicEditor::canvas_marker_event, location->start());
+ lam->start = new Marker (*this, *marker_group, color, location->name(), Marker::Mark, location->start());
lam->end = 0;
} else if (location->is_auto_loop()) {
// transport marker
lam->start = new Marker (*this, *transport_marker_group, color,
- location->name(), Marker::LoopStart, PublicEditor::canvas_marker_event, location->start());
+ location->name(), Marker::LoopStart, location->start());
lam->end = new Marker (*this, *transport_marker_group, color,
- location->name(), Marker::LoopEnd, PublicEditor::canvas_marker_event, location->end());
+ location->name(), Marker::LoopEnd, location->end());
} else if (location->is_auto_punch()) {
// transport marker
lam->start = new Marker (*this, *transport_marker_group, color,
- location->name(), Marker::PunchIn, PublicEditor::canvas_marker_event, location->start());
+ location->name(), Marker::PunchIn, location->start());
lam->end = new Marker (*this, *transport_marker_group, color,
- location->name(), Marker::PunchOut, PublicEditor::canvas_marker_event, location->end());
+ location->name(), Marker::PunchOut, location->end());
} else {
// range marker
lam->start = new Marker (*this, *range_marker_group, color,
- location->name(), Marker::Start, PublicEditor::canvas_marker_event, location->start());
+ location->name(), Marker::Start, location->start());
lam->end = new Marker (*this, *range_marker_group, color,
- location->name(), Marker::End, PublicEditor::canvas_marker_event, location->end());
+ location->name(), Marker::End, location->end());
}
if (location->is_hidden ()) {
Marker* marker;
bool is_start;
- if ((marker = item.get_data ("marker")) == 0) {
+ if ((marker = static_cast<Marker*> (item.get_data ("marker"))) == 0) {
fatal << _("programming error: marker canvas item has no marker object pointer!") << endmsg;
/*NOTREACHED*/
}
Gtkmm2ext::Choice prompter (prompt, choices);
- prompter.chosen.connect (Gtk::Main::quit.slot());
+ prompter.chosen.connect (ptr_fun (Main::quit));
prompter.show_all ();
- Gtk::Main::run ();
-
+ Main::run ();
+
if (prompter.get_choice() != 0) {
return;
}
void
Editor::insert_region_list_drag (AudioRegion& region)
{
- double x, y;
+ int x, y;
double wx, wy;
double cx, cy;
TimeAxisView *tv;
Playlist *playlist;
track_canvas.get_pointer (x, y);
-
track_canvas.window_to_world (x, y, wx, wy);
GdkEvent event;
Glib::RefPtr<TreeSelection> selected = region_list_display.get_selection();
- if (selected.count_selected_rows() != 1) {
+ if (selected->count_selected_rows() != 1) {
return;
}
string_compose (_("%1\nThis audiofile's sample rate doesn't match the session sample rate!"), path),
choices);
- rate_choice.chosen.connect (Main::quit.slot());
+ rate_choice.chosen.connect (ptr_fun (Main::quit));
rate_choice.show_all ();
Main::run ();
Glib::RefPtr<TreeSelection> selected = region_list_display.get_selection();
- if (selected.count_selected_rows() != 1) {
+ if (selected->count_selected_rows() != 1) {
return;
}
void
Editor::mouse_paste ()
{
- double x, y;
+ int x, y;
double wx, wy;
track_canvas.get_pointer (x, y);
track_canvas.window_to_world (x, y, wx, wy);
void
Editor::paste_named_selection (float times)
{
- TrackSelection::iterator i;
+ TrackSelection::iterator t;
Glib::RefPtr<TreeSelection> selected = named_selection_display.get_selection();
- if (selected.count_selected_rows() == 0 || selection->tracks.empty()) {
+ if (selected->count_selected_rows() != 1 || selection->tracks.empty()) {
return;
}
begin_reversible_command (_("paste chunk"));
- for (i = selection->tracks.begin(); i != selection->tracks.end(); ++i) {
+ for (t = selection->tracks.begin(); t != selection->tracks.end(); ++t) {
AudioTimeAxisView* atv;
Playlist* pl;
AudioPlaylist* apl;
- if ((atv = dynamic_cast<AudioTimeAxisView*> (*i)) == 0) {
+ if ((atv = dynamic_cast<AudioTimeAxisView*> (*t)) == 0) {
continue;
}
choices.push_back (_("Yes, destroy it."));
choices.push_back (_("No, do nothing."));
-
+
Gtkmm2ext::Choice prompter (prompt, choices);
- prompter.done.connect (Gtk::Main::quit.slot());
+ prompter.chosen.connect (ptr_fun (Main::quit));
prompter.show_all ();
- Gtk::Main::run ();
-
+ Main::run ();
+
if (prompter.get_choice() == 0) {
session->remove_last_capture ();
}
+
} else {
session->remove_last_capture();
}
using namespace ARDOUR;
using namespace Gtk;
using namespace Editing;
-using namespace ActionManager;
#define wave_cursor_width 43
#define wave_cursor_height 61
sensitive = false;
}
- for (vector<Glib::RefPtr<Gtk::Action> >::iterator i = region_list_selection_sensitive_actions.begin(); i != region_list_selection_sensitive_actions.end(); ++i) {
+ for (vector<Glib::RefPtr<Gtk::Action> >::iterator i = ActionManager::region_list_selection_sensitive_actions.begin(); i != ActionManager::region_list_selection_sensitive_actions.end(); ++i) {
(*i)->set_sensitive (sensitive);
}
void
Editor::build_region_list_menu ()
{
- region_list_menu = dynamic_cast<Menu*>(ui_manager->get_widget ("/RegionListMenu"));
+ region_list_menu = dynamic_cast<Menu*>(ActionManager::get_widget ("/RegionListMenu"));
/* now grab specific menu items that we need */
- toggle_full_region_list_action = ui_manager->get_action ("<Actions>/RegionList/rlShowAll");
-
- region_list_selection_sensitive_actions.push_back (ui_manager->get_action ("<Actions>/RegionList/rlHide"));
- region_list_selection_sensitive_actions.push_back (ui_manager->get_action ("<Actions>/RegionList/rlAudition"));
- region_list_selection_sensitive_actions.push_back (ui_manager->get_action ("<Actions>/RegionList/rlRemove"));
-
- session_sensitive_actions.push_back (ui_manager->get_action ("<Actions>/RegionList/rlEmbedAudio"));
- session_sensitive_actions.push_back (ui_manager->get_action ("<Actions>/RegionList/rlImportAudio"));
+ toggle_full_region_list_action = ActionManager::get_action ("<Actions>/RegionList/rlShowAll");
}
void
double tbpos = 0.0;
double old_unit_pos ;
- GtkArg args[1] ;
- args[0].name = "y";
if (ruler_shown[ruler_time_meter]) {
lab_children.push_back (Element(meter_label, PACK_SHRINK, PACK_START));
- gtk_object_get (GTK_OBJECT(meter_group), "y", &old_unit_pos);
+ old_unit_pos = meter_group->property_y();
if (tbpos != old_unit_pos) {
meter_group->move ( 0.0, tbpos - old_unit_pos);
}
-
- //gnome_canvas_item_set (meter_group, "y", tbpos, NULL);
meter_group->show();
tbpos += timebar_height;
visible_timebars++;
if (tbpos != old_unit_pos) {
tempo_group->move(0.0, tbpos - old_unit_pos);
}
- //gnome_canvas_item_set (tempo_group, "y", tbpos, NULL);
tempo_group->show();
tbpos += timebar_height;
visible_timebars++;
if (ruler_shown[ruler_time_marker]) {
lab_children.push_back (Element(mark_label, PACK_SHRINK, PACK_START));
- gtk_object_getv (GTK_OBJECT(marker_group), 1, args) ;
- old_unit_pos = GTK_VALUE_DOUBLE (args[0]) ;
- gtk_object_get (GTK_OBJECT(marker_group), "y", &old_unit_pos);
+ old_unit_pos = marker_group->property_y();
if (tbpos != old_unit_pos) {
marker_group->move ( 0.0, tbpos - old_unit_pos);
}
- //gnome_canvas_item_set (marker_group, "y", tbpos, NULL);
marker_group->show();
tbpos += timebar_height;
visible_timebars++;
if (ruler_shown[ruler_time_range_marker]) {
lab_children.push_back (Element(range_mark_label, PACK_SHRINK, PACK_START));
- gtk_object_getv (GTK_OBJECT(range_marker_group), 1, args) ;
- old_unit_pos = GTK_VALUE_DOUBLE (args[0]) ;
+ old_unit_pos = range_marker_group->property_y();
if (tbpos != old_unit_pos) {
range_marker_group->move (0.0, tbpos - old_unit_pos);
}
- //gnome_canvas_item_set (marker_group, "y", tbpos, NULL);
range_marker_group->show();
tbpos += timebar_height;
visible_timebars++;
if (ruler_shown[ruler_time_transport_marker]) {
lab_children.push_back (Element(transport_mark_label, PACK_SHRINK, PACK_START));
- gtk_object_get (GTK_OBJECT(transport_marker_group), "y", &old_unit_pos);
+ old_unit_pos = transport_marker_group->property_y();
if (tbpos != old_unit_pos) {
transport_marker_group->move ( 0.0, tbpos - old_unit_pos);
}
- //gnome_canvas_item_set (marker_group, "y", tbpos, NULL);
transport_marker_group->show();
tbpos += timebar_height;
visible_timebars++;
if ((ms = dynamic_cast<const MeterSection*>(*i)) != 0) {
snprintf (buf, sizeof(buf), "%g/%g", ms->beats_per_bar(), ms->note_divisor ());
metric_marks.push_back (new MeterMarker (*this, *meter_group, color_map[cMeterMarker], buf,
- *(const_cast<MeterSection*>(ms)), PublicEditor::canvas_meter_marker_event));
+ *(const_cast<MeterSection*>(ms))));
} else if ((ts = dynamic_cast<const TempoSection*>(*i)) != 0) {
snprintf (buf, sizeof (buf), "%.2f", ts->beats_per_minute());
metric_marks.push_back (new TempoMarker (*this, *tempo_group, color_map[cTempoMarker], buf,
- *(const_cast<TempoSection*>(ts)), PublicEditor::canvas_tempo_marker_event));
+ *(const_cast<TempoSection*>(ts))));
}
}
#include "utils.h"
#include "logmeter.h"
#include "gui_thread.h"
+#include "keyboard.h"
#include <ardour/session.h>
#include <ardour/route.h>
: Item(GNOME_CANVAS_ITEM(g_object_new(get_type(),0)))
{
item_construct(parentx);
- set("x1",x1,"y1",y1,"x2",x2,"y2",y2,0);
+ set("pixbuf", pbuf, "x", x,"y", y,"width", w,"height", h, 0);
}
ImageFrame::ImageFrame(Group& parentx)
namespace Glib
{
-ArdourCanvas::ImageFrame* wrap(GnomeCanvasImageFrame* object, bool take_copy)
+Gnome::Canvas::ImageFrame* wrap(GnomeCanvasImageFrame* object, bool take_copy)
{
- return dynamic_cast<ArdourCanvas::ImageFrame *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+ return dynamic_cast<Gnome::Canvas::ImageFrame *> (Glib::wrap_auto ((GObject*)(object), take_copy));
}
} /* namespace Glib */
namespace Glib
{
- /** @relates ArdourCanvas::ImageFrame
+ /** @relates Gnome::Canvas::ImageFrame
* @param object The C instance
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
* @result A C++ instance that wraps this C instance.
*/
- ArdourCanvas::ImageFrame* wrap(GnomeCanvasImageFrame* object, bool take_copy = false);
+ Gnome::Canvas::ImageFrame* wrap(GnomeCanvasImageFrame* object, bool take_copy = false);
}
#endif /* _LIBGNOMECANVASMM_IMAGEFRAME_H */
canvas_rect.property_outline_color_rgba().set_value(color_map[cImageTrackOutline]);
canvas_rect.property_fill_color_rgba().set_value(stream_base_color);
- canvas_rect.signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_imageframe_view_event), canvas_rect, &_trackview));
+ canvas_rect.signal_event().connect (bind (mem_fun (_trackview.editor, &PublicEditor::canvas_imageframe_view_event), (ArdourCanvas::Item*) &canvas_rect, &tv));
_samples_per_unit = _trackview.editor.get_current_zoom() ;
#include "public_editor.h"
#include "utils.h"
#include "imageframe_view.h"
-#include "canvas-imageframe.h"
+#include "imageframe.h"
+#include "canvas_impl.h"
#include "gui_thread.h"
using namespace sigc ;
using namespace ARDOUR ;
+using namespace Gtk;
sigc::signal<void,ImageFrameView*> ImageFrameView::GoingAway;
//calculate our image width based on the track height
double im_ratio = (double)width/(double)height ;
- int im_width = (int)((double)(trackview.height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE) * im_ratio) ;
+ double im_width = ((double)(trackview.height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE) * im_ratio) ;
- imageframe = gnome_canvas_item_new(GNOME_CANVAS_GROUP(group),
- gnome_canvas_imageframe_get_type(),
- "pixbuf", pbuf,
- "x", (gdouble) 1.0,
- "y", (gdouble) 1.0,
- "anchor", GTK_ANCHOR_NW,
- "width", (gdouble) im_width,
- "height", (gdouble) (trackview.height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE),
- NULL) ;
-
- frame_handle_start->signal_event().connect() (bind (mem_fun (editor, &PublicEditor::canvas_imageframe_start_handle_event), frame_handle_start));
- frame_handle_end->signal_event().connect() (bind (mem_fun (editor, &PublicEditor::canvas_imageframe_end_handle_event), frame_handle_end));
- group->signal_event().connect() (bind (mem_fun (editor, &PublicEditor::canvas_imageframe_item_view_event, this);), group));
+ imageframe = new ImageFrame (*group, pbuf, 1.0, 1.0, ANCHOR_NW, im_width, (trackview.height - TimeAxisViewItem::NAME_HIGHLIGHT_SIZE));
+
+ frame_handle_start->signal_event().connect (bind (mem_fun (trackview.editor, &PublicEditor::canvas_imageframe_start_handle_event), frame_handle_start, this));
+ frame_handle_end->signal_event().connect (bind (mem_fun (trackview.editor, &PublicEditor::canvas_imageframe_end_handle_event), frame_handle_end, this));
+ group->signal_event().connect (bind (mem_fun (trackview.editor, &PublicEditor::canvas_imageframe_item_view_event), imageframe, this));
-
frame_handle_start->raise_to_top();
frame_handle_end->raise_to_top();
if(imageframe)
{
- gtk_object_destroy(GTK_OBJECT(imageframe)) ;
+delete imageframe;
imageframe = 0 ;
}
}
if(ret)
{
/* handle setting the sizes of our canvas itesm based on the new duration */
- gnome_canvas_item_set(imageframe, "drawwidth", (gdouble) trackview.editor.frame_to_pixel(get_duration()), NULL) ;
+ imageframe->property_drawwidth() = trackview.editor.frame_to_pixel(get_duration());
}
return(ret) ;
// set the image size
// @todo might have to re-get the image data, for a large height...hmmm.
double im_ratio = (double)image_data_width/(double)image_data_height ;
- int im_width = (int)((double)(h - TimeAxisViewItem::NAME_Y_OFFSET) * im_ratio) ;
- gnome_canvas_item_set(imageframe, "width", (gdouble)im_width, NULL) ;
- gnome_canvas_item_set(imageframe, "height",(gdouble) (h - TimeAxisViewItem::NAME_Y_OFFSET), NULL) ;
+
+ imageframe->property_width() = (h - TimeAxisViewItem::NAME_Y_OFFSET) * im_ratio;
+ imageframe->property_height() = h - TimeAxisViewItem::NAME_Y_OFFSET;
frame->raise_to_top();
- gnome_canvas_item_raise_to_top(imageframe) ;
- //imageframe->raise_to_top();
+ imageframe->raise_to_top();
name_highlight->raise_to_top();
name_text->raise_to_top();
frame_handle_start->raise_to_top();
#include <sigc++/signal.h>
#include <list>
+#include "canvas.h"
#include "enums.h"
#include "time_axis_view_item.h"
#include "marker_view.h"
// ------- Our canvas element -----------
/** the CanvasImageFrame to display the image */
- GnomeCanvasItem* imageframe ;
+ ArdourCanvas::ImageFrame* imageframe ;
} ; /* class ImageFrameView */
$Id$
*/
+#include <sigc++/bind.h>
#include <ardour/tempo.h>
#include "marker.h"
#include "public_editor.h"
-#include "canvas-simpleline.h"
#include "utils.h"
+#include "canvas_impl.h"
#include "i18n.h"
Marker::Marker (PublicEditor& ed, ArdourCanvas::Group& parent, guint32 rgba, const string& annotation,
- Type type, gint (*callback)(ArdourCanvas::Item *, GdkEvent *, gpointer), jack_nframes_t frame)
+ Type type, jack_nframes_t frame, bool handle_events)
: editor (ed), _type(type)
{
group->set_property ("x", unit_position);
group->set_property ("y", 1.0);
// cerr << "set mark al points, nc = " << points->num_points << endl;
- mark = new ArdourCanvas::Polygon (*group);
+ mark = new Polygon (*group);
mark->set_property ("points", points);
mark->set_property ("fill_color_rgba", rgba);
mark->set_property ("outline_color", Gdk::Color ("black"));
Pango::FontDescription font = get_font_for_style (N_("MarkerText"));
- text = new ArdourCanvas::Text (*group);
+ text = new Text (*group);
text->set_property ("text", annotation.c_str());
text->set_property ("x", label_offset);
text->set_property ("y", 0.0);
text->set_property ("anchor", Gtk::ANCHOR_NW);
text->set_property ("fill_color", Gdk::Color ("black"));
- group->signal_event().connect() (bind (mem_fun (editor, &PublicEditor::reposition), group, this));
+ editor.ZoomChanged.connect (mem_fun (*this, &Marker::reposition));
+
+ mark->set_data ("marker", this);
+
+ if (handle_events) {
+ group->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_marker_event), mark, this));
+ }
+
}
Marker::~Marker ()
{
- /* destroying the group destroys its contents */
+ /* destroying the parent group destroys its contents, namely any polygons etc. that we added */
delete text;
delete mark;
delete points;
}
+ArdourCanvas::Item&
+Marker::the_item() const
+{
+ return *mark;
+}
+
void
Marker::set_name (const string& name)
{
/***********************************************************************/
TempoMarker::TempoMarker (PublicEditor& editor, ArdourCanvas::Group& parent, guint32 rgba, const string& text,
- ARDOUR::TempoSection& temp,
- gint (*callback)(ArdourCanvas::Item *, GdkEvent *, gpointer))
- : Marker (editor, parent, rgba, text, Tempo, callback, 0),
+ ARDOUR::TempoSection& temp)
+ : Marker (editor, parent, rgba, text, Tempo, 0, false),
_tempo (temp)
{
set_position (_tempo.frame());
- group->set_data ("tempo_marker", this);
+ group->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_tempo_marker_event), mark, this));
}
TempoMarker::~TempoMarker ()
/***********************************************************************/
MeterMarker::MeterMarker (PublicEditor& editor, ArdourCanvas::Group& parent, guint32 rgba, const string& text,
- ARDOUR::MeterSection& m,
- gint (*callback)(ArdourCanvas::Item *, GdkEvent *, gpointer))
- : Marker (editor, parent, rgba, text, Meter, callback, 0),
+ ARDOUR::MeterSection& m)
+ : Marker (editor, parent, rgba, text, Meter, 0, false),
_meter (m)
{
set_position (_meter.frame());
- gtk_object_set_data (GTK_OBJECT(group), "meter_marker", this);
+ group->signal_event().connect (bind (mem_fun (editor, &PublicEditor::canvas_meter_marker_event), mark, this));
}
MeterMarker::~MeterMarker ()
{
}
+
#include <string>
#include <glib.h>
#include <ardour/ardour.h>
-#include <libgnomecanvasmm/group.h>
-#include <libgnomecanvasmm/text.h>
-#include <libgnomecanvasmm/polygon.h>
#include <sigc++/signal.h>
#include "canvas.h"
PunchOut
};
+
Marker (PublicEditor& editor, ArdourCanvas::Group& parent, guint32 rgba, const string& text, Type,
- gint (*callback)(ArdourCanvas::Item *, GdkEvent *, gpointer), jack_nframes_t frame = 0);
+ jack_nframes_t frame = 0, bool handle_events = true);
+
virtual ~Marker ();
+ ArdourCanvas::Item& the_item() const;
+
void set_position (jack_nframes_t);
void set_name (const string&);
void set_color_rgba (uint32_t rgba);
PublicEditor& editor;
ArdourCanvas::Group *group;
- ArdourCanvas::Item *mark;
+ ArdourCanvas::Polygon *mark;
ArdourCanvas::Text *text;
ArdourCanvas::Points *points;
class TempoMarker : public Marker
{
public:
- TempoMarker (PublicEditor& editor, ArdourCanvas::Group& parent, guint32 rgba, const string& text, ARDOUR::TempoSection&,
- gint (*callback)(ArdourCanvas::Item *, GdkEvent *, gpointer));
+ TempoMarker (PublicEditor& editor, ArdourCanvas::Group& parent, guint32 rgba, const string& text, ARDOUR::TempoSection&);
~TempoMarker ();
ARDOUR::TempoSection& tempo() const { return _tempo; }
class MeterMarker : public Marker
{
public:
- MeterMarker (PublicEditor& editor, ArdourCanvas::Group& parent, guint32 rgba, const string& text, ARDOUR::MeterSection&,
- gint (*callback)(ArdourCanvas::Item *, GdkEvent *, gpointer));
+ MeterMarker (PublicEditor& editor, ArdourCanvas::Group& parent, guint32 rgba, const string& text, ARDOUR::MeterSection&);
~MeterMarker ();
ARDOUR::MeterSection& meter() const { return _meter; }