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

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

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

revision 1261 by persson, Thu Jul 5 17:12:20 2007 UTC revision 1411 by schoenebeck, Fri Oct 12 17:46:29 2007 UTC
# Line 22  Line 22 
22  #include <gtkmm/stock.h>  #include <gtkmm/stock.h>
23  #include <gtkmm/spinbutton.h>  #include <gtkmm/spinbutton.h>
24  #include <gtkmm/dialog.h>  #include <gtkmm/dialog.h>
 #include <libintl.h>  
25  #include <math.h>  #include <math.h>
26    
27  #define _(String) gettext(String)  #include "global.h"
28    
29  RegionChooser::RegionChooser()  RegionChooser::RegionChooser()
30  {  {
31      Glib::RefPtr<Gdk::Colormap> colormap = get_default_colormap();      Glib::RefPtr<Gdk::Colormap> colormap = get_default_colormap();
32    
     black = Gdk::Color("black");  
     white = Gdk::Color("white");  
33      red = Gdk::Color("#8070ff");      red = Gdk::Color("#8070ff");
34      blue = Gdk::Color("#c098ff");      grey1 = Gdk::Color("#b0b0b0");
     green = Gdk::Color("#a088ff");  
     grey1 = Gdk::Color("red");  
35    
     colormap->alloc_color(black);  
     colormap->alloc_color(white);  
36      colormap->alloc_color(red);      colormap->alloc_color(red);
     colormap->alloc_color(blue);  
     colormap->alloc_color(green);  
37      colormap->alloc_color(grey1);      colormap->alloc_color(grey1);
38      instrument = 0;      instrument = 0;
39      region = 0;      region = 0;
40      resize.active = false;      resize.active = false;
41        move.active = false;
42      cursor_is_resize = false;      cursor_is_resize = false;
43      h1 = 20;      h1 = 20;
44      width = 800;      width = 800;
# Line 86  RegionChooser::RegionChooser() Line 78  RegionChooser::RegionChooser()
78      add_events(Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK |      add_events(Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK |
79                 Gdk::POINTER_MOTION_MASK | Gdk::POINTER_MOTION_HINT_MASK);                 Gdk::POINTER_MOTION_MASK | Gdk::POINTER_MOTION_HINT_MASK);
80    
81      dimensionManager.articulation_changed_signal.connect(      dimensionManager.region_to_be_changed_signal.connect(
82          sigc::mem_fun(*this, &RegionChooser::on_dimension_manager_changed)          region_to_be_changed_signal.make_slot()
83        );
84        dimensionManager.region_changed_signal.connect(
85            region_changed_signal.make_slot()
86        );
87        dimensionManager.region_changed_signal.connect(
88            sigc::hide(
89                sigc::mem_fun(*this, &RegionChooser::on_dimension_manager_changed)
90            )
91      );      );
92  }  }
93    
# Line 117  bool RegionChooser::on_expose_event(GdkE Line 117  bool RegionChooser::on_expose_event(GdkE
117      Glib::RefPtr<const Gdk::GC> black = get_style()->get_black_gc();      Glib::RefPtr<const Gdk::GC> black = get_style()->get_black_gc();
118      Glib::RefPtr<const Gdk::GC> white = get_style()->get_white_gc();      Glib::RefPtr<const Gdk::GC> white = get_style()->get_white_gc();
119    
120        Glib::RefPtr<Pango::Context> context = get_pango_context();
121        Glib::RefPtr<Pango::Layout> layout = Pango::Layout::create(context);
122    
123      window->draw_rectangle(black, false, 0, h1, w, h - 1);      window->draw_rectangle(black, false, 0, h1, w, h - 1);
124      window->draw_rectangle(white, true, 1, h1 + 1, w - 1, h - 2);      gc->set_foreground(grey1);
125        int x1 = int(w * 20.5 / 128.0 + 0.5);
126        int x2 = int(w * 109.5 / 128.0 + 0.5);
127        window->draw_rectangle(gc, true, 1, h1 + 1,
128                               x1 - 1, h - 2);
129        window->draw_rectangle(white, true, x1 + 1, h1 + 1, x2 - x1 - 1, h - 2);
130        window->draw_rectangle(gc, true, x2 + 1, h1 + 1,
131                               w - x2 - 1, h - 2);
132        int octave = -1;
133      for (int i = 0 ; i < 128 ; i++) {      for (int i = 0 ; i < 128 ; i++) {
134          int note = (i + 3) % 12;          int note = (i + 3) % 12;
135          int x = int(w * i / 128.0 + 0.5);          int x = int(w * i / 128.0 + 0.5);
# Line 132  bool RegionChooser::on_expose_event(GdkE Line 143  bool RegionChooser::on_expose_event(GdkE
143          } else if (note == 3 || note == 8) {          } else if (note == 3 || note == 8) {
144              window->draw_line(black, x, h1 + 1, x, h1 + h);              window->draw_line(black, x, h1 + 1, x, h1 + h);
145          }          }
146            if (note == 3) {
147                char buf[30];
148                sprintf(buf, "<span size=\"8000\">%d</span>", octave);
149                layout->set_markup(buf);
150                Pango::Rectangle rectangle = layout->get_logical_extents();
151                double text_w = double(rectangle.get_width()) / Pango::SCALE;
152                double text_h = double(rectangle.get_height()) / Pango::SCALE;
153                double x2 = w * (i + 0.75) / 128.0;
154                window->draw_layout(black, int(x2 - text_w / 2 + 1),
155                                    int(h1 + h - text_h + 0.5), layout);
156                octave++;
157            }
158      }      }
159    
160      if (instrument) {      if (instrument) {
161          int i = 0;          int i = 0;
162          gig::Region *nextRegion;          gig::Region *next_region;
163          int x3 = -1;          int x3 = -1;
164          for (gig::Region *r = instrument->GetFirstRegion() ;          for (gig::Region *r = instrument->GetFirstRegion() ;
165               r ;               r ;
166               r = nextRegion) {               r = next_region) {
167    
168              if (x3 < 0) x3 = int(w * (r->KeyRange.low) / 128.0 + 0.5);              if (x3 < 0) x3 = int(w * (r->KeyRange.low) / 128.0 + 0.5);
169              nextRegion = instrument->GetNextRegion();              next_region = instrument->GetNextRegion();
170              if (!nextRegion || r->KeyRange.high + 1 != nextRegion->KeyRange.low) {              if (!next_region || r->KeyRange.high + 1 != next_region->KeyRange.low) {
171                  int x2 = int(w * (r->KeyRange.high + 1) / 128.0 + 0.5);                  int x2 = int(w * (r->KeyRange.high + 1) / 128.0 + 0.5);
172                  window->draw_line(black, x3, 0, x2, 0);                  window->draw_line(black, x3, 0, x2, 0);
173                  window->draw_line(black, x3, h1 - 1, x2, h1 - 1);                  window->draw_line(black, x3, h1 - 1, x2, h1 - 1);
# Line 234  bool RegionChooser::on_button_release_ev Line 257  bool RegionChooser::on_button_release_ev
257    
258          if (resize.mode == resize.moving_high_limit) {          if (resize.mode == resize.moving_high_limit) {
259              if (resize.region->KeyRange.high != resize.pos - 1) {              if (resize.region->KeyRange.high != resize.pos - 1) {
260                  resize.region->KeyRange.high = resize.pos - 1;                  instrument_struct_to_be_changed_signal.emit(instrument);
261                  instrument_changed();                  resize.region->SetKeyRange(
262                        resize.region->KeyRange.low, // low
263                        resize.pos - 1 // high
264                    );
265                    instrument_changed.emit();
266                    instrument_struct_changed_signal.emit(instrument);
267              }              }
268          } else if (resize.mode == resize.moving_low_limit) {          } else if (resize.mode == resize.moving_low_limit) {
269              if (resize.region->KeyRange.low != resize.pos) {              if (resize.region->KeyRange.low != resize.pos) {
270                  resize.region->KeyRange.low = resize.pos;                  instrument_struct_to_be_changed_signal.emit(instrument);
271                  instrument_changed();                  resize.region->SetKeyRange(
272                        resize.pos, // low
273                        resize.region->KeyRange.high // high
274                    );
275                    instrument_changed.emit();
276                    instrument_struct_changed_signal.emit(instrument);
277              }              }
278          }          }
279    
# Line 248  bool RegionChooser::on_button_release_ev Line 281  bool RegionChooser::on_button_release_ev
281              get_window()->set_cursor();              get_window()->set_cursor();
282              cursor_is_resize = false;              cursor_is_resize = false;
283          }          }
284        } else if (move.active) {
285            get_window()->pointer_ungrab(event->time);
286            move.active = false;
287    
288            if (move.pos) {
289                instrument_struct_to_be_changed_signal.emit(instrument);
290                region->SetKeyRange(
291                    region->KeyRange.low  + move.pos,
292                    region->KeyRange.high + move.pos
293                );
294                instrument_struct_changed_signal.emit(instrument);
295            }
296    
297            if (is_in_resize_zone(event->x, event->y)) {
298                get_window()->set_cursor(Gdk::Cursor(Gdk::SB_H_DOUBLE_ARROW));
299                cursor_is_resize = true;
300            }
301      }      }
302      return true;      return true;
303  }  }
# Line 271  bool RegionChooser::on_button_press_even Line 321  bool RegionChooser::on_button_press_even
321          }          }
322      } else {      } else {
323          if (is_in_resize_zone(event->x, event->y)) {          if (is_in_resize_zone(event->x, event->y)) {
             Gdk::Cursor double_arrow(Gdk::SB_H_DOUBLE_ARROW);  
324              get_window()->pointer_grab(false,              get_window()->pointer_grab(false,
325                                         Gdk::BUTTON_RELEASE_MASK |                                         Gdk::BUTTON_RELEASE_MASK |
326                                         Gdk::POINTER_MOTION_MASK |                                         Gdk::POINTER_MOTION_MASK |
327                                         Gdk::POINTER_MOTION_HINT_MASK,                                         Gdk::POINTER_MOTION_HINT_MASK,
328                                         double_arrow, event->time);                                         Gdk::Cursor(Gdk::SB_H_DOUBLE_ARROW), event->time);
329              resize.active = true;              resize.active = true;
330          } else {          } else {
331              gig::Region* r = get_region(k);              gig::Region* r = get_region(k);
# Line 284  bool RegionChooser::on_button_press_even Line 333  bool RegionChooser::on_button_press_even
333                  region = r;                  region = r;
334                  queue_draw();                  queue_draw();
335                  region_selected();                  region_selected();
336    
337                    get_window()->pointer_grab(false,
338                                               Gdk::BUTTON_RELEASE_MASK |
339                                               Gdk::POINTER_MOTION_MASK |
340                                               Gdk::POINTER_MOTION_HINT_MASK,
341                                               Gdk::Cursor(Gdk::FLEUR), event->time);
342                    move.active = true;
343                    move.from_x = event->x;
344                    move.pos = 0;
345              }              }
346          }          }
347      }      }
# Line 292  bool RegionChooser::on_button_press_even Line 350  bool RegionChooser::on_button_press_even
350    
351  gig::Region* RegionChooser::get_region(int key)  gig::Region* RegionChooser::get_region(int key)
352  {  {
353        gig::Region* prev_region = 0;
354        gig::Region* next_region;
355      for (gig::Region *r = instrument->GetFirstRegion() ; r ;      for (gig::Region *r = instrument->GetFirstRegion() ; r ;
356           r = instrument->GetNextRegion()) {           r = next_region) {
357            next_region = instrument->GetNextRegion();
358    
359          if (key < r->KeyRange.low) return 0;          if (key < r->KeyRange.low) return 0;
360          if (key <= r->KeyRange.high) return r;          if (key <= r->KeyRange.high) {
361                move.touch_left = prev_region && prev_region->KeyRange.high + 1 == r->KeyRange.low;
362                move.touch_right = next_region && r->KeyRange.high + 1 == next_region->KeyRange.low;
363                return r;
364            }
365            prev_region = r;
366      }      }
367      return 0;      return 0;
368  }  }
369    
370  bool RegionChooser::on_motion_notify_event(GdkEventMotion* event)  void RegionChooser::motion_resize_region(int x, int y)
371  {  {
372      const int w = width - 1;      const int w = width - 1;
373      Glib::RefPtr<Gdk::Window> window = get_window();      Glib::RefPtr<Gdk::Window> window = get_window();
     int x, y;  
     Gdk::ModifierType state = Gdk::ModifierType(0);  
     window->get_pointer(x, y, state);  
     if (resize.active) {  
         int k = int(double(x) / w * 128.0 + 0.5);  
374    
375          if (k < resize.min) k = resize.min;      int k = int(double(x) / w * 128.0 + 0.5);
         else if (k > resize.max) k = resize.max;  
376    
377          if (k != resize.pos) {      if (k < resize.min) k = resize.min;
378              if (resize.mode == resize.undecided) {      else if (k > resize.max) k = resize.max;
379                  if (k < resize.pos) {  
380                      // edit high limit of prev_region      if (k != resize.pos) {
381                      resize.max = resize.region->KeyRange.low;          if (resize.mode == resize.undecided) {
382                      resize.region = resize.prev_region;              if (k < resize.pos) {
383                      resize.mode = resize.moving_high_limit;                  // edit high limit of prev_region
384                  } else {                  resize.max = resize.region->KeyRange.low;
385                      // edit low limit of region                  resize.region = resize.prev_region;
386                      resize.min = resize.prev_region->KeyRange.high + 1;                  resize.mode = resize.moving_high_limit;
387                      resize.mode = resize.moving_low_limit;              } else {
388                  }                  // edit low limit of region
389                    resize.min = resize.prev_region->KeyRange.high + 1;
390                    resize.mode = resize.moving_low_limit;
391                }
392            }
393            Glib::RefPtr<const Gdk::GC> black = get_style()->get_black_gc();
394            Glib::RefPtr<const Gdk::GC> white = get_style()->get_white_gc();
395            if (region == resize.region) {
396                gc->set_foreground(red);
397                white = gc;
398            }
399            Glib::RefPtr<const Gdk::GC> bg = get_style()->get_bg_gc(Gtk::STATE_NORMAL);
400            int prevx = int(w * resize.pos / 128.0 + 0.5);
401            x = int(w * k / 128.0 + 0.5);
402    
403            if (resize.mode == resize.moving_high_limit) {
404                if (k > resize.pos) {
405                    window->draw_rectangle(white, true, prevx, 1, x - prevx, h1 - 2);
406                    window->draw_line(black, prevx, 0, x, 0);
407                    window->draw_line(black, prevx, h1 - 1, x, h1 - 1);
408                } else {
409                    int xx = ((resize.pos == resize.max && resize.max != 128) ? 1 : 0);
410                    window->draw_rectangle(bg, true, x + 1, 0, prevx - x - xx, h1);
411                }
412            } else {
413                if (k < resize.pos) {
414                    window->draw_rectangle(white, true, x + 1, 1, prevx - x, h1 - 2);
415                    window->draw_line(black, x, 0, prevx, 0);
416                    window->draw_line(black, x, h1 - 1, prevx, h1 - 1);
417                } else {
418                    int xx = ((resize.pos == resize.min && resize.min != 0) ? 1 : 0);
419                    window->draw_rectangle(bg, true, prevx + xx, 0, x - prevx - xx, h1);
420              }              }
421              Glib::RefPtr<const Gdk::GC> black = get_style()->get_black_gc();          }
422              Glib::RefPtr<const Gdk::GC> white = get_style()->get_white_gc();          window->draw_line(black, x, 1, x, h1 - 2);
423              if (region == resize.region) {          resize.pos = k;
424                  gc->set_foreground(red);      }
425                  white = gc;  }
426              }  
427              Glib::RefPtr<const Gdk::GC> bg = get_style()->get_bg_gc(Gtk::STATE_NORMAL);  void RegionChooser::motion_move_region(int x, int y)
428              int prevx = int(w * resize.pos / 128.0 + 0.5);  {
429              x = int(w * k / 128.0 + 0.5);      const int w = width - 1;
430        Glib::RefPtr<Gdk::Window> window = get_window();
431              if (resize.mode == resize.moving_high_limit) {  
432                  if (k > resize.pos) {      int k = int(double(x - move.from_x) / w * 128.0 + 0.5);
433                      window->draw_rectangle(white, true, prevx, 1, x - prevx, h1 - 2);      if (k == move.pos) return;
434                      window->draw_line(black, prevx, 0, x, 0);      int new_k;
435                      window->draw_line(black, prevx, h1 - 1, x, h1 - 1);      bool new_touch_left;
436        bool new_touch_right;
437        int a = 0;
438        if (k > move.pos) {
439            for (gig::Region* r = instrument->GetFirstRegion() ; ;
440                 r = instrument->GetNextRegion()) {
441                if (r != region) {
442                    int b = r ? r->KeyRange.low : 128;
443    
444                    // gap: from a to b (not inclusive b)
445    
446                    if (region->KeyRange.high + move.pos >= b) {
447                        // not found the current gap yet, just continue
448                  } else {                  } else {
449                      int xx = ((resize.pos == resize.max && resize.max != 128) ? 1 : 0);  
450                      window->draw_rectangle(bg, true, x + 1, 0, prevx - x - xx, h1);                      if (a > region->KeyRange.low + k) {
451                            // this gap is too far to the right, break
452                            break;
453                        }
454    
455                        int newhigh = std::min(region->KeyRange.high + k, b - 1);
456                        int newlo = newhigh - (region->KeyRange.high - region->KeyRange.low);
457    
458                        if (newlo >= a) {
459                            // yes it fits - it's a candidate
460                            new_k = newlo - region->KeyRange.low;
461                            new_touch_left = a > 0 && a == newlo;
462                            new_touch_right = b < 128 && newhigh + 1 == b;
463                        }
464                  }                  }
465              } else {                  if (!r) break;
466                  if (k < resize.pos) {                  a = r->KeyRange.high + 1;
467                      window->draw_rectangle(white, true, x + 1, 1, prevx - x, h1 - 2);              }
468                      window->draw_line(black, x, 0, prevx, 0);          }
469                      window->draw_line(black, x, h1 - 1, prevx, h1 - 1);      } else {
470            for (gig::Region* r = instrument->GetFirstRegion() ; ;
471                 r = instrument->GetNextRegion()) {
472                if (r != region) {
473                    int b = r ? r->KeyRange.low : 128;
474    
475                    // gap from a to b (not inclusive b)
476    
477                    if (region->KeyRange.high + k >= b) {
478                        // not found the current gap yet, just continue
479                  } else {                  } else {
480                      int xx = ((resize.pos == resize.min && resize.min != 0) ? 1 : 0);  
481                      window->draw_rectangle(bg, true, prevx + xx, 0, x - prevx - xx, h1);                      if (a > region->KeyRange.low + move.pos) {
482                            // this gap is too far to the right, break
483                            break;
484                        }
485    
486                        int newlo = std::max(region->KeyRange.low + k, a);
487                        int newhigh = newlo + (region->KeyRange.high - region->KeyRange.low);
488    
489                        if (newhigh < b) {
490                            // yes it fits - break as the first one is the best
491                            new_k = newlo - region->KeyRange.low;
492                            new_touch_left = a > 0 && a == newlo;
493                            new_touch_right = b < 128 && newhigh + 1 == b;
494                            break;
495                        }
496                  }                  }
497                    if (!r) break;
498                    a = r->KeyRange.high + 1;
499              }              }
             window->draw_line(black, x, 1, x, h1 - 2);  
             resize.pos = k;  
500          }          }
501        }
502        k = new_k;
503        if (k == move.pos) return;
504    
505        Glib::RefPtr<const Gdk::GC> bg = get_style()->get_bg_gc(Gtk::STATE_NORMAL);
506        int prevx = int(w * (move.pos + region->KeyRange.low) / 128.0 + 0.5);
507        x = int(w * (k + region->KeyRange.low) / 128.0 + 0.5);
508        int prevx2 = int(w * (move.pos + region->KeyRange.high + 1) / 128.0 + 0.5);
509        int x2 = int(w * (k + region->KeyRange.high + 1) / 128.0 + 0.5);
510        Glib::RefPtr<const Gdk::GC> black = get_style()->get_black_gc();
511        gc->set_foreground(red);
512    
513        if (!new_touch_left) window->draw_line(black, x, 1, x, h1 - 2);
514        if (!new_touch_right) window->draw_line(black, x2, 1, x2, h1 - 2);
515    
516        if (k > move.pos) {
517            window->draw_rectangle(bg, true, prevx + (move.touch_left ? 1 : 0), 0,
518                                   std::min(x, prevx2 + 1 - (move.touch_right ? 1 : 0)) -
519                                   (prevx + (move.touch_left ? 1 : 0)), h1);
520    
521            window->draw_line(black, std::max(x, prevx2 + 1), 0, x2, 0);
522            window->draw_line(black, std::max(x, prevx2 + 1), h1 - 1, x2, h1 - 1);
523            window->draw_rectangle(gc, true, std::max(x + 1, prevx2), 1,
524                                   x2 - std::max(x + 1, prevx2), h1 - 2);
525        } else {
526            window->draw_rectangle(bg, true, std::max(x2 + 1, prevx + (move.touch_left ? 1 : 0)), 0,
527                                   prevx2 + 1 - (move.touch_right ? 1 : 0) -
528                                   std::max(x2 + 1, prevx + (move.touch_left ? 1 : 0)), h1);
529    
530            window->draw_line(black, x, 0, std::min(x2, prevx - 1), 0);
531            window->draw_line(black, x, h1 - 1, std::min(x2, prevx - 1), h1 - 1);
532    
533            window->draw_rectangle(gc, true, x + 1, 1, std::min(x2 - 1, prevx) - x, h1 - 2);
534        }
535    
536        move.pos = k;
537        move.touch_left = new_touch_left;
538        move.touch_right = new_touch_right;
539    }
540    
541    
542    bool RegionChooser::on_motion_notify_event(GdkEventMotion* event)
543    {
544        Glib::RefPtr<Gdk::Window> window = get_window();
545        int x, y;
546        Gdk::ModifierType state = Gdk::ModifierType(0);
547        window->get_pointer(x, y, state);
548    
549        if (resize.active) {
550            motion_resize_region(x, y);
551        } else if (move.active) {
552            motion_move_region(x, y);
553      } else {      } else {
554          if (is_in_resize_zone(x, y)) {          if (is_in_resize_zone(x, y)) {
555              if (!cursor_is_resize) {              if (!cursor_is_resize) {
556                  Gdk::Cursor double_arrow(Gdk::SB_H_DOUBLE_ARROW);                  window->set_cursor(Gdk::Cursor(Gdk::SB_H_DOUBLE_ARROW));
                 window->set_cursor(double_arrow);  
557                  cursor_is_resize = true;                  cursor_is_resize = true;
558              }              }
559          } else if (cursor_is_resize) {          } else if (cursor_is_resize) {
# Line 424  bool RegionChooser::is_in_resize_zone(do Line 615  bool RegionChooser::is_in_resize_zone(do
615      return false;      return false;
616  }  }
617    
618  sigc::signal<void> RegionChooser::signal_region_selected()  sigc::signal<void>& RegionChooser::signal_region_selected()
619  {  {
620      return region_selected;      return region_selected;
621  }  }
622    
623  sigc::signal<void> RegionChooser::signal_instrument_changed()  sigc::signal<void>& RegionChooser::signal_instrument_changed()
624  {  {
625      return instrument_changed;      return instrument_changed;
626  }  }
# Line 461  void RegionChooser::show_region_properti Line 652  void RegionChooser::show_region_properti
652    
653  void RegionChooser::add_region()  void RegionChooser::add_region()
654  {  {
655      gig::Region* r;      instrument_struct_to_be_changed_signal.emit(instrument);
     for (r = instrument->GetFirstRegion() ; r ; r = instrument->GetNextRegion()) {  
         if (r->KeyRange.low > new_region_pos) break;  
     }  
656    
657      region = instrument->AddRegion();      region = instrument->AddRegion();
658      region->KeyRange.low = region->KeyRange.high = new_region_pos;      region->SetKeyRange(new_region_pos, new_region_pos);
659    
660        instrument_struct_changed_signal.emit(instrument);
661    
     instrument->MoveRegion(region, r);  
662      queue_draw();      queue_draw();
663      region_selected();      region_selected();
664      instrument_changed();      instrument_changed();
# Line 477  void RegionChooser::add_region() Line 666  void RegionChooser::add_region()
666    
667  void RegionChooser::delete_region()  void RegionChooser::delete_region()
668  {  {
669        instrument_struct_to_be_changed_signal.emit(instrument);
670      instrument->DeleteRegion(region);      instrument->DeleteRegion(region);
671        instrument_struct_changed_signal.emit(instrument);
672    
673      region = 0;      region = 0;
674      queue_draw();      queue_draw();
675      region_selected();      region_selected();
# Line 495  void RegionChooser::on_dimension_manager Line 687  void RegionChooser::on_dimension_manager
687      region_selected();      region_selected();
688      instrument_changed();      instrument_changed();
689  }  }
690    
691    sigc::signal<void, gig::Instrument*>& RegionChooser::signal_instrument_struct_to_be_changed() {
692        return instrument_struct_to_be_changed_signal;
693    }
694    
695    sigc::signal<void, gig::Instrument*>& RegionChooser::signal_instrument_struct_changed() {
696        return instrument_struct_changed_signal;
697    }
698    
699    sigc::signal<void, gig::Region*>& RegionChooser::signal_region_to_be_changed() {
700        return region_to_be_changed_signal;
701    }
702    
703    sigc::signal<void, gig::Region*>& RegionChooser::signal_region_changed_signal() {
704        return region_changed_signal;
705    }

Legend:
Removed from v.1261  
changed lines
  Added in v.1411

  ViewVC Help
Powered by ViewVC