1 #ifndef __ardour_gtk_midi_tracer_h__
2 #define __ardour_gtk_midi_tracer_h__
4 #include <gtkmm/textview.h>
5 #include <gtkmm/scrolledwindow.h>
6 #include <gtkmm/togglebutton.h>
7 #include <gtkmm/adjustment.h>
8 #include <gtkmm/spinbutton.h>
9 #include <gtkmm/label.h>
11 #include "pbd/signals.h"
12 #include "pbd/ringbuffer.h"
14 #include "midi++/types.h"
15 #include "ardour_dialog.h"
21 class MidiTracer : public ArdourDialog
24 MidiTracer (const std::string&, MIDI::Parser&);
30 Gtk::ScrolledWindow scroller;
31 Gtk::Adjustment line_count_adjustment;
32 Gtk::SpinButton line_count_spinner;
33 Gtk::Label line_count_label;
34 Gtk::HBox line_count_box;
40 /** Incremented when an update is requested, decremented when one is handled; hence
41 * equal to 0 when an update is not queued. May temporarily be negative if a
42 * update is handled before it was noted that it had just been queued.
44 volatile gint _update_queued;
46 RingBuffer<char *> fifo;
48 static const size_t buffer_size = 256;
50 void tracer (MIDI::Parser&, MIDI::byte*, size_t);
53 Gtk::CheckButton autoscroll_button;
54 Gtk::CheckButton base_button;
55 Gtk::CheckButton collect_button;
58 void autoscroll_toggle ();
59 void collect_toggle ();
63 PBD::ScopedConnection connection;
66 #endif /* __ardour_gtk_midi_tracer_h__ */