X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fslur-engraver.hh;h=1885625ed91f6d5baca19f3e8f08781f8d35fbf0;hb=c154dcac0e1469911bd38cc7d2df5f5fc47e4982;hp=e69de29bb2d1d6434b8b29ae775ad8c2e48c5391;hpb=6d2a5deed2f5299232641efc67f8806683278aec;p=lilypond.git diff --git a/lily/include/slur-engraver.hh b/lily/include/slur-engraver.hh index e69de29bb2..1885625ed9 100644 --- a/lily/include/slur-engraver.hh +++ b/lily/include/slur-engraver.hh @@ -0,0 +1,75 @@ +/* + This file is part of LilyPond, the GNU music typesetter. + + Copyright (C) 2013--2015 Mike Solomon + Copyright (C) 2016 David Kastrup + + LilyPond 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 3 of the License, or + (at your option) any later version. + + LilyPond 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 LilyPond. If not, see . +*/ + +#ifndef SLUR_ENGRAVER_HH +#define SLUR_ENGRAVER_HH + +#include "engraver.hh" +#include + +class Slur_engraver : public Engraver +{ +protected: + struct Event_info { + Stream_event *slur_, *note_; + Event_info (Stream_event *slur, Stream_event *note) + : slur_ (slur), note_ (note) + { } + }; + // protected so that subclasses can see them + vector start_events_; + vector stop_events_; + + typedef std::multimap Note_slurs; + Drul_array note_slurs_; + vector slurs_; + vector end_slurs_; + vector objects_to_acknowledge_; + + virtual SCM event_symbol () const; + virtual bool double_property () const; + virtual SCM grob_symbol () const; + virtual const char* object_name () const; + + void acknowledge_note_column (Grob_info); + void acknowledge_script (Grob_info); + + void listen_note (Stream_event *ev); + // A slur on an in-chord note is not actually announced as an event + // but rather produced by the note listener. + void listen_note_slur (Stream_event *ev, Stream_event *note); + void listen_slur (Stream_event *ev) { listen_note_slur (ev, 0); } + void acknowledge_extra_object (Grob_info); + void stop_translation_timestep (); + void process_music (); + + bool can_create_slur (SCM, vsize, vsize *, Stream_event *); + void create_slur (SCM spanner_id, Event_info evi, Grob *g_cause, Direction dir, bool left_broken); + bool try_to_end (Event_info evi); + + virtual void set_melisma (bool); + virtual void finalize (); + virtual void derived_mark () const; + +public: + TRANSLATOR_DECLARATIONS (Slur_engraver); +}; + +#endif // SLUR_ENGRAVER_HH