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

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

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

revision 2246 by persson, Fri Aug 19 10:55:41 2011 UTC revision 3148 by schoenebeck, Thu May 4 11:47:45 2017 UTC
# Line 1  Line 1 
1  /*                                                         -*- c++ -*-  /*                                                         -*- c++ -*-
2   * Copyright (C) 2006-2011 Andreas Persson   * Copyright (C) 2006-2017 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
# Line 22  Line 22 
22    
23  #include <vector>  #include <vector>
24    
25    #include <gtkmm/box.h>
26  #include <gtkmm/drawingarea.h>  #include <gtkmm/drawingarea.h>
27  #include <gtkmm/uimanager.h>  #include <gtkmm/uimanager.h>
28  #include <gdkmm/window.h>  #include <gdkmm/window.h>
# Line 31  Line 32 
32  #include "paramedit.h"  #include "paramedit.h"
33  #include "compat.h"  #include "compat.h"
34    
35  #include <gig.h>  #ifdef LIBGIG_HEADER_FILE
36    # include LIBGIG_HEADER_FILE(gig.h)
37    #else
38    # include <gig.h>
39    #endif
40    
41  enum virt_keyboard_mode_t {  enum virt_keyboard_mode_t {
42      VIRT_KEYBOARD_MODE_NORMAL,      VIRT_KEYBOARD_MODE_NORMAL,
# Line 47  public: Line 52  public:
52      void update(gig::Instrument* instrument);      void update(gig::Instrument* instrument);
53      gig::Region* first();      gig::Region* first();
54      gig::Region* next();      gig::Region* next();
55      bool operator() (gig::Region* x, gig::Region* y) {      bool operator() (gig::Region* x, gig::Region* y) const {
56          return x->KeyRange.low < y->KeyRange.low;          return x->KeyRange.low < y->KeyRange.low;
57      }      }
58  };  };
# Line 60  public: Line 65  public:
65    
66      void set_instrument(gig::Instrument* instrument);      void set_instrument(gig::Instrument* instrument);
67    
68        // ATM only used for painting auto selected regions with gray hatched pattern
69        void setModifyAllRegions(bool b);
70    
71      sigc::signal<void>& signal_region_selected();      sigc::signal<void>& signal_region_selected();
72      sigc::signal<void>& signal_instrument_changed();      sigc::signal<void>& signal_instrument_changed();
73    
# Line 73  public: Line 81  public:
81      sigc::signal<void, int/*key*/, int/*velocity*/>& signal_keyboard_key_released();      sigc::signal<void, int/*key*/, int/*velocity*/>& signal_keyboard_key_released();
82    
83      gig::Region* get_region() { return region; }      gig::Region* get_region() { return region; }
84        void set_region(gig::Region* region);
85        void select_next_region();
86        void select_prev_region();
87    
88      void on_note_on_event(int key, int velocity);      void on_note_on_event(int key, int velocity);
89      void on_note_off_event(int key, int velocity);      void on_note_off_event(int key, int velocity);
# Line 91  protected: Line 102  protected:
102    
103      gig::Region* get_region(int key);      gig::Region* get_region(int key);
104    
105      Gdk::RGBA activeKeyColor, red, grey1, white, black;      Gdk::RGBA activeKeyColor, blue, grey1, white, black;
106        Glib::RefPtr<Gdk::Pixbuf> grayBlueHatchedPatternARGB;
107        Cairo::RefPtr<Cairo::SurfacePattern> grayBlueHatchedSurfacePattern;
108    
109      sigc::signal<void> region_selected;      sigc::signal<void> region_selected;
110      sigc::signal<void> instrument_changed;      sigc::signal<void> instrument_changed;
# Line 164  protected: Line 177  protected:
177    
178      int h1;      int h1;
179    
180        // ATM only used for painting auto selected regions with gray hatched pattern
181        bool modifyallregions;
182    
183      Gtk::Menu* popup_menu_inside_region;      Gtk::Menu* popup_menu_inside_region;
184      Gtk::Menu* popup_menu_outside_region;      Gtk::Menu* popup_menu_outside_region;
185      void show_region_properties();      void show_region_properties();

Legend:
Removed from v.2246  
changed lines
  Added in v.3148

  ViewVC Help
Powered by ViewVC