X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Ftie-configuration.hh;h=5586ac910a86fd963abb077a14f45802141b5bf9;hb=a6bd229f7fe1dc4a03478e14ccc0c0c66b225061;hp=f3add86fd5eece68024e637319797e9371d633d7;hpb=ac65bf686db14f9032da28c60c523e109707a12e;p=lilypond.git diff --git a/lily/include/tie-configuration.hh b/lily/include/tie-configuration.hh index f3add86fd5..5586ac910a 100644 --- a/lily/include/tie-configuration.hh +++ b/lily/include/tie-configuration.hh @@ -1,36 +1,58 @@ /* - tie-configuration.hh -- declare Tie_configuration + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 2005--2010 Han-Wen Nienhuys - (c) 2005 Han-Wen Nienhuys + 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 TIE_CONFIGURATION_HH #define TIE_CONFIGURATION_HH -#include "lily-proto.hh" #include "direction.hh" #include "interval.hh" -#include "compare.hh" -#include "array.hh" +#include "std-vector.hh" +#include "main.hh" // DEBUG_SLUR_SCORING class Tie_configuration { +#if DEBUG_SLUR_SCORING + string score_card_; +#endif + Real score_; + bool scored_; + friend class Tie_formatting_problem; + public: + Real score () const { return score_; } + string card () const { return score_card_; } + int position_; Direction dir_; Real delta_y_; - + Drul_array column_ranks_; + /* computed. */ Interval attachment_x_; - + + void add_score (Real, string); Tie_configuration (); void center_tie_vertically (Tie_details const &); Bezier get_transformed_bezier (Tie_details const &) const; Bezier get_untransformed_bezier (Tie_details const &) const; Real height (Tie_details const&) const; + int column_span_length () const; static int compare (Tie_configuration const &a, Tie_configuration const &b); @@ -40,7 +62,25 @@ public: INSTANTIATE_COMPARE (Tie_configuration, Tie_configuration::compare); -typedef Array Ties_configuration; +class Ties_configuration : public vector +{ + Real score_; + string score_card_; + bool scored_; + vector tie_score_cards_; + + friend class Tie_formatting_problem; +public: + Ties_configuration (); + void add_score (Real amount, string description); + void add_tie_score (Real amount, int i, string description); + Real score () const; + void reset_score (); + string card () const; + string tie_card (int i) const { return tie_score_cards_[i]; } + string complete_tie_card (vsize i) const; + string complete_score_card () const; +}; #endif /* TIE_CONFIGURATION_HH */