X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fmolecule.hh;h=eedacf62a9fd1c9f01de291b6f171b6b306059cb;hb=fd58a98a46a3def26b80a895f1f7b81c92590fc3;hp=41eb304160eea9bb66c784634e4db1b5da2ea353;hpb=94189ec2b8da6d7e89dc619c646a927adead9b19;p=lilypond.git diff --git a/lily/include/molecule.hh b/lily/include/molecule.hh index 41eb304160..eedacf62a9 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--2001 Han-Wen Nienhuys + (c) 1997--2003 Han-Wen Nienhuys */ #ifndef MOLECULE_HH #define MOLECULE_HH @@ -37,38 +37,32 @@ Empty molecules have empty dimensions. If add_at_edge is used to init the molecule, we assume that - DIMENSIONS = (Interval(0,0),Interval(0,0) + 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_; - - DECLARE_SIMPLE_SMOBS(Molecule,); + DECLARE_SIMPLE_SMOBS (Molecule,); public: Molecule (Box, SCM s); - Molecule(); + Molecule (); SCM smobbed_copy () const; SCM get_expr () const; /** - Set dimensions to empty, or to (Interval(0,0),Interval(0,0) */ + 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; @@ -77,7 +71,7 @@ public: codify THIS into a Scheme expression. */ SCM create_scheme () const; - bool empty_b() const; + bool empty_b () const; static SCM ly_get_molecule_extent (SCM mol, SCM axis); @@ -86,8 +80,8 @@ public: }; -Molecule *unsmob_molecule (SCM); -SCM fontify_atom (Font_metric*, SCM atom); +DECLARE_UNSMOB(Molecule,molecule); +SCM fontify_atom (Font_metric const*, SCM atom); Molecule create_molecule (SCM brew_molecule);