]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/text-item.hh
* lily/text-item.cc (text_to_molecule): new function
[lilypond.git] / lily / include / text-item.hh
index 536fbd86eff2c7842dc909081c5d3346ff854e60..70a7609d21144fb1fb94e1f1ae17101c2cbae084 100644 (file)
@@ -1,36 +1,33 @@
-/*
-  text-item.hh -- part of GNU LilyPond
+/*   
+  text-item.hh -- declare Text_item
 
-  (c) 1996--1998 Han-Wen Nienhuys
-*/
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1998--2002 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  Jan Nieuwenhuizen <janneke@gnu.org>
+ */
 
-#ifndef TEXT_ITEM_HH
-#define TEXT_ITEM_HH
+#ifndef TEXT_ITEM
+#define TEXT_ITEM
 
-#include "text-def.hh"
-#include "item.hh"
-#include "staff-side.hh"
 
-/**
-  print a fixed width text above or below the staff.
- */
-class Text_item : public Item ,public Staff_side
+#include "lily-proto.hh"
+#include "lily-guile.hh"
+#include "molecule.hh"
+
+class Text_item
 {
 public:
-    /// do I have width?
-    bool fat_b_;
-
-  Text_item (General_script_def* ,Direction dir=CENTER);
-    General_script_def* tdef_p_;
-
-protected:
-    virtual ~Text_item ();
-    virtual Interval symbol_height () const;
-    virtual Molecule* do_brew_molecule_p () const;
-    virtual void do_pre_processing ();
-    virtual Real get_position_f () const;
+  DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM));
+  DECLARE_SCHEME_CALLBACK (text_to_molecule, (SCM,SCM, SCM));
+  static Molecule text2molecule (Grob *me, SCM text, SCM properties);
+  static Molecule string2molecule (Grob *me, SCM text, SCM properties);
+  static Molecule markup_text2molecule (Grob *me, SCM markup_text, SCM properties);
+  static bool has_interface (Grob*);
+  
+private:
+  static Molecule lookup_character (Grob *me, Font_metric*, SCM char_name);
+  static Molecule lookup_text (Grob *me, Font_metric*, SCM text);
 };
 
-
-#endif // TEXT_HH
-
+#endif /* TEXT_ITEM */