1 |
schoenebeck |
1225 |
/* -*- c++ -*- |
2 |
schoenebeck |
2893 |
* Copyright (C) 2006 - 2016 Andreas Persson |
3 |
schoenebeck |
1225 |
* |
4 |
|
|
* This program is free software; you can redistribute it and/or |
5 |
|
|
* modify it under the terms of the GNU General Public License as |
6 |
|
|
* published by the Free Software Foundation; either version 2, or (at |
7 |
|
|
* your option) any later version. |
8 |
|
|
* |
9 |
|
|
* This program is distributed in the hope that it will be useful, but |
10 |
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of |
11 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 |
|
|
* General Public License for more details. |
13 |
|
|
* |
14 |
|
|
* You should have received a copy of the GNU General Public License |
15 |
|
|
* along with program; see the file COPYING. If not, write to the Free |
16 |
|
|
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA |
17 |
|
|
* 02110-1301 USA. |
18 |
|
|
*/ |
19 |
|
|
|
20 |
|
|
#ifndef GIGEDIT_MAINWINDOW_H |
21 |
|
|
#define GIGEDIT_MAINWINDOW_H |
22 |
|
|
|
23 |
|
|
#include <gig.h> |
24 |
|
|
|
25 |
persson |
2844 |
#include <gtkmm/box.h> |
26 |
schoenebeck |
1225 |
#include <gtkmm/actiongroup.h> |
27 |
|
|
#include <gtkmm/buttonbox.h> |
28 |
|
|
#include <gtkmm/dialog.h> |
29 |
|
|
#include <gtkmm/liststore.h> |
30 |
persson |
2442 |
#include <gtkmm/menu.h> |
31 |
schoenebeck |
1225 |
#include <gtkmm/paned.h> |
32 |
|
|
#include <gtkmm/progressbar.h> |
33 |
persson |
2442 |
#include <gtkmm/radiomenuitem.h> |
34 |
schoenebeck |
1225 |
#include <gtkmm/scrolledwindow.h> |
35 |
|
|
#include <gtkmm/treestore.h> |
36 |
|
|
#include <gtkmm/uimanager.h> |
37 |
|
|
#include <gtkmm/window.h> |
38 |
schoenebeck |
1411 |
#include <gtkmm/statusbar.h> |
39 |
|
|
#include <gtkmm/image.h> |
40 |
schoenebeck |
1225 |
|
41 |
|
|
#include <sstream> |
42 |
|
|
|
43 |
|
|
#include "regionchooser.h" |
44 |
|
|
#include "dimregionchooser.h" |
45 |
|
|
#include "dimregionedit.h" |
46 |
persson |
2507 |
#include "midirules.h" |
47 |
persson |
2325 |
#ifndef OLD_THREADS |
48 |
|
|
#include <glibmm/threads.h> |
49 |
|
|
#endif |
50 |
schoenebeck |
2893 |
#include "ManagedWindow.h" |
51 |
schoenebeck |
1225 |
|
52 |
|
|
class MainWindow; |
53 |
|
|
|
54 |
schoenebeck |
2894 |
class PropDialog : public ManagedWindow, |
55 |
persson |
2423 |
public PropEditor<DLS::Info> { |
56 |
persson |
1582 |
public: |
57 |
schoenebeck |
1225 |
PropDialog(); |
58 |
|
|
void set_info(DLS::Info* info); |
59 |
schoenebeck |
2560 |
void set_file(gig::File* file); |
60 |
schoenebeck |
2894 |
|
61 |
|
|
// implementation for abstract methods of interface class "ManagedWindow" |
62 |
|
|
virtual Settings::Property<int>* windowSettingX() { return &Settings::singleton()->filePropsWindowX; } |
63 |
|
|
virtual Settings::Property<int>* windowSettingY() { return &Settings::singleton()->filePropsWindowY; } |
64 |
|
|
virtual Settings::Property<int>* windowSettingWidth() { return &Settings::singleton()->filePropsWindowW; } |
65 |
|
|
virtual Settings::Property<int>* windowSettingHeight() { return &Settings::singleton()->filePropsWindowH; } |
66 |
|
|
|
67 |
schoenebeck |
1225 |
protected: |
68 |
schoenebeck |
2560 |
ChoiceEntry<int> eFileFormat; |
69 |
persson |
1582 |
StringEntry eName; |
70 |
|
|
StringEntry eCreationDate; |
71 |
|
|
StringEntryMultiLine eComments; |
72 |
|
|
StringEntry eProduct; |
73 |
|
|
StringEntry eCopyright; |
74 |
|
|
StringEntry eArtists; |
75 |
|
|
StringEntry eGenre; |
76 |
|
|
StringEntry eKeywords; |
77 |
|
|
StringEntry eEngineer; |
78 |
|
|
StringEntry eTechnician; |
79 |
|
|
StringEntry eSoftware; |
80 |
|
|
StringEntry eMedium; |
81 |
|
|
StringEntry eSource; |
82 |
|
|
StringEntry eSourceForm; |
83 |
|
|
StringEntry eCommissioned; |
84 |
|
|
StringEntry eSubject; |
85 |
|
|
Gtk::VBox vbox; |
86 |
|
|
Gtk::HButtonBox buttonBox; |
87 |
|
|
Gtk::Button quitButton; |
88 |
|
|
Table table; |
89 |
schoenebeck |
2560 |
|
90 |
|
|
gig::File* m_file; |
91 |
|
|
|
92 |
|
|
void onFileFormatChanged(); |
93 |
schoenebeck |
1225 |
}; |
94 |
|
|
|
95 |
schoenebeck |
2894 |
class InstrumentProps : public ManagedWindow, |
96 |
persson |
2423 |
public PropEditor<gig::Instrument> { |
97 |
schoenebeck |
1225 |
public: |
98 |
|
|
InstrumentProps(); |
99 |
|
|
void set_instrument(gig::Instrument* instrument); |
100 |
persson |
2445 |
gig::Instrument* get_instrument() { return m; } |
101 |
|
|
void update_name(); |
102 |
|
|
sigc::signal<void>& signal_name_changed() { |
103 |
|
|
return sig_name_changed; |
104 |
|
|
} |
105 |
schoenebeck |
2894 |
|
106 |
|
|
// implementation for abstract methods of interface class "ManagedWindow" |
107 |
|
|
virtual Settings::Property<int>* windowSettingX() { return &Settings::singleton()->instrPropsWindowX; } |
108 |
|
|
virtual Settings::Property<int>* windowSettingY() { return &Settings::singleton()->instrPropsWindowY; } |
109 |
|
|
virtual Settings::Property<int>* windowSettingWidth() { return &Settings::singleton()->instrPropsWindowW; } |
110 |
|
|
virtual Settings::Property<int>* windowSettingHeight() { return &Settings::singleton()->instrPropsWindowH; } |
111 |
|
|
|
112 |
schoenebeck |
1225 |
protected: |
113 |
persson |
2445 |
void set_Name(const gig::String& name); |
114 |
persson |
1460 |
void set_IsDrum(bool value); |
115 |
|
|
void set_MIDIBank(uint16_t value); |
116 |
|
|
void set_MIDIProgram(uint32_t value); |
117 |
|
|
|
118 |
persson |
2445 |
sigc::signal<void> sig_name_changed; |
119 |
schoenebeck |
1225 |
Gtk::VBox vbox; |
120 |
|
|
Gtk::HButtonBox buttonBox; |
121 |
|
|
Gtk::Button quitButton; |
122 |
persson |
1582 |
Table table; |
123 |
schoenebeck |
1225 |
StringEntry eName; |
124 |
|
|
BoolEntry eIsDrum; |
125 |
|
|
NumEntryTemp<uint16_t> eMIDIBank; |
126 |
|
|
NumEntryTemp<uint32_t> eMIDIProgram; |
127 |
|
|
NumEntryGain eAttenuation; |
128 |
|
|
BoolEntryPlus6 eGainPlus6; |
129 |
|
|
NumEntryTemp<uint16_t> eEffectSend; |
130 |
|
|
NumEntryTemp<int16_t> eFineTune; |
131 |
|
|
NumEntryTemp<uint16_t> ePitchbendRange; |
132 |
|
|
BoolEntry ePianoReleaseMode; |
133 |
|
|
NoteEntry eDimensionKeyRangeLow; |
134 |
|
|
NoteEntry eDimensionKeyRangeHigh; |
135 |
|
|
}; |
136 |
|
|
|
137 |
schoenebeck |
2683 |
class ProgressDialog : public Gtk::Dialog { |
138 |
schoenebeck |
1225 |
public: |
139 |
schoenebeck |
2683 |
ProgressDialog(const Glib::ustring& title, Gtk::Window& parent); |
140 |
schoenebeck |
1225 |
void set_fraction(float fraction) { progressBar.set_fraction(fraction); } |
141 |
|
|
protected: |
142 |
|
|
Gtk::ProgressBar progressBar; |
143 |
|
|
}; |
144 |
|
|
|
145 |
|
|
class Loader : public sigc::trackable { |
146 |
|
|
public: |
147 |
|
|
Loader(const char* filename); |
148 |
|
|
void launch(); |
149 |
|
|
Glib::Dispatcher& signal_progress(); |
150 |
schoenebeck |
2683 |
Glib::Dispatcher& signal_finished(); ///< Finished successfully, without error. |
151 |
|
|
Glib::Dispatcher& signal_error(); |
152 |
schoenebeck |
1225 |
void progress_callback(float fraction); |
153 |
|
|
float get_progress(); |
154 |
schoenebeck |
2683 |
const Glib::ustring filename; |
155 |
|
|
Glib::ustring error_message; |
156 |
schoenebeck |
1225 |
gig::File* gig; |
157 |
|
|
|
158 |
|
|
private: |
159 |
persson |
2325 |
Glib::Threads::Thread* thread; |
160 |
schoenebeck |
1225 |
void thread_function(); |
161 |
|
|
Glib::Dispatcher finished_dispatcher; |
162 |
|
|
Glib::Dispatcher progress_dispatcher; |
163 |
schoenebeck |
2683 |
Glib::Dispatcher error_dispatcher; |
164 |
persson |
2325 |
Glib::Threads::Mutex progressMutex; |
165 |
schoenebeck |
1225 |
float progress; |
166 |
|
|
}; |
167 |
|
|
|
168 |
schoenebeck |
2683 |
class Saver : public sigc::trackable { |
169 |
|
|
public: |
170 |
|
|
Saver(gig::File* file, Glib::ustring filename = ""); ///< one argument means "save", two arguments means "save as" |
171 |
|
|
void launch(); |
172 |
|
|
Glib::Dispatcher& signal_progress(); |
173 |
|
|
Glib::Dispatcher& signal_finished(); ///< Finished successfully, without error. |
174 |
|
|
Glib::Dispatcher& signal_error(); |
175 |
|
|
void progress_callback(float fraction); |
176 |
|
|
float get_progress(); |
177 |
|
|
gig::File* gig; |
178 |
|
|
const Glib::ustring filename; |
179 |
|
|
Glib::ustring error_message; |
180 |
|
|
|
181 |
|
|
private: |
182 |
|
|
Glib::Threads::Thread* thread; |
183 |
|
|
void thread_function(); |
184 |
|
|
Glib::Dispatcher finished_dispatcher; |
185 |
|
|
Glib::Dispatcher progress_dispatcher; |
186 |
|
|
Glib::Dispatcher error_dispatcher; |
187 |
|
|
Glib::Threads::Mutex progressMutex; |
188 |
|
|
float progress; |
189 |
|
|
}; |
190 |
|
|
|
191 |
schoenebeck |
2893 |
class MainWindow : public ManagedWindow { |
192 |
schoenebeck |
1225 |
public: |
193 |
|
|
MainWindow(); |
194 |
|
|
virtual ~MainWindow(); |
195 |
|
|
void load_file(const char* name); |
196 |
|
|
void load_instrument(gig::Instrument* instr); |
197 |
persson |
1261 |
void file_changed(); |
198 |
schoenebeck |
1339 |
sigc::signal<void, gig::File*>& signal_file_structure_to_be_changed(); |
199 |
|
|
sigc::signal<void, gig::File*>& signal_file_structure_changed(); |
200 |
|
|
sigc::signal<void, std::list<gig::Sample*> >& signal_samples_to_be_removed(); |
201 |
|
|
sigc::signal<void>& signal_samples_removed(); |
202 |
|
|
sigc::signal<void, gig::Region*>& signal_region_to_be_changed(); |
203 |
|
|
sigc::signal<void, gig::Region*>& signal_region_changed(); |
204 |
|
|
sigc::signal<void, gig::DimensionRegion*>& signal_dimreg_to_be_changed(); |
205 |
|
|
sigc::signal<void, gig::DimensionRegion*>& signal_dimreg_changed(); |
206 |
schoenebeck |
1853 |
sigc::signal<void, gig::Sample*>& signal_sample_changed(); |
207 |
schoenebeck |
1339 |
sigc::signal<void, gig::Sample*/*old*/, gig::Sample*/*new*/>& signal_sample_ref_changed(); |
208 |
schoenebeck |
1225 |
|
209 |
schoenebeck |
1654 |
sigc::signal<void, int/*key*/, int/*velocity*/>& signal_note_on(); |
210 |
|
|
sigc::signal<void, int/*key*/, int/*velocity*/>& signal_note_off(); |
211 |
|
|
|
212 |
schoenebeck |
1660 |
sigc::signal<void, int/*key*/, int/*velocity*/>& signal_keyboard_key_hit(); |
213 |
|
|
sigc::signal<void, int/*key*/, int/*velocity*/>& signal_keyboard_key_released(); |
214 |
|
|
|
215 |
schoenebeck |
2689 |
sigc::signal<void, gig::Instrument*>& signal_switch_sampler_instrument(); |
216 |
schoenebeck |
2903 |
|
217 |
|
|
sigc::signal<void, gig::Script*> signal_script_to_be_changed; |
218 |
|
|
sigc::signal<void, gig::Script*> signal_script_changed; |
219 |
|
|
|
220 |
schoenebeck |
2893 |
// implementation for abstract methods of interface class "ManagedWindow" |
221 |
|
|
virtual Settings::Property<int>* windowSettingX() { return &Settings::singleton()->mainWindowX; } |
222 |
|
|
virtual Settings::Property<int>* windowSettingY() { return &Settings::singleton()->mainWindowY; } |
223 |
|
|
virtual Settings::Property<int>* windowSettingWidth() { return &Settings::singleton()->mainWindowW; } |
224 |
|
|
virtual Settings::Property<int>* windowSettingHeight() { return &Settings::singleton()->mainWindowH; } |
225 |
schoenebeck |
2689 |
|
226 |
schoenebeck |
1225 |
protected: |
227 |
|
|
Glib::RefPtr<Gtk::ActionGroup> actionGroup; |
228 |
|
|
Glib::RefPtr<Gtk::UIManager> uiManager; |
229 |
|
|
|
230 |
schoenebeck |
1411 |
Gtk::Statusbar m_StatusBar; |
231 |
|
|
Gtk::Label m_AttachedStateLabel; |
232 |
|
|
Gtk::Image m_AttachedStateImage; |
233 |
|
|
|
234 |
schoenebeck |
1225 |
RegionChooser m_RegionChooser; |
235 |
|
|
DimRegionChooser m_DimRegionChooser; |
236 |
|
|
|
237 |
|
|
PropDialog propDialog; |
238 |
|
|
InstrumentProps instrumentProps; |
239 |
persson |
2507 |
MidiRules midiRules; |
240 |
schoenebeck |
1225 |
|
241 |
schoenebeck |
1322 |
sigc::signal<void, gig::File*> file_structure_to_be_changed_signal; |
242 |
|
|
sigc::signal<void, gig::File*> file_structure_changed_signal; |
243 |
|
|
sigc::signal<void, std::list<gig::Sample*> > samples_to_be_removed_signal; |
244 |
|
|
sigc::signal<void> samples_removed_signal; |
245 |
|
|
sigc::signal<void, gig::Region*> region_to_be_changed_signal; |
246 |
|
|
sigc::signal<void, gig::Region*> region_changed_signal; |
247 |
|
|
sigc::signal<void, gig::DimensionRegion*> dimreg_to_be_changed_signal; |
248 |
|
|
sigc::signal<void, gig::DimensionRegion*> dimreg_changed_signal; |
249 |
schoenebeck |
1853 |
sigc::signal<void, gig::Sample*> sample_changed_signal; |
250 |
schoenebeck |
1322 |
sigc::signal<void, gig::Sample*/*old*/, gig::Sample*/*new*/> sample_ref_changed_signal; |
251 |
|
|
|
252 |
schoenebeck |
1654 |
sigc::signal<void, int/*key*/, int/*velocity*/> note_on_signal; |
253 |
|
|
sigc::signal<void, int/*key*/, int/*velocity*/> note_off_signal; |
254 |
|
|
|
255 |
schoenebeck |
2689 |
sigc::signal<void, gig::Instrument*> switch_sampler_instrument_signal; |
256 |
|
|
|
257 |
persson |
2442 |
void on_instrument_selection_change(Gtk::RadioMenuItem* item); |
258 |
schoenebeck |
1225 |
void on_sel_change(); |
259 |
|
|
void region_changed(); |
260 |
|
|
void dimreg_changed(); |
261 |
schoenebeck |
2701 |
void select_instrument(gig::Instrument* instrument); |
262 |
schoenebeck |
2695 |
bool select_dimension_region(gig::DimensionRegion* dimRgn); |
263 |
schoenebeck |
2691 |
void select_sample(gig::Sample* sample); |
264 |
schoenebeck |
1225 |
void on_loader_progress(); |
265 |
|
|
void on_loader_finished(); |
266 |
schoenebeck |
2683 |
void on_loader_error(); |
267 |
|
|
void on_saver_progress(); |
268 |
|
|
void on_saver_error(); |
269 |
|
|
void on_saver_finished(); |
270 |
|
|
|
271 |
persson |
1533 |
void dimreg_all_dimregs_toggled(); |
272 |
|
|
gig::Instrument* get_instrument(); |
273 |
|
|
void add_region_to_dimregs(gig::Region* region, bool stereo, bool all_dimregs); |
274 |
|
|
void update_dimregs(); |
275 |
schoenebeck |
1225 |
|
276 |
|
|
class ModelColumns : public Gtk::TreeModel::ColumnRecord { |
277 |
|
|
public: |
278 |
|
|
ModelColumns() { |
279 |
|
|
add(m_col_name); |
280 |
|
|
add(m_col_instr); |
281 |
|
|
} |
282 |
|
|
|
283 |
|
|
Gtk::TreeModelColumn<Glib::ustring> m_col_name; |
284 |
|
|
Gtk::TreeModelColumn<gig::Instrument*> m_col_instr; |
285 |
|
|
} m_Columns; |
286 |
|
|
|
287 |
|
|
Gtk::VBox m_VBox; |
288 |
|
|
Gtk::HPaned m_HPaned; |
289 |
|
|
|
290 |
|
|
Gtk::ScrolledWindow m_ScrolledWindow; |
291 |
|
|
|
292 |
|
|
Gtk::TreeView m_TreeView; |
293 |
|
|
Glib::RefPtr<Gtk::ListStore> m_refTreeModel; |
294 |
|
|
|
295 |
persson |
2442 |
Gtk::Menu* instrument_menu; |
296 |
|
|
|
297 |
schoenebeck |
2621 |
std::map<gig::Sample*,int> sample_ref_count; |
298 |
|
|
|
299 |
schoenebeck |
1225 |
class SamplesModel : public Gtk::TreeModel::ColumnRecord { |
300 |
|
|
public: |
301 |
|
|
SamplesModel() { |
302 |
|
|
add(m_col_name); |
303 |
|
|
add(m_col_sample); |
304 |
|
|
add(m_col_group); |
305 |
schoenebeck |
2621 |
add(m_col_refcount); |
306 |
|
|
add(m_color); |
307 |
schoenebeck |
1225 |
} |
308 |
|
|
|
309 |
|
|
Gtk::TreeModelColumn<Glib::ustring> m_col_name; |
310 |
|
|
Gtk::TreeModelColumn<gig::Sample*> m_col_sample; |
311 |
|
|
Gtk::TreeModelColumn<gig::Group*> m_col_group; |
312 |
schoenebeck |
2621 |
Gtk::TreeModelColumn<Glib::ustring> m_col_refcount; |
313 |
|
|
Gtk::TreeModelColumn<Glib::ustring> m_color; |
314 |
schoenebeck |
1225 |
} m_SamplesModel; |
315 |
|
|
|
316 |
|
|
class SamplesTreeStore : public Gtk::TreeStore { |
317 |
|
|
public: |
318 |
|
|
static Glib::RefPtr<SamplesTreeStore> create(const SamplesModel& columns) { |
319 |
|
|
return Glib::RefPtr<SamplesTreeStore>( new SamplesTreeStore(columns) ); |
320 |
|
|
} |
321 |
|
|
protected: |
322 |
|
|
SamplesTreeStore(const SamplesModel& columns) : Gtk::TreeStore(columns) {} |
323 |
|
|
}; |
324 |
|
|
|
325 |
|
|
Gtk::ScrolledWindow m_ScrolledWindowSamples; |
326 |
|
|
Gtk::TreeView m_TreeViewSamples; |
327 |
|
|
Glib::RefPtr<SamplesTreeStore> m_refSamplesTreeModel; |
328 |
|
|
|
329 |
schoenebeck |
2604 |
class ScriptsModel : public Gtk::TreeModel::ColumnRecord { |
330 |
|
|
public: |
331 |
|
|
ScriptsModel() { |
332 |
|
|
add(m_col_name); |
333 |
|
|
add(m_col_script); |
334 |
|
|
add(m_col_group); |
335 |
|
|
} |
336 |
|
|
|
337 |
|
|
Gtk::TreeModelColumn<Glib::ustring> m_col_name; |
338 |
|
|
Gtk::TreeModelColumn<gig::Script*> m_col_script; |
339 |
|
|
Gtk::TreeModelColumn<gig::ScriptGroup*> m_col_group; |
340 |
|
|
} m_ScriptsModel; |
341 |
|
|
|
342 |
|
|
class ScriptsTreeStore : public Gtk::TreeStore { |
343 |
|
|
public: |
344 |
|
|
static Glib::RefPtr<ScriptsTreeStore> create(const ScriptsModel& columns) { |
345 |
|
|
return Glib::RefPtr<ScriptsTreeStore>( new ScriptsTreeStore(columns) ); |
346 |
|
|
} |
347 |
|
|
protected: |
348 |
|
|
ScriptsTreeStore(const ScriptsModel& columns) : Gtk::TreeStore(columns) {} |
349 |
|
|
}; |
350 |
|
|
|
351 |
|
|
Gtk::ScrolledWindow m_ScrolledWindowScripts; |
352 |
|
|
Gtk::TreeView m_TreeViewScripts; |
353 |
|
|
Glib::RefPtr<ScriptsTreeStore> m_refScriptsTreeModel; |
354 |
|
|
|
355 |
persson |
1533 |
Gtk::VBox dimreg_vbox; |
356 |
|
|
Gtk::HBox dimreg_hbox; |
357 |
|
|
Gtk::Label dimreg_label; |
358 |
|
|
Gtk::CheckButton dimreg_all_regions; |
359 |
|
|
Gtk::CheckButton dimreg_all_dimregs; |
360 |
|
|
Gtk::CheckButton dimreg_stereo; |
361 |
schoenebeck |
1225 |
DimRegionEdit dimreg_edit; |
362 |
|
|
|
363 |
|
|
Gtk::Notebook m_TreeViewNotebook; |
364 |
|
|
|
365 |
|
|
struct SampleImportItem { |
366 |
|
|
gig::Sample* gig_sample; // pointer to the gig::Sample to |
367 |
|
|
// which the sample data should be |
368 |
|
|
// imported to |
369 |
|
|
Glib::ustring sample_path; // file name of the sample to be |
370 |
|
|
// imported |
371 |
|
|
}; |
372 |
|
|
std::list<SampleImportItem> m_SampleImportQueue; |
373 |
|
|
|
374 |
|
|
|
375 |
|
|
void on_action_file_new(); |
376 |
|
|
void on_action_file_open(); |
377 |
|
|
void on_action_file_save(); |
378 |
|
|
void on_action_file_save_as(); |
379 |
|
|
void on_action_file_properties(); |
380 |
persson |
1261 |
void on_action_quit(); |
381 |
schoenebeck |
1225 |
void show_instr_props(); |
382 |
persson |
2445 |
bool instr_props_set_instrument(); |
383 |
persson |
2507 |
void show_midi_rules(); |
384 |
schoenebeck |
2610 |
void show_script_slots(); |
385 |
schoenebeck |
1415 |
void on_action_view_status_bar(); |
386 |
schoenebeck |
2918 |
void on_auto_restore_win_dim(); |
387 |
schoenebeck |
2772 |
void on_action_refresh_all(); |
388 |
schoenebeck |
2541 |
void on_action_warn_user_on_extensions(); |
389 |
schoenebeck |
2689 |
void on_action_sync_sampler_instrument_selection(); |
390 |
schoenebeck |
2773 |
void on_action_move_root_note_with_region_moved(); |
391 |
schoenebeck |
1225 |
void on_action_help_about(); |
392 |
|
|
|
393 |
|
|
// sample right-click popup actions |
394 |
|
|
void on_sample_treeview_button_release(GdkEventButton* button); |
395 |
|
|
void on_action_sample_properties(); |
396 |
|
|
void on_action_add_group(); |
397 |
|
|
void on_action_add_sample(); |
398 |
schoenebeck |
2715 |
void on_action_replace_sample(); |
399 |
schoenebeck |
1673 |
void on_action_replace_all_samples_in_all_groups(); |
400 |
schoenebeck |
1225 |
void on_action_remove_sample(); |
401 |
schoenebeck |
2772 |
void on_action_remove_unused_samples(); |
402 |
|
|
|
403 |
schoenebeck |
2604 |
// script right-click popup actions |
404 |
|
|
void on_script_treeview_button_release(GdkEventButton* button); |
405 |
|
|
void on_action_add_script_group(); |
406 |
|
|
void on_action_add_script(); |
407 |
|
|
void on_action_edit_script(); |
408 |
|
|
void on_action_remove_script(); |
409 |
schoenebeck |
1225 |
|
410 |
|
|
void on_action_add_instrument(); |
411 |
schoenebeck |
2395 |
void on_action_duplicate_instrument(); |
412 |
schoenebeck |
1225 |
void on_action_remove_instrument(); |
413 |
|
|
|
414 |
schoenebeck |
2625 |
void show_samples_tab(); |
415 |
|
|
void show_intruments_tab(); |
416 |
|
|
void show_scripts_tab(); |
417 |
|
|
|
418 |
persson |
2442 |
void add_instrument(gig::Instrument* instrument); |
419 |
|
|
Gtk::RadioMenuItem* add_instrument_to_menu(const Glib::ustring& name, |
420 |
|
|
int position = -1); |
421 |
|
|
void remove_instrument_from_menu(int index); |
422 |
|
|
|
423 |
schoenebeck |
2683 |
ProgressDialog* progress_dialog; |
424 |
schoenebeck |
1225 |
Loader* loader; |
425 |
schoenebeck |
2683 |
Saver* saver; |
426 |
schoenebeck |
1382 |
void load_gig(gig::File* gig, const char* filename, bool isSharedInstrument = false); |
427 |
schoenebeck |
2621 |
void updateSampleRefCountMap(gig::File* gig); |
428 |
schoenebeck |
1225 |
|
429 |
|
|
gig::File* file; |
430 |
schoenebeck |
1382 |
bool file_is_shared; |
431 |
persson |
1261 |
bool file_has_name; |
432 |
|
|
bool file_is_changed; |
433 |
|
|
std::string filename; |
434 |
persson |
1725 |
std::string current_gig_dir; |
435 |
|
|
std::string current_sample_dir; |
436 |
schoenebeck |
1225 |
|
437 |
schoenebeck |
1411 |
void set_file_is_shared(bool); |
438 |
|
|
|
439 |
persson |
1261 |
bool file_save(); |
440 |
|
|
bool file_save_as(); |
441 |
persson |
1303 |
bool check_if_savable(); |
442 |
persson |
1261 |
|
443 |
schoenebeck |
1225 |
void on_button_release(GdkEventButton* button); |
444 |
schoenebeck |
2701 |
void on_instruments_treeview_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context); |
445 |
|
|
void on_instruments_treeview_drag_data_get(const Glib::RefPtr<Gdk::DragContext>&, |
446 |
|
|
Gtk::SelectionData& selection_data, guint, guint); |
447 |
|
|
void on_instruments_treeview_drop_drag_data_received( |
448 |
|
|
const Glib::RefPtr<Gdk::DragContext>& context, int, int, |
449 |
|
|
const Gtk::SelectionData& selection_data, guint, guint time |
450 |
|
|
); |
451 |
schoenebeck |
2610 |
void on_scripts_treeview_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context); |
452 |
|
|
void on_scripts_treeview_drag_data_get(const Glib::RefPtr<Gdk::DragContext>&, |
453 |
|
|
Gtk::SelectionData& selection_data, guint, guint); |
454 |
persson |
1303 |
void on_sample_treeview_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context); |
455 |
schoenebeck |
1225 |
void on_sample_treeview_drag_data_get(const Glib::RefPtr<Gdk::DragContext>&, |
456 |
|
|
Gtk::SelectionData& selection_data, guint, guint); |
457 |
|
|
void on_sample_label_drop_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& context, |
458 |
|
|
int, int, |
459 |
|
|
const Gtk::SelectionData& selection_data, |
460 |
|
|
guint, guint time); |
461 |
persson |
1303 |
|
462 |
schoenebeck |
2604 |
void script_name_changed(const Gtk::TreeModel::Path& path, |
463 |
|
|
const Gtk::TreeModel::iterator& iter); |
464 |
schoenebeck |
2644 |
void script_double_clicked(const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* column); |
465 |
schoenebeck |
1225 |
void sample_name_changed(const Gtk::TreeModel::Path& path, |
466 |
|
|
const Gtk::TreeModel::iterator& iter); |
467 |
|
|
void instrument_name_changed(const Gtk::TreeModel::Path& path, |
468 |
|
|
const Gtk::TreeModel::iterator& iter); |
469 |
persson |
2445 |
void instr_name_changed_by_instr_props(Gtk::TreeModel::iterator& it); |
470 |
persson |
2442 |
sigc::connection instrument_name_connection; |
471 |
schoenebeck |
1225 |
|
472 |
schoenebeck |
2548 |
void on_action_combine_instruments(); |
473 |
schoenebeck |
2624 |
void on_action_view_references(); |
474 |
schoenebeck |
2553 |
void on_action_merge_files(); |
475 |
|
|
void mergeFiles(const std::vector<std::string>& filenames); |
476 |
schoenebeck |
2548 |
|
477 |
schoenebeck |
2621 |
void on_sample_ref_changed(gig::Sample* oldSample, gig::Sample* newSample); |
478 |
|
|
void on_sample_ref_count_incremented(gig::Sample* sample, int offset); |
479 |
|
|
void on_samples_to_be_removed(std::list<gig::Sample*> samples); |
480 |
|
|
|
481 |
schoenebeck |
2715 |
void add_or_replace_sample(bool replace); |
482 |
|
|
|
483 |
schoenebeck |
1225 |
void __import_queued_samples(); |
484 |
|
|
void __clear(); |
485 |
schoenebeck |
2553 |
void __refreshEntireGUI(); |
486 |
schoenebeck |
1225 |
|
487 |
persson |
1261 |
bool close_confirmation_dialog(); |
488 |
schoenebeck |
1382 |
bool leaving_shared_mode_dialog(); |
489 |
persson |
1261 |
|
490 |
schoenebeck |
1225 |
Gtk::Menu* popup_menu; |
491 |
persson |
1261 |
|
492 |
|
|
bool on_delete_event(GdkEventAny* event); |
493 |
persson |
1303 |
|
494 |
|
|
bool first_call_to_drag_data_get; |
495 |
schoenebeck |
2464 |
|
496 |
|
|
bool is_copy_samples_unity_note_enabled() const; |
497 |
|
|
bool is_copy_samples_fine_tune_enabled() const; |
498 |
|
|
bool is_copy_samples_loop_enabled() const; |
499 |
schoenebeck |
1225 |
}; |
500 |
|
|
|
501 |
|
|
#endif |