/[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 1460 by persson, Sat Oct 27 12:28:33 2007 UTC revision 1654 by schoenebeck, Wed Jan 30 02:20:48 2008 UTC
# Line 1  Line 1 
1  /*                                                         -*- c++ -*-  /*                                                         -*- c++ -*-
2   * Copyright (C) 2006, 2007 Andreas Persson   * Copyright (C) 2006 - 2008 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 43  Line 43 
43    
44  class MainWindow;  class MainWindow;
45    
46    class Table : public Gtk::Table
47    {
48    public:
49        Table(int x, int y);
50        void add(BoolEntry& boolentry);
51        void add(BoolEntryPlus6& boolentry);
52        void add(LabelWidget& labelwidget);
53    private:
54        int rowno;
55    };
56    
57  class PropDialog : public Gtk::Window {  class PropDialog : public Gtk::Window {
58  public:  public:
59      PropDialog();      PropDialog();
60      void set_info(DLS::Info* info);      void set_info(DLS::Info* info);
61        sigc::signal<void>& signal_info_changed();
62  protected:  protected:
63      Gtk::Table table;      sigc::signal<void> info_changed;
64      Gtk::Label label[16];      StringEntry eName;
65      Gtk::Entry entry[16];      StringEntry eCreationDate;
66        StringEntryMultiLine eComments;
67        StringEntry eProduct;
68        StringEntry eCopyright;
69        StringEntry eArtists;
70        StringEntry eGenre;
71        StringEntry eKeywords;
72        StringEntry eEngineer;
73        StringEntry eTechnician;
74        StringEntry eSoftware;
75        StringEntry eMedium;
76        StringEntry eSource;
77        StringEntry eSourceForm;
78        StringEntry eCommissioned;
79        StringEntry eSubject;
80        Gtk::VBox vbox;
81        Gtk::HButtonBox buttonBox;
82        Gtk::Button quitButton;
83        Table table;
84        int update_model;
85        DLS::Info* info;
86    
87        template<typename T>
88        void set_member(T value, T DLS::Info::* member) {
89            if (update_model == 0) {
90                info->*member = value;
91                info_changed();
92            }
93        }
94    
95        template<typename C, typename T>
96        void connect(C& widget, T DLS::Info::* member) {
97            widget.signal_value_changed().connect(
98                sigc::compose(
99                    sigc::bind(sigc::mem_fun(*this, &PropDialog::set_member<T>), member),
100                    sigc::mem_fun(widget, &C::get_value)));
101        }
102  };  };
103    
104  class InstrumentProps : public Gtk::Window {  class InstrumentProps : public Gtk::Window {
# Line 102  protected: Line 150  protected:
150      Gtk::VBox vbox;      Gtk::VBox vbox;
151      Gtk::HButtonBox buttonBox;      Gtk::HButtonBox buttonBox;
152      Gtk::Button quitButton;      Gtk::Button quitButton;
153      Gtk::Table table;      Table table;
154      StringEntry eName;      StringEntry eName;
155      BoolEntry eIsDrum;      BoolEntry eIsDrum;
156      NumEntryTemp<uint16_t> eMIDIBank;      NumEntryTemp<uint16_t> eMIDIBank;
# Line 115  protected: Line 163  protected:
163      BoolEntry ePianoReleaseMode;      BoolEntry ePianoReleaseMode;
164      NoteEntry eDimensionKeyRangeLow;      NoteEntry eDimensionKeyRangeLow;
165      NoteEntry eDimensionKeyRangeHigh;      NoteEntry eDimensionKeyRangeHigh;
     int rowno;  
     void add_prop(BoolEntry& prop);  
     void add_prop(BoolEntryPlus6& prop);  
     void add_prop(LabelWidget& prop);  
166      sigc::signal<void> instrument_changed;      sigc::signal<void> instrument_changed;
167  };  };
168    
# Line 167  public: Line 211  public:
211      sigc::signal<void, gig::DimensionRegion*>& signal_dimreg_changed();      sigc::signal<void, gig::DimensionRegion*>& signal_dimreg_changed();
212      sigc::signal<void, gig::Sample*/*old*/, gig::Sample*/*new*/>& signal_sample_ref_changed();      sigc::signal<void, gig::Sample*/*old*/, gig::Sample*/*new*/>& signal_sample_ref_changed();
213    
214        sigc::signal<void, int/*key*/, int/*velocity*/>& signal_note_on();
215        sigc::signal<void, int/*key*/, int/*velocity*/>& signal_note_off();
216    
217  protected:  protected:
218      Glib::RefPtr<Gtk::ActionGroup> actionGroup;      Glib::RefPtr<Gtk::ActionGroup> actionGroup;
219      Glib::RefPtr<Gtk::UIManager> uiManager;      Glib::RefPtr<Gtk::UIManager> uiManager;
# Line 191  protected: Line 238  protected:
238      sigc::signal<void, gig::DimensionRegion*> dimreg_changed_signal;      sigc::signal<void, gig::DimensionRegion*> dimreg_changed_signal;
239      sigc::signal<void, gig::Sample*/*old*/, gig::Sample*/*new*/> sample_ref_changed_signal;      sigc::signal<void, gig::Sample*/*old*/, gig::Sample*/*new*/> sample_ref_changed_signal;
240    
241        sigc::signal<void, int/*key*/, int/*velocity*/> note_on_signal;
242        sigc::signal<void, int/*key*/, int/*velocity*/> note_off_signal;
243    
244      void on_instrument_selection_change(int index);      void on_instrument_selection_change(int index);
245      void on_sel_change();      void on_sel_change();
246      void region_changed();      void region_changed();
247      void dimreg_changed();      void dimreg_changed();
248      void on_loader_progress();      void on_loader_progress();
249      void on_loader_finished();      void on_loader_finished();
250        void dimreg_all_dimregs_toggled();
251        gig::Instrument* get_instrument();
252        void add_region_to_dimregs(gig::Region* region, bool stereo, bool all_dimregs);
253        void update_dimregs();
254    
255      class ModelColumns : public Gtk::TreeModel::ColumnRecord {      class ModelColumns : public Gtk::TreeModel::ColumnRecord {
256      public:      public:
# Line 243  protected: Line 297  protected:
297      Gtk::TreeView m_TreeViewSamples;      Gtk::TreeView m_TreeViewSamples;
298      Glib::RefPtr<SamplesTreeStore> m_refSamplesTreeModel;      Glib::RefPtr<SamplesTreeStore> m_refSamplesTreeModel;
299    
300        Gtk::VBox dimreg_vbox;
301        Gtk::HBox dimreg_hbox;
302        Gtk::Label dimreg_label;
303        Gtk::CheckButton dimreg_all_regions;
304        Gtk::CheckButton dimreg_all_dimregs;
305        Gtk::CheckButton dimreg_stereo;
306      DimRegionEdit dimreg_edit;      DimRegionEdit dimreg_edit;
307    
308      Gtk::Notebook m_Notebook;      Gtk::Notebook m_Notebook;

Legend:
Removed from v.1460  
changed lines
  Added in v.1654

  ViewVC Help
Powered by ViewVC