String type;
Bar(String type);
- void preprocess();
+
+ Molecule*brew_molecule()const;
};
#endif // BAR_HH
#include "glob.hh"
#include "boxes.hh"
#include "string.hh"
-
+#include "staffelem.hh"
+
+
/// a horizontally fixed size element of the score
-struct Item {
+struct Item : Staff_elem {
/// indirection to the column it is in
PCol * pcol_;
- /// indirection to the pstaff it is in
- PStaff *pstaff_;
-
- /// member: the symbols
- Molecule *output;
-
- ///
- Offset offset_;
- /**
- This is needed, because #output# may still be
- NULL.
- */
/****************/
-
- void translate(Offset);
-
- /// do calculations after determining horizontal spacing
- virtual void postprocess();
-
- /// do calculations before determining horizontal spacing
- virtual void preprocess();
- /**
- This is executed directly after the item is added to the
- PScore
- */
- virtual Interval width() const;
- virtual Interval height() const;
- String TeXstring () const ;
Item();
void print()const;
- virtual ~Item();
- Paperdef *paper() const;
};
/** Item is the datastructure for printables whose width is known
before the spacing is calculated
--- /dev/null
+/*
+ script.hh -- part of LilyPond
+
+ (c) 1996 Han-Wen Nienhuys
+*/
+
+#ifndef SCRIPT_HH
+#define SCRIPT_HH
+
+#include "scriptdef.hh"
+#include "item.hh"
+
+struct Script : Item{
+ int dir;
+ int symdir;
+ int pos;
+ int staffsize;
+ Script_def*specs;
+ Stem * stem_;
+ Item * support;
+
+ /****************/
+
+ void set_symdir();
+ void set_default_dir();
+ void set_default_pos();
+
+ Molecule* brew_molecule()const;
+ virtual void do_post_processing();
+ virtual void do_pre_processing();
+ Script(Script_req*, Item*,int,Stem*p=0);
+ virtual Interval width() const;
+};
+
+
+#endif // SCRIPT_HH
+
Clef clef_;
Rhythmic_grouping default_grouping;
Rhythmic_grouping *current_grouping;
-// Real inbar; // whuh?
-
svec<Slur_req*> pending_slur_reqs;
svec<Slur*> pending_slurs;
-
-
-
+
/****************/
virtual void do_TYPESET_command(Command*);
virtual void process_requests();
virtual void reset();
- void do_note(Rhythmic_req*);
+ void do_note(Note_info);
Simple_walker(Simple_staff*);
Simple_column *col();
Simple_staff *staff();
- void do_local_key(Note_req*n);
+ void do_local_key(Note_req*, Notehead*);
int find_slur(const Voice*v);
};
{
type = t;
}
-void
-Bar::preprocess()
+Molecule*
+Bar::brew_molecule()const
{
Symbol s = paper()->lookup_->bar(type);
- output = new Molecule(Atom(s));
+Molecule* output = new Molecule(Atom(s));
+return output;
+
}
{
}
-void
-Meter::preprocess()
+Molecule*
+Meter::brew_molecule()const
{
Symbol s = paper()->lookup_->meter(args);
- output = new Molecule(Atom(s));
+return new Molecule(Atom(s));
}
s = new Bar(com->args[1]);
} else if (type == "METER") {
s = new Meter(arg);
- } else if (type == "CLEF" ||type == "CURRENTCLEF") {
+ } else if (type == "CLEF" || type == "CURRENTCLEF") {
Clef_item * c = new Clef_item;
s = c;
c->change = (type == "CLEF");