/[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 2625 by schoenebeck, Fri May 16 23:19:23 2014 UTC revision 2626 by schoenebeck, Thu Jun 12 15:12:00 2014 UTC
# Line 30  Line 30 
30  #include <gig.h>  #include <gig.h>
31    
32  #include <set>  #include <set>
33    #include <map>
34    
35  class DimRegionChooser : public Gtk::DrawingArea  class DimRegionChooser : public Gtk::DrawingArea
36  {  {
37  public:  public:
38      DimRegionChooser();      DimRegionChooser(Gtk::Window& window);
39      virtual ~DimRegionChooser();      virtual ~DimRegionChooser();
40    
41      void set_region(gig::Region* region);      void set_region(gig::Region* region);
# Line 42  public: Line 43  public:
43      sigc::signal<void>& signal_dimregion_selected();      sigc::signal<void>& signal_dimregion_selected();
44      sigc::signal<void>& signal_region_changed();      sigc::signal<void>& signal_region_changed();
45    
46      gig::DimensionRegion* get_dimregion() const { return dimreg; }      gig::DimensionRegion* get_main_dimregion() const;
47      void get_dimregions(const gig::Region* region, bool stereo,      void get_dimregions(const gig::Region* region, bool stereo,
48                          std::set<gig::DimensionRegion*>& dimregs) const;                          std::set<gig::DimensionRegion*>& dimregs) const;
49    
# Line 56  protected: Line 57  protected:
57      virtual bool on_button_release_event(GdkEventButton* event);      virtual bool on_button_release_event(GdkEventButton* event);
58      virtual bool on_motion_notify_event(GdkEventMotion* event);      virtual bool on_motion_notify_event(GdkEventMotion* event);
59      virtual bool on_focus(Gtk::DirectionType direction);      virtual bool on_focus(Gtk::DirectionType direction);
60        bool onKeyPressed(GdkEventKey* key);
61        bool onKeyReleased(GdkEventKey* key);
62      void refresh_all();      void refresh_all();
63      void split_dimension_zone();      void split_dimension_zone();
64      void delete_dimension_zone();      void delete_dimension_zone();
# Line 64  protected: Line 67  protected:
67    
68      gig::Instrument* instrument;      gig::Instrument* instrument;
69      gig::Region* region;      gig::Region* region;
     int dimregno;  
70    
71      sigc::signal<void> dimregion_selected;      sigc::signal<void> dimregion_selected;
72      sigc::signal<void> region_changed;      sigc::signal<void> region_changed;
73    
74      gig::DimensionRegion* dimreg;      //std::set<gig::DimensionRegion*> dimregs; ///< Reflects which dimension regions are currently selected.
75      int focus_line;      int focus_line;
76      int dimvalue[256];      std::map<gig::dimension_t, std::set<int> > dimzones; ///< Reflects which zone(s) of the individual dimension are currently selected.
77      int label_width;      int label_width;
78      bool labels_changed;      bool labels_changed;
79      int nbDimensions;      int nbDimensions;
80    
81      int dimtype;      // the "main" dimension region is the one that is used to i.e. evaluate the
82      int dimzone;      // precise custom velocity splits (could also be interpreted for focus stuff,
83        // i.e. keyboard arrow key navigation)
84        // NOTE: these may *not* necessarily currently be selected !
85        gig::dimension_t maindimtype;
86        std::map<gig::dimension_t,int> maindimcase;
87        int maindimregno;
88    
89      // information needed during a resize      // information needed during a resize
90      struct {      struct {
# Line 94  protected: Line 101  protected:
101          int offset;          int offset;
102      } resize;      } resize;
103    
104        bool multiSelectKeyDown;
105    
106      bool cursor_is_resize;      bool cursor_is_resize;
107      bool is_in_resize_zone(double x, double y);      bool is_in_resize_zone(double x, double y);
108      void update_after_resize();      void update_after_resize();

Legend:
Removed from v.2625  
changed lines
  Added in v.2626

  ViewVC Help
Powered by ViewVC