/[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 3340 - (hide annotations) (download) (as text)
Mon Jul 31 11:20:18 2017 UTC (6 years, 7 months ago) by schoenebeck
File MIME type: text/x-c++hdr
File size: 21769 byte(s)
* Added search filter field which allows to quickly filter the instrument
  list by case insensitive search tokens.
* Fix: navigating between dimension zones by keyboard did sometimes not
  work after switching from an instrument with different dimension types.
* Fix: Sample references view dialog had some odd behaviors, like it did not
  respond to mouse scroll events for instance.
* Bumped version (1.0.0.svn62).

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

  ViewVC Help
Powered by ViewVC