diff options
author | David Robillard <d@drobilla.net> | 2009-02-17 02:19:16 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-02-17 02:19:16 +0000 |
commit | b857756f6034f1d9baf4181e824a5166dfd1acc8 (patch) | |
tree | c02fd83c02887a459a52dc49641f94c140889f24 /gtk2_ardour | |
parent | 022818b4a796f52c0a91eea42e65aec0bc7bed43 (diff) |
Remove unnecessary/unused template parameter from canvas sysex flags.
Add license headers to canvas sysex files (tsk, tsk).
git-svn-id: svn://localhost/ardour2/branches/3.0@4610 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/canvas-sysex.cc | 45 | ||||
-rw-r--r-- | gtk2_ardour/canvas-sysex.h | 38 | ||||
-rw-r--r-- | gtk2_ardour/midi_region_view.cc | 10 | ||||
-rw-r--r-- | gtk2_ardour/midi_region_view.h | 2 |
4 files changed, 59 insertions, 36 deletions
diff --git a/gtk2_ardour/canvas-sysex.cc b/gtk2_ardour/canvas-sysex.cc index 1e110e52fa..db93b61050 100644 --- a/gtk2_ardour/canvas-sysex.cc +++ b/gtk2_ardour/canvas-sysex.cc @@ -1,3 +1,22 @@ +/* + Copyright (C) 2009 Paul Davis + Author: Hans Baier + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + #include <iostream> #include "ardour_ui.h" @@ -7,15 +26,13 @@ using namespace Gnome::Canvas; using namespace std; -template<typename Time> -CanvasSysEx<Time>::CanvasSysEx( - MidiRegionView& region, - Group& parent, - string& text, - double height, - double x, - double y - ) +CanvasSysEx::CanvasSysEx( + MidiRegionView& region, + Group& parent, + string& text, + double height, + double x, + double y) : CanvasFlag( region, parent, @@ -23,20 +40,17 @@ CanvasSysEx<Time>::CanvasSysEx( ARDOUR_UI::config()->canvasvar_MidiSysExOutline.get(), ARDOUR_UI::config()->canvasvar_MidiSysExFill.get(), x, - y - ) + y) { set_text(text); } -template<typename Time> -CanvasSysEx<Time>::~CanvasSysEx() +CanvasSysEx::~CanvasSysEx() { } -template<typename Time> bool -CanvasSysEx<Time>::on_event(GdkEvent* ev) +CanvasSysEx::on_event(GdkEvent* ev) { switch (ev->type) { case GDK_BUTTON_PRESS: @@ -60,4 +74,3 @@ CanvasSysEx<Time>::on_event(GdkEvent* ev) return false; } -template class CanvasSysEx<double>; diff --git a/gtk2_ardour/canvas-sysex.h b/gtk2_ardour/canvas-sysex.h index 97c99bb5aa..e69581a061 100644 --- a/gtk2_ardour/canvas-sysex.h +++ b/gtk2_ardour/canvas-sysex.h @@ -1,35 +1,49 @@ +/* + Copyright (C) 2009 Paul Davis + Author: Hans Baier + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + #ifndef CANVAS_SYSEX_H_ #define CANVAS_SYSEX_H_ #include "canvas-flag.h" -#include <evoral/MIDIEvent.hpp> class MidiRegionView; namespace Gnome { namespace Canvas { -template<typename Time> class CanvasSysEx : public CanvasFlag { public: CanvasSysEx( - MidiRegionView& region, - Group& parent, - string& text, - double height, - double x, - double y); + MidiRegionView& region, + Group& parent, + string& text, + double height, + double x, + double y); virtual ~CanvasSysEx(); virtual bool on_event(GdkEvent* ev); - - -private: }; } // namespace Canvas } // namespace Gnome -#endif /*CANVAS_SYSEX_H_*/ +#endif /* CANVAS_SYSEX_H_ */ diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc index 75bb93d200..bb46a3d098 100644 --- a/gtk2_ardour/midi_region_view.cc +++ b/gtk2_ardour/midi_region_view.cc @@ -628,7 +628,7 @@ MidiRegionView::display_program_changes() void MidiRegionView::display_sysexes() { - for(MidiModel::SysExes::const_iterator i = _model->sysexes().begin(); i != _model->sysexes().end(); ++i) { + for (MidiModel::SysExes::const_iterator i = _model->sysexes().begin(); i != _model->sysexes().end(); ++i) { ARDOUR::MidiModel::TimeType time = (*i)->time(); assert(time >= 0); @@ -647,12 +647,8 @@ MidiRegionView::display_sysexes() double height = midi_stream_view()->contents_height(); - boost::shared_ptr<CanvasSysEx<ARDOUR::MidiModel::TimeType> > sysex = - boost::shared_ptr<CanvasSysEx<ARDOUR::MidiModel::TimeType> >( - new CanvasSysEx<ARDOUR::MidiModel::TimeType>(*this, *group, - text, - height, - x, 1.0)); + boost::shared_ptr<CanvasSysEx> sysex = boost::shared_ptr<CanvasSysEx>( + new CanvasSysEx(*this, *group, text, height, x, 1.0)); // Show unless program change is beyond the region bounds if (time - _region->start() >= _region->length() || time < _region->start()) { diff --git a/gtk2_ardour/midi_region_view.h b/gtk2_ardour/midi_region_view.h index 4a2fade447..7ee07de02f 100644 --- a/gtk2_ardour/midi_region_view.h +++ b/gtk2_ardour/midi_region_view.h @@ -313,7 +313,7 @@ class MidiRegionView : public RegionView typedef std::vector<ArdourCanvas::CanvasNoteEvent*> Events; typedef std::vector< boost::shared_ptr<ArdourCanvas::CanvasProgramChange> > PgmChanges; - typedef std::vector< boost::shared_ptr<ArdourCanvas::CanvasSysEx<ARDOUR::MidiModel::TimeType> > > SysExes; + typedef std::vector< boost::shared_ptr<ArdourCanvas::CanvasSysEx> > SysExes; boost::shared_ptr<ARDOUR::MidiModel> _model; Events _events; |