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

  ViewVC Help
Powered by ViewVC