X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fmolecule.hh;h=ddb3190f0a7ed5fd5f30b8e33d1150726c6114ea;hb=7e72a1e50e94a7f9738d62599de79fe7745f600c;hp=9d9ac24b942f46eb3b4aa47a59d43cfc26078dd0;hpb=e166ef4d795f43bcdff1f04162d17c2d8c7a9302;p=lilypond.git diff --git a/lily/include/molecule.hh b/lily/include/molecule.hh index 9d9ac24b94..ddb3190f0a 100644 --- a/lily/include/molecule.hh +++ b/lily/include/molecule.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1997--2002 Han-Wen Nienhuys + (c) 1997--2004 Han-Wen Nienhuys */ #ifndef MOLECULE_HH #define MOLECULE_HH @@ -39,7 +39,10 @@ init the molecule, we assume that DIMENSIONS = (Interval (0,0),Interval (0,0) */ -class Molecule { +class Molecule +{ + friend SCM ly_molecule_set_extent_x (SCM, SCM, SCM); + Box dim_; SCM expr_; @@ -55,19 +58,11 @@ public: /** Set dimensions to empty, or to (Interval (0,0),Interval (0,0) */ void set_empty (bool); - void add_at_edge (Axis a, Direction d, const Molecule &m, Real padding); + void add_at_edge (Axis a, Direction d, const Molecule &m, Real padding, + Real minimum); void add_molecule (Molecule const &m); void translate (Offset); - - /** - align D direction in axis A. - - If D == CENTER, then move the dimension (A).center () to (0,0) - - Else, move so dimension (A)[D] == 0.0 - - */ - void align_to (Axis a, Direction d); + void align_to (Axis a, Real x); void translate_axis (Real,Axis); Interval extent (Axis) const; @@ -76,7 +71,7 @@ public: codify THIS into a Scheme expression. */ SCM create_scheme () const; - bool empty_b () const; + bool is_empty () const; static SCM ly_get_molecule_extent (SCM mol, SCM axis); @@ -86,7 +81,7 @@ public: DECLARE_UNSMOB(Molecule,molecule); -SCM fontify_atom (Font_metric*, SCM atom); +SCM fontify_atom (Font_metric const*, SCM atom); Molecule create_molecule (SCM brew_molecule);