]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.9
authorfred <fred>
Tue, 12 Nov 1996 00:30:55 +0000 (00:30 +0000)
committerfred <fred>
Tue, 12 Nov 1996 00:30:55 +0000 (00:30 +0000)
Make.variables [new file with mode: 0644]
src/item.cc [new file with mode: 0644]

diff --git a/Make.variables b/Make.variables
new file mode 100644 (file)
index 0000000..3d83d00
--- /dev/null
@@ -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 (file)
index 0000000..914c924
--- /dev/null
@@ -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_;
+}
+