--- gigedit/trunk/src/gigedit/dimregionedit.h 2008/01/04 19:42:45 1623 +++ gigedit/trunk/src/gigedit/dimregionedit.h 2013/03/03 17:26:11 2430 @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (C) 2006-2008 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,16 +22,52 @@ #include +#include #include #include #include #include -#include #include #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; + void draw_one_curve(const Cairo::RefPtr& cr, + const gig::DimensionRegion* d, + bool sensitive); +}; + class DimRegionEdit : public Gtk::Notebook { public: @@ -54,12 +90,19 @@ gig::DimensionRegion* dimregion; +#ifdef OLD_TOOLTIPS Gtk::Tooltips tooltips; +#endif Gtk::Table* table[7]; Gtk::Label* lSample; + VelocityCurve velocity_curve; + VelocityCurve release_curve; + VelocityCurve cutoff_curve; + CrossfadeCurve crossfade_curve; + NumEntryPermille eEG1PreAttack; NumEntryTemp eEG1Attack; NumEntryTemp eEG1Decay1;