/[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 3342 - (hide annotations) (download) (as text)
Mon Jul 31 11:32:49 2017 UTC (2 years, 4 months ago) by schoenebeck
File MIME type: text/x-c++hdr
File size: 21797 byte(s)
- Fixed compilation error.

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

  ViewVC Help
Powered by ViewVC