+++ /dev/null
-#include "pstaff.hh"
-
-struct Linestaff : PStaff {
-
- int nolines;
-
-/****************/
-
- void brew_molecule(Real width);
- Linestaff(int, PScore*);
-};
+++ /dev/null
-
-/*
- swalker.hh -- part of LilyPond
-
- (c) 1996,97 Han-Wen Nienhuys
-*/
-
-#ifndef SWALKER_HH
-#define SWALKER_HH
-
-#include "staff.hh"
-
-struct Staff_walker : public PCursor<Staff_column*> {
- Staff * staff_;
- PScore * pscore_;
-
- int break_status;
-
- /****************/
-
- int priority() const; // Command
- Moment when() const;
- virtual ~Staff_walker();
- Staff_walker(Staff*, PScore*);
- void process() ;
- void process_command(Command *);
- void operator++(int);
- /// every time ++ is called
- virtual void reset()=0;
- virtual void process_requests()=0;
- virtual void do_TYPESET_command(Command*)=0;
- virtual void do_INTERPRET_command(Command*)=0 ;
-private:
- Staff_walker(Staff_walker const&);
-};
-/**
- manage run-time info when walking staffcolumns such as: key,
- meter, pending beams & slurs
- */
-
-#endif // SWALKER_HH
-
+++ /dev/null
-#include "linestaff.hh"
-#include "molecule.hh"
-#include "symbol.hh"
-#include "lookup.hh"
-#include "dimen.hh"
-#include "paper.hh"
-#include "pscore.hh"
-
-Linestaff::Linestaff(int l, PScore *s)
- : PStaff(s)
-{
- nolines = l;
-}
-
-void
-Linestaff::brew_molecule(Real width)
-{
- Atom a = pscore_l_->paper_l_->lookup_p_->linestaff(nolines,width);
- stafsym_p_ = new Molecule(a);
-}
-
-
-
-
-
-
-
+++ /dev/null
-#include "request.hh"
-#include "swalker.hh"
-#include "stcol.hh"
-#include "sccol.hh"
-
-Staff_walker::~Staff_walker() {}
-Staff_walker::Staff_walker(Staff_walker const &s)
- :PCursor<Staff_column*> (s)
-{
- assert(false);
-}
-
-Staff_walker::Staff_walker(Staff * s, PScore*ps )
- : PCursor<Staff_column*> (s->cols)
-{
- staff_ = s;
- pscore_ = ps;
- break_status = BREAK_END - BREAK_PRE;
-}
-
-Moment
-Staff_walker::when() const
-{
- return (* (PCursor<Staff_column*> *) this)->when();
-}
-
-void
-Staff_walker::process()
-{
- break_status = BREAK_END - BREAK_PRE;
- if (ptr()->staff_commands_p_)
- for (iter_top(*ptr()->staff_commands_p_,i); i.ok(); i++) {
- process_command(i);
- }
-
- process_requests();
-}
-
-
-void
-Staff_walker::process_command(Command*com)
-{
- switch (com->code){
- case BREAK_PRE:
- case BREAK_MIDDLE:
- case BREAK_POST:
- case BREAK_END:
- (*this)->score_column_l_->set_breakable();
- break_status = com->code- BREAK_PRE;
- break;
- case INTERPRET:
- do_INTERPRET_command(com);
- break;
-
- case TYPESET:
- do_TYPESET_command(com);
- break;
-
- default :
- break;
- }
-}
-
-void
-Staff_walker::operator++(int i)
-{
- PCursor<Staff_column*>::operator++(i);
- reset();
-}