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

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

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

revision 2991 by schoenebeck, Sat Sep 24 15:08:37 2016 UTC revision 3177 by schoenebeck, Thu May 11 20:59:46 2017 UTC
# Line 1  Line 1 
1  /*                                                         -*- c++ -*-  /*                                                         -*- c++ -*-
2   * Copyright (C) 2006-2015 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 20  Line 20 
20  #ifndef GIGEDIT_DIMREGIONEDIT_H  #ifndef GIGEDIT_DIMREGIONEDIT_H
21  #define GIGEDIT_DIMREGIONEDIT_H  #define GIGEDIT_DIMREGIONEDIT_H
22    
23  #include <gig.h>  #ifdef LIBGIG_HEADER_FILE
24    # include LIBGIG_HEADER_FILE(gig.h)
25    #else
26    # include <gig.h>
27    #endif
28    
29  #include <cairomm/context.h>  #include <cairomm/context.h>
30  #include <gtkmm/box.h>  #include <gtkmm/box.h>
# Line 33  Line 37 
37  #include <set>  #include <set>
38    
39  #include "paramedit.h"  #include "paramedit.h"
40    #include "global.h"
41    
42  class VelocityCurve : public Gtk::DrawingArea {  class VelocityCurve : public Gtk::DrawingArea {
43  public:  public:
# Line 94  protected: Line 99  protected:
99      sigc::signal<void> instrument_changed;      sigc::signal<void> instrument_changed;
100      sigc::signal<void, gig::Sample*> select_sample_signal;      sigc::signal<void, gig::Sample*> select_sample_signal;
101    
102        /**
103         * Ensures that the 2 signals DimRegionEdit::dimreg_to_be_changed_signal and
104         * DimRegionEdit::dimreg_changed_signal are always triggered correctly as a
105         * pair. It behaves similar to a "mutex lock guard" design pattern.
106         */
107        class DimRegionChangeGuard : public SignalGuard<gig::DimensionRegion*> {
108        public:
109            DimRegionChangeGuard(DimRegionEdit* edit, gig::DimensionRegion* pDimReg) :
110                SignalGuard<gig::DimensionRegion*>(edit->dimreg_to_be_changed_signal, edit->dimreg_changed_signal, pDimReg)
111            {
112            }
113        };
114    
115      gig::DimensionRegion* dimregion;      gig::DimensionRegion* dimregion;
116    
117  #ifdef OLD_TOOLTIPS  #ifdef OLD_TOOLTIPS
# Line 286  protected: Line 304  protected:
304              for (std::set<gig::DimensionRegion*>::iterator i = dimregs.begin() ;              for (std::set<gig::DimensionRegion*>::iterator i = dimregs.begin() ;
305                   i != dimregs.end() ; ++i)                   i != dimregs.end() ; ++i)
306              {              {
307                  dimreg_changed_signal(*i);                  DimRegionChangeGuard(this, *i);
308                  setter(this, *i, value);                  setter(this, *i, value);
309              }              }
310          }          }

Legend:
Removed from v.2991  
changed lines
  Added in v.3177

  ViewVC Help
Powered by ViewVC