BEAST/BSE - Better Audio System and Sound Engine  0.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 #ifdef __cplusplus
9 extern "C" {
10 #endif /* __cplusplus */
11 
12 
13 /* --- Gtk+ type macros --- */
14 #define BST_TYPE_WAVE_EDITOR (bst_wave_editor_get_type ())
15 #define BST_WAVE_EDITOR(object) (GTK_CHECK_CAST ((object), BST_TYPE_WAVE_EDITOR, BstWaveEditor))
16 #define BST_WAVE_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), BST_TYPE_WAVE_EDITOR, BstWaveEditorClass))
17 #define BST_IS_WAVE_EDITOR(object) (GTK_CHECK_TYPE ((object), BST_TYPE_WAVE_EDITOR))
18 #define BST_IS_WAVE_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), BST_TYPE_WAVE_EDITOR))
19 #define BST_WAVE_EDITOR_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), BST_TYPE_WAVE_EDITOR, BstWaveEditorClass))
20 
21 
22 /* --- structures & typedefs --- */
23 typedef struct _BstWaveEditor BstWaveEditor;
24 typedef struct _BstWaveEditorClass BstWaveEditorClass;
26 {
27  GtkVBox parent_object;
28  GtkWidget *main_vbox;
29 
30  GxkListWrapper *chunk_wrapper;
31  GtkWidget *tree;
32  GtkWidget *qsampler_parent;
33  GtkWidget *gmask_parent;
34  GtkAdjustment *zoom_adjustment;
35  GtkAdjustment *vscale_adjustment;
36  guint draw_mode;
37 
38  /* preview (playback) */
39  BstPlayBackHandle *phandle;
40  guint playback_length;
41  guint auto_scroll_mode;
42  GtkWidget *preview_on;
43  GtkWidget *preview_off;
44  guint playback_marker;
45  SfiNum tick_stamp;
46  guint pcm_pos;
47  gdouble pcm_per_tick;
48 
49  SfiProxy wave;
50 
51  /* editable sample view */
52  SfiProxy esample;
53  guint esample_open : 1;
54  guint ignore_playpos : 1;
55  GtkWidget *qsampler_hscroll;
56  GtkWidget *qsampler_playpos;
57  guint n_qsamplers;
58  BstQSampler **qsamplers;
59 };
61 {
62  GtkVBoxClass parent_class;
63 };
64 
65 
66 /* --- prototypes --- */
67 GtkType bst_wave_editor_get_type (void);
68 GtkWidget* bst_wave_editor_new (SfiProxy wave);
69 void bst_wave_editor_set_wave (BstWaveEditor *self,
70  SfiProxy wave);
71 void bst_wave_editor_rebuild (BstWaveEditor *wave_editor);
72 void bst_wave_editor_set_esample (BstWaveEditor *self,
73  SfiProxy editable_sample);
74 
75 
76 #ifdef __cplusplus
77 }
78 #endif /* __cplusplus */
79 
80 #endif /* __BST_WAVE_EDITOR_H__ */
Definition: bstwaveeditor.hh:25
Definition: bstplayback.hh:16
Definition: bstwaveeditor.hh:60