--- gigedit/trunk/src/gigedit/dimregionedit.h 2013/01/05 12:31:22 2391 +++ gigedit/trunk/src/gigedit/dimregionedit.h 2013/01/07 20:41:16 2392 @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (C) 2006-2010 Andreas Persson + * Copyright (C) 2006-2013 Andreas Persson * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -22,6 +22,7 @@ #include +#include #include #include #include @@ -31,6 +32,39 @@ #include "paramedit.h" +class VelocityCurve : public Gtk::DrawingArea { +public: + VelocityCurve(double (gig::DimensionRegion::*getter)(uint8_t)); + void set_dim_region(gig::DimensionRegion* d) { dimreg = d; } + +protected: +#if (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION < 90) || GTKMM_MAJOR_VERSION < 2 + bool on_expose_event(GdkEventExpose* e); +#else + bool on_draw(const Cairo::RefPtr& cr); +#endif + +private: + double (gig::DimensionRegion::* const getter)(uint8_t); + gig::DimensionRegion* dimreg; +}; + +class CrossfadeCurve : public Gtk::DrawingArea { +public: + CrossfadeCurve(); + void set_dim_region(gig::DimensionRegion* d) { dimreg = d; } + +protected: +#if (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION < 90) || GTKMM_MAJOR_VERSION < 2 + bool on_expose_event(GdkEventExpose* e); +#else + bool on_draw(const Cairo::RefPtr& cr); +#endif + +private: + gig::DimensionRegion* dimreg; +}; + class DimRegionEdit : public Gtk::Notebook { public: @@ -61,6 +95,11 @@ Gtk::Label* lSample; + VelocityCurve velocity_curve; + VelocityCurve release_curve; + VelocityCurve cutoff_curve; + CrossfadeCurve crossfade_curve; + NumEntryPermille eEG1PreAttack; NumEntryTemp eEG1Attack; NumEntryTemp eEG1Decay1;