21 |
#define GIGEDIT_DIMREGIONCHOOSER_H |
#define GIGEDIT_DIMREGIONCHOOSER_H |
22 |
|
|
23 |
#include <gtkmm/drawingarea.h> |
#include <gtkmm/drawingarea.h> |
|
#include <gtkmm/uimanager.h> |
|
24 |
#include <gtkmm/menu.h> |
#include <gtkmm/menu.h> |
25 |
#include <gdkmm/window.h> |
#include <gdkmm/window.h> |
26 |
|
|
32 |
# include <gig.h> |
# include <gig.h> |
33 |
#endif |
#endif |
34 |
|
|
35 |
|
#if USE_GTKMM_BUILDER |
36 |
|
# include <gtkmm/builder.h> |
37 |
|
#else |
38 |
|
# include <gtkmm/uimanager.h> // deprecated in gtkmm >= 3.21.4 |
39 |
|
#endif |
40 |
|
|
41 |
#include <set> |
#include <set> |
42 |
#include <map> |
#include <map> |
43 |
|
|
58 |
void get_dimregions(const gig::Region* region, bool stereo, |
void get_dimregions(const gig::Region* region, bool stereo, |
59 |
std::set<gig::DimensionRegion*>& dimregs) const; |
std::set<gig::DimensionRegion*>& dimregs) const; |
60 |
bool select_dimregion(gig::DimensionRegion* dimrgn); |
bool select_dimregion(gig::DimensionRegion* dimrgn); |
61 |
void select_next_dimzone(); |
void select_next_dimzone(bool add = false); |
62 |
void select_prev_dimzone(); |
void select_prev_dimzone(bool add = false); |
63 |
void select_next_dimension(); |
void select_next_dimension(); |
64 |
void select_prev_dimension(); |
void select_prev_dimension(); |
65 |
|
|
66 |
// those 3 are ATM only relevant when resizing custom dimension region zones |
// those 3 are ATM only relevant when resizing custom dimension region zones |
67 |
|
// and for painting those auto selected zones with gray hatched pattern |
68 |
void setModifyBothChannels(bool b); |
void setModifyBothChannels(bool b); |
69 |
void setModifyAllDimensionRegions(bool b); |
void setModifyAllDimensionRegions(bool b); |
70 |
void setModifyAllRegions(bool b); |
void setModifyAllRegions(bool b); |
79 |
virtual bool on_button_release_event(GdkEventButton* event); |
virtual bool on_button_release_event(GdkEventButton* event); |
80 |
virtual bool on_motion_notify_event(GdkEventMotion* event); |
virtual bool on_motion_notify_event(GdkEventMotion* event); |
81 |
virtual bool on_focus(Gtk::DirectionType direction); |
virtual bool on_focus(Gtk::DirectionType direction); |
82 |
|
#if GTKMM_MAJOR_VERSION > 3 || (GTKMM_MAJOR_VERSION == 3 && (GTKMM_MINOR_VERSION > 91 || (GTKMM_MINOR_VERSION == 91 && GTKMM_MICRO_VERSION >= 2))) // GTKMM >= 3.91.2 |
83 |
|
bool onKeyPressed(Gdk::EventKey& key); |
84 |
|
bool onKeyReleased(Gdk::EventKey& key); |
85 |
|
#else |
86 |
bool onKeyPressed(GdkEventKey* key); |
bool onKeyPressed(GdkEventKey* key); |
87 |
bool onKeyReleased(GdkEventKey* key); |
bool onKeyReleased(GdkEventKey* key); |
88 |
|
#endif |
89 |
void refresh_all(); |
void refresh_all(); |
90 |
|
void on_show_tooltips_changed(); |
91 |
void split_dimension_zone(); |
void split_dimension_zone(); |
92 |
void delete_dimension_zone(); |
void delete_dimension_zone(); |
93 |
void resetSelectedZones(); |
void resetSelectedZones(); |
94 |
void select_dimzone_by_dir(int dir); |
void select_dimzone_by_dir(int dir, bool add = false); |
95 |
|
void drawIconsFor(gig::dimension_t dimension, uint zone, |
96 |
|
const Cairo::RefPtr<Cairo::Context>& cr, |
97 |
|
int x, int y, int w, int h); |
98 |
|
|
99 |
Gdk::RGBA red, blue, black, white; |
Gdk::RGBA red, blue, black, white; |
100 |
Glib::RefPtr<Gdk::Pixbuf> blueHatchedPatternARGB; |
Glib::RefPtr<Gdk::Pixbuf> blueHatchedPatternARGB; |
101 |
Cairo::RefPtr<Cairo::SurfacePattern> blueHatchedSurfacePattern; |
Cairo::RefPtr<Cairo::SurfacePattern> blueHatchedSurfacePattern; |
102 |
|
Glib::RefPtr<Gdk::Pixbuf> blueHatchedPattern2ARGB; |
103 |
|
Cairo::RefPtr<Cairo::SurfacePattern> blueHatchedSurfacePattern2; |
104 |
|
Glib::RefPtr<Gdk::Pixbuf> grayBlueHatchedPatternARGB; |
105 |
|
Cairo::RefPtr<Cairo::SurfacePattern> grayBlueHatchedSurfacePattern; |
106 |
|
|
107 |
gig::Instrument* instrument; |
gig::Instrument* instrument; |
108 |
gig::Region* region; |
gig::Region* region; |
111 |
sigc::signal<void> region_changed; |
sigc::signal<void> region_changed; |
112 |
|
|
113 |
// those 3 are ATM only relevant when resizing custom dimension region zones |
// those 3 are ATM only relevant when resizing custom dimension region zones |
114 |
|
// and for painting those auto selected zones with gray hatched pattern |
115 |
bool modifybothchannels; |
bool modifybothchannels; |
116 |
bool modifyalldimregs; |
bool modifyalldimregs; |
117 |
bool modifyallregions; |
bool modifyallregions; |
156 |
|
|
157 |
int h; |
int h; |
158 |
|
|
159 |
Glib::RefPtr<Gtk::ActionGroup> actionGroup; |
Glib::RefPtr<ActionGroup> actionGroup; |
160 |
|
#if USE_GTKMM_BUILDER |
161 |
|
Glib::RefPtr<Gtk::Builder> uiManager; |
162 |
|
#else |
163 |
Glib::RefPtr<Gtk::UIManager> uiManager; |
Glib::RefPtr<Gtk::UIManager> uiManager; |
164 |
|
#endif |
165 |
Gtk::Menu* popup_menu_inside_dimregion; |
Gtk::Menu* popup_menu_inside_dimregion; |
166 |
Gtk::Menu* popup_menu_outside_dimregion; |
Gtk::Menu* popup_menu_outside_dimregion; |
167 |
|
|
168 |
private: |
private: |
169 |
Glib::RefPtr<Gtk::Action> actionDeleteDimZone; |
Glib::RefPtr<Action> actionDeleteDimZone; |
170 |
Glib::RefPtr<Gtk::Action> actionSplitDimZone; |
Glib::RefPtr<Action> actionSplitDimZone; |
171 |
}; |
}; |
172 |
|
|
173 |
#endif |
#endif |