From 5087b38980167255b7e4078f72c28a75847773af Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 12 Nov 1996 00:30:55 +0000 Subject: [PATCH] lilypond-0.0.9 --- Make.variables | 71 ++++++++++++++++++++++++++++++++++++++++++++++++ src/item.cc | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 144 insertions(+) create mode 100644 Make.variables create mode 100644 src/item.cc diff --git a/Make.variables b/Make.variables new file mode 100644 index 0000000000..3d83d00ba7 --- /dev/null +++ b/Make.variables @@ -0,0 +1,71 @@ +#### +#### USER CONFIGURABLE +#### + +# speedy +#DEFINES=-DNDEBUG -DNPRINT -O2 + +# lots of debugging info +DEFINES=-g + +# turn off -pipe if linker doesn't support it +EXTRACXXFLAGS=-pipe -Wall -W -pedantic + +#### +#### EN USER CONFIGURABLE part. +#### + +# version info +MAJVER=0 +MINVER=0 +PATCHLEVEL=9 +VERSION=$(MAJVER).$(MINVER).$(PATCHLEVEL) + +# directories +TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi) +OBJECTDIR=objects +HEADERDIR=hdr +CCDIR=src + +vpath %.cc $(CCDIR) +vpath %.hh $(HEADERDIR) +vpath %.y $(CCDIR) +vpath %.l $(CCDIR) +vpath %.o $(OBJECTDIR) + +# +# +include Sources.make +progdocs=$(hdr) $(mycc) +gencc=parser.cc lexer.cc +cc=$(mycc) $(gencc) +obs=$(cc:.cc=.o) + + +#dist +.EXPORT_ALL_VARIABLES: + +DOCDIR=docdir + +PACKAGENAME=lilypond +DNAME=$(PACKAGENAME)-$(VERSION) + +# distribution files. +othersrc=lexer.l parser.y +SCRIPTS=make_version make_patch genheader +IFILES=dimen.tex symbol.ini kortjakje.ly maartje.ly\ + lilyponddefs.tex test.tex .dstreamrc +OFILES=Makefile Make.variables Sources.make COPYING README +DFILES=$(OFILES) $(IFILES) $(SCRIPTS) + +#compiling +LOADLIBES=-L$(FLOWERDIR) -lflower +FLOWERDIR=../flower + +CXXFLAGS=$(DEFINES) -I$(HEADERDIR) -I$(FLOWERDIR) $(EXTRACXXFLAGS) +FLEX=flex +BISON=bison +exe=$(PACKAGENAME) +OUTPUT_OPTION=$< -o $@ +DDIR=$(TOPDIR)/$(DNAME) +SUBDIRS=Documentation $(OBJECTDIR) $(CCDIR) $(HEADERDIR) diff --git a/src/item.cc b/src/item.cc new file mode 100644 index 0000000000..914c924a99 --- /dev/null +++ b/src/item.cc @@ -0,0 +1,73 @@ +#include "pstaff.hh" +#include "pscore.hh" +#include "symbol.hh" +#include "molecule.hh" +#include "pcol.hh" + +void +Item::translate(Offset O) +{ + offset_ += O; +} + +void +Item::postprocess() +{ + // default: do nothing +} + + +void +Item::preprocess() +{ + // default: do nothing +} + +String +Item::TeXstring() const +{ + Item * me = (Item*) this; + output->translate(offset_); // ugh? + me ->offset_ = Offset(0,0); // URRGGH! + return output->TeXstring(); +} + +Interval +Item::width() const +{ + Interval i =output->extent().x ; + return i+=offset_.x; +} + +Interval +Item::height() const +{ + Interval i =output->extent().y; + return i+=offset_.y; +} + +Item::~Item() +{ + delete output; +} + +Item::Item() +{ + pcol_ = 0; + output = 0; + pstaff_ = 0; +} +void +Item::print() const +{ + assert(output); + output->print(); +} + +Paperdef* +Item::paper() const +{ + assert(pstaff_); + return pstaff_->pscore_->paper_; +} + -- 2.39.5