/[svn]/gigedit/trunk/src/gigedit/dimregionchooser.h
ViewVC logotype

Diff of /gigedit/trunk/src/gigedit/dimregionchooser.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3068 by schoenebeck, Mon Jan 2 22:13:01 2017 UTC revision 3286 by schoenebeck, Thu Jun 22 10:54:10 2017 UTC
# Line 36  Line 36 
36  #include <set>  #include <set>
37  #include <map>  #include <map>
38    
39    #include "global.h"
40    
41  class DimRegionChooser : public Gtk::DrawingArea  class DimRegionChooser : public Gtk::DrawingArea
42  {  {
43  public:  public:
# Line 51  public: Line 53  public:
53      void get_dimregions(const gig::Region* region, bool stereo,      void get_dimregions(const gig::Region* region, bool stereo,
54                          std::set<gig::DimensionRegion*>& dimregs) const;                          std::set<gig::DimensionRegion*>& dimregs) const;
55      bool select_dimregion(gig::DimensionRegion* dimrgn);      bool select_dimregion(gig::DimensionRegion* dimrgn);
56        void select_next_dimzone(bool add = false);
57        void select_prev_dimzone(bool add = false);
58        void select_next_dimension();
59        void select_prev_dimension();
60    
61        // those 3 are ATM only relevant when resizing custom dimension region zones
62        // and for painting those auto selected zones with gray hatched pattern
63        void setModifyBothChannels(bool b);
64        void setModifyAllDimensionRegions(bool b);
65        void setModifyAllRegions(bool b);
66    
67  protected:  protected:
68  #if (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION < 90) || GTKMM_MAJOR_VERSION < 2  #if (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION < 90) || GTKMM_MAJOR_VERSION < 2
# Line 68  protected: Line 80  protected:
80      void split_dimension_zone();      void split_dimension_zone();
81      void delete_dimension_zone();      void delete_dimension_zone();
82      void resetSelectedZones();      void resetSelectedZones();
83        void select_dimzone_by_dir(int dir, bool add = false);
84    
85      Gdk::RGBA red, black, white;      Gdk::RGBA red, blue, black, white;
86        Glib::RefPtr<Gdk::Pixbuf> blueHatchedPatternARGB;
87        Cairo::RefPtr<Cairo::SurfacePattern> blueHatchedSurfacePattern;
88        Glib::RefPtr<Gdk::Pixbuf> blueHatchedPattern2ARGB;
89        Cairo::RefPtr<Cairo::SurfacePattern> blueHatchedSurfacePattern2;
90        Glib::RefPtr<Gdk::Pixbuf> grayBlueHatchedPatternARGB;
91        Cairo::RefPtr<Cairo::SurfacePattern> grayBlueHatchedSurfacePattern;
92    
93      gig::Instrument* instrument;      gig::Instrument* instrument;
94      gig::Region* region;      gig::Region* region;
# Line 77  protected: Line 96  protected:
96      sigc::signal<void> dimregion_selected;      sigc::signal<void> dimregion_selected;
97      sigc::signal<void> region_changed;      sigc::signal<void> region_changed;
98    
99      //std::set<gig::DimensionRegion*> dimregs; ///< Reflects which dimension regions are currently selected.      // those 3 are ATM only relevant when resizing custom dimension region zones
100        // and for painting those auto selected zones with gray hatched pattern
101        bool modifybothchannels;
102        bool modifyalldimregs;
103        bool modifyallregions;
104    
105      int focus_line;      int focus_line;
106      std::map<gig::dimension_t, std::set<int> > dimzones; ///< Reflects which zone(s) of the individual dimension are currently selected.      std::map<gig::dimension_t, std::set<int> > dimzones; ///< Reflects which zone(s) of the individual dimension are currently selected.
107      int label_width;      int label_width;
# Line 89  protected: Line 113  protected:
113      // i.e. keyboard arrow key navigation)      // i.e. keyboard arrow key navigation)
114      // NOTE: these may *not* necessarily currently be selected !      // NOTE: these may *not* necessarily currently be selected !
115      gig::dimension_t maindimtype;      gig::dimension_t maindimtype;
116      std::map<gig::dimension_t,int> maindimcase;      DimensionCase maindimcase;
117      int maindimregno;      int maindimregno;
118    
119      // information needed during a resize      // information needed during a resize
# Line 104  protected: Line 128  protected:
128          int min;          int min;
129          int max;          int max;
130          int dimension;          int dimension;
131          int offset;          gig::dimension_def_t dimensionDef;
132            int zone;
133      } resize;      } resize;
134    
135      bool multiSelectKeyDown;      bool multiSelectKeyDown;
136        bool primaryKeyDown; // on Mac: Cmd key, on all other OSs: Ctrl key
137        bool shiftKeyDown;
138    
139      bool cursor_is_resize;      bool cursor_is_resize;
140      bool is_in_resize_zone(double x, double y);      bool is_in_resize_zone(double x, double y);
# Line 119  protected: Line 146  protected:
146      Glib::RefPtr<Gtk::UIManager> uiManager;      Glib::RefPtr<Gtk::UIManager> uiManager;
147      Gtk::Menu* popup_menu_inside_dimregion;      Gtk::Menu* popup_menu_inside_dimregion;
148      Gtk::Menu* popup_menu_outside_dimregion;      Gtk::Menu* popup_menu_outside_dimregion;
149    
150    private:
151        Glib::RefPtr<Gtk::Action> actionDeleteDimZone;
152        Glib::RefPtr<Gtk::Action> actionSplitDimZone;
153  };  };
154    
155  #endif  #endif

Legend:
Removed from v.3068  
changed lines
  Added in v.3286

  ViewVC Help
Powered by ViewVC