/*
- tie-formatting-problem.hh -- declare Tie_formatting_problem
+ This file is part of LilyPond, the GNU music typesetter.
- source file of the GNU LilyPond music typesetter
+ Copyright (C) 2005--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
- (c) 2005--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ 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 <http://www.gnu.org/licenses/>.
*/
#ifndef TIE_FORMATTING_PROBLEM_HH
#include <set>
typedef map< Tuple<int,4>, Tie_configuration *> Tie_configuration_map;
+
struct Tie_configuration_variation
{
- int index_;
- Tie_configuration *suggestion_;
- Tie_configuration_variation ();
+ vector<pair<int, Tie_configuration *> > index_suggestion_pairs_;
+ void add_suggestion(int index, Tie_configuration* suggestion)
+ {
+ index_suggestion_pairs_.push_back (make_pair (index, suggestion));
+ }
};
typedef map < Tuple<int, 2>, Skyline> Chord_outline_map;
typedef map < Tuple<int, 2>, Box> Column_extent_map;
typedef map <int, Slice> Position_extent_map;
+
class Tie_formatting_problem
{
Chord_outline_map chord_outlines_;
set<int> dot_positions_;
Interval dot_x_;
vector<Tie_specification> specifications_;
+ bool use_horizontal_spacing_;
Tie_configuration_map possibilities_;
Grob *x_refpoint_;
+ Grob *y_refpoint_;
Tie_configuration *get_configuration (int position, Direction dir, Drul_array<int> cols, bool tune_y) const;