1 |
/* -*- c++ -*- |
/* -*- c++ -*- |
2 |
* Copyright (C) 2006-2010 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 |
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> |
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 |
|
}; |
67 |
|
|
68 |
class DimRegionEdit : public Gtk::Notebook |
class DimRegionEdit : public Gtk::Notebook |
69 |
{ |
{ |
70 |
public: |
public: |
95 |
|
|
96 |
Gtk::Label* lSample; |
Gtk::Label* lSample; |
97 |
|
|
98 |
|
VelocityCurve velocity_curve; |
99 |
|
VelocityCurve release_curve; |
100 |
|
VelocityCurve cutoff_curve; |
101 |
|
CrossfadeCurve crossfade_curve; |
102 |
|
|
103 |
NumEntryPermille eEG1PreAttack; |
NumEntryPermille eEG1PreAttack; |
104 |
NumEntryTemp<double> eEG1Attack; |
NumEntryTemp<double> eEG1Attack; |
105 |
NumEntryTemp<double> eEG1Decay1; |
NumEntryTemp<double> eEG1Decay1; |