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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3418 by schoenebeck, Sat Feb 10 11:36:16 2018 UTC revision 3471 by persson, Sat Feb 16 19:13:37 2019 UTC
# Line 1  Line 1 
1  /*                                                         -*- c++ -*-  /*                                                         -*- c++ -*-
2   * Copyright (C) 2006 - 2017 Andreas Persson   * Copyright (C) 2006 - 2019 Andreas Persson
3   *   *
4   * This program is free software; you can redistribute it and/or   * This program is free software; you can redistribute it and/or
5   * modify it under the terms of the GNU General Public License as   * modify it under the terms of the GNU General Public License as
# Line 70  class PropDialog : public ManagedWindow, Line 70  class PropDialog : public ManagedWindow,
70                     public PropEditor<DLS::Info> {                     public PropEditor<DLS::Info> {
71  public:  public:
72      PropDialog();      PropDialog();
     void set_info(DLS::Info* info);  
73      void set_file(gig::File* file);      void set_file(gig::File* file);
74    
75      // implementation for abstract methods of interface class "ManagedWindow"      // implementation for abstract methods of interface class "ManagedWindow"
# Line 104  protected: Line 103  protected:
103    
104      gig::File* m_file;      gig::File* m_file;
105    
106      void onFileFormatChanged();      void set_FileFormat(int value);
107  };  };
108    
109  class InstrumentProps : public ManagedWindow,  class InstrumentProps : public ManagedWindow,
# Line 157  protected: Line 156  protected:
156      Gtk::ProgressBar progressBar;      Gtk::ProgressBar progressBar;
157  };  };
158    
159  class Loader : public sigc::trackable {  class LoaderSaverBase {
160  public:  public:
     Loader(const char* filename);  
161      void launch();      void launch();
162      Glib::Dispatcher& signal_progress();      Glib::Dispatcher& signal_progress();
163      Glib::Dispatcher& signal_finished(); ///< Finished successfully, without error.      Glib::Dispatcher& signal_finished(); ///< Finished successfully, without error.
164      Glib::Dispatcher& signal_error();      Glib::Dispatcher& signal_error();
165      void progress_callback(float fraction);      void progress_callback(float fraction);
166      float get_progress();      float get_progress();
167        void join();
168      const Glib::ustring filename;      const Glib::ustring filename;
169      Glib::ustring error_message;      Glib::ustring error_message;
170      gig::File* gig;      gig::File* gig;
171    
172    protected:
173        LoaderSaverBase(const Glib::ustring filename, gig::File* gig);
174    
175  private:  private:
176      Glib::Threads::Thread* thread;      Glib::Threads::Thread* thread;
177      void thread_function();      void thread_function();
178        virtual void thread_function_sub(gig::progress_t& progress) = 0;
179      Glib::Dispatcher finished_dispatcher;      Glib::Dispatcher finished_dispatcher;
180      Glib::Dispatcher progress_dispatcher;      Glib::Dispatcher progress_dispatcher;
181      Glib::Dispatcher error_dispatcher;      Glib::Dispatcher error_dispatcher;
# Line 180  private: Line 183  private:
183      float progress;      float progress;
184  };  };
185    
186  class Saver : public sigc::trackable {  class Loader : public LoaderSaverBase {
187    public:
188        Loader(const char* filename);
189    
190    private:
191        void thread_function_sub(gig::progress_t& progress);
192    };
193    
194    class Saver : public LoaderSaverBase {
195  public:  public:
196      Saver(gig::File* file, Glib::ustring filename = ""); ///< one argument means "save", two arguments means "save as"      Saver(gig::File* file, Glib::ustring filename = ""); ///< one argument means "save", two arguments means "save as"
     void launch();  
     Glib::Dispatcher& signal_progress();  
     Glib::Dispatcher& signal_finished(); ///< Finished successfully, without error.  
     Glib::Dispatcher& signal_error();  
     void progress_callback(float fraction);  
     float get_progress();  
     gig::File* gig;  
     const Glib::ustring filename;  
     Glib::ustring error_message;  
197    
198  private:  private:
199      Glib::Threads::Thread* thread;      void thread_function_sub(gig::progress_t& progress);
     void thread_function();  
     Glib::Dispatcher finished_dispatcher;  
     Glib::Dispatcher progress_dispatcher;  
     Glib::Dispatcher error_dispatcher;  
     Glib::Threads::Mutex progressMutex;  
     float progress;  
200  };  };
201    
202  class MainWindow : public ManagedWindow {  class MainWindow : public ManagedWindow {
# Line 638  protected: Line 634  protected:
634      void __refreshEntireGUI();      void __refreshEntireGUI();
635      void updateScriptListOfMenu();      void updateScriptListOfMenu();
636      void assignScript(gig::Script* pScript);      void assignScript(gig::Script* pScript);
637        void dropAllScriptSlots();
638    
639      bool close_confirmation_dialog();      bool close_confirmation_dialog();
640      bool leaving_shared_mode_dialog();      bool leaving_shared_mode_dialog();
# Line 651  protected: Line 648  protected:
648      bool on_delete_event(GdkEventAny* event);      bool on_delete_event(GdkEventAny* event);
649    
650      bool first_call_to_drag_data_get;      bool first_call_to_drag_data_get;
651        
652      bool is_copy_samples_unity_note_enabled() const;      bool is_copy_samples_unity_note_enabled() const;
653      bool is_copy_samples_fine_tune_enabled() const;      bool is_copy_samples_fine_tune_enabled() const;
654      bool is_copy_samples_loop_enabled() const;      bool is_copy_samples_loop_enabled() const;

Legend:
Removed from v.3418  
changed lines
  Added in v.3471

  ViewVC Help
Powered by ViewVC