summaryrefslogtreecommitdiff
path: root/tools/bb/gui.h
blob: 4c08d5e4abb4fd5b7fff7b18e5f3261c83cd14ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef __bb_gui_h__
#define __bb_gui_h__

#include <gtkmm.h>
#include <jack/jack.h>

class BeatBox;

class BBGUI {
  public:
	BBGUI (int*, char** [], jack_client_t* jack, BeatBox* bb);
	~BBGUI ();

	void run ();

  private:
	jack_client_t* jack;
	BeatBox* bbox;
	Gtk::Main main;
	Gtk::Window window;

	Gtk::RadioButtonGroup quantize_group;
	Gtk::RadioButton quantize_off;
	Gtk::RadioButton quantize_32nd;
	Gtk::RadioButton quantize_16th;
	Gtk::RadioButton quantize_8th;
	Gtk::RadioButton quantize_quarter;
	Gtk::RadioButton quantize_half;
	Gtk::RadioButton quantize_whole;

	Gtk::ToggleButton play_button;
	Gtk::Button clear_button;

	Gtk::Adjustment tempo_adjustment;
	Gtk::SpinButton tempo_spinner;

	Gtk::VBox global_vbox;
	Gtk::VBox quantize_button_box;
	Gtk::HBox misc_button_box;


	void set_quantize (int divisor);
	void toggle_play ();
	void clear ();
	void tempo_changed ();
};

#endif /* __bb_gui_h__ */