Beast - Music Synthesizer and Composer  0.11.1+10.g2da35
bstwaveeditor.hh
Go to the documentation of this file.
1  // Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
2 #ifndef __BST_WAVE_EDITOR_H__
3 #define __BST_WAVE_EDITOR_H__
4 
5 #include "bstqsampler.hh"
6 #include "bstplayback.hh"
7 
8 
9 /* --- Gtk+ type macros --- */
10 #define BST_TYPE_WAVE_EDITOR (bst_wave_editor_get_type ())
11 #define BST_WAVE_EDITOR(object) (GTK_CHECK_CAST ((object), BST_TYPE_WAVE_EDITOR, BstWaveEditor))
12 #define BST_WAVE_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), BST_TYPE_WAVE_EDITOR, BstWaveEditorClass))
13 #define BST_IS_WAVE_EDITOR(object) (GTK_CHECK_TYPE ((object), BST_TYPE_WAVE_EDITOR))
14 #define BST_IS_WAVE_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), BST_TYPE_WAVE_EDITOR))
15 #define BST_WAVE_EDITOR_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), BST_TYPE_WAVE_EDITOR, BstWaveEditorClass))
16 
17 
18 /* --- structures & typedefs --- */
19 typedef struct _BstWaveEditor BstWaveEditor;
20 typedef struct _BstWaveEditorClass BstWaveEditorClass;
22 {
23  GtkVBox parent_object;
24  GtkWidget *main_vbox;
25 
26  GxkListWrapper *chunk_wrapper;
27  GtkWidget *tree;
28  GtkWidget *qsampler_parent;
29  GtkWidget *gmask_parent;
30  GtkAdjustment *zoom_adjustment;
31  GtkAdjustment *vscale_adjustment;
32  Bst::QSamplerDrawMode draw_mode;
33 
34  /* preview (playback) */
35  BstPlayBackHandle *phandle;
36  guint playback_length;
37  guint auto_scroll_mode;
38  GtkWidget *preview_on;
39  GtkWidget *preview_off;
40  guint playback_marker;
41  SfiNum tick_stamp;
42  guint pcm_pos;
43  gdouble pcm_per_tick;
44 
45  SfiProxy wave;
46 
47  /* editable sample view */
48  SfiProxy esample;
49  guint esample_open : 1;
50  guint ignore_playpos : 1;
51  GtkWidget *qsampler_hscroll;
52  GtkWidget *qsampler_playpos;
53  guint n_qsamplers;
54  BstQSampler **qsamplers;
55 };
57 {
58  GtkVBoxClass parent_class;
59 };
60 
61 
62 /* --- prototypes --- */
63 GtkType bst_wave_editor_get_type (void);
64 GtkWidget* bst_wave_editor_new (SfiProxy wave);
65 void bst_wave_editor_set_wave (BstWaveEditor *self,
66  SfiProxy wave);
67 void bst_wave_editor_rebuild (BstWaveEditor *wave_editor);
68 void bst_wave_editor_set_esample (BstWaveEditor *self,
69  SfiProxy editable_sample);
70 
71 
72 #endif /* __BST_WAVE_EDITOR_H__ */
Definition: bstwaveeditor.hh:21
Definition: bstplayback.hh:12
Definition: bstwaveeditor.hh:56