--- gigedit/trunk/src/gigedit/regionchooser.h 2015/08/30 10:00:49 2841 +++ gigedit/trunk/src/gigedit/regionchooser.h 2018/01/23 16:30:56 3409 @@ -1,5 +1,5 @@ /* -*- c++ -*- - * Copyright (C) 2006-2015 Andreas Persson + * Copyright (C) 2006-2017 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,28 @@ #include +#include "compat.h" + +#include #include -#include #include #include +#if USE_GTKMM_BUILDER +# include +#else +# include // deprecated in gtkmm >= 3.21.4 +#endif + #include "dimensionmanager.h" #include "paramedit.h" #include "compat.h" -#include +#ifdef LIBGIG_HEADER_FILE +# include LIBGIG_HEADER_FILE(gig.h) +#else +# include +#endif enum virt_keyboard_mode_t { VIRT_KEYBOARD_MODE_NORMAL, @@ -60,6 +72,9 @@ void set_instrument(gig::Instrument* instrument); + // ATM only used for painting auto selected regions with gray hatched pattern + void setModifyAllRegions(bool b); + sigc::signal& signal_region_selected(); sigc::signal& signal_instrument_changed(); @@ -74,11 +89,13 @@ gig::Region* get_region() { return region; } void set_region(gig::Region* region); + void select_next_region(); + void select_prev_region(); void on_note_on_event(int key, int velocity); void on_note_off_event(int key, int velocity); - Gtk::HBox m_VirtKeybPropsBox; + HBox m_VirtKeybPropsBox; protected: #if (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION < 90) || GTKMM_MAJOR_VERSION < 2 @@ -92,7 +109,9 @@ gig::Region* get_region(int key); - Gdk::RGBA activeKeyColor, red, grey1, white, black; + Gdk::RGBA activeKeyColor, blue, grey1, white, black; + Glib::RefPtr blueHatchedPatternARGB; + Cairo::RefPtr blueHatchedSurfacePattern; sigc::signal region_selected; sigc::signal instrument_changed; @@ -122,6 +141,7 @@ void update_after_resize(); void update_after_move(int pos); void invalidate_key(int key); + void on_show_tooltips_changed(); // returns the leftmost pixel of a key int key_to_x(double k, int w) const { @@ -165,6 +185,9 @@ int h1; + // ATM only used for painting auto selected regions with gray hatched pattern + bool modifyallregions; + Gtk::Menu* popup_menu_inside_region; Gtk::Menu* popup_menu_outside_region; void show_region_properties(); @@ -174,8 +197,12 @@ void on_dimension_manager_changed(); int new_region_pos; - Glib::RefPtr actionGroup; + Glib::RefPtr actionGroup; +#if USE_GTKMM_BUILDER + Glib::RefPtr uiManager; +#else Glib::RefPtr uiManager; +#endif // properties of the virtual keyboard ChoiceEntry m_VirtKeybModeChoice;