fix math bug with numthreads computation
[ardour2.git] / gtk2_ardour / midi_tracer.h
blob47f173824345ed9cb791b7cfed5ffa018e2fd77b
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"
13 #include "pbd/pool.h"
14 #include "midi++/types.h"
15 #include "ardour_dialog.h"
17 namespace MIDI {
18 class Parser;
21 class MidiTracer : public ArdourDialog
23 public:
24 MidiTracer (const std::string&, MIDI::Parser&);
25 ~MidiTracer();
27 private:
28 MIDI::Parser& parser;
29 Gtk::TextView text;
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;
36 bool autoscroll;
37 bool show_hex;
38 bool collect;
39 volatile bool update_queued;
40 RingBuffer<char *> fifo;
41 Pool buffer_pool;
42 static const size_t buffer_size = 256;
44 void tracer (MIDI::Parser&, MIDI::byte*, size_t);
45 void update ();
47 Gtk::CheckButton autoscroll_button;
48 Gtk::CheckButton base_button;
49 Gtk::CheckButton collect_button;
51 void base_toggle ();
52 void autoscroll_toggle ();
53 void collect_toggle ();
55 void connect ();
56 void disconnect ();
57 PBD::ScopedConnection connection;
60 #endif /* __ardour_gtk_midi_tracer_h__ */