/[svn]/gigedit/trunk/src/gigedit/mainwindow.h
ViewVC logotype

Annotation of /gigedit/trunk/src/gigedit/mainwindow.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3339 - (hide annotations) (download) (as text)
Sun Jul 30 18:57:35 2017 UTC (6 years, 8 months ago) by schoenebeck
File MIME type: text/x-c++hdr
File size: 21132 byte(s)
* Fix: after the combine instruments dialog, the new instrument was not
  correctly displayed by the GUI as being selected.
* Fix: automatically reload instrument after script slots have been
  modified.
* Combine Tool: OK button has focus now by default to quickly combine
  instruments by pressing Return key.
* Added keyboard accelerators Shift+F1 to Shift+F12 for quick assigning
  a script to the currently selected instrument, and an appropriate
  additional menu "Instruments" -> "Assign Script".
* Added keyboard accelerators Ctrl + Arrow Down and Ctrl + Arrow Up for
  switching between instruments.
* Bumped version (1.0.0.svn61).

1 schoenebeck 1225 /* -*- c++ -*-
2 schoenebeck 3068 * Copyright (C) 2006 - 2017 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 schoenebeck 3068 #ifdef LIBGIG_HEADER_FILE
24     # include LIBGIG_HEADER_FILE(gig.h)
25 schoenebeck 3145 # include LIBGIG_HEADER_FILE(Serialization.h)
26 schoenebeck 3068 #else
27     # include <gig.h>
28 schoenebeck 3145 # include <Serialization.h>
29 schoenebeck 3068 #endif
30 schoenebeck 1225
31 persson 2844 #include <gtkmm/box.h>
32 schoenebeck 1225 #include <gtkmm/actiongroup.h>
33     #include <gtkmm/buttonbox.h>
34     #include <gtkmm/dialog.h>
35     #include <gtkmm/liststore.h>
36 persson 2442 #include <gtkmm/menu.h>
37 schoenebeck 1225 #include <gtkmm/paned.h>
38     #include <gtkmm/progressbar.h>
39 persson 2442 #include <gtkmm/radiomenuitem.h>
40 schoenebeck 1225 #include <gtkmm/scrolledwindow.h>
41     #include <gtkmm/treestore.h>
42     #include <gtkmm/uimanager.h>
43     #include <gtkmm/window.h>
44 schoenebeck 1411 #include <gtkmm/statusbar.h>
45     #include <gtkmm/image.h>
46 schoenebeck 1225
47     #include <sstream>
48    
49     #include "regionchooser.h"
50     #include "dimregionchooser.h"
51     #include "dimregionedit.h"
52 persson 2507 #include "midirules.h"
53 persson 2325 #ifndef OLD_THREADS
54     #include <glibmm/threads.h>
55     #endif
56 schoenebeck 2893 #include "ManagedWindow.h"
57 schoenebeck 1225
58     class MainWindow;
59    
60 schoenebeck 2894 class PropDialog : public ManagedWindow,
61 persson 2423 public PropEditor<DLS::Info> {
62 persson 1582 public:
63 schoenebeck 1225 PropDialog();
64     void set_info(DLS::Info* info);
65 schoenebeck 2560 void set_file(gig::File* file);
66 schoenebeck 2894
67     // implementation for abstract methods of interface class "ManagedWindow"
68     virtual Settings::Property<int>* windowSettingX() { return &Settings::singleton()->filePropsWindowX; }
69     virtual Settings::Property<int>* windowSettingY() { return &Settings::singleton()->filePropsWindowY; }
70     virtual Settings::Property<int>* windowSettingWidth() { return &Settings::singleton()->filePropsWindowW; }
71     virtual Settings::Property<int>* windowSettingHeight() { return &Settings::singleton()->filePropsWindowH; }
72    
73 schoenebeck 1225 protected:
74 schoenebeck 2560 ChoiceEntry<int> eFileFormat;
75 persson 1582 StringEntry eName;
76     StringEntry eCreationDate;
77     StringEntryMultiLine eComments;
78     StringEntry eProduct;
79     StringEntry eCopyright;
80     StringEntry eArtists;
81     StringEntry eGenre;
82     StringEntry eKeywords;
83     StringEntry eEngineer;
84     StringEntry eTechnician;
85     StringEntry eSoftware;
86     StringEntry eMedium;
87     StringEntry eSource;
88     StringEntry eSourceForm;
89     StringEntry eCommissioned;
90     StringEntry eSubject;
91     Gtk::VBox vbox;
92     Gtk::HButtonBox buttonBox;
93     Gtk::Button quitButton;
94     Table table;
95 schoenebeck 2560
96     gig::File* m_file;
97    
98     void onFileFormatChanged();
99 schoenebeck 1225 };
100    
101 schoenebeck 2894 class InstrumentProps : public ManagedWindow,
102 persson 2423 public PropEditor<gig::Instrument> {
103 schoenebeck 1225 public:
104     InstrumentProps();
105     void set_instrument(gig::Instrument* instrument);
106 persson 2445 gig::Instrument* get_instrument() { return m; }
107     void update_name();
108     sigc::signal<void>& signal_name_changed() {
109     return sig_name_changed;
110     }
111 schoenebeck 2894
112     // implementation for abstract methods of interface class "ManagedWindow"
113     virtual Settings::Property<int>* windowSettingX() { return &Settings::singleton()->instrPropsWindowX; }
114     virtual Settings::Property<int>* windowSettingY() { return &Settings::singleton()->instrPropsWindowY; }
115     virtual Settings::Property<int>* windowSettingWidth() { return &Settings::singleton()->instrPropsWindowW; }
116     virtual Settings::Property<int>* windowSettingHeight() { return &Settings::singleton()->instrPropsWindowH; }
117    
118 schoenebeck 1225 protected:
119 persson 2445 void set_Name(const gig::String& name);
120 persson 1460 void set_IsDrum(bool value);
121     void set_MIDIBank(uint16_t value);
122     void set_MIDIProgram(uint32_t value);
123    
124 persson 2445 sigc::signal<void> sig_name_changed;
125 schoenebeck 1225 Gtk::VBox vbox;
126     Gtk::HButtonBox buttonBox;
127     Gtk::Button quitButton;
128 persson 1582 Table table;
129 schoenebeck 1225 StringEntry eName;
130     BoolEntry eIsDrum;
131     NumEntryTemp<uint16_t> eMIDIBank;
132     NumEntryTemp<uint32_t> eMIDIProgram;
133     NumEntryGain eAttenuation;
134     BoolEntryPlus6 eGainPlus6;
135     NumEntryTemp<uint16_t> eEffectSend;
136     NumEntryTemp<int16_t> eFineTune;
137     NumEntryTemp<uint16_t> ePitchbendRange;
138     BoolEntry ePianoReleaseMode;
139     NoteEntry eDimensionKeyRangeLow;
140     NoteEntry eDimensionKeyRangeHigh;
141     };
142    
143 schoenebeck 2683 class ProgressDialog : public Gtk::Dialog {
144 schoenebeck 1225 public:
145 schoenebeck 2683 ProgressDialog(const Glib::ustring& title, Gtk::Window& parent);
146 schoenebeck 1225 void set_fraction(float fraction) { progressBar.set_fraction(fraction); }
147     protected:
148     Gtk::ProgressBar progressBar;
149     };
150    
151     class Loader : public sigc::trackable {
152     public:
153     Loader(const char* filename);
154     void launch();
155     Glib::Dispatcher& signal_progress();
156 schoenebeck 2683 Glib::Dispatcher& signal_finished(); ///< Finished successfully, without error.
157     Glib::Dispatcher& signal_error();
158 schoenebeck 1225 void progress_callback(float fraction);
159     float get_progress();
160 schoenebeck 2683 const Glib::ustring filename;
161     Glib::ustring error_message;
162 schoenebeck 1225 gig::File* gig;
163    
164     private:
165 persson 2325 Glib::Threads::Thread* thread;
166 schoenebeck 1225 void thread_function();
167     Glib::Dispatcher finished_dispatcher;
168     Glib::Dispatcher progress_dispatcher;
169 schoenebeck 2683 Glib::Dispatcher error_dispatcher;
170 persson 2325 Glib::Threads::Mutex progressMutex;
171 schoenebeck 1225 float progress;
172     };
173    
174 schoenebeck 2683 class Saver : public sigc::trackable {
175     public:
176     Saver(gig::File* file, Glib::ustring filename = ""); ///< one argument means "save", two arguments means "save as"
177     void launch();
178     Glib::Dispatcher& signal_progress();
179     Glib::Dispatcher& signal_finished(); ///< Finished successfully, without error.
180     Glib::Dispatcher& signal_error();
181     void progress_callback(float fraction);
182     float get_progress();
183     gig::File* gig;
184     const Glib::ustring filename;
185     Glib::ustring error_message;
186    
187     private:
188     Glib::Threads::Thread* thread;
189     void thread_function();
190     Glib::Dispatcher finished_dispatcher;
191     Glib::Dispatcher progress_dispatcher;
192     Glib::Dispatcher error_dispatcher;
193     Glib::Threads::Mutex progressMutex;
194     float progress;
195     };
196    
197 schoenebeck 2893 class MainWindow : public ManagedWindow {
198 schoenebeck 1225 public:
199     MainWindow();
200     virtual ~MainWindow();
201     void load_file(const char* name);
202     void load_instrument(gig::Instrument* instr);
203 persson 1261 void file_changed();
204 schoenebeck 1339 sigc::signal<void, gig::File*>& signal_file_structure_to_be_changed();
205     sigc::signal<void, gig::File*>& signal_file_structure_changed();
206     sigc::signal<void, std::list<gig::Sample*> >& signal_samples_to_be_removed();
207     sigc::signal<void>& signal_samples_removed();
208     sigc::signal<void, gig::Region*>& signal_region_to_be_changed();
209     sigc::signal<void, gig::Region*>& signal_region_changed();
210     sigc::signal<void, gig::DimensionRegion*>& signal_dimreg_to_be_changed();
211     sigc::signal<void, gig::DimensionRegion*>& signal_dimreg_changed();
212 schoenebeck 1853 sigc::signal<void, gig::Sample*>& signal_sample_changed();
213 schoenebeck 1339 sigc::signal<void, gig::Sample*/*old*/, gig::Sample*/*new*/>& signal_sample_ref_changed();
214 schoenebeck 1225
215 schoenebeck 1654 sigc::signal<void, int/*key*/, int/*velocity*/>& signal_note_on();
216     sigc::signal<void, int/*key*/, int/*velocity*/>& signal_note_off();
217    
218 schoenebeck 1660 sigc::signal<void, int/*key*/, int/*velocity*/>& signal_keyboard_key_hit();
219     sigc::signal<void, int/*key*/, int/*velocity*/>& signal_keyboard_key_released();
220    
221 schoenebeck 2689 sigc::signal<void, gig::Instrument*>& signal_switch_sampler_instrument();
222 schoenebeck 2903
223     sigc::signal<void, gig::Script*> signal_script_to_be_changed;
224     sigc::signal<void, gig::Script*> signal_script_changed;
225    
226 schoenebeck 2893 // implementation for abstract methods of interface class "ManagedWindow"
227     virtual Settings::Property<int>* windowSettingX() { return &Settings::singleton()->mainWindowX; }
228     virtual Settings::Property<int>* windowSettingY() { return &Settings::singleton()->mainWindowY; }
229     virtual Settings::Property<int>* windowSettingWidth() { return &Settings::singleton()->mainWindowW; }
230     virtual Settings::Property<int>* windowSettingHeight() { return &Settings::singleton()->mainWindowH; }
231 schoenebeck 2689
232 schoenebeck 1225 protected:
233     Glib::RefPtr<Gtk::ActionGroup> actionGroup;
234     Glib::RefPtr<Gtk::UIManager> uiManager;
235    
236 schoenebeck 1411 Gtk::Statusbar m_StatusBar;
237     Gtk::Label m_AttachedStateLabel;
238     Gtk::Image m_AttachedStateImage;
239    
240 schoenebeck 1225 RegionChooser m_RegionChooser;
241     DimRegionChooser m_DimRegionChooser;
242    
243     PropDialog propDialog;
244     InstrumentProps instrumentProps;
245 persson 2507 MidiRules midiRules;
246 schoenebeck 1225
247 schoenebeck 3177 /**
248     * Ensures that the 2 signals MainWindow::dimreg_to_be_changed_signal and
249     * MainWindowv::dimreg_changed_signal are always triggered correctly as a
250     * pair. It behaves similar to a "mutex lock guard" design pattern.
251     */
252     class DimRegionChangeGuard : public SignalGuard<gig::DimensionRegion*> {
253     public:
254     DimRegionChangeGuard(MainWindow* w, gig::DimensionRegion* pDimReg) :
255     SignalGuard<gig::DimensionRegion*>(w->dimreg_to_be_changed_signal, w->dimreg_changed_signal, pDimReg)
256     {
257     }
258     };
259    
260 schoenebeck 1322 sigc::signal<void, gig::File*> file_structure_to_be_changed_signal;
261     sigc::signal<void, gig::File*> file_structure_changed_signal;
262     sigc::signal<void, std::list<gig::Sample*> > samples_to_be_removed_signal;
263     sigc::signal<void> samples_removed_signal;
264     sigc::signal<void, gig::Region*> region_to_be_changed_signal;
265     sigc::signal<void, gig::Region*> region_changed_signal;
266     sigc::signal<void, gig::DimensionRegion*> dimreg_to_be_changed_signal;
267     sigc::signal<void, gig::DimensionRegion*> dimreg_changed_signal;
268 schoenebeck 1853 sigc::signal<void, gig::Sample*> sample_changed_signal;
269 schoenebeck 1322 sigc::signal<void, gig::Sample*/*old*/, gig::Sample*/*new*/> sample_ref_changed_signal;
270    
271 schoenebeck 1654 sigc::signal<void, int/*key*/, int/*velocity*/> note_on_signal;
272     sigc::signal<void, int/*key*/, int/*velocity*/> note_off_signal;
273    
274 schoenebeck 2689 sigc::signal<void, gig::Instrument*> switch_sampler_instrument_signal;
275    
276 persson 2442 void on_instrument_selection_change(Gtk::RadioMenuItem* item);
277 schoenebeck 1225 void on_sel_change();
278     void region_changed();
279     void dimreg_changed();
280 schoenebeck 2701 void select_instrument(gig::Instrument* instrument);
281 schoenebeck 2695 bool select_dimension_region(gig::DimensionRegion* dimRgn);
282 schoenebeck 2691 void select_sample(gig::Sample* sample);
283 schoenebeck 1225 void on_loader_progress();
284     void on_loader_finished();
285 schoenebeck 2683 void on_loader_error();
286     void on_saver_progress();
287     void on_saver_error();
288     void on_saver_finished();
289 schoenebeck 3157 void updateMacroMenu();
290     void onMacroSelected(int iMacro);
291     void setupMacros();
292     void onMacrosSetupChanged(const std::vector<Serialization::Archive>& macros);
293     void applyMacro(Serialization::Archive& macro);
294 schoenebeck 3197 void onScriptSlotsModified(gig::Instrument* pInstrument);
295 schoenebeck 3258 void bringToFront();
296 schoenebeck 2683
297 persson 1533 void dimreg_all_dimregs_toggled();
298     gig::Instrument* get_instrument();
299     void add_region_to_dimregs(gig::Region* region, bool stereo, bool all_dimregs);
300     void update_dimregs();
301 schoenebeck 1225
302     class ModelColumns : public Gtk::TreeModel::ColumnRecord {
303     public:
304     ModelColumns() {
305 schoenebeck 2994 add(m_col_nr);
306 schoenebeck 1225 add(m_col_name);
307     add(m_col_instr);
308 schoenebeck 3197 add(m_col_scripts);
309 schoenebeck 1225 }
310    
311 schoenebeck 2994 Gtk::TreeModelColumn<int> m_col_nr;
312 schoenebeck 1225 Gtk::TreeModelColumn<Glib::ustring> m_col_name;
313     Gtk::TreeModelColumn<gig::Instrument*> m_col_instr;
314 schoenebeck 3197 Gtk::TreeModelColumn<Glib::ustring> m_col_scripts;
315 schoenebeck 1225 } m_Columns;
316    
317     Gtk::VBox m_VBox;
318     Gtk::HPaned m_HPaned;
319    
320     Gtk::ScrolledWindow m_ScrolledWindow;
321    
322     Gtk::TreeView m_TreeView;
323     Glib::RefPtr<Gtk::ListStore> m_refTreeModel;
324    
325 persson 2442 Gtk::Menu* instrument_menu;
326 schoenebeck 3339 Gtk::Menu* assign_scripts_menu;
327 persson 2442
328 schoenebeck 2621 std::map<gig::Sample*,int> sample_ref_count;
329    
330 schoenebeck 1225 class SamplesModel : public Gtk::TreeModel::ColumnRecord {
331     public:
332     SamplesModel() {
333     add(m_col_name);
334     add(m_col_sample);
335     add(m_col_group);
336 schoenebeck 2621 add(m_col_refcount);
337     add(m_color);
338 schoenebeck 1225 }
339    
340     Gtk::TreeModelColumn<Glib::ustring> m_col_name;
341     Gtk::TreeModelColumn<gig::Sample*> m_col_sample;
342     Gtk::TreeModelColumn<gig::Group*> m_col_group;
343 schoenebeck 2621 Gtk::TreeModelColumn<Glib::ustring> m_col_refcount;
344     Gtk::TreeModelColumn<Glib::ustring> m_color;
345 schoenebeck 1225 } m_SamplesModel;
346    
347     class SamplesTreeStore : public Gtk::TreeStore {
348     public:
349     static Glib::RefPtr<SamplesTreeStore> create(const SamplesModel& columns) {
350     return Glib::RefPtr<SamplesTreeStore>( new SamplesTreeStore(columns) );
351     }
352     protected:
353     SamplesTreeStore(const SamplesModel& columns) : Gtk::TreeStore(columns) {}
354     };
355    
356     Gtk::ScrolledWindow m_ScrolledWindowSamples;
357     Gtk::TreeView m_TreeViewSamples;
358     Glib::RefPtr<SamplesTreeStore> m_refSamplesTreeModel;
359    
360 schoenebeck 2604 class ScriptsModel : public Gtk::TreeModel::ColumnRecord {
361     public:
362     ScriptsModel() {
363     add(m_col_name);
364     add(m_col_script);
365     add(m_col_group);
366     }
367    
368     Gtk::TreeModelColumn<Glib::ustring> m_col_name;
369     Gtk::TreeModelColumn<gig::Script*> m_col_script;
370     Gtk::TreeModelColumn<gig::ScriptGroup*> m_col_group;
371     } m_ScriptsModel;
372    
373     class ScriptsTreeStore : public Gtk::TreeStore {
374     public:
375     static Glib::RefPtr<ScriptsTreeStore> create(const ScriptsModel& columns) {
376     return Glib::RefPtr<ScriptsTreeStore>( new ScriptsTreeStore(columns) );
377     }
378     protected:
379     ScriptsTreeStore(const ScriptsModel& columns) : Gtk::TreeStore(columns) {}
380     };
381    
382     Gtk::ScrolledWindow m_ScrolledWindowScripts;
383     Gtk::TreeView m_TreeViewScripts;
384     Glib::RefPtr<ScriptsTreeStore> m_refScriptsTreeModel;
385    
386 persson 1533 Gtk::VBox dimreg_vbox;
387     Gtk::HBox dimreg_hbox;
388     Gtk::Label dimreg_label;
389     Gtk::CheckButton dimreg_all_regions;
390     Gtk::CheckButton dimreg_all_dimregs;
391     Gtk::CheckButton dimreg_stereo;
392 schoenebeck 3106
393     Gtk::HBox legend_hbox;
394 schoenebeck 3109 Gtk::Label labelLegend;
395 schoenebeck 3106 Gtk::Image imageNoSample;
396     Gtk::Label labelNoSample;
397     Gtk::Image imageMissingSample;
398     Gtk::Label labelMissingSample;
399     Gtk::Image imageLooped;
400     Gtk::Label labelLooped;
401     Gtk::Image imageSomeLoops;
402     Gtk::Label labelSomeLoops;
403 schoenebeck 1225 DimRegionEdit dimreg_edit;
404    
405     Gtk::Notebook m_TreeViewNotebook;
406    
407     struct SampleImportItem {
408     gig::Sample* gig_sample; // pointer to the gig::Sample to
409     // which the sample data should be
410     // imported to
411     Glib::ustring sample_path; // file name of the sample to be
412     // imported
413     };
414 schoenebeck 3116 std::map<gig::Sample*, SampleImportItem> m_SampleImportQueue;
415 schoenebeck 1225
416    
417     void on_action_file_new();
418     void on_action_file_open();
419     void on_action_file_save();
420     void on_action_file_save_as();
421     void on_action_file_properties();
422 persson 1261 void on_action_quit();
423 schoenebeck 1225 void show_instr_props();
424 persson 2445 bool instr_props_set_instrument();
425 persson 2507 void show_midi_rules();
426 schoenebeck 2610 void show_script_slots();
427 schoenebeck 1415 void on_action_view_status_bar();
428 schoenebeck 2918 void on_auto_restore_win_dim();
429 schoenebeck 2967 void on_save_with_temporary_file();
430 schoenebeck 2772 void on_action_refresh_all();
431 schoenebeck 2541 void on_action_warn_user_on_extensions();
432 schoenebeck 2689 void on_action_sync_sampler_instrument_selection();
433 schoenebeck 2773 void on_action_move_root_note_with_region_moved();
434 schoenebeck 1225 void on_action_help_about();
435    
436     // sample right-click popup actions
437     void on_sample_treeview_button_release(GdkEventButton* button);
438     void on_action_sample_properties();
439     void on_action_add_group();
440     void on_action_add_sample();
441 schoenebeck 2715 void on_action_replace_sample();
442 schoenebeck 1673 void on_action_replace_all_samples_in_all_groups();
443 schoenebeck 1225 void on_action_remove_sample();
444 schoenebeck 2772 void on_action_remove_unused_samples();
445    
446 schoenebeck 2604 // script right-click popup actions
447     void on_script_treeview_button_release(GdkEventButton* button);
448     void on_action_add_script_group();
449     void on_action_add_script();
450     void on_action_edit_script();
451     void on_action_remove_script();
452 schoenebeck 1225
453     void on_action_add_instrument();
454 schoenebeck 2395 void on_action_duplicate_instrument();
455 schoenebeck 1225 void on_action_remove_instrument();
456    
457 schoenebeck 2625 void show_samples_tab();
458     void show_intruments_tab();
459     void show_scripts_tab();
460    
461 schoenebeck 3339 void select_prev_instrument();
462     void select_next_instrument();
463     void select_instrument_by_dir(int dir);
464    
465 schoenebeck 3123 void select_prev_region();
466     void select_next_region();
467    
468     void select_next_dim_rgn_zone();
469     void select_prev_dim_rgn_zone();
470 schoenebeck 3134 void select_add_next_dim_rgn_zone();
471     void select_add_prev_dim_rgn_zone();
472 schoenebeck 3123 void select_prev_dimension();
473     void select_next_dimension();
474    
475 schoenebeck 3157 Serialization::Archive m_serializationArchive; ///< Clipboard content.
476     std::vector<Serialization::Archive> m_macros; ///< User configured list of macros.
477 schoenebeck 3144
478     void copy_selected_dimrgn();
479     void paste_copied_dimrgn();
480 schoenebeck 3151 void adjust_clipboard_content();
481 schoenebeck 3144 void updateClipboardCopyAvailable();
482     void updateClipboardPasteAvailable();
483     void on_clipboard_owner_change(GdkEventOwnerChange* event);
484     void on_clipboard_get(Gtk::SelectionData& selection_data, guint info);
485     void on_clipboard_clear();
486     void on_clipboard_received(const Gtk::SelectionData& selection_data);
487     void on_clipboard_received_targets(const std::vector<Glib::ustring>& targets);
488    
489 persson 2442 void add_instrument(gig::Instrument* instrument);
490     Gtk::RadioMenuItem* add_instrument_to_menu(const Glib::ustring& name,
491     int position = -1);
492     void remove_instrument_from_menu(int index);
493    
494 schoenebeck 2683 ProgressDialog* progress_dialog;
495 schoenebeck 1225 Loader* loader;
496 schoenebeck 2683 Saver* saver;
497 schoenebeck 1382 void load_gig(gig::File* gig, const char* filename, bool isSharedInstrument = false);
498 schoenebeck 2621 void updateSampleRefCountMap(gig::File* gig);
499 schoenebeck 1225
500     gig::File* file;
501 schoenebeck 1382 bool file_is_shared;
502 persson 1261 bool file_has_name;
503     bool file_is_changed;
504     std::string filename;
505 persson 1725 std::string current_gig_dir;
506     std::string current_sample_dir;
507 schoenebeck 1225
508 schoenebeck 1411 void set_file_is_shared(bool);
509    
510 persson 1261 bool file_save();
511     bool file_save_as();
512 persson 1303 bool check_if_savable();
513 persson 1261
514 schoenebeck 1225 void on_button_release(GdkEventButton* button);
515 schoenebeck 2701 void on_instruments_treeview_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);
516     void on_instruments_treeview_drag_data_get(const Glib::RefPtr<Gdk::DragContext>&,
517     Gtk::SelectionData& selection_data, guint, guint);
518     void on_instruments_treeview_drop_drag_data_received(
519     const Glib::RefPtr<Gdk::DragContext>& context, int, int,
520     const Gtk::SelectionData& selection_data, guint, guint time
521     );
522 schoenebeck 2610 void on_scripts_treeview_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);
523     void on_scripts_treeview_drag_data_get(const Glib::RefPtr<Gdk::DragContext>&,
524     Gtk::SelectionData& selection_data, guint, guint);
525 persson 1303 void on_sample_treeview_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);
526 schoenebeck 1225 void on_sample_treeview_drag_data_get(const Glib::RefPtr<Gdk::DragContext>&,
527     Gtk::SelectionData& selection_data, guint, guint);
528     void on_sample_label_drop_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& context,
529     int, int,
530     const Gtk::SelectionData& selection_data,
531     guint, guint time);
532 persson 1303
533 schoenebeck 2604 void script_name_changed(const Gtk::TreeModel::Path& path,
534     const Gtk::TreeModel::iterator& iter);
535 schoenebeck 2644 void script_double_clicked(const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* column);
536 schoenebeck 1225 void sample_name_changed(const Gtk::TreeModel::Path& path,
537     const Gtk::TreeModel::iterator& iter);
538     void instrument_name_changed(const Gtk::TreeModel::Path& path,
539     const Gtk::TreeModel::iterator& iter);
540 persson 2445 void instr_name_changed_by_instr_props(Gtk::TreeModel::iterator& it);
541 persson 2442 sigc::connection instrument_name_connection;
542 schoenebeck 1225
543 schoenebeck 2548 void on_action_combine_instruments();
544 schoenebeck 2624 void on_action_view_references();
545 schoenebeck 2553 void on_action_merge_files();
546     void mergeFiles(const std::vector<std::string>& filenames);
547 schoenebeck 2548
548 schoenebeck 2621 void on_sample_ref_changed(gig::Sample* oldSample, gig::Sample* newSample);
549     void on_sample_ref_count_incremented(gig::Sample* sample, int offset);
550     void on_samples_to_be_removed(std::list<gig::Sample*> samples);
551    
552 schoenebeck 2715 void add_or_replace_sample(bool replace);
553    
554 schoenebeck 1225 void __import_queued_samples();
555     void __clear();
556 schoenebeck 2553 void __refreshEntireGUI();
557 schoenebeck 3339 void updateScriptListOfMenu();
558     void assignScript(gig::Script* pScript);
559 schoenebeck 1225
560 persson 1261 bool close_confirmation_dialog();
561 schoenebeck 1382 bool leaving_shared_mode_dialog();
562 persson 1261
563 schoenebeck 1225 Gtk::Menu* popup_menu;
564 persson 1261
565     bool on_delete_event(GdkEventAny* event);
566 persson 1303
567     bool first_call_to_drag_data_get;
568 schoenebeck 2464
569     bool is_copy_samples_unity_note_enabled() const;
570     bool is_copy_samples_fine_tune_enabled() const;
571     bool is_copy_samples_loop_enabled() const;
572 schoenebeck 1225 };
573    
574     #endif

  ViewVC Help
Powered by ViewVC