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

Diff of /gigedit/trunk/src/gigedit/dimregionedit.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 2430 by persson, Sun Mar 3 17:26:11 2013 UTC
# Line 1  Line 1 
1  /*                                                         -*- c++ -*-  /*                                                         -*- c++ -*-
2   * Copyright (C) 2006, 2007 Andreas Persson   * Copyright (C) 2006-2013 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 22  Line 22 
22    
23  #include <gig.h>  #include <gig.h>
24    
25    #include <gtkmm/drawingarea.h>
26  #include <gtkmm/entry.h>  #include <gtkmm/entry.h>
27  #include <gtkmm/label.h>  #include <gtkmm/label.h>
28  #include <gtkmm/notebook.h>  #include <gtkmm/notebook.h>
29  #include <gtkmm/table.h>  #include <gtkmm/table.h>
 #include <gtkmm/tooltips.h>  
30    
31  #include <set>  #include <set>
32    
33  #include "paramedit.h"  #include "paramedit.h"
34    
35    class VelocityCurve : public Gtk::DrawingArea {
36    public:
37        VelocityCurve(double (gig::DimensionRegion::*getter)(uint8_t));
38        void set_dim_region(gig::DimensionRegion* d) { dimreg = d; }
39    
40    protected:
41    #if (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION < 90) || GTKMM_MAJOR_VERSION < 2
42        bool on_expose_event(GdkEventExpose* e);
43    #else
44        bool on_draw(const Cairo::RefPtr<Cairo::Context>& cr);
45    #endif
46    
47    private:
48        double (gig::DimensionRegion::* const getter)(uint8_t);
49        gig::DimensionRegion* dimreg;
50    };
51    
52    class CrossfadeCurve : public Gtk::DrawingArea {
53    public:
54        CrossfadeCurve();
55        void set_dim_region(gig::DimensionRegion* d) { dimreg = d; }
56    
57    protected:
58    #if (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION < 90) || GTKMM_MAJOR_VERSION < 2
59        bool on_expose_event(GdkEventExpose* e);
60    #else
61        bool on_draw(const Cairo::RefPtr<Cairo::Context>& cr);
62    #endif
63    
64    private:
65        gig::DimensionRegion* dimreg;
66        void draw_one_curve(const Cairo::RefPtr<Cairo::Context>& cr,
67                            const gig::DimensionRegion* d,
68                            bool sensitive);
69    };
70    
71  class DimRegionEdit : public Gtk::Notebook  class DimRegionEdit : public Gtk::Notebook
72  {  {
73  public:  public:
# Line 44  public: Line 80  public:
80      sigc::signal<void, gig::DimensionRegion*>& signal_dimreg_changed();      sigc::signal<void, gig::DimensionRegion*>& signal_dimreg_changed();
81      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();
82    
83        std::set<gig::DimensionRegion*> dimregs;
84    
85  protected:  protected:
86      sigc::signal<void, gig::DimensionRegion*> dimreg_to_be_changed_signal;      sigc::signal<void, gig::DimensionRegion*> dimreg_to_be_changed_signal;
87      sigc::signal<void, gig::DimensionRegion*> dimreg_changed_signal;      sigc::signal<void, gig::DimensionRegion*> dimreg_changed_signal;
# Line 52  protected: Line 90  protected:
90    
91      gig::DimensionRegion* dimregion;      gig::DimensionRegion* dimregion;
92    
93    #ifdef OLD_TOOLTIPS
94      Gtk::Tooltips tooltips;      Gtk::Tooltips tooltips;
95    #endif
96    
97      Gtk::Table* table[7];      Gtk::Table* table[7];
98    
99      Gtk::Label* lSample;      Gtk::Label* lSample;
100    
101        VelocityCurve velocity_curve;
102        VelocityCurve release_curve;
103        VelocityCurve cutoff_curve;
104        CrossfadeCurve crossfade_curve;
105    
106      NumEntryPermille eEG1PreAttack;      NumEntryPermille eEG1PreAttack;
107      NumEntryTemp<double> eEG1Attack;      NumEntryTemp<double> eEG1Attack;
108      NumEntryTemp<double> eEG1Decay1;      NumEntryTemp<double> eEG1Decay1;
# Line 146  protected: Line 191  protected:
191      ChoiceEntry<uint32_t> eSampleLoopType;      ChoiceEntry<uint32_t> eSampleLoopType;
192      BoolEntry eSampleLoopInfinite;      BoolEntry eSampleLoopInfinite;
193      NumEntryTemp<uint32_t> eSampleLoopPlayCount;      NumEntryTemp<uint32_t> eSampleLoopPlayCount;
194        Gtk::Label* lEG2;
195        Gtk::Label* lLFO2;
196    
197      int rowno;      int rowno;
198      int pageno;      int pageno;
# Line 157  protected: Line 204  protected:
204      void addProp(LabelWidget& labelwidget);      void addProp(LabelWidget& labelwidget);
205      void addString(const char* labelText, Gtk::Label*& label,      void addString(const char* labelText, Gtk::Label*& label,
206                     Gtk::Entry*& widget);                     Gtk::Entry*& widget);
207      void addHeader(const char* text);      Gtk::Label* addHeader(const char* text);
208      void nextPage();      void nextPage();
209    
210      void VCFEnabled_toggled();      void VCFEnabled_toggled();
# Line 180  protected: Line 227  protected:
227      void loop_length_changed();      void loop_length_changed();
228      void loop_infinite_toggled();      void loop_infinite_toggled();
229    
     std::set<gig::DimensionRegion*> dimregs;  
   
230      int update_model;      int update_model;
231    
232      // connect a widget to a setter function in DimRegionEdit      // connect a widget to a setter function in DimRegionEdit

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

  ViewVC Help
Powered by ViewVC