From: no author Date: Fri, 17 Nov 2000 10:31:18 +0000 (+0000) Subject: This commit was manufactured by cvs2svn to create branch 'xsltd'. X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fxsltd;p=helm.git This commit was manufactured by cvs2svn to create branch 'xsltd'. --- diff --git a/helm/DEVEL/.cvsignore b/helm/DEVEL/.cvsignore deleted file mode 100644 index c1fcbc4ae..000000000 --- a/helm/DEVEL/.cvsignore +++ /dev/null @@ -1,7 +0,0 @@ -*.cmo -*.cmx -*.cmi - -*.o -*.a - diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0-1.i386.rpm b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0-1.i386.rpm deleted file mode 100644 index 78f0a3b12..000000000 Binary files a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0-1.i386.rpm and /dev/null differ diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0-1.spec b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0-1.spec deleted file mode 100644 index 4b579e852..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0-1.spec +++ /dev/null @@ -1,25 +0,0 @@ -Summary: LablGTK : an interface to the GIMP Tool Kit for OCaml -Name: lablgtk_20000829 -Version: 0.1.0 -Release: 1 -Copyright: LGPL -Group: Development/Libraries -Source: ftp://ftp.kurims.kyoto-u.ac.jp/pub/lang/olabl/lablgtk-20000829.tar.gz -%description -LablGTK is an interface to the GIMP Tool Kit for OCaml. - -%prep -%setup - -%build -make configure -make -make opt - -%install -make install - -%files -%doc CHANGES COPYING README doc - -/usr/lib/ocaml/lablgtk/ diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0-1.src.rpm b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0-1.src.rpm deleted file mode 100644 index 7ebeed110..000000000 Binary files a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0-1.src.rpm and /dev/null differ diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0.tar.gz b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0.tar.gz deleted file mode 100644 index ba7056f62..000000000 Binary files a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0.tar.gz and /dev/null differ diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/.cvsignore b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/.cvsignore deleted file mode 100644 index da3c3c514..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/.cvsignore +++ /dev/null @@ -1,11 +0,0 @@ -.depend -config.make -var2conv -var2def -lablgtk -lablgtktop -lablgtktop_t -lablgtkrun -*_tags.c -*_tags.h - diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/CHANGES b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/CHANGES deleted file mode 100644 index f5afeefe0..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/CHANGES +++ /dev/null @@ -1,358 +0,0 @@ -$Id$ - -2000.8.29 - * bugs in color selection reported by Nicolas George - * changed the license - -2000.8.21 - * correct GtkStyle.set_font bug reported by Patrick Doane - -2000.7.27 - * changed GUtil.signal and GUtil.variable for better usability - * suppressed obsolete color settings in tooltips - -2000.6.19 - * patch by Michael Welsh for Gdk regions - -2000.6.15 - * add CList.set_cell_style/set_row_style - * change set_usize/set_uposition into set_geometry - * return an option rather than raise an exception for null pointers - * map empty strings to NULL when meaningful - * Gdk.Font.get_type/ascent/descent - -2000.6.14 - * add GDraw.optcolor for functions with a default (Jerome suggested) - -2000.6.8 - * apply Jerome Vouillon's patch - * changes in GtkSignal and GtkArgv.ml - -2000.6.7 - * create #misc#connect for widget generic signals - -2000.6.6 - * move notebook from GMisc to GPack - * #connect#event, #add_event, #misc#event, #misc#set_events_extension - transferred to #event su-bobject. - * #connect#drag -> #drag#connect. - * #get_type, #connect#disconnect, #connect#stop_emit transferred to #misc. - -2000.5.25 - * split misc.ml into gaux.ml and gpointer.ml - -2000.5.23 - * add GMisc.notebook#get_{tab,menu}_label. Rename nth_page to get_nth_page. - * modified ML signals in GUtil, to allow signals without widget. - -2000.5.22 - * Incompatible!: Change default for ~expand in Box.pack, - Pack.build_options, Table.build_options. Now defaults to false/`NONE. - This means that all options default to false/`NONE, except ~show - (true for all widgets except windows) and ~fill (always true but - effect controlled by ~expand). - * add GtkArgv.get_nativeint and GtkArgv.set_nativeint. - * make offset and length optional in GtkArgv.string_at_pointer. - -2000.5.10 - * rename GtkFrame to GtkBin and GFrame to GBin - * move socket to GBin - -2000.5.9 - * add arrow and image classes to GMisc - * add list and set_item_string methods to GEdit.combo - * add socket and plug classes to GContainer and GWindow - * two new examples: combo.ml and socket.ml - -2000.4.28 - * add GUtil.variable - -2000.4.27 - * add GtkXmHTML widget - -2000.4.26 - * release 1.00 - -2000.4.24 - * merge in changes for ocaml 3.00: label and syntax changes, autolink - * added better visual and colormap handling to Gdk - * GdkObj renamed to GDraw, GtkPixmap moved to GMisc - * Initialize Gtk in gtkInit.cmo/cmx, start a thread in gtkInitThread.cmo. - These are only included in toplevels, link them explicitely or call - GMain.Main.init and GtkThread.start otherwise. - * install to caml standard library - * many other forgotten changes... - -2000.3.02 - * move locale setting inside GtkMain.init, since it requires an - X display - -2000.2.24 - * add checks in add methods, to avoid critical errors - -2000.2.23 - * add dcalendar.ml (submitted by Ken Wakita) and csview.ml - * correct bug in GdkObj.pixmap#line - -1999.12.19 - * release lablGTK beta2 - -1999.12.16 - * upgraded unison to version 1.169 - * radio groups are of type {radio_menu_item,radio_button} obj option, - otherwise you could not use them several times - -1999.12.13 - * added GtkEdit::{insert_text,delete_text} signals - * better syntax highlighting and ergonomy in the browser's shell - -1999.11... - * switched to Objective Caml 3 - * constructors are no longer classes, but simple functions - -1999.10.29 - * changed GtkArgv.get_{string,pointer,object} to return option types - -1999.10.27 - * added radtest/CHANGES for cooperative editing on radtest - -1999.10.21 - * added a UI for unison - (ask bcpierce@saul.cis.upenn.edu about how to get unison) - -1999.10.20 - * corrected CList signals - * moved initialization out of the library, in gtkInit.cmo - -1999.10.15 - * release lablGTK beta1 - -1999.10.13 - * improved gtkThread.ml (no timer) - * modify Sys.argv in place (gtkMain.ml) - * add set_row_data and get_row_data for GtkCList - -1999.10.11 - * bugfixes in Makefile, radtest and lv - -1999.10.6 - * added Gdk.X.flush and Gdk.X.beep - * Gdk.X.flush is exported in GtkMain.Main - -1999.9.9 - * added font selection dialog - -1999.8.25 - * re-added connect#draw - -1999.8.10 - * reduced the number of methods in widget - * moved disconnect and stop_emit to object_signals - * moved ?:after to each signal - * more functions in applications/browser - -1999.8.9 - * Major change: created one set_param method by parameter, - rather than grouping them and using options. - You can get previous versions with tag "changing_set" - * corrected examples, radtest and browser for these changes - * a bit of clean-up in radtest (treew.ml and Makefile) - -1999.8.5 - * corrected a bad bug with indirected pointers in caml heap - -1999.7.15 - * add GdkKeysyms for exotic keysyms - -1999.7.14 - * moved Truecolor inside Gdk - * added COPYING - * prepared for release - -1999.7.12 - * clean up drag-and-drop - -1999.7.9 - * corrected bug in Container.children - * added ML signal support in GUtil - -1999.7.6 - * added DnD, improved radtest (Hubert) - * small corrections (Jacques) - -1999.7.1 - * added some gdk functions related window and ximage - * also added applications/lv, "labl image viewer" with - the camlimage library. - (JPF) - -1999.7.1 - * added applications/lablglade (Koji) - -1999.6.28 - * added applications/radtest (Hubert) - -1999.6.23 - * improved variant conversions for space. - -1999.6.22 - * updated olabl.patch. With this new version you can access fields - of records without opening modules. You can also use several times - the same label in one module. - * examples/GL/morph3d.ml uses it. - -1999.6.21 - * moved event functions to GdkEvent - -1999.6.20 - * new example: radtest.ml (Hubert) - -1999.6.18 - * added GL extension - -1999.6.15 - * grouped set methods into set_ - * added width and height option to all classes - * windows not shown are automatically destroyed by the GC - -1999.6.14 - * added GPack.layout, GPack.packer, GPack.paned, GMisc.notebook, - GRange.scale, GMisc.calendar - * added 3 examples - * #add_events only available on windowed widgets - -1999.6.11 - * added CList widget in GList module, and examples/clist.ml - * improved pixmap abstraction in GdkObj / GPix - -1999.6.10 - * suppressed almost all raw pointers from the code. Pointers are now - either boxed (second field of an abstract block) or marked (lowest - bit set to 1). - -1999.6.9 - * added GtkBase.Object.get_id and GObj.gtkobj#get_id to get an - unique identifier to gtk objects. Nice for hash-tables, etc... - * GUtil.memo is such an hash-table, allowing you to recover an - object's wrapper. - * added a show option to all classes, commanding whether the widget - should be shown immediately. It is by default true on all widgets - except in module GWindow. - * moved non-OO examples to examples/old. Do "cvs update -d old" to - get them. - * changes in Gdk/GtkData/GObj about styles. - -1999.6.8 - * updated olabl.patch - -1999.6.7 - * split gtk.ml into gtk*.ml - -1999.6.5 - * grouped Container focus operations in a "focus" subwidget - -1999.6.4 - * slightly reorganized widget grouping - -1999.6.3 - * disabled gtk_caller - * subtle hack to have GTree get the right interface - * switched completely to the new widget scheme (including examples) - * added olabl.patch to apply to olabl-2.02 to compile new sources - -1999.6.2 - * integrated changes from Hubert in Gtk, GtkObj and testgtk.ml - * added G* modules to replace GtkObj. "make lablgtk2" for it - -1999.6.1 - * added experimental GtkMenu for a cleaner approach to OO (Jacques) - -1999.5.31 - * GtkObj: list, tree and menu_shell inherit from item_container (Jacques) - * Argv.get_{string,pointer,object} may raise Null_pointer (Jacques) - * Support for creating new widgets (Hubert) - -1999.5.28 - * a few stylistic corrections - * added Packer in gtk.ml - -1999.5.27 - * new Gtk.Main.main Gtk.Main.quit and GtkThread.main (for modal windows) - * added x: and y: to Window.setter - * new methods: object#get_type widget#misc#lock_accelerators - widget#misc#visible widget#misc#parent container#set_focus#vadjustment - container#set_focus#hadjustment (could be container#set_focus#adjustment with a dir param) - window#set_modal window#set_position window#set_default_size - window#set_transient_for - menu#set_accel_group - * new classes: handle_box_skel handle_box_signals handle_box - bbox color_selection color_selection_dialog toolbar - and the corresponding modules in gtk.ml - new class type: is_window and method as_window - * new param tearoff: in new_menu_item - new param x: and y: modal: in Window.setter - * Widget.event and Widget.activate return bool - * new example: examples/testgtk.ml and test.xpm - (Hubert) - -1999.5.25 - * upgraded to gtk+-1.2.3 (all examples work) - * suppressed deprecated function calls and corrected examples - * added a patch to use toplevel threads in olabl-2.02 - -1998.12.13 - * upgraded to olabl-2.01 - -1998.12.9 - * replicated Main, Timeout and Grab to GtkObj (no need to open Gtk anymore) - * moved some non standard classes to GtkExt - -1998.12.8 - * added the first application, xxaplay, Playstation audio track - player for linux. (How architecture specific!) (Furuse) - -1998.12.8 - * more widgets in GtkObj - * refined memory management - * all variants in upper case - -1998.12.7 - * after deeper thought, re-introduced the connect sub-object - * simplified GtkObj: use simple inheritance and allow easy subtyping - * updated olabl.diffs for bugs in class functions parsing and printing - * add ThreadObj for concurrent object programming - (Jacques) - -1998.12.3 - * pousse.ml is now a reversi game (idea for strategy ?) - * solved startup bug (a value checker for ocaml is now available) - (Jacques) - -1998.12.2 - * added GdkObj for high level drawing primitives (Jacques) - -1998.11.30 - * removed cast checking for NULL valued widgets (ml_gtk.[ch]) - * module Arg is renamed as GtkArg because of the name corrision with - the module Arg in the standard library - * Makefile : native code compilation added - (Furuse) - -1998.11.29 - * renamed widget_ops sub-object to misc - * various improvements of set functions - (Jacques) - -1998.11.28 - * switched to object-oriented model. GtkObj is now the standard way - to access the library, but not all objects are ready (see README) - * removed inheritance in gtk.ml - (Jacques) - -1998.11.24 - * added inheritance in gtk.ml - -1998.11.22 - * added gtkObj.ml and examples/*_obj.ml - * various modifications in gtk.ml - diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/COPYING b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/COPYING deleted file mode 100644 index d417b8b7e..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/COPYING +++ /dev/null @@ -1,28 +0,0 @@ -This library is made available under the LGPL. -You should have got a copy of the LGPL with Objective Caml. -The LGPL applies to all the files in this directory, but not in -subdirectories. - -For the examples subdirectory, there is no specific licensing policy, -but you may freely take inspiration from the code, and copy parts of -it in your application. - -For the applications subdirectory, stricter rules apply: - -* You are free to do anything you want with this code as long as it is - for personal use. - -* Redistribution can only be "as is". Binary distribution and bug - fixes are allowed, but you cannot extensively modify the code - without asking the authors. - -The authors may choose to remove any of the above restrictions on a -per request basis. - -Authors: - Jacques Garrigue - Hubert Fauque - Jun Furuse - Koji Kagawa - -$Id$ \ No newline at end of file diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/Makefile b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/Makefile deleted file mode 100644 index 23157f267..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/Makefile +++ /dev/null @@ -1,190 +0,0 @@ -# $Id$ -# Makefile for lablgtk. - -TARGETS = var2conv var2def lablgtktop lablgtktop_t lablgtkrun lablgtk - -all: $(TARGETS) - -opt: lablgtkopt - -configure: - @rm -f config.make - @$(MAKE) --no-print-directory -f configure.mk - -depend: - @rm -f .depend - @$(MAKE) --no-print-directory -f configure.mk .depend - -.depend config.make: - @$(MAKE) --no-print-directory -f configure.mk - -COMPILER = $(CAMLC) $(MLFLAGS) -w s -labels -c -LINKER = $(CAMLC) $(MLFLAGS) -COMPOPT = $(CAMLOPT) $(MLFLAGS) -w s -labels -c -LINKOPT = $(CAMLOPT) $(MLFLAGS) -TOPLEVEL = ocamlmktop $(MLFLAGS) - -include config.make - -INSTALLDIR = $(LIBDIR)/lablgtk -LABLGLDIR = $(LIBDIR)/lablGL - -MLLIBS = lablgtk.cma -CLIBS = liblablgtk.a -MLLINK = unix.cma str.cma - -ifdef DEBUG -CFLAGS = -g $(GTKCFLAGS) -MLLINK += -cclib -lcamlrund -MLFLAGS = -g -else -CFLAGS = -O -DGTK_NO_CHECK_CASTS -DGTK_DISABLE_COMPAT_H $(GTKCFLAGS) -endif - -THFLAGS = -thread -THLINK = unix.cma threads.cma - -ifdef USE_CC -CCOMPILER = $(CC) -c -I$(LIBDIR) $(CFLAGS) -else -CCOMPILER = ocamlc -c -ccopt "$(CFLAGS)" -endif - -ifdef USE_GL -MLFLAGS += -I $(LABLGLDIR) -MLLINK += lablgl.cma -MLLIBS += lablgtkgl.cma -CLIBS += liblablgtkgl.a -GLLINK = -cclib -llablgtkgl -cclib -lgtkgl -GLMLOBJS = glGtk.cmo -GLCOBJS = ml_gtkgl.o - -endif - -ifdef USE_GNOME -MLLIBS += lablgnome.cma -CLIBS += liblablgnome.a -GNOMEMLOBJS = gtkXmHTML.cmo gHtml.cmo -GNOMECOBJS = ml_gtkxmhtml.o -endif - -# Rules -.SUFFIXES: .ml .mli .cmo .cmi .cmx .c .o .var .h .opt .def -.c.o: - $(CCOMPILER) $< -.ml.cmo: - $(COMPILER) $< -.mli.cmi: - $(COMPILER) $< -.ml.cmx: - $(COMPOPT) $< -.var.h: - ./var2def < $< > $@ -.var.c: - ./var2conv < $< > $@ - -# Targets -COBJS = ml_gtk.o ml_gdk.o ml_glib.o wrappers.o -MLOBJS = gaux.cmo gpointer.cmo glib.cmo gdk.cmo gdkEvent.cmo gdkKeysyms.cmo \ - gtk.cmo gtkArgv.cmo gtkSignal.cmo \ - gtkData.cmo gtkBase.cmo gtkPack.cmo gtkButton.cmo \ - gtkMenu.cmo gtkMisc.cmo gtkWindow.cmo gtkTree.cmo gtkList.cmo \ - gtkBin.cmo gtkEdit.cmo gtkRange.cmo gtkMain.cmo gtkNew.cmo \ - gDraw.cmo \ - gObj.cmo gMain.cmo gData.cmo gContainer.cmo gPack.cmo gButton.cmo \ - gMenu.cmo gMisc.cmo gWindow.cmo gTree.cmo gList.cmo gBin.cmo \ - gEdit.cmo gRange.cmo gUtil.cmo -THOBJS = gtkThread.cmo -INITOBJS = gtkInit.cmo -THINITOBJS = gtkThInit.cmo -ALLOBJS = $(MLOBJS) $(GLMLOBJS) $(GNOMEMLOBJS) $(THOBJS) \ - $(INITOBJS) $(THINITOBJS) - -lablgtktop: $(CLIBS) $(MLLIBS) $(INITOBJS) - $(TOPLEVEL) -o $@ $(MLLINK) -ccopt -L. $(MLLIBS) $(INITOBJS) - -lablgtktop_t: $(CLIBS) $(MLLIBS) $(THOBJS) $(INITOBJS) $(THINITOBJS) - $(TOPLEVEL) $(THFLAGS) -o $@ $(THLINK) $(MLLINK) \ - -ccopt -L. $(MLLIBS) $(THOBJS) $(INITOBJS) $(THINITOBJS) - -lablgtk: Makefile config.make lablgtk.in - sed -e "s|@INSTALLDIR@|$(INSTALLDIR)|g" \ - -e "s|@LABLGLDIR@|$(LABLGLDIR)|g" \ - -e "s|@LIBDIR@|$(LIBDIR)|g" \ - < lablgtk.in > $@ - chmod 755 $@ - -lablgtkrun: $(CLIBS) $(MLLIBS) - $(LINKER) -o $@ -make-runtime $(MLLINK) -ccopt -L. $(MLLIBS) - -lablgtkopt: $(CLIBS) $(MLLIBS:.cma=.cmxa) $(INITOBJS:.cmo=.cmx) \ - $(THOBJS:.cmo=.cmx) - -install: - if test -d $(INSTALLDIR); then : ; else mkdir -p $(INSTALLDIR); fi - cp $(ALLOBJS:.cmo=.cmi) $(INSTALLDIR) - cp *.mli $(INSTALLDIR) - cp *.h $(INSTALLDIR) - cp $(ALLOBJS:.cmo=.ml) $(INSTALLDIR) - cp $(MLLIBS) $(THOBJS) $(INITOBJS) $(THINITOBJS) $(INSTALLDIR) - cp $(CLIBS) $(INSTALLDIR) - cp lablgtktop lablgtktop_t $(INSTALLDIR) - cp lablgtk lablgtkrun $(BINDIR) - if test -f lablgtk.cmxa; then \ - cp $(MLLIBS:.cma=.cmxa) $(MLLIBS:.cma=.a) \ - $(INITOBJS:.cmo=.cmx) $(INITOBJS:.cmo=.o) $(INSTALLDIR); fi - if test -f gtkThread.cmx; then \ - cp $(THOBJS:.cmo=.cmx) $(THOBJS:.cmo=.o) $(INSTALLDIR); fi - -liblablgtk.a: $(COBJS) - ar rc $@ $(COBJS) - $(RANLIB) $@ -lablgtk.cma: $(MLOBJS) - $(LINKER) -a -custom -o $@ $(MLOBJS) \ - -cclib -llablgtk $(GTKLIBS) -lablgtk.cmxa: $(MLOBJS:.cmo=.cmx) - $(LINKOPT) -a -o $@ $(MLOBJS:.cmo=.cmx) \ - -cclib -llablgtk $(GTKLIBS) - -liblablgtkgl.a: $(GLCOBJS) - ar rc $@ $(GLCOBJS) - $(RANLIB) $@ -lablgtkgl.cma: $(GLMLOBJS) - $(LINKER) -a -custom -o $@ $(GLLINK) $(GLMLOBJS) -lablgtkgl.cmxa: $(GLMLOBJS:.cmo=.cmx) - $(LINKOPT) -a -o $@ $(GLLINK) $(GLMLOBJS:.cmo=.cmx) - -liblablgnome.a: $(GNOMECOBJS) - ar rc $@ $(GNOMECOBJS) - $(RANLIB) $@ -lablgnome.cma: $(GNOMEMLOBJS) - $(LINKER) -a -custom -o $@ $(GNOMEMLOBJS) \ - -cclib -llablgnome $(GNOMELIBS) -lablgnome.cmxa: $(GNOMEMLOBJS:.cmo=.cmx) - $(LINKOPT) -a -o $@ $(GNOMEMLOBJS:.cmo=.cmx) \ - -cclib -llablgnome $(GNOMELIBS) - -gtkThread.cmo: gtkThread.ml - $(COMPILER) $(THFLAGS) gtkThread.ml - -gtkThread.cmx: gtkThread.ml - if test -f $(LIBDIR)/libthreadsnat.a; then \ - $(COMPOPT) $(THFLAGS) gtkThread.ml; fi - -var2conv: var2conv.cmo - $(LINKER) -o $@ var2conv.cmo - rm -f *_tags.c - -var2def: var2def.cmo - $(LINKER) -o $@ var2def.cmo - rm -f *_tags.h - -clean: - rm -f *.cm* *.o *.a *_tags.[ch] $(TARGETS) - -ml_gtk.o: gtk_tags.c gtk_tags.h ml_gtk.h ml_gdk.h wrappers.h -ml_gdk.o: gdk_tags.c gdk_tags.h ml_gdk.h wrappers.h -ml_gtkgl.o: gtkgl_tags.c gtkgl_tags.h ml_gtk.h ml_gdk.h wrappers.h -ml_gtkxmhtml.o: gtkxmhtml_tags.c gtkxmhtml_tags.h ml_gtk.h ml_gdk.h wrappers.h - -include .depend diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/Makefile.nt b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/Makefile.nt deleted file mode 100644 index bdf5b6cfd..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/Makefile.nt +++ /dev/null @@ -1,147 +0,0 @@ -# $Id$ -# Makefile for lablgtk. - -EXE = .exe -TARGETS = var2conv var2def lablgtk$(EXE) lablgtk_t$(EXE) \ - lablgtkrun$(EXE) config.make - -all: $(TARGETS) - -opt: lablgtkopt - -CAMLC = ocamlc -CAMLOPT = ocamlopt -COMPILER = $(CAMLC) $(MLFLAGS) -w s -labels -c -LINKER = $(CAMLC) $(MLFLAGS) -COMPOPT = $(CAMLOPT) $(MLFLAGS) -w s -labels -c -LINKOPT = $(CAMLOPT) $(MLFLAGS) - -TOPLEVEL = ocamlmktop $(MLFLAGS) -### How to invoke the librarian -MKLIB=lib /nologo /debugtype:CV /out: - -!include config.make.nt - -INSTALLDIR = $(LIBDIR:/=\)\lablgtk -BINDIR = $(LIBDIR:/=\)\..\bin -LABLGLDIR = $(LIBDIR)/lablGL - -CFLAGS = -O -DGTK_NO_CHECK_CASTS -DGTK_DISABLE_COMPAT_H $(GTKCFLAGS) -LDFLAGS = $(GTKLIBS) - -THFLAGS = -thread -THLIBS = unix.cma threads.cma - -!if $(USE_CC) == 1 -CCOMPILER = $(CC) -c -I$(LIBDIR) $(CFLAGS) -!else -CCOMPILER = ocamlc -c -ccopt "$(CFLAGS)" -!endif - -!if $(USE_GL) == 1 -MLFLAGS = $(MLFLAGS) -I $(LIBDIR)/lablGL -GLLINK = -I $(LABLGLDIR) lablgl.cma -cclib -lgtkgl -GLMLOBJS = glGtk.cmo -GLCOBJS = ml_gtkgl.o -!endif - -# Rules -.SUFFIXES: .ml .mli .cmo .cmi .cmx .c .obj .var .h .opt .def -.c.obj: - $(CCOMPILER) $< -.ml.cmo: - $(COMPILER) $< -.mli.cmi: - $(COMPILER) $< -.ml.cmx: - $(COMPOPT) $< -.var.h: - ocamlrun ./var2def < $< > $@ -.var.c: - ocamlrun ./var2conv < $< > $@ - -# Targets -COBJS = ml_gtk.obj ml_gdk.obj ml_glib.obj wrappers.obj $(GLCOBJS) -OLDMLOBJS = misc.cmo glib.cmo gdk.cmo gtk.cmo gdkObj.cmo gtkObj.cmo gtkExt.cmo -MLOBJS = misc.cmo glib.cmo gdk.cmo gdkEvent.cmo gdkKeysyms.cmo \ - gtk.cmo gtkArgv.cmo gtkSignal.cmo \ - gtkData.cmo gtkBase.cmo gtkPack.cmo gtkButton.cmo \ - gtkMenu.cmo gtkMisc.cmo gtkWindow.cmo gtkTree.cmo gtkList.cmo \ - gtkFrame.cmo gtkEdit.cmo gtkRange.cmo gtkMain.cmo gtkNew.cmo \ - gDraw.cmo \ - gObj.cmo gMain.cmo gData.cmo gContainer.cmo gPack.cmo gButton.cmo \ - gMenu.cmo gMisc.cmo gWindow.cmo gTree.cmo gList.cmo gFrame.cmo \ - gEdit.cmo gRange.cmo gUtil.cmo $(GLMLOBJS) -THOBJS = gtkThread.cmo threadObj.cmo -INITOBJS = gtkInit.cmo -THINITOBJS = gtkThInit.cmo -ALLOBJS = $(MLOBJS) $(THOBJS) $(INITOBJS) $(THINITOBJS) - -lablgtk$(EXE): liblablgtk.lib lablgtk.cma $(INITOBJS) - $(TOPLEVEL) -custom -o $@ unix.cma str.cma $(GLLINK) \ - lablgtk.cma $(INITOBJS) - -lablgtk_t$(EXE): liblablgtk.lib lablgtk.cma $(THOBJS) $(INITOBJS) $(THINITOBJS) - $(TOPLEVEL) -custom $(THFLAGS) -o $@ $(THLIBS) str.cma $(GLLINK) \ - lablgtk.cma $(THOBJS) $(INITOBJS) $(THINITOBJS) - -lablgtkrun$(EXE): liblablgtk.lib lablgtk.cma - $(LINKER) -o $@ -make-runtime $(GLLINK) lablgtk.cma - -lablgtkopt: liblablgtk.lib lablgtk.cmxa gtkInit.cmx - -install: - if not exist $(INSTALLDIR) mkdir $(INSTALLDIR) - cp $(ALLOBJS:.cmo=.cmi) $(INSTALLDIR) - cp *.mli $(INSTALLDIR) - cp $(ALLOBJS:.cmo=.ml) $(INSTALLDIR) - cp lablgtk.cma $(THOBJS) $(INITOBJS) $(THINITOBJS) $(INSTALLDIR) - cp liblablgtk.lib $(INSTALLDIR) - cp lablgtk$(EXE) lablgtk_t$(EXE) lablgtkrun$(EXE) $(BINDIR) - if exist lablgtk.cmxa cp lablgtk.cmxa lablgtk.lib gtkInit.cmx gtkInit.obj $(INSTALLDIR) - -liblablgtk.lib: $(COBJS) - $(MKLIB)$@ $(COBJS) - -lablgtk.cma: $(MLOBJS) - $(LINKER) -a -custom -o $@ $(MLOBJS) \ - -cclib -llablgtk $(GTKLIBS) - -lablgtk.cmxa: $(MLOBJS:.cmo=.cmx) - $(LINKOPT) -a -o $@ $(MLOBJS:.cmo=.cmx) \ - -cclib -llablgtk $(GTKLIBS) - -gtkThread.cmo: gtkThread.ml - $(COMPILER) $(THFLAGS) gtkThread.ml - -threadObj.cmo: threadObj.ml - $(COMPILER) $(THFLAGS) threadObj.ml - -gtkThread.cmx: gtkThread.ml - $(COMPOPT) $(THFLAGS) gtkThread.ml - -threadObj.cmx: threadObj.ml - $(COMPOPT) $(THFLAGS) threadObj.ml - -var2conv: var2conv.cmo - $(LINKER) -o $@ var2conv.cmo - rm -f *_tags.c - -var2def: var2def.cmo - $(LINKER) -o $@ var2def.cmo - rm -f *_tags.h - -clean: - rm -f *.cm* *.obj *.lib *_tags.[ch] $(TARGETS) - -config.make: config.make.nt - cp config.make.nt config.make - -depend .depend: - ocamldep *.ml *.mli > .depend - -ml_gtk.obj: gtk_tags.c gtk_tags.h ml_gtk.h ml_gdk.h wrappers.h -ml_gdk.obj: gdk_tags.c gdk_tags.h ml_gdk.h wrappers.h -ml_gtkgl.obj: gtkgl_tags.c gtkgl_tags.h ml_gtk.h ml_gdk.h wrappers.h - -!include .depend diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/README b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/README deleted file mode 100644 index eabc247ec..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/README +++ /dev/null @@ -1,238 +0,0 @@ - - LablGTK : an interface to the GIMP Tool Kit - - -Needed: - ocaml-3.00 - gtk-1.2.x - gmake (there is no standard for conditionals) - -How to compile: - - You should normally not need to modify Makefiles. - First type "make configure ". - Options are - USE_CC=1 to use $(CC) rather than gcc - USE_GL=1 to compile with OpenGL support (see lower) - - Then just type "make" to build the library and toplevels. - - On FreeBSD, you need to link with libxpg4.so for Japanese - output. - -Contents: - - gdk.ml low-level interface to the General Drawing Kit - gtk.ml low-level interface to the GIMP Tool Kit - gtkThread.ml main loop for threaded version - g[A-Z]*.ml object-oriented interface to GTK - gdkObj.ml object-oriented interface to GDK - - lablgtk toplevel - - examples/*.ml various examples - applications/* applications using the library - radtest a very experimental RAD for lablgtk - (by Hubert Fauque) - browser the begin of a port of OCamlBrowser - (by Jacques Garrigue) - unison a frontend for the Unison file synchronizer - see the README for details. - -Upgrading from lablgtk-1.00: - There are a few incompatibilities between this version and the - previous release. We do not describe them all, since usually a type - error message will inform you. - * all signals are no longer under #connect. #connect#event changed - to #event#connect, and some signals are under #misc#connect or - #grab#connect. See lower for a description of the new widget - structure. - * some defaults changed. In particular GPack.box#pack have now all - its parameter defaulting to false rather than true. See lower for - the new default policy. Beware that this does not cause type - errors, just changes in the aspect. - -How to run the examples: - In the examples directory just type: - lablgtk -labels examples/???.ml - - Before installing lablgtk you have to be more explicit: - ../lablgtktop -labels -w s -I .. ???.ml - -How to link them: - lablgtktop contains an extra module GtkInit, whose only contents is: - let locale = GtkMain.Main.init () - You must either add this line, or add this module to your link, - before calling any Gtk function. - ocamlc -I CAMLLIB/lablgtk -labels -w s lablgtk.cma gtkInit.cmo ???.ml -o ??? - -How to use the threaded toplevel: - - % lablgtk -thread (or lablgtktop_t before installing) - Objective Caml version 3.00 - - # let w = GWindow.window ~show:true ();; - - You should at once see a window appear. - The GTK main loop is running in a separate thread. Any command - is immediately reflected by the system. - Beware that you cannot switch threads within a callback, that is the - only thread related command you may use in a callback is - Thread.create. On the other hand, all newly created threads will be - run directly by the caml main loop, so they can use all thread - operations. - -Structure of the (raw) Gtk* modules: - - These modules are composed of one submodule for each class. - Signals specific to a widget are in a Signals inner module. - A setter function is defined to give access to set_param functions. - -Structure of the G[A-Z]* modules: - - These modules provide classes to wrap the raw function calls. - Here are the widget classes contained in each module: - - GDraw Gdk pixmaps, etc... - GObj gtkobj, widget, style - GData data, adjustment, tooltips - GContainer container, item_container - GWindow window, dialog, color_selection_dialog, file_selection, plug - GPack box, button_box, table, fixed, layout, packer, paned, notebook - GBin scrolled_window, event_box, handle_box, frame, - aspect_frame, viewport, socket - GButton button, toggle_button, check_button, radio_button, toolbar - GMenu menu_item, tearoff_item, check_menu_item, radio_menu_item, - menu_shell, menu, option_menu, menu_bar, factory - GMisc separator, statusbar, calendar, drawing_area, - misc, arrow, image, pixmap, label, tips_query, - color_selection, font_selection - GTree tree_item, tree - GList list_item, liste, clist - GEdit editable, entry, spin_button, combo, text - GRange progress, progress_bar, range, scale, scrollbar - - While subtyping follows the Gtk widget hierarchy, you cannot always - use width subtyping (i.e. #super is not unifiable with all the - subclasses of super). Still, it works for some classes, like - #widget and #container, and allows subtyping without coercion towards - these classes (cf. #container in pousse.ml for instance). - - Practically, each widget class is composed of: - * a coerce method, returning the object coerced to the type widget. - * an as_widget method, returning the raw Gtk widget used for packing, etc... - * a connect sub-object, allowing one to widget specific - signals (this is what prevents width subtyping in subclasses.) - * a misc sub-object, giving access to miscellanous functionality of - the basic gtkwidget class, and a misc#connect sub-object. - * an event sub-object, for Xevent related functions (only if the widget - has an Xwindow), and an event#connect sub-object. - * a grab sub-object, containing drag and drop functions, - and a grab#connect sub-object. - * widget specific methods. - - Here is a diagram of the structure (- for methods, + for sub-objects) - - coerce : widget - - as_widget : Gtk.widget obj - - destroy : unit -> unit - - ... - + connect : mywidget_signals - | - after - | - signal_name : callback:(... -> ...) -> GtkSignal.id - + misc : misc_ops - | - show, hide, disconnect, ... - | + connect : misc_signals - + event : event_ops - | - add, ... - | + connect : event_signals - + grab : grab_ops - | - ... - | + connect : grab_signals - - You create a widget by [. options ... ()]. - Many optional arguments are admitted. The last two of them, packing: - and show:, allow you respectively to call a function on your newly - created widget, and to decide wether to show it immediately or not. - By default all widgets except toplevel windows (GWindow module) are - shown immediately. - -Default arguments: - For many constructor or method arguments, default values are provided. - Generally, this default value is defined by GTK, and you must refer - to GTK's documentation. - For ML defined defaults, usually default values are either false, 0, None - or `NONE, according to the expected type. - Important exceptions are ~show, which default to true in all widgets - except those in GWindow, and ~fill, which defaults to true or `BOTH. - -Note about unit as method argument: - - O'Caml introduces no distinction between methods having side-effects - and methods simply returning a value. In practice, this is - confusing, and awkward when used as callbacks. For this reason all - methods having noticeable side-effects should take arguments, and - unit if they have no argument. - -Memory management: - - Important efforts have been dedicated to cooperate with Gtk's - reference counting mechanism. As a result you should generally be - able to use Gdk/Gtk data structures without caring about memory - management. They will be freed when nobody points to them any more. - This also means that you do not need to pay too much attention to - whether a data structure is still alive or not. If it is not, you - should get an error rather than a core dump. - The case of Gtk objects deserves special care. Since they are - interactive, we cannot just destroy them when they are no longer - referenced. They have to be explicitely destroyed. If a widget was - added to a container widget, it will automatically be destroyed when - its last container is destroyed. For this reason you need only - destroy toplevel widgets. - -GL extension - - You can use lablgtk in combination with LablGL - - * get and install lablGL 0.94 from - http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/lablgl.html - * get and install gtkglarea-1.2.x.tar.gz from - http://www.student.oulu.fi/~jlof/gtkglarea/index.html - * reconfigure: "make configure USE_GL=1" - - You can then use the widget GlGtk.gl_area as an OpenGL window. - Some examples are in examples/GL, but basically any LablGL example - can be easily ported. - -Windows port - - A Win32 port is provided. In order to compile it, you will need to - get and unpack glib-dev-????.zip and gtk+-dev-????.zip from - http://www.gimp.org/~tml/gimp/win32/ - Do not forget to get also extralibs-dev-????.zip, since you will - need some of the DLLs. - - Edit config.make.nt, then, using Visual C++, - nmake -f Makefile.nt - nmake -f Makefile.nt opt (if you have an MS Assembler) - Then install with - nmake -f Makefile.nt install - - Since the link is dynamic you will also need to have in your path: - gnu-intl.dll (extralibs), glib-1.3.dll, module-1.3.dll and - gthread-1.3.dll (glib), gdk-1.3.dll and gtk-1.3.dll (gtk+). - - I checked with the 2000-02-02 version of these libraries. - Currently threads do not seem to work, but otherwise everything - seems OK. In particular, you can run all examples, and build - applications\unison as usual. - -Authors: - Jacques Garrigue - Hubert Fauque - Jun Furuse - Koji Kagawa - -Bug reports: - Jacques Garrigue - -$Id$ diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/.cvsignore b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/.cvsignore deleted file mode 100644 index bc09d7470..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -olabl-src -browser -.depend \ No newline at end of file diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/Makefile b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/Makefile deleted file mode 100644 index 8822e4738..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -# $Id$ -# Makefile for lablgtk. - -all: browser - -CAMLC = ocamlc -CAMLOPT = ocamlopt -COMPILER = $(CAMLC) $(MLFLAGS) -labels -w s -c -LINKER = $(CAMLC) $(MLFLAGS) -COMPOPT = $(CAMLOPT) $(MLFLAGS) -labels -w s -c -LINKOPT = $(CAMLOPT) $(MLFLAGS) - -RANLIB = ranlib - -include ../../config.make - -MLFLAGS = -I ../.. -I ocaml-src/utils -I ocaml-src/parsing - -# Rules -.SUFFIXES: .ml .mli .cmo .cmi .cmx .c .o .var .h .opt .def -.ml.cmo: - $(COMPILER) $< -.mli.cmi: - $(COMPILER) $< -.ml.cmx: - $(COMPOPT) $< - -# Targets -MLOBJS = text.cmo file.cmo lexical.cmo shell.cmo editor.cmo - -browser: $(MLOBJS) - $(LINKER) -o $@ toplevellib.cma str.cma unix.cma \ - lablgtk.cma $(MLOBJS) - -clean: - rm -f *.cm* browser - -.depend: - ocamldep *.ml *.mli > .depend - -include .depend diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/README b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/README deleted file mode 100644 index a6f01cee8..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/README +++ /dev/null @@ -1,18 +0,0 @@ - Browser: the beginning of a port of the LablBrowser - -Installation: - -* make a link from a directory where the O'Labl distribution is - compiled to olabl-src - ln -s /path/to/olabl/ocaml-2.02 olabl-src - (actually only the directory parsing needs to be compiled) - -* just type "make" - -Use: - -When you run browser, you just get a customized editor with lexical -coloring. Nothing very fancy. -In the file menu you can open a shell, running olabl as subprocess. - -Jacques Garrigue \ No newline at end of file diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/TODO b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/TODO deleted file mode 100644 index 0c8bb5357..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/TODO +++ /dev/null @@ -1,4 +0,0 @@ -* lexical coloring (done) -* hyperlinks (call signal with position) -* keyboard popup -* protection diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/editor.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/editor.ml deleted file mode 100644 index d4adbfbc7..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/editor.ml +++ /dev/null @@ -1,101 +0,0 @@ -(* $Id$ *) - -open GMain - -class editor ?packing ?show () = - let text = GEdit.text ~editable:true ?packing ?show () in -object (self) - inherit GObj.widget text#as_widget - - val mutable filename = None - - method text = text - - method load_file name = - try - let ic = open_in name in - filename <- Some name; - text#freeze (); - text#delete_text ~start:0 ~stop:text#length; - let buf = String.create 1024 and len = ref 0 in - while len := input ic ~buf ~pos:0 ~len:1024; !len > 0 do - if !len = 1024 then text#insert buf - else text#insert (String.sub buf ~pos:0 ~len:!len) - done; - text#set_point 0; - text#thaw (); - close_in ic - with _ -> () - - method open_file () = File.dialog ~title:"Open" ~callback:self#load_file () - - method save_file () = - File.dialog ~title:"Save" ?filename () ~callback: - begin fun name -> - try - if Sys.file_exists name then Sys.rename ~src:name ~dst:(name ^ "~"); - let oc = open_out name in - output_string oc (text#get_chars ~start:0 ~stop:text#length); - close_out oc - with _ -> prerr_endline "Save failed" - end -end - -open GdkKeysyms - -class editor_window ?(show=false) () = - let window = GWindow.window ~width:500 ~height:300 - ~title:"Program Editor" () in - let vbox = GPack.vbox ~packing:window#add () in - - let menubar = GMenu.menu_bar ~packing:vbox#pack () in - let factory = new GMenu.factory menubar in - let accel_group = factory#accel_group - and file_menu = factory#add_submenu "File" - and edit_menu = factory#add_submenu "Edit" - and comp_menu = factory#add_submenu "Compiler" in - - let hbox = GPack.hbox ~packing:vbox#add () in - let scrollbar = - GRange.scrollbar `VERTICAL ~packing:(hbox#pack ~from:`END) () - and editor = new editor ~packing:hbox#add () in -object (self) - inherit GObj.widget window#as_widget - - method window = window - method editor = editor - method show = window#show - - initializer - window#connect#destroy ~callback:Main.quit; - let factory = new GMenu.factory file_menu ~accel_group in - factory#add_item "Open..." ~key:_O ~callback:editor#open_file; - factory#add_item "Save..." ~key:_S ~callback:editor#save_file; - factory#add_item "Shell" - ~callback:(fun () -> Shell.f ~prog:"ocaml" ~title:"Objective Caml Shell"); - factory#add_separator (); - factory#add_item "Quit" ~key:_Q ~callback:window#destroy; - let factory = new GMenu.factory edit_menu ~accel_group in - factory#add_item "Copy" ~key:_C ~callback:editor#text#copy_clipboard; - factory#add_item "Cut" ~key:_X ~callback:editor#text#cut_clipboard; - factory#add_item "Paste" ~key:_V ~callback:editor#text#paste_clipboard; - factory#add_separator (); - factory#add_check_item "Word wrap" ~active:false - ~callback:editor#text#set_word_wrap; - factory#add_check_item "Read only" ~active:false - ~callback:(fun b -> editor#text#set_editable (not b)); - let factory = new GMenu.factory comp_menu ~accel_group in - factory#add_item "Lex" ~key:_L - ~callback:(fun () -> Lexical.tag editor#text); - window#add_accel_group accel_group; - editor#text#set_vadjustment scrollbar#adjustment; - if show then self#show () -end - -let _ = - Main.init (); - if Array.length Sys.argv >= 2 && Sys.argv.(1) = "-shell" then - Shell.f ~prog:"ocaml" ~title:"Objective Caml Shell" - else - ignore (new editor_window ~show:true ()); - Main.main () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/file.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/file.ml deleted file mode 100644 index e9c0cf34f..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/file.ml +++ /dev/null @@ -1,13 +0,0 @@ -(* $Id$ *) - -let dialog ~title ~callback ?filename () = - let sel = - GWindow.file_selection ~title ~modal:true ?filename () in - sel#cancel_button#connect#clicked ~callback:sel#destroy; - sel#ok_button#connect#clicked ~callback: - begin fun () -> - let name = sel#get_filename in - sel#destroy (); - callback name - end; - sel#show () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/lexical.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/lexical.ml deleted file mode 100644 index 9acb9c060..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/lexical.ml +++ /dev/null @@ -1,155 +0,0 @@ -(* $Id$ *) - -open Parser - -type tags = [`none|`control|`define|`structure|`char|`infix|`label|`uident] - -let colors : (tags * GDraw.color) list Lazy.t = - lazy - (List.map ~f:(fun (tag,col) -> tag, `COLOR (GDraw.color (`NAME col))) - [ `control, "blue"; - `define, "forestgreen"; - `structure, "purple"; - `char, "gray40"; - `infix, "indianred4"; - `label, "brown"; - `uident, "midnightblue"; - `none, "black" ]) - -let tag ?(start=0) ?stop:pend (tw : GEdit.text) = - let pend = Gaux.default tw#length ~opt:pend in - let colors = Lazy.force colors in - tw#freeze (); - let position = tw#position - and text = tw#get_chars ~start ~stop:pend in - let replace ~start:pstart ~stop:pend ~tag = - if pend > pstart then begin - tw#delete_text ~start:(start+pstart) ~stop:(start+pend); - tw#set_point (start+pstart); - tw#insert ~foreground:(List.assoc tag colors) - (String.sub text ~pos:pstart ~len:(pend-pstart)); - end - and next_lf = ref (-1) in - let colorize ~start:rstart ~stop:rend ~tag = - let rstart = ref rstart in - while !rstart < rend do - if !next_lf < !rstart then begin - try next_lf := String.index_from text !rstart '\n' - with Not_found -> next_lf := pend-start - end; - replace ~start:!rstart ~stop:(min !next_lf rend) ~tag; - rstart := !next_lf + 1 - done - in - let buffer = Lexing.from_string text - and last = ref (EOF, 0, 0) - and last_pos = ref 0 in - try - while true do - let token = Lexer.token buffer - and start = Lexing.lexeme_start buffer - and stop = Lexing.lexeme_end buffer in - let tag = - match token with - AMPERAMPER - | AMPERSAND - | BARBAR - | DO | DONE - | DOWNTO - | ELSE - | FOR - | IF - | LAZY - | MATCH - | OR - | THEN - | TO - | TRY - | WHEN - | WHILE - | WITH - -> `control - | AND - | AS - | BAR - | CLASS - | CONSTRAINT - | EXCEPTION - | EXTERNAL - | FUN - | FUNCTION - | FUNCTOR - | IN - | INHERIT - | INITIALIZER - | LET - | METHOD - | MODULE - | MUTABLE - | NEW - | OF - | PARSER - | PRIVATE - | REC - | TYPE - | VAL - | VIRTUAL - -> `define - | BEGIN - | END - | INCLUDE - | OBJECT - | OPEN - | SIG - | STRUCT - -> `structure - | CHAR _ - | STRING _ - -> `char - | BACKQUOTE - | INFIXOP1 _ - | INFIXOP2 _ - | INFIXOP3 _ - | INFIXOP4 _ - | PREFIXOP _ - | QUESTION2 - | SHARP - -> `infix - | LABEL _ - | OPTLABEL _ - | QUESTION - | TILDE - -> `label - | UIDENT _ -> `uident - | LIDENT _ -> - begin match !last with - (QUESTION | TILDE), _, _ -> `label - | _ -> `none - end - | COLON -> - begin match !last with - LIDENT _, lstart, lstop when lstop = start -> - colorize ~tag:`none ~start:!last_pos ~stop:lstart; - colorize ~tag:`label ~start:lstart ~stop; - last_pos := stop; - `none - | _ -> `none - end - | EOF -> raise End_of_file - | _ -> `none - in - if tag <> `none then begin - colorize ~tag:`none ~start:!last_pos ~stop:start; - colorize ~tag ~start ~stop; - last_pos := stop - end; - last := (token, start, stop) - done - with exn -> - colorize ~tag:`none ~start:!last_pos ~stop:(pend-start); - tw#thaw (); - tw#set_position position; - tw#set_point position; - match exn with - End_of_file | Lexer.Error _ -> () - | _ -> raise exn diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/list2.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/list2.ml deleted file mode 100644 index 0d7798a6a..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/list2.ml +++ /dev/null @@ -1,25 +0,0 @@ -(* $Id$ *) - -let rec cut l ~len = - if len <= 0 then [], l else - match l with - a::l -> - let l1, l2 = cut l ~len:(len-1) in - a::l1, l2 - | [] -> - invalid_arg "cut_list" - -let rec chop l ~len = - if l = [] then [] else - let l1, l2 = - try cut_list l ~len - with Invalid_argument _ -> l, [] - in - l1 :: chop l2 ~len - - -let rec iteri_aux ~f:f ~i = function - [] -> () - | a::l -> f ~i a; iteri_aux ~f:f ~i:(i+1) l - -let iteri = iteri_aux ~i:0 diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/shell.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/shell.ml deleted file mode 100644 index fbe0f92a0..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/shell.ml +++ /dev/null @@ -1,255 +0,0 @@ -(* $Id$ *) - -open GdkKeysyms -open Printf - -(* Nice history class. May reuse *) - -class ['a] history () = object - val mutable history = ([] : 'a list) - val mutable count = 0 - method empty = history = [] - method add s = count <- 0; history <- s :: history - method previous = - let s = List.nth history count in - count <- (count + 1) mod List.length history; - s - method next = - let l = List.length history in - count <- (l + count - 1) mod l; - List.nth history ((l + count - 1) mod l) -end - -(* The shell class. Now encapsulated *) - -let protect f x = try f x with _ -> () - -class shell ~prog ~args ~env ?packing ?show () = - let (in2,out1) = Unix.pipe () - and (in1,out2) = Unix.pipe () - and (err1,err2) = Unix.pipe () in - let _ = List.iter ~f:Unix.set_nonblock [out1;in1;err1] in -object (self) - val textw = GEdit.text ~editable:true ?packing ?show () - val pid = Unix.create_process_env - ~prog ~args ~env ~stdin:in2 ~stdout:out2 ~stderr:err2 - val out = Unix.out_channel_of_descr out1 - val h = new history () - val mutable alive = true - val mutable reading = false - val mutable input_start = 0 - method text = textw - method alive = alive - method kill () = - textw#set_editable false; - if alive then begin - alive <- false; - protect close_out out; - List.iter ~f:(protect Unix.close) [in1; err1; in2; out2; err2]; - try - Unix.kill ~pid ~signal:Sys.sigkill; - Unix.waitpid pid ~mode:[]; () - with _ -> () - end - method interrupt () = - if alive then try - reading <- false; - Unix.kill ~pid ~signal:Sys.sigint - with Unix.Unix_error _ -> () - method send s = - if alive then try - output_string out s; - flush out - with Sys_error _ -> () - method private read ~fd ~len = - try - let buf = String.create len in - let len = Unix.read fd ~buf ~pos:0 ~len in - if len > 0 then begin - textw#set_position textw#length; - self#insert (String.sub buf ~pos:0 ~len); - input_start <- textw#position; - end; - len - with Unix.Unix_error _ -> 0 - method history (dir : [`next|`previous]) = - if not h#empty then begin - if reading then begin - textw#delete_text ~start:input_start ~stop:textw#position; - end else begin - reading <- true; - input_start <- textw#position - end; - self#insert (if dir = `previous then h#previous else h#next); - end - val mutable lexing = false - method private lex ~start ~stop:e = - if not lexing && start < e then begin - lexing <- true; - Lexical.tag textw ~start ~stop:e; - lexing <- false - end - method insert ?(lex=true) text = - let start = Text.line_start textw in - textw#insert text; - if lex then self#lex ~start ~stop:(Text.line_end textw) - method private keypress c = - if not reading & c > " " then begin - reading <- true; - input_start <- textw#position - end - method private return () = - if reading then reading <- false - else input_start <- textw#position; - textw#set_position (Text.line_end textw); - let s = textw#get_chars ~start:input_start ~stop:textw#position in - h#add s; - self#send s; - self#send "\n" - method private paste () = - if not reading then begin - reading <- true; - input_start <- textw#position; - end - initializer - textw#event#connect#key_press ~callback: - begin fun ev -> - if GdkEvent.Key.keyval ev = _Return && GdkEvent.Key.state ev = [] - then self#return () - else self#keypress (GdkEvent.Key.string ev); - false - end; - textw#connect#after#insert_text ~callback: - begin fun s ~pos -> - if not lexing then - self#lex ~start:(Text.line_start textw ~pos:(pos - String.length s)) - ~stop:(Text.line_end textw ~pos) - end; - textw#connect#after#delete_text ~callback: - begin fun ~start:pos ~stop -> - if not lexing then - self#lex ~start:(Text.line_start textw ~pos) - ~stop:(Text.line_end textw ~pos) - end; - textw#event#connect#button_press ~callback: - begin fun ev -> - if GdkEvent.Button.button ev = 2 then self#paste (); - false - end; - textw#connect#destroy ~callback:self#kill; - GMain.Timeout.add ~ms:100 ~callback: - begin fun () -> - if alive then begin - List.iter [err1;in1] - ~f:(fun fd -> while self#read ~fd ~len:1024 = 1024 do () done); - true - end else false - end; - () -end - -(* Specific use of shell, for LablBrowser *) - -let shells : (string * shell) list ref = ref [] - -(* Called before exiting *) -let kill_all () = - List.iter !shells ~f:(fun (_,sh) -> if sh#alive then sh#kill ()); - shells := [] -let _ = at_exit kill_all - -let get_all () = - let all = List.filter !shells ~f:(fun (_,sh) -> sh#alive) in - shells := all; - all - -let may_exec prog = - try Unix.access prog ~perm:[Unix.X_OK]; true - with Unix.Unix_error _ -> false - -let f ~prog ~title = - let progargs = - List.filter ~f:((<>) "") (Str.split ~sep:(Str.regexp " ") prog) in - if progargs = [] then () else - let prog = List.hd progargs in - let path = try Sys.getenv "PATH" with Not_found -> "/bin:/usr/bin" in - let exec_path = Str.split ~sep:(Str.regexp":") path in - let prog = - if not (Filename.is_implicit prog) then - if may_exec prog then prog else "" - else - List.fold_left exec_path ~init:"" ~f: - begin fun acc dir -> - if acc <> "" then acc else - let prog = Filename.concat dir prog in - if may_exec prog then prog else acc - end - in - if prog = "" then () else - let reg = Str.regexp "TERM=" in - let env = Array.map (Unix.environment ()) ~f: - begin fun s -> - if Str.string_match ~pat:reg s ~pos:0 then "TERM=dumb" else s - end in - let load_path = - List.flatten (List.map !Config.load_path ~f:(fun dir -> ["-I"; dir])) in - let args = Array.of_list (progargs @ load_path) in - let current_dir = ref (Unix.getcwd ()) in - - let tl = GWindow.window ~title ~width:500 ~height:300 () in - let vbox = GPack.vbox ~packing:tl#add () in - let menus = GMenu.menu_bar ~packing:vbox#pack () in - let f = new GMenu.factory menus in - let accel_group = f#accel_group in - let file_menu = f#add_submenu "File" - and history_menu = f#add_submenu "History" - and signal_menu = f#add_submenu "Signal" in - - let hbox = GPack.hbox ~packing:vbox#add () in - let sh = new shell ~prog ~env ~args ~packing:hbox#add () in - let sb = - GRange.scrollbar `VERTICAL ~adjustment:sh#text#vadjustment - ~packing:hbox#pack () - in - - let f = new GMenu.factory file_menu ~accel_group in - f#add_item "Use..." ~callback: - begin fun () -> - File.dialog ~title:"Use File" ~filename:(!current_dir ^ "/") () ~callback: - begin fun name -> - current_dir := Filename.dirname name; - if Filename.check_suffix name ".ml" then - let cmd = "#use \"" ^ name ^ "\";;\n" in - sh#insert cmd; - sh#send cmd - end - end; - f#add_item "Load..." ~callback: - begin fun () -> - File.dialog ~title:"Load File" ~filename:(!current_dir ^ "/") () ~callback: - begin fun name -> - current_dir := Filename.dirname name; - if Filename.check_suffix name ".cmo" or - Filename.check_suffix name ".cma" - then - let cmd = Printf.sprintf "#load \"%s\";;\n" name in - sh#insert cmd; - sh#send cmd - end - end; - f#add_item "Import path" ~callback: - begin fun () -> - List.iter (List.rev !Config.load_path) - ~f:(fun dir -> sh#send (sprintf "#directory \"%s\";;\n" dir)) - end; - f#add_item "Close" ~key:_W ~callback:tl#destroy; - - let h = new GMenu.factory history_menu ~accel_group ~accel_modi:[`MOD1] in - h#add_item "Previous" ~key:_P ~callback:(fun () -> sh#history `previous); - h#add_item "Next" ~key:_N ~callback:(fun () -> sh#history `next); - let s = new GMenu.factory signal_menu ~accel_group in - s#add_item "Interrupt" ~key:_G ~callback:sh#interrupt; - s#add_item "Kill" ~callback:sh#kill; - shells := (title, sh) :: !shells; - tl#add_accel_group accel_group; - tl#show () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/text.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/text.ml deleted file mode 100644 index 729f3105a..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/text.ml +++ /dev/null @@ -1,16 +0,0 @@ -(* $Id$ *) - -open GEdit - -let line_start ?pos (text : GEdit.text) = - let pos = Gaux.default text#position ~opt:pos in - if pos = 0 then 0 else - let start = max 0 (pos-256) in - let buffer = text#get_chars ~start ~stop:pos in - try start + String.rindex buffer '\n' with Not_found -> 0 - -let line_end ?pos (text : GEdit.text) = - let pos = Gaux.default text#position ~opt:pos in - if pos = text#length then text#length else - let buffer = text#get_chars ~start:pos ~stop:(min text#length (pos+256)) in - try pos + String.index buffer '\n' with Not_found -> text#length diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/useunix.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/useunix.ml deleted file mode 100644 index c4860a8ca..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/useunix.ml +++ /dev/null @@ -1,36 +0,0 @@ -(* $Id$ *) - -open Unix - -let get_files_in_directory dir = - try - let dirh = opendir dir in - let rec get_them () = - try - let x = readdir dirh in - x :: get_them () - with - _ -> closedir dirh; [] - in - Sort.list ~order:(<) (get_them ()) - with Unix_error _ -> [] - -let is_directory name = - try - (stat name).st_kind = S_DIR - with _ -> false - -let get_directories_in_files ~path = - List.filter ~pred:(fun x -> is_directory (path ^ "/" ^ x)) - -(************************************************** Subshell call *) -let subshell ~cmd = - let rc = open_process_in ~cmd in - let rec it () = - try - let x = input_line rc in x :: it () - with _ -> [] - in - let answer = it () in - close_process_in rc; - answer diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/widgets.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/widgets.ml deleted file mode 100644 index c27ca9fbb..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/browser/widgets.ml +++ /dev/null @@ -1,34 +0,0 @@ -(* $Id$ *) - -open GObj - -class multibox ~rows ~columns ?(row_view = rows) ?(col_view = columns) - ?packing ?show () = - let sw = - GBin.scrolled_window ~hpolicy:`AUTOMATIC ~vpolicy:`AUTOMATIC - ?show ?packing () in - let vp = GBin.viewport ~shadow_type:`NONE ~packing:sw#add in - let table = - GPack.table ~columns ~rows ~homogeneous:true ~packing:vp#add () in - let buttons = - Array.init ~len:columns - ~f:(fun left -> Array.init ~len:rows - ~f:(fun top -> GButton.button - ~packing:(table#attach ~top ~left ~expand:`BOTH))) - in - object (self) - inherit widget sw#as_widget - method cell ~col ~row = buttons.(col).(row) - initializer - let id = ref None in - id := Some - (sw#event#connect#expose ~after:true ~callback: - begin fun _ -> - may !id ~f:sw#connect#disconnect; - let height = table#misc#allocation.height * row_view / rows - and width = table#misc#allocation.width * col_view / columns in - vp#misc#set_size ~height ~width; - false - end); - table#focus#set_vadjustment vp#vadjustment - end diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/.cvsignore b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/.cvsignore deleted file mode 100644 index a2d75da3e..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -.depend radtest -*_parser.ml *_parser.mli -*_lexer.ml diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/CHANGES b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/CHANGES deleted file mode 100644 index e87fc0a9a..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/CHANGES +++ /dev/null @@ -1,16 +0,0 @@ -$Id$ - -2000.05.15 - * suppressed treew.ml; replaced by ti*.ml - * new widgets - * less known bugs (Hubert) -1999.10.28 - * re-objectified property.ml - * split it into common.mli/property.ml/propwin.ml - * undo is back - * restructure menu code in main.ml - -1999.10.27 - * simplified property.ml, and corrected treew.ml accordingly. - undo is temporarily disabled. - (Jacques) \ No newline at end of file diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/Makefile b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/Makefile deleted file mode 100644 index 175eca980..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/Makefile +++ /dev/null @@ -1,86 +0,0 @@ -# $Id$ -# Makefile for lablgtk. - -all: radtest - -CAMLC = ocamlc -CAMLOPT = ocamlopt -COMPILER = $(CAMLC) $(MLFLAGS) -c -LINKER = $(CAMLC) $(MLFLAGS) -COMPOPT = $(CAMLOPT) $(MLFLAGS) -c -LINKOPT = $(CAMLOPT) $(MLFLAGS) - -RANLIB = ranlib - -include ../../config.make - -MLFLAGS = -I ../.. -w s -labels - -ifdef DEBUG -CFLAGS = -g $(GTKCFLAGS) -MLFLAGS += -g -else -CFLAGS = -O -DGTK_NO_CHECK_CASTS -DGTK_DISABLE_COMPAT_H $(GTKCFLAGS) -endif - -ifdef USE_CC -CCOMPILER = $(CC) -c -I$(LIBDIR) $(CFLAGS) -else -CCOMPILER = ocamlc -c -ccopt "$(CFLAGS)" -endif - - -# Rules -.SUFFIXES: .ml .mli .cmo .cmi .cmx .c .o .var .h .opt .def -.c.o: - $(CCOMPILER) $< -.ml.cmo: - $(COMPILER) $< -.mli.cmi: - $(COMPILER) $< -.ml.cmx: - $(COMPOPT) $< - -# Targets -MLOBJS = utils.cmo property.cmo propwin.cmo \ - load_parser.cmo load_lexer.cmo tiBase.cmo tiContainer.cmo tiBin.cmo \ - tiButton.cmo tiEdit.cmo tiList.cmo tiMisc.cmo tiPack.cmo tiWindow.cmo \ - tiWidget.cmo main.cmo - -MLSRC = common.mli utils.ml property.mli property.ml propwin.mli \ - propwin.ml \ - load_parser.ml load_lexer.ml tiBase.ml tiContainer.ml tiBin.ml \ - tiButton.ml tiEdit.ml tiList.ml tiMisc.ml tiPack.ml tiWindow.ml \ - tiWidget.ml main.ml - -radtest: $(MLOBJS) libgtk2.a gtk2.cma - $(LINKER) -o $@ lablgtk.cma gtkInit.cmo -I . gtk2.cma \ - $(MLOBJS) - -radtestopt: $(MLOBJS:.cmo=.cmx) libgtk2.a gtk2.cmxa - $(LINKOPT) -o $@ lablgtk.cmxa gtkInit.cmx -I . gtk2.cmxa \ - $(MLOBJS:.cmo=.cmx) - -%.mli %.ml: %.mly - ocamlyacc $< - -%.ml: %.mll - ocamllex $< - -libgtk2.a: gtktree2.o gtktreeitem2.o ml_gtk2.o - ar rc $@ gtktree2.o gtktreeitem2.o ml_gtk2.o - $(RANLIB) $@ - -gtk2.cma: gtkTree2.cmo gTree2.cmo gToolbar2.cmo libgtk2.a - $(LINKER) -a -o $@ gtkTree2.cmo gTree2.cmo gToolbar2.cmo -cclib -lgtk2 - -gtk2.cmxa: gtkTree2.cmx gTree2.cmx gToolbar2.cmx libgtk2.a - $(LINKOPT) -a -o $@ gtkTree2.cmx gTree2.cmx gToolbar2.cmx -cclib -lgtk2 - -clean: - rm -f *.cm* *.o *.a radtest *_parser.ml *_parser.mli *_lexer.ml - -.depend: $(MLSRC) load_parser.ml load_lexer.ml - ocamldep $(MLSRC) load_parser.ml* load_lexer.ml* > .depend - -include .depend diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/README b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/README deleted file mode 100644 index aedd81fff..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/README +++ /dev/null @@ -1,24 +0,0 @@ - Lablgtk RADTEST - -Author: Hubert Fauque, hubert.fauque@inria.fr - -This is an experimental R.A.D. for Lablgtk. -You can compile it simply by make. - - -When radtest starts a new empty project is open; -you can add new windows to this project by clicking on -the window icon at the top of the icons window; - -by clicking on an item in the tree window with the third button -you can add or remove widgets; -you can also drag widgets from the icons window and drop them -on the tree; - -when a widget is selected (click on it in the tree) you can -move it up or down (if its parent is a box) with CTRL-up_arrow -or CTRL-down_arrow; with up_arrow and down_arrow you select -the widget which is above or below the currently selected widget; - -Save the project by Project->Save, and load an already existing -project by Project->Open. diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/aspectframe.xpm b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/aspectframe.xpm deleted file mode 100644 index 66b9ca14d..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/aspectframe.xpm +++ /dev/null @@ -1,33 +0,0 @@ -/* XPM */ -static char *aspectframe_xpm[] = { -/* columns rows colors chars-per-pixel */ -"21 21 6 1", -" c Gray0", -". c #7b7b7b", -"X c #d6d6d6", -"o c #b3cece", -"O c Gray100", -"+ c None", -/* pixels */ -"+++++++++++++++++++++", -"+++++ + +++++++++++", -"+...X X X X......O+", -"+.OOX X X XOOOOO.O+", -"+.OXX X X XXXXXX.O+", -"+.OXXXXXXXXXXXXXXX.O+", -"+.OXXXXXXX.XXXXXXX.O+", -"+.OXXXXXX...XXXXXX.O+", -"+.OXXXXX.X.X.XXXXX.O+", -"+.OXXXXXXX.XXXXXXX.O+", -"+.OXX.XXXX.XXXX.XX.O+", -"+.OX.XXXXX.XXXXX.X.O+", -"+.O................O+", -"+.OX.XXXXX.XXXXX.X.O+", -"+.OXX.XXXX.XXXX.XX.O+", -"+.OXXXXX.X.X.XXXXX.O+", -"+.OXXXXXX...XXXXXX.O+", -"+.OXXXXXXX.XXXXXXX.O+", -"+..................O+", -"+OOOOOOOOOOOOOOOOOOO+", -"+++++++++++++++++++++" -}; diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/button.xpm b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/button.xpm deleted file mode 100644 index 62ebc3074..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/button.xpm +++ /dev/null @@ -1,33 +0,0 @@ -/* XPM */ -static char *button_xpm[] = { -/* columns rows colors chars-per-pixel */ -"21 21 6 1", -" c Gray0", -". c #7b7b7b", -"X c #d6d6d6", -"o c #b3cece", -"O c Gray100", -"+ c None", -/* pixels */ -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+OOOOOOOOOOOOOOOOOO +", -"+OXXXXXXXXXXXXXXXX. +", -"+OXXXXXXXXXXXXXXXX. +", -"+OXXX XXX XXX XX. +", -"+OXX XXX XX XX XXX. +", -"+OXX XXX XX X XXXX. +", -"+OXX XXX XX XXXXX. +", -"+OXX XXX XX X XXXX. +", -"+OXX XXX XX XX XXX. +", -"+OXXX XXX XXX XX. +", -"+OXXXXXXXXXXXXXXXX. +", -"+OXXXXXXXXXXXXXXXX. +", -"+OXXXXXXXXXXXXXXXX. +", -"+O................. +", -"+ +", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++" -}; diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/checkbutton.xpm b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/checkbutton.xpm deleted file mode 100644 index 314ba97ce..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/checkbutton.xpm +++ /dev/null @@ -1,33 +0,0 @@ -/* XPM */ -static char *checkbutton_xpm[] = { -/* columns rows colors chars-per-pixel */ -"21 21 6 1", -" c Gray0", -". c #7b7b7b", -"X c #d6d6d6", -"o c #b3cece", -"O c Gray100", -"+ c None", -/* pixels */ -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++OOOOOOOOOOO+++++", -"+++++OXXXXXXXXX +++++", -"+++++OXXXXXXXX. +++++", -"+++++OXXXXXXXX. +++++", -"+++++OXXXXXXXX. +++++", -"+++++OXXXXXXXX. +++++", -"+++++OXXXXXXXX. +++++", -"+++++OXXXXXXXX. +++++", -"+++++OXXXXXXXX. +++++", -"+++++OX........ +++++", -"+++++O +++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++" -}; diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/clist.xpm b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/clist.xpm deleted file mode 100644 index 2dd61e709..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/clist.xpm +++ /dev/null @@ -1,30 +0,0 @@ -/* XPM */ -static char *clist_xpm[] = { -/* columns rows colors chars-per-pixel */ -"21 21 3 1", -" c Gray0", -". c Gray87", -"X c Gray100", -/* pixels */ -" ", -" ...... ...... ..... ", -" ...... ...... ..... ", -" ...... ...... ..... ", -" ", -" XXXXXX XXXXXX XXXXX ", -" XXXXXX XXXXXX XXXXX ", -" XXXXXX XXXXXX XXXXX ", -" ", -" XXXXXX XXXXXX XXXXX ", -" XXXXXX XXXXXX XXXXX ", -" XXXXXX XXXXXX XXXXX ", -" ", -" XXXXXX XXXXXX XXXXX ", -" XXXXXX XXXXXX XXXXX ", -" XXXXXX XXXXXX XXXXX ", -" ", -" XXXXXX XXXXXX XXXXX ", -" XXXXXX XXXXXX XXXXX ", -" XXXXXX XXXXXX XXXXX ", -" " -}; diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/colorselection.xpm b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/colorselection.xpm deleted file mode 100644 index 0bb0914d0..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/colorselection.xpm +++ /dev/null @@ -1,35 +0,0 @@ -/* XPM */ -static char *colorselection_xpm[] = { -/* columns rows colors chars-per-pixel */ -"21 21 8 1", -" c Gray0", -". c #7b7b7b", -"X c Blue", -"o c Green", -"O c Red", -"+ c #b3cece", -"@ c Gray100", -"# c None", -/* pixels */ -"#####################", -"#####################", -"#####################", -"#####################", -"#####################", -"##................###", -"##.@@@@@@@@@@@@@@. ##", -"##.@@@@@@@@@@@@@@. ##", -"##.@@@@@@@@@@@@@@. ##", -"##.@@OOOoooXXX@@@. ##", -"##.@@OOOoooXXX@@@. ##", -"##.@@OOOoooXXX@@@. ##", -"##.@@OOOoooXXX@@@. ##", -"##.@@@@@@@@@@@@@@. ##", -"##.@@@@@@@@@@@@@@. ##", -"##.@@@@@@@@@@@@@@. ##", -"##................ ##", -"### ##", -"#####################", -"#####################", -"#####################" -}; diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/combo.xpm b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/combo.xpm deleted file mode 100644 index 3b4055b6d..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/combo.xpm +++ /dev/null @@ -1,34 +0,0 @@ -/* XPM */ -static char *combo_xpm[] = { -/* columns rows colors chars-per-pixel */ -"21 21 7 1", -" c Gray0", -". c #7b7b7b", -"X c #d6d6d6", -"o c #b3cece", -"O c Gray87", -"+ c Gray100", -"@ c None", -/* pixels */ -"@@@@@@@@@@@@@@@@@@@@@", -" ", -" +++++++++++++ OOOOO ", -" +++++++++++++ OOO ", -" +++++++++++++ O ", -" ", -" +++++++++++++ ++++++", -" +++++++++++++ XXXXX ", -" +.........+++ XX XX ", -" +++++++++++++ X X ", -" +++++++++++++ XXXXX ", -" +...........+ ", -" +++++++++++++ +++++ ", -" +++++++++++++ +XXXX ", -" +..........++ ..... ", -" +++++++++++++ +++++ ", -" +++++++++++++ XXXXX ", -" +...........+ X X ", -" +++++++++++++ XX XX ", -" +++++++++++++ XXXXX ", -" " -}; diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/common.mli b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/common.mli deleted file mode 100644 index 7050f9f94..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/common.mli +++ /dev/null @@ -1,27 +0,0 @@ -(* $Id$ *) - -type range = - | String - | Int - | Float of float * float - | Enum of string list - | Enum_string of string list - | Adjust - | CList_titles - | File - -class type prop = - object - method name : string (* name of the property *) - method range : range (* range of its values *) - method get : string (* current value *) - method set : string -> unit (* change value *) - method modified : bool (* value differs from default *) - method code : string (* encoded value for the ml code *) - method save_code : string (* encoded value for saving *) - end - -class type tiwidget_base = object - method name : string - method proplist : (string * prop) list -end diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/entry.xpm b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/entry.xpm deleted file mode 100644 index cb9004135..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/entry.xpm +++ /dev/null @@ -1,33 +0,0 @@ -/* XPM */ -static char *entry_xpm[] = { -/* columns rows colors chars-per-pixel */ -"21 21 6 1", -" c Gray0", -". c #7b7b7b", -"X c #d6d6d6", -"o c #b3cece", -"O c Gray100", -"+ c None", -/* pixels */ -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"....................O", -". XO", -". OOOOOOOOOOOOOOOOOXO", -". OOOOOOOOOOOOOOO OXO", -". OOOOOOOO OOOOOO OXO", -". OOOOOOOO OOOOOO OXO", -". OOO OO X OOO OXO", -". OO XOX O O. OO OXO", -". OOOOOO O OOO OO OXO", -". OOO O OOO OO OXO", -". OO XOO O OOO OO OXO", -". OO XOO O OO. OO OXO", -". OOO O OOO OXO", -". OOOOOOOOOOOOOOO OXO", -". OOOOOOOOOOOOOOOOOXO", -".XXXXXXXXXXXXXXXXXXXO", -"OOOOOOOOOOOOOOOOOOOOO", -"+++++++++++++++++++++", -"+++++++++++++++++++++" -}; diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/eventbox.xpm b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/eventbox.xpm deleted file mode 100644 index 73da445d2..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/eventbox.xpm +++ /dev/null @@ -1,34 +0,0 @@ -/* XPM */ -static char *eventbox_xpm[] = { -/* columns rows colors chars-per-pixel */ -"21 21 7 1", -" c Gray0", -". c #7b7b7b", -"X c Blue", -"o c #d6d6d6", -"O c #b3cece", -"+ c Gray100", -"@ c None", -/* pixels */ -"@@@@@@@@@@X+@@@@@@@@@", -"@@@@@@@@@XX+@@@@@@@@@", -"@@@@@@@@XX+@@@@@@@@@@", -"@@@@@@@XX+@@@@@@@@@@@", -"@@@@@@@@XX+@@@@@@@@@@", -"@@@@@@@@@XX+@@@@@@@@@", -"@@@@@@@@@@XX+@@@@@@@@", -"@@@++++++XX++++++ @@@", -"@@@+ooooXX+ooooo. @@@", -"@@@+oooXX+oooooo. @@@", -"@@@+ooooXX+ooooo. @@@", -"@@@+oooooXX+oooo. @@@", -"@@@+ooooooXX+ooo. @@@", -"@@@+oooooooooooo. @@@", -"@@@+oooooooooooo. @@@", -"@@@+oooooooooooo. @@@", -"@@@+............. @@@", -"@@@ @@@", -"@@@@@@@@@@@@@@@@@@@@@", -"@@@@@@@@@@@@@@@@@@@@@", -"@@@@@@@@@@@@@@@@@@@@@" -}; diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/fixed.xpm b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/fixed.xpm deleted file mode 100644 index 2e0481572..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/fixed.xpm +++ /dev/null @@ -1,31 +0,0 @@ -/* XPM */ -static char *fixed_xpm[] = { -/* columns rows colors chars-per-pixel */ -"21 21 4 1", -" c Gray0", -". c #7b7b7b", -"X c #d6d6d6", -"o c Gray100", -/* pixels */ -"oooooooooooooooooooo ", -"oXXXXXXXXXXXXXXXXXX. ", -"oXXXXXXXXXXXXXXXXXX. ", -"oXooooo XXXXXXXXXXX. ", -"oXoXXX. XXXXXXXXXXX. ", -"oXoXXX. XXXXooooo X. ", -"oXo.... XXXXoXXX. X. ", -"oX XXXXoXXX. X. ", -"oXXXXXXXXXXXo.... X. ", -"oXXXXXXXXXXX X. ", -"oXXXXXXXXXXXXXXXXXX. ", -"oXXXXooooo XXXXXXXX. ", -"oXXXXoXXX. XXXXXXXX. ", -"oXXXXoXXX. XXXXXXXX. ", -"oXXXXo.... XXXXXXXX. ", -"oXXXX XXXXXXXX. ", -"oXXXXXXXXXXXXXXXXXX. ", -"oXXXXXXXXXXXXXXXXXX. ", -"oXXXXXXXXXXXXXXXXXX. ", -"o................... ", -" " -}; diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/frame.xpm b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/frame.xpm deleted file mode 100644 index c8c8b5782..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/frame.xpm +++ /dev/null @@ -1,33 +0,0 @@ -/* XPM */ -static char *frame_xpm[] = { -/* columns rows colors chars-per-pixel */ -"21 21 6 1", -" c Gray0", -". c #7b7b7b", -"X c #d6d6d6", -"o c #b3cece", -"O c Gray100", -"+ c None", -/* pixels */ -"+++++++++++++++++++++", -"+++++ + +++++++++++", -"+...X X X X......O+", -"+.OOX X X XOOOOO.O+", -"+.OXX X X XXXXXX.O+", -"+.OXXXXXXXXXXXXXXX.O+", -"+.OXXXXXXXXXXXXXXX.O+", -"+.OXXXXXXXXXXXXXXX.O+", -"+.OXXXXXXXXXXXXXXX.O+", -"+.OXXXXXXXXXXXXXXX.O+", -"+.OXXXXXXXXXXXXXXX.O+", -"+.OXXXXXXXXXXXXXXX.O+", -"+.OXXXXXXXXXXXXXXX.O+", -"+.OXXXXXXXXXXXXXXX.O+", -"+.OXXXXXXXXXXXXXXX.O+", -"+.OXXXXXXXXXXXXXXX.O+", -"+.OXXXXXXXXXXXXXXX.O+", -"+.OXXXXXXXXXXXXXXX.O+", -"+..................O+", -"+OOOOOOOOOOOOOOOOOOO+", -"+++++++++++++++++++++" -}; diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/gToolbar2.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/gToolbar2.ml deleted file mode 100644 index c2ad0a854..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/gToolbar2.ml +++ /dev/null @@ -1,65 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gtk -open GtkBase -open GtkButton -open GObj -open GContainer -open GButton - -module Toolbar2 = struct - external set_text : [>`toolbar] obj -> string -> int -> unit = - "ml_gtk_toolbar2_set_text" - external set_icon : [>`toolbar] obj -> [>`widget] obj -> int -> unit = - "ml_gtk_toolbar2_set_icon" -end - -class toolbar2 obj = object - inherit container_full (obj : Gtk.toolbar obj) - method insert_widget ?tooltip ?tooltip_private ?pos w = - Toolbar.insert_widget obj (as_widget w) ?tooltip ?tooltip_private ?pos - - method insert_button ?text ?tooltip ?tooltip_private ?icon - ?pos ?callback () = - let icon = may_map icon ~f:as_widget in - new button - (Toolbar.insert_button obj ~kind:`BUTTON ?icon ?text - ?tooltip ?tooltip_private ?pos ?callback ()) - - method insert_toggle_button ?text ?tooltip ?tooltip_private ?icon - ?pos ?callback () = - let icon = may_map icon ~f:as_widget in - new toggle_button - (ToggleButton.cast - (Toolbar.insert_button obj ~kind:`TOGGLEBUTTON ?icon ?text - ?tooltip ?tooltip_private ?pos ?callback ())) - - method insert_radio_button ?text ?tooltip ?tooltip_private ?icon - ?pos ?callback () = - let icon = may_map icon ~f:as_widget in - new radio_button - (RadioButton.cast - (Toolbar.insert_button obj ~kind:`RADIOBUTTON ?icon ?text - ?tooltip ?tooltip_private ?pos ?callback ())) - - method insert_space = Toolbar.insert_space obj - - method set_orientation = Toolbar.set_orientation obj - method set_style = Toolbar.set_style obj - method set_space_size = Toolbar.set_space_size obj - method set_space_style = Toolbar.set_space_style obj - method set_tooltips = Toolbar.set_tooltips obj - method set_button_relief = Toolbar.set_button_relief obj - method button_relief = Toolbar.get_button_relief obj - method set_text = Toolbar2.set_text obj - method set_icon (icon : widget) = Toolbar2.set_icon obj icon#as_widget -end - -let toolbar2 ?(orientation=`HORIZONTAL) ?style - ?space_size ?space_style ?tooltips ?button_relief - ?border_width ?width ?height ?packing ?show () = - let w = Toolbar.create orientation ?style () in - Toolbar.set w ?space_size ?space_style ?tooltips ?button_relief; - Container.set w ?border_width ?width ?height; - pack_return (new toolbar2 w) ~packing ~show diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/gTree2.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/gTree2.ml deleted file mode 100644 index 62c38ac57..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/gTree2.ml +++ /dev/null @@ -1,78 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gtk -open GtkBase -open GtkTree2 -open GObj -open GContainer - -class tree_item_signals obj = object - inherit item_signals obj - method expand = GtkSignal.connect obj ~sgn:TreeItem.Signals.expand ~after - method collapse = GtkSignal.connect obj ~sgn:TreeItem.Signals.collapse ~after -end - -class tree_item obj = object - inherit container obj - method event = new GObj.event_ops obj - method as_item : Gtk.tree_item obj = obj - method connect = new tree_item_signals obj - method set_subtree (w : tree) = TreeItem.set_subtree obj w#as_tree - method remove_subtree () = TreeItem.remove_subtree obj - method expand () = TreeItem.expand obj - method collapse () = TreeItem.collapse obj - method subtree = - try Some(new tree (TreeItem.subtree obj)) with Gpointer.Null -> None -end - -and tree_signals obj = object - inherit container_signals obj - method selection_changed = - GtkSignal.connect obj ~sgn:Tree.Signals.selection_changed ~after - method select_child ~callback = - GtkSignal.connect obj ~sgn:Tree.Signals.select_child ~after - ~callback:(fun w -> callback (new tree_item (TreeItem.cast w))) - method unselect_child ~callback = - GtkSignal.connect obj ~sgn:Tree.Signals.unselect_child ~after - ~callback:(fun w -> callback (new tree_item (TreeItem.cast w))) -end - -and tree obj = object (self) - inherit [tree_item] item_container obj - method event = new GObj.event_ops obj - method as_tree = Tree.coerce obj - method insert w ~pos = Tree.insert obj w#as_item ~pos - method connect = new tree_signals obj - method clear_items = Tree.clear_items obj - method select_item = Tree.select_item obj - method unselect_item = Tree.unselect_item obj - method child_position (w : tree_item) = Tree.child_position obj w#as_item - method remove_items items = - Tree.remove_items obj - (List.map ~f:(fun (t : tree_item) -> t#as_item) items) -(* method set_selection_mode = Tree.set_selection_mode obj - method set_view_mode = Tree.set_view_mode obj *) - method set_view_lines = Tree.set_view_lines obj - method selection = - List.map ~f:(fun w -> self#wrap (Widget.coerce w)) (Tree.selection obj) - method item_up ~pos = - Tree.item_up obj pos - method private wrap w = - new tree_item (TreeItem.cast w) -end - -let tree_item ?label ?border_width ?width ?height ?packing ?show () = - let w = TreeItem.create ?label () in - Container.set w ?border_width ?width ?height; - let self = new tree_item w in - may packing ~f:(fun f -> (f self : unit)); - if show <> Some false then self#misc#show (); - self - -let tree ?selection_mode ?view_mode ?view_lines - ?border_width ?width ?height ?packing ?show () = - let w = Tree.create () in - Tree.set w ?selection_mode ?view_mode ?view_lines; - Container.set w ?border_width ?width ?height; - pack_return (new tree w) ~packing ~show diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/gTree2.mli b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/gTree2.mli deleted file mode 100644 index c288e157e..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/gTree2.mli +++ /dev/null @@ -1,73 +0,0 @@ -(* $Id$ *) - -open Gtk -open GObj -open GContainer - -class tree_item_signals : 'a obj -> - object - inherit item_signals - constraint 'a = [>`treeitem|`container|`item|`widget] - val obj : 'a obj - method collapse : callback:(unit -> unit) -> GtkSignal.id - method expand : callback:(unit -> unit) -> GtkSignal.id - end - -class tree_item : Gtk.tree_item obj -> - object - inherit GContainer.container - val obj : Gtk.tree_item obj - method event : event_ops - method as_item : Gtk.tree_item obj - method collapse : unit -> unit - method connect : tree_item_signals - method expand : unit -> unit - method remove_subtree : unit -> unit - method set_subtree : tree -> unit - method subtree : tree option - end - -and tree_signals : Gtk.tree obj -> - object - inherit container_signals - val obj : Gtk.tree obj - method select_child : callback:(tree_item -> unit) -> GtkSignal.id - method selection_changed : callback:(unit -> unit) -> GtkSignal.id - method unselect_child : callback:(tree_item -> unit) -> GtkSignal.id - end - -and tree : Gtk.tree obj -> - object - inherit [tree_item] item_container - val obj : Gtk.tree obj - method event : event_ops - method as_tree : Gtk.tree obj - method child_position : tree_item -> int - method clear_items : start:int -> stop:int -> unit - method connect : tree_signals - method insert : tree_item -> pos:int -> unit - method item_up : pos:int -> unit - method remove_items : tree_item list -> unit - method select_item : pos:int -> unit - method selection : tree_item list -(* method set_selection_mode : Tags.selection_mode -> unit *) - method set_view_lines : bool -> unit -(* method set_view_mode : [`LINE|`ITEM] -> unit *) - method unselect_item : pos:int -> unit - method private wrap : Gtk.widget obj -> tree_item - end - -val tree_item : - ?label:string -> - ?border_width:int -> - ?width:int -> - ?height:int -> - ?packing:(tree_item -> unit) -> ?show:bool -> unit -> tree_item - -val tree : - ?selection_mode:Tags.selection_mode -> - ?view_mode:[`LINE|`ITEM] -> - ?view_lines:bool -> - ?border_width:int -> - ?width:int -> - ?height:int -> ?packing:(GObj.widget -> unit) -> ?show:bool -> unit -> tree diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/gtkTree2.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/gtkTree2.ml deleted file mode 100644 index 46d1e0220..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/gtkTree2.ml +++ /dev/null @@ -1,82 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gtk -open Tags -open GtkBase - -module TreeItem = struct - let cast w : tree_item obj = - if Object.is_a w "GtkTreeItem" then Obj.magic w - else invalid_arg "Gtk.TreeItem.cast" - external create : unit -> tree_item obj = "ml_gtk_tree_item2_new" - external create_with_label : string -> tree_item obj - = "ml_gtk_tree_item2_new_with_label" - let create ?label () = - match label with None -> create () - | Some label -> create_with_label label - external set_subtree : [>`treeitem] obj -> [>`widget] obj -> unit - = "ml_gtk_tree_item2_set_subtree" - external remove_subtree : [>`treeitem] obj -> unit - = "ml_gtk_tree_item2_remove_subtree" - external expand : [>`treeitem] obj -> unit - = "ml_gtk_tree_item2_expand" - external collapse : [>`treeitem] obj -> unit - = "ml_gtk_tree_item2_collapse" - external subtree : [>`treeitem] obj -> tree obj - = "ml_GTK_TREE_ITEM2_SUBTREE" - let subtree t = try subtree t with Gpointer.Null -> raise Not_found - module Signals = struct - open GtkSignal - let expand : ([>`treeitem],_) t = - { name = "expand"; marshaller = marshal_unit } - let collapse : ([>`treeitem],_) t = - { name = "collapse"; marshaller = marshal_unit } - end -end - -module Tree = struct - let cast w : tree obj = - if Object.is_a w "GtkTree" then Obj.magic w - else invalid_arg "Gtk.Tree.cast" - external coerce : [>`tree] obj -> tree obj = "%identity" - external create : unit -> tree obj = "ml_gtk_tree2_new" - external insert : [>`tree] obj -> [>`treeitem] obj -> pos:int -> unit - = "ml_gtk_tree2_insert" - external remove_items : [>`tree] obj -> [>`treeitem] obj list -> unit - = "ml_gtk_tree2_remove_items" - external clear_items : [>`tree] obj -> start:int -> stop:int -> unit - = "ml_gtk_tree2_clear_items" - external select_item : [>`tree] obj -> pos:int -> unit - = "ml_gtk_tree2_select_item" - external unselect_item : [>`tree] obj -> pos:int -> unit - = "ml_gtk_tree2_unselect_item" - external child_position : [>`tree] obj -> [>`treeitem] obj -> int - = "ml_gtk_tree2_child_position" -(* external set_selection_mode : [>`tree] obj -> selection_mode -> unit - = "ml_gtk_tree2_set_selection_mode" - external set_view_mode : [>`tree] obj -> [`LINE|`ITEM] -> unit - = "ml_gtk_tree2_set_view_mode" -*) - external set_view_lines : [>`tree] obj -> bool -> unit - = "ml_gtk_tree2_set_view_lines" - external selection : [>`tree] obj -> tree_item obj list = - "ml_gtk_tree2_selection" - external item_up : [>`tree] obj -> int -> unit = - "ml_gtk_tree2_item_up" - - let set ?selection_mode ?view_mode ?view_lines w = - let may_set f = may ~f:(f w) in -(* may_set set_selection_mode selection_mode; - may_set set_view_mode view_mode; *) - may_set set_view_lines view_lines - module Signals = struct - open GtkSignal - let selection_changed : ([>`tree],_) t = - { name = "selection_changed"; marshaller = marshal_unit } - let select_child : ([>`tree],_) t = - { name = "select_child"; marshaller = Widget.Signals.marshal } - let unselect_child : ([>`tree],_) t = - { name = "unselect_child"; marshaller = Widget.Signals.marshal } - end -end diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/gtktree2.c b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/gtktree2.c deleted file mode 100644 index db37a1f9d..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/gtktree2.c +++ /dev/null @@ -1,1385 +0,0 @@ -/* GTK - The GIMP Toolkit - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GTK+ Team and others 1997-1999. See the AUTHORS - * file for a list of people on the GTK+ Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GTK+ at ftp://ftp.gtk.org/pub/gtk/. - */ - -#include "gtktree2.h" -#include "gtktreeitem2.h" - -#include -#include -#include - -enum { - SELECTION_CHANGED, - SELECT_CHILD, - UNSELECT_CHILD, - LAST_SIGNAL -}; - -static void gtk_tree2_class_init (GtkTree2Class *klass); -static void gtk_tree2_init (GtkTree2 *tree); -static void gtk_tree2_destroy (GtkObject *object); -static void gtk_tree2_map (GtkWidget *widget); -static void gtk_tree2_unmap (GtkWidget *widget); -static void gtk_tree2_realize (GtkWidget *widget); -static void gtk_tree2_draw (GtkWidget *widget, - GdkRectangle *area); -static gint gtk_tree2_expose (GtkWidget *widget, - GdkEventExpose *event); -static gint gtk_tree2_motion_notify (GtkWidget *widget, - GdkEventMotion *event); -static gint gtk_tree2_button_press (GtkWidget *widget, - GdkEventButton *event); -static gint gtk_tree2_button_release (GtkWidget *widget, - GdkEventButton *event); -static void gtk_tree2_size_request (GtkWidget *widget, - GtkRequisition *requisition); -static void gtk_tree2_size_allocate (GtkWidget *widget, - GtkAllocation *allocation); -static void gtk_tree2_add (GtkContainer *container, - GtkWidget *widget); -static void gtk_tree2_forall (GtkContainer *container, - gboolean include_internals, - GtkCallback callback, - gpointer callback_data); - -static void gtk_real_tree2_select_child (GtkTree2 *tree, - GtkWidget *child); -static void gtk_real_tree2_unselect_child (GtkTree2 *tree, - GtkWidget *child); - -static GtkType gtk_tree2_child_type (GtkContainer *container); - -static GtkContainerClass *parent_class = NULL; -static guint tree_signals[LAST_SIGNAL] = { 0 }; - -GtkType -gtk_tree2_get_type (void) -{ - static GtkType tree_type = 0; - - if (!tree_type) - { - static const GtkTypeInfo tree_info = - { - "GtkTree2", - sizeof (GtkTree2), - sizeof (GtkTree2Class), - (GtkClassInitFunc) gtk_tree2_class_init, - (GtkObjectInitFunc) gtk_tree2_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, - }; - - tree_type = gtk_type_unique (gtk_container_get_type (), &tree_info); - } - - return tree_type; -} - -static void -gtk_tree2_class_init (GtkTree2Class *class) -{ - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - GtkContainerClass *container_class; - - object_class = (GtkObjectClass*) class; - widget_class = (GtkWidgetClass*) class; - container_class = (GtkContainerClass*) class; - - parent_class = gtk_type_class (gtk_container_get_type ()); - - tree_signals[SELECTION_CHANGED] = - gtk_signal_new ("selection_changed", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (GtkTree2Class, selection_changed), - gtk_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - tree_signals[SELECT_CHILD] = - gtk_signal_new ("select_child", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (GtkTree2Class, select_child), - gtk_marshal_NONE__POINTER, - GTK_TYPE_NONE, 1, - GTK_TYPE_WIDGET); - tree_signals[UNSELECT_CHILD] = - gtk_signal_new ("unselect_child", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (GtkTree2Class, unselect_child), - gtk_marshal_NONE__POINTER, - GTK_TYPE_NONE, 1, - GTK_TYPE_WIDGET); - - gtk_object_class_add_signals (object_class, tree_signals, LAST_SIGNAL); - - object_class->destroy = gtk_tree2_destroy; - - widget_class->map = gtk_tree2_map; - widget_class->unmap = gtk_tree2_unmap; - widget_class->realize = gtk_tree2_realize; - widget_class->draw = gtk_tree2_draw; - widget_class->expose_event = gtk_tree2_expose; - widget_class->motion_notify_event = gtk_tree2_motion_notify; - widget_class->button_press_event = gtk_tree2_button_press; - widget_class->button_release_event = gtk_tree2_button_release; - widget_class->size_request = gtk_tree2_size_request; - widget_class->size_allocate = gtk_tree2_size_allocate; - - container_class->add = gtk_tree2_add; - container_class->remove = - (void (*)(GtkContainer *, GtkWidget *)) gtk_tree2_remove_item; - container_class->forall = gtk_tree2_forall; - container_class->child_type = gtk_tree2_child_type; - - class->selection_changed = NULL; - class->select_child = gtk_real_tree2_select_child; - class->unselect_child = gtk_real_tree2_unselect_child; -} - -static GtkType -gtk_tree2_child_type (GtkContainer *container) -{ - return GTK_TYPE_TREE_ITEM2; -} - -static void -gtk_tree2_init (GtkTree2 *tree) -{ - tree->children = NULL; - tree->root_tree = NULL; - tree->selection = NULL; - tree->tree_owner = NULL; - tree->selection_mode = GTK_SELECTION_SINGLE; - tree->indent_value = 9; - tree->current_indent = 0; - tree->level = 0; - tree->view_mode = GTK_TREE2_VIEW_LINE; - tree->view_line = 1; -} - -GtkWidget* -gtk_tree2_new (void) -{ - return GTK_WIDGET (gtk_type_new (gtk_tree2_get_type ())); -} - -void -gtk_tree2_append (GtkTree2 *tree, - GtkWidget *tree_item) -{ - g_return_if_fail (tree != NULL); - g_return_if_fail (GTK_IS_TREE2 (tree)); - g_return_if_fail (tree_item != NULL); - g_return_if_fail (GTK_IS_TREE_ITEM2 (tree_item)); - - gtk_tree2_insert (tree, tree_item, -1); -} - -void -gtk_tree2_prepend (GtkTree2 *tree, - GtkWidget *tree_item) -{ - g_return_if_fail (tree != NULL); - g_return_if_fail (GTK_IS_TREE2 (tree)); - g_return_if_fail (tree_item != NULL); - g_return_if_fail (GTK_IS_TREE_ITEM2 (tree_item)); - - gtk_tree2_insert (tree, tree_item, 0); -} - -void -gtk_tree2_insert (GtkTree2 *tree, - GtkWidget *tree_item, - gint position) -{ - gint nchildren; - - g_return_if_fail (tree != NULL); - g_return_if_fail (GTK_IS_TREE2 (tree)); - g_return_if_fail (tree_item != NULL); - g_return_if_fail (GTK_IS_TREE_ITEM2 (tree_item)); - - nchildren = g_list_length (tree->children); - - if ((position < 0) || (position > nchildren)) - position = nchildren; - - if (position == nchildren) - tree->children = g_list_append (tree->children, tree_item); - else - tree->children = g_list_insert (tree->children, tree_item, position); - - gtk_widget_set_parent (tree_item, GTK_WIDGET (tree)); - - if (GTK_WIDGET_REALIZED (tree_item->parent)) - gtk_widget_realize (tree_item); - - if (GTK_WIDGET_VISIBLE (tree_item->parent) && GTK_WIDGET_VISIBLE (tree_item)) - { - if (GTK_WIDGET_MAPPED (tree_item->parent)) - gtk_widget_map (tree_item); - - gtk_widget_queue_resize (tree_item); - } -} - -/* moves the pos child up in the tree */ -void -gtk_tree2_item_up (GtkTree2 *tree, - gint position) -{ - gint nchildren, i; - GList *children, *tmp; - - g_return_if_fail (tree != NULL); - g_return_if_fail (GTK_IS_TREE2 (tree)); - - children = (tree->children); - nchildren = g_list_length (tree->children); - - if ((position < 1) || (position >= nchildren)) - return; - - for (i=1; i < position; i++) - children = (children->next); - - tmp = children->next; - if (position == 1) - { - tree->children = children->next; - children->next->prev = NULL; - } - else - { - children->prev->next = children->next; - children->next->prev = children->prev; - } - children->next = tmp->next; - children->prev = tmp; - if (tmp->next) - tmp->next->prev = children; - tmp->next = children; - - if (GTK_WIDGET_VISIBLE (tree)) - { -/* if (GTK_WIDGET_VISIBLE (GTK_WIDGET(children->data))) - gtk_widget_queue_resize (GTK_WIDGET(children->data)); - if (GTK_WIDGET_VISIBLE (GTK_WIDGET(tmp->data))) - gtk_widget_queue_resize (GTK_WIDGET(tmp->data)); -*/ - gtk_widget_queue_resize (GTK_WIDGET(tree)); - } -} - -static void -gtk_tree2_add (GtkContainer *container, - GtkWidget *child) -{ - GtkTree2 *tree; - - g_return_if_fail (container != NULL); - g_return_if_fail (GTK_IS_TREE2 (container)); - g_return_if_fail (GTK_IS_TREE_ITEM2 (child)); - - tree = GTK_TREE2 (container); - - tree->children = g_list_append (tree->children, child); - - gtk_widget_set_parent (child, GTK_WIDGET (container)); - - if (GTK_WIDGET_REALIZED (child->parent)) - gtk_widget_realize (child); - - if (GTK_WIDGET_VISIBLE (child->parent) && GTK_WIDGET_VISIBLE (child)) - { - if (GTK_WIDGET_MAPPED (child->parent)) - gtk_widget_map (child); - - gtk_widget_queue_resize (child); - } - - if (!tree->selection && (tree->selection_mode == GTK_SELECTION_BROWSE)) - gtk_tree2_select_child (tree, child); -} - -static gint -gtk_tree2_button_press (GtkWidget *widget, - GdkEventButton *event) -{ - GtkTree2 *tree; - GtkWidget *item; - - g_return_val_if_fail (widget != NULL, FALSE); - g_return_val_if_fail (GTK_IS_TREE2 (widget), FALSE); - g_return_val_if_fail (event != NULL, FALSE); - - tree = GTK_TREE2 (widget); - item = gtk_get_event_widget ((GdkEvent*) event); - - while (item && !GTK_IS_TREE_ITEM2 (item)) - item = item->parent; - - if (!item || (item->parent != widget)) - return FALSE; - - switch(event->button) - { - case 1: - gtk_tree2_select_child (tree, item); - break; - case 2: - if(GTK_TREE_ITEM2(item)->subtree) gtk_tree_item2_expand(GTK_TREE_ITEM2(item)); - break; - case 3: - if(GTK_TREE_ITEM2(item)->subtree) gtk_tree_item2_collapse(GTK_TREE_ITEM2(item)); - break; - } - - return TRUE; -} - -static gint -gtk_tree2_button_release (GtkWidget *widget, - GdkEventButton *event) -{ - GtkTree2 *tree; - GtkWidget *item; - - g_return_val_if_fail (widget != NULL, FALSE); - g_return_val_if_fail (GTK_IS_TREE2 (widget), FALSE); - g_return_val_if_fail (event != NULL, FALSE); - - tree = GTK_TREE2 (widget); - item = gtk_get_event_widget ((GdkEvent*) event); - - return TRUE; -} - -gint -gtk_tree2_child_position (GtkTree2 *tree, - GtkWidget *child) -{ - GList *children; - gint pos; - - - g_return_val_if_fail (tree != NULL, -1); - g_return_val_if_fail (GTK_IS_TREE2 (tree), -1); - g_return_val_if_fail (child != NULL, -1); - - pos = 0; - children = tree->children; - - while (children) - { - if (child == GTK_WIDGET (children->data)) - return pos; - - pos += 1; - children = children->next; - } - - - return -1; -} - -void -gtk_tree2_clear_items (GtkTree2 *tree, - gint start, - gint end) -{ - GtkWidget *widget; - GList *clear_list; - GList *tmp_list; - guint nchildren; - guint index; - - g_return_if_fail (tree != NULL); - g_return_if_fail (GTK_IS_TREE2 (tree)); - - nchildren = g_list_length (tree->children); - - if (nchildren > 0) - { - if ((end < 0) || (end > nchildren)) - end = nchildren; - - if (start >= end) - return; - - tmp_list = g_list_nth (tree->children, start); - clear_list = NULL; - index = start; - while (tmp_list && index <= end) - { - widget = tmp_list->data; - tmp_list = tmp_list->next; - index++; - - clear_list = g_list_prepend (clear_list, widget); - } - - gtk_tree2_remove_items (tree, clear_list); - } -} - -static void -gtk_tree2_destroy (GtkObject *object) -{ - GtkTree2 *tree; - GtkWidget *child; - GList *children; - - g_return_if_fail (object != NULL); - g_return_if_fail (GTK_IS_TREE2 (object)); - - tree = GTK_TREE2 (object); - - children = tree->children; - while (children) - { - child = children->data; - children = children->next; - - gtk_widget_ref (child); - gtk_widget_unparent (child); - gtk_widget_destroy (child); - gtk_widget_unref (child); - } - - g_list_free (tree->children); - tree->children = NULL; - - if (tree->root_tree == tree) - { - GList *node; - for (node = tree->selection; node; node = node->next) - gtk_widget_unref ((GtkWidget *)node->data); - g_list_free (tree->selection); - tree->selection = NULL; - } - - if (GTK_OBJECT_CLASS (parent_class)->destroy) - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); -} - -static void -gtk_tree2_draw (GtkWidget *widget, - GdkRectangle *area) -{ - GtkTree2 *tree; - GtkWidget *subtree; - GtkWidget *child; - GdkRectangle child_area; - GList *children; - - - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_TREE2 (widget)); - g_return_if_fail (area != NULL); - - if (GTK_WIDGET_DRAWABLE (widget)) - { - tree = GTK_TREE2 (widget); - - children = tree->children; - while (children) - { - child = children->data; - children = children->next; - - if (gtk_widget_intersect (child, area, &child_area)) - gtk_widget_draw (child, &child_area); - - if((subtree = GTK_TREE_ITEM2(child)->subtree) && - GTK_WIDGET_VISIBLE(subtree) && - gtk_widget_intersect (subtree, area, &child_area)) - gtk_widget_draw (subtree, &child_area); - } - } - -} - -static gint -gtk_tree2_expose (GtkWidget *widget, - GdkEventExpose *event) -{ - GtkTree2 *tree; - GtkWidget *child; - GdkEventExpose child_event; - GList *children; - - - g_return_val_if_fail (widget != NULL, FALSE); - g_return_val_if_fail (GTK_IS_TREE2 (widget), FALSE); - g_return_val_if_fail (event != NULL, FALSE); - - if (GTK_WIDGET_DRAWABLE (widget)) - { - tree = GTK_TREE2 (widget); - - child_event = *event; - - children = tree->children; - while (children) - { - child = children->data; - children = children->next; - - if (GTK_WIDGET_NO_WINDOW (child) && - gtk_widget_intersect (child, &event->area, &child_event.area)) - gtk_widget_event (child, (GdkEvent*) &child_event); - } - } - - - return FALSE; -} - -static void -gtk_tree2_forall (GtkContainer *container, - gboolean include_internals, - GtkCallback callback, - gpointer callback_data) -{ - GtkTree2 *tree; - GtkWidget *child; - GList *children; - - - g_return_if_fail (container != NULL); - g_return_if_fail (GTK_IS_TREE2 (container)); - g_return_if_fail (callback != NULL); - - tree = GTK_TREE2 (container); - children = tree->children; - - while (children) - { - child = children->data; - children = children->next; - - (* callback) (child, callback_data); - - if (include_internals && GTK_TREE_ITEM2(child)->subtree) - (* callback) (GTK_TREE_ITEM2(child)->subtree, callback_data); - } -} - -static void -gtk_tree2_map (GtkWidget *widget) -{ - GtkTree2 *tree; - GtkWidget *child; - GList *children; - - - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_TREE2 (widget)); - - GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED); - tree = GTK_TREE2 (widget); - - if(GTK_IS_TREE2(widget->parent)) - { - /* set root tree for this tree */ - tree->root_tree = GTK_TREE2(widget->parent)->root_tree; - - tree->level = GTK_TREE2(GTK_WIDGET(tree)->parent)->level+1; - tree->indent_value = GTK_TREE2(GTK_WIDGET(tree)->parent)->indent_value; - tree->current_indent = GTK_TREE2(GTK_WIDGET(tree)->parent)->current_indent + - tree->indent_value; - tree->view_mode = GTK_TREE2(GTK_WIDGET(tree)->parent)->view_mode; - tree->view_line = GTK_TREE2(GTK_WIDGET(tree)->parent)->view_line; - } - else - tree->root_tree = tree; - - children = tree->children; - while (children) - { - child = children->data; - children = children->next; - - if (GTK_WIDGET_VISIBLE (child) && - !GTK_WIDGET_MAPPED (child)) - gtk_widget_map (child); - - if (GTK_TREE_ITEM2 (child)->subtree) - { - child = GTK_WIDGET (GTK_TREE_ITEM2 (child)->subtree); - - if (GTK_WIDGET_VISIBLE (child) && !GTK_WIDGET_MAPPED (child)) - gtk_widget_map (child); - } - } - - gdk_window_show (widget->window); -} - -static gint -gtk_tree2_motion_notify (GtkWidget *widget, - GdkEventMotion *event) -{ - g_return_val_if_fail (widget != NULL, FALSE); - g_return_val_if_fail (GTK_IS_TREE2 (widget), FALSE); - g_return_val_if_fail (event != NULL, FALSE); - -#ifdef TREE_DEBUG - g_message("gtk_tree2_motion_notify\n"); -#endif /* TREE_DEBUG */ - - return FALSE; -} - -static void -gtk_tree2_realize (GtkWidget *widget) -{ - GdkWindowAttr attributes; - gint attributes_mask; - - - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_TREE2 (widget)); - - GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); - - attributes.window_type = GDK_WINDOW_CHILD; - attributes.x = widget->allocation.x; - attributes.y = widget->allocation.y; - attributes.width = widget->allocation.width; - attributes.height = widget->allocation.height; - attributes.wclass = GDK_INPUT_OUTPUT; - attributes.visual = gtk_widget_get_visual (widget); - attributes.colormap = gtk_widget_get_colormap (widget); - attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK; - - attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP; - - widget->window = gdk_window_new (gtk_widget_get_parent_window (widget), &attributes, attributes_mask); - gdk_window_set_user_data (widget->window, widget); - - widget->style = gtk_style_attach (widget->style, widget->window); - gdk_window_set_background (widget->window, - &widget->style->base[GTK_STATE_NORMAL]); -} - -void -gtk_tree2_remove_item (GtkTree2 *container, - GtkWidget *widget) -{ - GList *item_list; - - g_return_if_fail (container != NULL); - g_return_if_fail (GTK_IS_TREE2 (container)); - g_return_if_fail (widget != NULL); - g_return_if_fail (container == GTK_TREE2 (widget->parent)); - - item_list = g_list_append (NULL, widget); - - gtk_tree2_remove_items (GTK_TREE2 (container), item_list); - - g_list_free (item_list); -} - -/* used by gtk_tree2_remove_items to make the function independant of - order in list of items to remove. - Sort item bu depth in tree */ -static gint -gtk_tree2_sort_item_by_depth(GtkWidget* a, GtkWidget* b) -{ - if((GTK_TREE2(a->parent)->level) < (GTK_TREE2(b->parent)->level)) - return 1; - if((GTK_TREE2(a->parent)->level) > (GTK_TREE2(b->parent)->level)) - return -1; - - return 0; -} - -void -gtk_tree2_remove_items (GtkTree2 *tree, - GList *items) -{ - GtkWidget *widget; - GList *selected_widgets; - GList *tmp_list; - GList *sorted_list; - GtkTree2 *real_tree; - GtkTree2 *root_tree; - - g_return_if_fail (tree != NULL); - g_return_if_fail (GTK_IS_TREE2 (tree)); - -#ifdef TREE_DEBUG - g_message("+ gtk_tree2_remove_items [ tree %#x items list %#x ]\n", (int)tree, (int)items); -#endif /* TREE_DEBUG */ - - /* We may not yet be mapped, so we actively have to find our - * root tree - */ - if (tree->root_tree) - root_tree = tree->root_tree; - else - { - GtkWidget *tmp = GTK_WIDGET (tree); - while (tmp->parent && GTK_IS_TREE2 (tmp->parent)) - tmp = tmp->parent; - - root_tree = GTK_TREE2 (tmp); - } - - tmp_list = items; - selected_widgets = NULL; - sorted_list = NULL; - widget = NULL; - -#ifdef TREE_DEBUG - g_message("* sort list by depth\n"); -#endif /* TREE_DEBUG */ - - while (tmp_list) - { - -#ifdef TREE_DEBUG - g_message ("* item [%#x] depth [%d]\n", - (int)tmp_list->data, - (int)GTK_TREE2(GTK_WIDGET(tmp_list->data)->parent)->level); -#endif /* TREE_DEBUG */ - - sorted_list = g_list_insert_sorted(sorted_list, - tmp_list->data, - (GCompareFunc)gtk_tree2_sort_item_by_depth); - tmp_list = g_list_next(tmp_list); - } - -#ifdef TREE_DEBUG - /* print sorted list */ - g_message("* sorted list result\n"); - tmp_list = sorted_list; - while(tmp_list) - { - g_message("* item [%#x] depth [%d]\n", - (int)tmp_list->data, - (int)GTK_TREE2(GTK_WIDGET(tmp_list->data)->parent)->level); - tmp_list = g_list_next(tmp_list); - } -#endif /* TREE_DEBUG */ - -#ifdef TREE_DEBUG - g_message("* scan sorted list\n"); -#endif /* TREE_DEBUG */ - - tmp_list = sorted_list; - while (tmp_list) - { - widget = tmp_list->data; - tmp_list = tmp_list->next; - -#ifdef TREE_DEBUG - g_message("* item [%#x] subtree [%#x]\n", - (int)widget, (int)GTK_TREE_ITEM2_SUBTREE(widget)); -#endif /* TREE_DEBUG */ - - /* get real owner of this widget */ - real_tree = GTK_TREE2(widget->parent); -#ifdef TREE_DEBUG - g_message("* subtree having this widget [%#x]\n", (int)real_tree); -#endif /* TREE_DEBUG */ - - - if (widget->state == GTK_STATE_SELECTED) - { - selected_widgets = g_list_prepend (selected_widgets, widget); -#ifdef TREE_DEBUG - g_message("* selected widget - adding it in selected list [%#x]\n", - (int)selected_widgets); -#endif /* TREE_DEBUG */ - } - - /* remove this item from its real parent */ -#ifdef TREE_DEBUG - g_message("* remove widget from its owner tree\n"); -#endif /* TREE_DEBUG */ - real_tree->children = g_list_remove (real_tree->children, widget); - - /* remove subtree associate at this item if it exist */ - if(GTK_TREE_ITEM2(widget)->subtree) - { -#ifdef TREE_DEBUG - g_message("* remove subtree associate at this item [%#x]\n", - (int) GTK_TREE_ITEM2(widget)->subtree); -#endif /* TREE_DEBUG */ - if (GTK_WIDGET_MAPPED (GTK_TREE_ITEM2(widget)->subtree)) - gtk_widget_unmap (GTK_TREE_ITEM2(widget)->subtree); - - gtk_widget_unparent (GTK_TREE_ITEM2(widget)->subtree); - GTK_TREE_ITEM2(widget)->subtree = NULL; - } - - /* really remove widget for this item */ -#ifdef TREE_DEBUG - g_message("* unmap and unparent widget [%#x]\n", (int)widget); -#endif /* TREE_DEBUG */ - if (GTK_WIDGET_MAPPED (widget)) - gtk_widget_unmap (widget); - - gtk_widget_unparent (widget); - - /* delete subtree if there is no children in it */ -/* HF supprime */ -/* if(real_tree->children == NULL && - real_tree != root_tree) - { -*/ -#ifdef TREE_DEBUG - g_message("* owner tree don't have children ... destroy it\n"); -#endif /* TREE_DEBUG */ -/* - gtk_tree_item2_remove_subtree(GTK_TREE_ITEM2(real_tree->tree_owner)); - } -*/ -#ifdef TREE_DEBUG - g_message("* next item in list\n"); -#endif /* TREE_DEBUG */ - } - - if (selected_widgets) - { -#ifdef TREE_DEBUG - g_message("* scan selected item list\n"); -#endif /* TREE_DEBUG */ - tmp_list = selected_widgets; - while (tmp_list) - { - widget = tmp_list->data; - tmp_list = tmp_list->next; - -#ifdef TREE_DEBUG - g_message("* widget [%#x] subtree [%#x]\n", - (int)widget, (int)GTK_TREE_ITEM2_SUBTREE(widget)); -#endif /* TREE_DEBUG */ - - /* remove widget of selection */ - root_tree->selection = g_list_remove (root_tree->selection, widget); - - /* unref it to authorize is destruction */ - gtk_widget_unref (widget); - } - - /* emit only one selection_changed signal */ - gtk_signal_emit (GTK_OBJECT (root_tree), - tree_signals[SELECTION_CHANGED]); - } - -#ifdef TREE_DEBUG - g_message("* free selected_widgets list\n"); -#endif /* TREE_DEBUG */ - g_list_free (selected_widgets); - g_list_free (sorted_list); - - if (root_tree->children && !root_tree->selection && - (root_tree->selection_mode == GTK_SELECTION_BROWSE)) - { -#ifdef TREE_DEBUG - g_message("* BROWSE mode, select another item\n"); -#endif /* TREE_DEBUG */ - widget = root_tree->children->data; - gtk_tree2_select_child (root_tree, widget); - } - - if (GTK_WIDGET_VISIBLE (root_tree)) - { -#ifdef TREE_DEBUG - g_message("* query queue resizing for root_tree\n"); -#endif /* TREE_DEBUG */ - gtk_widget_queue_resize (GTK_WIDGET (root_tree)); - } -} - -void -gtk_tree2_select_child (GtkTree2 *tree, - GtkWidget *tree_item) -{ - g_return_if_fail (tree != NULL); - g_return_if_fail (GTK_IS_TREE2 (tree)); - g_return_if_fail (tree_item != NULL); - g_return_if_fail (GTK_IS_TREE_ITEM2 (tree_item)); - - gtk_signal_emit (GTK_OBJECT (tree), tree_signals[SELECT_CHILD], tree_item); -} - -void -gtk_tree2_select_next_child (GtkTree2 *tree, - GtkWidget *tree_item, gboolean descend) -{ - GList *children; - - g_return_if_fail (tree != NULL); - g_return_if_fail (GTK_IS_TREE2 (tree)); - g_return_if_fail (tree_item != NULL); - g_return_if_fail (GTK_IS_TREE_ITEM2 (tree_item)); - - if (descend && GTK_TREE2(GTK_TREE_ITEM2(tree_item)->subtree)->children) - { - gtk_signal_emit (GTK_OBJECT (GTK_TREE_ITEM2(tree_item)->subtree), tree_signals[SELECT_CHILD], GTK_TREE2(GTK_TREE_ITEM2(tree_item)->subtree)->children->data); - return; - } - - children = tree->children; - while (children) - { - if (tree_item == GTK_WIDGET (children->data)) - break; - - children = children->next; - } - if (!children) return; - - if (children->next) - gtk_signal_emit (GTK_OBJECT (tree), tree_signals[SELECT_CHILD], children->next->data); - else if (tree != tree->root_tree) - { - children = GTK_TREE2(GTK_WIDGET(tree)->parent)->children; - gtk_tree2_select_next_child (GTK_TREE2(GTK_WIDGET(tree)->parent), tree->tree_owner, FALSE); - } - -} - -/* we know that tree is not the roor_tree and that - tree_items always have subtrees */ -void -gtk_tree2_select_prev_child (GtkTree2 *tree, - GtkWidget *tree_item) -{ - GList *children; - GtkTreeItem2 *tree_item2; - - g_return_if_fail (tree != NULL); - g_return_if_fail (GTK_IS_TREE2 (tree)); - g_return_if_fail (tree_item != NULL); - g_return_if_fail (GTK_IS_TREE_ITEM2 (tree_item)); - - - children = tree->children; - while (children) - { - if (tree_item == GTK_WIDGET (children->data)) - break; - - children = children->next; - } - if (!children) return; - - if (children = children->prev) - { - tree_item2 = GTK_TREE_ITEM2(children->data); - while (GTK_TREE2(tree_item2->subtree)->children) - { - children = GTK_TREE2(tree_item2->subtree)->children; - while (children->next) - children = children->next; - tree_item2 = GTK_TREE_ITEM2(children->data); - } - gtk_signal_emit (GTK_OBJECT (GTK_WIDGET(tree_item2)->parent), tree_signals[SELECT_CHILD], tree_item2); - } - else - { - gtk_signal_emit (GTK_OBJECT (GTK_WIDGET(tree)->parent), tree_signals[SELECT_CHILD], tree->tree_owner); - } - -} - -void -gtk_tree2_select_item (GtkTree2 *tree, - gint item) -{ - GList *tmp_list; - - g_return_if_fail (tree != NULL); - g_return_if_fail (GTK_IS_TREE2 (tree)); - - tmp_list = g_list_nth (tree->children, item); - if (tmp_list) - gtk_tree2_select_child (tree, GTK_WIDGET (tmp_list->data)); - -} - -static void -gtk_tree2_size_allocate (GtkWidget *widget, - GtkAllocation *allocation) -{ - GtkTree2 *tree; - GtkWidget *child, *subtree; - GtkAllocation child_allocation; - GList *children; - - - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_TREE2 (widget)); - g_return_if_fail (allocation != NULL); - - tree = GTK_TREE2 (widget); - - widget->allocation = *allocation; - if (GTK_WIDGET_REALIZED (widget)) - gdk_window_move_resize (widget->window, - allocation->x, allocation->y, - allocation->width, allocation->height); - - if (tree->children) - { - child_allocation.x = GTK_CONTAINER (tree)->border_width; - child_allocation.y = GTK_CONTAINER (tree)->border_width; - child_allocation.width = MAX (1, (gint)allocation->width - child_allocation.x * 2); - - children = tree->children; - - while (children) - { - child = children->data; - children = children->next; - - if (GTK_WIDGET_VISIBLE (child)) - { - GtkRequisition child_requisition; - gtk_widget_get_child_requisition (child, &child_requisition); - - child_allocation.height = child_requisition.height; - - gtk_widget_size_allocate (child, &child_allocation); - - child_allocation.y += child_allocation.height; - - if((subtree = GTK_TREE_ITEM2(child)->subtree)) - if(GTK_WIDGET_VISIBLE (subtree)) - { - child_allocation.height = subtree->requisition.height; - gtk_widget_size_allocate (subtree, &child_allocation); - child_allocation.y += child_allocation.height; - } - } - } - } - -} - -static void -gtk_tree2_size_request (GtkWidget *widget, - GtkRequisition *requisition) -{ - GtkTree2 *tree; - GtkWidget *child, *subtree; - GList *children; - GtkRequisition child_requisition; - - - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_TREE2 (widget)); - g_return_if_fail (requisition != NULL); - - tree = GTK_TREE2 (widget); - requisition->width = 0; - requisition->height = 0; - - children = tree->children; - while (children) - { - child = children->data; - children = children->next; - - if (GTK_WIDGET_VISIBLE (child)) - { - gtk_widget_size_request (child, &child_requisition); - - requisition->width = MAX (requisition->width, child_requisition.width); - requisition->height += child_requisition.height; - - if((subtree = GTK_TREE_ITEM2(child)->subtree) && - GTK_WIDGET_VISIBLE (subtree)) - { - gtk_widget_size_request (subtree, &child_requisition); - - requisition->width = MAX (requisition->width, - child_requisition.width); - - requisition->height += child_requisition.height; - } - } - } - - requisition->width += GTK_CONTAINER (tree)->border_width * 2; - requisition->height += GTK_CONTAINER (tree)->border_width * 2; - - requisition->width = MAX (requisition->width, 1); - requisition->height = MAX (requisition->height, 1); - -} - -static void -gtk_tree2_unmap (GtkWidget *widget) -{ - - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_TREE2 (widget)); - - GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED); - gdk_window_hide (widget->window); - -} - -void -gtk_tree2_unselect_child (GtkTree2 *tree, - GtkWidget *tree_item) -{ - g_return_if_fail (tree != NULL); - g_return_if_fail (GTK_IS_TREE2 (tree)); - g_return_if_fail (tree_item != NULL); - g_return_if_fail (GTK_IS_TREE_ITEM2 (tree_item)); - - gtk_signal_emit (GTK_OBJECT (tree), tree_signals[UNSELECT_CHILD], tree_item); -} - -void -gtk_tree2_unselect_item (GtkTree2 *tree, - gint item) -{ - GList *tmp_list; - - g_return_if_fail (tree != NULL); - g_return_if_fail (GTK_IS_TREE2 (tree)); - - tmp_list = g_list_nth (tree->children, item); - if (tmp_list) - gtk_tree2_unselect_child (tree, GTK_WIDGET (tmp_list->data)); - -} - -static void -gtk_real_tree2_select_child (GtkTree2 *tree, - GtkWidget *child) -{ - GList *selection, *root_selection; - GList *tmp_list; - GtkWidget *tmp_item; - - g_return_if_fail (tree != NULL); - g_return_if_fail (GTK_IS_TREE2 (tree)); - g_return_if_fail (child != NULL); - g_return_if_fail (GTK_IS_TREE_ITEM2 (child)); - - root_selection = tree->root_tree->selection; - - switch (tree->root_tree->selection_mode) - { - case GTK_SELECTION_SINGLE: - - selection = root_selection; - - /* remove old selection list */ - while (selection) - { - tmp_item = selection->data; - - if (tmp_item != child) - { - gtk_tree_item2_deselect (GTK_TREE_ITEM2 (tmp_item)); - - tmp_list = selection; - selection = selection->next; - - root_selection = g_list_remove_link (root_selection, tmp_list); - gtk_widget_unref (tmp_item); - - g_list_free (tmp_list); - } - else - selection = selection->next; - } - - if (child->state == GTK_STATE_NORMAL) - { - gtk_tree_item2_select (GTK_TREE_ITEM2 (child)); - root_selection = g_list_prepend (root_selection, child); - gtk_widget_ref (child); - } - else if (child->state == GTK_STATE_SELECTED) - { - gtk_tree_item2_deselect (GTK_TREE_ITEM2 (child)); - root_selection = g_list_remove (root_selection, child); - gtk_widget_unref (child); - } - - tree->root_tree->selection = root_selection; - - gtk_signal_emit (GTK_OBJECT (tree->root_tree), - tree_signals[SELECTION_CHANGED]); - break; - - - case GTK_SELECTION_BROWSE: - selection = root_selection; - - while (selection) - { - tmp_item = selection->data; - - if (tmp_item != child) - { - gtk_tree_item2_deselect (GTK_TREE_ITEM2 (tmp_item)); - - tmp_list = selection; - selection = selection->next; - - root_selection = g_list_remove_link (root_selection, tmp_list); - gtk_widget_unref (tmp_item); - - g_list_free (tmp_list); - } - else - selection = selection->next; - } - - tree->root_tree->selection = root_selection; - - if (child->state == GTK_STATE_NORMAL) - { - gtk_tree_item2_select (GTK_TREE_ITEM2 (child)); - root_selection = g_list_prepend (root_selection, child); - gtk_widget_ref (child); - tree->root_tree->selection = root_selection; - gtk_signal_emit (GTK_OBJECT (tree->root_tree), - tree_signals[SELECTION_CHANGED]); - } - break; - - case GTK_SELECTION_MULTIPLE: - if (child->state == GTK_STATE_NORMAL) - { - gtk_tree_item2_select (GTK_TREE_ITEM2 (child)); - root_selection = g_list_prepend (root_selection, child); - gtk_widget_ref (child); - tree->root_tree->selection = root_selection; - gtk_signal_emit (GTK_OBJECT (tree->root_tree), - tree_signals[SELECTION_CHANGED]); - } - else if (child->state == GTK_STATE_SELECTED) - { - gtk_tree_item2_deselect (GTK_TREE_ITEM2 (child)); - root_selection = g_list_remove (root_selection, child); - gtk_widget_unref (child); - tree->root_tree->selection = root_selection; - gtk_signal_emit (GTK_OBJECT (tree->root_tree), - tree_signals[SELECTION_CHANGED]); - } - break; - - case GTK_SELECTION_EXTENDED: - break; - } -} - -static void -gtk_real_tree2_unselect_child (GtkTree2 *tree, - GtkWidget *child) -{ - g_return_if_fail (tree != NULL); - g_return_if_fail (GTK_IS_TREE2 (tree)); - g_return_if_fail (child != NULL); - g_return_if_fail (GTK_IS_TREE_ITEM2 (child)); - - switch (tree->selection_mode) - { - case GTK_SELECTION_SINGLE: - case GTK_SELECTION_MULTIPLE: - case GTK_SELECTION_BROWSE: - if (child->state == GTK_STATE_SELECTED) - { - GtkTree2* root_tree = GTK_TREE2_ROOT_TREE(tree); - gtk_tree_item2_deselect (GTK_TREE_ITEM2 (child)); - root_tree->selection = g_list_remove (root_tree->selection, child); - gtk_widget_unref (child); - gtk_signal_emit (GTK_OBJECT (tree->root_tree), - tree_signals[SELECTION_CHANGED]); - } - break; - - case GTK_SELECTION_EXTENDED: - break; - } -} - -void -gtk_tree2_set_selection_mode (GtkTree2 *tree, - GtkSelectionMode mode) -{ - g_return_if_fail (tree != NULL); - g_return_if_fail (GTK_IS_TREE2 (tree)); - - tree->selection_mode = mode; -} - -void -gtk_tree2_set_view_mode (GtkTree2 *tree, - GtkTree2ViewMode mode) -{ - g_return_if_fail (tree != NULL); - g_return_if_fail (GTK_IS_TREE2 (tree)); - - tree->view_mode = mode; -} - -void -gtk_tree2_set_view_lines (GtkTree2 *tree, - guint flag) -{ - g_return_if_fail (tree != NULL); - g_return_if_fail (GTK_IS_TREE2 (tree)); - - tree->view_line = flag; -} - -void -gtk_tree2_item_up_1 (GtkTree2 *tree, - guint pos) -{ - GList *tmp; - guint length; - gpointer data; - - g_return_if_fail (tree != NULL); - g_return_if_fail (GTK_IS_TREE2 (tree)); - - tmp = tree->children; - length = g_list_length (tmp); - if (pos <= 0 || pos >= length) { return; } - data = g_list_nth_data (tree->children, pos); - g_list_remove (tree->children, data); - tree->children = g_list_insert (tree->children, data, pos-1); -} diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/gtktree2.h b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/gtktree2.h deleted file mode 100644 index 291a1d1b3..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/gtktree2.h +++ /dev/null @@ -1,139 +0,0 @@ -/* GTK - The GIMP Toolkit - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GTK+ Team and others 1997-1999. See the AUTHORS - * file for a list of people on the GTK+ Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GTK+ at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __GTK_TREE2_H__ -#define __GTK_TREE2_H__ - -/* set this flag to enable tree debugging output */ -/* #define TREE_DEBUG */ - -#include -#include - - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#define GTK_TYPE_TREE2 (gtk_tree2_get_type ()) -#define GTK_TREE2(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_TREE2, GtkTree2)) -#define GTK_TREE2_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_TREE2, GtkTree2Class)) -#define GTK_IS_TREE2(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_TREE2)) -#define GTK_IS_TREE2_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TREE2)) - -#define GTK_IS_ROOT_TREE2(obj) ((GtkObject*) GTK_TREE2(obj)->root_tree == (GtkObject*)obj) -#define GTK_TREE2_ROOT_TREE(obj) (GTK_TREE2(obj)->root_tree ? GTK_TREE2(obj)->root_tree : GTK_TREE2(obj)) -#define GTK_TREE2_SELECTION(obj) (GTK_TREE2_ROOT_TREE(obj)->selection) - -typedef enum -{ - GTK_TREE2_VIEW_LINE, /* default view mode */ - GTK_TREE2_VIEW_ITEM -} GtkTree2ViewMode; - -typedef struct _GtkTree2 GtkTree2; -typedef struct _GtkTree2Class GtkTree2Class; - -struct _GtkTree2 -{ - GtkContainer container; - - GList *children; - - GtkTree2* root_tree; /* owner of selection list */ - GtkWidget* tree_owner; - GList *selection; - guint level; - guint indent_value; - guint current_indent; - guint selection_mode : 2; - guint view_mode : 1; - guint view_line : 1; -}; - -struct _GtkTree2Class -{ - GtkContainerClass parent_class; - - void (* selection_changed) (GtkTree2 *tree); - void (* select_child) (GtkTree2 *tree, - GtkWidget *child); - void (* unselect_child) (GtkTree2 *tree, - GtkWidget *child); -}; - - -GtkType gtk_tree2_get_type (void); -GtkWidget* gtk_tree2_new (void); -void gtk_tree2_append (GtkTree2 *tree, - GtkWidget *tree_item); -void gtk_tree2_prepend (GtkTree2 *tree, - GtkWidget *tree_item); -void gtk_tree2_insert (GtkTree2 *tree, - GtkWidget *tree_item, - gint position); -void gtk_tree2_remove_items (GtkTree2 *tree, - GList *items); -void gtk_tree2_clear_items (GtkTree2 *tree, - gint start, - gint end); -void gtk_tree2_select_item (GtkTree2 *tree, - gint item); -void gtk_tree2_unselect_item (GtkTree2 *tree, - gint item); -void gtk_tree2_select_child (GtkTree2 *tree, - GtkWidget *tree_item); -void gtk_tree2_unselect_child (GtkTree2 *tree, - GtkWidget *tree_item); -gint gtk_tree2_child_position (GtkTree2 *tree, - GtkWidget *child); -void gtk_tree2_set_selection_mode (GtkTree2 *tree, - GtkSelectionMode mode); -void gtk_tree2_set_view_mode (GtkTree2 *tree, - GtkTree2ViewMode mode); -void gtk_tree2_set_view_lines (GtkTree2 *tree, - guint flag); - -/* deprecated function, use gtk_container_remove instead. - */ -void gtk_tree2_remove_item (GtkTree2 *tree, - GtkWidget *child); -void gtk_tree2_item_up (GtkTree2 *tree, - gint position); - -void gtk_tree2_select_next_child (GtkTree2 *tree, - GtkWidget *tree_item, gboolean descend); - -void gtk_tree2_select_prev_child (GtkTree2 *tree, - GtkWidget *tree_item); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif /* __GTK_TREE2_H__ */ diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/gtktreeitem2.c b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/gtktreeitem2.c deleted file mode 100644 index 7e6f8116b..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/gtktreeitem2.c +++ /dev/null @@ -1,1110 +0,0 @@ -/* GTK - The GIMP Toolkit - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GTK+ Team and others 1997-1999. See the AUTHORS - * file for a list of people on the GTK+ Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GTK+ at ftp://ftp.gtk.org/pub/gtk/. - */ - -#include -#include "gtktree2.h" -#include "gtktreeitem2.h" -#include -#include -#include -#include - -#include "tree_plus.xpm" -#include "tree_minus.xpm" - -#define DEFAULT_DELTA 9 - -enum { - COLLAPSE_TREE, - EXPAND_TREE, - LAST_SIGNAL -}; - -typedef struct _GtkTree2Pixmaps GtkTree2Pixmaps; - -struct _GtkTree2Pixmaps { - gint refcount; - GdkColormap *colormap; - - GdkPixmap *pixmap_plus; - GdkPixmap *pixmap_minus; - GdkBitmap *mask_plus; - GdkBitmap *mask_minus; -}; - -static GList *pixmaps = NULL; - -static void gtk_tree_item2_class_init (GtkTreeItem2Class *klass); -static void gtk_tree_item2_init (GtkTreeItem2 *tree_item); -static void gtk_tree_item2_realize (GtkWidget *widget); -static void gtk_tree_item2_size_request (GtkWidget *widget, - GtkRequisition *requisition); -static void gtk_tree_item2_size_allocate (GtkWidget *widget, - GtkAllocation *allocation); -static void gtk_tree_item2_draw (GtkWidget *widget, - GdkRectangle *area); -static void gtk_tree_item2_draw_focus (GtkWidget *widget); -static void gtk_tree_item2_paint (GtkWidget *widget, - GdkRectangle *area); -static gint gtk_tree_item2_button_press (GtkWidget *widget, - GdkEventButton *event); -static gint gtk_tree_item2_expose (GtkWidget *widget, - GdkEventExpose *event); -static gint gtk_tree_item2_focus_in (GtkWidget *widget, - GdkEventFocus *event); -static gint gtk_tree_item2_focus_out (GtkWidget *widget, - GdkEventFocus *event); -static void gtk_tree_item2_forall (GtkContainer *container, - gboolean include_internals, - GtkCallback callback, - gpointer callback_data); - -static void gtk_real_tree_item2_select (GtkItem *item); -static void gtk_real_tree_item2_deselect (GtkItem *item); -static void gtk_real_tree_item2_toggle (GtkItem *item); -static void gtk_real_tree_item2_expand (GtkTreeItem2 *item); -static void gtk_real_tree_item2_collapse (GtkTreeItem2 *item); -static void gtk_real_tree_item2_expand (GtkTreeItem2 *item); -static void gtk_real_tree_item2_collapse (GtkTreeItem2 *item); -static void gtk_tree_item2_destroy (GtkObject *object); -static void gtk_tree_item2_subtree_button_click (GtkWidget *widget); -static void gtk_tree_item2_subtree_button_changed_state (GtkWidget *widget); - -static void gtk_tree_item2_map(GtkWidget*); -static void gtk_tree_item2_unmap(GtkWidget*); - -static void gtk_tree_item2_add_pixmaps (GtkTreeItem2 *tree_item); -static void gtk_tree_item2_remove_pixmaps (GtkTreeItem2 *tree_item); - -static GtkItemClass *parent_class = NULL; -static guint tree_item_signals[LAST_SIGNAL] = { 0 }; - -GtkType -gtk_tree_item2_get_type (void) -{ - static GtkType tree_item_type = 0; - - if (!tree_item_type) - { - static const GtkTypeInfo tree_item_info = - { - "GtkTreeItem", - sizeof (GtkTreeItem2), - sizeof (GtkTreeItem2Class), - (GtkClassInitFunc) gtk_tree_item2_class_init, - (GtkObjectInitFunc) gtk_tree_item2_init, - /* reserved_1 */ NULL, - /* reserved_2 */ NULL, - (GtkClassInitFunc) NULL, - }; - - tree_item_type = gtk_type_unique (gtk_item_get_type (), &tree_item_info); - } - - return tree_item_type; -} - -static void -gtk_tree_item2_class_init (GtkTreeItem2Class *class) -{ - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - GtkContainerClass *container_class; - GtkItemClass *item_class; - - object_class = (GtkObjectClass*) class; - widget_class = (GtkWidgetClass*) class; - item_class = (GtkItemClass*) class; - container_class = (GtkContainerClass*) class; - - parent_class = gtk_type_class (gtk_item_get_type ()); - - tree_item_signals[EXPAND_TREE] = - gtk_signal_new ("expand", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (GtkTreeItem2Class, expand), - gtk_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - tree_item_signals[COLLAPSE_TREE] = - gtk_signal_new ("collapse", - GTK_RUN_FIRST, - object_class->type, - GTK_SIGNAL_OFFSET (GtkTreeItem2Class, collapse), - gtk_marshal_NONE__NONE, - GTK_TYPE_NONE, 0); - - gtk_object_class_add_signals (object_class, tree_item_signals, LAST_SIGNAL); - - object_class->destroy = gtk_tree_item2_destroy; - - widget_class->realize = gtk_tree_item2_realize; - widget_class->size_request = gtk_tree_item2_size_request; - widget_class->size_allocate = gtk_tree_item2_size_allocate; - widget_class->draw = gtk_tree_item2_draw; - widget_class->draw_focus = gtk_tree_item2_draw_focus; - widget_class->button_press_event = gtk_tree_item2_button_press; - widget_class->expose_event = gtk_tree_item2_expose; - widget_class->focus_in_event = gtk_tree_item2_focus_in; - widget_class->focus_out_event = gtk_tree_item2_focus_out; - widget_class->map = gtk_tree_item2_map; - widget_class->unmap = gtk_tree_item2_unmap; - - container_class->forall = gtk_tree_item2_forall; - - item_class->select = gtk_real_tree_item2_select; - item_class->deselect = gtk_real_tree_item2_deselect; - item_class->toggle = gtk_real_tree_item2_toggle; - - class->expand = gtk_real_tree_item2_expand; - class->collapse = gtk_real_tree_item2_collapse; -} - -/* callback for event box mouse event */ -static void -gtk_tree_item2_subtree_button_click (GtkWidget *widget) -{ - GtkTreeItem2* item; - - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_EVENT_BOX (widget)); - - item = (GtkTreeItem2*) gtk_object_get_user_data (GTK_OBJECT (widget)); - if (!GTK_WIDGET_IS_SENSITIVE (item)) - return; - - if (item->expanded) - gtk_tree_item2_collapse (item); - else - gtk_tree_item2_expand (item); -} - -/* callback for event box state changed */ -static void -gtk_tree_item2_subtree_button_changed_state (GtkWidget *widget) -{ - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_EVENT_BOX (widget)); - - if (GTK_WIDGET_VISIBLE (widget)) - { - - if (widget->state == GTK_STATE_NORMAL) - gdk_window_set_background (widget->window, &widget->style->base[widget->state]); - else - gdk_window_set_background (widget->window, &widget->style->bg[widget->state]); - - if (GTK_WIDGET_DRAWABLE (widget)) - gdk_window_clear_area (widget->window, 0, 0, - widget->allocation.width, widget->allocation.height); - } -} - -static void -gtk_tree_item2_init (GtkTreeItem2 *tree_item) -{ - GtkWidget *eventbox, *pixmapwid; - - g_return_if_fail (tree_item != NULL); - g_return_if_fail (GTK_IS_TREE_ITEM2 (tree_item)); - - tree_item->expanded = FALSE; - tree_item->subtree = NULL; - GTK_WIDGET_SET_FLAGS (tree_item, GTK_CAN_FOCUS); - - /* create an event box containing one pixmaps */ - eventbox = gtk_event_box_new(); - gtk_widget_set_events (eventbox, GDK_BUTTON_PRESS_MASK); - gtk_signal_connect(GTK_OBJECT(eventbox), "state_changed", - (GtkSignalFunc)gtk_tree_item2_subtree_button_changed_state, - (gpointer)NULL); - gtk_signal_connect(GTK_OBJECT(eventbox), "realize", - (GtkSignalFunc)gtk_tree_item2_subtree_button_changed_state, - (gpointer)NULL); -/* HF inutile - gtk_signal_connect(GTK_OBJECT(eventbox), "button_press_event", - (GtkSignalFunc)gtk_tree_item2_subtree_button_click, - (gpointer)NULL); -*/ - gtk_object_set_user_data(GTK_OBJECT(eventbox), tree_item); - tree_item->pixmaps_box = eventbox; - - /* create pixmap for button '+' */ - pixmapwid = gtk_type_new (gtk_pixmap_get_type ()); - if (!tree_item->expanded) - gtk_container_add (GTK_CONTAINER (eventbox), pixmapwid); - gtk_widget_show (pixmapwid); - tree_item->plus_pix_widget = pixmapwid; - gtk_widget_ref (tree_item->plus_pix_widget); - gtk_object_sink (GTK_OBJECT (tree_item->plus_pix_widget)); - - /* create pixmap for button '-' */ - pixmapwid = gtk_type_new (gtk_pixmap_get_type ()); - if (tree_item->expanded) - gtk_container_add (GTK_CONTAINER (eventbox), pixmapwid); - gtk_widget_show (pixmapwid); - tree_item->minus_pix_widget = pixmapwid; - gtk_widget_ref (tree_item->minus_pix_widget); - gtk_object_sink (GTK_OBJECT (tree_item->minus_pix_widget)); - - gtk_widget_set_parent (eventbox, GTK_WIDGET (tree_item)); -} - - -GtkWidget* -gtk_tree_item2_new (void) -{ - GtkWidget *tree_item; - - tree_item = GTK_WIDGET (gtk_type_new (gtk_tree_item2_get_type ())); - - return tree_item; -} - -GtkWidget* -gtk_tree_item2_new_with_label (gchar *label) -{ - GtkWidget *tree_item; - GtkWidget *label_widget; - - tree_item = gtk_tree_item2_new (); - label_widget = gtk_label_new (label); - gtk_misc_set_alignment (GTK_MISC (label_widget), 0.0, 0.5); - - gtk_container_add (GTK_CONTAINER (tree_item), label_widget); - gtk_widget_show (label_widget); - - - return tree_item; -} - -void -gtk_tree_item2_set_subtree (GtkTreeItem2 *tree_item, - GtkWidget *subtree) -{ - g_return_if_fail (tree_item != NULL); - g_return_if_fail (GTK_IS_TREE_ITEM2 (tree_item)); - g_return_if_fail (subtree != NULL); - g_return_if_fail (GTK_IS_TREE2 (subtree)); - - if (tree_item->subtree) - { - g_warning("there is already a subtree for this tree item\n"); - return; - } - - tree_item->subtree = subtree; - GTK_TREE2 (subtree)->tree_owner = GTK_WIDGET (tree_item); - - /* show subtree button */ - if (tree_item->pixmaps_box) - gtk_widget_show (tree_item->pixmaps_box); - - if (tree_item->expanded) - gtk_widget_show (subtree); - else - gtk_widget_hide (subtree); - - gtk_widget_set_parent (subtree, GTK_WIDGET (tree_item)->parent); - - if (GTK_WIDGET_REALIZED (subtree->parent)) - gtk_widget_realize (subtree); - - if (GTK_WIDGET_VISIBLE (subtree->parent) && GTK_WIDGET_VISIBLE (subtree)) - { - if (GTK_WIDGET_MAPPED (subtree->parent)) - gtk_widget_map (subtree); - - gtk_widget_queue_resize (subtree); - } -} - -void -gtk_tree_item2_select (GtkTreeItem2 *tree_item) -{ - g_return_if_fail (tree_item != NULL); - g_return_if_fail (GTK_IS_TREE_ITEM2 (tree_item)); - - gtk_item_select (GTK_ITEM (tree_item)); -} - -void -gtk_tree_item2_deselect (GtkTreeItem2 *tree_item) -{ - g_return_if_fail (tree_item != NULL); - g_return_if_fail (GTK_IS_TREE_ITEM2 (tree_item)); - - gtk_item_deselect (GTK_ITEM (tree_item)); -} - -void -gtk_tree_item2_expand (GtkTreeItem2 *tree_item) -{ - g_return_if_fail (tree_item != NULL); - g_return_if_fail (GTK_IS_TREE_ITEM2 (tree_item)); - - gtk_signal_emit (GTK_OBJECT (tree_item), tree_item_signals[EXPAND_TREE], NULL); -} - -void -gtk_tree_item2_collapse (GtkTreeItem2 *tree_item) -{ - g_return_if_fail (tree_item != NULL); - g_return_if_fail (GTK_IS_TREE_ITEM2 (tree_item)); - - gtk_signal_emit (GTK_OBJECT (tree_item), tree_item_signals[COLLAPSE_TREE], NULL); -} - -static void -gtk_tree_item2_add_pixmaps (GtkTreeItem2 *tree_item) -{ - GList *tmp_list; - GdkColormap *colormap; - GtkTree2Pixmaps *pixmap_node = NULL; - - g_return_if_fail (tree_item != NULL); - g_return_if_fail (GTK_IS_TREE_ITEM2 (tree_item)); - - if (tree_item->pixmaps) - return; - - colormap = gtk_widget_get_colormap (GTK_WIDGET (tree_item)); - - tmp_list = pixmaps; - while (tmp_list) - { - pixmap_node = (GtkTree2Pixmaps *)tmp_list->data; - - if (pixmap_node->colormap == colormap) - break; - - tmp_list = tmp_list->next; - } - - if (tmp_list) - { - pixmap_node->refcount++; - tree_item->pixmaps = tmp_list; - } - else - { - pixmap_node = g_new (GtkTree2Pixmaps, 1); - - pixmap_node->colormap = colormap; - gdk_colormap_ref (colormap); - - pixmap_node->refcount = 1; - - /* create pixmaps for plus icon */ - pixmap_node->pixmap_plus = - gdk_pixmap_create_from_xpm_d (GTK_WIDGET (tree_item)->window, - &pixmap_node->mask_plus, - NULL, - tree_plus); - - /* create pixmaps for minus icon */ - pixmap_node->pixmap_minus = - gdk_pixmap_create_from_xpm_d (GTK_WIDGET (tree_item)->window, - &pixmap_node->mask_minus, - NULL, - tree_minus); - - tree_item->pixmaps = pixmaps = g_list_prepend (pixmaps, pixmap_node); - } - - gtk_pixmap_set (GTK_PIXMAP (tree_item->plus_pix_widget), - pixmap_node->pixmap_plus, pixmap_node->mask_plus); - gtk_pixmap_set (GTK_PIXMAP (tree_item->minus_pix_widget), - pixmap_node->pixmap_minus, pixmap_node->mask_minus); -} - -static void -gtk_tree_item2_remove_pixmaps (GtkTreeItem2 *tree_item) -{ - g_return_if_fail (tree_item != NULL); - g_return_if_fail (GTK_IS_TREE_ITEM2 (tree_item)); - - if (tree_item->pixmaps) - { - GtkTree2Pixmaps *pixmap_node = (GtkTree2Pixmaps *)tree_item->pixmaps->data; - - g_assert (pixmap_node->refcount > 0); - - if (--pixmap_node->refcount == 0) - { - gdk_colormap_unref (pixmap_node->colormap); - gdk_pixmap_unref (pixmap_node->pixmap_plus); - gdk_bitmap_unref (pixmap_node->mask_plus); - gdk_pixmap_unref (pixmap_node->pixmap_minus); - gdk_bitmap_unref (pixmap_node->mask_minus); - - pixmaps = g_list_remove_link (pixmaps, tree_item->pixmaps); - g_list_free_1 (tree_item->pixmaps); - g_free (pixmap_node); - } - - tree_item->pixmaps = NULL; - } -} - -static void -gtk_tree_item2_realize (GtkWidget *widget) -{ - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_TREE_ITEM2 (widget)); - - if (GTK_WIDGET_CLASS (parent_class)->realize) - (* GTK_WIDGET_CLASS (parent_class)->realize) (widget); - - gdk_window_set_background (widget->window, - &widget->style->base[GTK_STATE_NORMAL]); - - gtk_tree_item2_add_pixmaps (GTK_TREE_ITEM2 (widget)); -} - -static void -gtk_tree_item2_size_request (GtkWidget *widget, - GtkRequisition *requisition) -{ - GtkBin *bin; - GtkTreeItem2* item; - GtkRequisition child_requisition; - - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_TREE_ITEM2 (widget)); - g_return_if_fail (requisition != NULL); - - bin = GTK_BIN (widget); - item = GTK_TREE_ITEM2(widget); - - requisition->width = (GTK_CONTAINER (widget)->border_width + - widget->style->klass->xthickness) * 2; - requisition->height = GTK_CONTAINER (widget)->border_width * 2; - - if (bin->child && GTK_WIDGET_VISIBLE (bin->child)) - { - GtkRequisition pix_requisition; - - gtk_widget_size_request (bin->child, &child_requisition); - - requisition->width += child_requisition.width; - - gtk_widget_size_request (item->pixmaps_box, - &pix_requisition); - requisition->width += pix_requisition.width + DEFAULT_DELTA + - GTK_TREE2 (widget->parent)->current_indent; - - requisition->height += MAX (child_requisition.height, - pix_requisition.height); - } -} - -static void -gtk_tree_item2_size_allocate (GtkWidget *widget, - GtkAllocation *allocation) -{ - GtkBin *bin; - GtkTreeItem2* item; - GtkAllocation child_allocation; - guint border_width; - int temp; - - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_TREE_ITEM2 (widget)); - g_return_if_fail (allocation != NULL); - - widget->allocation = *allocation; - if (GTK_WIDGET_REALIZED (widget)) - gdk_window_move_resize (widget->window, - allocation->x, allocation->y, - allocation->width, allocation->height); - - bin = GTK_BIN (widget); - item = GTK_TREE_ITEM2(widget); - - if (bin->child) - { - border_width = (GTK_CONTAINER (widget)->border_width + - widget->style->klass->xthickness); - - child_allocation.x = border_width + GTK_TREE2(widget->parent)->current_indent; - child_allocation.y = GTK_CONTAINER (widget)->border_width; - - child_allocation.width = item->pixmaps_box->requisition.width; - child_allocation.height = item->pixmaps_box->requisition.height; - - temp = allocation->height - child_allocation.height; - child_allocation.y += ( temp / 2 ) + ( temp % 2 ); - - gtk_widget_size_allocate (item->pixmaps_box, &child_allocation); - - child_allocation.y = GTK_CONTAINER (widget)->border_width; - child_allocation.height = MAX (1, (gint)allocation->height - child_allocation.y * 2); - child_allocation.x += item->pixmaps_box->requisition.width+DEFAULT_DELTA; - - child_allocation.width = - MAX (1, (gint)allocation->width - ((gint)child_allocation.x + border_width)); - - gtk_widget_size_allocate (bin->child, &child_allocation); - } -} - -static void -gtk_tree_item2_draw_lines (GtkWidget *widget) -{ - GtkTreeItem2* item; - GtkTree2* tree; - guint lx1, ly1, lx2, ly2; - - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_TREE_ITEM2 (widget)); - - item = GTK_TREE_ITEM2(widget); - tree = GTK_TREE2(widget->parent); - - /* draw vertical line */ - lx1 = item->pixmaps_box->allocation.width; - lx1 = lx2 = ((lx1 / 2) + (lx1 % 2) + - GTK_CONTAINER (widget)->border_width + 1 + tree->current_indent); - ly1 = 0; - ly2 = widget->allocation.height; - - if (g_list_last (tree->children)->data == widget) - ly2 = (ly2 / 2) + (ly2 % 2); - - if (tree != tree->root_tree) - gdk_draw_line (widget->window, widget->style->black_gc, lx1, ly1, lx2, ly2); - - /* draw vertical line for subtree connecting */ - if(g_list_last(tree->children)->data != (gpointer)widget) - ly2 = (ly2 / 2) + (ly2 % 2); - - lx2 += DEFAULT_DELTA; - - if (item->subtree && item->expanded) - gdk_draw_line (widget->window, widget->style->black_gc, - lx2, ly2, lx2, widget->allocation.height); - - /* draw horizontal line */ - ly1 = ly2; - lx2 += 2; - - gdk_draw_line (widget->window, widget->style->black_gc, - lx1, ly1, lx2, ly2); - - lx2 -= DEFAULT_DELTA+2; - ly1 = 0; - ly2 = widget->allocation.height; - - if (tree != tree->root_tree) - { - item = GTK_TREE_ITEM2 (tree->tree_owner); - tree = GTK_TREE2 (GTK_WIDGET (tree)->parent); - while (tree != tree->root_tree) - { - lx1 = lx2 -= tree->indent_value; - - if (g_list_last (tree->children)->data != item) - gdk_draw_line (widget->window, widget->style->black_gc, lx1, ly1, lx2, ly2); - item = GTK_TREE_ITEM2 (tree->tree_owner); - tree = GTK_TREE2 (GTK_WIDGET (tree)->parent); - } - } -} - -static void -gtk_tree_item2_paint (GtkWidget *widget, - GdkRectangle *area) -{ - GtkBin *bin; - GdkRectangle child_area, item_area; - GtkTreeItem2* tree_item; - - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_TREE_ITEM2 (widget)); - g_return_if_fail (area != NULL); - - if (GTK_WIDGET_DRAWABLE (widget)) - { - bin = GTK_BIN (widget); - tree_item = GTK_TREE_ITEM2(widget); - - if (widget->state == GTK_STATE_NORMAL) - { - gdk_window_set_back_pixmap (widget->window, NULL, TRUE); - gdk_window_clear_area (widget->window, area->x, area->y, area->width, area->height); - } - else - { - if (!GTK_WIDGET_IS_SENSITIVE (widget)) - gtk_paint_flat_box(widget->style, widget->window, - widget->state, GTK_STATE_INSENSITIVE, - area, widget, "treeitem", - 0, 0, -1, -1); - else - gtk_paint_flat_box(widget->style, widget->window, - widget->state, GTK_SHADOW_ETCHED_OUT, - area, widget, "treeitem", - 0, 0, -1, -1); - } - - /* draw left size of tree item */ - item_area.x = 0; - item_area.y = 0; - item_area.width = (tree_item->pixmaps_box->allocation.width + DEFAULT_DELTA + - GTK_TREE2 (widget->parent)->current_indent + 2); - item_area.height = widget->allocation.height; - - - if (gdk_rectangle_intersect(&item_area, area, &child_area)) - { - - gtk_tree_item2_draw_lines(widget); - - if (tree_item->pixmaps_box && - GTK_WIDGET_VISIBLE(tree_item->pixmaps_box) && - gtk_widget_intersect (tree_item->pixmaps_box, area, &child_area)) - gtk_widget_draw (tree_item->pixmaps_box, &child_area); - } - - if (GTK_WIDGET_HAS_FOCUS (widget)) - gtk_paint_focus (widget->style, widget->window, - NULL, widget, "treeitem", - 0, 0, - widget->allocation.width - 1, - widget->allocation.height - 1); - - } -} - -static void -gtk_tree_item2_draw (GtkWidget *widget, - GdkRectangle *area) -{ - GtkBin *bin; - GdkRectangle child_area; - - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_TREE_ITEM2 (widget)); - g_return_if_fail (area != NULL); - - if (GTK_WIDGET_DRAWABLE (widget)) - { - bin = GTK_BIN (widget); - - gtk_tree_item2_paint (widget, area); - - if (bin->child && - gtk_widget_intersect (bin->child, area, &child_area)) - gtk_widget_draw (bin->child, &child_area); - - } -} - -static void -gtk_tree_item2_draw_focus (GtkWidget *widget) -{ - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_TREE_ITEM2 (widget)); - - gtk_widget_draw(widget, NULL); -} - -static gint -gtk_tree_item2_button_press (GtkWidget *widget, - GdkEventButton *event) -{ -/* HF - g_return_val_if_fail (widget != NULL, FALSE); - g_return_val_if_fail (GTK_IS_TREE_ITEM2 (widget), FALSE); - g_return_val_if_fail (event != NULL, FALSE); - - if (event->type == GDK_BUTTON_PRESS - && GTK_WIDGET_IS_SENSITIVE(widget) - && !GTK_WIDGET_HAS_FOCUS (widget)) - gtk_widget_grab_focus (widget); - - return FALSE; - -*/ -} - -static gint -gtk_tree_item2_expose (GtkWidget *widget, - GdkEventExpose *event) -{ - GdkEventExpose child_event; - GtkBin *bin; - - g_return_val_if_fail (widget != NULL, FALSE); - g_return_val_if_fail (GTK_IS_TREE_ITEM2 (widget), FALSE); - g_return_val_if_fail (event != NULL, FALSE); - - if (GTK_WIDGET_DRAWABLE (widget)) - { - bin = GTK_BIN (widget); - - gtk_tree_item2_paint (widget, &event->area); - - child_event = *event; - if (bin->child && GTK_WIDGET_NO_WINDOW (bin->child) && - gtk_widget_intersect (bin->child, &event->area, &child_event.area)) - gtk_widget_event (bin->child, (GdkEvent*) &child_event); - } - - return FALSE; -} - -static gint -gtk_tree_item2_focus_in (GtkWidget *widget, - GdkEventFocus *event) -{ - g_return_val_if_fail (widget != NULL, FALSE); - g_return_val_if_fail (GTK_IS_TREE_ITEM2 (widget), FALSE); - g_return_val_if_fail (event != NULL, FALSE); - - GTK_WIDGET_SET_FLAGS (widget, GTK_HAS_FOCUS); - gtk_widget_draw_focus (widget); - - - return FALSE; -} - -static gint -gtk_tree_item2_focus_out (GtkWidget *widget, - GdkEventFocus *event) -{ - g_return_val_if_fail (widget != NULL, FALSE); - g_return_val_if_fail (GTK_IS_TREE_ITEM2 (widget), FALSE); - g_return_val_if_fail (event != NULL, FALSE); - - GTK_WIDGET_UNSET_FLAGS (widget, GTK_HAS_FOCUS); - gtk_widget_draw_focus (widget); - - - return FALSE; -} - -static void -gtk_real_tree_item2_select (GtkItem *item) -{ - GtkTreeItem2 *tree_item; - GtkWidget *widget; - - g_return_if_fail (item != NULL); - g_return_if_fail (GTK_IS_TREE_ITEM2 (item)); - - tree_item = GTK_TREE_ITEM2 (item); - widget = GTK_WIDGET (item); - - gtk_widget_set_state (GTK_WIDGET (item), GTK_STATE_SELECTED); - - if (!widget->parent || GTK_TREE2 (widget->parent)->view_mode == GTK_TREE2_VIEW_LINE) - gtk_widget_set_state (GTK_TREE_ITEM2 (item)->pixmaps_box, GTK_STATE_SELECTED); -} - -static void -gtk_real_tree_item2_deselect (GtkItem *item) -{ - GtkTreeItem2 *tree_item; - GtkWidget *widget; - - g_return_if_fail (item != NULL); - g_return_if_fail (GTK_IS_TREE_ITEM2 (item)); - - tree_item = GTK_TREE_ITEM2 (item); - widget = GTK_WIDGET (item); - - gtk_widget_set_state (widget, GTK_STATE_NORMAL); - - if (!widget->parent || GTK_TREE2 (widget->parent)->view_mode == GTK_TREE2_VIEW_LINE) - gtk_widget_set_state (tree_item->pixmaps_box, GTK_STATE_NORMAL); -} - -static void -gtk_real_tree_item2_toggle (GtkItem *item) -{ - g_return_if_fail (item != NULL); - g_return_if_fail (GTK_IS_TREE_ITEM2 (item)); - - if(!GTK_WIDGET_IS_SENSITIVE(item)) - return; - - if (GTK_WIDGET (item)->parent && GTK_IS_TREE2 (GTK_WIDGET (item)->parent)) - gtk_tree2_select_child (GTK_TREE2 (GTK_WIDGET (item)->parent), - GTK_WIDGET (item)); - else - { - /* Should we really bother with this bit? A listitem not in a list? - * -Johannes Keukelaar - * yes, always be on the safe side! - * -timj - */ - if (GTK_WIDGET (item)->state == GTK_STATE_SELECTED) - gtk_widget_set_state (GTK_WIDGET (item), GTK_STATE_NORMAL); - else - gtk_widget_set_state (GTK_WIDGET (item), GTK_STATE_SELECTED); - } -} - -static void -gtk_real_tree_item2_expand (GtkTreeItem2 *tree_item) -{ - GtkTree2* tree; - - g_return_if_fail (tree_item != NULL); - g_return_if_fail (GTK_IS_TREE_ITEM2 (tree_item)); - - if (tree_item->subtree && !tree_item->expanded) - { - tree = GTK_TREE2 (GTK_WIDGET (tree_item)->parent); - - /* hide subtree widget */ - gtk_widget_show (tree_item->subtree); - - /* hide button '+' and show button '-' */ - if (tree_item->pixmaps_box) - { - gtk_container_remove (GTK_CONTAINER (tree_item->pixmaps_box), - tree_item->plus_pix_widget); - gtk_container_add (GTK_CONTAINER (tree_item->pixmaps_box), - tree_item->minus_pix_widget); - } - if (tree->root_tree) - gtk_widget_queue_resize (GTK_WIDGET (tree->root_tree)); - tree_item->expanded = TRUE; - } -} - -static void -gtk_real_tree_item2_collapse (GtkTreeItem2 *tree_item) -{ - GtkTree2* tree; - - g_return_if_fail (tree_item != NULL); - g_return_if_fail (GTK_IS_TREE_ITEM2 (tree_item)); - - if (tree_item->subtree && tree_item->expanded) - { - tree = GTK_TREE2 (GTK_WIDGET (tree_item)->parent); - - /* hide subtree widget */ - gtk_widget_hide (tree_item->subtree); - - /* hide button '-' and show button '+' */ - if (tree_item->pixmaps_box) - { - gtk_container_remove (GTK_CONTAINER (tree_item->pixmaps_box), - tree_item->minus_pix_widget); - gtk_container_add (GTK_CONTAINER (tree_item->pixmaps_box), - tree_item->plus_pix_widget); - } - if (tree->root_tree) - gtk_widget_queue_resize (GTK_WIDGET (tree->root_tree)); - tree_item->expanded = FALSE; - } -} - -static void -gtk_tree_item2_destroy (GtkObject *object) -{ - GtkTreeItem2* item; - GtkWidget* child; - - g_return_if_fail (object != NULL); - g_return_if_fail (GTK_IS_TREE_ITEM2 (object)); - -#ifdef TREE_DEBUG - g_message("+ gtk_tree_item2_destroy [object %#x]\n", (int)object); -#endif /* TREE_DEBUG */ - - item = GTK_TREE_ITEM2(object); - - /* free sub tree if it exist */ - child = item->subtree; - if (child) - { - gtk_widget_ref (child); - gtk_widget_unparent (child); - gtk_widget_destroy (child); - gtk_widget_unref (child); - item->subtree = NULL; - } - - /* free pixmaps box */ - child = item->pixmaps_box; - if (child) - { - gtk_widget_ref (child); - gtk_widget_unparent (child); - gtk_widget_destroy (child); - gtk_widget_unref (child); - item->pixmaps_box = NULL; - } - - - /* destroy plus pixmap */ - if (item->plus_pix_widget) - { - gtk_widget_destroy (item->plus_pix_widget); - gtk_widget_unref (item->plus_pix_widget); - item->plus_pix_widget = NULL; - } - - /* destroy minus pixmap */ - if (item->minus_pix_widget) - { - gtk_widget_destroy (item->minus_pix_widget); - gtk_widget_unref (item->minus_pix_widget); - item->minus_pix_widget = NULL; - } - - /* By removing the pixmaps here, and not in unrealize, we depend on - * the fact that a widget can never change colormap or visual. - */ - gtk_tree_item2_remove_pixmaps (item); - - GTK_OBJECT_CLASS (parent_class)->destroy (object); - -#ifdef TREE_DEBUG - g_message("- gtk_tree_item2_destroy\n"); -#endif /* TREE_DEBUG */ -} - -void -gtk_tree_item2_remove_subtree (GtkTreeItem2* item) -{ - g_return_if_fail (item != NULL); - g_return_if_fail (GTK_IS_TREE_ITEM2(item)); - g_return_if_fail (item->subtree != NULL); - - if (GTK_TREE2 (item->subtree)->children) - { - /* The following call will remove the children and call - * gtk_tree_item2_remove_subtree() again. So we are done. - */ - gtk_tree2_remove_items (GTK_TREE2 (item->subtree), - GTK_TREE2 (item->subtree)->children); - return; - } - - if (GTK_WIDGET_MAPPED (item->subtree)) - gtk_widget_unmap (item->subtree); - - gtk_widget_unparent (item->subtree); - - if (item->pixmaps_box) - gtk_widget_hide (item->pixmaps_box); - - item->subtree = NULL; - - if (item->expanded) - { - item->expanded = FALSE; - if (item->pixmaps_box) - { - gtk_container_remove (GTK_CONTAINER (item->pixmaps_box), - item->minus_pix_widget); - gtk_container_add (GTK_CONTAINER (item->pixmaps_box), - item->plus_pix_widget); - } - } -} - -static void -gtk_tree_item2_map (GtkWidget *widget) -{ - GtkBin *bin; - GtkTreeItem2* item; - - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_TREE_ITEM2 (widget)); - - bin = GTK_BIN (widget); - item = GTK_TREE_ITEM2(widget); - - GTK_WIDGET_SET_FLAGS (widget, GTK_MAPPED); - - if(item->pixmaps_box && - GTK_WIDGET_VISIBLE (item->pixmaps_box) && - !GTK_WIDGET_MAPPED (item->pixmaps_box)) - gtk_widget_map (item->pixmaps_box); - - if (bin->child && - GTK_WIDGET_VISIBLE (bin->child) && - !GTK_WIDGET_MAPPED (bin->child)) - gtk_widget_map (bin->child); - - gdk_window_show (widget->window); -} - -static void -gtk_tree_item2_unmap (GtkWidget *widget) -{ - GtkBin *bin; - GtkTreeItem2* item; - - g_return_if_fail (widget != NULL); - g_return_if_fail (GTK_IS_TREE_ITEM2 (widget)); - - GTK_WIDGET_UNSET_FLAGS (widget, GTK_MAPPED); - bin = GTK_BIN (widget); - item = GTK_TREE_ITEM2(widget); - - gdk_window_hide (widget->window); - - if(item->pixmaps_box && - GTK_WIDGET_VISIBLE (item->pixmaps_box) && - GTK_WIDGET_MAPPED (item->pixmaps_box)) - gtk_widget_unmap (bin->child); - - if (bin->child && - GTK_WIDGET_VISIBLE (bin->child) && - GTK_WIDGET_MAPPED (bin->child)) - gtk_widget_unmap (bin->child); -} - -static void -gtk_tree_item2_forall (GtkContainer *container, - gboolean include_internals, - GtkCallback callback, - gpointer callback_data) -{ - GtkBin *bin; - GtkTreeItem2 *tree_item; - - g_return_if_fail (container != NULL); - g_return_if_fail (GTK_IS_TREE_ITEM2 (container)); - g_return_if_fail (callback != NULL); - - bin = GTK_BIN (container); - tree_item = GTK_TREE_ITEM2 (container); - - if (bin->child) - (* callback) (bin->child, callback_data); -/* if (include_internals && tree_item->subtree) - (* callback) (tree_item->subtree, callback_data); */ -} diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/gtktreeitem2.h b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/gtktreeitem2.h deleted file mode 100644 index bbbb364ad..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/gtktreeitem2.h +++ /dev/null @@ -1,91 +0,0 @@ -/* GTK - The GIMP Toolkit - * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -/* - * Modified by the GTK+ Team and others 1997-1999. See the AUTHORS - * file for a list of people on the GTK+ Team. See the ChangeLog - * files for a list of changes. These files are distributed with - * GTK+ at ftp://ftp.gtk.org/pub/gtk/. - */ - -#ifndef __GTK_TREE_ITEM2_H__ -#define __GTK_TREE_ITEM2_H__ - - -#include -#include - - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - - -#define GTK_TYPE_TREE_ITEM2 (gtk_tree_item2_get_type ()) -#define GTK_TREE_ITEM2(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_TREE_ITEM2, GtkTreeItem2)) -#define GTK_TREE_ITEM2_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_TREE_ITEM2, GtkTreeItem2Class)) -#define GTK_IS_TREE_ITEM2(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_TREE_ITEM2)) -#define GTK_IS_TREE_ITEM2_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TREE_ITEM2)) - -#define GTK_TREE_ITEM2_SUBTREE(obj) (GTK_TREE_ITEM2(obj)->subtree) - - -typedef struct _GtkTreeItem2 GtkTreeItem2; -typedef struct _GtkTreeItem2Class GtkTreeItem2Class; - -struct _GtkTreeItem2 -{ - GtkItem item; - - GtkWidget *subtree; - GtkWidget *pixmaps_box; - GtkWidget *plus_pix_widget, *minus_pix_widget; - - GList *pixmaps; /* pixmap node for this items color depth */ - - guint expanded : 1; -}; - -struct _GtkTreeItem2Class -{ - GtkItemClass parent_class; - - void (* expand) (GtkTreeItem2 *tree_item); - void (* collapse) (GtkTreeItem2 *tree_item); -}; - - -GtkType gtk_tree_item2_get_type (void); -GtkWidget* gtk_tree_item2_new (void); -GtkWidget* gtk_tree_item2_new_with_label (gchar *label); -void gtk_tree_item2_set_subtree (GtkTreeItem2 *tree_item, - GtkWidget *subtree); -void gtk_tree_item2_remove_subtree (GtkTreeItem2 *tree_item); -void gtk_tree_item2_select (GtkTreeItem2 *tree_item); -void gtk_tree_item2_deselect (GtkTreeItem2 *tree_item); -void gtk_tree_item2_expand (GtkTreeItem2 *tree_item); -void gtk_tree_item2_collapse (GtkTreeItem2 *tree_item); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - - -#endif /* __GTK_TREE_ITEM2_H__ */ diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/handlebox.xpm b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/handlebox.xpm deleted file mode 100644 index e4d792cbb..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/handlebox.xpm +++ /dev/null @@ -1,34 +0,0 @@ -/* XPM */ -static char *handlebox_xpm[] = { -/* columns rows colors chars-per-pixel */ -"21 21 7 1", -" c Gray0", -". c #7b7b7b", -"X c #d6d6d6", -"o c #b3cece", -"O c Gray87", -"+ c Gray100", -"@ c None", -/* pixels */ -"@@@@@@@@@@@@@@@@@@@@@", -"@@@@@@@@@@@@@@@@@@@@@", -"@@@@@@@@@@@@@@@@@@@@@", -"@++++++++++++++++++ @", -"@+OOOO.XXXXXXXXXXX. @", -"@++OOO.XXXXXXXXXXX. @", -"@+O.+O.XXXXXXXXXXX. @", -"@+OOO..XXXXXXXXXXX. @", -"@++OOO.XXXXXXXXXXX. @", -"@+O.+O.XXXXXXXXXXX. @", -"@+OOO..XXXXXXXXXXX. @", -"@++OOO.XXXXXXXXXXX. @", -"@+O.+O.XXXXXXXXXXX. @", -"@+OOO..XXXXXXXXXXX. @", -"@+................. @", -"@ @", -"@@@@@@@@@@@@@@@@@@@@@", -"@@@@@@@@@@@@@@@@@@@@@", -"@@@@@@@@@@@@@@@@@@@@@", -"@@@@@@@@@@@@@@@@@@@@@", -"@@@@@@@@@@@@@@@@@@@@@" -}; diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/hbox.xpm b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/hbox.xpm deleted file mode 100644 index 7363317b6..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/hbox.xpm +++ /dev/null @@ -1,31 +0,0 @@ -/* XPM */ -static char *hbox_xpm[] = { -/* columns rows colors chars-per-pixel */ -"21 21 4 1", -" c Gray0", -". c #7b7b7b", -"X c #d6d6d6", -"o c Gray100", -/* pixels */ -"oooooo oooooo oooooo ", -"oXXXX. oXXXX. oXXXX. ", -"oXXXX. oXXXX. oXXXX. ", -"oXXXX. oXXXX. oXXXX. ", -"oXXXX. oXXXX. oXXXX. ", -"oXXXX. oXXXX. oXXXX. ", -"oXXXX. oXXXX. oXXXX. ", -"oXXXX. oXXXX. oXXXX. ", -"oXXXX. oXXXX. oXXXX. ", -"oXXXX. oXXXX. oXXXX. ", -"oXXXX. oXXXX. oXXXX. ", -"oXXXX. oXXXX. oXXXX. ", -"oXXXX. oXXXX. oXXXX. ", -"oXXXX. oXXXX. oXXXX. ", -"oXXXX. oXXXX. oXXXX. ", -"oXXXX. oXXXX. oXXXX. ", -"oXXXX. oXXXX. oXXXX. ", -"oXXXX. oXXXX. oXXXX. ", -"oXXXX. oXXXX. oXXXX. ", -"o..... o..... o..... ", -" " -}; diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/hbuttonbox.xpm b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/hbuttonbox.xpm deleted file mode 100644 index 77d73dc46..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/hbuttonbox.xpm +++ /dev/null @@ -1,33 +0,0 @@ -/* XPM */ -static char *hbuttonbox_xpm[] = { -/* columns rows colors chars-per-pixel */ -"21 21 6 1", -" c Gray0", -". c #7b7b7b", -"X c #d6d6d6", -"o c #b3cece", -"O c Gray100", -"+ c None", -/* pixels */ -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+OOOOO +OOOOO +OOOOO ", -"+OXXX. +OXXX. +OXXX. ", -"+OXXX. +OXXX. +OXXX. ", -"+O.... +O.... +O.... ", -"+ + + ", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++" -}; diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/hseparator.xpm b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/hseparator.xpm deleted file mode 100644 index 41ad8aafc..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/hseparator.xpm +++ /dev/null @@ -1,31 +0,0 @@ -/* XPM */ -static char *hseparator_xpm[] = { -/* columns rows colors chars-per-pixel */ -"21 21 4 1", -" c #7b7b7b", -". c #b3cece", -"X c Gray100", -"o c None", -/* pixels */ -"ooooooooooooooooooooo", -"ooooooooooooooooooooo", -"ooooooooooooooooooooo", -"ooooooooooooooooooooo", -"ooooooooooooooooooooo", -"ooooooooooooooooooooo", -"ooooooooooooooooooooo", -"ooooooooooooooooooooo", -"ooooooooooooooooooooo", -"ooooooooooooooooooooo", -"o o", -"oXXXXXXXXXXXXXXXXXXXo", -"ooooooooooooooooooooo", -"ooooooooooooooooooooo", -"ooooooooooooooooooooo", -"ooooooooooooooooooooo", -"ooooooooooooooooooooo", -"ooooooooooooooooooooo", -"ooooooooooooooooooooo", -"ooooooooooooooooooooo", -"ooooooooooooooooooooo" -}; diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/label.xpm b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/label.xpm deleted file mode 100644 index 013e13a96..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/label.xpm +++ /dev/null @@ -1,30 +0,0 @@ -/* XPM */ -static char *label_xpm[] = { -/* columns rows colors chars-per-pixel */ -"21 21 3 1", -" c Gray0", -". c #b3cece", -"X c None", -/* pixels */ -"XXXXXXXXXXXXXXXXXXXXX", -"XXXXXXXXXXXXXXXXXXXXX", -"XXXXXXXXXXXXXXXXXXXXX", -"XXXXXXXXXX XXXXXXXXX", -"XXXXXXXXX XXXXXXXXX", -"XXXXXXXXX XXXXXXXXX", -"XXXXXXXX XXXXXXXX", -"XXXXXXXX XXXXXXXX", -"XXXXXXXX XXXXXXX", -"XXXXXXX X XXXXXXX", -"XXXXXXX X XXXXXX", -"XXXXXX XX XXXXXX", -"XXXXXX XXXXX", -"XXXXX XXXXX", -"XXXXX XXXXX XXXXX", -"XXXX XXXXX XXXX", -"XXX XXXXX XXX", -"XXX XXX XXX", -"XXXXXXXXXXXXXXXXXXXXX", -"XXXXXXXXXXXXXXXXXXXXX", -"XXXXXXXXXXXXXXXXXXXXX" -}; diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/load_lexer.mll b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/load_lexer.mll deleted file mode 100644 index 46aa5acc2..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/load_lexer.mll +++ /dev/null @@ -1,46 +0,0 @@ -{ -open Load_parser -} - -rule token = parse - [ ' ' '\t' '\n']+ { token lexbuf } -| "" { WINDOW_END } -| "name" { NAME } -| '=' { EQUAL } -| '>' { SUP } - -| "<" ['A'-'Z' 'a'-'z' '0'-'9' '_']+ - { - let l = Lexing.lexeme lexbuf in - let s = String.sub l ~pos:1 ~len:(String.length l - 1) in - WIDGET_START s - } - -| "' - { - let l = Lexing.lexeme lexbuf in - let s = String.sub l ~pos:2 ~len:(String.length l - 3) in - WIDGET_END s - } - -| '"' [^ '"']* '"' - { - let l = Lexing.lexeme lexbuf in - let s = String.sub l ~pos:1 ~len:(String.length l - 2) in - IDENT s - } - -| '\'' [^ '\'']* '\'' - { - let l = Lexing.lexeme lexbuf in - let s = String.sub l ~pos:1 ~len:(String.length l - 2) in - IDENT s - } - -| ['A'-'Z' 'a'-'z' '0'-'9' '_' '.']+ - { - let s = Lexing.lexeme lexbuf in IDENT s - } - -| eof { EOF } diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/load_parser.mly b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/load_parser.mly deleted file mode 100644 index 09c7b7bf7..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/load_parser.mly +++ /dev/null @@ -1,56 +0,0 @@ -%{ -open Utils -%} - -%token EOF NAME EQUAL SUP WINDOW_START WINDOW_END -%token WIDGET_START WIDGET_END IDENT - -%type window_start -%type property widget_start -%type <(string * string) list> property_list -%type widget window -%type children window_list project - -%start project -%start window -%start widget - -%% - -project : window_list EOF { List.rev $1 } - -window_list : { [] } - | window_list window { $2 :: $1 } -; - -window : window_start property_list children WINDOW_END - { - Node (("window", $1, List.rev $2), $3) - } -; - -window_start : WINDOW_START NAME EQUAL IDENT SUP { $4 } -; - -children : { [] } - | children widget { $2 :: $1 } -; - -widget : widget_start property_list children WIDGET_END - { - let classe, name = $1 in - if classe <> $4 then raise Parsing.Parse_error; - Node ((classe, name, List.rev $2), $3) - } -; - -widget_start : WIDGET_START NAME EQUAL IDENT SUP { $1, $4 } -; - -property_list : { [] } - | property_list property { $2 :: $1 } -; - -property : IDENT EQUAL IDENT { $1, $3 } -; - diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/main.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/main.ml deleted file mode 100644 index cb150e086..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/main.ml +++ /dev/null @@ -1,393 +0,0 @@ -(* $Id$ *) - -open GdkKeysyms -open Gtk -open GObj - -open Utils -open TiBase - -let main_project_modify = ref false - -let main_window = GWindow.window ~title:"ZOOM" ~x:10 ~y:10 () -let main_vbox = GPack.vbox ~packing:main_window#add () -let main_menu = GMenu.menu_bar ~packing:(main_vbox#pack ~expand:false) () - -let can_copy = ref (fun _ -> assert false) -let can_paste = ref (fun _ -> assert false) - -class project () = - let project_box = GPack.vbox ~packing:main_vbox#pack () in - let project_tree = GTree2.tree ~packing:project_box#pack () in - object(self) - val mutable window_list = [] - -(* the selected window *) - val mutable selected = (None : window_and_tree option) - - method change_selected sel = - match selected with - | None -> - selected <- Some sel; - sel#project_tree_item#misc#set_state `SELECTED; - !can_copy true - | Some old_sel -> - if sel = old_sel then begin - selected <- None; - sel#project_tree_item#misc#set_state `NORMAL; - !can_copy false - end else begin - old_sel#project_tree_item#misc#set_state `NORMAL; - selected <- Some sel; - sel#project_tree_item#misc#set_state `SELECTED; - !can_copy true - end - - val mutable filename = "" - val mutable dirname = "" - - method set_filename f = - let dir, file = split_filename f ~ext:".rad" in - filename <- file; - dirname <- dir - - method get_filename () = - get_filename ~callback:self#set_filename ~dir:dirname () - - method dirname = dirname - -(* method set_dirname f = dirname <- f *) - - method add_window ~name ?tree:wt () = - let wt = match wt with - | None -> new window_and_tree ~name - | Some wt -> wt in - let tiwin = wt#tiwin and tw=wt#tree_window in - let project_tree_item = wt#project_tree_item in - project_tree#append project_tree_item; - let show = ref true in - project_tree_item#event#connect#button_press ~callback: - (fun ev -> - match GdkEvent.get_type ev with - | `BUTTON_PRESS -> - if GdkEvent.Button.button ev = 1 then begin - self#change_selected wt - end else - if GdkEvent.Button.button ev = 3 then begin - let menu = GMenu.menu () in - let name = wt#tiwin#name in - let mi_remove = GMenu.menu_item ~label:("delete " ^ name) - ~packing:menu#append () - and mi_copy = GMenu.menu_item ~label:("copy " ^ name) - ~packing:menu#append () - and mi_cut = GMenu.menu_item ~label:("cut " ^ name) - ~packing:menu#append () in - mi_remove#connect#activate - ~callback:(fun () -> self#delete_window wt); - mi_copy#connect#activate - ~callback:(fun () -> self#copy_wt wt); - mi_cut#connect#activate - ~callback:(fun () -> self#cut_wt wt); - menu#popup ~button:3 ~time:(GdkEvent.Button.time ev) - end; - GtkSignal.stop_emit (); - true - | `TWO_BUTTON_PRESS -> - if GdkEvent.Button.button ev = 1 then begin - if !show then begin - show := false; - tiwin#widget#misc#hide (); - tw#misc#hide () - end - else begin - show := true; - tiwin#widget#misc#show (); - tw#misc#show () - end - end; - true - | _ -> false); - tiwin#connect_event#delete ~callback: - (fun _ -> show := false; tiwin#widget#misc#hide (); true); - tw#event#connect#delete ~callback: - (fun _ -> show := false; tw#misc#hide (); true); - window_list <- wt :: window_list; - add_undo (Remove_window name); - main_window#misc#set_can_focus false; - main_window#misc#grab_focus () - - - method add_window_by_node - (Node ((classe, name, proplist), children)) = - if classe <> "window" - then failwith "add_window_by_node: class <> \"window\""; - let name = change_name name in (* for paste *) - let wt = new window_and_tree ~name in - let tiwin = wt#tiwin in - List.iter proplist ~f:(fun (n,v) -> tiwin#set_property n v); - begin match children with - | [] -> () - | [ ch ] -> tiwin#add_children_wo_undo ch; () - | _ -> failwith "add_window_by_node: more than one child" - end; - self#add_window ~name ~tree:wt () - - method delete_window (wt : window_and_tree) = - let tiwin = wt#tiwin in - project_tree#remove wt#project_tree_item; - tiwin#remove_me (); - wt#tree_window#destroy (); - window_list <- list_remove ~f:(fun w -> w = wt) window_list - - method delete_window_by_name ~name = - let wt = List.find window_list ~f:(fun wt -> wt#tiwin#name = name) in - self#delete_window wt - - method delete () = - List.iter window_list - ~f:(fun wt -> self#delete_window wt); - main_vbox#remove project_box#coerce; -(* remove after test *) - if !name_list <> [] then failwith "name_list not empty" - - method save_as () = if self#get_filename () then self#save () - - method save () = - if filename = "" then self#save_as () - else begin - let outch = open_out (dirname ^ filename ^ ".rad") in - let f = Format.formatter_of_out_channel outch in - List.iter window_list ~f:(fun wt -> wt#tiwin#save f); - close_out outch; - main_project_modify := false - end - - method copy_wt (wt : window_and_tree) = - wt#tiwin#copy (); - !can_paste true - - method cut_wt (wt : window_and_tree) = - self#copy_wt wt; - self#delete_window wt - - method copy () = - match selected with - | None -> failwith "main_project copy" - | Some sel -> self#copy_wt sel - - method cut () = - match selected with - | None -> failwith "main_project cut" - | Some sel -> self#cut_wt sel - - method paste () = - let lexbuf = Lexing.from_string !window_selection in - let node = Load_parser.window Load_lexer.token lexbuf in - self#add_window_by_node node - - method emit () = - let outc = open_out (dirname ^ filename ^ ".ml") in - let f = Format.formatter_of_out_channel outc in - List.iter window_list ~f:(fun wt -> wt#emit f); - Format.fprintf f "let main () =@\n"; -(* this is just for demo *) - List.iter window_list ~f: - begin fun wt -> - let name = wt#tiwin#name in - Format.fprintf f " let %s = new %s () in %s#show ();@\n" - name name name - end; - Format.fprintf f - " GMain.Main.main ()@\n@\nlet _ = main ()@\n"; - close_out outc - - end - - -let main_project = ref (new project ()) - -let load () = - let filename = ref "" in - get_filename ~callback:(fun f -> filename := f) ~dir:!main_project#dirname (); - if !filename <> "" then begin - !main_project#delete (); - main_project := new project (); - let inch = open_in !filename in - let lexbuf = Lexing.from_channel inch in - let project_list = Load_parser.project Load_lexer.token lexbuf in - close_in inch; - List.iter project_list - ~f:(fun node -> !main_project#add_window_by_node node); - !main_project#set_filename !filename - end - - -let interpret_undo = function - | Add (parent_name, node, pos) -> - let parent = Hashtbl.find widget_map parent_name in - parent#add_children node ~pos - | Remove child_name -> - let child = Hashtbl.find widget_map child_name in - child#remove_me () - | Property (property, value_string) -> - property#set value_string - | Add_window node -> !main_project#add_window_by_node node - | Remove_window name -> !main_project#delete_window_by_name ~name - -let undo () = - if !last_action_was_undo then begin - match !next_undo_info with - | hd :: tl -> interpret_undo hd; next_undo_info := tl - | [] -> message "no more undo info" - end - else begin - match !undo_info with - | hd :: tl -> interpret_undo hd; next_undo_info := tl - | [] -> message "no undo info" - end; - last_action_was_undo := true - - -let targets = [ { target = "STRING"; flags = []; info = 0} ] - -let xpm_window () = - let source_drag_data_get classe _ (data : selection_data) ~info ~time = - data#set ~typ:data#target ~format:0 ~data:classe in - let window = GWindow.window ~title:"icons" ~x:250 ~y:10 () in - window#misc#realize (); - let vbox = GPack.vbox ~packing:window#add () in - let table = GPack.table ~rows:1 ~columns:5 ~border_width:20 - ~packing:vbox#pack () in - let tooltips = GData.tooltips () in - let add_xpm ~file ~left ~top ~tip = - let gdk_pix = GDraw.pixmap_from_xpm ~file ~window () in - let ev = GBin.event_box ~packing:(table#attach ~left ~top) () in - let pix = GMisc.pixmap gdk_pix ~packing:ev#add () in - ev#event#connect#button_press ~callback: - (fun ev -> match GdkEvent.get_type ev with - | `BUTTON_PRESS -> - if GdkEvent.Button.button ev = 1 then begin - !main_project#add_window ~name:(make_new_name "window") () - end; - true - | _ -> false); - tooltips#set_tip ev#coerce ~text:tip - in - add_xpm ~file:"window.xpm" ~left:0 ~top:0 ~tip:"window"; - GMisc.separator `HORIZONTAL ~packing:vbox#pack (); - let table = GPack.table ~rows:6 ~columns:6 ~packing:vbox#pack - ~row_spacings:20 ~col_spacings:20 ~border_width:20 () in - let add_xpm file ~left ~top ~classe = - let gdk_pix = GDraw.pixmap_from_xpm ~file ~window () in - let ev = GBin.event_box ~packing:(table#attach ~left ~top) () in - let pix = GMisc.pixmap gdk_pix ~packing:ev#add () in - ev#drag#source_set ~modi:[`BUTTON1] targets ~actions:[`COPY]; - ev#drag#source_set_icon ~colormap:window#misc#style#colormap - gdk_pix; - ev#drag#connect#data_get ~callback:(source_drag_data_get classe); - tooltips#set_tip ev#coerce ~text:classe - in - - add_xpm "button.xpm" ~left:0 ~top:0 ~classe:"button"; - add_xpm "togglebutton.xpm" ~left:1 ~top:0 ~classe:"toggle_button"; - add_xpm "checkbutton.xpm" ~left:2 ~top:0 ~classe:"check_button"; - add_xpm "radiobutton.xpm" ~left:3 ~top:0 ~classe:"radio_button"; - add_xpm "toolbar.xpm" ~left:4 ~top:0 ~classe:"toolbar"; - add_xpm "hbox.xpm" ~left:0 ~top:1 ~classe:"hbox"; - add_xpm "vbox.xpm" ~left:1 ~top:1 ~classe:"vbox"; - add_xpm "hbuttonbox.xpm" ~left:2 ~top:1 ~classe:"hbutton_box"; - add_xpm "vbuttonbox.xpm" ~left:3 ~top:1 ~classe:"vbutton_box"; - add_xpm "fixed.xpm" ~left:4 ~top:1 ~classe:"fixed"; - add_xpm "frame.xpm" ~left:0 ~top:2 ~classe:"frame"; - add_xpm "aspectframe.xpm" ~left:1 ~top:2 ~classe:"aspect_frame"; - add_xpm "scrolledwindow.xpm" ~left:2 ~top:2 ~classe:"scrolled_window"; - add_xpm "eventbox.xpm" ~left:3 ~top:2 ~classe:"event_box"; - add_xpm "handlebox.xpm" ~left:4 ~top:2 ~classe:"handle_box"; - add_xpm "viewport.xpm" ~left:5 ~top:2 ~classe:"viewport"; - add_xpm "hseparator.xpm" ~left:0 ~top:3 ~classe:"hseparator"; - add_xpm "vseparator.xpm" ~left:1 ~top:3 ~classe:"vseparator"; - add_xpm "clist.xpm" ~left:2 ~top:3 ~classe:"clist"; - add_xpm "label.xpm" ~left:0 ~top:4 ~classe:"label"; - add_xpm "statusbar.xpm" ~left:1 ~top:4 ~classe:"statusbar"; - add_xpm "notebook.xpm" ~left:2 ~top:4 ~classe:"notebook"; - add_xpm "colorselection.xpm" ~left:3 ~top:4 ~classe:"color_selection"; - add_xpm "pixmap.xpm" ~left:4 ~top:4 ~classe:"pixmap"; - add_xpm "entry.xpm" ~left:0 ~top:5 ~classe:"entry"; - add_xpm "spinbutton.xpm" ~left:1 ~top:5 ~classe:"spin_button"; - add_xpm "combo.xpm" ~left:2 ~top:5 ~classe:"combo"; - - window#show (); - window - - -let main () = - let _ = GMain.Main.init () in - let prop_win = Propwin.init () in - let palette = xpm_window () in - main_window#show (); - main_window#connect#destroy ~callback:GMain.Main.quit; - - let mp = main_project in - let f = new GMenu.factory main_menu in - let accel_group = f#accel_group in - main_window#add_accel_group accel_group; - prop_win#add_accel_group accel_group; - palette#add_accel_group accel_group; - - let file_menu = new GMenu.factory (f#add_submenu "File") ~accel_group - and edit_menu = new GMenu.factory (f#add_submenu "Edit") ~accel_group - and view_menu = new GMenu.factory (f#add_submenu "View") ~accel_group - and project_menu = new GMenu.factory (f#add_submenu "Project") ~accel_group - in - - file_menu#add_item "Quit" ~key:_Q ~callback:GMain.Main.quit; - - project_menu#add_item "New" ~key:_N - ~callback:(fun () -> !mp#delete (); mp := new project ()); - project_menu#add_item "Open..." ~key:_O ~callback:load; - project_menu#add_item "Save" ~key:_S ~callback:(fun () -> !mp#save ()); - project_menu#add_item "Save as..." ~callback:(fun () -> !mp#save_as ()); - project_menu#add_separator (); - project_menu#add_item "Emit code" ~callback:(fun () -> !mp#emit ()); - - let copy_item = - edit_menu#add_item "Copy" ~key:_C ~callback:(fun () -> !mp#copy ()) - and cut_item = - edit_menu#add_item "Cut" ~key:_X ~callback:(fun () -> !mp#cut ()) - and paste_item = - edit_menu#add_item "Paste" ~key:_V ~callback:(fun () -> !mp#paste ()) - in - can_copy := - (fun b -> copy_item#misc#set_sensitive b; cut_item#misc#set_sensitive b); - can_paste := paste_item#misc#set_sensitive; - !can_copy false; !can_paste false; - edit_menu#add_item "Undo" ~key:_Z ~callback:undo; - - let palette_visible = ref true in - palette#event#connect#delete ~callback: - (fun _ -> palette_visible := false; palette#misc#hide (); true); - view_menu#add_item "Palette" - ~callback:(fun () -> - if !palette_visible then begin - palette#misc#hide (); - palette_visible := false - end else begin - palette#misc#show (); - palette_visible := true - end); - let prop_win_visible = ref true in - prop_win#event#connect#delete ~callback: - (fun _ -> prop_win_visible := false; prop_win#misc#hide (); true); - view_menu#add_item "Properties window" - ~callback:(fun () -> - if !prop_win_visible then begin - prop_win#misc#hide (); - prop_win_visible := false - end else begin - prop_win#misc#show (); - prop_win_visible := true - end); - - GMain.Main.main () - -let _ = main () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/ml_gtk2.c b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/ml_gtk2.c deleted file mode 100644 index 49ce27bbe..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/ml_gtk2.c +++ /dev/null @@ -1,124 +0,0 @@ -/* $Id$ */ - -#include -#include -#include -#include -#include -#include - -#include "../../wrappers.h" -#include "../../ml_glib.h" -#include "../../ml_gdk.h" -#include "../../ml_gtk.h" -#include "../../gtk_tags.h" - -#include "gtktree2.h" -#include "gtktreeitem2.h" - -#include - -value Val_GtkObject_sink (GtkObject *); - -#define Val_GtkAny(w) Val_GtkObject((GtkObject*)w) -#define Val_GtkAny_sink(w) Val_GtkObject_sink((GtkObject*)w) - -#define GtkWidget_val(val) check_cast(GTK_WIDGET,val) - -/* gtkwidget.h */ - - -#define Val_GtkWidget Val_GtkAny -#define Val_GtkWidget_sink Val_GtkAny_sink - - -/* gtktreeitem2.h */ - -#define GtkTreeItem2_val(val) check_cast(GTK_TREE_ITEM2,val) -ML_0 (gtk_tree_item2_new, Val_GtkWidget_sink) -ML_1 (gtk_tree_item2_new_with_label, String_val, Val_GtkWidget_sink) -ML_2 (gtk_tree_item2_set_subtree, GtkTreeItem2_val, GtkWidget_val, Unit) -ML_1 (gtk_tree_item2_remove_subtree, GtkTreeItem2_val, Unit) -ML_1 (gtk_tree_item2_expand, GtkTreeItem2_val, Unit) -ML_1 (gtk_tree_item2_collapse, GtkTreeItem2_val, Unit) -ML_1 (GTK_TREE_ITEM2_SUBTREE, GtkTreeItem2_val, Val_GtkWidget) - -/* gtktree2.h */ - -#define GtkTree2_val(val) check_cast(GTK_TREE2,val) -ML_0 (gtk_tree2_new, Val_GtkWidget_sink) -ML_3 (gtk_tree2_insert, GtkTree2_val, GtkWidget_val, Int_val, Unit) -ML_3 (gtk_tree2_clear_items, GtkTree2_val, Int_val, Int_val, Unit) -ML_2 (gtk_tree2_select_item, GtkTree2_val, Int_val, Unit) -ML_2 (gtk_tree2_unselect_item, GtkTree2_val, Int_val, Unit) -ML_2 (gtk_tree2_select_child, GtkTree2_val, GtkWidget_val, Unit) -ML_2 (gtk_tree2_unselect_child, GtkTree2_val, GtkWidget_val, Unit) -ML_2 (gtk_tree2_child_position, GtkTree2_val, GtkWidget_val, Val_int) - -/* -ML_2 (gtk_tree2_set_selection_mode, GtkTree2_val, Selection_mode_val, Unit) -ML_2 (gtk_tree2_set_view_mode, GtkTree2_val, Tree_view_mode_val, Unit) -*/ - -ML_2 (gtk_tree2_set_view_lines, GtkTree2_val, Bool_val, Unit) -ML_2 (gtk_tree2_item_up, GtkTree2_val, Int_val, Unit) -ML_3 (gtk_tree2_select_next_child, GtkTree2_val, GtkWidget_val, Bool_val, Unit) -ML_2 (gtk_tree2_select_prev_child, GtkTree2_val, GtkWidget_val, Unit) - -static value val_gtkany (gpointer p) { return Val_GtkAny(p); } -value ml_gtk_tree2_selection (value tree) -{ - GList *selection = GTK_TREE2_SELECTION(GtkTree2_val(tree)); - return Val_GList(selection, val_gtkany); -} -static gpointer gtkobject_val (value val) { return GtkObject_val(val); } -value ml_gtk_tree2_remove_items (value tree, value items) -{ - GList *items_list = GList_val (items, gtkobject_val); - gtk_tree2_remove_items (GtkTree2_val(tree), items_list); - return Val_unit; -} - -value ml_gtk_tree2_children (value tree) -{ - GList *children = (GtkTree2_val(tree))->children; - return Val_GList(children, val_gtkany); -} - - - -#define GtkToolbar_val(val) check_cast(GTK_TOOLBAR,val) -/* sets the text of the label of a button; creates the label - if necessary */ -value ml_gtk_toolbar2_set_text (value toolbar, value text, value pos) -{ - GtkToolbar *t = GtkToolbar_val(toolbar); - GtkToolbarChild *ch = (GtkToolbarChild *)g_list_nth_data (t->children, Int_val(pos)); - GtkWidget *label = ch->label; - - if (label) - gtk_label_set_text (GTK_LABEL(label), String_val(text)); - else { - label = ch->label = gtk_label_new (String_val(text)); - gtk_box_pack_end (GTK_BOX (GTK_BIN(ch->widget)->child), label, FALSE, FALSE, 0); - if (t->style != GTK_TOOLBAR_ICONS) - gtk_widget_show (label); - } - - return Val_unit; -} - -value ml_gtk_toolbar2_set_icon (value toolbar, value icon, value pos) -{ - GtkToolbar *t = GtkToolbar_val(toolbar); - GtkToolbarChild * ch = - (GtkToolbarChild *)g_list_nth_data (t->children, Int_val(pos)); - GtkWidget *vbox = GTK_BIN(ch->widget)->child; - gtk_container_remove (GTK_CONTAINER(vbox), ch->icon); - ch->icon = GtkWidget_val(icon); - gtk_box_pack_end (GTK_BOX (vbox), ch->icon, FALSE, FALSE, 0); - if (t->style != GTK_TOOLBAR_TEXT) - gtk_widget_show (ch->icon); - - return Val_unit; -} diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/notebook.xpm b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/notebook.xpm deleted file mode 100644 index 77ac20d6c..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/notebook.xpm +++ /dev/null @@ -1,33 +0,0 @@ -/* XPM */ -static char *notebook_xpm[] = { -/* columns rows colors chars-per-pixel */ -"21 21 6 1", -" c Gray0", -". c #7b7b7b", -"X c #d6d6d6", -"o c #b3cece", -"O c Gray100", -"+ c None", -/* pixels */ -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+OOOOOO.OOOO.OOOO.+++", -"+OXXXXX.X.X..X.X..+++", -"+OXXXXX..X.X..X.X.+++", -"+OXXXXX.X.X..X.X..+++", -"+OXXXXX.OOOOOOOOOOO +", -"+OXXXXXXXXXXXXXXXX. +", -"+OXXXXXXXXXXXXXXXX. +", -"+OXXXXXXXXXXXXXXXX. +", -"+OXXXXXXXXXXXXXXXX. +", -"+OXXXXXXXXXXXXXXXX. +", -"+OXXXXXXXXXXXXXXXX. +", -"+OXXXXXXXXXXXXXXXX. +", -"+OXXXXXXXXXXXXXXXX. +", -"+O................. +", -"+ +", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++" -}; diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/pixmap.xpm b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/pixmap.xpm deleted file mode 100644 index d76a5ec81..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/pixmap.xpm +++ /dev/null @@ -1,39 +0,0 @@ -/* XPM */ -static char *pixmap_xpm[] = { -/* columns rows colors chars-per-pixel */ -"21 21 12 1", -" c Gray0", -". c #007b00", -"X c #7b7b7b", -"o c Blue", -"O c Green", -"+ c Cyan", -"@ c Yellow", -"# c #d6d6d6", -"$ c #b3cece", -"% c Gray87", -"& c Gray100", -"* c None", -/* pixels */ -"*********************", -"*********************", -"*********************", -"* ", -"* +++++%%%&+++++++++ ", -"* +&&&++%%++&+++XX++ ", -"* +++++++%+++++X@@X+ ", -"* ++&&++++XX+++X@@X+ ", -"* +++++++ XXX&++XX++ ", -"* &+++++XXXXXX++++&+ ", -"* +++++ +++++ ", -"* +++++ ###### +++++ ", -"* +++++ #o##o# +++++ ", -"* ..... ###### ..... ", -"* OOOOO ##oo## OOOOO ", -"* OOOOO ##oo## OOOOO ", -"* OOOOO OOOOO ", -"* OOOOOOOOOOOOOOOOOO ", -"* ", -"*********************", -"*********************" -}; diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/property.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/property.ml deleted file mode 100644 index 829e40b7c..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/property.ml +++ /dev/null @@ -1,175 +0,0 @@ -(* $Id$ *) - -open Gtk -open GObj -open GEdit -open GData -open GPack -open GMisc -open GWindow - -open Common -open Utils - -(* external id : 'a -> 'a = "%identity" *) - -class virtual vprop ~name ~init ~set = - object (self) - val mutable s : string = init - val name : string = name - method private virtual parse : string -> 'a - method get = s - method set s' = - if s' <> s then begin - let v = self#parse s' in - if (set v) then begin - add_undo (Property ((self :> prop), s)); - s <- s' - end - end - method modified = s <> init - method name = name - method code = s - method virtual range : range - method save_code = self#code - end - -let invalid_prop kind name s = - invalid_arg (Printf.sprintf "Property.%s(%s) <- %s" kind name s) - -class prop_enum ~values ~name ~init ~set = - object (self) - inherit vprop ~name ~init ~set - method private parse s = - try List.assoc s values - with Not_found -> invalid_prop "enum" name s - method range = Enum (List.map ~f:fst values) - end - -(* used for radio_button groups; there is nothing to do - in radtest when setting a radio_button group, only when writing - code or saving *) -class prop_enum_dyn ~values ~name ~init ~set = - object (self) - inherit vprop ~name ~init ~set - method private parse s = () - method range = Enum (values ()) - end - -let bool_values = - [ "true", true; "false", false ] - -let shadow_type_values : (string * Tags.shadow_type) list = - [ "NONE", `NONE; "IN", `IN; "OUT", `OUT; - "ETCHED_IN", `ETCHED_IN; "ETCHED_OUT", `ETCHED_OUT ] - -let policy_type_values : (string * Tags.policy_type) list = - [ "ALWAYS", `ALWAYS; "AUTOMATIC", `AUTOMATIC ] - -let orientation_values : (string * Tags.orientation) list = - [ "HORIZONTAL", `HORIZONTAL; "VERTICAL", `VERTICAL ] - -let toolbar_style_values : (string * Tags.toolbar_style) list = - [ "ICONS", `ICONS; "TEXT", `TEXT; "BOTH", `BOTH ] - -let toolbar_space_style_values : (string * [`EMPTY | `LINE]) list = - [ "EMPTY", `EMPTY; "LINE", `LINE ] - -let relief_style_values : (string * Tags.relief_style) list = - [ "NORMAL", `NORMAL; "HALF", `HALF; "NONE", `NONE ] - -let position_values : (string * Tags.position) list = - [ "LEFT", `LEFT; "RIGHT", `RIGHT; "TOP", `TOP; "BOTTOM", `BOTTOM ] - -let combo_use_arrows_values : (string * [ `NEVER | `DEFAULT | `ALWAYS ]) list = -[ "NEVER", `NEVER; "DEFAULT", `DEFAULT; "ALWAYS", `ALWAYS ] - -let spin_button_update_policy_values : - (string * Tags. spin_button_update_policy) list = - [ "ALWAYS", `ALWAYS; "IF_VALID", `IF_VALID ] - -let button_box_style_values : (string * Tags.button_box_style) list = - [ "DEFAULT_STYLE", `DEFAULT_STYLE; "SPREAD", `SPREAD; "EDGE", `EDGE; - "START", `START; "END", `END ] - -let update_type_values : (string * Tags.update_type) list = - [ "CONTINUOUS", `CONTINUOUS; "DISCONTINUOUS", `DISCONTINUOUS; - "DELAYED", `DELAYED ] - - -class prop_bool = prop_enum ~values:bool_values - -(* -class prop_variant ~values ~name ~init ~set : prop = - object - inherit prop_enum ~values ~name ~init ~set - method code = "`" ^ s - end -*) - -class prop_shadow = prop_enum ~values:shadow_type_values -class prop_policy = prop_enum ~values:policy_type_values -class prop_orientation = prop_enum ~values:orientation_values -class prop_toolbar_style = prop_enum ~values:toolbar_style_values -class prop_toolbar_space_style = prop_enum ~values:toolbar_space_style_values -class prop_relief_style = prop_enum ~values:relief_style_values -class prop_position = prop_enum ~values:position_values -class prop_combo_use_arrows = prop_enum ~values:combo_use_arrows_values -class prop_spin_button_update_policy = prop_enum - ~values:spin_button_update_policy_values -class prop_button_box_style = prop_enum ~values:button_box_style_values -class prop_update_type = prop_enum ~values:update_type_values - -class prop_int ~name ~init ~set : prop = - object - inherit vprop ~name ~init ~set - method private parse s = - try int_of_string s with _ -> invalid_prop "int" name s - method range = Int - end - -(* NB: float_of_string doesn't raise an exception in case of error *) -class prop_float ~name ~init ~min ~max ~set : prop = - object - inherit vprop ~name ~init ~set - method private parse s = - try float_of_string s with _ -> invalid_prop "float" name s - method code = - if String.contains s '.' || String.contains s 'e' then s - else s ^ ".0" - method range = Float(min,max) - end - -class prop_string ~name ~init ~set : prop = - object - inherit vprop ~name ~init ~set - method private parse s = s - method range = String - method code = "\"" ^ String.escaped s ^ "\"" - end - -class prop_adjustment ~name ~init ~set : prop = - object - inherit vprop ~name ~init ~set - method private parse = get5floats_from_string - method range = Adjust - end - -class prop_clist_titles ~name ~init ~set : prop = - object - inherit vprop ~name ~init ~set - method private parse = split_string ~sep:' ' - method range = CList_titles - method code = "[ \"" ^ - String.concat ~sep:"\"; \"" (split_string ~sep:' ' s) ^ "\" ]" - method save_code = "\"" ^ s ^ "\"" - end - -class prop_file ~name ~init ~set : prop = - object - inherit vprop ~name ~init ~set - method private parse s = s - method range = File - method code = "\"" ^ String.escaped s ^ "\"" - end - diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/property.mli b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/property.mli deleted file mode 100644 index ccf265077..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/property.mli +++ /dev/null @@ -1,96 +0,0 @@ -(* $Id$ *) - -open Gtk.Tags -open Common - -class virtual vprop : - name:string -> (* property's name *) - init:string -> (* default value *) - set:('a -> bool) -> - object - val name : string - val mutable s : string - method code : string (* encoded value *) - method get : string - method modified : bool - method name : string - method private virtual parse : string -> 'a - method virtual range : range - method save_code : string - method set : string -> unit - end - -class prop_int : - name:string -> init:string -> set:(int -> bool) -> prop - -class prop_float : - name:string -> - init:string -> min:float -> max:float -> set:(float -> bool) -> prop - -class prop_string : - name:string -> init:string -> set:(string -> bool) -> prop - -class prop_bool : - name:string -> init:string -> set:(bool -> bool) -> prop -(* -class prop_variant : - values:(string * 'a) list -> - name:string -> init:string -> set:('a -> bool) -> prop -*) -class prop_shadow : - name:string -> init:string -> set:(shadow_type -> bool) -> prop - -class prop_policy : - name:string -> init:string -> set:(policy_type -> bool) -> prop - -class prop_orientation : - name:string -> - init:string -> set:(Gtk.Tags.orientation -> bool) -> prop - -class prop_toolbar_style : - name:string -> - init:string -> set:(Gtk.Tags.toolbar_style -> bool) -> prop - -class prop_toolbar_space_style : - name:string -> init:string -> set:([ `EMPTY | `LINE] -> bool) -> prop - -class prop_relief_style : - name:string -> - init:string -> set:(Gtk.Tags.relief_style -> bool) -> prop - -class prop_position : - name:string -> - init:string -> set:(Gtk.Tags.position -> bool) -> prop - -class prop_combo_use_arrows : - name:string -> - init:string -> set:([ `NEVER | `DEFAULT | `ALWAYS] -> bool) -> prop - -class prop_spin_button_update_policy : - name:string -> - init:string -> set:(Gtk.Tags.spin_button_update_policy -> bool) -> prop - -class prop_button_box_style : - name:string -> - init:string -> set:(Gtk.Tags.button_box_style -> bool) -> prop - -class prop_update_type : - name:string -> - init:string -> set:(Gtk.Tags.update_type -> bool) -> prop - -class prop_enum_dyn : - values:(unit -> string list) -> name:string -> - init:string -> set:(unit -> bool) -> prop - -class prop_adjustment : - name:string -> init:string -> - set:(float * float * float * float * float -> bool) -> prop - -class prop_clist_titles : - name:string -> init:string -> - set:(string list -> bool) -> prop - -class prop_file : - name:string -> init:string -> set:(string -> bool) -> prop - - diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/propwin.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/propwin.ml deleted file mode 100644 index 2f8b29151..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/propwin.ml +++ /dev/null @@ -1,180 +0,0 @@ -(* $Id$ *) - -open GObj - -open Common -open Utils - -class type tiwidget_base = object - method name : string - method proplist : (string * prop) list -end - -let prop_widget (prop : prop) = - match prop#range with - Enum l -> - let w = GEdit.combo ~popdown_strings:l ~use_arrows:`ALWAYS () in - w#entry#connect#changed ~callback:(fun () -> prop#set w#entry#text); - w#entry#set_editable false; - w#entry#set_text prop#get; - w#coerce - | String -> - let w = GEdit.entry ~text:prop#get () in - w#connect#activate ~callback:(fun () -> prop#set w#text); - w#coerce - | File -> - let w = GPack.hbox () in - let e = GEdit.entry ~text:prop#get ~editable:false ~packing:w#pack () in - let b = GButton.button ~label:"..." ~packing:w#pack () in - b#connect#clicked - ~callback:(fun () -> get_filename - ~callback:(fun name -> e#set_text name; prop#set name) (); ()); - w#coerce - | Int -> - let adjustment = - GData.adjustment ~value:(float_of_string prop#get) - ~lower:(-2.) ~upper:5000. ~step_incr:1. ~page_incr:10. ~page_size:0. () - in - let w = GEdit.spin_button ~rate:0.5 ~digits:0 ~adjustment () in - w#connect#activate - ~callback:(fun () -> prop#set (string_of_int w#value_as_int)); - w#coerce - | Float (lower, upper) -> -(* let adjustment = - GData.adjustment ~value:(float_of_string prop#get) - ~lower ~upper ~step_incr:((upper-.lower)/.100.) - ~page_incr:((upper-.lower)/.10.) ~page_size:0. () - in - let w = GEdit.spin_button ~rate:0.5 ~digits:2 ~adjustment () in - w#connect#activate - ~callback:(fun () -> prop#set (string_of_float w#value)); - w#coerce -*) - let w = entry_float ~init:(float_of_string prop#get) () in - w#connect#activate - ~callback:(fun () -> prop#set (string_of_float w#value)); - w#coerce -(* | Adjust -> - let wpop = GWindow.window ~title:"Adjustment values" () in - let vb = GPack.vbox ~packing:wpop#add() in - let hb1 = GPack.hbox ~packing:vb#pack () in - let l1 = GMisc.label ~text:"lower" ~packing:hb1#pack () in - let e1 = entry_float ~packing:hb1#pack - ~init:(float_of_string prop#get) ~set:prop#set in -*) - | CList_titles -> - let wpop = GWindow.window ~title:"titles of the columns" () in - let vb = GPack.vbox ~packing:wpop#add () in - let titles = split_string prop#get ~sep:' ' in - let n = List.length titles in - let rtitles = ref titles in - let rget = ref [] and rset = ref [] in - for i = 1 to n do - match !rtitles with - | hd::tl -> - let hb = GPack.hbox ~packing:vb#pack () in - let _ = GMisc.label ~text:("column" ^ (string_of_int i)) - ~packing:hb#pack () in - let e = GEdit.entry ~text:hd ~packing:hb#pack () in - rtitles := tl; - rget := (fun () -> e#text) :: !rget; - rset := e#set_text :: !rset; - | _ -> failwith "CList_titles: this cannot happen!!" - done; - rtitles := titles; - rget := List.rev !rget; - rset := List.rev !rset; - let hb = GPack.hbox ~packing:vb#pack () in - let ok = GButton.button ~label:"OK" ~packing:hb#pack () in - let cancel = GButton.button ~label:"Cancel" ~packing:hb#pack () in - ok#connect#pressed - ~callback:(fun () -> - let tit = List.map ~f:(fun f -> f ()) !rget in - prop#set (String.concat ~sep:" " tit); - rtitles := tit; - wpop#misc#hide ()); - cancel#connect#pressed - ~callback:(fun () -> - wpop#misc#hide (); - List.iter2 ~f:(fun f v -> f v) !rset !rtitles); - let e = GEdit.entry ~text:"double click here" ~editable:false () in - e#event#connect#button_press ~callback: - (fun ev -> - GdkEvent.get_type ev = `TWO_BUTTON_PRESS && - GdkEvent.Button.button ev = 1 && - begin - wpop#misc#show (); - GtkSignal.stop_emit (); - true - end); - e#coerce - -let prop_box list = - let vbox = GPack.vbox () in - List.iter list ~f: - begin fun (name, prop) -> - let hbox = - GPack.hbox ~homogeneous:true ~packing:(vbox#pack ~expand:false) () in - GMisc.label ~text:name ~packing:hbox#pack (); - hbox#pack ~fill:true (prop_widget prop); - GMisc.separator `HORIZONTAL ~packing:(vbox#pack ~expand:false) (); - () - end; - vbox - -class ['a] frozen lz = object - method get : 'a = Lazy.force lz -end - -let vbox = - new frozen (lazy (GWindow.window ~show:true ~title:"Properties" ())) - -let init () = vbox#get - -let widget_pool = Hashtbl.create 7 - -let boxref = ref None -let shown_widget = ref "" - -let show_prop_box vb = - Gaux.may !boxref ~f:vbox#get#remove; - vbox#get#add vb#coerce; - boxref := Some vb#coerce - -let show (w : #tiwidget_base) = - let name = w#name in - let vb = - try - Hashtbl.find widget_pool name - with Not_found -> - let vb = prop_box w#proplist in - Hashtbl.add widget_pool ~key:name ~data:vb; - vb - in - show_prop_box vb; - shown_widget := name - -let add (w : #tiwidget_base) = - let vb = prop_box w#proplist in - Hashtbl.add widget_pool ~key:w#name ~data:vb - - -let remove name = - Hashtbl.remove widget_pool name; - if !shown_widget = name then begin - shown_widget := ""; - show_prop_box (GMisc.label ~text:"No widget selected" ()) - end - -(* -let change_name oldname newname = - let vb = Hashtbl.find widget_pool oldname in - Hashtbl.remove widget_pool oldname; - Hashtbl.add widget_pool ~key:newname ~data:vb -*) - -let update (w : #tiwidget_base) show_modif = - let vb = prop_box w#proplist in - Hashtbl.remove widget_pool w#name; - Hashtbl.add widget_pool ~key:w#name ~data:vb; - if show_modif && !shown_widget = w#name then show_prop_box vb diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/propwin.mli b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/propwin.mli deleted file mode 100644 index 6636a4f6f..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/propwin.mli +++ /dev/null @@ -1,10 +0,0 @@ -(* $Id$ *) - -open Common - -val init : unit -> GWindow.window -val show : #tiwidget_base -> unit -val add : #tiwidget_base -> unit -val remove : string -> unit -(* val change_name : string -> string -> unit *) -val update : #tiwidget_base -> bool -> unit diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/radiobutton.xpm b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/radiobutton.xpm deleted file mode 100644 index 0f5fbbd45..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/radiobutton.xpm +++ /dev/null @@ -1,33 +0,0 @@ -/* XPM */ -static char *radiobutton_xpm[] = { -/* columns rows colors chars-per-pixel */ -"21 21 6 1", -" c Gray0", -". c #7b7b7b", -"X c #d6d6d6", -"o c #b3cece", -"O c Gray100", -"+ c None", -/* pixels */ -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"++++++++++.++++++++++", -"+++++++++...+++++++++", -"++++++++.. ..++++++++", -"+++++++.. X ..+++++++", -"++++++.. XXX ..++++++", -"+++++.. XXXXX ..+++++", -"++++++OOXXXXXOO++++++", -"+++++++OOXXXOO+++++++", -"++++++++OOXOO++++++++", -"+++++++++OOO+++++++++", -"++++++++++O++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++" -}; diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/scrolledwindow.xpm b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/scrolledwindow.xpm deleted file mode 100644 index 44e59f610..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/scrolledwindow.xpm +++ /dev/null @@ -1,30 +0,0 @@ -/* XPM */ -static char *scrolledwindow_xpm[] = { -/* columns rows colors chars-per-pixel */ -"21 21 3 1", -" c Gray0", -". c #d6d6d6", -"X c Gray100", -/* pixels */ -"XXXXXXXXXXXXXXXXXXXXX", -"X.............X..... ", -"X.............X.. .. ", -"X.............X. . ", -"X.............X..... ", -"X.............X ", -"X.............XXXXXX ", -"X.............XX.... ", -"X.............XX.... ", -"X.............XXXXXX ", -"X.............X..... ", -"X.............X. . ", -"X.............X.. .. ", -"X.............X..... ", -"XXXXXXXXXXXXXXX ", -"X.... XXX .... ......", -"X.. . X.. . .. ......", -"X. . X.. . . ......", -"X.. . X.. . .. ......", -"X.... X.. .... ......", -"X ......" -}; diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/spinbutton.xpm b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/spinbutton.xpm deleted file mode 100644 index f3a313b19..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/spinbutton.xpm +++ /dev/null @@ -1,33 +0,0 @@ -/* XPM */ -static char *spinbutton_xpm[] = { -/* columns rows colors chars-per-pixel */ -"21 21 6 1", -" c Gray0", -". c #7b7b7b", -"X c #d6d6d6", -"o c #b3cece", -"O c Gray100", -"+ c None", -/* pixels */ -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+ +", -"+ OOOOOOOOOOO OOOOO +", -"+ OOOOOOOOOOO OX X. +", -"+ OOOOOOOOOOO O . +", -"+ OOOOOOOOOOO OOOOO +", -"+ OOOOOOOOOOO O . +", -"+ OOOOOOOOOOO OX X. +", -"+ OOOOOOOOOOO ..... +", -"+ +", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++" -}; diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/statusbar.xpm b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/statusbar.xpm deleted file mode 100644 index 8576d88c6..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/statusbar.xpm +++ /dev/null @@ -1,34 +0,0 @@ -/* XPM */ -static char *statusbar_xpm[] = { -/* columns rows colors chars-per-pixel */ -"21 21 7 1", -" c Gray0", -". c #7b7b7b", -"X c #d6d6d6", -"o c #b3cece", -"O c Gray87", -"+ c Gray100", -"@ c None", -/* pixels */ -"@@@@@@@@@@@@@@@@@@@@@", -"@@@@@@@@@@@@@@@@@@@@@", -"@@@@@@@@@@@@@@@@@@@@@", -"@@@@@@@@@@@@@@@@@@@@@", -"@@@+XX.@@@@@@@@@@@@@@", -"@@@+XX.@@@@@@@@@@@@@@", -"@@@+XX.@@@@@@@@@@@@@@", -"@@@+XX.@@@@@@@@@@@@@@", -"@@@+XX++++++++++++@@@", -"@@@+XXXXXXXXXXXXXX@@@", -"@@@+XXXXXXXXXXXXXX@@@", -"@@@+XX............@@@", -"@@@+XX.OOOOOOOOOOO@@@", -"@@@+XX.OOOOOOOOOOO@@@", -"@@@+XX.OOOOOOOOOOO@@@", -"@@@+XX++++++++++++@@@", -"@@@+XXXXXXXXXXXXXX@@@", -"@@@+XXXXXXXXXXXXXX@@@", -"@@@ @@@", -"@@@@@@@@@@@@@@@@@@@@@", -"@@@@@@@@@@@@@@@@@@@@@" -}; diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tiBase.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tiBase.ml deleted file mode 100644 index 390749337..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tiBase.ml +++ /dev/null @@ -1,671 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gtk -open GObj -open GContainer - -open Utils -open Common -open Property - -(* possible children; used to make the menus *) -let widget_add_list = - [ "vbox"; "hbox"; "vbutton_box"; "hbutton_box"; "fixed"; - "frame"; "aspect_frame"; "handle_box"; "event_box"; - "hseparator"; "vseparator"; "statusbar"; "label"; "notebook"; - "color_selection"; - "button"; - "toggle_button"; "check_button"; "radio_button"; "scrolled_window"; - - "entry"; "spin_button"; "combo"; "clist"; "toolbar"] - - -(*********** selection ***********) - -let selection = ref "" -let window_selection = ref "" - - -(**************** signals class ***************) - -class tiwidget_signals ~signals = - let name_changed : string signal = signals in - object - val after = false - method after = {< after = true >} - method name_changed = name_changed#connect ~after - end - - -(************* class type ***************) -(* the ti classes encapsulate the corresponding gtk - widget which will be in the gtk-window and a tree item - labelled with the name of the widget which will be in the - tree-window. - all these classes have the same following interface *) - -class virtual tiwidget0 = object - method virtual widget : GObj.widget - method virtual connect_event : GObj.event_signals - method virtual parent : tiwidget0 option - method virtual set_parent : tiwidget0 -> unit - method virtual base : GObj.widget - method virtual tree_item : GTree2.tree_item - method virtual tree : GTree2.tree - method virtual children : (tiwidget0 * Gtk.Tags.pack_type) list - method virtual name : string - method virtual proplist : (string * prop) list - method virtual add_to_proplist : (string * prop) list -> unit - method virtual change_name_in_proplist : string -> string -> unit - method virtual set_property : string -> string -> unit - method virtual forall : callback:(tiwidget0 -> unit) -> unit - method virtual remove : tiwidget0 -> unit -(* method virtual add_child_with_name : string -> string -> pos:int -> tiwidget0 *) - method virtual add_children : ?pos:int -> yywidget_tree -> unit - method virtual add_children_wo_undo : ?pos:int -> yywidget_tree -> string - method virtual remove_me : unit -> unit - method virtual remove_me_without_undo : unit -> unit - method virtual emit_code : Format.formatter -> char list -> unit - method virtual emit_init_code : Format.formatter -> packing:string -> unit - method virtual emit_method_code : Format.formatter -> unit - method virtual emit_initializer_code : Format.formatter -> unit - method virtual save : Format.formatter -> unit - method virtual copy : unit -> unit - method virtual connect : tiwidget_signals - method virtual disconnect : GtkSignal.id -> bool - method virtual child_up : tiwidget0 -> unit - method virtual up : unit -> unit - method virtual child_down : tiwidget0 -> unit - method virtual down : unit -> unit - method virtual next : tiwidget0 - method virtual next_child : tiwidget0 -> tiwidget0 - method virtual last : tiwidget0 - method virtual prev : tiwidget0 - method virtual set_full_menu : bool -> unit -end - -class virtual window_and_tree0 = object - method virtual tiwin : tiwidget0 -(* method virtual tree_window : window *) - method virtual change_selected : tiwidget0 -> unit - method virtual remove_sel : tiwidget0 -> unit - method virtual add_param : char - method virtual remove_param : char -> unit -(* method virtual emit : unit -> unit *) -end - -(* forward declaration of function new_widget *) -let new_tiwidget : - (classe:string -> ?pos:int -> name:string ->parent_tree:GTree2.tree -> - ?insert_evbox:bool -> ?listprop:(string * string) list -> window_and_tree0 -> tiwidget0) ref = - ref (fun ~classe ?pos ~name ~parent_tree ?insert_evbox ?listprop w -> failwith "new_tiwidget") - - -let widget_map = Hashtbl.create 17 - -(* list of names of radio_buttons (for groups) *) -let radio_button_pool = ref [] - - -(************* window creation class *************) -(* an instance of this class is created for each window opened - in radtest. It contains the tree window and the gtk window (tiwin) *) - -class window_and_tree ~name = - let tree_window = GWindow.window ~show:true ~title:(name ^ "-Tree") () in - let vbox = GPack.vbox ~spacing:2 ~packing:tree_window#add () in - let root_tree = GTree2.tree ~packing:vbox#pack ~selection_mode:`EXTENDED () in - let project_tree_item = GTree2.tree_item () in - let label = GMisc.label ~text:name ~xalign:0. ~yalign:0.5 - ~packing:project_tree_item#add () in - - object(self) - - inherit window_and_tree0 - -(* the params of the window class; because the class clist needs a param - I suppose there will be no more than 26 clists in a single window *) - val param_list = Array.create 26 false - - method add_param = - let i = ref 0 in - while param_list.(!i) do incr i done; - param_list.(!i) <- true; - char_of_int (97 + !i) - - method remove_param c = - param_list.(int_of_char c - 97) <- false - - method private param_list = - let r = ref [] in - for i = 25 downto 0 do - if Array.unsafe_get param_list i then r := (char_of_int (i+97)) :: !r - done; - !r - -(* I use magic here because the real initialization is done - below in the initializer part. It can't be done here because - of the call to self *) - val mutable tiwin = (Obj.magic 0 : tiwidget0) - - method tiwin = tiwin - method tree_window = tree_window - - method project_tree_item = project_tree_item - -(* the selected item in this window *) - val mutable selected = (None : tiwidget0 option) - -(* what to do when a new item is selected. - this method is passed to all the tiwidgets (by the select_fun - parameter) and they will call it when they are clicked on; - she is also called when changing the selection the arrow keys - (see in the initializer part) *) - method change_selected sel = - match selected with - | None -> - selected <- Some sel; - sel#tree_item#misc#set_state `SELECTED; - sel#base#misc#set_state `SELECTED; - Propwin.show sel - | Some old_sel -> - if sel = old_sel then begin - selected <- None; - sel#base#misc#set_state `NORMAL; - sel#tree_item#misc#set_state `NORMAL - end else begin - old_sel#tree_item#misc#set_state `NORMAL; - old_sel#base#misc#set_state `NORMAL; - selected <- Some sel; - sel#tree_item#misc#set_state `SELECTED; - sel#base#misc#set_state `SELECTED; - Propwin.show sel - end - -(* the tiwidget tiw is being removed; if it was selected, - put the selection to None *) - method remove_sel tiw = - match selected with - | Some sel when sel = tiw -> selected <- None - | _ -> () - -(* emits the code corresponding to this window *) - method emit c = tiwin#emit_code c self#param_list; - - method delete () = - tiwin#remove_me_without_undo (); - tree_window#destroy (); - - initializer - tiwin <- !new_tiwidget ~classe:"window" ~name ~parent_tree:root_tree - (self : #window_and_tree0 :> window_and_tree0); - - tiwin#connect#name_changed ~callback: - (fun n -> label#set_text n; tree_window#set_title (n ^ "-Tree")); - - Propwin.show tiwin; - - tree_window#event#connect#key_press ~callback: - begin fun ev -> - let state = GdkEvent.Key.state ev in - let keyval = GdkEvent.Key.keyval ev in - if keyval = GdkKeysyms._Up then begin - match selected with - | None -> () - | Some t -> - if List.mem `CONTROL state then t#up () - else try - self#change_selected t#prev - with Not_found -> () - end - else if keyval = GdkKeysyms._Down then begin - match selected with - | None -> () - | Some t -> - if List.mem `CONTROL state then t#down () - else try - self#change_selected t#next - with Not_found -> () - end; - GtkSignal.stop_emit (); - true - end; - () - end - - - -(***************** class implementation *****************) -(* this is the base class of the ti hierarchy. - all these classes will inherit from tiwidget, but without - adding new methods. In this way all the classes have the - same interface and we can use them in lists, pass them to - functions without caring on the type. - All methods needed by any of the classes are defined in - tiwidget but if a method is not pertinent in tiwidget - it has for implementation: - failwith "" - the real implementation of the method is done in the - class (or classes) in which it is needed (or sometimes - in tiwidget anyway). - Additionally, to workaround some problem with recursive types - the type of the (public) methods of tiwidget is defined in - tiwidget0 of which tiwidget inherits. - The parent_tree parameter is the tree in which the - tiwidget#tree_item will be inserted at position :pos. -*) - -class virtual tiwidget ~name ~parent_tree:(parent_tree : GTree2.tree) ~pos - ~widget ?(insert_evbox=true) (parent_window : window_and_tree0) = -object(self) - - inherit tiwidget0 - inherit has_ml_signals - - val evbox = - if insert_evbox then - let ev = GBin.event_box () in ev#add widget#coerce; Some ev - else None - -(* used only for windows delete_event *) - method connect_event = failwith "tiwidget::connect_event" - - val widget = widget#coerce - method widget = widget - - val mutable parent = None - method set_parent p = parent <- Some p - method parent = parent - method private sure_parent = - match parent with - | None -> failwith "sure_parent" - | Some p -> p - - method base = - match evbox with - | None -> widget#coerce - | Some ev -> ev#coerce - -(* this is the name used in new_tiwidget for the creation - of an object of this class *) - val mutable classe = "" - - val tree_item = GTree2.tree_item () - method tree_item = tree_item - - val mutable stree = GTree2.tree () - method tree = stree - - val label = GMisc.label ~text:name ~xalign:0. ~yalign:0.5 () - - val mutable name : string = name - method name = name - -(* this is the complete name for the creation of the widget - in lablgtk e.g. GPack.vbox; used in emit_init_code *) - method private class_name = "" - - val mutable proplist : (string * prop) list = [] - method proplist = proplist - method private get_mandatory_props = [] - - method add_to_proplist plist = proplist <- proplist @ plist - -(* for children of a box *) - method change_name_in_proplist : string -> string -> unit = - fun _ _ -> () - method set_property name value_string = try - (List.assoc name proplist)#set value_string - with Not_found -> Printf.printf "Property not_found %s, %s\n" name value_string; - flush stdout - - method private get_property name = - (List.assoc name proplist)#get - - -(* the proplist with some items removed e.g. the expand... in a box - used for saving and emitting code *) - method private emit_clean_proplist = - List.fold_left ~f:(fun l p -> List.remove_assoc p l) - ~init:proplist - ([ "name"; "expand"; "fill"; "padding" ] @ self#get_mandatory_props) -(* method private emit_clean_proplist plist = - List.fold_left ~init:plist ~f: - (fun pl propname -> List.remove_assoc propname pl) - [ "name"; "expand"; "fill"; "padding" ] -*) - - method private save_clean_proplist = - List.fold_left ~f:(fun l p -> List.remove_assoc p l) - ~init:proplist ("name" :: self#get_mandatory_props) -(* method private save_clean_proplist = - List.remove_assoc "name" proplist *) - - val mutable children : (tiwidget0 * Gtk.Tags.pack_type) list = [] - method children = children - method forall = - fun ~callback -> List.iter (List.map children ~f:fst) ~f:callback - -(* encapsulate container#add and container#remove - they are here because they depend on the type of the widget: - e.g.: gtkbin->add scrolled_window->add_with_viewport box->pack *) - method private add = failwith (name ^ "::add") - method remove = failwith (name ^ "::remove") - - -(* removes self from his parent; - will be different for a window *) - method remove_me () = - let sref = ref "" in - self#save_to_string sref; - let pos = list_pos ~item:(self : #tiwidget0 :> tiwidget0) - (List.map self#sure_parent#children ~f:fst) in - let lexbuf = Lexing.from_string !sref in - let node = Load_parser.widget Load_lexer.token lexbuf in - add_undo (Add (self#sure_parent#name, node, pos)); - self#remove_me_without_undo () - - method remove_me_without_undo () = -(* it should be enough to only recursively remove the children from the - name_list and do the tip#remove and tip#tree#remove - only for self *) - self#forall ~callback:(fun tiw -> tiw#remove_me_without_undo ()); - parent_window#remove_sel (self : #tiwidget0 :> tiwidget0); - match parent with - | None -> failwith "remove without parent" - | Some (tip : #tiwidget0) -> - tip#tree#remove tree_item; - tip#remove (self : #tiwidget0 :> tiwidget0); - name_list := list_remove !name_list ~f:(fun n -> n=name); - Hashtbl.remove widget_map name; - Propwin.remove name - -(* used for undo *) - method private remove_child_by_name name () = - let child = fst (List.find children - ~f:(fun (ch, _) -> ch#name = name)) in - child#remove_me () - -(* for most widgets we make a child with new_tiwidget and then add it - to self; for toolbars we use toolbar#insert_button... *) - method private make_child = !new_tiwidget - -(* adds a child and shows his properties; - used when adding a child by the menu or DnD *) - method private add_child classe ?name ?(undo = true) ?(affich = true) ?(pos = -1) ?(listprop = []) () = - let name = match name with - | None -> make_new_name classe - | Some n -> n in - let child = self#make_child ~classe ~name ~parent_tree:stree parent_window ~pos ~listprop in - child#set_parent (self : #tiwidget0 :> tiwidget0); - self#add child ~pos; - if affich then Propwin.show child; - if undo then add_undo (Remove name); - child - - -(* adds the subtree saved in the Node *) - method add_children ?(pos = -1) node = - let child_name = self#add_children_wo_undo node ~pos in - add_undo (Remove child_name) - - method add_children_wo_undo ?(pos = -1) (Node (child, children)) = - let classe, name, property_list = child in - let rname = change_name name in - let tc = self#add_child classe ~name:rname ~undo:false ~affich:false ~pos ~listprop:property_list () in - List.iter (List.rev children) - ~f:(fun c -> tc#add_children_wo_undo c; ()); - List.iter property_list ~f:(fun (n,v) -> tc#set_property n v); - rname - -(* only a tiwindow can emit code *) - method emit_code = failwith "emit_code" - -(* some methods for emitting code *) -(* this one calculates the expand, fill and padding parameters - of a box child *) - method private get_packing packing = - let aux name = - let prop = List.assoc name proplist in - if prop#modified then " ~" ^ name ^ ":" ^ prop#code else "" - in - let efp = try - (aux "expand") ^ (aux "fill") ^ (aux "padding") - with Not_found -> "" in - if efp = "" then ("~packing:" ^ packing) - else ("~packing:(" ^ packing ^ efp ^ ")") - -(* this one emits the declaration code of the widget *) - method emit_init_code formatter ~packing = - Format.fprintf formatter "@ @[let %s =@ @[%s" - name self#class_name; - List.iter self#get_mandatory_props - ~f:begin fun name -> - Format.fprintf formatter "@ ~%s:%s" name - (List.assoc name proplist)#code - end; - let packing = self#get_packing packing in - if packing <> "" then Format.fprintf formatter "@ %s" packing; - self#emit_prop_code formatter; - Format.fprintf formatter "@ ()@ in@]@]" - -(* this one emits the properties which do not have their - default value; used by emit_init_code *) - method private emit_prop_code formatter = - let mandatory = self#get_mandatory_props in - List.iter self#emit_clean_proplist ~f: - begin fun (name, prop) -> - if List.mem name mandatory then () else - if prop#modified then - Format.fprintf formatter "@ ~%s:%s" prop#name prop#code - end - -(* this one emits the method returning this widget *) - method emit_method_code formatter = - Format.fprintf formatter "@ method %s = %s" name name; - -(* emits the code in the initializer part for this widget *) - method emit_initializer_code _ = () - -(* for saving the project to a file. Used also by copy and cut *) - method private save_start formatter = - Format.fprintf formatter "@\n@[<2><%s name=%s>" classe name; - List.iter - ~f:(fun p -> Format.fprintf formatter - "@\n%s=\"%s\"" p (List.assoc p proplist)#get) - self#get_mandatory_props - - - method private save_end formatter = - Format.fprintf formatter "@]@\n" classe - - method save formatter = - self#save_start formatter; - List.iter self#save_clean_proplist ~f: - (fun (name, prop) -> - if prop#modified then - Format.fprintf formatter "@\n%s=%s" name prop#save_code); - self#forall ~callback:(fun w -> w#save formatter); - self#save_end formatter - - - method private save_to_string string_ref = - let b = Buffer.create 80 in - let f = Format.formatter_of_buffer b in - self#save f; - Format.pp_print_flush f (); - string_ref := Buffer.contents b - - method private copy_to_sel selection = self#save_to_string selection - - method copy () = self#copy_to_sel selection - - method private cut () = - self#copy (); - self#remove_me () - - method private paste () = - let lexbuf = Lexing.from_string !selection in - let node = Load_parser.widget Load_lexer.token lexbuf in - self#add_children node - - -(* ML signal used when the name of the widget is changed *) - val name_changed : string signal = new signal - method connect = new tiwidget_signals ~signals:name_changed - method private call_name_changed = name_changed#call - - -(* this is necessary because gtk_tree#remove deletes the tree - when removing the last item *) -(* suppressed this in gtktree2 - method new_tree () = - stree <- GTree2.tree; - tree_item#set_subtree stree; - tree_item#expand () -*) - -(* when full_menu is true we use the menu else the restricted menu *) - val mutable full_menu = true - method set_full_menu b = full_menu <- b - -(* the menu for this widget - This menu is recalculated when one clicks on the 3rd button. - There is nothing to do e.g. when the name of the widget changes, - it will change in the menu the next time. *) - method private menu ~time = self#restricted_menu ~time - -(* the restricted menu for this widget - used for containers when they are full *) - method private restricted_menu ~time = - let menu = GMenu.menu () in - let mi_remove = GMenu.menu_item ~packing:menu#append ~label:"remove" () - and mi_cut = GMenu.menu_item ~packing:menu#append ~label:"Cut" () - and mi_copy = GMenu.menu_item ~packing:menu#append ~label:"Copy" () in - mi_remove#connect#activate ~callback:self#remove_me; - mi_copy#connect#activate ~callback:self#copy; - mi_cut#connect#activate ~callback:self#cut; - menu#popup ~button:3 ~time - -(* changes all that depends on the name *) - method private set_new_name new_name = - if test_unique new_name then begin - Hashtbl.remove widget_map name; - Hashtbl.add widget_map ~key:new_name - ~data:(self : #tiwidget0 :> tiwidget0); - if (classe = "radio_button") then begin - radio_button_pool := new_name :: - (list_remove !radio_button_pool ~f:(fun x -> x = name)); - List.iter - ~f:(fun x -> Propwin.update (Hashtbl.find widget_map x) false) - !radio_button_pool - end; - label#set_text new_name; - let old_name = name in - name <- new_name; -(* Propwin.change_name old_name new_name; *) - name_list := - new_name :: (list_remove !name_list ~f:(fun n -> n=old_name)); - begin match self#parent with - | None -> () - | Some p -> p#change_name_in_proplist old_name new_name - end; - self#call_name_changed new_name; - true - end - else begin - message_name (); - Propwin.update self true; - false - end - - -(* moves the present tiw up in his parents' children list *) -(* does something only when the parent is a box *) - method child_up = fun _ -> () - - method up () = match parent with - | None -> () - | Some t -> t#child_up (self : #tiwidget0 :> tiwidget0) - - method child_down = fun _ -> () - - method down () = match parent with - | None -> () - | Some t -> t#child_down (self : #tiwidget0 :> tiwidget0) - - -(* get the next tiwidget in the tree (used with Down arrow) *) - method next = - if children <> [] then fst (List.hd children) - else begin - match parent with - | None -> raise Not_found - | Some p -> p#next_child (self : #tiwidget0 :> tiwidget0) - end - - method next_child child = - let _, tl = cut_list ~item:child (List.map ~f:fst children) in - match tl with - | ch :: next :: _ -> next - | ch :: [] -> begin - match parent with - | None -> raise Not_found - | Some p -> p#next_child (self : #tiwidget0 :> tiwidget0) - end - | _ -> failwith "next_child" - -(* get the last child of the last child ... of our last child. - Used by prev. *) - method last = - if children = [] then (self : #tiwidget0 :> tiwidget0) - else (fst (List.hd (List.rev children)))#last - -(* get the previous tiwidget in the tree (used with Up arrow) *) - method prev = - match parent with - | None -> raise Not_found - | Some p -> - let hd, _ = cut_list ~item:(self : #tiwidget0 :> tiwidget0) - (List.map ~f:fst p#children) in - match hd with - | [] -> p - | h :: _ -> h#last - - initializer - Hashtbl.add widget_map ~key:name ~data:(self : #tiwidget0 :> tiwidget0); - name_list := name :: !name_list; - parent_tree#insert tree_item ~pos; - tree_item#set_subtree stree; - tree_item#add label#coerce; - tree_item#expand (); - - proplist <- proplist @ - [ "name", - new prop_string ~name:"name" ~init:name ~set:self#set_new_name; - "width", new prop_int ~name:"width" ~init:"-2" - ~set:(fun v -> widget#misc#set_geometry ~width:v (); true); - "height", new prop_int ~name:"height" ~init:"-2" - ~set:(fun v -> widget#misc#set_geometry ~height:v (); true) ]; - - self#add_signal name_changed; - - tree_item#event#connect#button_press ~callback: - (fun ev -> match GdkEvent.get_type ev with - | `BUTTON_PRESS -> - if GdkEvent.Button.button ev = 1 then begin - parent_window#change_selected - (self : #tiwidget0 :> tiwidget0); - end - else if GdkEvent.Button.button ev = 3 then begin - if full_menu - then self#menu ~time:(GdkEvent.Button.time ev) - else self#restricted_menu ~time:(GdkEvent.Button.time ev); - end; - GtkSignal.stop_emit (); - true - | _ -> false); - () -end - diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tiBin.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tiBin.ml deleted file mode 100644 index 5ebcb3e2e..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tiBin.ml +++ /dev/null @@ -1,185 +0,0 @@ -open Gtk - -open Utils -open Property - -open TiContainer - -class tiframe ~(widget : GBin.frame) ~name ~parent_tree ~pos - ?(insert_evbox=true) parent_window = -object - val frame = widget - inherit ticontainer ~name ~widget ~parent_tree ~pos - ~insert_evbox parent_window as container - - method private class_name = "GBin.frame" - - method private get_mandatory_props = [ "label" ] - - initializer - classe <- "frame"; - frame#set_label name; - proplist <- proplist @ - [ "label", - new prop_string ~name:"label" ~init:name ~set:(ftrue frame#set_label); - "label_xalign", - new prop_float ~name:"label_xalign" ~init:"0.0" ~min:0. ~max:1. - ~set:(fun x -> frame#set_label_align ~x (); true); - "shadow_type", - new prop_shadow ~name:"shadow_type" ~init:"ETCHED_IN" - ~set:(ftrue frame#set_shadow_type) ] -end - -let new_tiframe ~name ?(listprop = []) = - new tiframe ~widget:(GBin.frame ()) ~name - - - - -class tiaspect_frame ~(widget : GBin.aspect_frame) ~name ~parent_tree ~pos - ?(insert_evbox=true) parent_window = -object - val aspect_frame = widget - inherit tiframe ~name ~widget:(widget :> GBin.frame) ~parent_tree ~pos - ~insert_evbox parent_window - - method private class_name = "GBin.aspect_frame" - - initializer - classe <- "aspect_frame"; - frame#set_label name; - proplist <- proplist @ - [ "obey_child", - new prop_bool ~name:"obey_child" ~init:"true" - ~set:(ftrue aspect_frame#set_obey_child); - "ratio", - new prop_float ~name:"ratio" ~init:"1.0" ~min:0. ~max:1. - ~set:(ftrue aspect_frame#set_ratio) - ] -end - -let new_tiaspect_frame ~name ?(listprop = []) = - new tiaspect_frame ~widget:(GBin.aspect_frame ()) ~name - - - - -class tievent_box ~(widget : GBin.event_box) ~name ~parent_tree ~pos - ?(insert_evbox=true) parent_window = -object - val event_box = widget - inherit ticontainer ~name ~widget ~parent_tree ~pos - ~insert_evbox parent_window - - method private class_name = "GBin.event_box" - initializer - classe <- "event_box" -end - -let new_event_box ~name ?(listprop = []) = - new tievent_box ~widget:(GBin.event_box ()) ~name - - - - -class tihandle_box ~(widget : GBin.handle_box) ~name ~parent_tree ~pos - ?(insert_evbox=true) parent_window = -object - val handle_box = widget - inherit ticontainer ~name ~widget ~parent_tree ~pos - ~insert_evbox parent_window - - method private class_name = "GBin.handle_box" - - initializer - classe <- "handle_box"; - proplist <- proplist @ - [ "shadow_type", - new prop_shadow ~name:"shadow_type" ~init:"OUT" - ~set:(ftrue handle_box#set_shadow_type); - "handle_position", - new prop_position ~name:"handle_position" ~init:"LEFT" - ~set:(ftrue handle_box#set_handle_position); - "snap_edge", - new prop_position ~name:"snap_edge" ~init:"TOP" - ~set:(ftrue handle_box#set_snap_edge) - ] -end - -let new_handle_box ~name ?(listprop = []) = - new tihandle_box ~widget:(GBin.handle_box ()) ~name - - - - - -class tiviewport ~(widget : GBin.handle_box) ~name ~parent_tree ~pos - ?(insert_evbox=true) parent_window = -object - val viewport = widget - inherit ticontainer ~name ~widget ~parent_tree ~pos - ~insert_evbox parent_window - - method private class_name = "GBin.viewport" - - initializer - classe <- "viewport"; - proplist <- proplist @ - [ "shadow_type", - new prop_shadow ~name:"shadow_type" ~init:"OUT" - ~set:(ftrue viewport#set_shadow_type) - ] -end - -let new_viewport ~name ?(listprop = []) = - new tiviewport ~widget:(GBin.handle_box ()) ~name - - - - - -class tiscrolled_window ~(widget : GBin.scrolled_window) - ~name ~parent_tree ~pos ?(insert_evbox=true) parent_window = - object(self) - val scrolled_window = widget - inherit ticontainer ~name ~insert_evbox - ~parent_tree ~pos ~widget parent_window - - method private class_name = "GBin.scrolled_window" - method private name_of_add_method = "#add_with_viewport" - - method private add rw ~pos = - scrolled_window#add_with_viewport (rw#base); - children <- [ rw, `START]; - self#set_full_menu false; - tree_item#drag#dest_unset () - -(* we must remove the child from the viewport, - not from the scrolled_window; - it is not mandatory to remove the viewport - from the scrolled_window *) - method remove child = - let viewport = (new GContainer.container (GtkBase.Container.cast (List.hd scrolled_window#children)#as_widget)) in - viewport#remove child#base; -(* scrolled_window#remove (List.hd scrolled_window#children); *) - children <- [ ]; - self#set_full_menu true; - tree_item#drag#dest_set ~actions:[`COPY] - [ { target = "STRING"; flags = []; info = 0} ] - - - initializer - classe <- "scrolled_window"; - proplist <- proplist @ - [ "hscrollbar_policy", - new prop_policy ~name:"hscrollbar_policy" ~init:"ALWAYS" - ~set:(ftrue scrolled_window#set_hpolicy); - "vscrollbar_policy", - new prop_policy ~name:"vscrollbar_policy" ~init:"ALWAYS" - ~set:(ftrue scrolled_window#set_vpolicy) ] -end - -let new_tiscrolled_window ~name ?(listprop = []) = - new tiscrolled_window ~widget:(GBin.scrolled_window ()) ~name - - diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tiButton.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tiButton.ml deleted file mode 100644 index 174c6ebff..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tiButton.ml +++ /dev/null @@ -1,372 +0,0 @@ -open Utils -open Property - -open TiBase -open TiContainer - -(* the button inherits from widget because it can't accept - a child; - needs to add the border_width property *) -class tibutton ~(widget : #GButton.button) ~name ~parent_tree ~pos - ?(insert_evbox=true) parent_window = -object(self) - val button = widget - inherit tiwidget ~name ~widget ~parent_tree ~pos ~insert_evbox - parent_window as widget - - method private class_name = "GButton.button" - - method private get_mandatory_props = [ "label" ] - - initializer - classe <- "button"; - proplist <- proplist @ - [ "border_width", new prop_int ~name:"border_width" ~init:"0" - ~set:(ftrue button#set_border_width); - "label", - new prop_string ~name:"label" ~init:name ~set: - begin fun v -> - button#remove (List.hd button#children)#coerce; - GMisc.label ~text:v ~xalign:0.5 ~yalign:0.5 ~packing:button#add (); - true - end ] -end - -let new_tibutton ~name ?(listprop = []) = - let b = GButton.button ~label:name () in - b#event#connect#enter_notify - ~callback:(fun _ -> GtkSignal.stop_emit (); true); - b#event#connect#leave_notify - ~callback:(fun _ -> GtkSignal.stop_emit (); true); - new tibutton ~widget:b ~name - - -class ticheck_button ~(widget : #GButton.toggle_button) ~name - ~parent_tree ~pos ?(insert_evbox=true) parent_window = -object(self) - val button = widget - inherit tiwidget ~name ~widget ~insert_evbox - ~parent_tree ~pos parent_window as widget - - - method private class_name = "GButton.check_button" - - method private get_mandatory_props = [ "label" ] - - initializer - classe <- "check_button"; - proplist <- proplist @ - [ "border_width", new prop_int ~name:"border_width" ~init:"0" - ~set:(ftrue button#set_border_width); - "label", - new prop_string ~name:"label" ~init:name ~set: - begin fun v -> - button#remove (List.hd button#children)#coerce; - GMisc.label ~text:v ~xalign:0.5 ~yalign:0.5 ~packing:button#add (); - true - end - ] -end - -let new_ticheck_button ~name ?(listprop = []) = - new ticheck_button ~widget:(GButton.check_button ~label:name ()) ~name - - - -class titoggle_button ~(widget : #GButton.toggle_button) ~name - ~parent_tree ~pos ?(insert_evbox=true) parent_window = -object(self) - val button = widget - inherit tiwidget ~name ~widget ~insert_evbox - ~parent_tree ~pos parent_window as widget - - method private class_name = "GButton.toggle_button" - - method private get_mandatory_props = [ "label" ] - - initializer - classe <- "toggle_button"; - proplist <- proplist @ - [ "border width", new prop_int ~name:"border_width" ~init:"0" - ~set:(ftrue button#set_border_width); - "label", - new prop_string ~name:"label" ~init:name ~set: - begin fun v -> - button#remove (List.hd button#children)#coerce; - GMisc.label ~text:v ~xalign:0.5 ~yalign:0.5 ~packing:button#add (); - true - end ] -end - -let new_titoggle_button ~name ?(listprop = []) = - let b = GButton.toggle_button ~label:name () in -(* b#connect#event#enter_notify - ~callback:(fun _ -> GtkSignal.stop_emit ()); - b#connect#event#leave_notify - ~callback:(fun _ -> GtkSignal.stop_emit ()); -*) - new titoggle_button ~name ~widget:b - - -class tiradio_button ~(widget : #GButton.radio_button) ~name:nname - ~parent_tree ~pos ?(insert_evbox=true) parent_window = -object(self) - val button = widget - inherit tiwidget ~name:nname ~widget ~insert_evbox - ~parent_tree ~pos parent_window as widget - - val group_prop = - new prop_enum_dyn ~values:(fun () -> !radio_button_pool) ~name:"group" - ~set:(fun () -> true) ~init:nname - - - method private class_name = "GButton.radio_button" - - method remove_me_without_undo () = - radio_button_pool := list_remove !radio_button_pool - ~f:(fun x -> x = name); - widget#remove_me_without_undo () - - method private get_mandatory_props = [ "label" ] - - method private emit_clean_proplist = - List.remove_assoc "group" widget#emit_clean_proplist - - method emit_initializer_code formatter = - let groupname = group_prop#get in - if name <> groupname then - Format.fprintf formatter "@ %s#set_group %s#group;" name groupname - - initializer - classe <- "radio_button"; - radio_button_pool := name :: !radio_button_pool; - List.iter - ~f:(fun x -> Propwin.update (Hashtbl.find widget_map x) true) - (List.tl !radio_button_pool); - - proplist <- proplist @ - [ "border_width", new prop_int ~name:"border_width" ~init:"0" - ~set:(ftrue button#set_border_width); - "label", - new prop_string ~name:"label" ~init:name ~set: - begin fun v -> - button#remove (List.hd button#children)#coerce; - GMisc.label ~text:v ~xalign:0.5 ~yalign:0.5 ~packing:button#add (); - true - end ; - "group", group_prop - ] -end - -let new_tiradio_button ~name ?(listprop = []) = - let b = GButton.radio_button ~label:name () in - (* - b#event#connect#enter_notify - ~callback:(fun _ -> b#misc#stop_emit ~name:"enter_notify_event"; true); - b#event#connect#leave_notify - ~callback:(fun _ -> b#misc#stop_emit ~name:"leave_notify_event"; true); - *) - new tiradio_button ~name ~widget:b - - - - -class tibutton_toolbar ~(widget : #GButton.button) ~name ~parent_tree ~pos - ?(insert_evbox=true) parent_window ~toolbar = -object(self) - val button = widget - inherit tibutton ~name ~widget ~parent_tree ~pos ~insert_evbox - parent_window as button - - method private get_mandatory_props = - [ "text"; "tooltip"; "tooltip_private" ] - - method emit_init_code formatter ~packing = - Format.fprintf formatter "@ @[let %s =@ @[%s#insert_button" - name toolbar#name; - List.iter self#get_mandatory_props ~f: - begin fun name -> - Format.fprintf formatter "@ ~%s:%s" name - (List.assoc name proplist)#code - end; - Format.fprintf formatter "@ ()@ in@]@]" - - initializer - proplist <- List.remove_assoc "label" proplist -end - - -class titoggle_button_toolbar ~(widget : #GButton.toggle_button) ~name - ~parent_tree ~pos ?(insert_evbox=true) parent_window ~toolbar = -object(self) - val button = widget - inherit titoggle_button ~name ~widget ~parent_tree ~pos ~insert_evbox - parent_window as button - - method private get_mandatory_props = - [ "text"; "tooltip"; "tooltip_private" ] - - method emit_init_code formatter ~packing = - Format.fprintf formatter - "@ @[let %s =@ @[%s#insert_toggle_button" - name toolbar#name; - List.iter self#get_mandatory_props ~f: - begin fun name -> - Format.fprintf formatter "@ ~%s:%s" name - (List.assoc name proplist)#code - end; - Format.fprintf formatter "@ ()@ in@]@]" - - initializer - proplist <- List.remove_assoc "label" proplist -end - - -class tiradio_button_toolbar ~(widget : #GButton.radio_button) ~name - ~parent_tree ~pos ?(insert_evbox=true) parent_window ~toolbar = -object(self) - val button = widget - inherit tiradio_button ~name ~widget ~parent_tree ~pos ~insert_evbox - parent_window as button - - method private get_mandatory_props = - [ "text"; "tooltip"; "tooltip_private" ] - - method emit_init_code formatter ~packing = - Format.fprintf formatter - "@ @[let %s =@ @[%s#insert_radio_button" - name toolbar#name; - List.iter self#get_mandatory_props ~f: - begin fun name -> - Format.fprintf formatter "@ ~%s:%s" name - (List.assoc name proplist)#code - end; - Format.fprintf formatter "@ ()@ in@]@]" - - initializer - proplist <- List.remove_assoc "label" proplist -end - - - - -class titoolbar ~(widget : GToolbar2.toolbar2) ~name ~parent_tree ~pos - ?(insert_evbox=true) parent_window = -object(self) - val toolbar = widget - inherit ticontainer ~name ~widget ~parent_tree ~pos - ~insert_evbox parent_window - - method private class_name = "GButton.toolbar" - - method private add child ~pos = - children <- children @ [child, `START] - - method private get_pos child = - let rec aux n = function - | [] -> failwith "toolbar::get_pos" - | (hd, _)::tl -> if hd = child then n else aux (n+1) tl in - aux 0 children - - method private make_child ~classe ?(pos = -1) ~name ~parent_tree - ?(insert_evbox = true) ?(listprop = []) parent_window = - match classe with - | "button" -> - let t = try List.assoc "text" listprop with Not_found -> "" in - let tt = try List.assoc "tooltip" listprop with Not_found -> "" in - let ptt = try List.assoc "tooltip_private" listprop - with Not_found -> "" in - let listp = List.fold_left ~f:(fun l p -> List.remove_assoc p l) - ~init:listprop - [ "text"; "tooltip"; "tooltip_private" ] in - let b = toolbar#insert_button ~text:t ~tooltip:tt - ~tooltip_private:ptt () in - let child = new tibutton_toolbar ~name ~widget:b ~pos:(-1) - ~insert_evbox:false ~parent_tree:stree parent_window ~toolbar:self in - let tp = new prop_string ~name:"text" ~init:t - ~set:(fun v -> - toolbar#set_text v (self#get_pos child); true) - and ttp = new prop_string ~name:"tooltip" ~init:tt - ~set:(fun _ -> true) - and pttp = new prop_string ~name:"tooltip_private" ~init:ptt - ~set:(fun _ -> true) in - child#add_to_proplist - [ "text", tp; "tooltip", ttp; "tooltip_private", pttp ]; - child - | "toggle_button" -> - let t = try List.assoc "text" listprop with Not_found -> "" in - let tt = try List.assoc "tooltip" listprop with Not_found -> "" in - let ptt = try List.assoc "tooltip_private" listprop - with Not_found -> "" in - let listp = List.fold_left ~f:(fun l p -> List.remove_assoc p l) - ~init:listprop - [ "text"; "tooltip"; "tooltip_private" ] in - let b = toolbar#insert_toggle_button ~text:t ~tooltip:tt - ~tooltip_private:ptt () in - let child = new titoggle_button_toolbar ~name ~widget:b ~pos:(-1) - ~insert_evbox:false ~parent_tree:stree parent_window ~toolbar:self in - let tp = new prop_string ~name:"text" ~init:t - ~set:(fun v -> toolbar#set_text v (self#get_pos child); true) - and ttp = new prop_string ~name:"tooltip" ~init:tt - ~set:(fun _ -> true) - and pttp = new prop_string ~name:"tooltip_private" ~init:ptt - ~set:(fun _ -> true) in - child#add_to_proplist - [ "text", tp; "tooltip", ttp; "tooltip_private", pttp ]; - child - | "radio_button" -> - let t = try List.assoc "text" listprop with Not_found -> "" in - let tt = try List.assoc "tooltip" listprop with Not_found -> "" in - let ptt = try List.assoc "tooltip_private" listprop - with Not_found -> "" in - let listp = List.fold_left ~f:(fun l p -> List.remove_assoc p l) - ~init:listprop - [ "text"; "tooltip"; "tooltip_private" ] in - let b = toolbar#insert_radio_button ~text:t ~tooltip:tt - ~tooltip_private:ptt () in - let child = new tiradio_button_toolbar ~name ~widget:b ~pos:(-1) - ~insert_evbox:false ~parent_tree:stree parent_window ~toolbar:self in - let tp = new prop_string ~name:"text" ~init:t - ~set:(fun v -> toolbar#set_text v (self#get_pos child); true) - and ttp = new prop_string ~name:"tooltip" ~init:tt - ~set:(fun _ -> true) - and pttp = new prop_string ~name:"tooltip_private" ~init:ptt - ~set:(fun _ -> true) in - child#add_to_proplist - [ "text", tp; "tooltip", ttp; "tooltip_private", pttp ]; - child - | _ -> failwith "toolbar" - - - - method remove child = - toolbar#remove (child#base); - children <- list_remove ~f:(fun (ch, _) -> ch = child) children; - - initializer - classe <- "toolbar"; - proplist <- proplist @ - [ "orientation", - new prop_orientation ~name:"orientation" ~init:"HORIZONTAL" - ~set:(ftrue toolbar#set_orientation); - "style", - new prop_toolbar_style ~name:"style" ~init:"BOTH" - ~set:(ftrue toolbar#set_style); - "space_size", - new prop_int ~name:"space_size" ~init:"5" - ~set:(ftrue toolbar#set_space_size); - "space_style", - new prop_toolbar_space_style ~name:"space_style" ~init:"EMPTY" - ~set:(ftrue toolbar#set_space_style); - "tooltips", - new prop_bool ~name:"tooltips" ~init:"true" - ~set:(ftrue toolbar#set_tooltips); - "button_relief", - new prop_relief_style ~name:"button_relief" ~init:"NORMAL" - ~set:(ftrue toolbar#set_button_relief) - ] -end - -let new_toolbar ~name ?(listprop = []) = - new titoolbar ~name ~widget:(GToolbar2.toolbar2 ()) - diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tiContainer.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tiContainer.ml deleted file mode 100644 index ddf04d31f..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tiContainer.ml +++ /dev/null @@ -1,92 +0,0 @@ - -open Gtk -open GObj -open GContainer - -open Utils -open Property - -open TiBase - -(* for containers being able to have at least one child; - not for buttons (can't have children) *) - -class virtual ticontainer ~widget ~name - ?(insert_evbox=true) ~parent_tree ~pos parent_window = -object(self) - - val container = (widget : #container :> container) - - inherit tiwidget ~name ~widget ~insert_evbox - ~parent_tree ~pos parent_window as widget - -(* name of the add method: add for most bin widgets, - pack for boxes, add_with_viewport for scrolled windows... *) - method private name_of_add_method = "#add" - - method private add child ~pos = - container#add child#base; - children <- [child, `START]; - self#set_full_menu false; - tree_item#drag#dest_unset () - - method remove child = - container#remove child#base; - children <- []; - self#set_full_menu true; - tree_item#drag#dest_set ~actions:[`COPY] - [ { target = "STRING"; flags = []; info = 0} ] - - method private menu ~time = - let menu = GMenu.menu () and menu_add = GMenu.menu () in - List.iter - ~f:(fun n -> - let mi = GMenu.menu_item ~packing:menu_add#append ~label:n () - in mi#connect#activate - ~callback:(fun () -> self#add_child n ();()); ()) - widget_add_list; - let mi_add = GMenu.menu_item ~packing:menu#append - ~label:("add to " ^ name) () - and mi_remove = GMenu.menu_item ~packing:menu#append - ~label:("remove " ^ name) () - and mi_cut = GMenu.menu_item ~packing:menu#append ~label:"Cut" () - and mi_copy = GMenu.menu_item ~packing:menu#append ~label:"Copy" () - and mi_paste = GMenu.menu_item ~packing:menu#append ~label:"Paste" () in - mi_remove#connect#activate ~callback:self#remove_me; - mi_add#set_submenu menu_add; - mi_copy#connect#activate ~callback:self#copy; - mi_cut#connect#activate ~callback:self#cut; - if !selection <> "" - then begin mi_paste#connect#activate ~callback:self#paste; () end - else mi_paste#misc#set_sensitive false; - menu#popup ~button:3 ~time - - method emit_init_code c ~packing = - widget#emit_init_code c ~packing; - self#forall ~callback:(fun child -> child#emit_init_code c - ~packing:(name ^ self#name_of_add_method)) - - method emit_method_code c = - widget#emit_method_code c; - self#forall ~callback:(fun child -> child#emit_method_code c) - - method emit_initializer_code c = - widget#emit_initializer_code c; - self#forall ~callback:(fun child -> child#emit_initializer_code c) - - - initializer - proplist <- proplist @ - [ "border_width", new prop_int ~name:"border_width" ~init:"0" - ~set:(ftrue container#set_border_width) ]; - - tree_item#drag#dest_set ~actions:[`COPY] - [ { target = "STRING"; flags = []; info = 0} ]; - tree_item#drag#connect#data_received ~callback: - begin fun (context : drag_context) ~x ~y - (data : selection_data) ~info ~time -> - self#add_child data#data (); - context#finish ~success:true ~del:false ~time - end;() -end - diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tiEdit.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tiEdit.ml deleted file mode 100644 index 4b0977bb6..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tiEdit.ml +++ /dev/null @@ -1,153 +0,0 @@ -open Utils -open Property - -open TiBase - - - -class tientry ~(widget : GEdit.entry) ~name ~parent_tree ~pos - ?(insert_evbox=true) parent_window = -object - val entry = widget - inherit tiwidget ~name ~widget ~parent_tree ~pos - ~insert_evbox parent_window - - method private class_name = "GEdit.entry" - initializer - classe <- "entry"; - proplist <- proplist @ - [ "visibility", - new prop_bool ~name:"visibility" ~init:"true" - ~set:(ftrue entry#set_visibility); - "editable", - new prop_bool ~name:"editable" ~init:"true" - ~set:(ftrue entry#set_editable) - ] -end - -let new_tientry ~name ?(listprop = []) = - new tientry ~name ~widget:(GEdit.entry ()) - - -class tispin_button ~(widget : GEdit.spin_button) ~name ~parent_tree ~pos - ?(insert_evbox=true) parent_window = -object - val spin_button = widget - inherit tientry ~widget:(widget :> GEdit.entry) ~name ~parent_tree ~pos - ~insert_evbox parent_window - - method private class_name = "GEdit.spin_button" - initializer - classe <- "spin_button"; - proplist <- proplist @ - [ "digits", - new prop_int ~name:"digits" ~init:"0" - ~set:(ftrue spin_button#set_digits); - "update_policy", - new prop_spin_button_update_policy ~name:"update_policy" - ~init:"ALWAYS" - ~set:(ftrue spin_button#set_update_policy); - "numeric", - new prop_bool ~name:"numeric" ~init:"false" - ~set:(ftrue spin_button#set_numeric); - "wrap", - new prop_bool ~name:"wrap" ~init:"false" - ~set:(ftrue spin_button#set_wrap); - "shadow_type", - new prop_shadow ~name:"shadow_type" ~init:"NONE" - ~set:(ftrue spin_button#set_shadow_type); - "snap_to_ticks", - new prop_bool ~name:"snap_to_ticks" ~init:"false" - ~set:(ftrue spin_button#set_snap_to_ticks) - ] - -end - - -let get_adjustment () = - let rv = ref 0. and rl = ref 0. and ru = ref 100. and rsi = ref 1. - and rpi = ref 10. and rps = ref 10. in - let w = GWindow.window ~modal:true () in - let v = GPack.vbox ~packing:w#add () in - let l = GMisc.label ~text:"adjustment properties" ~packing:v#pack () in - let h1 = GPack.hbox ~packing:v#pack () in - let l1 = GMisc.label ~text:"value" ~packing:h1#pack () in - let e1 = GEdit.entry ~text:"0." ~packing:h1#pack () in - let h2 = GPack.hbox ~packing:v#pack () in - let l2 = GMisc.label ~text:"lower" ~packing:h2#pack () in - let e2 = GEdit.entry ~text:"0." ~packing:h2#pack () in - let h3 = GPack.hbox ~packing:v#pack () in - let l3 = GMisc.label ~text:"upper" ~packing:h3#pack () in - let e3 = GEdit.entry ~text:"100." ~packing:h3#pack () in - let h4 = GPack.hbox ~packing:v#pack () in - let l4 = GMisc.label ~text:"step_incr" ~packing:h4#pack () in - let e4 = GEdit.entry ~text:"1." ~packing:h4#pack () in - let h5 = GPack.hbox ~packing:v#pack () in - let l5 = GMisc.label ~text:"page_incr" ~packing:h5#pack () in - let e5 = GEdit.entry ~text:"10." ~packing:h5#pack () in - let h6 = GPack.hbox ~packing:v#pack () in - let l6 = GMisc.label ~text:"page_size" ~packing:h6#pack () in - let e6 = GEdit.entry ~text:"10." ~packing:h6#pack () in - let h7 = GPack.hbox ~packing:v#pack () in - let b1 = GButton.button ~label:"OK" ~packing:h7#pack () in - let b2 = GButton.button ~label:"Cancel" ~packing:h7#pack () in - w#show (); - b1#connect#clicked - ~callback:(fun () -> - begin - try rv := float_of_string e1#text with _ -> - try rv := float_of_int (int_of_string e1#text) with _ -> () end; - begin - try rl := float_of_string e2#text with _ -> - try rl := float_of_int (int_of_string e2#text) with _ -> () end; - begin - try ru := float_of_string e3#text with _ -> - try ru := float_of_int (int_of_string e3#text) with _ -> () end; - begin - try rsi := float_of_string e4#text with _ -> - try rsi := float_of_int (int_of_string e4#text) with _ -> () end; - begin - try rpi := float_of_string e5#text with _ -> - try rpi := float_of_int (int_of_string e5#text) with _ -> () end; - begin - try rps := float_of_string e6#text with _ -> - try rps := float_of_int (int_of_string e6#text) with _ -> () end; - w#destroy ()); - b2#connect#clicked ~callback:w#destroy; - w#connect#destroy ~callback:GMain.Main.quit; - GMain.Main.main (); - !rv, !rl, !ru, !rsi, !rpi, !rps - -let new_tispin_button ~name ?(listprop = []) = - let v, l, u, si, pi, ps = get_adjustment () in - new tispin_button ~name - ~widget:(GEdit.spin_button ~adjustment: - (GData.adjustment ~value:v ~lower:l ~upper:u - ~step_incr:si ~page_incr:pi ~page_size:ps ()) ()) - - - -class ticombo ~(widget : GEdit.combo) ~name ~parent_tree ~pos - ?(insert_evbox=true) parent_window = -object - val combo = widget - inherit tiwidget ~name ~widget ~parent_tree ~pos - ~insert_evbox parent_window - - method private class_name = "GEdit.combo" - initializer - classe <- "combo"; - proplist <- proplist @ - [ "use_arrows", - new prop_combo_use_arrows ~name:"use_arrows" ~init:"true" - ~set:(ftrue combo#set_use_arrows); - "case_sensitive", - new prop_bool ~name:"case_sensitive" ~init:"false" - ~set:(ftrue combo#set_case_sensitive) - ] -end - -let new_ticombo ~name ?(listprop = []) = - new ticombo ~name ~widget:(GEdit.combo ()) - - diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tiList.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tiList.ml deleted file mode 100644 index 770e19b73..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tiList.ml +++ /dev/null @@ -1,66 +0,0 @@ - -open Utils -open Property - -open TiBase - -class ticlist ~(widget : 'a GList.clist) ~name ~parent_tree ~pos - ?(insert_evbox=true) parent_window ~columns ~titles = - object(self) - val clist = widget - inherit tiwidget ~name ~widget ~parent_tree ~pos - ~insert_evbox parent_window as widget - - val param = parent_window#add_param - - method private class_name = "GList.clist" - - method private get_mandatory_props = [ "columns" ] - - method remove_me_without_undo () = - parent_window#remove_param param; - widget#remove_me_without_undo () - - method emit_init_code formatter ~packing = - Format.fprintf formatter - "@ @[let (%s : '%c GList.clist) =@ @[GList.clist" - name param; - List.iter self#get_mandatory_props ~f: - begin fun name -> - Format.fprintf formatter "@ ~%s:%s" name - (List.assoc name proplist)#code - end; - let packing = self#get_packing packing in - if packing <> "" then Format.fprintf formatter "@ %s" packing; - self#emit_prop_code formatter; - Format.fprintf formatter "@ ()@ in@]@]" - - - initializer - classe <- "clist"; - proplist <- proplist @ - [ "columns", - new prop_int ~name:"columns" ~init:(string_of_int columns) - ~set:(fun _ -> true); - "titles", - new prop_clist_titles ~name:"titles" ~init:(String.concat ~sep:" " titles) - ~set:(fun v -> - let v = Array.of_list v in - for i = 0 to Array.length v - 1 do - clist#set_column i ~title:v.(i) - done; - true) - ] -end - -let new_clist ~name ?(listprop = []) = - let c, lp = match listprop with - | [] -> (get_a_number "number of columns" 3), [] - | ("columns", n)::tl -> (int_of_string n), tl - | _ -> failwith "new_clist" - in - let rtitles = ref [] in - for i = c downto 1 do rtitles := ("column" ^(string_of_int i)):: !rtitles done; - new ticlist ~name ~widget:(GList.clist ~columns:c ~titles: !rtitles ()) ~columns:c ~titles: !rtitles - - diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tiMisc.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tiMisc.ml deleted file mode 100644 index f4f435a54..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tiMisc.ml +++ /dev/null @@ -1,176 +0,0 @@ - -open Utils -open Property - -open TiBase -open TiContainer - - -class tiseparator ~(dir : Gtk.Tags.orientation) ~(widget : GObj.widget_full) - ~name ~parent_tree ~pos ?(insert_evbox=true) parent_window = -object - val separator = widget - inherit tiwidget ~name ~widget ~parent_tree ~pos parent_window ~insert_evbox - - method private class_name = - match dir with `VERTICAL -> "GMisc.separator `VERTICAL" - | `HORIZONTAL -> "GMisc.separator `HORIZONTAL" - initializer - classe <- - (match dir with `VERTICAL -> "vseparator" | `HORIZONTAL -> "hseparator") - -end - -let new_tihseparator ~name ?(listprop = []) = - new tiseparator ~dir: `HORIZONTAL ~name - ~widget:(GMisc.separator `HORIZONTAL ()) -let new_tivseparator ~name ?(listprop = []) = - new tiseparator ~dir: `VERTICAL ~name - ~widget:(GMisc.separator `VERTICAL ()) - - - - -class tistatusbar ~(widget : GMisc.statusbar) ~name ~parent_tree ~pos - ?(insert_evbox=true) parent_window = -object(self) - val statusbar = widget - inherit ticontainer ~name ~widget ~insert_evbox - ~parent_tree ~pos parent_window as widget - - method private class_name = "GMisc.statusbar" - - initializer - classe <- "statusbar" -end - -let new_tistatusbar ~name ?(listprop = []) = - new tistatusbar ~widget:(GMisc.statusbar ()) ~name - - - -class timisc ~(widget : GMisc.misc) ~name ~parent_tree ~pos - ?(insert_evbox=true) parent_window = -object(self) - val misc = widget - inherit tiwidget ~name ~widget ~insert_evbox - ~parent_tree ~pos parent_window as widget - - method private class_name = failwith "timisc::class_name" - - initializer - proplist <- proplist @ - [ "x_alignment", - new prop_float ~name:"x alignment" ~init:"0.5" ~min:0. ~max:1. - ~set:(fun v -> misc#set_alignment ~x:v (); true); - "y_alignment", - new prop_float ~name:"y alignment" ~init:"0.5" ~min:0. ~max:1. - ~set:(fun v -> misc#set_alignment ~y:v (); true); - "x_padding", - new prop_int ~name:"x padding" ~init:"0.5" - ~set:(fun v -> misc#set_padding ~x:v (); true); - "y_padding", - new prop_int ~name:"y padding" ~init:"0.5" - ~set:(fun v -> misc#set_padding ~y:v (); true) - - ] -end - - -class tiarrow ~(widget : GMisc.arrow) ~name ~parent_tree ~pos - ?(insert_evbox=true) parent_window = -object(self) - val arrow = widget - inherit timisc ~name ~widget:(widget :> GMisc.misc) ~insert_evbox - ~parent_tree ~pos parent_window as widget - - method private class_name = "GMisc.arrow" - initializer - classe <- "arrow"; -end - - -(* TODO fenetre demandant kind et shadow -let new_tiarrow ~name = new tiarrow ~widget:(GMisc.arrow ()) ~name -*) - - -class tilabel ~(widget : GMisc.label) ~name ~parent_tree ~pos - ?(insert_evbox=true) parent_window = -object(self) - val labelw = widget - inherit timisc ~name ~widget:(widget :> GMisc.misc) ~insert_evbox - ~parent_tree ~pos parent_window as widget - - method private class_name = "GMisc.label" - - method private get_mandatory_props = [ "text" ] - - initializer - classe <- "label"; - proplist <- proplist @ - [ "text", - new prop_string ~name:"text" ~init:name ~set:(ftrue labelw#set_text); - "line_wrap", - new prop_bool ~name:"line_wrap" ~init:"true" - ~set:(ftrue labelw#set_line_wrap) - ] -end - -let new_tilabel ~name ?(listprop = []) = - new tilabel ~widget:(GMisc.label ~text:name ()) ~name - - - - - -class ticolor_selection ~(widget : GMisc.color_selection) ~name ~parent_tree ~pos - ?(insert_evbox=true) parent_window = -object(self) - val color_selection = widget - inherit tiwidget ~name ~widget ~insert_evbox - ~parent_tree ~pos parent_window as widget - - method private class_name = "GMisc.color_selection" - - initializer - classe <- "color_selection"; - proplist <- proplist @ - [ "use_opacity", - new prop_bool ~name:"use_opacity" ~init:"false" - ~set:(ftrue color_selection#set_opacity); - "update_policy", - new prop_update_type ~name:"update_policy" ~init:"CONTINUOUS" - ~set:(ftrue color_selection#set_update_policy) - ] -end - -let new_ticolor_selection ~name ?(listprop = []) = - new ticolor_selection ~widget:(GMisc.color_selection ()) ~name - - -class tipixmap ~(widget : GMisc.pixmap) ~name ~parent_tree ~pos - ?(insert_evbox=true) parent_window = -object(self) - val pixmap = widget - inherit timisc ~name ~widget:(widget :> GMisc.misc) ~insert_evbox - ~parent_tree ~pos parent_window as widget - - method private class_name = "GMisc.pixmap" - initializer - classe <- "pixmap"; - proplist <- proplist @ - [ "file", - new prop_file ~name:"file" ~init:"" - ~set:(fun v -> - pixmap#set_pixmap - (GDraw.pixmap_from_xpm ~window:parent_window#tiwin#widget - ~file:v ()); - true) - ] -end - -let new_tipixmap ~name ?(listprop = []) ~parent_tree ~pos ?(insert_evbox=true) (parent_window : window_and_tree0) = - new tipixmap ~widget:(GMisc.pixmap (GDraw.pixmap_from_xpm - ~window:parent_window#tiwin#widget ~file:"pixmap.xpm" ()) ()) ~name - ~parent_tree ~pos ~insert_evbox parent_window diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tiPack.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tiPack.ml deleted file mode 100644 index 291eec9d9..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tiPack.ml +++ /dev/null @@ -1,300 +0,0 @@ - -open Utils -open Property - -open TiContainer - -class tibox ~(dir : Gtk.Tags.orientation) ~(widget : GPack.box) - ~name ~parent_tree ~pos ?(insert_evbox=true) parent_window = - let class_name = - match dir with `VERTICAL -> "GPack.vbox" | _ -> "GPack.hbox" in -object(self) - val box = widget - inherit ticontainer ~name ~widget ~parent_tree ~pos ~insert_evbox - parent_window as container - - method private class_name = class_name - - method private name_of_add_method = "#pack" - -(* removes the ::expand ::fill ::padding in the proplist of a box - assumes that these are the only properties with a :: in the name *) - method private save_clean_proplist = - List.filter container#save_clean_proplist - ~f:(fun (n,p) -> - try - let i = String.index n ':' in - i = String.length n || n.[i+1] <> ':' - with Not_found -> true) - - method private emit_clean_proplist = - List.filter container#emit_clean_proplist - ~f:(fun (n,p) -> - try - let i = String.index n ':' in - i = String.length n || n.[i+1] <> ':' - with Not_found -> true) - - method change_name_in_proplist oldn newn = - proplist <- List.fold_left ~init:proplist ~f: - (fun pl propname -> - change_property_name (oldn ^ propname) (newn ^ propname) pl) - [ "::expand"; "::fill"; "::padding" ]; - Propwin.update self false - - method child_up child = - let pos = list_pos ~item:child (List.map ~f:fst children) in - if pos > 0 then begin - box#reorder_child child#base ~pos:(pos-1); - children <- list_reorder_up children ~pos; - stree#item_up ~pos - end - - method child_down child = - let pos = list_pos ~item:child (List.map ~f:fst children) in - if pos < (List.length children - 1) then begin - box#reorder_child child#base ~pos:(pos+1); - children <- list_reorder_down children ~pos; - stree#item_up ~pos:(pos+1) - end - - method private add child ~pos = - box#pack child#base; - if pos < 0 then begin - children <- children @ [(child, `START)] - end - else begin - children <- list_insert ~item:(child, `START) children ~pos; - box#reorder_child child#base ~pos - end; - let n = child#name in - let expand = - new prop_bool ~name:"expand" ~init:"false" ~set: - begin fun v -> - box#set_child_packing (child#base) ~expand:v; - Propwin.update child false; - Propwin.update self false; true - end - and fill = - new prop_bool ~name:"fill" ~init:"true" ~set: - begin fun v -> - box#set_child_packing (child#base) ~fill:v; - Propwin.update child false; - Propwin.update self false; true - end - and padding = - new prop_int ~name:"padding" ~init:"0" ~set: - begin fun v -> - box#set_child_packing (child#base) ~padding:v; - Propwin.update child false; - Propwin.update self false; true - end - in - proplist <- proplist @ - [ (n ^ "::expand"), expand; - (n ^ "::fill"), fill; - (n ^ "::padding"), padding ]; - child#add_to_proplist - [ "expand", expand; "fill", fill; "padding", padding ]; - Propwin.update self true - - - method remove child = - box#remove (child#base); - children <- list_remove ~f:(fun (ch, _) -> ch = child) children; - let n = child#name in - proplist <- List.fold_left ~init:proplist - ~f:(fun acc n -> List.remove_assoc n acc) - [ (n ^ "::expand"); (n ^ "::fill"); (n ^ "::padding") ]; - Propwin.update self true - - initializer - classe <- (match dir with `VERTICAL -> "vbox" | _ -> "hbox"); - proplist <- proplist @ - [ "homogeneous", - new prop_bool ~name:"homogeneous" ~init:"false" - ~set:(ftrue box#set_homogeneous); - "spacing", - new prop_int ~name:"spacing" ~init:"0" - ~set:(ftrue box#set_spacing) - ] -end - -class tihbox = tibox ~dir:`HORIZONTAL -class tivbox = tibox ~dir:`VERTICAL - -let new_tihbox ~name ?(listprop = []) = new tihbox ~widget:(GPack.hbox ()) ~name -let new_tivbox ~name ?(listprop = []) = new tivbox ~widget:(GPack.vbox ()) ~name - - - - -class tibbox ~(dir : Gtk.Tags.orientation) ~(widget : GPack.button_box) - ~name ~parent_tree ~pos ?(insert_evbox=true) parent_window = - let class_name = - match dir with `VERTICAL -> "GPack.button_box `VERTICAL" - | _ -> "GPack.button_box `HORIZONTAL" in -object(self) - val bbox = widget - inherit tibox ~dir ~widget:(widget :> GPack.box) - ~name ~parent_tree ~pos ~insert_evbox parent_window - - method private class_name = class_name - -initializer - classe <- (match dir with `VERTICAL -> "vbutton_box" | _ -> "hbutton_box"); - proplist <- proplist @ - [ "layout", - new prop_button_box_style ~name:"layout" ~init:"DEFAULT_STYLE" - ~set:(ftrue bbox#set_layout); - "spacing", - new prop_int ~name:"spacing" - ~init:(match dir with `VERTICAL -> "10" | _ -> "30") -(* donne -1 (defaut) -(GtkPack.BBox.get_spacing bbox#as_button_box) *) - ~set:(fun v -> bbox#set_spacing v; - GtkBase.Widget.queue_resize bbox#as_widget; true); - "child_width", - new prop_int ~name:"child_width" ~init:"85" - ~set:(fun v -> - bbox#set_child_size ~width:v - ~height:(int_of_string (self#get_property "child_height")) (); - GtkBase.Widget.queue_resize bbox#as_widget; true); - "child_height", - new prop_int ~name:"child_height" ~init:"27" - ~set:(fun v -> - bbox#set_child_size ~height:v - ~width:(int_of_string (self#get_property "child_width")) (); - GtkBase.Widget.queue_resize bbox#as_widget; true); - "child_ipad_x", - new prop_int ~name:"child_ipad_x" ~init:"7" - ~set:(fun v -> - bbox#set_child_ipadding ~x:v - ~y:(int_of_string (self#get_property "child_ipad_y")) (); - GtkBase.Widget.queue_resize bbox#as_widget; true); - "child_ipad_y", - new prop_int ~name:"child_ipad_y" ~init:"0" - ~set:(fun v -> - bbox#set_child_ipadding ~y:v - ~x:(int_of_string (self#get_property "child_ipad_x")) (); - GtkBase.Widget.queue_resize bbox#as_widget; true); - ] -end - - -(* TODO: pour proplist/spacing il faudrait implementer - les fonctions get_spacing ... (voir dans gtkPack) *) - -class tihbutton_box = tibbox ~dir:`HORIZONTAL -class tivbutton_box = tibbox ~dir:`VERTICAL - -let new_tihbutton_box ~name ?(listprop = []) = - new tihbutton_box ~widget:(GPack.button_box `HORIZONTAL ()) ~name - -let new_tivbutton_box ~name ?(listprop = []) = - new tivbutton_box ~widget:(GPack.button_box `VERTICAL ()) ~name - - - - -let get_fixed_pos () = - let rx = ref 0 and ry = ref 0 in - let w = GWindow.window ~modal:true () in - let v = GPack.vbox ~packing:w#add () in - let l = GMisc.label ~text:"Enter position for child" ~packing:v#pack () in - let h1 = GPack.hbox ~packing:v#pack () in - let l1 = GMisc.label ~text:"x:" ~packing:h1#pack () in - let e1 = GEdit.entry ~text:"0" ~packing:h1#pack () in - let h2 = GPack.hbox ~packing:v#pack () in - let l2 = GMisc.label ~text:"y" ~packing:h2#pack () in - let e2 = GEdit.entry ~text:"0" ~packing:h2#pack () in - let h7 = GPack.hbox ~packing:v#pack () in - let b1 = GButton.button ~label:"OK" ~packing:h7#pack () in - let b2 = GButton.button ~label:"Cancel" ~packing:h7#pack () in - w#show (); - b1#connect#clicked - ~callback:(fun () -> - begin - try rx := int_of_string e1#text with _ -> () end; - begin - try ry := int_of_string e2#text with _ -> () end; - w#destroy ()); - b2#connect#clicked ~callback:w#destroy; - w#connect#destroy ~callback:GMain.Main.quit; - GMain.Main.main (); - !rx, !ry - - -class tifixed ~(widget : GPack.fixed) - ~name ~parent_tree ~pos ?(insert_evbox=true) parent_window = -object(self) - val fixed = widget - inherit ticontainer ~widget - ~name ~parent_tree ~pos ~insert_evbox parent_window - - method private class_name = "GPack.fixed" - - method private add child ~pos = - let x, y = get_fixed_pos () in - fixed#put child#base ~x ~y; - children <- children @ [(child, `START)] - initializer - classe <- "fixed" -end - -let new_tifixed ~name ?(listprop = []) = - new tifixed ~widget:(GPack.fixed ()) ~name - - - - - -class tinotebook ~(widget : GPack.notebook) ~name ~parent_tree ~pos - ?(insert_evbox=true) parent_window = -object(self) - val notebook = widget - inherit ticontainer ~name ~widget ~insert_evbox - ~parent_tree ~pos parent_window as widget - - method private class_name = "GPack.notebook" - - method private add child ~pos = - children <- children @ [child, `START]; - notebook#insert_page child#base ~pos; - child#add_to_proplist - [ "tab_label", - new prop_string ~name:"tab_label" ~init:"" - ~set:(fun v -> notebook#set_page - ~tab_label:((GMisc.label ~text:v())#coerce) child#base; true) - ] - - - initializer - classe <- "notebook"; - proplist <- proplist @ - [ "tab_pos", - new prop_position ~name:"tab_ pos" ~init:"TOP" - ~set:(ftrue notebook#set_tab_pos); - "show_tabs", - new prop_bool ~name:"show_tabs" ~init:"true" - ~set:(ftrue notebook#set_show_tabs); - "homogeneous_tabs", - new prop_bool ~name:"homogeneous_tabs" ~init:"true" - ~set:(ftrue notebook#set_homogeneous_tabs); - "show_border", - new prop_bool ~name:"show_border" ~init:"true" - ~set:(ftrue notebook#set_show_border); - "scrollable", - new prop_bool ~name:"scrollable" ~init:"false" - ~set:(ftrue notebook#set_scrollable); - "tab_border", - new prop_int ~name:"tab_border" ~init:"2" - ~set:(ftrue notebook#set_tab_border); - "popup_enable", - new prop_bool ~name:"popup_enable" ~init:"false" - ~set:(ftrue notebook#set_popup) - ] -end - -let new_tinotebook ~name ?(listprop = []) = - new tinotebook ~widget:(GPack.notebook ()) ~name diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tiWidget.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tiWidget.ml deleted file mode 100644 index 5a6e3ac01..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tiWidget.ml +++ /dev/null @@ -1,43 +0,0 @@ - -let new_class_list (* : - (string * - (name:string -> ?listprop:string list -> - parent_tree:GTree2.tree -> pos:int -> - ?insert_evbox:bool -> - - TiBase.window_and_tree0 -> TiBase.tiwidget0)) list *) -= [ - "window", TiWindow.new_tiwindow; - "hbox", TiPack.new_tihbox; - "vbox", TiPack.new_tivbox; - "hbutton_box", TiPack.new_tihbutton_box; - "vbutton_box", TiPack.new_tivbutton_box; - "fixed", TiPack.new_tifixed; - "notebook", TiPack.new_tinotebook; - "button", TiButton.new_tibutton; - "check_button", TiButton.new_ticheck_button; - "toggle_button", TiButton.new_titoggle_button; - "radio_button", TiButton.new_tiradio_button; - "toolbar", TiButton.new_toolbar; - "hseparator", TiMisc.new_tihseparator; - "vseparator", TiMisc.new_tivseparator; - "statusbar", TiMisc.new_tistatusbar; - "label", TiMisc.new_tilabel; - "color_selection", TiMisc.new_ticolor_selection; - "pixmap", TiMisc.new_tipixmap; - "frame", TiBin.new_tiframe; - "aspect_frame", TiBin.new_tiaspect_frame; - "handle_box", TiBin.new_handle_box; - "viewport", TiBin.new_viewport; - "event_box", TiBin.new_event_box; - "scrolled_window", TiBin.new_tiscrolled_window; - "entry", TiEdit.new_tientry; - "spin_button", TiEdit.new_tispin_button; - "combo", TiEdit.new_ticombo; - "clist", TiList.new_clist -] - -let _ = - TiBase.new_tiwidget := - (fun ~classe ?(pos = -1) ~name ~parent_tree ?insert_evbox ?(listprop = []) -> (List.assoc classe new_class_list) ~pos ~name ~parent_tree ?insert_evbox ~listprop) - diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tiWindow.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tiWindow.ml deleted file mode 100644 index b44b4d479..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tiWindow.ml +++ /dev/null @@ -1,117 +0,0 @@ - -open Utils -open Property - -open TiBase -open TiContainer - - -class tiwindow ~widget ~name ~parent_tree ~pos ?(insert_evbox=true) - parent_window = -object(self) - val window = widget - inherit ticontainer ~name ~widget - ~insert_evbox:false ~parent_tree ~pos parent_window as container - - method connect_event = window#event#connect - - method private class_name = "GWindow.window" - - method private get_mandatory_props = [ "title" ] - -(* method private save_clean_proplist = - List.remove_assoc "title" container#save_clean_proplist - - method private emit_clean_proplist plist = - List.remove_assoc "title" (container#emit_clean_proplist plist) -*) - method remove_me () = - let sref = ref "" in - self#save_to_string sref; - let lexbuf = Lexing.from_string !sref in - let node = Load_parser.window Load_lexer.token lexbuf in - add_undo (Add_window node); - self#remove_me_without_undo () - - method copy () = self#copy_to_sel window_selection - - method remove_me_without_undo () = - self#forall ~callback:(fun tiw -> tiw#remove_me_without_undo ()); - parent_window#remove_sel (self : #tiwidget0 :> tiwidget0); - name_list := list_remove !name_list ~f:(fun n -> n=name); - Hashtbl.remove widget_map name; - Propwin.remove name; - widget#destroy () - - method private get_packing packing = "" - - method emit_code f param_list = - let param_string = - match param_list with - | [] -> "" - | _ -> "['" ^ - (String.concat ~sep:", '" - (List.map ~f:(fun c -> (String.make 1 c)) param_list)) ^ - "] " in - Format.fprintf f "(* Code for %s *)@\n@\n@[class %s%s () =" - name param_string name; - self#emit_init_code f ~packing:""; - Format.fprintf f "@]@\n@[object (self)"; - self#emit_method_code f; - Format.fprintf f "@ method show () = %s#show ()" name; - Format.fprintf f "@ @[initializer"; - self#emit_initializer_code f; - Format.fprintf f "@ ()@]@]@ end@\n@\n" - -(* method private save_start formatter = - Format.fprintf formatter "@[<0>@\n@[<2>" name; - Format.fprintf formatter "@\ntitle=\"%s\"" - (List.assoc "title" proplist)#get -*) - method private save_end formatter = - Format.fprintf formatter "@]@\n@\n@]" - - method private menu ~time = - let menu = GMenu.menu () and menu_add = GMenu.menu () in - List.iter - ~f:(fun n -> - let mi = GMenu.menu_item ~packing:menu_add#append ~label:n () - in mi#connect#activate - ~callback:(fun () -> self#add_child n (); ()); ()) - widget_add_list; - let mi_add = GMenu.menu_item ~packing:menu#append ~label:("add to "^ name) () - and mi_paste = GMenu.menu_item ~packing:menu#append ~label:"Paste" () - in - mi_add#set_submenu menu_add; - if !selection <> "" - then begin mi_paste#connect#activate ~callback:self#paste; () end - else mi_paste#misc#set_sensitive false; - menu#popup ~button:3 ~time - - - initializer - classe <- "window"; - window#set_title name; - proplist <- proplist @ - [ "title", - new prop_string ~name:"title" ~init:name ~set:(ftrue window#set_title); - "allow_shrink", new prop_bool ~name:"allow_shrink" ~init:"false" - ~set:(ftrue window#set_allow_shrink); - "allow_grow", new prop_bool ~name:"allow_grow" ~init:"true" - ~set:(ftrue window#set_allow_grow); - "auto_shrink", new prop_bool ~name:"auto_shrink" ~init:"false" - ~set:(ftrue window#set_auto_shrink); - "x position", new prop_int ~name:"x" ~init:"-2" - ~set:(fun x -> window#misc#set_geometry ~x (); true); - "y position", new prop_int ~name:"y" ~init:"-2" - ~set:(fun y -> window#misc#set_geometry ~y (); true) ] -end - -let new_tiwindow ~name ?(listprop = []) = - let w = GWindow.window ~show:true () in - w#misc#set_can_focus false; - w#misc#set_can_default false; - new tiwindow ~widget:w ~name - - - diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/togglebutton.xpm b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/togglebutton.xpm deleted file mode 100644 index f29d76972..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/togglebutton.xpm +++ /dev/null @@ -1,33 +0,0 @@ -/* XPM */ -static char *togglebutton_xpm[] = { -/* columns rows colors chars-per-pixel */ -"21 21 6 1", -" c Gray0", -". c #7b7b7b", -"X c #d6d6d6", -"o c #b3cece", -"O c Gray100", -"+ c None", -/* pixels */ -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+..................O+", -"+. O+", -"+. XXXXXXXXXXXXXXXXO+", -"+. XXXXXXXXXXXXXXXXO+", -"+. XXX XXX XXX XXO+", -"+. XX XXX XX XX XXO+", -"+. XX XXX XX XX XXO+", -"+. XX XXX XX X X XXO+", -"+. XX XXX XX XX XXO+", -"+. XX XXX XX XX XXO+", -"+. XXX XXX XXX XXO+", -"+. XXXXXXXXXXXXXXXXO+", -"+. XXXXXXXXXXXXXXXXO+", -"+. XXXXXXXXXXXXXXXXO+", -"+OOOOOOOOOOOOOOOOOOO+", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++" -}; diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/toolbar.xpm b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/toolbar.xpm deleted file mode 100644 index d9a521716..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/toolbar.xpm +++ /dev/null @@ -1,33 +0,0 @@ -/* XPM */ -static char *toolbar_xpm[] = { -/* columns rows colors chars-per-pixel */ -"21 21 6 1", -" c Gray0", -". c #7b7b7b", -"X c #d6d6d6", -"o c #b3cece", -"O c Gray100", -"+ c None", -/* pixels */ -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+OOOOOOOOOOOOOOOOOOO ", -"+OXXXXXXXXXXXXXXXXX. ", -"+OXOOOO OOOO OOOO X. ", -"+OXOXXX OXXX OXXX X. ", -"+OXOXXX OXXX OXXX X. ", -"+OXO O O X. ", -"+OXXXXXXXXXXXXXXXXX. ", -"+O.................. ", -"+ ", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++" -}; diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tree_minus.xpm b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tree_minus.xpm deleted file mode 100644 index cce067910..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tree_minus.xpm +++ /dev/null @@ -1,18 +0,0 @@ -/* XPM */ -static char *tree_minus[] = { -/* width height num_colors chars_per_pixel */ -" 9 9 2 1", -/* colors */ -". c #000000", -"# c #f8fcf8", -/* pixels */ -".........", -".#######.", -".#######.", -".#######.", -".#.....#.", -".#######.", -".#######.", -".#######.", -"........." -}; diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tree_plus.xpm b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tree_plus.xpm deleted file mode 100644 index d0ba80ca2..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/tree_plus.xpm +++ /dev/null @@ -1,18 +0,0 @@ -/* XPM */ -static char *tree_plus[] = { -/* width height num_colors chars_per_pixel */ -" 9 9 2 1", -/* colors */ -". c #000000", -"# c #f8fcf8", -/* pixels */ -".........", -".#######.", -".###.###.", -".###.###.", -".#.....#.", -".###.###.", -".###.###.", -".#######.", -"........." -}; diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/utils.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/utils.ml deleted file mode 100644 index 0b37975c7..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/utils.ml +++ /dev/null @@ -1,353 +0,0 @@ -(* $Id$ *) - -open GObj - -open Common - -external test_modifier : Gdk.Tags.modifier -> int -> bool - = "ml_test_GdkModifier_val" - - -(************* types *************) -(* used in the load_parser and for the selection *) - -(* widget: class * name * property list - where property = name * value_string *) -type yywidget = string * string * (string * string) list -type yywidget_tree = Node of yywidget * yywidget_tree list - - -(*********** some utility functions **************) -let rec list_remove ~f = function - | [] -> [] - | hd :: tl -> if f hd then tl else hd :: (list_remove ~f tl) - - -(* cut the list at the element elt; elt stays in tail; - hd stays in reverse order *) -let cut_list ~item l = - let rec aux h t = match t with - | hd :: tl -> if hd = item then h, t - else aux (hd :: h) tl - | [] -> failwith "cut_list" - in aux [] l - -let list_pos ~item l = - let rec aux pos = function - | [] -> raise Not_found - | hd :: tl -> if hd = item then pos else aux (pos+1) tl - in aux 0 l - -(* moves the pos element up; pos is >= 1; - the first element is numbered 0 *) -let rec list_reorder_up ~pos = function - | hd1 :: hd2 :: tl when pos = 1 -> hd2 :: hd1 :: tl - | hd :: tl when pos > 1 -> hd :: (list_reorder_up ~pos:(pos-1) tl) - | _ -> failwith "list_reorder" - -(* moves the pos element down; pos is < length of l - 1; - the first element is numbered 0 *) -let rec list_reorder_down ~pos = - list_reorder_up ~pos:(pos+1) - - -let rec list_insert ~item l ~pos = - if pos=0 then item :: l - else - match l with - | [] -> failwith "list_insert" - | hd :: tl -> hd :: (list_insert ~item tl ~pos:(pos-1)) - - -let rec change_property_name oldname newname = function - | (n, p) :: tl when oldname = n -> (newname, p) :: tl - | (n, p) :: tl -> (n, p) :: change_property_name oldname newname tl - | [] -> failwith "change_property_name: name not found" - - - -(* contains the list of names of widgets in the current project; - used to test if a name is already used; - a name is added to the list when a tiwrapper is created (in - the initilizer part of tiwrapper, - it is removed when the widget is removed from his parent, - in method remove_me of tiwrapper *) -let name_list = ref ([] : string list) - -let split name = - let l = String.length name in - let i = ref (l-1) in - while !i >= 0 && name.[!i] >= '0' && name.[!i] <= '9' do decr i done; - if !i = l-1 then - name, (-1) - else - (String.sub name ~pos:0 ~len:(!i+1)), - int_of_string (String.sub name ~pos:(!i+1) ~len:(l- !i-1)) - -let test_unique name = not (List.mem name !name_list) - -let make_new_name ?(index=1) base = - let index, name = - if index = -1 then ref 1, ref base - else ref index, ref (base ^ (string_of_int index)) in - while not (test_unique !name) do - incr index; - name := base ^ (string_of_int !index) - done; - !name - -let change_name name = - let base, index = split name in make_new_name base ~index - -let message s = - let w = GWindow.window ~show:true ~modal:true () in - let v = GPack.vbox ~packing:w#add () in - let l = GMisc.label ~text:s ~packing:v#add () in - let b = GButton. button ~label:"OK" ~packing:v#add () in - b#connect#clicked ~callback:w#destroy; - w#connect#destroy ~callback:GMain.Main.quit; - GMain.Main.main () - -let message_name () = message "name already in use\npick a new name" - -(* better: use a spin button *) -let get_a_number s default= - let res = ref default in - let w = GWindow.window ~show:true ~modal:true () in - let v = GPack.vbox ~packing:w#add () in - let l = GMisc.label ~text:s ~packing:v#add () in - let e = GEdit.entry ~text:(string_of_int default) ~packing:v#add () in - let b = GButton. button ~label:"OK" ~packing:v#add () in - b#connect#clicked ~callback:(fun () -> - begin try res := int_of_string e#text with Failure _ -> () end; - w#destroy ()); - w#connect#destroy ~callback:GMain.Main.quit; - GMain.Main.main (); - !res - - -(*************** file selection *****************) - -let get_filename ~callback:set_filename ?(dir="") () = - let res = ref false in - let file_selection = GWindow.file_selection ~modal:true () in - if dir <> "" then file_selection#set_filename dir; - file_selection#show (); - file_selection#ok_button#connect#clicked - ~callback:(fun () -> set_filename file_selection#get_filename; - res := true; - file_selection#destroy ()); - file_selection#cancel_button#connect#clicked - ~callback:file_selection#destroy; - file_selection#connect#destroy ~callback:GMain.Main.quit; - GMain.Main.main (); - !res - -(* returns the directory and the file name (without the extension) *) -let split_filename filename ~ext = - let lext = String.length ext in - let l = String.length filename in - let filename, l = - if (l > lext) && (String.sub filename ~pos:(l - lext) ~len:lext = ext) - then (String.sub filename ~pos:0 ~len:(l-lext)), l-lext - else filename, l in - let i = 1 + (String.rindex filename '/') in - String.sub filename ~pos:0 ~len:i, - String.sub filename ~pos:i ~len:(l-i) - - -(****************** ML signals *****************) -let signal_id = ref 0 - -let next_callback_id () : GtkSignal.id = - decr signal_id; Obj.magic (!signal_id : int) - -class ['a] signal = object - val mutable callbacks : (GtkSignal.id * ('a -> unit)) list = [] - method connect ~callback ~after = - let id = next_callback_id () in - callbacks <- - if after then callbacks @ [id,callback] else (id,callback)::callbacks; - id - method call arg = - List.iter callbacks ~f:(fun (_,f) -> f arg) - method disconnect id = - List.mem_assoc id callbacks && - (callbacks <- List.remove_assoc id callbacks; true) - method reset () = callbacks <- [] -end - -class type disconnector = - object - method disconnect : GtkSignal.id -> bool - method reset : unit -> unit - end - -class has_ml_signals = object - val mutable disconnectors = [] - method private add_signal (sgn : 'a signal) = - disconnectors <- (sgn :> disconnector) :: disconnectors - - method disconnect id = - List.exists disconnectors ~f:(fun d -> d#disconnect id) -end - - -(****************** undo information ********************) - -type undo_action = - | Add of string * yywidget_tree * int - | Remove of string - | Property of prop * string - | Add_window of yywidget_tree - | Remove_window of string - -let undo_info = ref ([] : undo_action list) -let next_undo_info = ref ([] : undo_action list) -let last_action_was_undo = ref false - -let add_undo f = - undo_info := f :: !undo_info; - last_action_was_undo := false - - -(**********************************************************) -let ftrue f = fun x -> f x; true - - -(**********************************************************) - -let toolbar_child_prop kind = - let rt = ref "" and rtt = ref "" and rptt = ref "" and ok = ref false in - let w = GWindow.window ~modal:true () in - let v = GPack.vbox ~packing:w#add () in - let h1 = GPack.hbox ~packing:v#pack () in - let h2 = GPack.hbox ~packing:v#pack () in - let h3 = GPack.hbox ~packing:v#pack () in - let h4 = GPack.hbox ~packing:v#pack () in - let l1 = GMisc.label ~text:"text" ~packing:h1#pack () in - let e1 = GEdit.entry ~packing:h1#pack () in - let l2 = GMisc.label ~text:"tooltip_text" ~packing:h2#pack () in - let e2 = GEdit.entry ~packing:h2#pack () in - let l3 = GMisc.label ~text:"private_text" ~packing:h3#pack () in - let e3 = GEdit.entry ~packing:h3#pack () in - let b1 = GButton.button ~label:"OK" ~packing:h4#pack () in - let b2 = GButton.button ~label:"Cancel" ~packing:h4#pack () in - w#show (); - b1#connect#clicked - ~callback:(fun () -> rt := e1#text; rtt := e2#text; - rptt := e3#text; ok := true; - w#destroy ()); - b2#connect#clicked ~callback:w#destroy; - w#connect#destroy ~callback:GMain.Main.quit; - GMain.Main.main (); - !ok, !rt, !rtt, !rptt - - - -(**********************************************************) - -let get5floats_from_string s = - try - let n1 = String.index s ' ' in - let f1 = float_of_string (String.sub s ~pos:0 ~len:(n1-1)) in - let n2 = String.index_from s (n1+1) ' ' in - let f2 = float_of_string (String.sub s ~pos:(n1+1) ~len:(n2-1)) in - let n3 = String.index_from s (n2+1) ' ' in - let f3 = float_of_string (String.sub s ~pos:(n2+1) ~len:(n3-1)) in - let n4 = String.index_from s (n3+1) ' ' in - let f4 = float_of_string (String.sub s ~pos:(n3+1) ~len:(n4-1)) in - let f5 = float_of_string (String.sub s ~pos:(n4+1) ~len: - ((String.length s) -1)) in - f1, f2, f3, f4, f5 - with _ -> failwith "get5floats_of_string" - - - -(**********************************************************) - -exception Float_of_string -let my_float_of_string s = - let l = String.length s in - if l=0 then raise Float_of_string; - let sign, d = match s.[0] with - | '+' -> 1, 1 - | '-' -> -1, 1 - | _ -> 1, 0 in - let m, p = - let p = - try - String.index s '.' - with Not_found -> l in - if p=d then 0, p - else - try int_of_string (String.sub s ~pos:d ~len:(p-d)), p - with Failure "int_of_string" -> raise Float_of_string - in - if p=l then float_of_int m - else begin - let f = ref 0. and r = ref 0.1 in - for i = p+1 to l-1 do - let k = (int_of_char s.[i]) - 48 in - if k > 9 || k < 0 then raise Float_of_string; - f := !f +. (float_of_int k) *. !r; - r := !r *. 0.1 - done; - !f +. (float_of_int m) - end - - - - -class entry_float obj ~init = let rv = ref init in -object - inherit GEdit.entry obj as entry - method value = - try - let v = my_float_of_string entry#text in - rv := v; - v - with Float_of_string -> - let pop = GWindow.window ~title:"error" ~modal:true () in - let vb = GPack.vbox ~packing:pop#add () in - let l = GMisc.label ~text:"value must be a float" ~packing:vb#pack () in - let b = GButton.button ~label:"OK" ~packing:vb#pack () in - b#connect#clicked ~callback:pop#destroy; - pop#event#connect#delete ~callback:(fun _ -> pop#destroy (); true); - pop#connect#destroy ~callback:GtkMain.Main.quit; - pop#show (); - GtkMain.Main.main (); - entry#set_text (string_of_float !rv); - !rv -end - - -let set_editable ?editable ?(width = -2) ?(height = -2) w = - Gaux.may editable ~f:(GtkEdit.Editable.set_editable w); - if width <> -2 || height <> -2 then GtkBase.Widget.set_usize w ~width ~height - - -let entry_float ~init ?max_length ?visibility ?editable - ?width ?height ?packing ?show () = - let w = GtkEdit.Entry.create ?max_length () in - GtkEdit.Entry.set w ~text:(string_of_float init) ?visibility; - set_editable w ?editable ?width ?height; - pack_return (new entry_float w ~init) ~packing ~show - - -(*************************************************************) - - -let split_string s ~sep = - let l = String.length s in - let r = ref [] in - let j = ref 0 in - for i = 0 to l-1 do - if String.unsafe_get s i = sep then begin - r := (String.sub s ~pos:!j ~len:(i - !j)) :: !r; - j := i + 1 - end - done; - List.rev ((String.sub s ~pos:!j ~len:(l - !j)) :: !r) - - diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/vbox.xpm b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/vbox.xpm deleted file mode 100644 index 1c557b021..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/vbox.xpm +++ /dev/null @@ -1,31 +0,0 @@ -/* XPM */ -static char *vbox_xpm[] = { -/* columns rows colors chars-per-pixel */ -"21 21 4 1", -" c Gray0", -". c #7b7b7b", -"X c #d6d6d6", -"o c Gray100", -/* pixels */ -"oooooooooooooooooooo ", -"oXXXXXXXXXXXXXXXXXX. ", -"oXXXXXXXXXXXXXXXXXX. ", -"oXXXXXXXXXXXXXXXXXX. ", -"oXXXXXXXXXXXXXXXXXX. ", -"o................... ", -" ", -"oooooooooooooooooooo ", -"oXXXXXXXXXXXXXXXXXX. ", -"oXXXXXXXXXXXXXXXXXX. ", -"oXXXXXXXXXXXXXXXXXX. ", -"oXXXXXXXXXXXXXXXXXX. ", -"o................... ", -" ", -"oooooooooooooooooooo ", -"oXXXXXXXXXXXXXXXXXX. ", -"oXXXXXXXXXXXXXXXXXX. ", -"oXXXXXXXXXXXXXXXXXX. ", -"oXXXXXXXXXXXXXXXXXX. ", -"o................... ", -" " -}; diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/vbuttonbox.xpm b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/vbuttonbox.xpm deleted file mode 100644 index 0c2bc9598..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/vbuttonbox.xpm +++ /dev/null @@ -1,33 +0,0 @@ -/* XPM */ -static char *vbuttonbox_xpm[] = { -/* columns rows colors chars-per-pixel */ -"21 21 6 1", -" c Gray0", -". c #7b7b7b", -"X c #d6d6d6", -"o c #b3cece", -"O c Gray100", -"+ c None", -/* pixels */ -"+++++++++++++++++++++", -"+++++++++++++++++++++", -"++++++++OOOOO +++++++", -"++++++++OXXX. +++++++", -"++++++++OXXX. +++++++", -"++++++++O.... +++++++", -"++++++++ +++++++", -"+++++++++++++++++++++", -"++++++++OOOOO +++++++", -"++++++++OXXX. +++++++", -"++++++++OXXX. +++++++", -"++++++++O.... +++++++", -"++++++++ +++++++", -"+++++++++++++++++++++", -"++++++++OOOOO +++++++", -"++++++++OXXX. +++++++", -"++++++++OXXX. +++++++", -"++++++++O.... +++++++", -"++++++++ +++++++", -"+++++++++++++++++++++", -"+++++++++++++++++++++" -}; diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/viewport.xpm b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/viewport.xpm deleted file mode 100644 index 71e5e80cf..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/viewport.xpm +++ /dev/null @@ -1,34 +0,0 @@ -/* XPM */ -static char *viewport_xpm[] = { -/* columns rows colors chars-per-pixel */ -"21 21 7 1", -" c Gray0", -". c #7b7b7b", -"X c #d6d6d6", -"o c #b3cece", -"O c Gray87", -"+ c Gray100", -"@ c None", -/* pixels */ -"@@@@@@@@@@@@@@@@@@@@@", -"@...................@", -"@. +O@", -"@. XXXXXXXXXXXXXXX+O@", -"@. XXXXXXXXXXXXXXX+O@", -"@. XXXXXXXXXXXXXXX+O@", -"@. XXXXXXXXXXXXXXX+O@", -"@. XXXXXXXXXXXXXXX+O@", -"@. XXXXXXXXXXXXXXX+O@", -"@. XXXXXXXXXXXXXXX+O@", -"@. XXXXXXXXXXXXXXX+O@", -"@. XXXXXXXXXXXXXXX+O@", -"@. XXXXXXXXXXXXXXX+O@", -"@. XXXXXXXXXXXXXXX+O@", -"@. XXXXXXXXXXXXXXX+O@", -"@. XXXXXXXXXXXXXXX+O@", -"@. XXXXXXXXXXXXXXX+O@", -"@. XXXXXXXXXXXXXXX+O@", -"@.+++++++++++++++++O@", -"@.OOOOOOOOOOOOOOOOOO@", -"@@@@@@@@@@@@@@@@@@@@@" -}; diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/vseparator.xpm b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/vseparator.xpm deleted file mode 100644 index 3455f74d9..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/vseparator.xpm +++ /dev/null @@ -1,31 +0,0 @@ -/* XPM */ -static char *vseparator_xpm[] = { -/* columns rows colors chars-per-pixel */ -"21 21 4 1", -" c #7b7b7b", -". c #b3cece", -"X c Gray100", -"o c None", -/* pixels */ -"ooooooooooooooooooooo", -"oooooooooo Xooooooooo", -"oooooooooo Xooooooooo", -"oooooooooo Xooooooooo", -"oooooooooo Xooooooooo", -"oooooooooo Xooooooooo", -"oooooooooo Xooooooooo", -"oooooooooo Xooooooooo", -"oooooooooo Xooooooooo", -"oooooooooo Xooooooooo", -"oooooooooo Xooooooooo", -"oooooooooo Xooooooooo", -"oooooooooo Xooooooooo", -"oooooooooo Xooooooooo", -"oooooooooo Xooooooooo", -"oooooooooo Xooooooooo", -"oooooooooo Xooooooooo", -"oooooooooo Xooooooooo", -"oooooooooo Xooooooooo", -"oooooooooo Xooooooooo", -"ooooooooooooooooooooo" -}; diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/window.xpm b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/window.xpm deleted file mode 100644 index 8407e2836..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/radtest/window.xpm +++ /dev/null @@ -1,38 +0,0 @@ -/* XPM */ -static char *window_xpm[] = { -/* columns rows colors chars-per-pixel */ -"21 21 11 1", -" c Gray0", -". c #00007b", -"X c #7b7b7b", -"o c Green", -"O c Cyan", -"+ c Red", -"@ c Yellow", -"# c #d6d6d6", -"$ c #b3cece", -"% c Gray100", -"& c None", -/* pixels */ -"&&&&&&&&&&&&&&&&&&&&&", -"&&&&&&&&&&&&&&&&&&&&&", -"&&&&&&&&&&&&&&&&&&&&&", -"XXXXXXXXXXXXXXXXXXXX&", -"X.+@...............X ", -"X.Oo.%%%.%%.....# #X ", -"XXXXXXXXXXXXXXXXXXXX ", -"X#%%%%%%%%%%%%%%%%%X ", -"X#%%%%%%%%%%%%%%%%%X ", -"X#%%%%%%%%%%%%%%%%%X ", -"X#%%%%%%%%%%%%%%%%%X ", -"X#%%%%%%%%%%%%%%%%%X ", -"X#%%%%%%%%%%%%%%%%%X ", -"X#%%%%%%%%%%%%%%%%%X ", -"X#%%%%%%%%%%%%%%%%%X ", -"X#%%%%%%%%%%%%%%%%%X ", -"X#%%%%%%%%%%%%%%%%%X ", -"XXXXXXXXXXXXXXXXXXXX ", -"& ", -"&&&&&&&&&&&&&&&&&&&&&", -"&&&&&&&&&&&&&&&&&&&&&" -}; diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/unison/.cvsignore b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/unison/.cvsignore deleted file mode 100644 index 31706abd2..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/unison/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -unison-* diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/unison/README b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/unison/README deleted file mode 100644 index 73bcc2511..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/unison/README +++ /dev/null @@ -1,19 +0,0 @@ - A GUI for Unison - -Here is a lablGTK port of Unison's GUI. -Or rather was, since this is now the standard GUI for unison. - -Unison is a file synchronization software developped by Benjamin -Pierce, Trevor Jim, and others. - -As of version 2.3.12, unison is based on LablGTK 1.00. -To use it with the current version, you must: - * get unison-2.3.12/src.tar.gz from http://www.cis.upenn.edu/~bcpierce/unison/ - * untar it in this directory - * copy or make links for uigtk.ml here inside unison-2.3.12 - ln -fs ../uigtk.ml . - * make and follow instructions in INSTALL.txt - -Jacques Garrigue - -$Id$ diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/unison/uigtk.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/unison/uigtk.ml deleted file mode 100644 index 6efacd630..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/applications/unison/uigtk.ml +++ /dev/null @@ -1,1434 +0,0 @@ -(* $Id$ *) - -open Util -open Os -open Common -open Uicommon -open Printf -open Trace - -(**********************************************************************) -(* GRAPHICAL INTERFACE *) -(**********************************************************************) - -module Private : Uicommon.UI = struct - -open GMain -open GdkKeysyms - -let debugprogress = Trace.debug "progress" - -(**********************************************************************) -(* UI preferences *) -(**********************************************************************) - -let fontMonospaceMedium = - if Sys.os_type = "Win32" then - lazy (Gdk.Font.load "-*-Courier New-Medium-R-Normal--*-110-*-*-*-*-*-*") - else - lazy (Gdk.Font.load "-*-Clean-Medium-R-Normal--*-130-*-*-*-*-*-*") -let fontMonospaceBold = - if Sys.os_type = "Win32" then - lazy (Gdk.Font.load "-*-Courier New-Bold-R-Normal--*-110-*-*-*-*-*-*") - else - lazy (Gdk.Font.load "-*-Courier-Bold-R-Normal--*-120-*-*-*-*-*-*") - -(**********************************************************************) -(* UI state variables *) -(**********************************************************************) - -type stateItem = { ri : reconItem; - mutable bytesTransferred : int; - mutable whatHappened : unit confirmation option } -let theState = ref [||] - -let current = ref None - -let currentWindow = ref None -let grabFocus t = - match !currentWindow with - Some w -> t#set_transient_for w; - w#misc#set_sensitive false - | None -> () -let releaseFocus () = - begin match !currentWindow with - Some w -> w#misc#set_sensitive true - | None -> () - end - -(**********************************************************************) -(* Lock management *) -(**********************************************************************) - -let busy = ref false - -let getLock f = - if !busy then - Trace.message "Synchronizer is busy, please wait..\n" - else begin - busy := true; f (); busy := false - end - -(**********************************************************************) -(* Some widgets *) -(**********************************************************************) - -class scrolled_text ?editable ?word_wrap ?width ?height ?packing ?show - () = - let sw = - GBin.scrolled_window ?width ?height ?packing ~show:false - ~hpolicy:`NEVER ~vpolicy:`AUTOMATIC () - in - let text = GEdit.text ?editable ?word_wrap ~packing:sw#add () in - object - inherit GObj.widget_full sw#as_widget - method text = text - method insert ?(font=fontMonospaceMedium) s = - text#freeze (); - text#delete_text ~start:0 ~stop:text#length; - text#insert ~font:(Lazy.force font) s; - text#thaw () - method show () = sw#misc#show () - initializer - if show <> Some false then sw#misc#show () - end - -let gtk_sync () = while Glib.Main.iteration false do () done - -(**********************************************************************) -(* YES OR NO FUNCTION *) -(**********************************************************************) -(* val yesOrNo : string -> string -> (unit -> unit) -> (unit -> unit) *) -(* -> unit *) -(* Displays a window with two buttons : YES and NO *) -(* yesOrNo title message yesFunction noFunction open the title *) -(* window in which is displayed message. yesFunction and noFunctions *) -(* are the functions associated two the two buttons *) -(**********************************************************************) -let yesOrNo ~title ~message ~yes:yesFunction ~no:noFunction = - let t = GWindow.dialog ~title ~wm_name:title ~modal:true ~position:`CENTER () in - grabFocus t; - let theLabel = GMisc.label ~text:message - ~packing:(t#vbox#pack ~padding:4) () in - let yes = GButton.button ~label:"Yes" ~packing:t#action_area#add () - and no = GButton.button ~label:"No" ~packing:t#action_area#add () in - no#grab_default (); - ignore - (yes#connect#clicked ~callback:(fun () -> t#destroy (); yesFunction ())); - ignore - (no#connect#clicked ~callback:(fun () -> t#destroy (); noFunction ())); - t#show (); - ignore (t#connect#destroy ~callback:Main.quit); - Main.main (); - releaseFocus () - -(**********************************************************************) -(* SAFE EXIT FUNCTION *) -(**********************************************************************) - -(* Avoid recursive invocations of the function below - (a window receives delete events even when it is not sensitive) *) -let inExit = ref false - -let safeExit () = - if not !inExit then begin - inExit := true; - if not !busy then exit 0 else - yesOrNo ~title:"Premature exit" - ~message:"Unison is working, exit anyway ?" - ~yes:(fun () -> exit 0) ~no:(fun () -> ()); - inExit := false - end - -(**********************************************************************) -(* okBox: Display a message in a window and wait for the user *) -(* to hit the "OK" button. *) -(**********************************************************************) -let okBox ~title ~message = - let t = GWindow.dialog ~title ~wm_name:title ~modal:true ~position:`CENTER () in - grabFocus t; - let theLabel = GMisc.label ~text:message - ~packing:(t#vbox#pack ~padding:4) () in - let ok = GButton.button ~label:"OK" ~packing:t#action_area#add () in - ok#grab_default (); - ignore (ok#connect#clicked ~callback:(fun () -> t#destroy())); - t#show (); - (* Do nothing until user destroys window *) - ignore (t#connect#destroy ~callback:Main.quit); - Main.main (); - releaseFocus () - -(**********************************************************************) -(* warnBox: Display a warning message in a window and wait for the *) -(* user to hit "OK" or "Exit". *) -(**********************************************************************) -let warnBox ~title ~message = - inExit := true; - let t = GWindow.dialog ~title ~wm_name:title ~modal:true ~position:`CENTER () in - grabFocus t; - let theLabel = - GMisc.label ~text:message - ~packing:(t#vbox#pack ~padding:4) () in - let ok = GButton.button ~label:"OK" ~packing:t#action_area#add () in - ok#grab_default (); - ignore (ok#connect#clicked ~callback:(fun () -> t#destroy())); - let exi = GButton.button ~label:"Exit" ~packing:t#action_area#add () in - ignore (exi#connect#clicked ~callback:(fun () -> exit 0)); - t#show (); - (* Do nothing until user destroys window *) - ignore (t#connect#destroy ~callback:Main.quit); - Main.main (); - releaseFocus (); - inExit := false - -(**********************************************************************) -(* Standard file dialog *) -(**********************************************************************) -let file_dialog ~title ~callback ?filename () = - let sel = GWindow.file_selection ~title ~modal:true ?filename () in - grabFocus sel; - ignore (sel#cancel_button#connect#clicked ~callback:sel#destroy); - ignore (sel#ok_button#connect#clicked ~callback: - (fun () -> - let name = sel#get_filename in - sel#destroy (); - callback name)); - sel#show (); - Main.main (); - releaseFocus () - -(**********************************************************************) -(* The root selection dialog *) -(**********************************************************************) -let rootSelect cont = - let t = GWindow.dialog ~title:"Root selection" ~wm_name:"Root selection" - ~modal:true ~allow_grow:true () in - t#misc#grab_focus (); - - let makeGetRoot title = - let fr = - GBin.frame ~label:title ~border_width:2 ~packing:(t#vbox#add) () in - - let vb = GPack.vbox ~border_width:4 ~packing:fr#add () in - - let f = GPack.vbox ~packing:(vb#add) () in - let f0 = GPack.hbox ~spacing:4 ~packing:f#add () in - ignore (GMisc.label ~text:"Host:" ~packing:f0#pack ()); - let localB = GButton.radio_button ~packing:f0#pack - ~label:"Local" () in - let remoteB = GButton.radio_button ~group:localB#group - ~packing:f0#pack ~label:"Remote" () in - let hostE = GEdit.entry ~packing:f0#add () in - let f1 = GPack.hbox ~spacing:4 ~packing:f#add () in - ignore (GMisc.label ~text:"File:" ~packing:f1#pack ()); - let fileE = GEdit.entry ~packing:f1#add () in - let browseCommand() = - file_dialog ~title:"Select a local file" - ~callback:(fun file -> fileE#set_text file) ~filename:fileE#text () - in - let b = GButton.button ~label:"Browse" - ~packing:f1#pack () in - ignore (b#connect#clicked ~callback:browseCommand); - let varLocalRemote = ref (`Local : [`Local|`Remote]) in - let localState() = - varLocalRemote := `Local; - hostE#misc#set_sensitive false; - b#misc#set_sensitive true - in - let remoteState() = - varLocalRemote := `Remote; - hostE#misc#set_sensitive true; - b#misc#set_sensitive false - in - ignore (localB#connect#clicked ~callback:localState); - ignore (remoteB#connect#clicked ~callback:remoteState); - localState(); - let getRoot() = - let filePart = fileE#text in - let remoteHost = hostE#text in - (* FIX: should do sanity checking here *) - match !varLocalRemote with - `Local -> filePart - | `Remote -> "//"^remoteHost^"/"^filePart in - getRoot - in - - let getRoot1 = makeGetRoot "Root 1" in - let getRoot2 = makeGetRoot "Root 2" in - - let f3 = t#action_area in - let okCommand() = - let root1 = getRoot1() in - let root2 = getRoot2() in - Prefs.setPref Uicommon.roots Prefs.TempSetting [root1;root2]; - t#destroy (); - cont () - in - let okButton = GButton.button ~label:"OK" ~packing:f3#add () in - ignore (okButton#connect#clicked ~callback:okCommand); - okButton#grab_default (); - let cancelButton = GButton.button ~label:"Cancel" ~packing:f3#add () in - ignore (cancelButton#connect#clicked ~callback:safeExit); - - (* The profile editing dialog has been installed into the Gtk - main interaction loop; wait until it completes. *) - t#show (); - ignore (t#connect#destroy ~callback:Main.quit); - Main.main () - -(**********************************************************************) -(* The root selection dialog *) -(**********************************************************************) -let editProfile prof = - (* FIX: - Scan the profile (if it is defined) - Extract the roots - Modifications - Save with new roots *) - let t = GWindow.dialog ~title:"Edit profile" ~wm_name:"Edit profile" - ~modal:true ~allow_grow:true () in - t#misc#grab_focus (); - - let vb = GPack.vbox ~border_width:4 ~packing:t#vbox#add () in - - let makeGetRoot() = - let f = GPack.vbox ~packing:(vb#pack ~expand:true ~padding:4) () in - let f0 = GPack.hbox ~spacing:4 ~packing:f#add () in - ignore (GMisc.label ~text:"Host:" ~packing:f0#pack ()); - let localB = GButton.radio_button ~packing:f0#pack ~label:"Local" () in - let remoteB = GButton.radio_button ~group:localB#group - ~packing:f0#pack ~label:"Remote" () in - let hostE = GEdit.entry ~packing:f0#add () in - let f1 = GPack.hbox ~spacing:4 ~packing:f#add () in - ignore (GMisc.label ~text:"File:" ~packing:f1#pack ()); - let fileE = GEdit.entry ~packing:f1#add () in - let browseCommand() = - file_dialog ~title:"Select a local file" - ~callback:(fun file -> fileE#set_text file) () - in - let b = GButton.button ~label:"Browse" ~packing:f1#pack () in - ignore (b#connect#clicked ~callback:browseCommand); - let varLocalRemote = ref (`Local : [`Local|`Remote]) in - let localState() = - varLocalRemote := `Local; - hostE#set_editable false; - b#misc#set_state `NORMAL - in - let remoteState() = - varLocalRemote := `Remote; - hostE#set_editable true; - b#misc#set_state `INSENSITIVE - in - ignore (localB#connect#clicked ~callback:localState); - ignore (remoteB#connect#clicked ~callback:remoteState); - localState(); - let getRoot() = - let filePart = fileE#text in - let remoteHost = hostE#text in - (* FIX: should do sanity checking here *) - match !varLocalRemote with - `Local -> filePart - | `Remote -> "//"^remoteHost^"/"^filePart in - getRoot - in - - - ignore (GMisc.label ~text:"Root 1:" ~xalign:0. - ~packing:(vb#pack ~expand:true ~padding:4) ()); - let getRoot1 = makeGetRoot() in - - ignore (GMisc.label ~text:"Root 2:" ~xalign:0. - ~packing:(vb#pack ~expand:true ~padding:4) ()); - let getRoot2 = makeGetRoot() in - - let f3 = t#action_area in - let okCommand() = - let root1 = getRoot1() in - let root2 = getRoot2() in - Prefs.setPref Uicommon.roots Prefs.PermanentSetting [root1;root2]; - Globals.savePrefs(); - t#destroy () in - let okButton = GButton.button ~label:"OK" ~packing:f3#add () in - ignore (okButton#connect#clicked ~callback:okCommand); - let cancelCommand() = - t#destroy () - in - let cancelButton = GButton.button ~label:"Cancel" ~packing:f3#add () in - ignore (cancelButton#connect#clicked ~callback:cancelCommand); - - (* The profile editing dialog has been installed into the Gtk - main interaction loop; wait until it completes. *) - t#show (); - ignore (t#connect#destroy ~callback:Main.quit); - Main.main () - -(**********************************************************************) -(* Documentation window *) -(**********************************************************************) -let documentation sect = - let title = "Documentation" in - let t = GWindow.dialog ~title ~wm_name:title () in - let t_dismiss = - GButton.button ~label:"dismiss" ~packing:t#action_area#add () in - t_dismiss#grab_default (); - let dismiss () = t#destroy () in - ignore (t_dismiss#connect#clicked ~callback:dismiss); - ignore (t#event#connect#delete ~callback:(fun _ -> dismiss (); true)); - - let (name, docstr) = List.assoc sect Strings.docs in - let hb = GPack.hbox ~packing:(t#vbox#pack ~expand:false ~padding:2) () in - let optionmenu = - GMenu.option_menu ~packing:(hb#pack ~fill:false) () in - - let charW = Gdk.Font.char_width (Lazy.force fontMonospaceMedium) 'M' in - let charH = 16 in - let t_text = - new scrolled_text ~editable:false - ~width:(charW * 80) ~height:(charH * 20) ~packing:t#vbox#add () - in - t_text#insert docstr; - - let sect_idx = ref 0 in - let idx = ref 0 in - let menu = GMenu.menu () in - let addDocSection (shortname, (name, docstr)) = - if shortname <> "" && name <> "" then begin - if shortname = sect then sect_idx := !idx; - incr idx; - let item = GMenu.menu_item ~label:name ~packing:menu#append () in - ignore - (item#connect#activate ~callback:(fun () -> t_text#insert docstr)) - end - in - Safelist.iter addDocSection Strings.docs; - optionmenu#set_menu menu; - optionmenu#set_history !sect_idx; - - t#show () - -(**********************************************************************) -(* The profile selection dialog *) -(**********************************************************************) -let profileSelect cont = -(* FIX: - - Choix du profil par defaut -*) - let profilesAndRoots = - ref - (Safelist.map - (fun f -> - let filename = fspath2string (Os.fileInUnisonDir f) in - let roots = - Safelist.map snd - (Safelist.filter (fun (n, v) -> n = "root") - (Prefs.scanPreferencesFile filename)) - in - (Filename.chop_suffix f ".prf", roots)) - (Files.ls (fspath2string Os.synchronizerFspath) "*.prf")) in - - (* The selected profile *) - let selection = ref None in - - (* Build the dialog *) - let t = GWindow.dialog ~title:"Profiles" ~wm_name:"Profiles" () in - - let okCommand() = - match !selection with - Some profile -> - Globals.prefsFileName := profile ^ ".prf"; - currentWindow := None; - t#destroy (); - cont () - | _ -> - () - in - let okButton = GButton.button ~label:"OK" ~packing:t#action_area#add () in - ignore (okButton#connect#clicked ~callback:okCommand); - okButton#misc#set_sensitive false; - okButton#grab_default (); - let cancelCommand() = t#destroy (); Main.quit () in - let cancelButton = GButton.button ~label:"Cancel" - ~packing:t#action_area#add () in - ignore (cancelButton#connect#clicked ~callback:cancelCommand); - cancelButton#misc#set_can_default true; - - let vb = t#vbox in - - ignore (GMisc.label - ~text:"Select an existing profile or create a new one" - ~xpad:2 ~ypad:2 ~packing:vb#pack ()); - - let sw = - GBin.scrolled_window ~packing:vb#add ~height:100 - ~hpolicy:`AUTOMATIC ~vpolicy:`AUTOMATIC () - in - let lst = GList.clist ~selection_mode:`BROWSE ~packing:(sw#add) () in - let fillLst default = - lst#freeze (); - lst#clear (); - let selRow = ref 0 in - let i = ref 0 in (* FIX: Work around a lablgtk bug *) - Safelist.iter - (fun (profile, roots) -> - ignore (lst#append [profile]); - if profile = default then selRow := !i; - lst#set_row_data !i (profile, roots); - incr i) - (List.sort (fun (p, _) (p', _) -> compare p p') !profilesAndRoots); - let r = lst#rows in - let p = if r < 2 then 0. else float !selRow /. float (r - 1) in - lst#scroll_vertical `JUMP p; - lst#thaw () - in - let tbl = - GPack.table ~rows:2 ~columns:2 ~packing:vb#pack () - in - tbl#misc#set_sensitive false; - ignore (GMisc.label ~text:"Root 1:" ~xpad:2 - ~packing:(tbl#attach ~left:0 ~top:0 ~expand:`NONE) ()); - ignore (GMisc.label ~text:"Root 2:" ~xpad:2 - ~packing:(tbl#attach ~left:0 ~top:1 ~expand:`NONE) ()); - let root1 = - GEdit.entry ~packing:(tbl#attach ~left:1 ~top:0) ~editable:false () in - let root2 = - GEdit.entry ~packing:(tbl#attach ~left:1 ~top:1) ~editable:false () in - root1#misc#set_can_focus false; - root2#misc#set_can_focus false; - let hb = - GPack.hbox ~border_width:2 ~spacing:2 ~packing:(vb#pack ~expand:false) () - in - let nw = - GButton.button ~label:"Create new profile" - ~packing:hb#pack () in - ignore (nw#connect#clicked ~callback:(fun () -> - let t = - GWindow.dialog ~title:"New profile" ~wm_name:"New profile" ~modal:true () - in - let vb = GPack.vbox ~border_width:4 ~packing:t#vbox#add () in - let f = GPack.vbox ~packing:(vb#pack ~expand:true ~padding:4) () in - let f0 = GPack.hbox ~spacing:4 ~packing:f#add () in - ignore (GMisc.label ~text:"Profile name:" - ~packing:f0#pack ()); - let prof = GEdit.entry ~packing:f0#add () in - prof#misc#grab_focus (); - - let exit () = t#destroy (); Main.quit () in - ignore (t#event#connect#delete ~callback:(fun _ -> exit (); true)); - - let f3 = t#action_area in - let okCommand () = - let profile = prof#text in - if profile <> "" then - let file = profile ^ ".prf" in - let fspath = Os.fileInUnisonDir file in - let filename = fspath2string fspath in - if Sys.file_exists filename then - okBox (myName ^ " error") - ("Profile \"" - ^ profile - ^ "\" already exists!\nPlease select another name.") - else - (* Make an empty file *) - let ch = - open_out_gen - [Open_wronly; Open_creat; Open_trunc] 0o600 filename in - close_out ch; - profilesAndRoots := (profile, [])::!profilesAndRoots; - fillLst profile; - exit () - in - let okButton = GButton.button ~label:"OK" ~packing:f3#add () in - ignore (okButton#connect#clicked ~callback:okCommand); - okButton#grab_default (); - let cancelButton = GButton.button ~label:"Cancel" ~packing:f3#add () in - ignore (cancelButton#connect#clicked ~callback:exit); - - t#show (); - grabFocus t; - Main.main (); - releaseFocus ())); - let ed = - GButton.button ~label:"Edit" (*~packing:(hb#pack ~expand:false)*) () in - let sd = - GButton.button ~label:"Set default" (*~packing:(hb#pack ~expand:false)*) () - in - let hlp = - GButton.button ~label:"Help" - ~packing:(hb#pack ~expand:false ~from:`END) () in - ignore (hlp#connect#clicked ~callback:(fun () -> documentation "tutorial")); - - ignore (lst#connect#unselect_row ~callback:(fun _ _ _ -> - root1#set_text ""; root2#set_text ""; - selection := None; - tbl#misc#set_sensitive false; - okButton#misc#set_sensitive false; - ed#misc#set_sensitive false; - sd#misc#set_sensitive false)); - ignore (lst#connect#select_row ~callback:(fun i _ _ -> - (* Inserting the first row trigger the signal, even before the row - data is set. So, we need to catch the corresponding exception *) - try - let (profile, roots) = lst#get_row_data i in - selection := Some profile; - begin match roots with - [r1; r2] -> root1#set_text r1; root2#set_text r2; - tbl#misc#set_sensitive true - | _ -> root1#set_text ""; root2#set_text ""; - tbl#misc#set_sensitive false - end; - okButton#misc#set_sensitive true; - ed#misc#set_sensitive true; - sd#misc#set_sensitive true - with Gpointer.Null -> ())); - ignore (lst#event#connect#button_press ~callback:(fun ev -> - match GdkEvent.get_type ev with - `TWO_BUTTON_PRESS -> - okCommand (); - true - | _ -> - false)); - fillLst "default"; - lst#misc#grab_focus (); - currentWindow := Some (t :> GWindow.window); - ignore (t#event#connect#delete ~callback:(fun _ -> Main.quit (); true)); - t#show () - -(**********************************************************************) -(* Function to display a message in a new window *) -(**********************************************************************) -let messageBox ~title ?(label = "Dismiss") ?(action = fun t -> t#destroy) - ?(modal = false) message = - let t = GWindow.dialog ~title ~wm_name:title ~modal ~position:`CENTER () in - let t_dismiss = GButton.button ~label ~packing:t#action_area#add () in - t_dismiss#grab_default (); - ignore (t_dismiss#connect#clicked ~callback:(action t)); - let charW = Gdk.Font.char_width (Lazy.force fontMonospaceMedium) 'M' in - let charH = 16 in - let t_text = - new scrolled_text ~editable:false - ~width:(charW * 80) ~height:(charH * 20) ~packing:t#vbox#add () - in - t_text#insert message; - ignore (t#event#connect#delete ~callback:(fun _ -> action t (); true)); - t#show (); - if modal then begin - grabFocus t; - Main.main (); - releaseFocus () - end - -(**********************************************************************) -(* Fatal error handling *) -(**********************************************************************) -let fatalError = - messageBox ~title:"Fatal Error" ~label:"Exit" ~modal:true - ~action:(fun t () -> exit 1) - - -(**********************************************************************) -(* Toplevel window *) -(**********************************************************************) -let createToplevelWindow () = - let toplevelWindow = GWindow.window ~wm_name:myName () in - let toplevelVBox = GPack.vbox ~packing:toplevelWindow#add () in - - (**********************************************************************) - (* Groups of same sensitivity *) - (**********************************************************************) - let grAction = ref [] in - let grDiff = ref [] in - let grProceed = ref [] in - let grRestart = ref [] in - let grAdd gr w = gr := w#misc::!gr in - let grSet gr st = List.iter (fun x -> x#set_sensitive st) !gr in - - (**********************************************************************) - (* Create the menu bar *) - (**********************************************************************) - let menuBar = - GMenu.menu_bar ~border_width:2 ~packing:toplevelVBox#pack () - in - let menus = new GMenu.factory ~accel_modi:[] menuBar in - let accel_group = menus#accel_group in - toplevelWindow#add_accel_group accel_group; - let add_submenu ?(modi=[]) ~label () = - new GMenu.factory ~accel_group ~accel_modi:modi (menus#add_submenu label) - in - - (**********************************************************************) - (* Create the menus *) - (**********************************************************************) - let fileMenu = add_submenu ~label:"Synchronization" () - and actionsMenu = add_submenu ~label:"Actions" () - and ignoreMenu = add_submenu ~modi:[`SHIFT] ~label:"Ignore" () - and helpMenu = add_submenu ~label:"Help" () in - - (**********************************************************************) - (* Create the main window *) - (**********************************************************************) - let mainWindow = - let sw = - GBin.scrolled_window ~packing:(toplevelVBox#add) - ~height:(Prefs.readPref mainWindowHeight * 12) - ~hpolicy:`AUTOMATIC ~vpolicy:`AUTOMATIC () - in - GList.clist - ~columns:5 ~titles_show:true ~selection_mode:`BROWSE ~packing:sw#add () - in - mainWindow#misc#grab_focus (); - (* FIX: roots2string should return a pair *) - let s = roots2string () in - Array.iteri - (fun i data -> - mainWindow#set_column - ~title_active:false ~auto_resize:true ~title:data i) - [| " " ^ String.sub s ~pos:0 ~len:12 ^ " "; " Action "; - " " ^ String.sub s ~pos:15 ~len:12 ^ " "; " Status "; " Path" |]; - let status_width = - let font = mainWindow#misc#style#font in - 4 + max (Gdk.Font.string_width font "working") - (Gdk.Font.string_width font "skipped") - in - mainWindow#set_column ~justification:`CENTER 1; - mainWindow#set_column - ~justification:`CENTER ~auto_resize:false ~width:status_width 3; - - (**********************************************************************) - (* Create the details window *) - (**********************************************************************) - - let charW = Gdk.Font.char_width (Lazy.force fontMonospaceMedium) 'M' in - let charH = if Sys.os_type = "Win32" then 20 else 16 in - - let detailsWindow = - let sw = - GBin.scrolled_window ~packing:(toplevelVBox#pack ~expand:false) - ~hpolicy:`AUTOMATIC ~vpolicy:`AUTOMATIC () - in - GEdit.text ~editable:false ~height:(3 * charH) ~width: (96 * charW) - ~line_wrap:false ~packing:sw#add () in - detailsWindow#misc#set_can_focus false; - let style = detailsWindow#misc#style#copy in - style#set_font (Lazy.force fontMonospaceMedium); - detailsWindow#misc#set_style style; - let updateButtons () = - match !current with - None -> - grSet grAction false; - grSet grDiff false - | Some row -> - let (activate1, activate2) = - match !theState.(row).whatHappened, !theState.(row).ri.replicas with - Some _, _ -> (false, false) - | None, Different((FILE,_, _),(FILE,_, _),_) -> (true, true) - | None, _ -> (true, false) - in - grSet grAction activate1; - grSet grDiff activate2 - in - - let makeRowVisible row = - if mainWindow#row_is_visible row <> `FULL then begin - let adj = mainWindow#vadjustment in - let current = adj#value - and upper = adj#upper and lower = adj#lower in - let v = - float row /. float (mainWindow#rows + 1) *. (upper-.lower) +. lower - in - adj#set_value (min v (upper -. adj#page_size)) - end - in - - let updateDetails () = - detailsWindow#freeze (); - detailsWindow#delete_text ~start:0 ~stop:detailsWindow#length; - begin match !current with - None -> - () - | Some row -> - makeRowVisible row; - let details = - match !theState.(row).whatHappened with - None -> details2string !theState.(row).ri " " - | Some(Succeeded(_)) -> details2string !theState.(row).ri " " - | Some(Failed(s)) -> s in - detailsWindow#insert (path2string !theState.(row).ri.path); - detailsWindow#insert "\n"; - detailsWindow#insert details - end; - (* Display text *) - detailsWindow#thaw (); - updateButtons () - in - - (**********************************************************************) - (* CREATE THE STATUS WINDOW *) - (**********************************************************************) - - let statusWindow = - GMisc.statusbar ~packing:toplevelVBox#pack () in - let statusContext = statusWindow#new_context ~name:"status" in - ignore (statusContext#push ""); - - let displayStatus s1 s2 = - Threads.do_on_main_thread (fun () -> - (* Concatenate the new message *) - let m = - s1 ^ (String.make (max 2 (30 - String.length s1)) ' ') ^ s2 in - statusContext#pop (); - ignore (statusContext#push m); - (* Force message to be displayed immediately *) - gtk_sync ()) - in - - (* Tell the Trace module about the status printer *) - Trace.statusPrinter := Some displayStatus; - - (**********************************************************************) - (* FUNCTIONS USED TO PRINT IN THE MAIN WINDOW *) - (**********************************************************************) - - let select i = - let r = mainWindow#rows in - let p = if r < 2 then 0. else (float i +. 0.5) /. float (r - 1) in - mainWindow#scroll_vertical `JUMP (min p 1.) - in - - ignore (mainWindow#connect#unselect_row ~callback: - (fun ~row ~column ~event -> current := None; updateDetails ())); - ignore (mainWindow#connect#select_row ~callback: - (fun ~row ~column ~event -> current := Some row; updateDetails ())); - - let nextInteresting () = - let l = Array.length !theState in - let start = match !current with Some i -> i + 1 | None -> 0 in - let rec loop i = - if i < l then - match !theState.(i).ri.replicas with - Different (_, _, dir) - when not (Prefs.readPref auto) || !dir = Conflict -> - select i - | _ -> - loop (i + 1) - in - loop start - in - let selectSomethingIfPossible () = - if !current=None then nextInteresting () - in - - let columnsOf i = - let oldPath = if i = 0 then emptypath else !theState.(i-1).ri.path in - let status = - match !theState.(i).whatHappened with - None -> " " - | Some conf -> - match !theState.(i).ri.replicas with - Different(_,_,{contents=Conflict}) | Problem _ -> - " " - | _ -> - match conf with - Succeeded _ -> "done " - | Failed _ -> "failed" - in - let s = reconItem2string oldPath !theState.(i).ri status in - (* FIX: This is ugly *) - (String.sub s ~pos:0 ~len:8, - String.sub s ~pos:9 ~len:5, - String.sub s ~pos:15 ~len:8, - String.sub s ~pos:25 ~len:6, - String.sub s ~pos:32 ~len:(String.length s - 32)) - in - - let rightArrow = - GDraw.pixmap_from_xpm_d ~window:toplevelWindow ~data:Pixmaps.copyAB () in - let leftArrow = - GDraw.pixmap_from_xpm_d ~window:toplevelWindow ~data:Pixmaps.copyBA () in - let rightArrowBlack = - GDraw.pixmap_from_xpm_d - ~window:toplevelWindow ~data:Pixmaps.copyABblack () in - let leftArrowBlack = - GDraw.pixmap_from_xpm_d - ~window:toplevelWindow ~data:Pixmaps.copyBAblack () in - let ignoreAct = - GDraw.pixmap_from_xpm_d ~window:toplevelWindow ~data:Pixmaps.ignore () in - let doneIcon = - GDraw.pixmap_from_xpm_d ~window:toplevelWindow ~data:Pixmaps.success () in - let failedIcon = - GDraw.pixmap_from_xpm_d ~window:toplevelWindow ~data:Pixmaps.failure () in - - let displayArrow i action = - match action with - "<-?->" -> mainWindow#set_cell ~pixmap:ignoreAct i 1 - | "---->" -> mainWindow#set_cell ~pixmap:rightArrow i 1 - | "<----" -> mainWindow#set_cell ~pixmap:leftArrow i 1 - | "error" -> mainWindow#set_cell ~pixmap:failedIcon i 1 - | _ -> assert false - in - - let displayStatusIcon i status = - match status with - | "failed" -> mainWindow#set_cell ~pixmap:failedIcon i 3 - | "done " -> mainWindow#set_cell ~pixmap:doneIcon i 3 - | _ -> mainWindow#set_cell ~text:status i 3 - in - - let displayMain() = - mainWindow#freeze (); - mainWindow#clear (); - for i = 0 to Array.length !theState - 1 do - let (r1, action, r2, status, path) = columnsOf i in - ignore (mainWindow#append [ r1; ""; r2; status; path ]); - displayArrow i action - done; - selectSomethingIfPossible (); - begin match !current with Some idx -> select idx | None -> () end; - mainWindow#thaw (); - updateDetails () - in - - let redisplay i = - let (r1, action, r2, status, path) = columnsOf i in - mainWindow#freeze (); - mainWindow#set_cell ~text:r1 i 0; - displayArrow i action; - mainWindow#set_cell ~text:r2 i 2; - displayStatusIcon i status; - mainWindow#set_cell ~text:path i 4; - if status = " failed " then mainWindow#set_row ~foreground:(`NAME"red") i; - mainWindow#thaw (); - if !current = Some i then updateDetails (); - updateButtons () - in - - let showProgress i bytes = - !theState.(i).bytesTransferred <- !theState.(i).bytesTransferred + bytes; - let b = !theState.(i).bytesTransferred in - let len = Common.riLength !theState.(i).ri in - let newstatus = - if b=0 || len = 0 then "working " - else if len = 0 then sprintf "%8d" b - else - let percentage = (int_of_float ((float b) *. 100.0 /. (float len))) in - if percentage > 100 then - debugprogress (fun() -> errmsg "Progress amount miscalculated for %s\n" - (path2string (!theState.(i).ri.path))); - sprintf " %3d%% " (max 100 percentage) in - Threads.do_on_main_thread (fun () -> - mainWindow#set_cell ~text:newstatus i 3; - gtk_sync ()) - in - - (* Install showProgress so that we get called back by low-level - file transfer stuff *) - Util.progressPrinter := Some(showProgress); - - (* Apply new ignore patterns to the current state, expecting that the - number of reconitems will grow smaller. Adjust the display, being - careful to keep the cursor as near as possible to its position - before the new ignore patterns take effect. *) - let ignoreAndRedisplay () = - let lst = Array.to_list !theState in - (* FIX: we should actually test whether any prefix is now ignored *) - let keep sI = not (Pred.test Globals.ignore (path2string sI.ri.path)) in - begin match !current with - None -> - theState := Array.of_list (Safelist.filter keep lst) - | Some index -> - let i = ref index in - let l = ref [] in - Array.iteri - (fun j sI -> if keep sI then l := sI::!l - else if j < !i then decr i) - !theState; - current := if !l = [] then None else Some !i; - theState := Array.of_list (Safelist.rev !l) - end; - displayMain(); - in - - (**********************************************************************) - (* FUNCTION DETECT UPDATES *) - (**********************************************************************) - - let detectUpdatesAndReconcile () = - grSet grAction false; - grSet grDiff false; - grSet grProceed false; - grSet grRestart false; - - let (r1,r2) = Globals.getReplicaRoots () in - let t = Trace.startTimer "Checking for updates" in - let findUpdates () = - let updates = Update.findUpdates () in - Trace.showTimer t; - updates - in - let reconcile updates = - let t = Trace.startTimer "Reconciling" in - Recon.reconcileAll updates - in - let reconItemList = reconcile (findUpdates ()) in - Trace.showTimer t; - if reconItemList = [] then - Trace.status "Everything is up to date" - else - Trace.status ("Check and/or adjust selected actions; " - ^ "then press Proceed"); - theState := - Array.of_list - (Safelist.map - (fun ri -> { ri = ri; bytesTransferred = 0; whatHappened = None }) - reconItemList); - current := None; - displayMain(); - grSet grProceed (Array.length !theState > 0); - grSet grRestart true - in - - (**********************************************************************) - (* The ignore dialog *) - (**********************************************************************) - - let ignoreDialog () = - let t = GWindow.dialog ~title: "Ignore" ~wm_name: "Ignore" () in - let hbox = GPack.hbox ~packing:t#vbox#add () in - let sb = GRange.scrollbar `VERTICAL - ~packing:(hbox#pack ~from:`END) () in - let regExpWindow = - GList.clist ~columns:1 ~titles_show:false ~packing:hbox#add - ~vadjustment:sb#adjustment ~width:400 ~height:150 () in - - (* Local copy of the regular expressions; the global copy will - not be changed until the Apply button is pressed *) - let theRegexps = Pred.extern Globals.ignore in - Safelist.iter (fun r -> ignore (regExpWindow#append [r])) theRegexps; - let maybeGettingBigger = ref false in - let maybeGettingSmaller = ref false in - let selectedRow = ref None in - ignore - (regExpWindow#connect#select_row ~callback: - (fun ~row ~column ~event -> selectedRow := Some row)); - ignore - (regExpWindow#connect#unselect_row ~callback: - (fun ~row ~column ~event -> selectedRow := None)); - - (* Configure the add frame *) - let hbox = GPack.hbox ~spacing:4 ~packing:t#vbox#pack () in - ignore (GMisc.label ~text: "Regular expression:" - ~packing:(hbox#pack ~padding:2) ()); - let entry = GEdit.entry ~packing:hbox#add () in - let add () = - let theRegExp = entry#text in - if theRegExp<>"" then begin - entry#set_text ""; - regExpWindow#unselect_all (); - ignore (regExpWindow#append [theRegExp]); - maybeGettingSmaller := true - end - in - let addButton = GButton.button ~label:"Add" - ~packing:hbox#pack () in - ignore (addButton#connect#clicked ~callback:add); - ignore (entry#connect#activate ~callback:add); - entry#misc#grab_focus (); - - (* Configure the delete button *) - let delete () = - match !selectedRow with - Some x -> - (* After a deletion, updates must be detected again *) - maybeGettingBigger := true; - (* Delete xth regexp *) - regExpWindow#unselect_all (); - regExpWindow#remove ~row:x - | None -> - () - in - let deleteButton = GButton.button ~label:"Delete" - ~packing:hbox#pack () in - ignore (deleteButton#connect#clicked ~callback:delete); - - ignore - (regExpWindow#event#connect#after#key_press ~callback: - begin fun ev -> - let key = GdkEvent.Key.keyval ev in - if key = _Up || key = _Down || key = _Prior || key = _Next || - key = _Page_Up || key = _Page_Down then begin - regExpWindow#select (regExpWindow#focus_row) 0; - true - end else if key = _Delete then begin - delete (); true - end else - false - end); - - (* A function to refresh the state and ignore list *) - let refresh () = - let theRegexps = ref [] in - for i = regExpWindow#rows - 1 downto 0 do - theRegexps := regExpWindow#cell_text i 0 :: !theRegexps - done; - Pred.intern Globals.ignore (!theRegexps); - if !maybeGettingBigger || !maybeGettingSmaller then begin - Globals.savePrefs(); - Globals.propagatePrefs() - end; - if !maybeGettingBigger then detectUpdatesAndReconcile () - else if !maybeGettingSmaller then ignoreAndRedisplay(); - maybeGettingBigger := false; - maybeGettingSmaller := false; - in - - (* Install the main buttons *) - let applyButton = - GButton.button ~label:"Apply" ~packing:t#action_area#add () in - ignore (applyButton#connect#clicked ~callback:refresh); - let cancelButton = - GButton.button ~label:"Cancel" ~packing:t#action_area#add () in - ignore (cancelButton#connect#clicked ~callback:(t#destroy)); - let okButton = - GButton.button ~label:"OK" ~packing:t#action_area#add () in - ignore - (okButton#connect#clicked - ~callback:(fun () -> refresh (); t#destroy ())); - ignore (t#connect#destroy ~callback:Main.quit); - grabFocus t; - t#show (); - Main.main (); - releaseFocus () - in - - (**********************************************************************) - (* Add entries to the Help menu *) - (**********************************************************************) - let addDocSection (shortname, (name, docstr)) = - if shortname <> "" && name <> "" then - ignore (helpMenu#add_item - ~callback:(fun () -> documentation shortname) - name) - in - Safelist.iter addDocSection Strings.docs; - - (**********************************************************************) - (* Add entries to the Ignore menu *) - (**********************************************************************) - let addRegExpByPath pathfunc = - match !current with - Some i -> - addIgnorePattern (pathfunc !theState.(i).ri.path); - ignoreAndRedisplay () - | None -> - () - in - grAdd grAction - (ignoreMenu#add_item ~key:_i - ~callback:(fun () -> getLock (fun () -> addRegExpByPath ignorePath)) - "Ignore this file permanently"); - grAdd grAction - (ignoreMenu#add_item ~key:_E - ~callback:(fun () -> getLock (fun () -> addRegExpByPath ignoreExt)) - "Ignore files with this extension"); - grAdd grAction - (ignoreMenu#add_item ~key:_N - ~callback:(fun () -> getLock (fun () -> addRegExpByPath ignoreName)) - "Ignore files with this name"); - -(* - grAdd grRestart - (ignoreMenu#add_item ~callback: - (fun () -> getLock ignoreDialog) "Edit ignore patterns"); -*) - - (**********************************************************************) - (* MAIN FUNCTION : SYNCHRONIZE *) - (**********************************************************************) - let synchronize () = - if Array.length !theState = 0 then - Trace.status "Nothing to synchronize" - else begin - grSet grAction false; - grSet grDiff false; - grSet grProceed false; - grSet grRestart false; - - Trace.status "Propagating changes"; - let t = Trace.startTimer "Propagating changes" in - let (start, wait) = Threads.thread_maker () in - let background = let i = 55000 in `RGB (i, i, i) in - let finish i = - redisplay i; - mainWindow#set_row ~background:`WHITE i; - gtk_sync () - in - for i = 0 to Array.length !theState - 1 do - let theSI = !theState.(i) in - assert (theSI.whatHappened = None); - start - (fun () -> - Threads.do_on_main_thread (fun () -> - mainWindow#set_row ~background i; - makeRowVisible i); - theSI.whatHappened <- Some (Transport.transportItem theSI.ri i); - i) - finish - done; - wait finish; - - Trace.showTimer t; - Trace.status "Updating synchronizer state"; - let t = Trace.startTimer "Updating synchronizer state" in - Update.commitUpdates(); - Trace.showTimer t; - Trace.status "Synchronization complete"; - - grSet grRestart true - end - in - - (**********************************************************************) - (* CREATE THE ACTION BAR *) - (**********************************************************************) - let actionBar = - GButton.toolbar - ~orientation:`HORIZONTAL ~tooltips:true ~space_size:10 - ~packing:toplevelVBox#pack () in - - (**********************************************************************) - (* CREATE AND CONFIGURE THE QUIT BUTTON *) - (**********************************************************************) - actionBar#insert_space (); - ignore (actionBar#insert_button ~text:"Quit" ~callback:safeExit ()); - - (**********************************************************************) - (* CREATE AND CONFIGURE THE PROCEED BUTTON *) - (**********************************************************************) - actionBar#insert_space (); - grAdd grProceed - (actionBar#insert_button ~text:"Proceed" - (* tooltip:"Proceed with displayed actions" *) - ~callback:(fun () -> - getLock synchronize) ()); - - (**********************************************************************) - (* CREATE AND CONFIGURE THE RESCAN BUTTON *) - (**********************************************************************) - let detectCmdName = "Restart" in - let detectCmd () = - getLock detectUpdatesAndReconcile; - if Prefs.readPref batch then begin - Prefs.setPref batch Prefs.TempSetting false; synchronize() - end - in - actionBar#insert_space (); - grAdd grRestart - (actionBar#insert_button ~text:detectCmdName ~callback:detectCmd ()); - - (**********************************************************************) - (* Buttons for <--, -->, Skip *) - (**********************************************************************) - let doAction f = - match !current with - Some i -> - let theSI = !theState.(i) in - begin match theSI.whatHappened, theSI.ri.replicas with - None, Different(_, _, dir) -> - f dir; - redisplay i; - nextInteresting () - | _ -> - () - end - | None -> - () - in - let leftAction _ = doAction (fun dir -> dir := Replica2ToReplica1) in - let rightAction _ = doAction (fun dir -> dir := Replica1ToReplica2) in - let questionAction _ = doAction (fun dir -> dir := Conflict) in - - (**********************************************************************) - (* CREATE AND CONFIGURE THE DIFF BUTTON and KEY *) - (**********************************************************************) - let diffCmd () = - match !current with - Some i -> - getLock (fun () -> - showDiffs !theState.(i).ri - (fun title text -> messageBox ~title text) - Trace.status i) - | None -> - () - in - - actionBar#insert_space (); - grAdd grAction - (actionBar#insert_button - ~icon:((GMisc.pixmap leftArrowBlack ())#coerce) - ~callback:leftAction ()); - actionBar#insert_space (); - grAdd grAction - (actionBar#insert_button - ~icon:((GMisc.pixmap rightArrowBlack ())#coerce) - ~callback:rightAction ()); - actionBar#insert_space (); - grAdd grAction - (actionBar#insert_button ~text:"Skip" ~callback:questionAction ()); - actionBar#insert_space (); - grAdd grDiff (actionBar#insert_button ~text:"Diff" ~callback:diffCmd ()); - - (**********************************************************************) - (* Configure keyboard commands *) - (**********************************************************************) - ignore - (mainWindow#event#connect#key_press ~callback: - begin fun ev -> - let key = GdkEvent.Key.keyval ev in - if key = _Left then begin - leftAction (); GtkSignal.stop_emit (); true - end else if key = _Right then begin - rightAction (); GtkSignal.stop_emit (); true - end else - false - end); - - (**********************************************************************) - (* Add entries to the Action menu *) - (**********************************************************************) - let (root1,root2) = Globals.getReplicaRoots () in - let loc1 = root2hostname root1 in - let loc2 = root2hostname root2 in - let descr = - if loc1 = loc2 then "left to right" else - Printf.sprintf "from %s to %s" loc1 loc2 - in - let left = - actionsMenu#add_item ~key:_greater ~callback:rightAction - ("Propagate " ^ descr) in - grAdd grAction left; - left#add_accelerator ~group:accel_group ~modi:[`SHIFT] _greater; - - let descl = - if loc1 = loc2 then "right to left" else - Printf.sprintf "from %s to %s" loc2 loc1 - in - let right = - actionsMenu#add_item ~key:_less ~callback:leftAction - ("Propagate " ^ descl) in - grAdd grAction right; - right#add_accelerator ~group:accel_group ~modi:[`SHIFT] _less; - - grAdd grAction - (actionsMenu#add_item ~key:_slash ~callback:questionAction - "Do not propagate changes"); - - ignore (actionsMenu#add_separator ()); - grAdd grDiff (actionsMenu#add_item ~key:_d ~callback:diffCmd "Show diffs"); - - (**********************************************************************) - (* Add commands to the Synchronization menu *) - (**********************************************************************) - grAdd grProceed - (fileMenu#add_item ~key:_g - ~callback:(fun () -> - getLock synchronize) - "Proceed"); - grAdd grRestart (fileMenu#add_item ~key:_r ~callback:detectCmd detectCmdName); - grAdd grRestart - (fileMenu#add_item ~key:_a - ~callback:(fun () -> - getLock detectUpdatesAndReconcile; - getLock synchronize) - "Atomically detect updates and proceed"); - ignore (fileMenu#add_separator ()); - let cm = - fileMenu#add_check_item ~active:(Prefs.readPref Transport.backups) - ~callback:(fun b -> Prefs.setPref Transport.backups Prefs.TempSetting b) - "Make backups" - in - cm#set_show_toggle true; - grAdd grRestart cm; - ignore (fileMenu#add_separator ()); - ignore (fileMenu#add_item ~key:_q ~callback:safeExit "Quit"); - - grSet grAction false; - grSet grDiff false; - grSet grProceed false; - grSet grRestart false; - - ignore (toplevelWindow#event#connect#delete ~callback: - (fun _ -> safeExit (); true)); - toplevelWindow#show (); - currentWindow := Some toplevelWindow; - detectCmd () - -(**********************************************************************) -(* Starting up... *) -(**********************************************************************) -let start _ = - begin try - (* Initialize the library *) - ignore (Main.init ()); - - Util.warnPrinter := Some (warnBox "Warning"); - (* Ask the Remote module to call us back at regular intervals during - long network operations. *) - Threads.tickProc := Some gtk_sync; - - (**********************************************************************) - (* Set things up to initialize the client/server connection and *) - (* detect updates after the ui is displayed. *) - (* This makes a difference when the replicas are large and it takes *) - (* a lot of time to detect updates. *) - (**********************************************************************) - let msg = ref None in - Uicommon.uiInit - profileSelect - rootSelect - (fun () -> - let w = - GWindow.window ~kind:`TOPLEVEL ~position:`CENTER - ~wm_name:"Unison" ~border_width:16 () in - ignore (GMisc.label ~text: "Contacting server..." - ~packing:(w#add) ()); - w#show (); - ignore (w#event#connect#delete ~callback:(fun _ -> exit 0)); - msg := Some w) - (fun () -> - begin match !msg with - None -> () - | Some w -> w#destroy () - end; - createToplevelWindow ()); - - (**********************************************************************) - (* Display the ui *) - (**********************************************************************) - ignore (Timeout.add 500 (fun _ -> true)); - (* Hack: this allows signals such as SIGINT to be - handled even when Gtk is waiting for events *) - Main.main () - with exn -> - fatalError (exn2string exn) - end - -end (* module Private *) - -(**********************************************************************) -(* MODULE MAIN *) -(**********************************************************************) - -module Body : Uicommon.UI = struct - -let start = function - Text -> Uitext.Body.start Text - | Graphic -> Private.start Graphic - -end (* module Body *) - -(* -FIX: -- Édition (minimale) et création des profiles -- Profile par défaut -- Sanity checks pour "Root selection" -- Edition du filtrage -*) diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/config.make.nt b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/config.make.nt deleted file mode 100644 index 3fe6b56ac..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/config.make.nt +++ /dev/null @@ -1,6 +0,0 @@ -LIBDIR=c:/Home/garrigue/ocaml/lib -GTKCFLAGS=-I../glib -I../gtk+ -GTKSRC=c:\Home\garrigue -GTKLIBS=$(GTKSRC)/glib/gmodule-1.3.lib $(GTKSRC)/glib/glib-1.3.lib $(GTKSRC)/gtk+/gdk/gdk-1.3.lib $(GTKSRC)/gtk+/gtk/gtk-1.3.lib -USE_GL=0 -USE_CC=0 diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/configure.mk b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/configure.mk deleted file mode 100644 index 49b3d7015..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/configure.mk +++ /dev/null @@ -1,50 +0,0 @@ -# makefile for configuring lablGTK - -# Default compilers -CAMLC = ocamlc -CAMLOPT = ocamlopt - -# Default installation directories -BINDIR = `$(GETBINDIR)` -INSTALLDIR = $(LIBDIR)/lablgtk - -# Autoconf -GETLIBDIR = ocamlc -v | grep "^Standard" | sed 's/^.*: *//' -LIBDIR = `$(GETLIBDIR)` -GETBINDIR = $(GETLIBDIR) | sed -e 's|/lib/[^/]*$$|/bin|' -e 's|/lib$$|/bin|' -GETRANLIB = which ranlib 2>/dev/null | sed -e 's|.*/ranlib$$|!|' -e 's/^[^!]*$$/:/' -e 's/!/ranlib/' - -ifdef USE_GNOME -GTKGETCFLAGS = gtk-config --cflags`" -I"`gnome-config --includedir -GNOMELIBS = `gnome-config --libs gtkxmhtml` -else -GTKGETCFLAGS = gtk-config --cflags -endif - -GTKGETLIBS = gtk-config --libs - -configure: .depend config.make - -.depend: - ocamldep *.ml *.mli > .depend - -config.make: - @echo CAMLC=$(CAMLC) > config.make - @echo CAMLOPT=$(CAMLOPT) >> config.make - @echo USE_GL=$(USE_GL) >> config.make - @echo USE_GNOME=$(USE_GNOME) >> config.make - @echo USE_CC=$(USE_CC) >> config.make - @echo DEBUG=$(DEBUG) >> config.make - @echo CC=$(CC) >> config.make - @echo RANLIB=`$(GETRANLIB)` >> config.make - @echo LIBDIR=$(LIBDIR) >> config.make - @echo BINDIR=`$(GETBINDIR)` >> config.make - @echo INSTALLDIR=$(INSTALLDIR) >> config.make - @echo GTKCFLAGS=`$(GTKGETCFLAGS)` >> config.make - @echo GTKLIBS=`$(GTKGETLIBS)` | \ - sed -e 's/-l/-cclib &/g' -e 's/-[LRWr][^ ]*/-ccopt &/g' \ - >> config.make - @echo GNOMELIBS=$(GNOMELIBS) | \ - sed -e 's/-l/-cclib &/g' -e 's/-[LRWr][^ ]*/-ccopt &/g' \ - >> config.make - cat config.make diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/doc/formula.eps b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/doc/formula.eps deleted file mode 100644 index 31ddafc6f..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/doc/formula.eps +++ /dev/null @@ -1,409 +0,0 @@ -%!PS-Adobe-2.0 EPSF-2.0 -%%Creator: dvipsk 5.78 p1.4c Copyright 1996-99 ASCII Corp.(www-ptex@ascii.co.jp) -%%dvipsk 5.78 Copyright 1998 Radical Eye Software (www.radicaleye.com) -%%Title: formula.dvi -%%BoundingBox: 71 318 395 524 -%%DocumentFonts: Symbol Times-Italic Times-Roman Helvetica -%%EndComments -%DVIPSCommandLine: dvips -E -o formula.eps formula -%DVIPSParameters: dpi=300, compressed -%DVIPSSource: TeX output 1999.08.19:0906 -%%BeginProcSet: texc.pro -%! -/TeXDict 300 dict def TeXDict begin /N{def}def /B{bind def}N /S{exch}N -/X{S N}B /TR{translate}N /isls false N /vsize 11 72 mul N /hsize 8.5 72 -mul N /landplus90{false}def /@rigin{isls{[0 landplus90{1 -1}{-1 1} -ifelse 0 0 0]concat}if 72 Resolution div 72 VResolution div neg scale -isls{landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div -hsize mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul -TR[matrix currentmatrix{dup dup round sub abs 0.00001 lt{round}if} -forall round exch round exch]setmatrix}N /@landscape{/isls true N}B -/@manualfeed{statusdict /manualfeed true put}B /@copies{/#copies X}B -/FMat[1 0 0 -1 0 0]N /FBB[0 0 0 0]N /nn 0 N /IE 0 N /ctr 0 N /df-tail{ -/nn 8 dict N nn begin /FontType 3 N /FontMatrix fntrx N /FontBBox FBB N -string /base X array /BitMaps X /BuildChar{CharBuilder}N /Encoding IE N -end dup{/foo setfont}2 array copy cvx N load 0 nn put /ctr 0 N[}B /df{ -/sf 1 N /fntrx FMat N df-tail}B /dfs{div /sf X /fntrx[sf 0 0 sf neg 0 0] -N df-tail}B /E{pop nn dup definefont setfont}B /ch-width{ch-data dup -length 5 sub get}B /ch-height{ch-data dup length 4 sub get}B /ch-xoff{ -128 ch-data dup length 3 sub get sub}B /ch-yoff{ch-data dup length 2 sub -get 127 sub}B /ch-dx{ch-data dup length 1 sub get}B /ch-image{ch-data -dup type /stringtype ne{ctr get /ctr ctr 1 add N}if}B /id 0 N /rw 0 N -/rc 0 N /gp 0 N /cp 0 N /G 0 N /sf 0 N /CharBuilder{save 3 1 roll S dup -/base get 2 index get S /BitMaps get S get /ch-data X pop /ctr 0 N ch-dx -0 ch-xoff ch-yoff ch-height sub ch-xoff ch-width add ch-yoff -setcachedevice ch-width ch-height true[1 0 0 -1 -.1 ch-xoff sub ch-yoff -.1 sub]/id ch-image N /rw ch-width 7 add 8 idiv string N /rc 0 N /gp 0 N -/cp 0 N{rc 0 ne{rc 1 sub /rc X rw}{G}ifelse}imagemask restore}B /G{{id -gp get /gp gp 1 add N dup 18 mod S 18 idiv pl S get exec}loop}B /adv{cp -add /cp X}B /chg{rw cp id gp 4 index getinterval putinterval dup gp add -/gp X adv}B /nd{/cp 0 N rw exit}B /lsh{rw cp 2 copy get dup 0 eq{pop 1}{ -dup 255 eq{pop 254}{dup dup add 255 and S 1 and or}ifelse}ifelse put 1 -adv}B /rsh{rw cp 2 copy get dup 0 eq{pop 128}{dup 255 eq{pop 127}{dup 2 -idiv S 128 and or}ifelse}ifelse put 1 adv}B /clr{rw cp 2 index string -putinterval adv}B /set{rw cp fillstr 0 4 index getinterval putinterval -adv}B /fillstr 18 string 0 1 17{2 copy 255 put pop}for N /pl[{adv 1 chg} -{adv 1 chg nd}{1 add chg}{1 add chg nd}{adv lsh}{adv lsh nd}{adv rsh}{ -adv rsh nd}{1 add adv}{/rc X nd}{1 add set}{1 add clr}{adv 2 chg}{adv 2 -chg nd}{pop nd}]dup{bind pop}forall N /D{/cc X dup type /stringtype ne{] -}if nn /base get cc ctr put nn /BitMaps get S ctr S sf 1 ne{dup dup -length 1 sub dup 2 index S get sf div put}if put /ctr ctr 1 add N}B /I{ -cc 1 add D}B /bop{userdict /bop-hook known{bop-hook}if /SI save N @rigin -0 0 moveto /V matrix currentmatrix dup 1 get dup mul exch 0 get dup mul -add .99 lt{/QV}{/RV}ifelse load def pop pop}N /eop{SI restore userdict -/eop-hook known{eop-hook}if showpage}N /@start{userdict /start-hook -known{start-hook}if pop /VResolution X /Resolution X 1000 div /DVImag X -/IE 256 array N 2 string 0 1 255{IE S dup 360 add 36 4 index cvrs cvn -put}for pop 65781.76 div /vsize X 65781.76 div /hsize X}N /dir 0 def -/dyy{/dir 0 def}B /dyt{/dir 1 def}B /dty{/dir 2 def}B /dtt{/dir 3 def}B -/p{dir 2 eq{-90 rotate show 90 rotate}{dir 3 eq{-90 rotate show 90 -rotate}{show}ifelse}ifelse}B /RMat[1 0 0 -1 0 0]N /BDot 260 string N -/rulex 0 N /ruley 0 N /v{/ruley X /rulex X V}B /V{}B /RV statusdict -begin /product where{pop false[(Display)(NeXT)(LaserWriter 16/600)]{dup -length product length le{dup length product exch 0 exch getinterval eq{ -pop true exit}if}{pop}ifelse}forall}{false}ifelse end{{gsave TR -.1 .1 -TR 1 1 scale rulex ruley false RMat{BDot}imagemask grestore}}{{gsave TR --.1 .1 TR rulex ruley scale 1 1 false RMat{BDot}imagemask grestore}} -ifelse B /QV{gsave newpath transform round exch round exch itransform -moveto rulex 0 rlineto 0 ruley neg rlineto rulex neg 0 rlineto fill -grestore}B /a{moveto}B /delta 0 N /tail{dup /delta X 0 rmoveto}B /M{S p -delta add tail}B /b{S p tail}B /c{-4 M}B /d{-3 M}B /e{-2 M}B /f{-1 M}B -/g{0 M}B /h{1 M}B /i{2 M}B /j{3 M}B /k{4 M}B /w{0 rmoveto}B /l{p -4 w}B -/m{p -3 w}B /n{p -2 w}B /o{p -1 w}B /q{p 1 w}B /r{p 2 w}B /s{p 3 w}B /t{ -p 4 w}B /x{0 S rmoveto}B /y{3 2 roll p a}B /bos{/SS save N}B /eos{SS -restore}B end - -%%EndProcSet -%%BeginProcSet: 8r.enc -% @@psencodingfile@{ -% author = "S. Rahtz, P. MacKay, Alan Jeffrey, B. Horn, K. Berry", -% version = "0.6", -% date = "22 June 1996", -% filename = "8r.enc", -% email = "kb@@mail.tug.org", -% address = "135 Center Hill Rd. // Plymouth, MA 02360", -% codetable = "ISO/ASCII", -% checksum = "119 662 4424", -% docstring = "Encoding for TrueType or Type 1 fonts to be used with TeX." -% @} -% -% Idea is to have all the characters normally included in Type 1 fonts -% available for typesetting. This is effectively the characters in Adobe -% Standard Encoding + ISO Latin 1 + extra characters from Lucida. -% -% Character code assignments were made as follows: -% -% (1) the Windows ANSI characters are almost all in their Windows ANSI -% positions, because some Windows users cannot easily reencode the -% fonts, and it makes no difference on other systems. The only Windows -% ANSI characters not available are those that make no sense for -% typesetting -- rubout (127 decimal), nobreakspace (160), softhyphen -% (173). quotesingle and grave are moved just because it's such an -% irritation not having them in TeX positions. -% -% (2) Remaining characters are assigned arbitrarily to the lower part -% of the range, avoiding 0, 10 and 13 in case we meet dumb software. -% -% (3) Y&Y Lucida Bright includes some extra text characters; in the -% hopes that other PostScript fonts, perhaps created for public -% consumption, will include them, they are included starting at 0x12. -% -% (4) Remaining positions left undefined are for use in (hopefully) -% upward-compatible revisions, if someday more characters are generally -% available. -% -% (5) hyphen appears twice for compatibility with both ASCII and Windows. -% -/TeXBase1Encoding [ -% 0x00 (encoded characters from Adobe Standard not in Windows 3.1) - /.notdef /dotaccent /fi /fl - /fraction /hungarumlaut /Lslash /lslash - /ogonek /ring /.notdef - /breve /minus /.notdef -% These are the only two remaining unencoded characters, so may as -% well include them. - /Zcaron /zcaron -% 0x10 - /caron /dotlessi -% (unusual TeX characters available in, e.g., Lucida Bright) - /dotlessj /ff /ffi /ffl - /.notdef /.notdef /.notdef /.notdef - /.notdef /.notdef /.notdef /.notdef - % very contentious; it's so painful not having quoteleft and quoteright - % at 96 and 145 that we move the things normally found there down to here. - /grave /quotesingle -% 0x20 (ASCII begins) - /space /exclam /quotedbl /numbersign - /dollar /percent /ampersand /quoteright - /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash -% 0x30 - /zero /one /two /three /four /five /six /seven - /eight /nine /colon /semicolon /less /equal /greater /question -% 0x40 - /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O -% 0x50 - /P /Q /R /S /T /U /V /W - /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore -% 0x60 - /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o -% 0x70 - /p /q /r /s /t /u /v /w - /x /y /z /braceleft /bar /braceright /asciitilde - /.notdef % rubout; ASCII ends -% 0x80 - /.notdef /.notdef /quotesinglbase /florin - /quotedblbase /ellipsis /dagger /daggerdbl - /circumflex /perthousand /Scaron /guilsinglleft - /OE /.notdef /.notdef /.notdef -% 0x90 - /.notdef /.notdef /.notdef /quotedblleft - /quotedblright /bullet /endash /emdash - /tilde /trademark /scaron /guilsinglright - /oe /.notdef /.notdef /Ydieresis -% 0xA0 - /.notdef % nobreakspace - /exclamdown /cent /sterling - /currency /yen /brokenbar /section - /dieresis /copyright /ordfeminine /guillemotleft - /logicalnot - /hyphen % Y&Y (also at 45); Windows' softhyphen - /registered - /macron -% 0xD0 - /degree /plusminus /twosuperior /threesuperior - /acute /mu /paragraph /periodcentered - /cedilla /onesuperior /ordmasculine /guillemotright - /onequarter /onehalf /threequarters /questiondown -% 0xC0 - /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla - /Egrave /Eacute /Ecircumflex /Edieresis - /Igrave /Iacute /Icircumflex /Idieresis -% 0xD0 - /Eth /Ntilde /Ograve /Oacute - /Ocircumflex /Otilde /Odieresis /multiply - /Oslash /Ugrave /Uacute /Ucircumflex - /Udieresis /Yacute /Thorn /germandbls -% 0xE0 - /agrave /aacute /acircumflex /atilde - /adieresis /aring /ae /ccedilla - /egrave /eacute /ecircumflex /edieresis - /igrave /iacute /icircumflex /idieresis -% 0xF0 - /eth /ntilde /ograve /oacute - /ocircumflex /otilde /odieresis /divide - /oslash /ugrave /uacute /ucircumflex - /udieresis /yacute /thorn /ydieresis -] def - -%%EndProcSet -%%BeginProcSet: texps.pro -%! -TeXDict begin /rf{findfont dup length 1 add dict begin{1 index /FID ne 2 -index /UniqueID ne and{def}{pop pop}ifelse}forall[1 index 0 6 -1 roll -exec 0 exch 5 -1 roll VResolution Resolution div mul neg 0 0]/Metrics -exch def dict begin 0 1 255{exch dup type /integertype ne{pop pop 1 sub -dup 0 le{pop}{[}ifelse}{FontMatrix 0 get div Metrics 0 get div def} -ifelse}for Metrics /Metrics currentdict end def[2 index currentdict end -definefont 3 -1 roll makefont /setfont cvx]cvx def}def /ObliqueSlant{ -dup sin S cos div neg}B /SlantFont{4 index mul add}def /ExtendFont{3 -1 -roll mul exch}def /ReEncodeFont{/Encoding exch def}def end - -%%EndProcSet -%%BeginProcSet: special.pro -%! -TeXDict begin /SDict 200 dict N SDict begin /@SpecialDefaults{/hs 612 N -/vs 792 N /ho 0 N /vo 0 N /hsc 1 N /vsc 1 N /ang 0 N /CLIP 0 N /rwiSeen -false N /rhiSeen false N /letter{}N /note{}N /a4{}N /legal{}N}B -/@scaleunit 100 N /@hscale{@scaleunit div /hsc X}B /@vscale{@scaleunit -div /vsc X}B /@hsize{/hs X /CLIP 1 N}B /@vsize{/vs X /CLIP 1 N}B /@clip{ -/CLIP 2 N}B /@hoffset{/ho X}B /@voffset{/vo X}B /@angle{/ang X}B /@rwi{ -10 div /rwi X /rwiSeen true N}B /@rhi{10 div /rhi X /rhiSeen true N}B -/@llx{/llx X}B /@lly{/lly X}B /@urx{/urx X}B /@ury{/ury X}B /magscale -true def end /@MacSetUp{userdict /md known{userdict /md get type -/dicttype eq{userdict begin md length 10 add md maxlength ge{/md md dup -length 20 add dict copy def}if end md begin /letter{}N /note{}N /legal{} -N /od{txpose 1 0 mtx defaultmatrix dtransform S atan/pa X newpath -clippath mark{transform{itransform moveto}}{transform{itransform lineto} -}{6 -2 roll transform 6 -2 roll transform 6 -2 roll transform{ -itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll curveto}}{{ -closepath}}pathforall newpath counttomark array astore /gc xdf pop ct 39 -0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack}if}N -/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1 -1 -scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3 get -ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip yflip -not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub neg 0 -TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{noflips{TR -pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop 90 rotate 1 --1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg -TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr 1 get neg -sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr 2 get ppr -0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4 -1 roll add -2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S TR}if}N /cp -{pop pop showpage pm restore}N end}if}if}N /normalscale{Resolution 72 -div VResolution 72 div neg scale magscale{DVImag dup scale}if 0 setgray} -N /psfts{S 65781.76 div N}N /startTexFig{/psf$SavedState save N userdict -maxlength dict begin /magscale true def normalscale currentpoint TR -/psf$ury psfts /psf$urx psfts /psf$lly psfts /psf$llx psfts /psf$y psfts -/psf$x psfts currentpoint /psf$cy X /psf$cx X /psf$sx psf$x psf$urx -psf$llx sub div N /psf$sy psf$y psf$ury psf$lly sub div N psf$sx psf$sy -scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub TR -/showpage{}N /erasepage{}N /copypage{}N /p 3 def @MacSetUp}N /doclip{ -psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2 -roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath -moveto}N /endTexFig{end psf$SavedState restore}N /@beginspecial{SDict -begin /SpecialSave save N gsave normalscale currentpoint TR -@SpecialDefaults count /ocount X /dcount countdictstack N}N /@setspecial -{CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto -closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx -sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR -}{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse -CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury -lineto closepath clip}if /showpage{}N /erasepage{}N /copypage{}N newpath -}N /@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{ -end}repeat grestore SpecialSave restore end}N /@defspecial{SDict begin} -N /@fedspecial{end}B /li{lineto}B /rl{rlineto}B /rc{rcurveto}B /np{ -/SaveX currentpoint /SaveY X N 1 setlinecap newpath}N /st{stroke SaveX -SaveY moveto}N /fil{fill SaveX SaveY moveto}N /ellipse{/endangle X -/startangle X /yrad X /xrad X /savematrix matrix currentmatrix N TR xrad -yrad scale 0 0 1 startangle endangle arc savematrix setmatrix}N end - -%%EndProcSet -%%BeginProcSet: color.pro -%! -TeXDict begin /setcmykcolor where{pop}{/setcmykcolor{dup 10 eq{pop -setrgbcolor}{1 sub 4 1 roll 3{3 index add neg dup 0 lt{pop 0}if 3 1 roll -}repeat setrgbcolor pop}ifelse}B}ifelse /TeXcolorcmyk{setcmykcolor}def -/TeXcolorrgb{setrgbcolor}def /TeXcolorgrey{setgray}def /TeXcolorgray{ -setgray}def /TeXcolorhsb{sethsbcolor}def /currentcmykcolor where{pop}{ -/currentcmykcolor{currentrgbcolor 10}B}ifelse /DC{exch dup userdict exch -known{pop pop}{X}ifelse}B /GreenYellow{0.15 0 0.69 0 setcmykcolor}DC -/Yellow{0 0 1 0 setcmykcolor}DC /Goldenrod{0 0.10 0.84 0 setcmykcolor} -DC /Dandelion{0 0.29 0.84 0 setcmykcolor}DC /Apricot{0 0.32 0.52 0 -setcmykcolor}DC /Peach{0 0.50 0.70 0 setcmykcolor}DC /Melon{0 0.46 0.50 -0 setcmykcolor}DC /YellowOrange{0 0.42 1 0 setcmykcolor}DC /Orange{0 -0.61 0.87 0 setcmykcolor}DC /BurntOrange{0 0.51 1 0 setcmykcolor}DC -/Bittersweet{0 0.75 1 0.24 setcmykcolor}DC /RedOrange{0 0.77 0.87 0 -setcmykcolor}DC /Mahogany{0 0.85 0.87 0.35 setcmykcolor}DC /Maroon{0 -0.87 0.68 0.32 setcmykcolor}DC /BrickRed{0 0.89 0.94 0.28 setcmykcolor} -DC /Red{0 1 1 0 setcmykcolor}DC /OrangeRed{0 1 0.50 0 setcmykcolor}DC -/RubineRed{0 1 0.13 0 setcmykcolor}DC /WildStrawberry{0 0.96 0.39 0 -setcmykcolor}DC /Salmon{0 0.53 0.38 0 setcmykcolor}DC /CarnationPink{0 -0.63 0 0 setcmykcolor}DC /Magenta{0 1 0 0 setcmykcolor}DC /VioletRed{0 -0.81 0 0 setcmykcolor}DC /Rhodamine{0 0.82 0 0 setcmykcolor}DC /Mulberry -{0.34 0.90 0 0.02 setcmykcolor}DC /RedViolet{0.07 0.90 0 0.34 -setcmykcolor}DC /Fuchsia{0.47 0.91 0 0.08 setcmykcolor}DC /Lavender{0 -0.48 0 0 setcmykcolor}DC /Thistle{0.12 0.59 0 0 setcmykcolor}DC /Orchid{ -0.32 0.64 0 0 setcmykcolor}DC /DarkOrchid{0.40 0.80 0.20 0 setcmykcolor} -DC /Purple{0.45 0.86 0 0 setcmykcolor}DC /Plum{0.50 1 0 0 setcmykcolor} -DC /Violet{0.79 0.88 0 0 setcmykcolor}DC /RoyalPurple{0.75 0.90 0 0 -setcmykcolor}DC /BlueViolet{0.86 0.91 0 0.04 setcmykcolor}DC /Periwinkle -{0.57 0.55 0 0 setcmykcolor}DC /CadetBlue{0.62 0.57 0.23 0 setcmykcolor} -DC /CornflowerBlue{0.65 0.13 0 0 setcmykcolor}DC /MidnightBlue{0.98 0.13 -0 0.43 setcmykcolor}DC /NavyBlue{0.94 0.54 0 0 setcmykcolor}DC -/RoyalBlue{1 0.50 0 0 setcmykcolor}DC /Blue{1 1 0 0 setcmykcolor}DC -/Cerulean{0.94 0.11 0 0 setcmykcolor}DC /Cyan{1 0 0 0 setcmykcolor}DC -/ProcessBlue{0.96 0 0 0 setcmykcolor}DC /SkyBlue{0.62 0 0.12 0 -setcmykcolor}DC /Turquoise{0.85 0 0.20 0 setcmykcolor}DC /TealBlue{0.86 -0 0.34 0.02 setcmykcolor}DC /Aquamarine{0.82 0 0.30 0 setcmykcolor}DC -/BlueGreen{0.85 0 0.33 0 setcmykcolor}DC /Emerald{1 0 0.50 0 -setcmykcolor}DC /JungleGreen{0.99 0 0.52 0 setcmykcolor}DC /SeaGreen{ -0.69 0 0.50 0 setcmykcolor}DC /Green{1 0 1 0 setcmykcolor}DC -/ForestGreen{0.91 0 0.88 0.12 setcmykcolor}DC /PineGreen{0.92 0 0.59 -0.25 setcmykcolor}DC /LimeGreen{0.50 0 1 0 setcmykcolor}DC /YellowGreen{ -0.44 0 0.74 0 setcmykcolor}DC /SpringGreen{0.26 0 0.76 0 setcmykcolor} -DC /OliveGreen{0.64 0 0.95 0.40 setcmykcolor}DC /RawSienna{0 0.72 1 0.45 -setcmykcolor}DC /Sepia{0 0.83 1 0.70 setcmykcolor}DC /Brown{0 0.81 1 -0.60 setcmykcolor}DC /Tan{0.14 0.42 0.56 0 setcmykcolor}DC /Gray{0 0 0 -0.50 setcmykcolor}DC /Black{0 0 0 1 setcmykcolor}DC /White{0 0 0 0 -setcmykcolor}DC end - -%%EndProcSet -TeXDict begin 40258437 52099154 1000 300 300 (formula.dvi) -@start /Fa 134[ 41 5[ 41 3[ 46 46 1[ 18 6[ 46 15[ 60 -4[ 55 14[ 55 23[ 28 28 40[{ TeXBase1Encoding ReEncodeFont } 11 -82.6359 /Helvetica rf /Fb 205[ 34 34 49[{ - TeXBase1Encoding ReEncodeFont } 2 68.8667 /Times-Roman -rf /Fc 154[ 30 101[{ } 1 68.8667 /Symbol rf -%DVIPSBitmapFont: Fd cmr10 19.907 4 -/Fd 4 94 df<146014E0EB01C0EB0380EB0700130E5B133C13385B13F05B1201485AA248 -5AA348C7FCA25A121EA2123EA2123CA2127CA5127812F8B01278127CA5123CA2123EA212 -1EA2121F7EA26C7EA36C7EA26C7E12007F13707F133C131C7F7FEB0380EB01C0EB00E014 -60135278BD20> 40 D<7E7E7E12707E7E7E120F7E6C7E7F12017F6C7EA21378A37FA213 -3E131EA2131FA27FA21480A5130714C0B01480130FA51400A25BA2131EA2133E133CA25B -A35BA2485A5B12035B48C7FC5A120E5A5A5A5A5A5A12527BBD20> I 91 D 93 D E -%EndDVIPSBitmapFont -/Fe 197[ 23 58[{ TeXBase1Encoding ReEncodeFont } 1 82.6359 -/Times-Roman rf -%DVIPSBitmapFont: Ff cmsy10 19.907 4 -/Ff 4 106 df<0060161800F0163CA26C167C00781678007C16F8003C16F0A2003E1501 -001E16E0A2001F15036C16C06D140700071680A26D140F000316006D5C6CB612FEA36C5D -01F8C7127C01781478A2017C14F8013C5CA2013E1301011E5C011F13036D5CA2EC800701 -075CECC00F010391C7FCA26E5A0101131EECF03E0100133CA2ECF87CEC7878A2EC7CF8EC -3CF0143F6E5AA36E5AA26E5AA26EC8FC2E3A80B82F> 56 D<126012F0B3A7B8FC1780A3 -00F0CAFCB3A8126029397CB832> 96 D<14C0EB01E0A2130314C013071480A2130F1400 -A25B131E133E133CA2137C137813F85BA212015BA212035B12075BA2120F90C7FC5A121E -A2123E123CA2127C127812F85AA27E1278127C123CA2123E121EA2121F7E7F1207A27F12 -037F1201A27F1200A27F1378137C133CA2133E131E131F7FA214801307A214C0130314E0 -1301A2EB00C0135278BD20> 104 D<126012F0A27E1278127C123CA2123E121EA2121F7E -7F1207A27F12037F1201A27F1200A27F1378137C133CA2133E131E131F7FA214801307A2 -14C0130314E01301A2130314C013071480A2130F1400A25B131E133E133CA2137C137813 -F85BA212015BA212035B12075BA2120F90C7FC5A121EA2123E123CA2127C127812F85AA2 -126013527CBD20> I E -%EndDVIPSBitmapFont -%DVIPSBitmapFont: Fg cmmi10 19.907 1 -/Fg 1 59 df<121C123E127FEAFF80A3EA7F00123E121C0909798817> 58 -D E -%EndDVIPSBitmapFont -/Fh 158[ 41 31[ 50 65[{ TeXBase1Encoding ReEncodeFont } 2 -82.6359 /Times-Italic rf /Fi 139[ 36 50 13[ 36 101[{ } 3 -82.6359 /Symbol rf end -%%EndProlog -%%BeginSetup -%%Feature: *Resolution 300dpi -TeXDict begin - -%%EndSetup -0 0 bop Black Black 0 0.7 0 TeXcolorrgb Fh 567 883 a(A) p -Ff 636 883 a(`) p Fh 705 883 a(a) p Fe 765 883 a(:) p -0 0 1 TeXcolorrgb Fi 806 883 a(t) p Fb 842 900 a(1) p -0 0.7 0 TeXcolorrgb Fd 948 883 a(\() p 0 0 1 TeXcolorrgb -Fi(t) p Fb 1016 900 a(1) p 0 0.7 0 TeXcolorrgb Fe 1071 -883 a(:) p 0 0 1 TeXcolorrgb Fi 1112 883 a(t) p 0 0.7 0 -TeXcolorrgb Fe 1167 883 a(:) p 0 0 1 TeXcolorrgb Fi 1208 -883 a(t) p Fb 1244 900 a(2) p 0 0.7 0 TeXcolorrgb Fd -1281 883 a(\)) p 567 920 746 4 v Fh 704 995 a(A) p Ff -773 995 a(`) p Fd 842 995 a(\() p Fh(a) p Fe 934 995 -a(:) p 0 0 1 TeXcolorrgb Fi 975 995 a(t) p 0 0.7 0 TeXcolorrgb -Fd(\)) p Fe 1062 995 a(:) p 0 0 1 TeXcolorrgb Fi 1103 -995 a(t) p Fb 1139 1012 a(2) p 0 0.7 0 TeXcolorrgb Black -Fa 2 939 a(\(Ann\)) p 0 0.7 0 TeXcolorrgb Black 0 0.7 0 -TeXcolorrgb Fh 540 1208 a(A) p Ff 609 1208 a(`) p Fh -678 1208 a(a) p Fe 738 1208 a(:) p 0 0 1 TeXcolorrgb -Fi 779 1208 a(s) p Fb 829 1225 a(1) p 0 0.7 0 TeXcolorrgb -Fd 934 1208 a(\() p 0 0 1 TeXcolorrgb Fi(s) p Fb 1016 -1225 a(1) p 0 0.7 0 TeXcolorrgb Fe 1071 1208 a(:) p 0 0 1 -TeXcolorrgb Fi 1112 1208 a(s) p 0 0.7 0 TeXcolorrgb Fe -1180 1208 a(:) p 0 0 1 TeXcolorrgb Fi 1222 1208 a(s) p -Fb 1272 1225 a(2) p 0 0.7 0 TeXcolorrgb Fd 1308 1208 -a(\)) p 540 1245 801 4 v Fh 661 1321 a(A) p Ff 730 1321 -a(`) p Fd 799 1321 a([) p Fh(a) p Fe 881 1321 a(:) p -0 0 1 TeXcolorrgb Fi 923 1321 a(s) p 0 0.7 0 TeXcolorrgb -Fd 972 1321 a(]) p Fe 1014 1321 a(:) p 0 0 1 TeXcolorrgb -Fd 1055 1321 a([) p Fi(s) p Fb 1128 1338 a(2) p Fd 1164 -1321 a(]) p Fc 1187 1297 a(e) p 0 0.7 0 TeXcolorrgb Black -Fa 2 1264 a(\(P) l(oly\)) p 0 0.7 0 TeXcolorrgb Black -0 0.7 0 TeXcolorrgb Fh 704 1537 a(A) p Ff 773 1537 a(`) p -Fh 842 1537 a(a) p Fe 902 1537 a(:) p 0 0 1 TeXcolorrgb -Ff 943 1537 a(8) p Fi(e) p Fg(:) p Fd([) p Fi(s) p Fd(]) p -Fc 1145 1507 a(e) p 0 0.7 0 TeXcolorrgb 704 1573 472 -4 v Fh 764 1649 a(A) p Ff 833 1649 a(`) p 902 1649 a(h) p -Fh(a) p Ff(i) p Fe 1025 1649 a(:) p 0 0 1 TeXcolorrgb -Fi 1067 1649 a(s) p 0 0.7 0 TeXcolorrgb Black Fa 2 1592 -a(\(Use\)) p 0 0.7 0 TeXcolorrgb Black Black Black 90 rotate -dyy eop -%%Trailer -end -userdict /end-hook known{end-hook}if -%%EOF diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/doc/lablgtk.mgp b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/doc/lablgtk.mgp deleted file mode 100644 index 3eac79341..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/doc/lablgtk.mgp +++ /dev/null @@ -1,558 +0,0 @@ -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%deffont "code" xfont "itc avant garde gothic-demi-r", tfont "verdana.ttf" -%deffont "code-bold" xfont "terminal-bold-r", tfont "verdanab.ttf" -%deffont "sans" xfont "helvetica-medium-r", tfont "comic.ttf" -%deffont "sans-bold" xfont "helvetica-bold-r", tfont "comicbd.ttf" -%deffont "sansit" xfont "helvetica-medium-i", tfont "marlett.ttf" -%deffont "title" xfont "times-medium-r", tfont "times.ttf" -%deffont "title-bold" xfont "times-bold-r", tfont "timesbd.ttf" -%default 1 right, size 2, fore "white", bgrad -%default 1 vfont "goth", font "sans-bold", vgap 100 -%default 2 leftfill, size 8, vgap 60, prefix " ", font "sans" -%default 3 size 4, bar "beige", vgap 10 -%default 4 size 5, fore "white", vgap 20, prefix " " -%tab 1 size 5, vgap 40, prefix " ", icon box "green" 50 -%tab 2 size 5, vgap 40, prefix " ", icon arc "yellow" 50 -%tab 3 size 5, vgap 40, prefix " ", icon arc "white" 40 -%tab com1 size 4, prefix " " -%tab com2 size 4, prefix " " -%tab com3 size 4, prefix " " -%tab txt font "sans", size 5, fore "white", prefix " " -%tab vspace size 2 -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%page -%nodefault -%size 9, font "title-bold" -%fore "beige", back "navyblue", vgap 20 -%center - - -A Type System in Action: - -the LablGTK Interface - - -%size 7, font "title" -Jacques Garrigue -Kyoto University -%size 6, font "code" -garrigue@kurims.kyoto-u.ac.jp - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%page -2 -Synopsis - - Objective Label introduction -%size 2 - - Why GTK+? - GTK+/LablGTK structure -%size 2 - - Low Level - Type encoding with variants - Labeled parameters -%size 2 - - High Level - Object-orientation - Optional arguments - Polymorphic methods -%size 2 - - Conclusion - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%page -3 -Objective Label - - Based on Objective Caml - ML syntax and type inference - Class-based object system - - Several extensions - Labeled and optional parameters - Polymorphic variants - Polymorphic methods - - Tools - Type-based browser - GUI and 3D graphics - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%page -4 -Labels and optionals - -%font "code", size 4, prefix " ", fore "yellow" -let rec map fun:f = function - [] -> [] - | x :: l -> f x :: map fun:f l -%fore "lightpink" -val map : fun:('a -> 'b) -> 'a list -> 'b list - -%pause, fore "yellow", font "code" -let f = map [1;2;3] -%fore "lightpink" -val f : fun:(int -> 'a) -> 'a list -%fore "yellow" -f fun:(fun x -> 2*x) -%fore "lightpink" -- : int list = [2; 3; 4] - -%pause, fore "yellow", font "code" -let f x ?incr:y [< 1 >] = x + y -%fore "lightpink" -val f : int -> ?incr:int -> int -%fore "yellow" -f 1 -%fore "lightpink" -- : int = 2 - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%page -5 -Polymorphic variants - - -%font "code", size 4, prefix " ", fore "yellow" -[`on; `off] -%fore "lightpink" -- : [> off on] list = [`on; `off] - -%pause, fore "yellow", font "code" -`number 1;; -%fore "lightpink" -- : [> number(int)] = `number 1 - -%pause, fore "yellow", font "code" -let f = function `on -> 1 | `off -> 0 | `number n -> n -%fore "lightpink" -val f : [< number(int) off on] -> int - -%pause, fore "yellow", font "code" -type t = [on off number(int)] - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%page -6 -Polymorphic methods - -Not allowed in Objective Caml -%size 2 - -%font "code", size 4, prefix " ", fore "yellow" -class c = object method m x = x end -%fore "red" -Some type variables are unbound in this type: - class c : object method m : 'a -> 'a end -The method m has type 'a -> 'a where 'a is unbound - -%pause, font "sans", size 5, prefix " ", fore "white" -Need explicit annotation in O'Labl -%size 2 - -%font "code", size 4, prefix " ", fore "yellow" -class c = object - method m : 'a. 'a -> 'a = fun x -> x -end -%fore "lightpink" -class c : object method m : 'a -> 'a end -%fore "yellow" -let o = new c -%fore "lightpink" -val o : c = -%fore "yellow" -o#m 1, o#m true -%fore "lightpink" -- : int * bool = 1, true - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%page -7 -Why GTK+ ? - -Why use the GIMP Tool Kit? -%size 3 - - Widely used in free software - - Easy to interface - Written in C (QT uses C++) - Memory management - -Drawbacks -%size 3 - - Design lacks uniformity - Extensive use of dynamic typing - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%page -8 -GTK+ Structure - -Class hierarchy based on GtkObject -%size 2 - - Single inheritance -&com1 New widgets may redefine methods -%size 2 - - Dynamically checked -&com1 Casting necessay both up and down -%size 2 - - Developper-side hierarchy -&com1 Inheritance is not always meaningful to the user -%size 2 - -%size 5 -Signal-based callback mechanism -%size 2 - - May use multiple callbacks -%size 2 - - Signals are polymorphic - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%page -9 -LablGTK structure - -Typed at all levels - - Low-level interface -%size 2 - - C stub functions -- typechecked by C - - ML type declarations -- ML abstract types - - High-level interface -%size 2 - - ML class wrappers -- ML concrete types - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%page -10 -Low Level Interface - -Goals - - Strongly typed interface -&com1 heavy use of advanced typing techniques - - Very little ML code -&com1 C-stubs and external declarations - - Safe memory management -&com1 have the library cooperate with the GC - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%page -11 -Low level encoding (I) - - -How to represent widget subtyping in ML? - - Example: buttons' hierarchy -%size 2 - -%font "code", size 5, prefix " ", fore "yellow" -GtkObject - GtkWidget - GtkContainer - GtkButton - GtkToggleButton - GtkRadioButton - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%page -12 -Variants as set constraints - - -Variants can be seen as sets of possible values: - - [tag1 ... tagn] = {tag1,...,tagn} - - -Polymorphic variants introduce constraints - - $B&A(B[> tag1 ... tagn] $B"N(B $B&A(B $B"?(B {tag1,...,tagn} - $B&A(B[< tag1 ... tagn] $B"N(B $B&A(B $B">(B {tag1,...,tagn} - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%page -13 -Encoding hierarchies - -Define an abstract type -&vspace -%font "code", fore "yellow", size 5 - type 'a obj - -&txt Use tags to represent properties -&vspace -%font "code", fore "yellow", size 5 - type t = [class1 ... classn] obj - -&txt Functions check properties -&vspace -%font "code", fore "yellow", size 5 - val f : [> class1 ... classn] obj -> ... -&txt - Subsumes Haskell type classes -&vspace - Allows multiple inheritance - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%page -14 -Low level encoding (II) - -Example: buttons' hierarchy -%size 2 - -%font "code", size 4, prefix " ", fore "yellow" -type 'a obj -type widget = [widget] obj -type container = [widget container] obj -type button = [widget container button] obj -type toggle_button = [widget ... togglebutton] obj -type radio_button = [widget ... radiobutton] obj -type state_type = [ NORMAL - ACTIVE PRELIGHT SELECTED INSENSITIVE ] -val set_state : [> widget] obj -> state_type -> unit -val children : [> container] obj -> [widget] obj list -val clicked : [> button] obj -> unit -val set_group : [> radiobutton] obj -> group -> unit - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%page -15 -Alternate encoding - -Use only standard ML features -%size 2 - -%font "code", size 4, prefix " ", fore "yellow", vgap 50 -type 'a obj -type 'a widget -... -type 'a radio -type state_type = NORMAL | ACTIVE | ... | INSENSITIVE -val set_state : 'a widget obj -> state_type -> unit -val children : - 'a container widget obj -> unit widget obj list -val clicked : 'a button container widget obj -> unit - -&txt Weaknesses - No multiple inheritance - Not very intuitive for the user - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%page -16 -Low level encoding (III) - -Use of labeled parameters -%size 2 - -%font "code", size 4, prefix " ", fore "yellow", vgap 50 -val adjustment_new : - value:float -> lower:float -> upper:float -> - step_incr:float -> page_incr:float -> - page_size:float -> adjustment obj - -&txt Signals -%size 2 - -%font "code", size 4, prefix " ", fore "yellow", vgap 50 -type ('a,'b) signal = - { name: string; marshaller: 'b -> GtkArgv.t -> unit } -val connect : 'a obj -> sig:('a,'b) signal -> - callback:'b -> ?after:bool -> id -val button_clicked : ([> button], unit -> unit) signal - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%page -17 -High-Level Interface - -Problems with GTK+ -%size 2 - - Name space is scattered -&com1 One has to know in which superclass a function is defined - Developper oriented design -&com1 There is no clear distinction between public and private definitions - -&txt LablGTK design -%size 2 - - OCaml classes to reunify name space - Omit developper-oriented methods - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%page -18 -High-level classes - -%font "code", size 4, prefix " ", fore "yellow" -class button : -%fore "lightgreen" - ?label:string -> -%fore "lightpink" - ?border_width:int -> - ?width:int -> - ?height:int -> -%fore "lightgray" - ?packing:(GButton.button -> unit) -> - ?show:bool -> -%fore "yellow" - object -%fore "lightgray" - method destroy : unit -> unit - method as_widget : Gtk.widget obj - method misc : GObj.widget_misc -%fore "lightpink" - method add : #is_widget -> unit - method set_border_width : int -> unit -%fore "lightgreen" - method clicked : unit -> unit - method connect : GButton.button_signals - method grab_default : unit -> unit -%fore "yellow" - end - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%page -19 -High-level features - - Objective Caml classes -&com1 allow collecting methods from different modules - - Use optionals in class constructors -&com1 makes widget creation much easier - - Polymorphic methods -&com1 needed for container widgets -%size 2 - -%font "code", size 4, fore "yellow", vgap 50 - method add : 'a. (#is_widget as 'a) -> unit - -%fore "white", font "sans" - Polymorphic variants -&com1 for C-style enumeration types, avoid name-space dependancies - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%page -20 -Polymorphic methods (I) - - Instance of first-class polymorphism -%size 2 - - first-class polytypes cannot be inferred - they are propagated by the definition flow - - Technically -%size 2 - - use polymorphism to track available information - type system excludes derivations based on "guessed" information - - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%page -21 -First class polymorphism - -%prefix " " -%image "formula.eps" 512x384 -%size 2 - -%prefix " ", size 5, fore "lightblue" - ($B&R(B1 : $B&R(B : $B&R(B2) $B"N(B $B&R(B1 = $B&H(B($B&Q(B1($B&R(B)) $B"J(B $B&R(B2 = $B&H(B($B&Q(B2($B&R(B)) -%fore "white" -where $B&H(B instantiates free variables, and $B&Q(B1,$B&Q(B2 rename free labels of $B&R(B. - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%page -22 -Polymorphic methods (II) - -Definitions -%size 2 - -%font "code", size 4, prefix " ", fore "yellow", vgap 50 -type is_widget = < as_widget : widget obj > -type #is_widget = < as_widget : widget obj; .. > -type container = - < ... ; add : 'a. (#as_widget as 'a) -> unit; ... > - -%pause -&txt Propagation -%size 2 - -%font "code", size 4, prefix " ", fore "lightgreen", vgap 50 -fun (cont : container) -> cont#add widget - -%pause -let button = new button in button#add widget - -%pause, fore "red" -fun cont -> cont#add widget - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%page -23 -Programming example - -Hello World -%size 2 - -%font "code", size 4, prefix " ", fore "yellow" -open GMain - -let window = - new GWindow.window border_width: 10 - -let button = - new GButton.button - label: "Hello World" packing: window#add - -let _ = - window#connect#destroy callback: Main.quit; - button#connect#clicked callback: window#destroy; - window#show (); - Main.main () - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%page -24 -Conclusion - - Results -%size 2 - - Could build a strongly typed interface - - It is easier to use than the C API - - Makes effective use of extensions to the type system - - Comments -%size 2 - - Still difficulties with the Caml object system -&com2 class recursion, method type refinement, etc... diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/GL/morph3d.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/GL/morph3d.ml deleted file mode 100644 index a08726e05..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/GL/morph3d.ml +++ /dev/null @@ -1,607 +0,0 @@ -(* $Id$ *) - -(*- - * morph3d.c - Shows 3D morphing objects (TK Version) - * - * This program was inspired on a WindowsNT(R)'s screen saver. It was written - * from scratch and it was not based on any other source code. - * - * Porting it to xlock (the final objective of this code since the moment I - * decided to create it) was possible by comparing the original Mesa's gear - * demo with it's ported version, so thanks for Danny Sung for his indirect - * help (look at gear.c in xlock source tree). NOTE: At the moment this code - * was sent to Brian Paul for package inclusion, the XLock Version was not - * available. In fact, I'll wait it to appear on the next Mesa release (If you - * are reading this, it means THIS release) to send it for xlock package - * inclusion). It will probably there be a GLUT version too. - * - * Thanks goes also to Brian Paul for making it possible and inexpensive - * to use OpenGL at home. - * - * Since I'm not a native english speaker, my apologies for any gramatical - * mistake. - * - * My e-mail addresses are - * - * vianna@cat.cbpf.br - * and - * marcelo@venus.rdc.puc-rio.br - * - * Marcelo F. Vianna (Feb-13-1997) - *) - -(* -This document is VERY incomplete, but tries to describe the mathematics used -in the program. At this moment it just describes how the polyhedra are -generated. On futhurer versions, this document will be probabbly improved. - -Since I'm not a native english speaker, my apologies for any gramatical -mistake. - -Marcelo Fernandes Vianna -- Undergraduate in Computer Engeneering at Catholic Pontifical University -- of Rio de Janeiro (PUC-Rio) Brasil. -- e-mail: vianna@cat.cbpf.br or marcelo@venus.rdc.puc-rio.br -- Feb-13-1997 - -POLYHEDRA GENERATION - -For the purpose of this program it's not sufficient to know the polyhedra -vertexes coordinates. Since the morphing algorithm applies a nonlinear -transformation over the surfaces (faces) of the polyhedron, each face has -to be divided into smaller ones. The morphing algorithm needs to transform -each vertex of these smaller faces individually. It's a very time consoming -task. - -In order to reduce calculation overload, and since all the macro faces of -the polyhedron are transformed by the same way, the generation is made by -creating only one face of the polyhedron, morphing it and then rotating it -around the polyhedron center. - -What we need to know is the face radius of the polyhedron (the radius of -the inscribed sphere) and the angle between the center of two adjacent -faces using the center of the sphere as the angle's vertex. - -The face radius of the regular polyhedra are known values which I decided -to not waste my time calculating. Following is a table of face radius for -the regular polyhedra with edge length = 1: - - TETRAHEDRON : 1/(2*sqrt(2))/sqrt(3) - CUBE : 1/2 - OCTAHEDRON : 1/sqrt(6) - DODECAHEDRON : T^2 * sqrt((T+2)/5) / 2 -> where T=(sqrt(5)+1)/2 - ICOSAHEDRON : (3*sqrt(3)+sqrt(15))/12 - -I've not found any reference about the mentioned angles, so I needed to -calculate them, not a trivial task until I figured out how :) -Curiously these angles are the same for the tetrahedron and octahedron. -A way to obtain this value is inscribing the tetrahedron inside the cube -by matching their vertexes. So you'll notice that the remaining unmatched -vertexes are in the same straight line starting in the cube/tetrahedron -center and crossing the center of each tetrahedron's face. At this point -it's easy to obtain the bigger angle of the isosceles triangle formed by -the center of the cube and two opposite vertexes on the same cube face. -The edges of this triangle have the following lenghts: sqrt(2) for the base -and sqrt(3)/2 for the other two other edges. So the angle we want is: - +-----------------------------------------------------------+ - | 2*ARCSIN(sqrt(2)/sqrt(3)) = 109.47122063449069174 degrees | - +-----------------------------------------------------------+ -For the cube this angle is obvious, but just for formality it can be -easily obtained because we also know it's isosceles edge lenghts: -sqrt(2)/2 for the base and 1/2 for the other two edges. So the angle we -want is: - +-----------------------------------------------------------+ - | 2*ARCSIN((sqrt(2)/2)/1) = 90.000000000000000000 degrees | - +-----------------------------------------------------------+ -For the octahedron we use the same idea used for the tetrahedron, but now -we inscribe the cube inside the octahedron so that all cubes's vertexes -matches excatly the center of each octahedron's face. It's now clear that -this angle is the same of the thetrahedron one: - +-----------------------------------------------------------+ - | 2*ARCSIN(sqrt(2)/sqrt(3)) = 109.47122063449069174 degrees | - +-----------------------------------------------------------+ -For the dodecahedron it's a little bit harder because it's only relationship -with the cube is useless to us. So we need to solve the problem by another -way. The concept of Face radius also exists on 2D polygons with the name -Edge radius: - Edge Radius For Pentagon (ERp) - ERp = (1/2)/TAN(36 degrees) * VRp = 0.6881909602355867905 - (VRp is the pentagon's vertex radio). - Face Radius For Dodecahedron - FRd = T^2 * sqrt((T+2)/5) / 2 = 1.1135163644116068404 -Why we need ERp? Well, ERp and FRd segments forms a 90 degrees angle, -completing this triangle, the lesser angle is a half of the angle we are -looking for, so this angle is: - +-----------------------------------------------------------+ - | 2*ARCTAN(ERp/FRd) = 63.434948822922009981 degrees | - +-----------------------------------------------------------+ -For the icosahedron we can use the same method used for dodecahedron (well -the method used for dodecahedron may be used for all regular polyhedra) - Edge Radius For Triangle (this one is well known: 1/3 of the triangle height) - ERt = sin(60)/3 = sqrt(3)/6 = 0.2886751345948128655 - Face Radius For Icosahedron - FRi= (3*sqrt(3)+sqrt(15))/12 = 0.7557613140761707538 -So the angle is: - +-----------------------------------------------------------+ - | 2*ARCTAN(ERt/FRi) = 41.810314895778596167 degrees | - +-----------------------------------------------------------+ - -*) - - -let scale = 0.3 - -let vect_mul (x1,y1,z1) (x2,y2,z2) = - (y1 *. z2 -. z1 *. y2, z1 *. x2 -. x1 *. z2, x1 *. y2 -. y1 *. x2) - -let sqr a = a *. a - -(* Increasing this values produces better image quality, the price is speed. *) -(* Very low values produces erroneous/incorrect plotting *) -let tetradivisions = 23 -let cubedivisions = 20 -let octadivisions = 21 -let dodecadivisions = 10 -let icodivisions = 15 - -let tetraangle = 109.47122063449069174 -let cubeangle = 90.000000000000000000 -let octaangle = 109.47122063449069174 -let dodecaangle = 63.434948822922009981 -let icoangle = 41.810314895778596167 - -let pi = acos (-1.) -let sqrt2 = sqrt 2. -let sqrt3 = sqrt 3. -let sqrt5 = sqrt 5. -let sqrt6 = sqrt 6. -let sqrt15 = sqrt 15. -let cossec36_2 = 0.8506508083520399322 -let cosd x = cos (float x /. 180. *. pi) -let sind x = sin (float x /. 180. *. pi) -let cos72 = cosd 72 -let sin72 = sind 72 -let cos36 = cosd 36 -let sin36 = sind 36 - -(*************************************************************************) - -let front_shininess = 60.0 -let front_specular = 0.7, 0.7, 0.7, 1.0 -let ambient = 0.0, 0.0, 0.0, 1.0 -let diffuse = 1.0, 1.0, 1.0, 1.0 -let position0 = 1.0, 1.0, 1.0, 0.0 -let position1 = -1.0,-1.0, 1.0, 0.0 -let lmodel_ambient = 0.5, 0.5, 0.5, 1.0 -let lmodel_twoside = true - -let materialRed = 0.7, 0.0, 0.0, 1.0 -let materialGreen = 0.1, 0.5, 0.2, 1.0 -let materialBlue = 0.0, 0.0, 0.7, 1.0 -let materialCyan = 0.2, 0.5, 0.7, 1.0 -let materialYellow = 0.7, 0.7, 0.0, 1.0 -let materialMagenta = 0.6, 0.2, 0.5, 1.0 -let materialWhite = 0.7, 0.7, 0.7, 1.0 -let materialGray = 0.2, 0.2, 0.2, 1.0 -let all_gray = Array.create 20 materialGray - -let vertex ~xf ~yf ~zf ~ampvr2 = - let xa = xf +. 0.01 and yb = yf +. 0.01 in - let xf2 = sqr xf and yf2 = sqr yf in - let factor = 1. -. (xf2 +. yf2) *. ampvr2 - and factor1 = 1. -. (sqr xa +. yf2) *. ampvr2 - and factor2 = 1. -. (xf2 +. sqr yb) *. ampvr2 in - let vertx = factor *. xf and verty = factor *. yf - and vertz = factor *. zf in - let neiax = factor1 *. xa -. vertx and neiay = factor1 *. yf -. verty - and neiaz = factor1 *. zf -. vertz and neibx = factor2 *. xf -. vertx - and neiby = factor2 *. yb -. verty and neibz = factor2 *. zf -. vertz in - GlDraw.normal3 (vect_mul (neiax, neiay, neiaz) (neibx, neiby, neibz)); - GlDraw.vertex3 (vertx, verty, vertz) - -let triangle ~edge ~amp ~divisions ~z = - let divi = float divisions in - let vr = edge *. sqrt3 /. 3. in - let ampvr2 = amp /. sqr vr - and zf = edge *. z in - let ax = edge *. (0.5 /. divi) - and ay = edge *. (-0.5 *. sqrt3 /. divi) - and bx = edge *. (-0.5 /. divi) in - for ri = 1 to divisions do - GlDraw.begins `triangle_strip; - for ti = 0 to ri - 1 do - vertex ~zf ~ampvr2 - ~xf:(float (ri-ti) *. ax +. float ti *. bx) - ~yf:(vr +. float (ri-ti) *. ay +. float ti *. ay); - vertex ~zf ~ampvr2 - ~xf:(float (ri-ti-1) *. ax +. float ti *. bx) - ~yf:(vr +. float (ri-ti-1) *. ay +. float ti *. ay) - done; - vertex ~xf:(float ri *. bx) ~yf:(vr +. float ri *. ay) ~zf ~ampvr2; - GlDraw.ends () - done - -let square ~edge ~amp ~divisions ~z = - let divi = float divisions in - let zf = edge *. z - and ampvr2 = amp /. sqr (edge *. sqrt2 /. 2.) in - for yi = 0 to divisions - 1 do - let yf = edge *. (-0.5 +. float yi /. divi) in - let yf2 = sqr yf in - let y = yf +. 1.0 /. divi *. edge in - let y2 = sqr y in - GlDraw.begins `quad_strip; - for xi = 0 to divisions do - let xf = edge *. (-0.5 +. float xi /. divi) in - vertex ~xf ~yf:y ~zf ~ampvr2; - vertex ~xf ~yf ~zf ~ampvr2 - done; - GlDraw.ends () - done - -let pentagon ~edge ~amp ~divisions ~z = - let divi = float divisions in - let zf = edge *. z - and ampvr2 = amp /. sqr(edge *. cossec36_2) in - let x = - Array.init 6 - ~f:(fun fi -> -. cos (float fi *. 2. *. pi /. 5. +. pi /. 10.) - /. divi *. cossec36_2 *. edge) - and y = - Array.init 6 - ~f:(fun fi -> sin (float fi *. 2. *. pi /. 5. +. pi /. 10.) - /. divi *. cossec36_2 *. edge) - in - for ri = 1 to divisions do - for fi = 0 to 4 do - GlDraw.begins `triangle_strip; - for ti = 0 to ri-1 do - vertex ~zf ~ampvr2 - ~xf:(float(ri-ti) *. x.(fi) +. float ti *. x.(fi+1)) - ~yf:(float(ri-ti) *. y.(fi) +. float ti *. y.(fi+1)); - vertex ~zf ~ampvr2 - ~xf:(float(ri-ti-1) *. x.(fi) +. float ti *. x.(fi+1)) - ~yf:(float(ri-ti-1) *. y.(fi) +. float ti *. y.(fi+1)) - done; - vertex ~xf:(float ri *. x.(fi+1)) ~yf:(float ri *. y.(fi+1)) ~zf ~ampvr2; - GlDraw.ends () - done - done - -let call_list list color = - GlLight.material ~face:`both (`diffuse color); - GlList.call list - -let draw_tetra ~amp ~divisions ~color = - let list = GlList.create `compile in - triangle ~edge:2.0 ~amp ~divisions ~z:(0.5 /. sqrt6); - GlList.ends(); - - call_list list color.(0); - GlMat.push(); - GlMat.rotate ~angle:180.0 ~z:1.0 (); - GlMat.rotate ~angle:(-.tetraangle) ~x:1.0 (); - call_list list color.(1); - GlMat.pop(); - GlMat.push(); - GlMat.rotate ~angle:180.0 ~y:1.0 (); - GlMat.rotate ~angle:(-180.0 +. tetraangle) ~x:0.5 ~y:(sqrt3 /. 2.) (); - call_list list color.(2); - GlMat.pop(); - GlMat.rotate ~angle:180.0 ~y:1.0 (); - GlMat.rotate ~angle:(-180.0 +. tetraangle) ~x:0.5 ~y:(-.sqrt3 /. 2.) (); - call_list list color.(3); - - GlList.delete list - -let draw_cube ~amp ~divisions ~color = - let list = GlList.create `compile in - square ~edge:2.0 ~amp ~divisions ~z:0.5; - GlList.ends (); - - call_list list color.(0); - for i = 1 to 3 do - GlMat.rotate ~angle:cubeangle ~x:1.0 (); - call_list list color.(i) - done; - GlMat.rotate ~angle:cubeangle ~y:1.0 (); - call_list list color.(4); - GlMat.rotate ~angle:(2.0 *. cubeangle) ~y:1.0 (); - call_list list color.(5); - - GlList.delete list - -let draw_octa ~amp ~divisions ~color = - let list = GlList.create `compile in - triangle ~edge:2.0 ~amp ~divisions ~z:(1.0 /. sqrt6); - GlList.ends (); - - let do_list (i,y) = - GlMat.push(); - GlMat.rotate ~angle:180.0 ~y:1.0 (); - GlMat.rotate ~angle:(-.octaangle) ~x:0.5 ~y (); - call_list list color.(i); - GlMat.pop() - in - call_list list color.(0); - GlMat.push(); - GlMat.rotate ~angle:180.0 ~z:1.0 (); - GlMat.rotate ~angle:(-180.0 +. octaangle) ~x:1.0 (); - call_list list color.(1); - GlMat.pop(); - List.iter [2, sqrt3 /. 2.0; 3, -.sqrt3 /. 2.0] ~f:do_list; - GlMat.rotate ~angle:180.0 ~x:1.0 (); - GlLight.material ~face:`both (`diffuse color.(4)); - GlList.call list; - GlMat.push(); - GlMat.rotate ~angle:180.0 ~z:1.0 (); - GlMat.rotate ~angle:(-180.0 +. octaangle) ~x:1.0 (); - GlLight.material ~face:`both (`diffuse color.(5)); - GlList.call list; - GlMat.pop(); - List.iter [6, sqrt3 /. 2.0; 7, -.sqrt3 /. 2.0] ~f:do_list; - - GlList.delete list - -let draw_dodeca ~amp ~divisions ~color = - let tau = (sqrt5 +. 1.0) /. 2.0 in - let list = GlList.create `compile in - pentagon ~edge:2.0 ~amp ~divisions - ~z:(sqr(tau) *. sqrt ((tau+.2.0)/.5.0) /. 2.0); - GlList.ends (); - - let do_list (i,angle,x,y) = - GlMat.push(); - GlMat.rotate ~angle:angle ~x ~y (); - call_list list color.(i); - GlMat.pop(); - in - GlMat.push (); - call_list list color.(0); - GlMat.rotate ~angle:180.0 ~z:1.0 (); - List.iter ~f:do_list - [ 1, -.dodecaangle, 1.0, 0.0; - 2, -.dodecaangle, cos72, sin72; - 3, -.dodecaangle, cos72, -.sin72; - 4, dodecaangle, cos36, -.sin36; - 5, dodecaangle, cos36, sin36 ]; - GlMat.pop (); - GlMat.rotate ~angle:180.0 ~x:1.0 (); - call_list list color.(6); - GlMat.rotate ~angle:180.0 ~z:1.0 (); - List.iter ~f:do_list - [ 7, -.dodecaangle, 1.0, 0.0; - 8, -.dodecaangle, cos72, sin72; - 9, -.dodecaangle, cos72, -.sin72; - 10, dodecaangle, cos36, -.sin36 ]; - GlMat.rotate ~angle:dodecaangle ~x:cos36 ~y:sin36 (); - call_list list color.(11); - - GlList.delete list - -let draw_ico ~amp ~divisions ~color = - let list = GlList.create `compile in - triangle ~edge:1.5 ~amp ~divisions - ~z:((3.0 *. sqrt3 +. sqrt15) /. 12.0); - GlList.ends (); - - let do_list1 i = - GlMat.rotate ~angle:180.0 ~y:1.0 (); - GlMat.rotate ~angle:(-180.0 +. icoangle) ~x:0.5 ~y:(sqrt3/.2.0) (); - call_list list color.(i) - and do_list2 i = - GlMat.rotate ~angle:180.0 ~y:1.0 (); - GlMat.rotate ~angle:(-180.0 +. icoangle) ~x:0.5 ~y:(-.sqrt3/.2.0) (); - call_list list color.(i) - and do_list3 i = - GlMat.rotate ~angle:180.0 ~z:1.0 (); - GlMat.rotate ~angle:(-.icoangle) ~x:1.0 (); - call_list list color.(i) - in - GlMat.push (); - call_list list color.(0); - GlMat.push (); - do_list3 1; - GlMat.push (); - do_list1 2; - GlMat.pop (); - do_list2 3; - GlMat.pop (); - GlMat.push (); - do_list1 4; - GlMat.push (); - do_list1 5; - GlMat.pop(); - do_list3 6; - GlMat.pop (); - do_list2 7; - GlMat.push (); - do_list2 8; - GlMat.pop (); - do_list3 9; - GlMat.pop (); - GlMat.rotate ~angle:180.0 ~x:1.0 (); - call_list list color.(10); - GlMat.push (); - do_list3 11; - GlMat.push (); - do_list1 12; - GlMat.pop (); - do_list2 13; - GlMat.pop (); - GlMat.push (); - do_list1 14; - GlMat.push (); - do_list1 15; - GlMat.pop (); - do_list3 16; - GlMat.pop (); - do_list2 17; - GlMat.push (); - do_list2 18; - GlMat.pop (); - do_list3 19; - - GlList.delete list - -class view area = object (self) - val area : GlGtk.area = area - val mutable smooth = true - val mutable step = 0. - val mutable obj = 1 - val mutable draw_object = fun ~amp -> () - val mutable magnitude = 0. - - method width = area#misc#allocation.Gtk.width - method height = area#misc#allocation.Gtk.height - - method draw () = - let ratio = float self#height /. float self#width in - GlClear.clear [`color;`depth]; - GlMat.push(); - GlMat.translate ~z:(-10.0) (); - GlMat.scale ~x:(scale *. ratio) ~y:scale ~z:scale (); - GlMat.translate () - ~x:(2.5 *. ratio *. sin (step *. 1.11)) - ~y:(2.5 *. cos (step *. 1.25 *. 1.11)); - GlMat.rotate ~angle:(step *. 100.) ~x:1.0 (); - GlMat.rotate ~angle:(step *. 95.) ~y:1.0 (); - GlMat.rotate ~angle:(step *. 90.) ~z:1.0 (); - draw_object ~amp:((sin step +. 1.0/.3.0) *. (4.0/.5.0) *. magnitude); - GlMat.pop(); - Gl.flush(); - area#swap_buffers (); - step <- step +. 0.05 - - method reshape ~width ~height = - GlDraw.viewport ~x:0 ~y:0 ~w:width ~h:height; - GlMat.mode `projection; - GlMat.load_identity(); - GlMat.frustum ~x:(-1.0, 1.0) ~y:(-1.0, 1.0) ~z:(5.0, 15.0); - GlMat.mode `modelview - - method key sym = - begin match sym with - "1" -> obj <- 1 - | "2" -> obj <- 2 - | "3" -> obj <- 3 - | "4" -> obj <- 4 - | "5" -> obj <- 5 - | "\r" -> smooth <- not smooth - | "\027" -> area#misc#toplevel#destroy (); exit 0 - | _ -> () - end; - self#pinit - - method pinit = - begin match obj with - 1 -> - draw_object <- draw_tetra - ~divisions:tetradivisions - ~color:[|materialRed; materialGreen; - materialBlue; materialWhite|]; - magnitude <- 2.5 - | 2 -> - draw_object <- draw_cube - ~divisions:cubedivisions - ~color:[|materialRed; materialGreen; materialCyan; - materialMagenta; materialYellow; materialBlue|]; - magnitude <- 2.0 - | 3 -> - draw_object <- draw_octa - ~divisions:octadivisions - ~color:[|materialRed; materialGreen; materialBlue; - materialWhite; materialCyan; materialMagenta; - materialGray; materialYellow|]; - magnitude <- 2.5 - | 4 -> - draw_object <- draw_dodeca - ~divisions:dodecadivisions - ~color:[|materialRed; materialGreen; materialCyan; - materialBlue; materialMagenta; materialYellow; - materialGreen; materialCyan; materialRed; - materialMagenta; materialBlue; materialYellow|]; - magnitude <- 2.0 - | 5 -> - draw_object <- draw_ico - ~divisions:icodivisions - ~color:[|materialRed; materialGreen; materialBlue; - materialCyan; materialYellow; materialMagenta; - materialRed; materialGreen; materialBlue; - materialWhite; materialCyan; materialYellow; - materialMagenta; materialRed; materialGreen; - materialBlue; materialCyan; materialYellow; - materialMagenta; materialGray|]; - magnitude <- 3.5 - | _ -> () - end; - GlDraw.shade_model (if smooth then `smooth else `flat) - initializer - area#connect#display ~callback:self#draw; - area#connect#reshape ~callback:self#reshape; - () -end - -open GMain - -let main () = - List.iter ~f:print_string - [ "Morph 3D - Shows morphing platonic polyhedra\n"; - "Author: Marcelo Fernandes Vianna (vianna@cat.cbpf.br)\n"; - "Ported to LablGL by Jacques Garrigue\n\n"; - " [1] - Tetrahedron\n"; - " [2] - Hexahedron (Cube)\n"; - " [3] - Octahedron\n"; - " [4] - Dodecahedron\n"; - " [5] - Icosahedron\n"; - "[RETURN] - Toggle smooth/flat shading\n"; - " [ESC] - Quit\n" ]; - flush stdout; - - let window = - GWindow.window ~title:"Morph 3D - Shows morphing platonic polyhedra" () - in - window#connect#destroy ~callback:Main.quit; - window#set_resize_mode `IMMEDIATE; - - let area = GlGtk.area [`DEPTH_SIZE 1;`RGBA;`DOUBLEBUFFER] - ~width:640 ~height:480 ~packing:window#add () in - - let view = new view area in - - area#connect#realize ~callback: - begin fun () -> - view#pinit; - GlClear.depth 1.0; - GlClear.color (0.0, 0.0, 0.0); - GlDraw.color (1.0, 1.0, 1.0); - - GlClear.clear [`color;`depth]; - Gl.flush(); - - List.iter ~f:(GlLight.light ~num:0) - [`ambient ambient; `diffuse diffuse; `position position0]; - List.iter ~f:(GlLight.light ~num:1) - [`ambient ambient; `diffuse diffuse; `position position1]; - GlLight.light_model (`ambient lmodel_ambient); - GlLight.light_model (`two_side lmodel_twoside); - List.iter ~f:Gl.enable - [`lighting;`light0;`light1;`depth_test;`normalize]; - - GlLight.material ~face:`both (`shininess front_shininess); - GlLight.material ~face:`both (`specular front_specular); - - GlMisc.hint `fog `fastest; - GlMisc.hint `perspective_correction `fastest; - GlMisc.hint `polygon_smooth `fastest - end; - - window#event#connect#key_press - ~callback:(fun ev -> view#key (GdkEvent.Key.string ev); true); - - Timeout.add ~ms:20 - ~callback:(fun _ -> if area#misc#visible then view#draw (); true); - window#show (); - Main.main () - -let _ = main () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/GL/planet.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/GL/planet.ml deleted file mode 100644 index 51f947c48..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/GL/planet.ml +++ /dev/null @@ -1,125 +0,0 @@ -(* $Id$ *) - -class planet area = object (self) - val area : GlGtk.area = area - val mutable year = 0.0 - val mutable day = 0.0 - val mutable eye = 0.0 - val mutable time = 0.0 - - method tick new_time = - if time = 0. then time <- new_time else - let diff = new_time -. time in - time <- new_time; - day <- mod_float (day +. diff *. 200.) 360.0; - year <- mod_float (year +. diff *. 20.) 360.0 - method day_add () = - day <- mod_float (day +. 10.0) 360.0 - method day_subtract () = - day <- mod_float (day -. 10.0) 360.0 - method year_add () = - year <- mod_float (year +. 5.0) 360.0 - method year_subtract () = - year <- mod_float (year -. 5.0) 360.0 - method eye x = - eye <- x; self#display () - - method display () = - GlClear.clear [`color;`depth]; - - GlDraw.color (1.0, 1.0, 1.0); - GlMat.push(); - GlMat.rotate ~angle:eye ~x:1. (); -(* draw sun *) - GlLight.material ~face:`front (`specular (1.0,1.0,0.0,1.0)); - GlLight.material ~face:`front (`shininess 5.0); - GluQuadric.sphere ~radius:1.0 ~slices:32 ~stacks:32 (); -(* draw smaller planet *) - GlMat.rotate ~angle:year ~y:1.0 (); - GlMat.translate ~x:3.0 (); - GlMat.rotate ~angle:day ~y:1.0 (); - GlDraw.color (0.0, 1.0, 1.0); - GlDraw.shade_model `flat; - GlLight.material ~face:`front(`shininess 128.0); - GluQuadric.sphere ~radius:0.2 ~slices:10 ~stacks:10 (); - GlDraw.shade_model `smooth; - GlMat.pop (); - Gl.flush (); - area#swap_buffers () -end - -let myinit () = - let light_ambient = 0.5, 0.5, 0.5, 1.0 - and light_diffuse = 1.0, 0.8, 0.2, 1.0 - and light_specular = 1.0, 1.0, 1.0, 1.0 - (* light_position is NOT default value *) - and light_position = 1.0, 1.0, 1.0, 0.0 - in - List.iter ~f:(GlLight.light ~num:0) - [ `ambient light_ambient; `diffuse light_diffuse; - `specular light_specular; `position light_position ]; - GlFunc.depth_func `less; - List.iter ~f:Gl.enable [`lighting; `light0; `depth_test]; - GlDraw.shade_model `smooth - - -let my_reshape ~width:w ~height:h = - GlDraw.viewport ~x:0 ~y:0 ~w ~h; - GlMat.mode `projection; - GlMat.load_identity(); - GluMat.perspective ~fovy:60.0 ~aspect:(float w /. float h) ~z:(1.0,20.0); - GlMat.mode `modelview; - GlMat.load_identity(); - GlMat.translate ~z:(-5.0) () - -(* Main Loop - * Open window with initial window size, title bar, - * RGBA display mode, and handle input events. - *) -open GMain -open GdkKeysyms - -let main () = - let w = GWindow.window ~title:"Planet" () in - w#connect#destroy ~callback:(fun () -> Main.quit (); exit 0); - w#set_resize_mode `IMMEDIATE; - let hb = GPack.hbox ~packing:w#add () in - let area = GlGtk.area [`DOUBLEBUFFER;`RGBA;`DEPTH_SIZE 1] - ~width:700 ~height:500 ~packing:hb#add () in - area#event#add [`KEY_PRESS]; - - let planet = new planet area in - let adjustment = GData.adjustment ~value:0. ~lower:(-90.) ~upper:90. - ~step_incr:1. ~page_incr:5. ~page_size:5. () in - let scale = GRange.scale `VERTICAL ~adjustment ~draw_value:false - ~packing:hb#pack () in - adjustment#connect#value_changed - ~callback:(fun () -> planet#eye adjustment#value); - w#event#connect#key_press ~callback: - begin fun ev -> - let key = GdkEvent.Key.keyval ev in - if key = _Left then planet#year_subtract () else - if key = _Right then planet#year_add () else - if key = _Up then planet#day_add () else - if key = _Down then planet#day_subtract () else - if key = _Escape then w#destroy (); - planet#display (); - true - end; - - Timeout.add ~ms:20 ~callback: - begin fun () -> - planet#tick (Sys.time ()); planet#display (); true - end; - area#connect#display ~callback:planet#display; - area#connect#reshape ~callback:my_reshape; - - area#connect#realize ~callback: - begin fun () -> - myinit (); - my_reshape ~width:700 ~height:500 - end; - w#show (); - Main.main () - -let _ = Printexc.print main () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/GL/simple.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/GL/simple.ml deleted file mode 100644 index ea6ebde96..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/GL/simple.ml +++ /dev/null @@ -1,33 +0,0 @@ -(* $Id$ *) - -open GMain - -let main () = - let w = GWindow.window ~title:"LablGL/Gtk" () in - w#connect#destroy ~callback:Main.quit; - let area = - GlGtk.area [`RGBA;`DEPTH_SIZE 1] ~width:500 ~height:500 ~packing:w#add () in - area#connect#realize ~callback: - begin fun () -> - GlMat.mode `projection; - GlMat.load_identity (); - GlMat.ortho ~x:(-1.0,1.0) ~y:(-1.0,1.0) ~z:(-1.0,1.0); - end; - area#connect#display ~callback: - begin fun () -> - GlClear.color (0.0, 0.0, 0.0); - GlClear.clear [`color]; - GlDraw.color (1.0, 1.0, 1.0); - GlDraw.begins `polygon; - GlDraw.vertex ~x:(-0.5) ~y:(-0.5) (); - GlDraw.vertex ~x:(-0.5) ~y:(0.5) (); - GlDraw.vertex ~x:(0.5) ~y:(0.5) (); - GlDraw.vertex ~x:(0.5) ~y:(-0.5) (); - GlDraw.ends (); - Gl.flush () - end; - Timeout.add ~ms:10000 ~callback:(fun () -> w#destroy ();false); - w#show (); - Main.main () - -let _ = main () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/README b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/README deleted file mode 100644 index 6cbb5b6e9..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/README +++ /dev/null @@ -1,17 +0,0 @@ -Since this library was written in commuting label mode, examples were -also written in this mode. -Still, the following examples also compile in classic mode without -any modification. - -* calendar.ml -* clist.ml -* drawing.ml -* entry.ml -* events.ml -* fifteen.ml -* hello.ml -* image.ml -* radiobuttons.ml -* rpn.ml -* scrolledwin.ml -* testinput.ml \ No newline at end of file diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/buttons.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/buttons.ml deleted file mode 100644 index 78eebb038..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/buttons.ml +++ /dev/null @@ -1,26 +0,0 @@ -(* $Id$ *) - -open GMain - -let xpm_label_box ~(window : #GContainer.container) - ~file ~text ?packing ?(show=true) () = - if not (Sys.file_exists file) then failwith (file ^ " does not exist"); - let box = GPack.hbox ~border_width: 2 ?packing ~show:false () in - let pixmap = GDraw.pixmap_from_xpm ~file ~window () in - GMisc.pixmap pixmap ~packing:(box#pack ~padding:3) (); - GMisc.label ~text ~packing:(box#pack ~padding:3) (); - if show then box#misc#show (); - new GObj.widget_full box#as_widget - -let main () = - let window = GWindow.window ~title:"Pixmap'd Buttons!" ~border_width:10 () in - window#connect#destroy ~callback:Main.quit; - let button = GButton.button ~packing:window#add () in - button#connect#clicked ~callback: - (fun () -> prerr_endline "Hello again - cool button was pressed"); - xpm_label_box ~window ~file:"test.xpm" ~text:"cool button" - ~packing:button#add (); - window#show (); - Main.main () - -let _ = main () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/calc.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/calc.ml deleted file mode 100644 index 405d1bf87..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/calc.ml +++ /dev/null @@ -1,114 +0,0 @@ -(* $Id$ *) - -(* A simple calculator ported from LablTk to LablGtk *) - -let mem_string ~char s = - try - for i = 0 to String.length s -1 do - if s.[i] = char then raise Exit - done; false - with Exit -> true - -let ops = ['+',(+.); '-',(-.); '*',( *.); '/',(/.)] - -(* The abstract calculator class. Does not use Gtk *) - -class virtual calc = object (calc) - val mutable x = 0.0 - val mutable op = None - val mutable displaying = true - - method virtual set : string -> unit - method virtual get : string - method virtual quit : unit -> unit - method insert s = calc#set (calc#get ^ s) - method get_float = float_of_string (calc#get) - - initializer calc#set "0" - - method command s = - if s <> "" then match s.[0] with - '0'..'9' -> - if displaying then (calc#set ""; displaying <- false); - calc#insert s - | '.' -> - if displaying then - (calc#set "0."; displaying <- false) - else - if not (mem_string ~char:'.' calc#get) then calc#insert s - | '+'|'-'|'*'|'/' as c -> - displaying <- true; - begin match op with - None -> - x <- calc#get_float; - op <- Some (List.assoc c ops) - | Some f -> - x <- f x (calc#get_float); - op <- Some (List.assoc c ops); - calc#set (string_of_float x) - end - | '='|'\n'|'\r' -> - displaying <- true; - begin match op with - None -> () - | Some f -> - x <- f x (calc#get_float); - op <- None; - calc#set (string_of_float x) - end - | 'q' -> calc#quit () - | _ -> () -end - -(* Buttons for the calculator *) - -let m = - [|[|"7";"8";"9";"+"|]; - [|"4";"5";"6";"-"|]; - [|"1";"2";"3";"*"|]; - [|"0";".";"=";"/"|]|] - -(* The physical calculator. Inherits from the abstract one *) - -open GMain - -class calculator ?packing ?show () = - let table = GPack.table ~rows:5 ~columns:4 ~homogeneous:true ~show:false () in - object (calc) - inherit calc - - val label = - let frame = GBin.frame ~shadow_type:`IN () - ~packing:(table#attach ~left:0 ~top:0 ~right:4 ~expand:`BOTH) in - let evbox = GBin.event_box ~packing:frame#add () in - evbox#misc#set_style evbox#misc#style#copy; - evbox#misc#style#set_bg [`NORMAL,`WHITE]; - GMisc.label ~justify:`RIGHT ~xalign:0.95 ~packing:evbox#add () - val table = table - - method set = label#set_text - method get = label#text - method quit = Main.quit - - initializer - for i = 0 to 3 do for j = 0 to 3 do - let button = - GButton.button ~label:(" " ^ m.(i).(j) ^ " ") - ~packing:(table#attach ~top:(i+1) ~left:j ~expand:`BOTH) () in - button#connect#clicked ~callback:(fun () -> calc#command m.(i).(j)); - done done; - ignore (GObj.pack_return table ~packing ~show) - end - -(* Finally start everything *) - -let w = GWindow.window ~auto_shrink:true () - -let applet = new calculator ~packing: w#add () - -let _ = - w#connect#destroy ~callback: Main.quit; - w#event#connect#key_press - ~callback:(fun ev -> applet#command (GdkEvent.Key.string ev); true); - w#show (); - Main.main () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/calendar.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/calendar.ml deleted file mode 100644 index 233c7449f..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/calendar.ml +++ /dev/null @@ -1,21 +0,0 @@ -(* $Id$ *) - -open GMain - -let main () = - let window = GWindow.window () in - window#connect#destroy ~callback:Main.quit; - - let calendar = GMisc.calendar ~packing:window#add () in - calendar#connect#day_selected ~callback: - begin fun () -> - let (year,month,day) = calendar#date in - Printf.printf "You selected %d/%d/%02d.\n" - day (month+1) (year mod 100); - flush stdout - end; - - window#show (); - Main.main () - -let _ = main () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/clist.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/clist.ml deleted file mode 100644 index f900f1781..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/clist.ml +++ /dev/null @@ -1,51 +0,0 @@ -(* $Id$ *) - -open GMain - -let main () = - let window = GWindow.window ~title:"CList example" ~width:300 ~height:150 () in - window#connect#destroy ~callback:Main.quit; - - let vbox = GPack.vbox ~border_width:5 ~packing:window#add () in - - let hbox = GPack.hbox ~packing:vbox#add () in - let sb = - GRange.scrollbar `VERTICAL ~packing:(hbox#pack ~from:`END) () in - let clist = - GList.clist ~titles:["Ingredients";"Amount"] ~shadow_type:`OUT - ~packing:hbox#add ~vadjustment:sb#adjustment () in - clist#connect#select_row ~callback: - begin fun ~row ~column ~event -> - let text = clist#cell_text row column in - Printf.printf "You selected row %d. More specifically you clicked in column %d, and the text in this cell is %s\n\n" row column text; - flush stdout - end; - - let hbox = GPack.hbox ~packing:vbox#pack () in - - let button_add = GButton.button ~label:"Add List" ~packing:hbox#add () in - button_add#connect#clicked ~callback: - begin fun () -> - List.iter ~f:(fun t -> ignore (clist#append t)) - [ ["Milk"; "3 Oz"]; - ["Water"; "6 l"]; - ["Carrots"; "2"]; - ["Snakes"; "55"] ] - end; - - let button_clear = GButton.button ~label:"Clear List" ~packing:hbox#add () in - button_clear#connect#clicked ~callback:clist#clear; - - let button_hide_show = - GButton.button ~label:"Hide/Show titles" ~packing:hbox#add () in - let flag = ref false in - button_hide_show#connect#clicked ~callback: - begin fun () -> - clist#set_titles_show !flag; - flag := not !flag - end; - - window#show (); - Main.main () - -let _ = main () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/combo.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/combo.ml deleted file mode 100644 index 9aff1b320..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/combo.ml +++ /dev/null @@ -1,23 +0,0 @@ -(* $Id$ *) - -open GMain - -let make_arrow_label combo ~label ~string = - let item = GList.list_item () in (* no packing here, it blocks GTK *) - let hbox = GPack.hbox ~spacing:3 ~packing:item#add () in - GMisc.arrow ~kind:`RIGHT ~shadow:`OUT ~packing:hbox#pack (); - GMisc.label ~text:label ~packing:hbox#pack (); - combo#set_item_string item string; - combo#list#add item; - item - -let main () = - let window = GWindow.window ~border_width:10 () in - window#connect#destroy ~callback:Main.quit; - let combo = GEdit.combo ~packing:window#add () in - make_arrow_label combo ~label:"First item" ~string:"1st item"; - make_arrow_label combo ~label:"Second item" ~string:"2nd item"; - window#show (); - Main.main () - -let _ = main () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/csview.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/csview.ml deleted file mode 100644 index eaf8de18b..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/csview.ml +++ /dev/null @@ -1,155 +0,0 @@ -(* $Id$ *) - -(* A simple CSV data viewer *) - -type data = - { fields : string list; - titles : string list; - data : string list list } - -let mem_string ~char s = - try - for i = 0 to String.length s - 1 do - if s.[i] = char then raise Exit - done; - false - with Exit -> true - -let rec until ~chars ?(escapes="") ?(buf = Buffer.create 80) s = - match Stream.peek s with - Some c -> - if mem_string ~char:c escapes then begin - Stream.junk s; - Buffer.add_char buf (Stream.next s); - until ~chars ~escapes ~buf s - end else if mem_string ~char:c chars then - Buffer.contents buf - else begin - Buffer.add_char buf c; - Stream.junk s; - until ~chars ~escapes ~buf s - end - | None -> - if Buffer.length buf > 0 then raise (Stream.Error "until") - else raise Stream.Failure - -let rec ignores ?(chars = " \t") s = - match Stream.peek s with - Some c when mem_string ~char:c chars -> - Stream.junk s; ignores ~chars s - | _ -> () - -let parse_field = parser - [< ''"'; f = until ~chars:"\"" ~escapes:"\\"; ''"'; _ = ignores >] -> - for i = 0 to String.length f - 1 do - if f.[i] = '\031' then f.[i] <- '\n' - done; - f - | [< f = until ~chars:",\n\r" >] -> f - | [< >] -> "" - -let comma = parser [< '','; _ = ignores >] -> () - -let rec parse_list ~item ~sep = parser - [< i = item; s >] -> - begin match s with parser - [< _ = sep; l = parse_list ~item ~sep >] -> i :: l - | [< >] -> [i] - end - | [< >] -> [] - -let parse_one = parse_list ~item:parse_field ~sep:comma - -let lf = parser [< ''\n'|'\r'; _ = ignores ~chars:"\n\r"; _ = ignores >] -> () - -let parse_all = parse_list ~item:parse_one ~sep:lf - -let read_file file = - let ic = open_in file in - let s = Stream.of_channel ic in - let data = parse_all s in - close_in ic; - match data with - ("i"::fields) :: ("T"::titles) :: data -> - {fields=fields; titles=titles; data=List.map ~f:List.tl data} - | titles :: data -> - {fields=titles; titles=titles; data=data} - | _ -> failwith "Insufficient data" - -let print_string s = - Format.print_char '"'; - for i = 0 to String.length s - 1 do - match s.[i] with - '\'' -> Format.print_char '\'' - | '"' -> Format.print_string "\\\"" - | '\160'..'\255' as c -> Format.print_char c - | c -> Format.print_string (Char.escaped c) - done; - Format.print_char '"' - -(* -#install_printer print_string;; -*) - -open GMain - -let field_widths = - [ "i", 0; - "ATTR", 0; - "NAME", 17; - "NAPR", 8; - "TEL1", 14; - "ZIPC", 12; - "ADR1", 40; - "BRTH", 10; - "RMRK", 20; - "CHK1", 0; - "CHK2", 0; - "CHK3", 0; - "CHK4", 0; - "TIM1", 16; - "TIM2", 16; - "ALRM", 0; - "ATTM", 0; - ] - -let main argv = - if Array.length argv <> 2 then begin - prerr_endline "Usage: csview "; - exit 2 - end; - let data = read_file argv.(1) in - let w = GWindow.window () in - w#misc#realize (); - let style = w#misc#style in - let font = Gdk.Font.load_fontset "-schumacher-clean-medium-r-normal--13-*-*-*-c-60-*,-mnkaname-fixed-*--12-*" in - let w0 = Gdk.Font.char_width font '0' in - style#set_font font; - w#connect#destroy ~callback:Main.quit; - let sw = GBin.scrolled_window ~width:600 ~height:300 ~packing:w#add () in - let cl = GList.clist ~titles:data.titles ~packing:sw#add () in - List.fold_left data.fields ~init:0 ~f: - begin fun acc f -> - let width = try List.assoc f field_widths with Not_found -> -1 in - if width = 0 then - cl#set_column ~visibility:false acc - else begin - if width > 0 then cl#set_column ~width:(width * w0) acc - else cl#set_column ~auto_resize:true acc; - if f = "NAPR" || f = "TIM1" || f = "CLAS" then - cl#set_sort ~auto:true ~column:acc (); - try - let ali = GBin.alignment_cast (cl#column_widget acc) in - let lbl = GMisc.label_cast (List.hd ali#children) in - lbl#set_alignment ~x:0. () - with _ -> - prerr_endline ("No column widget for field " ^ f) - end; - succ acc - end; - List.iter data.data - ~f:(fun l -> if List.length l > 1 then ignore (cl#append l)); - w#show (); - Main.main () - -let _ = main Sys.argv diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/dcalendar.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/dcalendar.ml deleted file mode 100644 index 6128506b4..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/dcalendar.ml +++ /dev/null @@ -1,247 +0,0 @@ -(* $Id$ *) - -(* A small calendar *) -(* Needs Unix module, so use with lablgtk_t *) - -open Printf - -type date = { mutable year: int; mutable mon: int; mutable mday: int } - - (* Load the schedule data *) -let calendar_file = Filename.concat (Sys.getenv "HOME") ".camlendar" - -let schedule = - try - let ichan = open_in calendar_file in - let (s : (int * int * int, string) Hashtbl.t) = - Marshal.from_channel ichan in - close_in ichan; - s - with Sys_error msg -> - prerr_endline msg; flush stderr; - Hashtbl.create 13;; - - (* Saves the schedule data when the application terminates *) -at_exit (fun () -> - let ochan = open_out calendar_file in - Marshal.to_channel ochan schedule ~mode: []; - close_out ochan);; - - (* date: Current date initialized to "today" *) -let date = - let tm = Unix.localtime (Unix.time ()) in - { year = 1900 + tm.Unix.tm_year; mon = tm.Unix.tm_mon; mday = 1 } - - - (* previous_month, next_month: change application status *) -let previous_month () = - date.mday <- 1; - if date.mon = 0 then - (date.year <- date.year - 1; date.mon <- 11) - else date.mon <- date.mon - 1 - -let next_month () = - date.mday <- 1; - if date.mon = 11 then (date.year <- date.year + 1; date.mon <- 0) - else date.mon <- date.mon + 1 - - (* leap, mon_name, wday_name: Calendar related function and data *) -let leap year = - (year mod 400 = 0) or - (year mod 4 = 0) & (year mod 100 <> 0) - -let mdays_in_month = [|31; 28; 31; 30; 31; 30; 31; 31; 30; 31; 30; 31|] - -let mon_name = - [|"Jan"; "Feb"; "Mar"; "Apr"; "May"; "Jun"; - "Jul"; "Aug"; "Sep"; "Oct"; "Nov"; "Dec"|] - -let wday_name = - [|"Sun"; "Mon"; "Tue"; "Wed"; "Thu"; "Fri"; "Sat"|] - -let s_normal = 0 and s_focused = 1 and s_planned = 2 -let styles = - let default = (Obj.magic () : GObj.style) in - [| default; default; default |] - - (* class date_button: one button for each day in the month *) -class date_button i (calendar : GPack.table) = - let mday = i + 1 in - - object (self) - val widget = GButton.button ~label: (string_of_int mday) ~show: false () - val mday = mday - val mutable show = false - val mutable have_plan = false - - method widget = widget - method focus_on = - date.mday <- mday; - widget#misc#set_style styles.(s_focused) - method focus_off = - widget#misc#set_style styles.(if have_plan then s_planned else s_normal) - method set_plan = - have_plan <- true; - widget#misc#set_style styles.(s_planned) - method unset_plan = - have_plan <- false; - widget#misc#set_style styles.(s_normal) - - method show wday0 = - if not show then - let top = (mday + wday0) / 7 + 1 - and left = (mday + wday0) mod 7 in - calendar#attach ~left ~top ~expand:`BOTH widget#coerce; - widget#misc#show (); - show <- true - - method hide = - if show then - (widget#misc#hide (); - calendar#remove widget#coerce; - show <- false) - end - -let update_calendar (calendar : GPack.table) (buttons : date_button array) = - let now = Unix.localtime (Unix.gettimeofday ()) in - let _, first = Unix.mktime { now with - Unix.tm_mday = 1; - Unix.tm_mon = date.mon; - Unix.tm_year = date.year - 1900 } in - - (* wday0: day of the week of the zero'th day in the month *) - let wday0 = (first.Unix.tm_wday - 1 + 7) mod 7 in - - let ndays = - if date.mon = 1 & leap date.year then mdays_in_month.(date.mon) + 1 - else mdays_in_month.(date.mon) in - - Array.iter ~f: (fun button -> button#hide) - buttons; - - for i = 0 to ndays - 1 do buttons.(i)#show wday0 done - -let create_GUI () = - - (* views part *) - - let win = - GWindow.window ~title: "Camlendar" ~show: true - ~allow_shrink: false ~allow_grow: false () in - win#event#connect#delete - ~callback: (fun _ -> GMain.Main.quit (); exit 0; false); - - let style = win#misc#style#copy in - styles.(s_normal) <- style; - - let style = style#copy in - style#set_bg [`NORMAL, `NAME "light green"; - `PRELIGHT, `NAME "light green"]; - styles.(s_focused) <- style; - - styles.(s_focused) <- style; - let style = style#copy in - style#set_bg [`NORMAL, `NAME "sky blue"; - `PRELIGHT, `NAME "sky blue"]; - styles.(s_planned) <- style; - - let vbox = GPack.vbox ~packing: win#add () in - let packing = vbox#add in - let toolbar = GButton.toolbar ~style: `TEXT ~packing () in - - let prev = - toolbar#insert_button ~text: "Prev" ~tooltip: "Show previous month" () in - let next = - toolbar#insert_button ~text: "Next" ~tooltip: "Show next month" () in - - let calendar = - GPack.table ~homogeneous: true ~rows: 7 ~columns: 7 - ~border_width: 10 ~row_spacings: 2 ~col_spacings: 2 ~packing () in - - Array.iteri - ~f: (fun i wday -> - ignore (GButton.button ~label: wday - ~packing:(calendar#attach ~top: 0 ~left: i ~expand:`BOTH) ())) - wday_name; - - let buttons = - Array.init 31 ~f: (fun i -> new date_button i calendar) in - - let date_view = GMisc.label ~justify: `CENTER ~packing () in - - let text = GEdit.text ~editable: true ~width: 70 ~height: 50 ~packing () in - - (* Controls part *) - - let save_text () = - let data = text#get_chars ~start: 0 ~stop: text#length in - let key = (date.year, date.mon, date.mday) in - Hashtbl.remove schedule key; - if data <> "" then - (Hashtbl.add schedule ~key ~data; - buttons.(date.mday - 1)#set_plan) - else buttons.(date.mday - 1)#unset_plan in - - let restore_text () = - text#delete_text ~start: 0 ~stop: text#length; - try - text#insert_text ~pos: 0 - (Hashtbl.find schedule (date.year, date.mon, date.mday)); - () - with Not_found -> () in - - let update_date_view () = - date_view#set_text (sprintf "%d %s, %d\n" - date.mday mon_name.(date.mon) date.year) in - - let update_view () = - update_calendar calendar buttons; - update_date_view (); - Array.iteri ~f: (fun i button -> - (try - Hashtbl.find schedule (date.year, date.mon, i + 1); - button#set_plan - with Not_found -> button#unset_plan); - button#focus_off) buttons; - win#set_title (sprintf "Camlendar: %s, %d" - mon_name.(date.mon) date.year) in - - prev#connect#clicked - ~callback: (fun () -> - save_text (); - previous_month (); - - update_view (); - restore_text (); - buttons.(0)#focus_on); - - next#connect#clicked - ~callback: (fun () -> - save_text (); - next_month (); - - update_view (); - restore_text (); - buttons.(0)#focus_on); - - Array.iteri - ~f: (fun i button -> - button#widget#connect#clicked - ~callback: (fun () -> - save_text (); - buttons.(date.mday - 1)#focus_off; - - button#focus_on; - restore_text (); - update_date_view ()); - ()) - buttons; - - update_view (); - buttons.(0)#focus_on;; - -GMain.Main.init (); -print_endline (GtkMain.Main.set_locale ()); -flush stdout; -create_GUI (); -GMain.Main.main () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/drawing.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/drawing.ml deleted file mode 100644 index a4623bae0..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/drawing.ml +++ /dev/null @@ -1,19 +0,0 @@ -(* $Id$ *) - -open GMain - -let window = GWindow.window ~show:true () - -let w = window#misc#window -let drawing = new GDraw.drawable w - -let redraw _ = - drawing#polygon ~filled:true - [ 10,100; 35,35; 100,10; 165,35; 190,100; - 165,165; 100,190; 35,165; 10,100 ]; - false - -let _ = - window#connect#destroy ~callback:Main.quit; - window#event#connect#after#configure ~callback:redraw; - Main.main () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/editor.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/editor.ml deleted file mode 100644 index 5e3da80cd..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/editor.ml +++ /dev/null @@ -1,101 +0,0 @@ -(* $Id$ *) - -open GMain - -let file_dialog ~title ~callback ?filename () = - let sel = - GWindow.file_selection ~title ~modal:true ?filename () in - sel#cancel_button#connect#clicked ~callback:sel#destroy; - sel#ok_button#connect#clicked ~callback: - begin fun () -> - let name = sel#get_filename in - sel#destroy (); - callback name - end; - sel#show () - -class editor ?packing ?show () = object (self) - val text = GEdit.text ~editable:true ?packing ?show () - val mutable filename = None - - method text = text - - method load_file name = - try - let ic = open_in name in - filename <- Some name; - text#freeze (); - text#delete_text ~start:0 ~stop:text#length; - let buf = String.create 1024 and len = ref 0 in - while len := input ic ~buf ~pos:0 ~len:1024; !len > 0 do - if !len = 1024 then text#insert buf - else text#insert (String.sub buf ~pos:0 ~len:!len) - done; - text#set_point 0; - text#thaw (); - close_in ic - with _ -> () - - method open_file () = file_dialog ~title:"Open" ~callback:self#load_file () - - method save_dialog () = - file_dialog ~title:"Save" ?filename - ~callback:(fun file -> self#output ~file) () - - method save_file () = - match filename with - Some file -> self#output ~file - | None -> self#save_dialog () - - method output ~file = - try - if Sys.file_exists file then Sys.rename ~src:file ~dst:(file ^ "~"); - let oc = open_out file in - output_string oc (text#get_chars ~start:0 ~stop:text#length); - close_out oc; - filename <- Some file - with _ -> prerr_endline "Save failed" -end - -let window = GWindow.window ~width:500 ~height:300 ~title:"editor" () -let vbox = GPack.vbox ~packing:window#add () - -let menubar = GMenu.menu_bar ~packing:vbox#pack () -let factory = new GMenu.factory menubar -let accel_group = factory#accel_group -let file_menu = factory#add_submenu "File" -let edit_menu = factory#add_submenu "Edit" - -let hbox = GPack.hbox ~packing:vbox#add () -let editor = new editor ~packing:hbox#add () -let scrollbar = GRange.scrollbar `VERTICAL ~packing:hbox#pack () - -open GdkKeysyms - -let _ = - window#connect#destroy ~callback:Main.quit; - let factory = new GMenu.factory file_menu ~accel_group in - factory#add_item "Open..." ~key:_O ~callback:editor#open_file; - factory#add_item "Save" ~key:_S ~callback:editor#save_file; - factory#add_item "Save as..." ~callback:editor#save_dialog; - factory#add_separator (); - factory#add_item "Quit" ~key:_Q ~callback:window#destroy; - let factory = new GMenu.factory edit_menu ~accel_group in - factory#add_item "Copy" ~key:_C ~callback:editor#text#copy_clipboard; - factory#add_item "Cut" ~key:_X ~callback:editor#text#cut_clipboard; - factory#add_item "Paste" ~key:_V ~callback:editor#text#paste_clipboard; - factory#add_separator (); - factory#add_check_item "Word wrap" ~active:false - ~callback:editor#text#set_word_wrap; - factory#add_check_item "Read only" ~active:false - ~callback:(fun b -> editor#text#set_editable (not b)); - window#add_accel_group accel_group; - editor#text#event#connect#button_press - ~callback:(fun ev -> - let button = GdkEvent.Button.button ev in - if button = 3 then begin - file_menu#popup ~button ~time:(GdkEvent.Button.time ev); true - end else false); - editor#text#set_vadjustment scrollbar#adjustment; - window#show (); - Main.main () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/entry.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/entry.ml deleted file mode 100644 index 30f3c3dd8..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/entry.ml +++ /dev/null @@ -1,48 +0,0 @@ -(* $Id$ *) - -open Printf -open GMain - -let enter_callback entry = - printf "Entry contents: %s\n" entry#text; - flush stdout - -let entry_toggle_editable button entry = - entry#set_editable button#active - -let entry_toggle_visibility button entry = - entry#set_visibility button#active - -let main () = - - let window = GWindow.window ~title: "GTK Entry" ~width: 200 ~height: 100 () in - window#connect#destroy ~callback:Main.quit; - - let vbox = GPack.vbox ~packing: window#add () in - - let entry = GEdit.entry ~max_length: 50 ~packing: vbox#add () in - entry#connect#activate ~callback:(fun () -> enter_callback entry); - entry#set_text "Hello"; - entry#append_text " world"; - entry#select_region ~start:0 ~stop:entry#text_length; - - let hbox = GPack.hbox ~packing: vbox#add () in - - let check = GButton.check_button ~label: "Editable" ~active: true - ~packing: hbox#add () in - check#connect#toggled ~callback:(fun () -> entry_toggle_editable check entry); - - let check = - GButton.check_button ~label:"Visible" ~active:true ~packing:hbox#add () in - check#connect#toggled - ~callback:(fun () -> entry_toggle_visibility check entry); - - let button = GButton.button ~label: "Close" ~packing: vbox#add () in - button#connect#clicked ~callback:window#destroy; - button#grab_default (); - - window#show (); - - Main.main () - -let _ = main () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/events.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/events.ml deleted file mode 100644 index 91a9872af..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/events.ml +++ /dev/null @@ -1,25 +0,0 @@ -(* $Id$ *) - -open GMain - -let _ = - let window = GWindow.window () in - window#connect#destroy ~callback:Main.quit; - - let text = GEdit.text ~editable:true ~packing:window#add () in - text#event#connect#button_press ~callback: - begin fun ev -> - GdkEvent.Button.button ev = 3 && - GdkEvent.get_type ev = `BUTTON_PRESS && - begin - let pos = text#position in - GdkEvent.Button.set_button ev 1; - text#event#send (GdkEvent.coerce ev); - Printf.printf "Position is %d.\n" text#position; - flush stdout; - text#set_position pos; - true - end - end; - window#show (); - Main.main () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/fifteen.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/fifteen.ml deleted file mode 100644 index efdf51fc2..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/fifteen.ml +++ /dev/null @@ -1,97 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gtk -open GObj -open GMain - -class position ~init_x ~init_y ~min_x ~min_y ~max_x ~max_y = object - val mutable x = init_x - val mutable y = init_y - method current = (x, y) - method up () = if y > min_y then y <- y-1 else (); (x, y) - method down () = if y < max_y then y <- y+1 else (); (x, y) - method left () = if x > min_x then x <- x-1 else (); (x, y) - method right () = if x < max_x then x <- x+1 else (); (x, y) -end - -let game_init () = (* generate initial puzzle state *) - let rec game_aux acc rest n_invert = - let len = List.length rest in - if len=0 then - if n_invert mod 2 = 0 then - acc (* to be solvable, n_invert must be even *) - else - (List.hd (List.tl acc))::(List.hd acc)::(List.tl (List.tl acc)) - else begin - let rec extract n xs = - if (n=0) then (List.hd xs, List.tl xs) - else - let (ans, ys) = extract (n-1) (List.tl xs) in - (ans, List.hd xs :: ys) in - let ran = Random.int len in - let (elm, rest1) = extract ran rest in - let rec count p xs = match xs with - [] -> 0 - | y :: ys -> let acc = count p ys in - if p y then 1+acc else acc - in - let new_n_invert = count (fun x -> elm > x) acc in - game_aux (elm :: acc) rest1 (n_invert+new_n_invert) - end in - let rec from n = if n=0 then [] else n :: from (n-1) in - game_aux [] (from 15) 0 - -let _ = Random.init (int_of_float (Sys.time () *. 1000.)) -let window = GWindow.window () -let _ = window#connect#destroy ~callback:GMain.Main.quit - -let tbl = GPack.table ~rows:4 ~columns:4 ~homogeneous:true ~packing:window#add () -let dummy = GMisc.label ~text:"" ~packing:(tbl#attach ~left:3 ~top:3) () -let arr = Array.create_matrix ~dimx:4 ~dimy:4 dummy -let init = game_init () -let _ = - for i = 0 to 15 do - let j = i mod 4 in - let k = i/4 in - let frame = - GBin.frame ~shadow_type:`OUT ~width:32 ~height:32 - ~packing:(tbl#attach ~left:j ~top:k) () in - if i < 15 then - arr.(j).(k) <- - GMisc.label ~text:(string_of_int (List.nth init i)) - ~packing:frame#add () - done -let pos = new position ~init_x:3 ~init_y:3 ~min_x:0 ~min_y:0 ~max_x:3 ~max_y:3 - -open GdkKeysyms - -let _ = - window#event#connect#key_press ~callback: - begin fun ev -> - let (x0, y0) = pos#current in - let wid0 = arr.(x0).(y0) in - let key = GdkEvent.Key.keyval ev in - if key = _q || key = _Escape then (Main.quit (); exit 0) else - let (x1, y1) = - if key = _h || key = _Left then - pos#right () - else if key = _j || key = _Down then - pos#up () - else if key = _k || key = _Up then - pos#down () - else if key = _l || key = _Right then - pos#left () - else (x0, y0) - in - let wid1 = arr.(x1).(y1) in - wid0#set_text (wid1#text); - wid1#set_text ""; - true - end - -let main () = - window#show (); - Main.main () - -let _ = main () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/fixed_editor.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/fixed_editor.ml deleted file mode 100644 index 1cde124c7..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/fixed_editor.ml +++ /dev/null @@ -1,279 +0,0 @@ -open Gdk -open Gtk -open GObj -open GMain - -let dnd_source_window () = - let window = GWindow.window ~position:`MOUSE () in - let vbx = GPack.vbox ~border_width:10 ~packing:window#add () - in - let evb = GBin.event_box ~border_width:0 ~packing:vbx#add () in - let frm = GBin.frame ~shadow_type:`OUT ~packing:evb#add () in - let lbl = GMisc.label ~text:"hello" ~packing:frm#add () in - let lbl2 = GMisc.label ~text:"drag from here!" ~packing:vbx#add () in - let targets = [ { target = "STRING"; flags = []; info = 0} ] in - begin - window#show (); - evb#drag#source_set targets ~modi:[`BUTTON1] ~actions:[`COPY]; - evb#drag#connect#data_get ~callback: begin - fun _ data ~info ~time:_ -> - data#set ~typ:data#target ~format:0 ~data:"hello! " - end - end - -let corner_width = 7 -let corner_height = 7 - -type drag_action_type = - GB_DRAG_NONE - | GB_MIDDLE - | GB_TOP - | GB_BOTTOM - | GB_LEFT - | GB_RIGHT - | GB_TOP_LEFT - | GB_TOP_RIGHT - | GB_BOTTOM_LEFT - | GB_BOTTOM_RIGHT - -let get_position_in_widget w ~x ~y ~width ~height = - if (x <= corner_width) then - if (y <= corner_height) then - GB_TOP_LEFT - else if (y >= height-corner_width) then - GB_BOTTOM_LEFT - else GB_LEFT - else if (x >= width-corner_width) then - if (y <= corner_height) then - GB_TOP_RIGHT - else if (y >= height-corner_width) then - GB_BOTTOM_RIGHT - else GB_RIGHT - else if (y <= corner_height) then - GB_TOP - else if (y >= height-corner_width) then - GB_BOTTOM - else GB_MIDDLE - -class drag_info = object - val mutable drag_action = GB_DRAG_NONE - val mutable drag_offset = (0, 0) - val mutable toimen = (0, 0) - val mutable drag_widget = None - method drag_action = drag_action - method drag_offset = drag_offset - method toimen = toimen (* coord. of opposite corner *) - method set_drag_widget (w : GObj.widget) = begin - match drag_widget with - None -> begin - GMain.Grab.add w; - drag_widget <- Some w; - () - end - | Some w -> () - end - method unset_drag_widget () = begin - match drag_widget with - Some w -> begin - GMain.Grab.remove w; - drag_widget <- None; - () - end - | None -> () - end - method set_drag_offset ~x ~y = drag_offset <- (x, y) - method set_drag_action (w : Gdk.window) ~x ~y = - begin - let (x0, y0) = Window.get_position w in - let (width, height) = Window.get_size w in - drag_action <- get_position_in_widget w ~x ~y ~width ~height; - let (x1, y1) = (x0+width, y0+height) in - toimen <- - match drag_action with - GB_TOP_LEFT -> (x1, y1) - | GB_BOTTOM_LEFT -> (x1, y0) - | GB_TOP_RIGHT -> (x0, y1) - | GB_BOTTOM_RIGHT -> (x0, y0) - | GB_TOP -> (x0, y1) - | GB_BOTTOM -> (x0, y0) - | GB_LEFT -> (x1, y0) - | GB_RIGHT -> (x0, y0) - | _ -> (-1, -1) - end - method unset_drag_action () = drag_action <- GB_DRAG_NONE -end - - -let to_grid g x = x - (x mod g) - -let to_grid2 g (x, y) = (to_grid g x, to_grid g y) - -class fix_editor ~width ~height ~packing = - let info = new drag_info in - let fix = GPack.fixed ~width ~height ~packing () in - let _ = fix#misc#realize () in - let fix_window = fix#misc#window in - let fix_drawing = new GDraw.drawable fix_window in - - object (self) - inherit GObj.widget fix#as_widget - val mutable grid = 1 - method set_grid g = - if (grid != g) then begin - let pix = - GDraw.pixmap ~window:fix ~width:g ~height:g ~mask:true () in - let c = fix#misc#style#bg `NORMAL in - pix#set_foreground (`COLOR c); - pix#rectangle ~filled:true ~x:0 ~y:0 ~width:g ~height:g (); - pix#set_foreground `BLACK; - pix#point ~x:0 ~y:0; - Gdk.Window.set_back_pixmap (fix#misc#window) (`PIXMAP pix#pixmap) - end; - grid <- g - - method new_child ~name ~x ~y ~width ~height ~callback = - let evb = GBin.event_box ~border_width:0 ~packing:fix#add () in - let lbl = GMisc.label ~text:name ~width ~height ~packing:evb#add () in - evb#misc#realize (); - evb#misc#set_geometry ~x ~y (); - self#connect_signals ~ebox:evb ~widget:lbl#coerce ~callback; - () - - method private connect_signals - ~ebox:(ebox : GBin.event_box) ~widget:(widget : widget) ~callback:cbfun = - let drawing = new GDraw.drawable (ebox#misc#window) in - let draw_id = ref None in - let exps_id = ref None in - let on_paint _ = - let (width, height) = Window.get_size (ebox#misc#window) in begin - drawing#set_foreground `BLACK; - drawing#rectangle ~filled:true ~x:0 ~y:0 - ~width:corner_width ~height:corner_height (); - drawing#rectangle ~filled:true ~x:(width-corner_width) ~y:0 - ~width:corner_width ~height:corner_height (); - drawing#rectangle ~filled:true - ~x:(width-corner_width) - ~y:(height-corner_height) - ~width:corner_width ~height:corner_height (); - drawing#rectangle ~filled:true - ~x:0 - ~y:(height-corner_height) - ~width:corner_width ~height:corner_height (); - drawing#rectangle ~filled:false - ~x:0 ~y:0 ~width:(width-1) ~height:(height-1) (); - end - in - ebox#event#connect#button_press ~callback: - begin fun ev -> - let bx = int_of_float (GdkEvent.Button.x ev) in - let by = int_of_float (GdkEvent.Button.y ev) in - info#set_drag_action (ebox#misc#window) ~x:bx ~y:by; - info#set_drag_offset ~x:bx ~y:by; - true - end; - ebox#event#connect#motion_notify ~callback: - begin fun ev -> - info#set_drag_widget ebox#coerce; - let action = info#drag_action in - let (mx, my) = fix#misc#pointer in - let (ox, oy) = info#drag_offset in - begin match action with - GB_MIDDLE -> - let (nx, ny) = to_grid2 grid (mx-ox, my-oy) in - ebox#misc#set_geometry ~x:nx ~y:ny (); - if cbfun ~x:nx ~y:ny ~width:(-2) ~height:(-2) then - () - else (* should we undo ? *) () - | GB_DRAG_NONE -> () (* do nothing *) - | GB_TOP_LEFT | GB_BOTTOM_LEFT - | GB_TOP_RIGHT | GB_BOTTOM_RIGHT -> - let (toi_x, toi_y) = info#toimen in - let (mx, my) = to_grid2 grid (mx, my) in - let (lx, rx) = - if mx - let (lx, toi_y) = info#toimen in - let my = to_grid grid my in - let (ty, by) = if my - let (toi_x, ty) = info#toimen in - let mx = to_grid grid mx in - let (lx, rx) = if mx - info#unset_drag_action (); - info#unset_drag_widget (); - true - end; - exps_id := Some (ebox#event#connect#after#expose - ~callback:(fun _ -> on_paint(); false)); - draw_id := Some (ebox#misc#connect#draw ~callback:on_paint); - () - initializer - fix#drag#dest_set ~actions:[`COPY] - [ { target = "STRING"; flags = []; info = 0} ]; - fix#drag#connect#data_received ~callback: begin - fun context ~x ~y data ~info ~time -> - let name = data#data in - let _ = self#new_child ~name ~x ~y ~width:32 ~height:32 - ~callback:(fun ~x ~y ~width ~height -> true) in -(* Printf.printf "%s %d %d\n" (data#data) x y; - flush stdout; *) - context#finish ~success:true ~del:false ~time; - end; - () - end - -(* the following is for test only *) -let window1 () = - let window = GWindow.window () in - let _ = window#connect#destroy ~callback: Main.quit in - let fix = new fix_editor ~width:640 ~height:480 ~packing:window#add in - fix#set_grid 5; - let setter = fix#new_child ~name:"hello" ~x:100 ~y:200 ~width:32 ~height:32 - ~callback:begin fun ~x ~y ~width ~height -> - (* Printf.printf "name=%s, x=%d, y=%d, width=%d, height=%d\n" - "hello" x y width height; - flush stdout; *) - true - end in - window#show (); - () - - - -let main () = - window1 (); - dnd_source_window (); - Main.main () - -let _ = main () - -(* Todo - - change mouse cursor - resize fixed itself - remove_child - (drag and) drop - -*) diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/fixpoint.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/fixpoint.ml deleted file mode 100644 index c33b74d5d..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/fixpoint.ml +++ /dev/null @@ -1,30 +0,0 @@ -(* $Id$ *) - -open GMain - -let rec fix ~f ~eq x = - let x' = f x in - if eq x x' then x - else fix ~f ~eq x' - -let eq_float x y = abs_float (x -. y) < 1e-13 - -let _ = - let top = GWindow.window () in - top#connect#destroy ~callback:Main.quit; - let vbox = GPack.vbox ~packing: top#add () in - let entry = GEdit.entry ~max_length: 20 ~packing: vbox#add () in - let tips = GData.tooltips () in - tips#set_tip entry#coerce ~text:"Initial value for fix-point"; - let result = - GEdit.entry ~max_length: 20 ~editable: false ~packing: vbox#add () in - - entry#connect#activate ~callback: - begin fun () -> - let x = try float_of_string entry#text with _ -> 0.0 in - entry#set_text (string_of_float (cos x)); - let res = fix ~f:cos ~eq:eq_float x in - result#set_text (string_of_float res) - end; - top#show (); - Main.main () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/hello.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/hello.ml deleted file mode 100644 index 15ede9a49..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/hello.ml +++ /dev/null @@ -1,18 +0,0 @@ -(* $Id$ *) - -open GMain - -let window = GWindow.window ~border_width: 10 () - -let button = GButton.button ~label:"Hello World" ~packing: window#add () - -let main () = - window#event#connect#delete - ~callback:(fun _ -> prerr_endline "Delete event occured"; true); - window#connect#destroy ~callback:Main.quit; - button#connect#clicked ~callback:(fun () -> prerr_endline "Hello World"); - button#connect#clicked ~callback:window#destroy; - window#show (); - Main.main () - -let _ = Printexc.print main () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/image.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/image.ml deleted file mode 100644 index faf82cf44..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/image.ml +++ /dev/null @@ -1,67 +0,0 @@ -(* $Id$ *) - -open GMain -open Gdk - -(* load image *) -let buf = String.create (256*256*3) -let ic = open_in_bin "image256x256.rgb" -let _ = - really_input ic ~buf:buf ~pos:0 ~len:(256*256*3); - close_in ic - -let rgb_at x y = - let offset = (y * 256 + x) * 3 in - (int_of_char buf.[offset ], - int_of_char buf.[offset+1], - int_of_char buf.[offset+2]) - -(* let id = Thread.create GtkThread.main () *) - -(* Choose a visual appropriate for RGB *) -let _ = - Gdk.Rgb.init (); - GtkBase.Widget.set_default_visual (Gdk.Rgb.get_visual ()); - GtkBase.Widget.set_default_colormap (Gdk.Rgb.get_cmap ()) - -(* We need show: true because of the need of visual *) -let window = GWindow.window ~show:true ~width: 256 ~height: 256 () - -let visual = window#misc#visual - -let color_create = Truecolor.color_creator visual - -let w = window#misc#window -let drawing = new GDraw.drawable w - -let _ = - window#connect#destroy ~callback:Main.quit; - - let image = - Image.create ~kind: `FASTEST ~visual: visual ~width: 256 ~height: 256 - in - - let draw () = - for x = 0 to 255 do - for y = 0 to 255 do - let r,g,b = rgb_at x y in - Image.put_pixel image ~x: x ~y: y - ~pixel: (color_create ~red: (r * 256) ~green: (g * 256) ~blue: (b * 256)) - done - done - in - - let display () = - drawing#image image ~xsrc:0 ~ysrc:0 ~xdest:0 ~ydest:0 ~width:256 ~height:256 - in - - draw (); - - window#event#connect#after#expose ~callback: - begin fun _ -> - display (); false - end; - (* Thread.join id *) - - window#show (); - Main.main () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/image256x256.rgb b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/image256x256.rgb deleted file mode 100644 index 25d499594..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/image256x256.rgb +++ /dev/null @@ -1,19 +0,0 @@ -”·â•ºÝ›±Ï“­ÐŸÒŸ¤ÃŸ¦Î¤¦Ûª¤ÎªªÚ¯ž×¤•Ð¡™Ô±¬â­©Þ®§çž®Ðš¶É”¸Ë¡¶¼¥®Å¢³Ó ´Îª½Æ¨¼Ó¬·Ó¶´ÏµÀÆ´°¼¬¾À·³ÄÄö¾½ÂÇÀ¼¿½·ÆĹÑÆÁÂÏ·ÃÌÅÍÉÙ¼ÍÓ¿ÊÁÆÏÇÄãÍÕßÏØÕÍÎÜÌÇãÑÑâÙÔ×ÚÈâÈÔÜÄÌØÈÒÒÇÍ×ÃÅÛÁÍáÇËàÊËêËÚð½×ïÅáíËÞõ¼ñø¿âã·Úæ¾ÜÙÈáâÅÜÙÃÖ×®Ö̳ÞȱØÉ·ÍÔ²ÑØ«ÑÑ¡Î͎ÒܗÔ،à͑ÖʏϼƒÉ¼ˆÎ¼ˆÝÁÔËzãÇwØɀÚÆ{âÎçӉÝׅáׂÖÜÓފÙԓØ،Ó؂Îá†ÎÒ|ÛàsÓÛzÞ×ráÙyàÔs×Üi×ØgäÆkåÑoÜÏ_áÍdàÈR߸C׸?Ö´GÙ°WÚ°Kç¸EÚ·YÜÊ]ÞÂOÕ¿;Ù½@ÞÃHâË9íÇ<éË@ðÇ8éÉAè´@æ·AòÌ9ÝÄ7é´@ܲ?Þ½Eä¯CÙ²RάLЯPÒ¡RЩ]̨RÀ¿UÀ²XÉ©FÌ´JϱPŹFËÁJÄ¿FÆÄQȼDÒ°OÔ­DدHÒ³PѵPɶYÐÄ^Ë¿WÙ¬PΞ[ѧWتOˬWͨY͘ZΝdØ£ZÌ·XÁ°EŹPε\Ï®N½»T½³Y´ÃY¶¸N¹¶D°³S±¨Y«¨Mª¬U¦¬[§®@ª®T ¯M¥¢M£žZ œG¬‘E£‘K¥Y¢ŒK·[¨…S¦—EžN§`¡–R˜XŸƒ[‘†Qš‚Sš‘R™‡U§€W©€Tœ‡J¢~Qœ~C–tO”iL•rS”tN©lPªoJ¢zT¯pB¥qIž[M lC«gC¤lD±cC³YTÁSI¸OQ´IBÀIE»ZK»OE¸QH°WU¬TK«QG¹VK®TGºV?¬MD¶Z[¾MGÂUK»ZK²QO½NX¸JZÁHP³KV½J[¼ESÀF]Ä@WÆ;VÆ;\·àš´Ù—«Ò”¬Õ™ Î£¥Ê¥±Ë¡­Ø¤«Ñª«Ù¬¤Ò¦›Ñ¯šÝ¬ ×«¦×¦§Û›«Êž¸Å—®Æ ²À§¾Èª¹Î±¾ÅªÀÆ£Æ˨Á͸¹Ç½¼½¾·¸®²¼½µ»½Â²¼È³ÄÄÀÍ·ÂÌ»ÀǽÀÂË¿ÁÀÃÁÃÑÌÐÍÅÐÉÈÞËËÞÀÓßËÐØÌÇäοáÔÄÕÖÒÚÑÍÐÎÑÓËËÑËÐÑÒÆÖÇÄØËÓÙÄÑÞÊÙèÉÛò½á÷ÃÛîÄãö½ëõ¶èé´ÚáÁåݸáá¾ÜØ»ÞׯÓ˳ÒƸÊɳÏÑ°ÍÈ£Ç͝Æ֙È׏ÎƖÙŌÔ•ÌŏÐʖϾÌȊÚσäÉ~ÝÆxÝÆzè׃ãÖ~ßà…Ù܁Ù߈ÑیÑˎÎבÏׅÎÕxÓØyÙÏÙÔzÞØnßÚmÔânÙØmÙÑfèÓpÚÕmÝÉjèÂ_ã¾Oç·Oä¹IزUÓ¯VÙºQâ»Kß½MÖÈVÓÁP×À@àÁ>ä¾=ðÀ;ñÌEîÒ8íÌ4êË@ïºDêÀCëÄ4íÄ9ÝÀ8ܹ?æ´BÝ«RݧPѲIË®SØ®QÔ¤\ϵQõUϯLÏ«PβDĵDƶ?ηHÒ±RɺKDZRÏ·K̼GЯHÒ¶HÌ®V׿\ÖÀRÛ±XѨUП[Æ OÀ¤YɬTҝS֟SÛ§PÕ®ZÔ´WƱIʺLβZÉ»bÅ´Z»¸^±¹U¹ªHº¬D±ªAª¨I±­U°®Q­©Q œG¨¡Q¦¤J¤—G˜N£‹O¦‹Q£ŽO ŠP°„W®ŒQ¬™Y¦•O¨’N¦”\š–Z›”P R™€SœY›ƒU¢€X¥‡R›zL zW¤x\¡PœqYšmR›oP›rS©oN©lIŸvG¦oLŸaW™]T¨fL©jD³n=¶bD²\C»^I´OR½HJ¸HH¿RFÆJG¼EV²SI«XH©TL´LO¾MBºU9ÀU@·VO¿MAÄUAÃVI·ML¼LV³H\³GZ·PTÂKZ¼IUÈMTÈ@Y½ARº9V“°Ù¤ºÙ‘«Õ‹©×™ÐŸ¤ÍŸ¦Ñ®´Õ²¦Î¨¤Ð´¤Ô£¥Ï«£Ø©«Ø±¢Û¯¨Ð¬¹Ô¢·É¢»Å«³Ã›ºÁ¡·Ð¦ÂÌ©ÄĨ½À©ÉÏ°Èɶ»¸³¼¸½º³³¼°¶Ã²¼Â¸¸Î»ËÇÿĺÏÅÄÃÎÁÂÀËÈÇÐÒÃÈÌÌÄÔ×¾ÇÑÀÓÛÌÊ×ÔÃÏÑ¿ÙÑÀàÓÊÙÎ×ÒÊÔÖÎÍÚÎÑÔÜÈÐÉÁÓÓÔÕÔ×èÈàæÍáêÉßô»ÚóÂÞî¶êõµçñ¸åëÅÚé´àáÀáݳÛÛ©äÙ«ÒÇ´Ôη×ĹÉ΢ÐŞÓєØΓÏѕàЌÔŠÒˆÓƂÔÀ‡ÙĂßÈzÞÉ|äÌnÛØwíàuèÚuÕêzÜâ†ß҆×уÑבÙӉÏΊÓ͇ÓփÜÔsåڀßÏzÚÞjàÐqæâ}êÛlèÏuéÊqÝÈ[áÅ^àÊLÞÄIÞÂLÕ¿Tà­RÔ»RæÉXØ¿X×ÄIãÀFåÃJåÁJíÈIíËD÷ÉHõÈ:ëÕ9ôÂ9ö¿Fä½7îÇ7á·2áÆ?ç¾FæªKàªWÞ TÒ­VÒ­LΞ]֝^Ò¨Pö^Á§O̳T϶KÏ´MʼBѼIÖ»Kʱ?̯JÕ¯?Ë­FÚ¨Kׯ?Ú¦BÜ´NݲSß°K΢IÏ¥NͪNÆ®OÒ¯JÕ¦LÙ¨IÍ­NѱRŶT·RÄ´O¾º^ǺSÁ²Zµ»Q¯²O·©@¿¡G¼¯9°¤?¨ª<²­F¯¥A² E«–B¢ E®•@¨šQ¨‰R‹N©•G¡‘K¥‡Q®’P°ŠD­N¨K¥X™ŒU —N›“Y—Š^ ‰`£_ Xœ†\ŸYœ‡Z£ƒM“zV™}UœwZ˜iM’jR¢lU dJ qV¡kP£]L“W_£`W iLª\M´YT³\O´PQ²RSÂJJ¹DEÂGD·MT·EI²FU¦[O¤GR­BN±MHºJCºZ<°_CÄ]<ÊNBÇKEÁTK¿O[¶N\ÃLMÂGOÃGPÃDWÇJLË:YÄ8Pº4\˜²Þ³Ý™²Ô’¢ÐšªÙ¡ Ûª¯Ý­±Øµ©Ì³£Ð·«Ñ®¦Ó¶¥Ù´©Ô±ºÈ±¹Ë®¸É±¶Å¨¯Í¦¹Ë¶ÏžÁÅ¡ºÆ¢»Ä¬ÂħÇÆ«Ì»¸¿¶½»¼½¾³º½³´Â³µÌ¹»ÈµÂÑÀ¿Ì¹ÍÀ·ÎĹϼÁÓÅÍ×ÅÍÔËÌÒÍÃÍÈÄËÃÔÂÌÖÄËÖÅÛ×ÌÙÏÎÝÑÐÙÌÉÑÏÍÚÛÁ××ÍÐËÈÒÍÍ×ÔÛçÍÖðÂÝéÃáîÁáñ·Úì·áëµìè¾ìè½ãæ¸ãÛ´ÞÔµáÛ¯ÝÔªÜϯØȵÖÆ°ÎÀ´ÒȨá̦ÞĒÝ΋×ʋÏϒÐˊÖŅÕÇÐÒsØÒpæØqä×tåÑtá×vßäuÙâuÕÚnßÕwÒځÔцÒ̋à̀äׂÜрåЁàÓwæÍ{âÕvâÝ|ìÚ{ïßyéÛoÞÜbâÔYêË\àÅWá¿TÛÀUݶSÞ»NÜÃHÞÆS×ÉVÚÁIáÂPê¹EåÆ@ëÆHõÈN÷ÅBíËHòÐCêÓ?íÆCéÊ=å¼9æ¹5ã»Bæ°IÞ®NÔ«\Ó¤YÚ \Ó§UÌ®YΣQÒ¡^ɪ]ά_ëXŲPÉ·Jз@кDÖ³HÒ¸DÌ­>̬AÍ®:׫AÓ­7ݦ;ÚµGÙ³JÜ®RØ­IϬRÇ­RÒ«JÕ²HÒ²SÔ¨NЫKÖ«MѸWÄ·P¼ÃV¼ÄY·ÇO¾¾PĽN¸µF³­<³¡?­©:·¦9·¡:±ž=µ˜Aº¢7µ“6¯’9´“B§ŠH¢ŠG ŒE§‡> ’E¦”Iª”@¦’=¬C¡”Qž”X’ŒW”“W•T™„_¤Ž]¤‘b£‹dž‹W£ˆO ‰OžŠS“zP–ƒP“zQ”sS—jJsS“lV›hWœ\Y—b\›WY•SY]R¨RT¯RU®PT´MM¶KN½DJ½GMÄFL¶MN®HF¥KOªMU¯DG§EI¤GG®NCµMI·Y=´S@¾QD¼QNÉTUÅNZÅSUÀTXÀCJÀ>IÉCPÊIYÊAQÁ4\¿.Xž·Û ¶à’³à—ªÎ¡¤Ö¥¦Ó¢²Ô±¦Ó¯©Õ©°Í¢­Ô©®Õ¥£Ó§¦Õ«±Ì¯¸Ã¯»Å°ÀǬ»Ä¥®¿¦¶½¬À¾¥´É¨º½¡½Â¬Éƶ¾½ÄË®¼º­ºÊ¶»Ã´µ¿²¾¸°¹Æ·¿Ê¬¼Ë¶ÄȮøÓü˾ÇÔÏÌÜÅÅÊÊÂÃÃÆÇÐÊÏÆÒËËÒÊÏØÂØÌËÖÒÐÛÒÀÛËÊÐÐÂÈÕÎÚÑÎÞÃÏÛÌÞâÌÏçÊÙèËØñ¿ãï®ãò³àë½äá¿Þí¿ßß·äÙ±ßÙµéβÝÒ³ê̲ÞÄ­ÒÍ­Ñ˟ÙÍ¥ØƟÙĒÞ•ÐҋÜӈÍАÖƉÑÊ}ÍÖÜàqÕßtÞÙsèà|àä|åÙtÝè}àár×âvÑÚ}Ú×~ÓԃàցÞÓ}ÜàˆÔÖ}â×qá×oßÓpíâ{èãzêáwïÛlçÓaÜÖaÚÓWÒÊdÞÃ`Ó¾_áÅRãºKÖ·Kæ·UÛµGéÇGæ´Hã¹Iä¿CãÂLîÃIéÊEçÉMíÑCéÂ@èÈJí½AÝÅDâÁ<ç±JåºBÚ©DÖ²OÚ­PÞ¬[Þ«OϦSɱQÌ°Z¿¨gÀ§UDzYDzRɲKʹPÑ¿?×·?ر7ϸ?Á¡@Í¥?Í«A՞@Ôª4Õ­Iß­HÖ·CÌ´LͦQÆ®[ȪVƪFМGʧIӞAͨHõM¿¸KÀ¶NɳMŶQ»ÄBÁ·?²µB¬­=ª¨<² ;µ£2°¤<¢:¼¥=¼A³œ;§—F°C³–N ‡L©•Dž‹E¡ŠF«–;´‘5©’G¦—O¥˜K—U””W—“R’`—ƒ[˜_ž‘b“]š™Mœ†WŸŠT‘ˆU‘yWtMyP¡rKœmN£aR¡^Q–fV `YšZW”Z]¤]Q©cL¨TU´QL·MW°QT³OF²OS³UK¿OX¼ET°JU¸HZ®JW´FY¬NÁ=FÍ:TÁBTÌ;ZÁ6[Ê4Y‘Âט¼Þ±ä˜¦Û—«ßš°Ö¢´Õ£©Û¡µÙ¢µÒ£´Ï¥¨Ë«³Ñ¡°Ó¬¸Ó·¼Ç¯·Ä¡¼Ì›²È´Ä©±¿¨¿¹°·º©³Æ³¼º«Æµ»Å­Ãȱ»Ê«¼Æ«½ºµ³¸¶¼Á²´½³Ä®ȿ¬¾Ê±ÄÆ·Áº¹É¾ÌÖÊÒ×ÐÆËØ¿ÉÎÄØÐÅÕÅÎÕÆØÌÌÑÍÐØÆÙÏÄÞÆÇÕÂÑÌÅÐÊÕÌ×ÎÃÜÀÔß¾ÔàÌÙëÏÒíÉÜî¹Úã±âç¸Ýíµåä´àã¸êá¬èß«ïÖªéÌ«àѧçÏ©äʨÙƛÚĘçË¡àÏ àɑãΒÙ͔ÓԛÏˑÏэÓ҃ÒáƒÕÞÛæ‡ÞÜØá€ÚázÞßpßìv×ëwÙ݅Üá‡ÓÕ~Õ׀ÒÕ{ÔۈÖç‡ÜîyÖç{åé‚æàxàäyàÞyçãyïÚqìÕnßÔlÔÈdѾcÕ¶hÔ»^Û»XÖ»SÙ¾XܱLä²Jë¿Lì´Eå¹HàºMâÌMäËQçÏIñÏPìÑHäÄMìÃAæÁ>ãÂAàÄMà¸Hå­LÙ­?à´RÕ¯XÓ®UÙ¬VÛ¦cÍ®_˹`Áµc̳`ѨKʪDиIÔ·DǵIʳIж:³C¢JÅ¡RÒ£IÕ¦Eʨ=ʬLÖ¯QѪCÆ®FÆ­DѧRÄ¥IğLęKš<̧CÆ­;êAɯ9ʨ7ƲF¾·MþEÀº?¶µ4º°3±§1±Ÿ7±œ.·‘/—2´Ÿ<¶:±š=°ŒF¯•J´•D¤š:¤<¦“?£Š?¦ˆ3®…6µ…Eª‘I©˜GŽN–”X™ŒU•„P›ˆZ“Y‘ƒSKŠ•OŽ”F›M–„L‘zY’yZyUžoWŸeW¤ZRŸ]MšiF”dI™TR™Q[›RZ¦XP®^LªXM§[TµTJ±MS²UR¯\XµYW±Mb½H\¸O^µMW°?\­?R´CM¹EG¸DD¸OH¾QW´JW±PO·KWÆHNÈLNÌHH¾FSÇJWÇ@OÁ1`¼/`Â6UÌ,P’Æá•È࠿ך¸Ù¡¸Ú™´ä¥²Ï¡©Ú©³Î¢¼Ò›³Íž¨Ï¡¯Ð¬´Ï¦½Ç®À˧ºÊ°¿£µ¹ µ¼¼½©¾½ª»Å³¯»°Æ²¬À¸À¿©»¿´Ã¿®¿À©¯¼±ªµ©³Ä¤¹Ã©¶»ªÈĢ¹¯¿½§Ì¿²Æ½¼ÖÉÊÜÐÅÏÓÆÎϹÏÅÃÞÎÃËÌÈÉÍÎÇÌÉÅÇÏÉÈÓÓÒ¿ÇØÌÒÐÍÒØÍÇÏÄÔÙÇÚÖÉÛãÀÙâÀÕÙÂØà½×è¾ßë½êݵÝÒ¹äÛ´ëà®éÓªäÄ°ìɱèȲáѧéÁ™àÈ£îǘå֞æ֎æדÓҐÐӓÉыÔˋÒ؏ä݊çڅÝׂêçƒçâyëç{äéäæuäã|ÙۂÞâ~ÍÞz×ã‰ÑáwÐ݄Õå}ÒæwÕçsÛêuãåxâàpÜæsÞÖnîÕjç×màÎfáÑ_˾cÔ¼eÙ·^ܳ`Ô³Qã¶QܶNæµTåÁRè½Uõ½FëÁJêÒLðÉKòÖTòÌAáËLãÈDèÄJéÆHãÄ@àÇKÞ´Kè²Hâ´CÖªIÝ°PصTß­V͵ZÉ©dͶ`Ĺ`̳^˦SħTβN³NÀ©JÊ®D̸EÁ¢HƟ>É«>É«Lϧ@¾ @ЫAÖ«DÔ·HϸOÊ­@Ò£KÍ¡D˨Eǖ9ě7Ǫ?­8Á¥>Dz1ǵ:Á´;º¼Cº¹>Á²@²¾,µµ5·´'·¤/Ý4¼›8 /µ—,´˜3°œA¶ˆEº”K¹š;µ—E¦”9¨‰B¥‡;¤ƒ>²„7¨;¯‘Qª‰E™P¥’W£ŠV™ƒT™‹V‡V”|Yˆ‘X‡ŽW‘Y’‰L—Y˜wbšt\’uS•jW§mW•eT¢dSXU™cA‘aF›SH¥VV¨JM£LM³WN¯XNµK\µJKªRU¨WN»_T±]O¸LY·GVµSK½JP±HD·AH¼?E·@H¯MV°JO»TR¿JYºFN·GYËKVÇ?WÂ:ZÇFNÊ@\Ì>ZÍ/ZÉ4TÑ4QÄސÂ㐻鞿ã«ÄÚ©¾à©¬Ö§ªÍ§¦Ô ²Öž©Ó£°Ó¤­Êª³Â­®Â¬´Ã¡µÄ¤±¶¨«¼©³»«¾Å¥ÁÀ©Å´­»´®½¹¸È­·Å§ºÄª±Ì¢²Êž´¼š²½§³Ä¡°¼¡ºÃŸÁ¾§¿½­Ç¿¦Æ½®Ð¾¸ÍdzÙʾÏÑÀÕϸÐËÁÖÉÈÙÒÅÎÉÉÑÈÕÒÃÐËÍÌÔÎÉÙÑËÒÏÏÍÑÅËÓÈÑÛÀØÜÃÞã¸Ùà½àØÀÚÖÁáâ¶ßÞºáÓ½éÒºìÓ±ìÑ®èÔ®ìǦöÊ®ðÒ®õΩíÉ¡öâð͒ö˙îיãϙØҎÎːÓՐÜؙÛݓìçíáçè‡ìâ€ðå|ôäƒèáéè~àézÝßyÕØ}Îà‡Çë‚Íå€Ïæ|Øëzæå}åàoâèqìãsíápáßoéÜgêÍiâËfãÄZßÏUÖÊ_ÜÂbÔ¿]Û½\ÞºXå»ZßÁRê·[ð·Xí¼Q÷¾QóÉNîÍWêÈTôÐQåÚAçÓBåÑDðÌLïÏLíÍHç¿?êÁDݹ<à¯?å²<æ°Dè·NÝ·Yà¶YÓ§`ʲcƬa̵R­QůLƲGÍ©DÊ©F¼²K»©D½¨9»¢;º­D§CÈ¥DÀ¨@Å¥AϱFг>Ò´FÑ·BÈ©Cë>Ǥ5ʦ8Ğ<º¦@¼®7©5Ç­7õ,¿®0¸¸5¸°6º¯.²¹-¶µ/¼°+¹ª/Ŝ,¾Ÿ'Û2¿ 6¸˜2°˜A·B¼•=¹’>¬”5¯Š;«6¨‹B©…Bµ†A´ŒE´H°G¨šR¢™R¥‘N¡HŸ‰N™‚R†Z„ŠSˆW•b™[Ÿ‘U™…Y”{\“zWŸnNhTi[•_T’`G—\I›]G™VF›SG§MR¬P\³K[¯EX¬I\¯DV¦HS°M`µZ[½RM³[J­NPµINµLD¾AF²@E³BOµ=O¬>Z¨L^²L[±DX½JQºNTÃHUÁ@P¼>ZÃE`ÆC`È=^Ï4ZÊ)`Î+[¹å”ÃВ¸Øž´â™¹ß«·Ð§­Í­¬Õ©­Íœ®Î™·Ú¦¬Ï«Î£¯Í¡²É´µÄ¬­º©¸½¥¬Ä©»µ ¿Àž¶²§²® »´±Ã±±Ä³³¼¦¼½«´Ä¤²Á™¨½¤«¿¦¨Á­²Á¡¿Ä£¼¾£º³¶Î·®Å»»Ò¾ÂÕ»»ÚÉÀÐȾÝЭÓÌÀÛÁÈÑÆ»ËÀÈÕÊÊÍпÊп×ÙÁÑÏÎÈ×ÎÒÊÉÁÙÄÅÙ¸Ñ߸Ëå½Ûà¸Ýá¼ÔàÈÕÖµÔî¶àÙµëÉ»äÍ·ïÌ«åÏ°îÍ«òѦ÷θëË®ñɟðƙ÷À˜éϙç܌ÞЎÖҍÞ͈ÑՇȪÞ܅ÞҋêހàÚwæè{äê†ñî†ææ|ÞلÛÙxåæˆÜ܂Íæ…×é‡Çâ†Ùè{Óò{Þéx×ãvÞâjîáiéånÙÛiÛØeßØoæËkßÊ]ÖÒ[ÚÅgÛÈcѶW×¼WÕ»`ã¶Ué¾Rì¾NéµTì¾UðÁMúÇ^ïÐ`öÆSïÑMìÆBóËKóÍ@îÎCôÉEë¿Gç¾Må¸EÞÃ@ܳ>ä°Háµ<Ù®EÙº\Ó±`Ô­YÔ«^È¥eÉ¡aÁ SƦQ»·C¬HǞG½«G°£<·¡D¿?¾¤9­C¾¬H»¤E»­<ŪJŬ>ų=Ê©KȬC¯A¸¢2¾ <Ǚ6¾¥5Ŷ5Á±:Ť8˧1È­2½¤:¯§9´«0³´*÷$¸¸&¹¤.š)É£1ʙ8»Ÿ=·–<¿œD¹šH­‹@ªŽC«‚>¯„H¢‚9«Š>«‰I¯}F®‘H³ŽL¤–F­›UšP¢‹N’U™„HR‹…\’Q†O“Y“‡\š€e“dœ}WœpUnb¨t_›o_œZX—[[˜`P›UI™PI¤KQ¦HZ¦U_¬Dd¨JY¦IS¦U`£UU¦W^©S[³YV°XH¯\F¨HJ¯CC¶@@°:H·?L±@PµJS­EO¯KYµH_³ATÄB]ºLZÀDZ³>VÄ:ZÀB\Ð1UÇ3SÑ(SÏ2Y¯Ò•¹Í’·ÝŸµÞ¥±àŸ¯Ñ¢¯Ø£´Ö¨«Øœ«Ô¦±Ð¥­Ñ¡³É¦»Ê¨·Ñ«´È¦½Á¡´È›²·¤¼·Ÿ·»¦°³¡½µ¤º¨«¶²¨²­¶»«½Ä¯½¾ž·¹ž³Áª§º¤©¼±µ¼²¶Ä¯²º­Á¾ºË°»Ï²ÈÒ½ÄÌǺӿ³ÛÁ«ÓɲÊǯҺ¼Ô¼ÊÇ»Ñ̳ØмÒÒÉÊÔÄÅÏËÎÔÈÌØÆÈÒºÏÔ¶Ìã»Èß®Ñ×®Ëá¹ÐÚ¾Ûç¶Øí¾ÛÚ·ßаÜÖ©èÕ­äͲäÒ§äØ©ôÔ´ïÕ¤ñÊ¥íÌ¢ðĝåēå҉âВâĉàńàׁâÖw×É}ãÊzâÖwäÜ|àÝzá߃âì}åÝ|äÚß߆ÛâŠÑà~Ðá{Îè…Ñð†àôˆÝê„ÞïzÚãréäxæäpÞäsâÓqáÔpÛÙjÝÞ\ÖÓ^ÐÍdÎË]ËÃ`×½WѵSؽ`á²]ïµ[ï­Xð²Mý·MøºOó½YðÁaðÉYãÌDçÔHñËBðÎCïÎHäÍKê»Páµ@æ¼=è·7ã½=Þ¸Dä¬CÙ­QÒ¯Uί^×¹_Ô³l˦hΪ`Ǥ^¸©O·®L¹¨H· N¸ C¯©C¶ H¾¡?´§Bº«E¹®B¼£B¿±DůE»°F·¤>³­<½¦IÀ®9·¦7¹«=Â¥A¸±7¿¬9½¤.Á«1¿ª8Ħ-½§6µ¨6º£2À¨5ʪ$ð"ɨ+¾§5»ž2Ő6͖2Ę=¸–9³’>¨‘5§‹;¦†E£‚D ‹F¦…?¯~C³…C±…N¨O¬•Z¥—S“Y‘•V—ƒS”~GŽT—ŒX—’V•–QŒ†[„[Žz[‡wa—pbžtaq`¡wa¨wfŸf^¦bW£gQ™V\šS[œQ^®SX¬Qe«Id©K_žS[¥][°ZW©a]¬Z[¬^U·XQ°ZF¦UE­HI¤FB¥=E²BL³;S²DL¹DK³LS±MX·BZ½FQ¿DT»4X¹5Rº?[Ç9`É.fÁ0\È-^É*Z–¼Í•·Ô¦ªÕ¡­Ù›¦Ó¡±Ë¤±ÓŸ²Ù£°Ñ”±ËŸ±Ïœ³¿£±Æ§¼Í¬³Ç¯ÂË­¾Ð§ÂÕ£³Ë£½·¦¹´¨±· µ±£¾³¥¼¥º¤®µ¤²·¤·Á¶¾©¶º§§Âš¬´¢½²¥¶°¶½¹³Áµ»Æ±¿É½Åʶ¿Ë²¶Ö¸°Ð¾°Î¸ѹ®Ó°ÃÚ¶³Ì»ÀÊÅÃÇƺÎÖ¿ÐÑÉÌßËÑâÍËÖÅÍáÂÑÛµÏá¼ÑÖ·ÌÜ®ÍÏ®ÞÓ¿Ùç±ÙêºãéµçܨâاÜÒ«àÙ­ëݯãÎ¥èزôÕ¤äΠçҟíΣéÁêƋèŁ澆ÝÉæËzÜËwÜÅtæÓ|ØØtÛÜxäÝsàààâ‚äà…äن×á‚ÑàwßáxÌéÓç×éwâå}æðˆêáæÜläâpêßjáãpÞÛlÖÓhÙàjÚÏdÒÑYÑÌhÉËZÖÏeØÁ[æ½Và±að»_ø½U÷´Rè»Uù»V÷ÃRù¼OïÆ[éÁTáÎ?åÌ<èÑ>éÎDáÐGçÄ>æ¿Bâ»FÛ¶BêºEܼ?ë´Dá®B׫DÙ«SÓ¹OØÄXϬ`ħjÍ«fÇ£bÀ¦Z³¢L´©Qª•W©§Dª¦L¬›A°¢D½©G¼«KÁ¨M¡<ű<Ç©7µ­G°§<À£I·¬O½§?®°6¸¨1´¦B´Ÿ2â4½¥.¾«2²§0±³-·±:°«:¯«:µŸ3¼¨1Ç£ Ä­&¿¤5ĕ1–?½CǍA¼’Bº‹=²‘A¡‘2¬ƒB©ŠE©‰I«‡G°‹?­‰?¨„G­’T¤—L›”QQŒNŽ‰V~G’ŠL‹‰WP•S”‹IŽMŒy[‘€[Št^£rd¥te¤w_§z`Ÿe^¨b\›^a¥W_­Sa²Nd­O^¥Wd¡Vh¦V] [_¥RVŸO^®Vb­[\±PL£RH°SO¢YD£G@¨GA²HG´QPµDF±GJ¯DQµAR¶JSÂ;V¶=QÁGPĸ¢G»ª=¸®5¹­Dµ¨F±¯@¶­E®¨9±®9º«?³›5¹£7¿©)¶©)·­.®°9®¹2°¶4µ³1¹«+µ¢1¹ 5Æ¥)¾ª-½3¿ž1ɒ=Ɨ<½‹9Á‰;¸‡=°6¬Ž:¨‹B§‰@¥‰H³ŠG­ˆL°‹C¨ˆE¦„Q§I˜ŽN–PŠ”F“Mˆ†S‘†NŽŒX—I‘˜JŒ”HŽ†N„‰SŠ~ZŒ}X›v`¤zdœ{c¥sZ©t^¢sf£eb£df®`d°Zh¯Ta¤Oj¢Wf¦^b£\aœWZS`¡QY©TW§HPžHO§JF¢PK¥IF¤KC¥UH¯OGªUO¢SN¤SR§E^¸He¼;aÅä·@æ¾Jí¼Bã¹=Þ¹JܱBÙ´EЬOÖµQɯU˲aÓ´bË·[¿´Z¼ªW±¥`¼¡_±©H¯¤=±ŸI¦–J¯”@¿•M¼–H®¤A·¦=½«;¯©5³¡7°¡A®±=¹¬@¹­E­¨9ºš-2Á®(º¨.·°2½¸&¬µ3±²/¯³-µ§+²£3¼¦0Ǥ)¿¢2ʓ4ʐ3Ȗ;Ñ<º‰9º€:»€:µ€<²ˆA°8§ŠG°B³€D¨I¡K§‰O£‹B™‡B”ŒG”M˜CŠ‡J‡…U„‘X’T™R™>”K‡EŒ‡I‘z^|\v\“„l—‚h¥|b¥{]£tc©i^¥ajž\o§Tc¯^g®Yc§[b¦[Y®^a \cœ]]©YP£[L¤RN£CL›AZ›D\ªNO¤OP¬XI HM¢FM™CSŸDX§EY¯HV«Ea¾GRÁ>c¿:S¾)U¹.S»(]¶3^³)S½-aÌ$YŸ¶ÕŸµÑ£¦Ñ §×¦¦Æ¥­Å¡²Ç™¿É¨À»§¼½§À¸ž½¾¤µÀ¦¼Èª·Ä©·Ç¥¿Ê­·Ð§¬Èž±Êž´È¨·»¨®´¦¯´¦ª·¤³¨¡»¬¦±¢¦³£¦­œ²¯”¶¹œ²·¦·¶­²­¶¼µ­²Âµ³½·¶¼¼»»²»±ºÄ­»Í²¶Ï¶³Ë½µÆĹĿÂͳ¾Èµ»Å½¹Ó¿¾ÐÈÄÌÒË×ÍÁÖÕÁÐÖ³ÍܶÕѹÚÛ³àÓ¤×Ö¦ÝÙ³ßé«åéªÚé¨ßÜ¥ëå§èܛòؤðÖ°íÍ¥àÒ¡æ֔ëϔîΐìדâ͍é˔ñΈ鿊繏뽅îÈtðÌtâ×zÞÛyÔã€ÚÝwàèpáèxÜë|èâ~ÙíÔéwÑîƒßåŠãè€åãÙìÛåˆÖñ‰Ùí{ÓêtÞètßÝc×ÓaÚàfÐÜ^ØÔ`ÕÐcÙÇ]âÉeëÏhâÅZâ¶Wé·TéÁSØÃRâÂZê»`åÂ_ÚÅ]àÂ[Ý¿Xá¾OæËFëÈ@ëÓAåÃGèµMê±Câ²Hç®CÞ¬@å¸Dè»JØ¿R׺LÒ¸IηQØ®UÖ­LÍ¥R̪YË·YǹR«_¾¥\¿ªT¿¤UÀ©F¹Bº¤N­ J¹ J·I°šK¬ >·Ÿ;³Ÿ9´œ,µ©0²¨<¶¦9¯°8±¨A½ž0¹£+Ƥ3Â¥.Á¨2¯0¸°+²²%²¯!¯«)¯ª)»¡9¸™8º˜1¾˜/Ȑ<˔BċAº…@½†4¸{:½}CÁyK¶D¸@©A¯‚<µ€<­C¡Gš{<ž„?–ˆ>™LŒ…G…ŠLƒ†QˆRŠ–EŽ“I—C‹”BœA‹•F••F˜…R™†\€`wn–~jœ~a yf¨vd©lg£gfš\j­\l±Xp±Xm§\f©YY¨`W¦cUª][°[O©VL«WS LU™?WA^žC`¨SWªYV¡PQ›C]ž@[EV­CZ¯>]«=V´AZ¾F`Á>d¿2X´9Yµ1Z´&V´)^³(a¼%e›¯Ú¡ªËœ²Ùš®Û¡µ×ž¨Ð¤½Ì©Ãɟ¸É¨´Á¤±¿¡ÁɟÃœÄÍ«±Ä °ÃŸ´Ì¢²É—¶Ï»Æœ·Ã ²¼ ²¶¤«¸ª·«¡¸¢½«ª±ž©³¢¨¶ª²¹¥·¼˜»«©²²¨¹¹ž»·¦¯´±º¸¼°¼²¾²°¸»¶Â¼±Á¿´¿¿ºÁ¼·Àº´Êijù°Ã´¶ÈǾÌɺÓÅÄÜƸÞ˵ÜÖ²ÝÔµÛ׶çß°ÜÖªåÙ ÝÎ¥àÕ¸ä×®îë¨àá¢èÜ«äážâ۔æß õØ ç׫ë՝çÓ¦ìߝúՖó۔ìȍùЅ뾃êŠïÄ~ü¼{ð¾ïÇ{ã×uïÚoæß|ÔÞu×ÞzÜèÛ܂çëxÚê}Ï݋àæˆáãŽÙê‹ÜáƒßâééŽÙç…ØãrÔè~ßãpÜâd×ÖYÏÓeÖÊiÜÓdãÊYæÏhçÇbÛÎcäÁ^Þ¼ZݾZßÃWÍÅOÔ¾Tæ¸^ØÀVÙÆeÖÆVÞ½SÖÄKÝÆRÝËPåÒPèÄCܬRܬFÚ²NׯCâªDÙºMæ¾Jç¾CÛÀAÒ¸TѼRÙºEß½HÒ©MÕ§TÔ±MƽXªQʯOȟIº«BĨ@½¤>·¢E¯¦Dº™;¯‹<»—5°ž<¹š3©£?µ™0ºž1´¢+²®4ºªA¸¥;°°:½ª3¶š$¶š(¿§.Ê£0¸£$»¥/±«)´©'³›6¼Ÿ4¹ >ś/Ô7ÀŽ<Ȏ3đB½Ž=¸ˆ8ƃ<µ|<À‰>­~F¹Œ>­„G¦Œ7²†9²†>¦†J›Œ<–„G—‘N‘ŽQ‡”S…WŠO„›N‚ŒKQ˜HŒG”’F†DŒ“N”ƒX’‰P `ž}k€h‘vd¤zd§vlœjsšfkXsœai [i£Qe¬]]¢][¢cR ]a«Ze¢X_©XH—XMœVVŸCV˜@h¢@ZŸJb¦N^¥DX£>Q¤;[Ÿ>Y¬I]±BU±?R¬B[­?b±?n¶9`­1Z²,Y­6k±0nµ/d»,m’©É˜«Õ¢«Òœ´Ý¥³Ú´×½Î©¿Ì£´Ê¡´¾¤¶Ã™¹Âž²¿Ÿ»É¡ÀП¶É”¯Ç–¸ÑžµÔ¼ËŸ»ÊŸ°Í¦«ÆŸµ¼¦¯®·«¢¼«£·¨£º²°°«·­¤»´¤°²™®¬®¶™³µ¤­°¦°¯²»·°¸³¹®¾À´º¸·¿¹½¾·Æ®ǾªÊIJ½½±ÃÁ¶ÃĺÈȲÕ´ÝÀ°ØͱØÚ­àÛ¬èÙ´éá®åÔ³ïÔ©èÙ±áÕ®ßקæáªãÜ­ßå¥íã¨ëëšõè‘îܗìޙêá£üàŸþáŸûá“þ҇ÿDŽÿÆÿÐ|úɃõ¾zýÄzóÄzïÃ}òÍqðÒtâÛxßÖxâàzÝáxãÝ}×â}ØéŒÖގÚê†ÛíŒÛê‰Ýì‹Üç’åêŠÛá†ÞÚxåáyÞßqåÛeÛÒ`âÉ]ØÉb×Ç]å¾[âÂ`âÄ\äÆgßÆbÖ¿[ÚÅ[ßÌNÒÂRÝÀWܼ[Ú»YÔÀbÚÃ`ÒÅWÒÌOÔÎWÖÁVáÄNá¶X×°PÙ°\á°Vé³Mß´Mâ²Iâ²Iä±JܹFÕ±EѺMÜ¿SÞ¾KܱQÙ²UÙ´M˺VʵWίPÇ©B½§?í7·¡>¶¥1¿2¹‘.³”;±;µ‘5²•7­ž4¼š(¹ ,°«3±«4®­8¶¯5·¡.º¤0¾ª1»Ÿ#¼£$¨"¨!½œ0¹œ/¶ ,½¥8µ›<´£<À<Ǖ?¾“5¿‘=ÀŒ5À|8¿}DÂH½@º€<µŠF¹‚<°„<¤„G©‰@Ÿˆ8¥ˆ?œ•@™E–P‘“MŒ™PŽ—Y‘¢P‚›S˜S‰”K†MŒF’ŠM‘”FO™‰Mš`Ÿ‰d›zo—vi’x_šwe¤taimž\n”_s—UrŸOn£Pr¦\d¬^]§[[¦VeªL^¡FSžPT LJ•NQAR”Caž@b›BašAb HW§F_©BV¬E`ªA]±7e¦>_£9g­El©>h¬>s³@t°8f¹;o´5q±.mº#lš¢ËŽ³ÌªÍ˜µÐš­Ü–»Ù¨±Ð¦­ÎŸ¸»›§¹Ÿ¸Á£¾»—µÆž®É£­Ã¢­Á¡ªÁ™¶ÉŸ°¾›¶Ë™¸È™¶Á™¯¸™´°§²»¢½±­¹¦¦º§³°§±®­¸¦²¹© º¶œ¬¬¨³±Ÿ²±³±±°«¦¹²§¬Ãµ¶»­µÀ®¼¸·±Ä¿²Éµ·¾½¯»Ã·Á®¶Á°ÁʳÖ̲àʹÚóÜÓ´âѱÛܬÙß­çаäÕ¯êÜ©öß«æͧàÖ¢íØ£ê؝èٟëܚçæœäâçНèà£ëè£íæœëۜ÷ېøЋòNJÿ¿~ø¼ƒù¿óʀöËöË{ûÆyèËwàÖxâËqçÐvãÖsßÖsâáxÜâ‹àéˆâìßé|äó€èòÜé€äé‡àåáäxäÙ{æÙkçÝfáÜgØÓcÖÍkÙÕlÜÌ[èÃUíÇZáÍUØÇT×ÉV×Á^Õ¿]Úº]Õ¸^ã¹\Ù¹XܾVÝÁdÐÅTÒÂZÜÀZ×ÌUÙÊKÜ¿UÙ¸Jå­RÞ¸Nè¬Nê¬Rì¹Ië²Mç»Iå·OÔÀMÒÃUÙ·YнOϵJÒ¬KÉ®YɧWдYɶVÅ®IÊ®C»¢E´¬D¼ž<²¤:¾(·“.²—C©šB·˜9­›8°š@³¤6«/®¥0¸¬)²§2°'²¤4¼¡3¶¬1¹º¤$¹¤"´ž,ºš2½ž6²Ÿ7¾ 9¿¢>Û4¼—FÁ”@º–8¶Š5µ8°ƒ>ą@´8³F½†H«„@·B¤5¢}@Ÿ„D¯;§…C¤•DˆC•“O•RŽ•[’ŽQ†–V†™J–M“—U‚‹H‹N‘T•ŽM•‰IˆO•‘[ž…Y–„VoZ”th–hcbm•gr—arŽOežYl—HlŸMu®fj«cf¤Rf¢Tf¬]g¢T[ªSV£T]O[“FašQg Jf™Ha¨DW CW¤BM¤HZ¨Cf©NW­?a®?[³ê±Dê²Lç¼NÛÁLؼVÞ¹_Ú¼VÒ·QÍ«GԞDÉ¢QÃ¥OȪXÆ¢UɨH·¬I´®B½ 8¶™9²˜0¶•+µ*©‘:°–7¯ž@µ¢8¯¢>ªž7¥œ2²¨3µ¨,±ª)·œ$ê,½«.¾¬*¸ &±—¸˜ ´¢*»¥*¸¢,½¢4·¡2¼™5Ž?Ð@·‡B·Œ9²†0®ƒ/º†,·”8·“9¶Œ=¬‡>°‡>¬ˆ5¦{6­5¥Š6¨ŽE¨‘FšŽD’Œ<Œ›O˜R’“L‘‘QšX‡›O•U‹ŒP…V‹ŽN”šI’—S†šU‡“LŒŽFŒP”sO“p\pX‘aa`]˜\gœ_k—PaœO`œMp¡]r¨`o¡_d£UiŸab£`bª[a¥TVŸTTšU[’Ud˜P[¢OS¢N[©PK¥LG£OPœNb¡KcŸIa£LV«E\¯>f«Hn²Cn¸>l·@`µ6dº=j¸2d½%dº!p¤É†¥Ë‰¬Ï†«Ã—¨¾ ­Áœ¯Àœ¢¾›«·¤ª³—¨Á¥¬º ¦Ä¤Ä­¿‘­»Ÿ±µ™¶¾£¨Ã ¬» «¿š¤¶¢¥«¢¡¤ž©®²¯´±¥¶°£¶¹±±Á¬»¶ ©½›¨¹«©µ¨¤³§¬´›®·¦¬¿£©Áž¶·ž°Ç£ºÆ¬´¹µ´Ê¹ÂÆ»Àƹ¼¼³¼µÈ·ÇɳÈƪ×ήæ̬ÛÔ³ÞÊ£èÖ²ßÍ´ìÚ²îџåÒ¦øޞéá¡õÐ¥é͜çޔí֒èؖ÷ܔúܝõݒðՑåӚçޛáҝãԍê΍ëƗòĔòÒÿÂúȇÿÀ~íÀë½‰óÃèÌèÓxéÅlëÏpêÔwÙÕkéÑtßހßÛ|êð|æéxâìsÞæzÜê|çé{âìsâçxÞífáÞjëâbâápÝëfÓÚdÜ×pÛÍ_áÊdãÐ]ãÀUßÂLÜÒWßÄFäÁHç·NæÂPݺTéÅQê¾Zå¹\æ½Wå®TØ®YÚ¬SÜ°Hà®KÞµEé¶Qì®?Þ±Eê©=î±;é¾JæºRä³QàÁQã´OسWÒ»KγKÒ¦RͦOƧT¹±R¯K¹©Rº¯L¸¦:º©0³˜-¶Ÿ.¯›+¨›%ªš0ªŸ=¢˜AŸœG¦¡H­¤7±•?¨¢3¨¤0´˜)¼ž*¸¢-²¦-½¦/±£!¶”-³š²¥·¬(®§'¾¦+¹Ÿ3½˜0´™<¹‘?¹B¯Ž3¯8µ…%©–.«—-¶™/­–=´†1ºŠ:¦…4¢„1£3«–,š—C¥ŠD•‘C’Š=ŽŽL––WŽ“GŽ¡H’¡H”O…‘N‹ŠT‰ŽK‘“N‰ŒK•ˆJˆ‰KŒ“Qƒ‡Yˆ†Z“v\‘eXˆaY™WY•ab ]j˜XešW\šJl Pl˜]j©ed©dp™Zj¤Vf£XZ¢MU®V]ªQP¡ZZžNZ”NhŸS^§I^¬KX«PK¡FM¨O\˜MfBm¨E]«HY°OZ©Fo¶Pf¾>e´?]·4j¿2b»7f»#l»&s~«Ê‚¢Ã|§Á…¡Ã–ŸÅ™¥¸¢«¶š¡ÀŸœ¹ ž¶¨žº£¬¾£¤Æ—«¾Œ¦È¯Á“®·¤¶·©®½¨¬¾¬«°¢ª«¦¢¨¤§­¤®µ¤§±®¢µ³¬´¾°¹·¥¶·±º›¬¾—®³ž¥·˜¯¸žª´œª¹²Ã¥´» »½ ·Ç¨³Î¥±Å®·¼³¹Áµ¾¸¾µ»¾²ÄͬÌͧÕΫÞÏ°ÜϯÞʦðÒ­ðÍ°ëџ÷ޟêä›ëܙëϓëЛèӕòә÷ޜøۚïՌõ܎ïݏïҔíΖáҔêΛêȔâ̌æĒéȚõ»”ù»ŽÿÈÿÇûÁ‡ûɂïÈyñËxãÌqÜÇuæÍuß×{ÛÙoæÜoäÔ}éÙrïäqìÞyêáwâۂàä|éÞtæàxÛìnáèoãéiåæcáíbÜédÖênÖÝfÞ×háØcâÕYåËXÝÖVßÏJÞÀKãÀHí¼?éÁGêÈVìÂUïºMê´Tæ»Vã°\ê¤Væ¥Xå¬WÙ¯L×°MÞ¬Kî«PìµEì¹Dä±@ê´K߸Eã¸EݽOá¿QÞ¹ZعTÛ¶NɧSƧJŤM´®L·¦I¶©M±«E¶¦6¶ +»˜,³£!¨#¢•-¨’/©ž6šŸA—š9¡ A¨™?­;§.§›1°£-°›+´˜!µ #¯¡)¯–&±˜"«—&©”*±¡#µ˜'²ž3®Ÿ2·–<¾Œ>µ7»-°‰4°Š)°Ž"¸“¯”#¹™%±•,¸4·Œ5²†7ª…7 †1¥’3 ˜9š“=œšB›L¥”EšLšD‘ŸM–ŸRŽ™K““U—UŽY‡”T…“R‹ˆRŒO‰‹T‹R…ƒZ{]ˆjbij^b—^f˜WkX`”Nd’[nŸWg agž`i—`s]mž^^¬M\­W`°RU³ZO±SXŸSfžTd S`ŸLU§QI¯WK¬ULªEY@gžAk¦Bg¥G_²D[²QbµIa½I]·C]½ÔºGÝÅIλJÞ²RÙ©TÍ´Jɱ>¿ªJ¾ªF±¤J­¯C¶§G¶žF·¢@±¥,­“.·–*¨/­.³’7¨—Cš˜GŸ¥:¥¥C ¡5«£:«ª;–©6œ™3®’)²œ(¯¤(²–)¦—+§—* +­š%°’!­Ÿ#¬ž3¯™7®›0¬˜.µ6ª†*ª‘$°Š+°‘-¸’0­Ž%ª–!ª•,·‹4²‚3©ˆ=©5£†4 “:©‹@ CŸ•;œ—DŸŒP¨–J¢ŸO –Q‹—T•‘JIŠ˜V‹˜Iˆ‘Q‚ŠWŒ‹RŒ\Ž‚LŽ‚S“uZu\ih•o`‹`o•\jQu˜Ww’]i‘Zm”]k’`e¦]mŸ^l¢OcžTi¨Od¬Q\­R^²PU¬Oa£QXžY^ Za¥QS¤]U©SI«RV±Q^£HcšDf¥Bh¬Fj¯Ie¹Fh´?fÄAbÁGcÀDl·.h±$mÁ%hÆ$dx¦Î}¡Ï€•¼˜¶„£·§¾†¢»“’µ›”µ’£Ã…£¿‰œÁŠ˜»”›´¬»”«½ ¦¿Ÿ¡¶£©½¤¡È›¢¾ž¤²¤¥¹¤¡·¨£´«ž«¦ µ°¯¶¤¢·¨ ´©¥´¸¯¼œ©À•§Ê“¢È˜§Î–ªÆ¸Ã¦³½¬½½³²Ê²·Æ¸»¹®¸Ê¶¯É·ª½Âº»½º¹¼»Å½¯Ï̸áÌ´áÁ¨ÝÇ¥ëϦôΰçÏ¥ëÓ¤éÒ æʝí՝îԖéɘêǎå׊ì֎÷ɑò̓ôȓëяåЍîуéƀóʋõÊ|é¿}ôÀó»‚ùÇ|÷ǀð¼…ùÂó¾wõ½råÌyÛÊ}ÚÔtÝÔ{çØríÖzáԀáÖzäÕxðÓyîÚvóêmíåfåÔnÝÒfÖÚfàßlØÕnÛÔhÔ×bÔØiÜã^åÖbáÖZ×Ö^ÙÍYäÊ^äÈYæÓ^áÌYÙËKßÄHá¼Fí·EçºVéµWæ±Mè½Tå¶WíµXí°SÞµRè´Mä¶Të¯SìµRâµTÝ¥Dã£CÙ«Hå¨Lã¯FÚ°LÓ¼TÒ¼SήKÉ´LÊ©Eɧ>¸£=²©H²¢B¬›E®£M½«A¨9¾‘(°‹#»‹%·Œ-¾“=´ <¦™9›A™–D ™5¡ž=¢¥9—«4•©0™2™,£ž)¢Ÿ1œ”/Ÿ™$œ™# 1œ”$¥(ª™2§’2žŒ/¦#²‡!ºŽ#¹•©‹"µ‚'µˆ-²†-¯Œ+¤'ª%±Œ%§ˆ+ž1¦ˆ> “?§A¥”E¡“>¤œD¦™D§‹C¡ŽM¥V£’Rš™PU†ŒXŠJ‰V‰ƒR‡‰P‡€]…zUƒzOƒsT‘rdil“of”dl’goŠau’Rs•Qx”_w—ar‹YdœdmŸ]g›R`›QfžQe \l›Qd§VY°OU®O[­\^ŸaZ£eX¨`X§WS®SO­ST¯Pa¦Ba¦Bc²Ea±Hg¯Ol´Fc¾>eº;nÂ9e¸;j²6v·)sµ'o d…œÆƒ½¦½•¤¾…šµ¡¼‡™¼ƒ›°–½Œ£Àƒ¡À€žµŽ—¶‘–Àš¤Â¦·•¡À¡¤¹ž ¿¦¬Ë•£Å¬®š®­œ­±¬¡¶¥Ÿ±­«¥ª°ž§¥œ—³¯”­±ž«¶—£»£¨¿§Êœ¦Í—®Î—¶Ë¢³»¥¶½¯¾Ã«±É§´Â¶´¾¬´Æ´®Ë¶®Á¾·¾¼¶ÄŹĮ̀ÞˬáТç̚áÇ õÔ¬ôË éÒ§é͗꾦àÑ£ðʟâɚôˌñЕéӓåñÒðЗãԌìʈòÑ}å̅ôΆùΈìÅñÂsùÄvó¹ÿÈtù¼€ù¼qè»z÷ÇzéÉ}ÝÐxÓҀÜÛxÚÚsï×nâÕpìØyêÏyíÜnôåvçßjìâsáÚjâÞ`ÒÚaÝÏkÕÜ^ÖÒjÚÎgÒÕ^ÞÜ]åÓVêÚ[äÏXäÐTäËNåÐ[çËLÝÌUæÆSÙ¼IåÀPàÃJîºLî°Tè¿Hò¼JçÀSðÁVï¹\ä¨Vâ®Kë¨LߪVã´Lì´Fæ§Jà¡Jß²P×·Uç³GÚ¯VоXÇ´XƯKƵAƪCÄ´=º´@®­J¸¬@®¤?¯ªR³§>Ç£3³“5º‹%ª—)ª‹6®˜=ª¡1¨š;¡™A ¢5¤ 4–§7”ª5’®2Ž¤5Žª.ž 0›£(¢£0Ÿ£$›™#˜’3¡‘,¢›3•%¬’.­”-¯(¢“®…'·Ž¬‹#³‰ ¦‹0§/²•(£—!«'®‰)¤Ž2¤…)¥‰-ªˆ6¢Š<£›5°šE¤š@¨™I©–L£”A§ŠM£ŠR¢„DšŒQŠN‡KŽƒPŠTˆTˆ{RŽ}ZŠ\ŽsOŠpb—qe“oa˜xc“mi“dl“_o‹Yz_yˆRlZn\hŠas•[g›R`•Xa›TgžYg¡So¬W[²X]°Id¦Z[¯`R¬aY§gP±QK«TQ³XP²RT«KU§DZ©I[©Yg³K_¸NlÀCp»Ae¸8m¿Gb»4i³)uµ%i¿!e‹šÀ…¢ºŒ ¶Š¡¹‚¦Â†¥À‹¦¶~—³‚¢¹½Š“¼„˜´“œº”¢À »šŸ¸¢¨¾¡ªµ™³·˜ªÀ•­¼”­º’¥¯ž©³¤›±¦œ´¦¢©¡¢¥¥—©Ÿš¨«Ÿ£¯˜­½ž«Ã¥¤Á§®Æž°À›±Ë›¬Ð£±Æ¤´¿§»Â©±Ä¶¸À±µÄº»Í±¸Å»±Íõν½Ìǵʼ®Ø½¦ÜÄ¡êÌ çÑ¥éȜêÅ çƙܾßÁžÝ¼œçàäȚììŕÞĒ꼉äëÀãʎ迆ëÃ~éÀ}éÁƒòÁ€ûËuÿÇrÿ¼oûºvý½xö¼pëÇqñÁwçÄ}ßĂÙÊuÕÛtÚÚwßÕiåØißÒfêÛiðßoèÚgèävêàtßßläÙnØÒoÛÐ`ÒÎX×Ô_ÛÚgÖÖcÔÍ^ÚÏ`äÚ^â×TÞÛSëÙVãÎTãÐMÞÑNàÎMÛËPÛÀQÙÈTâÅNí¾Rè»Jê¿Rñ»NíÂXç¼Xè¯_ìªYí©Tæ«Oã´Nå±Sé¨Qá¤Má¬MÙ­TÚ°YݵYÓ®UÓ¸ZηZɸIÄÀPÁ¶G»®A»³E¹ºM±³J¶´F»ªFÀ¦@À¤;.µ“/ª›8«”7´˜:¯ž5¡£2¡¡0 £5Ÿ9‘¥4‘¤2œ¤9•©7”­,¤,˜¦+ž£-˜¥*£Ÿ/ž2œš*˜›0¥•&¦’¨”)°†)­‰«$­Ž ¯‘*¬‘*­–#§‹'¬"Ÿ“(œ‡,¥‹)Ÿ&¨ˆ.¤“7¨•?¦š9­™9«‘?ªA°–F§ŽI¦†E©G¢Š>ƒC™‡F”„KŠ†H‰„JˆƒT‡OzI‹vS…qRŒt_˜t_•qgšqb‘qf…aiˆbj‡dlŒarbq…Vj^t‰Yr“\x—Yl™PeŸTb Na¢Xk®Tq«Qh¯T_±T\³aU°_SµdR¯]O®]Z©WT¤\N¥\X¯R\«U[¬ZY§X]¦S^´Gl±Fo¾dÂAeÄ;m½9w¿-rÁ.wˆ™Á€£¶ž·…¤º|›¼Œ”°…¢¸t›¾¡³zŸµ ¸‰”¯’¢¾™Á”ž¼’¡µ”¤¾§ŸÀ–ž³•©¿™¢ÃŽ´¾™´­¢­ª—¦¤œ ¨™¨©š œ›™«œœ§¥–§«˜¥­¤¥¹¨­¸—­É™­Ä©¨Ñ§Ç£´¿«½Ä¨µÌ³©Ç®¬Ç«¾Ä«¶¿¸»Ñ±´ÌůÌúÒƮϺ¨×½«ê¼¥êśí͘ðžìȒîÑ۾•æΏçœ巗컋쵄åǎã˒éÆïĀäĂçˆâÂzãÃuðÆrðÁqû¾xÿ¼vö¹{ÿ»zÿ¾tÿÀoðÆpïÉxæÀ{è¸xåÌyãÓzØØoãÓxÝÐhÞÎeáÖkÞÏvâÝoêÖqèÔuççmìÝtãÝcÞÊeáÉbØ×^×ËeáÍeÖÕ\áÏcÜÒ`ÝÏVãÓUâÍNêØYëÐWìÓSãÈVâÅUé¿VåÆUá·Jí¸MíÀVä²Gç¼Gò»Sé²RÞ°Rè¸Vê¤`ä¡Uä§KÞ¬Læ±IÛ±Hà¡FÞ­H̬XÛ«V߯Q͹QغVÕºTȶJÌ¿TÄ®N¸ª@µ°=º¹K«¬>²®@´£@¸”;º›A¶2­“6¬•;­›6³Ÿ2¶ž2£¤+¦ 7™•0˜ž0™¢;Ÿ /–¤7£6œš+‘¡1££.¨6¡š%®™+©Ÿ& –$©“"§•+£Œ-ª—0¤"¡'¥‹#³–«—.¯˜.¦,Ÿˆ# •(§—#¡‘)¦‹&§‹'Ÿ”+¥“<¢¢@£•9ª•@¯™Aªˆ@£†E¦’?®‡F£~Oš€@˜=™ŠN‘L—…P‹‹L€PŒ„Q„‡U‚{X…ubˆnZpjˆwXŠh^•c^ˆf`‡fm‘lr“_w‡dq]o’Um’Pg‘Tj˜Oo–Zlš`aœVm¥^gœ[g¬Ug¯_`¥T]§bZ²gT¨XV¢_Q£aQ°RZ§TW¦XN°^b \g©]dªVg­K`­Hf®Gkµ=p½Bd½9j¾6l¼9}¹/xÊ+mŠ“³šµyœ·¥¯~£ª…”¯’®y—¼~¬w˜ªu ±€™­š¹•·Žšµ“¢À¢»œ¼”¥¹“£¾ ´–©·”¦­²¦¥°§ž¬¡Ÿ©š£Ÿž©¥¥¨¨®°©¥«²¡´¶œ®³¤³Àžª¿©¦Å«³Å©´Â³¶Æ·¯Æ¶®Å²¸Ä©¼Â±À¹´Ã½¶Ó¹·ÝµªÛ¶«Ö¾ Ú´¢ßº§ëàçÁ•åÔàÀŒãÁ•íƍæˍïǃó¸‰ñ³‡è·|à»{æȅæÂzé¾wôÀyチâ¾ußÄrçÇné¼pò½|ÿ½xÿ¹wÿ¾sÿÂpþ¾i÷Ãpñ¹‚俁繁àÁ‚ÜÒvÝÖuÞÛpãÓgäÓháÒvâÑrëÔmêÕmîÖmëänòáríÛgÜÉkÚÇeÛÍ]ØÐ]ÖË[ãÏ^àÕ_çËfàÉXêÉQæÇPêÏKäÖFïÎRôÉRçÉOßÉUåÀWð·QîºLó«Wí«Qê¼Uê¾JíºHæ²Lå¤UÞ¥Vޞ\Þ¤X×­TØ®Nã¥Xà¦PÙ¢SЭR׫VϳYɺOÔ¸JÍ·N˼V¾²S¿¯G±®@°³E«®D®­C®›8»–3·Œ2²:­:¯™8¶2±‘9´—:­£1¡ /›6˜¡6£–1 5¢™5 ž5’œ:ž•:›—-§£)§Ÿ-¥-©•(©Š'¦(¢‘1£‰.¥“-¨Œ*¦’&¡‘'©•0°)®"­˜#¨˜&›‘*‡*Œ®”)­“*­‘/œ‘3›”.  4œ›1žž8¥–>§Š4¨“B©F©ŽD¡~MœŠC•ŠE•}S–~X‹~RŽJ“„O„TY‰M_„yf‰gŒ|ZŠwb”fX…`V‡jequ‰kshoŽ[o‘[fWe–Zc“Oo–Wdž^gž`f–R`šJdªRi§^f¤a]°fgµde´[f¢RY X]ª]Z¦]V¨VQ¨[b¦^c²[a²Tl¦Qg«Jh®LxºGwÂGuÂ8kÉ6hÅ2vÇ)xÃ*o„ž¹y›µ|¨·ˆž±|ž®°›³}”·x—·r›«{—¬†–£~•®•«†¢¹ˆ¤½šª´¢œ²›£±’¨­’¤­—£­˜§¥—°¤¡©¬¢£› ¤š¡œ›š¯ŸŸª¦ ¤¨¦®´Ÿª®™¦« ©²—®±œ­À¨®Â©²É°©Ç²¬Å³«Ë¯©Ë³®Ë¸°Ä¾«Ç´­Ï¸²Ñµ¬çº±Û­¨Ø¯æ¾›à´šßµà¾”ܾ“áŠßȏðÍ~㼅åµ{òµyñ±€ò´|ë¿tê¾qâÁxßÆtæÃwãÂjèÅjë½tá¼ö½sòºƒñ¾ÿÄw÷ÅpÿÃeøÇzïºx轀çÃz케çÄrÞÏxÔÞgØÐdÞÙdå×dÝÍfêÒlàÖfâÚoïðpéÚeçàgàÒsàÅfÞÇhØÔ`ßÖeâÊhÝÑcëÉaæÐbáÍOæÃNÜÈVìÇRðÅZñÄMïËOíÇKç¾WäµSòµRä²Jí©Nê°LéÄSæ´Nå±KߪSß²Và¦KážPÛªVâ¡UÞ£^à©XѱVÙ·QÏ®TÈ©S̯OƲIι[Ì®X͹QÁ¶FÀ«M¬µ:«­@¤¢8² ?±š0ª”2§’4¯’7®Ž5´›4¯›?´š;¯¡0¤¤3™¤=ž3¤Ÿ4ž™3š—5œ’=•–:˜”+—¢'¤•.¤˜0 “!¬‹+¢‰­"ª…2§.£0²Œ*¡“0¦‡#°•0´£(§¢ ¯–&žš$ ‹/¦"›‡”"§—"œ™.¢Ÿ*¢ž7˜¦0¢Ÿ;¤ž=¯‹9­†<§„?ªE¤ƒA‡Dž…Mž€Hš„M„Z•‚O’~RŠ}K‰…OŽŒO…ŠP…€^ƒZ€a‡|PŒoK lS˜q^†ug‚rmet‰fmŽYo‡aa’\lŒRj’[r–Qo—eq•\o•Qj£Rc¡SiªZk¦\g§ae§as X`¡QRš^T¡[\¡Xb§L[ž]`¬Tb²Qo¨HiªPl²Rl¾RiÁG}¿Mwº;zÇ;wÅ?‚Ì)tÅ!pƒ›Àšº…›¿ƒ¤µ™®s›ªn“³s–±}Žº}•²š¶‚”¨Š–¬…œ«†£¬ˆ©º˜©«—ª••§šœ¬¡œ¬—§®œ©´šªª¨§¯¤¦ªš££›˜¢—¬¥¡²­¢¶¯¡¯¯¯­£¬–¤§›ª³›ž²žµ­ Å¯¥Ì²¬Ä¹¦À¸¤Ç°±Ò¹ªÑ´¨Ñ¶¬Ñ³§Ø±¨á±¦Ù«¤áµÜ¸›Ú°•Ö¬â¶‹ßÁ‡äÀ‹ấêÆ}ðÅtåµzî¶~õ¶yï¾ué½jéÇhåÂnè»oÙ¾cÝÄkâËmàËwéÅ~ï»|ð´}쾆ö½~ùÂvùÄoíº{î¾zðÃwíÀ~éÉzéÃßÒ|×ØoØÓpÚÓdèÖ`åÍgâÏaßÞaçÞeèêeòÜcêÖjæËjèÏsêÉuãÓsâÐoåÑbèÕ]ã×_àÐSæÉWã»`Þ»Zá¼PêÂVíÈOåÂYâÅJì¹Jñ»Xä¶Uë¬Uâ®Oà¯Hß»KݶEݸJÛ¶Ié­IðžYêžXñ `ìŸZÛ¡dÚ«\Ý´[Ñ°[Ñ¥KΧL΢S¢W£TʱUùUÅ´L»«K¯©>²­3¥¢4¦š6§”2¤‘2¬•=°‹H¨ŽB¦“Eª¡@§Ÿ7¬¡9¥§< ¦<¦¨;8–•4–”5¡–.¢“-¢”0Ÿ-œ(¦”%¡ˆŸ‡&ªŽ+¬‰(®†$¨†,²Œ#«‡'°‡"¨Š-­’.§›(±ž$­™¦‘¢Œ#§)ª‰&­’%£›$¦ž(› "–˜-™Ÿ4šŽ-©Œ2²‹0¬6¥‘9£…<žˆG¤@‚9™€C£wO›zV—zV—Y‘‡N‡ƒO†P‡L•S‘‚Y‘}YlKpJhRjWŠpa‡h^†nelnYi\i†VgXgŠ\sWyŸZsž[s ]s¡Xg•\l”Uf¤Yk¯Ul¨Xo Ynœ^\¤TT Z[§W]¢Ra¥Ve¤Vd«Vi¯Ij¯RmµNj¹Kh¼Ot¾Ky´DºHzÆ>}Ì/‚Ó$u‰µ|˜¶™»€¬¸vœ³r¤¶wš´j’ªtµx•«z—¯‹­| „—¡}™¬Œ§»Šž­—§°‘¤ª”¥¥Š©ª˜ ¦’««“­­˜¨¦™¨¥–ª–˜Ÿš¥¡¦¨ –®«§®£œ°¦ž¢¦˜®¨• ¬¢¥¶Ÿ¡´£¤¼¦®Ä¨¥¸¶«½´¦Ç­¨Ñ±§Í´ Ô²¡Ù²¦Í³˜Ò­Ÿá®—蹞᳖⯐䰒鳁黄޶€åȀìÅ|ð¾~í¶wö±sòÁkñ·nå³rèÂvèÌgç¾eÖÃiáºaâÆqïÃfìÃuçµp嵂ò½zñÊkù½kð·n÷½mñÈvïÁwæÂ{ñÂpðÑsåÒkÞßnáØjâÑcéÕoïÒdãÕgÛÖfÚçdáðnêájàÙhæÏvíÐwêÌsåÒsñÍläÛcäÔg×Ó]åÔ_àÒLáÆRäµYãÁXñ¿LâÅLåºMà¼Zð¶Oêµ]â·T×»RÙ¬QÙ·PÔ»EáµUׯJà­Qà·Fá®OÞ¡Yã©]ߛSå¦_ФPܨZЮLѪTÎ¥MӜEǞPÒ«VÑ®RÌ¡VÏ¥G¼®9´°3­ ?­›:ª¡<­<¥›4¡’>ž‘F±‘C¡Š?¤‘=³ž7±£D²ª@ª›A¨§7˜7œ¡,˜—4œ,¯—.š‘+¢—"¦ ) “$›‰œ‡$«‡/§‹.¯‘*¦'¦Œµ‹&­ ¨Ž#­Ž*Ÿš(‘0¦™$›‘*›—%‹)®Š3¦˜-§Ÿ/š•#‘“ š0Ÿ”4¤Ž6£š1¥/¨›,¯’> }Cª„G§yE¦|<œwD‘vFœ}P’vWŽ‹L„}M…QŠ†I•ŠW†O‹„Z–€^‹sPŒpPžcS•hW—v\‘scŽgj‘mb•[lŽ[j]p…[x‘Vr“YyŸUpž[v¡Ms•\u‹^m–Wc™To\t¥Nh¡[o¨^]§XaŸQe¥P\ªLlœJ`¡JX®Nm«Di´Rd·Gs®RtÃJr²MqµAy½F€À;{Ê8‚Ï$|ƒ“¼}œ·„¦À†­¸‚¬´x¦´uª¯kž«i¢­o¢®j™ t’¡~¢ }¡¢†Ÿ«~œµ€«­“«©“¬¤†¬«…°¦”¨§«¥–« “ª ¥Ÿ–¡˜”“œ™œ›œ™š¦¡®¢›²« ¯¢—¨ª–«©’§¬”§¯£©™«´£§±¤ ½´¨½¬¤Ç¨©Ç² Ã¬›Äª Ð­ ËµžÑ·“Ú¯—峝ﭓꯆç°}ß©€Ø¸„ܵ†îăïÀñ·yù²|û´nöºiò°jæ²uõ·móÇpë¸hä¹eéÆpéÂiè¿hè¶fëµiå­zéµlñÆhó¼n÷¹fï¼pôÂiöËlîÆtëÈpêÒnÝÕrÖÕsÛØjÞÔiâÕpçÐeéËjàÔpâÙiÛèsÜçtßÚnäßuãØoäÞlìÚbëÔ`îÖ[êÖaÜÄcãÆTëÊMò¾Hè½KáºNæÀMêºTâÃKÛ¿Räº\ݱXÞ±Y߯TØ·`à·WתMÛ©QÞ§Qß©GÜ°NÛ°Uã«SצUÜ¡\Ö¡[՛UߖWàœMÚ¤JٛJ˙Q΢F͙SӚWӞEȚBÁ¨7º¥3³©,®4¥¤5¨™5¡›=Ž<£„;ª‹@­‡<§9®—5¯©>¯¬B±ž>®ž7®Ÿ/®£:¨3£”2¯•4§™%™™"Ÿ•™$¤”'š‘(ª’%¬‘.²‹#®&¨‰'³Š ¯Ž(¤‹!+ž˜1›’5¥Š+¡–"•˜*–*£‘1¥˜*Ÿ–- ’-–”-Ÿ›.˜—'  $¥™-²”6°˜1¬Œ3¦ƒ8¡ˆ=¥Dš‚G”xMœuNyS–wIˆ„JŽƒKŽ…U„ŠZ‹WŽzQ‘WŒw`ŽuZŒn_’gWŠmT“j\‘rbŒme‹cd‘gn”[rˆZr„\rNuXtž[|”S‚›Mz›IjŽPk‹Uq•_l¢Xg To¨_k£]a§[e¨J^¡Ae¥Fm¡H\¨O[¨Oc¤Pp­Wf©Ok´Li¼Mt¿No¼>zµ9~¿<€Á0tÇ!u–¼ˆ•·›·‚­¶€¥ªwž°n£¢p¢ªh¤žn¥£uœšnš¢ƒ˜‚¤°€š±‚£ ­¨†°©ƒ¨¨Œ¥ª™« •žŽ¬§—¨—Ÿ™£¡“—œŒ¦“¤ž›¥“¢«¡¥¬¦¢‘¯¨–¬¤š¤´¡¯´ž¤³˜ª¹§¦¹±œ·®¥·ªœÁµŸÀ¨¡Ê¨–Ó²¡Óµ–Ó«ŸÜ¸˜Úµ•è¯™äµ”见䳍à§|Þ¨{䰂丂öÆîµ~ö·rþºoú´nù½oò·kë¹gùºgô¾qð­gôÀmìÄfë½cé´oè²oé¶tôºjëÃgõ¹níÄo÷ÈhúÌiøÍcéÅkçÔtæØmëÕqàÌmßÔißÕfãÓkáÜqÛÒoÝÔg×ànÝëpÚ×j×àpßÓpá×hçÔeìÝ]àÍcîÒbÝÎVßÐ]ÜÉ]ãÍJá»Tî·Ræ¾QÝÄGßÇSÙ¿TÕ¹Tè¿YÙ»bÓ¼[Ó·aÒ¸_ض^Ó²SÓ²QÖ§YÚ«VرFÞ¡Pä¦[ۙ[æ›Và¤ZÒ¡YÚ£QؚRٝNۚWՑV͛KϚWؘWӗHŗKÁŸ4À3ºœ;¶˜6ª˜3®Š@Ÿ“9¢G£‹6§—9¬ŠE®‰G¤£<ªž>¦ 5¨Ÿ9¤¦)²ž/¦¡)«¨/·›4³˜/Ÿ•*¢Ÿ¥“#‹"›•,•˜.¡‹2¥“.¢2«‡+¤"©ˆ#¬Ž%£‡-“%¥•*¡0–Ž/œ“1“1™š&–ž(—“6Ÿ*”)–š'šš5 ˜1¢š* š%Ÿš8£˜=«”<©‹9¨‰8¥:™<•‚E“|SJ‹~R‘{Y—ƒZ‘…c–wVŽ{e‹‰U’}Qz\‹q[ŽyT’sTwO’mV›f]k`‘j]–qlˆia„\t…Sw‰Wx’K]•OsšUy™Uu—IsžYv—W{¡Uz¤Pi¢\i¦P`žRl§Da¡Ae¡En§Hc¬K[«La®Lp§Nt©Jg±DmÂF{ÅBr»=yÇ3~Ä6|Ð1zÃ.|‚š°ƒ‘²„“ºv£¸y«¯~¢¥r¡¥uœ£n¢¢m——q–¢všx¢œƒ¥©†£«…£¤§¡‚ž¢™…­ž¢¡•§“›£–¡¤¢™œ•œ’’Ÿ•ž—‰ª’Œ¥˜‰«¤—¥ ˜ŸªŽ¦¬‹¡­•ª¤±ªœ¨¬ ¥®§™¶¢•®¤”º®œ¾´”Ë­ŽÒ¯”Óµ“×·œà¼”Ü°æ³‹äº‹ñ»‚íªŠã¦‹ãª†Ú¢}Ý©wã±ë»zðµyùÀrø¹lô´jó½eó¾ló¶eôºjú®nô±oø¯gí¼jï½iíÂkç¶tì¸kî®iì²uñ¿wîÀlîÃcðÑdóÚkõÑfñÎkóÔtéÔmêÎpàÎtßÝpÙÛqÛÜnÓÖfÕÖm×ÞoßÞnåÖaÜÝdÚØ_ßÚaÚØaàØaàÑ\åÈXéÈRãÏSÜÏOãÃUêÀ[èÂRè¾SÞÁQàÁUÓ¸VϾ^ÜÄ]Ü»ZÙµUâ°`Ü·aâ¬[Û±Tã«^Ú¤WߟPߣOâ©Tã¤Rç–Nå—Yå [؟Qڛ^á ZÕ£V؜SۚNڌYГNϑNȌBŊDǐC¸”:–4º‰3´‡;©‹>§—G«•@¯˜=¦›?« B°”E¨¡E©A§ 7¤¨-¬ 3«§,µ«1¶©-¯¥)­ž(¦ ©™'¥—&š –ˆ,¡'˜”,œ—*¥•2 ‰0„)¨*­€$«ƒ,‰/œ„&ž‰/•”.-›’.‘Ÿ&˜›)œŸ(£—0—”,™Ž2žŒ7¡’+¦†1§‰+£. 7›‰*¢‡. ƒ;ˆ9¡{D¡{@“…A”ƒNš€UŽ|Y„[–{`ŽtgŽ~a˜ˆf˜‚[”]•v[—pW•uW t\œuR•pX—nW—hZ‹kZ†[hŽZm‰X~‡T}”M~‘S|G}‹Lv“Is—S{œT€O}žWršTn›WhžHm¨Hs£Gm©Ge¤;i¥>fžDg§@k¨:k´>l°Ct´@q¼Gy¼DzÀ«ˆ6¯ƒB¤Œ4´™B±šA¢¥>°¥=£žLª’Cž”FŸ™6›—.£ž*­™'­¥(©¥"«•$©¡%¤“"©”(©–-•Œ–…0ž‘+œ“ ™‹)¡(Ÿ/¬•+¦Ž,¢–)¯Ÿ’/™ˆ%¢#–›$œ‘2šž(œŽ4š4Ÿ—)ª–)¦’)™‰, (ž•(™—)ª•.ž˜/œ:’†7ž1‚1–…:˜{Bžx>Š|I‡‹R–~X‹t[™‚R yV„bŽ}b•tQšT˜oWŽkak]•r\p[¡sc’iV˜sRfV‡b^•hp—fxŒSmLs•W}‘YzŠV{…U€ŒMr’KuM‚•K™I{ Rx£Xj•Tp”Nu”Rj–LfŸCl§Gf¤QuNq¦Cy¦Ir®A€¦Mƒ·CºG{¹6¼AuÆ8ŠÉ4€Ñ6Šm‰«w¯xˆ¬}”µq‹³rª‚–ª€•«t’©m§x—šy£”} ™„©™ƒ¡ ‡¡‹¢¤‚§šƒ£˜ˆœ›£¥‡  †ª–¨Œ£ž’Ÿž‹ œ”’–ž•ž››ž¡£ª¦¢«¬¤¥§–ª¤¡±•ž¬¥³šš³›œ¸¤ ¬¤›±ª‘±¥˜Á¨¿­À³˜¿´ Î©¡Ì±šÛ´“Ö·‘Ôª†Ú±~Ù¨…Þ³ŒÝ®‚â¬~ì¶ró¾nô½uòÁjæ½bë¹Zù¹]ÿ»e÷¶jú½k÷½còÅgë½dàµb߶oá½sî¼eñµoó¹wïÂrâÀoÜÄqßÉcèÍ]ò¿_æÄgãÏ^ìÊhñÓdôÑgïÇtëÂ}ÛÎwÚÑ{ÑÙq×ÝgÜÛgØÚdÙárÔápÐÜhÚÎfÖÎXÖÆ_çÂ\êÀXßÅJß¿KìÆOîÈUíÇVë¹VؼNÕÆKÏÇIÓÆLϳZÔ¶aÌ´`Þ¼Sà²RÒ­Rз`Ô±bç²Tá¤PÝ£VߚLæžPä™Oà”Mà’IٙGۜGݧV× NߨEΪSΜO՗BЌAґ?ύCӘ@œF¶ŽJ´’?¼‘G»ŒH²‘C±‹5®‹5«—8¯–>ª FŸ£<Ÿ¥A¦ŸFŸ“9©-¢•,¥›(¨œ,¥š#­‘&³“!¯ )­¥*©™,¥Š0€+£5£Ž/žŽ)¢$¥%ž—"¨Ž#©–+¦(ª‘ ¥Ž,–“5¡‘.£—'œ(œ)—”-‘. ™4§›*™Ž$™’ ™!–’,•œ2 š1—“0˜”:•Ž:Ž„?“Š7™„9‘{D‹}B‡yH†‚U“xQ‘z[yWšyX’z\•{R}^xXŒr`kXšpZ¢qe£f_škfœu`‘rZ—kdjh•ip’cyUvˆRq”Yv•TzŒL{‰OzˆRŠNw‰PpQwžL€ŸNy™Ip—Uv”Op“Ug—DgDb¦Jh¡Ou£J{šHyžF¥L¡J‡«M„·K‚½9zÉ9†Ã>Ç=„Ò<ƒn|²|Œ¶xˆª´x˜²r–¬‚Š§w’¬u“£oˆ¦p•p¢”z¢—}©¡{¤›ˆ©¤§—‡¥š…—’Žœ–‹’ž’¢£ˆ¡–“«¥Ž¢•’ž›–¢”–’ž£¡“›™¥©£¬ œ§­£§¥šž«£¡®¨­ ©¬Ÿ¤³±¦±¦š´¸™¹¶ŠÂ±“ꊵ±’À±¢Ñ ›Æ¤”Ì¥™Ú³…Ö¦ˆÐ¢‹Ù°Œà¤~ܳ€Ý»~óÁzî½gø¿rö¶bæ½bôº^óÀZìÂ]ú½iô»kñ¸aï³föÄmà¼fÚ¿iéÁgé·oñÃrò°vé³oãÄiêÃeàÎbëÆgîÀhãÀlàÎZßÓhß×véÔmæËußÍxÚÊjØÕtÙÙv×ÓkÜÖoØåkÒåwÓÒsÐÛoÖÐjÓÑdÙËWÜÆXèÇUÞÃMæ»GéÀKã¼[èÄ`ãÇYÖ·SÒ½LËÂFÆÄNȶ^ɶ`Ô«a×»WÓ®ZÔ©QÙªbã°ZèŸQâœ^á¦Sé¦Tە[å–PæIߘBڞNè¤Nè®På›LӜ>Ԗ@̘NԖ@ڔ;ԎI̓C¾ŠDÁŠK¿Ž>»‰LÁ„?µ“EºF©>«…@¡ŠA¥¡BŸ >£ 7•š0–—4›’-œŸ/¬š4°¢0°–3º”+¶—1¹“-®˜4¬œ.µ$¢/ª},œƒ2Ÿ‰-¡5°Œ1©,¥›-¦›&´’$¯”%®žŸ’0£Ÿ:““4œŽ6œ6””.œ•&“œ-˜˜(¬'—‘"”'•'–&›0Ÿœ*›1••>•ˆ:Šx.š…=“=šC‡ƒDˆ‹HQ”…U’‚SyTvQ–yT˜yT‹uY‹y[•kT˜mZ˜mažu_•o`šrWŠkg“n]hf‚hjŠ`wŽexWtƒPyX~’\q‡U‚Vr„Xz”Hx–S{LƒŒNxKm’Mx“VhšTq[e›Uc˜UeŸKgKoŸU‚—HœS‚¢EŽ¬J…´D‹·Eµ<Å9ŒÁ<Ì=†Ï8~{„¯z‚®q‘°y—¯x·ƒ•²†²|…¥u…¦s˜z›¢wžœz•˜}˜—}—ž¤§€«¤€¢™‰Ÿ£Ž“œ‡’“Œœ˜Š›•’ª›Ÿªš ¤’Ÿ§‘žšž“—¢—–¨“¥ ¤¦Ÿ¢™¢¡œŸ¡ª£¥§ž«¯¦³¨¢®©®­ ¥®–§¹“®¼‰µ±‰½¹–¸²”»©”ƤŸÏ¢™ÊŸÇ©“ѯÛ­”Þ§‡å¥ß´‰è´ƒî¼që´ní±gî¹aô½\øÆXñÃYúÃXñ¸aõ±iù²gú¼kó¾læ²qå·tã½xä¿xë»m÷·sý¿yó·näµhàÂjÔ¾vÙ¼rÝ»jàÆgàÏuÙÍzØÔvàËzÞÎkÑÆmÔÐmÖÊt×ËrÊÛoÒÕuÒÜtÙÎuÙÐjØÉcÏÇbÑÊfß¿XÝÉKéÄJïÃNå»Rê¶Zç½\ì¹Nâ½MßÁLÍÁRйRϲY×·XϲXȱWÍ´ZÚ¯]تTקTå™Uà™Pè\éŸ_áZݤVä™Hî–@éšGߧAã£LÜ¡HїC̗GÑ @ӝFҌCÆCÁDÁ•FÀ‹?ňA‹KºŒG´‹@±@¥ˆ<ª‹J¦I­œN¥£E™š>™™0—“0Ÿš-§œ1§š7¯œ8º›>µ¤A¼:º‘;³.¶“*°‡"®‰,§ƒ+°3§ƒ3®‘5°/§™&­™+©ž%¯›©¢Ÿ!¥¤2¡ž1–¡7’5’›8—6ˆ˜,š'“—. +Ÿ‘2š”+‘&‘ž%’˜4—™1“6‰…2†„4’z*”…1›„6ž:“ŒAŒPŠ‚SŠ„O{M’zZŒqYrN•wRŒqSmZœnU›oY¡j]›mc˜jZ‘sYŒiaŒpa‡qc…hs_x‰cy†ZzŒVŽ]}•Tu•Vz‹VxŽR~‘Sƒ—[yU–Sw’Rpœ]r›\hŸbk˜XjWg—\t™Yt£Pt¥O|ŸW†©P‰£O‹«MºG¶F¾I´L‘»Aˆ·;À<Šv‰«~~³|Š®x†¦€—²{‘¨€…³€Š¨vsŽ ~¤{—›x¢˜¤…œ¢›¨†¦¥ƒ¤¡…›’“Ž•Žˆ£Œ¨”—¬””š–ž¢š’——¡Ÿ’£ ž£¢ž¯®¢¡›ž¢¨ž¥Ÿ§²°¢¦ª£µ©£® ¨¨˜£³Œµ¦“¸­†´«“º¬’¾¥œÄ›šÃ©Â¥•Òµ’Э‘Ôµ„屉筍ݰŒæ²yî½tã½uá­qí¾]ð±jé¾Zô½[ê¿_ë¹gö¸bó¨]æ³dç¼dî²të¾kçµtîÃqó¯oç´dó¾uô¿läÊiÛÄdåÀeÕ»nÞÌqÚËsâÆnÙÐs×Ó~àÖnØ×jÍÊt×ÌhÎÓoÑÖrÓØrÌÞlÓÜmÌØfÖËcÑÉjȼaØÆVÞ¾TÝÃIèºJâ¹UìµSÞ¸^ß³[â¯NØ·ZθNËÄIÌ·UѼP̲Y×®^Ú»]Ò¬PÕ­[ЮWÖ£XۗRêŸRôŸIèŸOâ¥Uê›NڍLè”CےHØ£H՚IϤNÒ£?ٝIË¢<ՓCɌFЅH½ƒF½„=¾‰;ÁBÁ‰L¹Œ>¾>¯„:³‘5 >ªŽB©›@žœ9©‘Dœ@­ ;¢“0ª =¯™?µ“;¼˜@¹—@¹™9·œ,«‹)².·‰*¨….³,²„-·‡:³Š(±‰!®™0©ž.ª%¨Ž ¥ž™ !–” ¡5œ—;Ž=š3”“3‘”7–¥',›—$›Œ–‹›'”¥–œ-—•+‘‡0Ž,•~+†x-ˆ+”Š8ŠxAŽ~@’uPŽ„QŽMƒzLŒxY—x[‘mX’zc‘yZ•wb‘t[–dc’r^Ÿhe™la›mh˜lY‹kcˆll†`l’fo‘ps”bu‘Zˆ—_s‹Pu‡boŠ_mŒX}˜\†PyŽX€‘Y|Ws—bj fc›_obu˜Xt¢Ypž^|œTt—]zŸT…¢Uˆ¯Oˆ¶L‹«J’ºI”»O—·A…°I‚µEÌBŽr‡§v„«v€¤w†¬xƒ±wˆ®t|±y~²{‚®~•¥˜«|‘¦z Ÿž›ˆ–­—­Šœ£„™§–›ˆœ‘ —¥‰¯˜‹§—˜™’š–™œ™’©“¢ž¢žŸ©¥¨££¨¥¥¢ªŸ›¢¦¡¡®ž¦£”®®š´ ˜¯ ”µŸˆ®¡µ¨¸£’¾¤šÁ£’ݙə–š“¼ª”Ê®ŠÓ¼ƒÜ·„Þ©ŠÞ¦‡ç±€ä©vá±oÚ½fä·lç¯hâ¯gëµeë¾QíÆZðÂbì³fè¬cí¶cçºeßÀmæ´në¶hì¸lð¶hã°féºuíÅ{ìÅ{äÇnÝÇmßÈjÕÁrÜÄxÕËtØÄwÝÉwãÚrÝáiÖ×oÔÖcÒ×hÏÖbÊÔhÍÝg×ÙqØÎcÈÔeÉÈ\Ò¹[ξVÔ¾WÝÀOí¿Hä¿Hã½Xç±Xâ³XÕ¸SÔ¯WͳKÌÁNÕÈCÑÀI×»YÔ¸\Óº_à¬WÚ®RÕ­Nß©NÚ¡Pá¦HîžGå—JåžNäŸDáŽHيGۖQ؜PНB˕K՞JÜ£CÑ IՓFȎI͎>dž@½‹@·•CÀ•@ƃJʃM¿A¾‹3¯6­‡<Ž<›ˆ>¤‘>­’F¬’C·‘3°™2§•:­•G¦ŽL­˜@·–@½ 3°’7´Š.«ƒ,­‰;ªŠ-±Ž)´Š-¹€2º0¾#²Œ+©•)¢+©’"¢‹› œ™#–’0›˜=–’8œ1–Ÿ9‘¥4˜ž&˜“(›™““!˜Ÿ%Žœˆš‹‘'Ž&Œy0‘~;‹…7—†2“4’|7Št>ƒp<‚tK~€Pˆ€O‰‚Tšvd—zf—sc{[’yY‘u\ihšgh£ma›qcžhf˜ad˜i^Šheejˆs{Žp}Šqz—g‹f{[t“_{‰aq–^€™X}‰\x†O{ˆSz†Ypaf˜_lbr—`ušTl¨VnªWxœW€–Y{ŸX…§Xƒ°Y¨L…©NŠ¯C—±H—°O•³E¾>†ÊB†p|¯j{²s…²pz³oz½zƒÀr|º||°…‡±‡–³z“¨}Œ¨xŸ|•˜‚–Ÿ‚œŸ‘‡’¨€œ›‹’˜’ž’”Œ–••œ˜¢–¥••£“ª£›ž  ©—Ÿ¥•®§§¬¤—¡¬œ­¤£¨§³¥—´¢—»¨—« —º Šµ£‡¹ª•¹¨‹²®”¯¤º¨•¼—“¼ ‘¸«šÀµŒÇ¶Ö¶Ó²~à¸yê­xä¶nà¾gã»så¯nÝ«låªdä¸Té¼XêºUò´_å¹Sâ¬\íºWâ»YèÂdâ¾rå¯hð°jâºké¼mç¹mæ»mê¼pçÃxßÐåÊpåÉ{ÚËrÞÎrÙ×uâÖráÙuÖÜnÖÐ}ÒÐxÐÜdÒÔcÊÏrÒÕiÊàeÖØnÔÕqÏÆ]ÑÄXÒ»TÚÃPãÀ[ïÄJÚ½KèµTä¬Lç¬Ná±UÕ³VײQѹSÔ¶UÍÃJÙ±MÔ±NÑ«[× L×°TÙ¢FÖ®RÞªSæ˜HçœEêžSݑM՚WۓV֟WәGِQɐ>ʞLÖ£OÙ¥LܚA˕JǍ;ÁŠBƎGÀ‡NƏ@ȋEÀ@ƄI¾@½‡:¶“9¦9Ÿ–1¨‘1£2©”8¯Œ>´™E¼œ=®Ž<¶ŽB°•B¸¡Bº–6¶¥1¾’/°˜;«Ž<¹”<¯6¸‘5½‘$¾…1°)µ‹$¸” ª“±#¤›œ–"˜—- Œ"š(“•8“’9;œ¢:—.“Ÿ0‹™‹––•‰š‹žˆ™!Ž#‚ƒ$†€/’z8ŠxA’‚=t6†:’u:s@uJ‹uLxK–yZ˜{fœ}\ ncra’wgžjj™po¥al¤cX¤ngbd¦md”j[˜^išgb–nzpyŽnƒ—q|Šgr^n•iŽm{˜a}c{PzŠ\z”YyŒVu‰Xq’X|•^lžax [w›V{N{¡N‚¨ZŠ¥Kˆ©S²\‘³O‹¥B®PŒ¸N”µ>±G¼I¾9hƒ°jy¿s{Ár}½wyÉ}yÃ}ˆÂ}†·~Ž±‚¯xŠ·vŠ´w‹¨†–¥–©†’¡„‘¢}›˜„˜„—“‘–“’‘•˜œ‘˜›™™¤–§ ¡ “£™Ÿ‘¡£“¡³’¥²š¨¶§¤·¢£®£ª±š©¹–Ÿ¹—˜´¢”³¥–»£™¹©Ž»ª‰²¦«¤–¬ªŒº­»¡Œ¹²†ÃµÌ¶ŽÉµЯ„Ô·|Û·uÝ´tݺlÛºlà³må³méªbë¯^ä¯Vî¿Zè·Lð·Oò°Yä¶Yà´Vç¿Uï»déºfî®cê²lé¼oß¹kêÀqïÁkè½sëÆ}îÆ{ãȅî҃éÌ|ÞØ}áÙoÔÜkÔÕwÕÛrÊÓ|ÖÒzÕÝqÓÙm×ÙjÓÝeÌÕiÊÛnÕÐoßÅcܾcØ¿]â»XèÀWà»UåµIÜ­Hå®KÞ²KݳMܾSܾTиTÚ²UÖ¹YÖ´XÒ±QÕ¥KÖ¤Ká®Iá¨Lå§WÝ¢PáœLà•EٙM܍TߙOՖTҗN͞LҙM̒Aԙ@̝EΚ=؝?Д6ț=ŞGĒJƏJĐNȕH½GÊ>¾ˆB¿‹7±“9¦.¢2œ‘9¢“5›‹5¥‡C­=¶ŽD»“L´B­–<´œG¼™<´ž<»š;²˜=µ˜>¹™9µ1¸Š1¯.³Œ±ŒºŽ °–%¯š ª’#§“¥›&™–()•”0‹.—Ž5™”8–˜,–+‡“-“+‰œŠ‘‰•‰‘‚”%‰‹+‹Œ-‰1ƒ3„v@Š|FŒz;•wEŽuBvOŒzN{KsSœwT›ta}k¡ug¢|_žtg ke¦ekªf[Ÿc\Ÿ^g¤ge¥[cž_ažiišgfŒsoˆqx‚ut†ww‚w€oyŠt~‘n{™mv‘^|“[q™Wl›]s[o‹ZwšS|—U}¢Yw—]†šTƒ Z¦SŠ¢J…¤M…±L®O‹§M“¦CŠ´J²F·K‡µC’¸9Â7Œe±iv®s…¶nŠ»}~½ƒ°zx²x{µ…‰ºˆ²~‹«t§r“ªš›y™ †Œ›‹— Œ–…–Ÿ‰¤˜™–’‘—¡›™¡ “Ÿ¤˜«™ŸŸ¤–™¡˜—œ®”Ÿ¬Œ¦³£¨²™Ÿ´˜¤¯ž¢¦›¢¬¢ ²¢¤š‘µ ´Ÿ~°¥’« •¨ ‰ª£‡¾›‡¹£¹¨Ä­Ì³„ïwÖ®Í¹t׸wâ´sÔ¬uå³lè®lã»eð½Zö°YêÀVí¶Pð´SçÀ]áÂRä³Uâ¼^çºeâÁeÜÁpà´fá¯cé±aÙ¶kè´ièÀgãÉvã¿zÞÄxݽ~×ÃzÜЃÛÓäÍyÑÌw××kÓÍ}ÆÈ{ÆÜl×änØàtÖÓmÎÙdØÙlÏÎeÒÙ_ÖÎbÖÂeãÆWåÆMÚÅUÙ½LÖ¾SØ®V׺Mß»C×ÂIݶVÌÁPDZLÕ¸[Ùµ]ͯPÒ·RÒ­FӛOҟD՞PߟMä›Mâ”EەOߜF֕NӜM֕_Η[Ë VƔAŔBЛ@ۜKס=ЗBٞLƞHǛDƒGĐM˓G¿‘L½I¾Ž<¸•:±‰:®–5ª=¨;¢ž0¨•< Ž:>©ŠF¨–>µH©ŒJ­˜D® ?·œA±š>©Ž6²Š@¨–A°“>©‹0¯†.·…%·“,­Œ#­%ª'«š«’³™§“# ”!£š-’Ž4—/–’)‹š4–˜/Ž $‰#™-ƒ•Ž%†‘ˆ¢%Žš%Œƒ%‡Ž*‚Ž/†v/‡9‘r4ŠzE“C‚EŽzL‡rG‰sM™€\•{X§yZ©oh wl {d¨yt¤oo du›gf¤uW¦a_ kn¢\g¤e`›nnŸinŠioxvz–rtŽu{ŒjkŒn~n{”b„”cy‹\užbseqgq–^s§Q‚¦aw¡Pq¥SwœUv£S®MŠ®X¤N«HºC†¥NŠ¤I‚³OŒ­Q•±BŽ¶F»D‘»1Šb~¤h~ªcƒ¯o‰¶n®xƒ­n}´o€½±„Œ§v’©r‰¡sŠœu™›z“¡~Ÿ†“§‹Ž£}ž¢Ÿ‡—ˆ——¨¢¬”¦­”¤œŸ£§˜¡šš¦§£¤¥²Ÿ£³Œ›«›± Ÿªœ›«—™¦–ž¤¦ ¦–˜¡–›Ž£—›žƒ£¥“©§Œ³˜ˆ¸žŽÃš”Ç¢†½¢{¾¦|ȲzιuÒ¶qÔ·{Öºwß®så¦aÝ®]á³bâ°Zó»[ôÁVæ¶Wíº[éÀcìÁbæ¼_é¾cçºiÞ¸uÞ½që»géµjè¿fÙ¼cÛ¸pé½rëÁæ½|ÛÇxÛÃÔΆÔ΀ÙÅzØÆwÐÒlÐØmÍ×qÓÌvÖÝsÇÝn×ÏhÙÎhÖÏrÖÜmØÔiÓÐWÏËUÐÄcÝÊ`ÜÃOÐÈKÕÂTÚ·RÞ¶R×ÂHßÀIÛÃJÜ»MËÀJ÷OȸUÕ³TÛ­U×­RάGԛJїH؛FߒCàšIޔLؓJÛ¤EÔ¦MΛS̖ZÉ¢ŢQàDțGבGٔJÒ¢G؞HםTїOďF¸“FÀ™Dȕ@ʙI»A¼7·›=²–>´ˆ3¶<¯š6§¡7Ÿœ1£’5£ŒH¦ŠI£–E­žA®–J¹£Nµ¢Aµ‘<­=¢ŠB§‹:¥A¦†@°~=ª-«ˆ'ª‘1²+±‘ ¹±’¯²™!«”«ž$£œ/˜‘)›Ž&‘.ˆ 0ž.–¡"——$Š“(ŠŒ)Ž.ˆ‘)š+‹™#‹’"‰Œ•1ŠŒ6†‰/„x5„s5’uB‘‚OŠˆP‰yOzG‘uG|Tªz_©wa¨{gœ|i§pq¥mq£ru¡sn™qhv[šw\—hižjk¨ccœmqœoq“mwŠpwŠt}•|~•pulnˆl{Šh~…mƒ‘f…ŒjŠ”d†\Še}e†¤^~¢Vv¡Wp¬Qt¥Rs±Pv«N±O‰³VŠ²Gˆ´E€·Oz©K€¤SŽ¨L‘®J–ÀG‹È<‹¾<f€ª`{±b€°c‚¨q~§w€«w…µs„°‚„µ…€¦ƒ” v›~‰œsŠ¦„ˆ¦|›}‹§‚›¢Œ˜•~¢˜‚›•“—”–›–¨ª˜™§– ™Ÿªš¥¤­—ª¨˜¯™œ²œ©‘•±ž•¬¢®š›¤–¤™œ ˜’ž›“¥š«“†¢š­Ÿƒžž°«³¡|Àœˆº£Š¾™„¿¡„È©wÒ²xˬrÕ±uܸqÕ·mÜ®kå®`ܧhá¶aêµ\ó´Vçµbð¶\ìÀ\æÀaá¹`ãÄVàÅeî·eæÁtÞ¼nç¶jß¼pؽlÓ´\ݵpê¸vèÄqßÅuéǂÔÄtÙÐÙÉrÖÒpÇÓqÓÍnØÔjÐÑiÚÛqÏÖxÐâkÓÕlÓ×_ÝÜcØÛaÖÍ`ãÍQÓÏUÍÀbÚÀTâËUá¾OÙ¹[׿QÛ´VÖ»IܺKоJ×¼QÔ®X̼NϪWשPѦ[ܯ^Ù¤WϖIӑFÔ AݓDזDޑSРFÚ£QТDÍ¢NȘ^ͤVˤPÒªUŚN˜HÚ¤DזPϝE՝I̐FƑA¿ DÞK»—D½ G´ž@·‘Eº”AµŠ6±ƒ5­@¨”@¤–6¦–<¤¡A©J¨œFž“JžR°ŸT§£R¶E·•K¯’?©ˆ:©Ž:®:±…C­<®ˆ1«‰)¬ž*²!¨›#µ˜'¯˜!²¢¹£ª$¡£$¥™&‘›&œ’3“›06”'’”3–˜&†Š$€‘2Œ‰'Œ‹!Œ–*—#‚“+‡“'‚“1ˆŒ2’A‡F—}:—E†E‡{FŒ€I™†V¡z]w\¤wc§uk›mp£yi§rtŸkr­nh¬wpžm[ xo¦lr£hn¦ej§sq’uq—mp“r{’pršnx“s{kn”hr’ky—g‹š`ˆ˜k‡”h‹Œl…›f}’\ˆ¬Uˆ¥W¡OsŸ^ož\{©Uv­S~¬O‚©I„­P}²CƒµF}·A~¬H†¬A–»<ŠÄ<Ç6Ç4‰[Ÿ\ˆ¬h‰©f‚ªl„©w…¬yˆ©t|°{{³‚‚¬€…›–›|Œ–‚ˆ¡…Š¦z¢~”¢š¢‚ž”†¢–™”“¡–“¦ ©•˜ž–¡¤Ÿœ«£¢¨¡¡¥š«™–®˜§’“©“›¦Ÿ ¥§›§¥¤™™™™ˆœŸ†ž”« ƒ©œ~£™‰§§ƒº«x»«{¨z¾›ˆ¼˜‘¾•ˆÎ ƒÎ£‚Ø«uÕ«wÎ¥zÕ¯qÕ£jקcÞª]ë­]è¨eñ³^í³Sî·Yé½\è²`êÁgÞÂ\à¼dä½hãÅjâ½tÛ¹sã½pä¾sÝ»fâ¾ué¿u踂ç»ÛÊ{ÚËtÒÐoÓÇrÔÊyÇÏqÍÖnÏÑwÇ×qÏÝmÆØjÍÖmÑÔfØÛ`ãÕYÜÒ^çÐXáÐXãÇ^Ù¿VáÅVßÂKصNÕ·RÒ¶NʲJÖ¸QÑÁUϲTÑ´RÍ·Xʱ^ΫRǬT΢_Ó¢^֖XҔR֓SܚLӒQ̔KƖKѝNͪDȪKÅ¢PÊ©XÊ©QצXÛªYÒ¨XЩTФMÇ S͗GГGƖIßNÁ¤F¸¡E´¥E´œN¸ŸI»›I¿”Fµ‡;³‰@±‹?¦•D§@¢š@¢¡E  >¤žJ ˜Fœ–O¤™R³’U·˜Pµ‘C§Œ<°<«‡9¥’3­7°Œ;¬Š3ª˜.®š0§›0«š%¨’¯›©§²¦!¤ª"›¦)•¡'˜¢0š¤-•˜3šŽ3–‘.Œ‹(Š‡-~‡'‚.ƒ”.„”"~š(ƒ“"…—‰'(„ˆ.’5ŽŒ<’F˜„B‹?Ž„@•EŒ‡Q’~X¡ƒTœ‚b§t_¤j]¥jj¨sežri¢w`ªvg±~l¦ulŸzi¤rt«kv¢op xr™pg™xmŸxr or£l}›rt”tx˜f”f‚œ`ˆ—\‰“aƒ’dŒ›`‡›g‡£`}£Z„¡\«Tt©Pv¥WŸZ{žSz¥EwªGy«@‚»I…¸A†·@Œ¾:Œ³E‰¶>ˆ¼8ˆÀ?Å=‡cŽ¯`¦gˆ¡lŒ¥e~ªh~·ey°p{µm«zŠ°sœv— r§€’©sž~œ~¨}™…™’‹®— Š ž™¤“—Ÿ—ž” °— ¡›˜›Ÿ« Ÿ©›–¦¡“²˜–¤Ÿ¡¦Ÿ¥­ž•Ÿ ˜››”§š‰¡”ˆ¨–…¦’Š™†¬©|®¤º«†¬‚³˜„¸š‡½œƒºš‡ÃžsǨ{ظnЬoÚ§vѤsà±`ã²aåµ^â·hàÁWéÀ[öÀVä²\í®fã´[á¼[àÃcÚ·nÚ¸yÞÀnæ´v×»m׸iسrçÀeçÃpâ»uä½åºzÒÇ}ÛÍnØÄqÖÊjÉÇpÑÒwÕÒjÚÔmÔ×kÑÒfÎÒvÓØ`ÐÐgÓÌ_ÞÆSÔÂRäÅVÖÉLÛÀN×½PÚ¾P̾TÉÄXÊÁNÑ»PÐÄOÊÉKÛºUݱ]Ƶ`Á¨WͬZÏ´]Ö§\͞c͕Q̛MܕJТMʤFӝRҜPÉ£WÓ¡XɧE̟UÇ¢MɬNÒ¬QÈ°WÖ¦^Ï¡WÁV͙JÓMÈ E¼™I˝Q¬AëOœP¿™L³ Mº J¬“I¶˜J¤‘>¬’;³–8®˜8¥ŠC¤’9£’?Ÿ•>˜‹?œ–A¡ŸHª˜H­¢F§—HŸ—C£…7¤‡6«“;¦‰3¤•6£’4®‡1¯0®‘2¯–/³"¯š¥ª"«®%¬§¨˜%¡—%• 0™¡;Žž/‡™3‰”,…Œ5ˆ™'{•*y)€™*„–z— }–‘(‘+‘—*Š”5‘“8‰Ž2‡@˜‡<™F†7‘ƒCŠ’T™Qª~O«wV¨tg§rl¯plªl^¢{`¡}f¤}m°to©liªugªzp¬ll¢w~œlm¨~r™~vœzt™wz•du™fm˜qu™tr›l}—aˆœf…’iŽ]žb†›`ž^y›WvžW~¯_u§Z€£Uƒ¤Oz¥R‚¤J®L}±J}´R´A†»>’¹?‚º@‰µB‡µ:ŽËB’Ê;†^ˆŸS€¥a¡f‰¥n‡¤ez²]}ªd‚³g”­e•¨h‘œp‘Ÿ|Œ§xŸuŒ y–¡t“œt”˜y¤Ž~«Š‚¬—¦•–œ˜–¡Ž•¨‰œª’£¤’›œŽš˜‘©£ž¦™ž¯˜˜ª¡ ™™›©Ž¤¬’¥¨“ª£‰±¦€©žzœ—xž”„§˜|¦¦‚­œ†§™€ª›ƒ´’}½›ƒ¹ª„Ųƨr˵mʶpЫtÜ­sݧpÚ¯hà¯eÝÀlâ¹`ßÂZâÅSôÃWïÆbá¹`ßÃfæ¿dÞÅiá¾påÀs߸vâ±wÖ¸qдzØ´tݼjâÈiâÅgáÅqØÀxØ¿uÚÀyÐÇlÖÆqÑÃtÜÍsÖÏlÞËhÚÊnÞØpÐØoÓÚnÌÕ_ÒÉQÏÃPÓ·]×¼XÕËTÜÈKßÉPлIÄ¿MÈÃXÄÆK̽LϾRÔÉPÙ¼]Ù¸`Ù®eȯZÙ¨YݪbژeؖdӓZԒQ֜TϚQƛOʦOÄ¢NȚ[͞WÔ¬LÓ¨GҟPÒ¬YʯPÄ´U˪bȤV¾™P¿›QŕFŝQÜLÉ£GĬF¼®D¾žIÀ O¼ EªŸK¦•Bœ•D ŽB¯–C¯•7¯‹:¡‹BA™@˜Œ?œŠBœ“;¥—<¬›F¦šH«žC¢’C¦“6¥„0¤’5¯’1­Ž+«Š+²Š/­ˆ&©Ž1¬,¤¨*¦¦ ¡©(§¬%§¤!ª—.© 7¡š/”2Œ’6ƒ›.„—+‡—(} 1y”5u™(p¢#w {œ‡‘Œ—Žž ŒŸ-‰˜+…‘.‰“5Š‹;„FŽ…>–<”D™‹Nœ}W¤zO®v^ªpf®q^¨m^›odšsdzr§vn¥zj¨og¢tp¤kž|u¤nz©|u­|~¥rt—wmŸhy—jv”snŒqk‰s€•k†Ÿg‰˜e‡Ÿ]™\†–Z_ƒ”j{œeu bt£Xk©Y~¤X‚šP‹Dƒ¦Gˆ¬K€¤Bƒ­J´C‡Á@Š»:Ä=Š½5†½:“Æ>”Ì7‹R‚ªZ‚§]Œ¨\‹ª\³a®[ˆ°k…±aŒ­eŒ¯m—«k–—o”f‰‘mš z•Ÿv”›‚¡“…œ†£‰‡¤ƒ—Ÿ‘˜¨‰›£‘ž¦Š—­˜œŽž ˆ«–£˜ ª•œ¥š•¡¡‘¬œ›œ˜¨«’¬¯…¡ƒª¨€Ÿ–xž“ƒ¡¨•…© Œ¢“{¦•}¤’†§Ž‚µ”€Àu¾ª|Æ£kÄ´hÁ°pÓ¹nݸtÜ®wÛ¸kÙ´nâºmÖ¾lÙÅcäÈ`ëÁ^ç¹Yß¼cá¸XïÂeÝÀcݵrØÀj×´oÙ°nѹmÞ¿hÙ¶mßÊjäÌcêÏhÝÃjÙ»tܺuÙÅf×ÍjÛÃyÙÇvÖÌiÞÓiØÇoâÎpÑÏjÜØlÕÒbÏÊVÑÃVÖ½QÖÂ[ÓÄPÔÅGâÍLÏÈF×ÄP×ÄJÓÆ\˽XÄÁRÓÄQÖÌPà·bܲcÚ±fÙ±_Ù¯_اiâŸc֜dڛ_̚]ϛWМX՚\Ô®QѦV֚OÛ¬PÖ¤ZÓªJљVؤ^˧YÈ®a΢`Áž[Á—XǤJºŸNƜHº¢T£SÁ£E¶¤B¿£KÁ£@¶™8¨“6¬9ž”D˜„=¤‡5¢’4©“<¢Š:˜Œ9¡…A£‘A¤Ž6”;©‘HžœC§‘G¨ŒH¨H?ªŽ-¤‰9§Š9«‹'§Œ1­ˆ0ª‹,§™#¤¡ ¬›*ª¨$žž#§¡)§¥%¬Ÿ$¬˜. ˜6˜™/‡Ž+“*¤3‚*w¥*|¡*t¡/‚¦„š„ ”%…‘–‘”†ž"‹˜'’š.•—/˜‡D ;——;œL¡‘R•„L~J¨|U©kb¦mažka i^”jfš~j¥|m¥qg©vo¡i¨~p¢~uªns¥tx«xt¨u}•ty•pu—fu•dz˜kt™ky—_ža‚–bŠ™b~¢hz›e„£\z›^~›\s©VoŸ^x¡P~ªRŸP†¥I¦M‹¦T€µF†¸>®I—¿D‹¿DŒ½H¼<…¾;ËG—Õ;ŒZªU«Q…¥R†¨^{³Y~°c„«c…¯^†²]…ªc’¤e˜œkœ˜e‘k’Œu™ž~‰ªƒ†ª‡«ˆŽ¥…¤¨Ž¥ªšž ”¡¤˜§¤©¦Œ©—™°Ÿ¨ž¬‰¨¤”¥¤’œ¥†¢¬ƒ¤¤} ¥x¢›€©˜| ‡£™Š¡‘… ‘ƒ¥”{ŸŽ‡ª˜ƒµ—y»Ÿuº¤m¹­j¾·fƵrógдjÔ¾hпvÒÀ~áÃuåÍrÞÈdâºoê¼hä½jíÁ\ê½]ê¾cÝ»mÜ·kÜ´dÛ´nÝ·jÛ´fß´kÛ¾qÜÅoèËmàÂyäÇsÝÅqÚ¿kÔÍsÒÊpϽpØÁtàÐx×Íj×ÊpÚ×dÕÙ\ÖÏ]ÕÌTÌÌNÚÄIÖÂPÜÇSÑËQÖÂOÖÀDÓ¼GÓÈJÉËGÏ¿OŵZʸ[ѵcØÁ[âÁcÛ¹[á·\Ú±aâ¤Zâ^ښdٛdДdӖYÒ cқ_͚aÌ¥bͯdÒ©TÓ¬XÞ­Yâ§[Ö¤WͤUÕ©cÈ«ZÆ£^əVɛS¾œM¾£S²¤U¶ªX®¬V³¥Lº˜C°›>±–8·š6³™:ªŽ:¥“0¡‰1¦Š-™†9’6£8¦†7ˆ8 ’.¡5 –<¡’B¥H¦‰HŸ‡Jž†Až†C¨†9¬z4°}3°9­‰.®Œ+¬‘)¥–%¬—$±˜'¦˜+®¤.¨¡%«§$§¢$¨•"¢”,˜‹$‘+†–0†Ÿ,{¥"{š'¥.z§(ƒ® „¥(‚ž%}œ!~˜ƒ—)$”™!’&Ž’)“”8›–7—–:ž“8•†@š‰M“ŽF—ƒO£€ZŸvfšms£un™|f›rh sj§}b±yo©{m®}j³xm®uv¯xz±x~¬qy wužxu’vy”ix•ho˜`sžet•b|”[ƒ˜_„ ]}d|•\u˜`xžVoœWtž[s¨Vv¥N}©GŠ¦?”­GŽ¯I“¬K‘¸MŽ³=´F—µL—ÁR“ÆJŒÉKÃLˆÄB‘ÎC“T†¶`Š¤[‰®Y…£Z}£^}±`~¬g€¬c‡¢d¤^›a–ž]——q–d“Œp›‹u¢z¡‰ˆ¡…‰ª‡¥˜£—› “¢¥—™¥•¤‰ ¨ ”Ž ™‘™ž—œ™‰¥›Ž©£„£Ÿ¢¥†§¢‡©¡†­Ÿ„¨”‹¡…œ™ˆ¦ƒ¤‰¦†„Žˆ­–‹¦œ…³œv²œwÁ›g¹©m»¥fÀ¯v¿³mÌ®pδyÕ¾rÕÆoÕÈmÕÌnàÆlݸoß»jßÁ\ôÅeå»^â¶lçÀmÒ·gÖ´`Ý®cÖ³hâºdÓ¼qÛÀuÞ¾ráÊrãÑfãÊrã»qؼjÍÇpÇÐtÌÁqáÁ}ÚÃláÔiÙÒqáÐ_ÐÍkÊÊ]ËÒSÎÉNÒÉVݾHÔÊMÐÓQÍÌIÔ¾=×ÆOǺRÏÁG˲SκXм_ι]ܳaرVÛ°Vá¬_à¸\Û²]Û¥]Ü©^ݬ_ښYݐfӞW͚SÕ Z̨`À VÒªHеQ߬SÖ¯Wͦ[מSʬXê]¹šg¼©aƤLÁ£M²¨\³ŸMº¢V¸X°ŸC·¦@²˜L´–>³›>¯“7¶“9 ‹5§‡/¨…/¤~: B£–=Ÿ‰1 Œ<¦†1 „1–ƒ?œ†HŒN«~N …KŸ†<›Š?¥ŠB¨}3¥ˆ-|,ª‚+¤‰6©2§.§œ, ˜0¢+¨”#²¡!©§¢Ÿ* ¤"« *”˜'Š›+„£"y¢*~ª0|¢"„Ÿ.~¦'x£+„Ÿ&uœ&~“&ŽŽ0•™-ž  Ÿ+‹‘8›œ>£5œ—=ž’<Ÿ˜=¡”LW¡‘M•ŠS›{j xm£sc•um kežzf§|k­i©sq¥zt²vs°wt¯v}°|q®tsyp®~o¢km“fw’fu¤e}’`yg‰›b…`}š^Ÿb…ž`–[v ]| Tv§U€´L}¨T¯JŠ±LŠµRƒ­L‰°@ˆ¶C‰·I•¼E¼D‹ÁO‡ÉX—ÄF„ÈF“ÑL•ÑESt°[{¨Yƒ£Vˆ¨V„£]¯`¤`„§^•°Y”¨Uˆ¢\‹aˆ’o“rŽŒešu›t›Œ„¤‘‡”¨Ž”§˜’«œ–¡™šž“™¤¡Š¦¥‰›¡’Ÿ—‘˜–•š”‘’‡˜”}£–v ¦}¢~«’}°‡¨†ª–©”„¨Ž‚¡‹{©„ˆ¤‹†¥‘Žª†­™‚°šr³ iĝjǝo»£j¬iͬtίvÚ¾xÓÌjÖÈhÔÅdØÂpÖ½dàµeæ¼]é½dë¼jݹhÖ½h׳`η^Ò¹gà¿jß¼hÞÃkÍÅmÈÏsÒÊpÓÅnäÌfßÀhá¼gÎÅ`ÉÐfËÍtÞÅvåÔxàÙqÖÖqÚÅh×ÐgÄÓbÇÊ^ÑÈLÛÆRÝÃKÕÄUÇÊMÇÄPÏÂCËÂ@˳MÊ»O̶MÔ³WÕ¯RÛ»RÓµ_Ù·_Ø°Z×±Yå²^ë°eß±`Ù¨cÙ°]Ó§ZٙhݝbÕ£TŨVÁ¡U¾«K±JDzJÒ¬L΢LɛW͝UȦQ¾œU·¢dÁ§YŨOº­V¶¡S¹™L¯¡O³£R¶œK°˜JªžM§—F®ŸG±žF±“:¢.£1ž†<£‚:Ž8¡–B©–7¡„/¤}1šƒ2™ƒB™‰I¦…I¦Qž„M¤zF ƒ:£…:—‚1›‡8Ÿ7˜ƒ.œƒ1˜“2žœ)žš*œ¡&ª—(«¡&¬¬¡ ¨Ÿ+žŸ#£§( °)“ª(Š®0y¬+‚§*‚©&¬&ƒž2›'|›&{›t•„˜ Š•(Žš(–™+˜ž.Šœ=‰–C™8—–E“—A•“D–—L˜’N“Q‰`Ÿ‰^˜z_•xc™mf›op¥zk¦ƒi£ti«se nk¦oy¨y{­xv¨}}ŸxzŸ‚|®msq›gw™sžo~škƒ—j„›c{ g{¦Z‚ Zˆžc}œ\y¤_{®b}«]…µS¸X«[Œ»]»Pƒ¶H’°D¶Q“²P‘´M•ÂB‹¾RÆU¾NÆMÄL‰ÍN•W}©X€ªN…­Z…­[‰¦\ƒ­[ƒ«b‡§^‘©]ŸW‘ž_‡œe¡q“ d“oŠ˜pŠ’s—‡{œ‘„‘‘¢Ž’¤œ©š’°š¡’¡Ÿ£š”ª’œŽ””Ž”–Ž•š‘Ž”›xš”|œ¦vœ£z¯š{«„©†²§—~­‘…¨Žyª•„§‡¥‘‰©ˆ‡°|§šiÀœn½¡ihº©h¼¦sÏ°zйwÔ·mߺhÖÂnÕºnè¼fݼdå´gå¹Yâ´eÖµ_Ú·jÙ¯]Ó«bÛ±bϵiÝÀbãÇ`ØÃaØÁgØÅ`ÑÊfÞ»`ÜÊYÛÌiϼgØÐ^ÈÌpËÄkÎÄvÛ×}ÞÜjÙÒhÍÏgÎÇ\¿ÍWÁ¾TÒºSÓÆTÔÂIÓÀDÏÄNŽCĹCϺLÉ«NÊ»K̯HÒ·XÉ«Wض[Õ²TέRѹYáµaÚ¬^׸aá´fÓ«e×°`Ú¤h՘cؘS×¢TœTÁ£O·«SÈ©D½¨F½ŸA½¢QɒGəPȞX¸£]¾›f¶¡SÆ©QǚL·™Q³™U¾›L¶—F¨žB¬§D±žJ¯ŸAº”J­ŠJ«‰C®‘3˜‹6”„3;”“?¡š9—‡7š‰6›ƒ<›Š4£‚;•~G¤€K|R˜vP †J“…9¤ˆ:~0“z.šz,‘}6ƒ0š‹4“š-š—$“+Ÿœ(«–) Ÿš.ž™#œ /›¢$‘¥4£&¡'y ){¢5Œ¨3Ž-ˆ™7ˆ§,{›"… €¢‚ ‰•3”-‘—/‰ŽB‹’C”<™ŽD—ŒA˜˜O››R›˜\¥žX•`©e£’_¥d•}^¤tbœxr¨zjž|e«rbª|iµqj¬x®€~¥w{«|œ„}­{°zr«q{›g…¥sz£pw™n~”v€™i…£j~¨\|¢g€^}ž`x¥e…¨fƒ³W„¯aƒ·T‚¸ZŽ°Wˆ³M‚·Hƒ´E“½G…¹IºK‰ËHƒÀIƒÄTŒ¿R”¾MÏS”ÏR”A†¦Jƒ¯Qˆ°Uˆ°T‹¡Q’£K¤UŒ¡RŒ¤\†–e}–`‚ _‡—kŠžr…˜gˆ”eŠ‡oŠ–•ˆ•‡˜ŽŸ™ˆž ­›˜¥™•Ž™—¤’¦‡Š™‹Ž“•–”•‘}š˜s ¡zœŸ|§’w«u²‘}´—t©”y©y«“³’‹ª—‡¨–‚ª‘«Œx¬•o½•tßoÇ£kÀŸsÉ£tÅ­uɬyÛ¬nå²dß»dà·aèµ^Þ¸Uà¹]׳^Þ·_ß¼dÖº]ݺ]Ô³b׺gÓ¶fÓ·]ÛÆcÔÀcÑÄ]ÔÃVÕ»_Ù½aÙ½]лZÎÊ_ÖÔlÓÎlÑÌsÍÌuÚ×rÙ×tÏÓbÊÇZϽZÃÃTǸQƽSÍÉPÐÇDÍÈCÌÇBýEľOɯZƱVɹK˹JÒ¯JʲSǪTÒ§QΦUØ´\ß²cݵbÞ²`Õ­gصh×´i̳aϦ[Ɨ]ɗX˒Y¿–M¾¥H½¨M´¬Qµ G¶£M”FĚMǔX¼ Y¸£[À¦_ŧYȦMšQÁ›M¼™Q°œR¦¦H žA¨¡?­—<µ“H­ƒM«„@¤‚H—„@•ƒ<‘Ž<‘”7ŽAIŸ@™<Ÿ‡7¨5¢}>¦ƒC¤|M¡wG’‚<y0”}5˜z2‹}3‘‰<“ƒ:—€8–†)žŠ$––*’’'™œ›˜ Ÿ”$”–.–£,’­0—ª/¤7„¬.Š 1¥3€ 0‹¡1„*ˆŸ+„ª(€¥€¦€¡"š'ƒ™6ƒ @‡™?…Ž=†Kœ‡O–ˆM˜–Jž˜P™¡[˜]žš]ª›g±™c¦“^ª˜b ‹] ƒg e£{m ~l¯rq°vo©{y¯y¤|l¦|p¥„x¡|¤€|«twžy¢r¦r{¨jŸr€ pv¦b|ªd³^y±c{¶^€«]~§iy±g·d‰³`ƒ´U´VŒÀX»K‹¾CŒÁI¹Iƒ·Qƒ·S~ÈK…ÅP‰ÈRŒ¾X“Ä]ŽÈZœÑU L˜L|Z}œXŒ UƒŸS˜£KŒ¤S‚ž]ƒ›X„›g‹–h…¢`‰ša‡”lŽaŠŽi’x†‹Š’šž†—•—›’Ž§ †ªœ”Ÿ’’ŽŸƒ™Š…—Œ‰›‰ƒ”Œ„›Ž‚–‹}’z¤y¢s¯™s©–s´ˆ±“¨Ž{¨ˆš’w­Š‚²ˆz§’­—t´›zª›g´•w¼qŬx¸£n¾¨qȸz̲uá­lß´dÓµ_Ú·hà©fã¿eعYÙ¿gÛ·]×±]Ô·S̬fÔ±_Æ»eÔ°fÕ¶]ÉÆ]ζQÅÁ]ϺPÏÆ\Ò·Q׶]ʽeÉÅdÇÃ]ÇÏjÏÔuÐÍrÒÑqÍÓ{ÕËgÐÖaÇÒ^¾Â[ÎÃQżSÐÊLËÎDÆÎGÕÏQÍÀI¼ÄPξWŹ^Ê¿WкTͱYÊ£ZŧLÐ¥Jϲ\Ò¯aЪcض\Я[Ù¯eØ­iÔ®bÒ¬Yͳ_ɜRŞZ̙]ßH¾¨N¼§IÄ¢Q±ŸP¶¤EÒDƏE¼‘T¿œU¬¥XÁRË P¡RãV¶T²§W²¢GŸŸF¨¤Cµ–C´›?¸˜O«‡C¯F¢’>•ŒKŸŒ9˜‰5šŽEŽGŒ‡?—‹B~<ŽG†:vA§AžyIvH”yBˆƒ:ˆ€B–}7‰‚;˜Œ6š‘DŽ‘.“*žˆ&œ/””.¤Ÿ!˜›¢™š'‘¤'Ÿ$’¡-Ž¦.„Ÿ-£&Š¤(z™8|›:†š4‰›4|¥&Œ¯%y§‚˜!ˆ™1ƒ 9‰8ƒ’B…L“N‹”@Ÿ’Dž”JœLœšU™_¥–f§›h¡“^²f¢Œ_œf ŽXž^¥{f¨wj¯v´‚x²zs«‡t¥€t³…s …sœt‚±|€¯h£kyŸ~‹¢~‚®v‰²p}¨n{¬qv°dz«pˆµk|¬i·`‚·aÂc|³^|½f‡¿g†Ãe†¶T²R‰ÅT”»E‰¿M…¶_ƒ¿RÃRˆÄU•ÎU•Î[’Í`—ÇW˜ÔSªOwŒZ|“Z‚”M‚œQƒœLO…¥[‰¢UŽŸ^‰b‹_‚œU}™Y‰[”d‹m‡—uŠ–~—’z›š‡š¥‹Ÿ—‰¥ž“¦˜‘™‰›¥–…¡œˆ›‘“Š‹œ’{ ’v–’‚›{¦šp¡Žk©’s°‹…¶ˆµ“‚§”z˜†~š‡xœŠ€¨‡~«…t«u­s´•k²¤t¸ªw´¯f¿¯eÉ©p̳wЧzÙ¨pÜ¥nЮhØ©fß®bà½fÛ¿a×ÆdÕ½^ÕµZÜ´ZÉ«`Ƴa͸[ðT¿­VǵRεXȱSÈÀVÃÁP÷XξWÔÅ^ÍÆ]ÐÁ]ÌÅlÐÌnÎÎqÍÊsËÖsÒÛ^ÕÕYÒËaÈÊaÅÅZǾVÁÈJÃÈLËÁSÐÆRÑÅOļLÁÄJÌÃTǽPƾOĪQÄ¥W»¬S¾¬Tî\̦bÖ¬[κd˵k̺bʸgÆ´hˬ]À´VÅ¥X¿š[Á¨RȬPÁ®UÁŸN·–J¹G·AŞ@¼œI¸‘J½¢H±¦IŸPœVŔPÀ›Y¶ŸW©§S±ŸS¨˜Dª”@°A¯D¬LªL£@¥L˜ŽJœF†7˜…AŒ|Gˆ‚;Ž{<”‡>ˆK•}Q–€J¤‡L¤Q“sJqAŠ|H‹~@Œ‚Eƒ=–A•B””6˜‹.Œ*ˆ-šˆ*“)©Ÿ(¨›š › (ž›$§#˜ #ž)†¦.‡ž.~š8uœ9|7ƒ˜:…›.‰©+ˆœ'uš&’&Šš/‚”7‹I‰G‹›@‘–Nš—K”—R’ŠVœ™Uš–V‘Yž‹\¦Œ\°˜h¨“g©“]¯W¥‘]²e¯zf¥nª€x­‹vª†s°…q·‡{©|‡£v‚ªsz²k‚¦sŠ¡~…¡­|ºx„¸g}»d†»o­x°u…¾j†¾n|¾o†Äa~Àa„Çi…Ã`ŠÉbŠ½Y¹MŽ·G–ÀR½[¯_†¾^‚»^ŒÉf™Éb—ÄgŽË]–ÊQ–ÑQ¥T~˜P”K{M‹—V‘˜K“”W„ŸZ•V}›U‡‰X‚Š^‘X’`‡_ƒ‘l……j“’u•—|œžr›’‚œ„¤š‚¥“ƒŸ•‡£—˜š””§—Ž¤‹€ …™…‰£”{¢“s‡v›’xœ“sª‘q¦„y­‹€®š…®‘Œ¦Ž…£‘{“’u›„wŸ“z¥Œt®ƒw¬‡n©Šh¸šv´ j·±m·±kË«kϦlÒ¤hÓ¨dÖ®kέb׬_Ù§eÖ±]à´Y×®TÛ¹_Ò°[ϯVΧdȪ]Ê®]È«TɺMýMűXÆ·M¾¼Y̳\¿»ZÁºRý^Æ·]˽hкfÏÂkÐÃnÉÍeÓÎrÇÕgÔÚ[ÑÍ\ÕÈXÇÃUÃÊ]È¿PÇÍQÊÄWȽNϽKøIÒ·]ѲS˲\ȺRȨOÁ¯YÀ§U¹£YÇ«SäaͦdÓ®jô\¼°fŹZ¾¼ZĺaÁ­T¸¤\Á¬fíTÀ¬UǨTƦW½–HµœK½£Iº¢H¼ D­ H¸ŸC¼¥S½™PĞN¸¢T¸ N®›V¥›V¦¤EªŽ=¨ŒA§’Fž‰OŸ”T§”Q—ŽP¢‹K¡ŒIŸF“‰;•„B“ƒ9“vC€<†G’„Hš„IœvP„K—ˆS’wI“qB—qD‡‚EŠ€<€>—†;™B™‡4 ‰5“‹0ž‚.©†1¬‹& ‹¤‘%œ‘%¡™#’˜+—.‘ %”%‰¥'Œ™*‚&x 4xœ9x”:„ž<„¤&zœ0€—)…¥4¤9‚›:ƒšI‰’G;‹šH ’Q›’R——_”™b“—] až“\±œeµ˜k±—i³˜]´`¬“f±•h¯g´nªŠx«‡{®‡{©w±|­€‡¤z†ª®p‚Ÿr†£~‡¡„‘°‹®‚’µx‹±t}Â}}¹}·tŒ¹s‹Àr|¹nˆÁf„Àd}ÃnvÇ`„ÏcŒ½a…¹M‰Æ]ˆÀS½_Ž¸_‰·dŠ»\†·`Åk”¿h•ÍZŽÈY¢ÏW›LŠ•S†•P€ŽS‡‘U‚–K‰V‘’O…•S“J{‡X|ŽT‚‡XŠ‚e€rƒr‰„q‚v˜|œy”–w—‘†œ‹Ÿ“Ž¡”Š˜™Œœš‹“›š’Œ…‰€ŸŠ€™Œw €yšƒs™~x…w ‡™…uª”€ª“†¯—‹­‹…ž‰„~¡–£“w¢’x ˆv«†t¤s¨u²£m³ t¾¬kË´cΪiÒ¦fË­cÔ¨hÒ¤_Ú£XÓ¤bܱ\à²Zصaá§VÒ¯YΨ`É¥aÓ®Yȱ_Å°Wù[ɵOÆ°Zº²TÁ±OǵXξSÄ¿^È·[ϳ_Å¿l˺nÙÂoÕ¿dÏÉhÎÍlÐØeÆÔhÉÐcÒÈ[ÔÌWÉÊXÂÅUÀËL¿ÆQ˾YƼUξW×·WÕ±\̨`É°\ǤPÀ©QÄ­P½©V»¤RÇ©WΩYȯfÁ¬i½±_ƹT¿µY´·W¹¨b´±g¾¬añ`¿ªYÄ¢SşN¼ TÀ”Q¼šR·šEµ—H°¢@¶§H¸›L¸šX¸˜R¼šO¶¥S¶ M¥Oš‘BŸ•F›•HŸ‹TœV –N¢’W˜—P ’VœLš‚E“‚A”‰=•~9˜…;‹~K–~K’yM–{C{I—…I~S–„PyJqOyMœ„L—‹GŒ;’Š?œ….–-›–2ž- ‡+ª‹/ª‘,£•$¢’&œ‹&‘‡(Ž’+„*š%}—£)|¦/|§*s«1v¡9~©1€«/…¬+¤6vCz§Eƒ›N‡˜EŒKˆ’G–”I–“PšO‘˜[™h™ŠdŸ‹l§še¦˜e®˜f³•a±œZ³šd»—cÀž`µ•l¸…s±ƒy«ˆ†²ˆ³Œ´ˆ‰º°‰€¬€ˆ¦vƒ¦v}¡z€«u‘®±|”±ƒ²‡‘¾y‹½uÊtÌs„Ây…Àg»e€º\ƒÉaxÇb‰ÍZŠÑ[ŠÆZ‰¾V‹¶X‹·`‰¸jŠÁ^…¼bÂf†ºmŽºn—Åc–Ô_Ñ_—T…›O—R‰‹G†šJ‹ŒG‰S‘RI{’NŒVO}ŒYˆ‹`ˆ—gˆ„~‘ƒp‰Œq‘‹~{—u›Ÿ†˜œ‹ž“•˜†œš—š‘•‘‘|‰Š•‹„ž‡€’‡y‘„r™Œv•}j™„o—‡o—•{˜‰u«–ƒœ†¨“©‹y—••†z¦†w’w‘x y£k®—j«œm®Ÿp³¬sŤdË°eÓ³bÏ´Vʪ_ΣSÕ«aÙ©bã¨Tå¨Ræ¨`à®Yϳ\ɪ[űZ͵Q¸X¼°Y̺KýUűUƸS¾®MÂÀV·¶TĺZÉÀ`ͲZÆ»hмcβjɳfÆÁiÓÈtÊÒaÈÕhÈÁbžeÆÄSÇÐZÉÐKÂÍIÁÄN½ÃVÄÊ[ȹZ˸QÔÀd̹Uʵ[Á¯UÀ¬\·¥\ĪW©XÇ¢UÁ²`ϧX»´VÁ²\Ä¥S¼¶Y¿°_¶¯Uº©`çZ³^Á®T»œPßK¹“A²ŽD¶œ?½F·ž=«¦;²£C»žJ­˜S¸ F»˜O¶˜FªšG¤£O£”G›–>§ŠD–’[ ‘X—M–’U¤’G •I›ŒG‘ŠF“|A~5•‚9”‡FŠˆBvB•@Œ‚M—zO‹rHš~S”tQIˆROŠ‚J”€H˜HŽ„I”Š@••=›’.˜™4žŽ2¢6“‰&–Š)”– š'•’(•—/Š+ƒ %Š¦0~¬0ƒ©0w£&€¥/r¤:|­.zª5tª-€¥/‚œ=z—C•=’I„ŸF„™I¤Gœ›Pž‘X”›U˜ŸX¡hž˜i©—\¤™]±›h° `¨¡b¼‘h½fµ‘d¬’l·‰y¬yt·…{©€­„°•†·‹Š´Œ~´}„¤~†¨€~¥~´{•±z’ª|Šº|°sŠ»u“Éq”Àj•ÀpÅ}–ÆsÀj€Çn‚ÃjËczÊd‹Ï\€Ð\‰È[ŒÀ`ƒ°fŒÁfŒÂf¼o„¹`‰¼mºb¿aŽÌ_–ÆZŽR„“H{”?‚›Gy”N‘R‡G†ŽDs”Av‘NuN|ŽSv—c˜jŒ’x“{„uŒ‹{˜†mˆn“–m“}•™Ž‘¡›„’…ŒŒŽ••}˜–‚š|—”s“‹u›h›ƒl¨yj£|qŒwž—o¥”x˜ƒ–‘}š”„¢yz¢‹n™…n”Œo—n›y “s¦”l¤¤eª˜b²j½ iȦcɲ^È®UÈ´OάLß³JߪVÝ®Tä¦ZÞ¨NÜ°SÊ®Pȱ[˵OƬHĹQĽXÊ¿MÁ¼M»µKÅ°WżX´¼T¼ÅQ»½U¶¶WÀ®]ʱWÅ´`Á¯`»µ_ȼkÊÁj¾¿lÂÅ_ËÆgŹ_ý[ÀÏUÉÌXÀÏNÂÈT»Í]¶¿^¸ÀYÁÁRǾ[¾_¾·_Á»gÅ·_¿¹Z¼©VºŸMÆ¡T˟OĬRƪ_¶¤\¶­[Áª\Æ¡XÀ¨SDz\¿®[©S¹¨U¼¤P¾›A¿‘?µ•G±™G³’9´™:²œ8±£<²¡O«™PµžJ¼žB¼˜G¾›B® E§N ’G£›MšQ Jš’TŸ”W¨˜O›“I’–L”KŸ„=¡:›†=”‡Cš‚C£xHœ{>—sK“ySQ›zI•†KŠƒUŒ}W‰yI‹~Mˆ{F‘€E›D˜ŒE@’œ=š™A˜‘@Œ’6”0—Ž)”“(‰œ1‹’<Š™5‡5†¢(Œ­%†¦0ˆ«(x /yž-u¦9m«8n¢0lª:xª6ƒ¨7€•A†”9†–<†¦D…¨M’¨S™ Oš¡V”›Y£”_§b£—dŸ‘Y¨’^±•fª’g­”q°Ÿn·š[¬–a°t±€g°wk®|n¬„w¨‹€°“€²‹¯‡µ†‰°|~¬|…²~‘®}œ¯s–²|Š²v†¶q¿t¹m”ºiÅu–¿v•ÇuŠÍpŠÊp‚ËcƒÂh{Çh~ÃdˆÊiƒÀa…¸j‚»sŒºk‰Éo‡Çj…Ìh‰Ê]†Ê]€¾\ˆÇVÄX–N~”MzIy”MsˆM|ŠIy‹L‘Fo†JJ|W{ˆKu™W€Œe‰r‡q‹‚|†wŠj›ˆrœ‘q•š{”†—•‡ŒŸ’„Ž‹‰—Ž…”œw’’{˜›v‹‹r™’mši•u§n¡e™ˆk¦Žp¤˜|›››€””ƒœ‰y¤•z”Šk˜s’šs¥p§—w©—k¦ž_²fµ¥cÁŸV̧UÁ¥R¼¬QÒ¦QÙªMÒ¡Nå¤Tß¡Nç­Lè¦KÙ¸GÍ°GÒªXƳGË»QαFÀ¼MÇÁVÇ»PÀ¶\ı_·¯[³¹Yµ°T°¶O¶µa²¨[´¬g¸ºb´²i±Ã`¿Ãiк[ÀËVÈÁa˺dǹaÁÃV»ÈZÂÐS¿ÔM·Ð[ÀÆ\¼ÃY¶ÊV»¹`úZÀºi¹¼eÀ¶Y¸±_»±e¶Ÿe¾£cĞRŬW»®P·®L«¥X±žU¼£R³ŸR¶šP¿›T»£Z¶¬O²£UÀ¥P¸™G¹™B·’B¹Ž8®5´™<¶ŸH¥™;¥—O¯¢Fµ˜K´•@µ¡A¯šK¬ŸJª’NžŒQš‘IªŸV ’J¨”Q«ŽQ§šU™”H”I‘‰@Œ8œ|>š‰C—‚?™„;™ƒA™xE„IŸ|HšrN¦xP‘€L•ƒG•N‡{B‰G†y@Œ‡A›ˆB’IŠ‰A…’J”L‰‘Gˆ•@†‰>’,‹/’œA—0€™0‚ž3„­)‡¤0…¢6}Ÿ&~£0}¬.}³,w¢,o %v¡)z¡0}œ-v;{<„¥>„ŸBŠ§H‹°J‘£SžªX’ TŸšW¤ Zž¦dž—`¥›e¬‘hªjŸ’i«—c³’h§–e©h²†t²tt²uk§‚u±}®˜ƒ®Š{´Š‡´‚ƒ±~‹©~Œ©t‡µŽ­y—«z…´x½m„¹gˆÄuˆ¶o”Âx“Æl”ÁtŒÆu’Íj~Ðl„Îk‹ÂcˆÇ`„Ée…¾i}Âg€»n†ºm¾eŽÔhŠÉkŽÏY“Â[‰Ç\„Ë]”ÀSš?}ŠFt@|‡Hx†NyƒEu~@u|CvE‚~E„L‚“T~•d„f„r™Šv’ƒuŽ†n•‚p™r–{™“r’“u†ƒˆ‘…„‘‡„“|Ž”€žƒ‹™w’™i‘–h’k“—m’‹hœˆg¢†jšˆf›˜m¤›x™¢w™—z ”v›‹wžŠyž”wœŸm˜št•¤ržm¢£b«Ÿe³—^´žT¾ªUÀ¨W¤KÀ©O¢OÓ£LۜGß Dá£Bà®Fé­Eà¶?Þ°<ϱHűIżIÑ¿LÌ»L͵Y¿¾YÆÄ`ǾYð\¼³`½©W®­T³§Tª­]¶­e±·e¸¿g³À_À¿dŽZ»¹]ÂÅSÇÉZ½aÆÃ]ÇÃYÂÁPÀÐV¼É^¸Ä_ºÈbªÃX­Äg¶¶g¼Àc»g½³k³·a³¨`¹£e¸Ÿ[µ£aµ¬]¶¦L´©N±¤G¨¤N¯˜W­T»•VÁ¥V¾¥W· T»PÀ›D¿ŸH·—B»›;¸™:·Š8¸†=¨F£ŸC§œB«›C¯“A«š@±œH§’K£–W©•V¢–R®šP«˜K² R§–I§ŸQ¡˜NšG–’D”’8—‰8œ†:•€9Žw>Š|=‘9”~B•€J|B˜L {JžsI‘wAŽv@‘€I‡†M‰A“}N•…M‹ŠC…ŠEŽ“AŠ’E‹Ž>ƒ“FŒ˜@’<”ŽF‘AŠ“7„–7€¢0ƒ¨*{¢'y§.t§2|¨)|¤'}¯0oª&qœ$f›$kž-u¥)y«3…°=Ž¤CŽ¯P—³PŒ¬U®_Ž²_œ©Q¢¯X¢©UžŸd¥£f®•q§pŸ–ešŒh˜›gŸ˜g¡‘iª‹i¬„m²l·yl±~l¬Œz²Ž|­‹ˆ®Ž…°²ˆ·ƒª{´v…®tŠ·qŽ¾sƒ¶p½gµm‹ºt‘Âh‹»m‘Èd•ÆjŒ¿kƒÈv‚Ìk~ÌmŠÌqˆÂd‡ÂiÀl‡Ät‚Ä|†ÐnŒÓd†Õg‘Ï^ŽÍ_ŒÐdÈi”½^ByKsŒHj†BsŒFp‰;iƒLjvMqvK~~UxVu•[u›V‰k‡ˆi„ƒx“fˆ…o”„k”y”~qˆvŽ€ˆ’„„ˆ‚ŠŽ‰‘“‹Ž{‹”xŽšm’ŠvŽ_˜o—•e†k”‚^—ˆm“–j”“w©{£¡’˜z’“w‡}–‘s“•u˜“u™Ÿn™”f©`³¥^²¢X¶¤a¬™K· Tº˜ZæVɞLíMëGɱQÒ¯OÞ¬BØ­JÖ·HײOÕ»LÇ·VıK±NDZB¿OÎÃJÈÀUÆÁ^½­Uí`µ²b±¶a«·]®±V§¸R§«^®¶`¯³_»¸\¼ÂQº¾_þOÀÁWÁÂVĹ[¾ÀZË¿YÉÆ]ÂÈ\¿¼\µ½c´Ád¨¾`¦¿^·Â^µ­W¸¬]®«Y¸±f°£a»ŸV¹ŸUªœ\±§O­¡G°§P¬ A´žGµ•S¼–]µ›V´¦[Ã¥ZÀ¥U¸—S¹›M· E±ŸD²”D½ˆ;¸‰FµŒ8³ŠD®—:¢›;±–K©•G²šJ­›B¤›J™FžF¤•Rª’F®ŽK§™I›N¢™FŸ?–A”‘H£–@¡ƒA“Š;™9 }>–€7‘€:‘…8˜„D“z9•yG¤sDyIwL‡€L’vH…{?‚y?’~Lš}U„~Q…†M~}H‘C†‰C“HŒŠIƒ‹;…ˆ:Š=ƒ™:‚›6€›1‡,}«9x¥>wª0§$u¬4p¦8o¢5k¬$i¨.a©6sž0u¬6©B‚žAŠ¥R•³\–¶`ˆ¹c­_–§Yž£PŸ«R¥¡_ª¡b¨“c››o›f œf ‘c d¯_¬c¹„`»~d´‚h±sµ‡n½Šs«ˆs¶’ƒ­|·z…¶€Šªz{¨w€²q“­n}´lx¬c‡±b‡¹sÂn„¿nŠ¹o™Ëk™ÂlˆÍk’Å|€ÂkÐw|Ìj‡Ám}¸o‹¶o‹Æu”½u–Îs…ÊkŽÌkŒËg‹Êa”ÅbÌe„À[“QtGq‹EbBa†D[{;c|GntMuyPu‰Tv[y‘Qw—bœc‡”j‡s„~gŽ†eŠj…yy„}rƒt‚zŠƒ~……‹ƒ‘‡„‡…ŠŠt‘Št‹Šhˆˆeˆ‘i™b•Š_›~_˜Žk—nž“p¢œx™‚“zŒ•r“…yœ”x™˜gž–t¢›t§™t®¡d¯Ÿ]µŸ\¯¢M­•LºžKÁ–XŤYÇ RĤJîOÆ©F˲MÒ¸I̹?Ç·CνPʶSͲSÍ»RÄ´MÀ²QÄ»HʶJȽRÊ®OÀ¬Z»£Y¶ª^¯©_¯¯d¦«a¤´W£»`­¸e¸ÃX¸¾X»¼V½¯S¿³T·¸VÀ¿a¼¹dÀÅm¿ÉeÁ»Y¾¾T³Ã]¯¶^±¹R«½W©ÅXª¼Q©¼P¯«_®ªf³¦^ª©\¯žV¶œO­™Q« G£¤G§¤E±£F¶¨J®Z¬©Qµ£O²¥[¶žX¹›L»¢DèA»§@­›L«™L´†L³D´„>µŒ;­•?®D±™DªŸE¬™AªšC¤œ@ –=©‘> ›G¢ŒL¨ŒPª•HM •F““?•ŽF¡–@¥Ž:œ‰B¨ˆ7£‰8šƒ5›„5—…6–|6˜{1–‰8¢x8£sI›{O•~K‡tJƒoDlP…uL‡rM”R‡V~wR|{G„ƒ?ˆƒB„M‡‹E‡†?†…9€Œ8~‡A~‘=u›>|™8k¬8g®=j®-w¤.pž+r©/h°0o²3qª7g«žšC§œEŸœI¢—JŸ™O¦“Pœ‘P‘’T”‰L˜‰G Dš7„6¦6Ÿˆ6¡;œz6žˆ?§ˆ>£„=œˆ4•ƒ6¥‚DzD—~C˜{?•{>|h;‹pHŒsO„R‡‚Hˆ€MŠsT‡pJ€‚<~~F‹N{M‰~:ˆ€HŒ‰Aˆ’5|Œ8tš6m˜Ctž8`§Ij¤Cv¨6k¦d¦0b©>w¬=m­1q©>}ªDƒ£TŠ«_ˆ¨WŽ·T›»P›°\—£Z©_—œa¡˜f¨ d™˜oš k¥›gž‘h±–g¬•a©‹m·‘m¬q´kª–fµ‰d·…c¯iµ|l­€y·…‹´ˆ§x°‚Š°{¡pƒ¢{~±p‡§b…­q‰¾u¹e—Çq ¼k“ÌršÈp“ÇuŒÁvˆÁtÁt‡Ç|À„‘ÁyÇyˆÅv”ÈoŠÈt”Èl‡Án‡ÅmŒ½qŽ¿eÀ^…FWA^”Ac”;]„6gˆAe‚GhHf‚Lm}Jo}Hj~Ok‡To€Pu†`|c„‰lŒzd‚{n…|uyr†~†v{…€x‡~„~w|‰~ƒ‰‚v€…wŽ‚r‘Šk”Šk‡ŠdŒŠ^‘ˆ_‡‹n—m‡ŽpŒ”h‡Ž`˜f’™q“”o‹pžgž™l¦”j¨”W°“S±ŽO­P®Z´žSƙUșLÌ¡> AÇ¡GŨJƨIÅ©>Ì´<ʼGκE͹NÁµR¿·UŹOþIÊÁKƹM¼B¿³EÇ°Q¾¬Lº«Z¹°X¯µU«³`©¼a«¸U¨¹[¨­\£¶Z©´S¶¹R·±[¯¬Y¬¯d¦¯]¯¿b³Ã_´¹e´¹]©Á[¦²[›±Zš­R®R§´Z¥¨Yœ­_¤¯_¨°dž¥_›Q¡šS§›O¦RžžW›šK¤šK©T¨•R©’O®‘J¥žQ¦›DªžG±’L¦–O¯›K¨J£F¨P§„D®‹C«‹F¯ŒH®‡I­Ž>§…D™…:œŽA™=¡ D¡žD››FŸ>œ¢Eœ™J™‘K–“I•–H˜AŸŒ4 ‰3¬Ž.¬†7§}?¦6£…9§}A¢‡=«‡>Ÿ‹>¢‹:—…A™~AŽy@“z6Žs2…r;Œz;ˆpHwD€zMŠ|Q„oT}nTwrJ†sMˆwHŽy=†ƒB|JŠ…F•F~–=m“FjŸAeœEj£CiªJfŸDgš5c¥7d8_¦9m©4m¯9m´4y¬;v¥Gw©Q|¯R¨[‚´V”´Y—®Uš±[Ž²N¢Q¤]Ÿža§Ÿf¡¡b¥˜`ž™fžj«Œ]´‰\­k«—l©l§d´™h·•p«Žh¸‰e´€i°ˆu¬|µ~v¯…}°…‡ª|„¥~x¤y{¢v~¯l†±r‘¶o•ÃbÅf”Êi™Àq•Ât‘ÌtŽÏmˆÂtÊƒ†ÁŒÄ~ŽÀ†‰¾z‡ÍxŽÇÉzƒÌyŒ¿kˆÅp~Êg„Ïf‚Â_„¨’Fª‘9¬Ž?—H ˜=£›8¨Ÿ= Ÿ@§–H™˜8¥˜:•™BE›JA™‰<—Ž=›Œ=¥|0§ƒ4¦x-©u8§{1ž~6ŸC‡F”<¢‘>Ÿ†Fš}>’‚?œt=}0‰x7‹o>‘{A€rFsMvyL}nIt}J{|L‰tBy>Ž~?ˆŽFƒ@‡“F|’GŒ:s›A{¥8lŸBj¢Fg¥Lp§Pe£Af©s©Hk¬O|ªU‚³Z†´T¿J“¬S–¬]®PŽ¯T˜«_“«cœ`”¡gž£e›žc›aœ”]š`¡—f¥sŸ›d§t© r£Ž`¦’^ª’b³v¯€w¨t§~‚¬µ|~µ}‡³…‰¤|}¥z…¬r“©n–¯w’¼l—½s˜¾w·uˆ¼lŽÒoŒ¾j„Âxƒ¹r…¸~†»z‡Â‚…Ì~‰Ê€ŠÁwˆÁk‡Æh‡¶o¸b‹ÅiƒÇ[‚Ãe†>Y”@`;c‰Dd’>]“I`‡Lc…SozSa‚Mc}M]xKf{Pr†WŒe‚‘a“hˆ„cxvbsqf{f|‚kswo}xqx…u~zƒ}x‹n‚Šq‚|wx‰„nˆlˆ‚aŠ”e”™e‘˜bƒ›^…ŒW†‰^˜•e”i—ˆg „p—‡o¡…t¢ƒl›‰g™Žm›™h­”^«›`¦˜\´£Q²¡VºŸL·©F³¥O¸¦S»±GȪKÍ¥K¦NÀªOê>ʲF˹RƹK¾³SľR¹·FÁ¹L½¹N»»T½·YÅ©ZÁ¤WÄ¥\ºµY¼©b¯§_¨¢a­¦Z³©d­³c³°`§®T©¹J°´PµµR¨°`«À\´Àe­½V²·V©±O¤·W§¯H›°Jš«Tž·W¦·_ ­Zœ¨[šªU±^œ§W˜§K¥ EŸ¨P¢¥K™¡KžB˜>™™K—šN˜–J›šB›AªŽ5­›5¥¥2¥Ÿ;ŸœI¤¤J¦ŸN¤—P®‰F´ƒ=ª€:±ŒB´ŠB«A¡—D™I¨¡K©œD¨˜L™’Iž›@¤”@œ™E™˜@˜ Q—Vœ–NŽGŸƒ;–€6—‚0¡6£|:¦y/v1ž}6•~:€B:–…>˜„6‘…>’x:˜y<˜r3”|7GŠvJ}sAqyHnuMt|J|yE|„C€}:†;‘M’‰M•‡KŒ‘<„—8{‘?v7‚™<¨Hy©Jn¥Jh©Lf¤;]©:c¤E[­>_¸Gcµ>`ºFm·=h¯Mn³Q¿XºQƒ»H”¸I˜¯KŒ°T‰«VŽ¯Q‘¨Z–¬[“©bŸd“œ]¡^‘žP•‹R—Z›d“£j˜m•¡i£›m¬–n¬’`­—p¤Žw›v¢vv©‚~¬†y¨Š|°†‡¨†Ž­~‹Ÿv¢p‘©|·x–µ–»yŠµx‘µrŠ¹p†Ék‹Àn…¼p‚¼sˆ·~½s…Ät‹À€‹Å{¾y}·e€¸m·k²mŠ´j‰¸d~º_|Ha¡=o’Hl“QjKdŠOp„OoyWfxYjwT_vQl…SnˆMk}crb~“\ˆ‹_„‚fu}ns€es|d{t`sqpq€t{|u‚s|ˆp}ƒw~‹qŒ~oˆ†s„„o†ˆg“m˜f„•d——aŠš\•Y’bdš”kŒƒc—…k˜ŽkžŠržˆi“ŠeŽz¤ˆc¥›]§•g¨b¯œ\º¦Y¼©W¹§E¯«Mº¬OşVˤJÁ¨Q½žU̬LÁ§GéI˾Sº¯M¾¶UÇ´WÅ·IÆ´J¼¬KÇ®T»µZ½¦]¼¡[À©^³°S³¦S°ªX¯¡W·°a±¥f­³`§³YŸ¶^£­X¨±W®­Q²¦_±¶^¶Ád«¿W´®Wª³\§»N™¾PŸµH›³R¡µT—¼M ¶Pž­Y«Y¥§T¢¤W§¦Rª£>¨žF£H˜¢> GœŸM˜¡=–•A”=¡<œ“3›7ª 8¬•?Ÿ D –DšœK©—H¦Tª‘Qª~E³B²ŒJ¨I£‘K¥œ@š¡B¢™I©¡J£@”–Kš“F£Jœ•I“ŸB–”HšˆU–‡S™F—Š=—~C—Š8¤„:¥ƒ@ž~8•„,—†3–†1z=•€CŠ…:˜‡@‹A‡>ŠI™„C˜‹B’F‘vJ}vMw†@yyO†J€F†Š<†‹H‰‘F”‡I“”MšLŒLŠ—J„”E†•;¦I€¦?q£Os¢Ik ?c¨Df¢:f®7_¨C^¶BX«C^¾?b´>g¸Go·L}·Dƒ®R|¹M…±I’°U´SªNˆ·Y•«b“§\Š§V†ªc–gŽ£_˜£R–”U“Uš_˜¢h‘—d•™dššgœc¦”b§i¬’~«ˆmzmžm¡~¤‡¨…}®†¦†Ž±„‰¨y°…’¶„·ƒ–±z‰·{‹¿y–Æp“¼r‰´x‹¹rzµtˆ¹|}»yŠºq‚Àyµs‡Âu‹½hÁm‘¶b½^Œ¹e¾c„·_ƒ8l£BxžQ–Rx–TxŒYoˆYh‚Wl~crz]jy\hwTjƒSqŒ^r[r‹hƒ‰j…kt€n}ybxrhpwfomsny}zztƒz{‚mx‚bƒhŠ€qˆ|j‰|i†…h‚“^…“e‡–f‘”^ŒŠc‘dŠše‘—a—li‘’c”ˆn‹…rŠˆhƒo“…uŸŠn ‘f²“h´“e¹™^²¢S´­Y´¦U¹žX¸¢LÀ«J¿¢SÀ£TțQϟJÄ©B¸¶J¼³JÀ¶KÁ°OÁ¬QδXгQÈ°PÉ®VÄ®MÀªSº®W±¨X®®U­´\¢ª^¡¢T¯«Y¦¶b«²^«¶`¥´a©©U¥©P¨¦L¬¤T«­T¶±U¨®K¨¶M§¹K¬µT›³R™ÀOŸ½Lš¾O¥¾W¡¸O °S¥£[ŸYž§T¢£R ›D >ž§; ¬D G ¥:“Ÿ<Ÿ8–—>¤”;¦3¤˜2¢”8K L¨™T¡™L²˜V³ŠPµ‚S±…K¬„A´A·‚@ªŽG£™L£šJ«ž<­>¦”GšŽIŸ—E™’D™›@—˜F““D™ŠPœ…Aš‰>¡„Gš‡> Až…Dž|Dœ‚9‰~;†ˆ1ˆ=…€7‰|E‰„E‰Ž<”Ž?”ŒIŠ•LŠˆMŠFƒ|P‡~O{„AtƒDy‚>ƒ‹HˆŽ=“B‰˜?L‰‹D’–GŽJ•ŽQ‡—VŠ›K—Bx£E|£AuœNnšHn•>k—=j¡C[¤@Z²>^¸H]°Ba½=`º7m³5p½?l³Ey³AyµF†¸L²O‡²SŒ»[²_•³]Œ§]’®\‡¥^©`”£Y¤P‘›UŒ’]Ž”TŒ¢_–ž_˜l k™i£œj–k¥…v«„y¥p¡|}§x¤…±‚´­€Œ£‹‰ªˆµ‘¶ƒ”¯†‘·‰·†•¿‰š·•·v’±m‚µt‚Áo‡Àu†½~‚´z†®~°w„»o’»n‘´f”·\³^“´]†´Z€´d~Ih£JlŸOlœWo”\m“\i†ZfˆUmSo\j‚Tn†]kYp‚ao‰iy…c‡‚p{‹erzg€[ylhykozrwwv}psƒ{s}eˆ}oŠa€kne‹{bt[Œ}aŠ“a‡‹gˆ•b†c”˜d—^™™dŽ“r‰p…s‹Žzˆ‡sˆ‹f‚d’‡s”…oŸ‡s©˜sµd¶—X¶œYª¥N²žK²œF¶ŸI½¤E¹¥EÀ¦DÏ¡PÉ®AÊ«FÆ«CÊ©KħGÍ£SЮRÇ­MƨIÄ­RÌ­S©Q¢R¿¯Z¶®U´³T¥¯S—°V«­S³¯^¤µUª·X­«^¢²f¤¥[®¢P­­L³X®§Q­´P±°Y¥¹L«±XŸ­\¢¯S¡·G˜ÀL›µM¢·U­±F¢©V§£M¤¢O˜£Nž?§«E¡›E¤ª@™£J ¦C›ž?“£4—”C˜C¢“5˜6—›9—9¦•:°†K›’M œN¡ŽD¬‚K¯†G´ŠJ­Š<³„5¬‡7­;¦”E¨–J¦¦C¬›@¦•<¡I¡“Nš›Q–žI ”O™™A™‡KŸK ‘=‘„C‘…>‰E¤KŠ=Œv;†6“>Š‰AŒ„B„}D…J„…?ŒŽL‚‘H‹ˆA‡E‘‡KŠ>‚GwŠHv€Fy†LŒ‹IŠ’E˜H‡’B„@…“J‹’Lˆ”B‘S‹ŸK|¤Cw›H€A‚©@§Cs˜JkŸ;r¥Aj¨@`§FT 2X¦?g±:]­@nµ2h°;p¶8r¸:o°Eu½>ƒÂG~½F‰¶L}±S€¹_‡¯[ŸQªaŒ­_Œ£a„ªW„£V„™T—¢K¡P‹£_Ž–[”šj• gš¡k™¨l¦œjžo™Šs™†l‚nž†y£†¶Ž‰¥‡Š®Ž~¢„‰©–‘ª’«ŽµŠ¹†‘Á…š¾ƒÂz™Ár¹v‰µƒÆ|’Äp‚ÁŽ²zŠ²€‰¹y€¹l‡¶]†¬b‡³^‡¶`„¶\Œ¯V~£i‰¹’B® A® ;¥¡B©•G­–Hž’C˜O“Iœ•P¦–Mž•?“›?–‘C™’I“ŽB•L˜M‘~AŠ{8ŠˆB…F‡ŽMŠŒKŠ‡M‡†Bˆ•LŒ’I}”P~†Fƒ‡@‚‘F}‚=„„@{Bw„Bƒ†A‰ˆM†‹?Ž–@‡:…Ž@ŽŸEŠžE†šL‘™KN|¦IƒHx£G€©<‚¢>z¥=i¤A_Hd¤@^¥9^œ7]¨Da©Ca¥Ek¨5p«:u¹4m»Au®C}±NÁG‡»D…½Qw½Mz¹Pz²Wx¨Qz¨Q…«VŠ£Y…«Y Q…¡R”›L—¢Q— VŒ›d™–h›—Z a›¦\œœe ™c˜œkžu¥Œr †z©–z¯˜…°‹‡ŸŽ|¬Œ†¶”¯‘ªŒ„¸‘–À…˜¾z“¼|¾w†¿z‰¼ŽÂ‚”ǃšÂyŽ¸¯}~°‚†´}‹²eŽ°]Œ³`Ž«e‹´T«R‰žX‡¢bƒ?nŸKnTužV}žVuQy’Vp…Ln‡Qq~Qk~]k€Wqˆ`rŽWy_z‚]‚‚c€‚hv‹rzƒs~o|t{pyzylvvku}iqt{osutwxuqs‚qcƒn^{€\ˆ‡a…]‹b‰‹aŽ›c‘—m—˜hšv“†t‹“wŒ’s—‹q’{i„q•†n—ˆt••p£—p«–p²ž[­™]©¦Y¯§Cµ­B¿µK°§M©²F±³@Á´JÅ­L̪FǨAҞLЧR̜PÙ¨KÖ¤MÊ P̱OÇ¥YÀ©O¸¡P¼±Z°¶Y¯¯O¢¹O—´Q¤±Mœ³W—­V—ªNŸ£O—§S¢¨Z®®V¤¥W­¥J§­M¬°`³ºX§½M¤´R¬¿d§±`£·O¢«Mž§I˜¯M˜¢Sž°@£ IœªI¥§= ©9§©2§°8™¢;¨¤KœA¥›9Ÿ›5”’>Ÿ5¡¤@˜ 5œ›@›Œ7¥–:¨D­3£“<¨D¯…K·†L¼‡>´<½ŽA¶’Cº•?¹7©¥>« F§¢L­›Bª˜J§ŒPŸHŸ™S©’Mœ›L¡ˆBœ‹<”‘H’„?˜ˆAŠF–’MŠ€@ˆ}9ŒD‘„@ŽMƒ‰I‰‹IŠ‘K€˜BœHx•H}„C‹B€F{ŒB{‹?†;€€E|N††K‡‹<‡“:‡™:ˆš>‚™@„¦B‰§FŒ§E{©J°Dƒ›C¡Az¢?‰¤A}¦:f¦>l˜Hr¡:c 6]¡0e 6c¯EY¬:_£:k¬:hµ7jª=i§Iq¶?uÀNxÂFp½Do²Hp²En»Jl»Ft²L¯T‰±V²Q†¯M~ŸVŒ«L’¯L‹¬S£`š_˜™[ Vœ«b•™g¤Žh•‹qžŒs›ŽqŸ…}©ˆ…§”‡¨ž…¬š‚«œ…»•Ž°•Š«‹º†‘ºƒ¾€•¹Œ³~ŒÃ‰‘¸ˆ“¼†”º|‘¾{³‚Š±zx²‚­oŒ°eˆ­j…®[¨aŒ¢U„§Yˆ¨]ˆ¡d‹A|‘Eu”Jv—H˜T{Ts—Jr—Q{†X|“SsU|†^sˆUuX}Š^~gu€e‚}i~…ku}u{€n„{k€mlzlrunwfishjypjtmwug{xdrƒom}ph~uc~ye‰ƒl‚d•ˆk—‹fœŒqš”nœ‹m™ˆo™•pŠ‘nŽh’‚hŽ~b“ƒmk˜™c™™Z§bªœ\°¤\¸¡Y°©I¶ªN¹µB½°H±²D¨°;°­C¤JÃ¥FßFӞJџGќQ˝[Ó¤WÖ¬XÈ©N´QÆ­N¿¨D°¤J¤¥M ¶V¤¹P µV˜´N•¨Hž¤E˜¥O”°_˜«]š¢[§ªW±ªL¬±Q¤²X©¸X¡Ä\ ¿V¦º_¨Á[§²P–°V–±F—ªB‘Ÿ?—¢I¡£DŸ§A¤¢?ž¤8¤5¨¨8¬¥7¨©5§°?Ÿ¨GšŸCšž:–¥<—¤>¡¥<œŸ5ž–9¥A¦‘5¤ˆ5¨‰8¨Š5­–:¯“=®–DºŽ>†GĎHŘE¾™>¼›D´¦?¬­J°¢D¢“R¡‘O©—J¡ŽJ¢˜G©“P£E¥ŒB¨A ŠFC‡K•‰@ŒŽC“PŠKŒˆB…Dˆ–IP„˜Vƒ•N†šP|˜AxOs‰Kw†G}‰MuCyC€’P†KK…=~ˆ@„‰=Œ’?ˆ›:ž8Ÿ?¦>¨C~­I¨>ƒ™G‡šDš?~šAy–Dt?y•FržAs£:i®6c©.Zª6d¯8aª=jª5l°>c®Ab°E`±Gm¼Md¸Jj¹Hg¸Lq·Hj½Cn¼DyµA}­N}±N…©W±SˆªR—¯M”«W“¢^•¤_“£b›¦UšªR¥_•™i”h¢wŽtŸ~¦‚ž„•«ž~©ž|«’€°–ˆ³‹}ºˆµ‘„¸ˆ®…³‘®†Š·‹ŽÀ‡¾†…¾Œ‚¸ˆ„º|‰µ|ƒµ|§o¢l~®f†¬d‰©]„¡]‚™`›\‹T‹I}Mz–Ow‹Mx‰M”PtŽH{‘MqŒQ{ˆU~ŒTr‰Uw€cx^{~[~ƒfw†`}ˆi~„jx†mwyt{z}mmrmprdnqbybdmjuwlrnessnr„rk„yhyrf~{a}tc{{a‡€bv–‹m•tŽv–n‰†n…”t’Šn‹‰g”zm”~hžŠg—ˆb¨—b©œd­\§§Z©›E©©?®¡J·²B¾°O²§K¸¦H¸©G·±OÉ¥>ȦJ͝KҗOÑ¢HÉ£FϯNТMÇ°VÍ«KɬP¸¨L°­C­°N§¯]±Z£·S£¨Pž©Jš¡K ¢O¦[¡«V¢±_§®]©¨U§§Xª¶Z¬ÀRª½W¨µO¥¾V ¶T ¸Q£²Rž­O¥¯C¢¦A¢©H¨¤G£¢K£¢;šœ:©°D¤­D ®6§¤>¡;œ›J¢ D•C•£E¦«5ž›C™C›ŸD¬˜A¢B§0©„2«7¦Š=®š>»‹3ºš@¾CĉB¾˜:ÀŸ:¢A½›<ºªH¸ª9¥¢N©I›”D§I­C¤›M¢D£…8¡?˜‡D’ŒBš…C”’A>ˆP}O’ˆK‰‹E{•?w„>z=‡‘>„C‚–Ez’>~ŠKw’Sx„I|“Dv‹=“M}Š@ƒ…A=vƒ@{A„—BŒ‘?‡š7Œ©>«8~ª<„¯?€°4yœ=x“Eu›>r8w™2už5q 6n¡B^ª2d£8W§Agª:\²8`¶6]³Gd·Gf¶@m³Al¸@n³Ej¾@k¼Bo¯Jm·Mq¸Qt²EoªKt¯Bx¨J‹ªQ«W}§MŠ±Y™³R—­Yœ§W‘¤]¤X•©_‘ k•£g”o–wš”u¤}£…„š‰z¦“‚ •}©¢{£ž}µŸy¸±†x°……ºŽ’³‡„²Š~²“„²‰º†~¸‚ˆ«†‡³|¬‡…©xˆ¬s{¤q}¥f«r‚¨^‹¨\—V{™Xy¥^Š¢R‰Ly‹L{ŒT…M}}BpzDo„FkPx†Rq‹UwXqxRtoSxucw{atz_z}a…ˆe€„ay‚ewpykm{p{yrsppblvmnlkuvwstr{qq|ne}pj€th€ug‚xkˆscƒyl}sŽytŽxp›…n’„xˆƒpŒ‰ehƒe‚gŽx`—xj“€]•ˆ_¦›`¬ X¤£O¢¡I¯D«¡;±¦E¾§Jº®I³«O·±P¾®N¬FΩDÉ¢=¾ BʦDÓ DÏ¡M¬LɯSÊ°QƬXº³M´¥U²¤L¹±L°²R¤­WŸ°UŸªM ­Qž¬S¢žP£¥N¦³R¨¯W¸¸T·³`²®Z¯¼Zµ¾QµºV¬´X§½Q¨»N¤ÃM¦¿L«¾J¤·O¦´Qœ²MªŸP®G¢£>œ¡<ž£@¤±F¡±>š«;—¨@N•Oœ¡?¥­F©¨;œ–?Ÿ”A¦ŸI¥™N ˜=¢’8«Š;¢Œ7¨@³“7³š9»—0¾Ž0³•?º >ß?À™H´–C¬¡9®§<¤§@£ I¤¤D¨™F¡™C§šG•>š…7›‚A™…K™ŠO•G”†O™‰J˜QŠR…HŒ‰Jˆ‰:w‰;‚’?ƒ–<}“7v“Bt–D~ŽMq‰NmŒHm–Gr’F|•Hz‡Dw‰N|„L|Fu†H~†Eˆ”@ˆE‚­>†ª1‰ª0y£/z¨3£:w—:u’4u“2p™:v 4p£:\¢5WŸ6Xœ>eœCd¤9`ªB\±9f¶:d¯Fe´Ij³Ce»>j¸@m»Bf³Dd»El»Lw½Os­Jt®Bv±G{ºQ¶S~³Wƒ³V‚²PªY’´[˜¯[šªb•¡f¢iŒžg’’g˜”jœŽkœŽu›•o£‹t¢‘Ÿ—…›Ÿx¢¥w¬œ® x°¢wª“€­Œˆ¯”‰¦’…¬ˆ|²Žw®“x­…u©~ƒ«ƒ…°ªˆ|¡€€›€…£p}£n†Ÿm†žd†˜c‚—V~ V}™]€›Y|@x?‚ŠPtwFsrPi|@g~Dy}I|zEv|HiwWqjUtg\kq`pvTp{av|ay…bp~_€|bxkrousq}|iewd]uljpcvuqqt|ykm{qfwqk||g…|cŽzb…}p”|m–ql~i˜yn“…f™r‰„z„g‰‡j‹†k“‹oš‚f”qp™‚l•Œi¨’]´Z°šRžšR¦žN©§A±¢AÅ¢Q»¦QæXʲKǶEά@Ë©?é<Ç©>̛=əGÂ¥I¸±KÁºIÀ°UùXººU°¦N®±B°°S©¸W©«R¤®Y²U¯®V©®L®¦Q£ªS¤°Z±²RÀ´RÁ¹O¿°O¶¸W¸²J­ÀO¼¶\¥ÅO¥ÀO«¶N¢¹L¦´Rª´WªµU—¬R¦±H«¢N£¥Jœ¤A©ª<°²I¡±<£¦@¤<Ÿ¥Cš§L¤Ÿ?ª¡I§¥6¤¨8››K›œC¡•Q¤—E¡˜GžšA«?¢B´“=³¢=¹ 1±œ5³¦>¹”@½ =¼ ;¼™C°˜G´¥=©«A¡«K±šD¡§C¥’D¥–I¡‹A•‹2£G›R‘ŽJ••Nœ’O“‹P—ƒJ‰†I…BŽG{”A~“<‚‹CŠš5{‘9tœD{I}OwŠCoHp’LoAtB}…D„Kz‚Ry†E{ŒD…™D¦>€ <„¬2‰®<|¤.x¯.v¤;nŸ;r˜>fš:i™1f™.o¤0i¨2\ ;^¢>U™;\«7d¥3_°7b¦6e§9a²K[­@Y°>\¬Gj»?b¬>m½Io±Hu¹Nl¼Tk¹Gm´Bi¬C|µO¬FŠ­U†µTµRˆ¦W¶\š®Z‹±b”±e„¯a…Ÿa‹–f‘’kŽšm‘•s –i§’w¤“u”’ƒ©Ÿu¤§z¬ v«s¯˜y¯€°Ž|²—‡¨Žƒ·Žz®“ƒ¯–{¨s¨}†«w‚§… ~£ƒ¥p{«i€Ÿq€žwŽžg€”h„—X‹“R‹˜Sz–]v;†…>yE{€HpwDtuHi}Ivu=vsCmjKhhTfnPohRsrOhtTfv[t{ds„_m}Z{te{svwwvmowigyghxkouiozxprwqspfwtft{k}yk€a’wd“oc•si–~`‘~e›d“‰o˜qt‹Œn‹‡oŽˆc™ˆe‘„k™zi—‰j˜‰ež•Zª˜Z¡œW§£T°£P«œ=°£G¾«JȧOƯSͳFαJˤMÆ¥@Á 9˪9Ë©9Á¡GȱB¿µH¿MÀ·V°°K¬·O«¸B«­A¦¯H¡³M¤¼O«´T«®W®¦T´C´£@¹¯M¬¶V¹ºV¹µY¶µLîL¼¹G¼²R¼¹OºÂT¹ÅS¨ÂM±¹Y¬¶T°¹\©¸Z²N¢²G§§G«¡I©›D¦¥A­°Dª´C­­<©«@¤ @ œHœšO¥¨Mª«Hª­A¦©H¥«D–œH——K™S ’S¢ŒO¥”G­˜G®¢=±¢;»¥5¶ª5·¥2¼¤.´š2²¢<¾˜=ŗ9»Ÿ>²¥:°©B¥ŸEª£H¤”RœJ¦Š@ž9—–Iš’L–ŒN”‹K›‰O”’M•–FŒHŒ™E†œ@Š“<}˜;‰Ÿ5„—=†;w–@ŽKyEp™HržEu‘Ir‘F€ŠE€O‹R~‘V€•Vw–M|žAƒ¦6Š¥.Š­4ˆŸ:¢4p¬6m¨2nª7b›4h™7i˜5m—2_¡=Z¥4Z¤3Y­5b¥:g§,a©-d©6cŸ5a3]§BR¯BV³DZ¯Nd®Fe»Mg»If¶HvºKt¶Vo¹Qj¬Ij«Fx¦E§F‚¦M…°Z‚¨[…©c‹µ^·Yƒ¾[‚¶ZŒ¯\‡¨h…¢r‘¡p™žq“l–jœ m¡¤qš–z›Ÿy¥¤q¨¥wœ«u œw§•‚«›„¤”„¢–Š±‰‚·ƒ|­‰w¤ƒx¬ƒ} {{Ÿ~z£z¤v{¡w¬sv®wªs„¥f‹”bŽ–\‘ŒT–VŠŽU|C~{Fv†?y|Lyq¼µ>ÁªC¾«OÆ´CͪQɬK¿¯HÆ°>Ó°7Àœ=Ì£EɯJ¾½KÆ¿L»¶L°ºO®´N³®L´·F°²J®¦=¤³B¦¶U²¸V©¶G³®A¸­?¹²D±®O¼®XôböZ¸²V¼µ[¶´Zºº]ƾW±¸TµºZ¥ÄM¦¿H´¼U¯Á\­µT´¹E²´N®®E¯°Fª¤>¤®E¡¦> ®C¥œA¨¤;¡š?¥>¢£@§¨C«¦C®©E«§?¥œ?˜£E’¡O¦‘Cž‘F¤”F«”J®¤H¨ž>®¡'ª¢*¬¥+±£3¯›1ª—@³§>¼Ÿ<³©=¹¤>¬¬9¨«:¢¥@®¢@¬žA‘7ž™2 Š<˜š:›™EŸ< D˜™G”•H‰>†ŒF‘•>…B|›AŠ˜6•6yš;zžIxœ8—8s”Bm˜Fy“G„˜?œHˆžM{•D‡˜L{ŸB}”M€¨G‡¦7€¤2…ª>Š±:„¦)q¨/z«9h›2c˜8f£=nœq};ryF{mFziGwoOvnX|iO|ePrp\oif}d`~glvkqoe{vktyhmhjqeawaholouygizklzrsyj}tcpfˆm}h‹uaŠ}i•wd•{e›†l”‚tœ‰k“‹g†g™vŸ„l”…`™wb•tdŒ{a’ƒc”‘]¢P£M¡’D¯˜Gµ¢?³«;¿°AêF¿²L˹AÈ®FÇ´OèFЬMΧBĚLƛRÀ¦PÄ´R¶ÃN¹ÁP·¸G¶µE¶ÁH´»D±³;µ©<¬²A°°H©¯F²´H¾°C¿§<ȤMĪUÏ¥[Ȩ\¿¯S¸«P¾¨R¶°\įbÁ³Y·½`±¿\«½T©·M¯²F·¸M¹»Gµ¹JªºD¬«E±¯I§¬F¤¦J¨¨DšŸ>›žDš§G¥Ÿ<£«>¥®/«§2°°<³¯A¥¤; ¬H•¤Nœ›Bš™?š–@©>¯”C¨™D¬£=®­(±4¬/¦™7§ 7¢@®§@²žC®¡?®ŸFµ£=°œ:«Ÿ;²ª4¬£:°¡>®˜:ª”9¡“0ª4£•9ŽAœ”<™’H—EŠ˜@Œ˜I‚™N„D{•G8‡›G~˜G‚˜8‚¢7w¨Hs¡Hƒ•E‡—?~B£L€¨E‚ŸAv˜?z D{¢J§B}µ7ˆ¸=¸-€¨-{¥,u /h§=k¡9a¢3c¦9i°8cª)U¬.Xª;Y¥~–8w”`±1Y­4a¬8Y­-R¨/X¦6Y­9`¢8b¯7\±)c¯7Rª?_«7gª7d¬A_¬Fr§Gv­Kr¥Ju±LvªEo´Km»Ni´No¼Bv­‡–Cˆ–K™Q¢E‚ŸI}›=‡˜?…œB¡F‡¥;€³=~¯>{¬F‚§G‡²E†°@²C„¥9ƒ¥6s¤7z¯0t´5k¯4i·:g®2pª+l¶2m³5_³)[¨,[§9T¦=a ?\ªp¬Lm¨Lj¡>m¤@l²Dj³Gh¼Eq¸As¯Kp¶C|±By»F|¶It¯Hw±DrµB|µJ´P‡°Z€´a…¦Y“¡`‘¦f–›n¡q›¦k›°h—«j©k™uš¨n¡¡k¦ q ªn£©h¡±j¡²f£¥pž˜j¥–f Œg¢Žq§€n©wj¡utžusšxy”n‚žp~Ÿo}šky¢q†•f|˜h‚ZŽY‚Z„–W€/iw8eu8l8ts6l|?t|3muCgf9giAsa5qbDycE}gGƒeFnZJp^Vr^_pZeidqldkw_ynOitWjehom_usp|utuwk|l{}n}|t‡qxƒr‰ƒi‚‚nˆt|c‹ydŠyl—ol™wvˆ~p‘}f‰n€n‰}fƒ`Œ[ƒZ–ŽH‘‹Vœ—I§‹I†H©”>¨©Gªš>¸«KÁªLDz>ºAͳ4ŸEÊ®RͧDǟL¬BįKÀ²HÀ°AøL½¶I¸¬OÍ°KɪH´»6º¿C¿¼:ºµ>¯­:³¨B´«DÀŸIÁ¥MÁ >µ§=¼­@ªS½¼G»ÃB·ÃO¹ÄVĸZ¼·^¼QƶPIJVøIÁ¿J´ÀO­¾G¶µG§°K«°RŸ°H£¥:­£?´£;¡¨5Ÿ *¦ž.¥ 2™¥,›¥7Ÿª:³¡,®¡-¥¤:›ª9¡­: ™6¨Ÿ9¢›?¢ŸA¨£9£°<  <ª£1°©1°ª>Ÿ¤9¦§8¡ 7¨¨-¥©-¦¯4ž¯3ª´3§ª:ª¦C¶¬5¹¬>·ž<«˜;¶š5°ž9¦™4¥¡6©Ÿ5¤Ÿ>¢¨B£¤@“š?”˜C‡™K‹šG¦D…©H‡¦M~¦?Ž›?ž6‡ =Ž D}§>€ªC…®@‚¥Q{¨Bƒ²;Š¦<}©9x¯8«At¹@t¹Y±9c¶]¦:j¥9i°Lw¦Ph¤Jg­Dj§@cºId¸Ls¸?i²HlÀEsÄ;s½Fp´Jz¶Ex»Ow¨@w«J³P€®V…§RŽ±[‹°[¤Xœ¤\™®`£¤n“°_”«m­i•§}— n—ªjš§e•¥t¦k–ªkŸªl¢™l¨•e¥”m¦i£”uƒt™zi—‚h|r wz—}|’tpœrs¡prdpb{‘`tawŽ_„œ`|”S}1mt;ct4cs6bu:p~?rusfMz`KkQRfMPoIRtVanTeeVlo]ovUegchfbgsjmxm|xo€ur~‚m‡€n†€fˆ}n†„p~‚pxyo{od‰ybŽ{a‹xe”rkvj‹m‰xl“~k™ƒ]”…Zš‰e‹c“‹\š‘O‘Q˜U¢‡WŸŠG©šH¨¡9¡¦:«¦H©¦M´¥C¼³C¾´8¾©=»®IȬQŤHͤIìAÀ¨I»¢HÁ°O¹°H·¨?¿©D¾´@¸¶:º³>¶²>¾¹Dµ°E¬¶L´®G¼°;»¡<¿¡@¶¨>±±J¶ªLµºBµ½DÀÄSººY²³Nµ¶T¹´PõWľI¼·Jº¹M²ÁH´ÃKª¸C¢¯Q¥§Pª£A¤¡9­¬5¯¨B­š@¡›5¨ -¡§4¦¡0ª 2±š:¯¡2¤©A©¦B¢®:¢¥6¬¦?¯¡? ž=ž›4›ª(¥­,¬³4§«9«®8ª­6¦²>§¥5°¥5ª«9Ÿ®>¦:Ÿ§2£¦7§§6µ?¯œ7³§6´•-®’4«•;°§1«¨5®§=¥¬>œ¬@”§?«E–¢G™”GœE„ŸN‹¥L„¢FžNŠŸI“™5™2‰œ7„žB~ŸI}±?ƒ©N„O~°Eƒ±@}¯B€²D‡¶>~¸;ƒ»?~¶:v¬2n¬,f¯'f¯(k§(p®&k°)_ª(_®1[³7cµ4b°AY²2\³0f·;bº=[º0^·3T±6Z±v«Dv¤Kh¥Sc¬Fc¶Ir¯Ht­Et²ª¯9¨ª7Ÿª8ª®2¤°>¤¤C¨ž?¨«/©Ÿ-¥¡1­¡<±Ÿ7²¡5Â¥;°–?¯3¬—3´£6ª­8§¡=ž¯G¥²E ¨=œ©?Ÿ¢J‘’B•žL€œF‡–@{—B‰–;‚H›8€£2†¥>}¬B|¡8 9†¬<€¤Q‰£E}­J€­F{¸A|¼F~´Gx³G€²>s¿2u¶+p­,d¶8h¯4f¨/e¨5k«/Z«4gÂ=b¼2l²t²Ep¯Co¤Cg£Sb¤Jl¯Hb©Am¯Fh·>lÁDlÁBv»DmÄ>nÅ?r¿Hs²Ly¸I‚ªR€°R©Oˆ¦Sz³Q¨M¬Q’ª]–´Wž·c’¶c‰¯q•«i“ v”¡l‘¤l¬r”¦i–¡qŠ®cŒ£k›™e’g¥‘n¢œr‘“e˜oŒ’iŸ„j£t•yt˜zy–rl‘yq‘wimeut›kq•bw”e€•Yt“`|3ct7]n5Ys>`t?UhGYbCai?cb;gXGlS:s\µŽB°Ž:§š>©¡3ª¬:­¥8«ž1·¡6À«?¼¤GÄ©>À¬@êE¼§MŸW¼¢Pº©J´¦D¶¨E´¢;¯™6²¡8µ¡:ÀŸ9· ;¿¢B·¨>±«5¹µ>µ²:³¨A½¬?»§Bº±D´»Q¸·R¹¼L··Q¸«FÁ«K¾°F¾²Qº±S¿§R°¦R°®F£¦?£¨Iª¨Mª¥F©£H¨œC©¡F¤¨>¡£1˜©4‘­9™¡8•§0œ9ªŸ@§™B©ŸI¢K¡¨A±©A«¥8°¦1³¦1ª¨)ª¤ ¶¨$¼­3³°2±¨,¥«.ª¦>©¬<­¨7­¨@ª«3¡ 1¡•;©–3¹ 0¸›=¾žEÀ—>´ŸD¹–Cµ–?¬¢:«ž?®§8 ª9£§E¦£Fš©>’¡=ŒE…–@ˆœE‰›F‚™<‚’DŠ™A‰Ÿ:ƒ£=}¥?ƒ«8†¥A‡Ÿ=‘ªDŠ¨F„´L~±Ds±Cv²J{·Sv²L€¾L{½?pÆ@m¾5tÄ8k¾8k¶;f®8f·2n²3`¸/bÀ5b·:i»:^¼3VÁ5Xºr¶Ao¨JvªPe¯Ie¬Je¬OeªIm»Ii»Geº=rÁ7uÈEsÃGrÉKm½Em½M|¼P‰µT„«Hƒ¯GŠ¬W€¨N}­UŠ®S¸_Ž³Xµ^±Z‹¹f†´^‰ªg¡b¢n†§a‡ªbƒ¨fŽ­j‰¥h¥^Ž¢h˜˜i“b”Žl–„e†c‘ƒf›†k|q’yq‹tu•hœ~f•|hštq”in›]{”bv•g{†[z3jl+nc.bk3buAZh@T_B]V:Y\BfYGaTAe[@h[E[R?bJ:`SCVQN[^GcVM^\[VSecXriZajTal[eiejqajsmnthtvbn]~f†bzuY†y[|wY|te…jb‹bd‘wi†s\’t^€s[Œƒ_„€NŒxU€|V‡\…^„‘^Ž—P–T›šL¡R§”=©—;·›?´š<¨—9©©5²ª.¸¥,¼¦9±§:¯™N¹§9°¥?ÁŸ=´¨E¹œ@µœBµ£H·¨B®¨Kº¨D®›:­š3¼˜5¿¢7ÀžBà7Ã¥AÁ¡7¹±6³­3´¬7¹«?»¦<ȤK¼§N¶¯L·®N²µK¿¸V½ªG¾®DÁ±N»©Iµ¨X¶¯HºªC¸®D´«C¸§Aº£E« I¤›>¨­>¬­9£´9«³2™ž;¡¤5¥›B¨©;ž¡A£Ÿ4­¤>®¡J® 9µ¥4´ž:º©4­¥1£©3­©'´¡/¬².¶«<£¨6Ÿª5ž¦:¦­A¨¬?·©:­ž=¥ž8¬˜9±6ºš<µ–@·›A°•G°™@¼›<³™B§¢A¥¨6¯©;¤¦4¦¬7˜¬5¡¨8œ¨Gš˜I˜L¦@ŽšH‰?„£;’žBŠ—E¡;„®>Š­2§=}«@‰¤=~¯F€´P~³G…¹F}²LªP€µA„»=vµB{½An´8yÁ4pÂ8wº5n»o°=t´Gt¸Gw¦Pq¦Oo¬Nm¨Bn¬Dp¬Ij¶Bs³@o»;n·6t»MkºOi»Bu¼R|¿V‚¬O†´K°F{©\­Z„¬M‰µO‡»O‹¾R•«WŽ´Z’¼h‹»e”¸n‘©k‰¡e¤h‚©g‚­_€¬e£kŽž]”n–m˜Šq–“m‘†hŒd’|l‡a•€c‘|q’g–ym™ƒgpzkŠoqru‹`z‘a{†].td/md7mg.\n+\]2\X8RT[UAR[GTdEZ\LVRS]PdiLjfTrt^iq]ordijhkpakvapiapl`€{\€_‰re„nY†k_n\Œs`g`…p`‹ueuh‹s`Šu]~K‚ƒI~T‡…_‰ˆbˆc”‡\’M˜”L”‘IœŠIªˆ?­—E°›;§ž?¦Ÿ0­¡/´¡6¹œ5¯¥B²Cª˜B°›=° @· >»œI·¦Eª£;ª¦B®@½J¾”K¯–=²žG¶œE³š;»¥9¹¨3Ĥ<¿£8³¦8¶ž>â<ƬFÄ¥GÁ E½ªI·§M°ªV·ªJ¼´M¿¨Q¾¢J¶›Q¯¤L®°J²²;¶¬C¼¯DÀ¥B»ž:±ª<§¥?±©J³´C©³=¯¬AŸ¡;š8¬§>²¥=®0¦¤4¬–B­™B¤¢6§ž4­¥-»­*¹¹/¨µ.°¦-®§5¬­6®©7¨©9¥¡>¡¬<¨°E¨¨3°¦/§œ1¥™6°A°’Bµ˜:¶™B®œ<ª–D¼•<¿œ=¤9³Ÿ?µ°<ª´;¡ª8¦¥7¦¯3–´:£Eš¡G¡M†¢I‡¦D–ŸAŸ@Ž¢F„©8‰Ÿ5‹­8‚®3z§C°Bˆ«E}¯My´I†ªJw®Rv¶T…²J„¨=}©B|¶D|¿:v¸<„·?€Æ4„»-x½/p¿0q»Ä G´:Ę6Á¡@À™;ͬC¾¨G»©KÁ°W©ªMº®Mµ¯Mº¢I½žI¯ªNº§L­±F³§?¶«1·²8ºž3µ3·¡=¬Ÿ>®µ=¸«=¬«Eª­I¦¤FªG²˜>±Ÿ@±§4®™+¦›/ª•8§”:«£6¨¥-¯²2¯¨,¯®5²¨,²¯1´«0·µ9®®:¬¤4¬¤1©®G¥ 4°«<¨Ÿ8 £3ž˜<ªŸ=¨œ@ª›AªŒB­Š=ª›=¿™<²œ:¶¨B¦ªB¬¬7£¤?Ÿ£6˜¢6˜¨2œ¦B³P‰©Q¥P‰ªFž«E˜©I‡ EŠ¤G‰œ7¤7Š²:‹µE‚¼Oy®C…¬Gƒ²Ky´G€§F†·N†µQ‰°;‰·A‹¶>‡¼8|ºDv¸<†È7Å5}Ä9{½Ax¿>~ÊEjÉ6mÄ>kÕ)`Æ(\È7`Ó0XÐ4WÊ,YË.aÉ:b·;\»?jºKkºNqµUmºIk§Nt·Er±;n³Do©:j°6e¼?oÂ6oÀ=hºnc0pY.a^4\];VS@XP8\Q4USA^MJZWBSW@UX?YP;[ZFSXINSWZOXeSZ^Ud^c]]gh\_cifjeanmZmt[ktTluS{mSuW{qUul[zmWz]y_ƒz]ˆwg–yc’i`Šj\‘f_…jT…iTŠh^‚s_ŠsXƒwZ‚yO‰zP”G“ˆJŒŠJ–•?¥ŠG¤Bª˜H£—@£–=°”:³™F¬C°„I­‰?©‚=³‰4¬Œ2¥—:«žH ŸEŸ™E­œE±¦=¾¥Eµ¤H½F½9Ñ:ŝ7ÚA¿‘CȓK¿–B½šF¸žK¹—@¹ LĦMÀ²T¯U¿¯P±ªQ¬ L± I¬¡K±¦?¶¡7³¢@·¬6¶ª9º«4µ£,µ©+¼«4¾¡@³¨>»¦A¹¯G­¡N¨¢E® L¬œD¸›;¼žC·¥>¹œ2¶ +¯Ÿ5®¥;²5²¬0¬¯8«²,»¯1±¸4¸·)¸­2³°-²¶2±­*±¢6ª¡:®¬9­¦@¦¥?¦›6œ£>Ÿ9š™< “F¯‹E­@³˜K²ŸDªªG­°Cª´E¤­>§¯?œ¤5Ÿ¡1’¬;“¸=‹¶J‹·F­H®B”²D°BŽ¨?Ž©H¦C–§E¯;Š±<¶L‡­P…³KµG|·B‹¨Cˆ©K~­R~¯Gˆ·Bˆ³;ˆ¶5~¶=|¸2ƒÅ3‰Æ>ÆD|ÁLÌD€×I|ÖBxÔ3hÏ-f×5[Ñ/R×4WË/aÔ.aË+V¾4XÂ8XÄCV¹FW±Pi·Jv·=sº>h¼4j±;d¬¦5¡’CŸŽ9§…<£3©Š1­1¦“;¨‹=©‘=›—>žŸ8¯˜C´ŸA¸¢Eµœ@Ś@ÞB¹”:Õ7ŽBǘF¼’EșJÃ¥B¼˜KÀ L¶•;¹£I¼ C¸ŸI·›T¶¤J«™I±žM¸ŸM¸¢F³™C®¦D¶£7½ž:ºž6­¢2¿ª2´²9¸¨3¯¬>¹±B¼§Fº¯<®¬F³ H­¡B¹”D¯£F¸§@¿¡2°¡3§–(®‘/©¢3µ˜-¶¢9¹¤'Á­2ij2º±*¼«*¼°%º³)¸«:´­6©š6©›<¬ž:­•D¦?­ž: š?¡”@¥ˆH¦‘Fµ‘J©Ÿ?¨= §>ª®<£²D¥¦D¦¨? £4ž¤<˜·=˜¦=˜©K”¬F–¢L—±:›´C”©?† K‹¥=¨Dš¬BŠ­9ˆ¨K½BŒ²Lˆ¸D€µD|ºC‡¶KŒ¯F©B|©AŠ¬E~¸={·@{³1|¼?|Ê:zÉ@|Ò>ƒÆCsÉFrÅ>zÚ@pÚ9gÑ7^Î6dÖ.cË,SÌ5ZÌ3fÎ3^Â3ZÀ3a¿BUÃAj´Dl½KlµAhÀ>f´7[³=^»Bi¹5fÂ6iµ8lÁ7p¿;q¸Ek½Kk©N_¢Un¨Lu¡Vv§Gz¨R†«H„¦G‡®E‹»I…±Q‘µH‹¸W…ÃO€»Iƒ·UŽ³MŽ¤V†Ÿc~§Y¦^ƒ«R„™Vƒ£d}˜]†œf‘–h\„‰Y|“]ƒŽ`‘‹a…‡Uƒ†Yw‡Uz‰a€…V…eŽ†X”zj‹l]„f[‰cpŠmm;kZ0gW/f\3ad/bP+bK4bR.ZW3UM*[G+OS0TS@OR@ULGTWTJWXLUZSRZPb\Sd`O_]W^^g^Qj^]hYkf[npaqjdsqYphKobOxfP„fKuJ„nZ‹fYea•hc‹mb‹pa•mcŽpSˆoNƒzN|sH„lR~kS„sOŽoV‰{K“}@•}Ey?ŸBœ=¦”8£‘6£ˆ>¤ˆD¬”A¬—;œ53ž€7¡< Œ4¡‡4°Š0¯‘-¤‰8”D§œ?«ŸD®–:¡@ʜB½›@º•AÀ›A¼<¸ž7¿=Ê©FȧEÆ¥G¶ŸG»–;¹—:¼”:¹—@µžL·™T³œW±£IºœNº•B²›7®¢<®¢.²ž,¹)°©7²°4»±3¾¸1¶¯?°¨<²©6·±?²§:±¡>µ–@­•C¯š;¾™=À©1À¥%®”'µœ(¯—(¶—*Áž1Ȧ3È¥$Á¯ ·¶-¾©/­(¾©6´ª8¬¢=±:³¢A¯ 9©“E¤Ž@©–5±“;§‹G©ŽO­—N°¢L­›?¤’>©‘;¡¡Dœœ?¨¨A›±?–¬AŸªFœ±>œ²Jš©P—®L‹¥A™¬7—ª>‰ª;Œ›F•žH˜¨DŽªN•§G¬A¶?±D~¶;‹ºAˆ¹L²P†¸C¬<„±C~»E…µ<|¹A~µ4vÂA|Ë=„Í:zÌ6oÄFsÉJtÑo×6gÕ<\Ý2^Ö.UÎ:ZÅ?\Ë0ZÁ/]½.V¹;b¼>`Ã4pÅ8y¿Fn·Ci¾ÃžN½;²œ7´›=ºœ2¼@ÁIÀ™J¶¡MºŸQÀ¥N»•D¿šD¯‘1µ.±¢/­˜(´.²ª8µ©:¶³1·«>¾°9¯§0«©;§œ7«®;­¤=©—@±œC¯•:¾£5½¦/±£0¬ž/ª’!¨–.À’0Ĝ,½§#ñ,¾².ij/ì-Ä­"·²,¿«+©¨8¯¤3³¨3©©=¨•C¦“A¯šA³›6©šF«C°˜N³˜P¢“Nœ“Kš@¢¡9›¦HŸ°;™¯G›ªB—­E¡¶Iž­G¦Q“¨J£Hš¦FžªN‹¥J‹—>‰ J’ŸBš¯B—¬GŒ¶E”²:†¸>‚±8€¸>|·?€¾E‚¼F’¹J„¸BˆÁ?“°A„·:~¼7x¿9„Å>tÎD~ÉE{ÊDqÇFnÒ;xÍFtÉGsÜClÌAiÐ.^É?_Ë@\È1_Á/fÉ;[Ä<\Æ,h¾3o·5ƒÂ?w½Co·E`Å9VÃ<_Á0`¾=`·9e¹0k¼8h¿5c´Co°Jc°Oj¨Pi¨Lo¥IkŸL¢B~ª@„®E…®Q¸L¬N‹¿SŠ²V„µH·Gy±HuºT…«KwµNq©Yu§N|®J~°X‡¡M€¨Y„ PƒžR„—`ˆŽYš_‹ŠX‹Ž^‡Še{€ay‰hs„axŒhy†^Œ…gŽƒ[…vg|}e}}c€wd0T_,aU7YN7`V1Y_+TZ"XQ'\N$RX%OR%MX1CP??IDBQKQNRQU]XTYNSXP`WWeXSeQZZUSSRY]UPb^Wib`ckaav`[~aL}_MƒmLŠlQ‚^HŠaFˆaQ˜nW˜oT—qV”tauf›rbP–O–{P—WyN“pP•qU“{K˜};š‚<“€:—Aš4¡Š6™ŠCG B˜‡Eœ}Jš}DŸwG¤w9›†?¢=®‹=«;®Œ<¤‡4±‡2¬‹1®Ž*¿œ-¿›.ƛ9͑D͐BǗFÀ™E¶¡9º¡=»¡;ĦFº›D¼ž7µ˜9¸’9´›D¿EƕM½šG¾žL¾šC³”>³˜:¸–=º˜.´–)´ 3´œ/¯£5½ 8¼­<¼«0· 4³™8©Ÿ7©¥0³¤4ªœ.¬š6­—;¸ :¸¥7¾¨4µ¥2¶¦(µ+²”+»“ Ĝ$Ä£-ì,ȱ.É®.Á¬*²(µ#¸¦.¨©7¤ª<ª¦3ª¢;¯¢:®“<¨–:®—=±=¬˜H²“E®Q£–Rœ˜L—ªHœ¬?¢¯Fž°>§·Fž®H ¦K˜ªL˜±V”§R•©Q™žO›—O™šL••PŽŸCŽ¨E•¥9˜®<‘³B•¼9‡»9{»5~²:v­D|¹<‚Á6‹ÄA‹Ã?’ÅJ˜½H‘¶DˆÃ=„ÉE„Ë?{ÌwÔ@jÎ@mÒAsÓ=kÌ9gÈ7]ÈAcÆ@iÈ4lÉ0e¿5dÄ3hº0r·;{À8xº5i¸=]¸3_Á9WÂ5_Ç2k¾(h¼/k¼6]·=_²PJTLK[WIZWDTUFXTUi^Tp^[iTTdWNT]PUUSVd`an_coX_mbTsZQxaLylI€fK{hFˆ^OŒ^OŠbT”f]gV‘q]Œnb•o`—‚R–‡PšvSuN’wJqIšwH;˜>˜†?~D’Mœ8¥0¡ŠB™}A‰@šŽ@Ÿ‡<–sHœ‚F­}C z=œ‘Aª?¯C«Š<­1·,±ˆ0½Œ6•9’4¿š,ˊ<͐<ØH•F¾›<¸¡D¼£@¿¡;¶™CÀ˜5´–A¼—/¿’EÖ:¡;¿¢:ºœ?º˜C±ž1´0¼‘4¾–.²”/» ,ºž:¬«5¯¡?¸²?²¦Bºœ:·2¯¢;¤¤?ª¬5« <® 6¹¡9¼§=Ä¥/Å¢6´­4º¬.¯Ÿ)º‘*·›)Ä¢*Å©&Ī/Á¤/¿³6ǵ3õ(¾¯%Á©.¬3¬¦6«9·™=±—F ‹@¦›Kœ”Aœ›<«‘M©›B§RŸ˜Qš¨S’¡KŸ¦F°?›°I˜³Jœ®F›§Hœ±Ož°J˜²P“«N›¥Y¨J’¥HŠ¡R”Bˆ¬GŠ¨>“²A‘°A•µE‰¯I‚¹:¾>{¼B²;·D‚¿?’Ã@ƒÂ?…½M¶Nˆ¹D€ÇC‰Ç@€Ú=tÑ>nÉBoÌG€ÒJ{Æ<€Ò;uØCtÐGpÔHcÈB`Ò7]ÍG^À:aÈ3f¾7gÁ0bÇ9qÄ6hÁ=rÎ0xÃ6a·8b»;eÊ4i»5cÆ/e¸,r°1k¸9`´0g¶0]³9l¨Go£MhšNj™Mož?j§Ez®?i¤Ly¯Qs¬Dy­LŠ¸G‰²LƒÆL|¿Fl»Ix«Bz¶Sh°Fg·Rs±FqªG|±P¯Nz´I{²MŠ­I„ŸM‘š^†œR‘cŒ_€a_x…`{fŽb{‰c€†jm‹ˆlˆ_ƒwl{`.[_)JW4SP2[F9VH6QC-IN/JM+IM4IC-HA6JK7DM>O]RNWZI[`HZWHbYNoeKnaOhWO_VRW[WU\PXfYUcOdjVguZYw^X€`L~dMykK~nOŒpZˆjSŠjXfT‚kT‘sVmR“xWŽ{Q•V™xR•yM˜…L—B–„8˜…<–ƒB‡D‹Š@G™…Ažˆ8¦yDžx>Ÿ‡D …E–LwC£€?§y>£…3¤ˆ6£‘4¯‰>­ƒ?»„/À/¼ˆ2»‡5´ˆ4½“-Ō.ė9»’B¹ BÄ DʦDš9ĝ5º”6Ö?¼‘>¼76¼ž?Àœ>¹¨4¸¢;¹£>·ž8·›4¸‘2²“/´š;¼œ;¹›3«¡1®¬:»¬9¾§?æC»›6ºš2©¨6ŸªB¦¦<¡4¦š=«¨3¸©0¶¤-Á£8²ª.´¤(µŸ(³™,µ-³£+¼¥(ș$Ǥ)·©-²¬-¾·4½³,» -½¤/±=¹•=²E«ŸH¢”M¢œI›žJ š=Ÿ“@Ž?œ–N•ŸP—§N—¦F—©H›«O °J¥£F¢¢H®O˜²L”²B–®Hœ¤W–£Z¬W­J†§LŠ¨L‰­F†ªO†­P•¬?–§IŒ¬J±J{¿G…²H~¶?€¼E…Á?ŒÇDƒÉ;„Ç>ˆ¸MÀL€Æ<ŠÊ8„Ù=€ÛEuÕ?xÍ;wÌ<{Ï5€Ð;„×D{ÐIoÊKdÏFfÈ=kÃ=_Ã5\Ê=\Ì:aË:`ÆBkÇCfË9qÊ7sÆ5g¼-k½%hÈ.bÅ,^µ5dº/kµ/e¬3Z³3SÁ4]½0f®8j¬?p¨GpDm¡Bn«=g¡Jk¤Nv Pr¤C{´E„³M‚µIw½Jl¹Fn¯Av½KlºHi³Qm¸Jq¯Rn¯Pt²Q‰¥J†ªE~®K‰²Pƒ¨PŠ¢U‰•[Š’Z‘Xƒ•[‡‹b…”bs–mx•e„‚c„g|~q‰~m„€f‰†m~c&MJ%QW2VD4XC1PI.HD)MF+CK(GG/ED=HM1CV:CONMeUOZRCaXETP@ZYIedKlXT_ZQgRSY_[abK\VV^h_hh\mi]it[dphZ|fWyeSylWz`W~_]}k]vnTŒg^…{[vRqTqZšyI‘uF™p=y@ž~E”€GƒH™ŠMœJ•{EŒ…Kš|I“ŠBœ„9™u3ƒ:œ€B¡ƒB£z>¨|9¤}D±…0¨‰.§{+±‚1®‚4¹{0¿z)»~:¶ƒ/¸’4µŠ0ʑ/¼Ž0³—;ĖAÀ—Dē?‘>½•5²’.²•4°‘=µ3»‡;Á˜6º•;¯¥C³ 8¸ C¸œ:µ›=µ›(¹¢:¾ .®5´˜1³«8¸ªC» 6½¥6µšAº›G¨¥=§¨EªªF¦¥?¤§G±¢?«¨D¸¬4ºªBÀ9¼›1´,³™)½—3»Ÿ(³¤/´Ÿ'º‘)ƛ2ª3Á¡5¶µ8¸ >µ›3°–9³Ÿ9»ŸC¼¨E±£R«˜Sš‘J’P“¡@¦šD¡•E ˜HšžS žU ¦Q”¤Nœ£P¨F›ªU•¢RŸªJ˜²S’¬R±R®X“°R‹±W‰²[€°RŠ£Y‡§Z§W†¤L™±M•²C†®M­FÄ=Ž·?…¸A„¾9ÁCÍI‹ÇA…É?ˆÃPÌ>†Ï;ŽÌ9ÒG‚Ò?{Ì:{ÕDsÄ=Ì6„Ùs¡Caœ>a©ApŸJj¢Ns¥Ak¡=w´Ou«N~°Nn²Ep¶Js¸?m°Hj­KjºCuÁJq»O}®W…¨TŠ¥Ry°T{³T}¢S‰¤\Ž›[ŽZ‚”b€›^‰TŽZz“iŸkx˜]…‘ha~}izjw^…wd„ƒ`.OF*NN&FK-GF7JK5HE-LA+EI4MN0EI2@T:GQ=MYMH^KGWNDZECdL>\V=f_KeXSj`JeYHZXQ^YPkPMf_S]]^cn_^qfbs^R{]RueUze_}mbte]|iZ}tU…rW†sX„lQvZ™wZ”oJ•fEn=“xF“€?—‡?‘…G’K–KyS‹yIŒL•|?•‚0•€2¢z1 }5®ƒ;¬†<£„B©~:ª-®}+µy.³|.´w)³y*µ&Á€2º‰*¸Œ*¾4¾’.ž/¸™9À—57×;¶•4°Š8·‹+µ’-µ‡4À„9¹Ž7±Aª™?´—?® :ºšD·¡<À¥;»ž.µŸ2¼«0¿«*±¦/¶§1²§=±¤>¯œ;¯¦:¯¤G­š?°¡E¤¥K¨›F£¢E¬Ÿ;²ªBµ¬F¼©E·¦>ºš9Ý)ɧ+¿ )¶™*º›.¹Ÿ+½™0Ɲ*ƚ(Á¨/»ª5´›@·™?°š>¸@³šF´£G«—G¢™M¦—L™—M’“O››C¥MH›§Rœ¥K¡¨R—XŒ©N¤R™«K”±R“µKš±N›°RšºJ“¶PŠ´R†©Pƒ¦^¤bƒ§Zƒ«Y€ XŒ¨U’«K‘¯DŒ¯B®DŒºB”¶F•¼:·CŒÀ?¾JËG‰ÃI‡ËD‚ÕKˆÐA‚ÕAŠÒF„ÎE}ÉDÆ<}Ë:×A€Ñ8ÙE{×FqÚ=lÛCqÛEkÌ?pÍCpÖIqËAgÐGsÐFmÈCkÊBxÒ=sÇ:f¾5c»3i¿/k»0k»3q¸,g¹3iºAiµ?e¾?Z¶9b¼>Y·4\ª?e¨@l¡K3LG7RNADV@?PT9RL>HS:WR>OVNd[H`VLYWV[TOcWP]PRdTO\OYec\encefa]sVQo]TnXW{^]nadpeayq_„hQ€jP…x\Œv\u^™oS™yI‹qNŠnB~=›„EŽ†@‘~NšŠI¤‡Q”O|9”u@–s;w1.§x7¨Š5¬}8«ƒ;«2¢‚7­ƒ/§Š9¶}.¬v&¸z-¶0º~'Ç~0¿)Œ)·‡*¿“(º0½¡:¸™9Ä¡=º—+ºŒ5¯/¯’'µ4·Ž0²•3¬‰@°‘9¬”C´œB§¡?ª Aº—AÁš6¾¤4»œ1­7¶¤4°®.¬¯1±­9³š>ª›Fº¢Fµ¯N°E¶©E´–G¤—I¤¤GºŸ8¸ŸH²´Q·ªHÀ°9¸«;¿›3—0Á¡)¼6¶˜2Ę5Ÿ4ɚ+¾4¼­6ǬB·©7±¦GÀ¦J¿¨=º§Gº¢A¤£EžœU™‘M—šRššD™—D££J¢—L›¨Q•£C˜¤Q¡ªVš£Nš²S•©R›²K˜­Q¡´I–¶Y‘ªP‹µL‰±MŠ©Y‘­^‡¥V†¥YŽ¦]†¬W‡¯\ŒµOŽ°Pˆ²JƒµD“±F†¸I’Ç@Žº=É5ˆÈBŠÃH‡ÇD‰Æ@’ÊA‰Ñ?€ÏK‚ÑT|ËBÄK|ÊK‰ØGƒÒ;vÕ@}Ú@€ÏLyÝGjØGsÒFpÅ>jÍGrÒFdÒHgËHnÆNdÂEqÆEzÓ:uÎ>fÃ>lÁ6`Á0j´-j±+e³/_µ9g³4`±7b¶D`¼8[°8\´>AA@G$>L&JM1MK&HI*SD8JH5BUCDSBOJ8?A?@GG=BU;GWJPMGOVFPWE^XI`MRVQIPbH[\NUT[YP`d[Z]d[`lTZfR`hUYvfTrf_sdglm]no]~iPŒdS‰oN•uM—xP˜yOyR–}EŒr=y;›|DžˆM„G¡ŽJ¡M¤‰=ž‚:£„7žxA›€:|,¬ˆ6©†;«‚8›|1š9¡u=ªy:¢‡;±‚2µ.­y"¯~%±}0¿s+¿„/Ž9̆3ƍ3ǖ-¿š5Ȝ<ʖ5ʙ:ő/À‡4ª‹.­Œ&®Š,¯3°•A¾”?»œ@µ›3¥˜5¨›;µž<¹¡1¼¤1¼£;¬œ3²§0¬¥>´®?¬ª6¸ªD³›Aº¤E·«E·°:®£7¤¥C§šFµ¤A·§=¼«L³­K¼«D½°:·¢0¾–2¾Ÿ/º—8/½—*¿¦*Æ¥/¿¢6Æ©1Á³5˵=¼·?¶¬@²ŸE¾£I¹£Q³§Kª˜S¢˜PŸ—P™›P“”M›šQ¥¡OžžG–¦Q•«I“®K¡­G£§M˜®K˜©K›±Mž¯L¡¯U‘´QŽ¨V€ªW€¦H…§O­O‡²R‰²_”·Y‘±]Š¼Z¸L‚°M‡®VƒµMŠ¯L¯LŽÀE†Ç;ŽÄ<½I‚ÄGˆÈAŽÌ=„ÆI‰ÊG‡ÏI}ÅR†ÉMÇB|ÌQ„ÔO€ßNxßFÔ>{ÕEvÍEnÌFuÉ>kÄ?lÁ;eÆ;]ÎDeÑFiËKgÈFhÔCjÏ=tÉ=nÎBmÑBbÄ?Zº?`¶3_À8g¼5^´¤~CŸƒ?¥Š+©-³„1¨„.¬|+°r*µ€(´‰/¹;¾“Aə<è/˞1ř/ʚ6·•=½‡4·<´Š7³—2¶‹<µ˜@»A±“;®”6¬‘=ª›Eº¢D±§;»®0´¤-³«5»œ<·ª;µ›=²ª?²«;¨¢K¯ªE±£Bµ£8¹­8²¢@´¦G³ K®¤G­®J±«D¸¬C®¶B¹¥4·˜<¼›C¶—B˜?À™7Æ£*»š5é/Æ®9Ò§0Ê©6Ì´=¼ :À­F¹£B¯¡Eµ˜Q¨—N£˜S¦”J¨¥O£¡R›žIž¢K™©R•­Qž¥Mž§Oœ£O´G °V™´J¼Lª°Z£ªMŸ¤S¢W‡©J‡¦H¶H‡·Z“¶W•¯b‰¯Z•¹^µRÅN—³R–¯IŒ¹Q‡±J‰ÁFÀO”¸>‰ÈI‹ÆEˆÆJ†Ä@ƒÅ@‰ÅJ‰ÐKƒÈNvÌL…ÌE†ÐLŠÍNÚOwØK}â@yØF|ÓKyØGmÎAlÉChÍ>uÒ>gÓAiÑDeÐFlÍ=mÊ>fÐ=pÆJrÈHkÃ?_ÎGaÇChÄ:a¼8`¾5fÂ6nµ>sº>a®Aa´?c½8t­Au¯Is¶Lz¬Co¤@n¨Gy­Ns²M}µN~¦M{¨RƒªQs¨Q|¦G£Hw=o­>}¨@u²3w®@~²S}­R}™Q‰©R‚¢S‚¥\”š`Ž›[Š¡bxœV{¨[{©T‡™]}š`†¡k‡žhz h}Žfx•Z}‰azƒ`‚ƒ`‹‚OU?"I@%=?$BO*RI#PI+RC.VM3YK@RNJXHCNMFDIRHP]KOYPJSYMZaIRcNXfW\m\OgTSj]Xb\Rj_UnbYmaTsjZudR|ga…q^‡iXŒpYˆsO‰sU…wTŽoR›vP™rHœzG“Š?˜ˆ7•>¢…EŸ‹C¡=§‡?¤~>„4–ˆ7”.ž†8 ~3¤w/­r/³o6¨x@©†A­ƒ:¢~.¨‚+¨ƒ+¥{'¢v(°z&ª…*¬Š'±”0»™=Ä¢8Ȥ6Áª.È¡0·œ:·‘9¹Œ6²Ž;¾ŒG¿•B¸˜9º™=¯¡<³™;ºœ;±ŽB«Ž7°ž=°›7º©-¸¤+À©:¶ AµžG¯œK§šC³¤F®ªJ²£Eµ¨I¿£K»­=°­:³®>°©?®¥MºžMµ¢Cº¢M¯«G«¡@¨šA¶;µ“C½=º“>´œ1¿Ÿ5¦5ʨ4Õ©5Ñ­6É£8Ë¡D¿›A»¦I¯¡S«—Tª‘^©šZª™S§ŸN¦’K©–R¤¦UŸ§Q›¡Lž¦Už«J™¤MŸ®R¡±Uª¯\ª¶U¢²K£ªM˜žT¡J„«GŠ«N…¸Nƒ·[ˆ¼f‘¯bŠ·eŒ¿a‰»f‘ÄYŒÅQ”µK™¶NŒ´O·G•ÁI‘¹M’»EˆÃOÄK{Ð@„ÎE‰Æ?‚ÇB~ÈLwÉT‚ÆN…ÎJÜJˆÙQ‚åFxáJrâBtÙ@wÔAhËMiÌOqÌKoÈArÓCh×FoÏ;mÈ7kÌ;tÔ@nÊHsÍ?hÉ<_Ò8_Ë@^¼9b¹6f¶6o¹:z¿>t¹1lº3l²;u´Jt¼Kw¼Ey´Gs³R|­Kz­S~´Q´Zv³Xº[ƒ¯O|¨K{¦OwH„£M„¢Gy›<ƒ¨<}¨=¡E{¥Gy©U…žX†¥U‡¦_Œ£S“SœQŸX€§Vuª\¬\~Ÿ\w \¢gˆ›bžj†“d}atŽisŠb‰`~€\$L>!IC.PG"ATEE+QF$NG:TL1GEAUO>FDAOPJLOUPKPNPHN]QSbJ[]ITePOcMMd\RhYFi^IicYikKriSo_ZrdQƒgRƒhbaRƒdXlM€jQ…fG‹kF™gM”wK”tNž|:‘†E‹’=Œ:—8—†>¥ƒA¤‹1“8ž‹<˜…1š„=£{.žt-¯{7§w@¥wIµ…6¥z@¯{2¡}2­-´{8³x#²%ª‡1´3ª”.¸;ŜCț5ř/ɦ6Ǥ.¶Ÿ1¸”/«œ7µ–E–D·JÀœCº 9³•C±›;ª–J«’9º•0´™8¸£6¿«4¾£9»¨<µ¤<® J®¨D¹­O¿°E»¬J¿¤I³®M»§DÀ¦B¶°D´ªQª²Pµ­E¿©G¼±N½¤OªL«I°–E•M·IďB½£9Á8½¦7À¬:̪4È©8ϧGÌ¥LĪD¾žD´¦J§¥V¦£Z®œW§¤]¨žSª˜H¥šV¥œO¨¯X—¬Qš§T¥¡NžžG¥©J§V °O¨ªUŸ¯U˜®K¤¥Q“£E‹¯Tˆ²Hˆ´N‹¼OŽ´V™µa›ÀWŽ¾U›¿_ÃUš¸N“¼J‹¸T½NŠÁM·I–¾LÃJ…»FÉEÃCŒÊEÉ>†ÂH…ËC~ÐYwËVÉD†ÎY„Û_‚ÞWÜUr×ShÚ?pÓAfÑTqÊFxÏJsÈNvÃ@mÅ=qÎ?g¿>tÇFlÂChÆGjÊEh¿3bÇA`Í?aÃ;d¶2k±3tµ;p¸;k·1j·?oº9o¾Bn³A{¶@€¹A†¸Qy»M~®Q€°Z®[ƒ®P…²O‡«F~®K† Q€¡U‹§L|¨K§E‚«?~©LuFt¥J„—J|–X‡žU’ŸS‘˜^• P—\wžMt­S|­dx©X€¨X€ªX~«d…¡_‰›h}Ž[‚˜gƒ—]“cvˆY„PHN'DE,F>0OG%QL)KJ2LN4KM>LA=IFDME9NAAP=8M<>I:?Q@DJK?BG=AHKPDON>QNFISJQQVRUV`IMZQVcNNjHPdQBc^DkaSfeYklTz[Vz[S{ZP{[[x\Y~bM}gG~dH~fKfKpNoOŽzJ˜}A–CŒ‘@‡”B‡<ˆŒ:‘ŽA>š0žŒ3”z?Ÿz9œz4£o<¡u8±r9³|A³‚<¨{6­}9¤}8¨„<³„8ª„-±‰*²‚5ª1°‡A®Ž?´—<¿“<½ 9­8Ş7¹œ/¸;°™8¹‹:·A³™A¶ L­’Mµ’@¬J®œD·š<º˜4¼™0Á¡5ě+Àœ2¹¦1¾§Aµ­Iº¯C¼¨AÀ§O½«G·«P¸¬PÀSµ¤M°£S©©Yª°U¶®V¹¯I¸§O»¤V®¤N°›E¼›EßSÀ™YÁ–NŸAÇ£=Å HÅ CΤBÊ®?É«EÅ­C½¯?¾¡<­¨?¬¢M®›S¬¥\«™V ”Ož’G£’HžšV£ªT¡£KœF¡œF¦¥Ož V¥¢V£®U­¬N£¨F™¢I¢«J¡¦Q“¬Q‘±O˜´R½M™ÁW™·T”ÇO“ÅUœÎ\žÆWšÈZÀMŠ¼Z€½W¶R–¹EšÀL“ÀLËB‰ÄG„Ñ@ŽÑIˆÑOˆÃIwÆSsÈLyÇQ‡ÐMŠÝX‹à]~Üa{ÛWrØKiÏJnØKqÔNtÔIsËFlÊIu¾Gn¿Mk¾Bu¾XÈ;Z¼0NG7LB6IA;V?8L@9EDJE@>E=C@JUHFRJOHOQLGVYGOUCUZ?RkAHeMKlQO`SIaaLfeKh_StfR}_[{[KvZL\Q|_Iw^KƒTF€YH€aH‡hMŽkN’wL•{N€?‰8—?Ž‡<”3ˆ‰>‹‰B‘Ž8—„>š:™„8™{;£„F r<¥nG¯{A¯vC¨u>£‚<ª‚?¤ƒ7¥y8¦‚0³ˆ0­*¥‹0¦Š-°Ž:®‡5±–B½›6Á¦0À±<¿œ;½•-³˜4·‘F®•C´Š=¼M»’E²•A¼”@¬’@³”I» :º @¶š1¼¡:È 3Ì«>¾¨:æF¶©F®;¼§HÀ²QƦM¾¬Y¼­XşYº R¦¥I­¨K®¨Y®¤O¼©T²ªT¾¬O´§N¬H·¤R»§MɖW˒HśJ͘?Ο?΢CϤIÏ°7Â¥EɯBÌ¡CɦB¢G¶©NµW®¬^¤–R®•J¯šL«šMžW¦«J «Q™«Nš«K žN¦¤W©¦R¤¨O§ TœªH›J¢¢H§ªY™­W”¹J´R–³S”µPÀ]“ÀS’ÂW¡¼V”·Zž¾[–ÄZ‹¾Q‡º\Ž·T†¾BÂS”¹[‘ÁO„ÆQÉV“ÄKÊK…ÎH‹ÇNuËV|ËH„ÑJ€Ò\ŒÚV}ÒVrÒYrÉRlÊUsÑXpØSdÐCiËLr¿Dh¿;eºBuÀNnÁw´5q¸BhÂBkµ=r³Ku¸M€»E‡´O~½L‚¸Wˆ«XˆºU‹½Y‹¶O~ºF†°I¬;‹­J}±Iˆ°B…¡D~ŸH‚ŸKƒŸL|šNw’F€’Tƒ–UˆžW’—T«YŠ¥Ux£L«[~«^s¢X} dw™a¦Xw¥a¥Xš_„˜_ŒcŽ”S€ˆS}W[?RI PA+IF5LF>T<>XE?ODDOC:VCAVG9K@7MCACI]FBlKDkUIcbJl^GihGy`G|^S{`R~fSveXyVKu^N€XJ„VJxUCz^C…gA‡o@ƒxEŒxE’B†:‚Ž5Œ?†‡7‡Š6ˆ~5’5“‰@—†;Ÿ@¬…J©ƒF°}K©vM«yG¯}@®€?«€@¤B®|:«…>¦Š8 €:©…3£„*®‘1¨/§‰<·Ž5¸š0º£-º¥0¾œ6´ž9¹=­•F®P·”J´ŽR¸•H·œH¿”D³—:²š=³¤Aºœ=º™CŦ;Ì¢>È«:É£:¾¬> ?À£=È£BîMÀµS°[½¦W¸¡V¸ S«¦J±£T­­Pª¯W®ŸQ¸¦R¸¢UµªY·©LºªK¾P»šUǙLƒFƛNÍ¡GÉ¡HğIϪ9βBůFÄ¥FÈ¥AÁ®E²¬M·¦G­¢R¯¡V²P®˜X¬ŸS¬¨P¢©K¢¯Eœ¨Kš¯M¥¨Y¯œU¨›W¨¡W¢™O£•S¢¢T¦²Pœ²O’»J’³R’µY”µ\ŽÄS“ÂVœÉQœÀS·T—·Y•·O–ÄVŠÉJ…¿O{¿RÇPŒÊ[ŽÃX€¸`€»`‰Å\‡Ã[‰ÅSŽËL‹ÉG‚ÖQxßZÙS|âLÙVwØXuÍ[{ÐVrÐUtÏ^eÒUdÇGcÅGeºIc¸@a¿Jo¸Ip³Jj»Fh·9OEFDU>DNJGTAL[:OW;IWGA\FCiMi_Jc`=d`OghFijLufIaEu\FnQ9rW9‚SD€aI~SB†WF†^I~b<€u7wFˆˆHƒŒ8ƒ‚:…‰3x;‚};…{/‹;Ž~9 F–HŸ€D¦‹L§‡J´vJ©ƒ?­„Cª|=±6¯„8²‡E°†<ªŒ3²Š8«‡>¦0±’@¨’CªŒB«–8«›.¼™)¹¦-­¡7© B± I¨—F²‘Q±šI¯œE±JÀ”KÀ¡D½—=ºA»7½“9´©C¿®8¢>È©@«@´¤I¾¨?Ĥ=Ä©L¼¤Ié]ɪ^­N·§P¶¦G®¥H°«P¶¢O¯ M±•I¸œZ¸ U¹ Nµ¢Nº›T²—ZÎNȜRşHÇ¢VÇ¡VÄ¢NʤCУ@Ï¢:Å«DÁ®D̨7µ­J°¬M³¦Sµ¤Sµ©Q¬¬B¦«N«¥C¦©IŸŸAœ¤Fš¦Mœ¢K©¢TŸ¥Z°ŸU¤¤_¨]¢¢RŸ¨[¨ª\¥¹[œ»W›´P—·N—½S›ÀY˜´`“½[–ËQŸÀ[˜´\ÀN‹¸XŠ¹]Š´YÁ\‚ÒTÍS’º_‚ÀVŠ¹_»U}ÄR‹ÓXŒÑOÜW†ÛI‚ÜR~ÎW{Û^wß[tÔ[ÔZwØ\lÕOkÜU]ÌUeÒRa¿@]ÄKj·Gr²Ck»Jg¼;iÄ9e»HcÈ>^ÅKd´;e²@^¸9eÀ3k¹=o¼6d³Cr³1q°2uÂ5bÅEvÂGpÁC€¾Oy±O…´Iƒ¸F‚³Lˆ·S†ªP‹ºVŒ­J~µH‡¶KŒµC±G‰¯7§?„žH™GŠ¢=…‘H•E~žK‡—Bƒ¨?Ž¥O“ªQ³P†§Hz¢W€ªRŠU~¨\€«a{žet [€£b‚™c…š]y“Y‡Œ^Ž•^†–R”TG>&L>2M?0?I/KM3JN3KJ>H9DL4BE5NIXKN\CLaFP]:H`jdI^[IZgAgdAf_>tfBug=l\8~X8\3v^>wZDy\J^F_8Še:wJ…€HŽ}FŽ~A‡n<ˆo;…:Œ‚.œ€/šq5–s>›uI¯zJ²‰G°ƒ8´7¸@±†>¹}A±x4ª‡C®ŠGµ…>³ˆ?¥D£?°;¬‰?£A¡‡>©•@¥“6±˜0¹™$»—9®¡=¯£B±˜K±žH¬¡F¨¢G®•R°™DÀ£<¼—3²’4ºC³™F¿¢CÁ­>ɯ;ĬB¸¤;»¨CŪFͬBÉ¡DÁ¡MƧYÁœ[½¦Lµ§F»©B²K¸šL¸¤N·¨I´œR¹¡W²¡Y²§OÁ›K´’Nµ’U´—FĒG̖IÈ£S̪U˟LÏ¥GÒ¡9Ø­4Ò©6È¢CÅ >¾®>¹¬E´£Q»¡M½«H­­B£®<¡ Dž¡J¬¡F¤ŸL™©U›¥]ž¥U¬¬Y¨§_¨¨X¢¦`¡§^­¡T¨¤Zž³]˜²T˜·O–½QŒ¿TœÁR›µXžÀ[ÅV–¶R˜µT‘ÀU¹V¼Z‹º_Œ½^”Í[‰ÍbŽÀZÂbƒ½`É]xÌZ‡Ö[„×P…ÛSyÜNrÕ[{ÐY‚Í]{ÕWwÓ]ÖQ|ÒQuÞLtÜNcÕL`ÉEbÉBkÃBnÁHf½Bm¸?r·Fl»ˆ™7~˜.„š6ƒ¡9šI¥N‚£D£Q¦NŠªG„®F| MzT†£[‰›b…¥e…¥bšb˜aw¡\|œ_Ž]~d…˜^‹—U…¡V‹Ÿ\*N=&U>(L91?J1II2BP:AD4CF@CQAAQ€hA„zJ‹~?‰t;w2l>l.ƒ{0–u9™h>™o3£oB¥„I¯?¯y6¾z?­†1±‡A«€;¨z=¥~6³ƒ<¤“:©9¤‰?£†D¨Ž5¯†7«‡;¦†?¥–6£3¬‘/ªŸ­”7´©?¶™>·™Jºž=®ž@³¤K´ T²˜H»—>±Ÿ?¾œ@½Ž9µ™E»™J¸®FµžL»¬H¿ž@¼¬CƛAÒ¦RÄ£OàSÄ NÈ¢Z¼¦U·­HºœNºšN½¦S¢U¼›V°šM¿›Xµ«J·¢FÇ¡O»—H¼˜K»™IǞ@ȧ?Á¨MÛTMƞM˘;ɨ>Ë¡CÍ©BÒ©7ǧHÀªKÁ®H¹§L¸ H®£F´¡C«ªJ§Ÿ=¯›?¢©P˜±N¢­[œ°R©R±«_¬£^¢®[¥«c§ªS§±_¥¯T¨¼Q¢¯K•¾X“¾W™³M’±UŠºO—Ê[’¸Y“´W’»P–ºMŒÆa‰ÈcÁW‘ÄNÀP…ÌT}ÂV†¾V{ÏUËUƒÉPŠÝS„ÖX‚ÑVuË\ÒSÑbtÏa{Ô`|ÐW}ÞOuãIcáM_ÒXXÇLcÅAjÉKqÇTnÀBmÃ?nÀBeÀA]´C_ºNlÂ=jºDa³Aj±De¶AbÉ7nÃ7d¾@tºDp°PsÂBq¹KrÃD}º;€±Nv­Iz­M…¶N‡ºU…·R…©C‚œ>y¡Ly¢M~£G‡žJ‹­E‰±<—«6Ž >›@™6ƒŸ:“”B‚žH{©E³I’³Iˆ®C†­C„¨N¢\œUšdŠ¨[“¥X€©\ƒ£]~˜Z€¨_u–X{Z{—P‘”U’¦M•žX%I3-M4,O6'IH$GS-DL+HL5?H5CE8MI@KGDJQLBNBJNLSRMLJRA?T?9W43Z:oY=oV=rZ3m`8dW;l\7gS>`Q8c`=nk9sf¾”C»£Hµ U°žR¼›OǙJÆ¡DÁ“NǒTϜUʗZ¼§P½©KƲNÁ®J¸§X¶¢X½ ^¿ YĘO½ J¹ªD»£L´—C¾•G´ŠE¶N¶ H¹¢B¶­F¹¦D½¤IÀ¤PƟPÉ KÀ¡?Á¢CÎ¥=ͨ=Ó¥KÌ¥GƱD¾¬NÁ S»žO®šK©¤>¡ªG¨ C§°AŸ±L¥©R¥©T£°\­§[¦´Zª¶b¥±g¦´c¤¹^¨®Už¼Q¢¸W ·Y¤ºQ¤ÁO“»Q™¶VŽÀQ™ÁY™Á[›¾Vž¾R™¿RÉ\¾[ŽÂMŒÌIŠÆQ~ÍY}ÈZ‚ÅX|Í_ÚZ×U{ÛX}ÐS‚Î]uÌVo×WrÑfÌf{×a|ÕXuÜQbÚ[`ÔW[Ê[^ÂNaÇOiÆNqÁMqÈJb¼LcºGa¿@aºCf¾CiÃ8l¼7_¼=dÅ9nÇ;vÍDqÄHmÉSw¾QuÈOtÂK}ÁH}·B~¹K|²J|¹F³L{´R~³H~¡M€ E„™H¢F„¤E‚§NŽ¢D‘«D˜©C•¤A‡¡2…›4ž8‡ŸAŒ§?…¬LŒ§M†³F†®=€§B|E†T~\„›[ˆ—Z£Vˆ¢OªU‚¡P€¤N}Zy•Z‹œ]‹P‹˜Z¢S"<3&I<@8>IKE*C;)HD2A=.F>1::@G>8=IcDCcG=]U=aV7q^2kd4d^6gL?dTC_ODc]@`hAh[„m?‹x<‰r9kBŽa1’c.šx-¤r;£m5ªt9·u>º|8¿‰5¿‡A¹~8®‰=¯‹4§•;ŸŠ9«…3£“9«Š6Ÿˆ8 —/ª‰>´–:°0œŠ;¥›,ªŽ%«š&½¡.»¦0»¡;¸—:´–F¸—:µF´™?µ§B½™HÀF¾œ@¯—>¿§Cµ§S¼šHÁ˜M»¦U›TÀŸNęPĜOǙZÁ¥S¹¦V»¦NÁ§D¹ S±žK¾ª[Ä­S½©VǤRÁ¡SÁªP¼ J¿œO·“Oµ—R¸—Cµ˜O¼¤Oµ©G¾­@Ç¢N¼ªJÀ•EΣKȤ=Á¢Iʟ9Ò¬BÞCɱ<¿±CëPº¥R°¯C¸±8®¤=°£E¯§F±±Q®K«°L¬µVµ°e®¬džµV¥­Y¨ÀZ£¸_›½Yªµa¤Ág ºY£ÅJš¿W”ÄYŒºQŽÅV”¸[—½V•Ê]™¼SÍUˆÇ[ÌaÏWˆÉ]ŠÓT…Í^~ÓWÕ`‰Ä]†Ì]…Ý[…Ód…ÇTtÔasÎZrÉXrÕotÖdzÒ^rÞirÙafÑ]iÓO_ÏN\¿UaÈReÏFiÆFjÍKeÄBrÃF]³K^¿Q^·>`»;gÅ@cÂAgÂ>iÂIfÂCwÀDzµQ€µRw¿L|¼Mƒ½H·Ez´I|´Px®N‰²GµAx·J³@€ªK†ªE|§?ƒ§<€¦N„©N‰³CŒ§H‘¥=•£;‹,‘¤3Ž¨?†¥I…¥OŠ³Fˆ´@¨Ku¯Gƒ¨B™P~žU¥^‡¦U‹¬Y”«Y“¥X‹±Oz«Yuœa„b‡¥WFžX‚®V3/:9<9@D+<>.@8)E@.:C+=8-3<-=:77B=EOJCLNJHJ?IL@JNGLI9IO5;UE6RF>YK@eLAdO5^N7gU³j8¸pA®‚9¹z;¼=·…A°ˆ5¨Š3ŸŽ6Ÿ”:§‰?ž‘@¢“4¦’6¡—:§ >¯—=«”A¤‹4§–*¡’.Ÿ•'­˜0³¡4²˜?¶š:«–?® C³?·›L»¨K²K¶“B¶ŸI¬¦J®œE¾¢LºŸI¿¢Rº§ZºŸU¿ O¸ŸY´žT¿ SƟ[ÁšU¹œQ¿¨IÅ­O¼©JÄ°Y¾­\º¬VƦP»¯F½ªLƞIƕEĔ?´œG¬œH²˜Jµ¤O¶¨HÆ¥Kŧ?¼œBÛDÊ @Ѥ<Õ¨:È¡EÈ«?Ǧ9ñDɪ=Æ¥C¾°L¼±F³@¶¨9·®=»«Q±¬U¥®W ±R«¯d¯°e©«e›°V½`£ºb¡¶^½W¢¶_ª¸gšÃd‘ÅO–ÍJÆU‹ÃY½N’ÆX—ÄYŠÆRŠÈ\‘Í_‘Êa‰ÆfŠÎbŒÊWÒ[†ÒZ‚ÖX‚ÐW‰È[ŒÆe†Õb†Í^€Íd|Ðg|ÎZvÒ_rÙfvÎmvÒgqÕ`mÜioÜ_sÐRtÌWgÍ[hÆWpÆOmÎPfÓJmÄNo¼G_³R]¹Q`ºH\½K_ÄE`ÅBc¹F_·Jk»Lp¼E|½D|¶L{°H~²D©G…°?{¯F{¬N}¤K‚­:~³A}±?v«D}®A†®=‰¦=§@‰ C‘£M’ªI¨H—š5‹¦7¥-™«;¡@•¦:”ªB„£?„«Hy³Jz¬;{©:D 0C1351.D.=@24>+0:46G66DA9B>BHMBKD4RT:KJEFVF;I:FZG;ZJ0cB8jP2mP4mH8kQ8kV5b_;iaBaU8lQ/^W@_Z<\VGbd;`c/a\/dW5mV6iW;lV>v]9t]3ua<Œ_:Œc4Žn;Žn>‘fJ‡i;…{8‘q?‰k4’h1‘^&¢k,¡i0«q3®e>¸l9·w7¹†>±|@²‹2¬;§–0¢–2œŒ3°Š@©“9›•/¤—A¢‡?®A¤™8¥‹7ªŒ5¦Ž1ž'Ÿ+«–,©—3­™;œ˜4œ˜@¬–:©©<¶™M»¡V­—E¸¡V¯™U©¡G·žP³œ[¶¢RµU¶”\µ™S°ž\¿‘Z¶Tâ`º“WɕY¼ X»®JéUñUĦQ»¯LÆ©ZãXÅ¥Tº¦Q·—EƜJº™E¿™TµJ¯™N±˜I·¡BĨ<¼žEʙ@ɞ@Ȟ@՝?Ì¢FÕ¢DЪA̵:Ô°=̶7Í®F¼·;˲BÇ»EÀ°J¯¶?±¨G·¸Mµ´Q²¹P¥³[Ÿ»_žÀ]™¼b˜¿^š½[¢¹`˜ÅU˜·a ½b¢»Z˜È[›ÇYŠ½W“»L…ÂJ‹Ë[ÆUÌT”Éb”È]“Ã`…Ño„Ì_‡ÐhŠÐXÙ_…Ö\×\ŠÊ[…Ú_~ÓdÚauÕjuÒbrÐfpÚ[oäjnàj}Ò`nÛqfÚetÝhtÕ_kÉ\lÉ[mÏS`¿^eÉZbÕLiÅYk»P_ÁNZÅWeÄQ\ÊNg¿FZÉGcÉFdÃDc¹MzºNz¶@z¿I†¼D‹º<ƒ¬7‘·>ŽªC‚¬M{¹L„ªD€¶Au®9ƒ«4|±A„¤>ƒ¤3Žž6‚¢BŠ›A™œD¥;™¢;2—­-š¤-”£:“ª9”µ>®H“¬;‚¦G…¡>@>E;?N9MP8RR7EW7FTD?ZC;g@2e;4gG4bH0kF4bK)aT-jN3iV:lT=gU8]S6]_D]T@_X=b`;[W7\Q1lU+t`.oY2kU7uX0€X>…_:~j6g8„bFˆdD…hH‰n>‡p=p:Žq/˜g,¥i*£].¬h-°h2³s*ºs2½=´€>±‰7«“;©˜7¡’:®ˆ;ªA¯ˆ7¢;£D«ƒ<žŽA¢Ž?ª’F©’@¤–:˜.›*—”2œš,—•-’š2˜¡7›œ?©£@¥¢K¬—S±›R²X­¡Z®™T¸œU´›X´–X­Ž]¬ˆ_±ŽW±”Q·‘Q¾_Á—]¾žUŝ\˦ZȦXÄ«YÆ©UʨIÁ¦L¼œPÝT½–SŸPµGµœM´žM½šQ¶Y¹–R·£D¢?Ǚ:½›<½¢<Å©EÅ©PÉ¡MÉ£GÒ©KرDÙµ<Ö±6Ï»:ÆÅ<ÊÀ7ȶ7ʲE¿¸H·°C·ºH¹·M¿ÁP³¹X©º_Ã_–ÐjšÐdšÐ]˜Éa–ÆW’Ã\›¹h ¼c¢»n ÁhšÇd“ÀZŽ¾UŠÍUÓY‡Ë[ŠÍ_Î^…ÊbŽÆhŽÎq‚ÓmÔn‡Ò`ˆÊaŒÍjŽËc†Ö`|Ó`yÛmyÜuzÐl}ÖbqÚ`m×]kÞiqÛorÙgkÝllÖmlÚbhÎcrÈekÇ_bÄ\`ÇejÁ^jË^i¿`lÄVhÇReÈWnÄSlÉYpÀQeÁRhÇOeÆIpÀArÂJt¹;‚»9¸4‰µ:ƒ³1‹»9…¹;Šµ@Š®K‡³E‹¯@~µ9´0Œ¨/’ž:‰Ÿ5Ž’>ˆ•>Ž>“›=–¡3“¢0–£4•­2—­2—­/–ª0—°A“³F¥>Œ¬K¡It§Ox­N{©V‚¦Z|¬O€¯R‹³LŒ¬U„¨]~°b‰­\ƒ¯[‚¬Uz´W|¶Q|ªJ>.$4)*1:#.<032/(<3/9+4J7.E,/@8.C1?@24:9cC.gL.^P8eB1_K5lP4eQ4hb9]_+aa7eX;qWDrN@d_4dS?]R3]`1VR/fZ.l`$fT+p_,uZ'xW/xX9…e>}_:‚r5‚hD€cCƒu;m9…m7™s>™t=•p.Ÿq2®_+³i1¯n6®q6¼v:ºs7§}E°‹=²J­ˆ9‡9 „@¨‡<£8¤‘FŸ…G®ˆIœ„H£†:©5¬—8¢’0£˜6’œ(œ/™(’5¤–9 ¨?¦4›¦@ ŸDŸšV©¡U¶›S«›W«–Qµ¤M¸¢`²—Y´’Y¶–P¬Z¸T·œO³ SØ[¹—aǚVÅ©^¾£XÅ«]ºµ\À©R¹°MÄ¡NÅ¡OÀ˜Y²£P¹«WÀ¡V¹T½£_¿©RµŸN¶¢C¼š=Ä©8¶›=Â¥=À­Mɤ@˦?ɯHÖ­DÕ®?л:Ǻ?Ì»?ÿBαDòOÍ´LÆ°Q¼¨J´¶H°·P³·\²»[¡¿Y¦ÇbÄ`’ÉcžË]šÒ\“ÐTšÅc¢»f¡¶]”¼džÁj”¶ZŒ»TÂV‹¿\‰ÎP‘ÆbŠÅ\Ê_—ÉfœÂkˆÄr‚ÄkÓ_†Ìa…Êf—ÔcˆÐe‹ÞZ‡Óm‚Úo†Òj…ÒkÓ`v×arÔ`e×dnÞoqÞmhÕimÜhmÊhmÚ_iÖioÖc`ÉibÇZ]¿gbÎfc¿ahÃVeÉZ_½\mÊ`nÉ_e¾Lm¸Nk¸Up»FmÃBoÄE|³:w³F~¹9~±?²7¯>„»F²C„²7´Bz´4„¬7‡¨/ƒ­3„®)ƒ4 .…›7‡¤;‘ F”¦<•©8˜¦4¶<›°4”©,§=œ¶7Š­GŒ«DŒ AœEx°O|®Hr°P} \®Y«W‡²Y‰¯\·U©a€·X}ºT{µ_w´[„µH‚±I7+&52+4(-:-57*-0$&>.)B53?.399.D65F/9J92FK0DQ1LP5NKE>SHBXM:WE7[M0cD-hK2lH(bN+dX9]`7bb:f\2oR;rK>mL=qS/gR-e\8`R1`X*]b&h])o\(t[.uU6wZ.{c8z^4x_@ƒk:ˆs<ƒr;€j6Šl@‰gG‘m@‘h;s2Ÿm/ªr0¶{2°w@·u?°s3§u?©zK¦„B±|H®‚:žˆ4Ÿˆ4¢…6©Œ4ž@œ“MŸ’Iª†H¦†=§> ˜;¢”>¢•4”™+“™+Œ6–4§ <©¡8¢¤Fž¡BŸ«JŸ§G¢›Sµ“N³•J¬šKµ§^»©`³«]¯œ`± N³”Lº™Vµ Uº¥`À¡YÁŸ_·™W°¡Y¹©TÁ±P·°XÀ·S¸¯DÀ£G·£M¶O°¡W¿£]¿¯W¶ªQ¹¨[¹¤Y¹¯M²¦L¼œD¹¤@¶¬CÄ°MÅ®IÒ¢Cͤ<ƯEͯ?Õ´:ѳ=®=Á´EϹMÒ­JĵUïT¼­Q»«T±®S·¬Z¸³O³´S­³V£¼YŸÀN–ÈQ›ÔR¤ÐR›Î[ Ê[¡Á] ½g¶jŒº`‡½d‡¼\ŽÁZ‰½Z…ÅRŽÒWšÂ_›Ãi‘Æk˜Äe”Àh“Æj•ÎWŠÆR‰ÑR•Ö`›×[”×_ŒØb“Òp‰ßc‰ÝcxÕZuÜbzÖ`mÑiiÏnm×cuÑbpÑpw×gsÕ^oÝkoÓipÐjfÂ^eÉ]gÅanÍcnÇYdÀ\\ÀbYÈbgÅTh¹Vx¾T}·Pu¼PlÀAj·ChÁBuºBt¶Ezº@„»Cƒ²D…¨CŠ¯E}²:~¸3}²1‚¬=‚©6Š±,ƒµ4ƒ¨-„§5Œ™8šG€¤L‡Ÿ=ˆŸ>“¡B‘´5˜«4¦5˜¨<—±<•¹GŒ´B†«=Œ¨E€§Kt²El°EsªPt³I{´K„®M~±[y±Y²So¶[n¸\sÀWv¶TƒÀQ†¸J%,8%;*73)71$7-!6+*5=/*F38@27J4:H2:@78J7>VI7TG4UI5QFl^5gQ*kL9hC9uC7iE9bL/kR4gM/tU4pY+kY'mY,if2ya,nY/q[7ka@oh8}`9yiByk?‹kBŒaF•pI–pK{;ž|2¦x;©i3ªyD²w@§q<­~F¤|GµJ­ƒH­@´‰7›Š9£Œ6 ˆ8¢ƒ;¥—L>­“J®ˆ=¨†?¬†>§š5›’/˜>™”:• +ž’-¡Ž:››5©™BœªI•ŸD¡šE¥˜D³”B²LµœT­™Y½¢[¸¯Y±¦`ª–S·š[²ŸH²RºšQºšOŚO¿¦Jº¨L®£Q½±P·°Uµ­P°³M¹±Q·«M·´M¬±T°®Y°¤P³µTÀ³U³´`±±\¹²I¼¯N¹¨F°ªE·¢Qµ³JÇ®C̬C̦6и:ζ<͸FÒ®?ʱ=Æ©HÁ­NÔ¸DÒ´JÂ¥O¹¨Z¹¦V¼­\´¤`¹²_¶®W®±KÂM¨ÁKžÈQŸÍ]™ËQšÂa”Æ^›ÊZ™¾a”¹]¼WŠ³`ŒÁS„¾X‘ºU‘Èd’È\“Ì[’Ái™½g›Ãd¥Ía•¾k–ËX—ÈT˜É_•Ï^’Òc™Úk™Öj—ÝpÝh‡Û`‡Ú\nØckÓeqØ]m×^gÎ^wÖjtÄ`uËczÍlzÒerÍnoÇ^sÍ]iËboÑ^eÄZhÊScÊ]YÃZ^Â\aÆNgÅVvÎMqÅTq¶Aq´Nj±Mi¹Ln·DxÀ>z¶C|º@z·?u³=€±D|®9q«5~¨?zµ7ˆ²2‹§5€«3¥7‰¡,@‡©;…¨D€ž@‰ž@„§:’²6—«8“´9‰¨2–°:ƒ®F‹¥@‚«Mƒ§F‚±Bs¹GnªPk®Us¯W~¸Lt±U}°[©Nƒ´Jw³Mvµ^r¸b}¸Zx¶K´J,21/627-=)53#1;-4C57K90I1:M4:F8;B?=;J3:D4;G10S=2P:3ND4U=-\E2dU7eY>aUFkWǸ9ƽD˺?Ô¬DÑ©GÌ­GǬGóAͲHȲKĪPÇ®Oé^Ç©c¼¦_ª·[§·N¨ÂJ¤ÀMž»K¥ÅX¡¿_ŸÃVžÌZ™Ì`šÍ[™ÅWš»L—ÁO‘ÂJ‰µUŽ¯[Œº\”¿c“Êb‹Éc”Ã`•Ãa£ÊnŸÊk¤½e›¾bšÅYžÏ[¡Õ^¡ågœãn—âc˜ÚgÝoˆÜg„ßXxÐYyØdrÒ_hÉZnÑZsÎasÆ_nÄftÅhpÆdrÒimÔgpÑgrÌfuÐ_mÑYfÐRb×TdÌYoÆQiÎOuÓQwÎJwÇLt»BlÀKb¹Gcº@e¼FpºCo¾Iw¸GsµHz¤‡ª<€«?„¦L‚¦Eƒ·LŠ´Oƒ®Eq­Jo´Pw³Lw³U{±Vo£MpªQu­Kp³Zm³]{®Zy·Yv±O|µG',$-377$;+$?<-8=*0:9>=64;:6C/6?93DA<8BA;FA2F.1C.7C22K?6BB8EE.UB:_TlV5rV6`H._O6_E®‡@¨~G¥‹D ‘S¨’O²…=­‚C¡ˆ>¨‰=Ÿ“?Ÿ™=š’5›™2š“<¤Ž9 Ž;Ÿ˜9¡ KŸ¨G•ŸW¤›Pœ¡Q­’B¹‹<µ“P¾¢K¶ªQ»ŸTÀŸY±ªL¯¢S­±J°žB± F±šK¸™W² I¼žE¼ \¿±]·°T·«W¸¹W·µE¿¹J·¿]°µR¡´]«®W«¯\­·T·¯bº±Q±¦V´¯Y²¨\¬­O±ªR¶®L°¥=²µB¸¹>Ë¿IÉÄNÅ°EÖ®OĵSβO¿¸O¾µLãN·¦Xµ²^¶²^Á°c½§Y·©Z²¼I§ÁK¥¶J¡ÅT§¾^¤Ã\ž»\ Ä^žÇd£ÃV‘ºa•ÅU“Ê]“»[ƒµP…¼V†º\ŽÅ[•Â[–Â`˜Ê^¡Ël¤Àj›Íi£Æo¥Äe¤ÉZ§ÐežÖn—åg—ëg˜Þm“àg“Òj…×d‰Þ]Šà[„Ø^wÐaxÉbkÉZ|ÇXsÁ_oÍgƒÅhnÇboÊbsÕjmÛqjÚexÙ]wÉZlÓYsÖXoÊTgËTnÕYlÈF{ÕGtÁItÈCk¾>n³Gm°Kk°@u¯BkÂBk¼Ei´Nm¨Hl¡5y2u®369;-C>/<@./?=3B@78DB7J:/P17N=3C76GFfS4rU3lP8nG9bH8^M4c@AfD@eF3_X:e[4nf4l_;f\@o`4|c9~\9xdDpjIrqJkg:nrDzqG‚jO‹hH‰aGˆc?ˆp9’p@–o:™{?žzAœk9¯i;±jE·nE²k7«i;´pK¸yR²tI®y>¯{AªƒF¶ˆ@±ŒE§“M«—I¨K¢Š<§ƒ<‰F–@–’;™3¤: ’7 ‘5•Ž=‹–<’™CŸ Kž^¨Q¢ J®–A¯F¯™I½¦N¼¦Pº©Sµ¥T¶¤L°§M³«Mµ­F±ªJºŸF»›Sº£N´žO¶©[¿£b·¢U¹²R¸´V±®K´¸T·µ\¨®]¦®a°ªV²«R©¦W¯±V»°Q·³X¾¶\¶ªW»¯O²§E°žH®£B·ªO¸²L½»LνK͹EίJƱIĹUǵJ¸¬O·¥X³£W¯±T°®Q´£Sµ¤d©¹Y¬¼L¤¶F¡ºMšµW£¼VŸ¾Q »W§¾^¢Â]—¾]˜½a•½b—ÃZ¼RŠ»S’»VˆÁ]Š¿]’À] Âe ¿l¦ÀiÅq›År˜Êgž¼a¡¼ažËlœØmœÜg âmœÚp™Ùr–Öv‰Ún’ÛhŠáY„ÎZ‚ËXtÑbwÇa{ÊetÉ`zÎg‚Éo~ÔnnÑfkÌcwÔi{Þin×ikÑlxË^xØ_o×QhÜPrÑToÖLvÏNuÈCjÅ@pÊHm½Lp²Eq¬=l®Fl¶Dk­=l±Ex£?r 5vª:w¢0{¬2ƒ©8„«1‚3œ;©?|¥EzŸLs¥J{©H}ª?r´Ex¿JŒ¼M~¸Mx¨B…³:‰¹=°=‚®:€ª>|µJqªRn­Sv¨Xq¯Mq¬J`¢Jc¢Tj®Rh¦Vf¤Yq ak­[q¯SoªNs¯Hi¬S"*#"3'.-,;7287?4HB=eN?mM2fE2sYosOvvA‚kHˆrFˆp;…_B˜_8’d<œi=›pC qD“s?©lF¬nF«v?³h6©r9±j@¯uL¼tP´uQ¼pE°t>¿„H´‡L«ŽVªN«‹Dª‚6°Œ; ‰7•‘@”…4”•/›–6“@›‹<œŠ@ŠC¢F—¢M —Z¬S££H¦—N¶—E¯›Rµ§CÀ§E²¢V¶¢E³¥E±±U¾³Kº¥L®´G¾ŸF³ W·«O°žJ¿¡W¹£d´¨e³¯X½¶Qª¬X¸¨Qµ·X²ªZ²¶V±­Q®µN®¸M©±Q³¯N¶¹N¬¶L³´T¸¨M­¤C¹°@µ§G¶£Q³²M¸°UÊ¿JË°YδZǬW¾»_ŸM»³M½«T²¤P´­O¨­J«³[³¡f´µ\§°VÀI˜ºGžÁT—ÆN—½[Ä[•ÊU Ë]¢ÃZ˜Èb’Ç`¢Ì\ÂQ¿`‹µP™¶b–Â^¾b›¹d—¹`½h¢¾qËl•ÂfÆZ¥Ég¦Ìj¨Õc×n§Úi¡áf”ßm’Òn‡ãsŠÞ_ãZ‡ÑQƒÏL‚Ô^ŽÈf†Ðg„Ï_Ï`‹ÂmyÉjvÔhyÓo~×`qÜnpØjxÛcxÍW}Ô`pÑ]sÙWvÎRsËLyÈSs¼Hb¹DcÁJdº@i±>w°6y·8k²8uªIr®Am D~¡5¬0~²-|­2…±=}°2{ª3~©B~­Hw™@~ŸNy§Mv¡P|ªK{®Qx¿R¶R…®Ds®?}¸?Á8>=DBW89Q3?H>DO;AHBXV2ba0i\7i_o`:m^5q`2qe;tZEwZD€ZO~dMrrNrnOwtNvpH}kF‡nG“iE’f>™dDe=˜i?™sE—r@˜kI«u=¬v@¨wG©v?¹kF·l?¹lC¼kG¹rEºlOµzR¾~J¿|J¯‚Q³‚K¦‚;®‹<ª†6¨…7Ÿ†7’†>ŽŽ4”‹4‡E“‚J˜L›ŽN¡–Pœ¢KžŸV¥™L°PºU³—M±ŸF³¤D¹šD¹ M¿¡G»¤KƯDÁ±LÁµQ´­K¸®P¼­J²T»§Lµ°L¼¨]¯Y¹°c¾©d³°Y±³U°±W¶­U¬²W£²L©®R§¯O¬¶X¬¬L§²P¬®K´»P¶ºI²ªF©¬Q¯«O³§N¹¤SÀ®UÀ²Y¼­Wƶ]¿²eÀ²`º°SúSÅ·Z·±R±®Q°´O­©M²­Z¹°^®¬[°N›¾K“¾I“ÁPžÊX˜ÈR–ÍS”ÃU—¼X–ÂY‘ÅVœÆR“ÂV“À]š¿V™¹U‘¾a–·^™¶\—Â]•Àb¢ÆgšÉf—½XžÊ` È\¥ÃZ¤Ê]§Ï[¥ài¢Ö`œÖc”àm‘àf™à`™Ö[”ØM’ÕOŽËX–Èc‹Çg†Íi†ÃmˆÊaÉa{ÐkƒÑg}ÜfuÛhvÜauàgØ]vÖ^tÐXiÊOlÉRf½PqÀJd¼Of²Cj©Bj±En¸As¼=tÀ?w´9w§@q¤@§F{¦<„²B°8w¨4zª6w£@r­Dx£Iy¡CzœBxšKj˜Mm¢Lx¬O}¹SwÀNz¼L‚¹SyºJ€µNy·@sµMq­Nq¬Qp¸HnµBy°Mn©Io§Gm°I_²W]²YY­^^®c]²g[«b^£^[®^W«\f²cd¬Z+47(%<**9,.7.(8#7;)28+)749>C<FC>6P=HKI;TL6KQ?MW=CM;KO8_W1XL7lT=j\?iQ>jO6rJ6mD;eB?rN7eQ9q[=s_Erd=oh-nV<{fycI€\Fxf>zgE{lFudGjE{iCƒiI‡qHŒr<u;ŸnH”sCžuC˜rH–rH›kJ£~>®m6ŸmB¥b7¸lH½o>¶jMÂtB½qI¾tE´xK¹vSµ‚N©ŒN¤ŽG©‚D­{8¦€CŽC‘8‘–1‹8ŸI›…@¡ŠU›‘Q£œQ©•U— \¨£]§œL§™S­œU¼•K¼›E±¥N¸›R´£L²¤N¹¡NɧE»«B¿µO¶²D¿£M®«Y´¤N² ^¸ `¾°U¹®]¯µa¶¤\¯²T»§T©´R£´\­¹]¬±Q®®_¯½[¬Á[­ÀI®»Jº¿Y·ºX¼µT³«W²ºL­µK´°Wµ¶Q¸®Q¾³S¿³W½½[½¬fîVµ½`´´Sµ®Xº±W«´]µ¼T¥»R³°X¯¶b¬°X£ÀG¡³TºL“ÅV•ËK˜Æ[›ÉS‘ÉV£¾[žÂ^—ÇSž¼c‘È_ÁXµX˜¾]“±c”¾Z¢Î_›Æm˜Ëd¢¾iœÇbžÒfŸÈU¥Ì_ ÌU Üc§á`¦×j¤ácœÙ^—Ýc˜ÝXŒÕM˜ÕZØWŽÕ[ÓYÓ]{ÒeÐg‹Ï_Îr~ÓpuÉfpÐczÙj€Ù\tÒTÒ^qÝ\sÖXeÔWuËSl¾Ls¹Op¾Ad¶5p³;g¦Au¹9s´@€·Bx³<|³>}©>©4†«6}´>§3v®,z0vª=r¶@r­@w¯Ar£Hu™Fp Eo¨Ds¸Lv¸X¶Rq¶Rr´Kv¸P|ºBs¾Gr¶Br³Mh¾Db¸Gu¹Ql¯Hi¬Em¥Ob²Ka¨a^¨SY´XU¨\ZµhT°cV¡aeª]Vªfa¯ak¡T%/7,9)'2$&<(-3('0(28.-05/??-A@'AO13G6?H?@M69E98D:4SBkcEzhDza6~b)sU-{ZAvfCv\AƒX?~WA^G„kI}hB†j9…h?†o5„x<xG“oK“qB›mB£v;™nB¥vI¤w>ŸoB¢c8³[<´`F¬pD´tJ°lNºkJ¶n@¯{@²yC²|V©…V£ŒK±†D­x@°ˆ@¢‹?¡‘C•<˜‰F ‡DŸ@ L§ˆP¦’Q¦•N  Z¥œ^©¡Y¥¢U®œN¶˜X½™V·ŸN³›R»¥Hº¦JÀ¦DÀªN¹µR¼°D¿žO³›Q¬ž\°ª\µ¤Q¹¢V¾¥b¸¯_¾«V²¥X®­Pµ¬Vµµ\£»T­º`¶³\¹ÁR­ÅT°»T®¼Q®¹S±¶W¼±_º²X¶¶X´·X¶µY¼¼N··O¹ºW³»`·º\½¯`»²f±¬f³°^³¸[¸±b¹½[³¹Yª°T¤·R¦³S¨±[¬´W¥¸O»M”·J•µSŸ¾O–¿W˜Äa“ÁUŸÇWšÇS˜½\’¾b—Éb”À^•¿[¼h™¶h¡ÅaŸËiŸÃ_—¾cšÎa—Ði ÉY¡ÓYªÓ[¨Í[ªãeªçb­ÜW¤Ü]¡Ú_ŸÖj—ÌU‹ÐO†ÖVßNƒàRƒ×\yÓezÊh~Õe„Ðm|Îq~ÈmqÎnoÍjsÇZyÒ[x×WsÖPqÔVhÖKjÏUnÈRx¹Cu¹Dl¾Fs¹8w²„¬B‡¸8}³/v¯5u¦/…Ÿ/…¢4±<19K08G?=C8=M>8G??FC4XL=JR4N]6FX1SKaEzfE~kGŠl?ŒjC‹tCŽF‰hB‘pO›cJkP‘`NžhH¦t;«jB§fD›k9¬iD¨dH­iL£hJ®xA±vE²uK¡yE¯xI¨NŸE£‘F¯ŠI¥€I¤}F§ƒ>™™KŽ•KžI¨‰D¡‡G¥ƒM¥†F¯”T¨—Q¢–Z¦œXªž]¹¥L·œG³•Oº¡Z±šK¹¤R½¤JÁ¥NĞT·«O´¯P¹§V¿P®’L¯™U³P³¤U´¦W¹¡O«®T¶§U²¢Y·¥T³ªb¥±Rž³P³³Y®°R¼ÂY²¿V¶¾Zµ¸Uº°`«¹c¯¹`±°]±¬V¼¶[¸À^´Ã`¯ÅT»Â\»ÆQ·ÇR¹Å\À·cµºf´¹e±±e¸®i­º^°¸R³²W®»Uª·[Ÿ¬W±R¡±M¢½RŽºJž´Už¿^œ¾Q–¹SÈ\–ÂM¢ÌQ¢ÀWÎ^ŸÎ\œÎb Å] ¼hªµlžÈp¨Ì^¤Êl–¾j¢Çh¡ÓaªÝ_ŸÖ^«Ïi­Ïa£ã\¨âl§Þ\£ç\¥Ód§ÐmœÒ\†ÕN‡×J‰ÚU|ÓX„ØX€Öa†ÈgÇ]†Íe|Å_†ÆkqËbeÓggÉfzÓWwÉQsÜVmÍHeÙDeÐPeÆLq½Nq·JpÂ?k¶:w«;zª=u£7x´Cz«Ko¥@}¡B}®6‰©/ˆ·6|¬:„©2{¨0…œ+Š©3z¦B{¬FuªAo¦@|¤Fx­Ho¤Ez¶Er´Su¾V{¸Uv¶Ul»Yq¶OgµJnÅRp¿Kb¾TeÊKb¸U`¸I`¸He·N`«WW·UZ°Zd¾]W°aYµad¸WVª_`ªafŸha c^£a+,(%(,/'150*/21+*/,45)5:)::.::6>F/6C<6H:6P@;HD9FB4RI6TE¨i9¡e?œkC¥cF¡jF¢jB±yA±y<«x? wE£…M¤ˆG«†B§ŒM­‹N§~I¦P ‹F£ŽB—–Iœ–N¦ŠBŸH§ˆB«O¶‰T»N³V¿šQºŸY´©V²¤Qª¨U±Q«¡R³¢O¹¤T¿˜SœS»¡O¼žN¶§V³›W¹™L¸œJ¾›R¾¢\°¬X³²]¥ªS§£U­ a´¤`¬¬a®­X¨µN¥¸U«¼T±¹X¾Ç_µËZ¼À_¶²g«°_­´W©ªYª¶\´µU¹¾]²Ãb±¾[±Á[¹ÉS´ÆX»½d¸Äa°Ëa·Âj¼¾d¸­`¶ª]¬µ\³®Xª²[£¹_›³R›¼VºT¶W“¿Xœ²Y¶_¥¶\¤¶T›ÆUœËRžÉP£È_ ÏX¤ÇZË^Ïc§ÄgªÅj©Áj¬Êd«ÅcšÉi¥ÕgªØd­Úk¨Öc«×g¤ào°ân«ág¬áf£äZàd£Ô_ äVŒâZ€ä\‚ÜNŠÞZØU‚×\ÊW{ÆVvÇb|Ìc}Äc|ÌdjÍcnÄYlÃ`wÊOqÑOmÕEoËJrÅMkÇFfºBh¾DpÂ4m¸4t¸>z©7|¥<°@u«:t¦E~©A†­5ˆ²8ˆ¸3‰¯.ƒ«+‹¯2£3y5¨@°8t®9z°6o¨BjµNk°Mm·Mt¼RzÇTxÀ^xÁ]pÀ^d¿Rd½OmÄLrÇTuÅRmÆOj¸Pa¸O[¹Q^±M]¸Wh°Yl»__»[c¿_^´Zb·YW¶bZ®gW§]X©RR§W()((+50+31444*,-.(,3+)?/.>)1D24D47;.+E@+@@:BH*I>:PB8EU,IT2NL+P\€XE‡eF‹mE|s=ŠqAyCˆkF†v;ˆmMeN„aI‘aX‹`F—mC^I¨a8¡k9›p<h>¢cG§kCqG¬p<³wC±v>¤†;°‡;²‚?©ŒC°„I­L ƒQ¤O˜ŠP‘‰B’’P•ŽH§‘Vž‚C©ƒ?ªŽQ±•Wµ”S´O¾“U±]¶¤Z¸™P²—Xµ’X¹–^ª¢Tµ˜X¶’S¼•UÙPºŸL¬—V¶ O®¢N¶¤LÀžT¯®Y¬¦^³¡]©šV¨X¬¥b«­W¯©Q£µQª³G¨ÃV¬ÄO¬ÀYÂÆa¸Ád»V¹µY©ªT±±X®®e¯¹Uª¶V­ÈU¸ÃXªËVµÇ^¸ÇQ·Ã\½ÌXÁÅc«»j©¸n¦¿h¬¶i¯»^ ¹U¦¬X£ÀU¦¸Tž¸Z˜³V—®SŸ¸Y˜½W“°b´]™¼W™ÇT¤ÃRËZ¤ËY™Óf£ÑeªÊj£Ç`šÓk¡Ìn³Ës±Ëb¯Äf¥¾` ÎuŸÊf¬Øf¤Ía¢Ýf®Ö`¢Öd¨Ù^¶æg­×WšçT•ØO¡Ï_ßY…äQƒÖYƒàN„ßV…ÓN‚ÔR„ÈWÔ_€Èa‚Î_yËi{Ì^uÊZjÁbrºarËOl¿FlÊDnÅKlÄ?p¾Eg¹Kkµ´=yªJ}«4„²:€¬-¼8Œµ*~§&} ,†©<‡¥?†­7u­Bo¤=v¥Am±DnµSr»Wv´XtµOhÃ^xÃir¾fmÇTm¿\qÎSjÎNgËMdÏVaÄXXÀKT½VcÁLU³Tb¸Zf¬Qb¶V_µ`W½\S°Y]ºXX°ZW©bS±`R§WKŸS.";24(8-'-.5-71%30*4.&A0#>'/=13?,&C0+<8/:=3;?*@=6?I9LP/HQ.F[2QZ0Jb/J\4IN8XQ+YW&JQ*[[%`[0dR/`T2ZK7cN/iV1xU*sV%sZ+vR,~O#W1€^:ƒc8‚cB„iF‹^C‰kF‚kE‚pN‚iM‡gFŽb<•_?hE†]Mˆ`O‘^IŽmJ‘c?že:—c6—m;œkD©gF±rB©l?¯v4©t:®z7«„5©}:®€9´}:¨~@¬†D¤‹MœŽL›I’C”“K“˜K ŒX­ŠM¨ŒC±•@­‘H¹‰AµI´‰T·’X¾˜X¸ŸL®•^±_°£V°¨]¯©]¯™T²“WĜQ¼–J³•N¹žT²œM³¨H±¦Rµ©P¶¬Z¹ªN°šS«¥W­¨cª¬R²©P©¶M£½N«¶M«»Y²Å\¾ÀU¼¿U¹¹Z«¹U®°L¯±T·¼_­À^¬ÄP¦Î\¬ÉX®ÊY´ÌY¸ÒS´ÐS¿ÐQ¹Ä]ª¶V§²`ª¹a¡¼g²Z¡«^¨®Z¬¼T¢³T–¬Y’­Y‘ªaŒ¬a—½`œ°V–°W‘¿M“ÇRžÃUœÍb¤Ò^šÎa­Ín±Ói¨Ðs¢Ìm¯Ìk¯Îo¯Èf¤»`ŸÀg Åp ÃnžÉ\¢Ðg¨Õb¤Éb¬Ë]ªÚ\²ß]¡ØVœØS˜×M”ÌS‡ÔO‰×S€×H‡äM×T{ÚI{ÛFÒNyË\ÕYyÊX~Ð]pÕVpÏ`mÇXsÂ`xÇYm¾KnÅDmÅMr·Pr·Bhº@l°=sº=zµ6x¿6¹4w¸4~§5t²>{¼B±<ƒ¬2‚²3À7~µ;‚­.£/z¨8Ÿ/…¦7‚§;vªAw¯Gq®En²Pt¶Vm­Yh´[fºfjÀbm¼YmÂVoÂToÍafË`lÄTgÊY`ËWb½XR½Z]Å\[¼Vb»SY¶PP³TR´U\³aU®^P¨]X³TQ²RH¶`MªXL¦_4(0!2= )3(&/'9/01 ?%(C5.831@;/44#72AC$EDDJ/>D09O*IJ6CL.FL,BX+BT3@\;NV1WQ3TW.HS-RQ&[WaY'dS*jV&kS+hU'z\*tW-}c"|b~P!…]2…W1~_5`9~Y<ˆf>…nK~oA‡nC‡hB~a@Œ^A~`CŽfGŠ_Q†\QnJ“iC–n@ k5žr9žm; jE©tE©l? f<£t=°w3¯x:­Š=²{?¨9¨:¥†;¡ƒJ˜—M”ˆH‰@œ•K‘’X–“U Y I£‡U¨‰Qµ‘D­ˆI¸‹S½‹T«“T·”O¾žWµ”VºŠf·—d²ªb·¤T¹™^Ä `ř]·šV»™W®”O¸“W·›Y°¢c´œ\²¢_¨§]«¡c«¨W°ª_¥ [««^ª¹P¥ºT´²[¸²P·Ã_¼ºNÂÁRÀµY·¿O¸¾H¾¾Z°º\¹¿_³¿P¯Áa®Ì\®Ã_¯ÄR®ËR¬×T®ÄT«ËX¨ÀY™¸]¤´e›ºj¡·`£µi¦¿e¦µYš¸\ §]œ´TŒ±dŸºeŸ²c˜°V›·`—·^—¹N¤Ë\§Ée£Ëa§Ô^¦Øc·Ùj¨Éb¤Ën®Ðm¯Éu¬Äcª³k¦½b¡»d¢Ãm§Ña Ê[§Ò[¡ÎX°×YµÙ_¤ÙT¢ÛW™Ô\ŸÍR‰Ï`…àY’ÕQ‡ØMÜR}âW„Ü[}âJ„ÞRƒØT„ÙXwÙ`ÒUpÖWuØTtËN{ÂO~»Vt»HoÇGwËLvÄ@q³Di·;p¸8jº4t¯<€±7u´@†´=w´8€µ2ÁCƒ³:ˆ·:}À7}¿4‚¿1€²6}¸-y±2ƒ°<|¢9„¥:~¶I²EpºAo´Js¼\m¹Pu´VrÃ]sÃatÌ`rÇ[sÇYnÒbbÑi`Ì\[Ï\WËe\ÂVL¾^OÃOZ¾\L¿YT¹NU¹UL·T\µ^U§^N¹RR¬LT¯RN¿ZQ®[Qª\;%)<,5 %7<$8?.!<-&E;A9(C@8>9B#=A5@>C)E?)AI+IW2BU7=V=CJ3FK0GT0L^)J`/La&H`%NUUQWV_VjK nLpYjV%qS y_%~V){]"t`-yU9†S9†Z<`;‚]C‰iGŠnB‡qCƒlAˆhB^@‡`F~jFjA‹eK‹gFŠeK–]E—b9žiF¢rFžz;¡s@£tB£mA«z4¨x8§v8¦…3ª‰@©€@¬ˆ@©…B£“9œ–@™ŠH’ŽHš‘T—Yž•\¤šT¥“P¯ŒU¸‹S¸‹N¼ŠO¶ŒN¹Q¯’U¯`³‹Z¶†e½`µ–`ºša¾–fǙaȝiÀ£c¶¥a·žZ¾•SÀ˜[º™e¯¢d°™k­šb°–d­žd´Ÿc«¨Z©¨_¨«[®­M§¸O¬¯[¸µX¹¾OºÀS¸ºT·ÁPµ¹S¾½N³ÅQ¸¿_¯ÁZ±Å^«Ñd®Í`¶Ç_¸É\±ÏP°ÑP®ÊL§ËS§ÉXšÇY›¼Z™·[žÄešÀe–¼ZŸ·[•²X˜­U›¯b˜¬]¤º] ¸_—²`–·\Ÿ¸bœºXœ¼d¢Ía¥ÐhªÍg©Êf¬Îf¨Éd§Æc¬Ém£ÇkœÂuž¹qŸÄg¤¿i›ÉkŸÐc¨Ïg§ÍYªØS¬ÒN£ÍM¦ËU£ÂaŸÈ[Õ_‹Ù\’ÛYŠàZŽÝT‡ØSŽå`‹â[…Ü\}ÜWzàU{ßV€ÒW{ÏW€ÔWuÐN}ÊU|ÀMz¿Nz¼AºJsÇGqÄBwµ¯J{±E{»E€½K{ºOuºWoÁXr¶RlÃTkÇ^sÏdoÓjmÑghÌf`Òf\Ñg_Æ^RÅaSÉ\TÀRP»WH¶SE°RE»SMÁSUºU\°SX°UZ°[K²UG¼NQ¼VW¶ZRµ`5 $9'=2:%0: !/,12.A)465'2;15&CB'4F;AH@%ID.JP%BE/AV19O@>Z;BQ8JN.FK)AV2D[+N]6A`.GZ.MJbZiW+kV*qN#iY'de%g_%vf+nU(rd0uY+y`1~ZEˆ\D~YA„g?‹^:~aE|f@†iL}mI^<~fF€aAŒ[KŒgKŒ`?•dJŠf<˜_>“jIŸpDŸk? l>§l<¦€D£|6®q? w3ª{?¤{G²„E²|I¡zPšŽH‰H–N›Tš™P¢e¥‘\¡YžŒY²‘O³“Z¹V¶‡MµJÀ”F¸M»’]²–b¾‘Y¹¡^°™f³•fºœ_ŗc¤aĚ^Á›i² d¸¢]¶“_¶ŸQ· S±¢b°™`¯_²¨d§®W¦¢a ®]§ªS©´[ ·[¸ÁN°°V¸ÂS¶Á`º½QÀ´XÁÀN¶¶O³¶Yµ¸S¯ÈYªÏV°ËWºËk³ÏY¬ÑX³ÎW¤ÌQ¬ÓGœÂK¡Ã\žÀZ–µc˜¼Z‘³b—Ã]ŸÅW˜Á^™º]Ÿ»L“§Xš±R˜¸X–²^˜¼\Ž³]‘µa‘´a—½`Ìk›Æ\«ÀY¡Èk§Çi¡Ë`±¿d¦Çj¨ºmŸ¾f©¾m¤ºk¢Åf§¸Z©¼`¥¾T§¿V¨ÁY¨ÌP§ÁR¦ÄS›Í\šÉZžÖT‘×U’ÕTÙU…ÛZ’ÍYÖYŠçNƒÖ\ƒÕZ|ÕXvÜ[t×MÍ^~ÍN~ÈLzÁMv½PpºOxÂG{ÂLpÃ@p½E{¹@vª3uªBf¹Gj»Jo±=†¹F‚¹;†´7Œµ2ŒÀ:¿5~Á8„´3wÁ7².¹.v³2‡²J†´L³Mz¨J€©?x­Fz²P…´Z{ºP}¼Xu´OhºYj»lb»aeÊkfÍgsÒ[iÍ_`ÒkSÂjWÌcM¸`Q¹RF½]N²]O±`H¸bXº`Uµ]_³SY°PQ©TM©KR²ZE¶aV®cN°_;'2<"*135%1|hEwjK}i@ˆ`?‡]>‘_?ZE”]<™b>’n@ŽmLšrA¡t?«jE¥pA§z@¤;¡{<¤{Cšƒ8>­G°yM¯tR£|O¤„KˆQ™ŒP¡–U›‘W “b§‰ež_†\«‹X²“O­R¾‘SÁ‹DºŠM¸šOÁ™\¹‘a³•[´¡c¼œg²–\µ—X½ž`¹¦e»žd·’j¼—b´—`¼šW¿˜N±—M¸–S¶ `©œU¦¤X¤ ^¥¬eŸ·Y£µX®¼_¨¹X®¶aµ¼\¿¿_¸Áaµ¼W»²[¹²^²½W«¹S¥¼UªÈ`´Ç[³Ëa´Éf±Ð[±ÈN«ÏK¤ÅI¡ÄO˜ÊMšÀQ¡½Z˜³`’¶a–Ád‘ÀY–»U”¾Y•½VŸ¸T“³TŽ©O©W‹¸R’¹P‘¬W—´W—³cºp˜Äk¢¿^ªº[­Ç\¢ÎdªÂ\«ºb¨¹f¨·m¬Át©Ãpªºd®Á]ª¶\¤³\¯´Oª¸R£½Už¼M§¼O¢ÅP›ÊK£ÑNšÈTŒÏV„ÚX…ÚUˆÑKŒÑO„ÛV~ÚQ‚ÏK…ÍK†×UvÏNÉX{Ò[vÁ\{ÀQuÅHs¼Il¿NoÌBlÆLrÀGs²8}°7x®4r«?z¨9s±Du¬=ƒ¬@‡¯@…¾@¾Dˆ·6xÀ1uÁt¹9t½.{»4€±;†¯Hˆ·N†¶U²P„¤I‹¦TªT…µY{²Uv¶Q{°Xw¹ec¶hd²ijºmp»]mÊ]\ÈbWÅjUËeNÉaR·bJ¶SBµWE®dL³_Lª_U¬]b±WY²QY­UN«SR¬MH«UD²_HµYN­V8(/F)12'.:#103-11&229:8?.851'$?-&9B*@9"@="GG4G=?H>+OA-B@'DE9PM4PV/GM.TM3II5NU3IS/PH3RG(_O(fP(qR'eO5hW'uT/ph1jb)pb(kY'ya-{e2yZ@€d;{lE†j:„g8†n=`I‡fHˆu8h<sCŠl=‰lM‡fC†eRŽkNŽo?˜iE’tE•lFšrAj@¡nD vF¦sF§<–yF£{K …D­}R®~O¢x[¥ƒOž‰Xœ‹W X‘O¤œ`£œY«ŽXª–Z°„]§”O­\¯ŒS±ˆM·…<ÖHǗU×Y¸–V´ž_±¤b«¤f²žj­¥^«¡`²˜h±•a± `±˜a°žYµ’M»—I²œI«‘\²”^®ŸW­¢P§ªbš§gœ±W¢µY¢º^°»SµÀa·Àb¼º]±Å]·¿h¦¯[¯­`«¼d«»`¢ºS¯¿_³Ãg²Åe¸Éd©Åa³¾N¦¿TªÁG™ÂIš¼Pœ¸N•ÅMŸ¶Zš¾SšÇW˜ÃY™ÅU‘¾`šºQŽ³R—´KµM‘¯XŠ¼N¶S¬Nˆ¬P»b¹]•ºi—Àa£Ä^žÈZ¥Í^¤Ëa°¼`¨Áe¬¿r£¼v«´n«¸`­·f¤±^®¶Y¤¶P¬­P¥²MŸ·R ¶O–»H¨ÈOœÔU¥ÄOžÔ\ŽÍXŠÙYÛS…ÙY„ÛZÛZÙJ‰ÎCyÄLrÐP‚ÌZsÑ_…É`†ÁOuÊWx½SvÉD}Á:t¿GzÃGy¸7´7€³:o¨Az¥Cn²Gv¨;°G‚ª=ƒ®Kµ8{¶CxÀ>pÀBpÀ9{º>}¹:t¾9·E¾G¶N´[„±S{¥Y~¯_{±W„¬Zw½Qy¸V{·Yf±hg³pd¯ajº_g½\cÃfWÇdY¼_LÉ\VÇ\F¾^GÂVC¼`D­dN±_R¡^\¦Zb±P`°X^¸]P§JM¯JU²ZN¬aS±ZS«bB%6>+7@+>:)5..92-+6-,576/103,%77%B5%<< G7'LD,R?7WF.O>,N@0JD(SH)UH.QF2LQ5RG+VM0RN2RM5YJ1\M+dR-jL0kM(hP1kS/sa,nf0t_&|^&s`5x_=ncGlj@xhE…n;ƒf?ƒh@‰l@‚jC„q9g:€k?}mL‰pN‡pHˆbQ†kMŽoQ‘vN™lKšiF jI¢mD¢lH§lDžsJžzN—…F–ƒM¥ŠV¢~Y£X™}UŸ„]–„cža§”S¦—Vž P£œW°•P®‹W¥“\¨U¸‚Q¶…Q³†S»DƔFōOƐT¿œZß]¶›h¯p®£gªŸc§£j¦ i«”f¬`¬šS®œT¼O¶ŠN®N±’V±™Q°—O¥¥Q©©P ¢]œ¨[©°bªºb©¸\¬¼V¶½^µ¶c±º]¨¾ežºcœ»_Ÿ«bž¨\ª¶Yª»^ªÄb¶¿W´ÈZ¹¿S­ÂT¯¸J¦±Pœ«G—µM›¼FÀH™ÃM›ÈVœÅPšÀR”¾Uœ¶a›¼Z¹Q‰³T‹¹O‡·T¼Q‰¾RŽ°QŒ¯VºUŠ½b–³lž¿m¢Â`¥¾c¦Äa°¾b«Á_ž¸n¡ºn¯¼h«­l²¹o³µaµµW¯¶U¯²OŸ¯Wœ·Y½L–»O™½DÈP¦ÇVœÉ_ ÉY˜Ç\‡ÑT‰ØQ}ØQˆÖY…ÍW‡ÒI|ÍL{ÇMxÅOrÑV|Í^zÁYÃ]tÌ[rÇOxÄM|¾=º9ƒÂ=³:‚±2ƒ«.|¨;}ª;x²>¶8x¯=tª:€®Du¸Ez³D¶EvÆ:lÍ;rÆ=xÆ?qÉD€ÁR‚»Q‚¬O„­]y©f{¨]|±]ªa~»X{ºRy¹Vl¬edµdi±lp¶^n¼_o¸af¼f]¿bV¸WZ¾PLÄWIÅXMÀYQ²]I­fF­XQ¦Y_­Oa³TW²SV¶SZ¬UN¦TW¦ON£YIªcH®_585A%2968D52?:26<0=;+A2895+>-8;.(A0)I@.I76R@,R@2R@+TB6ZI)YD#L>1OD&ZK7XV:\X:XW9WR7NUx_C‚gP„mF…b@„eA…gGŠpGs@~w9‚iD{i|¤Dˆ¤8€¥@z±>|°L‰»>}ÀJn¿F{¼Bn¹HzÃIyË={¸PŠ¼_©W­_ržU{£Q|by¤W³Yy¼Sk§ai¯Zm¢dp©wj²sn±ak¶_g½`_±fT³aYµWG¾LGµULÃXJµ\H³eS¬gL£^b¥XXµVVµZ^¸XV­VW [O«SH©\L¦TK¡W=399/.=0&G9)P>)HB,DB*=67816D9‹dIˆeM‰`T‘fXmY•qU—qW¡iZ§iKªtO¡|IŸN †P …T¡‚XžT¡tU˜tR}XžƒX”€^’c›‘^Ÿ S¬ S°Z®œS­—Wž‘TŸ•S¬‰P«J³˜Hª”F°—O±“\¾˜Y¬¡R« Z¨\®œg§’b®˜Z¥ ^§¦Pº U»–S°˜P°ŠY±‘b±“]ª˜V¬¤U¯£S¨œ`©™f™f¢ j dŸ ^š®c£²_§¯až¨hœ­a˜ªd£¬`§®T£±Y§¶\ ¬W¬·X©¹Xž¿^£¼Rœ·Z—±X•·\‘¶O³H›ªK›¼R–¾Z–¼^—ÇWŒÉS‘¾_œ¼a–Èf˜ËZ“ÈR‘ÇJˆÂL”ÈY’¾T“«U©^Ž®a­^™³]ž¶^¥²`¨³eªÁa£Çc¥Ãm¯Åo¨¸p­³q¨³r¯­h­¬f¶µY³¬T´´Q§¨Mª­T¤­S¥¾AœÁF¸Cž¸B”ÂN‘ÀE—ÃI‰ÊEƒÐLyÅYzÆY»M…¾E‡ÀD…ÇLxÉO|ÊP‡Å^‹Ë^¿_…¿S‚ºMzÁG{¾Q~ÂKˆÀI„´:‡§E…©>‡®C{§Cx±F}±HŒªD‰ ={¢>xªFƒª>‹¶G†²Hu¯Cw¬@t¸G{ÄG}ÂE{¼M„²^´do¥ZhžOn Tg£Sk¥Zu±Uy¬Xw¥[l§Wr¬iv¡rk¥lg­nh°n[°^V¾fXºgS»USµQNºZJ½UU°eO°eX¦cX¦VX©L\¬OS¦U[¬]Q©ZX¨UO®ZG´PW§YW¤P780A019@/F=&=K!EE)V11P38G<:NG4JL1P=4TL1WE/ZB8[A2]C3^F4`N8YJ@^S>YV:aS3oR3pWBvV:uG5sFEpPCnV?sXIoYJpP@bU9jd?sdJwdLr`Q‰`Pˆ]W‡bK†nV‡lVyeG{qV|rGw|L…tM{nC~eI€rKŒeQ‘_L™_KžsT“x_šyT–p`šuK›{T§€Pœ…R­€Tž„c¤za§‚e£o_€WŸU”zS˜†T™Y˜Q«—`°[ ™P«R¦˜Q›ŠP ‡W©‡Sµ—M¹¡N¼–R»¢I²–Nµ—_¹§Q«`¬¡Z¶šf´Ÿc²–Zµ V¬¬K´¢R¶”I©—Y­‘V¶›O±˜S©™S­ _¡™f¦’a“¡n›e˜—f”˜`”­^™°c”«b§¨fŸ¨aµb¡¥c ¥Rœ­S¨¶_£µO›©Y¦³Pª¯W¥¹T›°P—©Y¦^²[“¬YŽ£N‘§L¸Tˆ¶[”¿Y•½\†ÃOŠÃT“ÄV‘ÃgŽÇa’ÍR¿W…ÈKÂV‹¹Y’°c˜²c‘¸Vœ¯T–®\™µ[¨µ_¨¶^œ¿m¦Äa«Èl§Âi³²k²­q¯¬c¬«a©¼e»¿U±¸]µ¶K«¶T¦¬J²¼C§¹Fž»J¡ºJ˜¶F“¿T“ÊIŠ½AÌAƒÂI‚ÊS‚ÈOŠÁLŽµC}ºS~ÇGˆÂDŠÂG…¸PŽÄQƒ¼YÀJƒ·D|»JºE„¹O…«H‚ªD„´F³:‚°Cx¯I}¨KƒµHˆ£HŽª>«F…¥L«M“¬?„¹9„³Eu»;m²&DI,FG)=F+@N'II,GE3E?/J96U9?T:=H;:H>8R?/QA6SI;SGB\K;XS3_N:o[;m[4iT:gW8qV4o[;jPCtP~³=v±I†®J‡´KŒ²@ˆ¥=¡;‡§G‚¬@‹­>¬@‚¹:}´=v½?x±A~±Ay©Hs²X{§^x¦fm¡cl¤`i«ak£]e¢\p¦]{¨eu¡hz«gu£jo¡ad¦ef­f\§id«q`´j[¸iYº`c±[a³a]©`WªUXª_P©^V¯YU¤\SšUS RO§UV°ZW¦[V Q^¡JT¥R:591B&EE/DD)EI+E="EB%OA4L;6N;+X:1T@FY<7KE0RE3VP]^@cb@pa4vZ;zVo]Ay]Bf\MpU=mOCkVIbTBq]Jk`SqaQtdT}XQ{dTtb]‚me|f_|iV{hVslU{uQ~uPtQ|qU|iL„xQ‡rE”mQ–dL—aYkWŽdxVž€^›…c—zVš{X¦„gž‚b¢‚h¦xc¢nd•ƒZ’…X“}M“ˆT”ŒM˜F£šL©™[¢Œ\™–]¨™O¤¡Y«P© U²žP´›_­¢O¨œN©–W²šR¨œV§™]¶©`±Y§žc«žV±P­©Zº¤M«–L¯O»•\²Ÿ`¥›Yª”V¢^šŸ_˜œ_™ª\Œ£n‹¢a‹—eŠœ[™¥PžR’–Q–¨R¨d’²Rœ²V®W¢¬K”±X¥³Y¥¢Hœ±G¨§R¥²S‘®P“­LKŸV‘¨P‚¥`¶Z…ºS…²Oˆ¼O€·K‹¼S€ÇQƒ¿TƒÑ`‰Õ_ÐNÉL€¾Z~µX‰ºV’½b‘¿VÀg–²i¢ºi ´_™ºf›¾h¦Äq¢¼k›²`œ¼i ¬k¦½_¨²`¿R¡º\¥³P­¼R­ºN¯¹Lª¯H›µV¤­IŸ¶J–°Gˆ¼U‹ÀE¼F¼MŽÉT”ÉL†ÊUˆÄU„½O‰¼FŽ³K„»C±C‰»R„µZ‰¯LŠ¾@…ºO‹±H}´K~¤F‚©L}©>€¥Is«Kz«J‚²Qƒ²?}©@¨G†¦E†C…¦K€§B…¯;‚¯B{¼D{ºB€ºBw´H|°Fp±Tm«Zo°[|©cv¤WqªXp£dl›esœgyªez¬fr¦`s°dk¯np£ii¥cXªmdžkZ©dW±fY¿`[±gb³]a°V^¨Ua±aT«XLŸdU¡XX¥fS£^S™YZ­OOªUV¨N\ W^©WO§`>;,7D*5BAE#>;+@=%KB-FD.OI4MF/IJ0TC>V=:U;5Z<3XN.YQ)NI1LD2XJ2TE1MH/T[)Y]0Xa7\X@meGmg>k_CuT6~[GuZKmZMiXAaMB`Q=ZR=daBg]LkbNieLpdMunZ|iZvkYyjYug`|tdrySpuLplSmnJslGhQ‚vY|vO‡vO”gO‘^]Ž`a”r^ŒzUŽxf–yeœy_“yW‹€\”ˆi˜‘gž‰k¡b qX„[“ŠX’ŽRœ„I“‘N›“LœV¥•P ŒQŸ’SªœZ§žQ¬V¡Y®šc¯£]ªšWª¢Q³£Z·–V´›Q²¢Sµ›]ª£c¨¢b²¬]¯ [° V°š^²œ]»”W·Z®—Zª—`¦•X¥ž[Ÿ¨T™¡Zœ­]­cƒ¬h…œ]“¤_—§W’›^–™S™¡^’¯]Œ¤]”¨\Ÿ«S›°O—«Tž¤S¥¬K£¥B©D¢¯F“¢?Š¢H‡ª@¤EŽ¬L‡¯V~´J~´L‹©HŽ¬T‡­J‰¶MŒ¼TÅR}ÐO…ÑS‹ÅIÂNƒÇ]„»a‹¿cŒ¶Z¿[”¼b™ºm¬°o¨±f¥µg­·t©»v ¹h›®_Ÿ¨b¥±g™²X—¹Z•¶S™¹Vœ¯]Ÿ¬\ž®N¦³M£µL˜¨Sš³R›·K’µJ†­I”¶@•¶B•¼JÀQ—ÅKŒÇQ€ÆSƒ»L€½HŒ³D‰¶K„·N­IŒ®S“¹U•¶E‰­E€«F±K‹°M‹¦IœG„Mu My¬D‚¶J„§C{¡;,:DH:"LE"B>0P?.X<3W@BTC4\=>UG/ZT1[P,XS%NV'SM0JH2TW-NQ.Rf6\d5YX?faCj_Ioa7u\=fY@xcKu\?jUAdKBfM;jV25691*‡·=‰­C{¡OuœQ}šHt£Hv¦M„ªFŽ£@’§DŒªGžG‹¦<ƒ£<†¶:„º<|µ?€¸@}µ>~¾’¡; «9˜¥:’¨>¨H…·A‰¯?«UŽªS•¯H‰®R…µH¿?ˆËC|Ç>~Á=ˆ½P˜ÀT˜»Z’·a‚ÀV‰»c•¾d“Æi“³r§²m¶d¡·q¬¯hž§q§«o³c¢µc’ºX§]•¦T“¥a—´f• `— bŽ§U˜²`Š»P‘®K†»?‹²2†¥AŽ¨<‰¬G”°JŠ«@ ²E”·EŸ°A–µD«F•«;¨;Ž£Eœ§=¢¢B« =¢ªE—¢=¥B•´D–¬8‹¯K…¡D|¤Bs¦M†¤>§H‡ªI’ªM‹«@Ž­C‘œAž@†¤G‰¹Aƒ¶:„¾8ÂE„Â7¶Bt²Bn»El¸OyªZu¤\t«Qs¥Zz¥gq£ns«]n²[t¨\{¢j{¢`{«f~ªgo¦qx¨cq£kh¦ff±dU§nY«lW°rQ¨lL¥lPf^šaW¢[\“]O¡^J^NŸP\X^SXœHa¡MaªUe™QW™WA:;86:?<$A5:6!>H/:Q2;I)A@"O@([=8YHAPR6NO7PO8[O‹³4‰¬7¬:Š¶?’¯G’¨9œ§;¡«7™­@“¬A—¡; Ÿ8¦8˜¢6‘¤4¢¨9¨Ÿ9¥£:•ž7˜¥<’³;Œ®B‘¡Gˆ¤Nx«C©@†œE’¥;«>ˆ«C…¦H©J‘¨IŒ¥B„¨@‰·J¾D‡ÃAÁ9|¼=t¶=k¸Dn¯Mw®Xw§Ul²Zn°Zq²^{£o|¬st«er·`}±_uªXz­b‚±l¨kƒ§bu­it©ca§ee¥o[ s^¢rSžqM›iX¥cY™[TœcNaU•Y\“VQœVR¡QP¡UV£[U¡OR£H`¦MY›V_ŸY5;.54,:?":8EI$EG.>N1EM%DD&PK*GO;MN>\N:Z[2XU8]T0aX1eK3a\9dR?dV>\b2Wh?]f:ekDgY?pi>naCqg?nj9ugEyiLyiKxdHljFrfO{aTo^VrqTwnStwZyqV~p^za\vj`|tTomWrc`roitp_ycg|fdyglssdtogp|q}ossmy€f‡€uŠrdŽ‚g„€d‹za’Œb€ŒYƒ^„g‰ˆfƒŽ_ƒ€f‘ƒdŽ‰c™‹Y•\ \™—X¡V–ŽTœA§~N›„\£“^˜Vœ‘V•™V•aœX ”U§’^¥•\°˜U¶•`´›W§žU¢¨Y¬¬X¬ªU²¨[³©b°´`¢¡\œ®`­±a¡¤^¦§ZœžU–™Vœ˜fŠ¡n•“pˆq—•h”m’jk–“_™–^’¦f“©^¬U‘§WŒ®F‹°M‹§F™¢FŠ¥Kˆ©L‰¨G§A¦G;‡¡8–©7Ž£=‚µ@‰²9‹¨L‡¯DŽµL‹´E{µR{µO|ÁD€ÂJ|¾J|³SºYƒ¶`ˆ®cƒ½UÁg¸]œ³o•·j¡Ák§ºn ©h§­l¦¡kª£c©¡[ §d•ªa“ W‘¡d˜œg›ža™ŸWŒ–Yš©[“°^‰³Lˆ¯D‘¦=µ;Œ±?§:•°8“©>˜±Gž;“­4ž¨8ž¤<—ŸEŸš1™®>¢ª=¦˜6œ8©ž5œœ<›@–­H—®:–Ÿ=—¨O‚ž@„¥K…¯Gƒ£P†¤@–¤?‚¥Iˆ²I®NŽ¢M°L­E²H|½G€³Cu¹FvµGq²Nh¹Pr«Tm²V}¬\s¯Tw­Y‚«dv¬et¯oz©qp«`„®[´hx­h«l¯py­kw³me d`£ti›p[žp\—zZŸmY£kYªbO¦l[¢nN–aV¢aU˜bT‘TN£]J¥ZI˜IT¥Q_£T`«K[¬OW£PG3)94(;9*@B'7H#:C#9@GK)GX&BT1GS6MY8TX4\^1WY,ZR1eU9^J@_TDgV<`XB[Z=X^8^j5gl:f]Ce]Eg^BdbGna;neBniIpjRunL}sDumKupE|gMzoTr_‚sZzi\zl_xpTxybtu`rhZvfYpagqfkkqkpmiore{trr}srxqrtizvmzzq€€uŠ|oˆoˆƒsŒ|i†‹k}Œ\€Œb‹^ˆ’W„‰Z†“ZŠŽZ”•YŒŒQ‹‡P˜“W •N¡ŒU«€N¤ƒK›‹R“…Q›‹T—‹ZœˆYžŠ] ’Z›‘Z–[¡˜`©›d®b¤c©¤h¬Ÿ_ª \Ÿ¨]¤¨Q°ª_¯®[¯§_ «\¢§[Ÿ¥Sž¥_ až—g™œd–›jŠ•kŠ“i‹hŒj‹ˆlŒd”–b¢›b¡•`¤—Vœ¥Y«X‘¨MŠ§KŽ¥F¡C–›H—žAŽ¦Gˆ­@…¨DˆE9•¢/•Ÿ3‹£<Œ«>„«8|³?†¹A±Ly·G~ºM{ÄR~¿Lw´Ky±V‚¯W~µ^µ[ƒ±a€®hŽºeÀoœ¸j¨¸j¦·j«¬g¥©q«¢n¨§g¤£i  [›¢Wž˜W›¡b a•§eŽž]ˆžbŽ–c‘¤Y• Z–¤H¥CŠ¯Bˆ«@–­A“²9”¬7›±=–¤7¢ 9™£4˜Ÿ9¥¤;¡=¨Ÿ2¤¨8°¨2«—5£š8žš7›¨@ ¨D§Bš§IŽ¡Q¡I‹¢D„¬H§I­O…¬N‹©IŒ³@‰­G„³Eƒ¬G~±=„ªD|¯>{³By¼Ev¶AwÀFu¹Nv°Wm®PoªVx¶R…·\‚¹V„°bz©frªcp­my«m{«d}¦[{¨_vªfsªlm§cj¨gd›xn—wk}f’v[”w]‘lW™aRžcX¡`YkOŸnO¡eU—aU’cV”UKœQM›JS¢O[¦Na§Zb­]^¢T;'&52$J9/D?0;I"HQ DG5RM6KT)RS2RT3VW;XS:\S.\N7RU2RT7VX-dZ7]T5fP7`YAXa:av.bm6b^CnSBmW9m_?lZAna7vuJod?ufG{jKilWstKzr\~iSŠlYyn^uwaƒsZ{uWmm^quhoeeqdTxdiqjuwotniunuxw}rrmr~mzykj{nx{‚rt‰u…„p‚ƒyŽo“|f‚}pvŒ_€Ž\€ƒi„‡e}ƒZ‹i‘‚_Žˆ`š‹]ž]¥ƒX¡[¤Ž\—M–‹D›‚M™ˆO›€T“YŸ†P”•W“‘[”ˆ]¢‰Q£–Y¡—`´£[µ˜`«b¦™^¯™Xª¥]¦Wªœ`°¯^ª W™¨]›£dŸQ¡¢_œ£j—•b›Œgˆ“cŠgƒ–a‘k”jŠ”\˜lŒa›™g¡eš¢g“¢Y“¥W…¨R†ŸM¦Q©H£K‹—>¤?ŽžF“©>‹§G…4Œ 6Ž¤@Š¬6„¡>…±@²Ju¹B|½Kw¹M…µD´IwµN†±G†®Sy¬VŠ´d€©TŠ²`„·fŽ¿^³bŸ´k£ºm¤¾oš±lœ©f©ªeŸ¤i¨©j¥”bš›S –UŸ›]ª`’¥X¡S‹œX“œZ‹šR‘œP‹žL‘§>ŠŸIªFŒ«A•­<‹³9“ª:¦- £2—¥;œ6“˜:—¦8œ¢.›¢8¡ž4¨—+«ž,§’:©—@ ¥O•K››?‘£L§EªN¦E§J˜›RŸDŽ¨?Š¬AŽ¨G†¥=„Ÿ:€¦>€¬>­H€£D©A{®Nx¹Rw»Tt´Ls¨Nu«Rv¹Y{´X€°dƒ´]u«aƒ¤mzµe­`t³dx«Zwdxžbz§hj§oq¯gj¡lj mg uhŽuWŠra•cT•d]œ^aŸkZ–t\kK‘cT“bU‘\V•XPœ^X§U_œL[šN^¢XhœSl ZJ/3B)/A**K6)BK2DP-KN-LT9JK1XH/QL8SJ9[D4TF/U>5SG0MP(T\*WO1^N.T\6WY9em6ep2i]?g[<^]7fZ=o`5n_=rj4lo„ D‹¡E‰›M‚¢Mw§Pw©R‚µaƒ´^²O~­O‡¥Vªcy°j}®d„²b¤_‰§i°lt­av©eq¢bx¡azŸku¦nm¨pt¨`h¤ek ra™kc“md—bV‹dP‹_[‘ccn^l^ŠcT‘^VŸ[X›_P¦_S eY›a`œQYWX\e–Oi˜R?*0=$7K18M60JA/QE6RU;NSA^V2^Z8WQ1JP:ML,WK-PG,^H5\N4\\#ZK&QK%SR*d\>b\:fl.m]:cb5oc9p`;q^>lbCwj;qvAoh?urBysMvu_wp]vkd~cZ„db„cnrklk`{niqhiifcgl[lmdkdhqcvhiqkZvzekolt€po‹dq}nu€|wz|uw„wx…ot{p…†|…‚q|Št~j}r{|oƒl‚wd}ƒgƒaŒ~f›Ž\¤~g§Z¡…\ †^•Œ[”ŠG—ŽR•‰?›‘Q¢T•‘P•‘Pœ–X“L•ŽQ •I¥‘L¬V´›X¤œT¦˜Y£œ[®V«™S§¨Yª¤[¥ aŸi“Ÿf•—]˜™gŠmŒŽh–‰h‰Œ^‘`Š“g‡ˆb‰‹b•VŽŒj˜‘bœ—j“aŽ”n•‹h•›i£[”ŸOŠ£U‘œGF•¬;™¢I¥G¢?€¬I£D‡¥Dˆ§J†¦F‚žO{¤K~«Mw­Q}°N‰µ?„¶KŠ­?¯J€ºK‡³R…®Zˆ±c…³P}¯X­SŒµ[•¼i¹dž¶e£­hš°aœªnž¯a¨iŸ©c˜\—šS¢—OŸ—P™¤T‘—Y”`‹RŽ”V—N˜P‡¡=ƒ¦:ƒ¯={«8|¤4Œ¤,ˆ©1˜4’¤7••,¢8•“0™š+“”*šž3 “1§•5¨ -£—:£‹9¤‰>¤–;™•M™•BŒŽN‰™FŽ¡>”žJœH† F—A‘ªG‰¨Nˆ£@~šG‚¨@ˆ N‘œLˆ¦I’™M†«X~¯b|®b}¶\‚´^¨Xy«^ˆ²^¥ht²b­f‚ªg±d‚§o} utœpx¥n~ mo¬mo§ek®cj¬je£_m¤_jŸmfŠkW—_Y…d`b`l[•jb‡haŽcQ”k[›k[˜bTœbd˜Zfš]d›T^]k˜\c˜JkŽN90gc7nc:heBhe”7‹Œ,‹•)‹˜+š. ‹)—•0Ÿ“4¥ž5¬’4¨•3¡Š0 >ˆ=IŽ‘F‹B––@–™Bˆ¤=‡¢DŠœKžK“O„•G‹’NƒžH‰¡J¨K“¦N’ [‰ª\ƒ¬f…¨g†¬`~¦i„£i~¤f…ªg®fzªb…³j±h€¶kw©o{uv›pz›szŸx{tp«lh£dm¢cežf][^›]`Žca–cZŽk_‘fg‡fa„leŒnc‰oT‹q\ˆkV’hcˆbg‹]c–am—Xu”NmKdSjOH68=49;?;>G7KBBU?DSTEaTBN]DVR+JQ*UH!VS.RQ"SP.VN1PR VZ&Y[1WN)`W:_[9`e>k\*_i=n`7le9cnCpmAuk“CƒKŠ—E”—C˜D€Ÿ<Œ¢H‰˜R‰›Q•›\šYkŽ¡m‹ j§a~œn}¡d…£b‚¨l{¥kƒ¦g{°s~³b}¯ls«o~šlq˜hw¢lr¢ju _j¡ie™[mœ__œ]^›aX]Zˆ``‘icdd‰^df\‡nY•pQŠsZi\‰\Z˜an™cl›^f›\p•[q‹XjSbQD44?<7<:2GI5OA3TD@]M?XRKRRCKW2QX(US)^V.YX&O\MV#MX)\a$S\/RX.__2[b:ja7gc/bb5i^5hlCchBf`Ey`Gxc@sa>mKhFy`H}_X€_S‡_Sd]ˆ]aiiuhm{ccy]\w]RnbYqV_gU\j``w^_lXgmZryelvhp‚fk‹sp~iu}otƒ~qy}}‡|uxzŒww‡~to€n}mjzkiˆrfˆuo}d‰u^‘„U–„Z“{e˜}a›}[˜†K™ŠW ˜U¡•H›ˆJ ”Qž™RŸN L–•E—¡A§Ÿ@¥–D¤–<šE¯¥C¯¦J®§U¬¦P¤ªO  Vœ˜ež¡hš¤^¢šbš™g—–h“…j‚o}s‘ˆh“Œ[ƒ†^€„i‡Žg}mŽgˆbŒ‰]Œˆf–b“ŽZ‡Œbƒd˜`›Q¤KœNš£P§C§Cˆ¦>Š¡;‹§G€«K}§Hx¦Ut£Lw¤Pr¬S|¥]¬Zƒ¡Y‰©W¯TyµI}³C‡§I‚¦[z£b€­_†®VŠªU¢P’£Tˆœ^‰¢]–iœ¤gž§iœ¤[š_–›`—¡Y¤žZ¢T¡™[–š`‡¡Z‚¦[~šW~œT‹¢O’£O“ªG•¤E«M‘¬<­<{¤:}¨<ƒœ9†’8~“@†6}’3„ˆ!”‡+›Š*˜Ž%”š%˜š1 ›3§,«2ª9™”?–ŽB‘‹>’”5š9”•8•?‹A†˜A“EˆŽTS’ŽA…ŽF€‘@‚Q’–[Œ^ˆ™c XŠŸ^©cˆ¢lŸq‡šeƒšd†¥l‹®pŠªo‚¢jƒ¤m€¬kz°b}¤`x›bpœ[t«\y¡fz _o›[g’^r–dm”bj™``ŽaeŠaeƒhX‹[Zƒ_Z‹hc`g‹e^’ne_g^c–Ueš\^•[hœNk•Od–]a—Wi†\>1FG;BFA>EBDRQFNGJ^NA\YCPLCHK3K]4SU5X](RW&M[ RT/[U4`c,P^6Te2X]8]cFan@ja:dd6q_=f]=mZCf\Fx^BoiA]@„fF‹gI[SŠYTŽWU‰Za„da‡]i†imr]mt_dq`[kZVhXcsYZkYWjOckYgzZnsTu}ahyhv‹uu‘wg~wh‚q‡x{Žq’x|‹†sŠ||†‰p‰ƒwr}prwnjƒys{mzdqb‡^ŽYŒ„_Š…]›‰VŸ‰S–‡N—›O¥‹IŸ’Q£™W¦ŸQ¤V¤A¡Gœ—C–“F¥G˜–D —O¡¦M§£Qµ§F²¤W¢œM¡¢U¤›X¦¨kž™l£¤hžœoŒa—ˆo›‚p—‰dŠnŠ‡i…l‡Œc„†iŒˆ]‚Œb‰ˆd‰f…Žawaˆe†a„Z ^Š¤RŠ¦QŒ¨Jš˜R—«OŽ¦A“­<§9¦B¦D}¤Q|³]x°Qw JzžW~­\ƒ§Y}›Uy§\}¹O‚ªTv°J„­R€¯U|¤UŒ´ZŽ¬V§Y£[†¤V‹˜\“¤V”¤b”£f‘—c”’Yœ–h˜e ’jšœiŸ[œ›_‘ªSžX¦]š[…¨MŽL†²O…´L‘²B©>†¥G†ªA‡¬=ˆ¤F–2„–+Ž9(€•$ˆ'…* ’!›*›š$˜œ'›'¤š6©‘0¨”3¤<•‰7ŸŽ>•ˆD™“@•ŒC›?‹ŠO‚‘O‰—JŽ‹K‹“G‹Nˆ—D‡”A’•K™]ƒWŠ›k’dƒ¢h’’g‹—qŽ™r‡–q…Ÿh‹žrƒ¢p† l§w…©j}¥nv­fu¡hz«Y£Y|°b}ž]}£byŸTq•Yl”^l–brŠ\dfZŒcb„mj€\jƒh^Ž[iŒf`‰bdn`˜_j–\b“ac”_b“SgšWpœMdšae›QjVM9?K:HM:IHJAGRMSOMNWDYUKPRCPPBSU@KZ=Le1Ub,M]1M[,P^6Xd:Zabg‰“+‚š0Šš+„.(‰0¢Ž(¢*¥˜+¢›&ª+¨‰%¦“+ —/Ÿ‹8™’<Ÿ‡2ž‰6”HŠQM‹‹K‰“V”‘MŽ‹O–“E‘•I–œM•C‹O‰X‘Yˆ’cˆŒ_Š•eˆ™n“n•y‰w‹‰y…”yˆœu‡ w‚§k}¥nq«er¥bp©Y{«`y«ey§av¤ewœ]p“bt™Xt‘OvVm˜_a]_ˆh_ŒafŽZi…ac‚kegk–iq‘\i•]m˜cp‘Wg‘Zo’^s”Qr’QfœTmMl’W9>B=CJKYc6Yf0Y]7]gB^bGZd:a]9k_:j_:q]2y]>ri0€fC…gD€gF‡dGŠiJ’_[‰\NŽ\`Œd^yaezkZ{Zc{aXhZhxa`nXXhOSsTVoO]uSep]hrihu]l„qi}mn‹{jŒ{i‚}iyƒnw‚vozx‚sz‰t†xƒ}v|y}~€mt~zˆ‚k‚rŠql‚zZŠ€Uˆ`Š†Y”SŒM›ŽX šHž”GœŽL¡“O›™S˜¡X¥—J¥šNŸ’MœžR”—M—•T•V®›U°œO®”J°ŸY±”K­ŽV®•T¨£Z¥›h© d›•b”e”j›…b~d‹c„]œŒk›€`•€k•„^W~’a€ˆds‡dvŽb~gy“p `‹P„™MŽ—M†œE—¢BŠ­P…°S…®E†£J~­G|¯Lp£I¦Sy¥X}©W}¦_rž\w¦Vƒ°[x¦TlºPy§Zx«L‚¢Lz®JxµR‡®Z°]‹±[y«[}©[…£V X…›X—˜Q—œW˜œ\š“c˜–jš›c•e U—¢RŸ[Ž¤N„¨\~£U‰®]‚¦IªU„¯G†²BŒ¦A‡¨=ƒªHŒ :‹9—2Œ–)Œ—.…Š(—”+š”2š*•‡/£•*±“-­•&¤”&«•3©“$ª‡7¤”4 1¢Ž0‹A‘ŽK‹‹GQˆ†XŒŠR†•K€‹@ˆE”G™B‘ƒI‹†SŽŽT\‹–cmˆ’kŒ‡gŽ’kˆm‡‰p…‹n|Žr€Ÿq¦mˆ˜mv¥x}™slŸew c|®jx fz£pz˜jUw”Tx”Qs™Vw‘`v‹baŒQ]†T]Œ]Yƒ_[ƒia^cŽihŒalff‰Ymš[l–`l“Yn‹awŒMt“Qg—Ud“agV@=T;AK=CF;?K;LCKPFUPD`RDTWCXUA[]CTZ;OT6IX?HZ0JM.NO-T_1XY5`Y/\Z=c`Gb^BZg=aoGogHsj>q`;€`8b‰›B†•?““3’›+‰7ŽŠ4’0ž‰*¡5˜„8Ÿ‰*®Œ*¡Ž0žŒ.ª‚2ªƒ%«Œ$¦‹41™‹9•C’Hƒ‡L‡†V“…Y’‹J“‰=ƒA’†B‰R•~J‘K“{H”†I‰ŽP‰a‡†mŠŒhŒnŒvƒ”v‚kz†s€†m‰Šs‚žq§z~žyz™qs˜s{¡tt¦mwŸo‚£m‚—f‡–\~™_r’Rt‹WxŽbr‹]i“QiŽP\V\„U[„eZyce|[i…_ab`bnŠbj[d‹_k“\n’Xn‡Wp‡dgˆ`gˆf5@K>GR=FS9HO>LCCLJVOEYG@RZ=MW=NOAPXAMNA=Z9HS6AJ:AQ4V]+[S0U\9`bGI5IO;[S:\N@bZLb\NbVLhQSv]Py^TvbKtbNycS{XY‰^PŒ[G…fH…rG„oIŠtDˆkJ€sN{oYtb_}bhvgm{Zc{a^}WizZeyi^na`sfhpltxsqsty}€v€wpy{xzxzl€{gzr{xvu{n~kxh~‡k‹Žn‡Œw|Žsˆo‡ˆnŒp…upƒhq{e€„`‡wc‡y]ŽV‡†^T“MŠˆP‘‹OŒ†QŠ‘b‰•ZŽV˜—X™_“™^§•P§™R¬’M¬–EªˆJ¥’L¬“W¦•X›˜b“f˜™`›“ci—“h˜še–•Y–“\’…Qž…V˜†bŸ‰h˜’k““l†f‚‹oˆh††fˆf‡„\}“\”^}•^|–`yPx’Nq•Mx¡\€ªWƒªV¦Z†¨]~¯Sx§Q‚¤V~›YWvž[z¦Ut§S}«Uv³[i²\m¨[q¥Ws©[n®Wh²SfºYi±Qh¥_h©\k­at¯[€«Vz¥ax¨ažS†›R‚PŒ˜S„•a–T‰™T…¡LŽ«NŒ­TªK•®H‰¤O‰ Ox©Vs­Tt­Qm¹Ju¶<‚¸9…­4†¯1£/›/””8‰?—ƒ<™1™ƒ2šŽ/œŒ9£’9¦‹7ª…7¨{(¦{ yž‡&¢‰1ž„3—‡>™@Œ†O˜‰M’O–MŒ“R„ˆSŒŠHˆŠG‡~D–~S•|Q”Š^ž†Z—€W™ˆT—bŠh’h–ŠmŒ†rŠu‹‚t…†l{’t}‘{x•}z yn›qœst”|wz{xz™iy”g‡›_ya|Xp•Zi‹aq†Vh‡Zg‚^[ƒWY€PdxVayaY|[_€Z[x`cil„dqZf|^bde‚ZiŒ`n`xlpj@EE@PDANHKRJLWRNTQJN[FMLQ>\V?VDCJL5DS7JR=CILNTACR;UOA[X6eSEZ^Ig[FXJWdUIm]GpdJqaO|_LƒYK†cO€]LƒgUfVeKŠhO~sZylS~sRmg`u_]zchZ[y^Z}U`yWl{ek€i^rij|gpwqpƒtppmƒ|q~€p||qymvoxxp€vp€…qz‚w|py}syj„x|€rz‡iqƒlˆŒr‰†k‹zmzlvˆeozgwƒk‰rg|}cŠ†c’\ˆ‘V€ŠZW„ŒX’‘b““jŠX•X—–\ œUœ[¡˜S©›M°ŽO¨˜O©’U´™M§‘\Ÿd“YžVŠe—ˆ[£—_•–Y”–X™V’ˆZ‘Q¡†a‘˜h“m‘Œf†”o‡n…`‘ŒdŽŽT‡”]‘b~“_}™\‡’Sƒ–]o‘K|œJq›R¥R€£bˆ¬W‚¦\ˆ¬[}žP|œ\ˆ£_y—]p§^tcz¨Zs°]nµPt§_h©[g¢bk¨fq²\q®So¸Zq­Qn«Yp§cjªSr³b{«ct©kwª`ƒ[šM„ Lƒ[~š]–^†“W‡¥U­P¡OŽªL§O‚ QŠ¥Qy«F®Q}¯@~­Kz­Hz´@~¤1ƒ¦9ž6”ž9–Ž+—8˜“<•9›…1’„0Ž6 }3™…@ª},«ƒ0£v)©l"˜z" Œ/ƒ:“yA–€CšŠS‰ƒQ—’E•—K’RŒ…YƒN…ˆM~€JŠƒZŠsO–]¢}b•‡V•ƒ^‚a‹ƒ[Žhœƒ^št‘xŠo•|n…y|ƒv…•}~š~ržrtxw{w†~}ˆm{’i’c„iy“h~Œ^nˆ[c•`r]cƒ[\ƒZZ~`ZzTh[f|Q]€aX€Zg}_g€e^‚f\w]_xc`{\^ZfvdcŠlq…bo‹v=KN@KQ?=J9@TF9W:JRJIVIJUMANLLOWIQ\JLcEGKN5HS2OFCMTETIINJISOC\G7WX?aZIVUHaDRiKFnSQjSMn[R{cWpYSwdTˆ[O`PZW†_TŽa]}rZ€tawj]qg]zj]ol[|b[yrb\_at‚eazbe}hd|eguet}w{€xtŠthŠrf„|o€‚u†r|‡u‚w|}‚~y’~j~“{y‘t|’xt†kl™mo‹esŽks€puvvrqyrym~x{„oƒezc‚‹[z’Y~“a‚Ž[‡“cˆŽk–q•”a–Œf“`£–c¢›\®’X­‘Y±˜b°“Y¯ŽP¦†XšˆI¦‚Y«U©M«ˆH«ˆOª‘GŸŽU¡Ÿ^˜œS‘‹U“˜Vš’Y—™a•’fˆa›‘U‹P‘\“]… Tˆ‘N‘—VˆŠPŠŽX|“H™Fu—USo§Uw R|¤Vy UxŸSx O{Uu¥Xy bx«cl¥cp¥hq¡ht¥Vw¤^r©fr©le§sk£j^¡[m­Xj¯^q©bg·\o¤Wr©dl¡hn¨cqªarª\~š_‚—Z‚–c~ S‚¦ZyšS†¦I¢G…˜N„–N›DªCŒ£L}¥A}ªžƒ=’†?‘6¡ƒ0¡~+›v$¡j(¤{'”s%p.‡x2vDœ}E˜zG‰‚?”„P’„M‡ˆVˆ}_‚xR…yT‡}Tvcl^ŽiP™{Q—tZ”‚b„qeŽ{eY—‰eŒd•„q—xt’wl‹z|‹„~‚‰w~Œu…€p~v„|zŠy‹ƒr€ƒq‰‰qƒgkinjh‡ts•ii‹hf‹\d~[q~_hsWeuQa\cr]es^gpWVxdYn\euqaujXnoUox`usivuu‚mCDV7KQBGX>=YI9ZDENAFKOAOIGDNBDZHGYEASIFOO;UM8MNBLE;ZHAaA8VI@^IM\QHfSFaKMdPKiMWkXMj\ToSNmYU~\W‚gU}i_‚aW|e`‚c_‚sf€rf†ogzn_ty[lu[mr`oqcnih|enwfcwdf€_g„hxykp}xv{|sŠ{lpkƒvr†|s‚wxz{yu…‰{‚Œw‡ryzx“r{tvol’qk‹ok‚no†jtplƒutyx€w†x}„z€w‰g†g…l‰‡a†…l…‰iŒ‚q‹g’‘^“fš—qŸœk£œ]¤•_¡šd©`¥‹X¡‡MžˆDžŠJ¡ˆH¬„O¯‰D«‡E¯†Eª”J¢™H¡˜P™œH–˜MŒ“T’šYV“ŠdŒU’˜Q˜œK••Q“O™R›LŽ‘V…ŽK‰ŽKI‚›My˜Tw Pt¢YrSp—Pt—X‚™P~¤Vy§_o°\t°mr±nr°mk¥poŸjt¨do­bk¥^g ad©kc¨`\¥`h¬gh±fn®cm¬cj©dm¨h|£jy¥a€ªlw«hu°e€¤b}_| [€ŸP€¤KxŸNw™Fz˜G…›LŸA‰«Gƒ«={:x¡9y¤<}š2›/€™7z›4y=t–9sŽ4~‰1|•7’8ˆŽ8™Œ<™ŠC•„A›~<šƒ8•:œƒ/—s5¡p)™s$™v.˜z;‘t@–{C˜zE“{IC”yCM‚Y\z_|}[†x]„r]ŠwU‘mV“oV”v^•w]ŠtdŽ}]’aŒ~d‹j”xu—vr“xxŒ}o…|‹„xˆƒ}…†|Š€~ˆ€|ŒŒz€Žr|’|ƒ‹y{qrmjkkŠuj„le‹lc‹fl€amtdlu[es^k|]i€ek|[`^`q``vgZkranuYmsgo|djymqng|o?BV6DWDIW?FYO>UHFRCAQD>UQ>DMB>PCDUKJ[KKLREWGFJCKLTFWJGTHNYAKRPF]^Qd]UaXMZY[bUZmc]hfRvdVyY]uWV…bU‚Z\v\dv]eu_^wfn}hs}ngva_{gbuudyjmzqnvikycg~al}nrwgrzilurx}~xuxp~~iurztdw|n~‡s„ƒot|Œ€{—€‹yqt“p…—nrŽnz™`y‹nu‰cqˆk{†eokqv{}osƒ{y}yvŠzy~jŒd{^ya}‚mw†iƒc‹i•h†‘oššs™sŸ–n¡‡d¡ˆc ~h¤ŠS®‰[¦ƒS˜ƒC¦‡Q´‰L£‚P±ŒF„L¨‰I’TšŒX™—K–ŠM‘\˜“a…•_ƒ‘Z†‹S†‘L‡‹R‘Y’—\•]ˆQ‹X…“X‘’B„‹R€’G|ŽCv—It–Hp ]xžRpž`t¤Lx¥QRp©et£lt¯ht¬kpœrvŸcz±cp¬Xa®W`¬\]¦qa«`džjb°ep¨ti¬ok£hpª`h¤lt¡ipŸft¦cg¥d{«k}§hs˜Zy˜O‚¤Z}œU—Uw‘P}˜F{œK†ªE…¥K‰ªB}¤K¡=x¤FxœGy•;‡˜7„¡0zœ?{ ?r†2‡0ƒ„7„†B–“@œ‰>—“<ŒF—|=˜‰3œx0 +§v$¨t£q-q%žu/’q;y?’{6›x<Œ{D‹~;‹…C„‚Oyr[w]ˆrd…rTySnU‡rR”qYŽ{a‹zYŒ]”ƒl™vj’~gŽ{n‰ro|uŽst…h‘|n‹}Ž„–z‚ˆ‚€‹y|‡†~Š}Œ‰{‡ˆ{ƒ~q}~l{yq{†vi‚mfŒioŒok‹ih}[sx`dyghveqq`p{W_n^c€W_xn[epZhpbsklo{c|‚syriƒp=MYIQ>LE4VI;QQ=DY?H`GS^GP[FOWIKMLAJHCTHE]VRXUOXFIYKTY[NVe\\cXYZbb_]`h`ie]m]U€ZV„UV†\T‚b_yhhqjjw\ekcbn^nuemtdhuj`vlermm{gu{nmqoprjvthpyqisjmvsn}x}wxxm€rv{n|~ep}`t‰l{Œw}}qv{’xwš‚y …{¡y„“sz”b~•czdray{fr…c|‚k{ws|uzƒp{vwytz|x‰l}az„f}`z€i‹ƒnsŽq‡—k‹“s”l›‰oŠe |h¥{a¢V©zZxK ‡I­D¯O£’S§ŠW¤Mš€HšˆPŸƒXŽ‡S‡T‡’SŒ“]”f„‡]Ž\‰–V‚‹S‰‰XˆˆTŽ‡V—ƒV”Œd‰TŠ”J‹M|‰C|ˆL}’G~›Gv—XsŸ_x•Ws–\{¢O~ŸUxž`k¡ek›ij¢hg iq¦a~¨Ws®Th«]i§fa´g_¦rn§nv£un¦sx›rr¡or§ga§ci™Zh–`ošff£fug¥_¥Ru˜N~˜Xy“Yy•TPx’Ax¢=¡C‡¨?€©NƒªL|œDŸH€‘B‚‘H‚•Iœ8}“9w˜<„F€‚?ˆƒ5’„;™‹?‘Ž>•Š<‹;’ˆ5¢~9¨q5žp(Ÿm$žoœp&—l&žn)l8”t7{4Œu8’y6˜q6•zDˆsQ|oZ„nXŠwbs[†wYƒwa‡z^”qS’xW—{fŠe’}n˜wg‘tjŽu‡sprršvl˜„j—Žk’}š‰ƒ˜}‡~z„sq„zy’‡xŽˆ~ˆ€yzzxq~„xƒ„p}…jq~mwryŽgqdn„_nxbjtehmXdpV^pY`~WiwYcnljlt`zpd€wr}yowv‡kOKmŽ?|ƒB|ˆBƒ„?Šƒ8”€4‹‡AŽ“=‰ˆ0~2œu1§~/¢z,£o"¦kœo"©m. r5—o0’m5˜z-šy<™v.~FŽ}LŠyL~h_‚x\‚xXƒvW‘q]vVyf„`‰zV‹z\’wa‘sg˜vs•xf€r‹tlk—yk“‡nžˆv•Š~v˜x}™~n‡xum’‡q‰v|~~„}xwƒzvŽ€nvuƒ‚nƒˆbxetgs‡bm}gvpnjqWry`iwQcvTgu]ithr|ae…nkzo{…q€ˆ||„p=EiDBhQIiRSXVUUYONPM\WHYSLR\BYcJX[Ja]Mh]S^\W\ONLTIKdJNkZLeXS^]RaUYg_Ueg\scNqYNvTJw\TucZp\en[m|XdnS^p[^pXly_lrWrw_mrbxj`yrSypWsqWp€`s{ay‡bwŠhw{ht{h{yprtt|mqtxrkurplspr}gl|pv||{~~t‰ƒo†p„{€~ˆ q‰¥mŽ™ii‚†p…lˆnƒƒmz~utzm‚uq‚wsw‚{uˆ‚pŒˆo‡‹z‹‚z„ƒr€}jƒ…gzgƒ€q|…h†p‡—eˆ‘i‡dn”}h›t]œ|T¢sS¥~L›€Q—Pž‹Y£R ‹I“†I~M†O”}Q—‰Y’‹e‰^„c„Œ[ŠW’‹^ˆ†_€€V‰„]‡„[‰^Š™fš`‡a˜X‘™Lƒ‹MyŠP|‘G{–Ow–QvSr“Vl‘LtQuMlŠWp–`e–jk›he£^d¡ct¬Yo¨Xo¯dmµhj«^t®eu°[|±bs¨lu«ao¢cs“be“n_‹t]‹nj™ei˜^g–ei•\ray—Tx”Y|Z{—P~–O…–N‹‘N†–K‡žBƒ›B¡D¦Hx¢L€’?z:xŽ:vŒ„Œ?ˆ‹B‹…;™‹<•Š5“Š/¡|4¢y5«{.¯)ªs§k'«s4¤u/g5–i-–u/˜u96ŽyJŠ}PzO†qWŽrZ…t]‘maŒn\…{[†^‡z_‡}d‚{hŒv`€c“pŒucŽqgŒtn‹vmŽxp”{yx™‚|£‚›v}’wt”wm‘wj‡‚mˆ}nƒ}t€ys‰rŠzsƒt†{qƒ‹hzŽ\ŒY~}fzth}xgv~iov]k~^p{\q]r}ZzˆgrŠcvls‚Žs„z:EqMDlGQaWVV`VUZJ[[O`PQXMD_YM_SQ[cWc^NY]UU]QX\S\VRXb\P[X]g\XcfUeYTc_SfmdvicifS{\Y„\Nti`pelzf\‰\`€YfmV\uVdl[qkbun\}o^|rX{kUpv]s|cq„aoub|~c}€pk~pj|mrskktqompmjopvu|k€zhvv|yx€rz{uƒˆp‰q„œpŠž~ŒŸ{”o„•m“jˆ‘m‚dyixwtr~stˆyi€}hwvpq…wv‘{x‡|Ž’v‹Šp€{~v‹i‚‰r}„h~p€r€„s‡‹v|‚k„…q“~oŠth–zf•s[˜u[•y\–ƒV‘\˜c‰ƒY“E“~DŒuO„|QŠ…Mc‹‹k‚}Y’a„]]€Œ`ˆ‰]„^†P†…a‚†VŽŽV–“bŽQŽV‰O‡…HxŽCy˜@{™EvL{Lz‘Lx‡O€NwŒOu’Q_“dh^dšjf¡Yx©Wr°[{«b~©_u±Zo£bs°R}¥\n¤\{dp¡m{œhk›km“lhŒlg†bnhf—bb’Sm‰Os†Uv“IpŒJŽ\t–UŽP…ŒNŒRCŽœMˆ–Kƒ @uE”N~Jxƒ9|ˆAwBu…:}{/}‡=Š‚=‹…@†J…~?Œ‚8‘{C“y2Ÿv8¤j0 o.®p7ªl ´w¥d®g&­`(Ÿl3“g4Ÿt9›t1š…7›zJtMyR”nN‹nVzW‰~`ƒpSu]‹{W–€R“‚\‹ud•yX‰ri~c…xdƒonŽxg‹ml”soŸˆ{”†sŒqšz{¢{o’tw¤tj—tv‹qpssƒsp‚uxqqƒrt‚l†|mŒul~‚_ug}c|‡m|gƒ|govirwal…jxŠanzfuzdu‹`s‹^{}b}‹m|‡rŽ†ƒ‘Mt‹Mk†Oj•Te—QyœVu«Z‚¬Qƒ]}¦Zz¢ay¢Zn£\uœ\všgyap•ct¢Z{šf{Ÿov—iqbp–\v’gx”aw‹ZwŠ^pŒMuIq„RpStƒVƒ[zT…—Jz˜D|œ;q2n6uƒ>uEx…O~„I‚ƒ8‰„4x7{BŽpI”oFwG‡jJ‹w>Œ{>–r6™l9¦o(Ÿl4®e6­r/±a$¸d½g²m¨Y$¦[4–],¢iA—{B’xD’wF‘sB•pG›wS}MyT†€L”~J™RŠuMŽuTiVŽkXˆs^Œl_‡ua–tf‰}j•xk€u›†|Žp™‰qŸ„pˆq~m£sx˜‚o¢zt–nl™tgŠyf‡eŠxjˆ€fŽzj“…h€Š\…Šd‰Ž`Œz^|†b‰|c‚jwŒc}†efv‹js‹pu†mv‰r‡l~a€‰jzYH`XJgSVpWUjQ`bV[k_il^fuYpoZis_gvS[lRcbY]iT^rUZiXWqVen^rn`neotgpxaoz_~q`}gYzcV}hU}fa}d^†_bƒXfƒ^s~SvzXqtasob|ubzq]zsVxo\{rY‚we‚lZ{l`yy`{zio{mj}wmsznv‚mq‰iq€izŒir†rzˆup†ur‡‚t‚ƒt~ƒŒ|„ˆr‡•u’w…œ}}‰y}†~z~s‡…r„Šj„€`„€gupjyinpysv€rq{kz‚tsywˆ|Žˆ{„v„‚~}ˆ~ƒŠ‡yŠ€pŽ…x‰x{‹xv}zz~z‚p‚zk~‚^‘|f“x^Œx^…ka†iasSƒwWxpQttPvs]r^zx^}vSsuWxo_vt]wzh{ˆas_y‡[‚XWˆJ‰”LŒY„T‹‰IˆŽFƒŽD†?Ž—:‡‘FŒ‘<„–?}‰MzI‰CA†ŽP}ˆOtƒMf‹NlMr˜ZqŸZv¡YyVyšcs›hp§[u™W}”c€[x“azšZ{•d~˜_s–il“at’^}Š`z‹gz•k|is‚_{€WuT„Pw|Ms‚Z|Rw•NrœIy˜KoJu“9s…Au…’‚K”v:•x:”vAˆoJ…kEyB—v;›f6žm*¢h- k+£v,¥f&·g*°n"µi²h#¥`*Ÿd%¬\+¢\;g<št:r;ŽqIoD‘tAŸ}FšƒF‘‡I‹zIŠxK˜sY‘pW˜ggžs`“tq“wv‹rt‹nf›lŸwi›ƒzœ{qž|u¢ƒ|¢m¢‡u¢…o¢{~²~s°tl£|jšzh™‚pœešzj‚]“x[ž|`“^”Œ^ˆj‰uh…m~]’h’ˆi‡†l‹„k††n‡Œf€|j€‰lŒ`Œ‹k–‚h‹wTV~Q]wQ^uZfzekwafthd|_n„fcwdfoeUv^TtU^kVacQjdOhgbhrgmmloq_ske|`n|fjsqsknremtii‚rsƒxu~hi…dl‡_i‡Yn€V|yX|pSznSzt`~xgrhpwcovdvz[n]„pk{upvqqz|jv€p~„myˆr„Žn}lk“gj…ru‘lr‘uu‹}jŽsˆ‰o‚ˆsŽx|Œj…i‹qŒw†Šlˆ‹i…‚n‚k…‡pƒ€ozvp~vyuuuwywz|ƒ…v‡ƒ’}‡~ƒw„‹px„vx€x‡|y…}}xx€uv‚owŠorzz‚}|ukxp`um\‚kd}le‚~Zs|NqoOvoFs}M~nI|pPzsZr~Vrw]vmWwpRnyXwƒQy‚PwŒW€‰WƒƒT€‡Lr‰EuŒJqMm’RxŠPvRz|R†€K…’E‹“9y˜yŠA“DxŒGs†Fx‘Cm‰BrŒKmKr–Px‰UyŠ[wœdtŸ^u¡[y›T}¢St¢Ov•R{™Sy[€‹a”cƒo~Œg‚’p{ft‰j}`‡aˆ}h~nc‡|i„…b}‡^q‡Y}N€RxˆSrŠPz’Q|C~Eu?{x>yHy~T…ƒT‚S‚„Iƒ?‰r@„w?{J“rIŽzB˜y@™k:”x7”w&l*¨l¢s+¨i*¬e#¯`!®^#¯_1¤^9ªj2Ÿg8¢`A—d<œoA’vI™oF”|?—~H˜‚R‘†M”RtZ‘p\šr]›khnitv‘mtliŽso—qhyqœuvœxr—~|¢x¦ƒ|‹p©yq«xo¥qf­ue£pi¨qq¡tnš‚r„f¡xb£rd›zf¡†bœ„[“…_ˆ{i‘tcŒqf‹|hŽ…e’cˆo{p…~l~zl„c‘‚p’€nˆ|qŒˆrQIY[[a}Zc‰Zl~Zs€`ez`d^l\coZ^yi[nbfifcsQdhLkfSer_htkrvfylcwml|tqxlxko€xf|xgss„€}‡m|qpcu|aysRuxU„qT€nZxqVp[|}ZtoglsXt€a{wh†pwtm~lsttrry~tm~jjŽuu’t|wt†kxƒ~gˆtjwq’i‰{g‡ƒiy~d{…t„Šr‹kŠ„d‹mˆq€j‹‡m…cˆ}q{u|}t‚€w…w€~ƒ}r…{„‹}‚…€{…}…z}oz{py~ˆowƒzwyoxstˆw|xƒwƒ~ttm~v^|ocˆn^tsZtpX}~]ryLrrRwwHmvJ~mMutVj}UopUy|]wkYhxYz~Tt€Wv€OwIz‚Jz~Tv}DpŠDo„Ro‘\l‰Lt‹G}ˆEz{F‹€<„’@‡”A‚7rŒCx‹@wˆNw—Fp‡Pk“IsIrŽQv‘Ps‘PmSqƒ\jŽ`lŽUqPvŸU|žJu¢O‚”Jˆ•OŠ`~ˆc{e‹›i|˜r„iz_q…gyˆ[xƒi|pfŠpiŒvc†ƒl~ƒXt†Sz`‚ƒ\|YqŽTvŒY„Pƒ‚G†w=ˆw@…HyLƒ‚L{…U~O‹yPyN„vJ„T‹wOœDŸs=’n-Ÿz/šo*—j,ªt(Ÿi-¬f'¦k.¡j)°]1«c9ªn:°l6Ÿ^;£[H›jE—o;™eK“tK“nU¡zG H¢N‚LŽsM›r[‘pe”wo•mg˜mršqqžsj™{w›ut•vo£vŸ}z§†ƒ ž‹r¢‚yªƒp¤}w°tc¦€m¨qj§mq¡yk¡Œzª}q |k§wc¦€kž‚f•‚g”yeŠ|iŒwh‹re–yf_‰kŽˆk‘xg…}rŽ€sŒ~nwmŒ…hš…xŠo\X}eO„ja‡jh†lg~do„ao€\gƒ]]‚[Z}eaxdbsljwheqbmhXigZugZptfk|ksrtwuu~qrxu{ysynˆzlˆƒsƒ{y~x~tu€cwzawuV}pS„nS‰zX„x\{w_ux[poaup[v}d}|duws~sskltcpgkzkk†qj‹pvƒp}Šx~|w…xxŽpj’jd—vaŒ|]Œ{f€„^~†b‹b~j”‡dŽ†h“‚l•‚h‹Šm‰ƒcˆ~k{nx||x‚ƒŠ…ƒ‚{Œ}…ƒ|€„y}‡‰†|…zvvysvtooq’wqˆx|…vq}yt†uy{zy„{vqk‡s\|mYnl^mq_wvasxUl|TsyHpqOupHojKsrVyy^oy\ezcio]sq^xtPxvRs}Gy{Mw{Pr„Vg€J^‰WfŠUo“YkŒLn†D~IŒ‡M‡ˆB‚ƒ8}>yCz•Iu—Rn”MfˆNlŒSoˆMj„Ot€Mu|Iw~Pm„PbWh‰SpŽKs•Tt¢YtžLv™S„•T}b~‘b‹–q‡™nˆ–c~g}‚`s€]ruXwaŠxfˆn]„kh‚sf€xj„Š\}^w‡_u‚]|d€†e…†\‹}SŠtE‹nN‰wS…N}‚Tz‹J†ŠM‚S‡OŠ}V”„O•‚S›zE p6–r0u)–t0‘o4œk)¥r%¦p"¨l$žp0žn.¨h0£fB¯mB§lB£aEža@_AŸbB›iPœoZœmT›oM¢zD¥‚CœxQ‘w^–|i›tlwr˜pnst™j~n”}sœ~}•‰‚šˆ˜‹¥Šƒ¢Žy¡„}£y§‰m¢ƒn§{g¨g¥xo¨‡n¨„v¤‡m¦€n¡m«ƒa¢‚kŸzg’wk–n`‘rX›q_¤v[›gž~l—}jœ„w~rwmsl‹s“{r„v—ƒv^T}kS…qU}qbz^a‹[j„dp†hk†ae…[\}cathrvohnfmkbnoghq]qkipwmvxjz}fyyry€y|ƒxv€y}~„}z~z}|wytoƒxe‚yd„{c…{\‚v\„{c‡}ayx[xpZmxkvya{b}oyznx~krlpqwqnm€nvss€wyx{”nvŽt{ws•eiŒgg†to‘xo„zf‡€e‹ƒjƒv_“‰^ˆ~c‰l‘ŒfƒŠn‘iˆƒcyb„yo{†t|xƒ‰}~Šy‹ˆ‚|u‡†{Ž{ƒ†z‰}pr{‹pyurvuˆm~ˆw}ztt€}qpi„|kzro‚dg~ijtoWgq_fpPp|WxyNn„Nq~LhyOihDooKukVjoXou\jn[j{Tq{IytFj|RnuLyvI|{Pr~EfuQ]ƒQZ‡Kf„Hl~To…N‰€Ay‚G€ˆMy†HpEx–Ip‰LxQm’Um“Om“Xb~IqHn†RrtHsRo„Qh„PvŽWo‘To˜MyŸKr‘Oz‘X‡ZbŠ”gŽžd‰’h€œmˆ’g…†d|v[ƒb…tetiƒ{f†miws`}ƒVƒ„Q„„]x‚j~fy‚\ˆ[‚„Z„L‡tD‰}R…s\{{M|yP†N†‰K†ˆO‘‚G†~RˆƒQ”}H F™oA‘y;l-Ÿu*—t&Ÿt&©h&±s)¤y%¢z'£v.«a6¡m4°aH¦m>œb<žeB•h9£nJ£kSšlOœrP›tDžtKœL–~P”~[—xi•€fŒpkŒ|fžrxi‘~o•o¥uŸƒ„”‹‡¤‡†­ˆ¢†‹«~‚£‚t£Œs«‡n£rf¡j™vi¢‚o¯|g©|p¬ƒ`¤‡`¥Š` uk§tpŸ{i¡h\–ih¨s[©{c¥wn¢xqzvwgŒ‡mŽ€r“tp“ƒh˜…xŽ}w“zvm`ƒl^Šj^gY`fƒclƒbk~ehˆf_Žce‚ee|qt{jl{mrkaxgdlpantkwx^xz`|aˆl„‡h‰pu}|~‡~„…u}ƒw†{x…‚qykk†tdƒ{b~toŠrkˆub~ld~s\z}Zrvftl‚xi€|rƒyivvyszyr{yykuzos}zzp}k„jsŒkn‘in”pjfm‘qm{uˆzk‡xwŠ|q†zjŽ‡aŠ…f^…m‚˜s’q…„i‰€i€{kq~j‚jr„{y{}}‚‚†|…Šwzxx€{z~}{s‚psnoƒpu~|n}{g{qexkmzwnsthkyidqhefsXe|QpuVu}UvƒNl‚JfySkmKkpKnp[ryVt{\rwNtvJo€Gh{Jj|OtnM}xFxtBkvNbwKhwN_†JiMiqWz{I‚w>t˜h?”fHŸeD˜q>œsIžtI¦pG›zNšzRœwb–d˜€Z“y`re“urv–†mŸ„pŸ€v˜x}˜|~¤Œ‹§ŒŽ¬†¦ˆ„©}€ž}w¢ƒz£zt¥‡{š…p¨ym§~b €j¨‚a«„[©dª|nsj x]£s[¤wY¤id¬wp¨tm¥lo˜ls“mq“g™~q’€pˆu˜ƒt•v~˜x|cS}g`~scjV‹mZŒkc~bd„lp„ld‚imwlonmvrss‚vd}piqspxr`‰~d…_‡Œ[€gƒ’j‹‚m{ˆq}€n‘‹m‰†q~|yrs}n}|f}soƒwn‰uguoƒlh„uj…tb„k_vyb|ui}xlzyftvm}tw}qlvfyyyy{sux|Šh‚fw‹uv’sm‡mo’rl‰lo–ym”s‘|p’zw•€c„\‰cŽŽb‰‹hƒ‘gˆ•uƒk{n€ƒcryo}w_~}iwwt€~wz~}{…‚{ˆ‚ƒŒ~t|{}~w€vr†ro†oo{vx~wevpgrtqephdimkgotfrvjixYdXrVq]e†Ll„OpRnvDlmKqv]uoSvyYxxOpyPq|VdqGpsKnkSo{Srv=ouA`rFgFgwWetLhiLloS|~A~~;q€Iu‹CoŒAo†CwCv†Cd”EkŒIrˆXp„Mk‚Ru{QtˆTz†Pv„J€~Mv~OƒSySˆV‘\„T‹SŒ^’Y‘Ž_”–b’†g†€cf…qe‘{jss€{b{nˆpdxukszWx~_uƒd{{d~}ezzb„t^…v\‡xUzrMˆoJxwM…V~rMtK‰xSxE”sMp@ŽmD–lHsCœ}Kœu@žwA¢t1¢x5±m(¶s-·i:¯g1§u4§q4§j:¢`?­hI§gF¤mB jCžfB›oAŸfE”qM¢tN›|F¨~P¢wU¡|W“xY”€c•€[•‚]†o–€w‘k„r™y’ƒszv–„s˜~‰¤‚Ÿ‚€¥†ƒ£ztª|}¦{v Œn˜ƒqš~c ƒ[ª‰Y¦ƒi¤}i©‰c¯tp¤ro®€^²€]®}]§ijni¡kk¤jn£nq•}mŸƒhž‚qŸwh ‡q—}w•‚–z‡lSƒmZ€oZ~oZ…kVƒm^‰ujˆri‚um‚yjzym€xrzn}|o€ul„rrƒ{n~|_‰}Yƒ}aŠŒjb”d‹Ži…‰b…loˆ~t…q‚tswvxywn}‚v|x~tw„np‰loˆmg„ndŠphƒjjƒl_|wc…sd|dysf}sh}psxmqo{xtsyh|†lƒ‰rv€„mx‰qq“tm“€p‚k–€l–xl–€h“ƒc‰_•ˆ^‘‘l‹l†‡rˆnƒ†g~h|hsˆbtfw…ps~~r}ƒv„ˆ……z“„xŒwv‰‚qƒ~z~}sƒ}iqc‡ti‚mtƒporeiyjcnsnjnrplwmgs_j~ej€^_‚Wc€\`ŠRi„Qj}Lt~KqzStzPk~LowVvq\ryTk}VasPeoYdwSguSe|Hf~E^vM_tM]pTkiQqpOmlRutFps<{x=}„AvŠG~“Eu’Ir‡?kˆBp‡F{N~…GxˆOu†Iu†SsˆW‚~I|€D…ˆC|Q‡P‚`Žb‘Œf‰ˆ`„dŽ]˜ˆeŠe}hŠxgŠye“toŠuvˆlrŒnjseyt_|niydxzbwyj‚|m{}e|qhuxfvp[th_€oR{rPymV€tP‚uQ|{T„vS•|T”uEžzE™n>’yG–vHsM•nC£o:£p8°n>±y6¬r>°p4¬u:¢h<©l8¤e2©c?«f<¥^E¦gD¬lD¤h;§p:™iD”mA–zJ ‚N›{K sRyX˜}XŒYa“‡c‘‚g–ˆt‘k‹lŒ‡l‘Šy‹ww’Š†š……’ƒ…™…„ª„}©€v…|›r•‘q l¨„aŸˆbš‡j…b¬…^ª„f¥}b©{j­xm³€j©vl©v`¡j[ n[šh[mh™|h¦}mªxqŸ}n§yj¥zt§z|ž}€lW‚gN…pTŒjctd€n_glgg‹kr‹xnˆlxvxsw{uzh…€k~‚a‰‚k†g‡Žq‘‰l†“j}˜b€†h~‘q…i‘w~€l‚xz…‚tvyswtm‡~xŠu~{kw|qu…nk{zcxmr‚mk„lnzfswmcidrsdzsq{{vvnrsoulpt{qs~n€i|}uu~qƒks†{{e•‡g‘…n‘|cš‡k‘h“ŒfŠ‹]Œƒb†‹w‚lˆŽrˆŠp|Œ_‡|clx‡iq…hƒtzuƒˆƒˆ~„•‚t—nt’vqzv{~o‡wj†yr|mdwdtylmbilbiteinjsnpr^fmeivai}S[x[`ˆSg~^_zNlqZi}KjP~qDk{Kp|^evRk{PdMbwPexOfqPgpJh|?^w@[qHcwR[oMbqMlnSnzNi~?o|CxzLnvExzRn‚DsEi‚Me}Mp€E|ŠIu…JvRvƒTp„Sr{TzG|‡N}J}O~‚Nˆ~T’{iŒ‹W…‚a’„Xˆƒ_”~g‹ˆl_‰}_“mrve“grjoŠnh}ro~{f}lbp_o{U{ob‹sj„sa~k]€s^zia‡s\‚eQ†uO~rJŒqImCŠsQ|lKsNšoF—kO p<pA•{BtAŸo= hF¡j4¡p1«s*«p:°k?¬h4³d;¥e@›i0¦f/§d>¦e7¬iC¨b:§iG£nEŸiB£kF˜@•{B¥qV£zN£~TštW”ˆW•‚_›|a †t‘q–€{„~˜ƒy•„Š…rˆvqšˆ‚š~{‘‡ƒ¦u¤ƒvŸ{€Ÿ‡m¢€i•ˆe¥Š^›€m£g¡‰a•{g§‚m¦€a¥vl­vq£ta¥|h³v[°}Yªq^¡qi¡ej¦ma™nc«yeŸqg£v˜rq™p}£{€v†kOeQ’oVje„sg}qhtf‚lr‰jthxˆhwnw{x€r†zuˆg†„i„f†ˆf‰ƒqˆˆrˆŽm{Žpx•p€Žs‘pˆ‹{~ty€t|‡x‰€Šwp‡o|ƒnv†mwxjmvtg~vn}vo~wnrj‹gujvƒeuvhzv{qyuk€xtvyltuqu}rxx„jw†gv|fxˆsz…uq…vwƒq˜|bšƒ^–Žk—Œo˜Žk—”aƒeŽi‡‚pŠ‘qˆ‘k‚ƒgŽ‹dˆˆqƒ‰pyo~Œn‚{mŒ}‚“„v™yz™s€tu“xz”|yƒ{o€km‰okwfeurmsrltlgk_npdkx^woivcqv\dwRaqWXR]‚V[tRaqV_s\krYiyUvvIzmUpqWmoVfwG]rJYyV`~Z`vPkt?ms?`z>]zF^hG_cKfgU^{XdwTjvHd~UozTzvQwyT€zVxƒOx}NpXm€Zx…O€yR|wNsyRtwVvMy„H}ˆB€ƒMqtKquM}…Sˆƒ`~S„ˆT„‹O‰‚U„wbthƒlo‰peŽjf‘il’j^‹u`‡na‡wm}nn{tazl^vrU…pX‚rZrnbsvc~w]€l^dW‹eTˆoHŠrG”xI‘uDˆoI…iJbP’jW“bMšfF˜kNšuIŸv@˜q;™c9œe?¬]/®d-®h4¶i=¾g4µo8°l9žh7®k;®a6£i7¡d6žk7fC—pCŸmM—mCŸtD¨mR eQ§lR§vZ¯pb¥u]¥~e™xb“|qƒz¦z{¤uƒžz‹z‚wv{w‹{€‚¡¤€s¥w£{}¢Šw›e¡‹cŸ€a©Šc¬…l}hœ~o˜woœzdªrl¯nj¦y^žxa±zf³w]§jlœlo¦qt¡okžtf¤hmjo¢tw qwt{’zŽ{}mXŽnY”fXifrh‡mo„ft†or„ft‹`zi~‰mozsyˆdwŒp‚}r„}j†„e‚}j}Šz€uuŽxrˆlt—t}œp“dˆŽry†hw~mu‚|‡xsˆqm~jvˆjq‚wxhstpjquexpuƒvoŒpw‰pzkq€m~{pqvurz}wsrr|{sly|jw}pyxlvƒrz€u~vvŒmˆvy‚†u–ˆi“~`‰hš“fš‘g—k™‹fœfŽ’oŒf–o„‚gˆgŒh‘uƒ‘|ƒƒ{~‡ƒ‘~{œƒqš€y—zxmn•pr‘l~Œml€nj~^fw`pqerzitl`ojktlf|z_xxiwjqck|gk‚\]~^f|WjƒVf[fuaryXm~Mx}UqxTf|QdoRYrE[yM_{NXuUk|DkxHtmH_uJhFelVigTZrPQ~KY‚Mj{LauPlVysRtItrWluVo€Ovx`r|MxƒS‚IzzU†xZ„|Xt[{…TvN~†RtpXyzX~rNw€Q|…VŠvZŠ}ZsbƒmZˆi]„rWyxU†uiŠoaŒri‡t]v[„nq„~l|l_}{^~^{rPˆ}R€pOzu]}kY{nP‰nW]O–cSŽeE‰vMŠsM”kDŒjIŠjLcWŸgR¥iO¢cH§l<£d9œf2©n4¬q9«b6­n7¯g7¸i<¶lAµo9²a4£c:¥_/¨]@¢a=¯[:¦b4eAŸbJ¢_K¨gN«nG£fJ¦fY«qV¯mN¨u`«h\¥kd¥p`ª~w¡w‚¢w‚tˆ£s€ ~zzš||’xx–y€žz‚ž}x£€ž„s Œ} Œi§i~`yl¥Šn¤ym¦xmšsdžmd©pe­mm£u]gb¤ig²xi«vj›lj§erŸlk¤rqœqz wq¨x›s|–w|—„wŒ€‚_c˜eaŸv`˜u]”gjœie˜usoxŠg‚d‰n}ˆlr‡aoŠfvŽh…oŒ†sŒƒk}gxƒr|…w}„tt‡n‚”q€šrt”ex‰h|…m€„k„ysy}o~‰px…vs‰pvƒxlrsoqll~ug{qm|po‹h{Šqxtszj{tm{wrnvnsxwrqyrr~pxwy{vq€{w|wvŠvrŠos‰|v‡ƒy˜l™‰a˜•^Œ^˜`”Œg•’\š‰[£‘c ”nœg–m”‘m†˜nˆy‡‡|Ž}‚‹x{™rœ„t |rŸwtšrv”f|Šks‰lq„gs|`w‚dn|mrwersljvequd}|czvpukmk`|]d†]`|]azYc„cjbmsfru[u€NqOgIgvQZzP[yIWoK[uMYwKdwBoxEjoKbpMcwVhrOakQ[oMTvK^yJ\Rk}TpsLtzK}qMruPowLfq\k{ZxvXz€T}wTyL‚~O‡}Y|ƒS‚yZz^~|Ty|PvoTulLrrMrmYuZh^k]vlb~nY„iPzqTŠtYˆla|kXj_„njzvcwxd~s\‡qWˆzZ‰~Nˆ{O†|M|tQ…oTiL†`G‘aKŽ_M”iBšdI”pG™eR•]U˜ZX’]X‘\Už[J¥[I¤g:¦f0©b-¢f,ªm5°j5°s7»v-µk4¶j9¬b:§_:¨Y0ªd>£e;­h4¯`2¯d;§Y8ŸYB§bI²bU±lT©mZ¬cO§iR²cS¨__¯j`µtg­po¦x~¢rœn„›z„£~„¡v|—}“}z–us’y{ž€vŸwy£‚r£„zªˆx®‚x¦‡q©ƒb ‚b¡o§uw¤os¦jd¤mf¢tf¦ll¦dc«e^´l`«re¬ri«`eªbb `mšoršnw›hr¤pvœ€}”~y|s€}gdŸr]¨mhšr\›q_š`j‹qo“hz†ip’ntmolo‡hu‚q{ˆu„x‡Ždˆm‡q€gŠ€m„}vŽuw”mšfƒ›l„‡aƒc~ynw…hy~nz{ts‚ou‚ssŠsq~nvvyq|nawnkzjk‘duŽqx€itycqubvxiwvxvwqqwwk{xqy|vxqyjx€o…ƒr‹opŠli‹qo“qšŠgŽ‰j”‹V’‹^š‰Y˜Š_™‰`^–aœ‘f™”k––h‹ŸsŠ§l…o“ˆ|ƒ‡{z™u”}–qsšz| h‘lpb€gx‡a}}hvynp~_wokzjemtgl€c}nnqhp}fk€nd€di‹kb€gd€Xn|gr|gjqbwz`t€Nh~KgxI_oJhpPYuUVzOasSWjN_u?jsMjqIhjJgkRYiQdvN]nHUvLYM]vJ_|ThmSmnJ}lHyxHmvJz~St|Y}~NƒzUsxN}vS{W„sV|tS‚rYwnY}t\yf]~v^ygUn]~ocxndzqf‚cdƒkc…iUxr[vqX{aalbgdm\‚{auvp|u^tja€zQˆrSŠ}S„|LŠxEmU‰jV€_Nƒ^T‹YQ]H•h@”m>qF•_H‹iJWUŽXP_FžTJŸ[B¥oF«e7 a1¦^5¬b-°c,¹d8³j0¬b-°Z7¨X+¤S'§_,ªU.«W9°[2¶Y1§`7°^0®]=œiCªeS¯bG¥eL¢eP¯bQ«nV²nU­l]£qa©diŸe{¤kt¢v}œo€ u€šu{˜y|t|•uƒ•w~—usžpx¥s{žw{›†{¤wiª…l¤„a sp©€p­vv­ez©nl©pi¢j`£de£bl®`e§pm®ah¯hp¥]l«\yždr™^~žcz§fz©ct–yvœ~}yt’v„ma­v`¡k_§oa£hnhndzot’ov—rtvl‘hrˆh‚‡s‚‰oŽˆrŒo„“h†”f‚—g‹‰hŠŽt•j…•j|a}“g–d|fx|j|_~„ixrrytwuuqq€nlztesliskmwmhŒnp‹`}…hƒdqlv€gr|nwx{~pnzrlo~rz€jvsm„rg„‚kˆw~qo‹{i’wr—{o“Ž]—Œ[˜‹c“Š^›‘^’•f”˜g••j ‘sŸšo’“mš¢s”¤zŽ“q“p•›xŒ™tŠ¡z~uœrv›kr–fwže}“`ƒg}…_ŠesŠft}dumtrpr}huyp}piyegxmp„jl|qc€gfvda}[bw]qnctndoYqt`kmVnmUfuIc{FbqP]oPbnI`iK[cH]hTmmTccOafG^mNZzJdtP^vNdUcyNa~IdsKyvP}xT}uP|}PuzOsUQ~SyYvySs|\wr^qo^{o^tmX|f`„d_€k`zie„me{bg€eg|f\_^‡k[„fbƒeicdjn|fkwkk|ujupnpwnwk`vi_}eQ~qR~S€}P‹uLŠjH‚_X„dZ‹iS‘_O‡]G‰fM‘jQeC_DŽeJˆZI[HœaO™^DšjD§iB¤n?¦c/ª_1£U+¯`2²^/®Z/²b(¹T(®Q,·X(¯_&§\*¥T'·V)ºU.·Z)®a1¨d> iE kP§cK°fL§eF§eG®nWµh^ªid®gi¦bi©kp¨nx«wƒ£q‚ sŸv¡sq–ls•hw•q…¢kx£qs¢zw•{v—‚syfŸ|k¢yfž~e¦rk®otªho¨bqžci¤`d¨\c°cn¦hr¢mc®ae¨hs¯`}´Z€¬X~­_}¡i¨`¬cv¥jx“p{”pw˜s€ie h^Ÿim¨io¤ukœm~“v€”yy{r™voŽum˜ar‰p}˜hu–v‚{Ž‘uŠ—oˆ_‡’b’”`•iŽo‘o}Ÿd€”cƒh€‚_uƒerˆ_{…^s|qw~ov|go~cnzgjqslyirzroƒqlŠ]}‹bv‡ao…joyju`x‚esum„jt†oƒ†`wwlvn‹‚ok…†{}yt‡x‘usŒ…n‹‡fƒW•†[ŸŠf¢Šb¡”f”bœŽi˜•r—‘yš‘m›˜z©y‘¥|Ž£p–•}…›}§s}œv{›wr—kžh‡›jŒ’m‚—[Š^€‰gy‚bw‡h€|mzxs}zjvyh{fb†lq~dsz`rzeqzcon\orfoifeuV`kdp~`en]ewakx\\rWcnWbdN]gJeeRhcNfcWicLefNgsWapSYkQUrIdySfqTexUkk]mtTdwKmnKnvLyzIk}MztHs‡T|~Kt‰RqŠQn‚Sx{_l{a|mR€pW}lZƒX`ˆha‚a[ylf…d_`av\avY_ƒcZ‰X`~Za{[h‡_fiarnfyugvlb~wjnnitq_|d\~m_xnU~sZ{QˆjF“tPlV‚kW‹fO—dQ—_V‹fQ˜bJcIŠ]Gœ]N”WT‘^Fž_EŸ`D–f@¨i;¦fA Z:­W5¨W4¨P'´Q*ªX$²Q/¶R*¬V °Q*¸\*¶]­V#¸V(»K2¾^6·d8³_;«]:§\?§`J¶kP·jD¨mZ©vR¥o[§ob¯jh¨boªdl¹ey²op¢k}£jy zu¡nr—tz›v~›zŠ˜s†§s}“ju˜sz wg¤xqœvežvqžqo¨hmžfh§el¥pf©`f¡Ye¨\l¯ho¢gl°ku¬dr©ar²a†°Y¤\‡¢f‚¦f~b„­bˆ¤h r~¡n€Ÿohh¯kbªwm¡rvŸz€£t†—p€”v‚“v„ wz›rv—ju’c}’mt›q~t~•rhŽaŒ‹d_‘a•‰o–”k“s‚‹mŽc{Œe{‰kval…dsyfqwmw}cr}dh{dmxlp‚ni„st}ht€]v†ax†bwƒayhr|bt|a|‚myƒb|ƒb†ŠdŠŒi†…fŒ‹q†rƒo…qzzv~jŽj‚fŽyd”~c§}]«k§…h—…m”Žl—’n¡Œuž—|–šs›£p‘Ÿu˜¢|‹¥r©n‰Ÿo‹¡oz¨nz¤rŠ£hˆ›iŽšj‹–h‹Œ`€Œb~d††g}~o|xwmmzkgƒokop}lgw`esdqpbot\on`ir_bkZilTbv_f€Z_yaho]_vTbeOYdX[dYggSalQkdTjiW]iT[tKdsPYnO^uVep\fyUqk[qj]zl\rqMpfIokMvmPkvQp{Vy€I~ŒUw‰Zo\o\i\qyT}lVwhX„bfƒZc|Y_‚`f„ikzfarf\xXdyQ[[`„Vdƒ_d†dc…_cubovgklnksserxfynjvm\vh_j[|nZ…kQ„jNeG“pP“oJcOŒjWaVšcPš`M—TK—YT›YQšSQ˜QS›]Kš[FœfO¤fM›[D¨bH§[>±N@¬P1´V7­J-¬V-±Q(½R,»R¸Q²Q$¶R!¹Y%¼U1·O1¹Q7¹X;¸^?®_5­i5´dC·kMµbM°gX©p]¯o_°oa·nb´jq¯iy¹hs³n{±cs®jmªrt¦yq£ru¦uˆŸrŠžmŠ›i{—wt–utxt ol•ni›skœgg™go¢nb¡oa i\¥bg¢Wa§[d©ae¨fh¥av±^w¯X‡¶V‡©X§ZŠ [€¨b€«k‹ fŠœhƒ¢v‚¦yƒ˜x„sg¤gl­vlœrq¨{t–pvnz–y~–nœv}p{–`q‘h}™o™wuŸuyœl˜m”˜h•h‘˜d™Ža†o‹šu–ŸsŽ™f{•jx‹qy‰ku‰lw‚itdl~anxdvƒcq~jstnwdikuxeyvjtfxybx†]}†ft‹]ugy‘fpu‚Œp‰“tŒŽq†p„ˆjŒŠo‰ˆpŒ‚d‰lŠ„f…„mf‡c”ˆh£}f¤’b ‹g¦‡q¥—f¥—w•r›ž|—›x§¨w ¢s˜›l™¤sŠ¬o‹§s’§q‰Ÿg‚ªoˆa‡¥`‰˜_‹—^Ž–Z‰‰eŠˆl‡€k{†ksg{w_€ma…xZ„iaom\xi\wjdofaw_qzcfqmio`jsifthajmWwc]rajyTgoOl\Wb_TbsLfaUaeUYaXYePUf\YnQXiWSqUZlPamTpm`qf]ueYrfLiuLltPvkVuwKntMz{Ev‚QzOk†Sj|To]wwO}oU{eV‚X`|aczZ\ck…acxa[wae€c[€\WxNXƒ__^p†dbed[j{hnstnzxl„gb|igig{dZ…cc‚kRŠbVgIƒoM•n]ŽlY†lO`RŠ[Z’\T–aVŸcX™_TVX ]M§]W¤_T—fJžhM™gIŸ\C«XD§N>«X:ªG,«C1¡R)©T,§R&°O(¹K+ºS%±G½O ¬M'­N2µM2ºN5½T@°R=¬b2¬ZB³^<»ZG½fM±aY­mU°]f®ed±ik­ge²pjÀohºesµ]u¶_|¹s~¤dr¡l€švx¡jŠ›gŠmv•j{˜nvœoy¢oo¤gr¦mk©mtž]r­gq¯b`¦b\±Th§]l³\m°Uq±Vg©Vk®Yy©S€¥Z‚¨Q®X‰¢^‰¤YŠ˜k†i‹›sže€›{†¢pŠhg°ll¦rq§vz¥ww§tw˜uq”uziqˆiqkw¡gv¡my¤k|¤v{¡zk‡œd—cfœ”j“•iˆ˜h•¢ro„“o‚n|†lwŒl€‰kƒzfvƒdr}hoouwl}|h‚sgt|ipyaqvZw}fy…l}}r‚|j|}f‚Ž\y^x‘or’{x™u~—n…Šx—†uq–e…‘h‡Œg‰’f””i˜Œc”Œjž‹i €d¤ˆhªŒe®‹c­Žm°›m¦™l›œr›˜uš¢u¡§f“©c‘¤kŽžt‹¤rŽžo‘¨i•§m‡ p†§j jŽšY‰c”ˆcŒd†dˆcˆ„g~}i…~_‚~UƒyWynbuibnj_hkYnmaxrkwosrtlnnqiermkbvi_nehplmlbnm^nePpnXioRgfQaeVaa\UkQXkZZd\Vf^VfTYmRejYew_srWkrU`kObkUmkSsgMzjPtwQ~wQz{MrQvv[ryZysMtnOu]T]]rZ`sbQzgV^a~V]ƒZ\ˆaf‚]^zO\yP\[_~`k‡\e‹Y]‚\Ztghyrdlcy^h‚`\„a]xqa|dW‰aV’jYgN“mP‰h[pOgNVQŽU[Š^MŽbO•^O›d_¢Z_¡`W¥VK¦XKžZHžaH¡^G¬]DªW=¡QFªQ@¡C2¤C.¢R*«Q(®V#µN,²K0°C&¹D ±@)®I6ºG1¹D=®@E´HCªV:ªX9¶O8²OE·RC¹^P¹^J´YO»dW·^k·_g·lb¿inºji¼luÀ^|µaƒ·f~±]u¤d{¦c„¦q† a€˜b}•bx•o{“iz™ls¥kk¨qi¥og«`o¥Tf°WfµOb®Ua¸Sbµ[l¶[xªQv®Rs Qq¨Uv¤Xt©azµ^ˆ®^„žV‚›h‰–j‹˜fŽ£dˆ¤q‰¡yqe«is¦oh°~r²rxªst™wy–w…vqœwpšvp™kv›sƒªi‡ n€¡}ˆn†e‘m˜g’œe^‰Žk’”gŒ¢m„›d“^zf‚Œp€kx}at€`vis~s}ym{prhrl}w_‚€\|z\xj‹l|ylx…hyŠ`zŽ\{™dz‘s†”j’v‡‰{˜‹oˆy…p~›iŽ•i‘]Ž_’˜d’‘_”…eŸƒp­Œd¦ˆb³‰a¥Œ`¦ a­¢q §pžšhŸ­g©k£j¦d‹œx•¢qˆŸi”¢f”©mŠ¨d‰š_‡–d‹SŠP„]Tƒƒf‚}X‡ƒ\|†`†€]€yS{yQwnWvg_bsUeoZjobjmfk{gwofizldhkshpmr_slcrhhvmpi`liTmjL^nO_eQc_TTdSY]Y`]^QlXOh[VgYbaUfpUacJsoVinH[ePneEelOmgH}gDreLrfXwrYwQl}R}z^rs]|vRvh^xkVu[PjaPyWW„T^ƒOaˆU]~T^ŒO`ŠR[‡Vc}ZhŒ\i…[b‰Na‚^hƒZqvZbx^hƒ^W‰j^~gXƒb`„i^€a]ŽkUn]gUŽlYm\_O›bT O\’RU—_[™^RiV™]Y¢iZ¢\K¦SC¥SN¥\P«eHªZH¥\H QP›JB¤FB R/¢L1¦V/´^"ªN%¬U(»J+µA/²K3°L<´L1·K@¾EG¸OC»T?®W<®J8²N>¶QG´UH²IU²R[²S[¿ah¾Zn·lcÁoaÃkfÂ]r·[ÁWyÂf…¶ct¦k‚®o}£fŠ£gz¥h„¨hƒj€¡qrœps¢gk oh®cl¹jn®ao­Zf²Qg³^p³_k¹^p°Wm¨Kv®I{©PwªVo¤_q§[u¬X} \„¥Sy¤f„•l…œb‰—_ƒ›h t‘ds¦mq©kq²ym­~o¥z}¦z…¨w‚ž}s©}t§~y¡ot¢h~›rˆ£n‡¬n£u‹¢j‰’a–‹]””\”Z“’]‘—h›h†Ž\‹]’bˆm‚“g}†bŠdt‚g}…qƒzh€tl‰zl‚uj…xb‚r]~{a†}_‰`‚‰dƒˆg^~—g†h|šo€g’’h—t””t”oˆ™u…¡n‹žfŸ[‹—^‡ˆ[’‰[ ~c ƒa¬‚i±^­—^©›_±œd¯¡i®¤]«ªhª«eŸ¬`¤¥d—žf’™j¤d’§k“¥\™¥\¥\”˜SŽšZ†•V‡‰MŠŠNƒ…S€[„‹N„R~ˆXƒ€Uz‚NwRorOjyRdpM`tM`yMi}XpxSk{^g{nlvponhqweqrmwtmrntn^qvZmkNcfS[_HWcNVdZ^^[[^\RgMTiTWfOXaPViRekUbkGlr¸RC±IG³M<§KD¬@D®=E³FM·HP¹Ja¾Pb½[e¾XjÇfoÑ\rÊ_jÉWrºRz¿Z~¿Z|¶`y®f|«b‚®g‡²dˆ³i}±_‡¤e€¢r€žmvml¥jn²fkµdnµak´Ov¿Tw¼]r¶Up¶^p¯]g­Vm®Qo£G{°H€¬Ux®S€°Q{¡]t ]|]‹›_‰”f€’`ƒœn†™r‹kq°cq²lk²pw¥npªvq­zsŸs{œo}©m¯wn dƒ§r¤rƒªnˆ¤q—kˆ¤l„Ÿ_Ž™aŠX“žT’cŒ“q¥b’œV‚˜`„›\z^}’jƒ“awƒZtjƒ}oˆ†^}uh€uiŒ†d€b|yW€Wx‡Q‚„b‘`ˆ‹az‹g‹‘^ƒš_‡hŒ¡d‡ mŽ•{‹™{ˆ”j…£iŠ§n› bŒ¡j‹‘e—c–ša ‘cœŒa¤”f¸l±’_ª•X·˜^¸¥]®¨`©¥aŸ¢_Ÿ°g¥Y¡­f”¤a–¨XŽ¢W’¨b„¬YŽžY‡ Y˜›]‘—_‰”[‡‡[ƒ‹Q‚„TˆŒR‡ŒRq‹ZsKoŒIjJomLlnUlvShrMgnYbu_j‚T^yYachygjjalm`mflsmkobll]qhVppXjlNgbPO]\VaVRcaLfU[sTWkRcgRVoXYeJanTecDafDlnMjiCmg@l^OgeTofYqeZkiXnbQsl]tkUniTrs[qkVxgXuXUvbR†]`ŒSd}V`uT[‚U`XqXmXq„U^‡\eŒUkUj‡Re‘Z\†\d…Xg~eTdF‡_S}YVˆWP‚R^ˆRb“X_”^_šbS‘\`—Y`¢`[šKcšYW£[R c\‹ZS•_VŸbJ§RG­OH®MI±ZF¤UB¶SJ®[F­GB­JM HB¬DC¸H5§H>¢O;§U1¶K4°O-¶N5¹@5¿H9¾IHÈJ=¼@C¾D=¹K=ÀB>½G<¸HD¯MA¹LG¯PQ®@[ÀPb¼]eºTfÏa`ÆXcÂ^k¹_rÇJpµY}¾S‚¸]v´Z{´g|´]Œ¹e€¼_~´[ˆ°lŒ°j…¢m} f}®Yz³[m±]x¹Xv´Mu­Vn²Ww¼Ws³Ws°Ss®Uy±UvM„ J…¸[‚¯S{¸O‚¥]w¬f}¤^Ž•^‡ Uƒ¡e~–hŽ«i“ju©fh±mtªf{¤lm©km©el¬m|¦s|¢uq«hy¢c‚ªi†¥eŠ«g“®m–¥jŽœh‡£`‡®U‘¨O“ŸW–gœ˜j—¤`Œª[ƒ¤dž]}Ÿ\‡—g‰‘`‚ŒZwb…ƒ_‚„W…y_„~[~ƒX|‡RƒŠ]z€W{…SŠ[~ŠY{”]}”b‰‰b‹Ž`’Y|c„£u„¢wŽ˜xŽ r“ j›¥a›¡fžžo›“p©˜l¦™p¤•b£—`¥”h­Že°˜`µ—T¹¢Y¶©b°¡e ¨d®Ÿb®¢d¢§U›ªO££X ¨Uš¢QŠ©_†¡`ˆ¢Y˜W‘“^‰ŒVŒU…ƒYƒ]ŠV‹•R†‰Kp„LpŽRp‡Qv…JoxQu~WjxSt|LoqSp}\_€Sg‡[_‚]Ypg^ohWpjajn_nmjco`[kdafkTifU^_VV[ZY\\Q\bZfVSmVVqV_jW^nUcgO`eTldJp`FbiSffIksFfoIk_Zn_biaXs]YtZ[ud[|mVkfKk^Qs`Tm\_tYW€\\€^Y…Pb„MfvJZuRa|Th„Hf„Mm‰Zg~YcxX`‚\iYcR\‡Xab]‡eT†_KWN‰^P‰U^ŠNZˆK]”XY˜]_—VZžWi \fŸM[£L`ŸX[¨ZT™dW–^SžWQ RSžLI¨IMªIQ¯IG°US°WP¯GI°FE£=EŸ>H­FAµA0«B2¥H8²U;±Q3ÀW@¿LA¼VC¼QI¼F;ÅA>Å=C»?B¸DF½>IÉJBÃGIÂAK¸GK·?]´F]»I\¼NiÈSlÆKaºMh¼YgÆZiÄQw¸L‚´Q}·VxÀX{®c«]ˆµ[†»W†À]†³c‡°b³ez®`u«W{®QªJv¦Jr®Co¬Gm«XxµX²Z~ºPx·Ry¯SužD¨Kz³T„½O¹J~³^ƒ­`† X‹›W•ŸR†ŸZ†¢]Œ¬b–et¨ev§_}¡\}©cxŸhj´ps¬nx£r{­s{³fy³c„¨\Œ¯g“¥d…¯k’ª`¯_°_“«U›¶O•¡U›­WŸ£k”œbŒœZ‡œc¨fŠ¤[~n†‹XŒŽa…”a…‰]’‹\…†i‹ƒbˆ„^~Z…ŠTŠŒ_}‰[…ŽQŠXˆ•e‹g„Žc˜c‚œaŽ eŽŸm r¢k‘¡jž›`—©ežžkšm› m«¢o¤‘iª•j­”f¡’n§›e±–c´Ÿe¬¢\´²Vª¦Q³§\¨ W©©P¨©R¦®Uª­R¥°OœL¥QžUšWŽŸ\”’SŠ–Uƒ‹W~ˆZŠ‰MZ…ŠN‚ŒSo’Sw’Sn‹ClŠPo€MdxYhtSpuR_~W_ƒf^‰W]‹be^_~mYqi^r_hwekitnhike^nbdbgn`]bcTacbV[XYk`^kcaeV\kSZ]_X`Y_]LggMmeIj_KjqRgoMbeIq_OjgWt\PnaXq^WtUYx[Uw[SocRpVOqPOsOSsZ\tZU}SY|T[†U[yISwP\TeuJlzFm|Gk‚SgyZg{a[\\„Zb‰Uai`…^TŠ]U‚`LŠOTƒU[ŽVb‹[X”S`–Q`¡JeªPb©Z_§I\®IX¢PVœYU¥RU˜QS§ZY£TO¬KF¨SU¨ES¶PI±WH¯QV¬KR²BC±DN¢C@©?;­J5©I7³A7©S8³O7ºJCÁK9¿K@ÃNGÃQD¹IB¸?F¶EBÆHR»;P¸GM½DBÇAB²AN¾AN¯K]¿CYÂE[ÌIkÑDf¼J`ÆOcÃUjÈUw½Wu¹Zm´NqÇSy´Q…²WŠ»[~¼a·\Ž¾\ˆ¿f…µ_}ÂWx¾Uu¹V{§Ss¥Lr¨>i·Iz¯Lv©Lx±T|°L|²Tp§Kt¦Ls°N¬MtºJt¸Q|«M†³[Ž¬aŽ›]”©aŽŸV‹¦^Š²Y–q«oz¨o{§by¤iu¥dp®d{·kw®czµl|¶]z½\³\‰§W¬V”¦XŠ®]Ž¦\–­R”µY™´V ¸Y¡¬`“¨Z•¥b†¥`‡¢Y¡b‡¡\‰˜cg–_i‹ƒb‰\…ˆa‰ƒc‰Y‚ŠTˆˆW‰‰XŽ€U†„O‡TˆŒb„…dˆˆf“i‹™`Žšg‰˜e‰¥r™ o Ÿa§Ÿg¬˜c¤¢c¡¢m¨§n©¢n¯™n«a«ži­šd© f¤ªc©«_¤¤W®«N¬¥KµTµŸS©¤M­¢O§¢W¦¤Q¥¦Q“žX‘aŽ£X™Y‹]†ŒT‡V‚ˆQ|ˆV}ŽP‚’Q[‚“Vy˜In”KkMt‘EpƒGd„Si}Tgz__~\V„_Y†Xb€_`bdkbmhyaeznaijeildaakdfmdf`ckg[eca[djWlg]nWa`We_Q^`YY]V[bYhiXffQddSdgJjhHjhOf]OlbMp[Mr`Ys\Xh\Zm[WpYXgP]fSPbRXkMWhJYkK^uQ_{PbTc‚R]{DZ|F^wKU{K]ƒTXMbƒZhƒW]ƒb_Š\ZeR‹eR…hLˆ`R‰[LNO‰TL‹QZŒS^W[—OW¤L_¨F_¯NV«Cd­Ia¦EcžK_¢VV£OR¥NU¯QJ¸SH¯KM®J[¸NW±UO³LN¶HMµLIµIF®EC¹D;´L8´L9±I5­JD­FBµH@¸SAÄK>ÃPIÇTN¾FM½?U½CSÉFQÃ=Gºh‰Hh}Lf…N^ƒRf^\Š\S‚d_~c[zc^†i]†\\zc\id`fbjYhc`_ejeg\Zc^`ZVbdW^jWTjcTka`bUfcM^aQa^[icRa\PciZ\gVe^BefBmbHs\UnYRmfVv`_u^Sj^VuZ^l_Vga^jVTjU\AUvI[mAcoKV‡Zf|LaˆS\zGb|KY‡Ni‰HiˆUkMa‡L[ŽUT†^P‹iZ‡cPˆZZ…`]}[Z[LWPŒ\SˆK\ŠWQˆ]]VbžP\¢GUªUUžQV¬DZŸOg˜Lb–LQ¡RI©TH§KQ²LH®JF©@U«JI­ET²ILºGJ°GF¬?L±C<«K?­B8¥Q;±E0´K>³K8·D;¿T?ÅENÁCQÈRRºLL¼MGÆHUÇ@KÂDBÊDB¸AE·F>¼DNÁ:F½FT¾IW¼<^ÅHbÅGX¾T\ÀQg¶MfºIj³Mo¸Rs¸Nt¹Yv¼\r·S€¨\y³Z®[€²Sƒ¼Y‡Æ]¾Lt¶X|¶Wp¸So¼Lj²Cs±=zÁLt°Ds¹Rz¸S·GuµVªS}¬NzªSu¯T³N…²L‚©S„£Y˜[ˆ§dˆª^’§g•¢i•oz«s~£oƒ§b|¦cŸou¢t¤kŸeƒ¡iy¨h¨a~§]„¯R‰°Lˆ§G­L§Y˜¦V›¯]Ž¦gœ©eŸ«oœ¥kž¯jš¨`•Ÿj”ši‚šg|¡YœS‚™^““]…“]‚•^…‘_‰g‰Že‰ƒ`‰S„•_‚—Z‚‡O‹N†˜P‚ŒSƒ‹_„ˆZ€‹[`šœe¡Ÿe˜`Ÿ›fžl¨œe¯Z®•_°œZ§žd¬§g¥ž`¨žh¬˜n¥Ÿh¨˜h©œ_¥§]²¢\«£_±¡T¢”U¢•QªQ¦•Z¢–Vž—N™ŸQ–—W—”U›–Y—“WžTˆa‰ŽX‹‹]Š[ƒ‘Uw‘[p†Ou‡Fs„Dy€>n~HiŠJ`ˆV^†QcŠMl†UiŒb[‚`f€`exb`}]Z}dZph_gbX_k]XedVX`daagYY^[NZeTQ[YL]mXYlWX_Tca\edS`cOkW[d^Vi`WgWQ]^J][BlZHlWLz_X~bbz]_qbZp[ThUTk`Pw]TvW_wVUFPsE^uB[xP^‚R\†SWˆJ^~SZ€Lc‚Ga‹KfVo‡QfZcŠRX„WUŠdTŠYVy]\xbTcTƒjR‚`TŠXRQOJ[ŠRXŒJ[ŸJX¡LZ•Xa˜ScžJcšGY˜L\O]•LO›OK¡CF¡DH§>J7L¢@J«HX¹MU²JGµ:@³C;§>D£F:ªH@ŸB8¢E8±D2±F7·O:¾FIÆLFÁBM½NR¼LI¹BIÂFLÈGOÄHDÂMM¾JI·PÈCXÃ=T¼JV¹GZ»J`±Q_ºGf±Jk¨En­Pv¶Pl´SoªTm­Y{®Ut­T}¬Ry²S}ÀV¿Y{ºMq³Qu¹Kq½LvµQn³In²G¸Bƒ¼F~ºM¬Nx­By´Qp­OsªHo¶Rv©Pu¥O¨MƒªZƒžX„›Y‰œT¤WŸT–©b•u‰±m‰¤k…¬`{«b¬msžb†£d„šp„¤f{¦]‚¦f{²V‚²V~±KŠ¬A‹ªN©^•¥Y¥Yš°e«c¨¬j›¢nŸ«k›­]‘ b•¥fŠb“_‡“g…šaˆŽe„ˆm‡•k~—\„…]‹’^Ž’\‚™Rƒ”R‹ŽQ|LŽMˆ˜L•O€’Sˆ]Š‰^—’i£Ÿi˜Ÿa¢šc¨¥]°¢d¬—b§—`´¥`±¦^¥¡Z ®hªd§—k¦št©“mž‘hª¡b±—`ª¡bµ¥X¤š^ž”c£—Qª–MŽK£‘M¤™W••X›™Z“Ÿ\’–V——X™™ZŠžiŠ‘Z‡…L„ŠH{‹L{’P„Sy€L€Gn|VvyWmzQb‚TZ~Nb‚JlˆNa`e|ahvS`yX\r\]v[Unlb_c\ejYV`Y]QZR_WSTPZRYS]NSeYXcdQZeQg`VagYflUlb[bUSc\_h_SiaG`WRiUTnULqXXpa[XTy\X~Q\t\W{^[va^nP[qT[~EW€NU‚?XI`zK`}G^|U^ŠTh„JYTkƒWaŽSj„HoŽFnŠKcMP]Z€cW[XaZX[€\Z~XS‚^a}P[„XYŒYR†P[™\UY[”MX“TcŸHd”Qj Q\’RP”MT‘TP•NIšML¨HJŸFGŸIH¡IN£=VµMR´=Hµ4R¨>G³7I¦:L¨>P ME¨DJ¨PF°R@»IL´KM´DQÂ@Q½AJ¶NUÄEBËFG¼HAÃPDÆKOÂLQ¸=QÇ@Jº:TÅJQÂHMÀT¼EYÁFV¿JYºR[³Hk®Dk¹Nj¶[t¬Ww­Ty¥Qz§_‚¯^~¨R…­T‚²N|·Kƒ½HzµL{¬H€²P†­[‹¶[„¸^~ÂR}ÄT}¼DÆF„¾DŒ¾Eˆ®;Š­<†°G{²At¯Lx´N„¬P€²Q|¯I¤X}¨WŸ^†¤g†¡dš¤ižcŠ±p«`ˆ«p|¬n¬nˆ¨b†žhŒž_’ž[„¦cŠ¬X†«R|¢[Š­Yƒ©M¥[‰ Q—”S”œQŽ«e› l•¬iŸ¥e›Ÿdš­g–¥dŠe„¢pyowšgƒV‚ay›f~–b‹a—h€Ž[†ž`’•[„ Y‚œXƒŽK€—]ŒŒR‡–Wz†Yƒ‡e„Ž`›XŸZ™‘U–žX¥§S©Ÿe¬ t¨ªb¬¢h¦[¥«b¤_¢©\§™h“h‘lŸ—i°V©”W´œTŸ]›šažš^¨™_ž›K›”Pš‰J””[ O››_œ k•g—b— b€¡`€‘T‡—T†’D{J~ŽPx|FƒNv„WqUm}`hxUf{`_Z\~Q`T]ƒV`|Ri{UfiR[fUedXUbQUbSTed[]b[^aLQQTQTJUOGK`OGd^Sc]S]ZU`iO]iTbfZ`gXhjLhWLrSEh^LcVVjTXaZTg_YrZXn`UxWTy[MrUSw\Xq]X|P_xEW{GS}TM€JL€HJ„GUS`„M`ŠTd’WkJ_ŒV`ŽChŒU^•U[’RSPPŒZVVY†cJyXH~YT}XO~]Z~P[€U]‰U^†__“dI•f]Šj_•_ZœRVšN\¢YY¡PR™MI›MM˜HS LT˜9M IE—BN§AN¨E±GS¹KP¼ES»QYºATÀAP¾HF¼PT½H[¶URºSWÃHbÂH\¹Pn°Hs­Hp¯Hj«JoªNu§Jw±S}°X† Mˆ¨S§Kˆ¯M‡¬O€¨C…®M}»M‡¯V‚¹Y¶L{Á[ÆI~¿EŽµH‡¿F•°Gˆ°?ŠºA†³K|¬Pˆ±Sx¨Zµ`ƒ¯Q‰¬R±W‹·f‰µh‹¬h’±`šœo£eš¢h˜£a‰­eˆ¬hŠªm–£r”§g•¦[¡WŽ¦\¨Z|¬]z¨O…«[ŒžV†œ[ŒŸT—”R¡Y•¢]• q l¥dŸ¨rš¤t‰¤q} izžd€žjx›h€¡\ƒ¡d~”\}‘Sy–Z„›d’g‹“`•Y ^šS~˜S€•U’S’[‡‹X}c‚‘]„‘X‘›Z™šQ’˜V–œ]¢¥k§n£¬qœ b¢˜_•]¥¢a¡§Xª¡^¤–` •d¤e¯›V®•V¯ŽV®\£–Z¥S¢˜JœO™’T T Ž\ XŸš]Ÿ˜l–eš™[’•m‹—m{š_€˜Z€”PzC|ˆ>{…Hy{Vo€Zqz[l~_cz^T|aV‰PV{P_zT\vT_zSbqSfg`[o]alY`nNb_Q]cYYWaPWaJ\SGUUHMcOIbOO_SU`XVb_YZZPYfVWdKihToeMv]St[Hh^HfXPb`Yg\[vW_tcUn^QndQpdSsdMvlYoc[tbO„OO‚HS‚NO†VL‹YR”\R‹MRˆV[ŒNc„IhŒM^DY‰HY—VP–RV‘WSW\„VX…aS}VQ†[K„bI…_S}]N‚US†]`‹^cX`‹[Q’eRe`W[–VZ¢QWŸU[¥LT›FKšAHHI›GO£9OšFCœFB DHªAQ©9T¤6G£7O¢8M¤GI¤HP™KKžJF–RJ›LK›KU¬PS´CM¼?Q¾F]¹C^¶@T»MW·BP²>T¯CN­IN­MN´LU´DV¾DN»KFÄKJÄHQ½SZºU_¹Md·Ki¼Na½Aj­Ds¬?k´IhµKn¦R¬PŽ¨KŸK†G¨N¤Gˆ B~§Iƒ²K{·J}¶C‡¹I‚ÅY‚ÇZ{ÃPzÇR€¿V·J“¸E½Cƒ¹Pˆ¶MŠ¸R‚³Q‚¯Y±d…¯b•¶W”Á]”»e‹ºjŽ¶f§^¤d™^“mœl–­i®d•«qž¨l› c”¤k’­b›¬Q†°]ŠªMˆ°LˆªQƒ£Z‡£YŠ\—‘U›ž_‰•a‡Ÿp„dŽ¢d£˜ge¡c„§jm‚›oy©b¢kx§e{˜b€“Z†Y„ŸX†•ca{¢`†šU†¢Lvš^‡’X“X•‹T“~bˆa…•Y‰ZŽ”NŽšX‹_ž¢Z™¡[š jŸ¤a¦¦g¥”i¦ž]£¡S ža°šZ¨’d¨‘]¡•b°a©’U¯‡^«“d¦ŽS¡•X©ŽX¢•S¤’ZœƒV¥ŒVž‹\™™_–‹m•j‰‘h•–n†”nv\}™dr˜NuˆGn‡Th‹WtXe\oˆVn~Y[~]Uƒi[„TYJb}X[€S_pNghKfcV_kb]aRhaVeXT[bRLZ]OPZE\Z@KWJNfPO`KMcQPbOVgPSiSV]]K[eQ]fMt`Fs_Vs[WjZUcaQmUSn^XwhPg^Pk^SsgOlbRwaOp_KsaZycSwdN„]R…QJ„_F‘[RŠMQ‡GN‘NY–GX’T[“R\’L[…UOWW™VX™^N–bQ‰^PkOƒfZ…WQ|YKzeZ†eU|bT‰b_…^]Š]`—ZK”]V–^T˜VV‰P[“PU¥V^£NK£IJ•ND˜BM¡GJ¡4G¨@@¡HE£AL¤8WŸ@Q›>R£¡E‚­E‰³S‡±T~½U‰½M†ÃU‹ÉO‚ÅX{ÅNƒÆOŠ°K½Q‚¼P€¸S…¶P‘ÁTŒ±d•·`‘²b‹ºfµg’Ã^—¼hµjšµh’±cœ±Z”]Ÿ™h¢n «pš©r—°h¡¯f—²p™§i”¡b˜¤Y”§S‹«[Š©W‘ K›¤N”˜P—V˜_‰–k‰p‚˜e†—r””q—™k•œb¡\Œ¨g|¦c„ c‚«^­iy gu£h~šc’a•]‰œV•_—Y‚£\|›U}•a†•\Œ‹R‰QŽ[ˆY‹‹^’ƒZ•Š[œŠY‘‘Y›S”™YŸ¨_«¦a¯©g©ž]©—]§–_°•]¬”U®V¤[´T²‹^¨„`¯Žf«Že«•a¨‘XªŽQ ’[ž‰^›~[£„a‰a¤‘aœ‰f“d‘‰e‰“_ŠŽg|ˆkz‡drŠ^w‚Ql…Zn‹baa^_iŽ`fcY’lT„gZ‡fT‡UY|MWrTTvNXySblZllVg\^b[]W[ZZ_VKX_NV[KTYQR^GOjFNeSQnOKeOMaNSiORhYH_[LkUSgZLqdRs\Vi^QjZVnSWrXXsgSkfNmgYucYogNniRjmStaRseUvjY~gV_QŠ`IUHIUJP’EQ–PT”X]“OZ‹Z]VR’VR•[T˜\TlQ‘nRjZ„]V]Q|_Qe[Š`b…jYŽa`…hb‘lV’aT]T“_VWMYOšTU™JS£IV¢DL¦FMžCH¥CDšT©6\«;g´>]¶9d²A^µGdº>c´CY¬CYµATµCP³?MºBKºHR¾MK½NQ»KS¯MR©SM©RX±KVµGb¬>a¬El£=g©Fl£Mm P}¥D}œI‰œF“G‚‘Ež@¬>Š«LŠ¯R€±L€½M¿S¿Y¾NŠ¿RÄN‰¶L·Jˆ¼VÁ[†»VÂ]‰ÂbŽºf˜±_•·f“³d¿j¼j™¾m˜µkœ¯d±b’¯a•b¡cš©mšªuš¯lš°n££wœ¦pªvŒ§`—Ÿe‘¨_Š¢[ˆ©P‘¤W˜˜C——[•”`£—Zoˆ’_Žk—™nžžq¤g•›b”§ežot›oƒ©r¢a{¨ds•lƒŸ`{a–b‚¦d‰¡Y¡_‚©Z‚¤Xˆ¦UwžX–W‚š^„ŽXŒ~_‰W‚“Vƒ’N˜—Y‘–P˜œ]™T’¥V¢œT¥¢d³œf²˜X¬“U¶žP§’T­‡X®T«N¢‘I¶V¯‚]´Žh©•]§R©–Y©‹U©ZŸ…b ‘d¨‚_§Z‘Œf’ˆ^ŒZ–f‚‹Y}_ƒ†ixdsUv†QqwT_„fWY^c^ƒeg``‡bPj`„aWˆYMu`]wV[mXapZ]i_\gZgUYbTTNSPU][IYQHOYTDaGOWGGZNJlQPbPVcSIdUJ_NSfNSbXOn_KkUQrdUsh[u]UgYVvRNnXV|[OpVS|aVx\_tXUq[Vm^WnaXvj[}jS‰[RƒfD†TT–HE“LI„MT•QO‰SL…ZR†ZR_UŽ`K’dKWL˜cY™cQŽganT’l]Œg\‹^S‰[]Š]d~h\{adŒqb[V„]O]T‹^]_]–^XXS•OUJQ“BLœKEšAF–=@’7N”6D—>D¢2W©?K¦DJ¨W1LŸ5P;UœCZŸEe˜Hb’=b¦IZª7T§9[¥K^´I\µ8i±D^­Ec³Bgº>^¹9S®EU¹GZ¯JP±CL·CS¾EYÃ>[¨BT«N]©E`©Nc²S^­HX©Q˜KJŸHO¨;U£3W™Z¤?b I\¤Cc¯EgµEm´Ge²F]¯9Y­Cb®@Zº=R¶KX¯>T¯@V¼?\·ŽªE“²S“¯Q‚«KŒ°K­JŒ­M‚­Oƒ»Q‚ÂLŽ¼W‘°VŽµY~³XŒ»]ˆ¸]”²U˜±[¢¹bœ³n˜³h¶p—¯p‘­f¤µe¥¶h ¦i¢«^ ®\X¨žU c¦©e˜µa“«l“¥m—v’ j’¥l•c•ž_•¨\•¬`‘ªO’¢Pž^¤¤\©™c¦™b™›_¢–f¢›p¡™kœ¢rŒ™oŽ¦k‚£i€ o|–vsžg|šebt›aƒ“g‡¥n„ j†žkŽžg‚¢^ˆ«_…žY}¢X†”aˆ‘_œcŒˆi€–f†\ˆSˆ•R‰¡TœQ•›H›«Q­¬XµŸT¯–W±Rª”T±“N¯‰L¯—P´…A²‚H¥ŠJ¯’U¬“Y«“S¯‹`­•a¯•Q¦ŠWªŒ`¢„b©[¥c•Œeˆ[Œ‚f—’[•„[”‚_“R}“]vˆVo‰Qf†X`„Zf†\Y‰hS€iU†[T\^„_P‡iS‡eS{l_uXVlaSk[de\VkbYVSQQTRMZXHPOP^PSULTK[@VZN^OJaO?jHJgPL`WObWHoKJlZDuMJj]Ujb`vaXo`NoXUkWSr\[v\Rn`_€QZsUSMV~YUy[ZwRZ|_P‚YR†NK‡`C„^A‚ZIHUŒFTŒQKŠKO†OAˆ_I|YL^N‡mR‘_JšbEŸbU–cQ”pW‘fXˆaP‘m[ˆ[ZS^‹^Y{gaƒg[’jXŠcQ~aRTa•V]SRYM”MJ‹VFSM‹J?KIJE“JG‘HMW˜7[›:S 6V•9YŸG`=ZC]C_IV”EU˜HbœLX¤Jb¥Ae¦>aªD^«<`µXŽ@O’EVš>[™CW“Cc˜C]Œ>_šAe˜FY‘MX˜Qa’J`œI\©Kg¦y­Fy¦B|¨H}§J~šL˜B‹•<‚›?ˆ J•­P‘²L·SŒ¹^’®Y“ªX‹®K„¶Mƒ¶P‰°R¨]Š«WŠ¥[…§g‡ªa“¯f•´Yª]¢«`¥¦fœ£bœžZ™c©fª¥e¥¢c ¯d¤­`™¬P”X¤¢Vž«V™ž[š­a˜¬kš¦b£«p§±s ­p— m‘¥]™¯dŸe¡©cž¢^ žXž£W›•P¡R¡«V©¦]£š\¢šlŸ–q™m’žfƒ¢h}œuyœjt“g~“i†•cƒ–hx¨n†©l~ªq„›rz£l‰œg”eƒ›e‹§gˆ¥h’ hŒ˜\€ŽW€–i£d‡šN”™[’˜Rš“U˜V¡žP­—HµœL±›RµL¼ˆX°šX¯O¸ŠK®…C·…E´ˆJ ˜W£S¥^­‹N¨‘S¤†R¦†]ª_©€d£W¡~h–€^‹‚h”…Z—d’Z€\’[‚…X{…bzŽ]o‡\bƒTdˆ_f…`Z‚pUzhN‡eO}cR]V]^zgWybci]]qd]f\fRaZT\]U]UTjTP`WL\QMbSMZQO_QGQM=_PAhQI_RDhNU`YNmNSbPLlMNq[ZlOMvTOl]Tg\QrfWf`TbeOiQR|YH~MGŠUK}MUyKNƒVN{SG‚NN‡YMX@RK|ZR‰XIPN“FO‰U@PE“^B‚d?lG€kF‡cA“tPvP˜fM–gW‹iQ‹eUZO”]]ŽWX‡aXUX†eW™ZIŠVWŠTY’UR˜W_†XLQSZB†T>…]K„^HŠW>UCŠYCOF‰KE>QŠEGJPŒHYšCW˜>OžF_”F_žFWž·H²ˆE®“NºV¹ŒO±…W²‡N­ˆP¦‰C¤N§‘S«“I£ŽO«‹T­S²‹S·„a®c |Z }Xœ€^a”‰c”„]ƒ”Xƒ–\v–\t†ZkŽah’esˆWm}[j~]_‚kQwtQqmKoeQ|eVz]W€c[zcWmb`c_febcZnd\ic^^`X^`UjTTdVCeMBgP?hRBgIDVOCaNFeRL_JJcOT\QV`PW]Y[iTUkVNnLLrNYlSVxZQvcZvdZgYRlWKzXKˆ\C‰RGDG…GJwHFzVLŠSI‰_E„\@‰X@~OI‚PM†LH•HBG=”RA‘a?‘f?‰]@†a>gD”oF–jM“iSŒbaŠe`‘^T‡WR“`Yd]•[`Œ`V‹dU—WFŠSE†WRQQ‘WU]V\QˆSANB‚Y9‘X>—WKYJTJPAˆ?Gˆ>I‰?M—EU‹GUGYGVŸLd–Q^–L`–E_—GfŒG_…8i•6o“=lk™Fo =o¨8n¥Ch¬>^¯;e±FZ¢I]©8]¢4c§?dŸ;hª?t©Hq°DtªAr§>i¦3m¤>nŸCo§CsFl›;w¡8v“9z•@‡”>ŽŸ@Ž©L”±SŽ¨L“¥UŽ¡S‡¡P‹©M‘¤H•¨O‘¤X‚¤T£PŽ›R…X‹ŸYš­[—ª_’§jŽ `Œžb•§f•ªo¢«b™a——d¤ŸX®¤T¬¤V ¯^˜´W™d™¨d¤©i˜¢h”šg« n«°q¡®r «n £q¡ªh¡°d¥ªh£ [¡¥U¥¤a«ŸO™I¤ U¦šP©¥X¢£bšœe—™[Œ‘kˆšn’¢fƒ’nx’i{špx–js›mr£r…¦t{•o£wy›hƒ›e„¦c„žb£dª]|¨`|¤b…ž`‘d†Œ_ˆ‘a’¦U”—Zœ‘S˜˜E–‹R›‡A£˜D£–M¦Ž=¬Œ<½„I´ƒH·@º‚B¸‡K¸I­~K´ƒB­Œ@¥ŠS±ŽC¦…I·†F°’Q±ŒQ®†]·ŒY¨‡Wž‡g‘‰X˜Š\”b”d’_‡‘`‚…g|ˆdl”Ul–_rƒWf|[l_hxd\tsUufTslZ~oX\_th[ke[ggUnjkflbbhjYpZQbfTfdYdTWpRVoZNh[ClNH^PI_MF^LQhKPiRQcSPgLQdVZmU[h\XlVGvVKjWUjHZwPXveSj[YnQJqTDoXCzQKŽKK~LK‰PKƒKS}\I…QH‡g@SB‡\:~^M†MKTFRGŠV?P9˜P@[FŽfHŽi=‡a@‰hK™oJ’i\˜`^Ža\…c[‡SM‡dY†hZ‡^Z’WXSKžRG“QGŒXH‘OKŒ]R‰RP€TAˆZFˆO;‡S?T@‰[AŽTO‰VO’KH‡FEŽFMPU‘IUTU‰P\”GXšK`—EeR_DqŸAl“Dn‘=s”@iŒIg‡KyAp—Ai£Ic˜Dv›Ju¨LtœEc >^©5h¢=`Kb«Ah @rŸCk˜:gžKy¥=l©7x£?r2m¦/m›1s™CeœEu=v§9t›9s¦:|•9Œž7«=‹§A±O‘£P”­VŽŸU’œU’¢M‡¦JžW†¡T¡R‚¦WŽŸ`Œ \‘°[²kŽ¬d•¬l†¥j›¤h§ež¤iŸªršœp‘¡g¢¥T¬¥[­¡a¢©[¨´N©m’¥`™ªj˜®cŸ£g¯¢b­¨c®©m¨°pœ°pœ¬s˜©d£­]«¡^®¡W±š[ª U°—S±šQ­S¨£N¥¥X¢ W—¥c‘˜c–œfŠ›^‰že|˜]vžau’pœrx›wvt€t{¨qx¡rzk†g~¢_‡¤d‡™a„›eŠ d˜g{Ÿi€•h‚˜_‘œ`˜žU’ŽYŒ„P“ˆH›ˆBF¬‹H¬…B¶‹<¼…7´€B¹†D²€D¼€L»}Gµ„?¨D©ŠF«J«~P¨‰D±ŽQ·…Q¯ŒY¬‰V²‡^ª€d¦†aŸ‚_“…aeŽ^Ž‡g€…_€auat‘Xj–dgˆ`hˆngnhxw_xn^rgSkoRur]vkXqiXpvSml__rcUq_`ga[ifYoZRu]WkbWlgIs[KkNFiRKaLIdKFiUEaNNfGNiNQrPQlSKuZKrVQjaGpZNjVWqNZwZVxUMvOJuYP{ORrNFxE@LFŠDD…GC‹JF†STŒaK]D„`=ˆWC‰RKXE…OJ‡WA”W>“O@”V=ZF„Z=‰j@‚pG‹iDŒbR“gT˜[V[Z’^]‰UVŽ^_c]XP—XOOV”WN•SPˆ^A‹U>„TD…TJŽO@ŠM=…QEW8‘X<^ISH‹JQŽNK”HM–PD‘[LUW•R[‘OY’Dc–E\Ÿ@h™Gg’8m•:t›5p?n‰@kˆEs’;j’cJc¦Dg£LhžBoAz›Ew©Ao§AxŸ@¤2~§7|1qŸ,p”4h“1g™:o˜Ao¢m˜7hœ2mBx C‚¨@‚³It±H{¢O{ªJ~°GžG’§AŸPŽ•V…I€ªY¦U‡ªUŒœd‡œZ«eˆ³h­`—§c­d¦h“k§l”ªdš®h“§a ªY®§Z¯©eª³Z¨¨P¬o¨ªož©mœ¤t¦›q«¬g©¯m¥¨y§°k­­d£¯b–ªp˜¯q™´n¡°iª§c·ªa¸¥\´¦]®«cž°k±d‘¤a… o…™a…•Y…^•edzŸf~•fz^{›mw™j|¡c‡¤jƒ¬k†¯Z†¬eŠµe’¯d¨j‡¤a~šd•^ƒ—]ˆd£j˜dœ“dž—]•ˆY‘‰N”†L¢ŒR¬‰Gª†T¦‹R°T±„G¶xM¶C·ŠM¿|M¸|L¯„G¨ŒC¨B¤†;~Cš€@—†I£…R£Už†S“„_—Žl—g‘ŒX„ˆZˆ“X’cƒf}‘Zq‹Tk•Za’bkŽ[l[b†lX~qf„qb~o^{^WvcUknZeg`jkVlsPdsRcnMYePNcYPgYNtUJsUOqWSr^QkOChI?_ICVQBgONpERtCDuIEyFKlONmLKyZXmYKhPMoIPoNYxWZyUU|QTpSYl]Zw[IzNGƒPBŒS@P?”QQ‡VYŒSP‚K>ƒS>…`7€]F‡bEŠj>„c=‘W>“[@QB‚QF…VT‹gR„cOcD‚gRˆ[OŠaU‰eL„mV€hV‰`NŽcT’l`ŠhZ’eUŽaP†]QŠ^TƒaP{XBx];€`EƒV:€S;{IG€MR€FVŠMJSHƒHH€DTˆIRLQ€F[SS„PZ‰Ng˜EbšF_˜IdžLa™BbšNe—Mr“FqGs“OožHižDn‘>~…kGZA‰Z?Ž]@Šb;^?{OO{RSƒfX€aS]FƒYI‚iJ…ZEzfHŠfRˆnL…fRfKŒgYŽp_ŽgXŠe]ˆb]Œ\U|^JZIeCfN‡aL„\FO=~LK„SH{PKVKZP…RS…AI‚IQ‚HQƒO[PT€UV‡Sf•P^•Rl›FdŒG^šPkSo—Mz‘Km™Rg•Hr”ApŽ:„’E„¡E}™Lx˜Ks˜Np¢LmJo•Io‰Ru…LpœNo›Kz—Epœ0u3|•<}§:„(‚¨'†¦'š0x=t‘:{šE¡4w¥5{¡5|©;ƒ¤{AA{@G>Nƒ@QsIXkKToSQoLPuPYmPOxVPnGIxM>w]B„\K„_G|RA}TCƒMJŒGF}QG„R9|\A‚^=ƒd@Šd=Š\G’kK…hC†`G‰YIXOzcQv`SxZUx]E…ZR„gK†kD}`SwkMydK„nW‹zT‡|M{XvN‹u`‚c`‚d]…sK„kP{kO„cVeQ‘`F|RL}VAp\K`K}]Mˆ[_|YS…SW‚NM~[R…NY‰T[‹Ne‰Wj‘ah’T`ˆ`^„Xh’Xh”ZtNkŽTlŽUzš?|›HwžIxš9Š‹D{›@z¢Hp‘En›Ut–Sl‹[u“YuR’I€‘Ep–Cw˜B}Ž5v“B˜?¤>€9…¥/€›7„8{›8‚“=‰–C‹¤6Œ¡7‡ž;‰œ8ƒ§9ƒ :~§=›BŽ§A—ªG‰¬LƒŸR‰¡Yƒ¢\‘«X¥a„¤`\†—bŠšX”¤X‘­Q™§]“«`¤\‡ªV•°]›«X•£_œ§^¤Ÿ\¸[§¦d¨n ¬d§©qª¤o§¥u ¬jª«r™žu˜¡w”¥mš°t¥«q¥¯j¬©j¥¤k·®a»·a«²f¬µb«°X›®eŸ²g–±e¨l‘›^Ž¦Zˆ¤`¨[…§]}¥S…›d†œdˆ™]ˆ™W‰œ]‹«ZŽ®Tˆ¨T“±]–¥[‘¤j‹¢h–£iž¥e˜¡W¡šTœ£V§Ÿ^¥ž[§¥UššU•‹R–O“M …Oœ„[§ŽX›€VžƒKœ‚Q¦P«zT¨{^¥‚Y­‰L¨I°@µD¨F©R›~Sš€DŒxP^™{\’ˆU]ˆŒh‚’kvŒg{do–hpŒh|ˆpzŽmk‹ni‰_a…[Ye_}b\ta`j]anb\xcgt\fm\k]S`e[U\[T\\SSbQWcUScLMlO9gG;nJ>gB:eDEhGFhK;qG;oI6yH2tA6zL2oG;yE;w=K9Tƒ=P„HWwKSvQWvORnQ]sQVvKKzJBN8}V<ƒWF…RF|QD{OD}NB†JH‹JH‚T;Š\F‡[D_<‰Y?„dKŠiKiKiD~^OŒ\R†WS\Q}aQyeN|kW|cO|bM€hO}dDƒdEuQ‰}^‚s\zwOtkL|kVyeRlV‡qW}xK}uO‰`V‹ZLˆ`P€]OrZKn_JpVNr^N|XWzXOzOQ~LX{QO{U]ˆJZ“X]Œ[e“`j\`‰de€^a~caYe’Ym–Xq•OuŸAv™HsœAš>{=‡’H‡œHw£IlšOo–[u‹Un’Zy–W}‘Mp™Lj–Dl•Iu?o’•£Aˆ£K‚¦Wˆ«TŽ©YŽ¢Z‘ŸTŒ¦T–œ_’Ÿ^–žV›¤S¢¯`œ´^˜­d‹§fŠªc”¨f•ž^”¤X§ªT¬žaµ›\¬gŸ­j­¤g¥¨k±°b©£c««o¡¥o—¬j¡£r ¬i«¤t¯¢m¥°e®¬a²¸]º®f¶¶g¯·c¦«ZŸ«^›¨n›«n”©n•£b‘¨N’±XŽ§S|¯]‰¤Nˆ¥^‚ž]…”a™U£Q«^š©S˜¬S‘¨`Ž²`­`›¢p” _™œb¤žZ§ U§ªXžŸ_¯–`§œW¢•\”ŠV¢‚_œ‚U¨’^œ‹bš‘\—Š_š~M¦†K¢zS°‡W¬~Q³†a¦‰]©W²O£’PžŒG Ž\›~TšzN”tPU‰‚Xƒ‚QŽ‹]“hˆ‘iŽ[{Š^zŠ_j•gk†qvŠuilh„ob\_Šgg}c]ud^o[nrcpqVoxWerangVfWOQaUIXZSMWMHUIV]MAiFEoDa?=^I9lJ=lD1i?1m>1n=4l?8~B?v;M„:K|@PzDMyNMzRN|FEzHHwMZvTM€DJ{RJZ:†LC‚JMzH?ˆRE‡R;ƒJ?„U7ŠTF‡Y?ˆZC‚]Ag?ŠjFƒaH‡lG~gBŒiCdI€fI„`NzjNƒbV~dHkQz^V~mNxpJwhOzqO‚YtqMzqRlHxmJrfU€gXznK…~N~sQpV}iV‰jW{]Gz]GzYRtPFpVGxYTzMXnNV€[TsRYzX`K]†QZŽOaˆNe‘Rd‹]b~VeŠ\bƒ]oˆVo“Rz›Um£PvŸE|’RtšC|œ>„9|™KzJkFl—Ir™Zl•Pxš^vžXw›NiœGw‘Hv•Bs˜@}¤B|¨;‹¡A„˜9‚?zŸA‡§0‰Ÿ7”ž-ˆ“0˜>ˆ˜:† 8’œ<žBŽšE†ž@‡¨6€£7‡ D‹¢C‡©M…žL‹§X‘˜[•UŸ]”¢S‘ W•¢[•¤WŸ§`–³cŸ§_™­_ª^—¯Xœ¨\˜§T–®VªŸ\¡žc¨h°±j®«n³³e«ª`´¨i®£p«¬w¤¦x«¤j¡¬už¯qª£qª§d­´e·²c³³[¥¬Y¦°a¦­\™©X˜§e«\®a®X†¸O‹´Yƒ­R„¦Uƒ®T¦Uˆ X‚UŽ˜Q JŸT–©S“ U™¦Z”¢_›©^¡g˜›b¢›`§˜c«–[¡¥]¨ \­žg¨¤b¢œd¥—XŸŽZ¥‘b£Žjœ†a‚Xž|W˜Xœ€S¢ƒJ­€M¬†X¬Œ[¯[¶•T­ŠR©’Q¤ŽSŸ“W—‹M—zJ‹zUƒ~RƒV„„W…Z„ˆ\‡]v„`veq“du‘cj‰opkp}qn}womg~pi}cazd^}VixYb€VlxNovTgfRdbOQVYLLVLPTOVXMKiCKiJDpP9iM;iI5dF<^=>d@/l?5nE7gMAkK;nB;rB8|=;=D|BH„9OˆEQƒDKOE†HIwJTtNOuIKvFE}JH~QB~QD„NHH?†J9{K9W3‡Y8X?ˆcAˆ]@ˆfM‹jN“aK‰gJlF‰k=‚n>‡fE„kFkO`X^PyjU|jMrdRseNvmNuwI‚Jy|WouLvvHptCtkN|rHziP~jU†rW~rZwMwxU{jMqhPrYOpQTsVNwNLtTKpVIs\V|V_yXWxM`ƒR^„W_OjƒIn‡RbRd‚M^ŠYgƒXm‹Ru’Vx‹Ur•MvJs“QxžR{™A|‘;y=o=g“Kl¡LjMl–Xu•Ym bi›\hŽLs’Mx™Fw™Izž>z¡5‚¬;ˆ©B}¯7‹¨;Œ£8˜™/“”9ž—1›˜:’7Ž—C‹š>–ŸH”ŸA“™Gˆ¡; HƒEœA–§I‘¢PŠžT’¥L—žT‘Ÿ_˜£X—¤ZŽŸ`–Ÿc¢¨bœ¶Zœ²]™¬^–³\’«Q¢W•«[œªUŸ¥_£ f¡`®·m©°h§°`¤ªh§ªl¥¬jŸ¢u©v£¦g¨¢m¨¦r¬¨l¬²k³²k«ª]°¼` ¸Z˜­Vš¶S’®bŒ«dŽ¨aŠ²]‹µPƒªT¢\ƒª_~¤O¤R|¨VŒŸX‚¦^‡£]’¯RŽ¬^‰¤T‘®\“œ\•­c•¬c™®\™šf ¥^Ÿ›]ª¦b£«c¡žf³¨c§—g£œd¡[žŒWªcœ“_¥ŒU£”R¥‰S¥]¥Z°ŽK¥‹S£ŒN°•_¹˜O³“O¨R«‰GŸ†X ‰L£ˆHš‚Q’tV‹wZ‚‰S‚~TŠ[}UƒX„‹cY~huŠpn–xf“sdˆch‡unsg|m_zdYr^[}[iuTjyOdvP^rXbi[X^X^QYLTbGQXNUh\PqHBnMvI/z<8uN:sEA„CFzADƒ@@‡1EŽ@IJ>‰IH„JH„CBvAKtEJm@4~S:vQX3gC…rIcFŒ_K‰nAŒ^DŒa={Z8€cI~iDƒmKƒbW{`IviOtfCzhSplB‚sKtM…†KtrHrvRvvIniXwoYtmN|xRzyNvTwmLtoNtlTodVvZNzZNv[Jy_XpVSzVKyaWrbQzW]wVcRgŠ]e€Id€Ln…Zq†Ka†P^…YrƒTpŠ]u„K{’Nr”J~“S|ŠH|’Ky˜E€’Gw?{ž?yKg˜Uq›Tu–YiŒUp‘Ql™Xh—Ow”KsJ•B}’E…–<†£A‰«HªA‹¡7’‘0‘%–’(Žž.—’7‹š8œ7ˆ™CŽ =”š;‰ 5‹>~›C¨>’¢@Œ¤E•œW”žS–O—¢[‘¨PŽ¦T™¢T’­X™©a•¥[§ŸUžªe—®c•º[™¤`®]–£`•§Xª V¡¦d¨]±Äd³Áj¬¾c¦¯m¢²o¨¦q¬Ÿ|¥©zž§t¥£|¦£{¦¥l©«b±®b¥´a¦³[¦ºe™·a—²X’²]—¶_Œ¬Vª^…¯W‡¯Vƒ Vž]‰£]… V‡™UŒ–Y…¤\”§W‘¬\†¤\ˆ¬Z‰žZŸb”°Y•±U¤¬R¡ [¦ž[ž ]œa¥ l¨ªe«¢j­›c¬–Z¢–[¢“Z ‘[¦S«‹S®”P¥Ž[£‡[­‡S¯ˆX´”Xª‘X¯‘[³•Q®”R¬‹W¥ˆLªQ ‹NŸˆH¡‚F’xVŽ{\Œ}V‚|_~ŒUyV}…TuŠ_~”]ƒˆ`zŒem‘pkjl‹df…cg‚oonlqr`arifu`crWVcTZdTYldcpa_aU]]cNfcP^bQ^iZVnMKxD@j<@mCDkO=jJ?qOAuH9K4yJ5w=;}>8}ME~KG{=F8F~5@…8B>8ŒC;‚76;;}E>A@x?7mH1rI4~JB{M?}LBƒP…hJ‹`LŠfQŒmLŠbO‡_C}X8wZ8|k@wdQylRsfF~^B}_Dy_J„tH€zE{{?€„D†uI}qOtnQpuQywNzj[w{Tv|N~{XzlSvtP|lL{qXufXqiWpaTm[PuXTwX\o_SmaexVe€Xg{]_y[[‚S\{S`xZs{Lm}Mm€Mr€WwTl‚Lo…LwLx‹LwCy–HzGz™D€™A|–8p™@pQuŽ\zŠZsŒ`t”Um—On—Ql˜Oy•E‚—Jƒ“P€˜G£M…£B†•6‘“9•’+’*”-‘—/-™0—š1Ž?‡’?œ@…•:zŸ:ž@~¬@ƒœE‰Iˆ›V“›S˜œI™ŸPˆ¦Gƒ J‹ªY‰©[’ ZŸS §X¥¡b¦«_š¯Wž¯a’¬fŽ¢^” Z£¬W ­d¨e§ºb®»k²²a«ºb³³q°²p·´y´¨t«¦z°®v«·{³¶m¦·[£®[§²X›¿`§¹dž²Y—±Sµb¸lŒ¦l±j„¥V‚¢V{U~¨\…§R¥P‰¥`€›Z’«bƒªb”°S† [Œ¢U‘§UŽšL‘¥^Ÿ¶[›®X¡¤V©¥T©¡X¯¥_©Zµ­a¶žY©¦\³¦c¢žZ¢–a¢‰Y –_¨”O±“Y­[ªRªƒW®ŒQ¥Ža§ŒX±’R²”^©’Q­ˆVžK£ˆK¥|R’‰H“€SzL†y[„‡^~‚Ztƒ]y‰Os…S}‚Uu•_~‹bwƒfvˆrnfkƒguynvqglmfhs[hdccbe`obhbWdf[iki`lcblbZc\b`_][fWTm[WjYOHK}N=qAN|L

AqJEw@>ƒI:z@=yM5‚B:}DE}A?ŠBN‚5A‹6HŒ99‰63>0‰<5}57??€<8qE/r9*tA-t?<{?AJD}?:lF+sM+~`-}W+€_4X-…d=„Z3‚l:‚gJ…eN`H}hEwgJvS>t]8~aC|eDtmKwlFx^H}`BndD€nK„w;ƒuFw…Dƒz=„|AlGvn[{o\{oV{x[p€Or~SzsJpjO|lWu^Tw]Zn^VuVRp_O|eSj^\hYWv]as`]|Y_t]_vY[nV^yKmuR|tYm|Uhs\oˆWz†Yv…Vy‡Mu“U†šSvIpJs™Ju‘:s•E‚‘>xŸ>y‘J}‹[s–`u•d{–Uj—Lq–Ns“PtŒK„˜FCv˜EˆŸHŒ§?C0›”-‘‘(•—+™‰'‡3•‹.ˆ‰8†ŽG’›<Š™C›8‰ž:§A©?~ŸAˆ¡PƒŸS‘¨I˜›N–¡P’¦R‘¬Q…­O„¨U…©SšœTš¢Tš¡_ª§U¡§Z¢¬_’¨l”¤i–¦f› f¨¨b¦r¶Âk¯Äa·¹h³¶r·²nº·pµ·‚¶±«·{«¹u¤»w®»p¨¸e£¿aŸ¼]ŸÂ\œÈS¢½R£»Z›¯e”¬hŠ°e„£mƒ¡\‡¢[}¢]{ŸVˆœ\†§R‚¥X©]¨^•¦]‰ª^ªSœU””M˜šH˜žS©X§œO¡[ž£Y¨¤R¬¤U¶¦Z¸¡\´¨b¨®d¨¤Z¦¢ZžŽ]¤‡b§Šb²Y­™a«šW¨‰T³‘V³‰\§ƒ^¦Ž]¯ŒVª”R‹T¡Wž†Vž€XšuI“yK˜†P„P€\}†[t[z†av~Uo†OtXxŠfw‡fxƒkp„gqlpj|v`sjbtfWwh\kck^dk]bpaahhjiimcdjedfdffcldkeYnmJjcL{UCzSG†TOHKzFŒH=‘@;A6’<0Œ@6Š?6„62v9=~8:w:1r>7n>3xB8x:5pE2qD*tL,~U+wS'zO'\1„^7€b<g9‰ZD…]L…gJ€eKxaLx^;zeJyeHnp>rjCvf;qkDwpErnJr~>}|AwF|{BƒxJ}vBvQzrW„qZ|tNƒMzUm~HltLkhSphPqaVj\Lp_SuYV~UUva]sabrZcr`]qf_te`idad_`ePfdXonPwv[wnZp\z‚]x~dyˆa~‡e~‘Wƒ›UƒSr•Lz–Es•Au“=Œ@ƒ•H…™O€Ž[w’V{‘]r†Yr…Qm‡IqŠGz‘DuŠIw”Jƒ™F€“I…›B8‘2—)ž…'—„3šŒ-Ž)’Š.†‡5ƒ>ŒF–™B¡A”£:’›A†œ8„˜?¢J‹«V“©PŽŸL” I§L„§H†¯E†¦GˆªVŽœTš–P¡Y¤šZš§d–¨]—¥f”¢h™¨p›©p¢¬pžtµÅp¿Âj¼Çr´¶t»ºe¸»r¶¸|½|¶¹z«»°·{­Åe§Àiž»gŸÆi¿[ž½U¡¶Z‘°e“«^Š³f¬jŒ¨pˆ­e‰¨d‚˜Zˆœf†•]~¦]£\‹©a‰­e‹®^“«V‘ŸN™©J¡R—¡Jš©X˜¨W¤«]˜¡M¨¥`¤¢Y¤¨Qµ¥T±¤_¯žX«Ÿ`¨žX®h¡–g¤—h±”d¶—\´U±”P°P©ŽJ¬N©‘O®…X¤S¯‹Oª’W¡‚_¢‚]¢…O¡‡T›}U‰Š[„ˆaƒ…gwvbubs‡U{\qˆS|‹Oz~Sv„W‚bpslvƒeixkmf[wieocgqjdrdk\WiWUkd^Y_khg^ggahZbh^eqafrebsiRxcOq^KsWLtWGKFtCEyBNy7E}3E„6LA‚A;77‘;6“71…8}77s@07.rA-}B-{A5…C9‚<&x9*tF!‡M)ƒT zO'tZ-~V5…XA…XEˆcJ‡b=dI}gC€cA€l?{eD{gwpCzc7p]HvfJzgP{nDtjHqs>m}>rzH}wHxLywMvqJ~yX}U~Hv‚Lj~FnsHkwOgwTfrWdjIkgNhjZicZmhYf`Yb^Rf]]`jj]kga\ncip\qehcqdVkjZwnOsuNwnMu{aovcx|[~„_‡…]…ŠXƒ‡N…J†ŽJu‚@tŒIo…Dw€Gw€?„‚Fˆ‘K}T~as‡SwŒS„…WŽPŠƒJ’‡JŽˆTˆ‰Vƒ‹Q‰@–Œ?“•7›Ž/“’3Œ(–‰,‹•:Š–A‘FŽŽ<Œ™C‡œI§D¢8ž©=”¤<–¦@— L†¥NªKŽ§K‹™J£Q…¨G‚¦SŠ¦PŸK• SšXQ¢™T•£^–˜`—b—Ÿg¨o”°y®qtÊÄ¿ÂvÄÂo½Ïl½½v¾ÇvºÆp¼¿z½Á{ÀÁ}®Æm³Ìq¤Êm¨Ìc˜Ãcž¼rŸÂv—Äjž½cˆ³l´j‡®c‚¥b„¡l‹¡`Š¨h†˜o‡¡g’—k‡˜j‘¡^ˆ±V‚¦Tˆ¥S“›`œ¦R‘£Y–§S‘®\›©U—±dœª_¤bª°Uª©e«©Y¬«\®Ÿ`²›Z©˜W³ ]³œY¶’a²•T³’U±–H»šW»šK±P¥ŒU°‘S¬—N¯V«T¡…`œ‚X‰]¦€R”‰`‰€d|\—€^„„\ƒyVƒy`wx\xxV|sbt~S~wZ{uYmxctxbopendet]cqfjydcgbgkSjo^hhY^fbUacX^`T[^l\cl\gzZbz`e„e_}^U|_\€LX€ONuKF€PR{:V€9N„9E‚A?„>?}@A€83~5.|73Œ*-‹*-7*Ž,:ˆ47Š/.Ž25;=Š:*†85ŒB/„6*ˆ?1…59}068/v4,w@+zA€J/|H/vI#‚P2ƒ[:tZ>YB|S<‡g>‚^Bƒd:vm5sk@xp7tp6qlEyj@ql@‚j?wo:qvAy}@{|@r„@psNnwPwoTtNn€QoxPrƒKgqGl{E]}V[lW[v\kmRcpZki[jkTclZacU\_Xahg\hd\lhj[tipw\li\aha^fm_nkWomWxo[uxY|T|t\…‚Q‹_~b|‘RzˆO‡ˆJ|†Ay€@w€Jt„=wwD~ƒI‹J|‰[yŒTyƒK‰K‹…J‘€LŠˆJ…”VˆL’XŽ†R”ŽF¡…@’˜?Ÿ—8¢;”“?Ž3˜ˆC™“@‹—@’L›P’G’—H ¦:—¢9˜©>”©Mˆ¥EŒ¢W†¤XˆŸFŠšCŠ¨?‚©H”¨S‘ U›©Y©N”šV£“V—Oœ[¤•\–™^—¡f¦q›o™¢tsȼzƽ}ÃÆxÂËpÊÅtÂÀp»Åx¿ÅxÅǼÄrÁÑu·Îw©Óz¤Ñq›ÍkžÇw¤ÉxŸÁ|šÄr¼k”­qŒªn‰¤aŒ©m’«g—©f™¨i‘Ÿm…™m…Ÿe‹œ]ŠªW†œS…ŸO’žX•ž^›–]žb¦Y«_¯e›§e™°_§®i«²b°©Z¯¥^­ž`¦¡\ªŸ\´š\¹’R´Y¶™P¯”O´žS¼L³Y³“[®‘V«X°”M²†P®‰P«Zœ‚W¤ƒSž†W wa‘yj˜ze”}^ŽzVŒ{Pƒ}[ƒtR{rW|r_vq^tudqxaet`cubiibnhgp]lj[lo^ja[_d\`ic`keSbdW_[b^_[a[^dYrV^pZ[v[btaa€_`a`|UW~\YxQK|IV?Sƒ:Jw9Lw=€=8}=,u<4}2/ˆ22‹0113Ž4)‘4/‰.&“5(71”2+‡=%†<"ƒ:*…+2z-2‚,,3,80x9$u9/zD(F)…F*ˆE.|N5‚N3|R9~b@ˆc9†g6‚a:ze:zp1wi1}sAu?wwB~tA{v@z€?|y?€wEFw„HqxEw‚Iv~NuzKlƒMdxEhvA`€EdyIfoK[pY`wUesWZpW`qVZfTcdUa`\ZkaUq\alajimbdsj`}blzcdnn^ppb|i\vrb„pbƒtc‰{V}R‡yR…ˆQ‰‰]’T„K~ŠUw‚N{IwˆCw~HuJs‚Km…TuZ}}R„{N†|I‰|P‰ƒOŽ’K‹QŠˆZŽŠR•‰S“„SœƒG¢G“OGŒ@œŠ=—„K–M–’H‘K’G™R•U¤žFš§Bš¢BŒœQ—¥O’™WŽœT‘›JŸH„£L‰ D”šJŽ T•¡U”£Rœ–Pœ’P›”O¤Œ_¢œ]—›hœe£aŸœ^¤£j—}ÁÍ{ÁÎy¾ÏxÈÂyƽuÃÄzÇÂmÉË{¿Êp¿ÈwÃÄnµÆx¶×s±ËhŸÌi­Ép­Ët¦ÊsšÅj›Ám“·h—ºd—¶gŽ·h—µf’®eŽ¥m“©e¤g†®mŒ«mŒ£e‚ _‹¥[Ž¥b˜™[’ Xˆ•c‡œX˜¤_š¡`’Ÿa¥§a¨£U°ªT­›V°š\§¨W£¤Y§š[º›^²žW½•a²¢U³•U¼“M¹•Z¸^¸’]¸‡c°—Y­‹S¯ŒG¨‘\¨‰Z›‡\©yX®X•{[ŠwhŠ{gš`”u_ƒx\Œwco\~lVzmWzv_wtYdm]jp\ht[^d\k_aigjoVusammdiu\ji[Xo^[p^^nOakUUfKjYOzXUw[YuV^|`drb[q`Ur`QrVWsPVyBMx@TsJKrB=xBAyDAƒ;2z;->14>‰4:‡75…9#‹7)†>#Œ94Ž1+‘B*?*ƒ9+€9"Š71…69y5;€+9=,sC5B's=.xD!}O.|G$zT.{R>~N5y[>†Z.†f<Že>~_-‚g4„s3€y9rs"ƒ44ŒB+ŒD/<3…7)…;3‹?3Š=8{35y27‚99€E6vC*zE!sHvJ vN&xT1yT;|]=„[2€U+…Z3ƒZ3‡j0p5n6tq@ws>v|Dpu?soDmkFvj8zh8€n9ufHmr@op;ksK_kL[vL]{NexN]rEb{HYyH[}J[|QcrVhvRdoMaxTkr[gjTbiVYcYUlfUjiYmp\`gQafUcvbjwddobSmdRviWxt\zq[v{_€{Y†~[ƒzP…vKvsIwUu‚P€|R€G…|I}|J{zMy€LyvQ„xR~qcvtc„…R…X…{M…ƒG‚P’ˆX˜‰NŠN}LŸˆAŸƒCŸ†?˜ƒG–€=“~=x;–~;˜zDŠƒIŠ~<‹†>’H”’D¡‘P˜ŸQ“šT¤J–O™•V™NS›[ˆ–T‰žP™Zˆ¦P”¡H–¤I•šP ›Q¤X—£Z”•`šZ™Z—©jœ§mv½ÊuÈÁxÇʆÅȅËÐ|ÄÏmпuËÈkÂÊvÇÆh¹ÅqµÆo²Íg²Ôi¥Îr³Êm¨Óf«Ìf¤»f›¸u¡Ål–¹u•µv¥·u¤®q£°q–±i›·mš¬bŠ´s‡ªlªwªqˆ£jˆ§mˆ£_Ž™`‹œa‘›]•Ÿfš™Z¡‘fšši¦¢_­ W¯™f¯¦a²X¶˜\¸–X¾’d®^»™^ª”R°–ZØT²Vº’g²\·…b¸€Y³T³J£{V |Z¡sV«zT²zX¡ue“rY˜wTwe…om{dgŽqfiZ‚gczndulOok[ql[maZf^big[`fdhc`gai|\jkcptSmqT_g^\rVaeTd`IYeIaYQwfFhdKng_uYPhVMn`ThZJhSUjSSlKEsXIrICqE*‡I*‡G)Š>+ƒC3‰9!ƒD+ƒ=1}E4‚7.w;6Š@=‚42u>2yD#oMvR/vO5ƒP-{\CzT8z`AyY6zXAzh/…k8xq3€rB{n=rz>px=i{Gqr;rv@tbCpg;yhLnlAmm:kg9on?jhA[t?U|FduH[zR^|FcqE\{UTtPXySgvTg}W^tXpm^aqVkk\^\Zde_Sad^`ldSgQZqZ`|aVufZwa`re\sgb€u]xwc|px\}p\~pYtrH‚vGulUsvW„tM€rRoH|tP„zH…|Qƒ|XŒlSvvinz[yƒS‚‚W€{Z~HŽ~R†L‹‰R‡ˆL€F›v@”}D˜{@¢wD™‡A=ˆ}<”yBƒJ•„C•u8•‚3•D˜Œ8šœ@”IšU‘¤T˜¡SˆšV…’N…‘L~NƒX‡˜N~—_“S• Kž O £T©¥O  ^šŸUœ—b£^Œš[œk“§a …ÃÈzÈÄ|ÑĆÍÏyÖÙqÑÒtÚÆqÑÆmÇËxÁÆyµÂqºÅp¹Çu­Êg°Ôe®Óo±Óh­Ðq¥Ái¨¼m­¸s£ÂpœÇx¤»u¥¹z¦³v˜³m™¶b—®f˜´sµo’®j‹ŸvŽœn“Ÿm‡žk…¤b‰˜]‘ e“šhŽ™n™Œe¡‡f§“d¢gªša¨–[´ f¿ž_ºX³‘^µ•W¶ŒV±^®Y¸‘]Á“X½ŠX„aµ~^²{W¬X²S«|M¨rX¬q[µwT¯sU§uc•sX›j^jbˆbf…_j„ah…i\†^_~d^uiSgfWh`Mh\QhbWh^_c`_iYfxdiv_doXilTrsQilR`oMafP^^KcYKpdLoeIimSmdTf^QoZJr^AqdIcYBf]Ki[AnZ>~M<|N9sD0zI4{L;ƒ=:‡:4zE=zE>|N/…D$€K)vF"zN#zF1~D1ŠK'ŠD&€D.‚D0ƒG.€;4x@094wB7}>+‚K1vQ)tS2vZ2†T9‰[:}U@{\?ydB{bA}l<|o6yr9}i>vsAmoDpsAoz=}w9|sAtpHufDmc>skHrqIpf—€DuD’tEy7š?¦‹<¢“E™˜N•”Yˆ–RŒžQ‡•Zƒ’]„ˆU€ŽX‡–J•F†”S…N“™V›šR—¤M£¯UŸ©\¢£S•›Y’˜\Š cžZ˜ž`¢„ÏՀÎՅÍ×{ÌÔqÓÔrÈËvÊÏzÑÇiÃÉm·Ív·ÉpÃÂ}¿Êw´Ôm³Ùb­ÝkªÍ`ªÔm Îq¢Íw­º{¡¿w®Ç}¥Ã…¦¿w™­u“®i˜½h’¿o˜¹hŽ¹l˜«sªoˆšsŒ˜y‚˜fŠ•jŽ[Œ\›šdš”h™˜_¦˜jªn¤˜o¥Ÿc¥šb«œe°˜hº¡f­’q¬—f®l°‡Y¶’^ª”_¶•fµŒ]·}kµ€`­†X±„Yµ…W«uP«pV¯uM®hV¥zYªvb r_šeYc^‘dl‡h^ŒfdŠndxp\bcjj[k__lYVcdbhaThZXlZZpbde`mkUom__tNcuZcsOkiNgeZb]DjbCc_DjcKu[JqjMrfGlkCf`OgeOpcEj]QmXzP:N>zO7sF.pM1}H;yF5vRBtQ6V4„O1‚L)~T+}G!€Q2|C9yA6|N,‚D4‡;,ŒA-ŽG4~B:x3-t4+s3.‚J$P.€V3€^'„T5Ša3|g6€Z;wm?t`>wgAqg1ƒkBuqGlxKekNiwAp7pzGt{;pgCllGshEddEon9sb0lk1jy:XsFO|QRtST€L`lUijPcyJZoZfyTex_jve[l\`hUseXjlUddUf]`iVcgSi`]gcUhg[yaau`[nSso`|t^€uh{zfzplknnrnZ|hWvwGymRxqPƒvN{}K„kG~qLyMŠ|P|Y’‚Z}uV|rXvƒU…ƒQ†…a‰]‡YL’†M•F’€P‰P–qI“€AvJš{Jw6w-Št<Žq>—yHœq=œr<‘„@‘~7—|;‡F”‰L—”UŽ“ZŠ‘OŠ_‡…X„…Wy’UšTŒ’\~’Syš[‹[”™L£ŸT— SšªV¡ªV›¢RœYš©[‹¢\ ¢i©…ÇՇÊ×}ÉÐ}ÑҀÔÇsÍÈl×ÊqÑÃoÏÑn¾ÍÁÎ~ÂÂpµÐq²Îq®Õ`¯Ý\¨Ùh¥ÕmªËw£Ïq­Ìv©¿~±Ç¨ÂŠ˜·„–±z ¾uš¼m—Âs’·{•±u‘¬kžoŽ¡l„ªt‹£l“•b˜‘\^œiš™g˜k——a¥˜f¡—j§šg£m©–a«™c·”rµ—r±Šy»pµ…l¯d«’g´•c®‹`´€l½wfµ{Pº‚JÀ~I¼{G¯mS²kS°nQ¬tW¬sU¤nZ‘bYg[‰rhwe…e‡we|bdx^fm[`_eek^cn\fj``gfff[be[kjaid\\tR`rXZjU_oXZcYc\S_cAca>pbKmYSeaNk`GrhHnmGkjOabI_SRkTIyTDwU;qJDuB=yO2nK*uH.kN:jNHqPFkQ1tU-tU.€J/vM0{N-€Q2ƒL6‡H2zH7zJ2‚”s2Œp1n;•kDŸhG›r;‘@‘x@–w;~E’€OŒˆU„‹aƒ‹`‰}S‹[~ŠY|”[z^…–YyŽ_~—ZˆžU™¨V£«L›¢Uš¡\–¦^’¨P˜°Q™¦V¥Vš›b¥‰É݇ÈށÆցÑÑyÕÈzÑÊtËÌpÉÃyÀÁsÀ͂½¿}»ÄmºÃl©Ëb«Ïj¢Ún±Ðl®Þw¨ÎwÊ|¥Óz¦Á}¨Ã¬Ãƒ ¿€›®…•¶³v“¯qŠ©€‡Ÿs„«oƒœl•˜h¤s…•eŽŸaŸb¢šW •fœžiª™d®šY¨Œh¦œm©Œl£’l©Žm¨’b±“q­ƒx¬Šq±u´Œn·€c´Žg¦†c±€aºƒc¹‚[»y[Ã}TµsN¾xS¸wQ°uU¯|Q¯qN±tZ tX•gW–if™rb˜{`‚}f‰tc|qfhehehglZej^gc^nn_ok`nahja[afZcbWrfZe\[e]^`^`^ShYU\`KdfI_hHeiYqiKfhHi\DkgN_^>`aFaZ;q]@eWFtT?wK8lC5wL)qA/sG+zL2tM5wKJnO=vP7wZ7‡U8{L3zV9~G+€O+‹L+L2…D-‹::‚72ŠI1xB+x:7=)z3.=&€D)…E-„U+~_;`0}f?ƒfEˆq?ƒe7}rCkB€p>xnMth>hl>tzGfnDck;heEjl9fe=kj@bd5Z`>jd5^o9]h;anNSyKRyFZsL[mN[uLbjXNiZbr_jybjnXXhUcbdm`bahg\U]ie[gVjback^fp_rp\{_^sXhzbYufPwpc}yevv_r}fym`qnayx]€qWzrW‚eO’lY†vLŠjPyR‘tU†ƒ_Ž‰dˆ{`~ycˆe}†UˆV|’^…Ža…ŽU”…R™N“‚DŠ‚BŽwL†q?†p=ƒxG…€;Žl4‘r,‰n2‘g>›r=iMœrO“}Lw?˜rDš{>’mTŒqP‡yeˆƒV~y[„‡\‰€Z€ŠX†Yƒe„Yˆ–S•–[—˜S—ªQ“«NœœW”¡^”¯Z”¬Zš§S™¥c”œ]¢‡×܇ÏԁÐ׃Ë܂ÃÍyÉÊyÍÄzÑƅÊÄ~ÄÆuËÌ|ÀÈq°ÈjªÓq¤Õm¦Öo¦Øh«Ûi¥ßsžÔƒžÏŸÇžÄƒ¤Á†©¹†œ»€“Á‚·ƒ˜­{’£‚Š–zƒšm€i”aˆ“h˜a™b˜‘Xœ_Ÿš`œ”cª—^µ[®‘Y²•_«Žg©•p§’m«rª€r±Šx·ƒq·|s´…q±}p¯‚v°|r±ƒk¹e³d³~U¼vX»nP¹qS³}Q¸wK¼tS±wa«v_©w[¡pb“pZœl`“ra‰xjƒrk…k_}nbzcagadhagelbokbrf]robii[mkXfk\`f^imako[`d_Zffe^chUahFbbGjjNplJiaIgZMcZJ`hK`g@`_:iU5nN7lJ;rD4lB+iC1iD0xR6wS0uP:yU<[2}Y4xM4‚N=~S;€T;ŽQ;K/”G/I+’D9‡;7}G:}A7xB2ƒ<,†8.='„@1‡H3J>ŠX7‰\;}e;‚j:ƒk@e5~l7ti3zj;ycIukGue>npBruAlp?sb:l^@hW7d_9]]:bd;fd=_d;d_AY`GcmN]mJcnF`vBcwQ\lO`m[TrbVve^rbfl^feamgkicnjXjj^hi_jmdfxjru`ln\mmWvbZq`^nd\}fX{dR…rZ€qlwwpz|kwqdwwa{qW…qX†gZ‹dO„mOŒtQ‰sZ’xW’†c‡Šd†aƒ‡]zˆ_‚‡aƒ’_Š–_ˆ‰W†ˆRŒP”•F’ˆ<‘ˆ9Žy>Œ{J’vD‡u9Œu5ˆk1ˆl7•k>”i>’cDšlDžoE“oM—tAœsEšhL—iJŽoP‹s\xVwX„~Rƒ~[‰w_ˆ}cŒ€W’‹W‰ŠW‹SšŸX—¡R—¥Yž ^˜¤\¯V’¦_¤[–¢^ª_—ŠÛâÙΉÐÏ|ÓÜ{ÎÌpÊÌzÆÑsÎЂÊÄvÏÍ|ÏȅËÓv»Ös´Øx³ÜnªÛt®Ôl¯×y£Ú}šÏ„ªÓ‚žÁž¿‚§¿„•¸“”º‡šª—¬€‘¯Š‹¤¨†›rˆ nŒx•i‹”j•Œq˜…d ›li¤—b©šk¬l®Žh¦Œb ƒl¡‰w®“t²u¯ƒm¯ˆo­ˆpª}o©{q¶|o´€s­q¨um®pl­qd´|c¹|X¯v[®nO»sU°}S»rV¸|c¦yb¥yf—sdŒoi–od—ej‚pfƒkd„d`~ekochnfadc\kmbge[sfgpiad`\igW`dbfnW^pUjf_bddbciiS]gJ`nDadNclJ]_OddN\YBX`BZ_JanH`^>kWFbZCpF8mD2uR;f?6fK+jP)~K8qO3vP9zK0‚X,zR3ƒU7†I?L.ƒO%L(B2ŒI/Š=/;447}39ŠD/Š9(ƒ@ yJ%|P$ƒL3‰O5X(ˆV*„`9u[?~_9ƒd1ƒu.{p=zl?wp@moHloEoe9uj;snImt6_d5fh4]h5ca5[`6\_1a`9YlBVe?ZcOSsEbjM^vC]pHakYckQ[h^[kWloWorXkg_chggeflineffrZjcdieimz[rm_nk]~qU{sYurUti]xqcnW|mexvmyoet~^smi…he‰o_‹jYŒm\ŠtQ†lR†i]“xW…‰f‡…V}vdŠ}W‚Ža„TŒ‰^‚M‹ŽYE‰ˆAˆA‰A‰}@ŒƒF‚w?†qDzsC‰q:†f7–o,’k4œk<o;Ÿr7œwJwDvM”m?wBxG‘mNsa•yRŒ|S~VvQ~Z•„\Œ\’S”‰S‘N”ŸH¢›W—O–ª_¡ž_˜ªZ§W› V¡¥V› X¦sÛÒxÝՂÙÏÊρÏÍvÌÌzÚÐvÖÉwÑÐzÏØwÑӁÊÔwÈÏw½Îy¶Òn«Õx­Ìq©Ër¬Ö|¡×{«Ê„ªÈŒ£¿‰žµˆ¢¸Ž•´”•¨ˆ’¦…†°‰¬ƒ‰ªŒ ˆ‰‘w–“y—‘y˜‘™•vŠp¢“r¦˜s²”i¬k¢‹n§Žo§ŽsŸ†v«†u¨’w·‘g´…t·}o­‚m¶zl­i§~v¨yw¡|p¨mp¥hb«ohµli®u[¸dY±bg¸kc®ub¹xa´vb£tažm]Œod…sg†jhŽbsŠ\nwfj€llyjl{oivcdviXk]emRblXbkYbd^Z]ecblbgtU`nVabhe[iq]bmR`lZ_oQ[pM]_LT_J\]A]i6WfoS9jB2rA#vM0uR.uO)|O1†U.€Q+zP.yP=‚U6}N'|M-ŠG&‹D'ˆ=2‹E;‰?6ˆ4)ƒ6-B.?+‹C,|K$vL$|R)yZ€S!P-~\2}Z-v`+€c+yl2}pcd5mh6rj=ntAbo?`l;Y`.Y`0\f1[].[X0b`4cf9_iG`fOZoJ_nFckJmsMfqUci]gd_ieUrk\ig_pqdpummggkgtlessgphadkgjmenw]qtZ~xZ}uWynW{kX€tUzr`xii|mf‡ymƒ{bzp]Œlfs]i^q]zqL…nWƒpPƒ{Z„|Y}UxU„wU…T‹\|R‚€P†…K‰‹@‡‡B|‚8€‰8}‡>…„F‚vB~uH|u;xj0ƒd0‹i'—j;”hA”r=u;™y@˜t@ŽvE†p@ŽuNŒxOŠt\“xZŒxS“€Pš‚F¢}M™ŒL’\˜’Q‘ŽV“‹Mš—M”U”‘Pš’T–£N ¨SšŸ`—¡Z›§Z ¤^¢™\¤†ÒمØ؂ÖÒzËÕsÍÒpÒÎqÎË{ØπÒÎy×à‚Ò߈ÍÎzÊÙ|ÉÏo³Ëx¬Éx¬×o±ÆzµÆx±É~¨ÌŒ¨¹€¨¾‡™³¢¸Ž²ˆ”¨~”¥€‰¤ƒ~®¡‰¥€‘•€˜–|‹v‘•v—–y‡s“Žr¤Œzª•o±–w¯‚i«Œt…}£‚s¨ˆx®‹y°h»…r³ˆf¢k¯ƒtªvj¬tq¤vlªjp›rt§hg©onªke©jc«mZªhY¤jkŸq_¡hl³y_ f`˜gj“pgŽkh„m]ƒhfŠds‚gpzdqvceyfb{a^u]Sg]S]PYh\a[]\e^cdml_sXjgbpahhabs\asYXoJXsGXfNVfN`lPZh=U`GTeEZcET\CSh=]g<]X@^\GfYHoM?j[=qW4vD(lB/rI1rP$~Q3sL6L)R6|R=xO1|R.ŠE(C'„N/‹@*’84ˆ=2~C+‚:5Œ:,F1ŒG ƒW#‰L#~U|Y*‚U[+ƒ]0Z#{a/sd-ps9vk5s}3cu5``0nl*ln.pk-`s9]p>er=bd5ba([m.dd,gk+hf:arXrKZiO_oHbnLduDooLmr]ig]xbcnqalhiqnjn]ivdfqcstmnv]nj`hgWjee{q\vuMvRuave[|qgoa}vboiˆik„qhƒqgykjygƒm\’ejˆoY‚mVcMoLkP…}_‚Q‰yPXƒ~Yˆ†^uW†€U„‚GƒBzwAƒˆI‚ƒAuz?yxEr?yqJ‡n:{t+{j(„s#™b2–k;‰f>“w5’zCˆzH‘pI“tH‡jSŠs[ŒyL–qZ~M–uN”zZ“|F¡‹L¤†[ŸŽK™~H›‹Oš’D¢ŒJœ‹T™”J¤˜DžY£V”£^˜šX¥™^™c¤€Ï܀×҂Í×yÓÔyÕÖzÜÕwÖÚtÕÞtÛÕyÑÜtÎЀÍÔ{ÊÓoÈÊo¹Òs´Ìp³Õt½Î|½Òƒ¶É¹Á‹¬±ˆ§«‹®~Ÿ®~—³|Š­‰©~‘ †Œ¤ˆŒŒ‹¡‡†˜~‘œ{™zšˆ“Œƒ•“‡œ›|£‘s¢‰vªŒm¤„m¢€p†w¦‹xª‘y­Šn­t±„i¤b§„eªtp©qp«ijžjr˜roŸoo¦to¦ps˜cjš`m¡be¢^l¥ae›`d¨op¤tf¦k`œcim`‹gbŠb^ˆgl‚hh€kpydf|g`|bbrg[a^X^UZbU\]VdY__Yjgbtd^oifgendim]aobed^YgO`cQUkM[eDUlCRdGS`ET[IQXGWZNQbLJgIT]*‡>&?/‚@,€D.‡N*‹I‹UŽJ…MuL&tS)w`&v_$qi'pf*zj0rj/fk.ku)`s,dm)jr,br#bl1_u1hp3_g5`k1[g,\d1\q$]k-cp/hv<`m=[oGfoFdqLngJtqGioIlhKukX|oSrn^qbg~^ruapv_sv^uzhwvfoubwsb…lXƒtW‚tPvY{i^vdhwgjw`brjewmfŠkqŒqzŽosjdŒuc‡qh“hf‘h]ˆdVŠbV‚bVƒeW„saypexWˆ„a€ZŠve…|^ŠvX†wSƒrG‹sKv@~€Cu~=|z?…~:Œs=ƒo7ˆq0ƒk0m+”n:Žh;Šc=†o=Œo:“pH‹mOrHŒgR‹mV“oLœnR—zOž{Z—x\œ…O¢…Iª{M¢IŸK•ŠPžJ•ŒF K›‡Oœ‹Iœ’T–W›—YŸ•b¡›c¢[ž‰Ð؆âÞ{ÐÙÒÒ}ÏÚzÛàsÍäzÍçvÎä{ÏßyÏÑ~ÒÙzÍÎvÌÅoÄÎxµÖs³ÊxÁÐ~­Â“­¾Š¶´‰¨·€£«…¦­|˜¨„–¯†‰¯|Ÿ…œ}‡©Œ”œ‹™‰š{Šœ‚Ž†sž}ƒ™ƒ}›†œ„Ÿ‘tž”}°’q¦ˆr¨ƒk¥‰oª‹k¬Šu±…i°†o²‚i¤‹c¦ƒjŸqs£rq›oh“og£ja˜kk˜qy¤oc¡hb¡i[£ZhšY^¦cdgnžqgžoo¡uf—lcˆh^„ec~gcŒ^e‰jr‰ik†mkuqjmeelnXod\`NPhUPXRZbYU`lYal^lmbjfbncXbeWn^`jQYgQ\vHKnQQnJPh>Xq?JiSQeO[aCVdHVkHT\GPe>`[CZ`CiX@mb1gY,l[#oV"sV"iHzGqN0vV-qK)uU3uQ6†P*‡P)‰V/K%†Q!‡B!‡=*?/‹I)C&†P+†P"ŽQQ‡R†K'~Y-uW)xa$qa+ej"l_+qm8od)me1ip-_r&_k"cq0[m,]m-Vh2dh>Vl&[]0Rf'Qd&Zl+dv4cp@]jDek:fhGadCfnJjfL\rJsjUll_liYyha{do}mh{e}u`up[xrdn}curczzUlPˆxU…}K{wW†g_€neufspeg~okwok‚ju‰cmskfi€tcƒpbŽpkŒcYŒ`Rb\ˆdOlXƒo_xjUˆpT{V‰†ZŠ|X„xZuM…lL‚}QxxMwsBss?|vC~tE~rEtC„p<v9‡e+€v%ƒj5qB„mJ‘qH‡kL’vH€qC‰sBuQŽyK}Tš~V—r[šp`¡„Mš‡R®W¥vG›ƒI ŠQV‘‰JˆK¢ƒW“ŠWVžŠQ’aŸ–a§‘c£]¡©W”ŠÝé|ÛÛzÛÏyØÍxÖÒ|ÍãyÙêwÕä†ØӇÉцÆ˂ÉÌÏԁÒÏwÆÒw¼Õz½Ïx¸ÉŒºÍ‘ªÀ”§¼…®º‚¥¬«¨‹™£ˆ‘¥†ƒª}ƒ£ˆ‹š„ŠŸ„‡‹“Ž†”‰”–|‡y—€w¤}„¢ˆŠ¤¡z›r¤y§„r£…t§q¤†i ˆn¬ˆl¤Ši©‰f®Šq«~pœvh•il”sm•tinaib™pq¡fcšg`žgc¡\`™UdžXe jpªnn¥mdšei™l`Žldnozmmbt‚iw‡qyzlrtmdrrgkg]l]^nXQiQQ\YXe_[kebea^hldcoXhdScd]fYXpYYpYUrUIvEMpH[qFMrOMtOUdOY]@RdCUfISeH]`:Tg@Z]9Vb6Xb:g^4p`#nU+jT$kS*jMrU$yM'Q2zL-~V&}[+za.\-€\'ŠJ “?(=*ŽD-‹I,„D1N*ŽH#…R'ŒK#†NOP${RuQi\&i]*j_._h/fk(^e'di*ai(Tc/Ra0Pf5Vc4Ql|l?ys>um?~l@}p2xm(ƒt2€sAŽuE…nNŠtH‰zK†|K‰zJ‚B}G›xK˜ƒY•„[–uY›xTž|S©yJ£xLŸ‚L˜‡V˜„NžŽM¤„Q†U›U ‰V¨’b©‘\§–_¬‰S¢–K•£S™€Þá~Öæ{Ðß~ÒÌxÊֆÖ؀ËêxÚê}ÔçÈىÐ̀ÒÎ|ÇLjÆÇzÇÐwÄ؁·Ì‰³Ò‡²Â†¯¾Œ©µ¬ºŒ±­|¦¥©«—›z£x‹–’„†‘„”ŠŒ–‰‹‰”™ˆ˜ˆ…š„„”…š†w Ž„¤‹ƒ˜†u›‚t ƒt x¤ˆy—yn§„x¬ƒu™u–„u¢twž|lžpe–nf›ii”mnbkak™i`ªad¥`d¨`^›Yg§bc¢[k§pv›fo˜er”mn’oh…pi~pxpzvus}kxzu{~qo{bjqfkec\maas]W`aJ[UPa]VidYh`XfaV`^VbY^jV\laTdXPp]LvFFsKF~IRrCYyLUvPUq=^_8TlAS]CN]IWhGM^4_c;Ma0Sb9X`&f[*m^*n\&iS'jLsUoVyQ)vX"X „`{^"zd/z\*ŠSˆG(ˆK#†I+–R#’L(ŽU%ƒZ)‰N(}U'‰R‡P#wTU|ZpW+fZ&`j0]l)X[$U`)Um.ed2_c[i>Uf2Uh/Qd.Yg-`\)h^&bf&Zf*Vh5]c@XfETn;SsARgFUl;bo=hfJhb]_kaXk^b^drWmtasuc€sj|hi~kWtiTrXrSƒwPwwV{z\}{\|s^yjevqf€zg‰rkŒth“ljˆdcƒ^iec‚bh†kl„jaƒeT}fWd[…[Q€_I‚`P…pYwp]yme}s`~lV{qO{|PmuPlwTltOrfNy`YrXYm_NghMri=qb3tc3qg2h7s?‰pJsPŽvKŽtG•oE•tRŠ}QˆzH˜€H˜}N‘„O›L™N ƒQ¤v\£v`©wZzPˆN’E¢‹F«ŒF®…N­ˆU¥ƒP£M£ˆO¡“H¤˜J¡ŸOž˜V§€éÝxàè…Ü×}ÜÞxÙÞ}Öã€Ôà|Ðà{×܃ÑßÞÑ~ÒǁØԈÑÓ}ÓÓ}Ñ́¾Å„¼¿„®È”§À‰¨¹ƒ««x«ž~¤¤}¦¥†ž£|žš‹›ƒ––‡’ƒ•†„„Œ‚“}†Œ†ˆŠ–~™€“{}™ƒ€™€v–|˜‚{ ƒs‘zt™uu¡€w¢€l‘pq”sy•po‘|o vdŸdg˜_i•_ežhs—Zbš_e˜fjšf`¢\h—_e˜Ve£hj dr•Zv™[z˜aq…gs„cqznpxnxrukztx}rhymkmVllVjj[Zh_a`\Xla]g_Rq[VqaRfa_c`[lZ^oNOjPZ`KYaNVsCWrELxNQtNE}@PyEbn:]c|`|gDysIvBjI‹yN‘~Y“yWžwM™‚V€N‰J‡ŽTŒŒ\—~_¡|`¢ƒh¤Šg¢†[¦„]˜|Y˜zS›€[ ‰K¡K°€R­PžU£ŠV¬Œ\¤…S¨‰L¨ŽV›„Þé‡æìƒÚí„Ùâ†Ùè€åââãqÙãvÛӄÑ×uÓӂÚρÐǎÓÍ{ØÌoÈÍwÂÐ}¿¹°¶¯ºŽ³±ŽŸ­y«©³™z«§zŸ¢šœƒ‹™ŒŠšŠ—‹‘’Š“†„Œ…”†‚˜|“‚™|Š|€˜uˆ†‰¥z›}ˆŸ~¡ƒ~Ÿ€‹p…£z|£lv¡rlŽxs’hz¡pl™``žXh¥Xo£bo¡_u˜Uh•dgšYfQm•Rc˜Rf§Pg˜Rm¡Ji•TyavS€€Vkvct|auyjtpjjp\u~Vkrbjlgke`mk]paer[ZbcVhhOZeNczVapZWlN\wKgkRYpCcgJVpLZj?]q=OzAWnGL}CUg@W_8bg;Sf@\]CXX?He=Qe;Kh3Vl1Z[+aU&eV&_d_X\_cWbYqSzOW^yS}P‡SuX-z\…K%zO…C"ƒR&|Z yN~W'oT&uRfY"fglcx]iSlZhehgWc+Jg)Oe9`Y1eb2Zd?a`=jjC_s7amFZh8cm;^m3k|3Yv4]|0Xn7VrIYmLcfB\pDad:TlM_^CZhG]cS_dYgfPgf^]kmalrhxzuwo{xvxttqm}pf„xc„wfxvV|x\xyaƒpgŠwdˆyd‚€W‰k“ljˆci’kg‹eo€btin\jh_–db“cQˆdDˆbP‹fH|eR†gKzmS~p]ŒxcŠg`ˆkXr[Œt[€sX†mR~mWzncthYud_waRvkGrgA~nJxm=†m;ˆm7‚mCˆtC„gO‡mIoPŽtV›sL’€Wœ{K“‡]š‚XŽ‚S‡Š[„[˜†`¥…^©‰a«Z©z^¢‰`™„T ƒT WªF­ŒR¢€P¤‹V¯‰X±‰ZŸŠZŠZŸY–ŽëìŽâî–êäççŠëކåۂÜÚxÝÝtàÚ|×ÍzÓӄÙNjÓЁÐʆÚÇyÒΆÇÁ†È…ÇŌ¸¿ƒ¸Á‰©±…ª§z©¤ƒ ¯ƒ’­‰‰§Œ¢Š–ª“”¢–Šš‡ˆŽ†ŠŒ‘€’x… }{¢{‚œ|‡¤ˆ£}¬~ƒª{¢Ž£{†ªnˆ­p{«w~£vƒ˜f|˜fs—_lŸdk£`c [k™cf [l˜OpŸSt™NmŠSu“Ln”Mp˜Lg¡P^˜Cf›GvRxŠS|†W|„Svt\uobnsawpckqcfvUilSombti]uidokes`_he_ihMllKdsSfq^]sYh|NdsM`hM_f?baAbeJcuKZwD\nBRrBRp:Wa>Ue;V]9IY=MV:HSBN_>VYdcD]e=Z`AYkLagGmtJoqQkpgksmluoi|wftutuurtzqvƒvm„xg|c|c}sg‰qc„{j‹ye…{k‰|a{`‹mg•bc“akŠdg’iknq•al“fa“a^š_\‘kNbS†hN†tM‡rS†wZx[‹|_•pg‘nm‡ya~_uT‚tZunbwxf‚q^€lR|iU~qK‚lR{qJxuH~v8€k9‰r>iJŒrP†jQŒpLˆvQ’{V{S˜…TŸ}\™xd„Z’z_~g”vj¡}ežƒa›‚a¥|bª…\Œ\«…OªŒM£‹Qª…Qª~Vª…T±„_§Œc¥…[Ÿˆ[¥†QŸêóêî…çàŠÜâˆåçŠå݋çå{âقÔÛzÒψÎʈÔƉÓÓ}ÐÐtÙÏzÑÀwÇÆyË΁»ÇˆµµŒ­¶‰µ®‚«°r«®ƒ¦°•¤‚›£}‡Š¥Œ˜›Ž“›ƒ“ŽŒ“‘œ‡˜†Š¤Ž–…Ž¤y„¤‚Š¤„Š¥€€£x…¨qŒž|¨p€ž~z™zu¢ws–pr—qx—b¢ei—hr XlRt¤ThžR{¤W{œQpNfNlšGb—Vm¡MfŸLcŒPb“Si…KkxJt{RnsUiuYtwMhz]tnZby\tzWjwYvgXq_eze_tmWzhOftGivMk~WXnU[{K`kSWpC]q9__?__I[dCWpMYm9Sr;Qo?[a@Q\:Pc@TV8O]6YN1H[8Ld:S]1Sc.OX(P[*SU%fZfZnbrTsNnYzRZy] sSZuMxQ~Y*qO)K!VOvO|Sl]sVcVnYeQ"jV)hd*YVdU+dX*gc%Rb'[`.\b2]a2Xb7cj7]l5Zw=_gEfhHeo@lmI`m9bs9c€BVI^z9Uv<]aGe`Nc`A\bFbeJY]JbhHcgRaaSmeTuoXpspo|pn|fn|itwppuxpntrw‚h„wmt|cv|[…pf‡nd‚tb{yqpsŠ~m‰vfŽgdimŒmq“bl™ir“Ynœ[]Ž_[ j[yTrLgQƒj]mSŽp_w[”mb”tiu_ŽxU…zQzwW{sS€je€h\ˆmaƒgV}hJxcMxoR{pR†tEiK{vElH€tO‚pKmW‡tQ–nO“yV”}asXŸYŸ…O›{Oœ…axk“{dŸ‹]œ}i „i›}m¤„eŸf¢[­^žˆT©€`¡ƒ^žU«‰S¢{\¨‚S¥‚\¢ƒR˜Ýñ~ãí{äìƒáڎß߉ë݅ßۄ×áÜӂØσÕȂÔ҉Ï̄ÌτÖÆtÕÃÇÃyÂÈ~ÈÀ„½³|±±|²¸v²·{¨±„›®€›¥ˆ’«~Œ£‡š|Œ•…•‘ƒ‘Ž–’œ’ˆ ’†ŸŒ† œ{Œ›v£yœwŠ¥p‡Ÿnƒ”z‡š~| }Ÿvy˜ry›wvškƒŸa„”cƒž]r¢^kžYq¨Sw WxLp”Tt’OfˆFbNj‘Um”UlŠOhŽQeƒPcReqEvtEvpAmnJdsKisIgzZo{Zqt[poSxadw_cxc_wvTz{SrqEp}J`xQ[vTZzGSuGReFWj9Te4Qh?UgIchG`k?\oGWp=X`6U^3Vd4J[3OV7SP0OW2MY5RX(Ph#J]-Ma%]W!fWob k[lRqUlY -paxfv\{Q -pQqV!xW |J(sN'xQ&V rNlJnIpUm[hYc[dQ!\N#Q\"]\)]Q'`Z&Z\-P\.Rb3Xd/Ob+Qb6Th9Tm=[q:co5ag>mfKglGgt9Zs:bxG]{Cb{IZt>\o9_eEUe@YlGgiNciLdfJedPn]Sid`piiutdsomlvfxpbrsgyoisqlyfkey„nvzirx^€s\‚s`xi{uj‡usŒzgxiŒkt˜`n’\q“hr“`j^jš^kžmZ”oN‘vJ…p[‡w[†s[uT“vRŽnYŒudˆx]‘vR…T‚|M†Sxayn]l]ˆuY‰gL}cNxkJkPƒqT…mP„iFxoI}pG„rV‡kUŠf[‹qS”qQ‘q^šs]’}TzQ€K•€O„\žy^˜ƒ^¡ˆf ‰f~k•{t™{k¢h ‚_¡€X_Ÿ–\œ‹]¡‚Z§€X yY§{W¨‹IJ¢’å߇èé‚èäîã‡íۀàßÚÒ~ÙÒäՂØ΁âՀÙ΅ÙʅÒÐvØÃsÑÍÇÃ~É…¾À{º¹z¸Á~µ¿¶°~Ÿ·{ž®„—ª‡—Ÿ„§x•¤‰•–|‰…‰“‘Š–†š†•’•“‡œ—‡˜§w¥sªl‡žx„š|€œs„—o„œu…—z}—xˆ–j{l‹Ÿcœ^†œZ{¡bz©cu Z| Tv—LoU|šXlŒMl‡Sl’Kj‘Rjˆ[`ˆTixW`pMgnBlvIuy?sqDszL|nBztT|vZwxWolStmZva]ziLtiTpxIlwJe{QdyIe~NVs?_mEWlCPp>Ik7MeELkDWl9ao9``6O^Tqan6gl=dnDhg=fsEWy@Y?f…IiKbwI]jLatL\nA`fLakGZdP[]Hd`Njd\gdeoebsj[pgelqkiwiordnulvilljux_qqdx{hmlesvhv~kvslqin|{l…yi‰gu‹al™anhg–hl™Yi¡l_iY‰iS•vU‡rS‡waŽqb‹}[•~Z’w^oW”rc~]”zRŽ}Zˆ~M‰|SxvR{nVymV†mV}kKƒbSaKŒmK_W…rV‚oK}jP€v[f_m_‰uV‡vI‘oY”p[o\™~W”}V¢†X–{a•ygœj‘aŒk“yr yc£„n§†oœƒh§hš`¢‰_Ÿi—…f˜ˆZšvVžrQ©„PžIœ”âܓäޏå؅ïà‰ìå†á؇æۈäԇãÈxçÊtÙÆvÙÉwÎÈxÑÐ}ÙÃ}ÒÅqÔ¾uÒ¼€Ï€ȼ~»Æ†µ¾‚¨µƒ§¶†ž±‹˜®Š’ ’œœ†™—‰‘’ŽŽ‡Œ”ŠŒ‘”‹†–šˆ‘œˆš—ƒ “¢w‰¦r¤p€žr‚šr†›jŽœnˆœxˆ¡xœsŠ–gƒœe‰ža^†£_xšVxXySv‘]wŒ_xOqHs„Ld‹Se‡Y[ƒT\†V`{HcqHfxGgsBjoHotArvG}zBsuFxnPwlGxiHllFqhRssNplHsmVjyRj~RbwCUs=XzE\@YzJQlIKk=I^CN_7Wh3Uf@[^[o@WlCYl;^vo€M{mLynUqoEpnDpcI|nKucMirKk|Cc€MlxEeyDRpDSw=SnHUl=TqHMg5Vi>Ii9Yl?UfEPo9F_7Hi+Dh0Kd3Bh*Ng5F]2GU0DP*QTBbUY -PP\RYO ]JbSiIgQ cK_FbX -uYdMlL#gGrR$kLjL!`N%gJ%^O^N&fCRD WN!]I+VQ(PI#TP!SB/GH7QL-[D/MA/OS&OP#SU&\b6bV5\a.[l;`i3f`BaiBYn=Zm>QsCXpBil:esIjgBcl>kgB_r;ggC`l?\iHSeTVh\WbXY\Zgfnol[ykexpjxue}sqrqovmbqodenft[ml^xdbzw^xt_‰op~}hwvw†tr…orzehhv‡hm—ad m^’l]ž_^—e^‹nhl[•ja‹mV}V‘qWœc’sežv\‘vf—uc‰~Z‰uZŽ~R†yPzRƒvOypR†xVƒyS€jF‚iT‚[E{gO‹mP€nXŒq[’jT€eT‰hctWˆr^—z[’}PzQ’wSyV•w^Ž|W˜‡Y›b™…l•i™†r–}u–€u–„u™ˆe¡‰h˜c›ŠTd‘†Tž|ašxU“{S—~S˜R£‡R§Šóðˆõëƒý߉öãŽð؋ôلëàƒè܃åã‚ð؅è͂쿂äʼnâІßˎϿ‡Ì¼~ÃÄ|ʾ}Æ´uǽz¾Âˆ¸¼„«³ƒ©­‚ž±‚¢§~ž¥}—œ‡— ›•ˆ™„™Œ†¢–¥Š˜™~•—‚Ž y¤u‡¦{Žªx¤s‡s„–o|œf„”h†‘m“™u˜r“‘c”j•™aˆc|œat—Wz[p›WrHwšKmSt”Rs‰NoƒTb‹bkŒcl}UpzKe€QlXguQvzCsv>j{Lg{Mt|HqqKgp?ej>uc8{f;rsHiqNbwHlzBh}AbwEPq?Kz3Mz>Oj=Rp9\h:On@Nh9Om6Vo8Jk;Cm3Mc#J_"TX,Na(Mc7Kc9NU)QV)PS%DWITPMNVZMUW `RcIgL^FZE_NnWoL_M#nTkW$k]#cS gJ dP ^P#`>%`B(YG^IRS%TI1NE+SE(GS)SN+WJ6]B2QJ,WS%T\+bb4`Y4QT-SW+[c4Wn4`m6_j>[sDVsAPpbd;fb@f`DbiC\`TTgSWlQUh_Qmb]jfac[ui^trctneuqcukxmfjffe\rqamlh|jk{jg€n\oaxp†wu€x}€gz|`iƒef•djša_œmcšm_Ÿda–daŒqbo]–h]’a^j^˜oZšxa™t[“oaxb‰vZq`—sUŽu_‡|Z€sV|iL€uY‚vW‡uQytMyfKbHƒeM‰nQ…{SŒvW’sV“j\‰ob†t]ŠwT“pV’tO‚X‰ŠSUŒ€][˜e™ˆg‘”e”qŠnŽ~o˜xk—~s’ƒq›Šh—†g™‘XœL›~Q›€U‘€PŒƒ\~Yž…Z¬Œ[¨‹õð€ðíõè‹óæ‰òå‘ôâ…úٍíæ‰îá…ì҅çāðŋßÁ~ÚʋÚÖÑȃž~¾Ç½Ä|ɺ{¿µ~ƽ€´ÄŒ°¿¦²…ª®«©Žœ£ƒ˜œ‹”’‡””œ †ž›{¨Ž§}›~‘œp†¡tŠšv†œ}‚Ÿv’ªo“¤tŽ™fˆ™p‹ŸhŒ”v“”q˜q•f™c“ži•U€‘T‹‰X‰L„•Tv•TzšIu“Uf‰Lu…Ze‡[g’]kŒ_i{Zly[mxPbwUjQw~LxuIlrJf~@pnEliDnv8noFyp7vl8np=elFoj:l{3as:fz=Yo/Pn7Nn6Xg0Ug>^h3No1NfAJn.Hk,Gh/Ri7Pb/SZ%T^([d$UZ-O[4Pf4R[$W_$IXIMLZ VJNMXUVKgQdR`N]M gW -mYfQbG$`R"eW#dQZ\&^R(_Dg@#b>,\;[;YD&TL&]QGR,KT"HR4HV8]L9SN+^W`]:iaHUeM`n\SjV_ifced_pb]pkmolseXxr`{gk€f_~ljto`gijghpa`liiymg„hctb‘ogŒsoŽkzŒtuz`z`oˆfl˜gnŽmeždežhY”i[–h[m`‰qb‹ef˜h_‹mT‘r\‹tZˆmW”qX…rQ‘}W–kX˜kZ—tex^„n\ˆhGƒiJ‚h[‡qO|fD‚iE{hP€nKrL‹w]–ySŽq`hg‹ob•}g†yZ‰„a†[‡x`‚†_‡`•~YŒ‡_šŒc}c‘Žg““i„zŠs‘k”ƒw—zj—…\—U“ŒU–†Y ‡MGŽ‡N™ƒWž‹Vš†Jª‘W©îæ‰ïæ€öí…ðå†ñè‡ûރ÷â…÷â€üà€ðׁ÷χíÄßÉȬÏӌÐ΍Ềľ…õÁ¼}¿¸{ÀÂ~¼Àƒº½‡Á·Š¸¹‰©©¨¤“«“–¢“Š ‰¤•~¥Œ}«Ž‚§†«zŒ›|—q‹žmƒ˜p„œgƒ¢c†žd—Ÿh’œe˜šk’Œk‹ŽmŠ…t—‡r›‡m‘cšˆV”‹MŒ„NŒ‹K„’S}šVršMq–Qk›^fŽ]cŒRe‡XbˆQ_‚Vc‡Pg|Tn}Oq{Gz}KuuMmzAmrBon7co:frDpk%aDg>#hBaQ^YPT#SP3QR1WS/QF0YP8\]:Tg5V`6^T2bS1eN.]Z,a_3]f.fi9`f=VmF[gEYgKQlD]h8_b:^h@]h;gc;ah>YjGXfVWea`ea_jbgfb`iajtjqpeno^skYyf_pk^xj_tqnkik_ajafm\kral…lh‚v`km—hq‘^r…dv…\y‡_l[m•al‘c]žl\œuZ›m`“f]’fT’rR›l]’fU…qS‚yR‚t[†pUˆuS‹{Y–tZŸkY¢pb™th‰sbxZŒvO‡kGkO†gS‹fL‡oQ}tJ‚xJƒzTŽuS‰l[’sjmgta˜`„_š‡^–…iš}bŒ‡_…Z”W—…U•†_œkœ‹e•‘p•–r‹v‰†q”‚l‘ˆi™~[š~TœŠ\O•”N”’M”ŒL•M•‰F£ŽFŸ…R xùãˆêã†çۀèæ}úÝóØ{úàƒôԊóã…ðۄñʓå͏á͍àƂÑǕØٍÕÀ‹Ì½ŠÁµ‹Å¼…ľ†¼´ƒ´¸|°»Œ²·‰µª¼§Ž©˜‰ªš¯•Ž¨‘”«˜†°ˆ§Š¬|ˆ§y‡¨ƒŒžsŒ˜oŽžp¥qŒ¦oŽ h”™b‘¢m— g™h‰“h•‡a‹“e’–m“[Š•S›…P–ˆS‘J‹‡[‹NQqœXdMdƒNcŒRk…Lf†Wa…[m~JtyVpzPguItpIyvMszCim8rwEck6ie6jh@dp=lh0so4sh;mm7bk6fq-Wp!Rq&LkVe)Zi \y-X‚9Ro.Ok,Ic,Hq(Wd'PZ-R^*J_NiY_,WkgkZjOc#Q\N^ XV -_XORRMUUOO -_JaT[UhZ _N_FeOVXUU"]SUKcL+bG&g@`@e5%^9&h>!fIbEQWF[OO#HL%TJ2M>-ZQ)\Z*d^,Yf;dY4dP5XU9Ma8V_ZsLNn>Si8Yb9dj9dd;[_G`lNa_N`qW\aYap_\fbXnb_j]kzgcvhoz\rnkuwbofmtkgpbpmog`jl[iebjqfg€oowa˜gb‘dvŽ_t‡ov†jnˆ\w‡cl‹[e_dšqc—uh mk¡tb›gf“m\Žuhn`…d\†d`Žic‹md‰w]‘pQ”lWžxU—sY tg’|nŒmYŒoX‡kNgN†hK‹sPŒoFˆxP‡yQ€zLŠxN’yd‡uXvfŽ€UŠ}Y†‰\‰b†…iŠ†^†ƒi…vWƒU“ŠX“Šd‘\ž‰p‘r—ŽeŠ—f‰q†…f‘|c‘uk¢‰_˜‘ažˆU›‹P¥”Y‘V‰G™•Tœ„R ^©sóävìã~éåîßxíÖvíÜzðҁúֈñáŒíەæՓäјîĒçĈàȌØԆÙɌÎÅȺŒ¿ºƒÆ½ƒ¾¶²¶‚´°Œ°¨ˆ½¨†Â¦†·—Š¸‘–²•©Š¯Ž“¨Š‹¥„‡¦Šƒ¤ˆ~Š§ˆ¢xŒ—t„£iƒ¥n‹žc˜hžd™ži•g“‹a•‰\Œ“hŽ“iŠ[—Š[–]Žc‘ŒXŠWŒP}To”\h–Yn†Gb…Nf…LcyXm}Up}LwxKjvRlkLuoGzqNrs>jv9ug;nd?ot5ar9av2co2pu3qq6ev5iu.Zu(Vp#SvWjcs_t&]|-S{&Ju$Jg+Qs1Sp-Pf$[h'QcOhKjWjcpcf!Wf$McKfP] -YZXGYE]OYJ\O`J^U ZTePjQbHZR$a[]P#[V[P$_N ]E]9\Ad9b6Y="YK"[JJLGQOFKH'GB!NETP_L'ZY0\a2Xb.[\2Yg8Nc=JaANc?Z[7W]9akHamFVrGYqGXmI^a;_]Aih;]`CVfOXnN]jW]fLcoMfiaZse`k^endol\nvcwv`qvmuvhkkknktnfmrldedhemmplzmn‹ja‘blˆfp†mk’moŽdi”bret‘_ngr‡msŽrv’tr op¢hj’jstoŠf`ƒf`‹keŠddˆsX”p]”rb’rX•nX–qYye—viŽqb†v_fX“eO†sSpL†rJuK‰lOŠpJmQŠt[‰uYxX“€X…T‹ƒV’‚g‡‹o‡†iƒ‚]ˆxa†y[†YY‰ŒY“‡_”Žp’c“a“‚^d|_‘|i¢„`©‰[§ŒSŸT¥‘S¡“V–›Y—’R›•`ª^©uöõ~ïã÷äîãrîéwõå{ù؄òօëӌîԘíՏãϒçԘä̊ÙÁ“×ːÖ̏Ë‹ÈǔøÂ°·½}²°…¸¬~²¨…Á¦‹´ªƒ¼”Ž®’—¶‰Œ°‰¦‡’§…Žž„€Ÿ„ˆ¯‹‹ª…‹¤w¥rŒ–u‘¢{‡›tŽšvš‘n”“n›”qœ—]•ŠZ™“[—•]•aŽ—_‡„bš“_—‹T–ŒQ’‹QŽyZy‡RtŒSw„PwwI|yGl‚Bl‰HuuMr€GpoNpsPjmIvsQvgDwn=jo1et?gm5ao/dc4cc,Zh%ds*ko"kg&eg#jh+`d"cpYlXs\i$`h*Rn$XgYi!Yp*KoMt!TjRk[m```hXleaYa^ZSV UWYP XG_DYM -XMVVVS[R^T -f`YPfN\JZUZSRM`TTNUDW7W9]B a@_8XKYHJRNQEGKG$OG#^K]F^R2]T%_^6_`:be3Lc5O[>Rk@Um8Uk8ObEShgf9a^6e`(bl$_o%_q'knbq$df!`ddbig^f_c`h$YoVl]f\i]k OlHgKjRfYqUo`_Vh[b -```W^PUNTQSI -QK -`QX[T^U\ [W aXW_P^ZXVR^N UU -XL[MSM _B]AV= -XG -XN -^C]=TBSNQITLQOWJ\G[D)`N0aP2Z^.^b,W^:V_?Qa - let name = sel#get_filename in - sel#destroy (); - callback name - end; - sel#show () - -let w = GWindow.window ~title:"Okaimono" () -let vb = GPack.vbox ~packing:w#add () - -let menubar = GMenu.menu_bar ~packing:vb#pack () -let factory = new GMenu.factory menubar -let file_menu = factory#add_submenu "File" -let edit_menu = factory#add_submenu "Edit" - -let sw = GBin.scrolled_window ~height:200 ~packing:vb#add - ~hpolicy:`AUTOMATIC ~vpolicy:`AUTOMATIC () -let vp = GBin.viewport ~width:340 ~shadow_type:`NONE ~packing:sw#add () -let table = GPack.table ~columns:4 ~rows:256 ~packing:vp#add () -let _ = - table#focus#set_vadjustment (Some vp#vadjustment) - -let top = ref 0 -and left = ref 0 -let add_to_table w = - table#attach ~left:!left ~top:!top ~expand:`X w; - incr left; - if !left >= 4 then (incr top; left := 0) - -let entry_list = ref [] - -let add_entry () = - let entry = - List.map [40;200;40;60] - ~f:(fun width -> GEdit.entry ~packing:add_to_table ~width ()) - in entry_list := entry :: !entry_list - -let _ = - List.iter2 ["Number";"Name";"Count";"Price"] [40;200;40;60] ~f: - begin fun text width -> - ignore (GButton.button ~label:text ~width ~packing:add_to_table ()) - end; - for i = 1 to 9 do add_entry () done - -let split ~sep s = - let len = String.length s in - let rec loop pos = - let next = - try String.index_from s pos sep with Not_found -> len - in - let sub = String.sub s ~pos ~len:(next-pos) in - if next = len then [sub] else sub::loop (next+1) - in loop 0 - -let load name = - try - let ic = open_in name in - List.iter !entry_list - ~f:(fun l -> List.iter l ~f:(fun e -> e#set_text "")); - let entries = Stack.create () in - List.iter !entry_list ~f:(fun x -> Stack.push x entries); - try while true do - let line = input_line ic in - let fields = split ~sep:'\t' line in - let entry = - try Stack.pop entries - with Stack.Empty -> - add_entry (); List.hd !entry_list - in - List.fold_left fields ~init:entry ~f: - begin fun acc field -> - (List.hd acc)#set_text field; - List.tl acc - end - done - with End_of_file -> close_in ic - with Sys_error _ -> () - - -let save name = - try - let oc = open_out name in - List.iter (List.rev !entry_list) ~f: - begin fun entry -> - let l = List.map entry ~f:(fun e -> e#text) in - if List.exists l ~f:((<>) "") then - let rec loop = function - [] -> () - | [x] -> fprintf oc "%s\n" x - | x::l -> fprintf oc "%s\t" x; loop l - in loop l - end; - close_out oc - with Sys_error _ -> () - -open GdkKeysyms - -let _ = - w#connect#destroy ~callback:Main.quit; - w#event#connect#key_press ~callback: - begin fun ev -> - let key = GdkEvent.Key.keyval ev and adj = vp#vadjustment in - if key = _Page_Up then - adj#set_value (adj#value -. adj#page_increment) - else if key = _Page_Down then - adj#set_value (min (adj#value +. adj#page_increment) - (adj#upper -. adj#page_size)); - false - end; - w#add_accel_group factory#accel_group; - let ff = new GMenu.factory file_menu ~accel_group:factory#accel_group in - ff#add_item ~key:_O "Open..." - ~callback:(file_dialog ~title:"Open data file" ~callback:load); - ff#add_item ~key:_S "Save..." - ~callback:(file_dialog ~title:"Save data" ~callback:save); - ff#add_separator (); - ff#add_item ~key:_Q "Quit" ~callback:w#destroy; - let ef = new GMenu.factory edit_menu ~accel_group:factory#accel_group in - ef#add_item ~key:_A "Add line" ~callback:add_entry; - w#show (); - Main.main () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/label.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/label.ml deleted file mode 100644 index b9829fb77..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/label.ml +++ /dev/null @@ -1,48 +0,0 @@ -(* $Id$ *) - -(* Embedding xpm data into an ML file *) - -let openfile = [| -(* width height num_colors chars_per_pixel *) -" 20 19 5 1"; -(* colors *) -". c None"; -"# c #000000"; -"i c #ffffff"; -"s c #7f7f00"; -"y c #ffff00"; -(* pixels *) -"...................."; -"...................."; -"...................."; -"...........###......"; -"..........#...#.#..."; -"...............##..."; -"...###........###..."; -"..#yiy#######......."; -"..#iyiyiyiyi#......."; -"..#yiyiyiyiy#......."; -"..#iyiy###########.."; -"..#yiy#sssssssss#..."; -"..#iy#sssssssss#...."; -"..#y#sssssssss#....."; -"..##sssssssss#......"; -"..###########......."; -"...................."; -"...................."; -"...................." |] - -open GMain - -let main () = - let w = GWindow.window ~border_width:2 () in - w#misc#realize (); - let hbox = GPack.hbox ~spacing:10 ~packing:w#add () in - let pm = GDraw.pixmap_from_xpm_d ~data:openfile ~window:w () in - GMisc.pixmap pm ~packing:hbox#add (); - GMisc.label ~text:"Embedded xpm" ~packing:hbox#add (); - w#show (); - w#connect#destroy ~callback:Main.quit; - Main.main () - -let () = main () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/lissajous.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/lissajous.ml deleted file mode 100644 index 9d6cf3b1b..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/lissajous.ml +++ /dev/null @@ -1,48 +0,0 @@ -(* $Id$ *) -(* Lissajous $B?^7A(B *) - -open GMain - - -let main () = - let window = GWindow.window ~border_width: 10 () in - window#event#connect#delete - ~callback:(fun _ -> prerr_endline "Delete event occured"; true); - window#connect#destroy ~callback:Main.quit; - let vbx = GPack.vbox ~packing:window#add () in - let quit = GButton.button ~label:"Quit" ~packing:vbx#add () in - quit#connect#clicked ~callback:window#destroy; - let area = GMisc.drawing_area ~width:200 ~height:200 ~packing:vbx#add () in - let drawing = area#misc#realize (); new GDraw.drawable (area#misc#window) in - let m_pi = acos (-1.) in - let c = ref 0. in - let expose_event _ = - drawing#set_foreground `WHITE; - drawing#rectangle ~filled:true ~x:0 ~y:0 ~width:200 ~height:200 (); - drawing#set_foreground `BLACK; -(* drawing#line x:0 y:0 x:150 y:150; - drawing#polygon filled:true [10,100; 35,35; 100,10; 10, 100]; -*) - let n = 200 in - let r = 100. in - let a = 3 in let b = 5 in - for i=0 to n do - let theta0 = 2.*.m_pi*.(float (i-1))/. (float n) in - let x0 = 100 + (truncate (r*.sin ((float a)*.theta0))) in - let y0 = 100 - (truncate (r*.cos ((float b)*.(theta0+. !c)))) in - let theta1 = 2.*.m_pi*.(float i)/.(float n) in - let x1 = 100 + (truncate (r*.sin((float a)*.theta1))) in - let y1 = 100 - (truncate (r*.cos((float b)*.(theta1+. !c)))) in - drawing#line ~x:x0 ~y:y0 ~x:x1 ~y:y1 - done; - false - in - area#event#connect#expose ~callback:expose_event; - let timeout _ = c := !c +. 0.01*.m_pi; - expose_event (); - true in - Timeout.add ~ms:500 ~callback:timeout; - window#show (); - Main.main () - -let _ = Printexc.print main() diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/nihongo.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/nihongo.ml deleted file mode 100644 index 48f7d8c22..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/nihongo.ml +++ /dev/null @@ -1,31 +0,0 @@ -(* $Id$ *) - -(* ¤³¤ì¤ò¼Â¹Ô¤¹¤ëÁ°¤ËLC_CTYPE=ja_JP.EUC¤Ê¤É¤È»ØÄꤷ¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤ *) - -(* cut-and-paste ¤âÂбþ¤·¤Æ¤¤¤Þ¤¹¤¬¡¢edit¤Ï¤¦¤Þ¤¯¤¤¤­¤Þ¤»¤ó *) - -open GMain - -let window = GWindow.window () -let box = GPack.vbox ~packing: window#add () -let text = GEdit.text ~editable: true ~packing: box#add () -let font = Gdk.Font.load_fontset - "-*-fixed-medium-r-normal--24-*-c-120-iso8859-1, \ - -*-fixed-medium-r-normal--24-*-jisx0208.1983-0, \ - -*-fixed-medium-r-normal--24-*-jisx0201.1976-0" -let button = GButton.button ~label: "½ªÎ»" ~packing: box#add () -let label = GMisc.label ~text:"¤³¤ì¤Ë¤Ï±Æ¶Á¤·¤Ê¤¤" ~packing: box#add () - -let _ = - window#connect#destroy ~callback:Main.quit; - text#misc#realize (); - text#insert "¤³¤ó¤Ë¤Á¤Ï" ~font; - let style = button#misc#style#copy in - button#misc#set_style style; - style#set_font font; - style#set_bg [`NORMAL,`NAME "green"; `PRELIGHT,`NAME "red"]; - button#connect#clicked ~callback:Main.quit - -let _ = - window#show (); - Main.main () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/old/fixpoint.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/old/fixpoint.ml deleted file mode 100644 index c41b11b50..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/old/fixpoint.ml +++ /dev/null @@ -1,39 +0,0 @@ -(* $Id$ *) - -open GtkData -open GtkBase -open GtkPack -open GtkWindow -open GtkEdit -open GtkMain - -let rec fix fun:f :eq x = - let x' = f x in - if eq x x' then x - else fix fun:f :eq x' - -let eq_float x y = abs_float (x -. y) < 1e-13 - -let _ = - let top = Window.create `TOPLEVEL in - GtkSignal.connect sig:Object.Signals.destroy top callback:Main.quit; - let hbox = Box.create `VERTICAL in - Container.add top hbox; - let entry = Entry.create () in - Entry.set entry max_length:20; - let tips = Tooltips.create () in - Tooltips.set_tip tips entry text:"Initial value for fix-point"; - let result = Entry.create () in - Entry.set result max_length:20 editable:false; - Box.pack hbox entry; - Box.pack hbox result; - - GtkSignal.connect sig:Editable.Signals.activate entry callback: - begin fun () -> - let x = try float_of_string (Entry.get_text entry) with _ -> 0.0 in - Entry.set entry text:(string_of_float (cos x)); - let res = fix fun:cos eq:eq_float x in - Entry.set result text:(string_of_float res) - end; - Widget.show_all top; - Main.main () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/old/hello.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/old/hello.ml deleted file mode 100644 index 60506e3cb..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/old/hello.ml +++ /dev/null @@ -1,23 +0,0 @@ -(* $Id$ *) - -open GtkBase -open GtkButton -open GtkWindow -open GtkMain - -let window = Window.create `TOPLEVEL - -let button = Button.create label:"Hello World" - -let main () = - GtkSignal.connect sig:Widget.Signals.Event.delete window - callback:(fun _ -> prerr_endline "Delete event occured"; true); - GtkSignal.connect sig:Object.Signals.destroy window callback:Main.quit; - Container.set_border_width window 10; - GtkSignal.connect sig:Button.Signals.clicked button - callback:(fun () -> prerr_endline "Hello World"; Object.destroy window); - Container.add window button; - Widget.show_all window; - Main.main () - -let _ = Printexc.print main () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/old/progressbar.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/old/progressbar.ml deleted file mode 100644 index f4ad465ed..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/old/progressbar.ml +++ /dev/null @@ -1,60 +0,0 @@ -(* $Id$ *) - -open Gtk -open GtkBase -open GtkMisc -open GtkWindow -open GtkRange -open GtkPack -open GtkButton -open GtkMain - - -class bar bar = object - val bar : progress_bar obj = bar - val mutable pstat = true - method progress = - let pvalue = Progress.get_percentage bar in - let pvalue = - if pvalue >= 1.0 || not pstat then (pstat <- true; 0.0) - else pvalue +. 0.01 - in - ProgressBar.update bar percent:pvalue; - true - method progress_r = - pstat <- false -end - -let main () = - - let window = Window.create `TOPLEVEL in - GtkSignal.connect sig:Object.Signals.destroy window callback:Main.quit; - Container.set_border_width window 10; - - let table = Table.create rows:3 columns:2 in - Container.add window table; - - let label = Label.create "Progress Bar Example" in - Table.attach table label left:0 right:2 top:0 expand:`X shrink:`BOTH; - - let pbar = ProgressBar.create () in - Table.attach table pbar left:0 right:2 top:1 fill:`X shrink:`BOTH; - - let bar = new bar pbar in - let ptimer = Timeout.add 100 callback:(fun () -> bar#progress) in - - let button = Button.create label:"Reset" in - GtkSignal.connect sig:Button.Signals.clicked button - callback:(fun () -> bar#progress_r); - Table.attach table button left:0 top:2 expand:`NONE fill:`X shrink:`BOTH; - - let button = Button.create label:"Cancel" in - GtkSignal.connect sig:Button.Signals.clicked button callback:Main.quit; - Table.attach table button left:1 top:2 expand:`NONE fill:`X shrink:`BOTH; - - Widget.show_all window - - -let _ = - main (); - Main.main () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/pousse.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/pousse.ml deleted file mode 100644 index ecf0dff3a..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/pousse.ml +++ /dev/null @@ -1,199 +0,0 @@ -(* $Id$ *) - -(* The game logic *) - -type color = [`none|`white|`black] - -module type BoardSpec = sig - type t - val size : int - val get : t -> x:int -> y:int -> color - val set : t -> x:int -> y:int -> color:color -> unit -end - -module Board (Spec : BoardSpec) = struct - open Spec - let size = size - - let on_board x y = - x >= 0 && x < size && y >= 0 && y < size - - let rec string board ~x ~y ~dx ~dy ~color l = - let x = x+dx and y = y+dy in - if on_board x y then - let col = get board ~x ~y in - if col = (color : [`white|`black] :> color) then l else - if col = `none then [] else - string board ~x ~y ~dx ~dy ~color ((x,y)::l) - else [] - - let find_swaps board ~x ~y ~color = - if get board ~x ~y <> `none then [] else - List.fold_left [-1,-1; -1,0; -1,1; 0,-1; 0,1; 1,-1; 1,0; 1,1] - ~init:[] - ~f:(fun acc (dx,dy) -> string board ~x ~y ~dx ~dy ~color [] @ acc) - - let action board ~x ~y ~color = - let swaps = find_swaps board ~x ~y ~color in - if swaps = [] then false else begin - List.iter ((x,y)::swaps) - ~f:(fun (x,y) -> set board ~x ~y ~color:(color :> color)); - true - end - - let check_impossible board ~color = - try - for x = 0 to size - 1 do for y = 0 to size - 1 do - if find_swaps board ~x ~y ~color <> [] then raise Exit - done done; - true - with Exit -> false - - let count_cells board = - let w = ref 0 and b = ref 0 in - for x = 0 to size - 1 do for y = 0 to size - 1 do - match get board ~x ~y with - `white -> incr w - | `black -> incr b - | `none -> () - done done; - (!w,!b) -end - -(* GUI *) - -open GMain - -(* Toplevel window *) - -let window = GWindow.window ~title:"pousse" () - -(* Create pixmaps *) - -let pixdraw = - GDraw.pixmap ~window ~width:40 ~height:40 ~mask:true () -let pixdraw1 = - GDraw.pixmap ~window ~width:40 ~height:40 ~mask:true () -let pixdraw2 = - GDraw.pixmap ~window ~width:40 ~height:40 ~mask:true () - -let _ = - pixdraw1#set_foreground `BLACK; - pixdraw1#arc ~x:3 ~y:3 ~width:34 ~height:34 ~filled:true (); - pixdraw2#set_foreground `WHITE; - pixdraw2#arc ~x:3 ~y:3 ~width:34 ~height:34 ~filled:true (); - pixdraw2#set_foreground `BLACK; - pixdraw2#arc ~x:3 ~y:3 ~width:34 ~height:34 () - -(* The cell class: a button with a pixmap on it *) - -class cell ?packing ?show () = - let button = GButton.button ?packing ?show () in -object (self) - inherit GObj.widget button#as_widget - method connect = button#connect - val mutable color : color = `none - val pm = GMisc.pixmap pixdraw ~packing:button#add () - method color = color - method set_color col = - if col <> color then begin - color <- col; - pm#set_pixmap - (match col with `none -> pixdraw - | `black -> pixdraw1 - | `white -> pixdraw2) - end -end - -module RealBoard = Board ( - struct - type t = cell array array - let size = 8 - let get (board : t) ~x ~y = board.(x).(y)#color - let set (board : t) ~x ~y ~color = board.(x).(y)#set_color color - end -) - -(* Conducting a game *) - -open RealBoard - -class game ~(frame : #GContainer.container) ~(label : #GMisc.label) - ~(statusbar : #GMisc.statusbar) = - let table = GPack.table ~columns:size ~rows:size ~packing:frame#add () in -object (self) - val cells = - Array.init size - ~f:(fun i -> Array.init size - ~f:(fun j -> new cell ~packing:(table#attach ~top:i ~left:j) ())) - val label = label - val turn = statusbar#new_context ~name:"turn" - val messages = statusbar#new_context ~name:"messages" - val mutable current_color = `black - method board = cells - method table = table - method player = current_color - - method swap_players () = - current_color <- - match current_color with - `white -> turn#pop (); turn#push "Player is black"; `black - | `black -> turn#pop (); turn#push "Player is white"; `white - - method finish () = - turn#pop (); - let w, b = count_cells cells in - turn#push - (if w > b then "White wins" else - if w < b then "Black wins" else - "Game is a draw"); - () - - method update_label () = - let w, b = count_cells cells in - label#set_text (Printf.sprintf "White: %d Black: %d " w b) - - method play x y = - if action cells ~x ~y ~color:current_color then begin - self#update_label (); - self#swap_players (); - if check_impossible cells ~color:current_color then begin - self#swap_players (); - if check_impossible cells ~color:current_color then self#finish () - end - end else - messages#flash "You cannot play there" - - initializer - for i = 0 to size-1 do for j = 0 to size-1 do - let cell = cells.(i).(j) in - cell#connect#enter ~callback:cell#misc#grab_focus; - cell#connect#clicked ~callback:(fun () -> self#play i j) - done done; - List.iter ~f:(fun (x,y,col) -> cells.(x).(y)#set_color col) - [ 3,3,`black; 4,4,`black; 3,4,`white; 4,3,`white ]; - self#update_label (); - turn#push "Player is black"; - () -end - -(* Graphical elements *) - -let vbox = GPack.vbox ~packing:window#add () -let frame = GBin.frame ~shadow_type:`IN ~packing:vbox#add () -let hbox = GPack.hbox ~packing:vbox#pack () - -let bar = GMisc.statusbar ~packing:hbox#add () - -let frame2 = GBin.frame ~shadow_type:`IN ~packing:hbox#pack () -let label = - GMisc.label ~justify:`LEFT ~xpad:5 ~xalign:0.0 ~packing:frame2#add () - -let game = new game ~frame ~label ~statusbar:bar - -(* Start *) - -let _ = - window#connect#destroy ~callback:Main.quit; - window#show (); - Main.main () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/progressbar.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/progressbar.ml deleted file mode 100644 index b614f08f8..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/progressbar.ml +++ /dev/null @@ -1,51 +0,0 @@ -(* $Id$ *) - -open GMain - -class bar bar = object - val bar : #GRange.progress = bar - val mutable pstat = true - method progress () = - let pvalue = bar#percentage in - let pvalue = - if pvalue > 0.99 || not pstat then (pstat <- true; 0.0) - else pvalue +. 0.01 - in - bar#set_percentage pvalue; - true - method reset () = - pstat <- false -end - -let main () = - - let window = GWindow.window ~border_width: 10 () in - window#connect#destroy ~callback:Main.quit; - - let table = GPack.table ~rows:3 ~columns:2 ~packing: window#add () in - - GMisc.label ~text:"Progress Bar Example" () - ~packing:(table#attach ~left:0 ~right:2 ~top:0 ~expand:`X ~shrink:`BOTH); - - let pbar = - GRange.progress_bar ~bar_style:`DISCRETE ~discrete_blocks:20 () - ~packing:(table#attach ~left:0 ~right:2 ~top:1 - ~expand:`BOTH ~fill:`X ~shrink:`BOTH) in - - let bar = new bar pbar in - let ptimer = Timeout.add ~ms:50 ~callback:bar#progress in - - let button = GButton.button ~label:"Reset" () - ~packing:(table#attach ~left:0 ~top:2 - ~expand:`NONE ~fill:`X ~shrink:`BOTH) in - button#connect#clicked ~callback:bar#reset; - - let button = GButton.button ~label:"Cancel" () - ~packing:(table#attach ~left:1 ~top:2 - ~expand:`NONE ~fill:`X ~shrink:`BOTH) in - button#connect#clicked ~callback:Main.quit; - - window#show (); - Main.main () - -let _ = main () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/radiobuttons.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/radiobuttons.ml deleted file mode 100644 index 5743ee232..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/radiobuttons.ml +++ /dev/null @@ -1,39 +0,0 @@ -(* $Id$ *) - -open GMain - -let main () = - - let window = GWindow.window ~title: "radio buttons" ~border_width: 0 () in - window#connect#destroy ~callback:Main.quit; - - let box1 = GPack.vbox ~packing: window#add () in - - let box2 = GPack.vbox ~spacing:10 ~border_width: 10 ~packing: box1#add () in - - let button1 = GButton.radio_button ~label:"button1" ~packing: box2#add () in - button1#connect#clicked ~callback:(fun () -> prerr_endline "button1"); - - let button2 = GButton.radio_button ~group:button1#group ~label:"button2" - ~active:true ~packing: box2#add () in - button2#connect#clicked ~callback:(fun () -> prerr_endline "button2"); - - let button3 = GButton.radio_button - ~group:button1#group ~label:"button3" ~packing: box2#add () in - button3#connect#clicked ~callback:(fun () -> prerr_endline "button3"); - - let separator = - GMisc.separator `HORIZONTAL ~packing: box1#pack () in - - let box3 = GPack.vbox ~spacing: 10 ~border_width: 10 - ~packing: box1#pack () in - - let button = GButton.button ~label: "close" ~packing: box3#add () in - button#connect#clicked ~callback:Main.quit; - button#grab_default (); - - window#show (); - - Main.main () - -let _ = main () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/rpn.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/rpn.ml deleted file mode 100644 index e701f185c..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/rpn.ml +++ /dev/null @@ -1,129 +0,0 @@ -(* $Id$ *) - -(* reverse polish calculator *) - -open GMain - -let wow _ = prerr_endline "Wow!"; () -let main () = - let stack = Stack.create () in - - (* toplevel window *) - let window = - GWindow.window ~border_width: 10 ~title:"Reverse Polish Calculator" () in - window#connect#destroy ~callback:Main.quit; - - - (* vbox *) - let vbx = GPack.vbox ~packing:window#add () in - - (* entry *) - let entry = - GEdit.entry ~text:"0" ~editable:false ~max_length: 20 ~packing: vbx#add () in - - (* BackSpace, Clear, All Clear, Quit *) - let table0 = GPack.table ~rows:1 ~columns:4 ~packing:vbx#add () in - let bs_clicked _ = begin - let txt = entry#text in - let len = String.length txt in - if len <= 1 then - entry#set_text "0" - else entry#set_text (String.sub txt ~pos:0 ~len:(len-1)) - end in - let c_clicked _ = entry#set_text("0") in - let ac_clicked _ = Stack.clear stack; entry#set_text("0") in - let labels0 = [("BS", bs_clicked) ; ("C", c_clicked); - ("AC", ac_clicked); ("Quit", window#destroy)] in - let rec loop0 labels n = - match labels - with [] -> () - | (lbl, cb) :: t -> - let button = - GButton.button ~label:lbl - ~packing:(table0#attach ~left:n ~top:1 ~expand:`BOTH) () in - button#connect#clicked ~callback:cb; - loop0 t (n+1) in - loop0 labels0 1; - - (* Numerals *) - let table1 = GPack.table ~rows:4 ~columns:5 ~packing:vbx#add () in - let labels1 = ["7"; "8"; "9"; "4"; "5"; "6"; "1"; "2"; "3"; "0"] in - let numClicked n _ = - let txt = entry#text in - if (txt = "0") then - entry#set_text n - else begin - entry#append_text n - end in - let rec loop1 labels n = - match labels with [] -> () - | lbl :: lbls -> - let button = GButton.button ~label:(" "^lbl^" ") - ~packing:(table1#attach ~left:(n mod 3) ~top:(n/3) ~expand:`BOTH) - () in - button#connect#clicked ~callback:(numClicked lbl); - loop1 lbls (n+1) in - loop1 labels1 0; - - (* Period *) - let periodClicked _ = - let txt = entry#text in - if (String.contains txt '.') then begin - Printf.printf "\a"; - flush stdout; - end - else - entry#append_text "." in - (GButton.button ~label:" . " - ~packing:(table1#attach ~left:1 ~top:3 ~expand:`BOTH) ()) - #connect#clicked ~callback:periodClicked; - - (* Enter (Push) *) - let enterClicked _ = - let txt = entry#text in - let n = float_of_string txt in begin - Stack.push n stack; - entry#set_text "0" - end in - (GButton.button ~label:"Ent" - ~packing:(table1#attach ~left:2 ~top:3 ~expand:`BOTH) ()) - #connect#clicked ~callback:enterClicked; - - (* Operators *) - let op2Clicked op _ = - let n1 = float_of_string (entry#text) in - let n2 = Stack.pop stack in - entry#set_text (string_of_float (op n2 n1)) - in - let op1Clicked op _ = - let n1 = float_of_string (entry#text) in - entry#set_text (string_of_float (op n1)) - in - let modClicked _ = - let n1 = int_of_string (entry#text) in - let n2 = truncate (Stack.pop stack) in - entry#set_text (string_of_int (n2 mod n1)) - in - let labels2 = [(" / ", op2Clicked (/.)); (" * ", op2Clicked ( *. )); - (" - ", op2Clicked (-.)); (" + ", op2Clicked (+.)); - ("mod", modClicked); (" ^ ", op2Clicked ( ** )); - ("+/-", op1Clicked (~-.)); - ("1/x", op1Clicked (fun x -> 1.0/.x))] in - let rec loop2 labels n = - match labels - with [] -> () - | (lbl, cb) :: t -> - let button = GButton.button ~label:lbl - ~packing:(table1#attach ~left:(3 + n/4) ~top: (n mod 4) - ~expand:`BOTH) - () in - button#connect#clicked ~callback:cb; - loop2 t (n+1) - in - loop2 labels2 0; - - (* show all and enter event loop *) - window#show (); - Main.main () - -let _ = Printexc.print main() diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/scrolledwin.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/scrolledwin.ml deleted file mode 100644 index 8f4bee21e..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/scrolledwin.ml +++ /dev/null @@ -1,35 +0,0 @@ -(* $Id$ *) - -open GMain - -let main () = - let window = GWindow.dialog ~title: "dialog" - ~border_width: 10 ~width: 300 ~height: 300 () in - window#connect#destroy ~callback:Main.quit; - - let scrolled_window = GBin.scrolled_window - ~border_width: 10 ~hpolicy: `AUTOMATIC ~packing: window#vbox#add () - in - - let table = GPack.table ~rows:10 ~columns:10 - ~row_spacings: 10 ~col_spacings: 10 - ~packing: scrolled_window#add_with_viewport () - in - - for i = 0 to 9 do - for j = 0 to 9 do - let label = Printf.sprintf "button (%d,%d)\n" i j in - GButton.toggle_button ~label - ~packing:(table#attach ~left: i ~top: j ~expand: `BOTH) () - done - done; - - let button = - GButton.button ~label: "close" ~packing: window#action_area#add () in - button#connect#clicked ~callback: Main.quit; - button#grab_default (); - window#show (); - Main.main () - -let _ = main () - diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/socket.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/socket.ml deleted file mode 100644 index 687389ca9..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/socket.ml +++ /dev/null @@ -1,16 +0,0 @@ -(* $Id$ *) - -open GMain - -let main () = - let w = GWindow.window ~title:"Socket example" () in - w#connect#destroy ~callback:Main.quit; - let vbox = GPack.vbox ~packing:w#add () in - let label = GMisc.label ~packing:vbox#pack () in - let socket = GBin.socket ~packing:vbox#add ~height:40 () in - label#set_text ("XID to plug into this socket: 0x" ^ - Int32.format "%x" socket#xwindow); - w#show (); - Main.main () - -let _ = main () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/test.xpm b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/test.xpm deleted file mode 100644 index 9b0d2efdb..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/test.xpm +++ /dev/null @@ -1,92 +0,0 @@ -/* XPM */ -static char *openfile[] = { -/* width height num_colors chars_per_pixel */ -" 20 19 66 2", -/* colors */ -".. c None", -".# c #000000", -".a c #dfdfdf", -".b c #7f7f7f", -".c c #006f6f", -".d c #00efef", -".e c #009f9f", -".f c #004040", -".g c #00bfbf", -".h c #ff0000", -".i c #ffffff", -".j c #7f0000", -".k c #007070", -".l c #00ffff", -".m c #00a0a0", -".n c #004f4f", -".o c #00cfcf", -".p c #8f8f8f", -".q c #6f6f6f", -".r c #a0a0a0", -".s c #7f7f00", -".t c #007f7f", -".u c #5f5f5f", -".v c #707070", -".w c #00f0f0", -".x c #009090", -".y c #ffff00", -".z c #0000ff", -".A c #00afaf", -".B c #00d0d0", -".C c #00dfdf", -".D c #005f5f", -".E c #00b0b0", -".F c #001010", -".G c #00c0c0", -".H c #000f0f", -".I c #00007f", -".J c #005050", -".K c #002f2f", -".L c #dfcfcf", -".M c #dfd0d0", -".N c #006060", -".O c #00e0e0", -".P c #00ff00", -".Q c #002020", -".R c #dfc0c0", -".S c #008080", -".T c #001f1f", -".U c #003f3f", -".V c #007f00", -".W c #00000f", -".X c #000010", -".Y c #00001f", -".Z c #000020", -".0 c #00002f", -".1 c #000030", -".2 c #00003f", -".3 c #000040", -".4 c #00004f", -".5 c #000050", -".6 c #00005f", -".7 c #000060", -".8 c #00006f", -".9 c #000070", -"#. c #7f7f80", -"## c #9f9f9f", -/* pixels */ -"........................................", -"........................................", -"........................................", -".......................#.#.#............", -".....................#.......#...#......", -"...............................#.#......", -".......#.#.#.................#.#.#......", -".....#.y.i.y.#.#.#.#.#.#.#..............", -".....#.i.y.i.y.i.y.i.y.i.#..............", -".....#.y.i.y.i.y.i.y.i.y.#..............", -".....#.i.y.i.y.#.#.#.#.#.#.#.#.#.#.#....", -".....#.y.i.y.#.s.s.s.s.s.s.s.s.s.#......", -".....#.i.y.#.s.s.s.s.s.s.s.s.s.#........", -".....#.y.#.s.s.s.s.s.s.s.s.s.#..........", -".....#.#.s.s.s.s.s.s.s.s.s.#............", -".....#.#.#.#.#.#.#.#.#.#.#..............", -"........................................", -"........................................", -"........................................" -}; diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/testdnd.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/testdnd.ml deleted file mode 100644 index 8c10f7b98..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/testdnd.ml +++ /dev/null @@ -1,510 +0,0 @@ -(* this is a translation in Caml of the gtk+ example testdnd.c *) - - -open Gaux -open Gtk -open GObj -open GMain - -(* GtkThread.start() *) - -let drag_icon_xpm = [| -"36 48 9 1"; -" c None"; -". c #020204"; -"+ c #8F8F90"; -"@ c #D3D3D2"; -"# c #AEAEAC"; -"$ c #ECECEC"; -"% c #A2A2A4"; -"& c #FEFEFC"; -"* c #BEBEBC"; -" ....................."; -" ..&&&&&&&&&&&&&&&&&&&."; -" ...&&&&&&&&&&&&&&&&&&&."; -" ..&.&&&&&&&&&&&&&&&&&&&."; -" ..&&.&&&&&&&&&&&&&&&&&&&."; -" ..&&&.&&&&&&&&&&&&&&&&&&&."; -" ..&&&&.&&&&&&&&&&&&&&&&&&&."; -" ..&&&&&.&&&@&&&&&&&&&&&&&&&."; -" ..&&&&&&.*$%$+$&&&&&&&&&&&&&."; -" ..&&&&&&&.%$%$+&&&&&&&&&&&&&&."; -" ..&&&&&&&&.#&#@$&&&&&&&&&&&&&&."; -" ..&&&&&&&&&.#$**#$&&&&&&&&&&&&&."; -" ..&&&&&&&&&&.&@%&%$&&&&&&&&&&&&&."; -" ..&&&&&&&&&&&.&&&&&&&&&&&&&&&&&&&."; -" ..&&&&&&&&&&&&.&&&&&&&&&&&&&&&&&&&."; -"................&$@&&&@&&&&&&&&&&&&."; -".&&&&&&&+&&#@%#+@#@*$%$+$&&&&&&&&&&."; -".&&&&&&&+&&#@#@&&@*%$%$+&&&&&&&&&&&."; -".&&&&&&&+&$%&#@&#@@#&#@$&&&&&&&&&&&."; -".&&&&&&@#@@$&*@&@#@#$**#$&&&&&&&&&&."; -".&&&&&&&&&&&&&&&&&&&@%&%$&&&&&&&&&&."; -".&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&."; -".&&&&&&&&$#@@$&&&&&&&&&&&&&&&&&&&&&."; -".&&&&&&&&&+&$+&$&@&$@&&$@&&&&&&&&&&."; -".&&&&&&&&&+&&#@%#+@#@*$%&+$&&&&&&&&."; -".&&&&&&&&&+&&#@#@&&@*%$%$+&&&&&&&&&."; -".&&&&&&&&&+&$%&#@&#@@#&#@$&&&&&&&&&."; -".&&&&&&&&@#@@$&*@&@#@#$#*#$&&&&&&&&."; -".&&&&&&&&&&&&&&&&&&&&&$%&%$&&&&&&&&."; -".&&&&&&&&&&$#@@$&&&&&&&&&&&&&&&&&&&."; -".&&&&&&&&&&&+&$%&$$@&$@&&$@&&&&&&&&."; -".&&&&&&&&&&&+&&#@%#+@#@*$%$+$&&&&&&."; -".&&&&&&&&&&&+&&#@#@&&@*#$%$+&&&&&&&."; -".&&&&&&&&&&&+&$+&*@&#@@#&#@$&&&&&&&."; -".&&&&&&&&&&$%@@&&*@&@#@#$#*#&&&&&&&."; -".&&&&&&&&&&&&&&&&&&&&&&&$%&%$&&&&&&."; -".&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&."; -".&&&&&&&&&&&&&&$#@@$&&&&&&&&&&&&&&&."; -".&&&&&&&&&&&&&&&+&$%&$$@&$@&&$@&&&&."; -".&&&&&&&&&&&&&&&+&&#@%#+@#@*$%$+$&&."; -".&&&&&&&&&&&&&&&+&&#@#@&&@*#$%$+&&&."; -".&&&&&&&&&&&&&&&+&$+&*@&#@@#&#@$&&&."; -".&&&&&&&&&&&&&&$%@@&&*@&@#@#$#*#&&&."; -".&&&&&&&&&&&&&&&&&&&&&&&&&&&$%&%$&&."; -".&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&."; -".&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&."; -".&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&."; -"...................................." |] - - - -let trashcan_closed_xpm = [| -"64 80 17 1"; -" c None"; -". c #030304"; -"+ c #5A5A5C"; -"@ c #323231"; -"# c #888888"; -"$ c #1E1E1F"; -"% c #767677"; -"& c #494949"; -"* c #9E9E9C"; -"= c #111111"; -"- c #3C3C3D"; -"; c #6B6B6B"; -"> c #949494"; -", c #282828"; -"' c #808080"; -") c #545454"; -"! c #AEAEAC"; -" "; -" "; -" "; -" "; -" "; -" "; -" "; -" "; -" "; -" "; -" "; -" "; -" "; -" "; -" "; -" "; -" "; -" "; -" "; -" "; -" "; -" "; -" ==......=$$...=== "; -" ..$------)+++++++++++++@$$... "; -" ..=@@-------&+++++++++++++++++++-.... "; -" =.$$@@@-&&)++++)-,$$$$=@@&+++++++++++++,..$ "; -" .$$$$@@&+++++++&$$$@@@@-&,$,-++++++++++;;;&.. "; -" $$$$,@--&++++++&$$)++++++++-,$&++++++;%%'%%;;$@ "; -" .-@@-@-&++++++++-@++++++++++++,-++++++;''%;;;%*-$ "; -" +------++++++++++++++++++++++++++++++;;%%%;;##*!. "; -" =+----+++++++++++++++++++++++;;;;;;;;;;;;%'>>). "; -" .=)&+++++++++++++++++;;;;;;;;;;;;;;%''>>#>#@. "; -" =..=&++++++++++++;;;;;;;;;;;;;%###>>###+%== "; -" .&....=-+++++%;;####''''''''''##'%%%)..#. "; -" .+-++@....=,+%#####'%%%%%%%%%;@$-@-@*++!. "; -" .+-++-+++-&-@$$=$=......$,,,@;&)+!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" =+-++-+++-+++++++++!++++!++++!+++!++!+++= "; -" $.++-+++-+++++++++!++++!++++!+++!++!+.$ "; -" =.++++++++++++++!++++!++++!+++!++.= "; -" $..+++++++++++++++!++++++...$ "; -" $$=.............=$$ "; -" "; -" "; -" "; -" "; -" "; -" "; -" "; -" "; -" " |] - -let trashcan_open_xpm = [| -"64 80 17 1"; -" c None"; -". c #030304"; -"+ c #5A5A5C"; -"@ c #323231"; -"# c #888888"; -"$ c #1E1E1F"; -"% c #767677"; -"& c #494949"; -"* c #9E9E9C"; -"= c #111111"; -"- c #3C3C3D"; -"; c #6B6B6B"; -"> c #949494"; -", c #282828"; -"' c #808080"; -") c #545454"; -"! c #AEAEAC"; -" "; -" "; -" "; -" "; -" "; -" "; -" .=.==.,@ "; -" ==.,@-&&&)-= "; -" .$@,&++;;;%>*- "; -" $,-+)+++%%;;'#+. "; -" =---+++++;%%%;%##@. "; -" @)++++++++;%%%%'#%$ "; -" $&++++++++++;%%;%##@= "; -" ,-++++)+++++++;;;'#%) "; -" @+++&&--&)++++;;%'#'-. "; -" ,&++-@@,,,,-)++;;;'>'+, "; -" =-++&@$@&&&&-&+;;;%##%+@ "; -" =,)+)-,@@&+++++;;;;%##%&@ "; -" @--&&,,@&)++++++;;;;'#)@ "; -" ---&)-,@)+++++++;;;%''+, "; -" $--&)+&$-+++++++;;;%%'';- "; -" .,-&+++-$&++++++;;;%''%&= "; -" $,-&)++)-@++++++;;%''%), "; -" =,@&)++++&&+++++;%'''+$@&++++++ "; -" .$@-++++++++++++;'#';,........=$@&++++ "; -" =$@@&)+++++++++++'##-.................=&++ "; -" .$$@-&)+++++++++;%#+$.....................=)+ "; -" $$,@-)+++++++++;%;@=........................,+ "; -" .$$@@-++++++++)-)@=............................ "; -" $,@---)++++&)@===............................,. "; -" $-@---&)))-$$=..............................=)!. "; -" --&-&&,,$=,==...........................=&+++!. "; -" =,=$..=$+)+++++&@$=.............=$@&+++++!++!. "; -" .)-++-+++++++++++++++++++++++++++!++!++!. "; -" .+-++-+++++++++++++++++++++++!+++!++!++!. "; -" .+-++-+++-+++++++++!+++!!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. "; -" =+-++-+++-+++++++++!++++!++++!+++!++!+++= "; -" $.++-+++-+++++++++!++++!++++!+++!++!+.$ "; -" =.++++++++++++++!++++!++++!+++!++.= "; -" $..+++++++++++++++!++++++...$ "; -" $$==...........==$$ "; -" "; -" "; -" "; -" "; -" "; -" "; -" "; -" "; -" " |] - -let window = GWindow.window ~title:"DnD Test" () -let _ = window#misc#realize () - -let drag_icon = - GDraw.pixmap_from_xpm_d ~data:drag_icon_xpm ~window () - -let trashcan_open = - GDraw.pixmap_from_xpm_d ~data:trashcan_open_xpm ~window () - -let trashcan_closed = - GDraw.pixmap_from_xpm_d ~data:trashcan_closed_xpm ~window () - -let targets = [ - { target = "STRING"; flags = []; info = 0}; - { target = "text/plain"; flags = []; info = 0}; - { target = "text/uri-list"; flags = []; info = 2}; - { target = "application/x-rootwin-drop"; flags = []; info = 1} -] - -class drag_handler = object - method private beginning (_ : drag_context) = () - method private data_delete (_ : drag_context) = () - method private data_get (_ : drag_context) (_ : selection_data) - ~info:(_ : int) ~time:(_ : int) = () - method private data_received (_ : drag_context) ~x:(_ : int) ~y:(_ : int) - (_ : selection_data) ~info:(_ : int) ~time:(_ : int) = () - method private drop (_ : drag_context) ~x:(_ : int) ~y:(_ : int) - ~time:(_ : int) = false - method private ending (_ : drag_context) = () - method private leave (_ : drag_context) ~time:(_ : int) = () - method private motion (_ : drag_context) ~x:(_ : int) ~y:(_ : int) - ~time:(_ : int) = false -end - - -class target_drag ?packing ?show () = - let pixmap = GMisc.pixmap trashcan_closed ?packing ?show () in -object (self) - inherit widget pixmap#as_widget - inherit drag_handler - val mutable have_drag = false - - method leave _ ~time = - print_endline "leave"; flush stdout; - have_drag <- false; - pixmap#set_pixmap trashcan_closed - - method motion context ~x ~y ~time = - if not have_drag then begin - have_drag <- true; - pixmap#set_pixmap trashcan_open - end; - let source_typename = - try - context#source_widget#misc#get_type - with Gpointer.Null -> "unknown" - in - Printf.printf "motion, source %s\n" source_typename; flush stdout; - context#status [context#suggested_action] ~time; - true - - method drop context ~x ~y ~time = - prerr_endline "drop"; flush stdout; - have_drag <- false; - pixmap#set_pixmap trashcan_closed; - match context#targets with - | [] -> false - | d :: _ -> pixmap#drag#get_data d ~context ~time; true - - method data_received context ~x ~y data ~info ~time = - if data#format = 8 then begin - Printf.printf "Received \"%s\" in trashcan\n" data#data; - flush stdout; - context#finish ~success:true ~del:false ~time - end - else context#finish ~success:false ~del:false ~time - - initializer - pixmap#drag#dest_set targets ~actions:[`COPY;`MOVE]; - pixmap#drag#connect#leave ~callback:self#leave; - pixmap#drag#connect#motion ~callback:self#motion; - pixmap#drag#connect#drop ~callback:self#drop; - pixmap#drag#connect#data_received ~callback:self#data_received; - () -end - -class label_drag ?packing ?show () = - let label = GMisc.label ~text:"Drop Here\n" ?packing ?show () in -object (self) - inherit widget label#as_widget - inherit drag_handler - method data_received context ~x ~y data ~info ~time = - if data#format = 8 then begin - Printf.printf "Received \"%s\" in label\n" data#data; - flush stdout; - context#finish ~success:true ~del:false ~time - end - else context#finish ~success:false ~del:false ~time - - initializer - label#drag#dest_set targets ~actions:[`COPY; `MOVE ]; - label#drag#connect#data_received ~callback:self#data_received; - () -end - -class source_drag ?packing ?show () = - let button = GButton.button ~label:"Drag Here\n" ?packing ?show () in -object (self) - inherit widget button#as_widget - inherit drag_handler - method data_get _ data ~info ~time = - if info = 1 then begin - print_endline "I was dropped on the rootwin"; flush stdout - end - else if info = 2 then - data#set ~typ:data#target ~format:8 - ~data:"file:///home/otaylor/images/weave.png" - else - data#set ~typ:data#target ~format:8 ~data:"I'm Data!" - - method data_delete _ = - print_endline "Delete the data!"; flush stdout - - initializer - button#drag#source_set targets - ~modi:[`BUTTON1; `BUTTON3 ] ~actions:[`COPY; `MOVE ]; - button#drag#source_set_icon drag_icon; - button#drag#connect#data_get ~callback:self#data_get; - button#drag#connect#data_delete ~callback:self#data_delete; - () -end - -class popup () = object (self) - inherit drag_handler - val mutable popup_window = (None : GWindow.window option) - val mutable popped_up = false - val mutable in_popup = false - val mutable popdown_timer = None - val mutable popup_timer = None - - method timer = popup_timer - method remove_timer () = - may popup_timer - ~f:(fun pdt -> Timeout.remove pdt; popup_timer <- None) - method add_timer time ~callback = - popup_timer <- Some (Timeout.add ~ms:time ~callback) - - method popdown () = - popdown_timer <- None; - may popup_window ~f:(fun w -> w#misc#hide ()); - popped_up <- false; - false - - method motion (_ : drag_context) ~x ~y ~time = - if not in_popup then begin - in_popup <- true; - may popdown_timer ~f: - begin fun pdt -> - print_endline "removed popdown"; flush stdout; - Timeout.remove pdt; - popdown_timer <- None - end - end; - true - - method leave (_ : drag_context) ~time = - if in_popup then begin - in_popup <- false; - if popdown_timer = None then begin - print_endline "added popdown"; flush stdout; - popdown_timer <- Some (Timeout.add ~ms:500 ~callback:self#popdown) - end - end - - method popup () = - if not popped_up then begin - if popup_window = None then begin - let w = GWindow.window ~kind:`POPUP ~position:`MOUSE () in - popup_window <- Some w; - let table = GPack.table ~rows:3 ~columns:3 ~packing:w#add () in - for i = 0 to 2 do - for j = 0 to 2 do - let button = - GButton.button ~label:(string_of_int i ^ "," ^ string_of_int j) - ~packing:(table#attach ~left:i ~top:j ~expand:`BOTH) () - in - button#drag#dest_set targets ~actions:[`COPY; `MOVE ]; - button#drag#connect#motion ~callback:self#motion; - button#drag#connect#leave ~callback:self#leave; - done - done - end; - may popup_window ~f:(fun w -> w#show ()); - popped_up <- true - end; - popdown_timer <- Some (Timeout.add ~ms:500 ~callback:self#popdown); - print_endline "added popdown"; flush stdout; - self#remove_timer (); - false -end - -class popsite ?packing ?show () = - let label = GMisc.label ~text:"Popup\n" ?packing ?show () - and popup = new popup () in -object (self) - inherit widget label#as_widget - inherit drag_handler - method motion _ ~x ~y ~time = - if popup#timer = None then begin - print_endline "added popdown"; flush stdout; - popup#add_timer 500 ~callback:popup#popup - end; - true - - method leave _ ~time = - popup#remove_timer () - - initializer - label#drag#dest_set targets ~actions:[`COPY; `MOVE ]; - label#drag#connect#motion ~callback:self#motion; - label#drag#connect#leave ~callback:self#leave; - () -end - -let main () = - window#connect#destroy ~callback: Main.quit; - let table = GPack.table ~rows:2 ~columns:2 ~packing:window#add () in - let attach = table#attach ~expand:`BOTH in - new label_drag ~packing:(attach ~left:0 ~top:0) (); - new target_drag ~packing:(attach ~left:1 ~top:0) (); - new source_drag ~packing:(attach ~left:0 ~top:1) (); - new popsite ~packing:(attach ~left:1 ~top:1) (); - - window#show (); - Main.main () - -let _ = - main () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/testgtk.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/testgtk.ml deleted file mode 100644 index 6c937f56d..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/testgtk.ml +++ /dev/null @@ -1,1140 +0,0 @@ -(* $Id$ *) - -open GdkKeysyms -open GMain -open GObj - -let create_bbox direction title spacing child_w child_h layout = - let frame = GBin.frame ~label: title () in - let bbox = GPack.button_box direction ~border_width: 5 ~packing: frame#add - ~layout: layout ~child_height: child_h ~child_width: child_w - ~spacing: spacing () in - GButton.button ~label: "OK" ~packing: bbox#add (); - GButton.button ~label: "Cancel" ~packing: bbox#add (); - GButton.button ~label: "Help" ~packing: bbox#add (); - frame#coerce - -let create_button_box = - let rw = ref None in - let aux () = - match !rw with - | None -> - let window = GWindow.window ~title: "Button Boxes" ~border_width: 0 () in - rw := Some window; - window #connect#destroy ~callback:(fun _ -> rw := None); - - let main_vbox = GPack.vbox ~packing: (window#add) () in - - let frame_horz = GBin.frame ~label: "Horizontal Button Boxes" - ~packing:(main_vbox#pack ~expand:true ~fill:true ~padding:10) () in - - let vbox = GPack.vbox ~border_width: 10 ~packing: frame_horz#add () in - - vbox#add (create_bbox `HORIZONTAL "Spread" 40 85 20 `SPREAD); - vbox#pack (create_bbox `HORIZONTAL "Edge" 40 85 20 `EDGE) - ~expand: true ~fill: true ~padding: 5; - vbox#pack (create_bbox `HORIZONTAL "Start" 40 85 20 `START) - ~expand: true ~fill: true ~padding: 5; - vbox#pack (create_bbox `HORIZONTAL "End" 40 85 20 `END) - ~expand: true ~fill: true ~padding: 5; - - let frame_vert = GBin.frame ~label: "Vertical Button Boxes" - ~packing:(main_vbox#pack ~expand:true ~fill:true ~padding:10) () in - - let hbox = GPack.hbox ~border_width: 10 ~packing: frame_vert#add () in - hbox#add (create_bbox `VERTICAL "Spread" 30 85 20 `SPREAD); - hbox#pack (create_bbox `VERTICAL "Edge" 30 85 20 `EDGE) - ~expand: true ~fill: true ~padding: 5; - hbox#pack (create_bbox `VERTICAL "Start" 30 85 20 `START) - ~expand: true ~fill: true ~padding: 5; - hbox#pack (create_bbox `VERTICAL "End" 30 85 20 `END) - ~expand: true ~fill: true ~padding: 5; - window #show () - - | Some window -> window #destroy () -in aux - - -let button_window button _ = - if button #misc#visible then - button #misc#hide () - else - button #misc#show () - -let create_buttons = - let rw = ref None in - let aux () = - match !rw with - | None -> - let window = GWindow.window ~title: "GtkButton" ~border_width: 0 () in - rw := Some window; - window #connect#destroy ~callback:(fun _ -> rw := None); - - let box1 = GPack.vbox ~packing:window#add () in - - let table = GPack.table ~rows:3 ~columns:3 ~homogeneous:false - ~row_spacings:3 ~col_spacings:3 ~border_width:10 - ~packing:box1#add () in - - let button = Array.create 9 (GButton.button ~label:"button1" ()) in - for i = 2 to 9 do - button.(i-1) <- GButton.button ~label:("button" ^ string_of_int i) (); - done; - - let f i l r t b = - button.(i) #connect#clicked ~callback:(button_window button.(i+1)); - table #attach button.(i)#coerce ~left:l ~right:r ~top:t ~bottom:b - ~xpadding:0 ~ypadding:0 ~expand:`BOTH - in - f 0 0 1 0 1; - f 1 1 2 1 2; - f 2 2 3 2 3; - f 3 0 1 2 3; - f 4 2 3 0 1; - f 5 1 2 2 3; - f 6 1 2 0 1; - f 7 2 3 1 2; - button.(8) #connect#clicked ~callback:(button_window button.(0)); - table #attach button.(8)#coerce ~left:0 ~right:1 ~top:1 ~bottom:2 - ~xpadding:0 ~ypadding:0 ~expand:`BOTH; - - GMisc.separator `HORIZONTAL ~packing:box1#pack (); - - let box2 = GPack.vbox ~spacing: 10 ~border_width: 10 - ~packing: box1#pack () in - - let button = GButton.button ~label: "close" ~packing: box2#add () in - button #connect#clicked ~callback: window#destroy; - button #grab_default (); - window #show () - - | Some window -> window #destroy () -in aux - - - -let create_check_buttons = - let rw = ref None in - let aux () = - match !rw with - | None -> - let window = GWindow.window ~title: "GtkCheckButton" - ~border_width: 0 () in - rw := Some window; - window #connect#destroy ~callback:(fun _ -> rw := None); - - let box1 = GPack.vbox ~packing:window#add () in - let box2 = GPack.vbox ~spacing: 10 ~border_width: 10 - ~packing: box1#pack () in - - for i = 1 to 3 do - GButton.check_button ~label:("button" ^ (string_of_int i)) - ~packing: box2#add (); - done; - - GMisc.separator `HORIZONTAL ~packing: box1#pack (); - - let box2 = GPack.vbox ~spacing:10 ~border_width:10 - ~packing: box1#pack () in - - let button = GButton.button ~label: "close" ~packing:box2#add () in - button #connect#clicked ~callback: window#destroy; - button #grab_default (); - window #show () - - | Some window -> window #destroy () -in aux - - -let create_radio_buttons = - let rw = ref None in - let aux () = - match !rw with - | None -> - let window = GWindow.window ~title: "radio buttons" - ~border_width: 0 () in - rw := Some window; - window #connect#destroy ~callback:(fun _ -> rw := None); - - let box1 = GPack.vbox ~packing:window#add () in - - let box2 = GPack.vbox ~spacing:10 ~border_width:10 - ~packing: box1#pack () in - - let button = GButton.radio_button ~label:"button1" - ~packing: box2#add () in - - let button = GButton.radio_button ~label:"button2" ~group:button#group - ~packing: box2#add ~active:true () in - - let button = GButton.radio_button ~label:"button3" ~group:button#group - ~packing: box2#add () in - - GMisc.separator `HORIZONTAL ~packing: box1#pack (); - - let box2 = GPack.vbox ~spacing:10 ~border_width:10 - ~packing: box1#pack () in - - let button = GButton.button ~label: "close" ~packing: box2#add () in - button #connect#clicked ~callback: window #destroy; - button #grab_default (); - window #show () - - | Some window -> window #destroy () -in aux - - -let create_toggle_buttons = - let rw = ref None in - let aux () = - match !rw with - | None -> - let window = GWindow.window ~title: "GtkToggleButton" - ~border_width: 0 () in - rw := Some window; - window #connect#destroy ~callback:(fun _ -> rw := None); - - let box1 = GPack.vbox ~packing: window#add () in - - let box2 = GPack.vbox ~spacing: 10 ~border_width: 10 - ~packing: box1#pack () in - - for i = 1 to 3 do - GButton.toggle_button ~label:("button" ^ (string_of_int i)) - ~packing: box2#add () - done; - - GMisc.separator `HORIZONTAL ~packing: box1#pack (); - - let box2 = GPack.vbox ~spacing: 10 ~border_width: 10 - ~packing: box1#pack () in - - let button = GButton.button ~label: "close" ~packing:box2#add () in - button #connect#clicked ~callback: window#destroy; - button #grab_default (); - window #show () - - | Some window -> window #destroy () -in aux - - -(* Menus *) - -let create_menu depth tearoff = - let rec aux depth tearoff = - let menu = GMenu.menu () and group = ref None in - if tearoff then ignore (GMenu.tearoff_item ~packing: menu#append ()); - for i = 0 to 4 do - let menuitem = GMenu.radio_menu_item ?group:!group - ~label:("item " ^ string_of_int depth ^ " - " ^ string_of_int (i+1)) - ~packing:menu#append ~show_toggle:(depth mod 2 <> 0) - () in - group := Some (menuitem #group); - if i = 3 then menuitem #misc#set_sensitive false; - if depth > 1 then - menuitem #set_submenu (aux (depth-1) true) - done; - - menu - in aux depth tearoff - - -let create_menus = - let rw = ref None in - fun () -> - match !rw with - | None -> - let window = GWindow.window ~title: "menus" - ~border_width: 0 () in - rw := Some window; - window #connect#destroy ~callback:(fun _ -> rw := None); - window #event#connect#delete ~callback:(fun _ -> true); - - let accel_group = GtkData.AccelGroup.create () in - window #add_accel_group accel_group ; - - let box1 = GPack.vbox ~packing:window#add () in - - let menubar = GMenu.menu_bar ~packing: box1#pack () in - - let menuitem = GMenu.menu_item ~label:"test\nline2" - ~packing: menubar#append () in - menuitem #set_submenu (create_menu 2 true); - - let menuitem = GMenu.menu_item ~label:"foo" - ~packing: menubar#append () in - menuitem #set_submenu (create_menu 3 true); - menuitem #right_justify (); - - let box2 = GPack.vbox ~spacing: 10 ~packing: box1#add - ~border_width: 10 () in - - let menu = create_menu 1 false in - menu #set_accel_group accel_group; - - let menuitem = GMenu.check_menu_item ~label:"Accelerate Me" - ~packing:menu#append () in - menuitem #add_accelerator ~group:accel_group _M - ~flags:[`VISIBLE; `SIGNAL_VISIBLE]; - - let menuitem = GMenu.check_menu_item ~label:"Accelerator Locked" - ~packing:menu#append () in - menuitem #add_accelerator ~group:accel_group _L - ~flags:[`VISIBLE; `LOCKED]; - - let menuitem = GMenu.check_menu_item ~label:"Accelerators Frozen" - ~packing:menu#append () in - menuitem #add_accelerator ~group:accel_group _F - ~flags:[`VISIBLE]; - menuitem #misc#lock_accelerators (); - - let optionmenu = GMenu.option_menu ~packing: box2#add () in - optionmenu #set_menu menu; - optionmenu #set_history 3; - - GMisc.separator `HORIZONTAL ~packing: box1#pack (); - - let box2 = GPack.vbox ~spacing:10 ~border_width:10 - ~packing: box1#pack () in - - let button = GButton.button ~label: "close" ~packing: box2#add () in - button #connect#clicked ~callback: window#destroy; - button #grab_default (); - window #show () - - | Some window -> window #destroy () - - - -(* Modal windows *) - -let cmw_destroy_cb _ = - Main.quit () - -let cmw_color parent _ = - let csd = GWindow.color_selection_dialog ~modal:true - ~title:"This is a modal color selection dialog" () in - csd # set_transient_for parent; - csd # connect#destroy ~callback:cmw_destroy_cb; - csd # ok_button # connect#clicked ~callback:csd#destroy; - csd # cancel_button # connect#clicked ~callback:csd#destroy; - csd # show (); - Main.main () - -let cmw_file parent _ = - let fs = GWindow.file_selection ~modal:true - ~title:"This is a modal file selection dialog" () in - fs # set_transient_for parent; - fs # connect#destroy ~callback:cmw_destroy_cb; - fs # ok_button # connect#clicked ~callback:fs#destroy; - fs # cancel_button # connect#clicked ~callback:fs#destroy; - fs # show (); - Main.main () - -let create_modal_window () = - let window = GWindow.window ~modal:true ~title:"This window is modal" () in - let box1 = GPack.vbox ~spacing:5 ~border_width:3 ~packing:window#add () in - let frame1 = GBin.frame ~label:"Standard dialogs in modal form" - ~packing:(box1#pack ~expand:true ~padding:4) () in - let box2 = GPack.vbox ~homogeneous:true ~spacing:5 ~packing:frame1#add () in - let btnColor = GButton.button ~label:"Color" - ~packing:(box2#pack ~padding:4) () - and btnFile = GButton.button ~label:"File selection" - ~packing:(box2#pack ~padding:4) () - and btnClose = GButton.button ~label:"Close" - ~packing:(box2#pack ~padding:4) () in - GMisc.separator `HORIZONTAL - ~packing:(box1#pack ~padding:4) (); - - btnClose #connect#clicked ~callback:(fun _ -> window #destroy ()); - window #connect#destroy ~callback:cmw_destroy_cb; - btnColor #connect#clicked ~callback: (cmw_color window); - btnFile #connect#clicked ~callback: (cmw_file window); - window # show (); - Main.main () - - -(* corrected bug in testgtk.c *) -let scrolled_windows_remove, scrolled_windows_clean = - let parent = ref None and float_parent = ref None in - let remove (scrollwin : GBin.scrolled_window) () = - match !parent with - | None -> - parent := scrollwin#misc#parent; - let f = GWindow.window ~title:"new parent" () in - float_parent := Some f#coerce; - f #set_default_size ~width:200 ~height:200; - scrollwin #misc#reparent f#coerce; - f #show () - | Some p -> - scrollwin #misc#reparent p; - match !float_parent with - | None -> () - | Some f -> - f #destroy (); - float_parent := None; - parent := None - and clean () = - match !float_parent with - | None -> () - | Some p -> p #destroy (); parent := None; float_parent := None - in remove, clean - - -(* scrolled windows *) - -let create_scrolled_windows = - let rw = ref None in - let aux () = - match !rw with - | None -> - let window = GWindow.dialog ~title:"dialog" ~border_width:0 () in - rw := Some window; - window #connect#destroy ~callback:(fun _ -> rw := None); - window #connect#destroy ~callback:scrolled_windows_clean; - - let scrolled_window = GBin.scrolled_window ~border_width:10 - ~hpolicy: `AUTOMATIC ~vpolicy:`AUTOMATIC - ~packing: window#vbox#add () in - - let table = GPack.table ~rows:20 ~columns:20 ~row_spacings:10 - ~col_spacings:10 ~packing:scrolled_window#add_with_viewport () in - table #focus#set_hadjustment (Some scrolled_window # hadjustment); - table #focus#set_vadjustment (Some scrolled_window # vadjustment); - - for i = 0 to 19 do - for j=0 to 19 do - GButton.toggle_button - ~label:("button ("^ string_of_int i ^","^ string_of_int j ^")\n") - ~packing:(table #attach ~left:i ~top:j ~expand:`BOTH) () - done - done; - - let button = GButton.button ~label:"close" - ~packing:window#action_area#add () in - button #connect#clicked ~callback:(window #destroy); - button #grab_default (); - - let button = GButton.button ~label:"remove" - ~packing:window#action_area#add () in - button #connect#clicked - ~callback:(scrolled_windows_remove scrolled_window); - button #grab_default (); - - window #set_default_size ~width:300 ~height:300; - window #show () - - | Some window -> window #destroy () - in aux - - -(* Toolbar *) - -let make_toolbar (toolbar : GButton.toolbar) window = - let icon = - let info = GDraw.pixmap_from_xpm ~file:"test.xpm" ~window () in - fun () -> (GMisc.pixmap info ())#coerce - in - - toolbar #insert_button ~text:"Horizontal" - ~tooltip:"Horizontal toolbar layout" - ~tooltip_private:"Toolbar/Horizontal" - ~icon:(icon ()) - ~callback:(fun _ -> toolbar #set_orientation `HORIZONTAL) (); - - toolbar #insert_button ~text:"Vertical" - ~tooltip:"Vertical toolbar layout" - ~tooltip_private:"Toolbar/Vertical" - ~icon:(icon ()) - ~callback:(fun _ -> toolbar #set_orientation `VERTICAL) (); - - toolbar #insert_space (); - - toolbar #insert_button ~text:"Icons" - ~tooltip: "Only show toolbar icons" - ~tooltip_private:"Toolbar/IconsOnly" - ~icon:(icon ()) - ~callback:(fun _ -> toolbar #set_style `ICONS) (); - - toolbar #insert_button ~text:"Text" - ~tooltip: "Only show toolbar text" - ~tooltip_private:"Toolbar/TextOnly" - ~icon:(icon ()) - ~callback:(fun _ -> toolbar #set_style `TEXT) (); - - toolbar #insert_button ~text:"Both" - ~tooltip: "Show toolbar icons and text" - ~tooltip_private:"Toolbar/Both" - ~icon:(icon ()) - ~callback:(fun _ -> toolbar #set_style `BOTH) (); - - toolbar #insert_space (); - - GEdit.entry ~packing:(toolbar #insert_widget - ~tooltip:"This is an unusable GtkEntry" - ~tooltip_private: "Hey don't click me!!!") (); - - toolbar #insert_button ~text:"Small" - ~tooltip:"Use small spaces" - ~tooltip_private:"Toolbar/Small" - ~icon:(icon ()) - ~callback:(fun _ -> toolbar #set_space_size 5) (); - - toolbar #insert_button ~text:"Big" - ~tooltip:"Use big spaces" - ~tooltip_private:"Toolbar/Big" - ~icon:(icon ()) - ~callback:(fun _ -> toolbar #set_space_size 10) (); - - toolbar #insert_space (); - - toolbar #insert_button ~text:"Enable" - ~tooltip:"Enable tooltips" - ~icon:(icon ()) - ~callback:(fun _ -> toolbar #set_tooltips true) (); - - toolbar #insert_button ~text:"Disable" - ~tooltip:"Disable tooltips" - ~icon:(icon ()) - ~callback:(fun _ -> toolbar #set_tooltips false) (); - - toolbar #insert_space (); - - toolbar #insert_button ~text:"Borders" - ~tooltip:"Show borders" - ~icon:(icon ()) - ~callback:(fun _ -> toolbar #set_button_relief `NORMAL) (); - - toolbar #insert_button ~text:"Borderless" - ~tooltip:"Hide borders" - ~icon:(icon ()) - ~callback:(fun _ -> toolbar #set_button_relief `NONE) (); - - toolbar #insert_space (); - - toolbar #insert_button ~text:"Empty" - ~tooltip:"Empty spaces" - ~icon:(icon ()) - ~callback:(fun _ -> toolbar #set_space_style `EMPTY) (); - - toolbar #insert_button ~text:"Lines" - ~tooltip:"Lines in spaces" - ~icon:(icon ()) - ~callback:(fun _ -> toolbar #set_space_style `LINE) (); - () - -let create_toolbar = - let rw = ref None in - let aux () = - match !rw with - | None -> - let window = GWindow.window ~title: "Toolbar test" - ~border_width: 0 ~allow_shrink: false ~allow_grow: true - ~auto_shrink: true () in - rw := Some window; - window #connect#destroy ~callback:(fun _ -> rw := None); - window #misc #realize (); - - let toolbar = GButton.toolbar ~packing: window#add () in - make_toolbar toolbar window; - - window #show () - - | Some window -> window #destroy () - in aux - - -(* Handlebox *) - -let handle_box_child_signal action (hb : GBin.handle_box) child = - Printf.printf "%s: child <%s> %s\n" hb#misc#get_type child#misc#get_type action - -let create_handle_box = - let rw = ref None in - let aux () = - match !rw with - | None -> - let window = GWindow.window ~title: "Handle box test" - ~border_width: 20 ~allow_shrink: false ~allow_grow: true - ~auto_shrink: true () in - rw := Some window; - window #connect#destroy ~callback:(fun _ -> rw := None); - window #misc #realize (); - - let vbox = GPack.vbox ~packing:window#add () in - - GMisc.label ~text:"Above" ~packing:vbox#add (); - GMisc.separator `HORIZONTAL ~packing:vbox#add (); - - let hbox = GPack.hbox ~spacing:10 ~packing:vbox#add () in - GMisc.separator `HORIZONTAL ~packing:vbox#add (); - - GMisc.label ~text:"Below" ~packing:vbox#add (); - let handle_box = GBin.handle_box ~packing:hbox#pack () in - handle_box #connect#child_attached - ~callback:(handle_box_child_signal "attached" handle_box); - handle_box #connect#child_detached - ~callback:(handle_box_child_signal "detached" handle_box); - - let toolbar = GButton.toolbar ~packing:handle_box#add () in - make_toolbar toolbar window; - toolbar #set_button_relief `NORMAL; - - let handle_box = GBin.handle_box ~packing:hbox#pack () in - handle_box #connect#child_attached - ~callback:(handle_box_child_signal "attached" handle_box); - handle_box #connect#child_detached - ~callback:(handle_box_child_signal "detached" handle_box); - - let handle_box2 = GBin.handle_box ~packing:handle_box#add () in - handle_box2 #connect#child_attached - ~callback:(handle_box_child_signal "attached" handle_box); - handle_box2 #connect#child_detached - ~callback:(handle_box_child_signal "detached" handle_box); - - GMisc.label ~text:"Fooo!" ~packing:handle_box2#add (); - window #show () - - | Some window -> window #destroy () - in aux - - - -(* Tree *) - -class tree_and_buttons () = -object - val tree = GTree.tree () - val add_button = GButton.button ~label: "Add Item" () - val remove_button = GButton.button ~label:"Remove Item(s)" () - val subtree_button = GButton.button ~label:"Remove Subtree" () - val mutable nb_item_add = 0 - - method tree = tree - method add_button = add_button - method remove_button = remove_button - method subtree_button = subtree_button - method nb_item_add = nb_item_add - method incr_nb_item_add = nb_item_add <- nb_item_add + 1 -end - -let cb_tree_destroy_event w = () - -let cb_add_new_item (treeb : tree_and_buttons) _ = - let subtree = - match treeb#tree#selection with - | [] -> treeb#tree - | selected_item :: _ -> - match selected_item#subtree with Some t -> t - | None -> - let t = GTree.tree () in - selected_item#set_subtree t; - t - in - let item_new = GTree.tree_item ~packing:(subtree#insert ~pos:0) - ~label:("item add " ^ string_of_int treeb # nb_item_add) () in - treeb #incr_nb_item_add - - -let cb_remove_item (treeb : tree_and_buttons) _ = - let tree = treeb#tree in - match tree #selection with - | [] -> () - | selected -> tree #remove_items selected - - -let cb_remove_subtree (treeb : tree_and_buttons) _ = - match treeb#tree #selection with - | [] -> () - | selected_item :: _ -> - try selected_item#subtree; selected_item#remove_subtree () - with Not_found -> () - -let cb_tree_changed (treeb : tree_and_buttons) _ = - let tree = treeb#tree in - let nb_selected = List.length (tree#selection) in - if nb_selected = 0 then begin - treeb # remove_button #misc#set_sensitive false; - treeb # subtree_button #misc#set_sensitive false; - end else begin - treeb # remove_button #misc#set_sensitive true; - treeb # subtree_button #misc#set_sensitive (nb_selected = 1); - treeb # add_button #misc#set_sensitive (nb_selected = 1); - end - - -let rec create_subtree (item : GTree.tree_item) level nb_item_max - recursion_level_max = - if level = recursion_level_max then () - else begin - let item_subtree = GTree.tree () in - for nb_item = 1 to nb_item_max do - let item_new = GTree.tree_item ~packing:(item_subtree#insert ~pos:0) - ~label:("item" ^ string_of_int level ^ "-" ^ string_of_int nb_item) () - in - create_subtree item_new (level + 1) nb_item_max recursion_level_max; - done; - item # set_subtree item_subtree - end - - -let create_tree_sample selection_mode draw_line view_line no_root_item - nb_item_max recursion_level_max = - let window = GWindow.window ~title:"Tree Sample" () in - let box1 = GPack.vbox ~packing:window#add () in - let box2 = GPack.vbox ~packing:box1#add ~border_width:5 () in - let scrolled_win = GBin.scrolled_window ~packing:box2#add - ~hpolicy: `AUTOMATIC ~vpolicy:`AUTOMATIC - ~width:200 ~height:200 () in - - let root_treeb = new tree_and_buttons () in - let root_tree = root_treeb#tree in - root_tree #connect#selection_changed ~callback:(cb_tree_changed root_treeb); - scrolled_win #add_with_viewport root_tree#coerce; - root_tree #set_selection_mode selection_mode; - root_tree #set_view_lines draw_line; - root_tree #set_view_mode - (match view_line with `LINE -> `ITEM | `ITEM -> `LINE); - - if no_root_item then - for nb_item = 1 to nb_item_max do - let item_new = GTree.tree_item ~label:("item0-" ^ string_of_int nb_item) - ~packing:(root_tree#insert ~pos:0) () in - create_subtree item_new 1 nb_item_max recursion_level_max; - done - else begin - let root_item = GTree.tree_item ~label:"root item" - ~packing:(root_tree #insert ~pos:0) () in - create_subtree root_item 0 nb_item_max recursion_level_max - end; - - let box2 = GPack.vbox ~border_width:5 ~packing:box1#pack () in - - let button = root_treeb #add_button in - button #misc#set_sensitive false; - button #connect#clicked ~callback:(cb_add_new_item root_treeb); - box2 #add button#coerce; - - let button = root_treeb #remove_button in - button #misc#set_sensitive false; - button #connect#clicked ~callback:(cb_remove_item root_treeb); - box2 #add button#coerce; - - let button = root_treeb #subtree_button in - button #misc#set_sensitive false; - button #connect#clicked ~callback:(cb_remove_subtree root_treeb); - box2 #add button#coerce; - - GMisc.separator `HORIZONTAL ~packing:box1#pack (); - - let button = GButton.button ~label:"Close" ~packing:box2#add () in - button #connect#clicked ~callback:window#destroy; - - window #show () - - -let create_tree_mode_window = - let rw = ref None in - let aux () = - let default_number_of_item = 3.0 in - let default_recursion_level = 3.0 in - let single_button = GButton.radio_button ~label:"SINGLE" () in - let browse_button = GButton.radio_button - ~group:single_button#group ~label:"BROWSE" () in - let multiple_button = GButton.radio_button - ~group:browse_button#group ~label:"MULTIPLE" () in - let draw_line_button = GButton.check_button ~label:"Draw line" () in - let view_line_button = GButton.check_button ~label:"View line mode" () in - let no_root_item_button = GButton.check_button - ~label:"Without Root item" () in - let nb_item_spinner = GEdit.spin_button - ~adjustment:(GData.adjustment ~value:default_number_of_item - ~lower:1.0 ~upper:255.0 ~step_incr:1.0 ~page_incr:5.0 - ~page_size:0.0 ()) ~rate:0. ~digits:0 () in - let recursion_spinner = GEdit.spin_button - ~adjustment:(GData.adjustment ~value:default_recursion_level - ~lower:0.0 ~upper:255.0 ~step_incr:1.0 ~page_incr:5.0 - ~page_size:0.0 ()) ~rate:0. ~digits:0 () in - let cb_create_tree _ = - let selection_mode = - if single_button #active then `SINGLE - else if browse_button #active then `BROWSE - else `MULTIPLE in - let nb_item = nb_item_spinner#value_as_int in - let recursion_level = recursion_spinner#value_as_int in - create_tree_sample selection_mode (draw_line_button #active) - (if (view_line_button #active) then `ITEM else `LINE) - (no_root_item_button #active) - nb_item recursion_level - in - match !rw with - | None -> - let window = GWindow.window ~title:"Set Tree Parameters" () in - rw := Some window; - window #connect#destroy ~callback:(fun _ -> rw := None); - - let box1 = GPack.vbox ~packing:window#add () in - - let box2 = GPack.vbox ~spacing:5 ~packing:box1#add - ~border_width:5 () in - - let box3 = GPack.hbox ~spacing:5 ~packing:box2#add () in - - let frame = GBin.frame ~label:"Selection Mode" ~packing:box3#add () - in - - let box4 = GPack.vbox ~packing:frame#add ~border_width:5 () in - - box4 #add single_button#coerce; - box4 #add browse_button#coerce; - box4 #add multiple_button#coerce; - - let frame = GBin.frame ~label:"Options" ~packing:box3#add () in - - let box4 = GPack.vbox ~packing:frame#add ~border_width:5 () in - box4 #add draw_line_button#coerce; - draw_line_button #set_active true; - - box4 #add view_line_button#coerce; - view_line_button #set_active true; - - box4 #add no_root_item_button#coerce; - - let frame = GBin.frame ~label:"Size Parameters" ~packing:box2#add () - in - - let box4 = GPack.hbox ~spacing:5 ~packing:frame#add ~border_width:5 () in - - let box5 = GPack.hbox ~spacing:5 ~packing:box4#add () in - let label = GMisc.label ~text:"Number of items : " - ~xalign:0. ~yalign:0.5 ~packing:box5#pack () in - box5 #pack nb_item_spinner#coerce; - - let label = GMisc.label ~text:"Depth : " ~xalign:0. ~yalign:0.5 - ~packing:box5#pack () in - box5 #pack recursion_spinner#coerce; - - GMisc.separator `HORIZONTAL ~packing:box1#pack (); - - let box2 = GPack.hbox ~homogeneous:true ~spacing:10 ~border_width:5 - ~packing:box1#pack () in - - let button = GButton.button ~label:"Create Tree" - ~packing:box2#add () in - button #connect#clicked ~callback:cb_create_tree; - - let button = GButton.button ~label: "close" ~packing:box2#add () in - button #connect#clicked ~callback: window#destroy; - button #grab_default (); - window #show () - - | Some window -> window #destroy () - in aux - - - -(* Tooltips *) - -let tips_query_widget_entered (toggle : GButton.toggle_button) - (tq : GMisc.tips_query) _ ~text ~privat:_ = - if toggle #active then begin - tq #set_text - (match text with - | None -> "There is no tip!" | Some _ -> "There is a tip!"); - GtkSignal.stop_emit () - end - -let tips_query_widget_selected (w : #widget option) ~text ~privat:tp _ = - (match w with - | None -> () - | Some w -> - Printf.printf "Help \"%s\" requested for <%s>\n" - (match tp with None -> "None" | Some t -> t) - (w #misc#get_type)); - true - - -let create_tooltips = - let rw = ref None in - let aux () = - match !rw with - | None -> - - let window = GWindow.window ~title:"Tooltips" - ~border_width:0 ~allow_shrink:false ~allow_grow:false - ~auto_shrink:true () in - rw := Some window; - let tooltips = GData.tooltips () in - window #connect#destroy - ~callback:(fun _ -> tooltips #destroy (); rw := None); - - let box1 = GPack.vbox ~packing:window#add () in - - let box2 = GPack.vbox ~spacing:10 ~border_width:10 - ~packing:box1#add () in - - let button = GButton.toggle_button ~label:"button1" - ~packing:box2#add () - in - tooltips #set_tip button#coerce ~text:"This is button1" - ~privat:"ContextHelp/buttons/1"; - - let button = GButton.toggle_button ~label:"button2" - ~packing:box2#add () - in - tooltips #set_tip button#coerce - ~text:"This is button 2. This is also a really long tooltip which probably won't fit on a single line and will therefore need to be wrapped. Hopefully the wrapping will work correctly." - ~privat:"ContextHelp/buttons/2_long"; - - let toggle = GButton.toggle_button ~label:"Override TipsQuery Label" - ~packing:box2#add () in - tooltips #set_tip toggle#coerce ~text:"Toggle TipsQuery view." - ~privat:"Hi msw! ;)"; - - let box3 = GPack.vbox ~spacing:5 ~border_width:5 () in - - let button = GButton.button ~label:"[?]" - ~packing:box3#pack () in - - let tips_query = GMisc.tips_query ~packing:box3#add () in - button #connect#clicked ~callback:(tips_query #start); - - tooltips #set_tip button#coerce ~text:"Start the Tooltips Inspector" - ~privat:"ContextHelp/buttons/?"; - - tips_query #set_caller button#coerce; - tips_query #connect#widget_entered - ~callback:(tips_query_widget_entered toggle tips_query); - tips_query #connect#widget_selected ~callback:tips_query_widget_selected; - - let frame = GBin.frame ~label:"Tooltips Inspector" - ~border_width:0 ~packing:(box2#pack ~expand:true ~padding:10) - ~label_xalign:0.5 ~label_yalign:0.0 () in - frame #add box3#coerce; - - GMisc.separator `HORIZONTAL ~packing:box1#pack (); - - let box2 = GPack.vbox ~spacing: 10 ~border_width: 10 - ~packing: box1#pack () in - - let button = GButton.button ~label: "close" ~packing: box2#add () in - button #connect#clicked ~callback: window#destroy; - button #grab_default (); - tooltips #set_tip button#coerce ~text:"Push this button to close window" - ~privat:"ContextHelp/buttons/Close"; - - window #show (); - - | Some window -> window #destroy () - in aux - - -(* Labels *) -let create_labels = - let rw = ref None in - let aux () = - match !rw with - | None -> - - let window = GWindow.window ~title:"Labels" ~border_width:5 () in - rw := Some window; - window #connect#destroy - ~callback:(fun _ -> rw := None); - - let hbox = GPack.hbox ~spacing:5 ~packing:window#add () in - let vbox = GPack.vbox ~spacing:5 ~packing:hbox#add () in - - let frame = GBin.frame ~label:"Normal Label" - ~packing:vbox#pack () in - GMisc.label ~text:"This is a normal label" ~packing:frame#add (); - - let frame = GBin.frame ~label:"Multi_line Label" - ~packing:vbox#pack () in - GMisc.label ~packing:frame#add - ~text:"This is a multi-line label.\nSecond line\nThird line" (); - - let frame = GBin.frame ~label:"Left Justified Label" - ~packing:vbox#pack () in - GMisc.label ~packing:frame#add ~justify:`LEFT - ~text:"This is a left justified\nmulti_line label\nThird line" (); - - let frame = GBin.frame ~label:"Right Justified Label" - ~packing:vbox#pack () in - GMisc.label ~packing:frame#add ~justify:`RIGHT - ~text:"This is a right justified\nmulti_line label\nThird line" (); - - let vbox = GPack.vbox ~spacing:5 ~packing:hbox#add () in - - let frame = GBin.frame ~label:"Line wrapped Label" - ~packing:vbox#pack () in - GMisc.label ~packing:frame#add ~line_wrap:true - ~text:"This is an example of a line-wrapped label. It should not be taking up the entire width allocated to it, but automatically wraps the words to fit. The time has come, for all good men, to come to the aid of their party. The sixth sheik's six sheep's sick.\n It supports multiple paragraphs correctly, and correctly adds many extra spaces. " (); - - let frame = GBin.frame ~label:"Underlined Label" - ~packing:vbox#pack () in - GMisc.label ~text:"This label is underlined!\nThis one is underlined in a quite a funky fashion" ~packing:frame#add - ~justify:`LEFT ~pattern:"_________________________ _ _________ _ _____ _ __ __ ___ ____ _____" (); - - window #show (); - - | Some window -> window #destroy () - in aux - - -(* reparent *) - - -let set_parent child old_parent = - let name_opt = function - | None -> "(NULL)" - | Some w -> w#misc#get_type in - Printf.printf - "set parent for \"%s\": new parent: \"%s\", old parent: \"%s\"\n" - child#misc#get_type - (match child#misc#parent with Some p -> p#misc#get_type | None -> "(NULL)") - (name_opt old_parent) - -let reparent_label (label : GMisc.label) new_parent _ = - label #misc#reparent new_parent - - - -let create_reparent = - let rw = ref None in - let aux () = - match !rw with - | None -> - - let window = GWindow.window ~title:"Reparent" ~border_width:5 () in - rw := Some window; - window #connect#destroy ~callback:(fun _ -> rw := None); - - let vbox = GPack.vbox ~packing:window#add () in - let hbox = GPack.hbox ~spacing:5 ~border_width:10 - ~packing:vbox#add () in - - let frame = GBin.frame ~label:"Frame1" ~packing:hbox#add () in - let vbox2 = GPack.vbox ~spacing:5 ~border_width:5 - ~packing:frame#add () in - let label = GMisc.label ~text:"Hello world" - ~packing:vbox2#pack () in - label #misc#connect#parent_set ~callback:(set_parent label); - let button = GButton.button ~label:"switch" - ~packing:vbox2#pack () in - button #connect#clicked ~callback:(reparent_label label vbox2#coerce); - - let frame = GBin.frame ~label:"Frame2" ~packing:hbox#add () in - let vbox2 = GPack.vbox ~spacing:5 ~packing:frame#add ~border_width:5 () in - let button = GButton.button ~label:"switch" - ~packing:vbox2#pack () in - button #connect#clicked ~callback:(reparent_label label vbox2#coerce); - - GMisc.separator `HORIZONTAL ~packing:vbox#pack (); - - let vbox = GPack.vbox ~spacing:10 ~border_width:10 - ~packing:vbox#pack () in - - let button = GButton.button ~label: "close" ~packing:vbox#add () in - button #connect#clicked ~callback: window#destroy; - button #grab_default (); - - window #show (); - - | Some window -> window #destroy () - in aux - - - - -let create_main_window () = - let buttons = [ - "button box", Some create_button_box; - "buttons", Some create_buttons; - "check buttons", Some create_check_buttons; - "clist", None; - "color selection", None; - "ctree", None; - "cursors", None; - "dialog", None; - "entry", None; - "event watcher", None; - "file selection", None; - "font selection", None; - "gamma curve", None; - "handle box", Some create_handle_box; - "item factory", None; - "labels", Some create_labels; - "layout", None; - "list", None; - "menus", Some create_menus; - "modal windows", Some create_modal_window; - "notebooks", None; - "panes", None; - "pixmap", None; - "preview color", None; - "preview gray", None; - "progress bar", None; - "radio buttons", Some create_radio_buttons; - "range controls", None; - "rc file", None; - "reparent", Some create_reparent; - "rulers", None; - "saved position", None; - "scrolled windows", Some create_scrolled_windows; - "shapes", None; - "spinbutton", None; - "statusbar", None; - "test idle", None; - "test mainloop", None; - "test scrolling", None; - "test selection", None; - "test timeout", None; - "text", None; - "toggle buttons", Some create_toggle_buttons; - "toolbar", Some create_toolbar; - "tooltips", Some create_tooltips; - "tree", Some create_tree_mode_window; - "WM hints", None - ] in - - let window = GWindow.window ~title:"main window" ~allow_shrink:false - ~allow_grow:false ~auto_shrink:false ~width:200 ~height:400 ~x:20 ~y:20 () in - - window #connect#destroy ~callback: Main.quit; - - let box1 = GPack.vbox ~packing: window#add () in - - GMisc.label ~text: "Gtk+ v1.2" ~packing:box1#pack (); - - let scrolled_window = GBin.scrolled_window ~border_width: 10 - ~hpolicy: `AUTOMATIC ~vpolicy: `AUTOMATIC - ~packing:box1#add () in - - let box2 = GPack.vbox ~border_width: 10 - ~packing:scrolled_window#add_with_viewport () in - box2 #focus#set_vadjustment (Some scrolled_window#vadjustment); - - let rec aux = function - | [] -> () - | (_, None) :: tl -> aux tl - | (label, Some func) :: tl -> - let button = GButton.button ~label: label ~packing: box2#add () in - button #connect#clicked ~callback: func; - aux tl - in aux buttons; - - GMisc.separator `HORIZONTAL ~packing: box1#pack (); - - let box2 = GPack.vbox ~spacing: 10 ~border_width: 10 - ~packing: box1#pack () in - - let button = GButton.button ~label: "close" ~packing: box2#add () in - button #connect#clicked ~callback: window#destroy; - button #grab_default (); - - window #show (); - - Main.main () - -let _ = create_main_window () - diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/testinput.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/testinput.ml deleted file mode 100644 index a6aceb825..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/testinput.ml +++ /dev/null @@ -1,43 +0,0 @@ -(* $Id$ *) - -open GMain - -let main () = - let window = GWindow.window () in - window#misc#set_name "Test input"; - window#connect#destroy ~callback:Main.quit; - - let vbox = GPack.vbox ~packing:window#add () in - - let drawing_area = - GMisc.drawing_area ~width:200 ~height:200 ~packing:vbox#add () in - - drawing_area#event#connect#key_press ~callback: - begin fun ev -> - let key = GdkEvent.Key.keyval ev in - if key >= 32 && key < 256 then - Printf.printf "I got a %c\n" (Char.chr key) - else - print_string "I got another key\n"; - flush stdout; - true - end; - - drawing_area#event#add - [`EXPOSURE;`LEAVE_NOTIFY;`BUTTON_PRESS; - `POINTER_MOTION;`POINTER_MOTION_HINT;`PROXIMITY_OUT]; - drawing_area#event#set_extensions `ALL; - drawing_area#misc#set_can_focus true; - drawing_area#misc#grab_focus (); - - GButton.button ~label:"Input Dialog" ~packing:vbox#pack (); - - let button = - GButton.button ~label:"Quit" ~packing:vbox#pack () in - - button#connect#clicked ~callback:window#destroy; - - window#show (); - Main.main () - -let _ = main () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/tictactoe.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/tictactoe.ml deleted file mode 100644 index be01e19b9..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/tictactoe.ml +++ /dev/null @@ -1,113 +0,0 @@ -(* $Id$ *) - -open GtkNew -open GtkBase - -(* To create a new widget: - create an array sig_array containing the signals defined by - the new widget; - call: - make_new_widget name parent:parent signal_array:sig_array - where name is the name of the new widget (a string) - parent is the type of the parent: of type Gtk.New.object_type - This call returns a triple: - (get_type_func, new_func, sig_array_num) - where get_type_func is the new widget get_type function, - new_func is the function returning a new widget of the new type - sig_array_num is an array containing the Gtk id of the signals - of the new widget. -*) - -module Tictactoe = struct - type t = [`widget|`container|`box|`tictactoe] - module Signals = struct - open GtkSignal - let tictactoe : ([>`tictactoe],_) t = - { name = "tictactoe"; marshaller = marshal_unit } - let emit_tictactoe = emit_unit ~sgn:tictactoe - end - let create : unit -> t Gtk.obj = - let _,tictactoe_new = make_new_widget - ~name:"Tictactoe" ~parent:VBOX ~signals:[Signals.tictactoe] - in fun () -> Object.try_cast (tictactoe_new ()) "Tictactoe" -end - -open GMain - -class tictactoe_signals obj = object - inherit GContainer.container_signals obj - method tictactoe = - GtkSignal.connect ~sgn:Tictactoe.Signals.tictactoe obj ~after -end - -exception Trouve - -class tictactoe ?packing ?show () = - let obj : Tictactoe.t Gtk.obj = Tictactoe.create () in - let box = new GPack.box_skel obj in -object (self) - inherit GObj.widget obj - val mutable buttons = [||] - val mutable buttons_handlers = [||] - val label = GMisc.label ~text:"Go on!" ~packing:box#add () - method clear () = - for i = 0 to 2 do - for j = 0 to 2 do - let button = buttons.(i).(j) - and handler = buttons_handlers.(i).(j) in - button#misc#handler_block handler; - button#set_active false; - button#misc#handler_unblock handler - done - done - method connect = new tictactoe_signals obj - method emit_tictactoe () = - GtkSignal.emit_unit obj ~sgn:Tictactoe.Signals.tictactoe - method toggle () = - let rwins = [| [| 0; 0; 0 |]; [| 1; 1; 1 |]; [| 2; 2; 2 |]; - [| 0; 1; 2 |]; [| 0; 1; 2 |]; [| 0; 1; 2 |]; - [| 0; 1; 2 |]; [| 0; 1; 2 |] |] - and cwins = [| [| 0; 1; 2 |]; [| 0; 1; 2 |]; [| 0; 1; 2 |]; - [| 0; 0; 0 |]; [| 1; 1; 1 |]; [| 2; 2; 2 |]; - [| 0; 1; 2 |]; [| 2; 1; 0 |] |] in - label#set_text"Go on!"; - try - for k = 0 to 7 do - let rec aux i = - (i = 3) || - (buttons.(rwins.(k).(i)).(cwins.(k).(i))#active) && (aux (i+1)) in - if aux 0 then raise Trouve - done - with Trouve -> label#set_text "Win!!"; self#emit_tictactoe () - - initializer - let table = - GPack.table ~rows:3 ~columns:3 ~homogeneous:true ~packing:box#add () in - buttons <- - Array.init 3 ~f: - (fun i -> Array.init 3 ~f: - (fun j -> - GButton.toggle_button ~width:20 ~height:20 - ~packing:(table#attach ~left:i ~top:j ~expand:`BOTH) ())); - buttons_handlers <- - Array.mapi buttons ~f: - (fun i -> Array.mapi ~f: - (fun j button -> button #connect#toggled ~callback:self#toggle)); - GObj.pack_return self ~packing ~show; - () -end - -let win (ttt : tictactoe) _ = - Printf.printf "Gagne!!\n" ; - ttt #clear () - -let essai () = - let window = GWindow.window ~title:"Tictactoe" ~border_width:10 () in - window #connect#destroy ~callback:Main.quit; - let ttt = new tictactoe ~packing:window#add () in - ttt #connect#tictactoe ~callback:(win ttt); - window #show (); - Main.main () - -let _ = essai () - diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/tron.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/tron.ml deleted file mode 100644 index eced44a9c..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/tron.ml +++ /dev/null @@ -1,204 +0,0 @@ -(* $Id$ *) - -(* Tron? Game *) -open GMain - -let m_pi = acos (-1.) -let clRed = `NAME "red" (* `BLACK *) -let clBlue = `NAME "blue" (* `WHITE *) -let clBlack = `BLACK - -type point = {mutable x: int; mutable y: int} - -let main () = -(* Game State *) - let gameSize = 64 in - let gameState = - Array.create_matrix ~dimx:(gameSize+2) ~dimy:(gameSize+2) 0 in - let gameInit _ = - for i=1 to gameSize do - for j=1 to gameSize do - gameState.(i).(j) <- 0; - done - done; - for i=0 to gameSize do - gameState.(0).(i) <- 3; (* left wall *) - gameState.(i).(gameSize+1) <- 3; (* floor *) - gameState.(gameSize+1).(i+1) <- 3; (* right wall *) - gameState.(i+1).(0) <- 3 (* ceiling *) - done in - gameInit (); - let lpos = {x=4; y=4} in - let lspeed = {x=0; y=1} in - let rpos = {x=gameSize-3; y=gameSize-3} in - let rspeed = {x=0; y= -1} in - let keys = "asdfhjkl" in - let keyMapL = [|(-1, 0); (0, -1); (0, 1); (1, 0)|] in - let keyMapR = [|(-1, 0); (0, 1); (0, -1); (1, 0)|] in - -(* User Interface *) - let window = GWindow.window ~border_width:10 ~title:"tron(?)" () in - window#event#connect#delete - ~callback:(fun _ -> prerr_endline "Delete event occured"; false); - window#connect#destroy ~callback:Main.quit; - let vbx = GPack.vbox ~packing:window#add () in - let area = GMisc.drawing_area ~width:((gameSize+2)*4) ~height:((gameSize+2)*4) - ~packing:vbx#add () in - let drawing = area#misc#realize (); new GDraw.drawable (area#misc#window) in - let style = area#misc#style#copy in - style#set_bg [`NORMAL,`WHITE]; - area#misc#set_style style; - drawing#set_background `WHITE; - let area_expose _ = - for i=0 to gameSize+1 do - for j=0 to gameSize+1 do - if gameState.(i).(j) = 1 then begin - drawing#set_foreground clRed; - drawing#rectangle ~filled:true ~x:(i*4) ~y:(j*4) ~width:4 ~height:4 () - end - else if gameState.(i).(j) = 2 then begin - drawing#set_foreground clBlue; - drawing#rectangle ~filled:true ~x:(i*4) ~y:(j*4) ~width:4 ~height:4 () - end - else if gameState.(i).(j) = 3 then begin - drawing#set_foreground clBlack; - drawing#rectangle ~filled:true ~x:(i*4) ~y:(j*4) ~width:4 ~height:4 () - end - done - done; - false - in - area#event#connect#expose ~callback:area_expose; - let control = GPack.table ~rows:3 ~columns:7 ~packing:vbx#pack () in - - let abuttonClicked num (lbl : GMisc.label) _ = begin - let dialog = - GWindow.window ~kind:`DIALOG ~border_width:10 ~title:"Key remap" () in - let dvbx = GPack.box `VERTICAL ~packing:dialog#add () in - let entry = GEdit.entry ~max_length:1 ~packing: dvbx#add () in - let txt = String.make 1 keys.[num] in - entry#set_text txt; - let dquit = GButton.button ~label:"OK" ~packing: dvbx#add () in - dquit#connect#clicked ~callback: - begin fun _ -> - let chr = entry#text.[0] in - let txt2 = String.make 1 chr in - lbl#set_text txt2; - keys.[num]<-chr; - dialog#destroy () - end; - dialog#show () - end in - let attach = control#attach ~expand:`BOTH in - let new_my_button ~label:label ~left:left ~top:top = - let str = String.make 1 keys.[label] in - let btn = GButton.button ~packing:(attach ~left:left ~top:top) () in - let lbl = GMisc.label ~text:str ~packing:(btn#add) () in - btn#connect#clicked ~callback:(abuttonClicked label lbl); - btn - in - new_my_button ~label:0 ~left:1 ~top:2; - new_my_button ~label:1 ~left:2 ~top:1; - new_my_button ~label:2 ~left:2 ~top:3; - new_my_button ~label:3 ~left:3 ~top:2; - new_my_button ~label:4 ~left:5 ~top:2; - new_my_button ~label:5 ~left:6 ~top:3; - new_my_button ~label:6 ~left:6 ~top:1; - new_my_button ~label:7 ~left:7 ~top:2; - let quit = - GButton.button ~label:"Quit" ~packing:(attach ~left:4 ~top:2) () in - quit#connect#clicked ~callback:window#destroy; - let message = GMisc.label ~text:"tron(?) game" ~packing:vbx#pack () in - - let game_step () = - let lx = lpos.x in let ly = lpos.y in - gameState.(lx).(ly) <- 1; - drawing#set_foreground clRed; - drawing#rectangle ~filled:true ~x:(lx*4) ~y:(ly*4) ~width:4 ~height:4 (); - let rx = rpos.x in let ry = rpos.y in - gameState.(rx).(ry) <- 2; - drawing#set_foreground clBlue; - drawing#rectangle ~filled:true ~x:(rx*4) ~y:(ry*4) ~width:4 ~height:4 () - in - game_step (); - let keyDown ev = begin - let key = GdkEvent.Key.keyval ev in - for i=0 to (Array.length keyMapL)-1 do - let (x, y) = keyMapL.(i) in - let k = keys.[i] in - if key = Char.code k then begin - lspeed.x <- x; - lspeed.y <- y - end; - let (x, y) = keyMapR.(i) in - let k = keys.[i+4] in - if key = Char.code k then begin - rspeed.x <- x; - rspeed.y <- y - end - done; - false end in - window#event#connect#key_press ~callback:keyDown; - let safe_check _ = - if lpos.x == rpos.x && lpos.y == rpos.y then - 3 - else - (* player 1 *) - (if gameState.(lpos.x).(lpos.y) != 0 then 2 else 0) - + - (* player 2 *) - (if gameState.(rpos.x).(rpos.y) != 0 then 1 else 0) - in - let timerID = ref (* dummy *) (Timeout.add ~ms:100 ~callback:(fun _ -> true)) in - let timerTimer _ = begin - lpos.x <- lpos.x+lspeed.x; - lpos.y <- lpos.y+lspeed.y; - rpos.x <- rpos.x+rspeed.x; - rpos.y <- rpos.y+rspeed.y; - let result = safe_check() in - if result!=0 then begin - Timeout.remove (!timerID); - message#set_text ("player "^string_of_int result^" won.") - end - else begin - game_step() - end; - true - end in - let count = ref 3 in - let timerTimer2 _ = begin -(* message#set_label (string_of_int (!count)); *) - if (!count==0) then begin - Timeout.remove (!timerID); - timerID := Timeout.add ~ms:100 ~callback:timerTimer - end - else begin - count := !count-1; - end; - true - end in - let restartClicked () = - Timeout.remove !timerID; - gameInit(); - lpos.x <- 4; lpos.y <- 4; - lspeed.x <- 0; lspeed.y <- 1; - rpos.x <- gameSize-3; rpos.y <- gameSize-3; - rspeed.x <- 0; rspeed.y <- -1; - drawing#set_foreground `WHITE; - drawing#rectangle ~filled:true ~x:0 ~y:0 - ~width:((gameSize+2)*4) ~height:((gameSize+2)*4) (); - area_expose(); - count := 3; - timerID := Timeout.add ~ms:300 ~callback:timerTimer2; - in - let restart = - GButton.button ~label: "Restart" ~packing:(attach ~left:4 ~top:3) () in - restart#connect#clicked ~callback:restartClicked; - restartClicked (); - - window#show (); - Main.main () - -let _ = Printexc.print main () - - diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/xmhtml/test.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/xmhtml/test.ml deleted file mode 100644 index 6c9d3715a..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/examples/xmhtml/test.ml +++ /dev/null @@ -1,38 +0,0 @@ -(* $Id$ *) - -let test_string2 = String.concat ~sep:"" [ - "\n"; - "The Gtk/XmHTML test\n"; - "This is the Gtk/XmHTML test program

\n"; - "You can invoke this program with a command line argument, like this:\n"; - "


"; - "./xtest filename.html"; - "
"; - "Click here to load a different test message"; - ""; -] - -let read_file file = - let ic = open_in file in - let b = Buffer.create 16384 and s = String.create 1024 and len = ref 0 in - while len := input ic ~buf:s ~pos:0 ~len:1024; !len > 0 do - Buffer.add_substring b s ~pos:0 ~len:!len - done; - Buffer.contents b - -open GMain - -let _ = - let w = GWindow.window ~width:600 ~height:500 () in - w#connect#destroy ~callback:Main.quit; - let source = - if Array.length Sys.argv > 1 then begin - Sys.chdir (Filename.dirname Sys.argv.(1)); - read_file (Filename.basename Sys.argv.(1)) - end - else test_string2 in - let html = GHtml.xmhtml ~source ~packing:w#add () in - html#set_anchor_buttons false; - html#set_anchor_underline [`SINGLE;`DASHED]; - w#show (); - Main.main () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gBin.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gBin.ml deleted file mode 100644 index f248ba0f8..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gBin.ml +++ /dev/null @@ -1,153 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gtk -open GtkBase -open GtkBin -open GObj -open GContainer - -class scrolled_window obj = object - inherit container_full (obj : Gtk.scrolled_window obj) - method hadjustment = - new GData.adjustment (ScrolledWindow.get_hadjustment obj) - method vadjustment = - new GData.adjustment (ScrolledWindow.get_vadjustment obj) - method set_hadjustment adj = - ScrolledWindow.set_hadjustment obj (GData.as_adjustment adj) - method set_vadjustment adj = - ScrolledWindow.set_vadjustment obj (GData.as_adjustment adj) - method set_hpolicy hpolicy = ScrolledWindow.set_policy' obj ~hpolicy - method set_vpolicy vpolicy = ScrolledWindow.set_policy' obj ~vpolicy - method set_placement = ScrolledWindow.set_placement obj - method add_with_viewport w = - ScrolledWindow.add_with_viewport obj (as_widget w) -end - -let scrolled_window ?hadjustment ?vadjustment ?hpolicy ?vpolicy - ?placement ?border_width ?width ?height ?packing ?show () = - let w = - ScrolledWindow.create () - ?hadjustment:(may_map ~f:GData.as_adjustment hadjustment) - ?vadjustment:(may_map ~f:GData.as_adjustment vadjustment) in - ScrolledWindow.set w ?hpolicy ?vpolicy ?placement; - Container.set w ?border_width ?width ?height; - pack_return (new scrolled_window w) ~packing ~show - -class event_box obj = object - inherit container_full (obj : Gtk.event_box obj) - method event = new GObj.event_ops obj -end - -let event_box ?border_width ?width ?height ?packing ?show () = - let w = EventBox.create () in - Container.set w ?border_width ?width ?height; - pack_return (new event_box w) ~packing ~show - -class handle_box_signals obj = object - inherit container_signals obj - method child_attached ~callback = - GtkSignal.connect ~sgn:HandleBox.Signals.child_attached obj ~after - ~callback:(fun obj -> callback (new widget obj)) - method child_detached ~callback = - GtkSignal.connect ~sgn:HandleBox.Signals.child_detached obj ~after - ~callback:(fun obj -> callback (new widget obj)) -end - -class handle_box obj = object - inherit container (obj : Gtk.handle_box obj) - method set_shadow_type = HandleBox.set_shadow_type obj - method set_handle_position = HandleBox.set_handle_position obj - method set_snap_edge = HandleBox.set_snap_edge obj - method connect = new handle_box_signals obj - method event = new GObj.event_ops obj -end - -let handle_box ?border_width ?width ?height ?packing ?show () = - let w = HandleBox.create () in - let () = Container.set w ?border_width ?width ?height in - pack_return (new handle_box w) ~packing ~show - -class frame_skel obj = object - inherit container obj - method set_label = Frame.set_label obj - method set_label_align ?x ?y () = Frame.set_label_align' obj ?x ?y - method set_shadow_type = Frame.set_shadow_type obj -end - -class frame obj = object - inherit frame_skel (Frame.coerce obj) - method connect = new container_signals obj -end - -let frame ?(label="") ?label_xalign ?label_yalign ?shadow_type - ?border_width ?width ?height ?packing ?show () = - let w = Frame.create label in - Frame.set w ?label_xalign ?label_yalign ?shadow_type; - Container.set w ?border_width ?width ?height; - pack_return (new frame w) ~packing ~show - -class aspect_frame obj = object - inherit frame_skel (obj : Gtk.aspect_frame obj) - method connect = new container_signals obj - method set_alignment ?x ?y () = AspectFrame.set obj ?xalign:x ?yalign:y - method set_ratio ratio = AspectFrame.set obj ~ratio - method set_obey_child obey_child = AspectFrame.set obj ~obey_child -end - -let aspect_frame ?label ?xalign ?yalign ?ratio ?obey_child - ?label_xalign ?label_yalign ?shadow_type - ?border_width ?width ?height ?packing ?show () = - let w = - AspectFrame.create ?label ?xalign ?yalign ?ratio ?obey_child () in - Frame.set w ?label_xalign ?label_yalign ?shadow_type; - Container.set w ?border_width ?width ?height; - pack_return (new aspect_frame w) ~packing ~show - -class viewport obj = object - inherit container_full (obj : Gtk.viewport obj) - method event = new event_ops obj - method set_hadjustment adj = - Viewport.set_hadjustment obj (GData.as_adjustment adj) - method set_vadjustment adj = - Viewport.set_vadjustment obj (GData.as_adjustment adj) - method set_shadow_type = Viewport.set_shadow_type obj - method hadjustment = new GData.adjustment (Viewport.get_hadjustment obj) - method vadjustment = new GData.adjustment (Viewport.get_vadjustment obj) -end - -let viewport ?hadjustment ?vadjustment ?shadow_type - ?border_width ?width ?height ?packing ?show () = - let w = Viewport.create () - ?hadjustment:(may_map ~f:GData.as_adjustment hadjustment) - ?vadjustment:(may_map ~f:GData.as_adjustment vadjustment) in - may shadow_type ~f:(Viewport.set_shadow_type w); - Container.set w ?border_width ?width ?height; - pack_return (new viewport w) ~packing ~show - -class alignment obj = object - inherit container_full (obj : Gtk.alignment obj) - method set_alignment ?x ?y () = Alignment.set ?x ?y obj - method set_scale ?x ?y () = Alignment.set ?xscale:x ?yscale:y obj -end - -let alignment ?x ?y ?xscale ?yscale - ?border_width ?width ?height ?packing ?show () = - let w = Alignment.create ?x ?y ?xscale ?yscale () in - Container.set w ?border_width ?width ?height; - pack_return (new alignment w) ~packing ~show - -let alignment_cast w = new alignment (Alignment.cast w#as_widget) - -class socket obj = object (self) - inherit container_full (obj : Gtk.socket obj) - method steal = Socket.steal obj - method xwindow = - self#misc#realize (); - Gdk.Window.get_xwindow self#misc#window -end - -let socket ?border_width ?width ?height ?packing ?show () = - let w = Socket.create () in - Container.set w ?border_width ?width ?height; - pack_return (new socket w) ?packing ?show diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gBin.mli b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gBin.mli deleted file mode 100644 index 9593650c3..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gBin.mli +++ /dev/null @@ -1,163 +0,0 @@ -(* $Id$ *) - -open Gtk -open GObj -open GContainer - -class scrolled_window : Gtk.scrolled_window obj -> - object - inherit container_full - val obj : Gtk.scrolled_window obj - method add_with_viewport : widget -> unit - method hadjustment : GData.adjustment - method set_hadjustment : GData.adjustment -> unit - method set_hpolicy : Tags.policy_type -> unit - method set_placement : Tags.corner_type -> unit - method set_vadjustment : GData.adjustment -> unit - method set_vpolicy : Tags.policy_type -> unit - method vadjustment : GData.adjustment - end -val scrolled_window : - ?hadjustment:GData.adjustment -> - ?vadjustment:GData.adjustment -> - ?hpolicy:Tags.policy_type -> - ?vpolicy:Tags.policy_type -> - ?placement:Tags.corner_type -> - ?border_width:int -> - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> scrolled_window - -class event_box : Gtk.event_box obj -> - object - inherit container_full - val obj : Gtk.event_box obj - method event : event_ops - end -val event_box : - ?border_width:int -> - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> event_box - -class handle_box_signals : 'a obj -> - object - inherit container_signals - constraint 'a = [>`handlebox|`container|`widget] - val obj : 'a obj - method child_attached : callback:(widget -> unit) -> GtkSignal.id - method child_detached : callback:(widget -> unit) -> GtkSignal.id - end - -class handle_box : Gtk.handle_box obj -> - object - inherit container - val obj : Gtk.handle_box obj - method event : event_ops - method connect : handle_box_signals - method set_handle_position : Tags.position -> unit - method set_shadow_type : Tags.shadow_type -> unit - method set_snap_edge : Tags.position -> unit - end -val handle_box : - ?border_width:int -> - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> handle_box - -class frame_skel : 'a obj -> - object - inherit container - constraint 'a = [>`frame|`container|`widget] - val obj : 'a obj - method set_label : string -> unit - method set_label_align : ?x:clampf -> ?y:clampf -> unit -> unit - method set_shadow_type : Tags.shadow_type -> unit - end -class frame : [>`frame] obj -> - object - inherit frame_skel - val obj : Gtk.frame obj - method connect : GContainer.container_signals - end -val frame : - ?label:string -> - ?label_xalign:clampf -> - ?label_yalign:clampf -> - ?shadow_type:Tags.shadow_type -> - ?border_width:int -> - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> frame - -class aspect_frame : Gtk.aspect_frame obj -> - object - inherit frame - val obj : Gtk.aspect_frame obj - method set_alignment : ?x:clampf -> ?y:clampf -> unit -> unit - method set_obey_child : bool -> unit - method set_ratio : clampf -> unit - end -val aspect_frame : - ?label:string -> - ?xalign:clampf -> - ?yalign:clampf -> - ?ratio:float -> - ?obey_child:bool -> - ?label_xalign:clampf -> - ?label_yalign:clampf -> - ?shadow_type:Tags.shadow_type -> - ?border_width:int -> - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> aspect_frame - -class viewport : Gtk.viewport obj -> - object - inherit container_full - val obj : Gtk.viewport obj - method event : event_ops - method hadjustment : GData.adjustment - method set_hadjustment : GData.adjustment -> unit - method set_shadow_type : Gtk.Tags.shadow_type -> unit - method set_vadjustment : GData.adjustment -> unit - method vadjustment : GData.adjustment - end -val viewport : - ?hadjustment:GData.adjustment -> - ?vadjustment:GData.adjustment -> - ?shadow_type:Tags.shadow_type -> - ?border_width:int -> - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> viewport - -class alignment : Gtk.alignment obj -> - object - inherit container_full - val obj : Gtk.alignment obj - method set_alignment : ?x:Gtk.clampf -> ?y:Gtk.clampf -> unit -> unit - method set_scale : ?x:Gtk.clampf -> ?y:Gtk.clampf -> unit -> unit - end -val alignment : - ?x:Gtk.clampf -> - ?y:Gtk.clampf -> - ?xscale:Gtk.clampf -> - ?yscale:Gtk.clampf -> - ?border_width:int -> - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> alignment -val alignment_cast : < as_widget : 'a obj; .. > -> alignment - -class socket : Gtk.socket obj -> - object - inherit container_full - val obj : Gtk.socket obj - method steal : Gdk.xid -> unit - method xwindow : Gdk.xid - end - -val socket : - ?border_width:int -> ?width:int -> ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> socket diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gButton.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gButton.ml deleted file mode 100644 index 08ac70445..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gButton.ml +++ /dev/null @@ -1,124 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gtk -open GtkBase -open GtkButton -open GObj -open GContainer - -class button_skel obj = object (self) - inherit container obj - method clicked () = Button.clicked obj - method grab_default () = - Widget.set_can_default obj true; - Widget.grab_default obj -end - -class button_signals obj = object - inherit container_signals obj - method clicked = GtkSignal.connect ~sgn:Button.Signals.clicked ~after obj - method pressed = GtkSignal.connect ~sgn:Button.Signals.pressed ~after obj - method released = GtkSignal.connect ~sgn:Button.Signals.released ~after obj - method enter = GtkSignal.connect ~sgn:Button.Signals.enter ~after obj - method leave = GtkSignal.connect ~sgn:Button.Signals.leave ~after obj -end - -class button obj = object - inherit button_skel (Button.coerce obj) - method connect = new button_signals obj - method event = new GObj.event_ops obj -end - -let button ?label ?border_width ?width ?height ?packing ?show () = - let w = Button.create ?label () in - Container.set w ?border_width ?width ?height; - pack_return (new button w) ~packing ~show - -class toggle_button_signals obj = object - inherit button_signals obj - method toggled = - GtkSignal.connect ~sgn:ToggleButton.Signals.toggled obj ~after -end - -class toggle_button obj = object - inherit button_skel obj - method connect = new toggle_button_signals obj - method active = ToggleButton.get_active obj - method set_active = ToggleButton.set_active obj - method set_draw_indicator = ToggleButton.set_mode obj -end - -let toggle_button ?label ?active ?draw_indicator - ?border_width ?width ?height ?packing ?show () = - let w = ToggleButton.create_toggle ?label () in - ToggleButton.set w ?active ?draw_indicator; - Container.set w ?border_width ?width ?height; - pack_return (new toggle_button w) ~packing ~show - -let check_button ?label ?active ?draw_indicator - ?border_width ?width ?height ?packing ?show () = - let w = ToggleButton.create_check ?label () in - ToggleButton.set w ?active ?draw_indicator; - Container.set w ?border_width ?width ?height; - pack_return (new toggle_button w) ~packing ~show - -class radio_button obj = object - inherit toggle_button (obj : Gtk.radio_button obj) - method set_group = RadioButton.set_group obj - method group = Some obj -end - -let radio_button ?group ?label ?active ?draw_indicator - ?border_width ?width ?height ?packing ?show () = - let w = RadioButton.create ?group ?label () in - ToggleButton.set w ?active ?draw_indicator; - Container.set w ?border_width ?width ?height; - pack_return (new radio_button w) ~packing ~show - -class toolbar obj = object - inherit container_full (obj : Gtk.toolbar obj) - method insert_widget ?tooltip ?tooltip_private ?pos w = - Toolbar.insert_widget obj (as_widget w) ?tooltip ?tooltip_private ?pos - - method insert_button ?text ?tooltip ?tooltip_private ?icon - ?pos ?callback () = - let icon = may_map icon ~f:as_widget in - new button - (Toolbar.insert_button obj ~kind:`BUTTON ?icon ?text - ?tooltip ?tooltip_private ?pos ?callback ()) - - method insert_toggle_button ?text ?tooltip ?tooltip_private ?icon - ?pos ?callback () = - let icon = may_map icon ~f:as_widget in - new toggle_button - (ToggleButton.cast - (Toolbar.insert_button obj ~kind:`TOGGLEBUTTON ?icon ?text - ?tooltip ?tooltip_private ?pos ?callback ())) - - method insert_radio_button ?text ?tooltip ?tooltip_private ?icon - ?pos ?callback () = - let icon = may_map icon ~f:as_widget in - new radio_button - (RadioButton.cast - (Toolbar.insert_button obj ~kind:`RADIOBUTTON ?icon ?text - ?tooltip ?tooltip_private ?pos ?callback ())) - - method insert_space = Toolbar.insert_space obj - - method set_orientation = Toolbar.set_orientation obj - method set_style = Toolbar.set_style obj - method set_space_size = Toolbar.set_space_size obj - method set_space_style = Toolbar.set_space_style obj - method set_tooltips = Toolbar.set_tooltips obj - method set_button_relief = Toolbar.set_button_relief obj - method button_relief = Toolbar.get_button_relief obj -end - -let toolbar ?(orientation=`HORIZONTAL) ?style - ?space_size ?space_style ?tooltips ?button_relief - ?border_width ?width ?height ?packing ?show () = - let w = Toolbar.create orientation ?style () in - Toolbar.set w ?space_size ?space_style ?tooltips ?button_relief; - Container.set w ?border_width ?width ?height; - pack_return (new toolbar w) ~packing ~show diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gButton.mli b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gButton.mli deleted file mode 100644 index ee2653da1..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gButton.mli +++ /dev/null @@ -1,144 +0,0 @@ -(* $Id$ *) - -open Gtk -open GObj -open GContainer - -class button_skel : - 'a obj -> - object - inherit container - constraint 'a = [>`widget|`button|`container] - val obj : 'a obj - method clicked : unit -> unit - method grab_default : unit -> unit - end -class button_signals : - 'b obj -> - object ('a) - inherit container_signals - constraint 'b = [>`button|`container|`widget] - val obj : 'b obj - method clicked : callback:(unit -> unit) -> GtkSignal.id - method enter : callback:(unit -> unit) -> GtkSignal.id - method leave : callback:(unit -> unit) -> GtkSignal.id - method pressed : callback:(unit -> unit) -> GtkSignal.id - method released : callback:(unit -> unit) -> GtkSignal.id - end - -class button : - [>`button] obj -> - object - inherit button_skel - val obj : Gtk.button obj - method event : event_ops - method connect : button_signals - end -val button : - ?label:string -> - ?border_width:int -> - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> button - -class toggle_button_signals : - 'b obj -> - object ('a) - inherit button_signals - constraint 'b = [>`toggle|`button|`container|`widget] - val obj : 'b obj - method toggled : callback:(unit -> unit) -> GtkSignal.id - end - -class toggle_button : - 'a obj -> - object - inherit button_skel - constraint 'a = [>`toggle|`button|`container|`widget] - val obj : 'a obj - method active : bool - method connect : toggle_button_signals - method set_active : bool -> unit - method set_draw_indicator : bool -> unit - end -val toggle_button : - ?label:string -> - ?active:bool -> - ?draw_indicator:bool -> - ?border_width:int -> - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> toggle_button -val check_button : - ?label:string -> - ?active:bool -> - ?draw_indicator:bool -> - ?border_width:int -> - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> toggle_button - -class radio_button : - Gtk.radio_button obj -> - object - inherit toggle_button - val obj : Gtk.radio_button obj - method group : Gtk.radio_button group - method set_group : Gtk.radio_button group -> unit - end -val radio_button : - ?group:Gtk.radio_button group -> - ?label:string -> - ?active:bool -> - ?draw_indicator:bool -> - ?border_width:int -> - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> radio_button - -class toolbar : - Gtk.toolbar obj -> - object - inherit container_full - val obj : Gtk.toolbar obj - method button_relief : Tags.relief_style - method insert_button : - ?text:string -> - ?tooltip:string -> - ?tooltip_private:string -> - ?icon:widget -> - ?pos:int -> ?callback:(unit -> unit) -> unit -> button - method insert_radio_button : - ?text:string -> - ?tooltip:string -> - ?tooltip_private:string -> - ?icon:widget -> - ?pos:int -> ?callback:(unit -> unit) -> unit -> radio_button - method insert_space : ?pos:int -> unit -> unit - method insert_toggle_button : - ?text:string -> - ?tooltip:string -> - ?tooltip_private:string -> - ?icon:widget -> - ?pos:int -> ?callback:(unit -> unit) -> unit -> toggle_button - method insert_widget : - ?tooltip:string -> - ?tooltip_private:string -> ?pos:int -> widget -> unit - method set_button_relief : Tags.relief_style -> unit - method set_orientation : Tags.orientation -> unit - method set_space_size : int -> unit - method set_space_style : [`EMPTY|`LINE] -> unit - method set_style : Tags.toolbar_style -> unit - method set_tooltips : bool -> unit - end -val toolbar : - ?orientation:Tags.orientation -> - ?style:Tags.toolbar_style -> - ?space_size:int -> - ?space_style:[`EMPTY|`LINE] -> - ?tooltips:bool -> - ?button_relief:Tags.relief_style -> - ?border_width:int -> - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> toolbar diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gContainer.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gContainer.ml deleted file mode 100644 index 2ea765e83..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gContainer.ml +++ /dev/null @@ -1,75 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gtk -open GtkBase -open GObj -open GData - -class focus obj = object - val obj = obj - method circulate = Container.focus obj - method set (child : widget option) = - let child = may_map child ~f:(fun x -> x#as_widget) in - Container.set_focus_child obj (Gpointer.optboxed child) - method set_hadjustment adj = - Container.set_focus_hadjustment obj - (Gpointer.optboxed (may_map adj ~f:as_adjustment)) - method set_vadjustment adj = - Container.set_focus_vadjustment obj - (Gpointer.optboxed (may_map adj ~f:as_adjustment)) -end - -class container obj = object (self) - inherit widget obj - method add w = - (* Hack to avoid creating a bin class *) - if GtkBase.Object.is_a obj "GtkBin" && Container.children obj <> [] then - raise (Gtk.Error "GContainer.container#add: already full"); - Container.add obj (as_widget w) - method remove w = Container.remove obj (as_widget w) - method children = List.map ~f:(new widget) (Container.children obj) - method set_border_width = Container.set_border_width obj - method focus = new focus obj -end - -class container_signals obj = object - inherit widget_signals obj - method add ~callback = - GtkSignal.connect ~sgn:Container.Signals.add obj ~after - ~callback:(fun w -> callback (new widget w)) - method remove ~callback = - GtkSignal.connect ~sgn:Container.Signals.remove obj ~after - ~callback:(fun w -> callback (new widget w)) -end - -class container_full obj = object - inherit container obj - method connect = new container_signals obj -end - -let cast_container (w : widget) = - new container_full (GtkBase.Container.cast w#as_widget) - -class virtual ['a] item_container obj = object (self) - inherit widget obj - method add (w : 'a) = - Container.add obj w#as_item - method remove (w : 'a) = - Container.remove obj w#as_item - method private virtual wrap : Gtk.widget obj -> 'a - method children : 'a list = - List.map ~f:self#wrap (Container.children obj) - method set_border_width = Container.set_border_width obj - method focus = new focus obj - method virtual insert : 'a -> pos:int -> unit - method append (w : 'a) = self#insert w ~pos:(-1) - method prepend (w : 'a) = self#insert w ~pos:0 -end - -class item_signals obj = object - inherit container_signals obj - method select = GtkSignal.connect ~sgn:Item.Signals.select obj ~after - method deselect = GtkSignal.connect ~sgn:Item.Signals.deselect obj ~after - method toggle = GtkSignal.connect ~sgn:Item.Signals.toggle obj ~after -end diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gContainer.mli b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gContainer.mli deleted file mode 100644 index 290982942..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gContainer.mli +++ /dev/null @@ -1,79 +0,0 @@ -(* $Id$ *) - -open Gtk -open GObj - -class focus : - 'a obj -> - object - constraint 'a = [>`container] - val obj : 'a obj - method circulate : Tags.direction_type -> bool - method set : widget option -> unit - method set_hadjustment : GData.adjustment option -> unit - method set_vadjustment : GData.adjustment option -> unit - end - -class container : - 'a obj -> - object - inherit widget - constraint 'a = [>`container|`widget] - val obj : 'a obj - method add : widget -> unit - method children : widget list - method remove : widget -> unit - method focus : focus - method set_border_width : int -> unit - end - -class container_signals : - 'a obj -> - object - inherit widget_signals - constraint 'a = [>`container|`widget] - val obj : 'a obj - method add : callback:(widget -> unit) -> GtkSignal.id - method remove : callback:(widget -> unit) -> GtkSignal.id - end - -class container_full : - 'a obj -> - object - inherit container - constraint 'a = [>`container|`widget] - val obj : 'a obj - method connect : container_signals - end - -val cast_container : widget -> container_full -(* may raise [Gtk.Cannot_cast "GtkContainer"] *) - -class virtual ['a] item_container : - 'c obj -> - object - constraint 'a = < as_item : [>`widget] obj; .. > - constraint 'c = [>`container|`widget] - inherit widget - val obj : 'c obj - method add : 'a -> unit - method append : 'a -> unit - method children : 'a list - method virtual insert : 'a -> pos:int -> unit - method prepend : 'a -> unit - method remove : 'a -> unit - method focus : focus - method set_border_width : int -> unit - method private virtual wrap : Gtk.widget obj -> 'a - end - -class item_signals : - 'a obj -> - object - inherit container_signals - constraint 'a = [>`container|`item|`widget] - val obj : 'a obj - method deselect : callback:(unit -> unit) -> GtkSignal.id - method select : callback:(unit -> unit) -> GtkSignal.id - method toggle : callback:(unit -> unit) -> GtkSignal.id - end diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gData.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gData.ml deleted file mode 100644 index 52aa3f1f4..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gData.ml +++ /dev/null @@ -1,60 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gtk -open GtkData -open GObj - -class data_signals obj = object - inherit gtkobj_signals obj - method disconnect_data = - GtkSignal.connect ~sgn:Data.Signals.disconnect obj ~after -end - -class adjustment_signals obj = object - inherit data_signals obj - method changed = GtkSignal.connect ~sgn:Adjustment.Signals.changed obj ~after - method value_changed = - GtkSignal.connect ~sgn:Adjustment.Signals.value_changed obj ~after -end - -class adjustment obj = object - inherit gtkobj obj - method as_adjustment : Gtk.adjustment obj = obj - method connect = new adjustment_signals obj - method set_value = Adjustment.set_value obj - method clamp_page = Adjustment.clamp_page obj - method lower = Adjustment.get_lower obj - method upper = Adjustment.get_upper obj - method value = Adjustment.get_value obj - method step_increment = Adjustment.get_step_increment obj - method page_increment = Adjustment.get_page_increment obj - method page_size = Adjustment.get_page_size obj -end - -let adjustment ?(value=0.) ?(lower=0.) ?(upper=100.) - ?(step_incr=1.) ?(page_incr=10.) ?(page_size=10.) () = - let w = - Adjustment.create ~value ~lower ~upper ~step_incr ~page_incr ~page_size in - new adjustment w - -let as_adjustment (adj : adjustment) = adj#as_adjustment - -class tooltips obj = object - inherit gtkobj (obj : Gtk.tooltips obj) - method as_tooltips = obj - method connect = new data_signals obj - method enable () = Tooltips.enable obj - method disable () = Tooltips.disable obj - method set_tip ?text ?privat w = - Tooltips.set_tip obj (as_widget w) ?text ?privat - method set_delay = Tooltips.set_delay obj -end - -let tooltips ?delay () = - let tt = Tooltips.create () in - Tooltips.set tt ?delay; - new tooltips tt - - - diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gData.mli b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gData.mli deleted file mode 100644 index ae7b29eb5..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gData.mli +++ /dev/null @@ -1,60 +0,0 @@ -(* $Id$ *) - -open Gtk - -class data_signals : - 'a obj -> - object - inherit GObj.gtkobj_signals - constraint 'a = [>`data] - val obj : 'a obj - method disconnect_data : callback:(unit -> unit) -> GtkSignal.id - end - -class adjustment_signals : - 'a obj -> - object - inherit data_signals - constraint 'a = [>`adjustment|`data] - val obj : 'a obj - method changed : callback:(unit -> unit) -> GtkSignal.id - method value_changed : callback:(unit -> unit) -> GtkSignal.id - end - -class adjustment : Gtk.adjustment obj -> - object - inherit GObj.gtkobj - val obj : Gtk.adjustment obj - method as_adjustment : Gtk.adjustment obj - method clamp_page : lower:float -> upper:float -> unit - method connect : adjustment_signals - method set_value : float -> unit - method lower : float - method upper : float - method value : float - method step_increment : float - method page_increment : float - method page_size : float - end -val adjustment : - ?value:float -> - ?lower:float -> - ?upper:float -> - ?step_incr:float -> - ?page_incr:float -> ?page_size:float -> unit -> adjustment - -val as_adjustment : adjustment -> Gtk.adjustment obj - -class tooltips : - Gtk.tooltips obj -> - object - inherit GObj.gtkobj - val obj : Gtk.tooltips obj - method as_tooltips : Gtk.tooltips obj - method connect : data_signals - method disable : unit -> unit - method enable : unit -> unit - method set_delay : int -> unit - method set_tip : ?text:string -> ?privat:string -> GObj.widget -> unit - end -val tooltips : ?delay:int -> unit -> tooltips diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gDraw.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gDraw.ml deleted file mode 100644 index 5782079a0..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gDraw.ml +++ /dev/null @@ -1,163 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gdk - -type color = [ - | `COLOR of Color.t - | `WHITE - | `BLACK - | `NAME of string - | `RGB of int * int * int -] - -let default_colormap = GtkBase.Widget.get_default_colormap - -let color ?(colormap = default_colormap ()) (c : color) = - match c with - | `COLOR col -> col - | #Gdk.Color.spec as def -> Color.alloc ~colormap def - -type optcolor = [ - | `COLOR of Color.t - | `WHITE - | `BLACK - | `NAME of string - | `RGB of int * int * int - | `DEFAULT -] - -let optcolor ?colormap (c : optcolor) = - match c with - | `DEFAULT -> None - | #color as c -> Some (color ?colormap c) - -class ['a] drawable ?(colormap = default_colormap ()) w = -object (self) - val colormap = colormap - val gc = GC.create w - val w : 'a Gdk.drawable = w - method color = color ~colormap - method set_foreground col = GC.set_foreground gc (self#color col) - method set_background col = GC.set_background gc (self#color col) - method gc_values = GC.get_values gc - method set_clip_region region = GC.set_clip_region gc region - method set_line_attributes ?width ?style ?cap ?join () = - let v = GC.get_values gc in - GC.set_line_attributes gc - ~width:(default v.GC.line_width ~opt:width) - ~style:(default v.GC.line_style ~opt:style) - ~cap:(default v.GC.cap_style ~opt:cap) - ~join:(default v.GC.join_style ~opt:join) - method point = Draw.point w gc - method line = Draw.line w gc - method rectangle = Draw.rectangle w gc - method arc = Draw.arc w gc - method polygon ?filled l = Draw.polygon w gc ?filled l - method string s = Draw.string w gc ~string:s - method image ~width ~height ?(xsrc=0) ?(ysrc=0) ?(xdest=0) ?(ydest=0) image = - Draw.image w gc ~image ~width ~height ~xsrc ~ysrc ~xdest ~ydest -end - -class pixmap ?colormap ?mask pm = object - inherit [[`pixmap]] drawable ?colormap pm as pixmap - val bitmap = may_map mask ~f: - begin fun x -> - let mask = new drawable x in - mask#set_foreground `WHITE; - mask - end - val mask : Gdk.bitmap option = mask - method pixmap = w - method mask = mask - method set_line_attributes ?width ?style ?cap ?join () = - pixmap#set_line_attributes ?width ?style ?cap ?join (); - may bitmap ~f:(fun m -> m#set_line_attributes ?width ?style ?cap ?join ()) - method point ~x ~y = - pixmap#point ~x ~y; - may bitmap ~f:(fun m -> m#point ~x ~y) - method line ~x ~y ~x:x' ~y:y' = - pixmap#line ~x ~y ~x:x' ~y:y'; - may bitmap ~f:(fun m -> m#line ~x ~y ~x:x' ~y:y') - method rectangle ~x ~y ~width ~height ?filled () = - pixmap#rectangle ~x ~y ~width ~height ?filled (); - may bitmap ~f:(fun m -> m#rectangle ~x ~y ~width ~height ?filled ()) - method arc ~x ~y ~width ~height ?filled ?start ?angle () = - pixmap#arc ~x ~y ~width ~height ?filled ?start ?angle (); - may bitmap - ~f:(fun m -> m#arc ~x ~y ~width ~height ?filled ?start ?angle ()); - method polygon ?filled l = - pixmap#polygon ?filled l; - may bitmap ~f:(fun m -> m#polygon ?filled l) - method string s ~font ~x ~y = - pixmap#string s ~font ~x ~y; - may bitmap ~f:(fun m -> m#string s ~font ~x ~y) -end - -class type misc_ops = object - method allocation : Gtk.rectangle - method colormap : colormap - method draw : Rectangle.t option -> unit - method hide : unit -> unit - method hide_all : unit -> unit - method intersect : Rectangle.t -> Rectangle.t option - method pointer : int * int - method realize : unit -> unit - method set_app_paintable : bool -> unit - method set_geometry : - ?x:int -> ?y:int -> ?width:int -> ?height:int -> unit -> unit - method show : unit -> unit - method unmap : unit -> unit - method unparent : unit -> unit - method unrealize : unit -> unit - method visible : bool - method visual : visual - method visual_depth : int - method window : window -end - -let pixmap ~(window : < misc : #misc_ops; .. >) - ~width ~height ?(mask=false) () = - window#misc#realize (); - let window = - try window#misc#window - with Gpointer.Null -> failwith "GDraw.pixmap : no window" - and depth = window#misc#visual_depth - and colormap = window#misc#colormap in - let mask = - if not mask then None else - let bm = Bitmap.create window ~width ~height in - let mask = new drawable bm in - mask#set_foreground `BLACK; - mask#rectangle ~x:0 ~y:0 ~width ~height ~filled:true (); - Some bm - in - new pixmap (Pixmap.create window ~width ~height ~depth) ~colormap ?mask - -let pixmap_from_xpm ~window ~file ?colormap ?transparent () = - window#misc#realize (); - let window = - try window#misc#window - with Gpointer.Null -> failwith "GDraw.pixmap_from_xpm : no window" in - let pm, mask = - try Pixmap.create_from_xpm window ~file ?colormap - ?transparent:(may_map transparent ~f:(fun c -> color c)) - with Gpointer.Null -> invalid_arg ("GDraw.pixmap_from_xpm : " ^ file) in - new pixmap pm ?colormap ~mask - -let pixmap_from_xpm_d ~window ~data ?colormap ?transparent () = - window#misc#realize (); - let window = - try window#misc#window - with Gpointer.Null -> failwith "GDraw.pixmap_from_xpm_d : no window" in - let pm, mask = - Pixmap.create_from_xpm_d window ~data ?colormap - ?transparent:(may_map transparent ~f:(fun c -> color c)) in - new pixmap pm ?colormap ~mask - -class drag_context context = object - val context = context - method status ?(time=0) act = DnD.drag_status context act ~time - method suggested_action = DnD.drag_context_suggested_action context - method targets = DnD.drag_context_targets context -end diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gDraw.mli b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gDraw.mli deleted file mode 100644 index 2b5fc8627..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gDraw.mli +++ /dev/null @@ -1,107 +0,0 @@ -(* $Id$ *) - -open Gdk - -type color = - [ `COLOR of Color.t - | `WHITE - | `BLACK - | `NAME of string - | `RGB of int * int * int] - -val color : ?colormap:colormap -> color -> Color.t - -type optcolor = - [ `COLOR of Color.t - | `WHITE - | `BLACK - | `NAME of string - | `RGB of int * int * int - | `DEFAULT ] - -val optcolor : ?colormap:colormap -> optcolor -> Color.t option - -class ['a] drawable : ?colormap:colormap -> 'a Gdk.drawable -> - object - val gc : gc - val w : 'a Gdk.drawable - method arc : - x:int -> - y:int -> - width:int -> - height:int -> - ?filled:bool -> ?start:float -> ?angle:float -> unit -> unit - method color : color -> Color.t - method gc_values : GC.values - method image : - width:int -> - height:int -> - ?xsrc:int -> ?ysrc:int -> ?xdest:int -> ?ydest:int -> image -> unit - method line : x:int -> y:int -> x:int -> y:int -> unit - method point : x:int -> y:int -> unit - method polygon : ?filled:bool -> (int * int) list -> unit - method rectangle : - x:int -> - y:int -> width:int -> height:int -> ?filled:bool -> unit -> unit - method set_background : color -> unit - method set_foreground : color -> unit - method set_clip_region : region -> unit - method set_line_attributes : - ?width:int -> - ?style:GC.gdkLineStyle -> - ?cap:GC.gdkCapStyle -> ?join:GC.gdkJoinStyle -> unit -> unit - method string : string -> font:font -> x:int -> y:int -> unit - end - -class pixmap : - ?colormap:colormap -> ?mask:bitmap -> [ `pixmap] Gdk.drawable -> - object - inherit [[`pixmap]] drawable - val bitmap : [ `bitmap] drawable option - val mask : bitmap option - method mask : bitmap option - method pixmap : Gdk.pixmap - end - -class type misc_ops = - object - method allocation : Gtk.rectangle - method colormap : colormap - method draw : Rectangle.t option -> unit - method hide : unit -> unit - method hide_all : unit -> unit - method intersect : Rectangle.t -> Rectangle.t option - method pointer : int * int - method realize : unit -> unit - method set_app_paintable : bool -> unit - method set_geometry : - ?x:int -> ?y:int -> ?width:int -> ?height:int -> unit -> unit - method show : unit -> unit - method unmap : unit -> unit - method unparent : unit -> unit - method unrealize : unit -> unit - method visible : bool - method visual : visual - method visual_depth : int - method window : window - end - -val pixmap : - window:< misc : #misc_ops; .. > -> - width:int -> height:int -> ?mask:bool -> unit -> pixmap -val pixmap_from_xpm : - window:< misc : #misc_ops; .. > -> - file:string -> - ?colormap:colormap -> ?transparent:color -> unit -> pixmap -val pixmap_from_xpm_d : - window:< misc : #misc_ops; .. > -> - data:string array -> - ?colormap:colormap -> ?transparent:color -> unit -> pixmap - -class drag_context : Gdk.drag_context -> - object - val context : Gdk.drag_context - method status : ?time:int -> Tags.drag_action list -> unit - method suggested_action : Tags.drag_action - method targets : atom list - end diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gEdit.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gEdit.ml deleted file mode 100644 index 467ee4505..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gEdit.ml +++ /dev/null @@ -1,147 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gtk -open GtkBase -open GtkEdit -open GObj - -class editable_signals obj = object - inherit widget_signals obj - method activate = GtkSignal.connect ~sgn:Editable.Signals.activate obj ~after - method changed = GtkSignal.connect ~sgn:Editable.Signals.changed obj ~after - method insert_text = - GtkSignal.connect ~sgn:Editable.Signals.insert_text obj ~after - method delete_text = - GtkSignal.connect ~sgn:Editable.Signals.delete_text obj ~after -end - -class editable obj = object - inherit widget obj - method connect = new editable_signals obj - method select_region = Editable.select_region obj - method insert_text = Editable.insert_text obj - method delete_text = Editable.delete_text obj - method get_chars = Editable.get_chars obj - method cut_clipboard () = Editable.cut_clipboard obj - method copy_clipboard () = Editable.copy_clipboard obj - method paste_clipboard () = Editable.paste_clipboard obj - method delete_selection () = Editable.delete_selection obj - method set_position = Editable.set_position obj - method position = Editable.get_position obj - method set_editable = Editable.set_editable obj - method selection = - if Editable.has_selection obj then - Some (Editable.selection_start_pos obj, Editable.selection_end_pos obj) - else None -end - -class entry obj = object - inherit editable obj - method event = new GObj.event_ops obj - method set_text = Entry.set_text obj - method append_text = Entry.append_text obj - method prepend_text = Entry.prepend_text obj - method set_visibility = Entry.set_visibility obj - method set_max_length = Entry.set_max_length obj - method text = Entry.get_text obj - method text_length = Entry.text_length obj -end - -let set_editable ?editable ?(width = -2) ?(height = -2) w = - may editable ~f:(Editable.set_editable w); - if width <> -2 || height <> -2 then Widget.set_usize w ~width ~height - -let entry ?max_length ?text ?visibility ?editable - ?width ?height ?packing ?show () = - let w = Entry.create ?max_length () in - Entry.set w ?text ?visibility; - set_editable w ?editable ?width ?height; - pack_return (new entry w) ~packing ~show - -class spin_button obj = object - inherit entry (obj : Gtk.spin_button obj) - method adjustment = new GData.adjustment (SpinButton.get_adjustment obj) - method value = SpinButton.get_value obj - method value_as_int = SpinButton.get_value_as_int obj - method spin = SpinButton.spin obj - method update = SpinButton.update obj - method set_adjustment adj = - SpinButton.set_adjustment obj (GData.as_adjustment adj) - method set_digits = SpinButton.set_digits obj - method set_value = SpinButton.set_value obj - method set_update_policy = SpinButton.set_update_policy obj - method set_numeric = SpinButton.set_numeric obj - method set_wrap = SpinButton.set_wrap obj - method set_shadow_type = SpinButton.set_shadow_type obj - method set_snap_to_ticks = SpinButton.set_snap_to_ticks obj -end - -let spin_button ?adjustment ?rate ?digits ?value ?update_policy - ?numeric ?wrap ?shadow_type ?snap_to_ticks - ?width ?height ?packing ?show () = - let w = SpinButton.create ?rate ?digits - ?adjustment:(may_map ~f:GData.as_adjustment adjustment) () in - SpinButton.set w ?value ?update_policy - ?numeric ?wrap ?shadow_type ?snap_to_ticks; - set_editable w ?width ?height; - pack_return (new spin_button w) ~packing ~show - -class combo obj = object - inherit GObj.widget (obj : Gtk.combo obj) - method entry = new entry (Combo.entry obj) - method list = new GList.liste (Combo.list obj) - method set_popdown_strings = Combo.set_popdown_strings obj - method set_use_arrows = Combo.set_use_arrows' obj - method set_case_sensitive = Combo.set_case_sensitive obj - method set_value_in_list = Combo.set_value_in_list obj - method disable_activate () = Combo.disable_activate obj - method set_item_string (item : GList.list_item) = - Combo.set_item_string obj item#as_item -end - -let combo ?popdown_strings ?use_arrows - ?case_sensitive ?value_in_list ?ok_if_empty - ?border_width ?width ?height ?packing ?show () = - let w = Combo.create () in - Combo.set w ?popdown_strings ?use_arrows - ?case_sensitive ?value_in_list ?ok_if_empty; - Container.set w ?border_width ?width ?height; - pack_return (new combo w) ~packing ~show - -class text obj = object (self) - inherit editable (obj : Gtk.text obj) as super - method get_chars ~start ~stop:e = - if start < 0 || e > Text.get_length obj || e < start then - invalid_arg "GEdit.text#get_chars"; - super#get_chars ~start ~stop:e - method event = new GObj.event_ops obj - method set_point = Text.set_point obj - method set_hadjustment adj = - Text.set_adjustment obj ~horizontal:(GData.as_adjustment adj) () - method set_vadjustment adj = - Text.set_adjustment obj ~vertical:(GData.as_adjustment adj) () - method set_word_wrap = Text.set_word_wrap obj - method set_line_wrap = Text.set_line_wrap obj - method hadjustment = new GData.adjustment (Text.get_hadjustment obj) - method vadjustment = new GData.adjustment (Text.get_vadjustment obj) - method point = Text.get_point obj - method length = Text.get_length obj - method freeze () = Text.freeze obj - method thaw () = Text.thaw obj - method insert ?font ?foreground ?background text = - let colormap = try Some self#misc#colormap with _ -> None in - Text.insert obj text ?font - ?foreground:(may_map foreground ~f:(GDraw.color ?colormap)) - ?background:(may_map background ~f:(GDraw.color ?colormap)) -end - -let text ?hadjustment ?vadjustment ?editable - ?word_wrap ?line_wrap ?width ?height ?packing ?show () = - let w = Text.create () - ?hadjustment:(may_map ~f:GData.as_adjustment hadjustment) - ?vadjustment:(may_map ~f:GData.as_adjustment vadjustment) in - may word_wrap ~f:(Text.set_word_wrap w); - may line_wrap ~f:(Text.set_line_wrap w); - set_editable w ?editable ?width ?height; - pack_return (new text w) ~packing ~show diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gEdit.mli b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gEdit.mli deleted file mode 100644 index 3b2c286ea..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gEdit.mli +++ /dev/null @@ -1,146 +0,0 @@ -(* $Id$ *) - -open Gtk -open GObj - -class editable_signals : 'a obj -> - object - inherit widget_signals - constraint 'a = [>`editable|`widget] - val obj : 'a obj - method activate : callback:(unit -> unit) -> GtkSignal.id - method changed : callback:(unit -> unit) -> GtkSignal.id - method delete_text : - callback:(start:int -> stop:int -> unit) -> GtkSignal.id - method insert_text : - callback:(string -> pos:int -> unit) -> GtkSignal.id - end - -class editable : 'a obj -> - object - inherit widget - constraint 'a = [>`editable|`widget] - val obj : 'a obj - method connect : editable_signals - method copy_clipboard : unit -> unit - method cut_clipboard : unit -> unit - method delete_selection : unit -> unit - method delete_text : start:int -> stop:int -> unit - method get_chars : start:int -> stop:int -> string - method insert_text : string -> pos:int -> int - method paste_clipboard : unit -> unit - method position : int - method select_region : start:int -> stop:int -> unit - method selection : (int * int) option - method set_editable : bool -> unit - method set_position : int -> unit - end - -class entry : 'a obj -> - object - inherit editable - constraint 'a = [>`entry|`editable|`widget] - val obj : 'a obj - method event : event_ops - method append_text : string -> unit - method prepend_text : string -> unit - method set_max_length : int -> unit - method set_text : string -> unit - method set_visibility : bool -> unit - method text : string - method text_length : int - end -val entry : - ?max_length:int -> - ?text:string -> - ?visibility:bool -> - ?editable:bool -> - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> entry - -class spin_button : Gtk.spin_button obj -> - object - inherit entry - val obj : Gtk.spin_button obj - method adjustment : GData.adjustment - method set_adjustment : GData.adjustment -> unit - method set_digits : int -> unit - method set_numeric : bool -> unit - method set_shadow_type : Tags.shadow_type -> unit - method set_snap_to_ticks : bool -> unit - method set_update_policy : [`ALWAYS|`IF_VALID] -> unit - method set_value : float -> unit - method set_wrap : bool -> unit - method spin : Tags.spin_type -> unit - method update : unit - method value : float - method value_as_int : int - end -val spin_button : - ?adjustment:GData.adjustment -> - ?rate:float -> - ?digits:int -> - ?value:float -> - ?update_policy:[`ALWAYS|`IF_VALID] -> - ?numeric:bool -> - ?wrap:bool -> - ?shadow_type:Tags.shadow_type -> - ?snap_to_ticks:bool -> - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> spin_button - -class combo : Gtk.combo obj -> - object - inherit widget - val obj : Gtk.combo obj - method disable_activate : unit -> unit - method entry : entry - method list : GList.liste - method set_case_sensitive : bool -> unit - method set_item_string : GList.list_item -> string -> unit - method set_popdown_strings : string list -> unit - method set_use_arrows : [`NEVER|`DEFAULT|`ALWAYS] -> unit - method set_value_in_list : - ?required:bool -> ?ok_if_empty:bool -> unit -> unit - end -val combo : - ?popdown_strings:string list -> - ?use_arrows:[`NEVER|`DEFAULT|`ALWAYS] -> - ?case_sensitive:bool -> - ?value_in_list:bool -> - ?ok_if_empty:bool -> - ?border_width:int -> - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> combo - -class text : Gtk.text obj -> - object - inherit editable - val obj : Gtk.text obj - method event : event_ops - method freeze : unit -> unit - method hadjustment : GData.adjustment - method insert : - ?font:Gdk.font -> - ?foreground:GDraw.color -> ?background:GDraw.color -> string -> unit - method length : int - method point : int - method set_hadjustment : GData.adjustment -> unit - method set_point : int -> unit - method set_vadjustment : GData.adjustment -> unit - method set_word_wrap : bool -> unit - method set_line_wrap : bool -> unit - method thaw : unit -> unit - method vadjustment : GData.adjustment - end -val text : - ?hadjustment:GData.adjustment -> - ?vadjustment:GData.adjustment -> - ?editable:bool -> - ?word_wrap:bool -> - ?line_wrap:bool -> - ?width:int -> - ?height:int -> ?packing:(widget -> unit) -> ?show:bool -> unit -> text diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gHtml.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gHtml.ml deleted file mode 100644 index 1150790c5..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gHtml.ml +++ /dev/null @@ -1,33 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gtk -open GtkBase -open GObj -open GtkXmHTML - -class xmhtml obj = object (self) - inherit widget_full (obj : GtkXmHTML.xmhtml obj) - method event = new GObj.event_ops obj - method freeze = freeze obj - method thaw = thaw obj - method source = source obj - method set_fonts = set_font_familty obj - method set_fonts_fixed = set_font_familty_fixed obj - method set_anchor_buttons = set_anchor_buttons obj - method set_anchor_cursor = set_anchor_cursor obj - method set_anchor_underline = set_anchor_underline_type obj - method set_anchor_visited_underline = set_anchor_visited_underline_type obj - method set_anchor_target_underline = set_anchor_target_underline_type obj - method set_topline = set_topline obj - method topline = get_topline obj - method set_strict_checking = set_strict_checking obj - method set_bad_html_warnings = set_bad_html_warnings obj - method set_imagemap_draw = set_imagemap_draw obj -end - -let xmhtml ?source ?border_width ?width ?height ?packing ?show () = - let w = create () in - Container.set w ?border_width ?width ?height; - may source ~f:(GtkXmHTML.source w); - pack_return (new xmhtml w) ~packing ~show diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gList.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gList.ml deleted file mode 100644 index 3b1abe43b..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gList.ml +++ /dev/null @@ -1,162 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gtk -open GtkBase -open GtkList -open GObj -open GContainer - -class list_item obj = object - inherit container (obj : Gtk.list_item obj) - method event = new GObj.event_ops obj - method as_item = obj - method select () = Item.select obj - method deselect () = Item.deselect obj - method toggle () = Item.toggle obj - method connect = new item_signals obj -end - -let list_item ?label ?border_width ?width ?height ?packing ?(show=true) () = - let w = ListItem.create ?label () in - Container.set w ?border_width ?width ?height; - let item = new list_item w in - may packing ~f:(fun f -> (f item : unit)); - if show then item#misc#show (); - item - -class liste obj = object - inherit [list_item] item_container (obj : Gtk.liste obj) - method private wrap w = new list_item (ListItem.cast w) - method insert w = Liste.insert_item obj w#as_item - method clear_items = Liste.clear_items obj - method select_item = Liste.select_item obj - method unselect_item = Liste.unselect_item obj - method child_position (w : list_item) = Liste.child_position obj w#as_item -end - -let liste ?selection_mode ?border_width ?width ?height - ?packing ?show () = - let w = Liste.create () in - may selection_mode ~f:(Liste.set_selection_mode w); - Container.set w ?border_width ?width ?height; - pack_return (new liste w) ~packing ~show - -(* Cell lists *) - -class clist_signals obj = object - inherit container_signals obj - method click_column = - GtkSignal.connect ~sgn:CList.Signals.click_column obj ~after - method select_row = - GtkSignal.connect ~sgn:CList.Signals.select_row obj ~after - method unselect_row = - GtkSignal.connect ~sgn:CList.Signals.unselect_row obj ~after - method scroll_vertical = - GtkSignal.connect ~sgn:CList.Signals.scroll_vertical obj ~after - method scroll_horizontal = - GtkSignal.connect ~sgn:CList.Signals.scroll_horizontal obj ~after -end - -class ['a] clist obj = object (self) - inherit widget (obj : Gtk.clist obj) - method set_border_width = Container.set_border_width obj - method event = new GObj.event_ops obj - method connect = new clist_signals obj - method rows = CList.get_rows obj - method columns = CList.get_columns obj - method focus_row = CList.get_focus_row obj - method hadjustment = new GData.adjustment (CList.get_hadjustment obj) - method vadjustment = new GData.adjustment (CList.get_vadjustment obj) - method set_button_actions = CList.set_button_actions obj - method freeze () = CList.freeze obj - method thaw () = CList.thaw obj - method column_title = CList.get_column_title obj - method column_widget col = - new widget (CList.get_column_widget obj col) - method columns_autosize () = CList.columns_autosize obj - method optimal_column_width = CList.optimal_column_width obj - method moveto ?(row_align=0.) ?(col_align=0.) row col = - CList.moveto obj row col ~row_align ~col_align - method row_is_visible = CList.row_is_visible obj - method cell_type = CList.get_cell_type obj - method cell_text = CList.get_text obj - method cell_pixmap row col = - let pm, mask = CList.get_pixmap obj row col in - may_map pm ~f:(fun x -> new GDraw.pixmap ?mask x) - method cell_style row col = - try Some (new style (CList.get_cell_style obj row col)) - with Gpointer.Null -> None - method row_selectable row = CList.get_selectable obj ~row - method row_style row = - try Some (new style (CList.get_row_style obj ~row)) - with Gpointer.Null -> None - method set_shift = CList.set_shift obj - method insert ~row texts = - let texts = List.map texts ~f:(fun x -> Some x) in - CList.insert obj ~row texts - method append = self#insert ~row:self#rows - method prepend = self#insert ~row:0 - method remove = CList.remove obj - method select = CList.select obj - method unselect = CList.unselect obj - method clear () = CList.clear obj - method get_row_column = CList.get_row_column obj - method select_all () = CList.select_all obj - method unselect_all () = CList.unselect_all obj - method swap_rows = CList.swap_rows obj - method row_move = CList.row_move obj - method sort () = CList.sort obj - method set_hadjustment adj = - CList.set_hadjustment obj (GData.as_adjustment adj) - method set_vadjustment adj = - CList.set_vadjustment obj (GData.as_adjustment adj) - method set_shadow_type = CList.set_shadow_type obj - method set_button_actions = CList.set_button_actions obj - method set_selection_mode = CList.set_selection_mode obj - method set_reorderable = CList.set_reorderable obj - method set_use_drag_icons = CList.set_use_drag_icons obj - method set_row_height = CList.set_row_height obj - method set_titles_show = CList.set_titles_show obj - method set_titles_active = CList.set_titles_active obj - method set_sort = CList.set_sort obj - method set_column ?widget = - CList.set_column obj ?widget:(may_map widget ~f:as_widget) - method set_row ?foreground ?background ?selectable ?style = - let color = may_map ~f:(fun c -> Gpointer.optboxed (GDraw.optcolor c)) - and style = may_map ~f:(fun (st : style) -> st#as_style) style in - CList.set_row obj - ?foreground:(color foreground) ?background:(color background) - ?selectable ?style - method set_cell ?text ?pixmap ?spacing ?style = - let pixmap, mask = - match pixmap with None -> None, None - | Some (pm : GDraw.pixmap) -> Some pm#pixmap, pm#mask - and style = may_map ~f:(fun (st : style) -> st#as_style) style in - CList.set_cell obj ?text ?pixmap ?mask ?spacing ?style - method set_row_data n ~data = - CList.set_row_data obj ~row:n (Obj.repr (data : 'a)) - method get_row_data n : 'a = Obj.obj (CList.get_row_data obj ~row:n) - method scroll_vertical = - CList.Signals.emit_scroll obj ~sgn:CList.Signals.scroll_vertical - method scroll_horizontal = - CList.Signals.emit_scroll obj ~sgn:CList.Signals.scroll_horizontal -end - -let clist ?(columns=1) ?titles ?hadjustment ?vadjustment - ?shadow_type ?button_actions ?selection_mode - ?reorderable ?use_drag_icons ?row_height - ?titles_show ?titles_active ?auto_sort ?sort_column ?sort_type - ?border_width ?width ?height ?packing ?show () = - let w = - match titles with None -> CList.create ~cols:columns - | Some titles -> CList.create_with_titles (Array.of_list titles) - in - CList.set w - ?hadjustment:(may_map ~f:GData.as_adjustment hadjustment) - ?vadjustment:(may_map ~f:GData.as_adjustment vadjustment) - ?shadow_type ?button_actions ?selection_mode ?reorderable - ?use_drag_icons ?row_height ?titles_show ?titles_active; - CList.set_sort w ?auto:auto_sort ?column:sort_column ?dir:sort_type (); - Container.set w ?border_width ?width ?height; - pack_return (new clist w) ~packing ~show diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gList.mli b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gList.mli deleted file mode 100644 index 17f4cef96..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gList.mli +++ /dev/null @@ -1,158 +0,0 @@ -(* $Id$ *) - -open Gtk -open GObj -open GContainer - -class list_item : Gtk.list_item obj -> - object - inherit container - val obj : Gtk.list_item obj - method event : event_ops - method as_item : Gtk.list_item obj - method connect : item_signals - method deselect : unit -> unit - method select : unit -> unit - method toggle : unit -> unit - end -val list_item : - ?label:string -> - ?border_width:int -> - ?width:int -> - ?height:int -> - ?packing:(list_item -> unit) -> ?show:bool -> unit -> list_item - -class liste : Gtk.liste obj -> - object - inherit [list_item] item_container - val obj : Gtk.liste obj - method child_position : list_item -> int - method clear_items : start:int -> stop:int -> unit - method insert : list_item -> pos:int -> unit - method select_item : pos:int -> unit - method unselect_item : pos:int -> unit - method private wrap : Gtk.widget obj -> list_item - end -val liste : - ?selection_mode:Tags.selection_mode -> - ?border_width:int -> - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> liste - -class clist_signals : 'a obj -> - object - inherit container_signals - constraint 'a = [>`clist|`container|`widget] - val obj : 'a obj - method click_column : callback:(int -> unit) -> GtkSignal.id - method select_row : - callback:(row:int -> - column:int -> event:GdkEvent.Button.t option -> unit) -> - GtkSignal.id - method unselect_row : - callback:(row:int -> - column:int -> event:GdkEvent.Button.t option -> unit) -> - GtkSignal.id - method scroll_horizontal : - callback:(Tags.scroll_type -> pos:clampf -> unit) -> GtkSignal.id - method scroll_vertical : - callback:(Tags.scroll_type -> pos:clampf -> unit) -> GtkSignal.id - end - -class ['a] clist : Gtk.clist obj -> - object - inherit widget - val obj : Gtk.clist obj - method event : event_ops - method append : string list -> int - method cell_pixmap : int -> int -> GDraw.pixmap option - method cell_style : int -> int -> style option - method cell_text : int -> int -> string - method cell_type : int -> int -> Tags.cell_type - method clear : unit -> unit - method column_title : int -> string - method column_widget : int -> widget - method columns : int - method columns_autosize : unit -> unit - method connect : clist_signals - method focus_row : int - method freeze : unit -> unit - method get_row_column : x:int -> y:int -> int * int - method get_row_data : int -> 'a - method hadjustment : GData.adjustment - method insert : row:int -> string list -> int - method moveto : - ?row_align:clampf -> ?col_align:clampf -> int -> int -> unit - method optimal_column_width : int -> int - method prepend : string list -> int - method remove : row:int -> unit - method row_is_visible : int -> Tags.visibility - method row_move : int -> dst:int -> unit - method row_selectable : int -> bool - method row_style : int -> style option - method rows : int - method scroll_vertical : Tags.scroll_type -> pos:clampf -> unit - method scroll_horizontal : Tags.scroll_type -> pos:clampf -> unit - method select : int -> int -> unit - method select_all : unit -> unit - method set_border_width : int -> unit - method set_button_actions : int -> Tags.button_action list -> unit - method set_cell : - ?text:string -> - ?pixmap:GDraw.pixmap -> - ?spacing:int -> ?style:style -> int -> int -> unit - method set_column : - ?widget:widget -> - ?title:string -> - ?title_active:bool -> - ?justification:Tags.justification -> - ?visibility:bool -> - ?resizeable:bool -> - ?auto_resize:bool -> - ?width:int -> ?min_width:int -> ?max_width:int -> int -> unit - method set_hadjustment : GData.adjustment -> unit - method set_reorderable : bool -> unit - method set_row : - ?foreground:GDraw.optcolor -> - ?background:GDraw.optcolor -> - ?selectable:bool -> - ?style:style -> int -> unit - method set_row_data : int -> data:'a -> unit - method set_row_height : int -> unit - method set_selection_mode : Tags.selection_mode -> unit - method set_shadow_type : Tags.shadow_type -> unit - method set_shift : int -> int -> vertical:int -> horizontal:int -> unit - method set_sort : - ?auto:bool -> ?column:int -> ?dir:Tags.sort_type -> unit -> unit - method set_titles_active : bool -> unit - method set_titles_show : bool -> unit - method set_use_drag_icons : bool -> unit - method set_vadjustment : GData.adjustment -> unit - method sort : unit -> unit - method swap_rows : int -> int -> unit - method thaw : unit -> unit - method unselect : int -> int -> unit - method unselect_all : unit -> unit - method vadjustment : GData.adjustment - end -val clist : - ?columns:int -> - ?titles:string list -> - ?hadjustment:GData.adjustment -> - ?vadjustment:GData.adjustment -> - ?shadow_type:Tags.shadow_type -> - ?button_actions:(int * Tags.button_action list) list -> - ?selection_mode:Tags.selection_mode -> - ?reorderable:bool -> - ?use_drag_icons:bool -> - ?row_height:int -> - ?titles_show:bool -> - ?titles_active:bool -> - ?auto_sort:bool -> - ?sort_column:int -> - ?sort_type:Tags.sort_type -> - ?border_width:int -> - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> 'a clist diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gMain.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gMain.ml deleted file mode 100644 index 811f490d4..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gMain.ml +++ /dev/null @@ -1,26 +0,0 @@ -(* $Id$ *) - -open Gtk -open GtkMain -open GObj - -module Main : sig - val init : unit -> string (* returns the locale name *) - val main : unit -> unit - val quit : unit -> unit - val version : int * int * int - val flush : unit -> unit -end = Main - -module Grab = struct - open Grab - let add (w : #widget) = add w#as_widget - let remove (w : #widget) = remove w#as_widget - let get_current () = new widget (get_current ()) -end - -module Timeout : sig - type id - val add : ms:int -> callback:(unit -> bool) -> id - val remove : id -> unit -end = Timeout diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gMenu.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gMenu.ml deleted file mode 100644 index 52f05a462..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gMenu.ml +++ /dev/null @@ -1,199 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gtk -open GtkData -open GtkBase -open GtkMenu -open GObj -open GContainer - -(* Menu type *) - -class menu_shell_signals obj = object - inherit container_signals obj - method deactivate = - GtkSignal.connect ~sgn:MenuShell.Signals.deactivate obj ~after -end - -class type virtual ['a] pre_menu = object - inherit ['a] item_container - method as_menu : Gtk.menu Gtk.obj - method deactivate : unit -> unit - method connect : menu_shell_signals - method event : event_ops - method popup : button:int -> time:int -> unit - method popdown : unit -> unit - method set_accel_group : accel_group -> unit -end - -(* Menu items *) - -class menu_item_signals obj = object - inherit item_signals obj - method activate = GtkSignal.connect ~sgn:MenuItem.Signals.activate obj -end - - -class ['a] pre_menu_item_skel obj = object - inherit container obj - method as_item = MenuItem.coerce obj - method set_submenu (w : 'a pre_menu) = MenuItem.set_submenu obj w#as_menu - method remove_submenu () = MenuItem.remove_submenu obj - method configure = MenuItem.configure obj - method activate () = MenuItem.activate obj - method right_justify () = MenuItem.right_justify obj - method add_accelerator ~group ?modi:m ?flags key= - Widget.add_accelerator obj ~sgn:MenuItem.Signals.activate group ?flags - ?modi:m ~key -end - -class menu_item obj = object - inherit [menu_item] pre_menu_item_skel obj - method connect = new menu_item_signals obj - method event = new GObj.event_ops obj -end - -class menu_item_skel = [menu_item] pre_menu_item_skel - -let pack_item self ~packing ~show = - may packing ~f:(fun f -> (f (self :> menu_item) : unit)); - if show <> Some false then self#misc#show (); - self - -let menu_item ?label ?border_width ?width ?height ?packing ?show () = - let w = MenuItem.create ?label () in - Container.set w ?border_width ?width ?height; - pack_item (new menu_item w) ?packing ?show - -let tearoff_item ?border_width ?width ?height ?packing ?show () = - let w = MenuItem.tearoff_create () in - Container.set w ?border_width ?width ?height; - pack_item (new menu_item w) ?packing ?show - -class check_menu_item_signals obj = object - inherit menu_item_signals obj - method toggled = - GtkSignal.connect ~sgn:CheckMenuItem.Signals.toggled obj ~after -end - -class check_menu_item obj = object - inherit menu_item_skel obj - method set_active = CheckMenuItem.set_active obj - method set_show_toggle = CheckMenuItem.set_show_toggle obj - method active = CheckMenuItem.get_active obj - method toggled () = CheckMenuItem.toggled obj - method connect = new check_menu_item_signals obj - method event = new GObj.event_ops obj -end - -let check_menu_item ?label ?active ?show_toggle - ?border_width ?width ?height ?packing ?show () = - let w = CheckMenuItem.create ?label () in - CheckMenuItem.set w ?active ?show_toggle; - Container.set w ?border_width ?width ?height; - pack_item (new check_menu_item w) ?packing ?show - -class radio_menu_item obj = object - inherit check_menu_item (obj : Gtk.radio_menu_item obj) - method group = Some obj - method set_group = RadioMenuItem.set_group obj -end - -let radio_menu_item ?group ?label ?active ?show_toggle - ?border_width ?width ?height ?packing ?show () = - let w = RadioMenuItem.create ?group ?label () in - CheckMenuItem.set w ?active ?show_toggle; - Container.set w ?border_width ?width ?height; - pack_item (new radio_menu_item w) ?packing ?show - -(* Menus *) - -class menu_shell obj = object - inherit [menu_item] item_container obj - method private wrap w = new menu_item (MenuItem.cast w) - method insert w = MenuShell.insert obj w#as_item - method deactivate () = MenuShell.deactivate obj - method connect = new menu_shell_signals obj - method event = new GObj.event_ops obj -end - -class menu obj = object - inherit menu_shell obj - method popup = Menu.popup obj - method popdown () = Menu.popdown obj - method as_menu : Gtk.menu obj = obj - method set_accel_group = Menu.set_accel_group obj -end - -let menu ?border_width ?packing ?show () = - let w = Menu.create () in - may border_width ~f:(Container.set_border_width w); - let self = new menu w in - may packing ~f:(fun f -> (f (self :> menu) : unit)); - if show <> Some false then self#misc#show (); - self - -(* Option Menu (GtkButton?) *) - -class option_menu obj = object - inherit GButton.button_skel obj - method connect = new GButton.button_signals obj - method event = new GObj.event_ops obj - method set_menu (menu : menu) = OptionMenu.set_menu obj menu#as_menu - method get_menu = new menu (OptionMenu.get_menu obj) - method remove_menu () = OptionMenu.remove_menu obj - method set_history = OptionMenu.set_history obj -end - -let option_menu ?border_width ?width ?height ?packing ?show () = - let w = OptionMenu.create () in - Container.set w ?border_width ?width ?height; - pack_return (new option_menu w) ~packing ~show - -(* Menu Bar *) - -let menu_bar ?border_width ?width ?height ?packing ?show () = - let w = MenuBar.create () in - Container.set w ?border_width ?width ?height; - pack_return (new menu_shell w) ~packing ~show - -(* Menu Factory *) - -class ['a] factory - ?(accel_group=AccelGroup.create ()) - ?(accel_modi=[`CONTROL]) - ?(accel_flags=[`VISIBLE]) (menu_shell : 'a) = - object (self) - val menu_shell : #menu_shell = menu_shell - val group = accel_group - val m = accel_modi - val flags = accel_flags - method menu = menu_shell - method accel_group = group - method private bind ?key ?callback (item : menu_item) = - menu_shell#append item; - may key ~f:(item#add_accelerator ~group ~modi:m ~flags); - may callback ~f:(fun callback -> item#connect#activate ~callback) - method add_item ?key ?callback ?submenu label = - let item = menu_item ~label () in - self#bind item ?key ?callback; - may (submenu : menu option) ~f:item#set_submenu; - item - method add_check_item ?active ?key ?callback label = - let item = check_menu_item ~label ?active () in - self#bind (item :> menu_item) ?key - ?callback:(may_map callback ~f:(fun f () -> f item#active)); - item - method add_radio_item ?group ?active ?key ?callback label = - let item = radio_menu_item ~label ?group ?active () in - self#bind (item :> menu_item) ?key - ?callback:(may_map callback ~f:(fun f () -> f item#active)); - item - method add_separator () = menu_item ~packing:menu_shell#append () - method add_submenu ?key label = - let item = menu_item ~label () in - self#bind item ?key; - menu ~packing:item#set_submenu (); - method add_tearoff () = tearoff_item ~packing:menu_shell#append () -end diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gMenu.mli b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gMenu.mli deleted file mode 100644 index 505249bea..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gMenu.mli +++ /dev/null @@ -1,196 +0,0 @@ -(* $Id$ *) - -open Gtk -open GObj -open GContainer - -class menu_shell_signals : 'b obj -> - object ('a) - inherit container_signals - constraint 'b = [>`menushell|`container|`widget] - val obj : 'b obj - method deactivate : callback:(unit -> unit) -> GtkSignal.id - end - -class menu_item_signals : 'b obj -> - object ('a) - inherit item_signals - constraint 'b = [>`menuitem|`container|`item|`widget] - val obj : 'b obj - method activate : callback:(unit -> unit) -> GtkSignal.id - end - -class menu_item_skel : - 'a obj -> - object - inherit container - constraint 'a = [>`widget|`container|`menuitem] - val obj : 'a obj - method activate : unit -> unit - method add_accelerator : - group:accel_group -> - ?modi:Gdk.Tags.modifier list -> - ?flags:Tags.accel_flag list -> Gdk.keysym -> unit - method as_item : Gtk.menu_item obj - method configure : show_toggle:bool -> show_indicator:bool -> unit - method remove_submenu : unit -> unit - method right_justify : unit -> unit - method set_submenu : menu -> unit - end -and menu_item : 'a obj -> - object - inherit menu_item_skel - constraint 'a = [>`widget|`container|`item|`menuitem] - val obj : 'a obj - method event : event_ops - method connect : menu_item_signals - end -and menu : Gtk.menu obj -> - object - inherit [menu_item] item_container - val obj : Gtk.menu obj - method add : menu_item -> unit - method event : event_ops - method append : menu_item -> unit - method as_menu : Gtk.menu obj - method children : menu_item list - method connect : menu_shell_signals - method deactivate : unit -> unit - method insert : menu_item -> pos:int -> unit - method popdown : unit -> unit - method popup : button:int -> time:int -> unit - method prepend : menu_item -> unit - method remove : menu_item -> unit - method set_accel_group : accel_group -> unit - method set_border_width : int -> unit - method private wrap : Gtk.widget obj -> menu_item - end - -val menu : - ?border_width:int -> ?packing:(menu -> unit) -> ?show:bool -> unit -> menu -val menu_item : - ?label:string -> - ?border_width:int -> - ?width:int -> - ?height:int -> - ?packing:(menu_item -> unit) -> ?show:bool -> unit -> menu_item -val tearoff_item : - ?border_width:int -> - ?width:int -> - ?height:int -> - ?packing:(menu_item -> unit) -> ?show:bool -> unit -> menu_item - -class check_menu_item_signals : 'a obj -> - object - inherit menu_item_signals - constraint 'a = [>`checkmenuitem|`container|`item|`menuitem|`widget] - val obj : 'a obj - method toggled : callback:(unit -> unit) -> GtkSignal.id - end - -class check_menu_item : 'a obj -> - object - inherit menu_item_skel - constraint 'a = [>`widget|`checkmenuitem|`container|`item|`menuitem] - val obj : 'a obj - method active : bool - method event : event_ops - method connect : check_menu_item_signals - method set_active : bool -> unit - method set_show_toggle : bool -> unit - method toggled : unit -> unit - end -val check_menu_item : - ?label:string -> - ?active:bool -> - ?show_toggle:bool -> - ?border_width:int -> - ?width:int -> - ?height:int -> - ?packing:(menu_item -> unit) -> ?show:bool -> unit -> check_menu_item - -class radio_menu_item : Gtk.radio_menu_item obj -> - object - inherit check_menu_item - val obj : Gtk.radio_menu_item obj - method group : Gtk.radio_menu_item group - method set_group : Gtk.radio_menu_item group -> unit - end -val radio_menu_item : - ?group:Gtk.radio_menu_item group -> - ?label:string -> - ?active:bool -> - ?show_toggle:bool -> - ?border_width:int -> - ?width:int -> - ?height:int -> - ?packing:(menu_item -> unit) -> ?show:bool -> unit -> radio_menu_item - -class menu_shell : 'a obj -> - object - inherit [menu_item] item_container - constraint 'a = [>`widget|`container|`menushell] - val obj : 'a obj - method event : event_ops - method deactivate : unit -> unit - method connect : menu_shell_signals - method insert : menu_item -> pos:int -> unit - method private wrap : Gtk.widget obj -> menu_item - end - -val menu_bar : - ?border_width:int -> - ?width:int -> - ?height:int -> - ?packing:(GObj.widget -> unit) -> ?show:bool -> unit -> menu_shell - -class option_menu : 'a obj -> - object - inherit GButton.button_skel - constraint 'a = [>`optionmenu|`button|`container|`widget] - val obj : 'a obj - method event : event_ops - method connect : GButton.button_signals - method get_menu : menu - method remove_menu : unit -> unit - method set_history : int -> unit - method set_menu : menu -> unit - end -val option_menu : - ?border_width:int -> - ?width:int -> - ?height:int -> - ?packing:(GObj.widget -> unit) -> ?show:bool -> unit -> option_menu - -class ['a] factory : - ?accel_group:accel_group -> - ?accel_modi:Gdk.Tags.modifier list -> - ?accel_flags:Tags.accel_flag list -> - 'a -> - object - constraint 'a = #menu_shell - val flags : Tags.accel_flag list - val group : accel_group - val m : Gdk.Tags.modifier list - val menu_shell : 'a - method accel_group : accel_group - method add_check_item : - ?active:bool -> - ?key:Gdk.keysym -> - ?callback:(bool -> unit) -> string -> check_menu_item - method add_item : - ?key:Gdk.keysym -> - ?callback:(unit -> unit) -> - ?submenu:menu -> string -> menu_item - method add_radio_item : - ?group:Gtk.radio_menu_item group -> - ?active:bool -> - ?key:Gdk.keysym -> - ?callback:(bool -> unit) -> string -> radio_menu_item - method add_separator : unit -> menu_item - method add_submenu : ?key:Gdk.keysym -> string -> menu - method add_tearoff : unit -> menu_item - method private bind : - ?key:Gdk.keysym -> ?callback:(unit -> unit) -> menu_item -> unit - method menu : 'a - end diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gMisc.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gMisc.ml deleted file mode 100644 index 13fd7b4dd..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gMisc.ml +++ /dev/null @@ -1,217 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gtk -open GtkBase -open GtkMisc -open GObj - -let separator dir ?(width = -2) ?(height = -2) ?packing ?show () = - let w = Separator.create dir in - if width <> -2 || height <> -2 then Widget.set_usize w ~width ~height; - pack_return (new widget_full w) ~packing ~show - -class statusbar_context obj ctx = object (self) - val obj : statusbar obj = obj - val context : Gtk.statusbar_context = ctx - method context = context - method push text = Statusbar.push obj context ~text - method pop () = Statusbar.pop obj context - method remove = Statusbar.remove obj context - method flash ?(delay=1000) text = - let msg = self#push text in - GtkMain.Timeout.add ~ms:delay ~callback:(fun () -> self#remove msg; false); - () -end - -class statusbar obj = object - inherit GContainer.container_full (obj : Gtk.statusbar obj) - method new_context ~name = - new statusbar_context obj (Statusbar.get_context obj name) -end - -let statusbar ?border_width ?width ?height ?packing ?show () = - let w = Statusbar.create () in - Container.set w ?border_width ?width ?height; - pack_return (new statusbar w) ~packing ~show - -class calendar_signals obj = object - inherit widget_signals obj - method month_changed = - GtkSignal.connect obj ~sgn:Calendar.Signals.month_changed ~after - method day_selected = - GtkSignal.connect obj ~sgn:Calendar.Signals.day_selected ~after - method day_selected_double_click = - GtkSignal.connect obj - ~sgn:Calendar.Signals.day_selected_double_click ~after - method prev_month = - GtkSignal.connect obj ~sgn:Calendar.Signals.prev_month ~after - method next_month = - GtkSignal.connect obj ~sgn:Calendar.Signals.next_month ~after - method prev_year = - GtkSignal.connect obj ~sgn:Calendar.Signals.prev_year ~after - method next_year = - GtkSignal.connect obj ~sgn:Calendar.Signals.next_year ~after -end - -class calendar obj = object - inherit widget (obj : Gtk.calendar obj) - method event = new GObj.event_ops obj - method connect = new calendar_signals obj - method select_month = Calendar.select_month obj - method select_day = Calendar.select_day obj - method mark_day = Calendar.mark_day obj - method unmark_day = Calendar.unmark_day obj - method clear_marks = Calendar.clear_marks obj - method display_options = Calendar.display_options obj - method date = Calendar.get_date obj - method freeze () = Calendar.freeze obj - method thaw () = Calendar.thaw obj -end - -let calendar ?options ?(width = -2) ?(height = -2) ?packing ?show () = - let w = Calendar.create () in - if width <> -2 || height <> -2 then Widget.set_usize w ~width ~height; - may options ~f:(Calendar.display_options w); - pack_return (new calendar w) ~packing ~show - -class drawing_area obj = object - inherit widget_full (obj : Gtk.drawing_area obj) - method event = new GObj.event_ops obj - method set_size = DrawingArea.size obj -end - -let drawing_area ?(width=0) ?(height=0) ?packing ?show () = - let w = DrawingArea.create () in - if width <> 0 || height <> 0 then DrawingArea.size w ~width ~height; - pack_return (new drawing_area w) ~packing ~show - -class misc obj = object - inherit widget obj - method set_alignment = Misc.set_alignment obj - method set_padding = Misc.set_padding obj -end - -class arrow obj = object - inherit misc obj - method set_arrow kind ~shadow = Arrow.set obj ~kind ~shadow -end - -let arrow ~kind ~shadow - ?xalign ?yalign ?xpad ?ypad ?width ?height ?packing ?show () = - let w = Arrow.create ~kind ~shadow in - Misc.set w ?xalign ?yalign ?xpad ?ypad ?width ?height; - pack_return (new arrow w) ~packing ~show - -class image obj = object - inherit misc obj - method set_image ?mask image = Image.set obj image ?mask -end - -let image image ?mask - ?xalign ?yalign ?xpad ?ypad ?width ?height ?packing ?show () = - let w = Image.create image ?mask in - Misc.set w ?xalign ?yalign ?xpad ?ypad ?width ?height; - pack_return (new image w) ~packing ~show - -class label_skel obj = object - inherit misc obj - method set_text = Label.set_text obj - method set_justify = Label.set_justify obj - method set_pattern = Label.set_pattern obj - method set_line_wrap = Label.set_line_wrap obj - method text = Label.get_text obj -end - -class label obj = object - inherit label_skel (Label.coerce obj) - method connect = new widget_signals obj -end - -let label ?(text="") ?justify ?line_wrap ?pattern - ?xalign ?yalign ?xpad ?ypad ?width ?height ?packing ?show () = - let w = Label.create text in - Label.set w ?justify ?line_wrap ?pattern; - Misc.set w ?xalign ?yalign ?xpad ?ypad ?width ?height; - pack_return (new label w) ~packing ~show - -let label_cast w = new label (Label.cast w#as_widget) - -class tips_query_signals obj = object - inherit widget_signals obj - method widget_entered ~callback = - GtkSignal.connect ~sgn:TipsQuery.Signals.widget_entered obj ~after - ~callback:(function None -> callback None - | Some w -> callback (Some (new widget w))) - method widget_selected ~callback = - GtkSignal.connect ~sgn:TipsQuery.Signals.widget_selected obj ~after - ~callback:(function None -> callback None - | Some w -> callback (Some (new widget w))) -end - -class tips_query obj = object - inherit label_skel (obj : Gtk.tips_query obj) - method start () = TipsQuery.start obj - method stop () = TipsQuery.stop obj - method set_caller (w : widget) = TipsQuery.set_caller obj w#as_widget - method set_emit_always = TipsQuery.set_emit_always obj - method set_label_inactive inactive = TipsQuery.set_labels obj ~inactive - method set_label_no_tip no_tip = TipsQuery.set_labels obj ~no_tip - method connect = new tips_query_signals obj -end - -let tips_query ?caller ?emit_always ?label_inactive ?label_no_tip - ?xalign ?yalign ?xpad ?ypad ?width ?height ?packing ?show () = - let w = TipsQuery.create () in - let caller = may_map caller ~f:(fun (w : #widget) -> w#as_widget) in - TipsQuery.set w ?caller ?emit_always ?label_inactive ?label_no_tip; - Misc.set w ?xalign ?yalign ?xpad ?ypad ?width ?height; - pack_return (new tips_query w) ~packing ~show - -class color_selection obj = object - inherit GObj.widget_full (obj : Gtk.color_selection obj) - method set_update_policy = ColorSelection.set_update_policy obj - method set_opacity = ColorSelection.set_opacity obj - method set_color ~red ~green ~blue ?opacity () = - ColorSelection.set_color obj ~red ~green ~blue ?opacity - method get_color = ColorSelection.get_color obj -end - -let color_selection ?border_width ?width ?height ?packing ?show () = - let w = ColorSelection.create () in - Container.set w ?border_width ?width ?height; - pack_return (new color_selection w) ~packing ~show - -class pixmap obj = object - inherit misc (obj : Gtk.pixmap obj) - method connect = new widget_signals obj - method set_pixmap (pm : GDraw.pixmap) = - Pixmap.set obj ~pixmap:pm#pixmap ?mask:pm#mask - method pixmap = - new GDraw.pixmap (Pixmap.pixmap obj) - ?mask:(try Some(Pixmap.mask obj) with Gpointer.Null -> None) -end - -let pixmap (pm : #GDraw.pixmap) ?xalign ?yalign ?xpad ?ypad - ?(width = -2) ?(height = -2) ?packing ?show () = - let w = Pixmap.create pm#pixmap ?mask:pm#mask in - Misc.set w ?xalign ?yalign ?xpad ?ypad; - if width <> -2 || height <> -2 then Widget.set_usize w ~width ~height; - pack_return (new pixmap w) ~packing ~show - -class font_selection obj = object - inherit widget_full (obj : Gtk.font_selection obj) - method notebook = new GPack.notebook obj - method event = new event_ops obj - method font = FontSelection.get_font obj - method font_name = FontSelection.get_font_name obj - method set_font_name = FontSelection.set_font_name obj - method preview_text = FontSelection.get_preview_text obj - method set_preview_text = FontSelection.set_preview_text obj - method set_filter = FontSelection.set_filter obj -end - -let font_selection ?border_width ?width ?height ?packing ?show () = - let w = FontSelection.create () in - Container.set w ?border_width ?width ?height; - pack_return (new font_selection w) ~packing ~show diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gMisc.mli b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gMisc.mli deleted file mode 100644 index 7008369b7..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gMisc.mli +++ /dev/null @@ -1,263 +0,0 @@ -(* $Id$ *) - -open Gtk -open GObj -open GContainer - -val separator : - Tags.orientation -> - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> widget_full - -class statusbar_context : - Gtk.statusbar obj -> Gtk.statusbar_context -> - object - val context : Gtk.statusbar_context - val obj : Gtk.statusbar obj - method context : Gtk.statusbar_context - method flash : ?delay:int -> string -> unit - method pop : unit -> unit - method push : string -> statusbar_message - method remove : statusbar_message -> unit - end - -class statusbar : Gtk.statusbar obj -> - object - inherit container_full - val obj : Gtk.statusbar obj - method new_context : name:string -> statusbar_context - end -val statusbar : - ?border_width:int -> - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> statusbar - -class calendar_signals : 'a obj -> - object - inherit widget_signals - constraint 'a = [>`calendar|`widget] - val obj : 'a obj - method day_selected : callback:(unit -> unit) -> GtkSignal.id - method day_selected_double_click : - callback:(unit -> unit) -> GtkSignal.id - method month_changed : callback:(unit -> unit) -> GtkSignal.id - method next_month : callback:(unit -> unit) -> GtkSignal.id - method next_year : callback:(unit -> unit) -> GtkSignal.id - method prev_month : callback:(unit -> unit) -> GtkSignal.id - method prev_year : callback:(unit -> unit) -> GtkSignal.id - end - -class calendar : Gtk.calendar obj -> - object - inherit widget - val obj : Gtk.calendar obj - method event : event_ops - method clear_marks : unit - method connect : calendar_signals - method date : int * int * int - method display_options : Tags.calendar_display_options list -> unit - method freeze : unit -> unit - method mark_day : int -> unit - method select_day : int -> unit - method select_month : month:int -> year:int -> unit - method thaw : unit -> unit - method unmark_day : int -> unit - end -val calendar : - ?options:Tags.calendar_display_options list -> - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> calendar - -class drawing_area : Gtk.drawing_area obj -> - object - inherit widget_full - val obj : Gtk.drawing_area obj - method event : event_ops - method set_size : width:int -> height:int -> unit - end -val drawing_area : - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> drawing_area - -class misc : 'a obj -> - object - inherit widget - constraint 'a = [>`misc|`widget] - val obj : 'a obj - method set_alignment : ?x:float -> ?y:float -> unit -> unit - method set_padding : ?x:int -> ?y:int -> unit -> unit - end - -class arrow : 'a obj -> - object - inherit misc - constraint 'a = [>`arrow|`misc|`widget] - val obj : 'a obj - method set_arrow : Tags.arrow_type -> shadow:Tags.shadow_type -> unit - end - -val arrow : - kind:Tags.arrow_type -> - shadow:Tags.shadow_type -> - ?xalign:float -> - ?yalign:float -> - ?xpad:int -> - ?ypad:int -> - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> arrow - -class image : 'a obj -> - object - inherit misc - constraint 'a = [>`image|`misc|`widget] - val obj : 'a obj - method set_image : ?mask:Gdk.bitmap -> Gdk.image -> unit - end - -val image : - Gdk.image -> - ?mask:Gdk.bitmap -> - ?xalign:float -> - ?yalign:float -> - ?xpad:int -> - ?ypad:int -> - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> image - -class label_skel : 'a obj -> - object - inherit misc - constraint 'a = [>`label|`misc|`widget] - val obj : 'a obj - method set_justify : Tags.justification -> unit - method set_line_wrap : bool -> unit - method set_pattern : string -> unit - method set_text : string -> unit - method text : string - end - -class label : [>`label] obj -> - object - inherit label_skel - val obj : Gtk.label obj - method connect : widget_signals - end -val label : - ?text:string -> - ?justify:Tags.justification -> - ?line_wrap:bool -> - ?pattern:string -> - ?xalign:float -> - ?yalign:float -> - ?xpad:int -> - ?ypad:int -> - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> label -val label_cast : < as_widget : 'a obj ; .. > -> label - -class tips_query_signals : 'a obj -> - object - inherit widget_signals - constraint 'a = [>`tipsquery|`widget] - val obj : 'a obj - method widget_entered : - callback:(widget option -> - text:string option -> privat:string option -> unit) -> - GtkSignal.id - method widget_selected : - callback:(widget option -> text:string option -> - privat:string option -> GdkEvent.Button.t option -> bool) -> - GtkSignal.id - end - -class tips_query : Gtk.tips_query obj -> - object - inherit label_skel - val obj : Gtk.tips_query obj - method connect : tips_query_signals - method set_caller : widget -> unit - method set_emit_always : bool -> unit - method set_label_inactive : string -> unit - method set_label_no_tip : string -> unit - method start : unit -> unit - method stop : unit -> unit - end -val tips_query : - ?caller:#widget -> - ?emit_always:bool -> - ?label_inactive:string -> - ?label_no_tip:string -> - ?xalign:float -> - ?yalign:float -> - ?xpad:int -> - ?ypad:int -> - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> tips_query - -class pixmap : Gtk.pixmap Gtk.obj -> - object - inherit misc - val obj : Gtk.pixmap Gtk.obj - method connect : GObj.widget_signals - method pixmap : GDraw.pixmap - method set_pixmap : GDraw.pixmap -> unit - end -val pixmap : - #GDraw.pixmap -> - ?xalign:float -> - ?yalign:float -> - ?xpad:int -> - ?ypad:int -> - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> pixmap - -class color_selection : Gtk.color_selection obj -> - object - inherit widget_full - val obj : Gtk.color_selection obj - method get_color : Gtk.color - method set_color : - red:float -> green:float -> blue:float -> ?opacity:float -> unit -> unit - method set_opacity : bool -> unit - method set_update_policy : Tags.update_type -> unit - end -val color_selection : - ?border_width:int -> - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> color_selection - -class font_selection : Gtk.font_selection obj -> - object - inherit widget_full - val obj : Gtk.font_selection obj - method event : event_ops - method notebook : GPack.notebook - method font : Gdk.font option - method font_name : string option - method preview_text : string - method set_filter : - ?kind:Tags.font_type list -> - ?foundry:string list -> - ?weight:string list -> - ?slant:string list -> - ?setwidth:string list -> - ?spacing:string list -> - ?charset:string list -> Tags.font_filter_type -> unit - method set_font_name : string -> unit - method set_preview_text : string -> unit - end -val font_selection : - ?border_width:int -> - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> font_selection diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gObj.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gObj.ml deleted file mode 100644 index 5c4819fa0..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gObj.ml +++ /dev/null @@ -1,292 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gtk -open GtkData -open GtkBase - -(* Object *) - -class gtkobj obj = object - val obj = obj - method destroy () = Object.destroy obj - method get_id = Object.get_id obj -end - -class gtkobj_misc obj = object - val obj = obj - method get_type = Type.name (Object.get_type obj) - method disconnect = GtkSignal.disconnect obj - method handler_block = GtkSignal.handler_block obj - method handler_unblock = GtkSignal.handler_unblock obj -end - -class gtkobj_signals ?(after=false) obj = object - val obj = obj - val after = after - method after = {< after = true >} - method destroy = GtkSignal.connect ~sgn:Object.Signals.destroy obj -end - -(* Widget *) - -class event_signals ?(after=false) obj = object - val obj = Widget.coerce obj - val after = after - method after = {< after = true >} - method any = GtkSignal.connect ~sgn:Widget.Signals.Event.any ~after obj - method button_press = - GtkSignal.connect ~sgn:Widget.Signals.Event.button_press ~after obj - method button_release = - GtkSignal.connect ~sgn:Widget.Signals.Event.button_release ~after obj - method configure = - GtkSignal.connect ~sgn:Widget.Signals.Event.configure ~after obj - method delete = - GtkSignal.connect ~sgn:Widget.Signals.Event.delete ~after obj - method destroy = - GtkSignal.connect ~sgn:Widget.Signals.Event.destroy ~after obj - method enter_notify = - GtkSignal.connect ~sgn:Widget.Signals.Event.enter_notify ~after obj - method expose = - GtkSignal.connect ~sgn:Widget.Signals.Event.expose ~after obj - method focus_in = - GtkSignal.connect ~sgn:Widget.Signals.Event.focus_in ~after obj - method focus_out = - GtkSignal.connect ~sgn:Widget.Signals.Event.focus_out ~after obj - method key_press = - GtkSignal.connect ~sgn:Widget.Signals.Event.key_press ~after obj - method key_release = - GtkSignal.connect ~sgn:Widget.Signals.Event.key_release ~after obj - method leave_notify = - GtkSignal.connect ~sgn:Widget.Signals.Event.leave_notify ~after obj - method map = GtkSignal.connect ~sgn:Widget.Signals.Event.map ~after obj - method motion_notify = - GtkSignal.connect ~sgn:Widget.Signals.Event.motion_notify ~after obj - method property_notify = - GtkSignal.connect ~sgn:Widget.Signals.Event.property_notify ~after obj - method proximity_in = - GtkSignal.connect ~sgn:Widget.Signals.Event.proximity_in ~after obj - method proximity_out = - GtkSignal.connect ~sgn:Widget.Signals.Event.proximity_out ~after obj - method selection_clear = - GtkSignal.connect ~sgn:Widget.Signals.Event.selection_clear ~after obj - method selection_notify = - GtkSignal.connect ~sgn:Widget.Signals.Event.selection_notify ~after obj - method selection_request = - GtkSignal.connect ~sgn:Widget.Signals.Event.selection_request ~after obj - method unmap = GtkSignal.connect ~sgn:Widget.Signals.Event.unmap ~after obj -end - -class event_ops obj = object - val obj = Widget.coerce obj - method add = Widget.add_events obj - method connect = new event_signals obj - method send : Gdk.Tags.event_type Gdk.event -> bool = Widget.event obj - method set_extensions = Widget.set_extension_events obj -end - -class style st = object - val style = st - method as_style = style - method copy = {< style = Style.copy style >} - method bg state = Style.get_bg style ~state - method colormap = Style.get_colormap style - method font = Style.get_font style - method set_bg = - List.iter ~f: - (fun (state,c) -> Style.set_bg style ~state ~color:(GDraw.color c)) - method set_font = Style.set_font style - method set_background = Style.set_background style -end - -class selection_data (sel : Selection.t) = object - val sel = sel - method selection = Selection.selection sel - method target = Selection.target sel - method seltype = Selection.seltype sel - method format = Selection.format sel - method data = Selection.get_data sel - method set = Selection.set sel -end - -class drag_signals ?(after=false) obj = object - val obj = Widget.coerce obj - val after = after - method after = {< after = true >} - method beginning ~callback = - GtkSignal.connect ~sgn:Widget.Signals.drag_begin ~after obj - ~callback:(fun context -> callback (new drag_context context)) - method ending ~callback = - GtkSignal.connect ~sgn:Widget.Signals.drag_end ~after obj - ~callback:(fun context -> callback (new drag_context context)) - method data_delete ~callback = - GtkSignal.connect ~sgn:Widget.Signals.drag_data_delete ~after obj - ~callback:(fun context -> callback (new drag_context context)) - method leave ~callback = - GtkSignal.connect ~sgn:Widget.Signals.drag_leave ~after obj - ~callback:(fun context -> callback (new drag_context context)) - method motion ~callback = - GtkSignal.connect ~sgn:Widget.Signals.drag_motion ~after obj - ~callback:(fun context -> callback (new drag_context context)) - method drop ~callback = - GtkSignal.connect ~sgn:Widget.Signals.drag_drop ~after obj - ~callback:(fun context -> callback (new drag_context context)) - method data_get ~callback = - GtkSignal.connect ~sgn:Widget.Signals.drag_data_get ~after obj - ~callback:(fun context data -> callback (new drag_context context) - (new selection_data data)) - method data_received ~callback = - GtkSignal.connect ~sgn:Widget.Signals.drag_data_received ~after obj - ~callback:(fun context ~x ~y data -> callback (new drag_context context) - ~x ~y (new selection_data data)) - -end - -and drag_ops obj = object - val obj = Widget.coerce obj - method connect = new drag_signals obj - method dest_set ?(flags=[`ALL]) ?(actions=[]) targets = - DnD.dest_set obj ~flags ~actions ~targets:(Array.of_list targets) - method dest_unset () = DnD.dest_unset obj - method get_data ?(time=0) ~context:(context : drag_context) target = - DnD.get_data obj (context : < context : Gdk.drag_context; .. >)#context - ~target ~time - method highlight () = DnD.highlight obj - method unhighlight () = DnD.unhighlight obj - method source_set ?modi:m ?(actions=[]) targets = - DnD.source_set obj ?modi:m ~actions ~targets:(Array.of_list targets) - method source_set_icon ?(colormap = Gdk.Color.get_system_colormap ()) - (pix : GDraw.pixmap) = - DnD.source_set_icon obj ~colormap pix#pixmap ?mask:pix#mask - method source_unset () = DnD.source_unset obj -end - -and drag_context context = object - inherit GDraw.drag_context context - method context = context - method finish = DnD.finish context - method source_widget = - new widget (Object.unsafe_cast (DnD.get_source_widget context)) - method set_icon_widget (w : widget) = - DnD.set_icon_widget context (w#as_widget) - method set_icon_pixmap ?(colormap = Gdk.Color.get_system_colormap ()) - (pix : GDraw.pixmap) = - DnD.set_icon_pixmap context ~colormap pix#pixmap ?mask:pix#mask -end - -and misc_signals ?after obj = object - inherit gtkobj_signals ?after obj - method draw ~callback = - GtkSignal.connect obj ~sgn:Widget.Signals.draw ~after ~callback: - begin fun rect -> - callback - { x = Gdk.Rectangle.x rect ; y = Gdk.Rectangle.y rect; - width = Gdk.Rectangle.width rect; - height = Gdk.Rectangle.height rect } - end - method show = GtkSignal.connect ~sgn:Widget.Signals.show ~after obj - method hide = GtkSignal.connect ~sgn:Widget.Signals.hide ~after obj - method map = GtkSignal.connect ~sgn:Widget.Signals.map ~after obj - method unmap = GtkSignal.connect ~sgn:Widget.Signals.unmap ~after obj - method realize = GtkSignal.connect ~sgn:Widget.Signals.realize ~after obj - method state_changed = - GtkSignal.connect ~sgn:Widget.Signals.state_changed ~after obj - method parent_set ~callback = - GtkSignal.connect obj ~sgn:Widget.Signals.parent_set ~after ~callback: - begin function - None -> callback None - | Some w -> callback (Some (new widget (Object.unsafe_cast w))) - end - method style_set ~callback = - GtkSignal.connect obj ~sgn:Widget.Signals.style_set ~after ~callback: - (fun opt -> callback (may opt ~f:(new style))) -end - -and misc_ops obj = object - inherit gtkobj_misc (Widget.coerce obj) - method connect = new misc_signals obj - method show () = Widget.show obj - method unparent () = Widget.unparent obj - method show_all () = Widget.show_all obj - method hide () = Widget.hide obj - method hide_all () = Widget.hide_all obj - method map () = Widget.map obj - method unmap () = Widget.unmap obj - method realize () = Widget.realize obj - method unrealize () = Widget.unrealize obj - method draw = Widget.draw obj - method activate () = Widget.activate obj - method reparent (w : widget) = Widget.reparent obj w#as_widget - method popup = Widget.popup obj - method intersect = Widget.intersect obj - method grab_focus () = Widget.grab_focus obj - method grab_default () = Widget.grab_default obj - method is_ancestor (w : widget) = Widget.is_ancestor obj w#as_widget - method add_accelerator ~sgn:sg ~group ?modi ?flags key = - Widget.add_accelerator obj ~sgn:sg group ~key ?modi ?flags - method remove_accelerator ~group ?modi key = - Widget.remove_accelerator obj group ~key ?modi - method lock_accelerators () = Widget.lock_accelerators obj - method set_name = Widget.set_name obj - method set_state = Widget.set_state obj - method set_sensitive = Widget.set_sensitive obj - method set_can_default = Widget.set_can_default obj - method set_can_focus = Widget.set_can_focus obj - method set_geometry ?(x = -2) ?(y = -2) ?(width = -2) ?(height = -2) () = - if x+y <> -4 then Widget.set_uposition obj ~x ~y; - if width+height <> -4 then Widget.set_usize obj ~width ~height - method set_style (style : style) = Widget.set_style obj style#as_style - (* get functions *) - method name = Widget.get_name obj - method toplevel = - try Some (new widget (Object.unsafe_cast (Widget.get_toplevel obj))) - with Gpointer.Null -> None - method window = Widget.window obj - method colormap = Widget.get_colormap obj - method visual = Widget.get_visual obj - method visual_depth = Gdk.Window.visual_depth (Widget.get_visual obj) - method pointer = Widget.get_pointer obj - method style = new style (Widget.get_style obj) - method visible = Widget.visible obj - method has_focus = Widget.has_focus obj - method parent = - try Some (new widget (Object.unsafe_cast (Widget.parent obj))) - with Gpointer.Null -> None - method set_app_paintable = Widget.set_app_paintable obj - method allocation = Widget.allocation obj -end - -and widget obj = object (self) - inherit gtkobj obj - method as_widget = Widget.coerce obj - method misc = new misc_ops obj - method drag = new drag_ops (Object.unsafe_cast obj) - method coerce = - (self :> < destroy : _; get_id : _; as_widget : _; misc : _; - drag : _; coerce : _ >) -end - -(* just to check that GDraw.misc_ops is compatible with misc_ops *) -let _ = fun (x : #GDraw.misc_ops) -> (x : misc_ops) - -class widget_signals ?after (obj : [> `widget] obj) = - gtkobj_signals ?after obj - -(* -class widget_coerce obj = object - inherit widget obj - method coerce = (self :> widget) -end -*) - -class widget_full obj = object - inherit widget obj - method connect = new widget_signals obj -end - -let as_widget (w : widget) = w#as_widget - -let pack_return self ~packing ~show = - may packing ~f:(fun f -> (f (self :> widget) : unit)); - if show <> Some false then self#misc#show (); - self diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gObj.mli b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gObj.mli deleted file mode 100644 index 7c37cf124..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gObj.mli +++ /dev/null @@ -1,267 +0,0 @@ -(* $Id$ *) - -open Gtk - -(* Object *) - -class gtkobj : - 'a obj -> - object - val obj : 'a obj - method destroy : unit -> unit - method get_id : int - end - -class gtkobj_signals : - ?after:bool -> 'a obj -> - object ('b) - val obj : 'a obj - val after : bool - method after : 'b - method destroy : callback:(unit -> unit) -> GtkSignal.id - end - -class gtkobj_misc : 'a obj -> - object - method get_type : string - method disconnect : GtkSignal.id -> unit - method handler_block : GtkSignal.id -> unit - method handler_unblock : GtkSignal.id -> unit - end - -(* Widget *) - -class event_signals : - ?after:bool -> [>`widget] obj -> - object ('a) - method after : 'a - method any : - callback:(Gdk.Tags.event_type Gdk.event -> bool) -> GtkSignal.id - method button_press : callback:(GdkEvent.Button.t -> bool) -> GtkSignal.id - method button_release : - callback:(GdkEvent.Button.t -> bool) -> GtkSignal.id - method configure : callback:(GdkEvent.Configure.t -> bool) -> GtkSignal.id - method delete : callback:([`DELETE] Gdk.event -> bool) -> GtkSignal.id - method destroy : callback:([`DESTROY] Gdk.event -> bool) -> GtkSignal.id - method enter_notify : - callback:(GdkEvent.Crossing.t -> bool) -> GtkSignal.id - method expose : callback:(GdkEvent.Expose.t -> bool) -> GtkSignal.id - method focus_in : callback:(GdkEvent.Focus.t -> bool) -> GtkSignal.id - method focus_out : callback:(GdkEvent.Focus.t -> bool) -> GtkSignal.id - method key_press : callback:(GdkEvent.Key.t -> bool) -> GtkSignal.id - method key_release : callback:(GdkEvent.Key.t -> bool) -> GtkSignal.id - method leave_notify : - callback:(GdkEvent.Crossing.t -> bool) -> GtkSignal.id - method map : callback:([`MAP] Gdk.event -> bool) -> GtkSignal.id - method motion_notify : - callback:(GdkEvent.Motion.t -> bool) -> GtkSignal.id - method property_notify : - callback:(GdkEvent.Property.t -> bool) -> GtkSignal.id - method proximity_in : - callback:(GdkEvent.Proximity.t -> bool) -> GtkSignal.id - method proximity_out : - callback:(GdkEvent.Proximity.t -> bool) -> GtkSignal.id - method selection_clear : - callback:(GdkEvent.Selection.t -> bool) -> GtkSignal.id - method selection_notify : - callback:(GdkEvent.Selection.t -> bool) -> GtkSignal.id - method selection_request : - callback:(GdkEvent.Selection.t -> bool) -> GtkSignal.id - method unmap : callback:([`UNMAP] Gdk.event -> bool) -> GtkSignal.id - end - -class event_ops : [>`widget] obj -> - object - method add : Gdk.Tags.event_mask list -> unit - method connect : event_signals - method send : Gdk.Tags.event_type Gdk.event -> bool - method set_extensions : Gdk.Tags.extension_events -> unit - end - -class style : Gtk.style -> - object ('a) - val style : Gtk.style - method as_style : Gtk.style - method bg : Tags.state_type -> Gdk.Color.t - method colormap : Gdk.colormap - method copy : 'a - method font : Gdk.font - method set_background : Gdk.window -> Tags.state_type -> unit - method set_bg : (Tags.state_type * GDraw.color) list -> unit - method set_font : Gdk.font -> unit - end - -class selection_data : - GtkData.Selection.t -> - object - val sel : GtkData.Selection.t - method data : string (* May raise Null_pointer *) - method format : int - method selection : Gdk.atom - method seltype : Gdk.atom - method target : Gdk.atom - method set : typ:Gdk.atom -> format:int -> ?data:string -> unit - end - -class drag_ops : [>`widget] obj -> - object - method connect : drag_signals - method dest_set : - ?flags:Tags.dest_defaults list -> - ?actions:Gdk.Tags.drag_action list -> target_entry list -> unit - method dest_unset : unit -> unit - method get_data : ?time:int -> context:drag_context -> Gdk.atom ->unit - method highlight : unit -> unit - method source_set : - ?modi:Gdk.Tags.modifier list -> - ?actions:Gdk.Tags.drag_action list -> target_entry list -> unit - method source_set_icon : ?colormap:Gdk.colormap -> GDraw.pixmap -> unit - method source_unset : unit -> unit - method unhighlight : unit -> unit - end - -and misc_ops : - [>`widget] obj -> - object - inherit gtkobj_misc - val obj : Gtk.widget obj - method activate : unit -> bool - method add_accelerator : - sgn:(Gtk.widget, unit -> unit) GtkSignal.t -> - group:accel_group -> ?modi:Gdk.Tags.modifier list -> - ?flags:Tags.accel_flag list -> Gdk.keysym -> unit - method allocation : rectangle - method colormap : Gdk.colormap - method connect : misc_signals - method draw : Gdk.Rectangle.t option -> unit - method grab_default : unit -> unit - method grab_focus : unit -> unit - method has_focus : bool - method hide : unit -> unit - method hide_all : unit -> unit - method intersect : Gdk.Rectangle.t -> Gdk.Rectangle.t option - method is_ancestor : widget -> bool - method lock_accelerators : unit -> unit - method map : unit -> unit - method name : string - method parent : widget option - method pointer : int * int - method popup : x:int -> y:int -> unit - method realize : unit -> unit - method remove_accelerator : - group:accel_group -> ?modi:Gdk.Tags.modifier list -> Gdk.keysym -> unit - method reparent : widget -> unit - method set_app_paintable : bool -> unit - method set_can_default : bool -> unit - method set_can_focus : bool -> unit - method set_name : string -> unit - method set_sensitive : bool -> unit - method set_state : Tags.state_type -> unit - method set_style : style -> unit - method set_geometry : - ?x:int -> ?y:int -> ?width:int -> ?height:int -> unit -> unit - method show : unit -> unit - method show_all : unit -> unit - method style : style - method toplevel : widget option - method unmap : unit -> unit - method unparent : unit -> unit - method unrealize : unit -> unit - method visible : bool - method visual : Gdk.visual - method visual_depth : int - method window : Gdk.window - end - -and widget : - 'a obj -> - object - inherit gtkobj - constraint 'a = [>`widget] - val obj : 'a obj - method as_widget : Gtk.widget obj - method coerce : widget - method drag : drag_ops - method misc : misc_ops - end - -and misc_signals : - ?after:bool -> Gtk.widget obj -> - object ('b) - inherit gtkobj_signals - val obj : Gtk.widget obj - method after : 'b - method draw : callback:(Gtk.rectangle -> unit) -> GtkSignal.id - method hide : callback:(unit -> unit) -> GtkSignal.id - method map : callback:(unit -> unit) -> GtkSignal.id - method parent_set : callback:(widget option -> unit) -> GtkSignal.id - method realize : callback:(unit -> unit) -> GtkSignal.id - method show : callback:(unit -> unit) -> GtkSignal.id - method state_changed : - callback:(Gtk.Tags.state_type -> unit) -> GtkSignal.id - method style_set : callback:(unit -> unit) -> GtkSignal.id - method unmap : callback:(unit -> unit) -> GtkSignal.id - end - -and drag_context : - Gdk.drag_context -> - object - val context : Gdk.drag_context - method context : Gdk.drag_context - method finish : success:bool -> del:bool -> time:int -> unit - method source_widget : widget - method set_icon_pixmap : - ?colormap:Gdk.colormap -> GDraw.pixmap -> hot_x:int -> hot_y:int -> unit - method set_icon_widget : widget -> hot_x:int -> hot_y:int -> unit - method status : ?time:int -> Gdk.Tags.drag_action list -> unit - method suggested_action : Gdk.Tags.drag_action - method targets : Gdk.atom list - end - -and drag_signals : - ?after:bool -> Gtk.widget obj -> - object ('a) - method after : 'a - method beginning : - callback:(drag_context -> unit) -> GtkSignal.id - method data_delete : - callback:(drag_context -> unit) -> GtkSignal.id - method data_get : - callback:(drag_context -> selection_data -> info:int -> time:int -> unit) - -> GtkSignal.id - method data_received : - callback:(drag_context -> x:int -> y:int -> - selection_data -> info:int -> time:int -> unit) -> GtkSignal.id - method drop : - callback:(drag_context -> x:int -> y:int -> time:int -> bool) -> - GtkSignal.id - method ending : - callback:(drag_context -> unit) -> GtkSignal.id - method leave : - callback:(drag_context -> time:int -> unit) -> GtkSignal.id - method motion : - callback:(drag_context -> x:int -> y:int -> time:int -> bool) -> - GtkSignal.id - end - -class widget_signals : ?after:bool -> 'a obj -> - object - inherit gtkobj_signals - constraint 'a = [>`widget] - val obj : 'a obj - end - -class widget_full : 'a obj -> - object - inherit widget - constraint 'a = [>`widget] - val obj : 'a obj - method connect : widget_signals - end - -val as_widget : widget -> Gtk.widget obj - -val pack_return : - (#widget as 'a) -> - packing:(widget -> unit) option -> show:bool option -> 'a - (* To use in initializers to provide a ?packing: option *) diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gPack.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gPack.ml deleted file mode 100644 index 3641349a9..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gPack.ml +++ /dev/null @@ -1,217 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gtk -open GtkBase -open GtkPack -open GObj -open GContainer - -class box_skel obj = object - inherit container obj - method pack ?from:f ?expand ?fill ?padding w = - Box.pack obj (as_widget w) ?from:f ?expand ?fill ?padding - method set_homogeneous = Box.set_homogeneous obj - method set_spacing = Box.set_spacing obj - method set_child_packing ?from:f ?expand ?fill ?padding w = - Box.set_child_packing obj (as_widget w) ?from:f ?expand ?fill ?padding - method reorder_child w = Box.reorder_child obj (as_widget w) -end - -class box obj = object - inherit box_skel obj - method connect = new container_signals obj -end - -let box dir ?homogeneous ?spacing ?border_width ?width ?height - ?packing ?show () = - let w = Box.create dir ?homogeneous ?spacing () in - Container.set w ?border_width ?width ?height; - pack_return (new box w) ~packing ~show - -let vbox = box `VERTICAL -let hbox = box `HORIZONTAL - -class button_box obj = object - inherit box_skel (obj : Gtk.button_box obj) - method connect = new container_signals obj - method set_layout = BBox.set_layout obj - method set_spacing = BBox.set_spacing obj - method set_child_size = BBox.set_child_size obj - method set_child_ipadding = BBox.set_child_ipadding obj -end - -let button_box dir ?spacing ?child_width ?child_height ?child_ipadx - ?child_ipady ?layout ?border_width ?width ?height ?packing ?show ()= - let w = BBox.create dir in - BBox.set w ?spacing ?child_width ?child_height ?child_ipadx - ?child_ipady ?layout; - Container.set w ?border_width ?width ?height; - pack_return (new button_box w) ~packing ~show - -class table obj = object - inherit container_full (obj : Gtk.table obj) - method attach ~left ~top ?right ?bottom ?expand ?fill ?shrink - ?xpadding ?ypadding w = - Table.attach obj (as_widget w) ~left ~top ?right ?bottom ?expand - ?fill ?shrink ?xpadding ?ypadding - method set_row_spacing = Table.set_row_spacing obj - method set_col_spacing = Table.set_col_spacing obj - method set_row_spacings = Table.set_row_spacings obj - method set_col_spacings = Table.set_col_spacings obj - method set_homogeneous = Table.set_homogeneous obj -end - -let table ~rows ~columns ?homogeneous ?row_spacings ?col_spacings - ?border_width ?width ?height ?packing ?show () = - let w = Table.create ~rows ~columns ?homogeneous () in - Table.set w ?row_spacings ?col_spacings; - Container.set w ?border_width ?width ?height; - pack_return (new table w) ~packing ~show - -class fixed obj = object - inherit container_full (obj : Gtk.fixed obj) - method event = new GObj.event_ops obj - method put w = Fixed.put obj (as_widget w) - method move w = Fixed.move obj (as_widget w) -end - -let fixed ?border_width ?width ?height ?packing ?show () = - let w = Fixed.create () in - Container.set w ?border_width ?width ?height; - pack_return (new fixed w) ~packing ~show - -class layout obj = object - inherit container_full (obj : Gtk.layout obj) - method event = new GObj.event_ops obj - method put w = Layout.put obj (as_widget w) - method move w = Layout.move obj (as_widget w) - method set_hadjustment adj = - Layout.set_hadjustment obj (GData.as_adjustment adj) - method set_vadjustment adj = - Layout.set_vadjustment obj (GData.as_adjustment adj) - method set_width width = Layout.set_size obj ~width - method set_height height = Layout.set_size obj ~height - method hadjustment = new GData.adjustment (Layout.get_hadjustment obj) - method vadjustment = new GData.adjustment (Layout.get_vadjustment obj) - method freeze () = Layout.freeze obj - method thaw () = Layout.thaw obj - method width = Layout.get_width obj - method height = Layout.get_height obj -end - -let layout ?hadjustment ?vadjustment ?layout_width ?layout_height - ?border_width ?width ?height ?packing ?show () = - let w = Layout.create - (Gpointer.optboxed (may_map ~f:GData.as_adjustment hadjustment)) - (Gpointer.optboxed (may_map ~f:GData.as_adjustment vadjustment)) in - if layout_width <> None || layout_height <> None then - Layout.set_size w ?width:layout_width ?height:layout_height; - Container.set w ?border_width ?width ?height; - pack_return (new layout w) ~packing ~show - - -class packer obj = object - inherit container_full (obj : Gtk.packer obj) - method pack ?side ?anchor ?expand ?fill - ?border_width ?pad_x ?pad_y ?i_pad_x ?i_pad_y w = - let options = Packer.build_options ?expand ?fill () in - if border_width == None && pad_x == None && pad_y == None && - i_pad_x == None && i_pad_y == None - then Packer.add_defaults obj (as_widget w) ?side ?anchor ~options - else Packer.add obj (as_widget w) ?side ?anchor ~options - ?border_width ?pad_x ?pad_y ?i_pad_x ?i_pad_y - method set_child_packing ?side ?anchor ?expand ?fill - ?border_width ?pad_x ?pad_y ?i_pad_x ?i_pad_y w = - Packer.set_child_packing obj (as_widget w) ?side ?anchor - ~options:(Packer.build_options ?expand ?fill ()) - ?border_width ?pad_x ?pad_y ?i_pad_x ?i_pad_y - method reorder_child w = Packer.reorder_child obj (as_widget w) - method set_spacing = Packer.set_spacing obj - method set_defaults = Packer.set_defaults obj -end - -let packer ?spacing ?border_width ?width ?height ?packing ?show () = - let w = Packer.create () in - may spacing ~f:(Packer.set_spacing w); - Container.set w ?border_width ?width ?height; - pack_return (new packer w) ~packing ~show - -class paned obj = object - inherit container_full (obj : Gtk.paned obj) - method event = new GObj.event_ops obj - method add w = - if List.length (Container.children obj) = 2 then - raise(Error "Gpack.paned#add: already full"); - Container.add obj (as_widget w) - method add1 w = - try ignore(Paned.child1 obj); raise(Error "GPack.paned#add1: already full") - with _ -> Paned.add1 obj (as_widget w) - method add2 w = - try ignore(Paned.child2 obj); raise(Error "GPack.paned#add2: already full") - with _ -> Paned.add2 obj (as_widget w) - method set_handle_size = Paned.set_handle_size obj - method set_gutter_size = Paned.set_gutter_size obj - method child1 = new widget (Paned.child1 obj) - method child2 = new widget (Paned.child2 obj) - method handle_size = Paned.handle_size obj - method gutter_size = Paned.gutter_size obj -end - -let paned dir ?handle_size ?gutter_size - ?border_width ?width ?height ?packing ?show () = - let w = Paned.create dir in - Paned.set w ?handle_size ?gutter_size; - Container.set w ?border_width ?width ?height; - pack_return (new paned w) ~packing ~show - -class notebook_signals obj = object - inherit GContainer.container_signals obj - method switch_page = - GtkSignal.connect obj ~sgn:Notebook.Signals.switch_page ~after -end - -class notebook obj = object (self) - inherit GContainer.container obj - method event = new GObj.event_ops obj - method connect = new notebook_signals obj - method insert_page ?tab_label ?menu_label ~pos child = - Notebook.insert_page obj (as_widget child) ~pos - ~tab_label:(Gpointer.may_box tab_label ~f:as_widget) - ~menu_label:(Gpointer.may_box menu_label ~f:as_widget) - method append_page = self#insert_page ~pos:(-1) - method prepend_page = self#insert_page ~pos:0 - method remove_page = Notebook.remove_page obj - method current_page = Notebook.get_current_page obj - method goto_page = Notebook.set_page obj - method previous_page () = Notebook.prev_page obj - method next_page () = Notebook.next_page obj - method set_tab_pos = Notebook.set_tab_pos obj - method set_show_tabs = Notebook.set_show_tabs obj - method set_homogeneous_tabs = Notebook.set_homogeneous_tabs obj - method set_show_border = Notebook.set_show_border obj - method set_scrollable = Notebook.set_scrollable obj - method set_tab_border = Notebook.set_tab_border obj - method set_popup = Notebook.set_popup obj - method page_num w = Notebook.page_num obj (as_widget w) - method get_nth_page n = new widget (Notebook.get_nth_page obj n) - method get_tab_label w = - new widget (Notebook.get_tab_label obj (as_widget w)) - method get_menu_label w = - new widget (Notebook.get_tab_label obj (as_widget w)) - method set_page ?tab_label ?menu_label page = - let child = as_widget page in - may tab_label - ~f:(fun lbl -> Notebook.set_tab_label obj child (as_widget lbl)); - may menu_label - ~f:(fun lbl -> Notebook.set_menu_label obj child (as_widget lbl)) -end - -let notebook ?tab_pos ?tab_border ?show_tabs ?homogeneous_tabs - ?show_border ?scrollable ?popup - ?border_width ?width ?height ?packing ?show () = - let w = Notebook.create () in - Notebook.set w ?tab_pos ?tab_border ?show_tabs - ?homogeneous_tabs ?show_border ?scrollable ?popup; - Container.set w ?border_width ?width ?height; - pack_return (new notebook w) ~packing ~show diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gPack.mli b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gPack.mli deleted file mode 100644 index 994c8b87f..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gPack.mli +++ /dev/null @@ -1,267 +0,0 @@ -(* $Id$ *) - -open Gtk -open GObj -open GContainer - -class box_skel : - 'a obj -> - object - inherit container - constraint 'a = [>`box|`container|`widget] - val obj : 'a obj - method pack : - ?from:Tags.pack_type -> - ?expand:bool -> ?fill:bool -> ?padding:int -> widget -> unit - method reorder_child : widget -> pos:int -> unit - method set_child_packing : - ?from:Tags.pack_type -> - ?expand:bool -> ?fill:bool -> ?padding:int -> widget -> unit - method set_homogeneous : bool -> unit - method set_spacing : int -> unit - end -class box : - 'a obj -> - object - inherit box_skel - constraint 'a = [>`box|`container|`widget] - val obj : 'a obj - method connect : GContainer.container_signals - end - -val box : - Tags.orientation -> - ?homogeneous:bool -> - ?spacing:int -> - ?border_width:int -> - ?width:int -> - ?height:int -> ?packing:(widget -> unit) -> ?show:bool -> unit -> box -val vbox : - ?homogeneous:bool -> - ?spacing:int -> - ?border_width:int -> - ?width:int -> - ?height:int -> ?packing:(widget -> unit) -> ?show:bool -> unit -> box -val hbox : - ?homogeneous:bool -> - ?spacing:int -> - ?border_width:int -> - ?width:int -> - ?height:int -> ?packing:(widget -> unit) -> ?show:bool -> unit -> box - -class button_box : - Gtk.button_box obj -> - object - inherit container_full - val obj : Gtk.button_box obj - method pack : - ?from:Tags.pack_type -> - ?expand:bool -> ?fill:bool -> ?padding:int -> widget -> unit - method reorder_child : widget -> pos:int -> unit - method set_child_ipadding : ?x:int -> ?y:int -> unit -> unit - method set_child_packing : - ?from:Tags.pack_type -> - ?expand:bool -> ?fill:bool -> ?padding:int -> widget -> unit - method set_child_size : ?width:int -> ?height:int -> unit -> unit - method set_homogeneous : bool -> unit - method set_layout : GtkPack.BBox.bbox_style -> unit - method set_spacing : int -> unit - end -val button_box : - Tags.orientation -> - ?spacing:int -> - ?child_width:int -> - ?child_height:int -> - ?child_ipadx:int -> - ?child_ipady:int -> - ?layout:GtkPack.BBox.bbox_style -> - ?border_width:int -> - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> button_box - -class table : - Gtk.table obj -> - object - inherit container_full - val obj : Gtk.table obj - method attach : - left:int -> - top:int -> - ?right:int -> - ?bottom:int -> - ?expand:Tags.expand_type -> - ?fill:Tags.expand_type -> - ?shrink:Tags.expand_type -> - ?xpadding:int -> ?ypadding:int -> widget -> unit - method set_col_spacing : int -> int -> unit - method set_col_spacings : int -> unit - method set_homogeneous : bool -> unit - method set_row_spacing : int -> int -> unit - method set_row_spacings : int -> unit - end -val table : - rows:int -> - columns:int -> - ?homogeneous:bool -> - ?row_spacings:int -> - ?col_spacings:int -> - ?border_width:int -> - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> table - -class fixed : - Gtk.fixed obj -> - object - inherit container_full - val obj : Gtk.fixed obj - method event : event_ops - method move : widget -> x:int -> y:int -> unit - method put : widget -> x:int -> y:int -> unit - end -val fixed : - ?border_width:int -> - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> fixed - -class layout : - Gtk.layout obj -> - object - inherit container_full - val obj : Gtk.layout obj - method event : event_ops - method freeze : unit -> unit - method hadjustment : GData.adjustment - method height : int - method move : widget -> x:int -> y:int -> unit - method put : widget -> x:int -> y:int -> unit - method set_hadjustment : GData.adjustment -> unit - method set_height : int -> unit - method set_vadjustment : GData.adjustment -> unit - method set_width : int -> unit - method thaw : unit -> unit - method vadjustment : GData.adjustment - method width : int - end -val layout : - ?hadjustment:GData.adjustment -> - ?vadjustment:GData.adjustment -> - ?layout_width:int -> - ?layout_height:int -> - ?border_width:int -> - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> layout - -class notebook_signals : 'a obj -> - object - inherit container_signals - constraint 'a = [>`notebook|`container|`widget] - val obj : 'a obj - method switch_page : callback:(int -> unit) -> GtkSignal.id - end - -class notebook : ([> `widget | `container | `notebook] as 'a) obj -> - object - inherit container - val obj : 'a obj - method event : event_ops - method append_page : - ?tab_label:widget -> ?menu_label:widget -> widget -> unit - method connect : notebook_signals - method current_page : int - method get_menu_label : widget -> widget - method get_nth_page : int -> widget - method get_tab_label : widget -> widget - method goto_page : int -> unit - method insert_page : - ?tab_label:widget -> ?menu_label:widget -> pos:int -> widget -> unit - method next_page : unit -> unit - method page_num : widget -> int - method prepend_page : - ?tab_label:widget -> ?menu_label:widget -> widget -> unit - method previous_page : unit -> unit - method remove_page : int -> unit - method set_homogeneous_tabs : bool -> unit - method set_page : - ?tab_label:widget -> ?menu_label:widget -> widget -> unit - method set_popup : bool -> unit - method set_scrollable : bool -> unit - method set_show_border : bool -> unit - method set_show_tabs : bool -> unit - method set_tab_border : int -> unit - method set_tab_pos : Tags.position -> unit - end -val notebook : - ?tab_pos:Tags.position -> - ?tab_border:int -> - ?show_tabs:bool -> - ?homogeneous_tabs:bool -> - ?show_border:bool -> - ?scrollable:bool -> - ?popup:bool -> - ?border_width:int -> - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> notebook - -class packer : - Gtk.packer obj -> - object - inherit container_full - val obj : Gtk.packer obj - method pack : - ?side:Tags.side_type -> - ?anchor:Tags.anchor_type -> - ?expand:bool -> - ?fill:Tags.expand_type -> - ?border_width:int -> - ?pad_x:int -> - ?pad_y:int -> ?i_pad_x:int -> ?i_pad_y:int -> widget -> unit - method reorder_child : widget -> pos:int -> unit - method set_child_packing : - ?side:Tags.side_type -> - ?anchor:Tags.anchor_type -> - ?expand:bool -> - ?fill:Tags.expand_type -> - ?border_width:int -> - ?pad_x:int -> - ?pad_y:int -> ?i_pad_x:int -> ?i_pad_y:int -> widget -> unit - method set_defaults : - ?border_width:int -> - ?pad_x:int -> - ?pad_y:int -> ?i_pad_x:int -> ?i_pad_y:int -> unit -> unit - method set_spacing : int -> unit - end -val packer : - ?spacing:int -> - ?border_width:int -> - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> packer - -class paned : - Gtk.paned obj -> - object - inherit container_full - val obj : Gtk.paned obj - method add1 : widget -> unit - method add2 : widget -> unit - method event : event_ops - method child1 : widget - method child2 : widget - method gutter_size : int - method handle_size : int - method set_gutter_size : int -> unit - method set_handle_size : int -> unit - end -val paned : - Tags.orientation -> - ?handle_size:int -> - ?gutter_size:int -> - ?border_width:int -> - ?width:int -> - ?height:int -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> paned diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gRange.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gRange.ml deleted file mode 100644 index 7df53ced1..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gRange.ml +++ /dev/null @@ -1,83 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gtk -open GtkBase -open GtkRange -open GObj - -class progress obj = object - inherit widget_full obj - method set_adjustment adj = - Progress.set_adjustment obj (GData.as_adjustment adj) - method set_show_text = Progress.set_show_text obj - method set_format_string = Progress.set_format_string obj - method set_text_alignment = Progress.set_text_alignment obj - method set_activity_mode = Progress.set_activity_mode obj - method set_value = Progress.set_value obj - method set_percentage = Progress.set_percentage obj - method configure = Progress.configure obj - method value = Progress.get_value obj - method percentage = Progress.get_percentage obj - method current_text = Progress.get_current_text obj - method adjustment = new GData.adjustment (Progress.get_adjustment obj) -end - -class progress_bar obj = object - inherit progress (obj : Gtk.progress_bar obj) - method event = new GObj.event_ops obj - method set_bar_style = ProgressBar.set_bar_style obj - method set_discrete_blocks = ProgressBar.set_discrete_blocks obj - method set_activity_step = ProgressBar.set_activity_step obj - method set_activity_blocks = ProgressBar.set_activity_blocks obj - method set_orientation = ProgressBar.set_orientation obj -end - -let progress_bar ?adjustment ?bar_style ?discrete_blocks - ?activity_step ?activity_blocks ?value ?percentage ?activity_mode - ?show_text ?format_string ?text_xalign ?text_yalign - ?packing ?show () = - let w = - match adjustment with None -> ProgressBar.create () - | Some adj -> - ProgressBar.create_with_adjustment (GData.as_adjustment adj) - in - ProgressBar.set w ?bar_style ?discrete_blocks - ?activity_step ?activity_blocks; - Progress.set w ?value ?percentage ?activity_mode - ?show_text ?format_string ?text_xalign ?text_yalign; - pack_return (new progress_bar w) ~packing ~show - -class range obj = object - inherit widget_full obj - method adjustment = new GData.adjustment (Range.get_adjustment obj) - method set_adjustment adj = - Range.set_adjustment obj (GData.as_adjustment adj) - method set_update_policy = Range.set_update_policy obj -end - -class scale obj = object - inherit range (obj : Gtk.scale obj) - method set_digits = Scale.set_digits obj - method set_draw_value = Scale.set_draw_value obj - method set_value_pos = Scale.set_value_pos obj -end - -let scale dir ?adjustment ?digits ?draw_value ?value_pos - ?packing ?show () = - let w = - Scale.create dir ?adjustment:(may_map ~f:GData.as_adjustment adjustment) - in - let () = Scale.set w ?digits ?draw_value ?value_pos in - pack_return (new scale w) ~packing ~show - -class scrollbar obj = object - inherit range (obj : Gtk.scrollbar obj) - method event = new GObj.event_ops obj -end - -let scrollbar dir ?adjustment ?update_policy ?packing ?show () = - let w = Scrollbar.create dir - ?adjustment:(may_map ~f:GData.as_adjustment adjustment) in - let () = may update_policy ~f:(Range.set_update_policy w) in - pack_return (new scrollbar w) ~packing ~show diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gRange.mli b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gRange.mli deleted file mode 100644 index ac9b38c27..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gRange.mli +++ /dev/null @@ -1,87 +0,0 @@ -(* $Id$ *) - -open Gtk -open GObj - -class progress : 'a obj -> - object - inherit widget_full - constraint 'a = [>`progress|`widget] - val obj : 'a obj - method adjustment : GData.adjustment - method configure : current:float -> min:float -> max:float -> unit - method current_text : string - method percentage : float - method set_activity_mode : bool -> unit - method set_adjustment : GData.adjustment -> unit - method set_format_string : string -> unit - method set_percentage : float -> unit - method set_show_text : bool -> unit - method set_text_alignment : ?x:float -> ?y:float -> unit -> unit - method set_value : float -> unit - method value : float - end - -class progress_bar : Gtk.progress_bar obj -> - object - inherit progress - val obj : Gtk.progress_bar obj - method event : event_ops - method set_activity_blocks : int -> unit - method set_activity_step : int -> unit - method set_bar_style : [`CONTINUOUS|`DISCRETE] -> unit - method set_discrete_blocks : int -> unit - method set_orientation : Tags.progress_bar_orientation -> unit - end -val progress_bar : - ?adjustment:GData.adjustment -> - ?bar_style:[`CONTINUOUS|`DISCRETE] -> - ?discrete_blocks:int -> - ?activity_step:int -> - ?activity_blocks:int -> - ?value:float -> - ?percentage:float -> - ?activity_mode:bool -> - ?show_text:bool -> - ?format_string:string -> - ?text_xalign:float -> - ?text_yalign:float -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> progress_bar - -class range : 'a obj -> - object - inherit widget_full - constraint 'a = [>`range|`widget] - val obj : 'a obj - method adjustment : GData.adjustment - method set_adjustment : GData.adjustment -> unit - method set_update_policy : Tags.update_type -> unit - end - -class scale : Gtk.scale obj -> - object - inherit range - val obj : Gtk.scale obj - method set_digits : int -> unit - method set_draw_value : bool -> unit - method set_value_pos : Tags.position -> unit - end -val scale : - Tags.orientation -> - ?adjustment:GData.adjustment -> - ?digits:int -> - ?draw_value:bool -> - ?value_pos:Tags.position -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> scale - -class scrollbar : Gtk.scrollbar obj -> - object - inherit range - val obj : Gtk.scrollbar obj - method event : event_ops - end -val scrollbar : - Tags.orientation -> - ?adjustment:GData.adjustment -> - ?update_policy:Tags.update_type -> - ?packing:(widget -> unit) -> ?show:bool -> unit -> scrollbar diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gTree.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gTree.ml deleted file mode 100644 index 80dab7be6..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gTree.ml +++ /dev/null @@ -1,76 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gtk -open GtkBase -open GtkTree -open GObj -open GContainer - -class tree_item_signals obj = object - inherit item_signals obj - method expand = GtkSignal.connect obj ~sgn:TreeItem.Signals.expand ~after - method collapse = GtkSignal.connect obj ~sgn:TreeItem.Signals.collapse ~after -end - -class tree_item obj = object - inherit container obj - method event = new GObj.event_ops obj - method as_item : Gtk.tree_item obj = obj - method connect = new tree_item_signals obj - method set_subtree (w : tree) = TreeItem.set_subtree obj w#as_tree - method remove_subtree () = TreeItem.remove_subtree obj - method expand () = TreeItem.expand obj - method collapse () = TreeItem.collapse obj - method subtree = - try Some(new tree (TreeItem.subtree obj)) with Gpointer.Null -> None -end - -and tree_signals obj = object - inherit container_signals obj - method selection_changed = - GtkSignal.connect obj ~sgn:Tree.Signals.selection_changed ~after - method select_child ~callback = - GtkSignal.connect obj ~sgn:Tree.Signals.select_child ~after - ~callback:(fun w -> callback (new tree_item (TreeItem.cast w))) - method unselect_child ~callback = - GtkSignal.connect obj ~sgn:Tree.Signals.unselect_child ~after - ~callback:(fun w -> callback (new tree_item (TreeItem.cast w))) -end - -and tree obj = object (self) - inherit [tree_item] item_container obj - method event = new GObj.event_ops obj - method as_tree = Tree.coerce obj - method insert w ~pos = Tree.insert obj w#as_item ~pos - method connect = new tree_signals obj - method clear_items = Tree.clear_items obj - method select_item = Tree.select_item obj - method unselect_item = Tree.unselect_item obj - method child_position (w : tree_item) = Tree.child_position obj w#as_item - method remove_items items = - Tree.remove_items obj - (List.map ~f:(fun (t : tree_item) -> t#as_item) items) - method set_selection_mode = Tree.set_selection_mode obj - method set_view_mode = Tree.set_view_mode obj - method set_view_lines = Tree.set_view_lines obj - method selection = - List.map ~f:(fun w -> self#wrap (Widget.coerce w)) (Tree.selection obj) - method private wrap w = - new tree_item (TreeItem.cast w) -end - -let tree_item ?label ?border_width ?width ?height ?packing ?show () = - let w = TreeItem.create ?label () in - Container.set w ?border_width ?width ?height; - let self = new tree_item w in - may packing ~f:(fun f -> (f self : unit)); - if show <> Some false then self#misc#show (); - self - -let tree ?selection_mode ?view_mode ?view_lines - ?border_width ?width ?height ?packing ?show () = - let w = Tree.create () in - Tree.set w ?selection_mode ?view_mode ?view_lines; - Container.set w ?border_width ?width ?height; - pack_return (new tree w) ~packing ~show diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gTree.mli b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gTree.mli deleted file mode 100644 index d48e09b2a..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gTree.mli +++ /dev/null @@ -1,72 +0,0 @@ -(* $Id$ *) - -open Gtk -open GObj -open GContainer - -class tree_item_signals : 'a obj -> - object - inherit item_signals - constraint 'a = [>`treeitem|`container|`item|`widget] - val obj : 'a obj - method collapse : callback:(unit -> unit) -> GtkSignal.id - method expand : callback:(unit -> unit) -> GtkSignal.id - end - -class tree_item : Gtk.tree_item obj -> - object - inherit GContainer.container - val obj : Gtk.tree_item obj - method event : event_ops - method as_item : Gtk.tree_item obj - method collapse : unit -> unit - method connect : tree_item_signals - method expand : unit -> unit - method remove_subtree : unit -> unit - method set_subtree : tree -> unit - method subtree : tree option - end - -and tree_signals : Gtk.tree obj -> - object - inherit container_signals - val obj : Gtk.tree obj - method select_child : callback:(tree_item -> unit) -> GtkSignal.id - method selection_changed : callback:(unit -> unit) -> GtkSignal.id - method unselect_child : callback:(tree_item -> unit) -> GtkSignal.id - end - -and tree : Gtk.tree obj -> - object - inherit [tree_item] item_container - val obj : Gtk.tree obj - method event : event_ops - method as_tree : Gtk.tree obj - method child_position : tree_item -> int - method clear_items : start:int -> stop:int -> unit - method connect : tree_signals - method insert : tree_item -> pos:int -> unit - method remove_items : tree_item list -> unit - method select_item : pos:int -> unit - method selection : tree_item list - method set_selection_mode : Tags.selection_mode -> unit - method set_view_lines : bool -> unit - method set_view_mode : [`LINE|`ITEM] -> unit - method unselect_item : pos:int -> unit - method private wrap : Gtk.widget obj -> tree_item - end - -val tree_item : - ?label:string -> - ?border_width:int -> - ?width:int -> - ?height:int -> - ?packing:(tree_item -> unit) -> ?show:bool -> unit -> tree_item - -val tree : - ?selection_mode:Tags.selection_mode -> - ?view_mode:[`LINE|`ITEM] -> - ?view_lines:bool -> - ?border_width:int -> - ?width:int -> - ?height:int -> ?packing:(GObj.widget -> unit) -> ?show:bool -> unit -> tree diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gUtil.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gUtil.ml deleted file mode 100644 index 260c2acee..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gUtil.ml +++ /dev/null @@ -1,80 +0,0 @@ -(* $Id$ *) - -open GObj - -class ['a] memo () = object - constraint 'a = #widget - val tbl = Hashtbl.create 7 - method add (obj : 'a) = - Hashtbl.add tbl ~key:obj#get_id ~data:obj - method find (obj : widget) = Hashtbl.find tbl obj#get_id - method remove (obj : widget) = Hashtbl.remove tbl obj#get_id -end - -let signal_id = ref 0 - -let next_callback_id () : GtkSignal.id = - decr signal_id; Obj.magic (!signal_id : int) - -class ['a] signal () = object (self) - val mutable callbacks : (GtkSignal.id * ('a -> unit)) list = [] - method callbacks = callbacks - method connect ~after ~callback = - let id = next_callback_id () in - callbacks <- - if after then callbacks @ [id,callback] else (id,callback)::callbacks; - id - method call arg = - List.exists callbacks ~f: - begin fun (_,f) -> - let old = GtkSignal.push_callback () in - try f arg; GtkSignal.pop_callback old - with exn -> GtkSignal.pop_callback old; raise exn - end; - () - method disconnect key = - List.mem_assoc key callbacks && - (callbacks <- List.remove_assoc key callbacks; true) -end - -class virtual ml_signals disconnectors = - object (self) - val after = false - method after = {< after = true >} - val mutable disconnectors : (GtkSignal.id -> bool) list = disconnectors - method disconnect key = - ignore (List.exists disconnectors ~f:(fun f -> f key)) - end - -class virtual add_ml_signals obj disconnectors = - object (self) - val mutable disconnectors : (GtkSignal.id -> bool) list = disconnectors - method disconnect key = - if List.exists disconnectors ~f:(fun f -> f key) then () - else GtkSignal.disconnect obj key - end - -class ['a] variable_signals ~(set : 'a signal) ~(changed : 'a signal) = - object - inherit ml_signals [changed#disconnect; set#disconnect] - method changed = changed#connect ~after - method set = set#connect ~after - end - -class ['a] variable x = - object (self) - val changed = new signal () - val set = new signal () - method connect = new variable_signals ~set ~changed - val mutable x : 'a = x - method get = x - method set = set#call - method private equal : 'a -> 'a -> bool = (=) - method private real_set y = - let x0 = x in x <- y; - if changed#callbacks <> [] && not (self#equal x x0) - then changed#call y - initializer - ignore (set#connect ~after:false ~callback:self#real_set) - end - diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gUtil.mli b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gUtil.mli deleted file mode 100644 index cd88d8697..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gUtil.mli +++ /dev/null @@ -1,109 +0,0 @@ -(* $Id$ *) - -open GObj - -(* The memo class provides an easy way to remember the real class of - a widget. - Insert all widgets of class in one single t memo, and you can then - recover their original ML object with #find. -*) - -class ['a] memo : unit -> - object - constraint 'a = #widget - val tbl : (int, 'a) Hashtbl.t - method add : 'a -> unit - method find : widget -> 'a - method remove : widget -> unit - end - -(* The ML signal mechanism allows one to add GTK-like signals to - arbitrary objects. -*) - -val next_callback_id : unit -> GtkSignal.id - -class ['a] signal : - unit -> - object - val mutable callbacks : (GtkSignal.id * ('a -> unit)) list - method callbacks : (GtkSignal.id * ('a -> unit)) list - method call : 'a -> unit - method connect : after:bool -> callback:('a -> unit) -> GtkSignal.id - method disconnect : GtkSignal.id -> bool - end -(* As with GTK signals, you can use [GtkSignal.stop_emit] inside a - callback to prevent other callbacks from being called. *) - -class virtual ml_signals : (GtkSignal.id -> bool) list -> - object ('a) - val after : bool - method after : 'a - method disconnect : GtkSignal.id -> unit - val mutable disconnectors : (GtkSignal.id -> bool) list - end -class virtual add_ml_signals : - 'a Gtk.obj -> (GtkSignal.id -> bool) list -> - object - method disconnect : GtkSignal.id -> unit - val mutable disconnectors : (GtkSignal.id -> bool) list - end - -(* To add ML signals to a LablGTK object: - - class mywidget_signals obj ~mysignal1 ~mysignal2 = object - inherit somewidget_signals obj - inherit add_ml_signals obj [mysignal1#disconnect; mysignal2#disconnect] - method mysignal1 = mysignal1#connect ~after - method mysignal2 = mysignal2#connect ~after - end - - class mywidget obj = object (self) - inherit somewidget obj - val mysignal1 = new signal obj - val mysignal2 = new signal obj - method connect = new mywidget_signals obj ~mysignal1 ~mysignal2 - method call1 = mysignal1#call - method call2 = mysignal2#call - end - - You can also add ML signals to an arbitrary object; just inherit - from [ml_signals] in place of [widget_signals]+[add_ml_signals]. - - class mysignals ~mysignal1 ~mysignal2 = object - inherit ml_signals [mysignal1#disconnect; mysignal2#disconnect] - method mysignal1 = mysignal1#connect ~after - method mysignal2 = mysignal2#connect ~after - end -*) - -(* The variable class provides an easy way to propagate state modifications. - A new variable is created by [new variable init]. The [#set] method just - calls the [set] signal, which by default only calls [real_set]. - [real_set] sets the variable and calls [changed] when needed. - Deep equality is used to compare values, but check is only done if - there are callbacks for [changed]. -*) - -class ['a] variable_signals : - set:'a signal -> changed:'a signal -> - object ('b) - val after : bool - method after : 'b - method set : callback:('a -> unit) -> GtkSignal.id - method changed : callback:('a -> unit) -> GtkSignal.id - method disconnect : GtkSignal.id -> unit - val mutable disconnectors : (GtkSignal.id -> bool) list - end - -class ['a] variable : 'a -> - object - val set : 'a signal - val changed : 'a signal - val mutable x : 'a - method connect : 'a variable_signals - method get : 'a - method set : 'a -> unit - method private equal : 'a -> 'a -> bool - method private real_set : 'a -> unit - end diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gWindow.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gWindow.ml deleted file mode 100644 index 9ee313647..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gWindow.ml +++ /dev/null @@ -1,151 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gtk -open GtkBase -open GtkWindow -open GtkMisc -open GObj -open GContainer - -class ['a] window_skel obj = object - constraint 'a = _ #window_skel - inherit container obj - method event = new GObj.event_ops obj - method as_window = Window.coerce obj - method activate_focus () = Window.activate_focus obj - method activate_default () = Window.activate_default obj - method add_accel_group = Window.add_accel_group obj - method set_modal = Window.set_modal obj - method set_default_size = Window.set_default_size obj - method set_position = Window.set_position obj - method set_resize_mode = Container.set_resize_mode obj - method set_transient_for (w : 'a) = - Window.set_transient_for obj w#as_window - method set_title = Window.set_title obj - method set_wm_name name = Window.set_wmclass obj ~name - method set_wm_class cls = Window.set_wmclass obj ~clas:cls - method set_allow_shrink allow_shrink = Window.set_policy obj ~allow_shrink - method set_allow_grow allow_grow = Window.set_policy obj ~allow_grow - method set_auto_shrink auto_shrink = Window.set_policy obj ~auto_shrink - method show () = Widget.show obj -end - -class window obj = object - inherit [window] window_skel (Window.coerce obj) - method connect = new container_signals obj -end - -let window ?kind:(t=`TOPLEVEL) ?title ?wm_name ?wm_class ?position - ?allow_shrink ?allow_grow ?auto_shrink ?modal ?x ?y - ?border_width ?width ?height ?(show=false) () = - let w = Window.create t in - Window.set w ?title ?wm_name ?wm_class ?position - ?allow_shrink ?allow_grow ?auto_shrink ?modal ?x ?y; - Container.set w ?border_width ?width ?height; - if show then Widget.show w; - new window w - -class dialog obj = object - inherit [window] window_skel (Dialog.coerce obj) - method connect = new container_signals obj - method action_area = new GPack.box (Dialog.action_area obj) - method vbox = new GPack.box (Dialog.vbox obj) -end - -let dialog ?title ?wm_name ?wm_class ?position ?allow_shrink - ?allow_grow ?auto_shrink ?modal ?x ?y ?border_width ?width ?height - ?(show=false) () = - let w = Dialog.create () in - Window.set w ?title ?wm_name ?wm_class ?position - ?allow_shrink ?allow_grow ?auto_shrink ?modal ?x ?y; - Container.set w ?border_width ?width ?height; - if show then Widget.show w; - new dialog w - -class color_selection_dialog obj = object - inherit [window] window_skel (obj : Gtk.color_selection_dialog obj) - method connect = new container_signals obj - method ok_button = - new GButton.button (ColorSelection.ok_button obj) - method cancel_button = - new GButton.button (ColorSelection.cancel_button obj) - method help_button = - new GButton.button (ColorSelection.help_button obj) - method colorsel = - new GMisc.color_selection (ColorSelection.colorsel obj) -end - -let color_selection_dialog ?(title="Pick a color") - ?wm_name ?wm_class ?position - ?allow_shrink ?allow_grow ?auto_shrink ?modal ?x ?y - ?border_width ?width ?height ?(show=false) () = - let w = ColorSelection.create_dialog title in - Window.set w ?wm_name ?wm_class ?position - ?allow_shrink ?allow_grow ?auto_shrink ?modal ?x ?y; - Container.set w ?border_width ?width ?height; - if show then Widget.show w; - new color_selection_dialog w - -class file_selection obj = object - inherit [window] window_skel (obj : Gtk.file_selection obj) - method connect = new container_signals obj - method set_filename = FileSelection.set_filename obj - method get_filename = FileSelection.get_filename obj - method set_fileop_buttons = FileSelection.set_fileop_buttons obj - method ok_button = new GButton.button (FileSelection.get_ok_button obj) - method cancel_button = - new GButton.button (FileSelection.get_cancel_button obj) - method help_button = new GButton.button (FileSelection.get_help_button obj) -end - -let file_selection ?(title="Choose a file") ?filename - ?(fileop_buttons=false) - ?wm_name ?wm_class ?position - ?allow_shrink ?allow_grow ?auto_shrink ?modal ?x ?y - ?border_width ?width ?height ?(show=false) () = - let w = FileSelection.create title in - FileSelection.set w ?filename ~fileop_buttons; - Window.set w ?wm_name ?wm_class ?position - ?allow_shrink ?allow_grow ?auto_shrink ?modal ?x ?y; - Container.set w ?border_width ?width ?height; - if show then Widget.show w; - new file_selection w - -class font_selection_dialog obj = object - inherit [window] window_skel (obj : Gtk.font_selection_dialog obj) - method connect = new container_signals obj -(* - method font = FontSelectionDialog.get_font obj - method font_name = FontSelectionDialog.get_font_name obj - method set_font_name = FontSelectionDialog.set_font_name obj - method preview_text = FontSelectionDialog.get_preview_text obj - method set_preview_text = FontSelectionDialog.set_preview_text obj - method set_filter = FontSelectionDialog.set_filter obj -*) - method selection = - new GMisc.font_selection (FontSelectionDialog.font_selection obj) - method ok_button = new GButton.button (FontSelectionDialog.ok_button obj) - method apply_button = - new GButton.button (FontSelectionDialog.apply_button obj) - method cancel_button = - new GButton.button (FontSelectionDialog.cancel_button obj) -end - -let font_selection_dialog ?title ?wm_name ?wm_class ?position - ?allow_shrink ?allow_grow ?auto_shrink ?modal ?x ?y - ?border_width ?width ?height ?(show=false) () = - let w = FontSelectionDialog.create ?title () in - Window.set w ?wm_name ?wm_class ?position - ?allow_shrink ?allow_grow ?auto_shrink ?modal ?x ?y; - Container.set w ?border_width ?width ?height; - if show then Widget.show w; - new font_selection_dialog w - -class plug (obj : Gtk.plug obj) = window obj - -let plug ~window:xid ?border_width ?width ?height ?(show=false) () = - let w = Plug.create xid in - Container.set w ?border_width ?width ?height; - if show then Widget.show w; - new plug w diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gWindow.mli b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gWindow.mli deleted file mode 100644 index 4c89a76b6..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gWindow.mli +++ /dev/null @@ -1,156 +0,0 @@ -(* $Id$ *) - -open Gtk -open GObj - -class ['a] window_skel : 'b obj -> - object - inherit GContainer.container - constraint 'a = 'a #window_skel - constraint 'b = [>`widget|`container|`window] - val obj : 'b obj - method activate_default : unit -> unit - method activate_focus : unit -> unit - method add_accel_group : accel_group -> unit - method event : event_ops - method as_window : Gtk.window obj - method set_allow_grow : bool -> unit - method set_allow_shrink : bool -> unit - method set_auto_shrink : bool -> unit - method set_default_size : width:int -> height:int -> unit - method set_modal : bool -> unit - method set_position : Tags.window_position -> unit - method set_resize_mode : Tags.resize_mode -> unit - method set_title : string -> unit - method set_transient_for : 'a -> unit - method set_wm_class : string -> unit - method set_wm_name : string -> unit - method show : unit -> unit - end - -class window : [>`window] obj -> - object - inherit [window] window_skel - val obj : Gtk.window obj - method connect : GContainer.container_signals - end -val window : - ?kind:Tags.window_type -> - ?title:string -> - ?wm_name:string -> - ?wm_class:string -> - ?position:Tags.window_position -> - ?allow_shrink:bool -> - ?allow_grow:bool -> - ?auto_shrink:bool -> - ?modal:bool -> - ?x:int -> - ?y:int -> - ?border_width:int -> - ?width:int -> ?height:int -> ?show:bool -> unit -> window - -class dialog : [>`dialog] obj -> - object - inherit [window] window_skel - val obj : Gtk.dialog obj - method action_area : GPack.box - method connect : GContainer.container_signals - method event : event_ops - method vbox : GPack.box - end -val dialog : - ?title:string -> - ?wm_name:string -> - ?wm_class:string -> - ?position:Tags.window_position -> - ?allow_shrink:bool -> - ?allow_grow:bool -> - ?auto_shrink:bool -> - ?modal:bool -> - ?x:int -> - ?y:int -> - ?border_width:int -> - ?width:int -> ?height:int -> ?show:bool -> unit -> dialog - -class color_selection_dialog : Gtk.color_selection_dialog obj -> - object - inherit [window] window_skel - val obj : Gtk.color_selection_dialog obj - method cancel_button : GButton.button - method colorsel : GMisc.color_selection - method connect : GContainer.container_signals - method help_button : GButton.button - method ok_button : GButton.button - end -val color_selection_dialog : - ?title:string -> - ?wm_name:string -> - ?wm_class:string -> - ?position:Tags.window_position -> - ?allow_shrink:bool -> - ?allow_grow:bool -> - ?auto_shrink:bool -> - ?modal:bool -> - ?x:int -> - ?y:int -> - ?border_width:int -> - ?width:int -> ?height:int -> ?show:bool -> unit -> color_selection_dialog - -class file_selection : Gtk.file_selection obj -> - object - inherit [window] window_skel - val obj : Gtk.file_selection obj - method cancel_button : GButton.button - method connect : GContainer.container_signals - method get_filename : string - method help_button : GButton.button - method ok_button : GButton.button - method set_filename : string -> unit - method set_fileop_buttons : bool -> unit - end -val file_selection : - ?title:string -> - ?filename:string -> - ?fileop_buttons:bool -> - ?wm_name:string -> - ?wm_class:string -> - ?position:Tags.window_position -> - ?allow_shrink:bool -> - ?allow_grow:bool -> - ?auto_shrink:bool -> - ?modal:bool -> - ?x:int -> - ?y:int -> - ?border_width:int -> - ?width:int -> ?height:int -> ?show:bool -> unit -> file_selection - -class font_selection_dialog : Gtk.font_selection_dialog obj -> - object - inherit [window] window_skel - val obj : Gtk.font_selection_dialog obj - method apply_button : GButton.button - method cancel_button : GButton.button - method connect : GContainer.container_signals - method selection : GMisc.font_selection - method ok_button : GButton.button - end -val font_selection_dialog : - ?title:string -> - ?wm_name:string -> - ?wm_class:string -> - ?position:Tags.window_position -> - ?allow_shrink:bool -> - ?allow_grow:bool -> - ?auto_shrink:bool -> - ?modal:bool -> - ?x:int -> - ?y:int -> - ?border_width:int -> - ?width:int -> ?height:int -> ?show:bool -> unit -> font_selection_dialog - -class plug : Gtk.plug obj -> window - -val plug : - window:Gdk.xid -> - ?border_width:int -> - ?width:int -> ?height:int -> ?show:bool -> unit -> plug diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gaux.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gaux.ml deleted file mode 100644 index a1172915b..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gaux.ml +++ /dev/null @@ -1,17 +0,0 @@ -(* $Id$ *) - -(* Option handling *) - -let may ~f x = - match x with None -> () - | Some x -> let _ = f x in () - -let may_map ~f x = - match x with None -> None - | Some x -> Some (f x) - -let default x ~opt = - match opt with None -> x | Some y -> y - -let may_default f x ~opt = - match opt with None -> f x | Some y -> y diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gdk.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gdk.ml deleted file mode 100644 index c22c4b55c..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gdk.ml +++ /dev/null @@ -1,535 +0,0 @@ -(* $Id$ *) - -open Gaux - -type colormap -type visual -type region -type gc -type 'a drawable -type window = [`window] drawable -type pixmap = [`pixmap] drawable -type bitmap = [`bitmap] drawable -type font -type image -type atom = int -type keysym = int -type 'a event -type drag_context -type cursor -type xid = int32 - -exception Error of string -let _ = Callback.register_exception "gdkerror" (Error"") - -module Tags = struct - type event_type = - [ `NOTHING|`DELETE|`DESTROY|`EXPOSE|`MOTION_NOTIFY|`BUTTON_PRESS - |`TWO_BUTTON_PRESS|`THREE_BUTTON_PRESS - |`BUTTON_RELEASE|`KEY_PRESS - |`KEY_RELEASE|`ENTER_NOTIFY|`LEAVE_NOTIFY|`FOCUS_CHANGE - |`CONFIGURE|`MAP|`UNMAP|`PROPERTY_NOTIFY|`SELECTION_CLEAR - |`SELECTION_REQUEST|`SELECTION_NOTIFY|`PROXIMITY_IN - |`PROXIMITY_OUT|`DRAG_ENTER|`DRAG_LEAVE|`DRAG_MOTION|`DRAG_STATUS - |`DROP_START|`DROP_FINISHED|`CLIENT_EVENT|`VISIBILITY_NOTIFY - |`NO_EXPOSE ] - - type event_mask = - [ `EXPOSURE - |`POINTER_MOTION|`POINTER_MOTION_HINT - |`BUTTON_MOTION|`BUTTON1_MOTION|`BUTTON2_MOTION|`BUTTON3_MOTION - |`BUTTON_PRESS|`BUTTON_RELEASE - |`KEY_PRESS|`KEY_RELEASE - |`ENTER_NOTIFY|`LEAVE_NOTIFY|`FOCUS_CHANGE - |`STRUCTURE|`PROPERTY_CHANGE|`VISIBILITY_NOTIFY - |`PROXIMITY_IN|`PROXIMITY_OUT|`SUBSTRUCTURE - |`ALL_EVENTS ] - - type extension_events = - [ `NONE|`ALL|`CURSOR ] - - type visibility_state = - [ `UNOBSCURED|`PARTIAL|`FULLY_OBSCURED ] - - type input_source = - [ `MOUSE|`PEN|`ERASER|`CURSOR ] - - type notify_type = - [ `ANCESTOR|`VIRTUAL|`INFERIOR|`NONLINEAR|`NONLINEAR_VIRTUAL|`UNKNOWN ] - - type crossing_mode = - [ `NORMAL|`GRAB|`UNGRAB ] - - type modifier = - [ `SHIFT|`LOCK|`CONTROL|`MOD1|`MOD2|`MOD3|`MOD4|`MOD5|`BUTTON1 - |`BUTTON2|`BUTTON3|`BUTTON4|`BUTTON5 ] - - type drag_action = - [ `DEFAULT|`COPY|`MOVE|`LINK|`PRIVATE|`ASK ] - -end -open Tags - -module Convert = struct - external test_modifier : modifier -> int -> bool - = "ml_test_GdkModifier_val" - let modifier i = - List.filter [`SHIFT;`LOCK;`CONTROL;`MOD1;`MOD2;`MOD3;`MOD4;`MOD5; - `BUTTON1;`BUTTON2;`BUTTON3;`BUTTON4;`BUTTON5] - ~f:(fun m -> test_modifier m i) -end - -module Screen = struct - external width : unit -> int = "ml_gdk_screen_width" - external height : unit -> int = "ml_gdk_screen_height" -end - -module Visual = struct - type visual_type = - [ `STATIC_GRAY|`GRAYSCALE|`STATIC_COLOR - |`PSEUDO_COLOR|`TRUE_COLOR|`DIRECT_COLOR ] - - external get_best : ?depth:int -> ?kind:visual_type -> unit -> visual - = "ml_gdk_visual_get_best" - external get_type : visual -> visual_type = "ml_GdkVisual_type" - external depth : visual -> int = "ml_GdkVisual_depth" - external red_mask : visual -> int = "ml_GdkVisual_red_mask" - external red_shift : visual -> int = "ml_GdkVisual_red_shift" - external red_prec : visual -> int = "ml_GdkVisual_red_prec" - external green_mask : visual -> int = "ml_GdkVisual_green_mask" - external green_shift : visual -> int = "ml_GdkVisual_green_shift" - external green_prec : visual -> int = "ml_GdkVisual_green_prec" - external blue_mask : visual -> int = "ml_GdkVisual_blue_mask" - external blue_shift : visual -> int = "ml_GdkVisual_blue_shift" - external blue_prec : visual -> int = "ml_GdkVisual_blue_prec" -end - -module Image = struct - type image_type = - [ `NORMAL|`SHARED|`FASTEST ] - - external create_bitmap : visual: visual -> data: string -> - width: int -> height: int -> image - = "ml_gdk_image_new_bitmap" - external create : kind: image_type -> visual: visual -> - width: int -> height: int -> image - = "ml_gdk_image_new" - external get : - 'a drawable -> x: int -> y: int -> width: int -> height: int -> image - = "ml_gdk_image_get" - external put_pixel : image -> x: int -> y: int -> pixel: int -> unit - = "ml_gdk_image_put_pixel" - external get_pixel : image -> x: int -> y: int -> int - = "ml_gdk_image_get_pixel" - external destroy : image -> unit - = "ml_gdk_image_destroy" -end - -module Color = struct - type t - - external color_white : colormap -> t = "ml_gdk_color_white" - external color_black : colormap -> t = "ml_gdk_color_black" - external color_parse : string -> t = "ml_gdk_color_parse" - external color_alloc : colormap -> t -> bool = "ml_gdk_color_alloc" - external color_create : red:int -> green:int -> blue:int -> t - = "ml_GdkColor" - - external get_system_colormap : unit -> colormap - = "ml_gdk_colormap_get_system" - external colormap_new : visual -> privat:bool -> colormap - = "ml_gdk_colormap_new" - let get_colormap ?(privat=false) vis = colormap_new vis ~privat - - type spec = [ `BLACK | `NAME of string | `RGB of int * int * int | `WHITE] - let color_alloc ~colormap color = - if not (color_alloc colormap color) then raise (Error"Color.alloc"); - color - let alloc ~colormap color = - match color with - `WHITE -> color_white colormap - | `BLACK -> color_black colormap - | `NAME s -> color_alloc ~colormap (color_parse s) - | `RGB (red,green,blue) -> - color_alloc ~colormap (color_create ~red ~green ~blue) - - external red : t -> int = "ml_GdkColor_red" - external blue : t -> int = "ml_GdkColor_blue" - external green : t -> int = "ml_GdkColor_green" - external pixel : t -> int = "ml_GdkColor_pixel" -end - -module Rectangle = struct - type t - external create : x:int -> y:int -> width:int -> height:int -> t - = "ml_GdkRectangle" - external x : t -> int = "ml_GdkRectangle_x" - external y : t -> int = "ml_GdkRectangle_y" - external width : t -> int = "ml_GdkRectangle_width" - external height : t -> int = "ml_GdkRectangle_height" -end - -module Window = struct - type background_pixmap = [ `NONE | `PARENT_RELATIVE | `PIXMAP of pixmap] - external visual_depth : visual -> int = "ml_gdk_visual_get_depth" - external get_visual : window -> visual = "ml_gdk_window_get_visual" - external get_parent : window -> window = "ml_gdk_window_get_parent" - external get_size : window -> int * int = "ml_gdk_window_get_size" - external get_position : window -> int * int = - "ml_gdk_window_get_position" - external root_parent : unit -> window = "ml_GDK_ROOT_PARENT" - external set_back_pixmap : window -> pixmap -> int -> unit = - "ml_gdk_window_set_back_pixmap" - external clear : window -> unit = "ml_gdk_window_clear" - external get_xwindow : window -> xid = "ml_GDK_WINDOW_XWINDOW" - - let set_back_pixmap w pix = - let null_pixmap = (Obj.magic Gpointer.boxed_null : pixmap) in - match pix with - `NONE -> set_back_pixmap w null_pixmap 0 - | `PARENT_RELATIVE -> set_back_pixmap w null_pixmap 1 - | `PIXMAP(pixmap) -> set_back_pixmap w pixmap 0 - (* anything OK, Maybe... *) -end - -module PointArray = struct - type t = { len: int} - external create : len:int -> t = "ml_point_array_new" - external set : t -> pos:int -> x:int -> y:int -> unit = "ml_point_array_set" - let set arr ~pos = - if pos < 0 || pos >= arr.len then invalid_arg "PointArray.set"; - set arr ~pos -end - -module Region = struct - type gdkFillRule = [ `EVEN_ODD_RULE|`WINDING_RULE ] - type gdkOverlapType = [ `IN|`OUT|`PART ] - external create : unit -> region = "ml_gdk_region_new" - external destroy : region -> unit = "ml_gdk_region_destroy" - external polygon : PointArray.t -> gdkFillRule -> region - = "ml_gdk_region_polygon" - let polygon l = - let len = List.length l in - let arr = PointArray.create ~len in - List.fold_left l ~init:0 - ~f:(fun pos (x,y) -> PointArray.set arr ~pos ~x ~y; pos+1); - polygon arr - external intersect : region -> region -> region - = "ml_gdk_regions_intersect" - external union : region -> region -> region - = "ml_gdk_regions_union" - external subtract : region -> region -> region - = "ml_gdk_regions_subtract" - external xor : region -> region -> region - = "ml_gdk_regions_xor" - external union_with_rect : region -> Rectangle.t -> region - = "ml_gdk_region_union_with_rect" - external offset : region -> x:int -> y:int -> unit = "ml_gdk_region_offset" - external shrink : region -> x:int -> y:int -> unit = "ml_gdk_region_shrink" - external empty : region -> bool = "ml_gdk_region_empty" - external equal : region -> region -> bool = "ml_gdk_region_equal" - external point_in : region -> x:int -> y:int -> bool - = "ml_gdk_region_point_in" - external rect_in : region -> Rectangle.t -> gdkOverlapType - = "ml_gdk_region_rect_in" - external get_clipbox : region -> Rectangle.t -> unit - = "ml_gdk_region_get_clipbox" -end - - -module GC = struct - type gdkFunction = [ `COPY|`INVERT|`XOR ] - type gdkFill = [ `SOLID|`TILED|`STIPPLED|`OPAQUE_STIPPLED ] - type gdkSubwindowMode = [ `CLIP_BY_CHILDREN|`INCLUDE_INFERIORS ] - type gdkLineStyle = [ `SOLID|`ON_OFF_DASH|`DOUBLE_DASH ] - type gdkCapStyle = [ `NOT_LAST|`BUTT|`ROUND|`PROJECTING ] - type gdkJoinStyle = [ `MITER|`ROUND|`BEVEL ] - external create : 'a drawable -> gc = "ml_gdk_gc_new" - external set_foreground : gc -> Color.t -> unit = "ml_gdk_gc_set_foreground" - external set_background : gc -> Color.t -> unit = "ml_gdk_gc_set_background" - external set_font : gc -> font -> unit = "ml_gdk_gc_set_font" - external set_function : gc -> gdkFunction -> unit = "ml_gdk_gc_set_function" - external set_fill : gc -> gdkFill -> unit = "ml_gdk_gc_set_fill" - external set_tile : gc -> pixmap -> unit = "ml_gdk_gc_set_tile" - external set_stipple : gc -> pixmap -> unit = "ml_gdk_gc_set_stipple" - external set_ts_origin : gc -> x:int -> y:int -> unit - = "ml_gdk_gc_set_ts_origin" - external set_clip_origin : gc -> x:int -> y:int -> unit - = "ml_gdk_gc_set_clip_origin" - external set_clip_mask : gc -> bitmap -> unit = "ml_gdk_gc_set_clip_mask" - external set_clip_rectangle : gc -> Rectangle.t -> unit - = "ml_gdk_gc_set_clip_rectangle" - external set_clip_region : gc -> region -> unit = "ml_gdk_gc_set_clip_region" - external set_subwindow : gc -> gdkSubwindowMode -> unit - = "ml_gdk_gc_set_subwindow" - external set_exposures : gc -> bool -> unit = "ml_gdk_gc_set_exposures" - external set_line_attributes : - gc -> width:int -> style:gdkLineStyle -> cap:gdkCapStyle -> - join:gdkJoinStyle -> unit - = "ml_gdk_gc_set_line_attributes" - external copy : dst:gc -> gc -> unit = "ml_gdk_gc_copy" - type values = { - foreground : Color.t; - background : Color.t; - font : font option; - fonction : gdkFunction; - fill : gdkFill; - tile : pixmap option; - stipple : pixmap option; - clip_mask : bitmap option; - subwindow_mode : gdkSubwindowMode; - ts_x_origin : int; - ts_y_origin : int; - clip_x_origin : int; - clip_y_origin : int; - graphics_exposures : bool; - line_width : int; - line_style : gdkLineStyle; - cap_style : gdkCapStyle; - join_style : gdkJoinStyle; - } - external get_values : gc -> values = "ml_gdk_gc_get_values" -end - -module Pixmap = struct - external create : window -> width:int -> height:int -> depth:int -> pixmap - = "ml_gdk_pixmap_new" - external create_from_data : - window -> string -> width:int -> height:int -> depth:int -> - fg:Color.t -> bg:Color.t -> pixmap - = "ml_gdk_pixmap_create_from_data_bc" "ml_gk_pixmap_create_from_data" - external create_from_xpm : - window -> ?colormap:colormap -> ?transparent:Color.t -> - file:string -> pixmap * bitmap - = "ml_gdk_pixmap_colormap_create_from_xpm" - external create_from_xpm_d : - window -> ?colormap:colormap -> ?transparent:Color.t -> - data:string array -> pixmap * bitmap - = "ml_gdk_pixmap_colormap_create_from_xpm_d" -end - -module Bitmap = struct - let create : window -> width:int -> height:int -> bitmap = - Obj.magic (Pixmap.create ~depth:1) - external create_from_data : - window -> string -> width:int -> height:int -> bitmap - = "ml_gdk_bitmap_create_from_data" -end - -module Font = struct - external load : string -> font = "ml_gdk_font_load" - external load_fontset : string -> font = "ml_gdk_fontset_load" - external string_width : font -> string -> int = "ml_gdk_string_width" - external char_width : font -> char -> int = "ml_gdk_char_width" - external string_height : font -> string -> int = "ml_gdk_string_height" - external char_height : font -> char -> int = "ml_gdk_char_height" - external string_measure : font -> string -> int = "ml_gdk_string_measure" - external char_measure : font -> char -> int = "ml_gdk_char_measure" - external get_type : font -> [`FONT | `FONTSET] = "ml_GdkFont_type" - external ascent : font -> int = "ml_GdkFont_ascent" - external descent : font -> int = "ml_GdkFont_descent" -end - -module Draw = struct - external point : 'a drawable -> gc -> x:int -> y:int -> unit - = "ml_gdk_draw_point" - external line : 'a drawable -> gc -> x:int -> y:int -> x:int -> y:int -> unit - = "ml_gdk_draw_line_bc" "ml_gdk_draw_line" - external rectangle : - 'a drawable -> gc -> - filled:bool -> x:int -> y:int -> width:int -> height:int -> unit - = "ml_gdk_draw_rectangle_bc" "ml_gdk_draw_rectangle" - let rectangle w gc ~x ~y ~width ~height ?(filled=false) () = - rectangle w gc ~x ~y ~width ~height ~filled - external arc : - 'a drawable -> gc -> filled:bool -> x:int -> y:int -> - width:int -> height:int -> start:int -> angle:int -> unit - = "ml_gdk_draw_arc_bc" "ml_gdk_draw_arc" - let arc w gc ~x ~y ~width ~height ?(filled=false) ?(start=0.) - ?(angle=360.) () = - arc w gc ~x ~y ~width ~height ~filled - ~start:(truncate(start *. 64.)) - ~angle:(truncate(angle *. 64.)) - external polygon : 'a drawable -> gc -> filled:bool -> PointArray.t -> unit - = "ml_gdk_draw_polygon" - let polygon w gc ?(filled=false) l = - let len = List.length l in - let arr = PointArray.create ~len in - List.fold_left l ~init:0 - ~f:(fun pos (x,y) -> PointArray.set arr ~pos ~x ~y; pos+1); - polygon w gc ~filled arr - external string : 'a drawable -> font: font -> gc -> x: int -> y: int -> - string: string -> unit - = "ml_gdk_draw_string_bc" "ml_gdk_draw_string" - external image : 'a drawable -> gc -> image: image -> - xsrc: int -> ysrc: int -> xdest: int -> ydest: int -> - width: int -> height: int -> unit - = "ml_gdk_draw_image_bc" "ml_gdk_draw_image" -end - -module Rgb = struct - external init : unit -> unit = "ml_gdk_rgb_init" - external get_visual : unit -> visual = "ml_gdk_rgb_get_visual" - external get_cmap : unit -> colormap = "ml_gdk_rgb_get_cmap" -end - -module DnD = struct - external drag_status : drag_context -> drag_action list -> time:int -> unit - = "ml_gdk_drag_status" - external drag_context_suggested_action : drag_context -> drag_action - = "ml_GdkDragContext_suggested_action" - external drag_context_targets : drag_context -> atom list - = "ml_GdkDragContext_targets" -end - -module Truecolor = struct - (* Truecolor quick color query *) - - type visual_shift_prec = { - red_shift : int; - red_prec : int; - green_shift : int; - green_prec : int; - blue_shift : int; - blue_prec : int - } - - let shift_prec visual = { - red_shift = Visual.red_shift visual; - red_prec = Visual.red_prec visual; - green_shift = Visual.green_shift visual; - green_prec = Visual.green_prec visual; - blue_shift = Visual.blue_shift visual; - blue_prec = Visual.blue_prec visual; - } - - let color_creator visual = - match Visual.get_type visual with - `TRUE_COLOR | `DIRECT_COLOR -> - let shift_prec = shift_prec visual in - Format.eprintf "red : %d %d, " - shift_prec.red_shift shift_prec.red_prec; - Format.eprintf "green : %d %d, " - shift_prec.green_shift shift_prec.green_prec; - Format.eprintf "blue : %d %d" - shift_prec.blue_shift shift_prec.blue_prec; - Format.pp_print_newline Format.err_formatter (); - let red_lsr = 16 - shift_prec.red_prec - and green_lsr = 16 - shift_prec.green_prec - and blue_lsr = 16 - shift_prec.blue_prec in - fun ~red: red ~green: green ~blue: blue -> - (((red lsr red_lsr) lsl shift_prec.red_shift) lor - ((green lsr green_lsr) lsl shift_prec.green_shift) lor - ((blue lsr blue_lsr) lsl shift_prec.blue_shift)) - | _ -> raise (Invalid_argument "Gdk.Truecolor.color_creator") - - let color_parser visual = - match Visual.get_type visual with - `TRUE_COLOR | `DIRECT_COLOR -> - let shift_prec = shift_prec visual in - let red_lsr = 16 - shift_prec.red_prec - and green_lsr = 16 - shift_prec.green_prec - and blue_lsr = 16 - shift_prec.blue_prec in - let mask = 1 lsl 16 - 1 in - fun pixel -> - ((pixel lsr shift_prec.red_shift) lsl red_lsr) land mask, - ((pixel lsr shift_prec.green_shift) lsl green_lsr) land mask, - ((pixel lsr shift_prec.blue_shift) lsl blue_lsr) land mask - | _ -> raise (Invalid_argument "Gdk.Truecolor.color_parser") -end - -module X = struct - (* X related functions *) - external flush : unit -> unit - = "ml_gdk_flush" - external beep : unit -> unit - = "ml_gdk_beep" -end - -module Cursor = struct - type cursor_type = [ - | `X_CURSOR - | `ARROW - | `BASED_ARROW_DOWN - | `BASED_ARROW_UP - | `BOAT - | `BOGOSITY - | `BOTTOM_LEFT_CORNER - | `BOTTOM_RIGHT_CORNER - | `BOTTOM_SIDE - | `BOTTOM_TEE - | `BOX_SPIRAL - | `CENTER_PTR - | `CIRCLE - | `CLOCK - | `COFFEE_MUG - | `CROSS - | `CROSS_REVERSE - | `CROSSHAIR - | `DIAMOND_CROSS - | `DOT - | `DOTBOX - | `DOUBLE_ARROW - | `DRAFT_LARGE - | `DRAFT_SMALL - | `DRAPED_BOX - | `EXCHANGE - | `FLEUR - | `GOBBLER - | `GUMBY - | `HAND1 - | `HAND2 - | `HEART - | `ICON - | `IRON_CROSS - | `LEFT_PTR - | `LEFT_SIDE - | `LEFT_TEE - | `LEFTBUTTON - | `LL_ANGLE - | `LR_ANGLE - | `MAN - | `MIDDLEBUTTON - | `MOUSE - | `PENCIL - | `PIRATE - | `PLUS - | `QUESTION_ARROW - | `RIGHT_PTR - | `RIGHT_SIDE - | `RIGHT_TEE - | `RIGHTBUTTON - | `RTL_LOGO - | `SAILBOAT - | `SB_DOWN_ARROW - | `SB_H_DOUBLE_ARROW - | `SB_LEFT_ARROW - | `SB_RIGHT_ARROW - | `SB_UP_ARROW - | `SB_V_DOUBLE_ARROW - | `SHUTTLE - | `SIZING - | `SPIDER - | `SPRAYCAN - | `STAR - | `TARGET - | `TCROSS - | `TOP_LEFT_ARROW - | `TOP_LEFT_CORNER - | `TOP_RIGHT_CORNER - | `TOP_SIDE - | `TOP_TEE - | `TREK - | `UL_ANGLE - | `UMBRELLA - | `UR_ANGLE - | `WATCH - | `XTERM - ] - external create : cursor_type -> cursor = "ml_gdk_cursor_new" - external create_from_pixmap : - pixmap -> mask:bitmap -> - fg:Color.t -> bg:Color.t -> x:int -> y:int -> cursor - = "ml_gdk_cursor_new_from_pixmap_bc" "ml_gdk_cursor_new_from_pixmap" - external destroy : cursor -> unit = "ml_gdk_cursor_destroy" -end diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gdk.mli b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gdk.mli deleted file mode 100644 index 2914b60ce..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gdk.mli +++ /dev/null @@ -1,447 +0,0 @@ -(* $Id$ *) - -type colormap -type visual -type region -type gc -type 'a drawable -type window = [`window] drawable -type pixmap = [`pixmap] drawable -type bitmap = [`bitmap] drawable -type font -type image -type atom = int -type keysym = int -type 'a event -type drag_context -type cursor -type xid = int32 - -exception Error of string - -module Tags : sig - type event_type = - [ `NOTHING|`DELETE|`DESTROY|`EXPOSE|`MOTION_NOTIFY|`BUTTON_PRESS - |`TWO_BUTTON_PRESS|`THREE_BUTTON_PRESS - |`BUTTON_RELEASE|`KEY_PRESS - |`KEY_RELEASE|`ENTER_NOTIFY|`LEAVE_NOTIFY|`FOCUS_CHANGE - |`CONFIGURE|`MAP|`UNMAP|`PROPERTY_NOTIFY|`SELECTION_CLEAR - |`SELECTION_REQUEST|`SELECTION_NOTIFY|`PROXIMITY_IN - |`PROXIMITY_OUT|`DRAG_ENTER|`DRAG_LEAVE|`DRAG_MOTION|`DRAG_STATUS - |`DROP_START|`DROP_FINISHED|`CLIENT_EVENT|`VISIBILITY_NOTIFY - |`NO_EXPOSE ] - type event_mask = - [ `EXPOSURE - |`POINTER_MOTION|`POINTER_MOTION_HINT - |`BUTTON_MOTION|`BUTTON1_MOTION|`BUTTON2_MOTION|`BUTTON3_MOTION - |`BUTTON_PRESS|`BUTTON_RELEASE - |`KEY_PRESS|`KEY_RELEASE - |`ENTER_NOTIFY|`LEAVE_NOTIFY|`FOCUS_CHANGE - |`STRUCTURE|`PROPERTY_CHANGE|`VISIBILITY_NOTIFY - |`PROXIMITY_IN|`PROXIMITY_OUT|`SUBSTRUCTURE - |`ALL_EVENTS ] - type extension_events = [ `NONE|`ALL|`CURSOR ] - type visibility_state = [ `UNOBSCURED|`PARTIAL|`FULLY_OBSCURED ] - type input_source = [ `MOUSE|`PEN|`ERASER|`CURSOR ] - type notify_type = - [ `ANCESTOR|`VIRTUAL|`INFERIOR|`NONLINEAR|`NONLINEAR_VIRTUAL|`UNKNOWN ] - type crossing_mode = [ `NORMAL|`GRAB|`UNGRAB ] - type modifier = - [ `SHIFT|`LOCK|`CONTROL|`MOD1|`MOD2|`MOD3|`MOD4|`MOD5|`BUTTON1 - |`BUTTON2|`BUTTON3|`BUTTON4|`BUTTON5 ] - type drag_action = [ `DEFAULT|`COPY|`MOVE|`LINK|`PRIVATE|`ASK ] -end - -module Convert : - sig - val modifier : int -> Tags.modifier list - end - -module Screen : - sig - external width : unit -> int = "ml_gdk_screen_width" - external height : unit -> int = "ml_gdk_screen_height" - end - -module Visual : - sig - type visual_type = - [ `STATIC_GRAY|`GRAYSCALE|`STATIC_COLOR - |`PSEUDO_COLOR|`TRUE_COLOR|`DIRECT_COLOR ] - external get_best : ?depth:int -> ?kind:visual_type -> unit -> visual - = "ml_gdk_visual_get_best" - external get_type : visual -> visual_type = "ml_GdkVisual_type" - external depth : visual -> int = "ml_GdkVisual_depth" - external red_mask : visual -> int = "ml_GdkVisual_red_mask" - external red_shift : visual -> int = "ml_GdkVisual_red_shift" - external red_prec : visual -> int = "ml_GdkVisual_red_prec" - external green_mask : visual -> int = "ml_GdkVisual_green_mask" - external green_shift : visual -> int = "ml_GdkVisual_green_shift" - external green_prec : visual -> int = "ml_GdkVisual_green_prec" - external blue_mask : visual -> int = "ml_GdkVisual_blue_mask" - external blue_shift : visual -> int = "ml_GdkVisual_blue_shift" - external blue_prec : visual -> int = "ml_GdkVisual_blue_prec" - end - -module Image : - sig - type image_type = [ `FASTEST|`NORMAL|`SHARED ] - external create_bitmap : - visual:visual -> data:string -> width:int -> height:int -> image - = "ml_gdk_image_new_bitmap" - external create : - kind:image_type -> - visual:visual -> width:int -> height:int -> image = "ml_gdk_image_new" - external get : - 'a drawable -> x:int -> y:int -> width:int -> height:int -> image - = "ml_gdk_image_get" - external put_pixel : image -> x:int -> y:int -> pixel:int -> unit - = "ml_gdk_image_put_pixel" - external get_pixel : image -> x:int -> y:int -> int - = "ml_gdk_image_get_pixel" - external destroy : image -> unit = "ml_gdk_image_destroy" - end - -module Color : - sig - external get_system_colormap : unit -> colormap - = "ml_gdk_colormap_get_system" - val get_colormap : ?privat:bool -> visual -> colormap - - type t - type spec = [ - | `BLACK - | `NAME of string - | `RGB of int * int * int - | `WHITE - ] - val alloc : colormap:colormap -> spec -> t - external red : t -> int = "ml_GdkColor_red" - external blue : t -> int = "ml_GdkColor_blue" - external green : t -> int = "ml_GdkColor_green" - external pixel : t -> int = "ml_GdkColor_pixel" - end - -module Rectangle : - sig - type t - external create : x:int -> y:int -> width:int -> height:int -> t - = "ml_GdkRectangle" - external x : t -> int = "ml_GdkRectangle_x" - external y : t -> int = "ml_GdkRectangle_y" - external width : t -> int = "ml_GdkRectangle_width" - external height : t -> int = "ml_GdkRectangle_height" - end - -module Window : - sig - type background_pixmap = [ `NONE|`PARENT_RELATIVE|`PIXMAP of pixmap ] - external visual_depth : visual -> int = "ml_gdk_visual_get_depth" - external get_visual : window -> visual = "ml_gdk_window_get_visual" - external get_parent : window -> window = "ml_gdk_window_get_parent" - external get_size : window -> int * int = "ml_gdk_window_get_size" - external get_position : window -> int * int - = "ml_gdk_window_get_position" - external root_parent : unit -> window = "ml_GDK_ROOT_PARENT" - external clear : window -> unit = "ml_gdk_window_clear" - external get_xwindow : window -> xid = "ml_GDK_WINDOW_XWINDOW" - val set_back_pixmap : window -> background_pixmap -> unit - end - -module PointArray : - sig - type t = { len: int } - external create : len:int -> t = "ml_point_array_new" - val set : t -> pos:int -> x:int -> y:int -> unit - end - -module Region : - sig - type gdkFillRule = [ `EVEN_ODD_RULE|`WINDING_RULE ] - type gdkOverlapType = [ `IN|`OUT|`PART ] - external create : unit -> region = "ml_gdk_region_new" - external destroy : region -> unit = "ml_gdk_region_destroy" - val polygon : (int * int) list -> gdkFillRule -> region - external intersect : region -> region -> region - = "ml_gdk_regions_intersect" - external union : region -> region -> region - = "ml_gdk_regions_union" - external subtract : region -> region -> region - = "ml_gdk_regions_subtract" - external xor : region -> region -> region - = "ml_gdk_regions_xor" - external union_with_rect : region -> Rectangle.t -> region - = "ml_gdk_region_union_with_rect" - external offset : region -> x:int -> y:int -> unit = "ml_gdk_region_offset" - external shrink : region -> x:int -> y:int -> unit = "ml_gdk_region_shrink" - external empty : region -> bool = "ml_gdk_region_empty" - external equal : region -> region -> bool = "ml_gdk_region_equal" - external point_in : region -> x:int -> y:int -> bool - = "ml_gdk_region_point_in" - external rect_in : region -> Rectangle.t -> gdkOverlapType - = "ml_gdk_region_rect_in" - external get_clipbox : region -> Rectangle.t -> unit - = "ml_gdk_region_get_clipbox" - end - -module GC : - sig - type gdkFunction = [ `COPY|`INVERT|`XOR ] - type gdkFill = [ `SOLID|`TILED|`STIPPLED|`OPAQUE_STIPPLED ] - type gdkSubwindowMode = [ `CLIP_BY_CHILDREN|`INCLUDE_INFERIORS ] - type gdkLineStyle = [ `SOLID|`ON_OFF_DASH|`DOUBLE_DASH ] - type gdkCapStyle = [ `NOT_LAST|`BUTT|`ROUND|`PROJECTING ] - type gdkJoinStyle = [ `MITER|`ROUND|`BEVEL ] - external create : 'a drawable -> gc = "ml_gdk_gc_new" - external set_foreground : gc -> Color.t -> unit - = "ml_gdk_gc_set_foreground" - external set_background : gc -> Color.t -> unit - = "ml_gdk_gc_set_background" - external set_font : gc -> font -> unit = "ml_gdk_gc_set_font" - external set_function : gc -> gdkFunction -> unit - = "ml_gdk_gc_set_function" - external set_fill : gc -> gdkFill -> unit = "ml_gdk_gc_set_fill" - external set_tile : gc -> pixmap -> unit = "ml_gdk_gc_set_tile" - external set_stipple : gc -> pixmap -> unit = "ml_gdk_gc_set_stipple" - external set_ts_origin : gc -> x:int -> y:int -> unit - = "ml_gdk_gc_set_ts_origin" - external set_clip_origin : gc -> x:int -> y:int -> unit - = "ml_gdk_gc_set_clip_origin" - external set_clip_mask : gc -> bitmap -> unit = "ml_gdk_gc_set_clip_mask" - external set_clip_rectangle : gc -> Rectangle.t -> unit - = "ml_gdk_gc_set_clip_rectangle" - external set_clip_region : gc -> region -> unit - = "ml_gdk_gc_set_clip_region" - external set_subwindow : gc -> gdkSubwindowMode -> unit - = "ml_gdk_gc_set_subwindow" - external set_exposures : gc -> bool -> unit = "ml_gdk_gc_set_exposures" - external set_line_attributes : - gc -> - width:int -> - style:gdkLineStyle -> cap:gdkCapStyle -> join:gdkJoinStyle -> unit - = "ml_gdk_gc_set_line_attributes" - external copy : dst:gc -> gc -> unit = "ml_gdk_gc_copy" - type values = { - foreground : Color.t; - background : Color.t; - font : font option; - fonction : gdkFunction; - fill : gdkFill; - tile : pixmap option; - stipple : pixmap option; - clip_mask : bitmap option; - subwindow_mode : gdkSubwindowMode; - ts_x_origin : int; - ts_y_origin : int; - clip_x_origin : int; - clip_y_origin : int; - graphics_exposures : bool; - line_width : int; - line_style : gdkLineStyle; - cap_style : gdkCapStyle; - join_style : gdkJoinStyle; - } - external get_values : gc -> values = "ml_gdk_gc_get_values" - end - -module Pixmap : - sig - external create : - window -> width:int -> height:int -> depth:int -> pixmap - = "ml_gdk_pixmap_new" - external create_from_data : - window -> - string -> - width:int -> - height:int -> depth:int -> fg:Color.t -> bg:Color.t -> pixmap - = "ml_gdk_pixmap_create_from_data_bc" "ml_gk_pixmap_create_from_data" - external create_from_xpm : - window -> - ?colormap:colormap -> - ?transparent:Color.t -> file:string -> pixmap * bitmap - = "ml_gdk_pixmap_colormap_create_from_xpm" - external create_from_xpm_d : - window -> - ?colormap:colormap -> - ?transparent:Color.t -> data:string array -> pixmap * bitmap - = "ml_gdk_pixmap_colormap_create_from_xpm_d" - end - -module Bitmap : - sig - val create : window -> width:int -> height:int -> bitmap - external create_from_data : - window -> string -> width:int -> height:int -> bitmap - = "ml_gdk_bitmap_create_from_data" - end - -module Font : - sig - external load : string -> font = "ml_gdk_font_load" - external load_fontset : string -> font = "ml_gdk_fontset_load" - external string_width : font -> string -> int = "ml_gdk_string_width" - external char_width : font -> char -> int = "ml_gdk_char_width" - external string_height : font -> string -> int = "ml_gdk_string_height" - external char_height : font -> char -> int = "ml_gdk_char_height" - external string_measure : font -> string -> int = "ml_gdk_string_measure" - external char_measure : font -> char -> int = "ml_gdk_char_measure" - external get_type : font -> [`FONT | `FONTSET] = "ml_GdkFont_type" - external ascent : font -> int = "ml_GdkFont_ascent" - external descent : font -> int = "ml_GdkFont_descent" - end - -module Draw : - sig - external point : 'a drawable -> gc -> x:int -> y:int -> unit - = "ml_gdk_draw_point" - external line : - 'a drawable -> gc -> x:int -> y:int -> x:int -> y:int -> unit - = "ml_gdk_draw_line_bc" "ml_gdk_draw_line" - val rectangle : - 'a drawable -> gc -> - x:int -> y:int -> width:int -> height:int -> ?filled:bool -> unit -> unit - val arc : - 'a drawable -> gc -> - x:int -> y:int -> width:int -> height:int -> - ?filled:bool -> ?start:float -> ?angle:float -> unit -> unit - val polygon : - 'a drawable -> gc -> ?filled:bool ->(int * int) list -> unit - external string : - 'a drawable -> - font:font -> gc -> x:int -> y:int -> string:string -> unit - = "ml_gdk_draw_string_bc" "ml_gdk_draw_string" - external image : - 'a drawable -> - gc -> - image:image -> - xsrc:int -> - ysrc:int -> xdest:int -> ydest:int -> width:int -> height:int -> unit - = "ml_gdk_draw_image_bc" "ml_gdk_draw_image" - end - -module Rgb : - sig - external init : unit -> unit = "ml_gdk_rgb_init" - external get_visual : unit -> visual = "ml_gdk_rgb_get_visual" - external get_cmap : unit -> colormap = "ml_gdk_rgb_get_cmap" - end - -module DnD : - sig - external drag_status : - drag_context -> Tags.drag_action list -> time:int -> unit - = "ml_gdk_drag_status" - external drag_context_suggested_action : drag_context -> Tags.drag_action - = "ml_GdkDragContext_suggested_action" - external drag_context_targets : drag_context -> atom list - = "ml_GdkDragContext_targets" - end - -module Truecolor : - sig - val color_creator : visual -> (red: int -> green: int -> blue: int -> int) - (* [color_creator visual] creates a function to calculate - the pixel color id for given red, green and blue component - value ([0..65535]) at the client side. [visual] must have - `TRUE_COLOR or `DIRECT_COLOR type. This function improves - the speed of the color query of true color visual greatly. *) - (* WARN: this approach is not theoretically correct for true color - visual, because we need gamma correction. *) - - val color_parser : visual -> int -> int * int * int - end - -module X : - (* X related functions *) - sig - val flush : unit -> unit (* also in GtkMain *) - val beep : unit -> unit - end - -module Cursor : sig - type cursor_type = [ - | `X_CURSOR - | `ARROW - | `BASED_ARROW_DOWN - | `BASED_ARROW_UP - | `BOAT - | `BOGOSITY - | `BOTTOM_LEFT_CORNER - | `BOTTOM_RIGHT_CORNER - | `BOTTOM_SIDE - | `BOTTOM_TEE - | `BOX_SPIRAL - | `CENTER_PTR - | `CIRCLE - | `CLOCK - | `COFFEE_MUG - | `CROSS - | `CROSS_REVERSE - | `CROSSHAIR - | `DIAMOND_CROSS - | `DOT - | `DOTBOX - | `DOUBLE_ARROW - | `DRAFT_LARGE - | `DRAFT_SMALL - | `DRAPED_BOX - | `EXCHANGE - | `FLEUR - | `GOBBLER - | `GUMBY - | `HAND1 - | `HAND2 - | `HEART - | `ICON - | `IRON_CROSS - | `LEFT_PTR - | `LEFT_SIDE - | `LEFT_TEE - | `LEFTBUTTON - | `LL_ANGLE - | `LR_ANGLE - | `MAN - | `MIDDLEBUTTON - | `MOUSE - | `PENCIL - | `PIRATE - | `PLUS - | `QUESTION_ARROW - | `RIGHT_PTR - | `RIGHT_SIDE - | `RIGHT_TEE - | `RIGHTBUTTON - | `RTL_LOGO - | `SAILBOAT - | `SB_DOWN_ARROW - | `SB_H_DOUBLE_ARROW - | `SB_LEFT_ARROW - | `SB_RIGHT_ARROW - | `SB_UP_ARROW - | `SB_V_DOUBLE_ARROW - | `SHUTTLE - | `SIZING - | `SPIDER - | `SPRAYCAN - | `STAR - | `TARGET - | `TCROSS - | `TOP_LEFT_ARROW - | `TOP_LEFT_CORNER - | `TOP_RIGHT_CORNER - | `TOP_SIDE - | `TOP_TEE - | `TREK - | `UL_ANGLE - | `UMBRELLA - | `UR_ANGLE - | `WATCH - | `XTERM - ] - external create : cursor_type -> cursor = "ml_gdk_cursor_new" - external create_from_pixmap : - pixmap -> mask:bitmap -> - fg:Color.t -> bg:Color.t -> x:int -> y:int -> cursor - = "ml_gdk_cursor_new_from_pixmap_bc" "ml_gdk_cursor_new_from_pixmap" - external destroy : cursor -> unit = "ml_gdk_cursor_destroy" -end diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gdkEvent.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gdkEvent.ml deleted file mode 100644 index 87c0e888f..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gdkEvent.ml +++ /dev/null @@ -1,159 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gdk -open Tags - -external coerce : 'a event -> event_type event = "%identity" -external unsafe_copy : Gpointer.boxed -> #event_type event - = "ml_gdk_event_copy" -external copy : (#event_type as 'a) event -> 'a event - = "ml_gdk_event_copy" -external get_type : 'a event -> 'a = "ml_GdkEventAny_type" -external get_window : 'a event -> window = "ml_GdkEventAny_window" -external get_send_event : 'a event -> bool = "ml_GdkEventAny_send_event" - -external create : (#event_type as 'a) -> 'a event - = "ml_gdk_event_new" -external set_window : 'a event -> window -> unit - = "ml_gdk_event_set_window" - -module Expose = struct - type t = [ `EXPOSE ] event - let cast (ev : event_type event) : t = - match get_type ev with `EXPOSE -> Obj.magic ev - | _ -> invalid_arg "GdkEvent.Expose.cast" - external area : t -> Rectangle.t = "ml_GdkEventExpose_area" - external count : t -> int = "ml_GdkEventExpose_count" -end - -module Visibility = struct - type t = [ `VISIBILITY_NOTIFY ] event - let cast (ev : event_type event) : t = - match get_type ev with `VISIBILITY_NOTIFY -> Obj.magic ev - | _ -> invalid_arg "GdkEvent.Visibility.cast" - external visibility : t -> visibility_state - = "ml_GdkEventVisibility_state" -end - -module Motion = struct - type t = [ `MOTION_NOTIFY ] event - let cast (ev : event_type event) : t = - match get_type ev with `MOTION_NOTIFY -> Obj.magic ev - | _ -> invalid_arg "GdkEvent.Motion.cast" - external time : t -> int = "ml_GdkEventMotion_time" - external x : t -> float = "ml_GdkEventMotion_x" - external y : t -> float = "ml_GdkEventMotion_y" - external pressure : t -> float = "ml_GdkEventMotion_pressure" - external xtilt : t -> float = "ml_GdkEventMotion_xtilt" - external ytilt : t -> float = "ml_GdkEventMotion_ytilt" - external state : t -> int = "ml_GdkEventMotion_state" - external is_hint : t -> bool = "ml_GdkEventMotion_is_hint" - external source : t -> input_source = "ml_GdkEventMotion_source" - external deviceid : t -> int = "ml_GdkEventMotion_deviceid" - external x_root : t -> float = "ml_GdkEventMotion_x_root" - external y_root : t -> float = "ml_GdkEventMotion_y_root" -end - -module Button = struct - type types = - [ `BUTTON_PRESS|`TWO_BUTTON_PRESS|`THREE_BUTTON_PRESS|`BUTTON_RELEASE ] - type t = types event - let cast (ev : event_type event) : t = - match get_type ev with - `BUTTON_PRESS|`TWO_BUTTON_PRESS|`THREE_BUTTON_PRESS|`BUTTON_RELEASE - -> Obj.magic ev - | _ -> invalid_arg "GdkEvent.Button.cast" - external time : t -> int = "ml_GdkEventButton_time" - external x : t -> float = "ml_GdkEventButton_x" - external y : t -> float = "ml_GdkEventButton_y" - external pressure : t -> float = "ml_GdkEventButton_pressure" - external xtilt : t -> float = "ml_GdkEventButton_xtilt" - external ytilt : t -> float = "ml_GdkEventButton_ytilt" - external state : t -> int = "ml_GdkEventButton_state" - external button : t -> int = "ml_GdkEventButton_button" - external source : t -> input_source = "ml_GdkEventButton_source" - external deviceid : t -> int = "ml_GdkEventButton_deviceid" - external x_root : t -> float = "ml_GdkEventButton_x_root" - external y_root : t -> float = "ml_GdkEventButton_y_root" - external set_type : t -> #types -> unit - = "ml_gdk_event_set_type" - external set_button : t -> int -> unit - = "ml_gdk_event_button_set_button" -end - -module Key = struct - type t = [ `KEY_PRESS|`KEY_RELEASE ] event - let cast (ev : event_type event) : t = - match get_type ev with - `KEY_PRESS|`KEY_RELEASE -> Obj.magic ev - | _ -> invalid_arg "GdkEvent.Key.cast" - external time : t -> int = "ml_GdkEventKey_time" - external state : t -> int = "ml_GdkEventKey_state" - external keyval : t -> keysym = "ml_GdkEventKey_keyval" - external string : t -> string = "ml_GdkEventKey_string" - let state ev = Convert.modifier (state ev) -end - -module Crossing = struct - type t = [ `ENTER_NOTIFY|`LEAVE_NOTIFY ] event - let cast (ev : event_type event) : t = - match get_type ev with - `ENTER_NOTIFY|`LEAVE_NOTIFY -> Obj.magic ev - | _ -> invalid_arg "GdkEvent.Crossing.cast" - external subwindow : t -> window = "ml_GdkEventCrossing_subwindow" - external detail : t -> notify_type = "ml_GdkEventCrossing_detail" -end - -module Focus = struct - type t = [ `FOCUS_CHANGE ] event - let cast (ev : event_type event) : t = - match get_type ev with `FOCUS_CHANGE -> Obj.magic ev - | _ -> invalid_arg "GdkEvent.Focus.cast" - external focus_in : t -> bool = "ml_GdkEventFocus_in" -end - -module Configure = struct - type t = [ `CONFIGURE ] event - let cast (ev : event_type event) : t = - match get_type ev with `CONFIGURE -> Obj.magic ev - | _ -> invalid_arg "GdkEvent.Configure.cast" - external x : t -> int = "ml_GdkEventConfigure_x" - external y : t -> int = "ml_GdkEventConfigure_y" - external width : t -> int = "ml_GdkEventConfigure_width" - external height : t -> int = "ml_GdkEventConfigure_height" -end - -module Property = struct - type t = [ `PROPERTY_NOTIFY ] event - let cast (ev : event_type event) : t = - match get_type ev with `PROPERTY_NOTIFY -> Obj.magic ev - | _ -> invalid_arg "GdkEvent.Property.cast" - external atom : t -> atom = "ml_GdkEventProperty_atom" - external time : t -> int = "ml_GdkEventProperty_time" - external state : t -> int = "ml_GdkEventProperty_state" -end - -module Selection = struct - type t = [ `SELECTION_CLEAR|`SELECTION_REQUEST|`SELECTION_NOTIFY ] event - let cast (ev : event_type event) : t = - match get_type ev with - `SELECTION_CLEAR|`SELECTION_REQUEST|`SELECTION_NOTIFY -> Obj.magic ev - | _ -> invalid_arg "GdkEvent.Selection.cast" - external selection : t -> atom = "ml_GdkEventSelection_selection" - external target : t -> atom = "ml_GdkEventSelection_target" - external property : t -> atom = "ml_GdkEventSelection_property" - external requestor : t -> int = "ml_GdkEventSelection_requestor" - external time : t -> int = "ml_GdkEventSelection_time" -end - -module Proximity = struct - type t = [ `PROXIMITY_IN|`PROXIMITY_OUT ] event - let cast (ev : event_type event) : t = - match get_type ev with - `PROXIMITY_IN|`PROXIMITY_OUT -> Obj.magic ev - | _ -> invalid_arg "GdkEvent.Proximity.cast" - external time : t -> int = "ml_GdkEventProximity_time" - external source : t -> input_source = "ml_GdkEventProximity_source" - external deviceid : t -> int = "ml_GdkEventProximity_deviceid" -end diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gdkKeysyms.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gdkKeysyms.ml deleted file mode 100644 index b0257b439..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gdkKeysyms.ml +++ /dev/null @@ -1,1320 +0,0 @@ -(* $Id$ *) - -open Gdk -let _VoidSymbol : keysym = 0xFFFFFF -let _BackSpace : keysym = 0xFF08 -let _Tab : keysym = 0xFF09 -let _Linefeed : keysym = 0xFF0A -let _Clear : keysym = 0xFF0B -let _Return : keysym = 0xFF0D -let _Pause : keysym = 0xFF13 -let _Scroll_Lock : keysym = 0xFF14 -let _Sys_Req : keysym = 0xFF15 -let _Escape : keysym = 0xFF1B -let _Delete : keysym = 0xFFFF -let _Multi_key : keysym = 0xFF20 -let _SingleCandidate : keysym = 0xFF3C -let _MultipleCandidate : keysym = 0xFF3D -let _PreviousCandidate : keysym = 0xFF3E -let _Kanji : keysym = 0xFF21 -let _Muhenkan : keysym = 0xFF22 -let _Henkan_Mode : keysym = 0xFF23 -let _Henkan : keysym = 0xFF23 -let _Romaji : keysym = 0xFF24 -let _Hiragana : keysym = 0xFF25 -let _Katakana : keysym = 0xFF26 -let _Hiragana_Katakana : keysym = 0xFF27 -let _Zenkaku : keysym = 0xFF28 -let _Hankaku : keysym = 0xFF29 -let _Zenkaku_Hankaku : keysym = 0xFF2A -let _Touroku : keysym = 0xFF2B -let _Massyo : keysym = 0xFF2C -let _Kana_Lock : keysym = 0xFF2D -let _Kana_Shift : keysym = 0xFF2E -let _Eisu_Shift : keysym = 0xFF2F -let _Eisu_toggle : keysym = 0xFF30 -let _Zen_Koho : keysym = 0xFF3D -let _Mae_Koho : keysym = 0xFF3E -let _Home : keysym = 0xFF50 -let _Left : keysym = 0xFF51 -let _Up : keysym = 0xFF52 -let _Right : keysym = 0xFF53 -let _Down : keysym = 0xFF54 -let _Prior : keysym = 0xFF55 -let _Page_Up : keysym = 0xFF55 -let _Next : keysym = 0xFF56 -let _Page_Down : keysym = 0xFF56 -let _End : keysym = 0xFF57 -let _Begin : keysym = 0xFF58 -let _Select : keysym = 0xFF60 -let _Print : keysym = 0xFF61 -let _Execute : keysym = 0xFF62 -let _Insert : keysym = 0xFF63 -let _Undo : keysym = 0xFF65 -let _Redo : keysym = 0xFF66 -let _Menu : keysym = 0xFF67 -let _Find : keysym = 0xFF68 -let _Cancel : keysym = 0xFF69 -let _Help : keysym = 0xFF6A -let _Break : keysym = 0xFF6B -let _Mode_switch : keysym = 0xFF7E -let _script_switch : keysym = 0xFF7E -let _Num_Lock : keysym = 0xFF7F -let _KP_Space : keysym = 0xFF80 -let _KP_Tab : keysym = 0xFF89 -let _KP_Enter : keysym = 0xFF8D -let _KP_F1 : keysym = 0xFF91 -let _KP_F2 : keysym = 0xFF92 -let _KP_F3 : keysym = 0xFF93 -let _KP_F4 : keysym = 0xFF94 -let _KP_Home : keysym = 0xFF95 -let _KP_Left : keysym = 0xFF96 -let _KP_Up : keysym = 0xFF97 -let _KP_Right : keysym = 0xFF98 -let _KP_Down : keysym = 0xFF99 -let _KP_Prior : keysym = 0xFF9A -let _KP_Page_Up : keysym = 0xFF9A -let _KP_Next : keysym = 0xFF9B -let _KP_Page_Down : keysym = 0xFF9B -let _KP_End : keysym = 0xFF9C -let _KP_Begin : keysym = 0xFF9D -let _KP_Insert : keysym = 0xFF9E -let _KP_Delete : keysym = 0xFF9F -let _KP_Equal : keysym = 0xFFBD -let _KP_Multiply : keysym = 0xFFAA -let _KP_Add : keysym = 0xFFAB -let _KP_Separator : keysym = 0xFFAC -let _KP_Subtract : keysym = 0xFFAD -let _KP_Decimal : keysym = 0xFFAE -let _KP_Divide : keysym = 0xFFAF -let _KP_0 : keysym = 0xFFB0 -let _KP_1 : keysym = 0xFFB1 -let _KP_2 : keysym = 0xFFB2 -let _KP_3 : keysym = 0xFFB3 -let _KP_4 : keysym = 0xFFB4 -let _KP_5 : keysym = 0xFFB5 -let _KP_6 : keysym = 0xFFB6 -let _KP_7 : keysym = 0xFFB7 -let _KP_8 : keysym = 0xFFB8 -let _KP_9 : keysym = 0xFFB9 -let _F1 : keysym = 0xFFBE -let _F2 : keysym = 0xFFBF -let _F3 : keysym = 0xFFC0 -let _F4 : keysym = 0xFFC1 -let _F5 : keysym = 0xFFC2 -let _F6 : keysym = 0xFFC3 -let _F7 : keysym = 0xFFC4 -let _F8 : keysym = 0xFFC5 -let _F9 : keysym = 0xFFC6 -let _F10 : keysym = 0xFFC7 -let _F11 : keysym = 0xFFC8 -let _L1 : keysym = 0xFFC8 -let _F12 : keysym = 0xFFC9 -let _L2 : keysym = 0xFFC9 -let _F13 : keysym = 0xFFCA -let _L3 : keysym = 0xFFCA -let _F14 : keysym = 0xFFCB -let _L4 : keysym = 0xFFCB -let _F15 : keysym = 0xFFCC -let _L5 : keysym = 0xFFCC -let _F16 : keysym = 0xFFCD -let _L6 : keysym = 0xFFCD -let _F17 : keysym = 0xFFCE -let _L7 : keysym = 0xFFCE -let _F18 : keysym = 0xFFCF -let _L8 : keysym = 0xFFCF -let _F19 : keysym = 0xFFD0 -let _L9 : keysym = 0xFFD0 -let _F20 : keysym = 0xFFD1 -let _L10 : keysym = 0xFFD1 -let _F21 : keysym = 0xFFD2 -let _R1 : keysym = 0xFFD2 -let _F22 : keysym = 0xFFD3 -let _R2 : keysym = 0xFFD3 -let _F23 : keysym = 0xFFD4 -let _R3 : keysym = 0xFFD4 -let _F24 : keysym = 0xFFD5 -let _R4 : keysym = 0xFFD5 -let _F25 : keysym = 0xFFD6 -let _R5 : keysym = 0xFFD6 -let _F26 : keysym = 0xFFD7 -let _R6 : keysym = 0xFFD7 -let _F27 : keysym = 0xFFD8 -let _R7 : keysym = 0xFFD8 -let _F28 : keysym = 0xFFD9 -let _R8 : keysym = 0xFFD9 -let _F29 : keysym = 0xFFDA -let _R9 : keysym = 0xFFDA -let _F30 : keysym = 0xFFDB -let _R10 : keysym = 0xFFDB -let _F31 : keysym = 0xFFDC -let _R11 : keysym = 0xFFDC -let _F32 : keysym = 0xFFDD -let _R12 : keysym = 0xFFDD -let _F33 : keysym = 0xFFDE -let _R13 : keysym = 0xFFDE -let _F34 : keysym = 0xFFDF -let _R14 : keysym = 0xFFDF -let _F35 : keysym = 0xFFE0 -let _R15 : keysym = 0xFFE0 -let _Shift_L : keysym = 0xFFE1 -let _Shift_R : keysym = 0xFFE2 -let _Control_L : keysym = 0xFFE3 -let _Control_R : keysym = 0xFFE4 -let _Caps_Lock : keysym = 0xFFE5 -let _Shift_Lock : keysym = 0xFFE6 -let _Meta_L : keysym = 0xFFE7 -let _Meta_R : keysym = 0xFFE8 -let _Alt_L : keysym = 0xFFE9 -let _Alt_R : keysym = 0xFFEA -let _Super_L : keysym = 0xFFEB -let _Super_R : keysym = 0xFFEC -let _Hyper_L : keysym = 0xFFED -let _Hyper_R : keysym = 0xFFEE -let _ISO_Lock : keysym = 0xFE01 -let _ISO_Level2_Latch : keysym = 0xFE02 -let _ISO_Level3_Shift : keysym = 0xFE03 -let _ISO_Level3_Latch : keysym = 0xFE04 -let _ISO_Level3_Lock : keysym = 0xFE05 -let _ISO_Group_Shift : keysym = 0xFF7E -let _ISO_Group_Latch : keysym = 0xFE06 -let _ISO_Group_Lock : keysym = 0xFE07 -let _ISO_Next_Group : keysym = 0xFE08 -let _ISO_Next_Group_Lock : keysym = 0xFE09 -let _ISO_Prev_Group : keysym = 0xFE0A -let _ISO_Prev_Group_Lock : keysym = 0xFE0B -let _ISO_First_Group : keysym = 0xFE0C -let _ISO_First_Group_Lock : keysym = 0xFE0D -let _ISO_Last_Group : keysym = 0xFE0E -let _ISO_Last_Group_Lock : keysym = 0xFE0F -let _ISO_Left_Tab : keysym = 0xFE20 -let _ISO_Move_Line_Up : keysym = 0xFE21 -let _ISO_Move_Line_Down : keysym = 0xFE22 -let _ISO_Partial_Line_Up : keysym = 0xFE23 -let _ISO_Partial_Line_Down : keysym = 0xFE24 -let _ISO_Partial_Space_Left : keysym = 0xFE25 -let _ISO_Partial_Space_Right : keysym = 0xFE26 -let _ISO_Set_Margin_Left : keysym = 0xFE27 -let _ISO_Set_Margin_Right : keysym = 0xFE28 -let _ISO_Release_Margin_Left : keysym = 0xFE29 -let _ISO_Release_Margin_Right : keysym = 0xFE2A -let _ISO_Release_Both_Margins : keysym = 0xFE2B -let _ISO_Fast_Cursor_Left : keysym = 0xFE2C -let _ISO_Fast_Cursor_Right : keysym = 0xFE2D -let _ISO_Fast_Cursor_Up : keysym = 0xFE2E -let _ISO_Fast_Cursor_Down : keysym = 0xFE2F -let _ISO_Continuous_Underline : keysym = 0xFE30 -let _ISO_Discontinuous_Underline : keysym = 0xFE31 -let _ISO_Emphasize : keysym = 0xFE32 -let _ISO_Center_Object : keysym = 0xFE33 -let _ISO_Enter : keysym = 0xFE34 -let _dead_grave : keysym = 0xFE50 -let _dead_acute : keysym = 0xFE51 -let _dead_circumflex : keysym = 0xFE52 -let _dead_tilde : keysym = 0xFE53 -let _dead_macron : keysym = 0xFE54 -let _dead_breve : keysym = 0xFE55 -let _dead_abovedot : keysym = 0xFE56 -let _dead_diaeresis : keysym = 0xFE57 -let _dead_abovering : keysym = 0xFE58 -let _dead_doubleacute : keysym = 0xFE59 -let _dead_caron : keysym = 0xFE5A -let _dead_cedilla : keysym = 0xFE5B -let _dead_ogonek : keysym = 0xFE5C -let _dead_iota : keysym = 0xFE5D -let _dead_voiced_sound : keysym = 0xFE5E -let _dead_semivoiced_sound : keysym = 0xFE5F -let _dead_belowdot : keysym = 0xFE60 -let _First_Virtual_Screen : keysym = 0xFED0 -let _Prev_Virtual_Screen : keysym = 0xFED1 -let _Next_Virtual_Screen : keysym = 0xFED2 -let _Last_Virtual_Screen : keysym = 0xFED4 -let _Terminate_Server : keysym = 0xFED5 -let _AccessX_Enable : keysym = 0xFE70 -let _AccessX_Feedback_Enable : keysym = 0xFE71 -let _RepeatKeys_Enable : keysym = 0xFE72 -let _SlowKeys_Enable : keysym = 0xFE73 -let _BounceKeys_Enable : keysym = 0xFE74 -let _StickyKeys_Enable : keysym = 0xFE75 -let _MouseKeys_Enable : keysym = 0xFE76 -let _MouseKeys_Accel_Enable : keysym = 0xFE77 -let _Overlay1_Enable : keysym = 0xFE78 -let _Overlay2_Enable : keysym = 0xFE79 -let _AudibleBell_Enable : keysym = 0xFE7A -let _Pointer_Left : keysym = 0xFEE0 -let _Pointer_Right : keysym = 0xFEE1 -let _Pointer_Up : keysym = 0xFEE2 -let _Pointer_Down : keysym = 0xFEE3 -let _Pointer_UpLeft : keysym = 0xFEE4 -let _Pointer_UpRight : keysym = 0xFEE5 -let _Pointer_DownLeft : keysym = 0xFEE6 -let _Pointer_DownRight : keysym = 0xFEE7 -let _Pointer_Button_Dflt : keysym = 0xFEE8 -let _Pointer_Button1 : keysym = 0xFEE9 -let _Pointer_Button2 : keysym = 0xFEEA -let _Pointer_Button3 : keysym = 0xFEEB -let _Pointer_Button4 : keysym = 0xFEEC -let _Pointer_Button5 : keysym = 0xFEED -let _Pointer_DblClick_Dflt : keysym = 0xFEEE -let _Pointer_DblClick1 : keysym = 0xFEEF -let _Pointer_DblClick2 : keysym = 0xFEF0 -let _Pointer_DblClick3 : keysym = 0xFEF1 -let _Pointer_DblClick4 : keysym = 0xFEF2 -let _Pointer_DblClick5 : keysym = 0xFEF3 -let _Pointer_Drag_Dflt : keysym = 0xFEF4 -let _Pointer_Drag1 : keysym = 0xFEF5 -let _Pointer_Drag2 : keysym = 0xFEF6 -let _Pointer_Drag3 : keysym = 0xFEF7 -let _Pointer_Drag4 : keysym = 0xFEF8 -let _Pointer_Drag5 : keysym = 0xFEFD -let _Pointer_EnableKeys : keysym = 0xFEF9 -let _Pointer_Accelerate : keysym = 0xFEFA -let _Pointer_DfltBtnNext : keysym = 0xFEFB -let _Pointer_DfltBtnPrev : keysym = 0xFEFC -let _3270_Duplicate : keysym = 0xFD01 -let _3270_FieldMark : keysym = 0xFD02 -let _3270_Right2 : keysym = 0xFD03 -let _3270_Left2 : keysym = 0xFD04 -let _3270_BackTab : keysym = 0xFD05 -let _3270_EraseEOF : keysym = 0xFD06 -let _3270_EraseInput : keysym = 0xFD07 -let _3270_Reset : keysym = 0xFD08 -let _3270_Quit : keysym = 0xFD09 -let _3270_PA1 : keysym = 0xFD0A -let _3270_PA2 : keysym = 0xFD0B -let _3270_PA3 : keysym = 0xFD0C -let _3270_Test : keysym = 0xFD0D -let _3270_Attn : keysym = 0xFD0E -let _3270_CursorBlink : keysym = 0xFD0F -let _3270_AltCursor : keysym = 0xFD10 -let _3270_KeyClick : keysym = 0xFD11 -let _3270_Jump : keysym = 0xFD12 -let _3270_Ident : keysym = 0xFD13 -let _3270_Rule : keysym = 0xFD14 -let _3270_Copy : keysym = 0xFD15 -let _3270_Play : keysym = 0xFD16 -let _3270_Setup : keysym = 0xFD17 -let _3270_Record : keysym = 0xFD18 -let _3270_ChangeScreen : keysym = 0xFD19 -let _3270_DeleteWord : keysym = 0xFD1A -let _3270_ExSelect : keysym = 0xFD1B -let _3270_CursorSelect : keysym = 0xFD1C -let _3270_PrintScreen : keysym = 0xFD1D -let _3270_Enter : keysym = 0xFD1E -let _space : keysym = 0x020 -let _exclam : keysym = 0x021 -let _quotedbl : keysym = 0x022 -let _numbersign : keysym = 0x023 -let _dollar : keysym = 0x024 -let _percent : keysym = 0x025 -let _ampersand : keysym = 0x026 -let _apostrophe : keysym = 0x027 -let _quoteright : keysym = 0x027 -let _parenleft : keysym = 0x028 -let _parenright : keysym = 0x029 -let _asterisk : keysym = 0x02a -let _plus : keysym = 0x02b -let _comma : keysym = 0x02c -let _minus : keysym = 0x02d -let _period : keysym = 0x02e -let _slash : keysym = 0x02f -let _0 : keysym = 0x030 -let _1 : keysym = 0x031 -let _2 : keysym = 0x032 -let _3 : keysym = 0x033 -let _4 : keysym = 0x034 -let _5 : keysym = 0x035 -let _6 : keysym = 0x036 -let _7 : keysym = 0x037 -let _8 : keysym = 0x038 -let _9 : keysym = 0x039 -let _colon : keysym = 0x03a -let _semicolon : keysym = 0x03b -let _less : keysym = 0x03c -let _equal : keysym = 0x03d -let _greater : keysym = 0x03e -let _question : keysym = 0x03f -let _at : keysym = 0x040 -let _A : keysym = 0x041 -let _B : keysym = 0x042 -let _C : keysym = 0x043 -let _D : keysym = 0x044 -let _E : keysym = 0x045 -let _F : keysym = 0x046 -let _G : keysym = 0x047 -let _H : keysym = 0x048 -let _I : keysym = 0x049 -let _J : keysym = 0x04a -let _K : keysym = 0x04b -let _L : keysym = 0x04c -let _M : keysym = 0x04d -let _N : keysym = 0x04e -let _O : keysym = 0x04f -let _P : keysym = 0x050 -let _Q : keysym = 0x051 -let _R : keysym = 0x052 -let _S : keysym = 0x053 -let _T : keysym = 0x054 -let _U : keysym = 0x055 -let _V : keysym = 0x056 -let _W : keysym = 0x057 -let _X : keysym = 0x058 -let _Y : keysym = 0x059 -let _Z : keysym = 0x05a -let _bracketleft : keysym = 0x05b -let _backslash : keysym = 0x05c -let _bracketright : keysym = 0x05d -let _asciicircum : keysym = 0x05e -let _underscore : keysym = 0x05f -let _grave : keysym = 0x060 -let _quoteleft : keysym = 0x060 -let _a : keysym = 0x061 -let _b : keysym = 0x062 -let _c : keysym = 0x063 -let _d : keysym = 0x064 -let _e : keysym = 0x065 -let _f : keysym = 0x066 -let _g : keysym = 0x067 -let _h : keysym = 0x068 -let _i : keysym = 0x069 -let _j : keysym = 0x06a -let _k : keysym = 0x06b -let _l : keysym = 0x06c -let _m : keysym = 0x06d -let _n : keysym = 0x06e -let _o : keysym = 0x06f -let _p : keysym = 0x070 -let _q : keysym = 0x071 -let _r : keysym = 0x072 -let _s : keysym = 0x073 -let _t : keysym = 0x074 -let _u : keysym = 0x075 -let _v : keysym = 0x076 -let _w : keysym = 0x077 -let _x : keysym = 0x078 -let _y : keysym = 0x079 -let _z : keysym = 0x07a -let _braceleft : keysym = 0x07b -let _bar : keysym = 0x07c -let _braceright : keysym = 0x07d -let _asciitilde : keysym = 0x07e -let _nobreakspace : keysym = 0x0a0 -let _exclamdown : keysym = 0x0a1 -let _cent : keysym = 0x0a2 -let _sterling : keysym = 0x0a3 -let _currency : keysym = 0x0a4 -let _yen : keysym = 0x0a5 -let _brokenbar : keysym = 0x0a6 -let _section : keysym = 0x0a7 -let _diaeresis : keysym = 0x0a8 -let _copyright : keysym = 0x0a9 -let _ordfeminine : keysym = 0x0aa -let _guillemotleft : keysym = 0x0ab -let _notsign : keysym = 0x0ac -let _hyphen : keysym = 0x0ad -let _registered : keysym = 0x0ae -let _macron : keysym = 0x0af -let _degree : keysym = 0x0b0 -let _plusminus : keysym = 0x0b1 -let _twosuperior : keysym = 0x0b2 -let _threesuperior : keysym = 0x0b3 -let _acute : keysym = 0x0b4 -let _mu : keysym = 0x0b5 -let _paragraph : keysym = 0x0b6 -let _periodcentered : keysym = 0x0b7 -let _cedilla : keysym = 0x0b8 -let _onesuperior : keysym = 0x0b9 -let _masculine : keysym = 0x0ba -let _guillemotright : keysym = 0x0bb -let _onequarter : keysym = 0x0bc -let _onehalf : keysym = 0x0bd -let _threequarters : keysym = 0x0be -let _questiondown : keysym = 0x0bf -let _Agrave : keysym = 0x0c0 -let _Aacute : keysym = 0x0c1 -let _Acircumflex : keysym = 0x0c2 -let _Atilde : keysym = 0x0c3 -let _Adiaeresis : keysym = 0x0c4 -let _Aring : keysym = 0x0c5 -let _AE : keysym = 0x0c6 -let _Ccedilla : keysym = 0x0c7 -let _Egrave : keysym = 0x0c8 -let _Eacute : keysym = 0x0c9 -let _Ecircumflex : keysym = 0x0ca -let _Ediaeresis : keysym = 0x0cb -let _Igrave : keysym = 0x0cc -let _Iacute : keysym = 0x0cd -let _Icircumflex : keysym = 0x0ce -let _Idiaeresis : keysym = 0x0cf -let _ETH : keysym = 0x0d0 -let _Eth : keysym = 0x0d0 -let _Ntilde : keysym = 0x0d1 -let _Ograve : keysym = 0x0d2 -let _Oacute : keysym = 0x0d3 -let _Ocircumflex : keysym = 0x0d4 -let _Otilde : keysym = 0x0d5 -let _Odiaeresis : keysym = 0x0d6 -let _multiply : keysym = 0x0d7 -let _Ooblique : keysym = 0x0d8 -let _Ugrave : keysym = 0x0d9 -let _Uacute : keysym = 0x0da -let _Ucircumflex : keysym = 0x0db -let _Udiaeresis : keysym = 0x0dc -let _Yacute : keysym = 0x0dd -let _THORN : keysym = 0x0de -let _Thorn : keysym = 0x0de -let _ssharp : keysym = 0x0df -let _agrave : keysym = 0x0e0 -let _aacute : keysym = 0x0e1 -let _acircumflex : keysym = 0x0e2 -let _atilde : keysym = 0x0e3 -let _adiaeresis : keysym = 0x0e4 -let _aring : keysym = 0x0e5 -let _ae : keysym = 0x0e6 -let _ccedilla : keysym = 0x0e7 -let _egrave : keysym = 0x0e8 -let _eacute : keysym = 0x0e9 -let _ecircumflex : keysym = 0x0ea -let _ediaeresis : keysym = 0x0eb -let _igrave : keysym = 0x0ec -let _iacute : keysym = 0x0ed -let _icircumflex : keysym = 0x0ee -let _idiaeresis : keysym = 0x0ef -let _eth : keysym = 0x0f0 -let _ntilde : keysym = 0x0f1 -let _ograve : keysym = 0x0f2 -let _oacute : keysym = 0x0f3 -let _ocircumflex : keysym = 0x0f4 -let _otilde : keysym = 0x0f5 -let _odiaeresis : keysym = 0x0f6 -let _division : keysym = 0x0f7 -let _oslash : keysym = 0x0f8 -let _ugrave : keysym = 0x0f9 -let _uacute : keysym = 0x0fa -let _ucircumflex : keysym = 0x0fb -let _udiaeresis : keysym = 0x0fc -let _yacute : keysym = 0x0fd -let _thorn : keysym = 0x0fe -let _ydiaeresis : keysym = 0x0ff -let _Aogonek : keysym = 0x1a1 -let _breve : keysym = 0x1a2 -let _Lstroke : keysym = 0x1a3 -let _Lcaron : keysym = 0x1a5 -let _Sacute : keysym = 0x1a6 -let _Scaron : keysym = 0x1a9 -let _Scedilla : keysym = 0x1aa -let _Tcaron : keysym = 0x1ab -let _Zacute : keysym = 0x1ac -let _Zcaron : keysym = 0x1ae -let _Zabovedot : keysym = 0x1af -let _aogonek : keysym = 0x1b1 -let _ogonek : keysym = 0x1b2 -let _lstroke : keysym = 0x1b3 -let _lcaron : keysym = 0x1b5 -let _sacute : keysym = 0x1b6 -let _caron : keysym = 0x1b7 -let _scaron : keysym = 0x1b9 -let _scedilla : keysym = 0x1ba -let _tcaron : keysym = 0x1bb -let _zacute : keysym = 0x1bc -let _doubleacute : keysym = 0x1bd -let _zcaron : keysym = 0x1be -let _zabovedot : keysym = 0x1bf -let _Racute : keysym = 0x1c0 -let _Abreve : keysym = 0x1c3 -let _Lacute : keysym = 0x1c5 -let _Cacute : keysym = 0x1c6 -let _Ccaron : keysym = 0x1c8 -let _Eogonek : keysym = 0x1ca -let _Ecaron : keysym = 0x1cc -let _Dcaron : keysym = 0x1cf -let _Dstroke : keysym = 0x1d0 -let _Nacute : keysym = 0x1d1 -let _Ncaron : keysym = 0x1d2 -let _Odoubleacute : keysym = 0x1d5 -let _Rcaron : keysym = 0x1d8 -let _Uring : keysym = 0x1d9 -let _Udoubleacute : keysym = 0x1db -let _Tcedilla : keysym = 0x1de -let _racute : keysym = 0x1e0 -let _abreve : keysym = 0x1e3 -let _lacute : keysym = 0x1e5 -let _cacute : keysym = 0x1e6 -let _ccaron : keysym = 0x1e8 -let _eogonek : keysym = 0x1ea -let _ecaron : keysym = 0x1ec -let _dcaron : keysym = 0x1ef -let _dstroke : keysym = 0x1f0 -let _nacute : keysym = 0x1f1 -let _ncaron : keysym = 0x1f2 -let _odoubleacute : keysym = 0x1f5 -let _udoubleacute : keysym = 0x1fb -let _rcaron : keysym = 0x1f8 -let _uring : keysym = 0x1f9 -let _tcedilla : keysym = 0x1fe -let _abovedot : keysym = 0x1ff -let _Hstroke : keysym = 0x2a1 -let _Hcircumflex : keysym = 0x2a6 -let _Iabovedot : keysym = 0x2a9 -let _Gbreve : keysym = 0x2ab -let _Jcircumflex : keysym = 0x2ac -let _hstroke : keysym = 0x2b1 -let _hcircumflex : keysym = 0x2b6 -let _idotless : keysym = 0x2b9 -let _gbreve : keysym = 0x2bb -let _jcircumflex : keysym = 0x2bc -let _Cabovedot : keysym = 0x2c5 -let _Ccircumflex : keysym = 0x2c6 -let _Gabovedot : keysym = 0x2d5 -let _Gcircumflex : keysym = 0x2d8 -let _Ubreve : keysym = 0x2dd -let _Scircumflex : keysym = 0x2de -let _cabovedot : keysym = 0x2e5 -let _ccircumflex : keysym = 0x2e6 -let _gabovedot : keysym = 0x2f5 -let _gcircumflex : keysym = 0x2f8 -let _ubreve : keysym = 0x2fd -let _scircumflex : keysym = 0x2fe -let _kra : keysym = 0x3a2 -let _kappa : keysym = 0x3a2 -let _Rcedilla : keysym = 0x3a3 -let _Itilde : keysym = 0x3a5 -let _Lcedilla : keysym = 0x3a6 -let _Emacron : keysym = 0x3aa -let _Gcedilla : keysym = 0x3ab -let _Tslash : keysym = 0x3ac -let _rcedilla : keysym = 0x3b3 -let _itilde : keysym = 0x3b5 -let _lcedilla : keysym = 0x3b6 -let _emacron : keysym = 0x3ba -let _gcedilla : keysym = 0x3bb -let _tslash : keysym = 0x3bc -let _ENG : keysym = 0x3bd -let _eng : keysym = 0x3bf -let _Amacron : keysym = 0x3c0 -let _Iogonek : keysym = 0x3c7 -let _Eabovedot : keysym = 0x3cc -let _Imacron : keysym = 0x3cf -let _Ncedilla : keysym = 0x3d1 -let _Omacron : keysym = 0x3d2 -let _Kcedilla : keysym = 0x3d3 -let _Uogonek : keysym = 0x3d9 -let _Utilde : keysym = 0x3dd -let _Umacron : keysym = 0x3de -let _amacron : keysym = 0x3e0 -let _iogonek : keysym = 0x3e7 -let _eabovedot : keysym = 0x3ec -let _imacron : keysym = 0x3ef -let _ncedilla : keysym = 0x3f1 -let _omacron : keysym = 0x3f2 -let _kcedilla : keysym = 0x3f3 -let _uogonek : keysym = 0x3f9 -let _utilde : keysym = 0x3fd -let _umacron : keysym = 0x3fe -let _overline : keysym = 0x47e -let _kana_fullstop : keysym = 0x4a1 -let _kana_openingbracket : keysym = 0x4a2 -let _kana_closingbracket : keysym = 0x4a3 -let _kana_comma : keysym = 0x4a4 -let _kana_conjunctive : keysym = 0x4a5 -let _kana_middledot : keysym = 0x4a5 -let _kana_WO : keysym = 0x4a6 -let _kana_a : keysym = 0x4a7 -let _kana_i : keysym = 0x4a8 -let _kana_u : keysym = 0x4a9 -let _kana_e : keysym = 0x4aa -let _kana_o : keysym = 0x4ab -let _kana_ya : keysym = 0x4ac -let _kana_yu : keysym = 0x4ad -let _kana_yo : keysym = 0x4ae -let _kana_tsu : keysym = 0x4af -let _kana_tu : keysym = 0x4af -let _prolongedsound : keysym = 0x4b0 -let _kana_A : keysym = 0x4b1 -let _kana_I : keysym = 0x4b2 -let _kana_U : keysym = 0x4b3 -let _kana_E : keysym = 0x4b4 -let _kana_O : keysym = 0x4b5 -let _kana_KA : keysym = 0x4b6 -let _kana_KI : keysym = 0x4b7 -let _kana_KU : keysym = 0x4b8 -let _kana_KE : keysym = 0x4b9 -let _kana_KO : keysym = 0x4ba -let _kana_SA : keysym = 0x4bb -let _kana_SHI : keysym = 0x4bc -let _kana_SU : keysym = 0x4bd -let _kana_SE : keysym = 0x4be -let _kana_SO : keysym = 0x4bf -let _kana_TA : keysym = 0x4c0 -let _kana_CHI : keysym = 0x4c1 -let _kana_TI : keysym = 0x4c1 -let _kana_TSU : keysym = 0x4c2 -let _kana_TU : keysym = 0x4c2 -let _kana_TE : keysym = 0x4c3 -let _kana_TO : keysym = 0x4c4 -let _kana_NA : keysym = 0x4c5 -let _kana_NI : keysym = 0x4c6 -let _kana_NU : keysym = 0x4c7 -let _kana_NE : keysym = 0x4c8 -let _kana_NO : keysym = 0x4c9 -let _kana_HA : keysym = 0x4ca -let _kana_HI : keysym = 0x4cb -let _kana_FU : keysym = 0x4cc -let _kana_HU : keysym = 0x4cc -let _kana_HE : keysym = 0x4cd -let _kana_HO : keysym = 0x4ce -let _kana_MA : keysym = 0x4cf -let _kana_MI : keysym = 0x4d0 -let _kana_MU : keysym = 0x4d1 -let _kana_ME : keysym = 0x4d2 -let _kana_MO : keysym = 0x4d3 -let _kana_YA : keysym = 0x4d4 -let _kana_YU : keysym = 0x4d5 -let _kana_YO : keysym = 0x4d6 -let _kana_RA : keysym = 0x4d7 -let _kana_RI : keysym = 0x4d8 -let _kana_RU : keysym = 0x4d9 -let _kana_RE : keysym = 0x4da -let _kana_RO : keysym = 0x4db -let _kana_WA : keysym = 0x4dc -let _kana_N : keysym = 0x4dd -let _voicedsound : keysym = 0x4de -let _semivoicedsound : keysym = 0x4df -let _kana_switch : keysym = 0xFF7E -let _Arabic_comma : keysym = 0x5ac -let _Arabic_semicolon : keysym = 0x5bb -let _Arabic_question_mark : keysym = 0x5bf -let _Arabic_hamza : keysym = 0x5c1 -let _Arabic_maddaonalef : keysym = 0x5c2 -let _Arabic_hamzaonalef : keysym = 0x5c3 -let _Arabic_hamzaonwaw : keysym = 0x5c4 -let _Arabic_hamzaunderalef : keysym = 0x5c5 -let _Arabic_hamzaonyeh : keysym = 0x5c6 -let _Arabic_alef : keysym = 0x5c7 -let _Arabic_beh : keysym = 0x5c8 -let _Arabic_tehmarbuta : keysym = 0x5c9 -let _Arabic_teh : keysym = 0x5ca -let _Arabic_theh : keysym = 0x5cb -let _Arabic_jeem : keysym = 0x5cc -let _Arabic_hah : keysym = 0x5cd -let _Arabic_khah : keysym = 0x5ce -let _Arabic_dal : keysym = 0x5cf -let _Arabic_thal : keysym = 0x5d0 -let _Arabic_ra : keysym = 0x5d1 -let _Arabic_zain : keysym = 0x5d2 -let _Arabic_seen : keysym = 0x5d3 -let _Arabic_sheen : keysym = 0x5d4 -let _Arabic_sad : keysym = 0x5d5 -let _Arabic_dad : keysym = 0x5d6 -let _Arabic_tah : keysym = 0x5d7 -let _Arabic_zah : keysym = 0x5d8 -let _Arabic_ain : keysym = 0x5d9 -let _Arabic_ghain : keysym = 0x5da -let _Arabic_tatweel : keysym = 0x5e0 -let _Arabic_feh : keysym = 0x5e1 -let _Arabic_qaf : keysym = 0x5e2 -let _Arabic_kaf : keysym = 0x5e3 -let _Arabic_lam : keysym = 0x5e4 -let _Arabic_meem : keysym = 0x5e5 -let _Arabic_noon : keysym = 0x5e6 -let _Arabic_ha : keysym = 0x5e7 -let _Arabic_heh : keysym = 0x5e7 -let _Arabic_waw : keysym = 0x5e8 -let _Arabic_alefmaksura : keysym = 0x5e9 -let _Arabic_yeh : keysym = 0x5ea -let _Arabic_fathatan : keysym = 0x5eb -let _Arabic_dammatan : keysym = 0x5ec -let _Arabic_kasratan : keysym = 0x5ed -let _Arabic_fatha : keysym = 0x5ee -let _Arabic_damma : keysym = 0x5ef -let _Arabic_kasra : keysym = 0x5f0 -let _Arabic_shadda : keysym = 0x5f1 -let _Arabic_sukun : keysym = 0x5f2 -let _Arabic_switch : keysym = 0xFF7E -let _Serbian_dje : keysym = 0x6a1 -let _Macedonia_gje : keysym = 0x6a2 -let _Cyrillic_io : keysym = 0x6a3 -let _Ukrainian_ie : keysym = 0x6a4 -let _Ukranian_je : keysym = 0x6a4 -let _Macedonia_dse : keysym = 0x6a5 -let _Ukrainian_i : keysym = 0x6a6 -let _Ukranian_i : keysym = 0x6a6 -let _Ukrainian_yi : keysym = 0x6a7 -let _Ukranian_yi : keysym = 0x6a7 -let _Cyrillic_je : keysym = 0x6a8 -let _Serbian_je : keysym = 0x6a8 -let _Cyrillic_lje : keysym = 0x6a9 -let _Serbian_lje : keysym = 0x6a9 -let _Cyrillic_nje : keysym = 0x6aa -let _Serbian_nje : keysym = 0x6aa -let _Serbian_tshe : keysym = 0x6ab -let _Macedonia_kje : keysym = 0x6ac -let _Byelorussian_shortu : keysym = 0x6ae -let _Cyrillic_dzhe : keysym = 0x6af -let _Serbian_dze : keysym = 0x6af -let _numerosign : keysym = 0x6b0 -let _Serbian_DJE : keysym = 0x6b1 -let _Macedonia_GJE : keysym = 0x6b2 -let _Cyrillic_IO : keysym = 0x6b3 -let _Ukrainian_IE : keysym = 0x6b4 -let _Ukranian_JE : keysym = 0x6b4 -let _Macedonia_DSE : keysym = 0x6b5 -let _Ukrainian_I : keysym = 0x6b6 -let _Ukranian_I : keysym = 0x6b6 -let _Ukrainian_YI : keysym = 0x6b7 -let _Ukranian_YI : keysym = 0x6b7 -let _Cyrillic_JE : keysym = 0x6b8 -let _Serbian_JE : keysym = 0x6b8 -let _Cyrillic_LJE : keysym = 0x6b9 -let _Serbian_LJE : keysym = 0x6b9 -let _Cyrillic_NJE : keysym = 0x6ba -let _Serbian_NJE : keysym = 0x6ba -let _Serbian_TSHE : keysym = 0x6bb -let _Macedonia_KJE : keysym = 0x6bc -let _Byelorussian_SHORTU : keysym = 0x6be -let _Cyrillic_DZHE : keysym = 0x6bf -let _Serbian_DZE : keysym = 0x6bf -let _Cyrillic_yu : keysym = 0x6c0 -let _Cyrillic_a : keysym = 0x6c1 -let _Cyrillic_be : keysym = 0x6c2 -let _Cyrillic_tse : keysym = 0x6c3 -let _Cyrillic_de : keysym = 0x6c4 -let _Cyrillic_ie : keysym = 0x6c5 -let _Cyrillic_ef : keysym = 0x6c6 -let _Cyrillic_ghe : keysym = 0x6c7 -let _Cyrillic_ha : keysym = 0x6c8 -let _Cyrillic_i : keysym = 0x6c9 -let _Cyrillic_shorti : keysym = 0x6ca -let _Cyrillic_ka : keysym = 0x6cb -let _Cyrillic_el : keysym = 0x6cc -let _Cyrillic_em : keysym = 0x6cd -let _Cyrillic_en : keysym = 0x6ce -let _Cyrillic_o : keysym = 0x6cf -let _Cyrillic_pe : keysym = 0x6d0 -let _Cyrillic_ya : keysym = 0x6d1 -let _Cyrillic_er : keysym = 0x6d2 -let _Cyrillic_es : keysym = 0x6d3 -let _Cyrillic_te : keysym = 0x6d4 -let _Cyrillic_u : keysym = 0x6d5 -let _Cyrillic_zhe : keysym = 0x6d6 -let _Cyrillic_ve : keysym = 0x6d7 -let _Cyrillic_softsign : keysym = 0x6d8 -let _Cyrillic_yeru : keysym = 0x6d9 -let _Cyrillic_ze : keysym = 0x6da -let _Cyrillic_sha : keysym = 0x6db -let _Cyrillic_e : keysym = 0x6dc -let _Cyrillic_shcha : keysym = 0x6dd -let _Cyrillic_che : keysym = 0x6de -let _Cyrillic_hardsign : keysym = 0x6df -let _Cyrillic_YU : keysym = 0x6e0 -let _Cyrillic_A : keysym = 0x6e1 -let _Cyrillic_BE : keysym = 0x6e2 -let _Cyrillic_TSE : keysym = 0x6e3 -let _Cyrillic_DE : keysym = 0x6e4 -let _Cyrillic_IE : keysym = 0x6e5 -let _Cyrillic_EF : keysym = 0x6e6 -let _Cyrillic_GHE : keysym = 0x6e7 -let _Cyrillic_HA : keysym = 0x6e8 -let _Cyrillic_I : keysym = 0x6e9 -let _Cyrillic_SHORTI : keysym = 0x6ea -let _Cyrillic_KA : keysym = 0x6eb -let _Cyrillic_EL : keysym = 0x6ec -let _Cyrillic_EM : keysym = 0x6ed -let _Cyrillic_EN : keysym = 0x6ee -let _Cyrillic_O : keysym = 0x6ef -let _Cyrillic_PE : keysym = 0x6f0 -let _Cyrillic_YA : keysym = 0x6f1 -let _Cyrillic_ER : keysym = 0x6f2 -let _Cyrillic_ES : keysym = 0x6f3 -let _Cyrillic_TE : keysym = 0x6f4 -let _Cyrillic_U : keysym = 0x6f5 -let _Cyrillic_ZHE : keysym = 0x6f6 -let _Cyrillic_VE : keysym = 0x6f7 -let _Cyrillic_SOFTSIGN : keysym = 0x6f8 -let _Cyrillic_YERU : keysym = 0x6f9 -let _Cyrillic_ZE : keysym = 0x6fa -let _Cyrillic_SHA : keysym = 0x6fb -let _Cyrillic_E : keysym = 0x6fc -let _Cyrillic_SHCHA : keysym = 0x6fd -let _Cyrillic_CHE : keysym = 0x6fe -let _Cyrillic_HARDSIGN : keysym = 0x6ff -let _Greek_ALPHAaccent : keysym = 0x7a1 -let _Greek_EPSILONaccent : keysym = 0x7a2 -let _Greek_ETAaccent : keysym = 0x7a3 -let _Greek_IOTAaccent : keysym = 0x7a4 -let _Greek_IOTAdiaeresis : keysym = 0x7a5 -let _Greek_OMICRONaccent : keysym = 0x7a7 -let _Greek_UPSILONaccent : keysym = 0x7a8 -let _Greek_UPSILONdieresis : keysym = 0x7a9 -let _Greek_OMEGAaccent : keysym = 0x7ab -let _Greek_accentdieresis : keysym = 0x7ae -let _Greek_horizbar : keysym = 0x7af -let _Greek_alphaaccent : keysym = 0x7b1 -let _Greek_epsilonaccent : keysym = 0x7b2 -let _Greek_etaaccent : keysym = 0x7b3 -let _Greek_iotaaccent : keysym = 0x7b4 -let _Greek_iotadieresis : keysym = 0x7b5 -let _Greek_iotaaccentdieresis : keysym = 0x7b6 -let _Greek_omicronaccent : keysym = 0x7b7 -let _Greek_upsilonaccent : keysym = 0x7b8 -let _Greek_upsilondieresis : keysym = 0x7b9 -let _Greek_upsilonaccentdieresis : keysym = 0x7ba -let _Greek_omegaaccent : keysym = 0x7bb -let _Greek_ALPHA : keysym = 0x7c1 -let _Greek_BETA : keysym = 0x7c2 -let _Greek_GAMMA : keysym = 0x7c3 -let _Greek_DELTA : keysym = 0x7c4 -let _Greek_EPSILON : keysym = 0x7c5 -let _Greek_ZETA : keysym = 0x7c6 -let _Greek_ETA : keysym = 0x7c7 -let _Greek_THETA : keysym = 0x7c8 -let _Greek_IOTA : keysym = 0x7c9 -let _Greek_KAPPA : keysym = 0x7ca -let _Greek_LAMDA : keysym = 0x7cb -let _Greek_LAMBDA : keysym = 0x7cb -let _Greek_MU : keysym = 0x7cc -let _Greek_NU : keysym = 0x7cd -let _Greek_XI : keysym = 0x7ce -let _Greek_OMICRON : keysym = 0x7cf -let _Greek_PI : keysym = 0x7d0 -let _Greek_RHO : keysym = 0x7d1 -let _Greek_SIGMA : keysym = 0x7d2 -let _Greek_TAU : keysym = 0x7d4 -let _Greek_UPSILON : keysym = 0x7d5 -let _Greek_PHI : keysym = 0x7d6 -let _Greek_CHI : keysym = 0x7d7 -let _Greek_PSI : keysym = 0x7d8 -let _Greek_OMEGA : keysym = 0x7d9 -let _Greek_alpha : keysym = 0x7e1 -let _Greek_beta : keysym = 0x7e2 -let _Greek_gamma : keysym = 0x7e3 -let _Greek_delta : keysym = 0x7e4 -let _Greek_epsilon : keysym = 0x7e5 -let _Greek_zeta : keysym = 0x7e6 -let _Greek_eta : keysym = 0x7e7 -let _Greek_theta : keysym = 0x7e8 -let _Greek_iota : keysym = 0x7e9 -let _Greek_kappa : keysym = 0x7ea -let _Greek_lamda : keysym = 0x7eb -let _Greek_lambda : keysym = 0x7eb -let _Greek_mu : keysym = 0x7ec -let _Greek_nu : keysym = 0x7ed -let _Greek_xi : keysym = 0x7ee -let _Greek_omicron : keysym = 0x7ef -let _Greek_pi : keysym = 0x7f0 -let _Greek_rho : keysym = 0x7f1 -let _Greek_sigma : keysym = 0x7f2 -let _Greek_finalsmallsigma : keysym = 0x7f3 -let _Greek_tau : keysym = 0x7f4 -let _Greek_upsilon : keysym = 0x7f5 -let _Greek_phi : keysym = 0x7f6 -let _Greek_chi : keysym = 0x7f7 -let _Greek_psi : keysym = 0x7f8 -let _Greek_omega : keysym = 0x7f9 -let _Greek_switch : keysym = 0xFF7E -let _leftradical : keysym = 0x8a1 -let _topleftradical : keysym = 0x8a2 -let _horizconnector : keysym = 0x8a3 -let _topintegral : keysym = 0x8a4 -let _botintegral : keysym = 0x8a5 -let _vertconnector : keysym = 0x8a6 -let _topleftsqbracket : keysym = 0x8a7 -let _botleftsqbracket : keysym = 0x8a8 -let _toprightsqbracket : keysym = 0x8a9 -let _botrightsqbracket : keysym = 0x8aa -let _topleftparens : keysym = 0x8ab -let _botleftparens : keysym = 0x8ac -let _toprightparens : keysym = 0x8ad -let _botrightparens : keysym = 0x8ae -let _leftmiddlecurlybrace : keysym = 0x8af -let _rightmiddlecurlybrace : keysym = 0x8b0 -let _topleftsummation : keysym = 0x8b1 -let _botleftsummation : keysym = 0x8b2 -let _topvertsummationconnector : keysym = 0x8b3 -let _botvertsummationconnector : keysym = 0x8b4 -let _toprightsummation : keysym = 0x8b5 -let _botrightsummation : keysym = 0x8b6 -let _rightmiddlesummation : keysym = 0x8b7 -let _lessthanequal : keysym = 0x8bc -let _notequal : keysym = 0x8bd -let _greaterthanequal : keysym = 0x8be -let _integral : keysym = 0x8bf -let _therefore : keysym = 0x8c0 -let _variation : keysym = 0x8c1 -let _infinity : keysym = 0x8c2 -let _nabla : keysym = 0x8c5 -let _approximate : keysym = 0x8c8 -let _similarequal : keysym = 0x8c9 -let _ifonlyif : keysym = 0x8cd -let _implies : keysym = 0x8ce -let _identical : keysym = 0x8cf -let _radical : keysym = 0x8d6 -let _includedin : keysym = 0x8da -let _includes : keysym = 0x8db -let _intersection : keysym = 0x8dc -let _union : keysym = 0x8dd -let _logicaland : keysym = 0x8de -let _logicalor : keysym = 0x8df -let _partialderivative : keysym = 0x8ef -let _function : keysym = 0x8f6 -let _leftarrow : keysym = 0x8fb -let _uparrow : keysym = 0x8fc -let _rightarrow : keysym = 0x8fd -let _downarrow : keysym = 0x8fe -let _blank : keysym = 0x9df -let _soliddiamond : keysym = 0x9e0 -let _checkerboard : keysym = 0x9e1 -let _ht : keysym = 0x9e2 -let _ff : keysym = 0x9e3 -let _cr : keysym = 0x9e4 -let _lf : keysym = 0x9e5 -let _nl : keysym = 0x9e8 -let _vt : keysym = 0x9e9 -let _lowrightcorner : keysym = 0x9ea -let _uprightcorner : keysym = 0x9eb -let _upleftcorner : keysym = 0x9ec -let _lowleftcorner : keysym = 0x9ed -let _crossinglines : keysym = 0x9ee -let _horizlinescan1 : keysym = 0x9ef -let _horizlinescan3 : keysym = 0x9f0 -let _horizlinescan5 : keysym = 0x9f1 -let _horizlinescan7 : keysym = 0x9f2 -let _horizlinescan9 : keysym = 0x9f3 -let _leftt : keysym = 0x9f4 -let _rightt : keysym = 0x9f5 -let _bott : keysym = 0x9f6 -let _topt : keysym = 0x9f7 -let _vertbar : keysym = 0x9f8 -let _emspace : keysym = 0xaa1 -let _enspace : keysym = 0xaa2 -let _em3space : keysym = 0xaa3 -let _em4space : keysym = 0xaa4 -let _digitspace : keysym = 0xaa5 -let _punctspace : keysym = 0xaa6 -let _thinspace : keysym = 0xaa7 -let _hairspace : keysym = 0xaa8 -let _emdash : keysym = 0xaa9 -let _endash : keysym = 0xaaa -let _signifblank : keysym = 0xaac -let _ellipsis : keysym = 0xaae -let _doubbaselinedot : keysym = 0xaaf -let _onethird : keysym = 0xab0 -let _twothirds : keysym = 0xab1 -let _onefifth : keysym = 0xab2 -let _twofifths : keysym = 0xab3 -let _threefifths : keysym = 0xab4 -let _fourfifths : keysym = 0xab5 -let _onesixth : keysym = 0xab6 -let _fivesixths : keysym = 0xab7 -let _careof : keysym = 0xab8 -let _figdash : keysym = 0xabb -let _leftanglebracket : keysym = 0xabc -let _decimalpoint : keysym = 0xabd -let _rightanglebracket : keysym = 0xabe -let _marker : keysym = 0xabf -let _oneeighth : keysym = 0xac3 -let _threeeighths : keysym = 0xac4 -let _fiveeighths : keysym = 0xac5 -let _seveneighths : keysym = 0xac6 -let _trademark : keysym = 0xac9 -let _signaturemark : keysym = 0xaca -let _trademarkincircle : keysym = 0xacb -let _leftopentriangle : keysym = 0xacc -let _rightopentriangle : keysym = 0xacd -let _emopencircle : keysym = 0xace -let _emopenrectangle : keysym = 0xacf -let _leftsinglequotemark : keysym = 0xad0 -let _rightsinglequotemark : keysym = 0xad1 -let _leftdoublequotemark : keysym = 0xad2 -let _rightdoublequotemark : keysym = 0xad3 -let _prescription : keysym = 0xad4 -let _minutes : keysym = 0xad6 -let _seconds : keysym = 0xad7 -let _latincross : keysym = 0xad9 -let _hexagram : keysym = 0xada -let _filledrectbullet : keysym = 0xadb -let _filledlefttribullet : keysym = 0xadc -let _filledrighttribullet : keysym = 0xadd -let _emfilledcircle : keysym = 0xade -let _emfilledrect : keysym = 0xadf -let _enopencircbullet : keysym = 0xae0 -let _enopensquarebullet : keysym = 0xae1 -let _openrectbullet : keysym = 0xae2 -let _opentribulletup : keysym = 0xae3 -let _opentribulletdown : keysym = 0xae4 -let _openstar : keysym = 0xae5 -let _enfilledcircbullet : keysym = 0xae6 -let _enfilledsqbullet : keysym = 0xae7 -let _filledtribulletup : keysym = 0xae8 -let _filledtribulletdown : keysym = 0xae9 -let _leftpointer : keysym = 0xaea -let _rightpointer : keysym = 0xaeb -let _club : keysym = 0xaec -let _diamond : keysym = 0xaed -let _heart : keysym = 0xaee -let _maltesecross : keysym = 0xaf0 -let _dagger : keysym = 0xaf1 -let _doubledagger : keysym = 0xaf2 -let _checkmark : keysym = 0xaf3 -let _ballotcross : keysym = 0xaf4 -let _musicalsharp : keysym = 0xaf5 -let _musicalflat : keysym = 0xaf6 -let _malesymbol : keysym = 0xaf7 -let _femalesymbol : keysym = 0xaf8 -let _telephone : keysym = 0xaf9 -let _telephonerecorder : keysym = 0xafa -let _phonographcopyright : keysym = 0xafb -let _caret : keysym = 0xafc -let _singlelowquotemark : keysym = 0xafd -let _doublelowquotemark : keysym = 0xafe -let _cursor : keysym = 0xaff -let _leftcaret : keysym = 0xba3 -let _rightcaret : keysym = 0xba6 -let _downcaret : keysym = 0xba8 -let _upcaret : keysym = 0xba9 -let _overbar : keysym = 0xbc0 -let _downtack : keysym = 0xbc2 -let _upshoe : keysym = 0xbc3 -let _downstile : keysym = 0xbc4 -let _underbar : keysym = 0xbc6 -let _jot : keysym = 0xbca -let _quad : keysym = 0xbcc -let _uptack : keysym = 0xbce -let _circle : keysym = 0xbcf -let _upstile : keysym = 0xbd3 -let _downshoe : keysym = 0xbd6 -let _rightshoe : keysym = 0xbd8 -let _leftshoe : keysym = 0xbda -let _lefttack : keysym = 0xbdc -let _righttack : keysym = 0xbfc -let _hebrew_doublelowline : keysym = 0xcdf -let _hebrew_aleph : keysym = 0xce0 -let _hebrew_bet : keysym = 0xce1 -let _hebrew_beth : keysym = 0xce1 -let _hebrew_gimel : keysym = 0xce2 -let _hebrew_gimmel : keysym = 0xce2 -let _hebrew_dalet : keysym = 0xce3 -let _hebrew_daleth : keysym = 0xce3 -let _hebrew_he : keysym = 0xce4 -let _hebrew_waw : keysym = 0xce5 -let _hebrew_zain : keysym = 0xce6 -let _hebrew_zayin : keysym = 0xce6 -let _hebrew_chet : keysym = 0xce7 -let _hebrew_het : keysym = 0xce7 -let _hebrew_tet : keysym = 0xce8 -let _hebrew_teth : keysym = 0xce8 -let _hebrew_yod : keysym = 0xce9 -let _hebrew_finalkaph : keysym = 0xcea -let _hebrew_kaph : keysym = 0xceb -let _hebrew_lamed : keysym = 0xcec -let _hebrew_finalmem : keysym = 0xced -let _hebrew_mem : keysym = 0xcee -let _hebrew_finalnun : keysym = 0xcef -let _hebrew_nun : keysym = 0xcf0 -let _hebrew_samech : keysym = 0xcf1 -let _hebrew_samekh : keysym = 0xcf1 -let _hebrew_ayin : keysym = 0xcf2 -let _hebrew_finalpe : keysym = 0xcf3 -let _hebrew_pe : keysym = 0xcf4 -let _hebrew_finalzade : keysym = 0xcf5 -let _hebrew_finalzadi : keysym = 0xcf5 -let _hebrew_zade : keysym = 0xcf6 -let _hebrew_zadi : keysym = 0xcf6 -let _hebrew_qoph : keysym = 0xcf7 -let _hebrew_kuf : keysym = 0xcf7 -let _hebrew_resh : keysym = 0xcf8 -let _hebrew_shin : keysym = 0xcf9 -let _hebrew_taw : keysym = 0xcfa -let _hebrew_taf : keysym = 0xcfa -let _Hebrew_switch : keysym = 0xFF7E -let _Thai_kokai : keysym = 0xda1 -let _Thai_khokhai : keysym = 0xda2 -let _Thai_khokhuat : keysym = 0xda3 -let _Thai_khokhwai : keysym = 0xda4 -let _Thai_khokhon : keysym = 0xda5 -let _Thai_khorakhang : keysym = 0xda6 -let _Thai_ngongu : keysym = 0xda7 -let _Thai_chochan : keysym = 0xda8 -let _Thai_choching : keysym = 0xda9 -let _Thai_chochang : keysym = 0xdaa -let _Thai_soso : keysym = 0xdab -let _Thai_chochoe : keysym = 0xdac -let _Thai_yoying : keysym = 0xdad -let _Thai_dochada : keysym = 0xdae -let _Thai_topatak : keysym = 0xdaf -let _Thai_thothan : keysym = 0xdb0 -let _Thai_thonangmontho : keysym = 0xdb1 -let _Thai_thophuthao : keysym = 0xdb2 -let _Thai_nonen : keysym = 0xdb3 -let _Thai_dodek : keysym = 0xdb4 -let _Thai_totao : keysym = 0xdb5 -let _Thai_thothung : keysym = 0xdb6 -let _Thai_thothahan : keysym = 0xdb7 -let _Thai_thothong : keysym = 0xdb8 -let _Thai_nonu : keysym = 0xdb9 -let _Thai_bobaimai : keysym = 0xdba -let _Thai_popla : keysym = 0xdbb -let _Thai_phophung : keysym = 0xdbc -let _Thai_fofa : keysym = 0xdbd -let _Thai_phophan : keysym = 0xdbe -let _Thai_fofan : keysym = 0xdbf -let _Thai_phosamphao : keysym = 0xdc0 -let _Thai_moma : keysym = 0xdc1 -let _Thai_yoyak : keysym = 0xdc2 -let _Thai_rorua : keysym = 0xdc3 -let _Thai_ru : keysym = 0xdc4 -let _Thai_loling : keysym = 0xdc5 -let _Thai_lu : keysym = 0xdc6 -let _Thai_wowaen : keysym = 0xdc7 -let _Thai_sosala : keysym = 0xdc8 -let _Thai_sorusi : keysym = 0xdc9 -let _Thai_sosua : keysym = 0xdca -let _Thai_hohip : keysym = 0xdcb -let _Thai_lochula : keysym = 0xdcc -let _Thai_oang : keysym = 0xdcd -let _Thai_honokhuk : keysym = 0xdce -let _Thai_paiyannoi : keysym = 0xdcf -let _Thai_saraa : keysym = 0xdd0 -let _Thai_maihanakat : keysym = 0xdd1 -let _Thai_saraaa : keysym = 0xdd2 -let _Thai_saraam : keysym = 0xdd3 -let _Thai_sarai : keysym = 0xdd4 -let _Thai_saraii : keysym = 0xdd5 -let _Thai_saraue : keysym = 0xdd6 -let _Thai_sarauee : keysym = 0xdd7 -let _Thai_sarau : keysym = 0xdd8 -let _Thai_sarauu : keysym = 0xdd9 -let _Thai_phinthu : keysym = 0xdda -let _Thai_maihanakat_maitho : keysym = 0xdde -let _Thai_baht : keysym = 0xddf -let _Thai_sarae : keysym = 0xde0 -let _Thai_saraae : keysym = 0xde1 -let _Thai_sarao : keysym = 0xde2 -let _Thai_saraaimaimuan : keysym = 0xde3 -let _Thai_saraaimaimalai : keysym = 0xde4 -let _Thai_lakkhangyao : keysym = 0xde5 -let _Thai_maiyamok : keysym = 0xde6 -let _Thai_maitaikhu : keysym = 0xde7 -let _Thai_maiek : keysym = 0xde8 -let _Thai_maitho : keysym = 0xde9 -let _Thai_maitri : keysym = 0xdea -let _Thai_maichattawa : keysym = 0xdeb -let _Thai_thanthakhat : keysym = 0xdec -let _Thai_nikhahit : keysym = 0xded -let _Thai_leksun : keysym = 0xdf0 -let _Thai_leknung : keysym = 0xdf1 -let _Thai_leksong : keysym = 0xdf2 -let _Thai_leksam : keysym = 0xdf3 -let _Thai_leksi : keysym = 0xdf4 -let _Thai_lekha : keysym = 0xdf5 -let _Thai_lekhok : keysym = 0xdf6 -let _Thai_lekchet : keysym = 0xdf7 -let _Thai_lekpaet : keysym = 0xdf8 -let _Thai_lekkao : keysym = 0xdf9 -let _Hangul : keysym = 0xff31 -let _Hangul_Start : keysym = 0xff32 -let _Hangul_End : keysym = 0xff33 -let _Hangul_Hanja : keysym = 0xff34 -let _Hangul_Jamo : keysym = 0xff35 -let _Hangul_Romaja : keysym = 0xff36 -let _Hangul_Codeinput : keysym = 0xff37 -let _Hangul_Jeonja : keysym = 0xff38 -let _Hangul_Banja : keysym = 0xff39 -let _Hangul_PreHanja : keysym = 0xff3a -let _Hangul_PostHanja : keysym = 0xff3b -let _Hangul_SingleCandidate : keysym = 0xff3c -let _Hangul_MultipleCandidate : keysym = 0xff3d -let _Hangul_PreviousCandidate : keysym = 0xff3e -let _Hangul_Special : keysym = 0xff3f -let _Hangul_switch : keysym = 0xFF7E -let _Hangul_Kiyeog : keysym = 0xea1 -let _Hangul_SsangKiyeog : keysym = 0xea2 -let _Hangul_KiyeogSios : keysym = 0xea3 -let _Hangul_Nieun : keysym = 0xea4 -let _Hangul_NieunJieuj : keysym = 0xea5 -let _Hangul_NieunHieuh : keysym = 0xea6 -let _Hangul_Dikeud : keysym = 0xea7 -let _Hangul_SsangDikeud : keysym = 0xea8 -let _Hangul_Rieul : keysym = 0xea9 -let _Hangul_RieulKiyeog : keysym = 0xeaa -let _Hangul_RieulMieum : keysym = 0xeab -let _Hangul_RieulPieub : keysym = 0xeac -let _Hangul_RieulSios : keysym = 0xead -let _Hangul_RieulTieut : keysym = 0xeae -let _Hangul_RieulPhieuf : keysym = 0xeaf -let _Hangul_RieulHieuh : keysym = 0xeb0 -let _Hangul_Mieum : keysym = 0xeb1 -let _Hangul_Pieub : keysym = 0xeb2 -let _Hangul_SsangPieub : keysym = 0xeb3 -let _Hangul_PieubSios : keysym = 0xeb4 -let _Hangul_Sios : keysym = 0xeb5 -let _Hangul_SsangSios : keysym = 0xeb6 -let _Hangul_Ieung : keysym = 0xeb7 -let _Hangul_Jieuj : keysym = 0xeb8 -let _Hangul_SsangJieuj : keysym = 0xeb9 -let _Hangul_Cieuc : keysym = 0xeba -let _Hangul_Khieuq : keysym = 0xebb -let _Hangul_Tieut : keysym = 0xebc -let _Hangul_Phieuf : keysym = 0xebd -let _Hangul_Hieuh : keysym = 0xebe -let _Hangul_A : keysym = 0xebf -let _Hangul_AE : keysym = 0xec0 -let _Hangul_YA : keysym = 0xec1 -let _Hangul_YAE : keysym = 0xec2 -let _Hangul_EO : keysym = 0xec3 -let _Hangul_E : keysym = 0xec4 -let _Hangul_YEO : keysym = 0xec5 -let _Hangul_YE : keysym = 0xec6 -let _Hangul_O : keysym = 0xec7 -let _Hangul_WA : keysym = 0xec8 -let _Hangul_WAE : keysym = 0xec9 -let _Hangul_OE : keysym = 0xeca -let _Hangul_YO : keysym = 0xecb -let _Hangul_U : keysym = 0xecc -let _Hangul_WEO : keysym = 0xecd -let _Hangul_WE : keysym = 0xece -let _Hangul_WI : keysym = 0xecf -let _Hangul_YU : keysym = 0xed0 -let _Hangul_EU : keysym = 0xed1 -let _Hangul_YI : keysym = 0xed2 -let _Hangul_I : keysym = 0xed3 -let _Hangul_J_Kiyeog : keysym = 0xed4 -let _Hangul_J_SsangKiyeog : keysym = 0xed5 -let _Hangul_J_KiyeogSios : keysym = 0xed6 -let _Hangul_J_Nieun : keysym = 0xed7 -let _Hangul_J_NieunJieuj : keysym = 0xed8 -let _Hangul_J_NieunHieuh : keysym = 0xed9 -let _Hangul_J_Dikeud : keysym = 0xeda -let _Hangul_J_Rieul : keysym = 0xedb -let _Hangul_J_RieulKiyeog : keysym = 0xedc -let _Hangul_J_RieulMieum : keysym = 0xedd -let _Hangul_J_RieulPieub : keysym = 0xede -let _Hangul_J_RieulSios : keysym = 0xedf -let _Hangul_J_RieulTieut : keysym = 0xee0 -let _Hangul_J_RieulPhieuf : keysym = 0xee1 -let _Hangul_J_RieulHieuh : keysym = 0xee2 -let _Hangul_J_Mieum : keysym = 0xee3 -let _Hangul_J_Pieub : keysym = 0xee4 -let _Hangul_J_PieubSios : keysym = 0xee5 -let _Hangul_J_Sios : keysym = 0xee6 -let _Hangul_J_SsangSios : keysym = 0xee7 -let _Hangul_J_Ieung : keysym = 0xee8 -let _Hangul_J_Jieuj : keysym = 0xee9 -let _Hangul_J_Cieuc : keysym = 0xeea -let _Hangul_J_Khieuq : keysym = 0xeeb -let _Hangul_J_Tieut : keysym = 0xeec -let _Hangul_J_Phieuf : keysym = 0xeed -let _Hangul_J_Hieuh : keysym = 0xeee -let _Hangul_RieulYeorinHieuh : keysym = 0xeef -let _Hangul_SunkyeongeumMieum : keysym = 0xef0 -let _Hangul_SunkyeongeumPieub : keysym = 0xef1 -let _Hangul_PanSios : keysym = 0xef2 -let _Hangul_KkogjiDalrinIeung : keysym = 0xef3 -let _Hangul_SunkyeongeumPhieuf : keysym = 0xef4 -let _Hangul_YeorinHieuh : keysym = 0xef5 -let _Hangul_AraeA : keysym = 0xef6 -let _Hangul_AraeAE : keysym = 0xef7 -let _Hangul_J_PanSios : keysym = 0xef8 -let _Hangul_J_KkogjiDalrinIeung : keysym = 0xef9 -let _Hangul_J_YeorinHieuh : keysym = 0xefa -let _Korean_Won : keysym = 0xeff diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gdk_tags.var b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gdk_tags.var deleted file mode 100644 index a443fc039..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gdk_tags.var +++ /dev/null @@ -1,165 +0,0 @@ -(* $Id$ *) - -exception ml_raise_gdk - -type gdkEventType = "GDK_" - [ `NOTHING | `DELETE | `DESTROY | `EXPOSE | `MOTION_NOTIFY | `BUTTON_PRESS - | `TWO_BUTTON_PRESS "GDK_2BUTTON_PRESS" - | `THREE_BUTTON_PRESS "GDK_3BUTTON_PRESS" - | `BUTTON_RELEASE | `KEY_PRESS - | `KEY_RELEASE | `ENTER_NOTIFY | `LEAVE_NOTIFY | `FOCUS_CHANGE - | `CONFIGURE | `MAP | `UNMAP | `PROPERTY_NOTIFY | `SELECTION_CLEAR - | `SELECTION_REQUEST | `SELECTION_NOTIFY | `PROXIMITY_IN - | `PROXIMITY_OUT - | `DRAG_ENTER | `DRAG_LEAVE | `DRAG_MOTION | `DRAG_STATUS - | `DROP_START | `DROP_FINISHED | `CLIENT_EVENT | `VISIBILITY_NOTIFY - | `NO_EXPOSE ] - -type event_mask = "GDK_" - [ `EXPOSURE - | `POINTER_MOTION | `POINTER_MOTION_HINT - | `BUTTON_MOTION | `BUTTON1_MOTION | `BUTTON2_MOTION | `BUTTON3_MOTION - | `BUTTON_PRESS | `BUTTON_RELEASE - | `KEY_PRESS | `KEY_RELEASE - | `ENTER_NOTIFY | `LEAVE_NOTIFY | `FOCUS_CHANGE - | `STRUCTURE | `PROPERTY_CHANGE | `VISIBILITY_NOTIFY - | `PROXIMITY_IN | `PROXIMITY_OUT | `SUBSTRUCTURE - | `ALL_EVENTS ] "_MASK" - -type public extension_events = "GDK_EXTENSION_EVENTS_" - [ `NONE | `ALL | `CURSOR ] - -type gdkVisibilityState = "GDK_VISIBILITY_" - [ `UNOBSCURED | `PARTIAL | `FULLY_OBSCURED ] - -type gdkInputSource = "GDK_SOURCE_" - [ `MOUSE | `PEN | `ERASER | `CURSOR ] - -type gdkCrossingMode = "GDK_CROSSING_" - [ `NORMAL | `GRAB | `UNGRAB ] - -type gdkNotifyType = "GDK_NOTIFY_" - [ `ANCESTOR | `VIRTUAL | `INFERIOR | `NONLINEAR | `NONLINEAR_VIRTUAL - | `UNKNOWN ] - -type gdkFillRule = "GDK_" - [ `EVEN_ODD_RULE | `WINDING_RULE ] - -type gdkOverlapType = "GDK_OVERLAP_RECTANGLE_" - [ `IN | `OUT | `PART ] - -type gdkFunction = "GDK_" - [ `COPY | `INVERT | `XOR ] - -type gdkFill = "GDK_" - [ `SOLID | `TILED | `STIPPLED | `OPAQUE_STIPPLED ] - -type gdkSubwindowMode = "GDK_" - [ `CLIP_BY_CHILDREN | `INCLUDE_INFERIORS ] - -type gdkLineStyle = "GDK_LINE_" - [ `SOLID | `ON_OFF_DASH | `DOUBLE_DASH ] - -type gdkCapStyle = "GDK_CAP_" - [ `NOT_LAST | `BUTT | `ROUND | `PROJECTING ] - -type gdkJoinStyle = "GDK_JOIN_" - [ `MITER | `ROUND | `BEVEL ] - -type gdkModifier = "GDK_" - [ `SHIFT | `LOCK | `CONTROL | `MOD1 | `MOD2 | `MOD3 | `MOD4 | `MOD5 - | `BUTTON1 | `BUTTON2 | `BUTTON3 | `BUTTON4 | `BUTTON5 ] "_MASK" - -type gdkImageType = "GDK_IMAGE_" - [ `NORMAL | `SHARED | `FASTEST ] - -type gdkVisualType = "GDK_VISUAL_" - [ `STATIC_GRAY | `GRAYSCALE | `STATIC_COLOR | `PSEUDO_COLOR - | `TRUE_COLOR | `DIRECT_COLOR ] - -type gdkFontType = "GDK_FONT_" - [ `FONT | `FONTSET ] - -type gdkDragAction = "GDK_ACTION_" - [ `DEFAULT | `COPY | `MOVE | `LINK | `PRIVATE | `ASK ] - -type gdkCursorType = "GDK_" [ - | `NUM_GLYPHS - | `X_CURSOR - | `ARROW - | `BASED_ARROW_DOWN - | `BASED_ARROW_UP - | `BOAT - | `BOGOSITY - | `BOTTOM_LEFT_CORNER - | `BOTTOM_RIGHT_CORNER - | `BOTTOM_SIDE - | `BOTTOM_TEE - | `BOX_SPIRAL - | `CENTER_PTR - | `CIRCLE - | `CLOCK - | `COFFEE_MUG - | `CROSS - | `CROSS_REVERSE - | `CROSSHAIR - | `DIAMOND_CROSS - | `DOT - | `DOTBOX - | `DOUBLE_ARROW - | `DRAFT_LARGE - | `DRAFT_SMALL - | `DRAPED_BOX - | `EXCHANGE - | `FLEUR - | `GOBBLER - | `GUMBY - | `HAND1 - | `HAND2 - | `HEART - | `ICON - | `IRON_CROSS - | `LEFT_PTR - | `LEFT_SIDE - | `LEFT_TEE - | `LEFTBUTTON - | `LL_ANGLE - | `LR_ANGLE - | `MAN - | `MIDDLEBUTTON - | `MOUSE - | `PENCIL - | `PIRATE - | `PLUS - | `QUESTION_ARROW - | `RIGHT_PTR - | `RIGHT_SIDE - | `RIGHT_TEE - | `RIGHTBUTTON - | `RTL_LOGO - | `SAILBOAT - | `SB_DOWN_ARROW - | `SB_H_DOUBLE_ARROW - | `SB_LEFT_ARROW - | `SB_RIGHT_ARROW - | `SB_UP_ARROW - | `SB_V_DOUBLE_ARROW - | `SHUTTLE - | `SIZING - | `SPIDER - | `SPRAYCAN - | `STAR - | `TARGET - | `TCROSS - | `TOP_LEFT_ARROW - | `TOP_LEFT_CORNER - | `TOP_RIGHT_CORNER - | `TOP_SIDE - | `TOP_TEE - | `TREK - | `UL_ANGLE - | `UMBRELLA - | `UR_ANGLE - | `WATCH - | `XTERM - ] diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/glGtk.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/glGtk.ml deleted file mode 100644 index c7020a4fd..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/glGtk.ml +++ /dev/null @@ -1,86 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gtk - -type visual_options = [ - | `USE_GL - | `BUFFER_SIZE of int - | `LEVEL of int - | `RGBA - | `DOUBLEBUFFER - | `STEREO - | `AUX_BUFFERS of int - | `RED_SIZE of int - | `GREEN_SIZE of int - | `BLUE_SIZE of int - | `ALPHA_SIZE of int - | `DEPTH_SIZE of int - | `STENCIL_SIZE of int - | `ACCUM_GREEN_SIZE of int - | `ACCUM_ALPHA_SIZE of int -] - -type gl_area = [`widget|`drawing|`glarea] - -module Raw = struct - external create : - visual_options list -> share:[>`glarea] optobj -> gl_area obj - = "ml_gtk_gl_area_new" - - external swap_buffers : [>`glarea] obj -> unit - = "ml_gtk_gl_area_swapbuffers" - - external make_current : [>`glarea] obj -> bool - = "ml_gtk_gl_area_make_current" -end - -class area_signals obj = -object (connect) - inherit GObj.widget_signals obj - method display ~callback = - (new GObj.event_signals ~after obj)#expose ~callback: - begin fun ev -> - if GdkEvent.Expose.count ev = 0 then - if Raw.make_current obj then callback () - else prerr_endline "GlGtk-WARNING **: could not make current"; - true - end - method reshape ~callback = - (new GObj.event_signals ~after obj)#configure ~callback: - begin fun ev -> - if Raw.make_current obj then begin - callback ~width:(GdkEvent.Configure.width ev) - ~height:(GdkEvent.Configure.height ev) - end - else prerr_endline "GlGtk-WARNING **: could not make current"; - true - end - method realize ~callback = - let connect = new GObj.misc_signals ~after (GtkBase.Widget.coerce obj) in - connect#realize ~callback: - begin fun ev -> - if Raw.make_current obj then callback () - else prerr_endline "GlGtk-WARNING **: could not make current" - end -end - -class area obj = object (self) - inherit GObj.widget (obj : gl_area obj) - method as_area = obj - method event = new GObj.event_ops obj - method connect = new area_signals obj - method set_size = GtkMisc.DrawingArea.size obj - method swap_buffers () = Raw.swap_buffers obj - method make_current () = - if not (Raw.make_current obj) then - raise (Gl.GLerror "make_current") -end - -let area options ?share ?(width=0) ?(height=0) ?packing ?show () = - let share = - match share with Some (x : area) -> Some x#as_area | None -> None in - let w = Raw.create options ~share:(Gpointer.optboxed share) in - if width <> 0 || height <> 0 then GtkMisc.DrawingArea.size w ~width ~height; - GtkBase.Widget.add_events w [`EXPOSURE]; - GObj.pack_return (new area w) ~packing ~show diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/glGtk.mli b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/glGtk.mli deleted file mode 100644 index 599f24a09..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/glGtk.mli +++ /dev/null @@ -1,63 +0,0 @@ -(* $Id$ *) - -open Gtk -open GObj - -type visual_options = [ - `USE_GL - | `BUFFER_SIZE of int - | `LEVEL of int - | `RGBA - | `DOUBLEBUFFER - | `STEREO - | `AUX_BUFFERS of int - | `RED_SIZE of int - | `GREEN_SIZE of int - | `BLUE_SIZE of int - | `ALPHA_SIZE of int - | `DEPTH_SIZE of int - | `STENCIL_SIZE of int - | `ACCUM_GREEN_SIZE of int - | `ACCUM_ALPHA_SIZE of int -] -type gl_area = [`widget|`drawing|`glarea] - -module Raw : - sig - external create : - visual_options list -> share:[>`glarea] optobj -> gl_area obj - = "ml_gtk_gl_area_new" - external swap_buffers : [>`glarea] obj -> unit - = "ml_gtk_gl_area_swapbuffers" - external make_current : [>`glarea] obj -> bool - = "ml_gtk_gl_area_make_current" - end - -class area_signals : 'a obj -> - object - inherit widget_signals - constraint 'a = [>`glarea|`widget] - val obj : 'a obj - method display : callback:(unit -> unit) -> GtkSignal.id - method realize : callback:(unit -> unit) -> GtkSignal.id - method reshape : - callback:(width:int -> height:int -> unit) -> GtkSignal.id - end - -class area : gl_area obj -> - object - inherit widget - val obj : gl_area obj - method event : event_ops - method as_area : gl_area obj - method connect : area_signals - method make_current : unit -> unit - method set_size : width:int -> height:int -> unit - method swap_buffers : unit -> unit - end - -val area : - visual_options list -> - ?share:area -> - ?width:int -> - ?height:int -> ?packing:(widget -> unit) -> ?show:bool -> unit -> area diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/glib.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/glib.ml deleted file mode 100644 index 2fd014099..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/glib.ml +++ /dev/null @@ -1,21 +0,0 @@ -(* $Id$ *) - -type warning_func = string -> unit - -external set_warning_handler : (string -> unit) -> warning_func - = "ml_g_set_warning_handler" - -type print_func = string -> unit - -external set_print_handler : (string -> unit) -> print_func - = "ml_g_set_print_handler" - -module Main = struct - type t - external create : bool -> t = "ml_g_main_new" - external iteration : bool -> bool = "ml_g_main_iteration" - external pending : unit -> bool = "ml_g_main_pending" - external is_running : t -> bool = "ml_g_main_is_running" - external quit : t -> unit = "ml_g_main_quit" - external destroy : t -> unit = "ml_g_main_destroy" -end diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gpointer.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gpointer.ml deleted file mode 100644 index 7d28a1f9d..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gpointer.ml +++ /dev/null @@ -1,41 +0,0 @@ -(* $Id$ *) - -(* marked pointers *) -type 'a optaddr - -let optaddr : 'a option -> 'a optaddr = - function - None -> Obj.magic 0 - | Some x -> Obj.magic x - -(* naked pointers *) -type optstring - -external get_null : unit -> optstring = "ml_get_null" -let raw_null = get_null () - -let optstring : string option -> optstring = - function - None -> raw_null - | Some x -> Obj.magic x - -(* boxed pointers *) -type boxed -let boxed_null : boxed = Obj.magic (0, raw_null) - -type 'a optboxed - -let optboxed : 'a option -> 'a optboxed = - function - None -> Obj.magic boxed_null - | Some obj -> Obj.magic obj - -let may_box ~f obj : 'a optboxed = - match obj with - None -> Obj.magic boxed_null - | Some obj -> Obj.magic (f obj : 'a) - -(* Exceptions *) - -exception Null -let _ = Callback.register_exception "null_pointer" Null diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtk.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtk.ml deleted file mode 100644 index 0c7892e6f..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtk.ml +++ /dev/null @@ -1,158 +0,0 @@ -(* $Id$ *) - -exception Error of string -exception Warning of string -exception Cannot_cast of string * string -type 'a obj -type 'a optobj = 'a obj Gpointer.optboxed -type clampf = float - -module Tags = struct - type arrow_type = [ `UP|`DOWN|`LEFT|`RIGHT ] - type attach_options = [ `EXPAND|`SHRINK|`FILL ] - type direction_type = [ `TAB_FORWARD|`TAB_BACKWARD|`UP|`DOWN|`LEFT|`RIGHT ] - type justification = [ `LEFT|`RIGHT|`CENTER|`FILL ] - type match_type = [ `ALL|`ALL_TAIL|`HEAD|`TAIL|`EXACT|`LAST ] - type metric_type = [ `PIXELS|`INCHES|`CENTIMETERS ] - type orientation = [ `HORIZONTAL|`VERTICAL ] - type corner_type = [ `TOP_LEFT|`BOTTOM_LEFT|`TOP_RIGHT|`BOTTOM_RIGHT ] - type pack_type = [ `START|`END ] - type path_type = [ `WIDGET|`WIDGET_CLASS|`CLASS ] - type policy_type = [ `ALWAYS|`AUTOMATIC|`NEVER ] - type position = [ `LEFT|`RIGHT|`TOP|`BOTTOM ] - type preview_type = [ `COLOR|`GRAYSCALE ] - type relief_style = [ `NORMAL|`HALF|`NONE ] - type resize_mode = [ `PARENT|`QUEUE|`IMMEDIATE ] - type signal_run_type = [ `FIRST|`LAST|`BOTH|`NO_RECURSE|`ACTION|`NO_HOOKS ] - type scroll_type = - [ `NONE|`STEP_FORWARD|`STEP_BACKWARD|`PAGE_BACKWARD|`PAGE_FORWARD|`JUMP ] - type selection_mode = [ `SINGLE|`BROWSE|`MULTIPLE|`EXTENDED ] - type shadow_type = [ `NONE|`IN|`OUT|`ETCHED_IN|`ETCHED_OUT ] - type state_type = [ `NORMAL|`ACTIVE|`PRELIGHT|`SELECTED|`INSENSITIVE ] - type submenu_direction = [ `LEFT|`RIGHT ] - type submenu_placement = [ `TOP_BOTTOM|`LEFT_RIGHT ] - type toolbar_style = [ `ICONS|`TEXT|`BOTH ] - type trough_type = [ `NONE|`START|`END|`JUMP ] - type update_type = [ `CONTINUOUS|`DISCONTINUOUS|`DELAYED ] - type visibility = [ `NONE|`PARTIAL|`FULL ] - type window_position = [ `NONE|`CENTER|`MOUSE|`CENTER_ALWAYS ] - type window_type = [ `TOPLEVEL|`DIALOG|`POPUP ] - type sort_type = [ `ASCENDING|`DESCENDING ] - type fundamental_type = - [ `INVALID|`NONE|`CHAR|`BOOL|`INT|`UINT|`LONG|`ULONG|`FLOAT|`DOUBLE - |`STRING|`ENUM|`FLAGS|`BOXED|`FOREIGN|`CALLBACK|`ARGS|`POINTER - |`SIGNAL|`C_CALLBACK|`OBJECT ] - - type accel_flag = [ `VISIBLE|`SIGNAL_VISIBLE|`LOCKED ] - type button_box_style = [ `DEFAULT_STYLE|`SPREAD|`EDGE|`START|`END ] - type expand_type = [ `X|`Y|`BOTH|`NONE ] - type packer_options = [ `PACK_EXPAND|`FILL_X|`FILL_Y ] - type side_type = [ `TOP|`BOTTOM|`LEFT|`RIGHT ] - type anchor_type = [ `CENTER|`NORTH|`NW|`NE|`SOUTH|`SW|`SE|`WEST|`EAST ] - type update_policy = [ `ALWAYS|`IF_VALID|`SNAP_TO_TICKS ] - type cell_type = [ `EMPTY|`TEXT|`PIXMAP|`PIXTEXT|`WIDGET ] - type button_action = [ `SELECTS|`DRAGS|`EXPANDS ] - type calendar_display_options = - [ `SHOW_HEADING|`SHOW_DAY_NAMES|`NO_MONTH_CHANGE|`SHOW_WEEK_NUMBERS - |`WEEK_START_MONDAY ] - type spin_button_update_policy = [ `ALWAYS|`IF_VALID ] - type spin_type = - [ `STEP_FORWARD|`STEP_BACKWARD|`PAGE_FORWARD|`PAGE_BACKWARD - |`HOME|`END|`USER_DEFINED of float ] - type progress_bar_style = [ `CONTINUOUS|`DISCRETE ] - type progress_bar_orientation = - [ `LEFT_TO_RIGHT|`RIGHT_TO_LEFT|`BOTTOM_TO_TOP|`TOP_TO_BOTTOM ] - type dest_defaults = [ `MOTION|`HIGHLIGHT|`DROP|`ALL ] - type target_flags = [ `SAME_APP|`SAME_WIDGET ] - type font_metric_type = [ `PIXELS|`POINTS ] - type font_type = [ `BITMAP|`SCALABLE|`SCALABLE_BITMAP|`ALL ] - type font_filter_type = [ `BASE|`USER ] -end -open Tags - -type gtk_type -type gtk_class - -type accel_group - -type style -type 'a group = 'a obj option - -type statusbar_message -type statusbar_context - -type color = { red: float; green: float; blue: float; opacity: float } -type rectangle = { x: int; y: int; width: int; height: int } -type target_entry = { target: string; flags: target_flags list; info: int } - -type data = [`data] -type adjustment = [`data|`adjustment] -type tooltips = [`data|`tooltips] -type widget = [`widget] -type container = [`widget|`container] -type alignment = [`widget|`container|`bin|`alignment] -type event_box = [`widget|`container|`bin|`eventbox] -type frame = [`widget|`container|`bin|`frame] -type aspect_frame = [`widget|`container|`bin|`frame|`aspect] -type handle_box = [`widget|`container|`bin|`handlebox] -type invisible = [`widget|`container|`bin|`invisible] -type item = [`widget|`container|`bin|`item] -type list_item = [`widget|`container|`bin|`item|`listitem] -type menu_item = [`widget|`container|`bin|`item|`menuitem] -type check_menu_item = [`widget|`container|`bin|`item|`menuitem|`checkmenuitem] -type radio_menu_item = - [`widget|`container|`bin|`item|`menuitem|`checkmenuitem|`radiomenuitem] -type tree_item = [`widget|`container|`bin|`item|`treeitem] -type viewport = [`widget|`container|`bin|`viewport] -type window = [`widget|`container|`bin|`window] -type color_selection_dialog = [`widget|`container|`window|`colorseldialog] -type dialog = [`widget|`container|`bin|`window|`dialog] -type input_dialog = [`widget|`container|`bin|`window|`dialog|`inputdialog] -type file_selection = [`widget|`container|`bin|`window|`filesel] -type font_selection_dialog = [`widget|`container|`bin|`window|`fontseldialog] -type plug = [`widget|`container|`bin|`window|`plug] -type box = [`widget|`container|`box] -type button_box = [`widget|`container|`box|`bbox] -type gamma_curve = [`widget|`container|`bbox|`gamma] -type color_selection = [`widget|`container|`box|`colorsel] -type combo = [`widget|`container|`box|`combo] -type statusbar = [`widget|`container|`box|`statusbar] -type button = [`widget|`container|`button] -type toggle_button = [`widget|`container|`button|`toggle] -type radio_button = [`widget|`container|`button|`toggle|`radio] -type option_menu = [`widget|`container|`button|`optionmenu] -type clist = [`widget|`container|`clist] -type fixed = [`widget|`container|`fixed] -type layout = [`widget|`container|`layout] -type liste = [`widget|`container|`list] -type menu_shell = [`widget|`container|`menushell] -type menu = [`widget|`container|`menushell|`menu] -type menu_bar = [`widget|`container|`menushell|`menubar] -type notebook = [`widget|`container|`notebook] -type font_selection = [`widget|`container|`notebook|`fontsel] -type packer = [`widget|`container|`packer] -type paned = [`widget|`container|`paned] -type scrolled_window = [`widget|`container|`scrolled] -type socket = [`widget|`container|`socket] -type table = [`widget|`container|`table] -type toolbar = [`widget|`container|`toolbar] -type tree = [`widget|`container|`tree] -type calendar = [`widget|`calendar] -type drawing_area = [`widget|`drawing] -type editable = [`widget|`editable] -type entry = [`widget|`editable|`entry] -type spin_button = [`widget|`editable|`entry|`spinbutton] -type text = [`widget|`editable|`text] -type misc = [`widget|`misc] -type arrow = [`widget|`misc|`arrow] -type image = [`widget|`misc|`image] -type label = [`widget|`misc|`label] -type tips_query = [`widget|`misc|`label|`tipsquery] -type pixmap = [`widget|`misc|`pixmap] -type progress = [`widget|`progress] -type progress_bar = [`widget|`progress|`progressbar] -type range = [`widget|`range] -type scale = [`widget|`range|`scale] -type scrollbar = [`widget|`range|`scrollbar] -type ruler = [`widget|`ruler] -type separator = [`widget|`separator] diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkArgv.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkArgv.ml deleted file mode 100644 index 5e60c8d5e..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkArgv.ml +++ /dev/null @@ -1,106 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gtk - -type data = - | NONE - | CHAR of char - | BOOL of bool - | INT of int - | FLOAT of float - | STRING of string option - | OBJECT of unit obj option - | POINTER of Gpointer.boxed option - -type 'a result = - [ `NONE - | `CHAR of char | `BOOL of bool | `INT of int - | `UINT of int32 | `LONG of nativeint | `ULONG of nativeint - | `FLOAT of float | `DOUBLE of float - | `STRING of string option | `ENUM of int | `FLAGS of int32 - | `BOXED of Gpointer.boxed option - | `POINTER of Gpointer.boxed option - | `OBJECT of 'a obj option ] - -module Arg = struct - type t - external shift : t -> pos:int -> t = "ml_gtk_arg_shift" - external get_type : t -> gtk_type = "ml_gtk_arg_get_type" - external get : t -> data = "ml_gtk_arg_get" - external set_retloc : t -> 'a result -> unit = "ml_gtk_arg_set_retloc" - external get_pointer : t -> Gpointer.boxed = "ml_gtk_arg_get_pointer" - external get_nativeint : t -> nativeint = "ml_gtk_arg_get_nativeint" - - (* Safely get an argument *) - (* - external get_char : t -> char = "ml_gtk_arg_get_char" - external get_bool : t -> bool = "ml_gtk_arg_get_bool" - external get_int : t -> int = "ml_gtk_arg_get_int" - external get_float : t -> float = "ml_gtk_arg_get_float" - external get_string : t -> string option = "ml_gtk_arg_get_string" - external get_object : t -> unit obj option = "ml_gtk_arg_get_object" - *) - (* Safely set a result - Beware: this is not the opposite of get, arguments and results - are two different ways to use GtkArg. *) - (* - external set_char : t -> char -> unit = "ml_gtk_arg_set_char" - external set_bool : t -> bool -> unit = "ml_gtk_arg_set_bool" - external set_int : t -> int -> unit = "ml_gtk_arg_set_int" - external set_nativeint : t -> nativeint -> unit = "ml_gtk_arg_set_nativeint" - external set_float : t -> float -> unit = "ml_gtk_arg_set_float" - external set_string : t -> string -> unit = "ml_gtk_arg_set_string" - external set_pointer : t -> Gpointer.boxed -> unit = "ml_gtk_arg_set_pointer" - external set_object : t -> 'a obj -> unit = "ml_gtk_arg_set_object" - *) -end - -open Arg -type raw_obj -type t = { referent: raw_obj; nargs: int; args: Arg.t } -let nth arg ~pos = - if pos < 0 || pos >= arg.nargs then invalid_arg "GtkArg.Vect.nth"; - shift arg.args ~pos -let result arg = - if arg.nargs < 0 then invalid_arg "GtkArgv.result"; - shift arg.args ~pos:arg.nargs -external wrap_object : raw_obj -> unit obj = "Val_GtkObject" -let referent arg = - if arg.referent == Obj.magic (-1) then invalid_arg "GtkArgv.referent"; - wrap_object arg.referent -let get_result_type arg = get_type (result arg) -let get_type arg ~pos = get_type (nth arg ~pos) -let get arg ~pos = get (nth arg ~pos) -let set_result arg = set_retloc (result arg) - -let get_args arg = - let rec loop args ~pos = - if pos < 0 then args - else loop (get arg ~pos :: args) ~pos:(pos-1) - in loop [] ~pos:(arg.nargs - 1) - -let get_pointer arg ~pos = get_pointer (nth arg ~pos) -let get_nativeint arg ~pos = get_nativeint (nth arg ~pos) - -(* -let get_char arg ~pos = get_char (nth arg ~pos) -let get_bool arg ~pos = get_bool (nth arg ~pos) -let get_int arg ~pos = get_int (nth arg ~pos) -let get_float arg ~pos = get_float (nth arg ~pos) -let get_string arg ~pos = get_string (nth arg ~pos) -let get_object arg ~pos = get_object (nth arg ~pos) -let set_result_char arg = set_char (result arg) -let set_result_bool arg = set_bool (result arg) -let set_result_int arg = set_int (result arg) -let set_result_nativeint arg = set_nativeint (result arg) -let set_result_float arg = set_float (result arg) -let set_result_string arg = set_string (result arg) -let set_result_pointer arg = set_pointer (result arg) -let set_result_object arg = set_object (result arg) -*) - -external string_at_pointer : ?pos:int -> ?len:int -> Gpointer.boxed -> string - = "ml_string_at_pointer" -external int_at_pointer : Gpointer.boxed -> int - = "ml_int_at_pointer" diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkBase.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkBase.ml deleted file mode 100644 index 3b1a00fdf..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkBase.ml +++ /dev/null @@ -1,414 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gtk -open Tags - -module Type = struct - external name : gtk_type -> string = "ml_gtk_type_name" - external from_name : string -> gtk_type = "ml_gtk_type_from_name" - external parent : gtk_type -> gtk_type = "ml_gtk_type_parent" - external get_class : gtk_type -> gtk_class = "ml_gtk_type_class" - external parent_class : gtk_type -> gtk_class = "ml_gtk_type_parent_class" - external is_a : gtk_type -> gtk_type -> bool = "ml_gtk_type_is_a" - external fundamental : gtk_type -> fundamental_type - = "ml_gtk_type_fundamental" -end - -module Object = struct - external get_type : 'a obj -> gtk_type = "ml_gtk_object_type" - let is_a obj name = - Type.is_a (get_type obj) (Type.from_name name) - external destroy : 'a obj -> unit = "ml_gtk_object_destroy" - external coerce : 'a obj -> unit obj = "%identity" - external unsafe_cast : 'a obj -> 'b obj = "%identity" - let try_cast w name = - if is_a w name then unsafe_cast w - else raise (Cannot_cast(Type.name(get_type w), name)) - let get_id (obj : 'a obj) : int = (snd (Obj.magic obj) lor 0) - module Signals = struct - open GtkSignal - let destroy : (_,_) t = - { name = "destroy"; marshaller = marshal_unit } - end -end - -module Widget = struct - let cast w : widget obj = Object.try_cast w "GtkWidget" - external coerce : [>`widget] obj -> widget obj = "%identity" - external unparent : [>`widget] obj -> unit = "ml_gtk_widget_unparent" - external show : [>`widget] obj -> unit = "ml_gtk_widget_show" - external show_now : [>`widget] obj -> unit = "ml_gtk_widget_show_now" - external show_all : [>`widget] obj -> unit = "ml_gtk_widget_show_all" - external hide : [>`widget] obj -> unit = "ml_gtk_widget_hide" - external hide_all : [>`widget] obj -> unit = "ml_gtk_widget_hide_all" - external map : [>`widget] obj -> unit = "ml_gtk_widget_map" - external unmap : [>`widget] obj -> unit = "ml_gtk_widget_unmap" - external realize : [>`widget] obj -> unit = "ml_gtk_widget_realize" - external unrealize : [>`widget] obj -> unit = "ml_gtk_widget_unrealize" - external queue_draw : [>`widget] obj -> unit = "ml_gtk_widget_queue_draw" - external queue_resize : [>`widget] obj -> unit = "ml_gtk_widget_queue_resize" - external draw : [>`widget] obj -> Gdk.Rectangle.t option -> unit - = "ml_gtk_widget_draw" - external draw_focus : [>`widget] obj -> unit - = "ml_gtk_widget_draw_focus" - external draw_default : [>`widget] obj -> unit - = "ml_gtk_widget_draw_default" - external event : [>`widget] obj -> 'a Gdk.event -> bool - = "ml_gtk_widget_event" - external activate : [>`widget] obj -> bool - = "ml_gtk_widget_activate" - external reparent : [>`widget] obj -> [>`widget] obj -> unit - = "ml_gtk_widget_reparent" - external popup : [>`widget] obj -> x:int -> y:int -> unit - = "ml_gtk_widget_popup" - external intersect : - [>`widget] obj -> Gdk.Rectangle.t -> Gdk.Rectangle.t option - = "ml_gtk_widget_intersect" - external set_can_default : [>`widget] obj -> bool -> unit - = "ml_gtk_widget_set_can_default" - external set_can_focus : [>`widget] obj -> bool -> unit - = "ml_gtk_widget_set_can_focus" - external grab_focus : [>`widget] obj -> unit - = "ml_gtk_widget_grab_focus" - external grab_default : [>`widget] obj -> unit - = "ml_gtk_widget_grab_default" - external set_name : [>`widget] obj -> string -> unit - = "ml_gtk_widget_set_name" - external get_name : [>`widget] obj -> string - = "ml_gtk_widget_get_name" - external set_state : [>`widget] obj -> state_type -> unit - = "ml_gtk_widget_set_state" - external set_sensitive : [>`widget] obj -> bool -> unit - = "ml_gtk_widget_set_sensitive" - external set_uposition : [>`widget] obj -> x:int -> y:int -> unit - = "ml_gtk_widget_set_uposition" - external set_usize : [>`widget] obj -> width:int -> height:int -> unit - = "ml_gtk_widget_set_usize" - external add_events : [>`widget] obj -> Gdk.Tags.event_mask list -> unit - = "ml_gtk_widget_add_events" - external set_events : [>`widget] obj -> Gdk.Tags.event_mask list -> unit - = "ml_gtk_widget_set_events" - external set_extension_events : - [>`widget] obj -> Gdk.Tags.extension_events -> unit - = "ml_gtk_widget_set_extension_events" - external get_toplevel : [>`widget] obj -> widget obj - = "ml_gtk_widget_get_toplevel" - external get_ancestor : [>`widget] obj -> gtk_type -> widget obj - = "ml_gtk_widget_get_ancestor" - external get_colormap : [>`widget] obj -> Gdk.colormap - = "ml_gtk_widget_get_colormap" - external get_visual : [>`widget] obj -> Gdk.visual - = "ml_gtk_widget_get_visual" - external get_pointer : [>`widget] obj -> int * int - = "ml_gtk_widget_get_pointer" - external is_ancestor : [>`widget] obj -> [>`widget] obj -> bool - = "ml_gtk_widget_is_ancestor" - external set_style : [>`widget] obj -> style -> unit - = "ml_gtk_widget_set_style" - external set_rc_style : [>`widget] obj -> unit - = "ml_gtk_widget_set_rc_style" - external ensure_style : [>`widget] obj -> unit - = "ml_gtk_widget_ensure_style" - external get_style : [>`widget] obj -> style - = "ml_gtk_widget_get_style" - external restore_default_style : [>`widget] obj -> unit - = "ml_gtk_widget_restore_default_style" - external add_accelerator : - ([>`widget] as 'a) obj -> sgn:('a,unit->unit) GtkSignal.t -> - accel_group -> key:Gdk.keysym -> ?modi:Gdk.Tags.modifier list -> - ?flags:accel_flag list -> unit - = "ml_gtk_widget_add_accelerator_bc" "ml_gtk_widget_add_accelerator" - external remove_accelerator : - [>`widget] obj -> accel_group -> - key:Gdk.keysym -> ?modi:Gdk.Tags.modifier list -> unit - = "ml_gtk_widget_remove_accelerator" - external lock_accelerators : [>`widget] obj -> unit - = "ml_gtk_widget_lock_accelerators" - external unlock_accelerators : [>`widget] obj -> unit - = "ml_gtk_widget_unlock_accelerators" - external accelerators_locked : [>`widget] obj -> bool - = "ml_gtk_widget_accelerators_locked" - external window : [>`widget] obj -> Gdk.window - = "ml_GtkWidget_window" - external visible : [>`widget] obj -> bool - = "ml_GTK_WIDGET_VISIBLE" - external has_focus : [>`widget] obj -> bool - = "ml_GTK_WIDGET_HAS_FOCUS" - external parent : [>`widget] obj -> widget obj - = "ml_gtk_widget_parent" - external set_app_paintable : [>`widget] obj -> bool -> unit - = "ml_gtk_widget_set_app_paintable" - external allocation : [>`widget] obj -> rectangle - = "ml_gtk_widget_allocation" - external set_colormap : [>`widget] obj -> Gdk.colormap -> unit - = "ml_gtk_widget_set_colormap" - external set_visual : [>`widget] obj -> Gdk.visual -> unit - = "ml_gtk_widget_set_visual" - external set_default_colormap : Gdk.colormap -> unit - = "ml_gtk_widget_set_default_colormap" - external set_default_visual : Gdk.visual -> unit - = "ml_gtk_widget_set_default_visual" - external get_default_colormap : unit -> Gdk.colormap - = "ml_gtk_widget_get_default_colormap" - external get_default_visual : unit -> Gdk.visual - = "ml_gtk_widget_get_default_visual" - external push_colormap : Gdk.colormap -> unit - = "ml_gtk_widget_push_colormap" - external push_visual : Gdk.visual -> unit - = "ml_gtk_widget_push_visual" - external pop_colormap : unit -> unit - = "ml_gtk_widget_pop_colormap" - external pop_visual : unit -> unit - = "ml_gtk_widget_pop_visual" - module Signals = struct - open GtkArgv - open GtkSignal - let marshal f _ = function - | OBJECT(Some p) :: _ -> f (cast p) - | _ -> invalid_arg "GtkBase.Widget.Signals.marshal" - let marshal_opt f _ = function - | OBJECT(Some obj) :: _ -> f (Some (cast obj)) - | OBJECT None :: _ -> f None - | _ -> invalid_arg "GtkBase.Widget.Signals.marshal_opt" - let marshal_style f _ = function - | POINTER p :: _ -> f (Obj.magic p : Gtk.style option) - | _ -> invalid_arg "GtkBase.Widget.Signals.marshal_opt" - let marshal_drag1 f _ = function - | POINTER(Some p) :: _ -> f (Obj.magic p : Gdk.drag_context) - | _ -> invalid_arg "GtkBase.Widget.Signals.marshal_drag1" - let marshal_drag2 f _ = function - | POINTER(Some p) :: INT time :: _ -> - f (Obj.magic p : Gdk.drag_context) ~time - | _ -> invalid_arg "GtkBase.Widget.Signals.marshal_drag2" - let marshal_drag3 f argv = function - | POINTER(Some p) :: INT x :: INT y :: INT time :: _ -> - let res = f (Obj.magic p : Gdk.drag_context) ~x ~y ~time - in GtkArgv.set_result argv (`BOOL res) - | _ -> invalid_arg "GtkBase.Widget.Signals.marshal_drag3" - let show : ([>`widget],_) t = - { name = "show"; marshaller = marshal_unit } - let hide : ([>`widget],_) t = - { name = "hide"; marshaller = marshal_unit } - let map : ([>`widget],_) t = - { name = "map"; marshaller = marshal_unit } - let unmap : ([>`widget],_) t = - { name = "unmap"; marshaller = marshal_unit } - let realize : ([>`widget],_) t = - { name = "realize"; marshaller = marshal_unit } - let draw : ([>`widget],_) t = - let marshal f _ = function - | POINTER(Some p) :: _ -> f (Obj.magic p : Gdk.Rectangle.t) - | _ -> invalid_arg "GtkBase.Widget.Signals.marshal_draw" - in { name = "draw"; marshaller = marshal } - let draw_focus : ([>`widget],_) t = - { name = "draw_focus"; marshaller = marshal_unit } - let draw_default : ([>`widget],_) t = - { name = "draw_default"; marshaller = marshal_unit } - external val_state : int -> state_type = "ml_Val_state_type" - let state_changed : ([>`widget],_) t = - let marshal f = marshal_int (fun x -> f (val_state x)) in - { name = "state_changed"; marshaller = marshal } - let parent_set : ([>`widget],_) t = - { name = "parent_set"; marshaller = marshal_opt } - let style_set : ([>`widget],_) t = - { name = "style_set"; marshaller = marshal_style } - let drag_begin : ([>`widget],_) t = - { name = "drag_begin"; marshaller = marshal_drag1 } - let drag_end : ([>`widget],_) t = - { name = "drag_end"; marshaller = marshal_drag1 } - let drag_data_delete : ([>`widget],_) t = - { name = "drag_data_delete"; marshaller = marshal_drag1 } - let drag_leave : ([>`widget],_) t = - { name = "drag_leave"; marshaller = marshal_drag2 } - let drag_motion : ([>`widget],_) t = - { name = "drag_motion"; marshaller = marshal_drag3 } - let drag_drop : ([>`widget],_) t = - { name = "drag_drop"; marshaller = marshal_drag3 } - let drag_data_get : ([>`widget],_) t = - let marshal f argv = function - | POINTER(Some p) :: POINTER(Some q) :: INT info :: INT time :: _ -> - f (Obj.magic p : Gdk.drag_context) - (Obj.magic q : GtkData.Selection.t) - ~info - ~time - | _ -> invalid_arg "GtkBase.Widget.Signals.marshal_drag_data_get" - in - { name = "drag_data_get"; marshaller = marshal } - let drag_data_received : ([>`widget],_) t = - let marshal f _ = function - | POINTER(Some p) :: INT x :: INT y :: POINTER(Some q) :: - INT info :: INT time :: _ -> - f (Obj.magic p : Gdk.drag_context) ~x ~y - (Obj.magic q : GtkData.Selection.t) - ~info ~time - | _ -> invalid_arg "GtkBase.Widget.Signals.marshal_drag_data_received" - in - { name = "drag_data_received"; marshaller = marshal } - - module Event = struct - let marshal f argv = function - | [POINTER(Some p)] -> - let ev = GdkEvent.unsafe_copy p in - GtkArgv.set_result argv (`BOOL(f ev)) - | _ -> invalid_arg "GtkBase.Widget.Event.marshal" - let any : ([>`widget], Gdk.Tags.event_type Gdk.event -> bool) t = - { name = "event"; marshaller = marshal } - let button_press : ([>`widget], GdkEvent.Button.t -> bool) t = - { name = "button_press_event"; marshaller = marshal } - let button_release : ([>`widget], GdkEvent.Button.t -> bool) t = - { name = "button_release_event"; marshaller = marshal } - let motion_notify : ([>`widget], GdkEvent.Motion.t -> bool) t = - { name = "motion_notify_event"; marshaller = marshal } - let delete : ([>`widget], [`DELETE] Gdk.event -> bool) t = - { name = "delete_event"; marshaller = marshal } - let destroy : ([>`widget], [`DESTROY] Gdk.event -> bool) t = - { name = "destroy_event"; marshaller = marshal } - let expose : ([>`widget], GdkEvent.Expose.t -> bool) t = - { name = "expose_event"; marshaller = marshal } - let key_press : ([>`widget], GdkEvent.Key.t -> bool) t = - { name = "key_press_event"; marshaller = marshal } - let key_release : ([>`widget], GdkEvent.Key.t -> bool) t = - { name = "key_release_event"; marshaller = marshal } - let enter_notify : ([>`widget], GdkEvent.Crossing.t -> bool) t = - { name = "enter_notify_event"; marshaller = marshal } - let leave_notify : ([>`widget], GdkEvent.Crossing.t -> bool) t = - { name = "leave_notify_event"; marshaller = marshal } - let configure : ([>`widget], GdkEvent.Configure.t -> bool) t = - { name = "configure_event"; marshaller = marshal } - let focus_in : ([>`widget], GdkEvent.Focus.t -> bool) t = - { name = "focus_in_event"; marshaller = marshal } - let focus_out : ([>`widget], GdkEvent.Focus.t -> bool) t = - { name = "focus_out_event"; marshaller = marshal } - let map : ([>`widget], [`MAP] Gdk.event -> bool) t = - { name = "map_event"; marshaller = marshal } - let unmap : ([>`widget], [`UNMAP] Gdk.event -> bool) t = - { name = "unmap_event"; marshaller = marshal } - let property_notify : ([>`widget], GdkEvent.Property.t -> bool) t = - { name = "property_notify_event"; marshaller = marshal } - let selection_clear : ([>`widget], GdkEvent.Selection.t -> bool) t = - { name = "selection_clear_event"; marshaller = marshal } - let selection_request : ([>`widget], GdkEvent.Selection.t -> bool) t = - { name = "selection_request_event"; marshaller = marshal } - let selection_notify : ([>`widget], GdkEvent.Selection.t -> bool) t = - { name = "selection_notify_event"; marshaller = marshal } - let proximity_in : ([>`widget], GdkEvent.Proximity.t -> bool) t = - { name = "proximity_in_event"; marshaller = marshal } - let proximity_out : ([>`widget], GdkEvent.Proximity.t -> bool) t = - { name = "proximity_out_event"; marshaller = marshal } - end - end -end - -module Container = struct - let cast w : container obj = Object.try_cast w "GtkContainer" - external coerce : [>`container] obj -> container obj = "%identity" - external set_border_width : [>`container] obj -> int -> unit - = "ml_gtk_container_set_border_width" - external set_resize_mode : [>`container] obj -> resize_mode -> unit - = "ml_gtk_container_set_resize_mode" - external add : [>`container] obj -> [>`widget] obj -> unit - = "ml_gtk_container_add" - external remove : [>`container] obj -> [>`widget] obj -> unit - = "ml_gtk_container_remove" - let set ?border_width ?(width = -2) ?(height = -2) w = - may border_width ~f:(set_border_width w); - if width <> -2 || height <> -2 then - Widget.set_usize w ?width ?height - external foreach : [>`container] obj -> f:(widget obj-> unit) -> unit - = "ml_gtk_container_foreach" - let children w = - let l = ref [] in - foreach w ~f:(fun c -> l := c :: !l); - List.rev !l - external focus : [>`container] obj -> direction_type -> bool - = "ml_gtk_container_focus" - (* Called by Widget.grab_focus *) - external set_focus_child : [>`container] obj -> [>`widget] optobj -> unit - = "ml_gtk_container_set_focus_child" - external set_focus_vadjustment : - [>`container] obj -> [>`adjustment] optobj -> unit - = "ml_gtk_container_set_focus_vadjustment" - external set_focus_hadjustment : - [>`container] obj -> [>`adjustment] optobj -> unit - = "ml_gtk_container_set_focus_hadjustment" - module Signals = struct - open GtkSignal - let add : ([>`container],_) t = - { name = "add"; marshaller = Widget.Signals.marshal } - let remove : ([>`container],_) t = - { name = "remove"; marshaller = Widget.Signals.marshal } - let need_resize : ([>`container],_) t = - let marshal f argv _ = GtkArgv.set_result argv (`BOOL(f ())) in - { name = "need_resize"; marshaller = marshal } - external val_direction : int -> direction_type = "ml_Val_direction_type" - let focus : ([>`container],_) t = - let marshal f argv = function - | GtkArgv.INT dir :: _ -> - GtkArgv.set_result argv (`BOOL(f (val_direction dir))) - | _ -> invalid_arg "GtkBase.Container.Signals.marshal_focus" - in { name = "focus"; marshaller = marshal } - end -end - -module Item = struct - let cast w : item obj = Object.try_cast w "GtkItem" - external coerce : [>`item] obj -> item obj = "%identity" - external select : [>`item] obj -> unit = "ml_gtk_item_select" - external deselect : [>`item] obj -> unit = "ml_gtk_item_deselect" - external toggle : [>`item] obj -> unit = "ml_gtk_item_toggle" - module Signals = struct - open GtkSignal - let select : ([>`item],_) t = - { name = "select"; marshaller = marshal_unit } - let deselect : ([>`item],_) t = - { name = "deselect"; marshaller = marshal_unit } - let toggle : ([>`item],_) t = - { name = "toggle"; marshaller = marshal_unit } - end -end - - -module DnD = struct - external dest_set : - [>`widget] obj -> flags:dest_defaults list -> - targets:target_entry array -> actions:Gdk.Tags.drag_action list -> unit - = "ml_gtk_drag_dest_set" - external dest_unset : [>`widget] obj -> unit - = "ml_gtk_drag_dest_unset" - external finish : - Gdk.drag_context -> success:bool -> del:bool -> time:int -> unit - = "ml_gtk_drag_finish" - external get_data : - [>`widget] obj -> Gdk.drag_context -> target:Gdk.atom -> time:int -> unit - = "ml_gtk_drag_get_data" - external get_source_widget : Gdk.drag_context -> widget obj - = "ml_gtk_drag_get_source_widget" - external highlight : [>`widget] obj -> unit = "ml_gtk_drag_highlight" - external unhighlight : [>`widget] obj -> unit = "ml_gtk_drag_unhighlight" - external set_icon_widget : - Gdk.drag_context -> [>`widget] obj -> hot_x:int -> hot_y:int -> unit - = "ml_gtk_drag_set_icon_widget" - external set_icon_pixmap : - Gdk.drag_context -> colormap:Gdk.colormap -> - Gdk.pixmap -> ?mask:Gdk.bitmap -> hot_x:int -> hot_y:int -> unit - = "ml_gtk_drag_set_icon_pixmap_bc" "ml_gtk_drag_set_icon_pixmap" - external set_icon_default : Gdk.drag_context -> unit - = "ml_gtk_drag_set_icon_default" - external set_default_icon : - colormap:Gdk.colormap -> Gdk.pixmap -> - ?mask:Gdk.bitmap -> hot_x:int -> hot_y:int -> unit - = "ml_gtk_drag_set_default_icon" - external source_set : - [>`widget] obj -> ?modi:Gdk.Tags.modifier list -> - targets:target_entry array -> actions:Gdk.Tags.drag_action list -> unit - = "ml_gtk_drag_source_set" - external source_set_icon : - [>`widget] obj -> colormap:Gdk.colormap -> - Gdk.pixmap -> ?mask:Gdk.bitmap -> unit - = "ml_gtk_drag_source_set_icon" - external source_unset : [>`widget] obj -> unit - = "ml_gtk_drag_source_unset" -(* external dest_handle_event : [>`widget] -> *) -end - diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkBin.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkBin.ml deleted file mode 100644 index ab4cc7e85..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkBin.ml +++ /dev/null @@ -1,170 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gtk -open Tags -open GtkBase - -module Alignment = struct - let cast w : alignment obj = Object.try_cast w "GtkAlignment" - external create : - x:clampf -> y:clampf -> xscale:clampf -> yscale:clampf -> alignment obj - = "ml_gtk_alignment_new" - let create ?(x=0.5) ?(y=0.5) ?(xscale=1.) ?(yscale=1.) () = - create ~x ~y ~xscale ~yscale - external set : - ?x:clampf -> ?y:clampf -> ?xscale:clampf -> ?yscale:clampf -> - [>`alignment] obj -> unit - = "ml_gtk_alignment_set" -end - -module EventBox = struct - let cast w : event_box obj = Object.try_cast w "GtkEventBox" - external create : unit -> event_box obj = "ml_gtk_event_box_new" -end - -module Frame = struct - let cast w : frame obj = Object.try_cast w "GtkFrame" - external coerce : [>`frame] obj -> frame obj = "%identity" - external create : string -> frame obj = "ml_gtk_frame_new" - external set_label : [>`frame] obj -> string -> unit - = "ml_gtk_frame_set_label" - external set_label_align : [>`frame] obj -> x:clampf -> y:clampf -> unit - = "ml_gtk_frame_set_label_align" - external set_shadow_type : [>`frame] obj -> shadow_type -> unit - = "ml_gtk_frame_set_shadow_type" - external get_label_xalign : [>`frame] obj -> float - = "ml_gtk_frame_get_label_xalign" - external get_label_yalign : [>`frame] obj -> float - = "ml_gtk_frame_get_label_yalign" - let set_label_align' ?x ?y w = - set_label_align w - ~x:(may_default get_label_xalign w ~opt:x) - ~y:(may_default get_label_yalign w ~opt:y) - let set ?label ?label_xalign ?label_yalign ?shadow_type w = - may label ~f:(set_label w); - if label_xalign <> None || label_yalign <> None then - set_label_align' w ?x:label_xalign ?y:label_yalign; - may shadow_type ~f:(set_shadow_type w) -end - -module AspectFrame = struct - let cast w : aspect_frame obj = Object.try_cast w "GtkAspectFrame" - external create : - label:string -> xalign:clampf -> - yalign:clampf -> ratio:float -> obey_child:bool -> aspect_frame obj - = "ml_gtk_aspect_frame_new" - let create ?(label="") ?(xalign=0.5) ?(yalign=0.5) - ?(ratio=1.0) ?(obey_child=true) () = - create ~label ~xalign ~yalign ~ratio ~obey_child - external set : - [>`aspect] obj -> - xalign:clampf -> yalign:clampf -> ratio:float -> obey_child:bool -> unit - = "ml_gtk_aspect_frame_set" - external get_xalign : [>`aspect] obj -> clampf - = "ml_gtk_aspect_frame_get_xalign" - external get_yalign : [>`aspect] obj -> clampf - = "ml_gtk_aspect_frame_get_yalign" - external get_ratio : [>`aspect] obj -> clampf - = "ml_gtk_aspect_frame_get_ratio" - external get_obey_child : [>`aspect] obj -> bool - = "ml_gtk_aspect_frame_get_obey_child" - let set ?xalign ?yalign ?ratio ?obey_child w = - if xalign <> None || yalign <> None || ratio <> None || obey_child <> None - then set w - ~xalign:(may_default get_xalign w ~opt:xalign) - ~yalign:(may_default get_yalign w ~opt:yalign) - ~ratio:(may_default get_ratio w ~opt:ratio) - ~obey_child:(may_default get_obey_child w ~opt:obey_child) -end - -module HandleBox = struct - let cast w : handle_box obj = Object.try_cast w "GtkHandleBox" - external create : unit -> handle_box obj = "ml_gtk_handle_box_new" - external set_shadow_type : [>`handlebox] obj -> shadow_type -> unit = - "ml_gtk_handle_box_set_shadow_type" - external set_handle_position : [>`handlebox] obj -> position -> unit = - "ml_gtk_handle_box_set_handle_position" - external set_snap_edge : [>`handlebox] obj -> position -> unit = - "ml_gtk_handle_box_set_snap_edge" - module Signals = struct - open GtkSignal - let child_attached : ([>`handlebox],_) t = - { name = "child_attached"; marshaller = Widget.Signals.marshal } - let child_detached : ([>`handlebox],_) t = - { name = "child_detached"; marshaller = Widget.Signals.marshal } - end -end - -module Viewport = struct - let cast w : viewport obj = Object.try_cast w "GtkViewport" - external create : - [>`adjustment] optobj -> [>`adjustment] optobj -> viewport obj - = "ml_gtk_viewport_new" - let create ?hadjustment ?vadjustment () = - create (Gpointer.optboxed hadjustment) (Gpointer.optboxed vadjustment) - external get_hadjustment : [>`viewport] obj -> adjustment obj - = "ml_gtk_viewport_get_hadjustment" - external get_vadjustment : [>`viewport] obj -> adjustment obj - = "ml_gtk_viewport_get_vadjustment" - external set_hadjustment : [>`viewport] obj -> [>`adjustment] obj -> unit - = "ml_gtk_viewport_set_hadjustment" - external set_vadjustment : [>`viewport] obj -> [>`adjustment] obj -> unit - = "ml_gtk_viewport_set_vadjustment" - external set_shadow_type : [>`viewport] obj -> shadow_type -> unit - = "ml_gtk_viewport_set_shadow_type" - let set ?hadjustment ?vadjustment ?shadow_type w = - may hadjustment ~f:(set_hadjustment w); - may vadjustment ~f:(set_vadjustment w); - may shadow_type ~f:(set_shadow_type w) -end - -module ScrolledWindow = struct - let cast w : scrolled_window obj = Object.try_cast w "GtkScrolledWindow" - external create : - [>`adjustment] optobj -> [>`adjustment] optobj -> scrolled_window obj - = "ml_gtk_scrolled_window_new" - let create ?hadjustment ?vadjustment () = - create (Gpointer.optboxed hadjustment) (Gpointer.optboxed vadjustment) - external set_hadjustment : [>`scrolled] obj -> [>`adjustment] obj -> unit - = "ml_gtk_scrolled_window_set_hadjustment" - external set_vadjustment : [>`scrolled] obj -> [>`adjustment] obj -> unit - = "ml_gtk_scrolled_window_set_vadjustment" - external get_hadjustment : [>`scrolled] obj -> adjustment obj - = "ml_gtk_scrolled_window_get_hadjustment" - external get_vadjustment : [>`scrolled] obj -> adjustment obj - = "ml_gtk_scrolled_window_get_vadjustment" - external set_policy : [>`scrolled] obj -> policy_type -> policy_type -> unit - = "ml_gtk_scrolled_window_set_policy" - external add_with_viewport : [>`scrolled] obj -> [>`widget] obj -> unit - = "ml_gtk_scrolled_window_add_with_viewport" - external get_hscrollbar_policy : [>`scrolled] obj -> policy_type - = "ml_gtk_scrolled_window_get_hscrollbar_policy" - external get_vscrollbar_policy : [>`scrolled] obj -> policy_type - = "ml_gtk_scrolled_window_get_vscrollbar_policy" - external set_placement : [>`scrolled] obj -> corner_type -> unit - = "ml_gtk_scrolled_window_set_placement" - let set_policy' ?hpolicy ?vpolicy w = - set_policy w - (may_default get_hscrollbar_policy w ~opt:hpolicy) - (may_default get_vscrollbar_policy w ~opt:vpolicy) - let set ?hpolicy ?vpolicy ?placement w = - if hpolicy <> None || vpolicy <> None then - set_policy' w ?hpolicy ?vpolicy; - may placement ~f:(set_placement w) -end - -module Socket = struct - let cast w : socket obj = Object.try_cast w "GtkSocket" - external coerce : [>`socket] obj -> socket obj = "%identity" - external create : unit -> socket obj = "ml_gtk_socket_new" - external steal : [>`socket] obj -> Gdk.xid -> unit = "ml_gtk_socket_steal" -end - -(* -module Invisible = struct - let cast w : socket obj = Object.try_cast w "GtkInvisible" - external coerce : [>`invisible] obj -> invisible obj = "%identity" - external create : unit -> invisible obj = "ml_gtk_invisible_new" -end -*) diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkButton.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkButton.ml deleted file mode 100644 index 6d9ddf500..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkButton.ml +++ /dev/null @@ -1,148 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gtk -open Tags -open GtkBase - -module Button = struct - let cast w : button obj = Object.try_cast w "GtkButton" - external coerce : [>`button] obj -> button obj = "%identity" - external create : unit -> button obj = "ml_gtk_button_new" - external create_with_label : string -> button obj - = "ml_gtk_button_new_with_label" - let create ?label () = - match label with None -> create () - | Some x -> create_with_label x - external pressed : [>`button] obj -> unit = "ml_gtk_button_pressed" - external released : [>`button] obj -> unit = "ml_gtk_button_released" - external clicked : [>`button] obj -> unit = "ml_gtk_button_clicked" - external enter : [>`button] obj -> unit = "ml_gtk_button_enter" - external leave : [>`button] obj -> unit = "ml_gtk_button_leave" - module Signals = struct - open GtkSignal - let pressed : ([>`button],_) t = - { name = "pressed"; marshaller = marshal_unit } - let released : ([>`button],_) t = - { name = "released"; marshaller = marshal_unit } - let clicked : ([>`button],_) t = - { name = "clicked"; marshaller = marshal_unit } - let enter : ([>`button],_) t = - { name = "enter"; marshaller = marshal_unit } - let leave : ([>`button],_) t = - { name = "leave"; marshaller = marshal_unit } - end -end - -module ToggleButton = struct - let cast w : toggle_button obj = Object.try_cast w "GtkToggleButton" - external coerce : [>`toggle] obj -> toggle_button obj = "%identity" - external toggle_button_create : unit -> toggle_button obj - = "ml_gtk_toggle_button_new" - external toggle_button_create_with_label : string -> toggle_button obj - = "ml_gtk_toggle_button_new_with_label" - external check_button_create : unit -> toggle_button obj - = "ml_gtk_check_button_new" - external check_button_create_with_label : string -> toggle_button obj - = "ml_gtk_check_button_new_with_label" - let create_toggle ?label () = - match label with None -> toggle_button_create () - | Some label -> toggle_button_create_with_label label - let create_check ?label () = - match label with None -> check_button_create () - | Some label -> check_button_create_with_label label - external set_mode : [>`toggle] obj -> bool -> unit - = "ml_gtk_toggle_button_set_mode" - external set_active : [>`toggle] obj -> bool -> unit - = "ml_gtk_toggle_button_set_active" - let set ?active ?draw_indicator w = - may ~f:(set_mode w) draw_indicator; - may ~f:(set_active w) active - external get_active : [>`toggle] obj -> bool - = "ml_gtk_toggle_button_get_active" - external toggled : [>`toggle] obj -> unit - = "ml_gtk_toggle_button_toggled" - module Signals = struct - open GtkSignal - let toggled : ([>`toggle],_) t = - { name = "toggled"; marshaller = marshal_unit } - end -end - -module RadioButton = struct - let cast w : radio_button obj = Object.try_cast w "GtkRadioButton" - external create : radio_button group -> radio_button obj - = "ml_gtk_radio_button_new" - external create_with_label : radio_button group -> string -> radio_button obj - = "ml_gtk_radio_button_new_with_label" - external set_group : [>`radio] obj -> radio_button group -> unit - = "ml_gtk_radio_button_set_group" - let create ?(group = None) ?label () = - match label with None -> create group - | Some label -> create_with_label group label -end - -module Toolbar = struct - let cast w : toolbar obj = Object.try_cast w "GtkToolbar" - external create : orientation -> style:toolbar_style -> toolbar obj - = "ml_gtk_toolbar_new" - let create dir ?(style=`BOTH) () = create dir ~style - external insert_space : [>`toolbar] obj -> pos:int -> unit - = "ml_gtk_toolbar_insert_space" - let insert_space w ?(pos = -1) () = insert_space w ~pos - external insert_button : - [>`toolbar] obj -> kind:[`BUTTON|`TOGGLEBUTTON|`RADIOBUTTON] -> - text:string -> tooltip:string -> - tooltip_private:string -> - icon:[>`widget] optobj -> pos:int -> button obj - = "ml_gtk_toolbar_insert_element_bc" "ml_gtk_toolbar_insert_element" - let insert_button w ?(kind=`BUTTON) ?(text="") ?(tooltip="") - ?(tooltip_private="") ?icon ?(pos = -1) ?callback () = - let b =insert_button w ~kind ~text ~tooltip ~tooltip_private ~pos - ~icon:(Gpointer.optboxed icon) - in - match callback with - | None -> b - | Some c -> GtkSignal.connect b ~sgn:Button.Signals.clicked - ~callback: c; b - external insert_widget : - [>`toolbar] obj -> [>`widget] obj -> - tooltip:string -> tooltip_private:string -> pos:int -> unit - = "ml_gtk_toolbar_insert_widget" - let insert_widget w ?(tooltip="") ?(tooltip_private="") ?(pos = -1) w' = - insert_widget w w' ~tooltip ~tooltip_private ~pos - external set_orientation : [>`toolbar] obj -> orientation -> unit = - "ml_gtk_toolbar_set_orientation" - external set_style : [>`toolbar] obj -> toolbar_style -> unit = - "ml_gtk_toolbar_set_style" - external set_space_size : [>`toolbar] obj -> int -> unit = - "ml_gtk_toolbar_set_space_size" - external set_space_style : [>`toolbar] obj -> [ `EMPTY|`LINE ] -> unit = - "ml_gtk_toolbar_set_space_style" - external set_tooltips : [>`toolbar] obj -> bool -> unit = - "ml_gtk_toolbar_set_tooltips" - external set_button_relief : [>`toolbar] obj -> relief_style -> unit = - "ml_gtk_toolbar_set_button_relief" - external get_button_relief : [>`toolbar] obj -> relief_style = - "ml_gtk_toolbar_get_button_relief" - let set ?orientation ?style ?space_size - ?space_style ?tooltips ?button_relief w = - may orientation ~f:(set_orientation w); - may style ~f:(set_style w); - may space_size ~f:(set_space_size w); - may space_style ~f:(set_space_style w); - may tooltips ~f:(set_tooltips w); - may button_relief ~f:(set_button_relief w) - module Signals = struct - open GtkSignal - external val_orientation : int -> orientation = "ml_Val_orientation" - external val_toolbar_style : int -> toolbar_style - = "ml_Val_toolbar_style" - let orientation_changed : ([>`toolbar],_) t = - let marshal f = marshal_int (fun x -> f (val_orientation x)) in - { name = "orientation_changed"; marshaller = marshal } - let style_changed : ([>`toolbar],_) t = - let marshal f = marshal_int (fun x -> f (val_toolbar_style x)) in - { name = "style_changed"; marshaller = marshal } - end -end diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkData.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkData.ml deleted file mode 100644 index 5b7f90ec0..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkData.ml +++ /dev/null @@ -1,148 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gtk -open Tags - -module AccelGroup = struct - external create : unit -> accel_group = "ml_gtk_accel_group_new" - external activate : - accel_group -> key:Gdk.keysym -> ?modi:Gdk.Tags.modifier list -> bool - = "ml_gtk_accel_group_activate" - external groups_activate : - 'a obj -> key:Gdk.keysym -> ?modi:Gdk.Tags.modifier list -> bool - = "ml_gtk_accel_groups_activate" - external attach : accel_group -> 'a obj -> unit - = "ml_gtk_accel_group_attach" - external detach : accel_group -> 'a obj -> unit - = "ml_gtk_accel_group_detach" - external lock : accel_group -> unit - = "ml_gtk_accel_group_lock" - external unlock : accel_group -> unit - = "ml_gtk_accel_group_unlock" - external lock_entry : - accel_group -> key:Gdk.keysym -> ?modi:Gdk.Tags.modifier list -> bool - = "ml_gtk_accel_group_lock_entry" - external add : - accel_group -> key:Gdk.keysym -> ?modi:Gdk.Tags.modifier list -> - ?flags:accel_flag list -> - call:'a obj -> sgn:('a,unit->unit) GtkSignal.t -> unit - = "ml_gtk_accel_group_add_bc" "ml_gtk_accel_group_add" - external remove : - accel_group -> - key:Gdk.keysym -> ?modi:Gdk.Tags.modifier list -> call:'a obj -> unit - = "ml_gtk_accel_group_remove" - external valid : key:Gdk.keysym -> ?modi:Gdk.Tags.modifier list -> bool - = "ml_gtk_accelerator_valid" - external set_default_mod_mask : Gdk.Tags.modifier list option -> unit - = "ml_gtk_accelerator_set_default_mod_mask" -end - -module Style = struct - external create : unit -> style = "ml_gtk_style_new" - external copy : style -> style = "ml_gtk_style_copy" - external attach : style -> Gdk.window -> style = "ml_gtk_style_attach" - external detach : style -> unit = "ml_gtk_style_detach" - external set_background : style -> Gdk.window -> state_type -> unit - = "ml_gtk_style_set_background" - external draw_hline : - style -> Gdk.window -> state_type -> x:int -> x:int -> y:int -> unit - = "ml_gtk_draw_hline_bc" "ml_gtk_draw_hline" - external draw_vline : - style -> Gdk.window -> state_type -> y:int -> y:int -> x:int -> unit - = "ml_gtk_draw_vline_bc" "ml_gtk_draw_vline" - external get_bg : style -> state:state_type -> Gdk.Color.t - = "ml_gtk_style_get_bg" - external set_bg : style -> state:state_type -> color:Gdk.Color.t -> unit - = "ml_gtk_style_set_bg" - external get_dark_gc : style -> state:state_type -> Gdk.gc - = "ml_gtk_style_get_dark_gc" - external get_light_gc : style -> state:state_type -> Gdk.gc - = "ml_gtk_style_get_light_gc" - external get_colormap : style -> Gdk.colormap = "ml_gtk_style_get_colormap" - external get_font : style -> Gdk.font = "ml_gtk_style_get_font" - external set_font : style -> Gdk.font -> unit = "ml_gtk_style_set_font" -(* - let set st ?:background ?:font = - let may_set f = may fun:(f st) in - may_set set_background background; - may_set set_font font -*) -end - -module Data = struct - module Signals = struct - open GtkSignal - let disconnect : ([>`data],_) t = - { name = "disconnect"; marshaller = marshal_unit } - end -end - -module Adjustment = struct - external create : - value:float -> lower:float -> upper:float -> - step_incr:float -> page_incr:float -> page_size:float -> adjustment obj - = "ml_gtk_adjustment_new_bc" "ml_gtk_adjustment_new" - external set_value : [>`adjustment] obj -> float -> unit - = "ml_gtk_adjustment_set_value" - external clamp_page : - [>`adjustment] obj -> lower:float -> upper:float -> unit - = "ml_gtk_adjustment_clamp_page" - external get_lower : [>`adjustment] obj -> float - = "ml_gtk_adjustment_get_lower" - external get_upper : [>`adjustment] obj -> float - = "ml_gtk_adjustment_get_upper" - external get_value : [>`adjustment] obj -> float - = "ml_gtk_adjustment_get_value" - external get_step_increment : [>`adjustment] obj -> float - = "ml_gtk_adjustment_get_step_increment" - external get_page_increment : [>`adjustment] obj -> float - = "ml_gtk_adjustment_get_page_increment" - external get_page_size : [>`adjustment] obj -> float - = "ml_gtk_adjustment_get_page_size" - module Signals = struct - open GtkSignal - let changed : ([>`adjustment],_) t = - { name = "changed"; marshaller = marshal_unit } - let value_changed : ([>`adjustment],_) t = - { name = "value_changed"; marshaller = marshal_unit } - end -end - -module Tooltips = struct - external create : unit -> tooltips obj = "ml_gtk_tooltips_new" - external enable : [>`tooltips] obj -> unit = "ml_gtk_tooltips_enable" - external disable : [>`tooltips] obj -> unit = "ml_gtk_tooltips_disable" - external set_delay : [>`tooltips] obj -> int -> unit - = "ml_gtk_tooltips_set_delay" - external set_tip : - [>`tooltips] obj -> - [>`widget] obj -> ?text:string -> ?privat:string -> unit - = "ml_gtk_tooltips_set_tip" - external set_colors : - [>`tooltips] obj -> - ?foreground:Gdk.Color.t -> ?background:Gdk.Color.t -> unit -> unit - = "ml_gtk_tooltips_set_colors" - let set ?delay ?foreground ?background tt = - may ~f:(set_delay tt) delay; - if foreground <> None || background <> None then - set_colors tt ?foreground ?background () -end - - -module Selection = struct - type t - external selection : t -> Gdk.atom - = "ml_gtk_selection_data_selection" - external target : t -> Gdk.atom - = "ml_gtk_selection_data_target" - external seltype : t -> Gdk.atom - = "ml_gtk_selection_data_type" - external format : t -> int - = "ml_gtk_selection_data_format" - external get_data : t -> string - = "ml_gtk_selection_data_get_data" (* May raise Gpointer.null *) - external set : - t -> typ:Gdk.atom -> format:int -> ?data:string -> unit - = "ml_gtk_selection_data_set" -end diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkEdit.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkEdit.ml deleted file mode 100644 index bef2fedb9..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkEdit.ml +++ /dev/null @@ -1,223 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gtk -open Tags -open GtkBase - -module Editable = struct - let cast w : editable obj = Object.try_cast w "GtkEditable" - external coerce : [>`editable] obj -> editable obj = "%identity" - external select_region : [>`editable] obj -> start:int -> stop:int -> unit - = "ml_gtk_editable_select_region" - external insert_text : [>`editable] obj -> string -> pos:int -> int - = "ml_gtk_editable_insert_text" - external delete_text : [>`editable] obj -> start:int -> stop:int -> unit - = "ml_gtk_editable_delete_text" - external get_chars : [>`editable] obj -> start:int -> stop:int -> string - = "ml_gtk_editable_get_chars" - external cut_clipboard : [>`editable] obj -> unit - = "ml_gtk_editable_cut_clipboard" - external copy_clipboard : [>`editable] obj -> unit - = "ml_gtk_editable_copy_clipboard" - external paste_clipboard : [>`editable] obj -> unit - = "ml_gtk_editable_paste_clipboard" - external claim_selection : - [>`editable] obj -> claim:bool -> time:int -> unit - = "ml_gtk_editable_claim_selection" - external delete_selection : [>`editable] obj -> unit - = "ml_gtk_editable_delete_selection" - external changed : [>`editable] obj -> unit = "ml_gtk_editable_changed" - external set_position : [>`editable] obj -> int -> unit - = "ml_gtk_editable_set_position" - external get_position : [>`editable] obj -> int - = "ml_gtk_editable_get_position" - external set_editable : [>`editable] obj -> bool -> unit - = "ml_gtk_editable_set_editable" - external selection_start_pos : [>`editable] obj -> int - = "ml_gtk_editable_selection_start_pos" - external selection_end_pos : [>`editable] obj -> int - = "ml_gtk_editable_selection_end_pos" - external has_selection : [>`editable] obj -> bool - = "ml_gtk_editable_has_selection" - module Signals = struct - open GtkArgv - open GtkSignal - let activate : ([>`editable],_) t = - { name = "activate"; marshaller = marshal_unit } - let changed : ([>`editable],_) t = - { name = "changed"; marshaller = marshal_unit } - let marshal_insert f argv = function - | STRING _ :: INT len :: POINTER(Some pos) :: _ -> - (* XXX These two accesses are implementation-dependent *) - let s = string_at_pointer (get_pointer argv ~pos:0) ~len - and pos = int_at_pointer pos in - f s ~pos - | _ -> invalid_arg "GtkEdit.Editable.Signals.marshal_insert" - let insert_text : ([>`editable],_) t = - { name = "insert_text"; marshaller = marshal_insert } - let marshal_delete f _ = function - | INT start :: INT stop :: _ -> - f ~start ~stop - | _ -> invalid_arg "GtkEdit.Editable.Signals.marshal_delete" - let delete_text : ([>`editable],_) t = - { name = "delete_text"; marshaller = marshal_delete } - end -end - -module Entry = struct - let cast w : entry obj = Object.try_cast w "GtkEntry" - external coerce : [>`entry] obj -> entry obj = "%identity" - external create : unit -> entry obj = "ml_gtk_entry_new" - external create_with_max_length : int -> entry obj - = "ml_gtk_entry_new_with_max_length" - let create ?max_length () = - match max_length with None -> create () - | Some len -> create_with_max_length len - external set_text : [>`entry] obj -> string -> unit - = "ml_gtk_entry_set_text" - external append_text : [>`entry] obj -> string -> unit - = "ml_gtk_entry_append_text" - external prepend_text : [>`entry] obj -> string -> unit - = "ml_gtk_entry_prepend_text" - external get_text : [>`entry] obj -> string = "ml_gtk_entry_get_text" - external set_visibility : [>`entry] obj -> bool -> unit - = "ml_gtk_entry_set_visibility" - external set_max_length : [>`entry] obj -> int -> unit - = "ml_gtk_entry_set_max_length" - let set ?text ?visibility ?max_length w = - let may_set f = may ~f:(f w) in - may_set set_text text; - may_set set_visibility visibility; - may_set set_max_length max_length - external text_length : [>`entry] obj -> int - = "ml_GtkEntry_text_length" -end - -module SpinButton = struct - let cast w : spin_button obj = Object.try_cast w "GtkSpinButton" - external create : - [>`adjustment] optobj -> rate:float -> digits:int -> spin_button obj - = "ml_gtk_spin_button_new" - let create ?adjustment ?(rate=0.5) ?(digits=0) () = - create (Gpointer.optboxed adjustment) ~rate ~digits - external configure : - [>`spinbutton] obj -> adjustment:[>`adjustment] obj -> - rate:float -> digits:int -> unit - = "ml_gtk_spin_button_configure" - external set_adjustment : [>`spinbutton] obj -> [>`adjustment] obj -> unit - = "ml_gtk_spin_button_set_adjustment" - external get_adjustment : [>`spinbutton] obj -> adjustment obj - = "ml_gtk_spin_button_get_adjustment" - external set_digits : [>`spinbutton] obj -> int -> unit - = "ml_gtk_spin_button_set_digits" - external get_value : [>`spinbutton] obj -> float - = "ml_gtk_spin_button_get_value_as_float" - let get_value_as_int w = truncate (get_value w +. 0.5) - external set_value : [>`spinbutton] obj -> float -> unit - = "ml_gtk_spin_button_set_value" - external set_update_policy : - [>`spinbutton] obj -> [`ALWAYS|`IF_VALID] -> unit - = "ml_gtk_spin_button_set_update_policy" - external set_numeric : [>`spinbutton] obj -> bool -> unit - = "ml_gtk_spin_button_set_numeric" - external spin : [>`spinbutton] obj -> spin_type -> unit - = "ml_gtk_spin_button_spin" - external set_wrap : [>`spinbutton] obj -> bool -> unit - = "ml_gtk_spin_button_set_wrap" - external set_shadow_type : [>`spinbutton] obj -> shadow_type -> unit - = "ml_gtk_spin_button_set_shadow_type" - external set_snap_to_ticks : [>`spinbutton] obj -> bool -> unit - = "ml_gtk_spin_button_set_snap_to_ticks" - external update : [>`spinbutton] obj -> unit - = "ml_gtk_spin_button_update" - let set ?adjustment ?digits ?value ?update_policy - ?numeric ?wrap ?shadow_type ?snap_to_ticks w = - let may_set f = may ~f:(f w) in - may_set set_adjustment adjustment; - may_set set_digits digits; - may_set set_value value; - may_set set_update_policy update_policy; - may_set set_numeric numeric; - may_set set_wrap wrap; - may_set set_shadow_type shadow_type; - may_set set_snap_to_ticks snap_to_ticks -end - -module Text = struct - let cast w : text obj = Object.try_cast w "GtkText" - external create : [>`adjustment] optobj -> [>`adjustment] optobj -> text obj - = "ml_gtk_text_new" - let create ?hadjustment ?vadjustment () = - create (Gpointer.optboxed hadjustment) (Gpointer.optboxed vadjustment) - external set_word_wrap : [>`text] obj -> bool -> unit - = "ml_gtk_text_set_word_wrap" - external set_line_wrap : [>`text] obj -> bool -> unit - = "ml_gtk_text_set_line_wrap" - external set_adjustment : - [>`text] obj -> ?horizontal:[>`adjustment] obj -> - ?vertical:[>`adjustment] obj -> unit -> unit - = "ml_gtk_text_set_adjustments" - external get_hadjustment : [>`text] obj -> adjustment obj - = "ml_gtk_text_get_hadj" - external get_vadjustment : [>`text] obj -> adjustment obj - = "ml_gtk_text_get_vadj" - external set_point : [>`text] obj -> int -> unit - = "ml_gtk_text_set_point" - external get_point : [>`text] obj -> int = "ml_gtk_text_get_point" - external get_length : [>`text] obj -> int = "ml_gtk_text_get_length" - external freeze : [>`text] obj -> unit = "ml_gtk_text_freeze" - external thaw : [>`text] obj -> unit = "ml_gtk_text_thaw" - external insert : - [>`text] obj -> ?font:Gdk.font -> ?foreground:Gdk.Color.t -> - ?background:Gdk.Color.t -> string -> unit - = "ml_gtk_text_insert" - let set ?hadjustment ?vadjustment ?word_wrap w = - if hadjustment <> None || vadjustment <> None then - set_adjustment w ?horizontal: hadjustment ?vertical: vadjustment (); - may word_wrap ~f:(set_word_wrap w) -end - -module Combo = struct - let cast w : combo obj = Object.try_cast w "GtkCombo" - external create : unit -> combo obj = "ml_gtk_combo_new" - external set_value_in_list : - [>`combo] obj -> ?required:bool -> ?ok_if_empty:bool -> unit -> unit - = "ml_gtk_combo_set_value_in_list" - external set_use_arrows : [>`combo] obj -> bool -> unit - = "ml_gtk_combo_set_use_arrows" - external set_use_arrows_always : [>`combo] obj -> bool -> unit - = "ml_gtk_combo_set_use_arrows_always" - external set_case_sensitive : [>`combo] obj -> bool -> unit - = "ml_gtk_combo_set_case_sensitive" - external set_item_string : [>`combo] obj -> [>`item] obj -> string -> unit - = "ml_gtk_combo_set_item_string" - external entry : [>`combo] obj -> entry obj= "ml_gtk_combo_entry" - external list : [>`combo] obj -> liste obj= "ml_gtk_combo_list" - let set_popdown_strings combo strings = - GtkList.Liste.clear_items (list combo) ~start:0 ~stop:(-1); - List.iter strings ~f: - begin fun s -> - let li = GtkList.ListItem.create_with_label s in - Widget.show li; - Container.add (list combo) li - end - let set_use_arrows' w (mode : [`NEVER|`DEFAULT|`ALWAYS]) = - let def,always = - match mode with - `NEVER -> false, false - | `DEFAULT -> true, false - | `ALWAYS -> true, true - in - set_use_arrows w def; - set_use_arrows_always w always - let set ?popdown_strings ?use_arrows - ?case_sensitive ?value_in_list ?ok_if_empty w = - may popdown_strings ~f:(set_popdown_strings w); - may use_arrows ~f:(set_use_arrows' w); - may case_sensitive ~f:(set_case_sensitive w); - if value_in_list <> None || ok_if_empty <> None then - set_value_in_list w ?required:value_in_list ?ok_if_empty () - external disable_activate : [>`combo] obj -> unit - = "ml_gtk_combo_disable_activate" -end diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkInit.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkInit.ml deleted file mode 100644 index 5ce40db5f..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkInit.ml +++ /dev/null @@ -1,5 +0,0 @@ -(* $Id$ *) - -(* Does the initialization for toplevels *) - -let locale = GtkMain.Main.init () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkList.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkList.ml deleted file mode 100644 index 4d2ae0951..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkList.ml +++ /dev/null @@ -1,294 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gtk -open Tags -open GtkBase - -module ListItem = struct - let cast w : list_item obj = Object.try_cast w "GtkListItem" - external create : unit -> list_item obj = "ml_gtk_list_item_new" - external create_with_label : string -> list_item obj - = "ml_gtk_list_item_new_with_label" - let create ?label () = - match label with None -> create () - | Some label -> create_with_label label -end - -module Liste = struct - let cast w : liste obj = Object.try_cast w "GtkList" - external create : unit -> liste obj = "ml_gtk_list_new" - external insert_item : - [>`list] obj -> [>`listitem] obj -> pos:int -> unit - = "ml_gtk_list_insert_item" - let insert_items l wl ~pos = - let wl = if pos < 0 then wl else List.rev wl in - List.iter wl ~f:(insert_item l ~pos) - let append_items l = insert_items l ~pos:(-1) - let prepend_items l = insert_items l ~pos:0 - external clear_items : [>`list] obj -> start:int -> stop:int -> unit = - "ml_gtk_list_clear_items" - external select_item : [>`list] obj -> pos:int -> unit - = "ml_gtk_list_select_item" - external unselect_item : [>`list] obj -> pos:int -> unit - = "ml_gtk_list_unselect_item" - external select_child : [>`list] obj -> [>`listitem] obj -> unit - = "ml_gtk_list_select_child" - external unselect_child : [>`list] obj -> [>`listitem] obj -> unit - = "ml_gtk_list_unselect_child" - external child_position : [>`list] obj -> [>`listitem] obj -> int - = "ml_gtk_list_child_position" - external set_selection_mode : [>`list] obj -> selection_mode -> unit - = "ml_gtk_list_set_selection_mode" - module Signals = struct - open GtkSignal - let selection_changed : ([>`list],_) t = - { name = "selection_changed"; marshaller = marshal_unit } - let select_child : ([>`list],_) t = - { name = "select_child"; marshaller = Widget.Signals.marshal } - let unselect_child : ([>`list],_) t = - { name = "unselect_child"; marshaller = Widget.Signals.marshal } - end -end - -module CList = struct - let cast w : clist obj = Object.try_cast w "GtkCList" - external create : cols:int -> clist obj = "ml_gtk_clist_new" - external create_with_titles : string array -> clist obj - = "ml_gtk_clist_new_with_titles" - external get_rows : [>`clist] obj -> int = "ml_gtk_clist_get_rows" - external get_columns : [>`clist] obj -> int = "ml_gtk_clist_get_columns" - external get_focus_row : [>`clist] obj -> int - = "ml_gtk_clist_get_focus_row" - external set_hadjustment : [>`clist] obj -> [>`adjustment] obj -> unit - = "ml_gtk_clist_set_hadjustment" - external set_vadjustment : [>`clist] obj -> [>`adjustment] obj -> unit - = "ml_gtk_clist_set_vadjustment" - external get_hadjustment : [>`clist] obj -> adjustment obj - = "ml_gtk_clist_get_hadjustment" - external get_vadjustment : [>`clist] obj -> adjustment obj - = "ml_gtk_clist_get_vadjustment" - external set_shadow_type : [>`clist] obj -> shadow_type -> unit - = "ml_gtk_clist_set_shadow_type" - external set_selection_mode : [>`clist] obj -> selection_mode -> unit - = "ml_gtk_clist_set_selection_mode" - external set_reorderable : [>`clist] obj -> bool -> unit - = "ml_gtk_clist_set_reorderable" - external set_use_drag_icons : [>`clist] obj -> bool -> unit - = "ml_gtk_clist_set_use_drag_icons" - external set_button_actions : - [>`clist] obj -> int -> button_action list -> unit - = "ml_gtk_clist_set_button_actions" - external freeze : [>`clist] obj -> unit = "ml_gtk_clist_freeze" - external thaw : [>`clist] obj -> unit = "ml_gtk_clist_thaw" - external column_titles_show : [>`clist] obj -> unit - = "ml_gtk_clist_column_titles_show" - external column_titles_hide : [>`clist] obj -> unit - = "ml_gtk_clist_column_titles_hide" - external column_title_active : [>`clist] obj -> int -> unit - = "ml_gtk_clist_column_title_active" - external column_title_passive : [>`clist] obj -> int -> unit - = "ml_gtk_clist_column_title_passive" - external column_titles_active : [>`clist] obj -> unit - = "ml_gtk_clist_column_titles_active" - external column_titles_passive : [>`clist] obj -> unit - = "ml_gtk_clist_column_titles_passive" - external set_column_title : [>`clist] obj -> int -> string -> unit - = "ml_gtk_clist_set_column_title" - external get_column_title : [>`clist] obj -> int -> string - = "ml_gtk_clist_get_column_title" - external set_column_widget : [>`clist] obj -> int -> [>`widget] obj -> unit - = "ml_gtk_clist_set_column_widget" - external get_column_widget : [>`clist] obj -> int -> widget obj - = "ml_gtk_clist_get_column_widget" - external set_column_justification : - [>`clist] obj -> int -> justification -> unit - = "ml_gtk_clist_set_column_justification" - external set_column_visibility : [>`clist] obj -> int -> bool -> unit - = "ml_gtk_clist_set_column_visibility" - external set_column_resizeable : [>`clist] obj -> int -> bool -> unit - = "ml_gtk_clist_set_column_resizeable" - external set_column_auto_resize : [>`clist] obj -> int -> bool -> unit - = "ml_gtk_clist_set_column_auto_resize" - external columns_autosize : [>`clist] obj -> unit - = "ml_gtk_clist_columns_autosize" - external optimal_column_width : [>`clist] obj -> int -> int - = "ml_gtk_clist_optimal_column_width" - external set_column_width : [>`clist] obj -> int -> int -> unit - = "ml_gtk_clist_set_column_width" - external set_column_min_width : [>`clist] obj -> int -> int -> unit - = "ml_gtk_clist_set_column_min_width" - external set_column_max_width : [>`clist] obj -> int -> int -> unit - = "ml_gtk_clist_set_column_max_width" - external set_row_height : [>`clist] obj -> int -> unit - = "ml_gtk_clist_set_row_height" - external moveto : - [>`clist] obj -> - int -> int -> row_align:clampf -> col_align:clampf -> unit - = "ml_gtk_clist_moveto" - external row_is_visible : [>`clist] obj -> int -> visibility - = "ml_gtk_clist_row_is_visible" - external get_cell_type : [>`clist] obj -> int -> int -> cell_type - = "ml_gtk_clist_get_cell_type" - external set_text : [>`clist] obj -> int -> int -> string -> unit - = "ml_gtk_clist_set_text" - external get_text : [>`clist] obj -> int -> int -> string - = "ml_gtk_clist_get_text" - external set_pixmap : - [>`clist] obj -> - int -> int -> Gdk.pixmap -> Gdk.bitmap Gpointer.optboxed -> unit - = "ml_gtk_clist_set_pixmap" - external get_pixmap : - [>`clist] obj -> int -> int -> Gdk.pixmap option * Gdk.bitmap option - = "ml_gtk_clist_get_pixmap" - external set_pixtext : - [>`clist] obj -> int -> int -> - string -> int -> Gdk.pixmap -> Gdk.bitmap Gpointer.optboxed -> unit - = "ml_gtk_clist_set_pixtext_bc" "ml_gtk_clist_set_pixtext" - external set_foreground : - [>`clist] obj -> row:int -> Gdk.Color.t Gpointer.optboxed -> unit - = "ml_gtk_clist_set_foreground" - external set_background : - [>`clist] obj -> row:int -> Gdk.Color.t Gpointer.optboxed -> unit - = "ml_gtk_clist_set_background" - external get_cell_style : [>`clist] obj -> int -> int -> Gtk.style - = "ml_gtk_clist_get_cell_style" - external set_cell_style : [>`clist] obj -> int -> int -> Gtk.style -> unit - = "ml_gtk_clist_set_cell_style" - external get_row_style : [>`clist] obj -> row:int -> Gtk.style - = "ml_gtk_clist_get_row_style" - external set_row_style : [>`clist] obj -> row:int -> Gtk.style -> unit - = "ml_gtk_clist_set_row_style" - external set_selectable : [>`clist] obj -> row:int -> bool -> unit - = "ml_gtk_clist_set_selectable" - external get_selectable : [>`clist] obj -> row:int -> bool - = "ml_gtk_clist_get_selectable" - external set_shift : - [>`clist] obj -> int -> int -> vertical:int -> horizontal:int -> unit - = "ml_gtk_clist_set_shift" - external insert : [>`clist] obj -> row:int -> Gpointer.optstring array -> int - = "ml_gtk_clist_insert" - let insert w ~row texts = - let len = get_columns w in - if List.length texts > len then invalid_arg "CList.insert"; - let arr = Array.create (get_columns w) None in - List.fold_left texts ~init:0 - ~f:(fun pos text -> arr.(pos) <- text; pos+1); - let r = insert w ~row (Array.map ~f:Gpointer.optstring arr) in - if r = -1 then invalid_arg "GtkCList::insert"; - r - external remove : [>`clist] obj -> row:int -> unit - = "ml_gtk_clist_remove" - external set_row_data : [>`clist] obj -> row:int -> Obj.t -> unit - = "ml_gtk_clist_set_row_data" - external get_row_data : [>`clist] obj -> row:int -> Obj.t - = "ml_gtk_clist_get_row_data" - external select : [>`clist] obj -> int -> int -> unit - = "ml_gtk_clist_select_row" - external unselect : [>`clist] obj -> int -> int -> unit - = "ml_gtk_clist_unselect_row" - external clear : [>`clist] obj -> unit = "ml_gtk_clist_clear" - external get_row_column : [>`clist] obj -> x:int -> y:int -> int * int - = "ml_gtk_clist_get_selection_info" - external select_all : [>`clist] obj -> unit = "ml_gtk_clist_select_all" - external unselect_all : [>`clist] obj -> unit = "ml_gtk_clist_unselect_all" - external swap_rows : [>`clist] obj -> int -> int -> unit - = "ml_gtk_clist_swap_rows" - external row_move : [>`clist] obj -> int -> dst:int -> unit - = "ml_gtk_clist_row_move" - external set_sort_column : [>`clist] obj -> int -> unit - = "ml_gtk_clist_set_sort_column" - external set_sort_type : [>`clist] obj -> sort_type -> unit - = "ml_gtk_clist_set_sort_type" - external sort : [>`clist] obj -> unit - = "ml_gtk_clist_sort" - external set_auto_sort : [>`clist] obj -> bool -> unit - = "ml_gtk_clist_set_auto_sort" - let set_titles_show w = function - true -> column_titles_show w - | false -> column_titles_hide w - let set_titles_active w = function - true -> column_titles_active w - | false -> column_titles_passive w - let set ?hadjustment ?vadjustment ?shadow_type - ?(button_actions=[]) ?selection_mode ?reorderable - ?use_drag_icons ?row_height ?titles_show ?titles_active w = - let may_set f param = may param ~f:(f w) in - may_set set_hadjustment hadjustment; - may_set set_vadjustment vadjustment; - may_set set_shadow_type shadow_type; - List.iter button_actions ~f:(fun (n,act) -> set_button_actions w n act); - may_set set_selection_mode selection_mode; - may_set set_reorderable reorderable; - may_set set_use_drag_icons use_drag_icons; - may_set set_row_height row_height; - may_set set_titles_show titles_show; - may_set set_titles_active titles_active - let set_sort w ?auto ?column ?dir:sort_type () = - may auto ~f:(set_auto_sort w); - may column ~f:(set_sort_column w); - may sort_type ~f:(set_sort_type w) - let set_cell w ?text ?pixmap ?mask ?(spacing=0) ?style row col = - begin match text, pixmap with - | Some text, None -> - set_text w row col text - | None, Some pm -> - set_pixmap w row col pm (Gpointer.optboxed mask) - | Some text, Some pm -> - set_pixtext w row col text spacing pm (Gpointer.optboxed mask) - | _ -> () - end; - may style ~f:(set_cell_style w row col) - let set_column w ?widget ?title ?title_active ?justification - ?visibility ?resizeable ?auto_resize ?width ?min_width ?max_width - col = - let may_set f param = may param ~f:(f w col) in - may_set set_column_widget widget; - may_set set_column_title title; - may title_active - ~f:(fun active -> if active then column_title_active w col - else column_title_passive w col); - may_set set_column_justification justification; - may_set set_column_visibility visibility; - may_set set_column_resizeable resizeable; - may_set set_column_auto_resize auto_resize; - may_set set_column_width width; - may_set set_column_min_width min_width; - may_set set_column_max_width max_width - let set_row w ?foreground ?background ?selectable ?style row = - let may_set f = may ~f:(f w ~row) in - may_set set_foreground foreground; - may_set set_background background; - may_set set_selectable selectable; - may_set set_row_style style - module Signals = struct - open GtkArgv - open GtkSignal - let marshal_select f argv = function - | INT row :: INT column :: POINTER p :: _ -> - let event : GdkEvent.Button.t option = - may_map ~f:GdkEvent.unsafe_copy p - in - f ~row ~column ~event - | _ -> invalid_arg "GtkList.CList.Signals.marshal_select" - let select_row : ([>`clist],_) t = - { name = "select_row"; marshaller = marshal_select } - let unselect_row : ([>`clist],_) t = - { name = "unselect_row"; marshaller = marshal_select } - let click_column : ([>`clist],_) t = - { name = "click_column"; marshaller = marshal_int } - external val_scroll_type : int -> scroll_type = "ml_Val_scroll_type" - let marshal_scroll f argv = function - | INT st :: FLOAT (pos : clampf) :: _ -> - f (val_scroll_type st) ~pos - | _ -> invalid_arg "GtkList.CList.Signals.marshal_scroll" - let scroll_horizontal : ([>`clist],_) t = - { name = "scroll_horizontal"; marshaller = marshal_scroll } - let scroll_vertical : ([>`clist],_) t = - { name = "scroll_vertical"; marshaller = marshal_scroll } - external emit_scroll : - 'a obj -> name:string -> Tags.scroll_type -> pos:clampf -> unit - = "ml_gtk_signal_emit_scroll" - let emit_scroll = emit ~emitter:emit_scroll - end -end diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkMain.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkMain.ml deleted file mode 100644 index 7ef344303..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkMain.ml +++ /dev/null @@ -1,50 +0,0 @@ -(* $Id$ *) - -open Gtk - -let _ = Callback.register_exception "gtkerror" (Error"") - -module Timeout = struct - type id - external add : ms:int -> callback:(GtkArgv.t -> unit) -> id - = "ml_gtk_timeout_add" - let add ~ms ~callback = - add ~ms ~callback:(fun arg -> GtkArgv.set_result arg (`BOOL(callback ()))) - external remove : id -> unit = "ml_gtk_timeout_remove" -end - -module Main = struct - external init : string array -> string array = "ml_gtk_init" - (* external exit : int -> unit = "ml_gtk_exit" *) - external set_locale : unit -> string = "ml_gtk_set_locale" - (* external main : unit -> unit = "ml_gtk_main" *) - let locale = set_locale () - let init () = - (* let locale = set_locale () in *) - let argv = init Sys.argv in - Array.blit ~src:argv ~dst:Sys.argv ~len:(Array.length argv) - ~src_pos:0 ~dst_pos:0; - Obj.truncate (Obj.repr Sys.argv) ~len:(Array.length argv); - locale - open Glib - let loops = ref [] - let main () = - let loop = (Main.create true) in - loops := loop :: !loops; - while Main.is_running loop do Main.iteration true done; - loops := List.tl !loops - and quit () = Main.quit (List.hd !loops) - external get_version : unit -> int * int * int = "ml_gtk_get_version" - let version = get_version () - - let flush = Gdk.X.flush -end - -module Grab = struct - external add : [>`widget] obj -> unit = "ml_gtk_grab_add" - external remove : [>`widget] obj -> unit = "ml_gtk_grab_remove" - external get_current : unit -> widget obj= "ml_gtk_grab_get_current" -end - -let _ = Glib.set_warning_handler (fun msg -> raise (Warning msg)) -let _ = Glib.set_print_handler (fun msg -> print_string msg) diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkMenu.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkMenu.ml deleted file mode 100644 index 2f1eb30f0..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkMenu.ml +++ /dev/null @@ -1,144 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gtk -open GtkBase - -module MenuItem = struct - let cast w : menu_item obj = Object.try_cast w "GtkMenuItem" - external coerce : [>`menuitem] obj -> menu_item obj = "%identity" - external create : unit -> menu_item obj = "ml_gtk_menu_item_new" - external create_with_label : string -> menu_item obj - = "ml_gtk_menu_item_new_with_label" - external tearoff_create : unit -> menu_item obj - = "ml_gtk_tearoff_menu_item_new" - let create ?label () = - match label with None -> create () - | Some label -> create_with_label label - external set_submenu : [>`menuitem] obj -> [>`menu] obj -> unit - = "ml_gtk_menu_item_set_submenu" - external remove_submenu : [>`menuitem] obj -> unit - = "ml_gtk_menu_item_remove_submenu" - external configure : - [>`menuitem] obj -> show_toggle:bool -> show_indicator:bool -> unit - = "ml_gtk_menu_item_configure" - external activate : [>`menuitem] obj -> unit - = "ml_gtk_menu_item_activate" - external right_justify : [>`menuitem] obj -> unit - = "ml_gtk_menu_item_right_justify" - module Signals = struct - open GtkSignal - let activate : ([>`menuitem],_) t = - { name = "activate"; marshaller = marshal_unit } - let activate_item : ([>`menuitem],_) t = - { name = "activate_item"; marshaller = marshal_unit } - end -end - -module CheckMenuItem = struct - let cast w : check_menu_item obj = Object.try_cast w "GtkCheckMenuItem" - external coerce : [>`checkmenuitem] obj -> check_menu_item obj = "%identity" - external create : unit -> check_menu_item obj = "ml_gtk_check_menu_item_new" - external create_with_label : string -> check_menu_item obj - = "ml_gtk_check_menu_item_new_with_label" - let create ?label () = - match label with None -> create () - | Some label -> create_with_label label - external set_active : [>`checkmenuitem] obj -> bool -> unit - = "ml_gtk_check_menu_item_set_active" - external get_active : [>`checkmenuitem] obj -> bool - = "ml_gtk_check_menu_item_get_active" - external set_show_toggle : [>`checkmenuitem] obj -> bool -> unit - = "ml_gtk_check_menu_item_set_show_toggle" - let set ?active ?show_toggle w = - may active ~f:(set_active w); - may show_toggle ~f:(set_show_toggle w) - external toggled : [>`checkmenuitem] obj -> unit - = "ml_gtk_check_menu_item_toggled" - module Signals = struct - open GtkSignal - let toggled : ([>`checkmenuitem],_) t = - { name = "toggled"; marshaller = marshal_unit } - end -end - -module RadioMenuItem = struct - let cast w : radio_menu_item obj = Object.try_cast w "GtkRadioMenuItem" - external create : radio_menu_item group -> radio_menu_item obj - = "ml_gtk_radio_menu_item_new" - external create_with_label : - radio_menu_item group -> string -> radio_menu_item obj - = "ml_gtk_radio_menu_item_new_with_label" - let create ?(group = None) ?label () = - match label with None -> create group - | Some label -> create_with_label group label - external set_group : [>`radiomenuitem] obj -> radio_menu_item group -> unit - = "ml_gtk_radio_menu_item_set_group" -end - -module OptionMenu = struct - let cast w : option_menu obj = Object.try_cast w "GtkOptionMenu" - external create : unit -> option_menu obj = "ml_gtk_option_menu_new" - external get_menu : [>`optionmenu] obj -> menu obj - = "ml_gtk_option_menu_get_menu" - external set_menu : [>`optionmenu] obj -> [>`menu] obj -> unit - = "ml_gtk_option_menu_set_menu" - external remove_menu : [>`optionmenu] obj -> unit - = "ml_gtk_option_menu_remove_menu" - external set_history : [>`optionmenu] obj -> int -> unit - = "ml_gtk_option_menu_set_history" - let set ?menu ?history w = - may menu ~f:(set_menu w); - may history ~f:(set_history w) -end - -module MenuShell = struct - let cast w : menu_shell obj = Object.try_cast w "GtkMenuShell" - external coerce : [>`menushell] obj -> menu_shell obj = "%identity" - external append : [>`menushell] obj -> [>`widget] obj -> unit - = "ml_gtk_menu_shell_append" - external prepend : [>`menushell] obj -> [>`widget] obj -> unit - = "ml_gtk_menu_shell_prepend" - external insert : [>`menushell] obj -> [>`widget] obj -> pos:int -> unit - = "ml_gtk_menu_shell_insert" - external deactivate : [>`menushell] obj -> unit - = "ml_gtk_menu_shell_deactivate" - module Signals = struct - open GtkSignal - let deactivate : ([>`menushell],_) t = - { name = "deactivate"; marshaller = marshal_unit } - end -end - -module Menu = struct - let cast w : menu obj = Object.try_cast w "GtkMenu" - external create : unit -> menu obj = "ml_gtk_menu_new" - external popup : - [>`menu] obj -> [>`menushell] optobj -> - [>`menuitem] optobj -> button:int -> time:int -> unit - = "ml_gtk_menu_popup" - let popup ?parent_menu ?parent_item w = - popup w (Gpointer.optboxed parent_menu) (Gpointer.optboxed parent_item) - external popdown : [>`menu] obj -> unit = "ml_gtk_menu_popdown" - external get_active : [>`menu] obj -> widget obj= "ml_gtk_menu_get_active" - external set_active : [>`menu] obj -> int -> unit = "ml_gtk_menu_set_active" - external set_accel_group : [>`menu] obj -> accel_group -> unit - = "ml_gtk_menu_set_accel_group" - external get_accel_group : [>`menu] obj -> accel_group - = "ml_gtk_menu_get_accel_group" - external ensure_uline_accel_group : [>`menu] obj -> accel_group - = "ml_gtk_menu_ensure_uline_accel_group" - external attach_to_widget : [>`menu] obj -> [>`widget] obj -> unit - = "ml_gtk_menu_attach_to_widget" - external get_attach_widget : [>`menu] obj -> widget obj - = "ml_gtk_menu_get_attach_widget" - external detach : [>`menu] obj -> unit = "ml_gtk_menu_detach" - let set ?active ?accel_group w = - may active ~f:(set_active w); - may accel_group ~f:(set_accel_group w) -end - -module MenuBar = struct - let cast w : menu_bar obj = Object.try_cast w "GtkMenuBar" - external create : unit -> menu_bar obj = "ml_gtk_menu_bar_new" -end diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkMisc.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkMisc.ml deleted file mode 100644 index ded7f487a..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkMisc.ml +++ /dev/null @@ -1,323 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gtk -open Tags -open GtkBase - -module GammaCurve = struct - let cast w : gamma_curve obj = Object.try_cast w "GtkGammaCurve" - external create : unit -> gamma_curve obj = "ml_gtk_gamma_curve_new" - external get_gamma : [>`gamma] obj -> float = "ml_gtk_gamma_curve_get_gamma" -end - -module ColorSelection = struct - let cast w : color_selection obj = Object.try_cast w "GtkColorSelection" - external create : unit -> color_selection obj = "ml_gtk_color_selection_new" - external create_dialog : string -> color_selection_dialog obj - = "ml_gtk_color_selection_dialog_new" - external set_update_policy : [>`colorsel] obj -> update_type -> unit - = "ml_gtk_color_selection_set_update_policy" - external set_opacity : [>`colorsel] obj -> bool -> unit - = "ml_gtk_color_selection_set_opacity" - let set ?update_policy ?opacity w = - may update_policy ~f:(set_update_policy w); - may opacity ~f:(set_opacity w) - external set_color : - [>`colorsel] obj -> - red:float -> green:float -> blue:float -> ?opacity:float -> unit - = "ml_gtk_color_selection_set_color" - external get_color : [>`colorsel] obj -> color - = "ml_gtk_color_selection_get_color" - - external ok_button : [>`colorseldialog] obj -> button obj = - "ml_gtk_color_selection_dialog_ok_button" - external cancel_button : [>`colorseldialog] obj -> button obj = - "ml_gtk_color_selection_dialog_cancel_button" - external help_button : [>`colorseldialog] obj -> button obj = - "ml_gtk_color_selection_dialog_help_button" - external colorsel : [>`colorseldialog] obj -> color_selection obj = - "ml_gtk_color_selection_dialog_colorsel" - module Signals = struct - open GtkSignal - let color_changed : ([>`colorsel],_) t = - { name = "color_changed"; marshaller = marshal_unit } - end -end - -module Statusbar = struct - let cast w : statusbar obj = Object.try_cast w "GtkStatusbar" - external create : unit -> statusbar obj = "ml_gtk_statusbar_new" - external get_context : [>`statusbar] obj -> string -> statusbar_context - = "ml_gtk_statusbar_get_context_id" - external push : - [>`statusbar] obj -> - statusbar_context -> text:string -> statusbar_message - = "ml_gtk_statusbar_push" - external pop : [>`statusbar] obj -> statusbar_context -> unit - = "ml_gtk_statusbar_pop" - external remove : - [>`statusbar] obj -> statusbar_context -> statusbar_message -> unit - = "ml_gtk_statusbar_remove" - module Signals = struct - open GtkSignal - let text_pushed : ([>`statusbar],_) t = - let marshal f _ = function - | GtkArgv.INT ctx :: GtkArgv.STRING s :: _ -> - f (Obj.magic ctx : statusbar_context) s - | _ -> invalid_arg "GtkMisc.Statusbar.Signals.marshal_text" - in - { name = "text_pushed"; marshaller = marshal } - end -end - -module Calendar = struct - let cast w : calendar obj = Object.try_cast w "GtkCalendar" - external create : unit -> calendar obj = "ml_gtk_calendar_new" - external select_month : [>`calendar] obj -> month:int -> year:int -> unit - = "ml_gtk_calendar_select_month" - external select_day : [>`calendar] obj -> int -> unit - = "ml_gtk_calendar_select_day" - external mark_day : [>`calendar] obj -> int -> unit - = "ml_gtk_calendar_mark_day" - external unmark_day : [>`calendar] obj -> int -> unit - = "ml_gtk_calendar_unmark_day" - external clear_marks : [>`calendar] obj -> unit - = "ml_gtk_calendar_clear_marks" - external display_options : - [>`calendar] obj -> Tags.calendar_display_options list -> unit - = "ml_gtk_calendar_display_options" - external get_date : [>`calendar] obj -> int * int * int - = "ml_gtk_calendar_get_date" (* year * month * day *) - external freeze : [>`calendar] obj -> unit - = "ml_gtk_calendar_freeze" - external thaw : [>`calendar] obj -> unit - = "ml_gtk_calendar_thaw" - module Signals = struct - open GtkSignal - let month_changed : ([>`calendar],_) t = - { name = "month_changed"; marshaller = marshal_unit } - let day_selected : ([>`calendar],_) t = - { name = "day_selected"; marshaller = marshal_unit } - let day_selected_double_click : ([>`calendar],_) t = - { name = "day_selected_double_click"; marshaller = marshal_unit } - let prev_month : ([>`calendar],_) t = - { name = "prev_month"; marshaller = marshal_unit } - let next_month : ([>`calendar],_) t = - { name = "next_month"; marshaller = marshal_unit } - let prev_year : ([>`calendar],_) t = - { name = "prev_year"; marshaller = marshal_unit } - let next_year : ([>`calendar],_) t = - { name = "next_year"; marshaller = marshal_unit } - end -end - -module DrawingArea = struct - let cast w : drawing_area obj = Object.try_cast w "GtkDrawingArea" - external create : unit -> drawing_area obj = "ml_gtk_drawing_area_new" - external size : [>`drawing] obj -> width:int -> height:int -> unit - = "ml_gtk_drawing_area_size" -end - -(* Does not seem very useful ... -module Curve = struct - type t = [widget drawing curve] obj - let cast w : t = Object.try_cast w "GtkCurve" - external create : unit -> t = "ml_gtk_curve_new" - external reset : [>`curve] obj -> unit = "ml_gtk_curve_reset" - external set_gamma : [>`curve] obj -> float -> unit - = "ml_gtk_curve_set_gamma" - external set_range : - [>`curve] obj -> min_x:float -> max_x:float -> - min_y:float -> max_y:float -> unit - = "ml_gtk_curve_set_gamma" -end -*) - -module Misc = struct - let cast w : misc obj = Object.try_cast w "GtkMisc" - external coerce : [>`misc] obj -> misc obj = "%identity" - external set_alignment : [>`misc] obj -> x:float -> y:float -> unit - = "ml_gtk_misc_set_alignment" - external set_padding : [>`misc] obj -> x:int -> y:int -> unit - = "ml_gtk_misc_set_padding" - external get_xalign : [>`misc] obj -> float = "ml_gtk_misc_get_xalign" - external get_yalign : [>`misc] obj -> float = "ml_gtk_misc_get_yalign" - external get_xpad : [>`misc] obj -> int = "ml_gtk_misc_get_xpad" - external get_ypad : [>`misc] obj -> int = "ml_gtk_misc_get_ypad" - let set_alignment w ?x ?y () = - set_alignment w ~x:(may_default get_xalign w ~opt:x) - ~y:(may_default get_yalign w ~opt:y) - let set_padding w ?x ?y () = - set_padding w ~x:(may_default get_xpad w ~opt:x) - ~y:(may_default get_ypad w ~opt:y) - let set ?xalign ?yalign ?xpad ?ypad ?(width = -2) ?(height = -2) w = - if xalign <> None || yalign <> None then - set_alignment w ?x:xalign ?y:yalign (); - if xpad <> None || ypad <> None then - set_padding w ?x:xpad ?y:ypad (); - if width <> -2 || height <> -2 then Widget.set_usize w ~width ~height -end - -module Arrow = struct - let cast w : arrow obj = Object.try_cast w "GtkArrow" - external create : kind:arrow_type -> shadow:shadow_type -> arrow obj - = "ml_gtk_arrow_new" - external set : [>`arrow] obj -> kind:arrow_type -> shadow:shadow_type -> unit - = "ml_gtk_arrow_set" -end - -module Image = struct - let cast w : image obj = Object.try_cast w "GtkImage" - external create : Gdk.image -> ?mask:Gdk.bitmap -> image obj - = "ml_gtk_image_new" - let create ?mask img = create img ?mask - external set : [>`image] obj -> Gdk.image -> ?mask:Gdk.bitmap -> unit - = "ml_gtk_image_set" -end - -module Label = struct - let cast w : label obj = Object.try_cast w "GtkLabel" - external coerce : [>`label] obj -> label obj = "%identity" - external create : string -> label obj = "ml_gtk_label_new" - external set_text : [>`label] obj -> string -> unit = "ml_gtk_label_set_text" - external set_justify : [>`label] obj -> justification -> unit - = "ml_gtk_label_set_justify" - external set_pattern : [>`label] obj -> string -> unit - = "ml_gtk_label_set_pattern" - external set_line_wrap : [>`label] obj -> bool -> unit - = "ml_gtk_label_set_line_wrap" - let set ?text ?justify ?line_wrap ?pattern w = - may ~f:(set_text w) text; - may ~f:(set_justify w) justify; - may ~f:(set_line_wrap w) line_wrap; - may ~f:(set_pattern w) pattern - external get_text : [>`label] obj -> string = "ml_gtk_label_get_label" -end - -module TipsQuery = struct - let cast w : tips_query obj = Object.try_cast w "GtkTipsQuery" - external create : unit -> tips_query obj = "ml_gtk_tips_query_new" - external start : [>`tipsquery] obj -> unit = "ml_gtk_tips_query_start_query" - external stop : [>`tipsquery] obj -> unit = "ml_gtk_tips_query_stop_query" - external set_caller : [>`tipsquery] obj -> [>`widget] obj -> unit - = "ml_gtk_tips_query_set_caller" - external set_labels : - [>`tipsquery] obj -> inactive:string -> no_tip:string -> unit - = "ml_gtk_tips_query_set_labels" - external set_emit_always : [>`tipsquery] obj -> bool -> unit - = "ml_gtk_tips_query_set_emit_always" - external get_caller : [>`tipsquery] obj -> widget obj - = "ml_gtk_tips_query_get_caller" - external get_label_inactive : [>`tipsquery] obj -> string - = "ml_gtk_tips_query_get_label_inactive" - external get_label_no_tip : [>`tipsquery] obj -> string - = "ml_gtk_tips_query_get_label_no_tip" - external get_emit_always : [>`tipsquery] obj -> bool - = "ml_gtk_tips_query_get_emit_always" - let set_labels ?inactive ?no_tip w = - set_labels w - ~inactive:(may_default get_label_inactive w ~opt:inactive) - ~no_tip:(may_default get_label_no_tip w ~opt:no_tip) - let set ?caller ?emit_always ?label_inactive ?label_no_tip w = - may caller ~f:(set_caller w); - may emit_always ~f:(set_emit_always w); - if label_inactive <> None || label_no_tip <> None then - set_labels w ?inactive:label_inactive ?no_tip:label_no_tip - module Signals = struct - open GtkArgv - open GtkSignal - let start_query : ([>`tipsquery],_) t = - { name = "start_query"; marshaller = marshal_unit } - let stop_query : ([>`tipsquery],_) t = - { name = "stop_query"; marshaller = marshal_unit } - let widget_entered : - ([>`tipsquery], - widget obj option -> - text:string option -> privat:string option -> unit) t = - let marshal f _ = function - | OBJECT opt :: STRING text :: STRING privat :: _ -> - f (may_map ~f:Widget.cast opt) ~text ~privat - | _ -> invalid_arg "GtkMisc.TipsQuery.Signals.marshal_entered" - in - { name = "widget_entered"; marshaller = marshal } - let widget_selected : - ([>`tipsquery], - widget obj option -> - text:string option -> - privat:string option -> GdkEvent.Button.t option -> bool) t = - let marshal f argv = function - | OBJECT obj :: STRING text :: STRING privat :: POINTER p :: _ -> - let stop = - f (may_map ~f:Widget.cast obj) ~text ~privat - (may_map ~f:GdkEvent.unsafe_copy p) - in set_result argv (`BOOL stop) - | _ -> invalid_arg "GtkMisc.TipsQuery.Signals.marshal_selected" - in - { name = "widget_selected"; marshaller = marshal } - end -end - -module Pixmap = struct - let cast w : pixmap obj = Object.try_cast w "GtkPixmap" - external create : Gdk.pixmap -> ?mask:Gdk.bitmap -> pixmap obj - = "ml_gtk_pixmap_new" - let create ?mask img = create img ?mask - external set : - [>`pixmap] obj -> ?pixmap:Gdk.pixmap -> ?mask:Gdk.bitmap -> unit - = "ml_gtk_pixmap_set" - external pixmap : [>`pixmap] obj -> Gdk.pixmap = "ml_GtkPixmap_pixmap" - external mask : [>`pixmap] obj -> Gdk.bitmap = "ml_GtkPixmap_mask" -end - -module Separator = struct - let cast w : separator obj = Object.try_cast w "GtkSeparator" - external hseparator_new : unit -> separator obj = "ml_gtk_hseparator_new" - external vseparator_new : unit -> separator obj = "ml_gtk_vseparator_new" - let create (dir : Tags.orientation) = - if dir = `HORIZONTAL then hseparator_new () else vseparator_new () -end - -module FontSelection = struct - type null_terminated - let null_terminated arg : null_terminated = - match arg with None -> Obj.magic Gpointer.raw_null - | Some l -> - let len = List.length l in - let arr = Array.create (len + 1) "" in - let rec loop i = function - [] -> arr.(i) <- Obj.magic Gpointer.raw_null - | s::l -> arr.(i) <- s; loop (i+1) l - in loop 0 l; - Obj.magic (arr : string array) - let cast w : font_selection obj = - Object.try_cast w "GtkFontSelection" - external create : unit -> font_selection obj - = "ml_gtk_font_selection_new" - external get_font : [>`fontsel] obj -> Gdk.font - = "ml_gtk_font_selection_get_font" - let get_font w = - try Some (get_font w) with Gpointer.Null -> None - external get_font_name : [>`fontsel] obj -> string - = "ml_gtk_font_selection_get_font_name" - let get_font_name w = - try Some (get_font_name w) with Gpointer.Null -> None - external set_font_name : [>`fontsel] obj -> string -> unit - = "ml_gtk_font_selection_set_font_name" - external set_filter : - [>`fontsel] obj -> font_filter_type -> font_type list -> - null_terminated -> null_terminated -> null_terminated -> - null_terminated -> null_terminated -> null_terminated -> unit - = "ml_gtk_font_selection_set_filter_bc" - "ml_gtk_font_selection_set_filter" - let set_filter w ?kind:(tl=[`ALL]) ?foundry - ?weight ?slant ?setwidth ?spacing ?charset filter = - set_filter w filter tl (null_terminated foundry) - (null_terminated weight) (null_terminated slant) - (null_terminated setwidth) (null_terminated spacing) - (null_terminated charset) - external get_preview_text : [>`fontsel] obj -> string - = "ml_gtk_font_selection_get_preview_text" - external set_preview_text : [>`fontsel] obj -> string -> unit - = "ml_gtk_font_selection_set_preview_text" -end diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkNew.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkNew.ml deleted file mode 100644 index 532a709d7..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkNew.ml +++ /dev/null @@ -1,56 +0,0 @@ -(* $Id$ *) - -open Gtk - -type t - -(* if you modify this type modify widget_info_array - in ml_gtk.c in accordance *) -type object_type = - | OBJECT | WIDGET | MISC | LABEL | ACCELLABEL | TIPSQUERY | ARROW - | IMAGE | PIXMAP | CONTAINER | BIN | ALIGNMENT | FRAME | ASPECTFRAME - | BUTTON | TOGGLEBUTTON | CHECKBUTTON | RADIOBUTTON | OPTIONMENU - | ITEM | MENUITEM | CHECKMENUITEM | RADIOMENUITEM | TEAROFFMENUITEM - | LISTITEM | TREEITEM | WINDOW | COLORSELECTIONDIALOG | DIALOG - | INPUTDIALOG | FILESELECTION | FONTSELECTIONDIALOG | PLUG - | EVENTBOX | HANDLEBOX | SCROLLEDWINDOW | VIEWPORT | BOX - | BUTTONBOX | HBUTTONBOX | VBUTTONBOX | VBOX | COLORSELECTION - | GAMMACURVE | HBOX | COMBO | STATUSBAR | CLIST | CTREE | FIXED - | NOTEBOOK | FONTSELECTION | PANED | HPANED | VPANED | LAYOUT - | LIST | MENUSHELL | MENUBAR | MENU | PACKER | SOCKET | TABLE - | TOOLBAR | TREE | CALENDAR | DRAWINGAREA | CURVE | EDITABLE - | ENTRY | SPINBUTTON | TEXT | RULER | HRULER | VRULER | RANGE - | SCALE | HSCALE | VSCALE | SCROLLBAR | HSCROLLBAR | VSCROLLBAR - | SEPARATOR | HSEPARATOR | VSEPARATOR | PREVIEW | PROGRESS - | PROGRESSBAR | DATA | ADJUSTMENT | TOOLTIPS | ITEMFACTORY - -external set_ml_class_init : (t -> unit) -> unit = "set_ml_class_init" -external signal_new : string -> int -> t -> object_type -> int -> int - = "ml_gtk_signal_new" -external object_class_add_signals : t -> int array -> int -> unit - = "ml_gtk_object_class_add_signals" -external type_unique : - name:string -> parent:object_type -> nsignals:int -> gtk_type - = "ml_gtk_type_unique" -external type_new : gtk_type -> unit obj - = "ml_gtk_type_new" - -open GtkSignal - -let make_new_widget ~name ~parent - ~(signals : ('a, unit -> unit) GtkSignal.t list) = - let nsignals = List.length signals in - let new_type = type_unique ~name ~parent ~nsignals in - let signal_num_array = Array.create nsignals 0 in - let class_init_func classe = - List.fold_left signals ~init:0 ~f: - (fun i signal -> - signal_num_array.(i) <- signal_new signal.name 1 classe parent i; - i+1); - object_class_add_signals classe signal_num_array nsignals - in - new_type, - (fun () -> - set_ml_class_init class_init_func; - type_new new_type) - (* , signal_num_array *) diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkPack.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkPack.ml deleted file mode 100644 index 20adb0505..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkPack.ml +++ /dev/null @@ -1,318 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gtk -open Tags -open GtkBase - -module Box = struct - let cast w : box obj = Object.try_cast w "GtkBox" - external coerce : [>`box] obj -> box obj = "%identity" - external pack_start : - [>`box] obj -> [>`widget] obj -> - expand:bool -> fill:bool -> padding:int -> unit - = "ml_gtk_box_pack_start" - external pack_end : - [>`box] obj -> [>`widget] obj -> - expand:bool -> fill:bool -> padding:int -> unit - = "ml_gtk_box_pack_end" - let pack box ?from:( dir = (`START : pack_type)) - ?(expand=false) ?(fill=true) ?(padding=0) child = - (match dir with `START -> pack_start | `END -> pack_end) - box child ~expand ~fill ~padding - external reorder_child : [>`box] obj -> [>`widget] obj -> pos:int -> unit - = "ml_gtk_box_reorder_child" - external set_homogeneous : [>`box] obj -> bool -> unit - = "ml_gtk_box_set_homogeneous" - external set_spacing : [>`box] obj -> int -> unit - = "ml_gtk_box_set_spacing" - let set ?homogeneous ?spacing w = - may homogeneous ~f:(set_homogeneous w); - may spacing ~f:(set_spacing w) - type packing = - { expand: bool; fill: bool; padding: int; pack_type: pack_type } - external query_child_packing : [>`box] obj -> [>`widget] obj -> packing - = "ml_gtk_box_query_child_packing" - external set_child_packing : - [>`box] obj -> [>`widget] obj -> - ?expand:bool -> ?fill:bool -> ?padding:int -> ?from:pack_type -> unit - = "ml_gtk_box_set_child_packing_bc" "ml_gtk_box_set_child_packing" - external hbox_new : homogeneous:bool -> spacing:int -> box obj - = "ml_gtk_hbox_new" - external vbox_new : homogeneous:bool -> spacing:int -> box obj - = "ml_gtk_vbox_new" - let create (dir : orientation) ?(homogeneous=false) ?(spacing=0) () = - (match dir with `HORIZONTAL -> hbox_new | `VERTICAL -> vbox_new) - ~homogeneous ~spacing -end - -module BBox = struct - (* Omitted defaults setting *) - let cast w : button_box obj = Object.try_cast w "GtkBBox" - external coerce : [>`bbox] obj -> button_box obj = "%identity" - type bbox_style = [ `DEFAULT_STYLE|`SPREAD|`EDGE|`START|`END ] - external get_spacing : [>`bbox] obj -> int = "ml_gtk_button_box_get_spacing" - external get_child_width : [>`bbox] obj -> int - = "ml_gtk_button_box_get_child_min_width" - external get_child_height : [>`bbox] obj -> int - = "ml_gtk_button_box_get_child_min_height" - external get_child_ipadx : [>`bbox] obj -> int - = "ml_gtk_button_box_get_child_ipad_x" - external get_child_ipady : [>`bbox] obj -> int - = "ml_gtk_button_box_get_child_ipad_y" - external get_layout : [>`bbox] obj -> bbox_style - = "ml_gtk_button_box_get_layout_style" - external set_spacing : [>`bbox] obj -> int -> unit - = "ml_gtk_button_box_set_spacing" - external set_child_size : [>`bbox] obj -> width:int -> height:int -> unit - = "ml_gtk_button_box_set_child_size" - external set_child_ipadding : [>`bbox] obj -> x:int -> y:int -> unit - = "ml_gtk_button_box_set_child_ipadding" - external set_layout : [>`bbox] obj -> bbox_style -> unit - = "ml_gtk_button_box_set_layout" - let set_child_size w ?width ?height () = - set_child_size w ~width:(may_default get_child_width w ~opt:width) - ~height:(may_default get_child_height w ~opt:height) - let set_child_ipadding w ?x ?y () = - set_child_ipadding w - ~x:(may_default get_child_ipadx w ~opt:x) - ~y:(may_default get_child_ipady w ~opt:y) - let set ?spacing ?child_width ?child_height ?child_ipadx - ?child_ipady ?layout w = - may spacing ~f:(set_spacing w); - if child_width <> None || child_height <> None then - set_child_size w ?width:child_width ?height:child_height (); - if child_ipadx <> None || child_ipady <> None then - set_child_ipadding w ?x:child_ipadx ?y:child_ipady (); - may layout ~f:(set_layout w) - external set_child_size_default : width:int -> height:int -> unit - = "ml_gtk_button_box_set_child_size_default" - external set_child_ipadding_default : x:int -> y:int -> unit - = "ml_gtk_button_box_set_child_ipadding_default" - external create_hbbox : unit -> button_box obj = "ml_gtk_hbutton_box_new" - external create_vbbox : unit -> button_box obj = "ml_gtk_vbutton_box_new" - let create (dir : orientation) = - if dir = `HORIZONTAL then create_hbbox () else create_vbbox () -end - -module Fixed = struct - let cast w : fixed obj = Object.try_cast w "GtkFixed" - external create : unit -> fixed obj = "ml_gtk_fixed_new" - external put : [>`fixed] obj -> [>`widget] obj -> x:int -> y:int -> unit - = "ml_gtk_fixed_put" - external move : [>`fixed] obj -> [>`widget] obj -> x:int -> y:int -> unit - = "ml_gtk_fixed_move" -end - -module Layout = struct - let cast w : layout obj = Object.try_cast w "GtkLayout" - external create : - [>`adjustment] optobj -> [>`adjustment] optobj -> layout obj - = "ml_gtk_layout_new" - external put : [>`layout] obj -> [>`widget] obj -> x:int -> y:int -> unit - = "ml_gtk_layout_put" - external move : [>`layout] obj -> [>`widget] obj -> x:int -> y:int -> unit - = "ml_gtk_layout_move" - external set_size : [>`layout] obj -> width:int -> height:int -> unit - = "ml_gtk_layout_set_size" - external get_hadjustment : [>`layout] obj -> adjustment obj - = "ml_gtk_layout_get_hadjustment" - external get_vadjustment : [>`layout] obj -> adjustment obj - = "ml_gtk_layout_get_vadjustment" - external set_hadjustment : [>`layout] obj -> [>`adjustment] obj -> unit - = "ml_gtk_layout_set_hadjustment" - external set_vadjustment : [>`layout] obj -> [>`adjustment] obj -> unit - = "ml_gtk_layout_set_vadjustment" - external freeze : [>`layout] obj -> unit - = "ml_gtk_layout_freeze" - external thaw : [>`layout] obj -> unit - = "ml_gtk_layout_thaw" - external get_height : [>`layout] obj -> int - = "ml_gtk_layout_get_height" - external get_width : [>`layout] obj -> int - = "ml_gtk_layout_get_width" - let set_size ?width ?height w = - set_size w ~width:(may_default get_width w ~opt:width) - ~height:(may_default get_height w ~opt:height) -end - - -module Packer = struct - let cast w : packer obj = Object.try_cast w "GtkPacker" - external create : unit -> packer obj = "ml_gtk_packer_new" - external add : - [>`packer] obj -> [>`widget] obj -> - ?side:side_type -> ?anchor:anchor_type -> - ?options:packer_options list -> - ?border_width:int -> ?pad_x:int -> ?pad_y:int -> - ?i_pad_x:int -> ?i_pad_y:int -> unit - = "ml_gtk_packer_add_bc" "ml_gtk_packer_add" - external add_defaults : - [>`packer] obj -> [>`widget] obj -> - ?side:side_type -> ?anchor:anchor_type -> - ?options:packer_options list -> unit - = "ml_gtk_packer_add_defaults" - external set_child_packing : - [>`packer] obj -> [>`widget] obj -> - ?side:side_type -> ?anchor:anchor_type -> - ?options:packer_options list -> - ?border_width:int -> ?pad_x:int -> ?pad_y:int -> - ?i_pad_x:int -> ?i_pad_y:int -> unit - = "ml_gtk_packer_set_child_packing_bc" "ml_gtk_packer_set_child_packing" - external reorder_child : [>`packer] obj -> [>`widget] obj -> pos:int -> unit - = "ml_gtk_packer_reorder_child" - external set_spacing : [>`packer] obj -> int -> unit - = "ml_gtk_packer_set_spacing" - external set_defaults : - [>`packer] obj -> ?border_width:int -> ?pad_x:int -> ?pad_y:int -> - ?i_pad_x:int -> ?i_pad_y:int -> unit -> unit - = "ml_gtk_packer_set_defaults_bc" "ml_gtk_packer_set_defaults" - - let build_options ?(expand=false) ?(fill=`BOTH) () = - (if expand then [`PACK_EXPAND] else []) @ - (match (fill : expand_type) with `NONE -> [] - | `X -> [`FILL_X] - | `Y -> [`FILL_Y] - | `BOTH -> [`FILL_X;`FILL_Y]) -end - -module Paned = struct - let cast w : paned obj = Object.try_cast w "GtkPaned" - external add1 : [>`paned] obj -> [>`widget] obj -> unit - = "ml_gtk_paned_add1" - external add2 : [>`paned] obj -> [>`widget] obj -> unit - = "ml_gtk_paned_add2" - external set_handle_size : [>`paned] obj -> int -> unit - = "ml_gtk_paned_set_handle_size" - external set_gutter_size : [>`paned] obj -> int -> unit - = "ml_gtk_paned_set_gutter_size" - let set ?handle_size ?gutter_size w = - may ~f:(set_handle_size w) handle_size; - may ~f:(set_gutter_size w) gutter_size - external child1 : [>`paned] obj -> widget obj = "ml_gtk_paned_child1" - external child2 : [>`paned] obj -> widget obj = "ml_gtk_paned_child2" - external handle_size : [>`paned] obj -> int = "ml_gtk_paned_handle_size" - external gutter_size : [>`paned] obj -> int = "ml_gtk_paned_handle_size" - external hpaned_new : unit -> paned obj = "ml_gtk_hpaned_new" - external vpaned_new : unit -> paned obj = "ml_gtk_vpaned_new" - let create (dir : orientation) = - if dir = `HORIZONTAL then hpaned_new () else vpaned_new () -end - -module Table = struct - let cast w : table obj = Object.try_cast w "GtkTable" - external create : int -> int -> homogeneous:bool -> table obj - = "ml_gtk_table_new" - let create ~rows:r ~columns:c ?(homogeneous=false) () = - create r c ~homogeneous - external attach : - [>`table] obj -> [>`widget] obj -> left:int -> right:int -> - top:int -> bottom:int -> xoptions:attach_options list -> - yoptions:attach_options list -> xpadding:int -> ypadding:int -> unit - = "ml_gtk_table_attach_bc" "ml_gtk_table_attach" - let has_x : expand_type -> bool = - function `X|`BOTH -> true | `Y|`NONE -> false - let has_y : expand_type -> bool = - function `Y|`BOTH -> true | `X|`NONE -> false - let attach t ~left ~top ?(right=left+1) ?(bottom=top+1) - ?(expand=`NONE) ?(fill=`BOTH) ?(shrink=`NONE) - ?(xpadding=0) ?(ypadding=0) w = - let xoptions = if has_x shrink then [`SHRINK] else [] in - let xoptions = if has_x fill then `FILL::xoptions else xoptions in - let xoptions = if has_x expand then `EXPAND::xoptions else xoptions in - let yoptions = if has_y shrink then [`SHRINK] else [] in - let yoptions = if has_y fill then `FILL::yoptions else yoptions in - let yoptions = if has_y expand then `EXPAND::yoptions else yoptions in - attach t w ~left ~top ~right ~bottom ~xoptions ~yoptions - ~xpadding ~ypadding - external set_row_spacing : [>`table] obj -> int -> int -> unit - = "ml_gtk_table_set_row_spacing" - external set_col_spacing : [>`table] obj -> int -> int -> unit - = "ml_gtk_table_set_col_spacing" - external set_row_spacings : [>`table] obj -> int -> unit - = "ml_gtk_table_set_row_spacings" - external set_col_spacings : [>`table] obj -> int -> unit - = "ml_gtk_table_set_col_spacings" - external set_homogeneous : [>`table] obj -> bool -> unit - = "ml_gtk_table_set_homogeneous" - let set ?homogeneous ?row_spacings ?col_spacings w = - may row_spacings ~f:(set_row_spacings w); - may col_spacings ~f:(set_col_spacings w); - may homogeneous ~f:(set_homogeneous w) -end - -module Notebook = struct - let cast w : notebook obj = Object.try_cast w "GtkNotebook" - external create : unit -> notebook obj = "ml_gtk_notebook_new" - external insert_page : - [>`notebook] obj -> [>`widget] obj -> tab_label:[>`widget] optobj -> - menu_label:[>`widget] optobj -> pos:int -> unit - = "ml_gtk_notebook_insert_page_menu" - (* default is append to end *) - external remove_page : [>`notebook] obj -> int -> unit - = "ml_gtk_notebook_remove_page" - external get_current_page : [>`notebook] obj -> int - = "ml_gtk_notebook_get_current_page" - external set_page : [>`notebook] obj -> int -> unit - = "ml_gtk_notebook_set_page" - external set_tab_pos : [>`notebook] obj -> position -> unit - = "ml_gtk_notebook_set_tab_pos" - external set_homogeneous_tabs : [>`notebook] obj -> bool -> unit - = "ml_gtk_notebook_set_homogeneous_tabs" - external set_show_tabs : [>`notebook] obj -> bool -> unit - = "ml_gtk_notebook_set_show_tabs" - external set_show_border : [>`notebook] obj -> bool -> unit - = "ml_gtk_notebook_set_show_border" - external set_scrollable : [>`notebook] obj -> bool -> unit - = "ml_gtk_notebook_set_scrollable" - external set_tab_border : [>`notebook] obj -> int -> unit - = "ml_gtk_notebook_set_tab_border" - external popup_enable : [>`notebook] obj -> unit - = "ml_gtk_notebook_popup_enable" - external popup_disable : [>`notebook] obj -> unit - = "ml_gtk_notebook_popup_disable" - external get_nth_page : [>`notebook] obj -> int -> widget obj - = "ml_gtk_notebook_get_nth_page" - external page_num : [>`notebook] obj -> [>`widget] obj -> int - = "ml_gtk_notebook_page_num" - external next_page : [>`notebook] obj -> unit - = "ml_gtk_notebook_next_page" - external prev_page : [>`notebook] obj -> unit - = "ml_gtk_notebook_prev_page" - external get_tab_label : [>`notebook] obj -> [>`widget] obj -> widget obj - = "ml_gtk_notebook_get_tab_label" - external set_tab_label : - [>`notebook] obj -> [>`widget] obj -> [>`widget] obj -> unit - = "ml_gtk_notebook_set_tab_label" - external get_menu_label : [>`notebook] obj -> [>`widget] obj -> widget obj - = "ml_gtk_notebook_get_menu_label" - external set_menu_label : - [>`notebook] obj -> [>`widget] obj -> [>`widget] obj -> unit - = "ml_gtk_notebook_set_menu_label" - external reorder_child : [>`notebook] obj -> [>`widget] obj -> int -> unit - = "ml_gtk_notebook_reorder_child" - - let set_popup w = function - true -> popup_enable w - | false -> popup_disable w - let set ?page ?tab_pos ?show_tabs ?homogeneous_tabs - ?show_border ?scrollable ?tab_border ?popup w = - let may_set f = may ~f:(f w) in - may_set set_page page; - may_set set_tab_pos tab_pos; - may_set set_show_tabs show_tabs; - may_set set_homogeneous_tabs homogeneous_tabs; - may_set set_show_border show_border; - may_set set_scrollable scrollable; - may_set set_tab_border tab_border; - may_set set_popup popup - module Signals = struct - open GtkArgv - open GtkSignal - let marshal_page f argv = function - | _ :: INT page :: _ -> f page - | _ -> invalid_arg "GtkPack.Notebook.Signals.marshal_page" - let switch_page : ([>`notebook],_) t = - { name = "switch_page"; marshaller = marshal_page } - end -end diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkRange.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkRange.ml deleted file mode 100644 index b67e49b2e..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkRange.ml +++ /dev/null @@ -1,147 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gtk -open Tags -open GtkBase - -module Progress = struct - let cast w : progress obj = Object.try_cast w "GtkProgress" - external set_show_text : [>`progress] obj -> bool -> unit - = "ml_gtk_progress_set_show_text" - external set_text_alignment : - [>`progress] obj -> ?x:float -> ?y:float -> unit -> unit - = "ml_gtk_progress_set_show_text" - external set_format_string : [>`progress] obj -> string -> unit - = "ml_gtk_progress_set_format_string" - external set_adjustment : [>`progress] obj -> [>`adjustment] obj -> unit - = "ml_gtk_progress_set_adjustment" - external configure : - [>`progress] obj -> current:float -> min:float -> max:float -> unit - = "ml_gtk_progress_configure" - external set_percentage : [>`progress] obj -> float -> unit - = "ml_gtk_progress_set_percentage" - external set_value : [>`progress] obj -> float -> unit - = "ml_gtk_progress_set_value" - external get_value : [>`progress] obj -> float - = "ml_gtk_progress_get_value" - external get_percentage : [>`progress] obj -> float - = "ml_gtk_progress_get_current_percentage" - external set_activity_mode : [>`progress] obj -> bool -> unit - = "ml_gtk_progress_set_activity_mode" - external get_current_text : [>`progress] obj -> string - = "ml_gtk_progress_get_current_text" - external get_adjustment : [>`progress] obj -> adjustment obj - = "ml_gtk_progress_get_adjustment" - let set ?value ?percentage ?activity_mode - ?show_text ?format_string ?text_xalign ?text_yalign w = - may value ~f:(set_value w); - may percentage ~f:(set_percentage w); - may activity_mode ~f:(set_activity_mode w); - may show_text ~f:(set_show_text w); - may format_string ~f:(set_format_string w); - if text_xalign <> None || text_yalign <> None then - set_text_alignment w ?x:text_xalign ?y:text_yalign () -end - -module ProgressBar = struct - let cast w : progress_bar obj = Object.try_cast w "GtkProgressBar" - external create : unit -> progress_bar obj = "ml_gtk_progress_bar_new" - external create_with_adjustment : [>`adjustment] obj -> progress_bar obj - = "ml_gtk_progress_bar_new_with_adjustment" - external set_bar_style : - [>`progressbar] obj -> [`CONTINUOUS|`DISCRETE] -> unit - = "ml_gtk_progress_bar_set_bar_style" - external set_discrete_blocks : [>`progressbar] obj -> int -> unit - = "ml_gtk_progress_bar_set_discrete_blocks" - external set_activity_step : [>`progressbar] obj -> int -> unit - = "ml_gtk_progress_bar_set_activity_step" - external set_activity_blocks : [>`progressbar] obj -> int -> unit - = "ml_gtk_progress_bar_set_activity_blocks" - external set_orientation : - [>`progressbar] obj -> Tags.progress_bar_orientation -> unit - = "ml_gtk_progress_bar_set_orientation" - let set ?bar_style ?discrete_blocks ?activity_step ?activity_blocks w = - let may_set f opt = may opt ~f:(f w) in - may_set set_bar_style bar_style; - may_set set_discrete_blocks discrete_blocks; - may_set set_activity_step activity_step; - may_set set_activity_blocks activity_blocks -end - -module Range = struct - let cast w : range obj = Object.try_cast w "GtkRange" - external coerce : [>`range] obj -> range obj = "%identity" - external get_adjustment : [>`range] obj -> adjustment obj - = "ml_gtk_range_get_adjustment" - external set_adjustment : [>`range] obj -> [>`adjustment] obj -> unit - = "ml_gtk_range_set_adjustment" - external set_update_policy : [>`range] obj -> update_type -> unit - = "ml_gtk_range_set_update_policy" - let set ?adjustment ?update_policy w = - may adjustment ~f:(set_adjustment w); - may update_policy ~f:(set_update_policy w) -end - -module Scale = struct - let cast w : scale obj = Object.try_cast w "GtkScale" - external hscale_new : [>`adjustment] optobj -> scale obj - = "ml_gtk_hscale_new" - external vscale_new : [>`adjustment] optobj -> scale obj - = "ml_gtk_vscale_new" - let create ?adjustment (dir : orientation) = - let create = if dir = `HORIZONTAL then hscale_new else vscale_new in - create (Gpointer.optboxed adjustment) - external set_digits : [>`scale] obj -> int -> unit - = "ml_gtk_scale_set_digits" - external set_draw_value : [>`scale] obj -> bool -> unit - = "ml_gtk_scale_set_draw_value" - external set_value_pos : [>`scale] obj -> position -> unit - = "ml_gtk_scale_set_value_pos" - external get_value_width : [>`scale] obj -> int - = "ml_gtk_scale_get_value_width" - external draw_value : [>`scale] obj -> unit - = "ml_gtk_scale_draw_value" - let set ?digits ?draw_value ?value_pos w = - may digits ~f:(set_digits w); - may draw_value ~f:(set_draw_value w); - may value_pos ~f:(set_value_pos w) -end - -module Scrollbar = struct - let cast w : scrollbar obj = Object.try_cast w "GtkScrollbar" - external hscrollbar_new : [>`adjustment] optobj -> scrollbar obj - = "ml_gtk_hscrollbar_new" - external vscrollbar_new : [>`adjustment] optobj -> scrollbar obj - = "ml_gtk_vscrollbar_new" - let create ?adjustment (dir : orientation) = - let create = if dir = `HORIZONTAL then hscrollbar_new else vscrollbar_new - in create (Gpointer.optboxed adjustment) -end - -module Ruler = struct - let cast w : ruler obj = Object.try_cast w "GtkRuler" - external hruler_new : unit -> ruler obj = "ml_gtk_hruler_new" - external vruler_new : unit -> ruler obj = "ml_gtk_vruler_new" - let create (dir : orientation) = - if dir = `HORIZONTAL then hruler_new () else vruler_new () - external set_metric : [>`ruler] obj -> metric_type -> unit - = "ml_gtk_ruler_set_metric" - external set_range : - [>`ruler] obj -> - lower:float -> upper:float -> position:float -> max_size:float -> unit - = "ml_gtk_ruler_set_range" - external get_lower : [>`ruler] obj -> float = "ml_gtk_ruler_get_lower" - external get_upper : [>`ruler] obj -> float = "ml_gtk_ruler_get_upper" - external get_position : [>`ruler] obj -> float = "ml_gtk_ruler_get_position" - external get_max_size : [>`ruler] obj -> float = "ml_gtk_ruler_get_max_size" - let set_range ?lower ?upper ?position ?max_size w = - set_range w ~lower:(may_default get_lower w ~opt:lower) - ~upper:(may_default get_upper w ~opt:upper) - ~position:(may_default get_position w ~opt:position) - ~max_size:(may_default get_max_size w ~opt:max_size) - let set ?metric ?lower ?upper ?position ?max_size w = - may metric ~f:(set_metric w); - if lower <> None || upper <> None || position <> None || max_size <> None - then set_range w ?lower ?upper ?position ?max_size -end diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkSignal.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkSignal.ml deleted file mode 100644 index 8fa460288..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkSignal.ml +++ /dev/null @@ -1,65 +0,0 @@ -(* $Id$ *) - -open Gtk - -type id -type ('a,'b) t = - { name: string; - marshaller: ('b -> GtkArgv.t -> GtkArgv.data list -> unit) } - -let enter_callback = ref (fun () -> ()) -and exit_callback = ref (fun () -> ()) - -let stop_emit_ref = ref false -let stop_emit () = stop_emit_ref := true - -type saved_state = State of bool -let push_callback () = - !enter_callback (); - let old = !stop_emit_ref in - stop_emit_ref := false; - State old - -let pop_callback (State old) = - let res = !stop_emit_ref in - stop_emit_ref := old; - !exit_callback (); - res - -external connect : - 'a obj -> name:string -> callback:(GtkArgv.t -> unit) -> after:bool -> id - = "ml_gtk_signal_connect" -external emit_stop_by_name : 'a obj -> name:string -> unit - = "ml_gtk_signal_emit_stop_by_name" -let connect ~(sgn : ('a, _) t) ~callback ?(after=false) (obj : 'a obj) = - let callback argv = - let old = push_callback () in - let exn = - try sgn.marshaller callback argv (GtkArgv.get_args argv); None - with exn -> Some exn - in - if pop_callback old then emit_stop_by_name obj ~name:sgn.name; - Gaux.may ~f:raise exn - in - connect obj ~name:sgn.name ~callback ~after -external disconnect : 'a obj -> id -> unit - = "ml_gtk_signal_disconnect" -external handler_block : 'a obj -> id -> unit - = "ml_gtk_signal_handler_block" -external handler_unblock : 'a obj -> id -> unit - = "ml_gtk_signal_handler_unblock" - -let marshal_unit f _ _ = f () -let marshal_int f _ = function - | GtkArgv.INT n :: _ -> f n - | _ -> invalid_arg "GtkSignal.marshal_int" - -let emit (obj : 'a obj) ~(sgn : ('a, 'b) t) - ~(emitter : 'a obj -> name:string -> 'b) = - emitter obj ~name:sgn.name -external emit_none : 'a obj -> name:string -> unit -> unit - = "ml_gtk_signal_emit_none" -let emit_unit obj ~sgn = emit obj ~emitter:emit_none ~sgn () -external emit_int : 'a obj -> name:string -> int -> unit - = "ml_gtk_signal_emit_int" -let emit_int = emit ~emitter:emit_int diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkSignal.mli b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkSignal.mli deleted file mode 100644 index 0ef2ab2ea..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkSignal.mli +++ /dev/null @@ -1,45 +0,0 @@ -(* $Id$ *) - -open Gtk - -type id -type ('a,'b) t = - { name: string; - marshaller: ('b -> GtkArgv.t -> GtkArgv.data list -> unit) } - -val stop_emit : unit -> unit - (* Call [stop_emit ()] in a callback to prohibit further handling - of the current signal invocation, by calling [emit_stop_by_name]. - Be careful about where you use it, since the concept of current - signal may be tricky. *) - -val connect : - sgn:('a, 'b) t -> callback:'b -> ?after:bool -> 'a obj -> id - (* You may use [stop_emit] inside the callback *) - -external disconnect : 'a obj -> id -> unit - = "ml_gtk_signal_disconnect" -external emit_stop_by_name : 'a obj -> name:string -> unit - = "ml_gtk_signal_emit_stop_by_name" - (* Unsafe: use [stop_emit] instead. *) -external handler_block : 'a obj -> id -> unit - = "ml_gtk_signal_handler_block" -external handler_unblock : 'a obj -> id -> unit - = "ml_gtk_signal_handler_unblock" - -(* Some marshaller functions, to build signals *) -val marshal_unit : (unit -> unit) -> GtkArgv.t -> GtkArgv.data list -> unit -val marshal_int : (int -> unit) -> GtkArgv.t -> GtkArgv.data list -> unit - -(* Emitter functions *) -val emit : - 'a obj -> sgn:('a, 'b) t -> emitter:('a obj -> name:string -> 'b) -> 'b -val emit_unit : 'a obj -> sgn:('a, unit -> unit) t -> unit -val emit_int : 'a obj -> sgn:('a, int -> unit) t -> int -> unit - -(* Internal functions. *) -val enter_callback : (unit -> unit) ref -val exit_callback : (unit -> unit) ref -type saved_state -val push_callback : unit -> saved_state -val pop_callback : saved_state -> bool diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkThInit.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkThInit.ml deleted file mode 100644 index 517f80be4..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkThInit.ml +++ /dev/null @@ -1,5 +0,0 @@ -(* $Id$ *) - -(* Start the main thread in a threaded toplevel *) - -let thread = GtkThread.start () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkThread.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkThread.ml deleted file mode 100644 index 3ab577e3e..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkThread.ml +++ /dev/null @@ -1,33 +0,0 @@ -(* $Id$ *) - -open GtkMain - -(* We check first whether there are some event pending, and run - some iterations. We then need to delay, thus focing a thread switch. *) - -let main () = - try - let loop = (Glib.Main.create true) in - Main.loops := loop :: !Main.loops; - while Glib.Main.is_running loop do - let i = ref 0 in - while !i < 100 && Glib.Main.pending () do - Glib.Main.iteration true; - incr i - done; - Thread.delay 0.001 - done; - Main.loops := List.tl !Main.loops - with exn -> - Main.loops := List.tl !Main.loops; - raise exn - -let start = Thread.create main - -let _ = - let mutex = Mutex.create () in - let depth = ref 0 in - GtkSignal.enter_callback := - (fun () -> if !depth = 0 then Mutex.lock mutex; incr depth); - GtkSignal.exit_callback := - (fun () -> decr depth; if !depth = 0 then Mutex.unlock mutex) diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkTree.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkTree.ml deleted file mode 100644 index 926074167..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkTree.ml +++ /dev/null @@ -1,122 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gtk -open Tags -open GtkBase - -module TreeItem = struct - let cast w : tree_item obj = Object.try_cast w "GtkTreeItem" - external create : unit -> tree_item obj = "ml_gtk_tree_item_new" - external create_with_label : string -> tree_item obj - = "ml_gtk_tree_item_new_with_label" - let create ?label () = - match label with None -> create () - | Some label -> create_with_label label - external set_subtree : [>`treeitem] obj -> [>`widget] obj -> unit - = "ml_gtk_tree_item_set_subtree" - external remove_subtree : [>`treeitem] obj -> unit - = "ml_gtk_tree_item_remove_subtree" - external expand : [>`treeitem] obj -> unit - = "ml_gtk_tree_item_expand" - external collapse : [>`treeitem] obj -> unit - = "ml_gtk_tree_item_collapse" - external subtree : [>`treeitem] obj -> tree obj - = "ml_GTK_TREE_ITEM_SUBTREE" - module Signals = struct - open GtkSignal - let expand : ([>`treeitem],_) t = - { name = "expand"; marshaller = marshal_unit } - let collapse : ([>`treeitem],_) t = - { name = "collapse"; marshaller = marshal_unit } - end -end - -module Tree = struct - let cast w : tree obj = Object.try_cast w "GtkTree" - external coerce : [>`tree] obj -> tree obj = "%identity" - external create : unit -> tree obj = "ml_gtk_tree_new" - external insert : [>`tree] obj -> [>`treeitem] obj -> pos:int -> unit - = "ml_gtk_tree_insert" - external remove_items : [>`tree] obj -> [>`treeitem] obj list -> unit - = "ml_gtk_tree_remove_items" - external clear_items : [>`tree] obj -> start:int -> stop:int -> unit - = "ml_gtk_tree_clear_items" - external select_item : [>`tree] obj -> pos:int -> unit - = "ml_gtk_tree_select_item" - external unselect_item : [>`tree] obj -> pos:int -> unit - = "ml_gtk_tree_unselect_item" - external child_position : [>`tree] obj -> [>`treeitem] obj -> int - = "ml_gtk_tree_child_position" - external set_selection_mode : [>`tree] obj -> selection_mode -> unit - = "ml_gtk_tree_set_selection_mode" - external set_view_mode : [>`tree] obj -> [`LINE|`ITEM] -> unit - = "ml_gtk_tree_set_view_mode" - external set_view_lines : [>`tree] obj -> bool -> unit - = "ml_gtk_tree_set_view_lines" - external selection : [>`tree] obj -> tree_item obj list = - "ml_gtk_tree_selection" - let set ?selection_mode ?view_mode ?view_lines w = - let may_set f = may ~f:(f w) in - may_set set_selection_mode selection_mode; - may_set set_view_mode view_mode; - may_set set_view_lines view_lines - module Signals = struct - open GtkSignal - let selection_changed : ([>`tree],_) t = - { name = "selection_changed"; marshaller = marshal_unit } - let select_child : ([>`tree],_) t = - { name = "select_child"; marshaller = Widget.Signals.marshal } - let unselect_child : ([>`tree],_) t = - { name = "unselect_child"; marshaller = Widget.Signals.marshal } - end -end -(* -module CTree = struct - type t - type node = [`ctree] obj * t - let cast w : ctree obj = Object.try_cast w "GtkCTree" - external create : cols:int -> treecol:int -> ctree obj = "ml_gtk_ctree_new" - external insert_node : - [>`ctree] obj -> ?parent:node -> ?sibling:node -> - titles:optstring array -> - spacing:int -> ?pclosed:Gdk.pixmap -> ?mclosed:Gdk.bitmap obj -> - ?popened:Gdk.pixmap -> ?mopened:Gdk.bitmap obj -> - is_leaf:bool -> expanded:bool -> node - = "ml_gtk_ctree_insert_node_bc" "ml_gtk_ctree_insert_node" - let insert_node' - w ?parent ?sibling ?(spacing = 0) ?(is_leaf = true) - ?(expanded = false) - ?pclosed ?mclosed ?popened ?mopened titles = - let len = GtkList.CList.get_columns w in - if List.length titles > len then invalid_arg "CTree.insert_node"; - let arr = Array.create ~len None in - List.fold_left titles ~acc:0 - ~f:(fun ~acc text -> arr.(acc) <- Some text; acc+1); - insert_node w - ?parent ?sibling ~titles:(Array.map ~f:optstring arr) - ~spacing ~is_leaf ~expanded - ?pclosed ?mclosed ?popened ?mopened - external node_set_row_data : [>`ctree] obj -> node:node -> Obj.t -> unit - = "ml_gtk_ctree_node_set_row_data" - external node_get_row_data : [>`ctree] obj -> node:node -> Obj.t - = "ml_gtk_ctree_node_get_row_data" - external set_indent : [>`ctree] obj -> int -> unit - = "ml_gtk_ctree_set_indent" - module Signals = struct - open GtkSignal - let marshal_select f argv = - let node : node = - match GtkArgv.get_pointer argv ~pos:0 with - Some p -> Obj.magic p - | None -> invalid_arg "GtkTree.CTree.Signals.marshal_select" - in - f ~node ~column:(GtkArgv.get_int argv ~pos:1) - - let tree_select_row : ([>`ctree],_) t = - { name = "tree_select_row"; marshaller = marshal_select } - let tree_unselect_row : ([>`ctree],_) t = - { name = "tree_unselect_row"; marshaller = marshal_select } - end -end -*) diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkWindow.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkWindow.ml deleted file mode 100644 index ffe00e921..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkWindow.ml +++ /dev/null @@ -1,189 +0,0 @@ -(* $Id$ *) - -open Gaux -open Gtk -open Tags -open GtkBase - -module Window = struct - let cast w : window obj = Object.try_cast w "GtkWindow" - external coerce : [>`window] obj -> window obj = "%identity" - external create : window_type -> window obj = "ml_gtk_window_new" - external set_title : [>`window] obj -> string -> unit - = "ml_gtk_window_set_title" - external set_wmclass : [>`window] obj -> name:string -> clas:string -> unit - = "ml_gtk_window_set_title" - external get_wmclass_name : [>`window] obj -> string - = "ml_gtk_window_get_wmclass_name" - external get_wmclass_class : [>`window] obj -> string - = "ml_gtk_window_get_wmclass_class" - (* set_focus/default are called by Widget.grab_focus/default *) - external set_focus : [>`window] obj -> [>`widget] obj -> unit - = "ml_gtk_window_set_focus" - external set_default : [>`window] obj -> [>`widget] obj -> unit - = "ml_gtk_window_set_default" - external set_policy : - [>`window] obj -> - allow_shrink:bool -> allow_grow:bool -> auto_shrink:bool -> unit - = "ml_gtk_window_set_policy" - external get_allow_shrink : [>`window] obj -> bool - = "ml_gtk_window_get_allow_shrink" - external get_allow_grow : [>`window] obj -> bool - = "ml_gtk_window_get_allow_grow" - external get_auto_shrink : [>`window] obj -> bool - = "ml_gtk_window_get_auto_shrink" - external activate_focus : [>`window] obj -> bool - = "ml_gtk_window_activate_focus" - external activate_default : [>`window] obj -> bool - = "ml_gtk_window_activate_default" - external set_modal : [>`window] obj -> bool -> unit - = "ml_gtk_window_set_modal" - external set_default_size : - [>`window] obj -> width:int -> height:int -> unit - = "ml_gtk_window_set_default_size" - external set_position : [>`window] obj -> window_position -> unit - = "ml_gtk_window_set_position" - external set_transient_for : [>`window] obj ->[>`window] obj -> unit - = "ml_gtk_window_set_transient_for" - - let set_wmclass ?name ?clas:wm_class w = - set_wmclass w ~name:(may_default get_wmclass_name w ~opt:name) - ~clas:(may_default get_wmclass_class w ~opt:wm_class) - let set_policy ?allow_shrink ?allow_grow ?auto_shrink w = - set_policy w - ~allow_shrink:(may_default get_allow_shrink w ~opt:allow_shrink) - ~allow_grow:(may_default get_allow_grow w ~opt:allow_grow) - ~auto_shrink:(may_default get_auto_shrink w ~opt:auto_shrink) - let set ?title ?wm_name ?wm_class ?position ?allow_shrink ?allow_grow - ?auto_shrink ?modal ?(x = -2) ?(y = -2) w = - may title ~f:(set_title w); - if wm_name <> None || wm_class <> None then - set_wmclass w ?name:wm_name ?clas:wm_class; - may position ~f:(set_position w); - if allow_shrink <> None || allow_grow <> None || auto_shrink <> None then - set_policy w ?allow_shrink ?allow_grow ?auto_shrink; - may ~f:(set_modal w) modal; - if x <> -2 || y <> -2 then Widget.set_uposition w ~x ~y - external add_accel_group : [>`window] obj -> accel_group -> unit - = "ml_gtk_window_add_accel_group" - external remove_accel_group : - [>`window] obj -> accel_group -> unit - = "ml_gtk_window_remove_accel_group" - external activate_focus : [>`window] obj -> unit - = "ml_gtk_window_activate_focus" - external activate_default : [>`window] obj -> unit - = "ml_gtk_window_activate_default" - module Signals = struct - open GtkSignal - let move_resize : ([>`window],_) t = - { name = "move_resize"; marshaller = marshal_unit } - let set_focus : ([>`window],_) t = - { name = "set_focus"; marshaller = Widget.Signals.marshal_opt } - end -end - -module Dialog = struct - let cast w : dialog obj = Object.try_cast w "GtkDialog" - external coerce : [>`dialog] obj -> dialog obj = "%identity" - external create : unit -> dialog obj = "ml_gtk_dialog_new" - external action_area : [>`dialog] obj -> box obj - = "ml_GtkDialog_action_area" - external vbox : [>`dialog] obj -> box obj - = "ml_GtkDialog_vbox" -end - -module InputDialog = struct - let cast w : input_dialog obj = Object.try_cast w "GtkInputDialog" - external create : unit -> input_dialog obj = "ml_gtk_input_dialog_new" - module Signals = struct - open GtkSignal - let enable_device : ([>`inputdialog],_) t = - { name = "enable_device"; marshaller = marshal_int } - let disable_device : ([>`inputdialog],_) t = - { name = "disable_device"; marshaller = marshal_int } - end -end - -module FileSelection = struct - let cast w : file_selection obj = Object.try_cast w "GtkFileSelection" - external create : string -> file_selection obj = "ml_gtk_file_selection_new" - external set_filename : [>`filesel] obj -> string -> unit - = "ml_gtk_file_selection_set_filename" - external get_filename : [>`filesel] obj -> string - = "ml_gtk_file_selection_get_filename" - external show_fileop_buttons : [>`filesel] obj -> unit - = "ml_gtk_file_selection_show_fileop_buttons" - external hide_fileop_buttons : [>`filesel] obj -> unit - = "ml_gtk_file_selection_hide_fileop_buttons" - external get_ok_button : [>`filesel] obj -> button obj - = "ml_gtk_file_selection_get_ok_button" - external get_cancel_button : [>`filesel] obj -> button obj - = "ml_gtk_file_selection_get_cancel_button" - external get_help_button : [>`filesel] obj -> button obj - = "ml_gtk_file_selection_get_help_button" - let set_fileop_buttons w = function - true -> show_fileop_buttons w - | false -> hide_fileop_buttons w - let set ?filename ?fileop_buttons w = - may filename ~f:(set_filename w); - may fileop_buttons ~f:(set_fileop_buttons w) -end - -module FontSelectionDialog = struct - let cast w : font_selection_dialog obj = - Object.try_cast w "GtkFontSelectionDialog" - external create : ?title:string -> unit -> font_selection_dialog obj - = "ml_gtk_font_selection_dialog_new" - external font_selection : [>`fontseldialog] obj -> font_selection obj - = "ml_gtk_font_selection_dialog_fontsel" - external ok_button : [>`fontseldialog] obj -> button obj - = "ml_gtk_font_selection_dialog_ok_button" - external apply_button : [>`fontseldialog] obj -> button obj - = "ml_gtk_font_selection_dialog_apply_button" - external cancel_button : [>`fontseldialog] obj -> button obj - = "ml_gtk_font_selection_dialog_cancel_button" -(* - type null_terminated - let null_terminated arg : null_terminated = - match arg with None -> Obj.magic Gpointer.raw_null - | Some l -> - let len = List.length l in - let arr = Array.create (len + 1) "" in - let rec loop i = function - [] -> arr.(i) <- Obj.magic Gpointer.raw_null - | s::l -> arr.(i) <- s; loop (i+1) l - in loop 0 l; - Obj.magic (arr : string array) - external get_font : [>`fontseldialog] obj -> Gdk.font - = "ml_gtk_font_selection_dialog_get_font" - let get_font w = - try Some (get_font w) with Gpointer.Null -> None - external get_font_name : [>`fontseldialog] obj -> string - = "ml_gtk_font_selection_dialog_get_font_name" - let get_font_name w = - try Some (get_font_name w) with Gpointer.Null -> None - external set_font_name : [>`fontseldialog] obj -> string -> unit - = "ml_gtk_font_selection_dialog_set_font_name" - external set_filter : - [>`fontseldialog] obj -> font_filter_type -> font_type list -> - null_terminated -> null_terminated -> null_terminated -> - null_terminated -> null_terminated -> null_terminated -> unit - = "ml_gtk_font_selection_dialog_set_filter_bc" - "ml_gtk_font_selection_dialog_set_filter" - let set_filter w ?kind:(tl=[`ALL]) ?foundry - ?weight ?slant ?setwidth ?spacing ?charset filter = - set_filter w filter tl (null_terminated foundry) - (null_terminated weight) (null_terminated slant) - (null_terminated setwidth) (null_terminated spacing) - (null_terminated charset) - external get_preview_text : [>`fontseldialog] obj -> string - = "ml_gtk_font_selection_dialog_get_preview_text" - external set_preview_text : [>`fontseldialog] obj -> string -> unit - = "ml_gtk_font_selection_dialog_set_preview_text" -*) -end - -module Plug = struct - let cast w : plug obj = Object.try_cast w "GtkPlug" - external create : Gdk.xid -> plug obj = "ml_gtk_plug_new" -end diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkXmHTML.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkXmHTML.ml deleted file mode 100644 index 3bf5791a4..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkXmHTML.ml +++ /dev/null @@ -1,109 +0,0 @@ -(* $Id$ *) - -open Gtk - -type string_direction = [ - | `R_TO_L - | `L_TO_R -] - -type position = [ - | `END - | `CENTER - | `BEGINNING -] - -type line_type = [ - | `SOLID - | `DASHED - | `SINGLE - | `DOUBLE - | `STRIKE - | `UNDER - | `NONE -] - -type dither_type = [ - | `QUICK - | `BEST - | `FAST - | `SLOW - | `DISABLED -] - -type xmhtml = [`widget|`container|`xmhtml] - -external create : unit -> xmhtml obj = "ml_gtk_xmhtml_new" -external freeze : [> `xmhtml] obj -> unit = "ml_gtk_xmhtml_freeze" -external thaw : [> `xmhtml] obj -> unit = "ml_gtk_xmhtml_thaw" -external source : [> `xmhtml] obj -> string -> unit = "ml_gtk_xmhtml_source" -(* external get_source : [> `xmhtml] obj -> string = "ml_gtk_xmhtml_get_source" *) -external set_string_direction : [> `xmhtml] obj -> string_direction -> unit - = "ml_gtk_xmhtml_set_string_direction" -external set_alignment : [> `xmhtml] obj -> position -> unit - = "ml_gtk_xmhtml_set_alignment" -(* external set_outline : [> `xmhtml] obj -> bool -> unit - = "ml_gtk_xmhtml_outline" *) -external set_font_familty : - [> `xmhtml] obj -> family:string -> sizes:string -> unit - = "ml_gtk_xmhtml_set_font_familty" -external set_font_familty_fixed : - [> `xmhtml] obj -> family:string -> sizes:string -> unit - = "ml_gtk_xmhtml_set_font_familty_fixed" -external set_font_charset : [> `xmhtml] obj -> string -> unit - = "ml_gtk_xmhtml_set_font_charset" -external set_allow_body_colors : [> `xmhtml] obj -> bool -> unit - = "ml_gtk_xmhtml_set_allow_body_colors" -external set_hilight_on_enter : [> `xmhtml] obj -> bool -> unit - = "ml_gtk_xmhtml_set_hilight_on_enter" -external set_anchor_underline_type : [> `xmhtml] obj -> line_type list -> unit - = "ml_gtk_xmhtml_set_anchor_underline_type" -external set_anchor_visited_underline_type : - [> `xmhtml] obj -> line_type list -> unit - = "ml_gtk_xmhtml_set_anchor_visited_underline_type" -external set_anchor_target_underline_type : - [> `xmhtml] obj -> line_type list -> unit - = "ml_gtk_xmhtml_set_anchor_target_underline_type" -external set_allow_color_switching : [> `xmhtml] obj -> bool -> unit - = "ml_gtk_xmhtml_set_allow_color_switching" -external set_dithering : [> `xmhtml] obj -> dither_type -> unit - = "ml_gtk_xmhtml_set_dithering" -external set_allow_font_switching : [> `xmhtml] obj -> bool -> unit - = "ml_gtk_xmhtml_set_allow_font_switching" -external set_max_image_colors : [> `xmhtml] obj -> int -> unit - = "ml_gtk_xmhtml_set_max_image_colors" -external set_allow_images : [> `xmhtml] obj -> bool -> unit - = "ml_gtk_xmhtml_set_allow_images" -external set_plc_intervals : - [> `xmhtml] obj -> min:int -> max:int -> default:int -> unit - = "ml_gtk_xmhtml_set_plc_intervals" -(* -external set_def_body_image_url : [> `xmhtml] obj -> string -> unit - = "ml_gtk_xmhtml_set_def_body_image_url" -*) -external set_anchor_buttons : [> `xmhtml] obj -> bool -> unit - = "ml_gtk_xmhtml_set_anchor_buttons" -external set_anchor_cursor : [> `xmhtml] obj -> Gdk.cursor option -> unit - = "ml_gtk_xmhtml_set_anchor_cursor" -external set_topline : [> `xmhtml] obj -> int -> unit - = "ml_gtk_xmhtml_set_topline" -external get_topline : [> `xmhtml] obj -> int - = "ml_gtk_xmhtml_get_topline" -external set_freeze_animations : [> `xmhtml] obj -> bool -> unit - = "ml_gtk_xmhtml_set_freeze_animations" -external set_screen_gamma : [> `xmhtml] obj -> float -> unit - = "ml_gtk_xmhtml_set_screen_gamma" -external set_perfect_colors : [> `xmhtml] obj -> bool -> unit - = "ml_gtk_xmhtml_set_perfect_colors" -external set_uncompress_command : [> `xmhtml] obj -> string -> unit - = "ml_gtk_xmhtml_set_uncompress_command" -external set_strict_checking : [> `xmhtml] obj -> bool -> unit - = "ml_gtk_xmhtml_set_strict_checking" -external set_bad_html_warnings : [> `xmhtml] obj -> bool -> unit - = "ml_gtk_xmhtml_set_bad_html_warnings" -external set_allow_form_coloring : [> `xmhtml] obj -> bool -> unit - = "ml_gtk_xmhtml_set_allow_form_coloring" -external set_imagemap_draw : [> `xmhtml] obj -> bool -> unit - = "ml_gtk_xmhtml_set_imagemap_draw" -external set_alpha_processing : [> `xmhtml] obj -> bool -> unit - = "ml_gtk_xmhtml_set_alpha_processing" diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtk_tags.var b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtk_tags.var deleted file mode 100644 index eb4ead78d..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtk_tags.var +++ /dev/null @@ -1,171 +0,0 @@ -(* $Id$ *) - -exception ml_raise_gtk - -type arrow_type = "GTK_ARROW_" - [ `UP | `DOWN | `LEFT | `RIGHT ] - -type attach_options = "GTK_" - [ `EXPAND | `SHRINK | `FILL ] - -type button_box_style = "GTK_BUTTONBOX_" - [ `DEFAULT_STYLE | `SPREAD | `EDGE | `START | `END ] - -type direction_type = "GTK_DIR_" - [ `TAB_FORWARD | `TAB_BACKWARD | `UP | `DOWN | `LEFT | `RIGHT ] - -type justification = "GTK_JUSTIFY_" - [ `LEFT | `RIGHT | `CENTER | `FILL ] - -type match_type = "GTK_MATCH_" - [ `ALL | `ALL_TAIL | `HEAD | `TAIL | `EXACT | `LAST ] - -type metric_type = "GTK_" - [ `PIXELS | `INCHES | `CENTIMETERS ] - -type orientation = "GTK_ORIENTATION_" - [ `HORIZONTAL | `VERTICAL ] - -type corner_type = "GTK_CORNER_" - [ `TOP_LEFT | `BOTTOM_LEFT | `TOP_RIGHT | `BOTTOM_RIGHT ] - -type pack_type = "GTK_PACK_" - [ `START | `END ] - -type path_type = "GTK_PATH_" - [ `WIDGET | `WIDGET_CLASS | `CLASS ] - -type policy_type = "GTK_POLICY_" - [ `ALWAYS | `AUTOMATIC | `NEVER ] - -type position = "GTK_POS_" - [ `LEFT | `RIGHT | `TOP | `BOTTOM ] - -type preview_type = "GTK_PREVIEW_" - [ `COLOR | `GRAYSCALE ] - -type relief_style = "GTK_RELIEF_" - [ `NORMAL | `HALF | `NONE ] - -type resize_mode = "GTK_RESIZE_" - [ `PARENT | `QUEUE | `IMMEDIATE ] - -type signal_run_type = "GTK_RUN_" - [ `FIRST | `LAST | `BOTH | `NO_RECURSE | `ACTION | `NO_HOOKS ] - -type scroll_type = "GTK_SCROLL_" - [ `NONE | `STEP_FORWARD | `STEP_BACKWARD | `PAGE_BACKWARD - | `PAGE_FORWARD | `JUMP ] - -type selection_mode = "GTK_SELECTION_" - [ `SINGLE | `BROWSE | `MULTIPLE | `EXTENDED ] - -type shadow_type = "GTK_SHADOW_" - [ `NONE | `IN | `OUT | `ETCHED_IN | `ETCHED_OUT ] - -type state_type = "GTK_STATE_" - [ `NORMAL | `ACTIVE | `PRELIGHT | `SELECTED | `INSENSITIVE ] - -type submenu_direction = "GTK_DIRECTION_" - [ `LEFT | `RIGHT ] - -type submenu_placement = "GTK_" - [ `TOP_BOTTOM | `LEFT_RIGHT ] - -type toolbar_style = "GTK_TOOLBAR_" - [ `ICONS | `TEXT | `BOTH ] - -type trough_type = "GTK_TROUGH_" - [ `NONE | `START | `END | `JUMP ] - -type update_type = "GTK_UPDATE_" - [ `CONTINUOUS | `DISCONTINUOUS | `DELAYED ] - -type visibility = "GTK_VISIBILITY_" - [ `NONE | `PARTIAL | `FULL ] - -type window_position = "GTK_WIN_POS_" - [ `NONE | `CENTER | `MOUSE | `CENTER_ALWAYS ] - -type window_type = "GTK_WINDOW_" - [ `TOPLEVEL | `DIALOG | `POPUP ] - -type sort_type = "GTK_SORT_" - [ `ASCENDING | `DESCENDING ] - - -type fundamental_type = "GTK_TYPE_" - [ `INVALID | `NONE | `CHAR | `BOOL | `INT | `UINT | `LONG | `ULONG - | `FLOAT | `DOUBLE | `STRING | `ENUM | `FLAGS | `BOXED | `FOREIGN - | `CALLBACK | `ARGS | `POINTER | `SIGNAL | `C_CALLBACK | `OBJECT ] - -type cell_type = "GTK_CELL_" - [ `EMPTY | `TEXT | `PIXMAP | `PIXTEXT | `WIDGET ] - -type toolbar_child = "GTK_TOOLBAR_CHILD_" - [ `SPACE | `BUTTON | `TOGGLEBUTTON | `RADIOBUTTON | `WIDGET ] - -type toolbar_space_style = "GTK_TOOLBAR_SPACE_" - [ `EMPTY | `LINE ] - -type tree_view_mode = "GTK_TREE_VIEW_" - [ `LINE | `ITEM ] - -type spin_type = "GTK_SPIN_" - [ `STEP_FORWARD | `STEP_BACKWARD | `PAGE_FORWARD | `PAGE_BACKWARD - | `HOME | `END | `USER_DEFINED ] - -type accel_flag = "GTK_ACCEL_" - [ `VISIBLE | `SIGNAL_VISIBLE | `LOCKED ] - -type packer_options = "GTK_" - [ `PACK_EXPAND | `FILL_X | `FILL_Y ] - -type side_type = "GTK_SIDE_" - [ `TOP | `BOTTOM | `LEFT | `RIGHT ] - -type anchor_type = "GTK_ANCHOR_" - [ `CENTER | `NORTH | `NW | `NE | `SOUTH | `SW | `SE | `WEST | `EAST ] - -type button_action = "GTK_BUTTON_" - [ `SELECTS | `DRAGS | `EXPANDS ] - -type calendar_display_options = "GTK_CALENDAR_" - [ `SHOW_HEADING | `SHOW_DAY_NAMES | `NO_MONTH_CHANGE | `SHOW_WEEK_NUMBERS - | `WEEK_START_MONDAY ] - -type progress_bar_style = "GTK_PROGRESS_" - [ `CONTINUOUS | `DISCRETE ] - -type progress_bar_orientation = "GTK_PROGRESS_" - [ `LEFT_TO_RIGHT | `RIGHT_TO_LEFT | `BOTTOM_TO_TOP | `TOP_TO_BOTTOM ] - -type dest_defaults = "GTK_DEST_DEFAULT_" - [ `MOTION | `HIGHLIGHT | `DROP | `ALL ] - -type target_flags = "GTK_TARGET_" - [ `SAME_APP | `SAME_WIDGET ] - -type font_metric_type = "GTK_FONT_METRIC_" - [ `PIXELS | `POINTS ] - -type font_type = "GTK_FONT_" - [ `BITMAP | `SCALABLE | `SCALABLE_BITMAP | `ALL ] - -type font_filter_type = "GTK_FONT_FILTER_" - [ `BASE | `USER ] - -(* -type tree_pos = "GTK_CTREE_POS_" - [ `BEFORE | `AS_CHILD | `AFTER ] - -type tree_line_style = "GTK_CTREE_LINES_" - [ `NONE | `SOLID | `DOTTED | `TABBED ] - -type tree_expander_style = "GTK_CTREE_EXPANDER_" - [ `NONE | `SQUARE | `TRIANGLE | `CIRCULAR ] - -type tree_expansion_type = "GTK_CTREE_EXPANSION_" - [ `EXPAND | `EXPAND_RECURSIVE | `COLLAPSE | `COLLAPSE_RECURSIVE - | `TOGGLE | `TOGGLE_RECURSIVE ] -*) diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkgl_tags.var b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkgl_tags.var deleted file mode 100644 index 57a9f7365..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkgl_tags.var +++ /dev/null @@ -1,19 +0,0 @@ -(* $Id$ *) - -type visual_options = "GDK_GL_" [ - | `USE_GL - | `BUFFER_SIZE - | `LEVEL - | `RGBA - | `DOUBLEBUFFER - | `STEREO - | `AUX_BUFFERS - | `RED_SIZE - | `GREEN_SIZE - | `BLUE_SIZE - | `ALPHA_SIZE - | `DEPTH_SIZE - | `STENCIL_SIZE - | `ACCUM_GREEN_SIZE - | `ACCUM_ALPHA_SIZE -] diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkxmhtml_tags.var b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkxmhtml_tags.var deleted file mode 100644 index ad9393103..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/gtkxmhtml_tags.var +++ /dev/null @@ -1,30 +0,0 @@ -(* $Id$ *) - -type string_direction = "TSTRING_DIRECTION_" [ - | `R_TO_L - | `L_TO_R -] - -type position = "TALIGNMENT_" [ - | `END - | `CENTER - | `BEGINNING -] - -type line_type = "LINE_" [ - | `SOLID - | `DASHED - | `SINGLE - | `DOUBLE - | `STRIKE - | `UNDER - | `NONE "NO_LINE" -] - -type dither_type = "Xm" [ - | `QUICK - | `BEST - | `FAST - | `SLOW - | `DISABLED -] diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/lablgl.patch b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/lablgl.patch deleted file mode 100644 index c48de24d7..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/lablgl.patch +++ /dev/null @@ -1,112 +0,0 @@ -Index: Makefile -=================================================================== -RCS file: /staff2/garrigue/repos/lablGL/Makefile,v -retrieving revision 1.33 -retrieving revision 1.34 -diff -c -r1.33 -r1.34 -*** Makefile 1998/09/17 03:16:06 1.33 ---- Makefile 1999/06/18 07:39:08 1.34 -*************** -*** 12,22 **** - OTHERLIBS=-L$(LABLTKDIR) -llabltk41 $(LIBS) - - # Files -! MLOBJS = raw.cmo togl.cmo \ - gl.cmo glLight.cmo glList.cmo glMap.cmo \ - glMat.cmo glMisc.cmo glPix.cmo glClear.cmo \ - glTex.cmo glDraw.cmo glFunc.cmo gluMisc.cmo \ - gluNurbs.cmo gluQuadric.cmo gluTess.cmo gluMat.cmo - OPTOBJS = $(MLOBJS:.cmo=.cmx) - COBJS = ml_gl.o ml_glu.o ml_togl.o ml_raw.o \ - $(TOGLDIR)/togl.o ---- 12,23 ---- - OTHERLIBS=-L$(LABLTKDIR) -llabltk41 $(LIBS) - - # Files -! LIBOBJS = raw.cmo \ - gl.cmo glLight.cmo glList.cmo glMap.cmo \ - glMat.cmo glMisc.cmo glPix.cmo glClear.cmo \ - glTex.cmo glDraw.cmo glFunc.cmo gluMisc.cmo \ - gluNurbs.cmo gluQuadric.cmo gluTess.cmo gluMat.cmo -+ MLOBJS = $(LIBOBJS) togl.cmo - OPTOBJS = $(MLOBJS:.cmo=.cmx) - COBJS = ml_gl.o ml_glu.o ml_togl.o ml_raw.o \ - $(TOGLDIR)/togl.o -*************** -*** 53,60 **** - var2switch: var2switch.cmo - $(LINKER) var2switch.cmo -o $@ - -! lablgl.cma: $(MLOBJS) -! $(LIBRARIAN) -o lablgl.cma $(MLOBJS) - - lablgl.cmxa: $(OPTOBJS) - $(OPTLIB) -o lablgl.cmxa $(OPTOBJS) ---- 54,61 ---- - var2switch: var2switch.cmo - $(LINKER) var2switch.cmo -o $@ - -! lablgl.cma: $(LIBOBJS) -! $(LIBRARIAN) -o lablgl.cma $(LIBOBJS) - - lablgl.cmxa: $(OPTOBJS) - $(OPTLIB) -o lablgl.cmxa $(OPTOBJS) -*************** -*** 66,74 **** - $(TOGLDIR)/togl.o: - cd $(TOGLDIR) && $(MAKE) togl.o - -! lablgltop: lablgl.cma liblablgl.a - olablmktop $(OLABLINC) -custom -o lablgltop \ -! unix.cma tk41.cma lablgl.cma \ - -cclib "-L. -llablgl -lunix $(OTHERLIBS)" - - lablgl: lablgl.in Makefile.config ---- 67,75 ---- - $(TOGLDIR)/togl.o: - cd $(TOGLDIR) && $(MAKE) togl.o - -! lablgltop: lablgl.cma togl.cmo liblablgl.a - olablmktop $(OLABLINC) -custom -o lablgltop \ -! unix.cma tk41.cma lablgl.cma togl.cmo \ - -cclib "-L. -llablgl -lunix $(OTHERLIBS)" - - lablgl: lablgl.in Makefile.config -*************** -*** 107,113 **** - if test -d $(INSTALLDIR); then : ; else mkdir -p $(INSTALLDIR); fi - cp $(MLOBJS:.cmo=.cmi) $(INSTALLDIR) - cp $(MLOBJS:.cmo=.mli) $(INSTALLDIR) -! cp lablgl.cma liblablgl.a $(INSTALLDIR) - cp lablgltop $(INSTALLDIR) - cp lablgl lablgllink $(BINDIR) - if test -f lablgl.cmxa; then : ; \ ---- 108,114 ---- - if test -d $(INSTALLDIR); then : ; else mkdir -p $(INSTALLDIR); fi - cp $(MLOBJS:.cmo=.cmi) $(INSTALLDIR) - cp $(MLOBJS:.cmo=.mli) $(INSTALLDIR) -! cp lablgl.cma togl.cmo liblablgl.a $(INSTALLDIR) - cp lablgltop $(INSTALLDIR) - cp lablgl lablgllink $(BINDIR) - if test -f lablgl.cmxa; then : ; \ -Index: lablgllink.in -=================================================================== -RCS file: /staff2/garrigue/repos/lablGL/lablgllink.in,v -retrieving revision 1.2 -retrieving revision 1.3 -diff -c -r1.2 -r1.3 -*** lablgllink.in 1998/09/16 10:26:17 1.2 ---- lablgllink.in 1999/06/18 07:39:09 1.3 -*************** -*** 1,5 **** - #!/bin/sh - - exec olablc -custom @INCLUDES@ -I @INSTALLDIR@ \ -! tk41.cma lablgl.cma $* -cclib "-L@INSTALLDIR@ -llablgl" \ - -cclib "@OTHERLIBS@" ---- 1,5 ---- - #!/bin/sh - - exec olablc -custom @INCLUDES@ -I @INSTALLDIR@ \ -! tk41.cma lablgl.cma togl.cmo $* -cclib "-L@INSTALLDIR@ -llablgl" \ - -cclib "@OTHERLIBS@" diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/lablgtk.in b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/lablgtk.in deleted file mode 100644 index 98015140c..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/lablgtk.in +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -thread="no" - -case $1 in --help) - echo "Usage: lablgtk [-thread] [script-file]" - echo " -thread use the threaded version of the toplevel" - ;; --thread) - thread=yes - shift - ;; -esac - -if test $thread = yes; then - toplevel="@INSTALLDIR@/lablgtktop_t -I @LIBDIR@/threads" -else - toplevel=@INSTALLDIR@/lablgtktop -fi - -exec $toplevel -w s \ - -I @LABLGLDIR@ \ - -I @INSTALLDIR@ $* diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/ml_gdk.c b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/ml_gdk.c deleted file mode 100644 index 9ab1c1eb9..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/ml_gdk.c +++ /dev/null @@ -1,522 +0,0 @@ -/* $Id$ */ - -#include -#include -#ifdef _WIN32 -#include -#else -#include -#endif -#include -#include -#include -#include - -#include "wrappers.h" -#include "ml_glib.h" -#include "ml_gdk.h" -#include "gdk_tags.h" - -void ml_raise_gdk (const char *errmsg) -{ - static value * exn = NULL; - if (exn == NULL) - exn = caml_named_value ("gdkerror"); - raise_with_string (*exn, (char*)errmsg); -} - -#include "gdk_tags.c" - -Make_OptFlags_val (GdkModifier_val) -Make_Flags_val (Event_mask_val) - -#define Make_test(conv) \ -value ml_test_##conv (value mask, value test) \ -{ return Val_bool (conv(mask) & Int_val(test)); } - -Make_test(GdkModifier_val) - -/* Colormap */ - -Make_Val_final_pointer (GdkColormap, gdk_colormap_ref, gdk_colormap_unref, 0) -ML_0 (gdk_colormap_get_system, Val_GdkColormap) - -/* Screen geometry */ -ML_0 (gdk_screen_width, Val_int) -ML_0 (gdk_screen_height, Val_int) - -/* Visual */ -value ml_gdk_visual_get_best (value depth, value type) -{ - GdkVisual *vis; - if (type == Val_unit) - if (depth == Val_unit) vis = gdk_visual_get_best (); - else vis = gdk_visual_get_best_with_depth (Int_val(Field(depth,0))); - else - if (depth == Val_unit) - vis = gdk_visual_get_best_with_type - (GdkVisualType_val(Field(type,0))); - else vis = gdk_visual_get_best_with_both - (Int_val(Field(depth,0)),GdkVisualType_val(Field(type,0))); - if (!vis) ml_raise_gdk("Gdk.Visual.get_best"); - return Val_GdkVisual(vis); -} - -Make_Extractor (GdkVisual,GdkVisual_val,type,Val_gdkVisualType) -Make_Extractor (GdkVisual,GdkVisual_val,depth,Val_int) -Make_Extractor (GdkVisual,GdkVisual_val,red_mask,Val_int) -Make_Extractor (GdkVisual,GdkVisual_val,red_shift,Val_int) -Make_Extractor (GdkVisual,GdkVisual_val,red_prec,Val_int) -Make_Extractor (GdkVisual,GdkVisual_val,green_mask,Val_int) -Make_Extractor (GdkVisual,GdkVisual_val,green_shift,Val_int) -Make_Extractor (GdkVisual,GdkVisual_val,green_prec,Val_int) -Make_Extractor (GdkVisual,GdkVisual_val,blue_mask,Val_int) -Make_Extractor (GdkVisual,GdkVisual_val,blue_shift,Val_int) -Make_Extractor (GdkVisual,GdkVisual_val,blue_prec,Val_int) - -/* Image */ - -Make_Val_final_pointer (GdkImage, Ignore, gdk_image_destroy, 0) -GdkImage *GdkImage_val(value val) -{ - if (!Field(val,1)) ml_raise_gdk ("attempt to use destroyed GdkImage"); - return (GdkImage*)(Field(val,1)); -} -value ml_gdk_image_destroy (value val) -{ - if (Field(val,1)) gdk_image_destroy((GdkImage*)(Field(val,1))); - Field(val,1) = NULL; - return Val_unit; -} -ML_4 (gdk_image_new_bitmap, GdkVisual_val, String_val, Int_val, Int_val, - Val_GdkImage) -ML_4 (gdk_image_new, GdkImageType_val, GdkVisual_val, Int_val, Int_val, - Val_GdkImage) -ML_5 (gdk_image_get, GdkWindow_val, Int_val, Int_val, Int_val, Int_val, - Val_GdkImage) -ML_4 (gdk_image_put_pixel, GdkImage_val, Int_val, Int_val, Int_val, Unit) -ML_3 (gdk_image_get_pixel, GdkImage_val, Int_val, Int_val, Val_int) - -/* Color */ - -ML_2 (gdk_colormap_new, GdkVisual_val, Bool_val, Val_GdkColormap) - -value ml_gdk_color_white (value cmap) -{ - GdkColor color; - gdk_color_white (GdkColormap_val(cmap), &color); - return Val_copy(color); -} - -value ml_gdk_color_black (value cmap) -{ - GdkColor color; - gdk_color_black (GdkColormap_val(cmap), &color); - return Val_copy(color); -} - -value ml_gdk_color_parse (char *spec) -{ - GdkColor color; - if (!gdk_color_parse (spec, &color)) - ml_raise_gdk ("color_parse"); - return Val_copy(color); -} - -ML_2 (gdk_color_alloc, GdkColormap_val, GdkColor_val, Val_bool) - -value ml_GdkColor (value red, value green, value blue) -{ - GdkColor color; - color.red = Int_val(red); - color.green = Int_val(green); - color.blue = Int_val(blue); - color.pixel = 0; - return Val_copy(color); -} - -Make_Extractor (GdkColor, GdkColor_val, red, Val_int) -Make_Extractor (GdkColor, GdkColor_val, green, Val_int) -Make_Extractor (GdkColor, GdkColor_val, blue, Val_int) -Make_Extractor (GdkColor, GdkColor_val, pixel, Val_int) - -/* Rectangle */ - -value ml_GdkRectangle (value x, value y, value width, value height) -{ - GdkRectangle rectangle; - rectangle.x = Int_val(x); - rectangle.y = Int_val(y); - rectangle.width = Int_val(width); - rectangle.height = Int_val(height); - return Val_copy(rectangle); -} - -Make_Extractor (GdkRectangle, GdkRectangle_val, x, Val_int) -Make_Extractor (GdkRectangle, GdkRectangle_val, y, Val_int) -Make_Extractor (GdkRectangle, GdkRectangle_val, width, Val_int) -Make_Extractor (GdkRectangle, GdkRectangle_val, height, Val_int) - -/* Window */ - -Make_Val_final_pointer (GdkWindow, gdk_window_ref, gdk_window_unref, 0) -Make_Extractor (gdk_visual_get, GdkVisual_val, depth, Val_int) -ML_1 (gdk_window_get_visual, GdkWindow_val, Val_GdkVisual) -ML_3 (gdk_window_set_back_pixmap, GdkWindow_val, GdkPixmap_val, Int_val, Unit) -ML_1 (gdk_window_clear, GdkWindow_val, Unit) -ML_0 (GDK_ROOT_PARENT, Val_GdkWindow) -ML_1 (gdk_window_get_parent, GdkWindow_val, Val_GdkWindow) -ML_1 (GDK_WINDOW_XWINDOW, GdkWindow_val, Val_XID) -value ml_gdk_window_get_position (value window) -{ - int x, y; - value ret; - - gdk_window_get_position (GdkWindow_val(window), &x, &y); - - ret = alloc_small (2,0); - Field(ret,0) = Val_int(x); - Field(ret,1) = Val_int(y); - return ret; -} - -value ml_gdk_window_get_size (value window) -{ - int x, y; - value ret; - - gdk_window_get_size (GdkWindow_val(window), &x, &y); - - ret = alloc_small (2,0); - Field(ret,0) = Val_int(x); - Field(ret,1) = Val_int(y); - return ret; -} - -/* Cursor */ - -ML_1 (gdk_cursor_new, GdkCursorType_val, Val_GdkCursor) -ML_6 (gdk_cursor_new_from_pixmap, GdkPixmap_val, GdkPixmap_val, - GdkColor_val, GdkColor_val, Int_val, Int_val, Val_GdkCursor) -ML_bc6 (ml_gdk_cursor_new_from_pixmap) -ML_1 (gdk_cursor_destroy, GdkCursor_val, Unit) - -/* Pixmap */ - -Make_Val_final_pointer (GdkPixmap, gdk_pixmap_ref, gdk_pixmap_unref, 0) -Make_Val_final_pointer (GdkBitmap, gdk_bitmap_ref, gdk_bitmap_unref, 0) -Make_Val_final_pointer_ext (GdkPixmap, _no_ref, Ignore, gdk_pixmap_unref, 20) -Make_Val_final_pointer_ext (GdkBitmap, _no_ref, Ignore, gdk_bitmap_unref, 20) -ML_4 (gdk_pixmap_new, GdkWindow_val, Int_val, Int_val, Int_val, - Val_GdkPixmap_no_ref) -ML_4 (gdk_bitmap_create_from_data, GdkWindow_val, - String_val, Int_val, Int_val, Val_GdkBitmap_no_ref) -ML_7 (gdk_pixmap_create_from_data, GdkWindow_val, String_val, - Int_val, Int_val, Int_val, GdkColor_val, GdkColor_val, - Val_GdkPixmap_no_ref) -ML_bc7 (ml_gdk_pixmap_create_from_data) - -value ml_gdk_pixmap_colormap_create_from_xpm - (value window, value colormap, value transparent, char *filename) -{ - CAMLparam0(); - GdkBitmap *mask; - CAMLlocal2(vpixmap, vmask); - value ret; - - vpixmap = Val_GdkPixmap_no_ref - (gdk_pixmap_colormap_create_from_xpm - (GdkWindow_val(window), Option_val(colormap,GdkColormap_val,NULL), - &mask, Option_val(transparent,GdkColor_val,NULL), filename)); - vmask = Val_GdkBitmap_no_ref (mask); - - ret = alloc_small (2,0); - Field(ret,0) = vpixmap; - Field(ret,1) = vmask; - CAMLreturn(ret); -} - -value ml_gdk_pixmap_colormap_create_from_xpm_d - (value window, value colormap, value transparent, char **data) -{ - CAMLparam0(); - GdkBitmap *mask; - CAMLlocal2(vpixmap, vmask); - value ret; - - vpixmap = Val_GdkPixmap_no_ref - (gdk_pixmap_colormap_create_from_xpm_d - (GdkWindow_val(window), Option_val(colormap,GdkColormap_val,NULL), - &mask, Option_val(transparent,GdkColor_val,NULL), data)); - vmask = Val_GdkBitmap_no_ref (mask); - - ret = alloc_small (2, 0); - Field(ret,0) = vpixmap; - Field(ret,1) = vmask; - CAMLreturn(ret); -} - -/* Font */ - -Make_Val_final_pointer (GdkFont, gdk_font_ref, gdk_font_unref, 0) -Make_Val_final_pointer_ext (GdkFont, _no_ref, Ignore, gdk_font_unref, 20) -ML_1 (gdk_font_load, String_val, Val_GdkFont_no_ref) -ML_1 (gdk_fontset_load, String_val, Val_GdkFont_no_ref) -ML_2 (gdk_string_width, GdkFont_val, String_val, Val_int) -ML_2 (gdk_char_width, GdkFont_val, (gchar)Long_val, Val_int) -ML_2 (gdk_string_height, GdkFont_val, String_val, Val_int) -ML_2 (gdk_char_height, GdkFont_val, (gchar)Long_val, Val_int) -ML_2 (gdk_string_measure, GdkFont_val, String_val, Val_int) -ML_2 (gdk_char_measure, GdkFont_val, (char)Long_val, Val_int) -Make_Extractor (GdkFont, GdkFont_val, type, Val_gdkFontType) -Make_Extractor (GdkFont, GdkFont_val, ascent, Val_int) -Make_Extractor (GdkFont, GdkFont_val, descent, Val_int) - -/* Region */ - -#define PointArray_val(val) ((GdkPoint*)&Field(val,1)) -#define PointArrayLen_val(val) Int_val(Field(val,0)) -Make_Val_final_pointer (GdkRegion, Ignore, gdk_region_destroy, 0) -GdkRegion *GdkRegion_val(value val) -{ - if (!Field(val,1)) ml_raise_gdk ("attempt to use destroyed GdkRegion"); - return (GdkRegion*)(Field(val,1)); -} -value ml_gdk_region_destroy (value val) -{ - if (Field(val,1)) gdk_region_destroy((GdkRegion*)(Field(val,1))); - Field(val,1) = NULL; - return Val_unit; -} -ML_0 (gdk_region_new, Val_GdkRegion) -ML_2 (gdk_region_polygon, Insert(PointArray_val(arg1)) PointArrayLen_val, - GdkFillRule_val, Val_GdkRegion) -ML_2 (gdk_regions_intersect, GdkRegion_val, GdkRegion_val, Val_GdkRegion) -ML_2 (gdk_regions_union, GdkRegion_val, GdkRegion_val, Val_GdkRegion) -ML_2 (gdk_regions_subtract, GdkRegion_val, GdkRegion_val, Val_GdkRegion) -ML_2 (gdk_regions_xor, GdkRegion_val, GdkRegion_val, Val_GdkRegion) -ML_2 (gdk_region_union_with_rect, GdkRegion_val, GdkRectangle_val, - Val_GdkRegion) -ML_3 (gdk_region_offset, GdkRegion_val, Int_val, Int_val, Unit) -ML_3 (gdk_region_shrink, GdkRegion_val, Int_val, Int_val, Unit) -ML_1 (gdk_region_empty, GdkRegion_val, Val_bool) -ML_2 (gdk_region_equal, GdkRegion_val, GdkRegion_val, Val_bool) -ML_3 (gdk_region_point_in, GdkRegion_val, Int_val, Int_val, Val_bool) -ML_2 (gdk_region_rect_in, GdkRegion_val, GdkRectangle_val, Val_gdkOverlapType) -ML_2 (gdk_region_get_clipbox, GdkRegion_val, GdkRectangle_val, Unit) - - -/* GC */ - -Make_Val_final_pointer (GdkGC, gdk_gc_ref, gdk_gc_unref, 0) -Make_Val_final_pointer_ext (GdkGC, _no_ref, Ignore, gdk_gc_unref, 20) -ML_1 (gdk_gc_new, GdkWindow_val, Val_GdkGC_no_ref) -ML_2 (gdk_gc_set_foreground, GdkGC_val, GdkColor_val, Unit) -ML_2 (gdk_gc_set_background, GdkGC_val, GdkColor_val, Unit) -ML_2 (gdk_gc_set_font, GdkGC_val, GdkFont_val, Unit) -ML_2 (gdk_gc_set_function, GdkGC_val, GdkFunction_val, Unit) -ML_2 (gdk_gc_set_fill, GdkGC_val, GdkFill_val, Unit) -ML_2 (gdk_gc_set_tile, GdkGC_val, GdkPixmap_val, Unit) -ML_2 (gdk_gc_set_stipple, GdkGC_val, GdkPixmap_val, Unit) -ML_3 (gdk_gc_set_ts_origin, GdkGC_val, Int_val, Int_val, Unit) -ML_3 (gdk_gc_set_clip_origin, GdkGC_val, Int_val, Int_val, Unit) -ML_2 (gdk_gc_set_clip_mask, GdkGC_val, GdkBitmap_val, Unit) -ML_2 (gdk_gc_set_clip_rectangle, GdkGC_val, GdkRectangle_val, Unit) -ML_2 (gdk_gc_set_clip_region, GdkGC_val, GdkRegion_val, Unit) -ML_2 (gdk_gc_set_subwindow, GdkGC_val, GdkSubwindowMode_val, Unit) -ML_2 (gdk_gc_set_exposures, GdkGC_val, Bool_val, Unit) -ML_5 (gdk_gc_set_line_attributes, GdkGC_val, Int_val, GdkLineStyle_val, - GdkCapStyle_val, GdkJoinStyle_val, Unit) -ML_2 (gdk_gc_copy, GdkGC_val, GdkGC_val, Unit) -value ml_gdk_gc_get_values (value gc) -{ - CAMLparam0(); - GdkGCValues values; - int i; - CAMLlocal2(ret, tmp); - - gdk_gc_get_values (GdkGC_val(gc), &values); - ret = alloc (18, 0); - tmp = Val_copy(values.foreground); Store_field(ret, 0, tmp); - tmp = Val_copy(values.background); Store_field(ret, 1, tmp); - if (values.font) { - tmp = ml_some(Val_GdkFont(values.font)); - Store_field(ret, 2, tmp); - } - Field(ret,3) = Val_gdkFunction(values.function); - Field(ret,4) = Val_gdkFill(values.fill); - if (values.tile) { - tmp = ml_some(Val_GdkPixmap(values.tile)); - Store_field(ret, 5, tmp); - } - if (values.tile) { - tmp = ml_some(Val_GdkPixmap(values.stipple)); - Store_field(ret, 6, tmp); - } - if (values.tile) { - tmp = ml_some(Val_GdkPixmap(values.clip_mask)); - Store_field(ret, 7, tmp); - } - Field(ret,8) = Val_gdkSubwindowMode(values.subwindow_mode); - Field(ret,9) = Val_int(values.ts_x_origin); - Field(ret,10) = Val_int(values.ts_y_origin); - Field(ret,11) = Val_int(values.clip_x_origin); - Field(ret,12) = Val_int(values.clip_y_origin); - Field(ret,13) = Val_bool(values.graphics_exposures); - Field(ret,14) = Val_int(values.line_width); - Field(ret,15) = Val_gdkLineStyle(values.line_style); - Field(ret,16) = Val_gdkCapStyle(values.cap_style); - Field(ret,17) = Val_gdkJoinStyle(values.join_style); - CAMLreturn(ret); -} - -/* Draw */ - -value ml_point_array_new (value len) -{ - value ret = alloc (1 + Wosize_asize(Int_val(len)*sizeof(GdkPoint)), - Abstract_tag); - Field(ret,0) = len; - return ret; -} -value ml_point_array_set (value arr, value pos, value x, value y) -{ - GdkPoint *pt = PointArray_val(arr) + Int_val(pos); - pt->x = Int_val(x); - pt->y = Int_val(y); - return Val_unit; -} - -ML_4 (gdk_draw_point, GdkDrawable_val, GdkGC_val, Int_val, Int_val, Unit) -ML_6 (gdk_draw_line, GdkDrawable_val, GdkGC_val, Int_val, Int_val, - Int_val, Int_val, Unit) -ML_bc6 (ml_gdk_draw_line) -ML_7 (gdk_draw_rectangle, GdkDrawable_val, GdkGC_val, Bool_val, - Int_val, Int_val, Int_val, Int_val, Unit) -ML_bc7 (ml_gdk_draw_rectangle) -ML_9 (gdk_draw_arc, GdkDrawable_val, GdkGC_val, Bool_val, Int_val, Int_val, - Int_val, Int_val, Int_val, Int_val, Unit) -ML_bc9 (ml_gdk_draw_arc) -ML_4 (gdk_draw_polygon, GdkDrawable_val, GdkGC_val, Bool_val, - Insert(PointArray_val(arg4)) PointArrayLen_val, Unit) -ML_6 (gdk_draw_string, GdkDrawable_val, GdkFont_val, GdkGC_val, Int_val, Int_val, String_val, Unit) -ML_bc6 (ml_gdk_draw_string) - -ML_9 (gdk_draw_image, GdkDrawable_val, GdkGC_val, GdkImage_val, Int_val, Int_val, Int_val, Int_val, Int_val, Int_val, Unit) -ML_bc9 (ml_gdk_draw_image) - -/* RGB */ - -ML_0 (gdk_rgb_init, Unit) -ML_0 (gdk_rgb_get_visual, Val_GdkVisual) -ML_0 (gdk_rgb_get_cmap, Val_GdkColormap) - -/* Events */ - -/* Have a major collection every 1000 events */ -Make_Val_final_pointer (GdkEvent, Ignore, gdk_event_free, 1) -ML_1 (gdk_event_copy, GdkEvent_val, Val_GdkEvent) - -value ml_gdk_event_new (value event_type) -{ - GdkEvent event; - memset (&event, 0, sizeof(GdkEvent)); - event.type = GdkEventType_val(event_type); - event.any.send_event = TRUE; - return Val_copy(event); -} - -#define GdkEvent_arg(type) (GdkEvent##type*)GdkEvent_val - -Make_Extractor (GdkEventAny, GdkEvent_arg(Any), type, Val_gdkEventType) -Make_Extractor (GdkEventAny, GdkEvent_arg(Any), window, Val_GdkWindow) -Make_Extractor (GdkEventAny, GdkEvent_arg(Any), send_event, Val_bool) -Make_Setter (gdk_event_set, GdkEvent_arg(Any), GdkEventType_val, type) -Make_Setter (gdk_event_set, GdkEvent_arg(Any), GdkWindow_val, window) - -Make_Extractor (GdkEventExpose, GdkEvent_arg(Expose), area, Val_copy) -Make_Extractor (GdkEventExpose, GdkEvent_arg(Expose), count, Val_int) - -Make_Extractor (GdkEventVisibility, GdkEvent_arg(Visibility), state, - Val_gdkVisibilityState) - -Make_Extractor (GdkEventMotion, GdkEvent_arg(Motion), time, Val_int) -Make_Extractor (GdkEventMotion, GdkEvent_arg(Motion), x, copy_double) -Make_Extractor (GdkEventMotion, GdkEvent_arg(Motion), y, copy_double) -Make_Extractor (GdkEventMotion, GdkEvent_arg(Motion), pressure, copy_double) -Make_Extractor (GdkEventMotion, GdkEvent_arg(Motion), xtilt, copy_double) -Make_Extractor (GdkEventMotion, GdkEvent_arg(Motion), ytilt, copy_double) -Make_Extractor (GdkEventMotion, GdkEvent_arg(Motion), state, Val_int) -Make_Extractor (GdkEventMotion, GdkEvent_arg(Motion), is_hint, Val_int) -Make_Extractor (GdkEventMotion, GdkEvent_arg(Motion), source, Val_gdkInputSource) -Make_Extractor (GdkEventMotion, GdkEvent_arg(Motion), deviceid, Val_int) -Make_Extractor (GdkEventMotion, GdkEvent_arg(Motion), x_root, copy_double) -Make_Extractor (GdkEventMotion, GdkEvent_arg(Motion), y_root, copy_double) - -Make_Extractor (GdkEventButton, GdkEvent_arg(Button), time, Val_int) -Make_Extractor (GdkEventButton, GdkEvent_arg(Button), x, copy_double) -Make_Extractor (GdkEventButton, GdkEvent_arg(Button), y, copy_double) -Make_Extractor (GdkEventButton, GdkEvent_arg(Button), pressure, copy_double) -Make_Extractor (GdkEventButton, GdkEvent_arg(Button), xtilt, copy_double) -Make_Extractor (GdkEventButton, GdkEvent_arg(Button), ytilt, copy_double) -Make_Extractor (GdkEventButton, GdkEvent_arg(Button), state, Val_int) -Make_Extractor (GdkEventButton, GdkEvent_arg(Button), button, Val_int) -Make_Extractor (GdkEventButton, GdkEvent_arg(Button), source, Val_gdkInputSource) -Make_Extractor (GdkEventButton, GdkEvent_arg(Button), deviceid, Val_int) -Make_Extractor (GdkEventButton, GdkEvent_arg(Button), x_root, copy_double) -Make_Extractor (GdkEventButton, GdkEvent_arg(Button), y_root, copy_double) - -Make_Setter (gdk_event_button_set, GdkEvent_arg(Button), Int_val, button) - -Make_Extractor (GdkEventKey, GdkEvent_arg(Key), time, Val_int) -Make_Extractor (GdkEventKey, GdkEvent_arg(Key), state, Val_int) -Make_Extractor (GdkEventKey, GdkEvent_arg(Key), keyval, Val_int) -Make_Extractor (GdkEventKey, GdkEvent_arg(Key), string, Val_string) - -Make_Extractor (GdkEventCrossing, GdkEvent_arg(Crossing), subwindow, - Val_GdkWindow) -Make_Extractor (GdkEventCrossing, GdkEvent_arg(Crossing), detail, - Val_gdkNotifyType) - -Make_Extractor (GdkEventFocus, GdkEvent_arg(Focus), in, Val_int) - -Make_Extractor (GdkEventConfigure, GdkEvent_arg(Configure), x, Val_int) -Make_Extractor (GdkEventConfigure, GdkEvent_arg(Configure), y, Val_int) -Make_Extractor (GdkEventConfigure, GdkEvent_arg(Configure), width, Val_int) -Make_Extractor (GdkEventConfigure, GdkEvent_arg(Configure), height, Val_int) - -Make_Extractor (GdkEventProperty, GdkEvent_arg(Property), atom, Val_int) -Make_Extractor (GdkEventProperty, GdkEvent_arg(Property), time, Val_int) -Make_Extractor (GdkEventProperty, GdkEvent_arg(Property), state, Val_int) - -Make_Extractor (GdkEventSelection, GdkEvent_arg(Selection), selection, Val_int) -Make_Extractor (GdkEventSelection, GdkEvent_arg(Selection), target, Val_int) -Make_Extractor (GdkEventSelection, GdkEvent_arg(Selection), property, Val_int) -Make_Extractor (GdkEventSelection, GdkEvent_arg(Selection), requestor, Val_int) -Make_Extractor (GdkEventSelection, GdkEvent_arg(Selection), time, Val_int) - -Make_Extractor (GdkEventProximity, GdkEvent_arg(Proximity), time, Val_int) -Make_Extractor (GdkEventProximity, GdkEvent_arg(Proximity), source, - Val_gdkInputSource) -Make_Extractor (GdkEventProximity, GdkEvent_arg(Proximity), deviceid, Val_int) - -/* DnD */ -Make_Val_final_pointer (GdkDragContext, gdk_drag_context_ref, gdk_drag_context_unref, 0) -Make_Flags_val (GdkDragAction_val) -ML_3 (gdk_drag_status, GdkDragContext_val, Flags_GdkDragAction_val, Int_val, Unit) -Make_Extractor (GdkDragContext, GdkDragContext_val, suggested_action, Val_gdkDragAction) -value val_int(gpointer i) -{ - return Val_int (GPOINTER_TO_INT(i)); -} -value ml_GdkDragContext_targets (value c) -{ - GList *t; - - t = (GdkDragContext_val(c))->targets; - return Val_GList (t, val_int); -} - -/* Misc */ -ML_0 (gdk_flush, Unit) -ML_0 (gdk_beep, Unit) diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/ml_gdk.h b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/ml_gdk.h deleted file mode 100644 index 5d699ace2..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/ml_gdk.h +++ /dev/null @@ -1,53 +0,0 @@ -/* $Id$ */ - -#define GdkColormap_val(val) ((GdkColormap*)Pointer_val(val)) -extern value Val_GdkColormap (GdkColormap *); - -#define GdkColor_val(val) ((GdkColor*)MLPointer_val(val)) -#define Val_GdkColor Val_pointer - -#define GdkRectangle_val(val) ((GdkRectangle*)MLPointer_val(val)) -#define Val_GdkRectangle Val_pointer - -#define GdkDrawable_val(val) ((GdkDrawable*)Pointer_val(val)) - -#define GdkWindow_val(val) ((GdkWindow*)Pointer_val(val)) -extern value Val_GdkWindow (GdkWindow *); - -#define GdkCursor_val(val) ((GdkCursor*)Pointer_val(val)) -#define Val_GdkCursor Val_pointer - -#define GdkPixmap_val(val) ((GdkPixmap*)Pointer_val(val)) -extern value Val_GdkPixmap (GdkPixmap *); - -#define GdkBitmap_val(val) ((GdkBitmap*)Pointer_val(val)) -extern value Val_GdkBitmap (GdkBitmap *); - -extern GdkImage *GdkImage_val (value); /* check argument */ -extern value Val_GdkImage (GdkImage *); /* finalizer is destroy! */ - -#define GdkFont_val(val) ((GdkFont*)Pointer_val(val)) -extern value Val_GdkFont (GdkFont *); - -extern GdkRegion *GdkRegion_val (value); /* check argument */ -extern value Val_GdkRegion (GdkRegion *); /* finalizer is destroy! */ - -#define GdkGC_val(val) ((GdkGC*)Pointer_val(val)) -extern value Val_GdkGC (GdkGC *); - -#define GdkEvent_val (GdkEvent*)MLPointer_val - -#define GdkVisual_val(val) ((GdkVisual*) val) -#define Val_GdkVisual(visual) ((value) visual) - -#define Val_XID copy_int32 -#define XID_val Int32_val - -extern int OptFlags_GdkModifier_val (value); -extern int Flags_Event_mask_val (value); -extern lookup_info ml_table_extension_events[]; -#define Extension_events_val(key) ml_lookup_to_c (ml_table_extension_events, key) - -#define GdkDragContext_val(val) ((GdkDragContext*)Pointer_val(val)) -extern value Val_GdkDragContext (GdkDragContext *); -extern int Flags_GdkDragAction_val (value); diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/ml_glib.c b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/ml_glib.c deleted file mode 100644 index b7d3fcbc2..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/ml_glib.c +++ /dev/null @@ -1,135 +0,0 @@ -/* $Id$ */ - -#include -#include -#include -#include -#include - -#include "wrappers.h" -#include "ml_glib.h" - -/* -value Val_GSList (GSList *list, value (*func)(gpointer)) -{ - value new_cell, result, last_cell, cell; - - if (list == NULL) return Val_unit; - - last_cell = cell = Val_unit; - result = func(list->data); - Begin_roots3 (last_cell, cell, result); - cell = last_cell = alloc_tuple (2); - Field(cell,0) = result; - Field(cell,1) = Val_unit; - list = list->next; - while (list != NULL) { - result = func(list->data); - new_cell = alloc_tuple(2); - Field(new_cell,0) = result; - Field(new_cell,1) = Val_unit; - modify(&Field(last_cell,1), new_cell); - last_cell = new_cell; - list = list->next; - } - End_roots (); - return cell; -} - -GSList *GSList_val (value list, gpointer (*func)(value)) -{ - GSList *res = NULL; - GSList **current = &res; - value cell = list; - if (list == Val_unit) return res; - Begin_root (cell); - while (cell != Val_unit) { - *current = g_slist_alloc (); - (*current)->data = func(Field(cell,0)); - cell = Field(cell,1); - current = &(*current)->next; - } - End_roots (); - return res; -} -*/ - -value Val_GList (GList *list, value (*func)(gpointer)) -{ - value new_cell, result, last_cell, cell; - - if (list == NULL) return Val_unit; - - last_cell = cell = Val_unit; - result = func(list->data); - Begin_roots3 (last_cell, cell, result); - cell = last_cell = alloc_small(2,0); - Field(cell,0) = result; - Field(cell,1) = Val_unit; - list = list->next; - while (list != NULL) { - result = func(list->data); - new_cell = alloc_small(2,0); - Field(new_cell,0) = result; - Field(new_cell,1) = Val_unit; - modify(&Field(last_cell,1), new_cell); - last_cell = new_cell; - list = list->next; - } - End_roots (); - return cell; -} - -GList *GList_val (value list, gpointer (*func)(value)) -{ - CAMLparam1(list); - GList *res = NULL; - if (list == Val_unit) CAMLreturn (res); - for (; Is_block(list); list = Field(list,1)) - res = g_list_append (res, func(Field(list,0))); - CAMLreturn (res); -} - -static value ml_warning_handler = 0L; - -static void ml_warning_wrapper (const gchar *msg) -{ - value arg = copy_string ((char*)msg); - callback (ml_warning_handler, arg); -} - -value ml_g_set_warning_handler (value clos) -{ - value old_handler = ml_warning_handler ? ml_warning_handler : clos; - if (!ml_warning_handler) register_global_root (&ml_warning_handler); - g_set_warning_handler (ml_warning_wrapper); - ml_warning_handler = clos; - return old_handler; -} - -static value ml_print_handler = 0L; - -static void ml_print_wrapper (const gchar *msg) -{ - value arg = copy_string ((char*)msg); - callback (ml_print_handler, arg); -} - -value ml_g_set_print_handler (value clos) -{ - value old_handler = ml_print_handler ? ml_print_handler : clos; - if (!ml_print_handler) register_global_root (&ml_print_handler); - g_set_print_handler (ml_print_wrapper); - ml_print_handler = clos; - return old_handler; -} - -value ml_get_null (value unit) { return 0L; } - -#define GMainLoop_val(val) ((GMainLoop*)Addr_val(val)) -ML_1 (g_main_new, Bool_val, Val_addr) -ML_1 (g_main_iteration, Bool_val, Val_bool) -ML_0 (g_main_pending, Val_bool) -ML_1 (g_main_is_running, GMainLoop_val, Val_bool) -ML_1 (g_main_quit, GMainLoop_val, Unit) -ML_1 (g_main_destroy, GMainLoop_val, Unit) diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/ml_glib.h b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/ml_glib.h deleted file mode 100644 index f0b45db4c..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/ml_glib.h +++ /dev/null @@ -1,10 +0,0 @@ -/* $Id$ */ - -/* -value Val_GSList (GSList *list, value (*func)(gpointer)); - -GSList *GSList_val (value list, gpointer (*func)(value)); -*/ - -value Val_GList (GList *list, value (*func)(gpointer)); -GList *GList_val (value list, gpointer (*func)(value)); diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/ml_gtk.c b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/ml_gtk.c deleted file mode 100644 index 0ee12a24d..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/ml_gtk.c +++ /dev/null @@ -1,2170 +0,0 @@ -/* $Id$ */ - -#include -#include -#include -#include -#include -#include -#include - -#include "wrappers.h" -#include "ml_glib.h" -#include "ml_gdk.h" -#include "ml_gtk.h" -#include "gtk_tags.h" - -void ml_raise_gtk (const char *errmsg) -{ - static value * exn = NULL; - if (exn == NULL) - exn = caml_named_value ("gtkerror"); - raise_with_string (*exn, (char*)errmsg); -} - -value copy_string_and_free (char *str) -{ - value res; - res = copy_string_check (str); - g_free (str); - return res; -} - -value *ml_gtk_root_new (value v) -{ - value *p = stat_alloc(sizeof(value)); - *p = v; - register_global_root (p); - return p; -} - -void ml_gtk_root_destroy (gpointer data) -{ - remove_global_root ((value *)data); - stat_free (data); -} - -/* conversion functions */ - -#include "gtk_tags.c" - -ML_1 (Val_direction_type, Int_val, Id) -ML_1 (Val_orientation, Int_val, Id) -ML_1 (Val_toolbar_style, Int_val, Id) -ML_1 (Val_state_type, Int_val, Id) -ML_1 (Val_scroll_type, Int_val, Id) - -Make_Flags_val (Attach_options_val) -Make_Flags_val (Button_action_val) -Make_Flags_val (Dest_defaults_val) -Make_Flags_val (Target_flags_val) -Make_Flags_val (Font_type_val) - -/* gtkobject.h */ - -Make_Val_final_pointer(GtkObject, gtk_object_ref, gtk_object_unref, 0) - -#define gtk_object_ref_and_sink(w) (gtk_object_ref(w), gtk_object_sink(w)) -Make_Val_final_pointer_ext(GtkObject, _sink , gtk_object_ref_and_sink, - gtk_object_unref, 20) - -/* gtkaccelgroup.h */ - -#define GtkAccelGroup_val(val) ((GtkAccelGroup*)Pointer_val(val)) -Make_Val_final_pointer (GtkAccelGroup, gtk_accel_group_ref, - gtk_accel_group_unref, 0) -Make_Val_final_pointer_ext (GtkAccelGroup, _no_ref, Ignore, - gtk_accel_group_unref, 20) -Make_OptFlags_val (Accel_flag_val) - -#define Signal_name_val(val) String_val(Field(val,0)) - -ML_0 (gtk_accel_group_new, Val_GtkAccelGroup_no_ref) -ML_0 (gtk_accel_group_get_default, Val_GtkAccelGroup) -ML_3 (gtk_accel_group_activate, GtkAccelGroup_val, Int_val, - OptFlags_GdkModifier_val, Val_bool) -ML_3 (gtk_accel_groups_activate, GtkObject_val, Int_val, - OptFlags_GdkModifier_val, Val_bool) -ML_2 (gtk_accel_group_attach, GtkAccelGroup_val, GtkObject_val, Unit) -ML_2 (gtk_accel_group_detach, GtkAccelGroup_val, GtkObject_val, Unit) -ML_1 (gtk_accel_group_lock, GtkAccelGroup_val, Unit) -ML_1 (gtk_accel_group_unlock, GtkAccelGroup_val, Unit) -ML_3 (gtk_accel_group_lock_entry, GtkAccelGroup_val, Int_val, - OptFlags_GdkModifier_val, Unit) -ML_3 (gtk_accel_group_unlock_entry, GtkAccelGroup_val, Int_val, - OptFlags_GdkModifier_val, Unit) -ML_6 (gtk_accel_group_add, GtkAccelGroup_val, Int_val, - OptFlags_GdkModifier_val, OptFlags_Accel_flag_val, - GtkObject_val, Signal_name_val, Unit) -ML_bc6 (ml_gtk_accel_group_add) -ML_4 (gtk_accel_group_remove, GtkAccelGroup_val, Int_val, - OptFlags_GdkModifier_val, GtkObject_val, Unit) -ML_2 (gtk_accelerator_valid, Int_val, OptFlags_GdkModifier_val, Val_bool) -ML_1 (gtk_accelerator_set_default_mod_mask, OptFlags_GdkModifier_val, Unit) - -/* gtkstyle.h */ - -#define GtkStyle_val(val) ((GtkStyle*)Pointer_val(val)) -Make_Val_final_pointer (GtkStyle, gtk_style_ref, gtk_style_unref, 0) -Make_Val_final_pointer_ext (GtkStyle, _no_ref, Ignore, gtk_style_unref, 20) -ML_0 (gtk_style_new, Val_GtkStyle_no_ref) -ML_1 (gtk_style_copy, GtkStyle_val, Val_GtkStyle_no_ref) -ML_2 (gtk_style_attach, GtkStyle_val, GdkWindow_val, Val_GtkStyle) -ML_1 (gtk_style_detach, GtkStyle_val, Unit) -ML_3 (gtk_style_set_background, GtkStyle_val, GdkWindow_val, State_type_val, Unit) -ML_6 (gtk_draw_hline, GtkStyle_val, GdkWindow_val, State_type_val, - Int_val, Int_val, Int_val, Unit) -ML_bc6 (ml_gtk_draw_hline) -ML_6 (gtk_draw_vline, GtkStyle_val, GdkWindow_val, State_type_val, - Int_val, Int_val, Int_val, Unit) -ML_bc6 (ml_gtk_draw_vline) -Make_Array_Extractor (gtk_style_get, GtkStyle_val, State_type_val, bg, Val_copy) -Make_Array_Setter (gtk_style_set, GtkStyle_val, State_type_val, *GdkColor_val, bg) -Make_Extractor (gtk_style_get, GtkStyle_val, colormap, Val_GdkColormap) -Make_Extractor (gtk_style_get, GtkStyle_val, depth, Val_int) -Make_Extractor (gtk_style_get, GtkStyle_val, font, Val_GdkFont) -/* Make_Setter (gtk_style_set, GtkStyle_val, GdkFont_val, font) */ -value ml_gtk_style_set_font (value st, value font) -{ - GtkStyle *style = GtkStyle_val(st); - if (style->font) gdk_font_unref(style->font); - style->font = GdkFont_val(font); - gdk_font_ref(style->font); - return Val_unit; -} -Make_Array_Extractor (gtk_style_get, GtkStyle_val, State_type_val, dark_gc, Val_GdkGC) -Make_Array_Extractor (gtk_style_get, GtkStyle_val, State_type_val, light_gc, Val_GdkGC) - -/* gtktypeutils.h */ - -ML_1 (gtk_type_name, Int_val, Val_string) -ML_1 (gtk_type_from_name, String_val, Val_int) -ML_1 (gtk_type_parent, Int_val, Val_int) -ML_1 (gtk_type_class, Int_val, (value)) -ML_1 (gtk_type_parent_class, Int_val, (value)) -ML_2 (gtk_type_is_a, Int_val, Int_val, Val_bool) -value ml_gtk_type_fundamental (value type) -{ - return Val_fundamental_type (GTK_FUNDAMENTAL_TYPE (Int_val(type))); -} - -/* gtkobject.h */ - -/* ML_1 (GTK_OBJECT_TYPE, GtkObject_val, Val_int) */ -value ml_gtk_object_type (value val) -{ - return Val_int (GtkObject_val(val)->klass->type); -} - -ML_1 (gtk_object_destroy, GtkObject_val, Unit) -ML_1 (gtk_object_ref, GtkObject_val, Unit) -ML_1 (gtk_object_unref, GtkObject_val, Unit) -ML_1 (gtk_object_sink, GtkObject_val, Unit) - -Make_Extractor (gtk_class,(GtkObjectClass *),type,Val_int) - -/* gtkdata.h */ - -/* gtkadjustment.h */ - -#define GtkAdjustment_val(val) check_cast(GTK_ADJUSTMENT,val) -ML_6 (gtk_adjustment_new, Float_val, Float_val, Float_val, Float_val, - Float_val, Float_val, Val_GtkObject_sink) -ML_bc6 (ml_gtk_adjustment_new) -ML_2 (gtk_adjustment_set_value, GtkAdjustment_val, Float_val, Unit) -ML_3 (gtk_adjustment_clamp_page, GtkAdjustment_val, - Float_val, Float_val, Unit) -Make_Extractor (gtk_adjustment_get, GtkAdjustment_val, lower, copy_double) -Make_Extractor (gtk_adjustment_get, GtkAdjustment_val, upper, copy_double) -Make_Extractor (gtk_adjustment_get, GtkAdjustment_val, value, copy_double) -Make_Extractor (gtk_adjustment_get, GtkAdjustment_val, step_increment, - copy_double) -Make_Extractor (gtk_adjustment_get, GtkAdjustment_val, page_increment, - copy_double) -Make_Extractor (gtk_adjustment_get, GtkAdjustment_val, page_size, copy_double) - -/* gtktooltips.h */ - -#define GtkWidget_val(val) check_cast(GTK_WIDGET,val) -#define GtkTooltips_val(val) check_cast(GTK_TOOLTIPS,val) -ML_0 (gtk_tooltips_new, Val_GtkAny) -ML_1 (gtk_tooltips_enable, GtkTooltips_val, Unit) -ML_1 (gtk_tooltips_disable, GtkTooltips_val, Unit) -ML_2 (gtk_tooltips_set_delay, GtkTooltips_val, Int_val, Unit) -ML_4 (gtk_tooltips_set_tip, GtkTooltips_val, GtkWidget_val, - String_option_val, String_option_val, Unit) -ML_3 (gtk_tooltips_set_colors, GtkTooltips_val, - Option_val(arg2, GdkColor_val, NULL) Ignore, - Option_val(arg3, GdkColor_val, NULL) Ignore, - Unit) - -/* gtkwidget.h */ - -value ml_gtk_widget_set_can_default (value val, value bool) -{ - GtkWidget *w = GtkWidget_val(val); - guint32 saved_flags = GTK_WIDGET_FLAGS(w); - if (Bool_val(bool)) GTK_WIDGET_SET_FLAGS(w, GTK_CAN_DEFAULT); - else GTK_WIDGET_UNSET_FLAGS(w, GTK_CAN_DEFAULT); - if (saved_flags != GTK_WIDGET_FLAGS(w)) - gtk_widget_queue_resize (w); - return Val_unit; -} -value ml_gtk_widget_set_can_focus (value val, value bool) -{ - GtkWidget *w = GtkWidget_val(val); - guint32 saved_flags = GTK_WIDGET_FLAGS(w); - if (Bool_val(bool)) GTK_WIDGET_SET_FLAGS(w, GTK_CAN_FOCUS); - else GTK_WIDGET_UNSET_FLAGS(w, GTK_CAN_FOCUS); - if (saved_flags != GTK_WIDGET_FLAGS(w)) - gtk_widget_queue_resize (w); - return Val_unit; -} -ML_1 (gtk_widget_unparent, GtkWidget_val, Unit) -ML_1 (gtk_widget_show, GtkWidget_val, Unit) -ML_1 (gtk_widget_show_now, GtkWidget_val, Unit) -ML_1 (gtk_widget_show_all, GtkWidget_val, Unit) -ML_1 (gtk_widget_hide, GtkWidget_val, Unit) -ML_1 (gtk_widget_hide_all, GtkWidget_val, Unit) -ML_1 (gtk_widget_map, GtkWidget_val, Unit) -ML_1 (gtk_widget_unmap, GtkWidget_val, Unit) -ML_1 (gtk_widget_realize, GtkWidget_val, Unit) -ML_1 (gtk_widget_unrealize, GtkWidget_val, Unit) -ML_1 (gtk_widget_queue_draw, GtkWidget_val, Unit) -ML_1 (gtk_widget_queue_resize, GtkWidget_val, Unit) -ML_2 (gtk_widget_draw, GtkWidget_val, - Option_val(arg2,GdkRectangle_val,NULL) Ignore, Unit) -ML_1 (gtk_widget_draw_focus, GtkWidget_val, Unit) -ML_1 (gtk_widget_draw_default, GtkWidget_val, Unit) -/* ML_1 (gtk_widget_draw_children, GtkWidget_val, Unit) */ -ML_2 (gtk_widget_event, GtkWidget_val, GdkEvent_val, Val_bool) -ML_1 (gtk_widget_activate, GtkWidget_val, Val_bool) -ML_2 (gtk_widget_reparent, GtkWidget_val, GtkWidget_val, Unit) -ML_3 (gtk_widget_popup, GtkWidget_val, Int_val, Int_val, Unit) -value ml_gtk_widget_intersect (value w, value area) -{ - GdkRectangle inter; - if (gtk_widget_intersect(GtkWidget_val(w), GdkRectangle_val(area), &inter)) - return ml_some (Val_copy (inter)); - return Val_unit; -} -/* ML_1 (gtk_widget_basic, GtkWidget_val, Val_bool) */ -ML_1 (gtk_widget_grab_focus, GtkWidget_val, Unit) -ML_1 (gtk_widget_grab_default, GtkWidget_val, Unit) -ML_2 (gtk_widget_set_name, GtkWidget_val, String_val, Unit) -ML_1 (gtk_widget_get_name, GtkWidget_val, Val_string) -ML_2 (gtk_widget_set_state, GtkWidget_val, State_type_val, Unit) -ML_2 (gtk_widget_set_sensitive, GtkWidget_val, Bool_val, Unit) -ML_3 (gtk_widget_set_uposition, GtkWidget_val, Int_val, Int_val, Unit) -ML_3 (gtk_widget_set_usize, GtkWidget_val, Int_val, Int_val, Unit) -ML_2 (gtk_widget_add_events, GtkWidget_val, Flags_Event_mask_val, Unit) -ML_2 (gtk_widget_set_events, GtkWidget_val, Flags_Event_mask_val, Unit) -ML_2 (gtk_widget_set_extension_events, GtkWidget_val, Extension_events_val, - Unit) -ML_1 (gtk_widget_get_toplevel, GtkWidget_val, Val_GtkWidget) -ML_2 (gtk_widget_get_ancestor, GtkWidget_val, Int_val, Val_GtkWidget) -ML_1 (gtk_widget_get_colormap, GtkWidget_val, Val_GdkColormap) -ML_1 (gtk_widget_get_visual, GtkWidget_val, (value)) -value ml_gtk_widget_get_pointer (value w) -{ - int x,y; - value ret; - gtk_widget_get_pointer (GtkWidget_val(w), &x, &y); - ret = alloc_small (2,0); - Field(ret,0) = Val_int(x); - Field(ret,1) = Val_int(y); - return ret; -} -ML_2 (gtk_widget_is_ancestor, GtkWidget_val, GtkWidget_val, Val_bool) -/* ML_2 (gtk_widget_is_child, GtkWidget_val, GtkWidget_val, Val_bool) */ -ML_2 (gtk_widget_set_style, GtkWidget_val, GtkStyle_val, Unit) -ML_1 (gtk_widget_set_rc_style, GtkWidget_val, Unit) -ML_1 (gtk_widget_ensure_style, GtkWidget_val, Unit) -ML_1 (gtk_widget_get_style, GtkWidget_val, Val_GtkStyle) -ML_1 (gtk_widget_restore_default_style, GtkWidget_val, Unit) - -ML_6 (gtk_widget_add_accelerator, GtkWidget_val, Signal_name_val, - GtkAccelGroup_val, Char_val, OptFlags_GdkModifier_val, - OptFlags_Accel_flag_val, Unit) -ML_bc6 (ml_gtk_widget_add_accelerator) -ML_4 (gtk_widget_remove_accelerator, GtkWidget_val, GtkAccelGroup_val, - Char_val, OptFlags_GdkModifier_val, Unit) -ML_1 (gtk_widget_lock_accelerators, GtkWidget_val, Unit) -ML_1 (gtk_widget_unlock_accelerators, GtkWidget_val, Unit) -ML_1 (gtk_widget_accelerators_locked, GtkWidget_val, Val_bool) - -ML_1 (GTK_WIDGET_VISIBLE, GtkWidget_val, Val_bool) -ML_1 (GTK_WIDGET_HAS_FOCUS, GtkWidget_val, Val_bool) - -Make_Extractor (GtkWidget, GtkWidget_val, window, Val_GdkWindow) -Make_Extractor (gtk_widget, GtkWidget_val, parent, Val_GtkWidget) -static value Val_GtkAllocation (GtkAllocation allocation) -{ - value ret = alloc_small (4, 0); - Field(ret,0) = Val_int(allocation.x); - Field(ret,1) = Val_int(allocation.y); - Field(ret,2) = Val_int(allocation.width); - Field(ret,3) = Val_int(allocation.height); - return ret; -} -Make_Extractor (gtk_widget, GtkWidget_val, allocation, Val_GtkAllocation) -/* -#define GtkAllocation_val(val) ((GtkAllocation*)Pointer_val(val)) -Make_Extractor (gtk_allocation, GtkAllocation_val, x, Val_int) -Make_Extractor (gtk_allocation, GtkAllocation_val, y, Val_int) -Make_Extractor (gtk_allocation, GtkAllocation_val, width, Val_int) -Make_Extractor (gtk_allocation, GtkAllocation_val, height, Val_int) -*/ - -ML_2 (gtk_widget_set_app_paintable, GtkWidget_val, Bool_val, Unit) - -ML_2 (gtk_widget_set_visual, GtkWidget_val, GdkVisual_val, Unit) -ML_2 (gtk_widget_set_colormap, GtkWidget_val, GdkColormap_val, Unit) -ML_1 (gtk_widget_set_default_visual, GdkVisual_val, Unit) -ML_1 (gtk_widget_set_default_colormap, GdkColormap_val, Unit) -ML_0 (gtk_widget_get_default_visual, Val_GdkVisual) -ML_0 (gtk_widget_get_default_colormap, Val_GdkColormap) -ML_1 (gtk_widget_push_visual, GdkVisual_val, Unit) -ML_1 (gtk_widget_push_colormap, GdkColormap_val, Unit) -ML_0 (gtk_widget_pop_visual, Unit) -ML_0 (gtk_widget_pop_colormap, Unit) - -/* gtkdnd.h */ - -value ml_gtk_drag_dest_set (value w, value f, value t, value a) -{ - GtkTargetEntry *targets = (GtkTargetEntry *)Val_unit; - int n_targets, i; - - CAMLparam4 (w,f,t,a); - n_targets = Wosize_val(t); - if (n_targets) - targets = (GtkTargetEntry *) - alloc (Wosize_asize(n_targets * sizeof(GtkTargetEntry)), - Abstract_tag); - for (i=0; ilength < 0) ml_raise_null_pointer(); - ret = alloc_string (data->length); - if (data->length) memcpy ((void*)ret, data->data, data->length); - return ret; -} - -ML_4 (gtk_selection_data_set, GtkSelectionData_val, Int_val, Int_val, - Insert((guchar*)String_option_val(arg4)) - Option_val(arg4, string_length, -1) Ignore, - Unit) - -/* gtkcontainer.h */ - -#define GtkContainer_val(val) check_cast(GTK_CONTAINER,val) -ML_2 (gtk_container_set_border_width, GtkContainer_val, Int_val, Unit) -ML_2 (gtk_container_set_resize_mode, GtkContainer_val, Resize_mode_val, Unit) -ML_2 (gtk_container_add, GtkContainer_val, GtkWidget_val, Unit) -ML_2 (gtk_container_remove, GtkContainer_val, GtkWidget_val, Unit) -static void ml_gtk_simple_callback (GtkWidget *w, gpointer data) -{ - value val, *clos = (value*)data; - val = Val_GtkWidget(w); - callback (*clos, val); -} -value ml_gtk_container_foreach (value w, value clos) -{ - CAMLparam1(clos); - gtk_container_foreach (GtkContainer_val(w), ml_gtk_simple_callback, - &clos); - CAMLreturn(Val_unit); -} -ML_1 (gtk_container_register_toplevel, GtkContainer_val, Unit) -ML_1 (gtk_container_unregister_toplevel, GtkContainer_val, Unit) -ML_2 (gtk_container_focus, GtkContainer_val, Direction_type_val, Val_bool) -ML_2 (gtk_container_set_focus_child, GtkContainer_val, GtkWidget_val, Unit) -ML_2 (gtk_container_set_focus_vadjustment, GtkContainer_val, - GtkAdjustment_val, Unit) -ML_2 (gtk_container_set_focus_hadjustment, GtkContainer_val, - GtkAdjustment_val, Unit) - -/* gtkbin.h */ - -/* gtkalignment.h */ - -#define GtkAlignment_val(val) check_cast(GTK_ALIGNMENT,val) -ML_4 (gtk_alignment_new, Float_val, Float_val, Float_val, Float_val, - Val_GtkWidget_sink) -value ml_gtk_alignment_set (value x, value y, - value xscale, value yscale, value val) -{ - GtkAlignment *alignment = GtkAlignment_val(val); - gtk_alignment_set (alignment, - Option_val(x, Float_val, alignment->xalign), - Option_val(y, Float_val, alignment->yalign), - Option_val(xscale, Float_val, alignment->xscale), - Option_val(yscale, Float_val, alignment->xscale)); - return Val_unit; -} - -/* gtkeventbox.h */ - -ML_0 (gtk_event_box_new, Val_GtkWidget_sink) - -/* gtkframe.h */ - -#define GtkFrame_val(val) check_cast(GTK_FRAME,val) -ML_1 (gtk_frame_new, Optstring_val, Val_GtkWidget_sink) -ML_2 (gtk_frame_set_label, GtkFrame_val, Optstring_val, Unit) -ML_3 (gtk_frame_set_label_align, GtkFrame_val, Float_val, Float_val, Unit) -ML_2 (gtk_frame_set_shadow_type, GtkFrame_val, Shadow_type_val, Unit) -Make_Extractor (gtk_frame_get, GtkFrame_val, label_xalign, copy_double) -Make_Extractor (gtk_frame_get, GtkFrame_val, label_yalign, copy_double) - -/* gtkaspectframe.h */ - -#define GtkAspectFrame_val(val) check_cast(GTK_ASPECT_FRAME,val) -ML_5 (gtk_aspect_frame_new, Optstring_val, - Float_val, Float_val, Float_val, Bool_val, Val_GtkWidget_sink) -ML_5 (gtk_aspect_frame_set, GtkAspectFrame_val, Float_val, Float_val, - Float_val, Bool_val, Unit) -Make_Extractor (gtk_aspect_frame_get, GtkAspectFrame_val, xalign, copy_double) -Make_Extractor (gtk_aspect_frame_get, GtkAspectFrame_val, yalign, copy_double) -Make_Extractor (gtk_aspect_frame_get, GtkAspectFrame_val, ratio, copy_double) -Make_Extractor (gtk_aspect_frame_get, GtkAspectFrame_val, obey_child, Val_bool) - -/* gtkhandlebox.h */ - -#define GtkHandleBox_val(val) check_cast(GTK_HANDLE_BOX,val) -ML_0 (gtk_handle_box_new, Val_GtkWidget_sink) -ML_2 (gtk_handle_box_set_shadow_type, GtkHandleBox_val, Shadow_type_val, Unit) -ML_2 (gtk_handle_box_set_handle_position, GtkHandleBox_val, Position_val, Unit) -ML_2 (gtk_handle_box_set_snap_edge, GtkHandleBox_val, Position_val, Unit) - -/* gtkinvisible.h */ -/* private class -ML_0 (gtk_invisible_new, Val_GtkWidget_sink) -*/ - -/* gtkitem.h */ - -#define GtkItem_val(val) check_cast(GTK_ITEM,val) -ML_1 (gtk_item_select, GtkItem_val, Unit) -ML_1 (gtk_item_deselect, GtkItem_val, Unit) -ML_1 (gtk_item_toggle, GtkItem_val, Unit) - -/* gtklistitem.h */ - -ML_0 (gtk_list_item_new, Val_GtkWidget_sink) -ML_1 (gtk_list_item_new_with_label, String_val, Val_GtkWidget_sink) - -/* gtkmenuitem.h */ - -#define GtkMenuItem_val(val) check_cast(GTK_MENU_ITEM,val) -ML_0 (gtk_menu_item_new, Val_GtkWidget_sink) -ML_0 (gtk_tearoff_menu_item_new, Val_GtkWidget_sink) -ML_1 (gtk_menu_item_new_with_label, String_val, Val_GtkWidget_sink) -ML_2 (gtk_menu_item_set_submenu, GtkMenuItem_val, GtkWidget_val, Unit) -ML_1 (gtk_menu_item_remove_submenu, GtkMenuItem_val, Unit) -ML_2 (gtk_menu_item_set_placement, GtkMenuItem_val, - Submenu_placement_val, Unit) -ML_3 (gtk_menu_item_configure, GtkMenuItem_val, Bool_val, Bool_val, Unit) -ML_1 (gtk_menu_item_activate, GtkMenuItem_val, Unit) -ML_1 (gtk_menu_item_right_justify, GtkMenuItem_val, Unit) - -/* gtkcheckmenuitem.h */ - -#define GtkCheckMenuItem_val(val) check_cast(GTK_CHECK_MENU_ITEM,val) -ML_0 (gtk_check_menu_item_new, Val_GtkWidget_sink) -ML_1 (gtk_check_menu_item_new_with_label, String_val, Val_GtkWidget_sink) -ML_2 (gtk_check_menu_item_set_active, GtkCheckMenuItem_val, Bool_val, Unit) -ML_2 (gtk_check_menu_item_set_show_toggle, GtkCheckMenuItem_val, - Bool_val, Unit) -ML_1 (gtk_check_menu_item_toggled, GtkCheckMenuItem_val, Unit) -Make_Extractor (gtk_check_menu_item_get, GtkCheckMenuItem_val, - active, Val_bool) - -/* gtkradiomenuitem.h */ - -#define GtkRadioMenuItem_val(val) check_cast(GTK_RADIO_MENU_ITEM,val) -static GSList* item_group_val(value val) -{ - return (val == Val_unit ? NULL : - gtk_radio_menu_item_group(GtkRadioMenuItem_val(Field(val,0)))); -} -ML_1 (gtk_radio_menu_item_new, item_group_val, Val_GtkWidget_sink) -ML_2 (gtk_radio_menu_item_new_with_label, item_group_val, - String_val, Val_GtkWidget_sink) -ML_2 (gtk_radio_menu_item_set_group, GtkRadioMenuItem_val, - item_group_val, Unit) - -/* gtktreeitem.h */ - -#define GtkTreeItem_val(val) check_cast(GTK_TREE_ITEM,val) -ML_0 (gtk_tree_item_new, Val_GtkWidget_sink) -ML_1 (gtk_tree_item_new_with_label, String_val, Val_GtkWidget_sink) -ML_2 (gtk_tree_item_set_subtree, GtkTreeItem_val, GtkWidget_val, Unit) -ML_1 (gtk_tree_item_remove_subtree, GtkTreeItem_val, Unit) -ML_1 (gtk_tree_item_expand, GtkTreeItem_val, Unit) -ML_1 (gtk_tree_item_collapse, GtkTreeItem_val, Unit) -ML_1 (GTK_TREE_ITEM_SUBTREE, GtkTreeItem_val, Val_GtkWidget) - -/* gtkviewport.h */ - -#define GtkViewport_val(val) check_cast(GTK_VIEWPORT,val) -ML_2 (gtk_viewport_new, GtkAdjustment_val, GtkAdjustment_val, - Val_GtkWidget_sink) -ML_1 (gtk_viewport_get_hadjustment, GtkViewport_val, Val_GtkWidget_sink) -ML_1 (gtk_viewport_get_vadjustment, GtkViewport_val, Val_GtkWidget) -ML_2 (gtk_viewport_set_hadjustment, GtkViewport_val, GtkAdjustment_val, Unit) -ML_2 (gtk_viewport_set_vadjustment, GtkViewport_val, GtkAdjustment_val, Unit) -ML_2 (gtk_viewport_set_shadow_type, GtkViewport_val, Shadow_type_val, Unit) - -/* gtkdialog.h */ - -static void window_unref (GtkObject *w) -{ - /* If the window exists and is still not visible, then unreference twice. - This should be enough to destroy it. */ - if (!GTK_OBJECT_DESTROYED(w) && !GTK_WIDGET_VISIBLE(w)) - gtk_object_unref (w); - gtk_object_unref (w); -} -Make_Val_final_pointer_ext (GtkObject, _window, gtk_object_ref, window_unref, - 20) -#define Val_GtkWidget_window(w) Val_GtkObject_window((GtkObject*)w) - -#define GtkDialog_val(val) check_cast(GTK_DIALOG,val) -ML_0 (gtk_dialog_new, Val_GtkWidget_window) -Make_Extractor (GtkDialog, GtkDialog_val, action_area, Val_GtkWidget) -Make_Extractor (GtkDialog, GtkDialog_val, vbox, Val_GtkWidget) - -/* gtkinputdialog.h */ - -ML_0 (gtk_input_dialog_new, Val_GtkWidget_window) - -/* gtkfileselection.h */ - -#define GtkFileSelection_val(val) check_cast(GTK_FILE_SELECTION,val) -ML_1 (gtk_file_selection_new, String_val, Val_GtkWidget_window) -ML_2 (gtk_file_selection_set_filename, GtkFileSelection_val, String_val, Unit) -ML_1 (gtk_file_selection_get_filename, GtkFileSelection_val, Val_string) -ML_1 (gtk_file_selection_show_fileop_buttons, GtkFileSelection_val, Unit) -ML_1 (gtk_file_selection_hide_fileop_buttons, GtkFileSelection_val, Unit) -Make_Extractor (gtk_file_selection_get, GtkFileSelection_val, ok_button, - Val_GtkWidget) -Make_Extractor (gtk_file_selection_get, GtkFileSelection_val, cancel_button, - Val_GtkWidget) -Make_Extractor (gtk_file_selection_get, GtkFileSelection_val, help_button, - Val_GtkWidget) - -/* gtkwindow.h */ - -#define GtkWindow_val(val) check_cast(GTK_WINDOW,val) -ML_1 (gtk_window_new, Window_type_val, Val_GtkWidget_window) -ML_2 (gtk_window_set_title, GtkWindow_val, String_val, Unit) -ML_3 (gtk_window_set_wmclass, GtkWindow_val, String_val, String_val, Unit) -Make_Extractor (gtk_window_get, GtkWindow_val, wmclass_name, Val_optstring) -Make_Extractor (gtk_window_get, GtkWindow_val, wmclass_class, Val_optstring) -ML_2 (gtk_window_set_focus, GtkWindow_val, GtkWidget_val, Unit) -ML_2 (gtk_window_set_default, GtkWindow_val, GtkWidget_val, Unit) -ML_4 (gtk_window_set_policy, GtkWindow_val, Bool_val, Bool_val, Bool_val, Unit) -Make_Extractor (gtk_window_get, GtkWindow_val, allow_shrink, Val_bool) -Make_Extractor (gtk_window_get, GtkWindow_val, allow_grow, Val_bool) -Make_Extractor (gtk_window_get, GtkWindow_val, auto_shrink, Val_bool) -ML_2 (gtk_window_add_accel_group, GtkWindow_val, - GtkAccelGroup_val, Unit) -ML_2 (gtk_window_remove_accel_group, GtkWindow_val, - GtkAccelGroup_val, Unit) -ML_1 (gtk_window_activate_focus, GtkWindow_val, Val_bool) -ML_1 (gtk_window_activate_default, GtkWindow_val, Val_bool) -ML_2 (gtk_window_set_modal, GtkWindow_val, Bool_val, Unit) -ML_3 (gtk_window_set_default_size, GtkWindow_val, Int_val, Int_val, Unit) -ML_2 (gtk_window_set_position, GtkWindow_val, Window_position_val, Unit) -ML_2 (gtk_window_set_transient_for, GtkWindow_val, GtkWindow_val, Unit) - -/* gtkcolorsel.h */ - -#define GtkColorSelection_val(val) check_cast(GTK_COLOR_SELECTION,val) -#define GtkColorSelectionDialog_val(val) check_cast(GTK_COLOR_SELECTION_DIALOG,val) -ML_0 (gtk_color_selection_new, Val_GtkWidget_sink) -ML_2 (gtk_color_selection_set_update_policy, GtkColorSelection_val, - Update_type_val, Unit) -ML_2 (gtk_color_selection_set_opacity, GtkColorSelection_val, - Bool_val, Unit) -value ml_gtk_color_selection_set_color (value w, value red, value green, - value blue, value opacity) -{ - double color[4]; - color[0] = Double_val(red); - color[1] = Double_val(green); - color[2] = Double_val(blue); - color[3] = Option_val(opacity,Double_val,0.0); - gtk_color_selection_set_color (GtkColorSelection_val(w), color); - return Val_unit; -} -value ml_gtk_color_selection_get_color (value w) -{ - value ret; - double color[4]; - color[3] = 0.0; - gtk_color_selection_get_color (GtkColorSelection_val(w), color); - ret = alloc (4*Double_wosize, Double_array_tag); - Store_double_field (ret, 0, color[0]); - Store_double_field (ret, 1, color[1]); - Store_double_field (ret, 2, color[2]); - Store_double_field (ret, 3, color[3]); - return ret; -} -ML_1 (gtk_color_selection_dialog_new, String_val, Val_GtkWidget_window) -Make_Extractor (gtk_color_selection_dialog, GtkColorSelectionDialog_val, ok_button, Val_GtkWidget) -Make_Extractor (gtk_color_selection_dialog, GtkColorSelectionDialog_val, cancel_button, Val_GtkWidget) -Make_Extractor (gtk_color_selection_dialog, GtkColorSelectionDialog_val, help_button, Val_GtkWidget) -Make_Extractor (gtk_color_selection_dialog, GtkColorSelectionDialog_val, colorsel, Val_GtkWidget) - -/* gtkfontsel.h */ - -#define GtkFontSelection_val(val) \ - check_cast(GTK_FONT_SELECTION,val) -ML_0 (gtk_font_selection_new, Val_GtkWidget_sink) -ML_1 (gtk_font_selection_get_font, GtkFontSelection_val, - Val_GdkFont) -ML_1 (gtk_font_selection_get_font_name, GtkFontSelection_val, - copy_string_check) -ML_2 (gtk_font_selection_set_font_name, GtkFontSelection_val, - String_val, Val_bool) -ML_9 (gtk_font_selection_set_filter, GtkFontSelection_val, - Font_filter_type_val, Flags_Font_type_val, - (gchar**), (gchar**), (gchar**), - (gchar**), (gchar**), (gchar**), Unit) -ML_bc9 (ml_gtk_font_selection_set_filter) -ML_1 (gtk_font_selection_get_preview_text, GtkFontSelection_val, - copy_string) -ML_2 (gtk_font_selection_set_preview_text, GtkFontSelection_val, - String_val, Unit) - -#define GtkFontSelectionDialog_val(val) \ - check_cast(GTK_FONT_SELECTION_DIALOG,val) -ML_1 (gtk_font_selection_dialog_new, String_option_val, Val_GtkWidget_window) -/* -ML_1 (gtk_font_selection_dialog_get_font, GtkFontSelectionDialog_val, - Val_GdkFont) -ML_1 (gtk_font_selection_dialog_get_font_name, GtkFontSelectionDialog_val, - copy_string_check) -ML_2 (gtk_font_selection_dialog_set_font_name, GtkFontSelectionDialog_val, - String_val, Val_bool) -ML_9 (gtk_font_selection_dialog_set_filter, GtkFontSelectionDialog_val, - Font_filter_type_val, Flags_Font_type_val, - (gchar**), (gchar**), (gchar**), - (gchar**), (gchar**), (gchar**), Unit) -ML_bc9 (ml_gtk_font_selection_dialog_set_filter) -ML_1 (gtk_font_selection_dialog_get_preview_text, GtkFontSelectionDialog_val, - copy_string) -ML_2 (gtk_font_selection_dialog_set_preview_text, GtkFontSelectionDialog_val, - String_val, Unit) -*/ -Make_Extractor (gtk_font_selection_dialog, GtkFontSelectionDialog_val, - fontsel, Val_GtkWidget) -Make_Extractor (gtk_font_selection_dialog, GtkFontSelectionDialog_val, - ok_button, Val_GtkWidget) -Make_Extractor (gtk_font_selection_dialog, GtkFontSelectionDialog_val, - apply_button, Val_GtkWidget) -Make_Extractor (gtk_font_selection_dialog, GtkFontSelectionDialog_val, - cancel_button, Val_GtkWidget) - -/* gtkplug.h */ - -ML_1 (gtk_plug_new, XID_val, Val_GtkWidget_window) - -/* gtkbox.h */ - -#define GtkBox_val(val) check_cast(GTK_BOX,val) -ML_5 (gtk_box_pack_start, GtkBox_val, GtkWidget_val, Bool_val, Bool_val, - Int_val, Unit) -ML_5 (gtk_box_pack_end, GtkBox_val, GtkWidget_val, Bool_val, Bool_val, - Int_val, Unit) -ML_2 (gtk_box_set_homogeneous, GtkBox_val, Bool_val, Unit) -ML_2 (gtk_box_set_spacing, GtkBox_val, Int_val, Unit) -ML_3 (gtk_box_reorder_child, GtkBox_val, GtkWidget_val, Int_val, Unit) -value ml_gtk_box_query_child_packing (value box, value child) -{ - int expand, fill; - unsigned int padding; - GtkPackType pack_type; - value ret; - gtk_box_query_child_packing (GtkBox_val(box), GtkWidget_val(child), - &expand, &fill, &padding, &pack_type); - ret = alloc_small(4,0); - Field(ret,0) = Val_bool(expand); - Field(ret,1) = Val_bool(fill); - Field(ret,2) = Val_int(padding); - Field(ret,3) = Val_pack_type(pack_type); - return ret; -} -value ml_gtk_box_set_child_packing (value vbox, value vchild, value vexpand, - value vfill, value vpadding, value vpack) -{ - GtkBox *box = GtkBox_val(vbox); - GtkWidget *child = GtkWidget_val(vchild); - int expand, fill; - unsigned int padding; - GtkPackType pack; - gtk_box_query_child_packing (box, child, &expand, &fill, &padding, &pack); - gtk_box_set_child_packing (box, child, - Option_val(vexpand, Bool_val, expand), - Option_val(vfill, Bool_val, fill), - Option_val(vpadding, Int_val, padding), - Option_val(vpack, Pack_type_val, pack)); - return Val_unit; -} -ML_bc6 (ml_gtk_box_set_child_packing) - -ML_2 (gtk_hbox_new, Bool_val, Int_val, Val_GtkWidget_sink) -ML_2 (gtk_vbox_new, Bool_val, Int_val, Val_GtkWidget_sink) - -/* gtkbbox.h */ - -#define GtkButtonBox_val(val) check_cast(GTK_BUTTON_BOX,val) -Make_Extractor (gtk_button_box_get, GtkButtonBox_val, spacing, Val_int) -Make_Extractor (gtk_button_box_get, GtkButtonBox_val, child_min_width, Val_int) -Make_Extractor (gtk_button_box_get, GtkButtonBox_val, child_min_height, - Val_int) -Make_Extractor (gtk_button_box_get, GtkButtonBox_val, child_ipad_x, Val_int) -Make_Extractor (gtk_button_box_get, GtkButtonBox_val, child_ipad_y, Val_int) -Make_Extractor (gtk_button_box_get, GtkButtonBox_val, layout_style, - Val_button_box_style) -ML_2 (gtk_button_box_set_spacing, GtkButtonBox_val, Int_val, Unit) -ML_3 (gtk_button_box_set_child_size, GtkButtonBox_val, - Int_val, Int_val, Unit) -ML_3 (gtk_button_box_set_child_ipadding, GtkButtonBox_val, - Int_val, Int_val, Unit) -ML_2 (gtk_button_box_set_layout, GtkButtonBox_val, Button_box_style_val, Unit) -ML_2 (gtk_button_box_set_child_size_default, Int_val, Int_val, Unit) -ML_2 (gtk_button_box_set_child_ipadding_default, Int_val, Int_val, Unit) - -ML_0 (gtk_hbutton_box_new, Val_GtkWidget_sink) -ML_0 (gtk_vbutton_box_new, Val_GtkWidget_sink) - -/* gtklist.h */ - -#define GtkList_val(val) check_cast(GTK_LIST,val) -ML_0 (gtk_list_new, Val_GtkWidget_sink) -value ml_gtk_list_insert_item (value list, value item, value pos) -{ - GList *tmp_list = g_list_alloc (); - tmp_list->data = GtkWidget_val(item); - tmp_list->next = NULL; - tmp_list->prev = NULL; - gtk_list_insert_items (GtkList_val(list), tmp_list, Int_val(pos)); - return Val_unit; -} -ML_3 (gtk_list_clear_items, GtkList_val, Int_val, Int_val, Unit) -ML_2 (gtk_list_select_item, GtkList_val, Int_val, Unit) -ML_2 (gtk_list_unselect_item, GtkList_val, Int_val, Unit) -ML_2 (gtk_list_select_child, GtkList_val, GtkWidget_val, Unit) -ML_2 (gtk_list_unselect_child, GtkList_val, GtkWidget_val, Unit) -ML_2 (gtk_list_child_position, GtkList_val, GtkWidget_val, Val_int) -ML_2 (gtk_list_set_selection_mode, GtkList_val, Selection_mode_val, Unit) - -/* gtkcombo.h */ - -#define GtkCombo_val(val) check_cast(GTK_COMBO,val) -ML_0 (gtk_combo_new, Val_GtkWidget_sink) -ML_3 (gtk_combo_set_value_in_list, GtkCombo_val, - Option_val(arg2, Bool_val, GtkCombo_val(arg1)->value_in_list) Ignore, - Option_val(arg3, Bool_val, GtkCombo_val(arg1)->ok_if_empty) Ignore, - Unit) -ML_2 (gtk_combo_set_use_arrows, GtkCombo_val, Bool_val, Unit) -ML_2 (gtk_combo_set_use_arrows_always, GtkCombo_val, Bool_val, Unit) -ML_2 (gtk_combo_set_case_sensitive, GtkCombo_val, Bool_val, Unit) -ML_3 (gtk_combo_set_item_string, GtkCombo_val, GtkItem_val, String_val, Unit) -ML_1 (gtk_combo_disable_activate, GtkCombo_val, Unit) -Make_Extractor (gtk_combo, GtkCombo_val, entry, Val_GtkWidget) -Make_Extractor (gtk_combo, GtkCombo_val, list, Val_GtkWidget) - -/* gtkstatusbar.h */ - -#define GtkStatusbar_val(val) check_cast(GTK_STATUSBAR,val) -ML_0 (gtk_statusbar_new, Val_GtkWidget_sink) -ML_2 (gtk_statusbar_get_context_id, GtkStatusbar_val, String_val, Val_int) -ML_3 (gtk_statusbar_push, GtkStatusbar_val, Int_val, String_val, Val_int) -ML_2 (gtk_statusbar_pop, GtkStatusbar_val, Int_val, Unit) -ML_3 (gtk_statusbar_remove, GtkStatusbar_val, Int_val, Int_val, Unit) - -/* gtkgamma.h */ - -#define GtkGammaCurve_val(val) check_cast(GTK_GAMMA_CURVE,val) -ML_0 (gtk_gamma_curve_new, Val_GtkWidget_sink) -Make_Extractor (gtk_gamma_curve_get, GtkGammaCurve_val, gamma, copy_double) - -/* gtkbutton.h */ - -#define GtkButton_val(val) check_cast(GTK_BUTTON,val) -ML_0 (gtk_button_new, Val_GtkWidget_sink) -ML_1 (gtk_button_new_with_label, String_val, Val_GtkWidget_sink) -ML_1 (gtk_button_pressed, GtkButton_val, Unit) -ML_1 (gtk_button_released, GtkButton_val, Unit) -ML_1 (gtk_button_clicked, GtkButton_val, Unit) -ML_1 (gtk_button_enter, GtkButton_val, Unit) -ML_1 (gtk_button_leave, GtkButton_val, Unit) - -/* gtkoptionmenu.h */ - -#define GtkOptionMenu_val(val) check_cast(GTK_OPTION_MENU,val) -ML_0 (gtk_option_menu_new, Val_GtkWidget_sink) -ML_1 (gtk_option_menu_get_menu, GtkOptionMenu_val, Val_GtkWidget_sink) -ML_2 (gtk_option_menu_set_menu, GtkOptionMenu_val, GtkWidget_val, Unit) -ML_1 (gtk_option_menu_remove_menu, GtkOptionMenu_val, Unit) -ML_2 (gtk_option_menu_set_history, GtkOptionMenu_val, Int_val, Unit) - -/* gtktogglebutton.h */ - -#define GtkToggleButton_val(val) check_cast(GTK_TOGGLE_BUTTON,val) -ML_0 (gtk_toggle_button_new, Val_GtkWidget_sink) -ML_1 (gtk_toggle_button_new_with_label, String_val, Val_GtkWidget_sink) -ML_2 (gtk_toggle_button_set_mode, GtkToggleButton_val, Bool_val, Unit) -ML_2 (gtk_toggle_button_set_active, GtkToggleButton_val, Bool_val, Unit) -ML_1 (gtk_toggle_button_toggled, GtkToggleButton_val, Unit) -Make_Extractor (gtk_toggle_button_get, GtkToggleButton_val, active, Val_bool) - -/* gtkcheckbutton.h */ - -#define GtkCheckButton_val(val) check_cast(GTK_CHECK_BUTTON,val) -ML_0 (gtk_check_button_new, Val_GtkWidget_sink) -ML_1 (gtk_check_button_new_with_label, String_val, Val_GtkWidget_sink) - -/* gtkradiobutton.h */ - -#define GtkRadioButton_val(val) check_cast(GTK_RADIO_BUTTON,val) -static GSList* button_group_val(value val) -{ - return (val == Val_unit ? NULL : - gtk_radio_button_group(GtkRadioButton_val(Field(val,0)))); -} -ML_1 (gtk_radio_button_new, button_group_val, - Val_GtkWidget_sink) -ML_2 (gtk_radio_button_new_with_label, button_group_val, - String_val, Val_GtkWidget_sink) -ML_2 (gtk_radio_button_set_group, GtkRadioButton_val, button_group_val, Unit) - -/* gtkclist.h */ - -#define GtkCList_val(val) check_cast(GTK_CLIST,val) -ML_1 (gtk_clist_new, Int_val, Val_GtkWidget_sink) -ML_1 (gtk_clist_new_with_titles, Insert(Wosize_val(arg1)) (char **), - Val_GtkWidget_sink) -Make_Extractor (gtk_clist_get, GtkCList_val, rows, Val_int) -Make_Extractor (gtk_clist_get, GtkCList_val, columns, Val_int) -Make_Extractor (gtk_clist_get, GtkCList_val, focus_row, Val_int) -ML_2 (gtk_clist_set_hadjustment, GtkCList_val, GtkAdjustment_val, Unit) -ML_2 (gtk_clist_set_vadjustment, GtkCList_val, GtkAdjustment_val, Unit) -ML_1 (gtk_clist_get_hadjustment, GtkCList_val, Val_GtkAny) -ML_1 (gtk_clist_get_vadjustment, GtkCList_val, Val_GtkAny) -ML_2 (gtk_clist_set_shadow_type, GtkCList_val, Shadow_type_val, Unit) -ML_2 (gtk_clist_set_selection_mode, GtkCList_val, Selection_mode_val, Unit) -ML_2 (gtk_clist_set_reorderable, GtkCList_val, Bool_val, Unit) -ML_2 (gtk_clist_set_use_drag_icons, GtkCList_val, Bool_val, Unit) -ML_3 (gtk_clist_set_button_actions, GtkCList_val, Int_val, - (guint8)Flags_Button_action_val, Unit) -ML_1 (gtk_clist_freeze, GtkCList_val, Unit) -ML_1 (gtk_clist_thaw, GtkCList_val, Unit) -ML_1 (gtk_clist_column_titles_show, GtkCList_val, Unit) -ML_1 (gtk_clist_column_titles_hide, GtkCList_val, Unit) -ML_2 (gtk_clist_column_title_active, GtkCList_val, Int_val, Unit) -ML_2 (gtk_clist_column_title_passive, GtkCList_val, Int_val, Unit) -ML_1 (gtk_clist_column_titles_active, GtkCList_val, Unit) -ML_1 (gtk_clist_column_titles_passive, GtkCList_val, Unit) -ML_3 (gtk_clist_set_column_title, GtkCList_val, Int_val, String_val, Unit) -ML_2 (gtk_clist_get_column_title, GtkCList_val, Int_val, Val_string) -ML_3 (gtk_clist_set_column_widget, GtkCList_val, Int_val, GtkWidget_val, Unit) -ML_2 (gtk_clist_get_column_widget, GtkCList_val, Int_val, Val_GtkWidget) -ML_3 (gtk_clist_set_column_justification, GtkCList_val, Int_val, - Justification_val, Unit) -ML_3 (gtk_clist_set_column_visibility, GtkCList_val, Int_val, Bool_val, Unit) -ML_3 (gtk_clist_set_column_resizeable, GtkCList_val, Int_val, Bool_val, Unit) -ML_3 (gtk_clist_set_column_auto_resize, GtkCList_val, Int_val, Bool_val, Unit) -ML_1 (gtk_clist_columns_autosize, GtkCList_val, Unit) -ML_2 (gtk_clist_optimal_column_width, GtkCList_val, Int_val, Val_int) -ML_3 (gtk_clist_set_column_width, GtkCList_val, Int_val, Int_val, Unit) -ML_3 (gtk_clist_set_column_min_width, GtkCList_val, Int_val, Int_val, Unit) -ML_3 (gtk_clist_set_column_max_width, GtkCList_val, Int_val, Int_val, Unit) -ML_2 (gtk_clist_set_row_height, GtkCList_val, Int_val, Unit) -ML_5 (gtk_clist_moveto, GtkCList_val, Int_val, Int_val, - Double_val, Double_val, Unit) -ML_2 (gtk_clist_row_is_visible, GtkCList_val, Int_val, Val_visibility) -ML_3 (gtk_clist_get_cell_type, GtkCList_val, Int_val, Int_val, Val_cell_type) -ML_4 (gtk_clist_set_text, GtkCList_val, Int_val, Int_val, Optstring_val, Unit) -value ml_gtk_clist_get_text (value clist, value row, value column) -{ - char *text; - if (!gtk_clist_get_text (GtkCList_val(clist), Int_val(row), - Int_val(column), &text)) - invalid_argument ("Gtk.Clist.get_text"); - return Val_optstring(text); -} -ML_5 (gtk_clist_set_pixmap, GtkCList_val, Int_val, Int_val, GdkPixmap_val, - GdkBitmap_val, Unit) -value ml_gtk_clist_get_pixmap (value clist, value row, value column) -{ - CAMLparam0 (); - GdkPixmap *pixmap; - GdkBitmap *bitmap; - CAMLlocal2 (vpixmap,vbitmap); - value ret; - - if (!gtk_clist_get_pixmap (GtkCList_val(clist), Int_val(row), - Int_val(column), &pixmap, &bitmap)) - invalid_argument ("Gtk.Clist.get_pixmap"); - vpixmap = Val_option (pixmap, Val_GdkPixmap); - vbitmap = Val_option (bitmap, Val_GdkBitmap); - - ret = alloc_small (2,0); - Field(ret,0) = vpixmap; - Field(ret,1) = vbitmap; - CAMLreturn(ret); -} -ML_7 (gtk_clist_set_pixtext, GtkCList_val, Int_val, Int_val, String_val, - (guint8)Long_val, GdkPixmap_val, GdkBitmap_val, Unit) -ML_bc7 (ml_gtk_clist_set_pixtext) -ML_3 (gtk_clist_set_foreground, GtkCList_val, Int_val, GdkColor_val, Unit) -ML_3 (gtk_clist_set_background, GtkCList_val, Int_val, GdkColor_val, Unit) -ML_3 (gtk_clist_get_cell_style, GtkCList_val, Int_val, Int_val, Val_GtkStyle) -ML_4 (gtk_clist_set_cell_style, GtkCList_val, Int_val, Int_val, GtkStyle_val, - Unit) -ML_2 (gtk_clist_get_row_style, GtkCList_val, Int_val, Val_GtkStyle) -ML_3 (gtk_clist_set_row_style, GtkCList_val, Int_val, GtkStyle_val, Unit) -ML_3 (gtk_clist_set_selectable, GtkCList_val, Int_val, Bool_val, Unit) -ML_2 (gtk_clist_get_selectable, GtkCList_val, Int_val, Val_bool) -ML_5 (gtk_clist_set_shift, GtkCList_val, Int_val, Int_val, Int_val, Int_val, - Unit) -/* ML_2 (gtk_clist_append, GtkCList_val, (char **), Val_int) */ -ML_3 (gtk_clist_insert, GtkCList_val, Int_val, (char **), Val_int) -ML_2 (gtk_clist_remove, GtkCList_val, Int_val, Unit) -value ml_gtk_clist_set_row_data (value w, value row, value data) -{ - value *data_p = ml_gtk_root_new (data); - gtk_clist_set_row_data_full (GtkCList_val(w), Int_val(row), - data_p, ml_gtk_root_destroy); - return Val_unit; -} -ML_2 (gtk_clist_get_row_data, GtkCList_val, Int_val, *(value*)Check_null) -ML_3 (gtk_clist_select_row, GtkCList_val, Int_val, Int_val, Unit) -ML_3 (gtk_clist_unselect_row, GtkCList_val, Int_val, Int_val, Unit) -ML_1 (gtk_clist_clear, GtkCList_val, Unit) -value ml_gtk_clist_get_selection_info (value clist, value x, value y) -{ - int row, column; - value ret; - if (!gtk_clist_get_selection_info (GtkCList_val(clist), Int_val(x), - Int_val(y), &row, &column)) - invalid_argument ("Gtk.Clist.get_selection_info"); - ret = alloc_small (2,0); - Field(ret,0) = row; - Field(ret,1) = column; - return ret; -} -ML_1 (gtk_clist_select_all, GtkCList_val, Unit) -ML_1 (gtk_clist_unselect_all, GtkCList_val, Unit) -ML_3 (gtk_clist_swap_rows, GtkCList_val, Int_val, Int_val, Unit) -ML_3 (gtk_clist_row_move, GtkCList_val, Int_val, Int_val, Unit) -ML_2 (gtk_clist_set_sort_column, GtkCList_val, Int_val, Unit) -ML_2 (gtk_clist_set_sort_type, GtkCList_val, Sort_type_val, Unit) -ML_1 (gtk_clist_sort, GtkCList_val, Unit) -ML_2 (gtk_clist_set_auto_sort, GtkCList_val, Bool_val, Unit) - -/* gtkctree.h */ -#define GtkCTree_val(val) check_cast(GTK_CTREE,val) -/* Beware: this definition axpects arg1 to be a GtkCTree */ -/* -#define GtkCTreeNode_val(val) \ - (gtk_ctree_find(GtkCTree_val(arg1),NULL,(GtkCTreeNode*)(val-1)) \ - ? (GtkCTreeNode*)(val-1) : (ml_raise_gtk ("Bad GtkCTreeNode"), NULL)) -#define Val_GtkCTreeNode Val_addr -ML_2 (gtk_ctree_new, Int_val, Int_val, Val_GtkWidget_sink) -ML_3 (gtk_ctree_new_with_titles, Int_val, Int_val, (char **), - Val_GtkWidget_sink) -ML_11 (gtk_ctree_insert_node, GtkCTree_val, GtkCTreeNode_val, - GtkCTreeNode_val, (char**), Int_val, GdkPixmap_val, GdkBitmap_val, - GdkPixmap_val, GdkBitmap_val, Bool_val, Bool_val, - Val_GtkCTreeNode) -ML_2 (gtk_ctree_remove_node, GtkCTree_val, GtkCTreeNode_val, Unit) -ML_2 (gtk_ctree_is_viewable, GtkCTree_val, GtkCTreeNode_val, Val_bool) -*/ - -/* gtkfixed.h */ - -#define GtkFixed_val(val) check_cast(GTK_FIXED,val) -ML_0 (gtk_fixed_new, Val_GtkWidget_sink) -ML_4 (gtk_fixed_put, GtkFixed_val, GtkWidget_val, (gint16)Long_val, (gint16)Long_val, Unit) -ML_4 (gtk_fixed_move, GtkFixed_val, GtkWidget_val, (gint16)Long_val, (gint16)Long_val, Unit) - -/* gtklayout.h */ - -#define GtkLayout_val(val) check_cast(GTK_LAYOUT,val) -ML_2 (gtk_layout_new, GtkAdjustment_val, GtkAdjustment_val, Val_GtkWidget_sink) -ML_4 (gtk_layout_put, GtkLayout_val, GtkWidget_val, Int_val, Int_val, Unit) -ML_4 (gtk_layout_move, GtkLayout_val, GtkWidget_val, Int_val, Int_val, Unit) -ML_3 (gtk_layout_set_size, GtkLayout_val, Int_val, Int_val, Unit) -ML_1 (gtk_layout_get_hadjustment, GtkLayout_val, Val_GtkAny) -ML_1 (gtk_layout_get_vadjustment, GtkLayout_val, Val_GtkAny) -ML_2 (gtk_layout_set_hadjustment, GtkLayout_val, GtkAdjustment_val, Unit) -ML_2 (gtk_layout_set_vadjustment, GtkLayout_val, GtkAdjustment_val, Unit) -ML_1 (gtk_layout_freeze, GtkLayout_val, Unit) -ML_1 (gtk_layout_thaw, GtkLayout_val, Unit) -Make_Extractor (gtk_layout_get, GtkLayout_val, width, Val_int) -Make_Extractor (gtk_layout_get, GtkLayout_val, height, Val_int) - -/* gtkmenushell.h */ - -#define GtkMenuShell_val(val) check_cast(GTK_MENU_SHELL,val) -ML_2 (gtk_menu_shell_append, GtkMenuShell_val, GtkWidget_val, Unit) -ML_2 (gtk_menu_shell_prepend, GtkMenuShell_val, GtkWidget_val, Unit) -ML_3 (gtk_menu_shell_insert, GtkMenuShell_val, GtkWidget_val, Int_val, Unit) -ML_1 (gtk_menu_shell_deactivate, GtkMenuShell_val, Unit) - -/* gtkmenu.h */ - -#define GtkMenu_val(val) check_cast(GTK_MENU,val) -ML_0 (gtk_menu_new, Val_GtkWidget_sink) -ML_5 (gtk_menu_popup, GtkMenu_val, GtkWidget_val, GtkWidget_val, - Insert(NULL) Insert(NULL) Int_val, Int_val, Unit) -ML_1 (gtk_menu_popdown, GtkMenu_val, Unit) -ML_1 (gtk_menu_get_active, GtkMenu_val, Val_GtkWidget) -ML_2 (gtk_menu_set_active, GtkMenu_val, Int_val, Unit) -ML_2 (gtk_menu_set_accel_group, GtkMenu_val, GtkAccelGroup_val, Unit) -ML_1 (gtk_menu_get_accel_group, GtkMenu_val, Val_GtkAccelGroup) -ML_1 (gtk_menu_ensure_uline_accel_group, GtkMenu_val, Val_GtkAccelGroup) -value ml_gtk_menu_attach_to_widget (value menu, value widget) -{ - gtk_menu_attach_to_widget (GtkMenu_val(menu), GtkWidget_val(widget), NULL); - return Val_unit; -} -ML_1 (gtk_menu_get_attach_widget, GtkMenu_val, Val_GtkWidget) -ML_1 (gtk_menu_detach, GtkMenu_val, Unit) - -/* gtkmenubar.h */ - -#define GtkMenuBar_val(val) check_cast(GTK_MENU_BAR,val) -ML_0 (gtk_menu_bar_new, Val_GtkWidget_sink) - -/* gtknotebook.h */ - -#define GtkNotebook_val(val) check_cast(GTK_NOTEBOOK,val) -ML_0 (gtk_notebook_new, Val_GtkWidget_sink) - -ML_5 (gtk_notebook_insert_page_menu, GtkNotebook_val, GtkWidget_val, - GtkWidget_val, GtkWidget_val, Int_val, Unit) -ML_2 (gtk_notebook_remove_page, GtkNotebook_val, Int_val, Unit) - -ML_2 (gtk_notebook_set_tab_pos, GtkNotebook_val, Position_val, Unit) -ML_2 (gtk_notebook_set_homogeneous_tabs, GtkNotebook_val, Bool_val, Unit) -ML_2 (gtk_notebook_set_show_tabs, GtkNotebook_val, Bool_val, Unit) -ML_2 (gtk_notebook_set_show_border, GtkNotebook_val, Bool_val, Unit) -ML_2 (gtk_notebook_set_scrollable, GtkNotebook_val, Bool_val, Unit) -ML_2 (gtk_notebook_set_tab_border, GtkNotebook_val, Int_val, Unit) -ML_1 (gtk_notebook_popup_enable, GtkNotebook_val, Unit) -ML_1 (gtk_notebook_popup_disable, GtkNotebook_val, Unit) - -ML_1 (gtk_notebook_get_current_page, GtkNotebook_val, Val_int) -ML_2 (gtk_notebook_set_page, GtkNotebook_val, Int_val, Unit) -ML_2 (gtk_notebook_get_nth_page, GtkNotebook_val, Int_val, Val_GtkWidget) -ML_2 (gtk_notebook_page_num, GtkNotebook_val, GtkWidget_val, Val_int) -ML_1 (gtk_notebook_next_page, GtkNotebook_val, Unit) -ML_1 (gtk_notebook_prev_page, GtkNotebook_val, Unit) - -ML_2 (gtk_notebook_get_tab_label, GtkNotebook_val, GtkWidget_val, - Val_GtkWidget) -ML_3 (gtk_notebook_set_tab_label, GtkNotebook_val, GtkWidget_val, - GtkWidget_val, Unit) -ML_2 (gtk_notebook_get_menu_label, GtkNotebook_val, GtkWidget_val, - Val_GtkWidget) -ML_3 (gtk_notebook_set_menu_label, GtkNotebook_val, GtkWidget_val, - GtkWidget_val, Unit) -ML_3 (gtk_notebook_reorder_child, GtkNotebook_val, GtkWidget_val, - Int_val, Unit) - - -/* gtkpacker.h */ - -Make_OptFlags_val(Packer_options_val) - -#define GtkPacker_val(val) check_cast(GTK_PACKER,val) -ML_0 (gtk_packer_new, Val_GtkWidget_sink) -ML_10 (gtk_packer_add, GtkPacker_val, GtkWidget_val, - Option_val(arg3,Side_type_val,GTK_SIDE_TOP) Ignore, - Option_val(arg4,Anchor_type_val,GTK_ANCHOR_CENTER) Ignore, - OptFlags_Packer_options_val, - Option_val(arg6,Int_val,GtkPacker_val(arg1)->default_border_width) Ignore, - Option_val(arg7,Int_val,GtkPacker_val(arg1)->default_pad_x) Ignore, - Option_val(arg8,Int_val,GtkPacker_val(arg1)->default_pad_y) Ignore, - Option_val(arg9,Int_val,GtkPacker_val(arg1)->default_i_pad_x) Ignore, - Option_val(arg10,Int_val,GtkPacker_val(arg1)->default_i_pad_y) Ignore, - Unit) -ML_bc10 (ml_gtk_packer_add) -ML_5 (gtk_packer_add_defaults, GtkPacker_val, GtkWidget_val, - Option_val(arg3,Side_type_val,GTK_SIDE_TOP) Ignore, - Option_val(arg4,Anchor_type_val,GTK_ANCHOR_CENTER) Ignore, - OptFlags_Packer_options_val, Unit) -ML_10 (gtk_packer_set_child_packing, GtkPacker_val, GtkWidget_val, - Option_val(arg3,Side_type_val,GTK_SIDE_TOP) Ignore, - Option_val(arg4,Anchor_type_val,GTK_ANCHOR_CENTER) Ignore, - OptFlags_Packer_options_val, - Option_val(arg6,Int_val,GtkPacker_val(arg1)->default_border_width) Ignore, - Option_val(arg7,Int_val,GtkPacker_val(arg1)->default_pad_x) Ignore, - Option_val(arg8,Int_val,GtkPacker_val(arg1)->default_pad_y) Ignore, - Option_val(arg9,Int_val,GtkPacker_val(arg1)->default_i_pad_x) Ignore, - Option_val(arg10,Int_val,GtkPacker_val(arg1)->default_i_pad_y) Ignore, - Unit) -ML_bc10 (ml_gtk_packer_set_child_packing) -ML_3 (gtk_packer_reorder_child, GtkPacker_val, GtkWidget_val, - Int_val, Unit) -ML_2 (gtk_packer_set_spacing, GtkPacker_val, Int_val, Unit) -value ml_gtk_packer_set_defaults (value w, value border_width, - value pad_x, value pad_y, - value i_pad_x, value i_pad_y) -{ - GtkPacker *p = GtkPacker_val(w); - if (Is_block(border_width)) - gtk_packer_set_default_border_width (p,Int_val(Field(border_width,0))); - if (Is_block(pad_x) || Is_block(pad_y)) - gtk_packer_set_default_pad - (p, Option_val(pad_x,Int_val,p->default_pad_x), - Option_val(pad_y,Int_val,p->default_pad_y)); - if (Is_block(i_pad_x) || Is_block(i_pad_y)) - gtk_packer_set_default_ipad - (p, Option_val(pad_x,Int_val,p->default_i_pad_x), - Option_val(pad_y,Int_val,p->default_i_pad_y)); - return Val_unit; -} -ML_bc6 (ml_gtk_packer_set_defaults) - -/* gtkpaned.h */ - -#define GtkPaned_val(val) check_cast(GTK_PANED,val) -ML_0 (gtk_hpaned_new, Val_GtkWidget_sink) -ML_0 (gtk_vpaned_new, Val_GtkWidget_sink) -ML_2 (gtk_paned_add1, GtkPaned_val, GtkWidget_val, Unit) -ML_2 (gtk_paned_add2, GtkPaned_val, GtkWidget_val, Unit) -ML_2 (gtk_paned_set_handle_size, GtkPaned_val, (gint16)Int_val, Unit) -ML_2 (gtk_paned_set_gutter_size, GtkPaned_val, (gint16)Int_val, Unit) -Make_Extractor (gtk_paned, GtkPaned_val, child1, Val_GtkWidget) -Make_Extractor (gtk_paned, GtkPaned_val, child2, Val_GtkWidget) -Make_Extractor (gtk_paned, GtkPaned_val, handle_size, Val_int) -Make_Extractor (gtk_paned, GtkPaned_val, gutter_size, Val_int) - -/* gtkscrolledwindow.h */ - -#define GtkScrolledWindow_val(val) check_cast(GTK_SCROLLED_WINDOW,val) -ML_2 (gtk_scrolled_window_new, GtkAdjustment_val ,GtkAdjustment_val, - Val_GtkWidget_sink) -ML_2 (gtk_scrolled_window_set_hadjustment, GtkScrolledWindow_val , - GtkAdjustment_val, Unit) -ML_2 (gtk_scrolled_window_set_vadjustment, GtkScrolledWindow_val , - GtkAdjustment_val, Unit) -ML_1 (gtk_scrolled_window_get_hadjustment, GtkScrolledWindow_val, - Val_GtkWidget) -ML_1 (gtk_scrolled_window_get_vadjustment, GtkScrolledWindow_val, - Val_GtkWidget) -ML_3 (gtk_scrolled_window_set_policy, GtkScrolledWindow_val, - Policy_type_val, Policy_type_val, Unit) -Make_Extractor (gtk_scrolled_window_get, GtkScrolledWindow_val, - hscrollbar_policy, Val_policy_type) -Make_Extractor (gtk_scrolled_window_get, GtkScrolledWindow_val, - vscrollbar_policy, Val_policy_type) -ML_2 (gtk_scrolled_window_set_placement, GtkScrolledWindow_val, - Corner_type_val, Unit) -ML_2 (gtk_scrolled_window_add_with_viewport, GtkScrolledWindow_val, - GtkWidget_val, Unit) - -/* gtksocket.h */ - -#define GtkSocket_val(val) check_cast(GTK_SOCKET,val) -ML_0 (gtk_socket_new, Val_GtkWidget_sink) -ML_2 (gtk_socket_steal, GtkSocket_val, XID_val, Unit) - -/* gtktable.h */ - -#define GtkTable_val(val) check_cast(GTK_TABLE,val) -ML_3 (gtk_table_new, Int_val, Int_val, Int_val, Val_GtkWidget_sink) -ML_10 (gtk_table_attach, GtkTable_val, GtkWidget_val, - Int_val, Int_val, Int_val, Int_val, - Flags_Attach_options_val, Flags_Attach_options_val, - Int_val, Int_val, Unit) -ML_bc10 (ml_gtk_table_attach) -ML_3 (gtk_table_set_row_spacing, GtkTable_val, Int_val, Int_val, Unit) -ML_3 (gtk_table_set_col_spacing, GtkTable_val, Int_val, Int_val, Unit) -ML_2 (gtk_table_set_row_spacings, GtkTable_val, Int_val, Unit) -ML_2 (gtk_table_set_col_spacings, GtkTable_val, Int_val, Unit) -ML_2 (gtk_table_set_homogeneous, GtkTable_val, Bool_val, Unit) - -/* gtktoolbar.h */ - -#define GtkToolbar_val(val) check_cast(GTK_TOOLBAR,val) -ML_2 (gtk_toolbar_new, Orientation_val, Toolbar_style_val, Val_GtkWidget_sink) -ML_2 (gtk_toolbar_insert_space, GtkToolbar_val, Int_val, Unit) -ML_7 (gtk_toolbar_insert_element, GtkToolbar_val, Toolbar_child_val, - Insert(NULL) Optstring_val, Optstring_val, Optstring_val, GtkWidget_val, - Insert(NULL) Insert(NULL) Int_val, Val_GtkWidget) -ML_bc7 (ml_gtk_toolbar_insert_element) -ML_5 (gtk_toolbar_insert_widget, GtkToolbar_val, GtkWidget_val, - Optstring_val, Optstring_val, Int_val, Unit) -ML_2 (gtk_toolbar_set_orientation, GtkToolbar_val, Orientation_val, Unit) -ML_2 (gtk_toolbar_set_style, GtkToolbar_val, Toolbar_style_val, Unit) -ML_2 (gtk_toolbar_set_space_size, GtkToolbar_val, Int_val, Unit) -ML_2 (gtk_toolbar_set_space_style, GtkToolbar_val, Toolbar_space_style_val, Unit) -ML_2 (gtk_toolbar_set_tooltips, GtkToolbar_val, Bool_val, Unit) -ML_2 (gtk_toolbar_set_button_relief, GtkToolbar_val, Relief_style_val, Unit) -ML_1 (gtk_toolbar_get_button_relief, GtkToolbar_val, Val_relief_style) - -/* gtktree.h */ - -#define GtkTree_val(val) check_cast(GTK_TREE,val) -ML_0 (gtk_tree_new, Val_GtkWidget_sink) -ML_3 (gtk_tree_insert, GtkTree_val, GtkWidget_val, Int_val, Unit) -ML_3 (gtk_tree_clear_items, GtkTree_val, Int_val, Int_val, Unit) -ML_2 (gtk_tree_select_item, GtkTree_val, Int_val, Unit) -ML_2 (gtk_tree_unselect_item, GtkTree_val, Int_val, Unit) -ML_2 (gtk_tree_child_position, GtkTree_val, GtkWidget_val, Val_int) -ML_2 (gtk_tree_set_selection_mode, GtkTree_val, Selection_mode_val, Unit) -ML_2 (gtk_tree_set_view_mode, GtkTree_val, Tree_view_mode_val, Unit) -ML_2 (gtk_tree_set_view_lines, GtkTree_val, Bool_val, Unit) - -static value val_gtkany (gpointer p) { return Val_GtkAny(p); } -value ml_gtk_tree_selection (value tree) -{ - GList *selection = GTK_TREE_SELECTION(GtkTree_val(tree)); - return Val_GList(selection, val_gtkany); -} -static gpointer gtkobject_val (value val) { return GtkObject_val(val); } -value ml_gtk_tree_remove_items (value tree, value items) -{ - GList *items_list = GList_val (items, gtkobject_val); - gtk_tree_remove_items (GtkTree_val(tree), items_list); - return Val_unit; -} - -/* gtkcalendar.h */ - -#define GtkCalendar_val(val) check_cast(GTK_CALENDAR,val) -ML_0 (gtk_calendar_new, Val_GtkWidget_sink) -ML_3 (gtk_calendar_select_month, GtkCalendar_val, Int_val, Int_val, Unit) -ML_2 (gtk_calendar_select_day, GtkCalendar_val, Int_val, Unit) -ML_2 (gtk_calendar_mark_day, GtkCalendar_val, Int_val, Unit) -ML_2 (gtk_calendar_unmark_day, GtkCalendar_val, Int_val, Unit) -ML_1 (gtk_calendar_clear_marks, GtkCalendar_val, Unit) -Make_Flags_val (Calendar_display_options_val) -ML_2 (gtk_calendar_display_options, GtkCalendar_val, - Flags_Calendar_display_options_val, Unit) -value ml_gtk_calendar_get_date (value w) -{ - guint year, month, day; - value ret; - - gtk_calendar_get_date (GtkCalendar_val(w), &year, &month, &day); - ret = alloc_small (3, 0); - Field(ret,0) = Val_int(year); - Field(ret,1) = Val_int(month); - Field(ret,2) = Val_int(day); - return ret; -} -ML_1 (gtk_calendar_freeze, GtkCalendar_val, Unit) -ML_1 (gtk_calendar_thaw, GtkCalendar_val, Unit) - -/* gtkdrawingarea.h */ - -#define GtkDrawingArea_val(val) check_cast(GTK_DRAWING_AREA,val) -ML_0 (gtk_drawing_area_new, Val_GtkWidget_sink) -ML_3 (gtk_drawing_area_size, GtkDrawingArea_val, Int_val, Int_val, Unit) - -/* gtkeditable.h */ - -#define GtkEditable_val(val) check_cast(GTK_EDITABLE,val) -ML_3 (gtk_editable_select_region, GtkEditable_val, Int_val, Int_val, Unit) -value ml_gtk_editable_insert_text (value w, value s, value pos) -{ - int position = Int_val(pos); - gtk_editable_insert_text (GtkEditable_val(w), String_val(s), - string_length(s), &position); - return Val_int(position); -} -ML_3 (gtk_editable_delete_text, GtkEditable_val, Int_val, Int_val, Unit) -ML_3 (gtk_editable_get_chars, GtkEditable_val, Int_val, Int_val, - copy_string_and_free) -ML_1 (gtk_editable_cut_clipboard, GtkEditable_val, Unit) -ML_1 (gtk_editable_copy_clipboard, GtkEditable_val, Unit) -ML_1 (gtk_editable_paste_clipboard, GtkEditable_val, Unit) -ML_3 (gtk_editable_claim_selection, GtkEditable_val, Bool_val, Int_val, Unit) -ML_1 (gtk_editable_delete_selection, GtkEditable_val, Unit) -ML_1 (gtk_editable_changed, GtkEditable_val, Unit) -ML_2 (gtk_editable_set_position, GtkEditable_val, Int_val, Unit) -ML_1 (gtk_editable_get_position, GtkEditable_val, Val_int) -ML_2 (gtk_editable_set_editable, GtkEditable_val, Bool_val, Unit) -Make_Extractor (gtk_editable, GtkEditable_val, selection_start_pos, Val_int) -Make_Extractor (gtk_editable, GtkEditable_val, selection_end_pos, Val_int) -Make_Extractor (gtk_editable, GtkEditable_val, has_selection, Val_bool) - -/* gtkentry.h */ - -#define GtkEntry_val(val) check_cast(GTK_ENTRY,val) -ML_0 (gtk_entry_new, Val_GtkWidget_sink) -ML_1 (gtk_entry_new_with_max_length, (gint16)Long_val, Val_GtkWidget_sink) -ML_2 (gtk_entry_set_text, GtkEntry_val, String_val, Unit) -ML_2 (gtk_entry_append_text, GtkEntry_val, String_val, Unit) -ML_2 (gtk_entry_prepend_text, GtkEntry_val, String_val, Unit) -ML_1 (gtk_entry_get_text, GtkEntry_val, Val_string) -ML_3 (gtk_entry_select_region, GtkEntry_val, Int_val, Int_val, Unit) -ML_2 (gtk_entry_set_visibility, GtkEntry_val, Bool_val, Unit) -ML_2 (gtk_entry_set_max_length, GtkEntry_val, (gint16)Long_val, Unit) -Make_Extractor (GtkEntry, GtkEntry_val, text_length, Val_int) - -/* gtkspinbutton.h */ - -#define GtkSpinButton_val(val) check_cast(GTK_SPIN_BUTTON,val) -ML_3 (gtk_spin_button_new, GtkAdjustment_val, - Float_val, Int_val, Val_GtkWidget_sink) -ML_2 (gtk_spin_button_set_adjustment, GtkSpinButton_val, GtkAdjustment_val, - Unit) -ML_1 (gtk_spin_button_get_adjustment, GtkSpinButton_val, Val_GtkAny) -ML_2 (gtk_spin_button_set_digits, GtkSpinButton_val, Int_val, Unit) -ML_1 (gtk_spin_button_get_value_as_float, GtkSpinButton_val, copy_double) -ML_2 (gtk_spin_button_set_value, GtkSpinButton_val, Float_val, Unit) -ML_2 (gtk_spin_button_set_update_policy, GtkSpinButton_val, - Update_type_val, Unit) -ML_2 (gtk_spin_button_set_numeric, GtkSpinButton_val, Bool_val, Unit) -ML_2 (gtk_spin_button_spin, GtkSpinButton_val, - Insert (Is_long(arg2) ? Spin_type_val(arg2) : GTK_SPIN_USER_DEFINED) - (Is_long(arg2) ? 0.0 : Float_val(Field(arg2,1))) Ignore, Unit) -ML_2 (gtk_spin_button_set_wrap, GtkSpinButton_val, Bool_val, Unit) -ML_2 (gtk_spin_button_set_shadow_type, GtkSpinButton_val, Shadow_type_val, Unit) -ML_2 (gtk_spin_button_set_snap_to_ticks, GtkSpinButton_val, Bool_val, Unit) -ML_4 (gtk_spin_button_configure, GtkSpinButton_val, GtkAdjustment_val, - Float_val, Int_val, Unit) -ML_1 (gtk_spin_button_update, GtkSpinButton_val, Unit) - -/* gtktext.h */ - -#define GtkText_val(val) check_cast(GTK_TEXT,val) -ML_2 (gtk_text_new, GtkAdjustment_val, GtkAdjustment_val, Val_GtkWidget_sink) -ML_2 (gtk_text_set_word_wrap, GtkText_val, Bool_val, Unit) -ML_2 (gtk_text_set_line_wrap, GtkText_val, Bool_val, Unit) -ML_3 (gtk_text_set_adjustments, GtkText_val, - Option_val(arg2,GtkAdjustment_val,GtkText_val(arg1)->hadj) Ignore, - Option_val(arg3,GtkAdjustment_val,GtkText_val(arg1)->vadj) Ignore, - Unit) -Make_Extractor (gtk_text_get, GtkText_val, hadj, Val_GtkWidget) -Make_Extractor (gtk_text_get, GtkText_val, vadj, Val_GtkWidget) -ML_2 (gtk_text_set_point, GtkText_val, Int_val, Unit) -ML_1 (gtk_text_get_point, GtkText_val, Val_int) -ML_1 (gtk_text_get_length, GtkText_val, Val_int) -ML_1 (gtk_text_freeze, GtkText_val, Unit) -ML_1 (gtk_text_thaw, GtkText_val, Unit) -value ml_gtk_text_insert (value text, value font, value fore, value back, - value str) -{ - gtk_text_insert (GtkText_val(text), - Option_val(font,GdkFont_val,NULL), - Option_val(fore,GdkColor_val,NULL), - Option_val(back,GdkColor_val,NULL), - String_val(str), string_length(str)); - return Val_unit; -} -ML_2 (gtk_text_forward_delete, GtkText_val, Int_val, Val_int) -ML_2 (gtk_text_backward_delete, GtkText_val, Int_val, Val_int) - -/* gtkmisc.h */ - -#define GtkMisc_val(val) check_cast(GTK_MISC,val) -ML_3 (gtk_misc_set_alignment, GtkMisc_val, Double_val, Double_val, Unit) -ML_3 (gtk_misc_set_padding, GtkMisc_val, Int_val, Int_val, Unit) -Make_Extractor (gtk_misc_get, GtkMisc_val, xalign, copy_double) -Make_Extractor (gtk_misc_get, GtkMisc_val, yalign, copy_double) -Make_Extractor (gtk_misc_get, GtkMisc_val, xpad, Val_int) -Make_Extractor (gtk_misc_get, GtkMisc_val, ypad, Val_int) - -/* gtkarrow.h */ - -#define GtkArrow_val(val) check_cast(GTK_ARROW,val) -ML_2 (gtk_arrow_new, Arrow_type_val, Shadow_type_val, Val_GtkWidget_sink) -ML_3 (gtk_arrow_set, GtkArrow_val, Arrow_type_val, Shadow_type_val, Unit) - -/* gtkimage.h */ - -#define GtkImage_val(val) check_cast(GTK_IMAGE,val) -ML_2 (gtk_image_new, GdkImage_val, - Option_val (arg2, GdkBitmap_val, NULL) Ignore, Val_GtkWidget_sink) -ML_3 (gtk_image_set, GtkImage_val, GdkImage_val, - Option_val (arg2, GdkBitmap_val, NULL) Ignore, Unit) - -/* gtklabel.h */ - -#define GtkLabel_val(val) check_cast(GTK_LABEL,val) -ML_1 (gtk_label_new, String_val, Val_GtkWidget_sink) -ML_2 (gtk_label_set_text, GtkLabel_val, String_val, Unit) -ML_2 (gtk_label_set_pattern, GtkLabel_val, String_val, Unit) -ML_2 (gtk_label_set_justify, GtkLabel_val, Justification_val, Unit) -ML_2 (gtk_label_set_line_wrap, GtkLabel_val, Bool_val, Unit) -Make_Extractor (gtk_label_get, GtkLabel_val, label, Val_string) - -/* gtktipsquery.h */ - -#define GtkTipsQuery_val(val) check_cast(GTK_TIPS_QUERY,val) -ML_0 (gtk_tips_query_new, Val_GtkWidget_sink) -ML_1 (gtk_tips_query_start_query, GtkTipsQuery_val, Unit) -ML_1 (gtk_tips_query_stop_query, GtkTipsQuery_val, Unit) -ML_2 (gtk_tips_query_set_caller, GtkTipsQuery_val, GtkWidget_val, Unit) -ML_3 (gtk_tips_query_set_labels, GtkTipsQuery_val, - String_val, String_val, Unit) -value ml_gtk_tips_query_set_emit_always (value w, value arg) -{ - GtkTipsQuery_val(w)->emit_always = Bool_val(arg); - return Val_unit; -} -Make_Extractor (gtk_tips_query_get, GtkTipsQuery_val, emit_always, Val_bool) -Make_Extractor (gtk_tips_query_get, GtkTipsQuery_val, caller, Val_GtkWidget) -Make_Extractor (gtk_tips_query_get, GtkTipsQuery_val, label_inactive, - Val_string) -Make_Extractor (gtk_tips_query_get, GtkTipsQuery_val, label_no_tip, - Val_string) - -/* gtkpixmap.h */ - -#define GtkPixmap_val(val) check_cast(GTK_PIXMAP,val) -ML_2 (gtk_pixmap_new, GdkPixmap_val, - Option_val (arg2, GdkBitmap_val, NULL) Ignore, - Val_GtkWidget_sink) -value ml_gtk_pixmap_set (value val, value pixmap, value mask) -{ - GtkPixmap *w = GtkPixmap_val(val); - gtk_pixmap_set (w, Option_val(pixmap,GdkPixmap_val,w->pixmap), - Option_val(mask,GdkBitmap_val,w->mask)); - return Val_unit; -} -Make_Extractor (GtkPixmap, GtkPixmap_val, pixmap, Val_GdkPixmap) -Make_Extractor (GtkPixmap, GtkPixmap_val, mask, Val_GdkBitmap) - -/* gtkpreview.h */ -/* -#define GtkPreview_val(val) GTK_PREVIEW(Pointer_val(val)) -ML_1 (gtk_preview_new, Preview_val, Val_GtkWidget_sink) -ML_3 (gtk_preview_size, GtkPreview_val, Int_val, Int_val, Unit) -ML_9 (gtk_preview_put, GtkPreview_val, GdkWindow_val, GdkGC_val, - Int_val, Int_val, Int_val, Int_val, Int_val, Int_val, Unit) -ML_bc9 (ml_gtk_preview_put) -*/ - -/* gtkprogress.h */ - -#define GtkProgress_val(val) check_cast(GTK_PROGRESS,val) -ML_2 (gtk_progress_set_show_text, GtkProgress_val, Bool_val, Unit) -ML_3 (gtk_progress_set_text_alignment, GtkProgress_val, - Option_val(arg2,Float_val,(GtkProgress_val(arg1))->x_align) Ignore, - Option_val(arg3,Float_val,(GtkProgress_val(arg1))->y_align) Ignore, Unit) -ML_2 (gtk_progress_set_format_string, GtkProgress_val, String_val, Unit) -ML_2 (gtk_progress_set_adjustment, GtkProgress_val, GtkAdjustment_val, Unit) -ML_4 (gtk_progress_configure, GtkProgress_val, - Float_val, Float_val, Float_val, Unit) -ML_2 (gtk_progress_set_percentage, GtkProgress_val, Float_val, Unit) -ML_2 (gtk_progress_set_value, GtkProgress_val, Float_val, Unit) -ML_1 (gtk_progress_get_value, GtkProgress_val, copy_double) -ML_1 (gtk_progress_get_current_percentage, GtkProgress_val, copy_double) -ML_2 (gtk_progress_set_activity_mode, GtkProgress_val, Bool_val, Unit) -ML_1 (gtk_progress_get_current_text, GtkProgress_val, Val_string) -Make_Extractor (gtk_progress_get, GtkProgress_val, adjustment, - Val_GtkAny) - -/* gtkprogressbar.h */ - -#define GtkProgressBar_val(val) check_cast(GTK_PROGRESS_BAR,val) -ML_0 (gtk_progress_bar_new, Val_GtkWidget_sink) -ML_1 (gtk_progress_bar_new_with_adjustment, GtkAdjustment_val, - Val_GtkWidget_sink) -ML_2 (gtk_progress_bar_set_bar_style, GtkProgressBar_val, - Progress_bar_style_val, Unit) -ML_2 (gtk_progress_bar_set_discrete_blocks, GtkProgressBar_val, Int_val, Unit) -ML_2 (gtk_progress_bar_set_activity_step, GtkProgressBar_val, Int_val, Unit) -ML_2 (gtk_progress_bar_set_activity_blocks, GtkProgressBar_val, Int_val, Unit) -ML_2 (gtk_progress_bar_set_orientation, GtkProgressBar_val, - Progress_bar_orientation_val, Unit) -/* ML_2 (gtk_progress_bar_update, GtkProgressBar_val, Float_val, Unit) */ - -/* gtkrange.h */ - -#define GtkRange_val(val) check_cast(GTK_RANGE,val) -ML_1 (gtk_range_get_adjustment, GtkRange_val, Val_GtkAny) -ML_2 (gtk_range_set_adjustment, GtkRange_val, GtkAdjustment_val, Unit) -ML_2 (gtk_range_set_update_policy, GtkRange_val, Update_type_val, Unit) - -/* gtkscale.h */ - -#define GtkScale_val(val) check_cast(GTK_SCALE,val) -ML_2 (gtk_scale_set_digits, GtkScale_val, Int_val, Unit) -ML_2 (gtk_scale_set_draw_value, GtkScale_val, Bool_val, Unit) -ML_2 (gtk_scale_set_value_pos, GtkScale_val, Position_val, Unit) -ML_1 (gtk_scale_get_value_width, GtkScale_val, Val_int) -ML_1 (gtk_scale_draw_value, GtkScale_val, Unit) -ML_1 (gtk_hscale_new, GtkAdjustment_val, Val_GtkWidget_sink) -ML_1 (gtk_vscale_new, GtkAdjustment_val, Val_GtkWidget_sink) - -/* gtkscrollbar.h */ - -ML_1 (gtk_hscrollbar_new, GtkAdjustment_val, Val_GtkWidget_sink) -ML_1 (gtk_vscrollbar_new, GtkAdjustment_val, Val_GtkWidget_sink) - -/* gtkruler.h */ - -#define GtkRuler_val(val) check_cast(GTK_RULER,val) -ML_2 (gtk_ruler_set_metric, GtkRuler_val, Metric_type_val, Unit) -ML_5 (gtk_ruler_set_range, GtkRuler_val, Float_val, - Float_val, Float_val, Float_val, Unit) -Make_Extractor (gtk_ruler_get, GtkRuler_val, lower, copy_double) -Make_Extractor (gtk_ruler_get, GtkRuler_val, upper, copy_double) -Make_Extractor (gtk_ruler_get, GtkRuler_val, position, copy_double) -Make_Extractor (gtk_ruler_get, GtkRuler_val, max_size, copy_double) -ML_1 (gtk_ruler_draw_ticks, GtkRuler_val, Unit) -ML_1 (gtk_ruler_draw_pos, GtkRuler_val, Unit) -ML_0 (gtk_hruler_new, Val_GtkWidget_sink) -ML_0 (gtk_vruler_new, Val_GtkWidget_sink) - -/* gtk[hv]separator.h */ - -ML_0 (gtk_hseparator_new, Val_GtkWidget_sink) -ML_0 (gtk_vseparator_new, Val_GtkWidget_sink) - -/* gtkmain.h */ - -value ml_gtk_init (value argv) -{ - CAMLparam1 (argv); - int argc = Wosize_val(argv), i; - CAMLlocal1 (copy); - - copy = (argc ? alloc (argc, Abstract_tag) : Atom(0)); - for (i = 0; i < argc; i++) Field(copy,i) = Field(argv,i); - gtk_init (&argc, (char ***)©); - - argv = (argc ? alloc (argc, 0) : Atom(0)); - for (i = 0; i < argc; i++) modify(&Field(argv,i), Field(copy,i)); - CAMLreturn (argv); -} -ML_1 (gtk_exit, Int_val, Unit) -ML_0 (gtk_set_locale, Val_string) -ML_0 (gtk_main, Unit) -ML_1 (gtk_main_iteration_do, Bool_val, Val_bool) -ML_0 (gtk_main_quit, Unit) -ML_1 (gtk_grab_add, GtkWidget_val, Unit) -ML_1 (gtk_grab_remove, GtkWidget_val, Unit) -ML_0 (gtk_grab_get_current, Val_GtkWidget) -value ml_gtk_get_version (value unit) -{ - value ret = alloc_small(3,0); - Field(ret,0) = Val_int(gtk_major_version); - Field(ret,1) = Val_int(gtk_minor_version); - Field(ret,2) = Val_int(gtk_micro_version); - return ret; -} - -/* Marshalling */ - -void ml_gtk_callback_marshal (GtkObject *object, gpointer data, - guint nargs, GtkArg *args) -{ - value vargs = alloc_small(3,0); - - CAMLparam1 (vargs); - Field(vargs,0) = (value) object; - Field(vargs,1) = Val_int(nargs); - Field(vargs,2) = (value) args; - - callback (*(value*)data, vargs); - - Field(vargs,0) = Val_int(-1); - Field(vargs,1) = Val_int(-1); - CAMLreturn0; -} - -value ml_gtk_arg_shift (GtkArg *args, value index) -{ - return (value) (&args[Int_val(index)]); -} - -value ml_gtk_arg_get_type (GtkArg *arg) -{ - return Val_int (arg->type); -} - -value ml_gtk_arg_get (GtkArg *arg) -{ - CAMLparam0(); - CAMLlocal1(tmp); - value ret; - GtkFundamentalType type = GTK_FUNDAMENTAL_TYPE(arg->type); - int tag; - - switch (type) { - case GTK_TYPE_CHAR: - tag = 0; - tmp = Int_val(GTK_VALUE_CHAR(*arg)); - break; - case GTK_TYPE_BOOL: - tag = 1; - tmp = Val_bool(GTK_VALUE_BOOL(*arg)); - break; - case GTK_TYPE_INT: - case GTK_TYPE_ENUM: - case GTK_TYPE_UINT: - case GTK_TYPE_FLAGS: - tag = 2; - tmp = Val_int (GTK_VALUE_INT(*arg)); break; - case GTK_TYPE_LONG: - case GTK_TYPE_ULONG: - tag = 2; - tmp = Val_int (GTK_VALUE_LONG(*arg)); break; - case GTK_TYPE_FLOAT: - tag = 3; - tmp = copy_double ((double)GTK_VALUE_FLOAT(*arg)); break; - case GTK_TYPE_DOUBLE: - tag = 3; - tmp = copy_double (GTK_VALUE_DOUBLE(*arg)); break; - case GTK_TYPE_STRING: - tag = 4; - tmp = Val_option (GTK_VALUE_STRING(*arg), copy_string); break; - case GTK_TYPE_OBJECT: - tag = 5; - tmp = Val_option (GTK_VALUE_OBJECT(*arg), Val_GtkObject); break; - case GTK_TYPE_BOXED: - case GTK_TYPE_POINTER: - tag = 6; - tmp = Val_option (GTK_VALUE_POINTER(*arg), Val_pointer); break; - default: - tag = -1; ret = Val_unit; - } - if (tag != -1) { - ret = alloc_small(1,tag); - Field(ret,0) = tmp; - } - CAMLreturn(ret); -} - -value ml_gtk_arg_set_retloc (GtkArg *arg, value val) -{ - value type = Fundamental_type_val(Is_block(val) ? Field(val,0) : val); - value data = (Is_block(val) ? Field(val,1) : 0); - if (GTK_FUNDAMENTAL_TYPE(arg->type) != GTK_TYPE_POINTER - && GTK_FUNDAMENTAL_TYPE(arg->type) != type) - ml_raise_gtk ("GtkArgv.Arg.set : argument type mismatch"); - switch (type) { - case GTK_TYPE_CHAR: *GTK_RETLOC_CHAR(*arg) = Int_val(data); break; - case GTK_TYPE_BOOL: *GTK_RETLOC_BOOL(*arg) = Int_val(data); break; - case GTK_TYPE_INT: - case GTK_TYPE_ENUM: *GTK_RETLOC_INT(*arg) = Int_val(data); break; - case GTK_TYPE_UINT: - case GTK_TYPE_FLAGS: *GTK_RETLOC_UINT(*arg) = Int32_val(data); break; - case GTK_TYPE_LONG: - case GTK_TYPE_ULONG: *GTK_RETLOC_LONG(*arg) = Nativeint_val(data); break; - case GTK_TYPE_FLOAT: *GTK_RETLOC_FLOAT(*arg) = Float_val(data); break; - case GTK_TYPE_DOUBLE: *GTK_RETLOC_DOUBLE(*arg) = Double_val(data); break; - case GTK_TYPE_STRING: - *GTK_RETLOC_STRING(*arg) = Option_val(data, String_val, NULL); - break; - case GTK_TYPE_BOXED: - case GTK_TYPE_POINTER: - case GTK_TYPE_OBJECT: - *GTK_RETLOC_POINTER(*arg) = Option_val(data, Pointer_val, NULL); - break; - } - return Val_unit; -} - -/* -value ml_gtk_arg_get_char (GtkArg *arg) -{ - if (GTK_FUNDAMENTAL_TYPE(arg->type) != GTK_TYPE_CHAR) - ml_raise_gtk ("argument type mismatch"); - return Val_char (GTK_VALUE_CHAR(*arg)); -} - -value ml_gtk_arg_get_bool (GtkArg *arg) -{ - if (GTK_FUNDAMENTAL_TYPE(arg->type) != GTK_TYPE_BOOL) - ml_raise_gtk ("argument type mismatch"); - return Val_bool (GTK_VALUE_BOOL(*arg)); -} - -value ml_gtk_arg_get_int (GtkArg *arg) -{ - switch (GTK_FUNDAMENTAL_TYPE(arg->type)) { - case GTK_TYPE_INT: - case GTK_TYPE_UINT: - return Val_int (GTK_VALUE_INT(*arg)); - case GTK_TYPE_LONG: - case GTK_TYPE_ULONG: - return Val_long (GTK_VALUE_LONG(*arg)); - case GTK_TYPE_ENUM: - return Val_int (GTK_VALUE_ENUM(*arg)); - case GTK_TYPE_FLAGS: - return Val_int (GTK_VALUE_FLAGS(*arg)); - default: - ml_raise_gtk ("argument type mismatch"); - } - return Val_unit; -} -*/ -value ml_gtk_arg_get_nativeint(GtkArg *arg) { - - switch(GTK_FUNDAMENTAL_TYPE(arg->type)) { - case GTK_TYPE_INT: - case GTK_TYPE_UINT: - return copy_nativeint (GTK_VALUE_INT(*arg)); - case GTK_TYPE_LONG: - case GTK_TYPE_ULONG: - return copy_nativeint (GTK_VALUE_LONG(*arg)); - case GTK_TYPE_ENUM: - return copy_nativeint (GTK_VALUE_ENUM(*arg)); - case GTK_TYPE_FLAGS: - return copy_nativeint (GTK_VALUE_FLAGS(*arg)); - default: - ml_raise_gtk ("argument type mismatch"); - } - return Val_unit; -} -/* -value ml_gtk_arg_get_float (GtkArg *arg) -{ - switch (GTK_FUNDAMENTAL_TYPE(arg->type)) { - case GTK_TYPE_FLOAT: - return copy_double ((double)GTK_VALUE_FLOAT(*arg)); - case GTK_TYPE_DOUBLE: - return copy_double (GTK_VALUE_DOUBLE(*arg)); - default: - ml_raise_gtk ("argument type mismatch"); - } - return Val_unit; -} - -value ml_gtk_arg_get_string (GtkArg *arg) -{ - char *p; - if (GTK_FUNDAMENTAL_TYPE(arg->type) != GTK_TYPE_STRING) - ml_raise_gtk ("argument type mismatch"); - p = GTK_VALUE_STRING(*arg); - return Val_option (p, copy_string); -} -*/ -value ml_gtk_arg_get_pointer (GtkArg *arg) -{ - gpointer p = NULL; - switch (GTK_FUNDAMENTAL_TYPE(arg->type)) { - case GTK_TYPE_STRING: - case GTK_TYPE_BOXED: - case GTK_TYPE_POINTER: - case GTK_TYPE_OBJECT: - p = GTK_VALUE_POINTER(*arg); break; - default: - ml_raise_gtk ("GtkArgv.get_pointer : argument type mismatch"); - } - return Val_pointer(p); -} -/* -value ml_gtk_arg_get_object (GtkArg *arg) -{ - GtkObject *p; - if (GTK_FUNDAMENTAL_TYPE(arg->type) != GTK_TYPE_OBJECT) - ml_raise_gtk ("argument type mismatch"); - p = GTK_VALUE_OBJECT(*arg); - return Val_option (p, Val_GtkObject); -} -*/ - -value ml_string_at_pointer (value ofs, value len, value ptr) -{ - char *start = ((char*)Pointer_val(ptr)) + Option_val(ofs, Int_val, 0); - int length = Option_val(len, Int_val, strlen(start)); - value ret = alloc_string(length); - memcpy ((char*)ret, start, length); - return ret; -} - -value ml_int_at_pointer (value ptr) -{ - return Val_int(*(int*)Pointer_val(ptr)); -} - -/* -value ml_gtk_arg_set_char (GtkArg *arg, value val) -{ - switch (GTK_FUNDAMENTAL_TYPE(arg->type)) { - case GTK_TYPE_POINTER: - case GTK_TYPE_CHAR: - *GTK_RETLOC_CHAR(*arg) = Char_val(val); break; - default: - ml_raise_gtk ("argument type mismatch"); - } - return Val_unit; -} - -value ml_gtk_arg_set_bool (GtkArg *arg, value val) -{ - switch (GTK_FUNDAMENTAL_TYPE(arg->type)) { - case GTK_TYPE_POINTER: - case GTK_TYPE_BOOL: - *GTK_RETLOC_BOOL(*arg) = Bool_val(val); break; - default: - ml_raise_gtk ("argument type mismatch"); - } - return Val_unit; -} - -value ml_gtk_arg_set_int (GtkArg *arg, value val) -{ - switch (GTK_FUNDAMENTAL_TYPE(arg->type)) { - case GTK_TYPE_POINTER: - case GTK_TYPE_INT: - case GTK_TYPE_UINT: - *GTK_RETLOC_INT(*arg) = Int_val(val); break; - case GTK_TYPE_LONG: - case GTK_TYPE_ULONG: - *GTK_RETLOC_LONG(*arg) = Long_val(val); break; - case GTK_TYPE_ENUM: - *GTK_RETLOC_ENUM(*arg) = Int_val(val); break; - case GTK_TYPE_FLAGS: - *GTK_RETLOC_FLAGS(*arg) = Int_val(val); break; - default: - ml_raise_gtk ("argument type mismatch"); - } - return Val_unit; -} - -value ml_gtk_arg_set_nativeint (GtkArg *arg, value val) -{ - switch (GTK_FUNDAMENTAL_TYPE(arg->type)) { - case GTK_TYPE_POINTER: - case GTK_TYPE_INT: - case GTK_TYPE_UINT: - *GTK_RETLOC_INT(*arg) = Nativeint_val(val); break; - case GTK_TYPE_LONG: - case GTK_TYPE_ULONG: - *GTK_RETLOC_LONG(*arg) = Nativeint_val(val); break; - case GTK_TYPE_ENUM: - *GTK_RETLOC_ENUM(*arg) = Nativeint_val(val); break; - case GTK_TYPE_FLAGS: - *GTK_RETLOC_FLAGS(*arg) = Nativeint_val(val); break; - default: - ml_raise_gtk ("argument type mismatch"); - } - return Val_unit; -} - -value ml_gtk_arg_set_float (GtkArg *arg, value val) -{ - switch (GTK_FUNDAMENTAL_TYPE(arg->type)) { - case GTK_TYPE_POINTER: - case GTK_TYPE_FLOAT: - *GTK_RETLOC_FLOAT(*arg) = (float) Double_val(val); break; - case GTK_TYPE_DOUBLE: - *GTK_RETLOC_DOUBLE(*arg) = Double_val(val); break; - default: - ml_raise_gtk ("argument type mismatch"); - } - return Val_unit; -} - -value ml_gtk_arg_set_string (GtkArg *arg, value val) -{ - switch (GTK_FUNDAMENTAL_TYPE(arg->type)) { - case GTK_TYPE_POINTER: - case GTK_TYPE_STRING: - *GTK_RETLOC_STRING(*arg) = String_val(val); break; - default: - ml_raise_gtk ("argument type mismatch"); - } - return Val_unit; -} - -value ml_gtk_arg_set_pointer (GtkArg *arg, value val) -{ - switch (GTK_FUNDAMENTAL_TYPE(arg->type)) { - case GTK_TYPE_BOXED: - *GTK_RETLOC_BOXED(*arg) = Pointer_val(val); break; - case GTK_TYPE_POINTER: - *GTK_RETLOC_POINTER(*arg) = Pointer_val(val); break; - default: - ml_raise_gtk ("argument type mismatch"); - } - return Val_unit; -} - -value ml_gtk_arg_set_object (GtkArg *arg, value val) -{ - switch (GTK_FUNDAMENTAL_TYPE(arg->type)) { - case GTK_TYPE_POINTER: - case GTK_TYPE_OBJECT: - *GTK_RETLOC_OBJECT(*arg) = GtkObject_val(val); break; - default: - ml_raise_gtk ("argument type mismatch"); - } - return Val_unit; -} -*/ - -/* gtksignal.h */ - -value ml_gtk_signal_connect (value object, value name, value clos, value after) -{ - value *clos_p = ml_gtk_root_new (clos); - return Val_int (gtk_signal_connect_full - (GtkObject_val(object), String_val(name), NULL, - ml_gtk_callback_marshal, clos_p, - ml_gtk_root_destroy, FALSE, Bool_val(after))); -} - -ML_2 (gtk_signal_disconnect, GtkObject_val, Int_val, Unit) -ML_2 (gtk_signal_emit_stop_by_name, GtkObject_val, String_val, Unit) -ML_2 (gtk_signal_handler_block, GtkObject_val, Int_val, Unit) -ML_2 (gtk_signal_handler_unblock, GtkObject_val, Int_val, Unit) -ML_2_name (ml_gtk_signal_emit_none, gtk_signal_emit_by_name, - GtkObject_val, String_val, Unit) -ML_3_name (ml_gtk_signal_emit_int, gtk_signal_emit_by_name, - GtkObject_val, String_val, Int_val, Unit) -ML_4_name (ml_gtk_signal_emit_scroll, gtk_signal_emit_by_name, - GtkObject_val, String_val, Scroll_type_val, Double_val, Unit) - -/* gtkmain.h (again) */ - -value ml_gtk_timeout_add (value interval, value clos) -{ - value *clos_p = ml_gtk_root_new (clos); - return Val_int (gtk_timeout_add_full - (Int_val(interval), NULL, ml_gtk_callback_marshal, clos_p, - ml_gtk_root_destroy)); -} -ML_1 (gtk_timeout_remove, Int_val, Unit) - -/* -#include "ml_gtkcaller.h" -ML_0 (gtk_caller_new, Val_GtkWidget) -*/ - -static value ml_class_init=0; - -static void class_init (value class) -{ - callback(ml_class_init, class); -} - - -value set_ml_class_init (value class_func) -{ - if (!ml_class_init) register_global_root (&ml_class_init); - ml_class_init = class_func; - return Val_unit; -} - -value ml_gtk_type_new (value type) -{ - return Val_GtkWidget_sink(gtk_type_new(Int_val(type))); -} - - -struct widget_info { - guint size; - guint class_size; - guint (*get_type_func)(void); -} -widget_info_array[] = { - { sizeof(GtkObject), sizeof(GtkObjectClass), gtk_object_get_type }, - { sizeof(GtkWidget), sizeof(GtkWidgetClass), gtk_widget_get_type }, - { sizeof(GtkMisc), sizeof(GtkMiscClass), gtk_misc_get_type }, - { sizeof(GtkLabel), sizeof(GtkLabelClass), gtk_label_get_type }, - { sizeof(GtkAccelLabel), sizeof(GtkAccelLabelClass), gtk_accel_label_get_type }, - { sizeof(GtkTipsQuery), sizeof(GtkTipsQueryClass), gtk_tips_query_get_type }, - { sizeof(GtkArrow), sizeof(GtkArrowClass), gtk_arrow_get_type }, - { sizeof(GtkImage), sizeof(GtkImageClass), gtk_image_get_type }, - { sizeof(GtkPixmap), sizeof(GtkPixmapClass), gtk_pixmap_get_type }, - { sizeof(GtkContainer), sizeof(GtkContainerClass), gtk_container_get_type }, - { sizeof(GtkBin), sizeof(GtkBinClass), gtk_bin_get_type }, - { sizeof(GtkAlignment), sizeof(GtkAlignmentClass), gtk_alignment_get_type }, - { sizeof(GtkFrame), sizeof(GtkFrameClass), gtk_frame_get_type }, - { sizeof(GtkAspectFrame), sizeof(GtkAspectFrameClass), gtk_aspect_frame_get_type }, - { sizeof(GtkButton), sizeof(GtkButtonClass), gtk_button_get_type }, - { sizeof(GtkToggleButton), sizeof(GtkToggleButtonClass), gtk_toggle_button_get_type }, - { sizeof(GtkCheckButton), sizeof(GtkCheckButtonClass), gtk_check_button_get_type }, - { sizeof(GtkRadioButton), sizeof(GtkRadioButtonClass), gtk_radio_button_get_type }, - { sizeof(GtkOptionMenu), sizeof(GtkOptionMenuClass), gtk_option_menu_get_type }, - { sizeof(GtkItem), sizeof(GtkItemClass), gtk_item_get_type }, - { sizeof(GtkMenuItem), sizeof(GtkMenuItemClass), gtk_menu_item_get_type }, - { sizeof(GtkCheckMenuItem), sizeof(GtkCheckMenuItemClass), gtk_check_menu_item_get_type }, - { sizeof(GtkRadioMenuItem), sizeof(GtkRadioMenuItemClass), gtk_radio_menu_item_get_type }, - { sizeof(GtkTearoffMenuItem), sizeof(GtkTearoffMenuItemClass), gtk_tearoff_menu_item_get_type }, - { sizeof(GtkListItem), sizeof(GtkListItemClass), gtk_list_item_get_type }, - { sizeof(GtkTreeItem), sizeof(GtkTreeItemClass), gtk_tree_item_get_type }, - { sizeof(GtkWindow), sizeof(GtkWindowClass), gtk_window_get_type }, - { sizeof(GtkColorSelectionDialog), sizeof(GtkColorSelectionDialogClass), gtk_color_selection_dialog_get_type }, - { sizeof(GtkDialog), sizeof(GtkDialogClass), gtk_dialog_get_type }, - { sizeof(GtkInputDialog), sizeof(GtkInputDialogClass), gtk_input_dialog_get_type }, - { sizeof(GtkFileSelection), sizeof(GtkFileSelectionClass), gtk_file_selection_get_type }, - { sizeof(GtkFontSelectionDialog), sizeof(GtkFontSelectionDialogClass), gtk_font_selection_dialog_get_type }, - { sizeof(GtkPlug), sizeof(GtkPlugClass), gtk_plug_get_type }, - { sizeof(GtkEventBox), sizeof(GtkEventBoxClass), gtk_event_box_get_type }, - { sizeof(GtkHandleBox), sizeof(GtkHandleBoxClass), gtk_handle_box_get_type }, - { sizeof(GtkScrolledWindow), sizeof(GtkScrolledWindowClass), gtk_scrolled_window_get_type }, - { sizeof(GtkViewport), sizeof(GtkViewportClass), gtk_viewport_get_type }, - { sizeof(GtkBox), sizeof(GtkBoxClass), gtk_box_get_type }, - { sizeof(GtkButtonBox), sizeof(GtkButtonBoxClass), gtk_button_box_get_type }, - { sizeof(GtkHButtonBox), sizeof(GtkHButtonBoxClass), gtk_hbutton_box_get_type }, - { sizeof(GtkVButtonBox), sizeof(GtkVButtonBoxClass), gtk_vbutton_box_get_type }, - { sizeof(GtkVBox), sizeof(GtkVBoxClass), gtk_vbox_get_type }, - { sizeof(GtkColorSelection), sizeof(GtkColorSelectionClass), gtk_color_selection_get_type }, - { sizeof(GtkGammaCurve), sizeof(GtkGammaCurveClass), gtk_gamma_curve_get_type }, - { sizeof(GtkHBox), sizeof(GtkHBoxClass), gtk_hbox_get_type }, - { sizeof(GtkCombo), sizeof(GtkComboClass), gtk_combo_get_type }, - { sizeof(GtkStatusbar), sizeof(GtkStatusbarClass), gtk_statusbar_get_type }, - { sizeof(GtkCList), sizeof(GtkCListClass), gtk_clist_get_type }, - { sizeof(GtkCTree), sizeof(GtkCTreeClass), gtk_ctree_get_type }, - { sizeof(GtkFixed), sizeof(GtkFixedClass), gtk_fixed_get_type }, - { sizeof(GtkNotebook), sizeof(GtkNotebookClass), gtk_notebook_get_type }, - { sizeof(GtkFontSelection), sizeof(GtkFontSelectionClass), gtk_font_selection_get_type }, - { sizeof(GtkPaned), sizeof(GtkPanedClass), gtk_paned_get_type }, - { sizeof(GtkHPaned), sizeof(GtkHPanedClass), gtk_hpaned_get_type }, - { sizeof(GtkVPaned), sizeof(GtkVPanedClass), gtk_vpaned_get_type }, - { sizeof(GtkLayout), sizeof(GtkLayoutClass), gtk_layout_get_type }, - { sizeof(GtkList), sizeof(GtkListClass), gtk_list_get_type }, - { sizeof(GtkMenuShell), sizeof(GtkMenuShellClass), gtk_menu_shell_get_type }, - { sizeof(GtkMenuBar), sizeof(GtkMenuBarClass), gtk_menu_bar_get_type }, - { sizeof(GtkMenu), sizeof(GtkMenuClass), gtk_menu_get_type }, - { sizeof(GtkPacker), sizeof(GtkPackerClass), gtk_packer_get_type }, - { sizeof(GtkSocket), sizeof(GtkSocketClass), gtk_socket_get_type }, - { sizeof(GtkTable), sizeof(GtkTableClass), gtk_table_get_type }, - { sizeof(GtkToolbar), sizeof(GtkToolbarClass), gtk_toolbar_get_type }, - { sizeof(GtkTree), sizeof(GtkTreeClass), gtk_tree_get_type }, - { sizeof(GtkCalendar), sizeof(GtkCalendarClass), gtk_calendar_get_type }, - { sizeof(GtkDrawingArea), sizeof(GtkDrawingAreaClass), gtk_drawing_area_get_type }, - { sizeof(GtkCurve), sizeof(GtkCurveClass), gtk_curve_get_type }, - { sizeof(GtkEditable), sizeof(GtkEditableClass), gtk_editable_get_type }, - { sizeof(GtkEntry), sizeof(GtkEntryClass), gtk_entry_get_type }, - { sizeof(GtkSpinButton), sizeof(GtkSpinButtonClass), gtk_spin_button_get_type }, - { sizeof(GtkText), sizeof(GtkTextClass), gtk_text_get_type }, - { sizeof(GtkRuler), sizeof(GtkRulerClass), gtk_ruler_get_type }, - { sizeof(GtkHRuler), sizeof(GtkHRulerClass), gtk_hruler_get_type }, - { sizeof(GtkVRuler), sizeof(GtkVRulerClass), gtk_vruler_get_type }, - { sizeof(GtkRange), sizeof(GtkRangeClass), gtk_range_get_type }, - { sizeof(GtkScale), sizeof(GtkScaleClass), gtk_scale_get_type }, - { sizeof(GtkHScale), sizeof(GtkHScaleClass), gtk_hscale_get_type }, - { sizeof(GtkVScale), sizeof(GtkVScaleClass), gtk_vscale_get_type }, - { sizeof(GtkScrollbar), sizeof(GtkScrollbarClass), gtk_scrollbar_get_type }, - { sizeof(GtkHScrollbar), sizeof(GtkHScrollbarClass), gtk_hscrollbar_get_type }, - { sizeof(GtkVScrollbar), sizeof(GtkVScrollbarClass), gtk_vscrollbar_get_type }, - { sizeof(GtkSeparator), sizeof(GtkSeparatorClass), gtk_separator_get_type }, - { sizeof(GtkHSeparator), sizeof(GtkHSeparatorClass), gtk_hseparator_get_type }, - { sizeof(GtkVSeparator), sizeof(GtkVSeparatorClass), gtk_vseparator_get_type }, - { sizeof(GtkPreview), sizeof(GtkPreviewClass), gtk_preview_get_type }, - { sizeof(GtkProgress), sizeof(GtkProgressClass), gtk_progress_get_type }, - { sizeof(GtkProgressBar), sizeof(GtkProgressBarClass), gtk_progress_bar_get_type }, - { sizeof(GtkData), sizeof(GtkDataClass), gtk_data_get_type }, - { sizeof(GtkAdjustment), sizeof(GtkAdjustmentClass), gtk_adjustment_get_type }, - { sizeof(GtkTooltips), sizeof(GtkTooltipsClass), gtk_tooltips_get_type }, - { sizeof(GtkItemFactory), sizeof(GtkItemFactoryClass), gtk_item_factory_get_type } -}; - - -value ml_gtk_type_unique (value name, value parent, value nsignals) -{ - struct widget_info * wi; - GtkTypeInfo ttt_info; - - wi = widget_info_array + Int_val(parent); - ttt_info.type_name = String_val(name); - ttt_info.object_size = wi->size; - ttt_info.class_size = wi->class_size + Int_val(nsignals)*sizeof(void *); - ttt_info.class_init_func = (GtkClassInitFunc) class_init; - ttt_info.object_init_func = (GtkObjectInitFunc) NULL; - ttt_info.reserved_1 = NULL; - ttt_info.reserved_2 = NULL; - ttt_info.base_class_init_func = (GtkClassInitFunc) NULL; - - return Val_int(gtk_type_unique(wi->get_type_func (), &ttt_info)); -} - -static guint sig[100]; - -value ml_gtk_object_class_add_signals (value class, value signals, - value nsignals) -{ - int i; - for (i=0; iclass_size+Int_val(num)*sizeof(void *); - return Val_int(gtk_signal_new (String_val(name), Int_val(run_type), - ((GtkObjectClass *)classe)->type, offset, - gtk_signal_default_marshaller, GTK_TYPE_NONE, 0)); - *(((int *)classe)+offset) = 0; -} - -ML_1 (gtk_rc_add_default_file, String_val, Unit) diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/ml_gtk.h b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/ml_gtk.h deleted file mode 100644 index 29c2da5c3..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/ml_gtk.h +++ /dev/null @@ -1,15 +0,0 @@ -/* $Id$ */ - -#define GtkObject_val(obj) ((GtkObject*)Field(obj,1)) -value Val_GtkObject (GtkObject *w); -value Val_GtkObject_sink (GtkObject *w); -#define Val_GtkAny(w) Val_GtkObject((GtkObject*)w) -#define Val_GtkAny_sink(w) Val_GtkObject_sink((GtkObject*)w) -#define Val_GtkWidget Val_GtkAny -#define Val_GtkWidget_sink Val_GtkAny_sink - -#ifdef GTK_NO_CHECK_CASTS -#define check_cast(f,v) f(Pointer_val(v)) -#else -#define check_cast(f,v) (Pointer_val(v) == NULL ? NULL : f(Pointer_val(v))) -#endif diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/ml_gtkgl.c b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/ml_gtkgl.c deleted file mode 100644 index 5e0efd718..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/ml_gtkgl.c +++ /dev/null @@ -1,54 +0,0 @@ -/* $Id$ */ - -#include -#include -#include -#include -#include -#include -#include - -#include "wrappers.h" -#include "ml_glib.h" -#include "ml_gdk.h" -#include "ml_gtk.h" -#include "gtkgl_tags.h" - -/* Conversion functions */ -#include "gtkgl_tags.c" - -#define GtkGLArea_val(val) ((GtkGLArea*)GtkObject_val(val)) - -value ml_gtk_gl_area_new (value list, value share) -{ - value cursor, res; - int len, i; - int *attrs; - - for (len = 0, cursor = list; cursor != Val_unit; cursor = Field(cursor,1)) - { - if (Is_block(Field(cursor,0))) len += 2; - else len++; - } - - attrs = (int*) stat_alloc ((len+1)*sizeof(int)); - - for (i = 0, cursor = list; cursor != Val_unit; cursor = Field(cursor,1)) - { - value option = Field(cursor,0); - if (Is_block(option)) { - attrs[i++] = Visual_options_val(Field(option,0)); - attrs[i++] = Int_val(Field(option,1)); - } - else attrs[i++] = Visual_options_val(option); - } - attrs[i] = GDK_GL_NONE; - - res = Val_GtkObject - ((GtkObject*)gtk_gl_area_share_new(attrs,GtkGLArea_val(share))); - stat_free(attrs); - return res; -} - -ML_1 (gtk_gl_area_make_current, GtkGLArea_val, Val_bool) -ML_1 (gtk_gl_area_swapbuffers, GtkGLArea_val, Unit) diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/ml_gtkxmhtml.c b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/ml_gtkxmhtml.c deleted file mode 100644 index 3f9c3c6c4..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/ml_gtkxmhtml.c +++ /dev/null @@ -1,76 +0,0 @@ -/* $Id$ */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "wrappers.h" -#include "ml_glib.h" -#include "ml_gdk.h" -#include "ml_gtk.h" -#include "gtkxmhtml_tags.h" - -/* conversion functions */ - -#include "gtkxmhtml_tags.c" - -Make_Flags_val (Line_type_val) - -#define GtkXmHTML_val(val) ((GtkXmHTML*)GtkObject_val(val)) - -ML_0 (gtk_xmhtml_new, Val_GtkAny_sink) -ML_1 (gtk_xmhtml_freeze, GtkXmHTML_val, Unit) -ML_1 (gtk_xmhtml_thaw, GtkXmHTML_val, Unit) -ML_2 (gtk_xmhtml_source, GtkXmHTML_val, String_val, Unit) -ML_2 (gtk_xmhtml_set_string_direction, GtkXmHTML_val, String_direction_val, - Unit) -ML_2 (gtk_xmhtml_set_alignment, GtkXmHTML_val, Position_val, Unit) -/* ML_2 (gtk_xmhtml_outline, GtkXmHTML_val, Bool_val, Unit) */ -ML_3 (gtk_xmhtml_set_font_familty, GtkXmHTML_val, String_val, String_val, Unit) -ML_3 (gtk_xmhtml_set_font_familty_fixed, GtkXmHTML_val, String_val, String_val, - Unit) -ML_2 (gtk_xmhtml_set_font_charset, GtkXmHTML_val, String_val, Unit) -ML_2 (gtk_xmhtml_set_allow_body_colors, GtkXmHTML_val, Bool_val, Unit) -ML_2 (gtk_xmhtml_set_hilight_on_enter, GtkXmHTML_val, Bool_val, Unit) -ML_2 (gtk_xmhtml_set_anchor_underline_type, GtkXmHTML_val, Flags_Line_type_val, - Unit) -ML_2 (gtk_xmhtml_set_anchor_visited_underline_type, GtkXmHTML_val, - Flags_Line_type_val, Unit) -ML_2 (gtk_xmhtml_set_anchor_target_underline_type, GtkXmHTML_val, - Flags_Line_type_val, Unit) -ML_2 (gtk_xmhtml_set_allow_color_switching, GtkXmHTML_val, Bool_val, Unit) -ML_2 (gtk_xmhtml_set_dithering, GtkXmHTML_val, Dither_type_val, Unit) -ML_2 (gtk_xmhtml_set_allow_font_switching, GtkXmHTML_val, Bool_val, Unit) -ML_2 (gtk_xmhtml_set_max_image_colors, GtkXmHTML_val, Int_val, Unit) -ML_2 (gtk_xmhtml_set_allow_images, GtkXmHTML_val, Bool_val, Unit) -ML_4 (gtk_xmhtml_set_plc_intervals, GtkXmHTML_val, Int_val, Int_val, Int_val, - Unit) -/* ML_2 (gtk_xmhtml_set_def_body_image_url, GtkXmHTML_val, String_val, Unit) */ -ML_2 (gtk_xmhtml_set_anchor_buttons, GtkXmHTML_val, Bool_val, Unit) -value ml_gtk_xmhtml_set_anchor_cursor(value html, value cursor) -{ - gtk_xmhtml_set_anchor_cursor - (GtkXmHTML_val(html), Option_val(cursor, GdkCursor_val, NULL), - Bool_val(cursor)); - return Val_unit; -} -ML_2 (gtk_xmhtml_set_topline, GtkXmHTML_val, Int_val, Unit) -ML_1 (gtk_xmhtml_get_topline, GtkXmHTML_val, Val_int) -ML_2 (gtk_xmhtml_set_freeze_animations, GtkXmHTML_val, Bool_val, Unit) -/* ML_1 (gtk_xmhtml_get_source, GtkXmHTML_val, copy_string) */ -ML_2 (gtk_xmhtml_set_screen_gamma, GtkXmHTML_val, Float_val, Unit) -/* ML_2 (gtk_xmhtml_set_event_proc, GtkXmHTML_val, ???, Unit) */ -ML_2 (gtk_xmhtml_set_perfect_colors, GtkXmHTML_val, Bool_val, Unit) -ML_2 (gtk_xmhtml_set_uncompress_command, GtkXmHTML_val, String_val, Unit) -ML_2 (gtk_xmhtml_set_strict_checking, GtkXmHTML_val, Bool_val, Unit) -ML_2 (gtk_xmhtml_set_bad_html_warnings, GtkXmHTML_val, Bool_val, Unit) -ML_2 (gtk_xmhtml_set_allow_form_coloring, GtkXmHTML_val, Bool_val, Unit) -ML_2 (gtk_xmhtml_set_imagemap_draw, GtkXmHTML_val, Bool_val, Unit) -ML_2 (gtk_xmhtml_set_mime_type, GtkXmHTML_val, String_val, Unit) -ML_2 (gtk_xmhtml_set_alpha_processing, GtkXmHTML_val, Bool_val, Unit) -ML_2 (gtk_xmhtml_set_rgb_conv_mode, GtkXmHTML_val, Dither_type_val, Unit) diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/var2conv.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/var2conv.ml deleted file mode 100644 index 6730d1451..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/var2conv.ml +++ /dev/null @@ -1,99 +0,0 @@ -(* $Id$ *) - -(* Compile a list of variant tags into CPP defines *) - -(* hash_variant, from ctype.ml *) - -let hash_variant s = - let accu = ref 0 in - for i = 0 to String.length s - 1 do - accu := 223 * !accu + Char.code s.[i] - done; - (* reduce to 31 bits *) - accu := !accu land (1 lsl 31 - 1); - (* make it signed for 64 bits architectures *) - if !accu > 0x3FFFFFFF then !accu - (1 lsl 31) else !accu - -open Genlex - -let lexer = make_lexer ["type"; "public"; "exception"; "="; "["; "]"; "`"; "|"] - -let exn_name = ref "invalid_argument" - -let may_string = parser - [< ' String s >] -> s - | [< >] -> "" - -let may_bar = parser - [< ' Kwd "|" >] -> () - | [< >] -> () - -let rec ident_list = parser - [< ' Kwd "`"; ' Ident x; trans = may_string; _ = may_bar; s >] -> - (x, trans) :: ident_list s - | [< >] -> [] - -let may_public = parser - [< ' Kwd "public" >] -> true - | [< >] -> false - -open Printf - -let declaration = parser - [< ' Kwd "type"; public = may_public; ' Ident name; ' Kwd "="; - prefix = may_string; ' Kwd "["; _ = may_bar; - tags = ident_list; ' Kwd "]"; suffix = may_string >] -> - let ctag tag trans = - if trans <> "" then trans else - let tag = - if tag.[0] = '_' then - String.sub tag ~pos:1 ~len:(String.length tag -1) - else tag - in - match - if prefix = "" then None, "" - else - Some (prefix.[String.length prefix - 1]), - String.sub prefix ~pos:0 ~len:(String.length prefix - 1) - with - Some '#', prefix -> - prefix ^ String.uncapitalize tag ^ suffix - | Some '^', prefix -> - prefix ^ String.uppercase tag ^ suffix - | _ -> - prefix ^ tag ^ suffix - and cname = - String.capitalize name - in - let tags = - Sort.list tags - ~order:(fun (tag1,_) (tag2,_) -> hash_variant tag1 < hash_variant tag2) - in - printf "/* %s : conversion table */\n" name; - if not public then printf "static "; - printf "lookup_info ml_table_%s[] = {\n" name; - printf " { 0, %d },\n" (List.length tags); - List.iter tags ~f: - begin fun (tag,trans) -> - printf " { MLTAG_%s, %s },\n" tag (ctag tag trans) - end; - printf "};\n\n"; - printf "#define Val_%s(data) ml_lookup_from_c (ml_table_%s, data)\n" - name name; - printf "#define %s_val(key) ml_lookup_to_c (ml_table_%s, key)\n\n" - cname name; - | [< 'Kwd"exception"; 'Ident name >] -> - exn_name := name - | [< >] -> raise End_of_file - -let main () = - let chars = Stream.of_channel stdin in - let s = lexer chars in - try - while true do declaration s done - with End_of_file -> () - | Stream.Error err -> - Printf.eprintf "Parsing error \"%s\" at character %d on input stream" - err (Stream.count chars) - -let _ = Printexc.print main () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/var2def.ml b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/var2def.ml deleted file mode 100644 index 617c4c62d..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/var2def.ml +++ /dev/null @@ -1,44 +0,0 @@ -(* $Id$ *) - -(* Compile a list of variant tags into CPP defines *) - -(* hash_variant, from ctype.ml *) - -let hash_variant s = - let accu = ref 0 in - for i = 0 to String.length s - 1 do - accu := 223 * !accu + Char.code s.[i] - done; - (* reduce to 31 bits *) - accu := !accu land (1 lsl 31 - 1); - (* make it signed for 64 bits architectures *) - if !accu > 0x3FFFFFFF then !accu - (1 lsl 31) else !accu - -open Genlex - -let lexer = make_lexer ["`"; "["; "]"; "|"] - -let main () = - let s = lexer (Stream.of_channel stdin) in - let tags = Hashtbl.create 57 in - while match s with parser - [< ' Kwd "`"; ' Ident tag >] -> - let hash = hash_variant tag in - begin try - let tag' = Hashtbl.find tags hash in - if tag <> tag' then - failwith (String.concat ~sep:" " ["Doublon tag:";tag;"and";tag']) - with Not_found -> - Hashtbl.add ~key:hash ~data:tag tags; - print_string "#define MLTAG_"; - print_string tag; - print_string "\tVal_int("; - print_int hash; - print_string ")\n" - end; - true - | [< ' _ >] -> true - | [< >] -> false - do () done - -let _ = Printexc.print main () diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/wrappers.c b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/wrappers.c deleted file mode 100644 index 7e83aa99b..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/wrappers.c +++ /dev/null @@ -1,76 +0,0 @@ -/* $Id$ */ - -#include -#include -#include -#include -#include -#include - -#include "wrappers.h" - -value copy_memblock_indirected (void *src, asize_t size) -{ - value ret = alloc (Wosize_asize(size)+2, Abstract_tag); - if (!src) ml_raise_null_pointer (); - - Field(ret,1) = 2; - memcpy (&Field(ret,2), src, size); - return ret; -} - -value ml_some (value v) -{ - CAMLparam1(v); - value ret = alloc_small(1,0); - Field(ret,0) = v; - CAMLreturn(ret); -} - -void ml_raise_null_pointer () -{ - static value * exn = NULL; - if (exn == NULL) - exn = caml_named_value ("null_pointer"); - raise_constant (*exn); -} - -value Val_pointer (void *ptr) -{ - value ret = alloc_small (2, Abstract_tag); - if (!ptr) ml_raise_null_pointer (); - Field(ret,1) = (value)ptr; - return ret; -} - -value copy_string_check (const char*str) -{ - if (!str) ml_raise_null_pointer (); - return copy_string ((char*) str); -} - -value copy_string_or_null (const char*str) -{ - return copy_string (str ? (char*) str : ""); -} - -value ml_lookup_from_c (lookup_info *table, int data) -{ - int i; - for (i = table[0].data; i > 0; i--) - if (table[i].data == data) return table[i].key; - invalid_argument ("ml_lookup_from_c"); -} - -int ml_lookup_to_c (lookup_info *table, value key) -{ - int first = 1, last = table[0].data, current; - - while (first < last) { - current = (first+last)/2; - if (table[current].key >= key) last = current; - else first = current + 1; - } - if (table[first].key == key) return table[first].data; - invalid_argument ("ml_lookup_to_c"); -} diff --git a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/wrappers.h b/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/wrappers.h deleted file mode 100644 index 1fcffcf02..000000000 --- a/helm/DEVEL/lablgtk/lablgtk_20000829-0.1.0/wrappers.h +++ /dev/null @@ -1,222 +0,0 @@ -/* $Id$ */ - -#ifndef _wrappers_ -#define _wrappers_ - -#include -#include - -value copy_memblock_indirected (void *src, asize_t size); -value ml_some (value); -void ml_raise_null_pointer (void) Noreturn; -value Val_pointer (void *); -value copy_string_check (const char*); -value copy_string_or_null (const char *); - -typedef struct { value key; int data; } lookup_info; -value ml_lookup_from_c (lookup_info *table, int data); -int ml_lookup_to_c (lookup_info *table, value key); - -/* Wrapper generators */ - -#define ML_0(cname, conv) \ -value ml_##cname (value unit) { return conv (cname ()); } -#define ML_1(cname, conv1, conv) \ -value ml_##cname (value arg1) { return conv (cname (conv1 (arg1))); } -#define ML_1_post(cname, conv1, conv, post) \ -value ml_##cname (value arg1) \ -{ value ret = conv (cname (conv1(arg1))); post; return ret; } -#define ML_2(cname, conv1, conv2, conv) \ -value ml_##cname (value arg1, value arg2) \ -{ return conv (cname (conv1(arg1), conv2(arg2))); } -#define ML_2_name(mlname, cname, conv1, conv2, conv) \ -value mlname (value arg1, value arg2) \ -{ return conv (cname (conv1(arg1), conv2(arg2))); } -#define ML_3(cname, conv1, conv2, conv3, conv) \ -value ml_##cname (value arg1, value arg2, value arg3) \ -{ return conv (cname (conv1(arg1), conv2(arg2), conv3(arg3))); } -#define ML_3_name(mlname, cname, conv1, conv2, conv3, conv) \ -value mlname (value arg1, value arg2, value arg3) \ -{ return conv (cname (conv1(arg1), conv2(arg2), conv3(arg3))); } -#define ML_4(cname, conv1, conv2, conv3, conv4, conv) \ -value ml_##cname (value arg1, value arg2, value arg3, value arg4) \ -{ return conv (cname (conv1(arg1), conv2(arg2), conv3(arg3), conv4(arg4))); } -#define ML_4_name(mlname, cname, conv1, conv2, conv3, conv4, conv) \ -value mlname (value arg1, value arg2, value arg3, value arg4) \ -{ return conv (cname (conv1(arg1), conv2(arg2), conv3(arg3), conv4(arg4))); } -#define ML_5(cname, conv1, conv2, conv3, conv4, conv5, conv) \ -value ml_##cname (value arg1, value arg2, value arg3, value arg4, value arg5) \ -{ return conv (cname (conv1(arg1), conv2(arg2), conv3(arg3), conv4(arg4), \ - conv5(arg5))); } -#define ML_6(cname, conv1, conv2, conv3, conv4, conv5, conv6, conv) \ -value ml_##cname (value arg1, value arg2, value arg3, value arg4, value arg5, \ - value arg6) \ -{ return conv (cname (conv1(arg1), conv2(arg2), conv3(arg3), conv4(arg4), \ - conv5(arg5), conv6(arg6))); } -#define ML_7(cname, conv1, conv2, conv3, conv4, conv5, conv6, conv7, conv) \ -value ml_##cname (value arg1, value arg2, value arg3, value arg4, value arg5, \ - value arg6, value arg7) \ -{ return conv (cname (conv1(arg1), conv2(arg2), conv3(arg3), conv4(arg4), \ - conv5(arg5), conv6(arg6), conv7(arg7))); } -#define ML_8(cname, conv1, conv2, conv3, conv4, conv5, conv6, conv7, conv8, \ - conv) \ -value ml_##cname (value arg1, value arg2, value arg3, value arg4, value arg5, \ - value arg6, value arg7, value arg8) \ -{ return conv (cname (conv1(arg1), conv2(arg2), conv3(arg3), conv4(arg4), \ - conv5(arg5), conv6(arg6), conv7(arg7), conv8(arg8))); } -#define ML_9(cname, conv1, conv2, conv3, conv4, conv5, conv6, conv7, conv8, \ - conv9, conv) \ -value ml_##cname (value arg1, value arg2, value arg3, value arg4, value arg5, \ - value arg6, value arg7, value arg8, value arg9) \ -{ return conv (cname (conv1(arg1), conv2(arg2), conv3(arg3), conv4(arg4), \ - conv5(arg5), conv6(arg6), conv7(arg7), conv8(arg8), \ - conv9(arg9))); } -#define ML_10(cname, conv1, conv2, conv3, conv4, conv5, conv6, conv7, conv8, \ - conv9, conv10, conv) \ -value ml_##cname (value arg1, value arg2, value arg3, value arg4, value arg5, \ - value arg6, value arg7, value arg8, value arg9, value arg10)\ -{ return conv (cname (conv1(arg1), conv2(arg2), conv3(arg3), conv4(arg4), \ - conv5(arg5), conv6(arg6), conv7(arg7), conv8(arg8), \ - conv9(arg9), conv10(arg10))); } -#define ML_11(cname, conv1, conv2, conv3, conv4, conv5, conv6, conv7, conv8, \ - conv9, conv10, conv11, conv) \ -value ml_##cname (value arg1, value arg2, value arg3, value arg4, value arg5, \ - value arg6, value arg7, value arg8, value arg9, value arg10,\ - value arg11) \ -{ return conv (cname (conv1(arg1), conv2(arg2), conv3(arg3), conv4(arg4), \ - conv5(arg5), conv6(arg6), conv7(arg7), conv8(arg8), \ - conv9(arg9), conv10(arg10), conv11(arg11))); } -#define ML_12(cname, conv1, conv2, conv3, conv4, conv5, conv6, conv7, conv8, \ - conv9, conv10, conv11, conv12, conv) \ -value ml_##cname (value arg1, value arg2, value arg3, value arg4, value arg5, \ - value arg6, value arg7, value arg8, value arg9, value arg10,\ - value arg11, value arg12) \ -{ return conv (cname (conv1(arg1), conv2(arg2), conv3(arg3), conv4(arg4), \ - conv5(arg5), conv6(arg6), conv7(arg7), conv8(arg8), \ - conv9(arg9), conv10(arg10), conv11(arg11), \ - conv12(arg12))); } - -/* Use with care: needs the argument index */ -#define Ignore(x) -#define Insert(x) (x), -#define Split(x,f,g) f(x), g(x) Ignore -#define Split3(x,f,g,h) f(x), g(x), h(x) Ignore -#define Pair(x,f,g) f(Field(x,0)), g(Field(x,1)) Ignore -#define Triple(x,f,g,h) f(Field(x,0)), g(Field(x,1)), h(Field(x,2)) Ignore - -/* For more than 5 arguments */ -#define ML_bc6(cname) \ -value cname##_bc (value *argv, int argn) \ -{ return cname(argv[0],argv[1],argv[2],argv[3],argv[4],argv[5]); } -#define ML_bc7(cname) \ -value cname##_bc (value *argv, int argn) \ -{ return cname(argv[0],argv[1],argv[2],argv[3],argv[4],argv[5],argv[6]); } -#define ML_bc8(cname) \ -value cname##_bc (value *argv, int argn) \ -{ return cname(argv[0],argv[1],argv[2],argv[3],argv[4],argv[5],argv[6], \ - argv[7]); } -#define ML_bc9(cname) \ -value cname##_bc (value *argv, int argn) \ -{ return cname(argv[0],argv[1],argv[2],argv[3],argv[4],argv[5],argv[6], \ - argv[7],argv[8]); } -#define ML_bc10(cname) \ -value cname##_bc (value *argv, int argn) \ -{ return cname(argv[0],argv[1],argv[2],argv[3],argv[4],argv[5],argv[6], \ - argv[7],argv[8],argv[9]); } -#define ML_bc11(cname) \ -value cname##_bc (value *argv, int argn) \ -{ return cname(argv[0],argv[1],argv[2],argv[3],argv[4],argv[5],argv[6], \ - argv[7],argv[8],argv[9],argv[10]); } -#define ML_bc12(cname) \ -value cname##_bc (value *argv, int argn) \ -{ return cname(argv[0],argv[1],argv[2],argv[3],argv[4],argv[5],argv[6], \ - argv[7],argv[8],argv[9],argv[10],argv[11]); } - -/* result conversion */ -#define Unit(x) ((x), Val_unit) -#define Id(x) x -#define Val_char Val_int - -/* parameter conversion */ -#define Bool_ptr(x) ((long) x - 1) -#define Char_val Int_val -#define Float_val(x) ((float)Double_val(x)) - -#define Option_val(val,unwrap,default) \ -((long)val-1 ? unwrap(Field(val,0)) : default) -#define String_option_val(s) Option_val(s,String_val,NULL) - -/* Utility */ - -#define Copy_array(ret,l,src,conv) \ - if (!l) ret = Atom(0); \ - else if (l <= Max_young_wosize) { int i; ret = alloc_tuple(l); \ - for(i=0;ifield); } - -#define Make_Setter(name,conv1,conv2,field) \ -value ml_##name##_##field (value val, value new) \ -{ (conv1(val))->field = conv2(new); return Val_unit; } - -#define Make_Array_Extractor(name,conv1,conv2,field,conv) \ -value ml_##name##_##field (value val, value index) \ -{ return conv ((conv1(val))->field[conv2(index)]); } - -#define Make_Array_Setter(name,conv1,conv2,conv3,field) \ -value ml_##name##_##field (value val, value index, value new) \ -{ (conv1(val))->field[conv2(index)] = conv3(new); return Val_unit; } - -/* ML value is [flag list] */ -#define Make_Flags_val(conv) \ -int Flags_##conv (value list) \ -{ int flags = 0L; \ - while Is_block(list) { flags |= conv(Field(list,0)); list = Field(list,1); }\ - return flags; } - -/* ML value is [flag list option] */ -#define Make_OptFlags_val(conv) \ -int OptFlags_##conv (value list) \ -{ int flags = 0L; \ - if Is_block(list) list = Field(list,0); \ - while Is_block(list) { flags |= conv(Field(list,0)); list = Field(list,1); }\ - return flags; } - -#define Val_copy(val) copy_memblock_indirected (&val, sizeof(val)) -#define Val_string copy_string_check -#define Val_optstring copy_string_or_null -#define Optstring_val(v) (string_length(v) ? String_val(v) : (char*)NULL) -#define Val_option(v,f) (v ? ml_some(f(v)) : Val_unit) - -#define Check_null(v) (v ? v : (ml_raise_null_pointer (), v)) - -#endif /* _wrappers_ */ diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0-1.i386.rpm b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0-1.i386.rpm deleted file mode 100644 index e759a668b..000000000 Binary files a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0-1.i386.rpm and /dev/null differ diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0-1.spec b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0-1.spec deleted file mode 100644 index 63b197d82..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0-1.spec +++ /dev/null @@ -1,25 +0,0 @@ -Summary: GtkMathView : the binding for lablgtk of the GtkMathView widget -Name: lablgtk-20000829_gtkmathview -Version: 0.1.0 -Release: 1 -Copyright: LGPL -Group: Development/Libraries -Requires: lablgtk_20000829 gtkmathview -Source: www.cs.unibo.it:/~lpadovan/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0.tar.gz -%description -GtkMathView is the binding for lablgtk of the GtkMathView widget. - -%prep -%setup - -%build -make -make opt - -%install -make install - -%files -%doc COPYING - -/usr/lib/ocaml/lablgtk/mathview diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0-1.src.rpm b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0-1.src.rpm deleted file mode 100644 index 3377d3cd5..000000000 Binary files a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0-1.src.rpm and /dev/null differ diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0.tar.gz b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0.tar.gz deleted file mode 100644 index 73f44b364..000000000 Binary files a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0.tar.gz and /dev/null differ diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/.depend b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/.depend deleted file mode 100644 index 600449bb8..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/.depend +++ /dev/null @@ -1,4 +0,0 @@ -gMathView.cmo: gtkMathView.cmo gtk_mathview.cmo -gMathView.cmx: gtkMathView.cmx gtk_mathview.cmx -gtkMathView.cmo: gtk_mathview.cmo -gtkMathView.cmx: gtk_mathview.cmx diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/COPYING b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/COPYING deleted file mode 100644 index 20b480a10..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/COPYING +++ /dev/null @@ -1,11 +0,0 @@ -This library is made available under the LGPL. -You should have got a copy of the LGPL with Objective Caml. -The LGPL applies to all the files in this directory, but not in -subdirectories. - -For the test subdirectory, there is no specific licensing policy, -but you may freely take inspiration from the code, and copy parts of -it in your application. - -Author: - Claudio Sacerdoti Coen diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/Makefile b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/Makefile deleted file mode 100644 index 1195de528..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/Makefile +++ /dev/null @@ -1,98 +0,0 @@ -# Makefile for lablgtk_mathview. - -LABLGTKDIR = /usr/local/lib/ocaml/lablgtk -MLFLAGS += -I $(LABLGTKDIR) - -TARGETS = ml_gtk_mathview.o lablgtkmathview.cma - -all: $(TARGETS) - -opt: lablgtkmathviewopt - -configure: - @rm -f config.make - @$(MAKE) --no-print-directory -f configure.mk - -depend: - @rm -f .depend - @$(MAKE) --no-print-directory -f configure.mk .depend - -.depend config.make: - @$(MAKE) --no-print-directory -f configure.mk - -COMPILER = $(CAMLC) $(MLFLAGS) -w s -labels -c -LINKER = $(CAMLC) $(MLFLAGS) -COMPOPT = $(CAMLOPT) $(MLFLAGS) -w s -labels -c -LINKOPT = $(CAMLOPT) $(MLFLAGS) - -include config.make - -INSTALLDIR = $(LIBDIR)/lablgtk/mathview - -MLLIBS = lablgtkmathview.cma -CLIBS = -MLLINK = unix.cma str.cma - -ifdef DEBUG -CFLAGS = -g $(GTKCFLAGS) -MLLINK += -cclib -lcamlrund -MLFLAGS += -g -else -CFLAGS = -O -DGTK_NO_CHECK_CASTS -DGTK_DISABLE_COMPAT_H $(GTKCFLAGS) -endif - -THFLAGS = -thread -THLINK = unix.cma threads.cma - -ifdef USE_CC -CCOMPILER = $(CC) -c -I$(LIBDIR) $(CFLAGS) -else -CCOMPILER = ocamlc -c -ccopt "$(CFLAGS)" -endif - -# Rules -.SUFFIXES: .ml .mli .cmo .cmi .cmx .c .o .var .h .opt .def -.c.o: - $(CCOMPILER) $< -.ml.cmo: - $(COMPILER) $< -.mli.cmi: - $(COMPILER) $< -.ml.cmx: - $(COMPOPT) $< -.var.h: - ./var2def < $< > $@ -.var.c: - ./var2conv < $< > $@ - -# Targets -COBJS = ml_gtk_mathview.o -MLOBJS = gtk_mathview.cmo gtkMathView.cmo gMathView.cmo -ALLOBJS = $(MLOBJS) - -lablgtkmathviewopt: $(CLIBS) $(MLLIBS:.cma=.cmxa) - -install: - if test -d $(INSTALLDIR); then : ; else mkdir -p $(INSTALLDIR); fi - cp $(ALLOBJS:.cmo=.cmi) $(INSTALLDIR) - if test -f *.mli ; then cp *.mli $(INSTALLDIR) ; fi - cp $(ALLOBJS:.cmo=.ml) $(INSTALLDIR) - cp $(MLLIBS) $(INSTALLDIR) - cp $(COBJS) $(INSTALLDIR) - if test ! -z "$(CLIBS)" ; then cp $(CLIBS) $(INSTALLDIR) ; fi - if test -f lablgtkmathview.cmxa; then \ - cp $(MLLIBS:.cma=.cmxa) $(MLLIBS:.cma=.a) \ - $(INSTALLDIR); fi - -lablgtkmathview.cma: $(MLOBJS) - $(LINKER) -a -custom -o $@ $(MLOBJS) $(GTKLIBS) $(GTKMATHVIEWLIBS) -lablgtkmathview.cmxa: $(MLOBJS:.cmo=.cmx) - $(LINKOPT) -a -o $@ $(MLOBJS:.cmo=.cmx) $(GTKLIBS) $(GTKMATHVIEWLIBS) - -ml_gtk.o: $(LABLGTKDIR)/gtk_tags.c $(LABLGTKDIR)/gtk_tags.h \ - $(LABLGTKDIR)/ml_gtk.h $(LABLGTKDIR)/ml_gdk.h $(LABLGTKDIR)/wrappers.h - -clean: - rm -f *.cm* *.o *.a *_tags.[ch] $(TARGETS) - -include .depend diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/config.make b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/config.make deleted file mode 100644 index d50ffb585..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/config.make +++ /dev/null @@ -1,15 +0,0 @@ -CAMLC=ocamlc -CAMLOPT=ocamlopt -USE_GL= -USE_GNOME= -USE_CC= -DEBUG= -CC=cc -RANLIB=ranlib -LIBDIR=/usr/lib/ocaml -BINDIR=/usr/bin -INSTALLDIR=/usr/lib/ocaml/lablgtk/mathview -GTKCFLAGS=-I/usr/lib/glib/include -I/usr/X11R6/include -I/usr/lib/ocaml/lablgtk -GTKLIBS=-ccopt -L/usr/lib -ccopt -L/usr/X11R6/lib -cclib -lgtk -cclib -lgdk -ccopt -rdynamic -cclib -lgmodule -cclib -lglib -cclib -ldl -cclib -lXi -cclib -lXext -cclib -lX11 -cclib -lm -GTKMATHVIEWLIBS=-ccopt -L/usr/local/lib/gtkmathview -cclib -lgtkmathview -GNOMELIBS= diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/configure.mk b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/configure.mk deleted file mode 100644 index 73cfc3d35..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/configure.mk +++ /dev/null @@ -1,53 +0,0 @@ -# makefile for configuring lablGTK_mathview - -# Default compilers -CAMLC = ocamlc -CAMLOPT = ocamlopt - -# Default installation directories -BINDIR = `$(GETBINDIR)` -INSTALLDIR = $(LIBDIR)/lablgtk/mathview - -# Autoconf -GETLIBDIR = ocamlc -v | grep "^Standard" | sed 's/^.*: *//' -LIBDIR = `$(GETLIBDIR)` -GETBINDIR = $(GETLIBDIR) | sed -e 's|/lib/[^/]*$$|/bin|' -e 's|/lib$$|/bin|' -GETRANLIB = which ranlib 2>/dev/null | sed -e 's|.*/ranlib$$|!|' -e 's/^[^!]*$$/:/' -e 's/!/ranlib/' - -ifdef USE_GNOME -GTKGETCFLAGS = gtk-config --cflags`" -I"`gnome-config --includedir -GNOMELIBS = `gnome-config --libs gtkxmhtml` -else -GTKGETCFLAGS = gtk-config --cflags -endif - -GTKGETLIBS = gtk-config --libs - -configure: .depend config.make - -.depend: - ocamldep *.ml *.mli > .depend - -config.make: - @echo CAMLC=$(CAMLC) > config.make - @echo CAMLOPT=$(CAMLOPT) >> config.make - @echo USE_GL=$(USE_GL) >> config.make - @echo USE_GNOME=$(USE_GNOME) >> config.make - @echo USE_CC=$(USE_CC) >> config.make - @echo DEBUG=$(DEBUG) >> config.make - @echo CC=$(CC) >> config.make - @echo RANLIB=`$(GETRANLIB)` >> config.make - @echo LIBDIR=$(LIBDIR) >> config.make - @echo BINDIR=`$(GETBINDIR)` >> config.make - @echo INSTALLDIR=$(INSTALLDIR) >> config.make - @echo GTKCFLAGS=`$(GTKGETCFLAGS)` -I/usr/lib/ocaml/lablgtk >> config.make - @echo GTKLIBS=`$(GTKGETLIBS)` | \ - sed -e 's/-l/-cclib &/g' -e 's/-[LRWr][^ ]*/-ccopt &/g' \ - >> config.make - # - echo GTKMATHVIEWLIBS="-ccopt -L/usr/local/lib/gtkmathview -cclib -lgtkmathview " >> config.make - # - @echo GNOMELIBS=$(GNOMELIBS) | \ - sed -e 's/-l/-cclib &/g' -e 's/-[LRWr][^ ]*/-ccopt &/g' \ - >> config.make - cat config.make diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/gMathView.ml b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/gMathView.ml deleted file mode 100644 index b79c81244..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/gMathView.ml +++ /dev/null @@ -1,50 +0,0 @@ -open Gaux -open Gtk -open Gtk_mathview -open GtkBase -open GtkMathView -open GObj - -exception ErrorLoadingFile of string;; - -class math_view_signals obj = object - inherit GContainer.container_signals obj - method jump = GtkSignal.connect ~sgn:MathView.Signals.jump obj ~after - method clicked = GtkSignal.connect ~sgn:MathView.Signals.clicked obj ~after -end - -class math_view obj = object - inherit GContainer.container (obj : Gtk_mathview.math_view obj) - method connect = new math_view_signals obj - method load ~filename = - if not (MathView.load obj ~filename) then raise (ErrorLoadingFile filename) - method get_selection = MathView.get_selection obj - method unload = MathView.unload obj - method dump = MathView.dump obj - method get_width = MathView.get_width obj - method get_height = MathView.get_height obj - method set_adjustments = - fun adj1 adj2 -> - MathView.set_adjustments obj (GData.as_adjustment adj1) - (GData.as_adjustment adj2) - method get_hadjustment = new GData.adjustment (MathView.get_hadjustment obj) - method get_vadjustment = new GData.adjustment (MathView.get_vadjustment obj) - method get_buffer = MathView.get_buffer obj - method get_frame = new GBin.frame (MathView.get_frame obj) - method set_font_size = MathView.set_font_size obj - (*method get_top = MathView.get_top obj - method set_top = MathView.set_top obj*) -end - -let math_view ?adjustmenth ?adjustmentv ?border_width ?width ?height - ?packing ?show () -= - let w = - MathView.create - ?adjustmenth:(may_map ~f:GData.as_adjustment adjustmenth) - ?adjustmentv:(may_map ~f:GData.as_adjustment adjustmentv) - () - in - Container.set w ?border_width ?width ?height; - pack_return (new math_view w) ~packing ~show -;; diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/gtkMathView.ml b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/gtkMathView.ml deleted file mode 100644 index 9ed42b8b7..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/gtkMathView.ml +++ /dev/null @@ -1,61 +0,0 @@ -open Gtk -open Gtk_mathview -open Tags -open GtkBase -open Gpointer - -module MathView = struct - let cast w : math_view obj = Object.try_cast w "GtkMathView" - external create : Gtk.adjustment optobj -> Gtk.adjustment optobj -> - math_view obj = "ml_gtk_math_view_new" - let create ~adjustmenth ~adjustmentv () = - create (optboxed adjustmenth) (optboxed adjustmentv) - external load : [>`math_view] obj -> filename:string -> bool = - "ml_gtk_math_view_load" - external get_selection : [>`math_view] obj -> string option = - "ml_gtk_math_view_get_selection" - external unload : [>`math_view] obj -> unit = - "ml_gtk_math_view_unload" - external dump : [>`math_view] obj -> unit = - "ml_gtk_math_view_dump" - external get_width : [>`math_view] obj -> int = - "ml_gtk_math_view_get_width" - external get_height : [>`math_view] obj -> int = - "ml_gtk_math_view_get_height" - external set_adjustments : [>`math_view] obj -> Gtk.adjustment obj -> Gtk.adjustment obj -> unit = - "ml_gtk_math_view_set_adjustments" - external get_hadjustment : [>`math_view] obj -> Gtk.adjustment obj = - "ml_gtk_math_view_get_hadjustment" - external get_vadjustment : [>`math_view] obj -> Gtk.adjustment obj = - "ml_gtk_math_view_get_vadjustment" - external get_buffer : [>`math_view] obj -> Gdk.pixmap = - "ml_gtk_math_view_get_buffer" - external get_frame : [>`math_view] obj -> [`frame] obj = - "ml_gtk_math_view_get_frame" - external set_font_size : [>`math_view] obj -> int -> unit = - "ml_gtk_math_view_set_font_size" - (*external get_top : [>`math_view] obj -> (int * int) = - "ml_gtk_math_view_get_top" - external set_top : [>`math_view] obj -> int -> int -> unit = - "ml_gtk_math_view_set_top"*) - - module Signals = struct - open GtkSignal - - let jump : ([>`math_view],_) t = - let marshal_jump f _ = - function - [GtkArgv.STRING (Some str)] -> f str - | _ -> invalid_arg "GtkMathView.MathView.Signals.marshal_jump" - in - { name = "jump"; marshaller = marshal_jump } - - let clicked : ([>`math_view],_) t = - let marshal_clicked f _ = - function - [] -> f () - | _ -> invalid_arg "GtkMathView.MathView.Signals.marshal_clicked" - in - { name = "clicked"; marshaller = marshal_clicked } - end -end diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/gtk_mathview.ml b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/gtk_mathview.ml deleted file mode 100644 index 745a1ba82..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/gtk_mathview.ml +++ /dev/null @@ -1 +0,0 @@ -type math_view = [`widget|`container|`bin|`eventbox|`math_view] diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/ml_gtk_mathview.c b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/ml_gtk_mathview.c deleted file mode 100644 index b16f68e50..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/ml_gtk_mathview.c +++ /dev/null @@ -1,55 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include - -/* : Next row should be put in a .h of lablgtk. */ -#define GtkAdjustment_val(val) check_cast(GTK_ADJUSTMENT,val) - -#define GtkMathView_val(val) check_cast(GTK_MATH_VIEW,val) -ML_2 (gtk_math_view_new,GtkAdjustment_val, GtkAdjustment_val,Val_GtkWidget_sink) -ML_2 (gtk_math_view_load, GtkMathView_val, String_val, Val_bool) -ML_1 (gtk_math_view_unload, GtkMathView_val, Unit) -ML_1 (gtk_math_view_dump, GtkMathView_val, Unit) -ML_1 (gtk_math_view_get_width, GtkMathView_val, Val_int) -ML_1 (gtk_math_view_get_height, GtkMathView_val, Val_int) -//ML_3 (gtk_math_view_set_top, GtkMathView_val, Int_val, Int_val, Unit) -ML_3 (gtk_math_view_set_adjustments, GtkMathView_val, GtkAdjustment_val, GtkAdjustment_val, Unit) -ML_1 (gtk_math_view_get_hadjustment, GtkMathView_val, Val_GtkWidget) -ML_1 (gtk_math_view_get_vadjustment, GtkMathView_val, Val_GtkWidget) -ML_1 (gtk_math_view_get_buffer, GtkMathView_val, Val_GdkPixmap) -ML_1 (gtk_math_view_get_frame, GtkMathView_val, Val_GtkWidget) -ML_2 (gtk_math_view_set_font_size, GtkMathView_val, Int_val, Unit) - -/* -value ml_gtk_math_view_get_top (value arg1) -{ - CAMLparam1(arg1); - CAMLlocal1 (result); - int x, y; - gtk_math_view_get_top(GtkMathView_val (arg1), &x, &y); - result = alloc(2, 0); - Store_field(result, 0, Val_int(x)); - Store_field(result, 0, Val_int(y)); - CAMLreturn (result); -} -*/ - -value ml_gtk_math_view_get_selection (value arg1) -{ - const char *stringa; - stringa = gtk_math_view_get_selection (GtkMathView_val (arg1)); - return Val_option (stringa, Val_string); -} diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/test/Makefile b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/test/Makefile deleted file mode 100644 index cc5bd50f5..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/test/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -LABLGTK_DIR = ../../lablgtk-20000829 -LABLGTK_MATHVIEW_DIR = .. -OCAMLC = ocamlc -I $(LABLGTK_DIR) -I $(LABLGTK_MATHVIEW_DIR) -I mlmathview -OCAMLOPT = ocamlopt -I $(LABLGTK_DIR) -I $(LABLGTK_MATHVIEW_DIR) -I mlmathview - -all: test -opt: test.opt - -test: test.cmo - $(OCAMLC) -custom -o test lablgtk.cma gtkInit.cmo \ - $(LABLGTK_MATHVIEW_DIR)/lablgtkmathview.cma \ - test.cmo \ - -cclib "-lstr -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk \ - -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm \ - -L/usr/local/lib/gtkmathview -lgtkmathview \ - $(LABLGTK_MATHVIEW_DIR)/ml_gtk_mathview.o" - -test.opt: test.cmx - $(OCAMLOPT) -o test.opt lablgtk.cmxa gtkInit.cmx \ - $(LABLGTK_MATHVIEW_DIR)/lablgtkmathview.cmxa \ - test.cmx \ - -cclib "-lstr -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk \ - -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm \ - -L/usr/local/lib/gtkmathview -lgtkmathview \ - $(LABLGTK_MATHVIEW_DIR)/ml_gtk_mathview.o" - -.SUFFIXES: .ml .mli .cmo .cmi .cmx -.ml.cmo: - $(OCAMLC) -c $< -.mli.cmi: - $(OCAMLC) -c $< -.ml.cmx: - $(OCAMLOPT) -c $< - -clean: - rm -f *.cm[iox] *.o test test.opt diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/test/test.ml b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/test/test.ml deleted file mode 100644 index e914f4d6b..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/test/test.ml +++ /dev/null @@ -1,141 +0,0 @@ -(******************************************************************************) -(* Claudio Sacerdoti Coen *) -(* 25/09/2000 *) -(* *) -(* This is a simple test for the OCaml (LablGtk indeed) binding of the *) -(* MathView widget *) -(******************************************************************************) - -(* Callbacks *) -let jump s = - print_string ("jump: " ^ s ^ "\n") ; - flush stdout -;; - -let clicked () = - print_string "clicked: IT WORKS\n" ; - flush stdout -;; - -let load mathview () = - mathview#load "test.xml" ; - print_string "load: SEEMS TO WORK\n" ; - flush stdout -;; - -exception Ok;; -let get_selection mathview () = - let selection = - match mathview#get_selection with - None -> "NO SELECTION" - | Some s -> s - in - print_string ("get_selection: " ^ selection ^ "\n") ; - flush stdout -;; - -let unload mathview () = - mathview#unload ; - print_string "unload: SEEMS TO WORK\n" ; - flush stdout -;; - -let dump mathview () = - mathview#dump ; - print_string "dump: SEEMS TO WORK\n" ; - flush stdout -;; - -let get_width mathview () = - print_string ("get_width: " ^ string_of_int (mathview#get_width) ^ "\n") ; - flush stdout -;; - -let get_height mathview () = - print_string ("get_height: " ^ string_of_int (mathview#get_height) ^ "\n") ; - flush stdout -;; - -let set_adjustments mathview () = - let adj1 = GData.adjustment () in - let adj2 = GData.adjustment () in - mathview#set_adjustments adj1 adj2 ; - adj1#set_value ((adj1#lower +. adj1#upper) /. 2.0) ; - adj2#set_value ((adj2#lower +. adj2#upper) /. 2.0) ; - print_string "set_adjustments: SEEM TO WORK\n" ; - flush stdout -;; - -let get_hadjustment mathview () = - let adj = mathview#get_hadjustment in - adj#set_value ((adj#lower +. adj#upper) /. 2.0) ; - print_string "get_hadjustment: SEEM TO WORK\n" ; - flush stdout -;; - -let get_vadjustment mathview () = - let adj = mathview#get_vadjustment in - adj#set_value ((adj#lower +. adj#upper) /. 2.0) ; - print_string "get_vadjustment: SEEM TO WORK\n" ; - flush stdout -;; - -let get_buffer mathview () = - let buffer = mathview#get_buffer in - Gdk.Draw.rectangle buffer (Gdk.GC.create buffer) ~x:0 ~y:0 - ~width:50 ~height:50 ~filled:true () ; - print_string "get_buffer: SEEMS TO WORK (hint: force the widget redrawing)\n"; - flush stdout -;; - -let get_frame mathview () = - let frame = mathview#get_frame in - frame#set_shadow_type `NONE ; - print_string "get_frame: SEEMS TO WORK\n" ; - flush stdout -;; - -let set_font_size mathview () = - mathview#set_font_size 24 ; - print_string "set_font_size: FONT IS NOW 24\n" ; - flush stdout -;; - -(* Widget creation *) -let main_window = GWindow.window ~title:"GtkMathView test" () in -let vbox = GPack.vbox ~packing:main_window#add () in -let sw = GBin.scrolled_window ~width:50 ~height:50 ~packing:vbox#pack () in -(*let mathview = GMathView.math_view ~packing:sw#add_with_viewport ~width:50 ~height:50 () in*) -let mathview = GMathView.math_view ~packing:sw#add ~width:50 ~height:50 () in -let hbox = GPack.hbox ~packing:vbox#pack () in -let button_load = GButton.button ~label:"load" ~packing:hbox#pack () in -let button_get_selection = GButton.button ~label:"get_selection" ~packing:hbox#pack () in -let button_unload = GButton.button ~label:"unload" ~packing:hbox#pack () in -let button_dump = GButton.button ~label:"dump" ~packing:hbox#pack () in -let button_get_width = GButton.button ~label:"get_width" ~packing:hbox#pack () in -let button_get_height = GButton.button ~label:"get_height" ~packing:hbox#pack () in -let button_set_adjustments = GButton.button ~label:"set_adjustments" ~packing:hbox#pack () in -let button_get_hadjustment = GButton.button ~label:"get_hadjustment" ~packing:hbox#pack () in -let button_get_vadjustment = GButton.button ~label:"get_vadjustment" ~packing:hbox#pack () in -let button_get_buffer = GButton.button ~label:"get_buffer" ~packing:hbox#pack () in -let button_get_frame = GButton.button ~label:"get_frame" ~packing:hbox#pack () in -let button_set_font_size = GButton.button ~label:"set_font_size" ~packing:hbox#pack () in -(* Signals connection *) -ignore(button_load#connect#clicked (load mathview)) ; -ignore(button_get_selection#connect#clicked (get_selection mathview)) ; -ignore(button_unload#connect#clicked (unload mathview)) ; -ignore(button_dump#connect#clicked (dump mathview)) ; -ignore(button_get_width#connect#clicked (get_width mathview)) ; -ignore(button_get_height#connect#clicked (get_height mathview)) ; -ignore(button_set_adjustments#connect#clicked (set_adjustments mathview)) ; -ignore(button_get_hadjustment#connect#clicked (get_hadjustment mathview)) ; -ignore(button_get_vadjustment#connect#clicked (get_vadjustment mathview)) ; -ignore(button_get_buffer#connect#clicked (get_buffer mathview)) ; -ignore(button_get_frame#connect#clicked (get_frame mathview)) ; -ignore(button_set_font_size#connect#clicked (set_font_size mathview)) ; -ignore(mathview#connect#jump jump) ; -ignore(mathview#connect#clicked clicked) ; -(* Main Loop *) -main_window#show () ; -GMain.Main.main () -;; diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/test/test.xml b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/test/test.xml deleted file mode 100644 index b0f8c1563..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0/test/test.xml +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - a - - x - - + - b - - - - x - 2 - - + - - p - - x - - + - q - - - - d - x - = - - - a2 - - - ln - - - ( - - x2 - + - - p - - x - - + - q - - ) - - - - + - - - - - 2 - - b - - - - - a - - p - - - - - - 4 - - q - - - - - p - 2 - - - - - - - arctg - - - - - 2 - - x - - + - p - - - - - 4 - - q - - - - - p - 2 - - - - - - - + - c - - diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0-1.spec b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0-1.spec deleted file mode 100644 index 59a3298b3..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0-1.spec +++ /dev/null @@ -1,25 +0,0 @@ -Summary: GtkMathView : the binding for lablgtk of the GtkMathView widget -Name: lablgtk-20000829_gtkmathview -Version: 0.2.0 -Release: 1 -Copyright: LGPL -Group: Development/Libraries -Requires: lablgtk_20000829 gtkmathview -Source: www.cs.unibo.it:/~lpadovan/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.1.0.tar.gz -%description -GtkMathView is the binding for lablgtk of the GtkMathView widget. - -%prep -%setup - -%build -make -make opt - -%install -make install - -%files -%doc COPYING - -/usr/lib/ocaml/lablgtk/mathview diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0.tar.gz b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0.tar.gz deleted file mode 100644 index 489f3c727..000000000 Binary files a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0.tar.gz and /dev/null differ diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/.cvsignore b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/.cvsignore deleted file mode 100644 index 8e6f4f936..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -*.cmi *.cmo *.cmx *.cma *.cmxa test test.opt diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/.depend b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/.depend deleted file mode 100644 index 600449bb8..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/.depend +++ /dev/null @@ -1,4 +0,0 @@ -gMathView.cmo: gtkMathView.cmo gtk_mathview.cmo -gMathView.cmx: gtkMathView.cmx gtk_mathview.cmx -gtkMathView.cmo: gtk_mathview.cmo -gtkMathView.cmx: gtk_mathview.cmx diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/COPYING b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/COPYING deleted file mode 100644 index 20b480a10..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/COPYING +++ /dev/null @@ -1,11 +0,0 @@ -This library is made available under the LGPL. -You should have got a copy of the LGPL with Objective Caml. -The LGPL applies to all the files in this directory, but not in -subdirectories. - -For the test subdirectory, there is no specific licensing policy, -but you may freely take inspiration from the code, and copy parts of -it in your application. - -Author: - Claudio Sacerdoti Coen diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/Makefile b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/Makefile deleted file mode 100644 index d5a1685d2..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/Makefile +++ /dev/null @@ -1,107 +0,0 @@ -# Makefile for lablgtk_mathview. - -LABLGTKDIR = /usr/lib/ocaml/lablgtk -MINIDOMDIR = ./minidom -MLFLAGS += -I $(LABLGTKDIR) -I $(MINIDOMDIR) - -TARGETS = ml_gtk_mathview.o lablgtkmathview.cma - -all: Minidom $(TARGETS) - -opt: Minidom.opt lablgtkmathviewopt - -Minidom: - cd minidom ; make - -Minidom.opt: - cd minidom ; make opt - -configure: - @rm -f config.make - @$(MAKE) --no-print-directory -f configure.mk - -depend: - @rm -f .depend - @$(MAKE) --no-print-directory -f configure.mk .depend - -.depend config.make: - @$(MAKE) --no-print-directory -f configure.mk - -COMPILER = $(CAMLC) $(MLFLAGS) -w s -labels -c -LINKER = $(CAMLC) $(MLFLAGS) -COMPOPT = $(CAMLOPT) $(MLFLAGS) -w s -labels -c -LINKOPT = $(CAMLOPT) $(MLFLAGS) - -include config.make - -INSTALLDIR = $(LIBDIR)/lablgtk/mathview - -MLLIBS = lablgtkmathview.cma -CLIBS = -MLLINK = unix.cma str.cma - -ifdef DEBUG -CFLAGS = -g $(GTKCFLAGS) -MLLINK += -cclib -lcamlrund -MLFLAGS += -g -else -CFLAGS = -O -DGTK_NO_CHECK_CASTS -DGTK_DISABLE_COMPAT_H $(GTKCFLAGS) -endif - -THFLAGS = -thread -THLINK = unix.cma threads.cma - -ifdef USE_CC -CCOMPILER = $(CC) -c -I$(LIBDIR) $(CFLAGS) -else -CCOMPILER = ocamlc -c -ccopt "$(CFLAGS)" -endif - -# Rules -.SUFFIXES: .ml .mli .cmo .cmi .cmx .c .o .var .h .opt .def -.c.o: - $(CCOMPILER) $< -.ml.cmo: - $(COMPILER) $< -.mli.cmi: - $(COMPILER) $< -.ml.cmx: - $(COMPOPT) $< -.var.h: - ./var2def < $< > $@ -.var.c: - ./var2conv < $< > $@ - -# Targets -COBJS = ml_gtk_mathview.o -MLOBJS = gtk_mathview.cmo gtkMathView.cmo gMathView.cmo -ALLOBJS = $(MLOBJS) - -lablgtkmathviewopt: $(CLIBS) $(MLLIBS:.cma=.cmxa) - -install: - if test -d $(INSTALLDIR); then : ; else mkdir -p $(INSTALLDIR); fi - cp $(ALLOBJS:.cmo=.cmi) $(INSTALLDIR) - if test -f *.mli ; then cp *.mli $(INSTALLDIR) ; fi - cp $(ALLOBJS:.cmo=.ml) $(INSTALLDIR) - cp $(MLLIBS) $(INSTALLDIR) - cp $(COBJS) $(INSTALLDIR) - if test ! -z "$(CLIBS)" ; then cp $(CLIBS) $(INSTALLDIR) ; fi - if test -f lablgtkmathview.cmxa; then \ - cp $(MLLIBS:.cma=.cmxa) $(MLLIBS:.cma=.a) \ - $(INSTALLDIR); fi - cd minidom ; make install - -lablgtkmathview.cma: $(MLOBJS) - $(LINKER) -a -custom -o $@ $(MLOBJS) $(GTKLIBS) $(GTKMATHVIEWLIBS) -lablgtkmathview.cmxa: $(MLOBJS:.cmo=.cmx) - $(LINKOPT) -a -o $@ $(MLOBJS:.cmo=.cmx) $(GTKLIBS) $(GTKMATHVIEWLIBS) - -ml_gtk.o: $(LABLGTKDIR)/gtk_tags.c $(LABLGTKDIR)/gtk_tags.h \ - $(LABLGTKDIR)/ml_gtk.h $(LABLGTKDIR)/ml_gdk.h $(LABLGTKDIR)/wrappers.h - -clean: - rm -f *.cm* *.o *.a *_tags.[ch] $(TARGETS) - cd minidom ; make clean - -include .depend diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/config.make b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/config.make deleted file mode 100644 index d7e9241c5..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/config.make +++ /dev/null @@ -1,15 +0,0 @@ -CAMLC=ocamlc -CAMLOPT=ocamlopt -USE_GL= -USE_GNOME= -USE_CC= -DEBUG= -CC=cc -RANLIB=ranlib -LIBDIR=/usr/lib/ocaml -BINDIR=/usr/bin -INSTALLDIR=/usr/lib/ocaml/lablgtk/mathview -GTKCFLAGS=-I/usr/lib/glib/include -I/usr/X11R6/include -I/usr/include/libxml -I/usr/include -I/usr/local/include/gtkmathview -I/usr/lib/ocaml/lablgtk -GTKLIBS=-ccopt -L/usr/lib -ccopt -L/usr/X11R6/lib -cclib -lgtk -cclib -lgdk -ccopt -rdynamic -cclib -lgmodule -cclib -lglib -cclib -ldl -cclib -lXi -cclib -lXext -cclib -lX11 -cclib -lm -GTKMATHVIEWLIBS=-ccopt -L/usr/local/lib/gtkmathview -cclib -lgtkmathview -GNOMELIBS= diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/configure.mk b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/configure.mk deleted file mode 100644 index ec5f79995..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/configure.mk +++ /dev/null @@ -1,53 +0,0 @@ -# makefile for configuring lablGTK_mathview - -# Default compilers -CAMLC = ocamlc -CAMLOPT = ocamlopt - -# Default installation directories -BINDIR = `$(GETBINDIR)` -INSTALLDIR = $(LIBDIR)/lablgtk/mathview - -# Autoconf -GETLIBDIR = ocamlc -v | grep "^Standard" | sed 's/^.*: *//' -LIBDIR = `$(GETLIBDIR)` -GETBINDIR = $(GETLIBDIR) | sed -e 's|/lib/[^/]*$$|/bin|' -e 's|/lib$$|/bin|' -GETRANLIB = which ranlib 2>/dev/null | sed -e 's|.*/ranlib$$|!|' -e 's/^[^!]*$$/:/' -e 's/!/ranlib/' - -ifdef USE_GNOME -GTKGETCFLAGS = gtk-config --cflags`" -I"`gnome-config --includedir" "`xml-config --cflags`" "`gtkmathview-config --cflags -GNOMELIBS = `gnome-config --libs gtkxmhtml` -else -GTKGETCFLAGS = gtk-config --cflags`" "`xml-config --cflags`" "`gtkmathview-config --cflags -endif - -GTKGETLIBS = gtk-config --libs - -configure: .depend config.make - -.depend: - ocamldep *.ml *.mli > .depend - -config.make: - @echo CAMLC=$(CAMLC) > config.make - @echo CAMLOPT=$(CAMLOPT) >> config.make - @echo USE_GL=$(USE_GL) >> config.make - @echo USE_GNOME=$(USE_GNOME) >> config.make - @echo USE_CC=$(USE_CC) >> config.make - @echo DEBUG=$(DEBUG) >> config.make - @echo CC=$(CC) >> config.make - @echo RANLIB=`$(GETRANLIB)` >> config.make - @echo LIBDIR=$(LIBDIR) >> config.make - @echo BINDIR=`$(GETBINDIR)` >> config.make - @echo INSTALLDIR=$(INSTALLDIR) >> config.make - @echo GTKCFLAGS=`$(GTKGETCFLAGS)` -I/usr/lib/ocaml/lablgtk >> config.make - @echo GTKLIBS=`$(GTKGETLIBS)` | \ - sed -e 's/-l/-cclib &/g' -e 's/-[LRWr][^ ]*/-ccopt &/g' \ - >> config.make - # - echo GTKMATHVIEWLIBS="-ccopt -L/usr/local/lib/gtkmathview -cclib -lgtkmathview " >> config.make - # - @echo GNOMELIBS=$(GNOMELIBS) | \ - sed -e 's/-l/-cclib &/g' -e 's/-[LRWr][^ ]*/-ccopt &/g' \ - >> config.make - cat config.make diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/gMathView.ml b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/gMathView.ml deleted file mode 100644 index 87f0d5035..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/gMathView.ml +++ /dev/null @@ -1,64 +0,0 @@ -open Gaux -open Gtk -open Gtk_mathview -open GtkBase -open GtkMathView -open GObj - -exception ErrorLoadingFile of string;; -exception ErrorWritingFile of string;; - -class math_view_signals obj = object - inherit GContainer.container_signals obj - method clicked = GtkSignal.connect ~sgn:MathView.Signals.clicked obj ~after - method jump = GtkSignal.connect ~sgn:MathView.Signals.jump obj ~after - method selection_changed = - GtkSignal.connect ~sgn:MathView.Signals.selection_changed obj ~after -end - -class math_view obj = object - inherit GContainer.container (obj : Gtk_mathview.math_view obj) - method connect = new math_view_signals obj - method load ~filename = - if not (MathView.load obj ~filename) then raise (ErrorLoadingFile filename) - method unload = MathView.unload obj - method get_selection = MathView.get_selection obj - method set_selection = MathView.set_selection obj - method get_width = MathView.get_width obj - method get_height = MathView.get_height obj - method get_top = MathView.get_top obj - method set_top = MathView.set_top obj - method set_adjustments = - fun adj1 adj2 -> - MathView.set_adjustments obj (GData.as_adjustment adj1) - (GData.as_adjustment adj2) - method get_hadjustment = new GData.adjustment (MathView.get_hadjustment obj) - method get_vadjustment = new GData.adjustment (MathView.get_vadjustment obj) - method get_buffer = MathView.get_buffer obj - method get_frame = new GBin.frame (MathView.get_frame obj) - method set_font_size = MathView.set_font_size obj - method get_font_size = MathView.get_font_size obj - method set_anti_aliasing = MathView.set_anti_aliasing obj - method get_anti_aliasing = MathView.get_anti_aliasing obj - method set_kerning = MathView.set_kerning obj - method get_kerning = MathView.get_kerning obj - method set_log_verbosity = MathView.set_log_verbosity obj - method get_log_verbosity = MathView.get_log_verbosity obj - method export_to_postscript ~filename = - if not (MathView.export_to_postscript obj ~filename) then - raise (ErrorWritingFile filename) -end - -let math_view ?adjustmenth ?adjustmentv ?(use_t1_lib=false) ?border_width - ?width ?height ?packing ?show () -= - let w = - MathView.create - ?adjustmenth:(may_map ~f:GData.as_adjustment adjustmenth) - ?adjustmentv:(may_map ~f:GData.as_adjustment adjustmentv) - ?use_t1_lib - () - in - Container.set w ?border_width ?width ?height; - pack_return (new math_view w) ~packing ~show -;; diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/gtkMathView.ml b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/gtkMathView.ml deleted file mode 100644 index 97ae38e32..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/gtkMathView.ml +++ /dev/null @@ -1,93 +0,0 @@ -open Gtk -open Gtk_mathview -open Tags -open GtkBase -open Gpointer - -external mDOMNode_of_boxed_option : - Gpointer.boxed option -> Minidom.mDOMNode = - "ml_gtk_math_view_mDOMNode_of_bodex_option" - -external mDOMNode_option_of_boxed_option : - Gpointer.boxed option -> Minidom.mDOMNode option = - "ml_gtk_math_view_mDOMNode_option_of_bodex_option" - -module MathView = struct - let cast w : math_view obj = Object.try_cast w "GtkMathView" - external create : Gtk.adjustment optobj -> Gtk.adjustment optobj -> bool -> - math_view obj = "ml_gtk_math_view_new" - let create ~adjustmenth ~adjustmentv ~use_t1_lib () = - create (optboxed adjustmenth) (optboxed adjustmentv) use_t1_lib - external load : [>`math_view] obj -> filename:string -> bool = - "ml_gtk_math_view_load" - external unload : [>`math_view] obj -> unit = - "ml_gtk_math_view_unload" - external get_selection : [>`math_view] obj -> Minidom.mDOMNode option = - "ml_gtk_math_view_get_selection" - external set_selection : [>`math_view] obj -> Minidom.mDOMNode option -> unit= - "ml_gtk_math_view_set_selection" - external get_width : [>`math_view] obj -> int = - "ml_gtk_math_view_get_width" - external get_height : [>`math_view] obj -> int = - "ml_gtk_math_view_get_height" - external get_top : [>`math_view] obj -> (int * int) = - "ml_gtk_math_view_get_top" - external set_top : [>`math_view] obj -> int -> int -> unit = - "ml_gtk_math_view_set_top" - external set_adjustments : [>`math_view] obj -> Gtk.adjustment obj -> Gtk.adjustment obj -> unit = - "ml_gtk_math_view_set_adjustments" - external get_hadjustment : [>`math_view] obj -> Gtk.adjustment obj = - "ml_gtk_math_view_get_hadjustment" - external get_vadjustment : [>`math_view] obj -> Gtk.adjustment obj = - "ml_gtk_math_view_get_vadjustment" - external get_buffer : [>`math_view] obj -> Gdk.pixmap = - "ml_gtk_math_view_get_buffer" - external get_frame : [>`math_view] obj -> [`frame] obj = - "ml_gtk_math_view_get_frame" - external set_font_size : [>`math_view] obj -> int -> unit = - "ml_gtk_math_view_set_font_size" - external get_font_size : [>`math_view] obj -> int = - "ml_gtk_math_view_get_font_size" - external set_anti_aliasing : [>`math_view] obj -> bool -> unit = - "ml_gtk_math_view_set_anti_aliasing" - external get_anti_aliasing : [>`math_view] obj -> bool = - "ml_gtk_math_view_get_anti_aliasing" - external set_kerning : [>`math_view] obj -> bool -> unit = - "ml_gtk_math_view_set_kerning" - external get_kerning : [>`math_view] obj -> bool = - "ml_gtk_math_view_get_kerning" - external set_log_verbosity : [>`math_view] obj -> int -> unit = - "ml_gtk_math_view_set_log_verbosity" - external get_log_verbosity : [>`math_view] obj -> int = - "ml_gtk_math_view_get_log_verbosity" - external export_to_postscript : [>`math_view] obj -> filename:string -> bool = - "ml_gtk_math_view_export_to_postscript" - - module Signals = struct - open GtkSignal - - let clicked : ([>`math_view],_) t = - let marshal_clicked f _ = - function - [GtkArgv.POINTER node] -> f (mDOMNode_of_boxed_option node) - | _ -> invalid_arg "GtkMathView.MathView.Signals.marshal_clicked" - in - { name = "clicked"; marshaller = marshal_clicked } - - let jump : ([>`math_view],_) t = - let marshal_jump f _ = - function - [GtkArgv.POINTER node] -> f (mDOMNode_of_boxed_option node) - | _ -> invalid_arg "GtkMathView.MathView.Signals.marshal_jump" - in - { name = "jump"; marshaller = marshal_jump } - - let selection_changed : ([>`math_view],_) t = - let marshal_selection_changed f _ = - function - [GtkArgv.POINTER node] -> f (mDOMNode_option_of_boxed_option node) - | _ -> invalid_arg "GtkMathView.MathView.Signals.marshal_selection_changed" - in - { name = "selection_changed"; marshaller = marshal_selection_changed } - end -end diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/gtk_mathview.ml b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/gtk_mathview.ml deleted file mode 100644 index 745a1ba82..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/gtk_mathview.ml +++ /dev/null @@ -1 +0,0 @@ -type math_view = [`widget|`container|`bin|`eventbox|`math_view] diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/minidom/.cvsignore b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/minidom/.cvsignore deleted file mode 100644 index 84bdd8eff..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/minidom/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -*.cmi *.cmo *.cmx test test.opt diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/minidom/Makefile b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/minidom/Makefile deleted file mode 100644 index 7463870b8..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/minidom/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -LIBDIR = /usr/lib/ocaml -INSTALLDIR = $(LIBDIR)/lablgtk/mathview/minidom -OBJECTS = minidom.cmi minidom.cmo minidom.cmx minidom.mli ml_minidom.h \ - ml_minidom.o minidom.o - -all: test - -opt: test.opt - -ml_minidom.o: ml_minidom.c - gcc -c -I/usr/lib/ocaml/caml/ `glib-config --cflags` `xml-config --cflags` `gtkmathview-config --cflags` $< - -minidom.cmi: minidom.mli - ocamlc -c $< - -minidom.cmo: minidom.ml minidom.cmi - ocamlc -c $< - -minidom.cmx: minidom.ml minidom.cmi - ocamlopt -c $< - -test.cmo: test.ml minidom.cmo - ocamlc -c test.ml - -test.cmx: test.ml minidom.cmx - ocamlopt -c test.ml - -test: test.cmo minidom.cmo ml_minidom.o - ocamlc -custom -o test minidom.cmo test.cmo ml_minidom.o \ - -cclib "`xml-config --libs`" -cclib "`glib-config --libs`" \ - -cclib "`gtkmathview-config --libs`" - -test.opt: test.cmx minidom.cmx ml_minidom.o - ocamlopt -o test.opt minidom.cmx test.cmx ml_minidom.o \ - -cclib "`xml-config --libs`" -cclib "`glib-config --libs`" \ - -cclib "`gtkmathview-config --libs`" - -install: - if test -d $(INSTALLDIR); then : ; else mkdir -p $(INSTALLDIR); fi - cp $(OBJECTS) $(INSTALLDIR) - -clean: - rm -f *.o *.cm? test test.opt diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/minidom/minidom.ml b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/minidom/minidom.ml deleted file mode 100644 index 31e677b3f..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/minidom/minidom.ml +++ /dev/null @@ -1,61 +0,0 @@ - -type mDOMString -type mDOMDoc -type mDOMNode -type mDOMAttr -type mDOMEntity - -external string_of_mDOMString : mDOMString -> string = "ml_string_of_mDOMString" -external mDOMString_of_string : string -> mDOMString = "ml_mDOMString_of_string" -external mDOMString_eq : string -> string -> bool = "ml_mDOMString_eq" - -external doc_load : string -> mDOMDoc = "ml_doc_load" -external doc_unload : mDOMDoc -> unit = "ml_doc_unload" - -external doc_new : mDOMString -> mDOMDoc = "ml_doc_new" -external doc_get_root_node : mDOMDoc -> mDOMNode = "ml_doc_get_root_node" - -external doc_add_entity : mDOMDoc -> mDOMString -> mDOMString -> mDOMEntity = "ml_doc_add_entity" -external doc_get_entity : mDOMDoc -> mDOMString -> mDOMEntity option = "ml_doc_get_entity" -external doc_get_predefined_entity : mDOMDoc -> mDOMString -> mDOMEntity option = "ml_doc_get_predefined_entity" -external entity_get_content : mDOMEntity -> mDOMString = "ml_entity_get_content" - -external node_is_text : mDOMNode -> bool = "ml_node_is_text" -external node_is_element : mDOMNode -> bool = "ml_node_is_element" -external node_is_blank : mDOMNode -> bool = "ml_node_is_blank" -external node_is_entity_ref : mDOMNode -> bool = "ml_node_is_entity_ref" -external node_get_type : mDOMNode -> int = "ml_node_get_type" -external node_get_name : mDOMNode -> mDOMString option = "ml_node_get_name" -external node_get_ns_uri : mDOMNode -> mDOMString option = "ml_node_get_ns_uri" -external node_get_attribute : mDOMNode -> mDOMString -> mDOMString option = "ml_node_get_attribute" -external node_get_attribute_ns : mDOMNode -> mDOMString -> mDOMString -> mDOMString option = "ml_node_get_attribute_ns" -external node_get_content : mDOMNode -> mDOMString option = "ml_node_get_content" -external node_get_parent : mDOMNode -> mDOMNode option = "ml_node_get_parent" -external node_get_prev_sibling : mDOMNode -> mDOMNode option = "ml_node_get_prev_sibling" -external node_get_next_sibling : mDOMNode -> mDOMNode option = "ml_node_get_next_sibling" -external node_get_first_child : mDOMNode -> mDOMNode option = "ml_node_get_first_child" -external node_get_first_attribute : mDOMNode -> mDOMAttr option = "ml_node_get_first_attribute" -external node_is_first : mDOMNode -> bool = "ml_node_is_first" -external node_is_last : mDOMNode -> bool = "ml_node_is_last" - -external attr_get_name : mDOMAttr -> mDOMString option = "ml_attr_get_name" -external attr_get_ns_uri : mDOMAttr -> mDOMString option = "ml_attr_get_ns_uri" -external attr_get_value : mDOMAttr -> mDOMString option = "ml_attr_get_value" -external attr_get_prev_sibling : mDOMAttr -> mDOMAttr option = "ml_attr_get_prev_sibling" -external attr_get_next_sibling : mDOMAttr -> mDOMAttr option = "ml_attr_get_next_sibling" -external attr_get_parent : mDOMAttr -> mDOMNode option = "ml_attr_get_parent" - -let rec node_list_of_node_first = - function None -> [] - | Some node -> node :: (node_list_of_node_first (node_get_next_sibling node)) - -let rec attr_list_of_attr_first = - function None -> [] - | Some attr -> attr :: (attr_list_of_attr_first (attr_get_next_sibling attr)) - -let node_get_children node = - (node_list_of_node_first (node_get_first_child node)) - -let node_get_attributes node = - (attr_list_of_attr_first (node_get_first_attribute node)) - diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/minidom/minidom.mli b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/minidom/minidom.mli deleted file mode 100644 index 0b655955b..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/minidom/minidom.mli +++ /dev/null @@ -1,50 +0,0 @@ - -type mDOMString -type mDOMDoc -type mDOMNode -type mDOMAttr -type mDOMEntity - -external string_of_mDOMString : mDOMString -> string = "ml_string_of_mDOMString" -external mDOMString_of_string : string -> mDOMString = "ml_mDOMString_of_string" -external mDOMString_eq : string -> string -> bool = "ml_mDOMString_eq" - -external doc_load : string -> mDOMDoc = "ml_doc_load" -external doc_unload : mDOMDoc -> unit = "ml_doc_unload" - -external doc_new : mDOMString -> mDOMDoc = "ml_doc_new" -external doc_get_root_node : mDOMDoc -> mDOMNode = "ml_doc_get_root_node" - -external doc_add_entity : doc:mDOMDoc -> name:mDOMString -> content:mDOMString -> mDOMEntity = "ml_doc_add_entity" -external doc_get_entity : doc:mDOMDoc -> name:mDOMString -> mDOMEntity option = "ml_doc_get_entity" -external doc_get_predefined_entity : doc:mDOMDoc -> name:mDOMString -> mDOMEntity option = "ml_doc_get_predefined_entity" -external entity_get_content : mDOMEntity -> mDOMString = "ml_entity_get_content" - -external node_is_text : mDOMNode -> bool = "ml_node_is_text" -external node_is_element : mDOMNode -> bool = "ml_node_is_element" -external node_is_blank : mDOMNode -> bool = "ml_node_is_blank" -external node_is_entity_ref : mDOMNode -> bool = "ml_node_is_entity_ref" -external node_get_type : mDOMNode -> int = "ml_node_get_type" -external node_get_name : mDOMNode -> mDOMString option = "ml_node_get_name" -external node_get_ns_uri : mDOMNode -> mDOMString option = "ml_node_get_ns_uri" -external node_get_attribute : node:mDOMNode -> name:mDOMString -> mDOMString option = "ml_node_get_attribute" -external node_get_attribute_ns : node:mDOMNode -> name:mDOMString -> ns_uri:mDOMString -> mDOMString option = "ml_node_get_attribute_ns" -external node_get_content : mDOMNode -> mDOMString option = "ml_node_get_content" -external node_get_parent : mDOMNode -> mDOMNode option = "ml_node_get_parent" -external node_get_prev_sibling : mDOMNode -> mDOMNode option = "ml_node_get_prev_sibling" -external node_get_next_sibling : mDOMNode -> mDOMNode option = "ml_node_get_next_sibling" -external node_get_first_child : mDOMNode -> mDOMNode option = "ml_node_get_first_child" -external node_get_first_attribute : mDOMNode -> mDOMAttr option = "ml_node_get_first_attribute" -external node_is_first : mDOMNode -> bool = "ml_node_is_first" -external node_is_last : mDOMNode -> bool = "ml_node_is_last" - -external attr_get_name : mDOMAttr -> mDOMString option = "ml_attr_get_name" -external attr_get_ns_uri : mDOMAttr -> mDOMString option = "ml_attr_get_ns_uri" -external attr_get_value : mDOMAttr -> mDOMString option = "ml_attr_get_value" -external attr_get_prev_sibling : mDOMAttr -> mDOMAttr option = "ml_attr_get_prev_sibling" -external attr_get_next_sibling : mDOMAttr -> mDOMAttr option = "ml_attr_get_next_sibling" -external attr_get_parent : mDOMAttr -> mDOMNode option = "ml_attr_get_parent" - -val node_get_children : mDOMNode -> mDOMNode list -val node_get_attributes : mDOMNode -> mDOMAttr list - diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/minidom/ml_minidom.c b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/minidom/ml_minidom.c deleted file mode 100644 index 10626143c..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/minidom/ml_minidom.c +++ /dev/null @@ -1,288 +0,0 @@ - -#include -#include -#include - -#include "minidom.h" - -#define Val_ptr(p) ((value) (p)) -#define Val_option(p,f) ((p != NULL) ? ml_some(f(p)) : Val_unit) -#define Val_mDOMString(s) (copy_string((char*) (s))) -#define mDOMString_val(v) ((mDOMStringRef) String_val(v)) - -static value -ml_some(value v) -{ - CAMLparam1(v); - value ret = alloc_small(1,0); - Field(ret,0) = v; - CAMLreturn(ret); -} - -value -ml_string_of_mDOMString(value s) -{ - CAMLparam1(s); - CAMLreturn(s); -} - -value -ml_mDOMString_of_string(value s) -{ - CAMLparam1(s); - CAMLreturn(s); -} - -value -ml_doc_load(value file_name) -{ - mDOMDocRef doc_ref; - - CAMLparam1(file_name); - - doc_ref = mdom_load(String_val(file_name), FALSE, NULL); - if (doc_ref == NULL) failwith("minidom: could not load document"); - - CAMLreturn((value) doc_ref); -} - -value -ml_doc_unload(value doc) -{ - CAMLparam1(doc); - - mdom_unload((mDOMDocRef) doc); - - CAMLreturn(Val_unit); -} - -value -ml_doc_new(value s) -{ - mDOMDocRef doc_ref; - - CAMLparam1(s); - - doc_ref = mdom_doc_new(mDOMString_val(s)); - if (doc_ref == NULL) failwith("minidom: could not create new document"); - - CAMLreturn((value) doc_ref); -} - - -value -ml_doc_get_root_node(value doc) -{ - mDOMNodeRef root; - - CAMLparam1(doc); - root = mdom_doc_get_root_node((mDOMDocRef) doc); - if (root == NULL) failwith("minidom: document has no root node!"); - - CAMLreturn((value) root); -} - -value -ml_doc_add_entity(value doc, value name, value content) -{ - mDOMEntityRef ent; - - CAMLparam3(doc, name, content); - ent = mdom_doc_add_entity((mDOMDocRef) doc, mDOMString_val(name), mDOMString_val(content)); - if (ent == NULL) failwith("minidom: could not add entity"); - - CAMLreturn((value) ent); -} - -value -ml_doc_get_entity(value doc, value name) -{ - mDOMEntityRef ent; - - CAMLparam2(doc, name); - ent = mdom_doc_get_entity((mDOMDocRef) doc, mDOMString_val(name)); - - CAMLreturn(Val_option(ent, Val_ptr)); -} - -value -ml_doc_get_predefined_entity(value name) -{ - mDOMEntityRef ent; - - CAMLparam1(name); - ent = mdom_get_predefined_entity(mDOMString_val(name)); - - CAMLreturn(Val_option(ent, Val_ptr)); -} - -value -ml_entity_get_content(value ent) -{ - CAMLparam1(ent); - CAMLreturn(Val_mDOMString(mdom_entity_get_content((mDOMEntityRef) ent))); -} - -value -ml_node_is_text(value node) -{ - CAMLparam1(node); - CAMLreturn(Val_bool(mdom_node_is_text((mDOMNodeRef) node))); -} - -value -ml_node_is_element(value node) -{ - CAMLparam1(node); - CAMLreturn(Val_bool(mdom_node_is_element((mDOMNodeRef) node))); -} - -value -ml_node_is_blank(value node) -{ - CAMLparam1(node); - CAMLreturn(Val_bool(mdom_node_is_blank((mDOMNodeRef) node))); -} - -value -ml_node_is_entity_ref(value node) -{ - CAMLparam1(node); - CAMLreturn(Val_bool(mdom_node_is_entity_ref((mDOMNodeRef) node))); -} - -value -ml_node_get_type(value node) -{ - CAMLparam1(node); - CAMLreturn(Val_int(mdom_node_get_type((mDOMNodeRef) node))); -} - -value -ml_node_get_name(value node) -{ - CAMLparam1(node); - CAMLreturn(Val_option(mdom_node_get_name((mDOMNodeRef) node), Val_mDOMString)); -} - -value -ml_node_get_content(value node) -{ - CAMLparam1(node); - CAMLreturn(Val_option(mdom_node_get_content((mDOMNodeRef) node), Val_mDOMString)); -} - -value -ml_node_get_ns_uri(value node) -{ - CAMLparam1(node); - CAMLreturn(Val_option(mdom_node_get_ns_uri((mDOMNodeRef) node), Val_mDOMString)); -} - -value -ml_node_get_attribute(value node, value name) -{ - CAMLparam2(node,name); - CAMLreturn(Val_option(mdom_node_get_attribute((mDOMNodeRef) node, String_val(name)), Val_mDOMString)); -} - -value -ml_node_get_attribute_ns(value node, value name, value ns_uri) -{ - CAMLparam2(node,name); - CAMLreturn(Val_option(mdom_node_get_attribute_ns((mDOMNodeRef) node, - String_val(name), - String_val(ns_uri)), Val_mDOMString)); -} - -value -ml_node_get_parent(value node) -{ - CAMLparam1(node); - CAMLreturn(Val_option(mdom_node_get_parent((mDOMNodeRef) node), Val_ptr)); -} - -value -ml_node_get_prev_sibling(value node) -{ - CAMLparam1(node); - CAMLreturn(Val_option(mdom_node_get_prev_sibling((mDOMNodeRef) node), Val_ptr)); -} - -value -ml_node_get_next_sibling(value node) -{ - CAMLparam1(node); - CAMLreturn(Val_option(mdom_node_get_next_sibling((mDOMNodeRef) node), Val_ptr)); -} - -value -ml_node_get_first_child(value node) -{ - CAMLparam1(node); - CAMLreturn(Val_option(mdom_node_get_first_child((mDOMNodeRef) node), Val_ptr)); -} - -value -ml_node_get_first_attribute(value node) -{ - CAMLparam1(node); - CAMLreturn(Val_option(mdom_node_get_first_attribute((mDOMNodeRef) node), Val_ptr)); -} - -value -ml_node_is_first(value node) -{ - CAMLparam1(node); - CAMLreturn(Val_bool(mdom_node_is_first((mDOMNodeRef) node))); -} - -value -ml_node_is_last(value node) -{ - CAMLparam1(node); - CAMLreturn(Val_bool(mdom_node_is_last((mDOMNodeRef) node))); -} - -value -ml_attr_get_name(value attr) -{ - CAMLparam1(attr); - CAMLreturn(Val_option(mdom_attr_get_name((mDOMAttrRef) attr), Val_mDOMString)); -} - -value -ml_attr_get_ns_uri(value attr) -{ - CAMLparam1(attr); - CAMLreturn(Val_option(mdom_attr_get_ns_uri((mDOMAttrRef) attr), Val_mDOMString)); -} - -value -ml_attr_get_value(value attr) -{ - CAMLparam1(attr); - CAMLreturn(Val_option(mdom_attr_get_value((mDOMAttrRef) attr), Val_mDOMString)); -} - -value -ml_attr_get_prev_sibling(value attr) -{ - CAMLparam1(attr); - CAMLreturn(Val_option(mdom_attr_get_prev_sibling((mDOMAttrRef) attr), Val_ptr)); -} - -value -ml_attr_get_next_sibling(value attr) -{ - CAMLparam1(attr); - CAMLreturn(Val_option(mdom_attr_get_next_sibling((mDOMAttrRef) attr), Val_ptr)); -} - -value -ml_attr_get_parent(value attr) -{ - CAMLparam1(attr); - CAMLreturn(Val_option(mdom_attr_get_parent((mDOMAttrRef) attr), Val_ptr)); -} - diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/minidom/ml_minidom.h b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/minidom/ml_minidom.h deleted file mode 100644 index cf1be3a4a..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/minidom/ml_minidom.h +++ /dev/null @@ -1,10 +0,0 @@ -#define Val_ptr(p) ((value) (p)) -#define Val_option(p,f) ((p != NULL) ? ml_some(f(p)) : Val_unit) -#define Val_mDOMString(s) (copy_string((char*) (s))) -#define mDOMString_val(v) ((mDOMStringRef) String_val(v)) -#define mDOMNode_val(v) ((mDOMNodeRef) v) - -#define mDOMNode_option_mDOMNodeRef(p) (((p) != NULL) ? ml_some((value) (p)) : Val_unit) -#define mDOMNodeRef_mDOMNode_option(v) ((v == Val_unit) ? NULL : (mDOMNodeRef)Field((v),0)) -#define Val_mDOMNodeRef(p) (mDOMNode_option_mDOMNodeRef(p)) -#define mDOMNodeRef_val(v) (mDOMNodeRef_mDOMNode_option(v)) diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/minidom/test.ml b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/minidom/test.ml deleted file mode 100644 index 3c7a092e9..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/minidom/test.ml +++ /dev/null @@ -1,84 +0,0 @@ - -let doc = Minidom.doc_load "test.xml" - -let root = Minidom.doc_get_root_node doc - -let check_attribute_ns attr = - Printf.printf "\n\n"; - let ns_uri = Minidom.attr_get_ns_uri attr - and attr_name = Minidom.attr_get_name attr - and attr_value = Minidom.attr_get_value attr - and parent = Minidom.attr_get_parent attr - in - match parent,ns_uri,attr_name,attr_value with - Some parent_node,Some uri,Some attribute_name,Some attribute_value -> - let attr_value = Minidom.node_get_attribute_ns parent_node attribute_name uri - in begin - match attr_value with - Some attr1 -> - Printf.printf "found the attribute with ns %s (was %s)\n" - (Minidom.string_of_mDOMString attr1) (Minidom.string_of_mDOMString attribute_value) - | None -> - Printf.printf "attribute not found (uri was %s)!!!!\n" (Minidom.string_of_mDOMString uri) - end - | _ -> - Printf.printf "parent_node == NULL || uri == NULL || attribute_name == NULL || attribute_value == NULL\n" -;; - -let print_attribute attr = - check_attribute_ns attr; - let ns_uri = Minidom.attr_get_ns_uri attr - in - begin - match ns_uri with - Some uri -> Printf.printf " %s:" (Minidom.string_of_mDOMString uri); - | None -> () - end; - match ((Minidom.attr_get_name attr), (Minidom.attr_get_value attr)) with - (Some attr_name, Some attr_value) -> - Printf.printf " %s=\"%s\"" (Minidom.string_of_mDOMString attr_name) (Minidom.string_of_mDOMString attr_value) - | (Some attr_name, _) -> - Printf.printf " ??? attribute %s has no value !!!" (Minidom.string_of_mDOMString attr_name) - | (_,_) -> - Printf.printf " ??? very strange attribute !!!" -;; - -let rec print_node n node = - if Minidom.node_is_blank node then () - else if Minidom.node_is_element node then begin - match Minidom.node_get_name node with - Some node_name -> - begin - let children = Minidom.node_get_children node - and attributes = Minidom.node_get_attributes node - and ns_uri = Minidom.node_get_ns_uri node - and is_first,is_last = (Minidom.node_is_first node), (Minidom.node_is_last node) - in - for i = 1 to n do print_char ' ' done; - Printf.printf "<"; - begin - match ns_uri with - Some uri -> Printf.printf "%s:" (Minidom.string_of_mDOMString uri) - | None -> () - end; - Printf.printf "%s" (Minidom.string_of_mDOMString node_name); - List.iter print_attribute attributes; - Printf.printf ">\n"; - List.iter (print_node (n + 2)) children; - for i = 1 to n do print_char ' ' done; - Printf.printf "\n" (Minidom.string_of_mDOMString node_name) - end - | None -> Printf.printf "??? this node has no name !!!\n" - end else if Minidom.node_is_text node then begin - match Minidom.node_get_content node with - Some node_content -> - for i = 1 to n do print_char ' ' done; - Printf.printf "%s\n" (Minidom.string_of_mDOMString node_content) - | None -> Printf.printf "??? this node has no content !!!\n" - end else begin - Printf.printf "don't know how to manage a node with type %d\n" (Minidom.node_get_type node) - end -;; - -print_node 0 root;; - diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/minidom/test.xml b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/minidom/test.xml deleted file mode 100644 index 83d2eef68..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/minidom/test.xml +++ /dev/null @@ -1,505 +0,0 @@ - - - - - - - - DEFINITION and_ind() OF TYPE - - - - - - - - __ - - - - - - - - ( - - - - - Π - A - : - - Prop - - - - - - - . - - - - - Π - B - : - - Prop - - - - - - - . - - - - - Π - P - : - - Prop - - - - - - - . - - - - - Π - f - : - - ( - A - - - ( - B - - P - ) - - ) - - - - - - - . - - Π - a - : - - ( - and - - _ - - A - - _ - - B - ) - - . - P - - - - - - - - - - - - - - - - - - - - - - - - - - - - :> - - Prop - - - - - - - - ) - - - - - - - - cast - - prod - - A - - - Prop - - - - - prod - - B - - - Prop - - - - - prod - - P - - - Prop - - - - - prod - - f - - - arrow - A - - arrow - B - P - - - - - - prod - - a - - - app - and - A - B - - - - P - - - - - - - Prop - - - - - - - - - - - AS - - - - - - - - __ - - - - - - - λ - A - : - - Prop - - - - - - - . - - - - - λ - B - : - - Prop - - - - - - - . - - - - - λ - P - : - - Prop - - - - - - - . - - - - - λ - f - : - - ( - A - - - ( - B - - P - ) - - ) - - - - - - - . - - - - - λ - a - : - - ( - and - - _ - - A - - _ - - B - ) - - - - - - - . - - < - P - > - CASES - - _ - - a - - _ - - OF - - ( - conj - - _ - - $1 - - _ - - $2 - ) - - - - ( - f - - _ - - $1 - - _ - - $2 - ) - - - _ - - END - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - A - - - Prop - - - - - - B - - - Prop - - - - - - P - - - Prop - - - - - - f - - - arrow - A - - arrow - B - P - - - - - - - a - - - app - and - A - B - - - - - mutcase - P - a - - app - conj - $1 - $2 - - - app - f - $1 - $2 - - - - - - - - - - - - - - diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/ml_gtk_mathview.c b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/ml_gtk_mathview.c deleted file mode 100644 index 39f3d74c4..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/ml_gtk_mathview.c +++ /dev/null @@ -1,120 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include - -#include "minidom/ml_minidom.h" - -/* : Next row should be put in a .h of lablgtk. */ -#define GtkAdjustment_val(val) check_cast(GTK_ADJUSTMENT,val) - -#define GtkMathView_val(val) check_cast(GTK_MATH_VIEW,val) -ML_3 (gtk_math_view_new,GtkAdjustment_val, GtkAdjustment_val, Bool_val, Val_GtkWidget_sink) -ML_2 (gtk_math_view_load, GtkMathView_val, String_val, Val_bool) -ML_1 (gtk_math_view_unload, GtkMathView_val, Unit) -/*ML_1 (gtk_math_view_dump, GtkMathView_val, Unit)*/ -ML_1 (gtk_math_view_get_selection, GtkMathView_val, Val_mDOMNodeRef) -ML_2 (gtk_math_view_set_selection, GtkMathView_val, mDOMNodeRef_val, Unit) -ML_1 (gtk_math_view_get_width, GtkMathView_val, Val_int) -ML_1 (gtk_math_view_get_height, GtkMathView_val, Val_int) -ML_3 (gtk_math_view_set_top, GtkMathView_val, Int_val, Int_val, Unit) -ML_3 (gtk_math_view_set_adjustments, GtkMathView_val, GtkAdjustment_val, GtkAdjustment_val, Unit) -ML_1 (gtk_math_view_get_hadjustment, GtkMathView_val, Val_GtkWidget) -ML_1 (gtk_math_view_get_vadjustment, GtkMathView_val, Val_GtkWidget) -ML_1 (gtk_math_view_get_buffer, GtkMathView_val, Val_GdkPixmap) -ML_1 (gtk_math_view_get_frame, GtkMathView_val, Val_GtkWidget) -ML_2 (gtk_math_view_set_font_size, GtkMathView_val, Int_val, Unit) -ML_1 (gtk_math_view_get_font_size, GtkMathView_val, Val_int) -ML_2 (gtk_math_view_set_anti_aliasing, GtkMathView_val, Bool_val, Unit) -ML_1 (gtk_math_view_get_anti_aliasing, GtkMathView_val, Val_bool) -ML_2 (gtk_math_view_set_kerning, GtkMathView_val, Bool_val, Unit) -ML_1 (gtk_math_view_get_kerning, GtkMathView_val, Val_bool) -ML_2 (gtk_math_view_set_log_verbosity, GtkMathView_val, Int_val, Unit) -ML_1 (gtk_math_view_get_log_verbosity, GtkMathView_val, Val_int) - - -value ml_gtk_math_view_export_to_postscript (value arg1, value arg2) -{ - CAMLparam1(arg1); - char *filename; - FILE *fd; - int res; - filename = String_val (arg2); - if ((fd = fopen(filename, "w"))) { - gtk_math_view_export_to_postscript (GtkMathView_val (arg1), fd); - fclose (fd); - res = 1; - } else { - fprintf(stderr, "Error opening file %s for writing\n", filename); - res = 0; - } - CAMLreturn (Val_bool(res)); -} - -value ml_gtk_math_view_get_top (value arg1) -{ - CAMLparam1(arg1); - CAMLlocal1 (result); - int x, y; - gtk_math_view_get_top(GtkMathView_val (arg1), &x, &y); - result = alloc(2, 0); - Store_field(result, 0, Val_int(x)); - Store_field(result, 0, Val_int(y)); - CAMLreturn (result); -} - - -value ml_gtk_math_view_mDOMNode_of_bodex_option (value arg1) -{ - CAMLparam1(arg1); - - mDOMNodeRef nr; - CAMLlocal1 (tmp); - CAMLlocal1 (optval); - CAMLlocal1 (res); - - if (arg1==Val_int(0)) { - assert(0); - } else { - tmp = Field(arg1, 0); - nr = (mDOMNodeRef) Field(tmp, 1); - } - optval = Val_mDOMNodeRef(nr); - if (optval==Val_int(0)) { - assert(0); - } else { - res = Field(optval, 0); - } - - CAMLreturn(res); -} - -value ml_gtk_math_view_mDOMNode_option_of_bodex_option (value arg1) -{ - CAMLparam1(arg1); - - mDOMNodeRef nr; - CAMLlocal1 (tmp); - - if (arg1==Val_int(0)) { - nr=NULL; - } else { - tmp = Field(arg1, 0); - nr = (mDOMNodeRef) Field(tmp, 1); - } - - CAMLreturn(Val_mDOMNodeRef(nr)); -} diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/test/.cvsignore b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/test/.cvsignore deleted file mode 100644 index 1968614b7..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/test/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -*.cmo *.cmi *.cmx t1lib.log test test.opt test.ps test.o diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/test/Makefile b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/test/Makefile deleted file mode 100644 index 1d5f5e1f3..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/test/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -LABLGTK_DIR = /usr/lib/ocaml/lablgtk -LABLGTK_MATHVIEW_DIR = .. -MINIDOM_DIR = ../minidom -OCAMLC = ocamlc -I $(LABLGTK_DIR) -I $(LABLGTK_MATHVIEW_DIR) \ - -I $(MINIDOM_DIR) -I mlmathview -OCAMLOPT = ocamlopt -I $(LABLGTK_DIR) -I $(LABLGTK_MATHVIEW_DIR) \ - -I $(MINIDOM_DIR) -I mlmathview - -all: test -opt: test.opt - -test: test.cmo - $(OCAMLC) -custom -o test lablgtk.cma gtkInit.cmo \ - $(LABLGTK_MATHVIEW_DIR)/lablgtkmathview.cma \ - $(MINIDOM_DIR)/minidom.cmo \ - -cclib "$(MINIDOM_DIR)/ml_minidom.o" \ - test.cmo \ - -cclib "-lstr -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk \ - -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm \ - -L/usr/local/lib/gtkmathview -lgtkmathview \ - $(LABLGTK_MATHVIEW_DIR)/ml_gtk_mathview.o" - -test.opt: test.cmx - $(OCAMLOPT) -o test.opt lablgtk.cmxa gtkInit.cmx \ - $(LABLGTK_MATHVIEW_DIR)/lablgtkmathview.cmxa \ - $(MINIDOM_DIR)/minidom.cmx \ - -cclib "$(MINIDOM_DIR)/ml_minidom.o" \ - test.cmx \ - -cclib "-lstr -L/usr/lib -L/usr/X11R6/lib -lgtk -lgdk \ - -rdynamic -lgmodule -lglib -ldl -lXi -lXext -lX11 -lm \ - -L/usr/local/lib/gtkmathview -lgtkmathview \ - $(LABLGTK_MATHVIEW_DIR)/ml_gtk_mathview.o" - -.SUFFIXES: .ml .mli .cmo .cmi .cmx -.ml.cmo: - $(OCAMLC) -c $< -.mli.cmi: - $(OCAMLC) -c $< -.ml.cmx: - $(OCAMLOPT) -c $< - -clean: - rm -f *.cm[iox] *.o test test.opt t1lib.log diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/test/t1.config b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/test/t1.config deleted file mode 100644 index afb669e95..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/test/t1.config +++ /dev/null @@ -1,3 +0,0 @@ -ENCODING=. -AFM=/usr/share/texmf/fonts/afm/ -TYPE1=/usr/share/texmf/fonts/type1/bluesky/cm/:/usr/X11R6/lib/X11/fonts/Type1/:. diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/test/test.ml b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/test/test.ml deleted file mode 100644 index af65d7485..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/test/test.ml +++ /dev/null @@ -1,278 +0,0 @@ -(******************************************************************************) -(* Claudio Sacerdoti Coen *) -(* 25/09/2000 *) -(* *) -(* This is a simple test for the OCaml (LablGtk indeed) binding of the *) -(* MathView widget *) -(******************************************************************************) - -(* Callbacks *) -let jump node = - let module M = Minidom in - print_string ("jump: " ^ - (match - M.node_get_attribute node - (M.mDOMString_of_string "href") - with - None -> "DOES NOT WORKS (if you have clicked on the hyperlink)!!!!!" - | Some s -> M.string_of_mDOMString s - ) ^ "\n"); - flush stdout -;; - -let selection_changed node = - let module M = Minidom in - print_string ("selection_changed: " ^ - (match node with - None -> "selection_changed on nothing" - | Some node -> - match M.node_get_name node with - None -> "selection_changed on a node without name" - | Some s -> "selection changed on " ^ M.string_of_mDOMString s - ) ^ "\n"); - flush stdout -;; - - -let clicked node = - let module M = Minidom in - print_string ("clicked: " ^ - (match M.node_get_name node with - None -> "Nothing clicked (???)" - | Some s -> M.string_of_mDOMString s ^ " clicked" - ) ^ "\n"); - flush stdout -;; - - -let activate_t1 mathview sw () = - sw#remove !mathview#coerce ; - mathview := - (GMathView.math_view ~packing:sw#add ~width:50 ~height:50 - ~use_t1_lib:true ()) ; - ignore(!mathview#connect#jump jump) ; - ignore(!mathview#connect#clicked clicked) ; - ignore(!mathview#connect#selection_changed selection_changed) ; - print_string "WIDGET RECREATED WITH T1 FONTS ACTIVATED\n" ; -;; - -let load mathview () = - !mathview#load "test.xml" ; - print_string "load: SEEMS TO WORK\n" ; - flush stdout -;; - -let get_selection mathview () = - let selection = - match !mathview#get_selection with - None -> "NO SELECTION" - | Some node -> - match Minidom.node_get_name node with - None -> "selection is on nothing" - | Some s -> "selection is on " ^ Minidom.string_of_mDOMString s - in - print_string ("get_selection: " ^ selection ^ "\n") ; - flush stdout -;; - -let set_selection mathview () = - begin - try - match !mathview#get_selection with - None -> raise Not_found - | Some node -> - match Minidom.node_get_parent node with - None -> raise Not_found - | Some node -> - !mathview#set_selection (Some node) ; - print_string "set_selection: SEEMS TO WORK\n" - with - Not_found -> - print_string "set_selection: YOU MUST PREVIOUSLY SELECT A NON-ROOT NODE" - end ; - flush stdout -;; - -let unload mathview () = - !mathview#unload ; - print_string "unload: SEEMS TO WORK\n" ; - flush stdout -;; - -let get_width mathview () = - print_string ("get_width: " ^ string_of_int (!mathview#get_width) ^ "\n") ; - flush stdout -;; - -let get_height mathview () = - print_string ("get_height: " ^ string_of_int (!mathview#get_height) ^ "\n") ; - flush stdout -;; - -let get_top mathview () = - let (x,y) = !mathview#get_top in - print_string ("get_top: ("^ string_of_int x ^ "," ^ string_of_int y ^ ")\n") ; - flush stdout -;; - -let set_top mathview () = - !mathview#set_top 0 0; - print_string "set_top: SEEM TO WORK\n" ; - flush stdout -;; - -let set_adjustments mathview () = - let adj1 = GData.adjustment () in - let adj2 = GData.adjustment () in - !mathview#set_adjustments adj1 adj2 ; - adj1#set_value ((adj1#lower +. adj1#upper) /. 2.0) ; - adj2#set_value ((adj2#lower +. adj2#upper) /. 2.0) ; - print_string "set_adjustments: SEEM TO WORK\n" ; - flush stdout -;; - -let get_hadjustment mathview () = - let adj = !mathview#get_hadjustment in - adj#set_value ((adj#lower +. adj#upper) /. 2.0) ; - print_string "get_hadjustment: SEEM TO WORK\n" ; - flush stdout -;; - -let get_vadjustment mathview () = - let adj = !mathview#get_vadjustment in - adj#set_value ((adj#lower +. adj#upper) /. 2.0) ; - print_string "get_vadjustment: SEEM TO WORK\n" ; - flush stdout -;; - -let get_buffer mathview () = - let buffer = !mathview#get_buffer in - Gdk.Draw.rectangle buffer (Gdk.GC.create buffer) ~x:0 ~y:0 - ~width:50 ~height:50 ~filled:true () ; - print_string "get_buffer: SEEMS TO WORK (hint: force the widget redrawing)\n"; - flush stdout -;; - -let get_frame mathview () = - let frame = !mathview#get_frame in - frame#set_shadow_type `NONE ; - print_string "get_frame: SEEMS TO WORK\n" ; - flush stdout -;; - -let set_font_size mathview () = - !mathview#set_font_size 24 ; - print_string "set_font_size: FONT IS NOW 24\n" ; - flush stdout -;; - -let get_font_size mathview () = - print_string ("get_font_size: " ^ string_of_int (!mathview#get_font_size) ^ "\n") ; - flush stdout -;; - -let set_anti_aliasing mathview () = - !mathview#set_anti_aliasing true ; - print_string "set_anti_aliasing: ON\n" ; - flush stdout -;; - -let get_anti_aliasing mathview () = - print_string ("get_anti_aliasing: " ^ - (match !mathview#get_anti_aliasing with true -> "ON" | false -> "OFF") ^ - "\n") ; - flush stdout -;; - -let set_kerning mathview () = - !mathview#set_kerning true ; - print_string "set_kerning: ON\n" ; - flush stdout -;; - -let get_kerning mathview () = - print_string ("get_kerning: " ^ - (match !mathview#get_kerning with true -> "ON" | false -> "OFF") ^ - "\n") ; - flush stdout -;; - -let set_log_verbosity mathview () = - !mathview#set_log_verbosity 3 ; - print_string "set_log_verbosity: NOW IS 3\n" ; - flush stdout -;; - -let get_log_verbosity mathview () = - print_string ("get_log_verbosity: " ^ - string_of_int !mathview#get_log_verbosity ^ - "\n") ; - flush stdout -;; - -let export_to_postscript mathview () = - !mathview#export_to_postscript "test.ps" ; - print_string "expor_to_postscript: SEEMS TO WORK (hint: look at test.ps)\n"; - flush stdout -;; - -(* Widget creation *) -let main_window = GWindow.window ~title:"GtkMathView test" () in -let vbox = GPack.vbox ~packing:main_window#add () in -let sw = GBin.scrolled_window ~width:50 ~height:50 ~packing:vbox#pack () in -let mathview= ref (GMathView.math_view ~packing:sw#add ~width:50 ~height:50 ()) in -let table = GPack.table ~rows:5 ~columns:5 ~packing:vbox#pack () in -let button_t1=GButton.button ~label:"activate t1 fonts" ~packing:(table#attach ~left:0 ~top:0) () in -let button_load = GButton.button ~label:"load" ~packing:(table#attach ~left:1 ~top:0) () in -let button_unload = GButton.button ~label:"unload" ~packing:(table#attach ~left:2 ~top:0) () in -let button_get_selection = GButton.button ~label:"get_selection" ~packing:(table#attach ~left:3 ~top:0) () in -let button_set_selection = GButton.button ~label:"set_selection" ~packing:(table#attach ~left:4 ~top:0) () in -let button_get_width = GButton.button ~label:"get_width" ~packing:(table#attach ~left:0 ~top:1) () in -let button_get_height = GButton.button ~label:"get_height" ~packing:(table#attach ~left:1 ~top:1) () in -let button_get_top = GButton.button ~label:"get_top" ~packing:(table#attach ~left:2 ~top:1) () in -let button_set_top = GButton.button ~label:"set_top" ~packing:(table#attach ~left:3 ~top:1) () in -let button_set_adjustments = GButton.button ~label:"set_adjustments" ~packing:(table#attach ~left:4 ~top:1) () in -let button_get_hadjustment = GButton.button ~label:"get_hadjustment" ~packing:(table#attach ~left:0 ~top:2) () in -let button_get_vadjustment = GButton.button ~label:"get_vadjustment" ~packing:(table#attach ~left:1 ~top:2) () in -let button_get_buffer = GButton.button ~label:"get_buffer" ~packing:(table#attach ~left:2 ~top:2) () in -let button_get_frame = GButton.button ~label:"get_frame" ~packing:(table#attach ~left:3 ~top:2) () in -let button_set_font_size = GButton.button ~label:"set_font_size" ~packing:(table#attach ~left:4 ~top:2) () in -let button_get_font_size = GButton.button ~label:"get_font_size" ~packing:(table#attach ~left:0 ~top:3) () in -let button_set_anti_aliasing = GButton.button ~label:"set_anti_aliasing" ~packing:(table#attach ~left:1 ~top:3) () in -let button_get_anti_aliasing = GButton.button ~label:"get_anti_aliasing" ~packing:(table#attach ~left:2 ~top:3) () in -let button_set_kerning = GButton.button ~label:"set_kerning" ~packing:(table#attach ~left:3 ~top:3) () in -let button_get_kerning = GButton.button ~label:"get_kerning" ~packing:(table#attach ~left:4 ~top:3) () in -let button_set_log_verbosity = GButton.button ~label:"set_log_verbosity" ~packing:(table#attach ~left:0 ~top:4) () in -let button_get_log_verbosity = GButton.button ~label:"get_log_verbosity" ~packing:(table#attach ~left:1 ~top:4) () in -let button_export_to_postscript = GButton.button ~label:"export_to_postscript" ~packing:(table#attach ~left:2 ~top:4) () in -(* Signals connection *) -ignore(button_t1#connect#clicked (activate_t1 mathview sw)) ; -ignore(button_load#connect#clicked (load mathview)) ; -ignore(button_unload#connect#clicked (unload mathview)) ; -ignore(button_get_selection#connect#clicked (get_selection mathview)) ; -ignore(button_set_selection#connect#clicked (set_selection mathview)) ; -ignore(button_get_width#connect#clicked (get_width mathview)) ; -ignore(button_get_height#connect#clicked (get_height mathview)) ; -ignore(button_get_top#connect#clicked (get_top mathview)) ; -ignore(button_set_top#connect#clicked (set_top mathview)) ; -ignore(button_set_adjustments#connect#clicked (set_adjustments mathview)) ; -ignore(button_get_hadjustment#connect#clicked (get_hadjustment mathview)) ; -ignore(button_get_vadjustment#connect#clicked (get_vadjustment mathview)) ; -ignore(button_get_buffer#connect#clicked (get_buffer mathview)) ; -ignore(button_get_frame#connect#clicked (get_frame mathview)) ; -ignore(button_set_font_size#connect#clicked (set_font_size mathview)) ; -ignore(button_get_font_size#connect#clicked (get_font_size mathview)) ; -ignore(button_set_anti_aliasing#connect#clicked (set_anti_aliasing mathview)) ; -ignore(button_get_anti_aliasing#connect#clicked (get_anti_aliasing mathview)) ; -ignore(button_set_kerning#connect#clicked (set_kerning mathview)) ; -ignore(button_get_kerning#connect#clicked (get_kerning mathview)) ; -ignore(button_set_log_verbosity#connect#clicked (set_log_verbosity mathview)) ; -ignore(button_get_log_verbosity#connect#clicked (get_log_verbosity mathview)) ; -ignore(button_export_to_postscript#connect#clicked (export_to_postscript mathview)) ; -ignore(!mathview#connect#jump jump) ; -ignore(!mathview#connect#clicked clicked) ; -ignore(!mathview#connect#selection_changed selection_changed) ; -(* Main Loop *) -main_window#show () ; -GMain.Main.main () -;; diff --git a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/test/test.xml b/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/test/test.xml deleted file mode 100644 index b0f8c1563..000000000 --- a/helm/DEVEL/lablgtk_gtkmathview/lablgtk-20000829_gtkmathview-0.2.0/test/test.xml +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - a - - x - - + - b - - - - x - 2 - - + - - p - - x - - + - q - - - - d - x - = - - - a2 - - - ln - - - ( - - x2 - + - - p - - x - - + - q - - ) - - - - + - - - - - 2 - - b - - - - - a - - p - - - - - - 4 - - q - - - - - p - 2 - - - - - - - arctg - - - - - 2 - - x - - + - p - - - - - 4 - - q - - - - - p - 2 - - - - - - - + - c - - diff --git a/helm/DEVEL/pxp/.cvsignore b/helm/DEVEL/pxp/.cvsignore deleted file mode 100644 index c1fcbc4ae..000000000 --- a/helm/DEVEL/pxp/.cvsignore +++ /dev/null @@ -1,7 +0,0 @@ -*.cmo -*.cmx -*.cmi - -*.o -*.a - diff --git a/helm/DEVEL/pxp/findlib-0.4.tar.gz b/helm/DEVEL/pxp/findlib-0.4.tar.gz deleted file mode 100644 index a45cce573..000000000 Binary files a/helm/DEVEL/pxp/findlib-0.4.tar.gz and /dev/null differ diff --git a/helm/DEVEL/pxp/netstring-0.9.3.tar.gz b/helm/DEVEL/pxp/netstring-0.9.3.tar.gz deleted file mode 100644 index 8a7431e56..000000000 Binary files a/helm/DEVEL/pxp/netstring-0.9.3.tar.gz and /dev/null differ diff --git a/helm/DEVEL/pxp/netstring/.cvsignore b/helm/DEVEL/pxp/netstring/.cvsignore deleted file mode 100644 index c1fcbc4ae..000000000 --- a/helm/DEVEL/pxp/netstring/.cvsignore +++ /dev/null @@ -1,7 +0,0 @@ -*.cmo -*.cmx -*.cmi - -*.o -*.a - diff --git a/helm/DEVEL/pxp/netstring/LICENSE b/helm/DEVEL/pxp/netstring/LICENSE deleted file mode 100644 index 820032ee2..000000000 --- a/helm/DEVEL/pxp/netstring/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright 1999 by Gerd Stolpmann - -The package "netstring" is copyright by Gerd Stolpmann. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of the "netstring" software (the "Software"), to deal in the -Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -The Software is provided ``as is'', without warranty of any kind, express -or implied, including but not limited to the warranties of -merchantability, fitness for a particular purpose and noninfringement. -In no event shall Gerd Stolpmann be liable for any claim, damages or -other liability, whether in an action of contract, tort or otherwise, -arising from, out of or in connection with the Software or the use or -other dealings in the software. diff --git a/helm/DEVEL/pxp/netstring/META b/helm/DEVEL/pxp/netstring/META deleted file mode 100644 index d422128ab..000000000 --- a/helm/DEVEL/pxp/netstring/META +++ /dev/null @@ -1,54 +0,0 @@ -version = "0.9.3" -requires = "str" -description = "String processing for the Internet" - -archive(byte) = - "netstring.cma netmappings_iso.cmo netmappings_other.cmo" -archive(byte,toploop) = - "netstring.cma netmappings_iso.cmo netmappings_other.cmo - netstring_top.cmo" -archive(byte,mt) = - "netstring.cma netmappings_iso.cmo netmappings_other.cmo - netstring_mt.cmo" -archive(byte,mt,toploop) = - "netstring.cma netmappings_iso.cmo netmappings_other.cmo - netstring_mt.cmo netstring_top.cmo" -archive(native) = - "netstring.cmxa netmappings_iso.cmx netmappings_other.cmx" -archive(native,mt) = - "netstring.cmxa netmappings_iso.cmx netmappings_other.cmx - netstring_mt.cmx" - -archive(byte,netstring_only_iso) = - "netstring.cma netmappings_iso.cmo" -archive(byte,toploop,netstring_only_iso) = - "netstring.cma netmappings_iso.cmo - netstring_top.cmo" -archive(byte,mt,netstring_only_iso) = - "netstring.cma netmappings_iso.cmo - netstring_mt.cmo" -archive(byte,mt,toploop,netstring_only_iso) = - "netstring.cma netmappings_iso.cmo - netstring_mt.cmo netstring_top.cmo" -archive(native,netstring_only_iso) = - "netstring.cmxa netmappings_iso.cmx" -archive(native,mt,netstring_only_iso) = - "netstring.cmxa netmappings_iso.cmx - netstring_mt.cmx" - -archive(byte,netstring_minimum) = - "netstring.cma" -archive(byte,toploop,netstring_minimum) = - "netstring.cma - netstring_top.cmo" -archive(byte,mt,netstring_minimum) = - "netstring.cma - netstring_mt.cmo" -archive(byte,mt,toploop,netstring_minimum) = - "netstring.cma - netstring_mt.cmo netstring_top.cmo" -archive(native,netstring_minimum) = - "netstring.cmxa" -archive(native,mt,netstring_minimum) = - "netstring.cmxa - netstring_mt.cmx" diff --git a/helm/DEVEL/pxp/netstring/Makefile b/helm/DEVEL/pxp/netstring/Makefile deleted file mode 100644 index 98f9ef013..000000000 --- a/helm/DEVEL/pxp/netstring/Makefile +++ /dev/null @@ -1,151 +0,0 @@ -# make all: make bytecode archive -# make opt: make native archive -# make install: install bytecode archive, and if present, native archive -# make uninstall: uninstall package -# make clean: remove intermediate files -# make distclean: remove any superflous files -# make release: cleanup, create archive, tag CVS module -# (for developers) - -#---------------------------------------------------------------------- -# specific rules for this package: - -OBJECTS = netstring_str.cmo \ - netencoding.cmo netbuffer.cmo netstream.cmo \ - mimestring.cmo cgi.cmo base64.cmo \ - nethtml_scanner.cmo nethtml.cmo \ - neturl.cmo \ - netmappings.cmo netconversion.cmo -XOBJECTS = $(OBJECTS:.cmo=.cmx) -ARCHIVE = netstring.cma -XARCHIVE = netstring.cmxa - -NAME = netstring -REQUIRES = str - -ISO_MAPPINGS = mappings/iso*.unimap -OTHER_MAPPINGS = mappings/cp*.unimap \ - mappings/adobe*.unimap \ - mappings/jis*.unimap \ - mappings/koi*.unimap \ - mappings/mac*.unimap \ - mappings/windows*.unimap - -all: $(ARCHIVE) \ - netstring_top.cmo netstring_mt.cmo \ - netmappings_iso.cmo netmappings_other.cmo - -opt: $(XARCHIVE) \ - netstring_mt.cmx \ - netmappings_iso.cmx netmappings_other.cmx - - -$(ARCHIVE): $(OBJECTS) - $(OCAMLC) -a -o $(ARCHIVE) $(OBJECTS) - -$(XARCHIVE): $(XOBJECTS) - $(OCAMLOPT) -a -o $(XARCHIVE) $(XOBJECTS) - -netmappings_iso.ml: - $(MAKE) -C tools - test ! -d mappings || tools/unimap_to_ocaml/unimap_to_ocaml \ - -o netmappings_iso.ml $(ISO_MAPPINGS) - -netmappings_other.ml: - $(MAKE) -C tools - test ! -d mappings || tools/unimap_to_ocaml/unimap_to_ocaml \ - -o netmappings_other.ml $(OTHER_MAPPINGS) - -#---------------------------------------------------------------------- -# general rules: - -OPTIONS = -OCAMLC = ocamlc $(DEBUG) $(OPTIONS) $(ROPTIONS) -OCAMLOPT = ocamlopt $(OPTIONS) $(ROPTIONS) -OCAMLLEX = ocamllex -OCAMLDEP = ocamldep $(OPTIONS) -OCAMLFIND = ocamlfind - -DEBUG = -# Invoke with: make DEBUG=-g - -depend: *.ml *.mli - $(OCAMLDEP) *.ml *.mli >depend - -depend.pkg: Makefile - $(OCAMLFIND) use -p ROPTIONS= $(REQUIRES) >depend.pkg - -.PHONY: install -install: all - { test ! -f $(XARCHIVE) || extra="*.cmxa *.a netstring_mt.cmx netmappings_iso.cmx netmappings_other.cmx netstring_mt.o netmappings_iso.o netmappings_other.o"; }; \ - $(OCAMLFIND) install $(NAME) *.mli *.cmi *.cma netstring_top.cmo netstring_mt.cmo netmappings_iso.cmo netmappings_other.cmo META $$extra - -.PHONY: install-cgi -install-cgi: - $(OCAMLFIND) install cgi compat-cgi/META - - -.PHONY: install-base64 -install-base64: - $(OCAMLFIND) install base64 compat-base64/META - - -.PHONY: uninstall -uninstall: - $(OCAMLFIND) remove $(NAME) - -.PHONY: uninstall-cgi -uninstall-cgi: - $(OCAMLFIND) remove cgi - -.PHONY: uninstall-base64 -uninstall-base64: - $(OCAMLFIND) remove base64 - -.PHONY: clean -clean: - rm -f *.cmi *.cmo *.cma *.cmx *.o *.a *.cmxa - test ! -d mappings || rm -f netmappings_iso.ml netmappings_other.ml - -.PHONY: distclean -distclean: - rm -f *.cmi *.cmo *.cma *.cmx *.o *.a *.cmxa - rm -f *~ depend depend.pkg compat-cgi/*~ compat-base64/*~ - $(MAKE) -C tests distclean - $(MAKE) -C doc distclean - $(MAKE) -C tools distclean - -RELEASE: META - awk '/version/ { print substr($$3,2,length($$3)-2) }' META >RELEASE - -.PHONY: dist -dist: RELEASE - r=`head -1 RELEASE`; cd ..; gtar czf $(NAME)-$$r.tar.gz --exclude='*/CVS*' --exclude="*/depend.pkg" --exclude="*/depend" --exclude="*/doc/common.xml" --exclude="*/doc/config.xml" --exclude="*/doc/readme.dtd" --exclude="*/Mail" --exclude="*/mappings" $(NAME) - -.PHONY: tag-release -tag-release: RELEASE - r=`head -1 RELEASE | sed -e s/\\\./-/g`; cd ..; cvs tag -F $(NAME)-$$r $(NAME) - -.PHONY: release -release: distclean - test -f netmappings_iso.ml - test -f netmappings_other.ml - $(MAKE) tag-release - $(MAKE) dist - -.SUFFIXES: .cmo .cmi .cmx .ml .mli .mll - -.ml.cmx: - $(OCAMLOPT) -c -thread $< - -.ml.cmo: - $(OCAMLC) -c -thread $< - -.mli.cmi: - $(OCAMLC) -c $< - -.mll.ml: - $(OCAMLLEX) $< - -include depend -include depend.pkg diff --git a/helm/DEVEL/pxp/netstring/RELEASE b/helm/DEVEL/pxp/netstring/RELEASE deleted file mode 100644 index 965065db5..000000000 --- a/helm/DEVEL/pxp/netstring/RELEASE +++ /dev/null @@ -1 +0,0 @@ -0.9.3 diff --git a/helm/DEVEL/pxp/netstring/base64.ml b/helm/DEVEL/pxp/netstring/base64.ml deleted file mode 100644 index 285626f77..000000000 --- a/helm/DEVEL/pxp/netstring/base64.ml +++ /dev/null @@ -1,24 +0,0 @@ -(* $Id$ - * ---------------------------------------------------------------------- - * - *) - -let encode s = Netencoding.Base64.encode s;; -let url_encode s = Netencoding.Base64.url_encode s;; -let decode s = Netencoding.Base64.decode s;; - -(* ====================================================================== - * History: - * - * $Log$ - * Revision 1.1 2000/11/17 09:57:27 lpadovan - * Initial revision - * - * Revision 1.2 2000/06/25 22:34:43 gerd - * Added labels to arguments. - * - * Revision 1.1 2000/03/02 01:15:20 gerd - * Initial revision. - * - * - *) diff --git a/helm/DEVEL/pxp/netstring/base64.mli b/helm/DEVEL/pxp/netstring/base64.mli deleted file mode 100644 index 5dd60ea75..000000000 --- a/helm/DEVEL/pxp/netstring/base64.mli +++ /dev/null @@ -1,36 +0,0 @@ -(* $Id$ - * ---------------------------------------------------------------------- - * - *) - -(**********************************************************************) -(* Base64 compatibility module *) -(**********************************************************************) - -(* PLEASE DO NOT USE THIS MODULE IN NEW SOFTWARE! - * The module Netencoding.Base64 is the preferred API. This module is - * only for compatibility with older software. - *) - -(* This interface is compatible with all previously released Base64 - * modules (0.1 and 0.2). - *) - -val encode : string -> string - -val url_encode : string -> string - -val decode : string -> string - -(* ====================================================================== - * History: - * - * $Log$ - * Revision 1.1 2000/11/17 09:57:27 lpadovan - * Initial revision - * - * Revision 1.1 2000/03/02 01:15:20 gerd - * Initial revision. - * - * - *) diff --git a/helm/DEVEL/pxp/netstring/cgi.ml b/helm/DEVEL/pxp/netstring/cgi.ml deleted file mode 100644 index 48412be29..000000000 --- a/helm/DEVEL/pxp/netstring/cgi.ml +++ /dev/null @@ -1,645 +0,0 @@ -(* $Id$ - * ---------------------------------------------------------------------- - * - *) - -exception Resources_exceeded - -type argument_processing = Memory | File | Automatic;; - -type argument = - { mutable arg_name : string; - mutable arg_processing : argument_processing; - mutable arg_buf_value : Buffer.t; - mutable arg_mem_value : string option; - (* Here, the value is stored if it must be kept in memory *) - mutable arg_disk_value : string Weak.t; - (* This component is used iff arg_mem_value = None. The - * weak array has a length of 1, and the single element stores - * the value (if any). - *) - mutable arg_file : string option; - (* The filename of the temporary file storing the value *) - mutable arg_fd : out_channel option; - (* The file descriptor of the temp file (if open) *) - mutable arg_mimetype : string; - mutable arg_filename : string option; - mutable arg_header : (string * string) list; - (* For the last three components, see the description of the - * corresponding functions in the mli file. - *) - } -;; - -type workaround = - Work_around_MSIE_Content_type_bug - | Work_around_backslash_bug -;; - -type config = - { maximum_content_length : int; - how_to_process_arguments : argument -> argument_processing; - tmp_directory : string; - tmp_prefix : string; - workarounds : workaround list; - } -;; - - -let print_argument arg = - Format.printf - "" - arg.arg_name - (match arg.arg_filename with None -> "*" | Some n -> n) - arg.arg_mimetype - (match arg.arg_file with None -> "Memory" | Some n -> n) -;; - - -let encode = Netencoding.Url.encode ;; -let decode = Netencoding.Url.decode ;; - - - -let url_split_re = - Str.regexp "[&=]";; - - -let mk_url_encoded_parameters nv_pairs = - String.concat "&" - (List.map - (fun (name,value) -> - let name_encoded = Netencoding.Url.encode name in - let value_encoded = Netencoding.Url.encode value in - name_encoded ^ "=" ^ value_encoded - ) - nv_pairs - ) -;; - - -let dest_url_encoded_parameters parstr = - - let rec parse_after_amp tl = - match tl with - Str.Text name :: Str.Delim "=" :: Str.Text value :: tl' -> - (Netencoding.Url.decode name, - Netencoding.Url.decode value) :: parse_next tl' - | Str.Text name :: Str.Delim "=" :: Str.Delim "&" :: tl' -> - (Netencoding.Url.decode name, "") :: parse_after_amp tl' - | Str.Text name :: Str.Delim "=" :: [] -> - [Netencoding.Url.decode name, ""] - | _ -> - failwith "Cgi.dest_url_encoded_parameters" - and parse_next tl = - match tl with - [] -> [] - | Str.Delim "&" :: tl' -> - parse_after_amp tl' - | _ -> - failwith "Cgi.dest_url_encoded_parameters" - in - let toklist = Str.full_split url_split_re parstr in - match toklist with - [] -> [] - | _ -> parse_after_amp toklist -;; - - -let mk_form_encoded_parameters ntv_triples = - failwith "Cgi.mk_form_encoded_parameters: not implemented";; - - -let dest_parameter_header header options = - let get_name s = - (* s is: form-data; ... name="fieldname" ... - * Extract "fieldname" - *) - try - let tok, params = Mimestring.scan_value_with_parameters s options in - List.assoc "name" params - with - Not_found -> - failwith "Cgi.dest_form_encoded_parameters" - | Failure "Mimestring.scan_value_with_parameters" -> - failwith "Cgi.dest_form_encoded_parameters" - in - - let get_filename s = - (* s is: form-data; ... filename="fieldname" ... - * Extract "fieldname" - *) - try - let tok, params = Mimestring.scan_value_with_parameters s options in - Some(List.assoc "filename" params) - with - Not_found -> - None - | Failure "Mimestring.scan_value_with_parameters" -> - failwith "Cgi.dest_form_encoded_parameters" - in - - let mime_type = - try List.assoc "content-type" header - with Not_found -> "text/plain" in (* the default *) - - let content_disposition = - try List.assoc "content-disposition" header - with - Not_found -> - failwith "Cgi.dest_form_encoded_parameters: no content-disposition" - in - - let name = get_name content_disposition in - let filename = get_filename content_disposition in - - name, mime_type, filename -;; - - -let dest_form_encoded_parameters parstr ~boundary config = - let options = - if List.mem Work_around_backslash_bug config.workarounds then - [ Mimestring.No_backslash_escaping ] - else - [] - in - let parts = - Mimestring.scan_multipart_body_and_decode - parstr 0 (String.length parstr) boundary in - List.map - (fun (params, value) -> - - let name, mime_type, filename = dest_parameter_header params options in - { arg_name = name; - arg_processing = Memory; - arg_buf_value = Buffer.create 1; - arg_mem_value = Some value; - arg_disk_value = Weak.create 1; - arg_file = None; - arg_fd = None; - arg_mimetype = mime_type; - arg_filename = filename; - arg_header = params; - } - - ) - parts -;; - - -let make_temporary_file config = - (* Returns (filename, out_channel). *) - let rec try_creation n = - try - let fn = - Filename.concat - config.tmp_directory - (config.tmp_prefix ^ "-" ^ (string_of_int n)) - in - let fd = - open_out_gen - [ Open_wronly; Open_creat; Open_excl; Open_binary ] - 0o666 - fn - in - fn, fd - with - Sys_error m -> - (* This does not look very intelligent, but it is the only chance - * to limit the number of trials. - *) - if n > 1000 then - failwith ("Cgi: Cannot create temporary file: " ^ m); - try_creation (n+1) - in - try_creation 0 -;; - - -let dest_form_encoded_parameters_from_netstream s ~boundary config = - let parts = ref [] in - let options = - if List.mem Work_around_backslash_bug config.workarounds then - [ Mimestring.No_backslash_escaping ] - else - [] - in - - let create header = - (* CALLBACK for scan_multipart_body_from_netstream *) - let name, mime_type, filename = dest_parameter_header header options in - let p0 = - { arg_name = name; - arg_processing = Memory; - arg_buf_value = Buffer.create 80; - arg_mem_value = None; - arg_disk_value = Weak.create 1; - arg_file = None; - arg_fd = None; - arg_mimetype = mime_type; - arg_filename = filename; - arg_header = header; - } - in - let pr = config.how_to_process_arguments p0 in - let p = { p0 with arg_processing = pr } in - if pr = File then begin - let fn, fd = make_temporary_file config in - p.arg_file <- Some fn; - p.arg_fd <- Some fd; - p.arg_mem_value <- None; - end; - p - in - - let add p s k n = - (* CALLBACK for scan_multipart_body_from_netstream *) - if (p.arg_processing = Automatic) && - (Buffer.length (p.arg_buf_value) >= Netstream.block_size s) then begin - (* This is a LARGE argument *) - p.arg_processing <- File; - let fn, fd = make_temporary_file config in - p.arg_file <- Some fn; - p.arg_fd <- Some fd; - p.arg_mem_value <- None; - output_string fd (Buffer.contents p.arg_buf_value); - p.arg_buf_value <- Buffer.create 1; - end; - - match p.arg_processing with - (Memory|Automatic) -> - Buffer.add_substring - p.arg_buf_value - (Netbuffer.unsafe_buffer (Netstream.window s)) - k - n - | File -> - let fd = match p.arg_fd with Some fd -> fd | None -> assert false in - output - fd - (Netbuffer.unsafe_buffer (Netstream.window s)) - k - n; - in - - let stop p = - (* CALLBACK for scan_multipart_body_from_netstream *) - begin match p.arg_processing with - (Memory|Automatic) -> - p.arg_mem_value <- Some (Buffer.contents p.arg_buf_value); - p.arg_buf_value <- Buffer.create 1; - | File -> - let fd = match p.arg_fd with Some fd -> fd | None -> assert false in - close_out fd; - p.arg_mem_value <- None - end; - parts := p :: !parts - in - - Mimestring.scan_multipart_body_from_netstream - s - boundary - create - add - stop; - - List.rev !parts -;; - - -let getenv name = - try Sys.getenv name with Not_found -> "";; - -(* getenv: - * We use this getenv instead of Sys.getenv. The CGI specification does not - * say anything about what should happen if a certain environment variable - * is not set. - * Some servers initialize the environment variable to the empty string if - * it is not applicable, some servers do not set the variable at all. Because - * of this, unset variables are always reported as empty variables. - * - * This is especially a problem with QUERY_STRING. - *) - -let mk_simple_arg ~name v = - { arg_name = name; - arg_processing = Memory; - arg_buf_value = Buffer.create 1; - arg_mem_value = Some v; - arg_disk_value = Weak.create 0; - arg_file = None; - arg_fd = None; - arg_mimetype = "text/plain"; - arg_filename = None; - arg_header = []; - } -;; - -let mk_memory_arg ~name ?(mime = "text/plain") ?filename ?(header = []) v = - { arg_name = name; - arg_processing = Memory; - arg_buf_value = Buffer.create 1; - arg_mem_value = Some v; - arg_disk_value = Weak.create 0; - arg_file = None; - arg_fd = None; - arg_mimetype = mime; - arg_filename = filename; - arg_header = header; - } -;; - -let mk_file_arg - ~name ?(mime = "text/plain") ?filename ?(header = []) v_filename = - let v_abs_filename = - if Filename.is_relative v_filename then - Filename.concat (Sys.getcwd()) v_filename - else - v_filename - in - { arg_name = name; - arg_processing = File; - arg_buf_value = Buffer.create 1; - arg_mem_value = None; - arg_disk_value = Weak.create 0; - arg_file = Some v_abs_filename; - arg_fd = None; - arg_mimetype = mime; - arg_filename = filename; - arg_header = header; - } -;; - - -let get_content_type config = - (* Get the environment variable CONTENT_TYPE; if necessary apply - * workarounds for browser bugs. - *) - let content_type = getenv "CONTENT_TYPE" in - let user_agent = getenv "HTTP_USER_AGENT" in - let eff_content_type = - if Str.string_match (Str.regexp ".*MSIE") user_agent 0 && - List.mem Work_around_MSIE_Content_type_bug config.workarounds - then begin - (* Microsoft Internet Explorer: When used with SSL connections, - * this browser sometimes produces CONTENT_TYPEs like - * "multipart/form-data; boundary=..., multipart/form-data; boundary=..." - * Workaround: Throw away everything after ", ". - *) - if Str.string_match (Str.regexp "\\([^,]*boundary[^,]*\\), .*boundary") - content_type 0 - then - Str.matched_group 1 content_type - else - content_type - end - else - content_type - in - eff_content_type -;; - - -let really_parse_args config = - let make_simple_arg (n,v) = mk_simple_arg n v in - - match getenv "REQUEST_METHOD" with - ("GET"|"HEAD") -> - List.map - make_simple_arg - (dest_url_encoded_parameters(getenv "QUERY_STRING")) - - | "POST" -> - let n = - try - int_of_string (getenv "CONTENT_LENGTH") - with - _ -> failwith "Cgi.parse_arguments" - in - if n > config.maximum_content_length then - raise Resources_exceeded; - begin - let mime_type, params = - Mimestring.scan_mime_type(get_content_type config) [] in - match mime_type with - "application/x-www-form-urlencoded" -> - let buf = String.create n in - really_input stdin buf 0 n; - List.map - make_simple_arg - (dest_url_encoded_parameters buf) - | "multipart/form-data" -> - let boundary = - try - List.assoc "boundary" params - with - Not_found -> - failwith "Cgi.parse_arguments" - in - (* -------------------------------------------------- DEBUG - let f = open_out "/tmp/cgiout" in - output_string f buf; - close_out f; - * -------------------------------------------------- - *) - dest_form_encoded_parameters_from_netstream - (Netstream.create_from_channel stdin (Some n) 4096) - boundary - config - | _ -> - failwith ("Cgi.parse_arguments: unknown content-type " ^ mime_type) - end - | _ -> - failwith "Cgi.parse_arguments: unknown method" - -let parsed = ref None;; (* protected by lock/unlock *) - -let lock = ref (fun () -> ());; -let unlock = ref (fun () -> ());; - -let init_mt new_lock new_unlock = - lock := new_lock; - unlock := new_unlock -;; - -let protect f = - !lock(); - try - let r = f() in - !unlock(); - r - with - x -> - !unlock(); - raise x -;; - -let parse_arguments config = - protect - (fun () -> - match !parsed with - Some _ -> () - | None -> - parsed := Some (List.map - (fun arg -> arg.arg_name, arg) - (really_parse_args config)) - ) -;; - -let arguments () = - protect - (fun () -> - match !parsed with - Some plist -> plist - | None -> - failwith "Cgi.arguments" - ) -;; - -let set_arguments arglist = - protect - (fun () -> - parsed := Some (List.map - (fun arg -> arg.arg_name, arg) - arglist) - ) -;; - -let default_config = - { maximum_content_length = max_int; - how_to_process_arguments = (fun _ -> Memory); - tmp_directory = "/var/tmp"; - tmp_prefix = "cgi-"; - workarounds = [ Work_around_MSIE_Content_type_bug; - Work_around_backslash_bug; - ] - } -;; - -let arg_value arg = - match arg.arg_mem_value with - None -> - begin - match Weak.get arg.arg_disk_value 0 with - None -> - begin - match arg.arg_file with - None -> - failwith "Cgi.arg_value: no value present" - | Some filename -> - let fd = open_in_bin filename in - try - let len = in_channel_length fd in - let s = String.create len in - really_input fd s 0 len; - Weak.set arg.arg_disk_value 0 (Some s); - close_in fd; - s - with - any -> close_in fd; raise any - end - | Some v -> v - end - | Some s -> - s -;; - -let arg_name arg = arg.arg_name;; -let arg_file arg = arg.arg_file;; -let arg_mimetype arg = arg.arg_mimetype;; -let arg_filename arg = arg.arg_filename;; -let arg_header arg = arg.arg_header;; - -let cleanup () = - protect - (fun () -> - match !parsed with - None -> () - | Some plist -> - List.iter - (fun (name, arg) -> - match arg.arg_file with - None -> () - | Some filename -> - (* We do not complain if the file does not exist anymore. *) - if Sys.file_exists filename then - Sys.remove filename; - arg.arg_file <- None - ) - plist - ) -;; - -let argument name = List.assoc name (arguments());; -let argument_value name = arg_value (argument name);; - -module Operators = struct - let ( !% ) = argument - let ( !$ ) = argument_value -end;; - - -let parse_args() = - parse_arguments default_config; - List.map - (fun (name, arg) -> name, arg_value arg) - (arguments()) -;; - -let parse_args_with_mimetypes() = - parse_arguments default_config; - List.map - (fun (name, arg) -> name, arg_mimetype arg, arg_value arg) - (arguments()) -;; - -let header s = - let t = - match s with - "" -> "text/html" - | _ -> s - in - print_string ("Content-type: " ^ t ^ "\n\n"); - flush stdout -;; - - -let this_url() = - "http://" ^ (getenv "SERVER_NAME") ^ (getenv "SCRIPT_NAME") -;; - - -(* ====================================================================== - * History: - * - * $Log$ - * Revision 1.1 2000/11/17 09:57:27 lpadovan - * Initial revision - * - * Revision 1.8 2000/06/25 22:34:43 gerd - * Added labels to arguments. - * - * Revision 1.7 2000/06/25 21:40:36 gerd - * Added printer. - * - * Revision 1.6 2000/06/25 21:15:48 gerd - * Checked thread-safety. - * - * Revision 1.5 2000/05/16 22:29:36 gerd - * Added support for two common file upload bugs. - * - * Revision 1.4 2000/04/15 16:47:27 gerd - * Last minor changes before releasing 0.6. - * - * Revision 1.3 2000/04/15 13:09:01 gerd - * Implemented uploads to temporary files. - * - * Revision 1.2 2000/03/02 01:15:30 gerd - * Updated. - * - * Revision 1.1 2000/02/25 15:21:12 gerd - * Initial revision. - * - * - *) diff --git a/helm/DEVEL/pxp/netstring/cgi.mli b/helm/DEVEL/pxp/netstring/cgi.mli deleted file mode 100644 index 8aea499d8..000000000 --- a/helm/DEVEL/pxp/netstring/cgi.mli +++ /dev/null @@ -1,419 +0,0 @@ -(* $Id$ - * ---------------------------------------------------------------------- - * - *) - -(* FOR SIMPLE CGI PROGRAMS: - * - * If you do not need all the features of the API below, the following may - * be enough: - * - * - At the beginning of the main program, call 'parse_argument' with - * either 'default_config' as argument or with a customized configuration. - * - Use 'argument_value(name)' to get the string value of the CGI parameter - * 'name'. If you like, you can also open the Cgi.Operators module and - * write '!$ name' instead. Here, !$ is a prefix operator equivalent to - * argument_value. - * - * If you do not change the default configuration, you do not need to - * worry about temporary files - there are not any. - * - * Most of the other functions defined below deal with file uploads, and - * are only useful for that. - *) - - -(**********************************************************************) -(* CGI functions *) -(**********************************************************************) - -(* First, the general interface to the CGI argument parser. *) - -exception Resources_exceeded - -type argument - -type argument_processing = - Memory (* Keep the value of the argument in memory *) - | File (* Store the value of the argument into a temporary file *) - | Automatic (* Store only large arguments into files. An argument - * value is large if it is longer than about one block (4K). - * This is not an exact definition. - *) - -type workaround = - Work_around_MSIE_Content_type_bug - (* There is a bug in MSIE I observed together with SSL connections. - * The CONTENT_TYPE passed to the server has sometimes the wrong - * format. This option enables a workaround if the user agent string - * contains the word "MSIE". - *) - | Work_around_backslash_bug - (* There is a bug in many browsers: The backslash character is not - * handled as an escaping character in MIME headers. Because DOS- - * based systems use the backslash regularly in filenames, this bug - * matters. - * This option changes the interpretation of backslashes such that - * these are handled as normal characters. I do not know any browser - * that is not affected by this bug, so there is no check on - * the user agent string. - *) - - -type config = - { maximum_content_length : int; - (* The maximum CONTENT_LENGTH. Bigger requests trigger an - * Resources_exceeded exception. This feature can be used - * to detect primitive denial-of-service attacks. - *) - how_to_process_arguments : argument -> argument_processing; - (* After the beginning of an argument has been decoded, the - * type of processing is decided by invoking this function on - * the argument. Note that the passed argument is incomplete - - * it does not have a value. You can assume that name, filename, - * MIME type and the whole header are already known. - * - THIS CONFIGURATION PARAMETER ONLY AFFECTS ARGUMENTS - * "POST"ED FROM THE CLIENT IN FORM-ENCODED REPRESENTATION. - * All other transport methods can only handle the Memory - * processing type. - *) - tmp_directory : string; - (* The temporary directory to use for the temporary files. *) - tmp_prefix : string; - (* A prefix for temporary files. It is recommended that the prefix - * contains a part that is random or that depends on rapidly changing - * environment properties. For example, the process ID is a good - * candidate, or the current system time. It is not required that - * the prefix is unique; there is a fail-safe algorithm that - * computes a unique file name from the prefix, even if several - * CGI programs run concurrently. - *) - workarounds : workaround list; - (* Specifies which workarounds should be enabled. *) - } - -val parse_arguments : config -> unit -val arguments : unit -> (string * argument) list - (* - let () = parse_arguments config: - * Decodes the CGI arguments. 'config' specifies limits and processing - * hints; you can simply pass default_config (see below). - * - * - let arglist = get_arguments(): - * The function returns a list with (name, arg) pairs. The name is - * passed back as string while the value is returned as opaque type - * 'argument'. Below accessor functions are defined. These functions - * require that parse_arguments was invoked before. - * - * Note 1: You can invoke 'parse_arguments' several times, but only - * the first time the arguments are read in. If you call the function - * again, it does nothing (even if the config changes). This is also - * true if 'parse_arguments' has been invoked after 'set_arguments'. - * - * Note 2: It is not guaranteed that stdin has been read until EOF. - * Only CONTENT_LENGTH bytes are read from stdin (following the CGI spec). - * - * Note 3: If arguments are processed in File or Automatic mode, the - * caller of 'parse_arguments' is responsible for deleting the files - * after use. You may consider to apply the at_exit function of the - * core library for this purpose. See also 'cleanup' below. - *) - -val set_arguments : argument list -> unit - (* Alternatively, you can set the arguments to use. This overrides any - * previously parsed set of arguments, and also any following parsing. - * - Intended for debugging, and to make it possible to replace the - * CGI parser by a different one while retaining this API. - *) - -val default_config : config - (* maximum_content_length = maxint - * how_to_process_arguments = "use always Memory" - * tmp_directory = "/var/tmp" - * tmp_prefix = "cgi" - * workarounds = [ Work_around_MSIE_content_type_bug; - * Work_around_backslash_bug; - * ] - * - * Note 1: On some Unixes, a special file system is used for /tmp that - * stores the files into the virtual memory (main memory or swap area). - * Because of this, /var/tmp is preferred as default. - * - * Note 2: Filename.temp_file is not used because it depends on - * environment variables which are usually not set in a CGI environment. - *) - -val arg_name : argument -> string -val arg_value : argument -> string -val arg_file : argument -> string option -val arg_mimetype : argument -> string -val arg_filename : argument -> string option -val arg_header : argument -> (string * string) list - (* The accessor functions that return several aspects of arguments. - * arg_name: returns the name of the argument - * arg_value: returns the value of the argument. If the value is stored - * in a temporary file, the contents of this file are returned, i.e. - * the file is loaded. This may have some consequences: - * (1) The function may fail because of I/O errors. - * (2) The function may be very slow, especially if the file is - * non-local. - * (3) If the value is bigger than Sys.max_string_length, the function - * raises the exception Resources_exceeded. On 32 bit architectures, - * strings are limited to 16 MB. - * Note that loaded values are put into weak arrays. This makes it - * possible that subsequent calls of 'arg_value' on the same argument - * can avoid loading the value again, and that unused values will - * nevertheless be collected by the GC. - * arg_file: returns 'Some filename' if the value resides in a temporary - * file, and 'filename' is the absolute path of this file. If the - * value is only available in memory, None is returned. - * arg_mimetype: returns the MIME type of the argument. Note that the - * default MIME type is "text/plain", and that the default is returned - * if the MIME type is not available. - * arg_filename: returns 'Some filename' if the argument is associated - * with a certain filename (e.g. from a file upload); otherwise None - * arg_header: returns pairs (name,value) containing the complete header - * of the argument. If the transmission protocol does not specify - * a header, the empty list is passed back. - *) - -val mk_simple_arg : name:string -> string -> argument - (* mk_simple_arg name value: - * Creates a simple argument with only name, and a value passed by string. - * The MIME type is "text/plain". - *) - -val mk_memory_arg - : name:string -> ?mime:string -> ?filename:string -> - ?header:((string * string) list) -> string -> argument - (* mk_memory_arg name mimetype filename header value: - * Creates an argument whose value is kept in memory. - * - * Note: The signature of this function changed in release 0.8. - *) - -val mk_file_arg - : name:string -> ?mime:string -> ?filename:string -> - ?header:((string * string) list) -> string -> argument - (* mk_file_arg name mimetype filename header value_filename: - * Creates an argument whose value is stored in the file - * 'value_filename'. If this file name is not absolute, it is interpreted - * relative to the directory returned by Sys.getcwd() - this might not - * be what you want with respect to mount points and symlinks (and it - * depends on the operating system as getcwd is only POSIX.1). The - * file name is turned into an absolute name immediately, and the - * function arg_file returns the rewritten name. - * - * Note: The signature of this function changed in release 0.8. - *) - - -val cleanup : unit -> unit - (* Removes all temporary files that occur in the current set of arguments - * (as returned by 'arguments()'). - *) - - -(* Convenience functions: *) - -val argument : string -> argument - (* let argument name = List.assoc name (arguments()) -- i.e. returns - * the argument with the passed name. Of course, this function expects - * that 'parse_arguments' was called before. - *) - -val argument_value : string -> string - (* let argument_value name = arg_value(argument name) -- i.e. returns - * the value of the argument. - * See also Operators.( !$ ) below. - *) - -(* For toploop printers: *) - -val print_argument : argument -> unit - - -(* Now, the compatibility functions. *) - -val parse_args : unit -> (string * string) list - (* Decodes the arguments of the CGI and returns them as an association list - * Works whatever the method is (GET or POST) - *) - -val parse_args_with_mimetypes : unit -> (string * string * string) list - (* Like parse_args, but returns also the MIME type. - * The triples contain (name, mime_type, value). - * If an encoding was chosen that does not transfer the MIME type, - * "text/plain" is returned. - * - * THIS FUNCTION SHOULD BE CONSIDERED AS DEPRECATED. - * It was included in netstring-0.4, but most people want not only - * the MIME type. parse_arguments should be used instead. - *) - -val header : string -> unit - (* Prints the content-type header. - * the argument is the MIME type (default value is "text/html" if the - * argument is the empty string) - *) - -val this_url : unit -> string - (* Returns the address of the CGI *) - -(**********************************************************************) -(* The Operators module *) -(**********************************************************************) - -(* If you open the Operators module, you can write - * !% "name" instead of argument "name", and - * !$ "name" instead of argument_value "name" - *) - -module Operators : sig - val ( !% ) : string -> argument - (* same as 'argument' above *) - val ( !$ ) : string -> string - (* same as 'argument_value' above *) -end - -(**********************************************************************) -(* Low-level functions *) -(**********************************************************************) - -(* Encoding/Decoding within URLs: - * - * The following two functions perform the '%'-substitution for - * characters that may otherwise be interpreted as metacharacters. - * - * See also the Netencoding module. This interface contains these functions - * to keep the compatibility with the old Cgi module. - *) - -val decode : string -> string -val encode : string -> string - -(* URL-encoded parameters: - * - * The following two functions create and analyze URL-encoded parameters. - * Format: name1=val1&name2=val2&... - *) - -val mk_url_encoded_parameters : (string * string) list -> string - (* The argument is a list of (name,value) pairs. The result is the - * single URL-encoded parameter string. - *) - -val dest_url_encoded_parameters : string -> (string * string) list - (* The argument is the URL-encoded parameter string. The result is - * the corresponding list of (name,value) pairs. - * Note: Whitespace within the parameter string is ignored. - * If there is a format error, the function fails. - *) - -(* Form-encoded parameters: - * - * According to: RFCs 2388, 2183, 2045, 2046 - * - * General note: This is a simple API to encode/decode form-encoded parameters. - * Especially, it is not possible to pass the header of the parts through - * this API. - *) - -val mk_form_encoded_parameters : (string * string * string) list -> - (string * string) - (* The argument is a list of (name,mimetype,value) triples. - * The result is (parstr, boundary), where 'parstr' is the - * single form-encoded parameter string, and 'boundary' is the - * boundary to separate the message parts. - * - * THIS FUNCTION IS CURRENTLY NOT IMPLEMENTED! - *) - -val dest_form_encoded_parameters : string -> boundary:string -> config -> - argument list - (* The first argument is the form-encoded parameter string. - * The second argument is the boundary (extracted from the mime type). - * Third argument: Only the workarounds component is used. - * The result is - * the corresponding list of arguments (all in memory). - * If there is a format error, the function fails. - * Note: embedded multipart/mixed types are returned as they are, - * and are not recursively decoded. - * Note: The content-transfer-encodings "7bit", "8bit", "binary", - * "base64", and "quoted-printable" are supported. - * Note: Parameter names which include spaces or non-alphanumeric - * characters may be problematic (the rules of RFC 2047 are NOT applied). - * Note: The returned MIME type is not normalized. - *) - -val dest_form_encoded_parameters_from_netstream - : Netstream.t -> boundary:string -> config -> argument list - (* let arglist = dest_form_encoded_parameters_from_netstream s b c: - * Reads the form-encoded parameters from netstream s. The boundary - * is passed in b, and the configuration in c. - * A list of arguments is returned. - * - * See also dest_form_encoded_parameters. - * - * Restriction: In contrast to dest_form_encoded_parameters, this - * function is not able to handle the content-transfer-encodings - * "base64" and "quoted-printable". (This is not really a restriction - * because no browser uses these encodings in conjunction with HTTP. - * This is different if mail transport is chosen. - The reason for - * this restriction is that there are currently no stream functions - * for decoding.) - *) - -(* Private functions: *) - -val init_mt : (unit -> unit) -> (unit -> unit) -> unit - - -(**********************************************************************) -(* Compatibility with CGI library by J.-C. Filliatre *) -(**********************************************************************) - -(* The following functions are compatible with J.-C. Filliatre's CGI - * library: - * - * parse_args, header, this_url, decode, encode. - * - * Note that the new implementation of parse_args can be safely invoked - * several times. - * - * Since release 0.8, Netstring's CGI implementation is again thread-safe. - *) - - -(* ====================================================================== - * History: - * - * $Log$ - * Revision 1.1 2000/11/17 09:57:27 lpadovan - * Initial revision - * - * Revision 1.8 2000/06/25 22:34:43 gerd - * Added labels to arguments. - * - * Revision 1.7 2000/06/25 21:40:36 gerd - * Added printer. - * - * Revision 1.6 2000/06/25 21:15:48 gerd - * Checked thread-safety. - * - * Revision 1.5 2000/05/16 22:28:13 gerd - * New "workarounds" config component. - * - * Revision 1.4 2000/04/15 16:47:27 gerd - * Last minor changes before releasing 0.6. - * - * Revision 1.3 2000/04/15 13:09:01 gerd - * Implemented uploads to temporary files. - * - * Revision 1.2 2000/03/02 01:15:30 gerd - * Updated. - * - * Revision 1.1 2000/02/25 15:21:12 gerd - * Initial revision. - * - * - *) diff --git a/helm/DEVEL/pxp/netstring/compat-base64/META b/helm/DEVEL/pxp/netstring/compat-base64/META deleted file mode 100644 index a5c003ea4..000000000 --- a/helm/DEVEL/pxp/netstring/compat-base64/META +++ /dev/null @@ -1,3 +0,0 @@ -version = "0.5" -requires = "netstring" -description = "Compatibility with base64" diff --git a/helm/DEVEL/pxp/netstring/compat-cgi/META b/helm/DEVEL/pxp/netstring/compat-cgi/META deleted file mode 100644 index 2294921a0..000000000 --- a/helm/DEVEL/pxp/netstring/compat-cgi/META +++ /dev/null @@ -1,3 +0,0 @@ -version = "0.5" -requires = "netstring" -description = "Compatibility with cgi" diff --git a/helm/DEVEL/pxp/netstring/depend b/helm/DEVEL/pxp/netstring/depend deleted file mode 100644 index 5991264c6..000000000 --- a/helm/DEVEL/pxp/netstring/depend +++ /dev/null @@ -1,36 +0,0 @@ -base64.cmo: netencoding.cmi base64.cmi -base64.cmx: netencoding.cmx base64.cmi -cgi.cmo: mimestring.cmi netbuffer.cmi netencoding.cmi netstream.cmi cgi.cmi -cgi.cmx: mimestring.cmx netbuffer.cmx netencoding.cmx netstream.cmx cgi.cmi -mimestring.cmo: netbuffer.cmi netencoding.cmi netstream.cmi netstring_str.cmi \ - mimestring.cmi -mimestring.cmx: netbuffer.cmx netencoding.cmx netstream.cmx netstring_str.cmx \ - mimestring.cmi -netbuffer.cmo: netbuffer.cmi -netbuffer.cmx: netbuffer.cmi -netconversion.cmo: netmappings.cmi netconversion.cmi -netconversion.cmx: netmappings.cmx netconversion.cmi -netencoding.cmo: netstring_str.cmi netencoding.cmi -netencoding.cmx: netstring_str.cmx netencoding.cmi -nethtml.cmo: nethtml.cmi -nethtml.cmx: nethtml.cmi -netmappings.cmo: netmappings.cmi -netmappings.cmx: netmappings.cmi -netmappings_iso.cmo: netmappings.cmi -netmappings_iso.cmx: netmappings.cmx -netmappings_other.cmo: netmappings.cmi -netmappings_other.cmx: netmappings.cmx -netstream.cmo: netbuffer.cmi netstream.cmi -netstream.cmx: netbuffer.cmx netstream.cmi -netstring_mt.cmo: cgi.cmi netmappings.cmi netstring_str.cmi netstring_mt.cmi -netstring_mt.cmx: cgi.cmx netmappings.cmx netstring_str.cmx netstring_mt.cmi -netstring_str.cmo: netstring_str.cmi -netstring_str.cmx: netstring_str.cmi -netstring_top.cmo: netstring_top.cmi -netstring_top.cmx: netstring_top.cmi -neturl.cmo: netencoding.cmi neturl.cmi -neturl.cmx: netencoding.cmx neturl.cmi -cgi.cmi: netstream.cmi -mimestring.cmi: netstream.cmi -netmappings.cmi: netconversion.cmi -netstream.cmi: netbuffer.cmi diff --git a/helm/DEVEL/pxp/netstring/depend.pkg b/helm/DEVEL/pxp/netstring/depend.pkg deleted file mode 100644 index e69de29bb..000000000 diff --git a/helm/DEVEL/pxp/netstring/doc/ABOUT-FINDLIB b/helm/DEVEL/pxp/netstring/doc/ABOUT-FINDLIB deleted file mode 100644 index d942e2786..000000000 --- a/helm/DEVEL/pxp/netstring/doc/ABOUT-FINDLIB +++ /dev/null @@ -1,52 +0,0 @@ -****************************************************************************** -ABOUT-FINDLIB - Package manager for O'Caml -****************************************************************************** - - -============================================================================== -Abstract -============================================================================== - -The findlib library provides a scheme to manage reusable software components -(packages), and includes tools that support this scheme. Packages are -collections of OCaml modules for which metainformation can be stored. The -packages are kept in the filesystem hierarchy, but with strict directory -structure. The library contains functions to look the directory up that stores -a package, to query metainformation about a package, and to retrieve dependency -information about multiple packages. There is also a tool that allows the user -to enter queries on the command-line. In order to simplify compilation and -linkage, there are new frontends of the various OCaml compilers that can -directly deal with packages. - -Together with the packages metainformation is stored. This includes a version -string, the archives the package consists of, and additional linker options. -Packages can also be dependent on other packages. There is a query which finds -out all predecessors of a list of packages and sorts them topologically. The -new compiler frontends do this implicitly. - -Metainformation can be conditional, i.e. depend on a set of predicates. This is -mainly used to be able to react on certain properties of the environment, such -as if the bytecode or the native compiler is invoked, if the application is -multi-threaded, and a few more. If the new compiler frontends are used, most -predicates are found out automatically. - -There is special support for scripts. A new directive, "#require", loads -packages into scripts. Of course, this works only with newly created toploops -which include the findlib library. - -============================================================================== -Where to get findlib -============================================================================== - -The manual of findlib is available online [1]. You can download findlib here -[2]. - - --------------------------- - -[1] see http://www.ocaml-programming.de/packages/documentation/findlib/ - -[2] see http://www.ocaml-programming.de/packages/findlib-0.3.1.tar.gz - - - diff --git a/helm/DEVEL/pxp/netstring/doc/ABOUT-FINDLIB.xml b/helm/DEVEL/pxp/netstring/doc/ABOUT-FINDLIB.xml deleted file mode 100644 index d1dc5b04e..000000000 --- a/helm/DEVEL/pxp/netstring/doc/ABOUT-FINDLIB.xml +++ /dev/null @@ -1,61 +0,0 @@ - - -%common; - -findlib"> -Findlib"> - -]> - - - - Abstract -

-The &f; library provides a scheme to manage reusable software -components (packages), and includes tools that support this -scheme. Packages are collections of OCaml modules for which -metainformation can be stored. The packages are kept in the filesystem -hierarchy, but with strict directory structure. The library contains -functions to look the directory up that stores a package, to query -metainformation about a package, and to retrieve dependency -information about multiple packages. There is also a tool that allows -the user to enter queries on the command-line. In order to simplify -compilation and linkage, there are new frontends of the various OCaml -compilers that can directly deal with packages. -

- -

-Together with the packages metainformation is stored. This includes a -version string, the archives the package consists of, and additional -linker options. Packages can also be dependent on other -packages. There is a query which finds out all predecessors of a list -of packages and sorts them topologically. The new compiler frontends -do this implicitly. -

- -

-Metainformation can be conditional, i.e. depend on a set of -predicates. This is mainly used to be able to react on certain -properties of the environment, such as if the bytecode or the native -compiler is invoked, if the application is multi-threaded, and a few -more. If the new compiler frontends are used, most predicates are -found out automatically. -

- -

-There is special support for scripts. A new directive, "#require", -loads packages into scripts. Of course, this works only with newly -created toploops which include the &f; library. -

- -
- - Where to get findlib -

-The manual of &f; is available online. -You can download &f; here. -

-
-
diff --git a/helm/DEVEL/pxp/netstring/doc/INSTALL b/helm/DEVEL/pxp/netstring/doc/INSTALL deleted file mode 100644 index cca39944b..000000000 --- a/helm/DEVEL/pxp/netstring/doc/INSTALL +++ /dev/null @@ -1,128 +0,0 @@ -****************************************************************************** -INSTALL - Netstring, string processing functions for the net -****************************************************************************** - - -============================================================================== -The "Netstring" package -============================================================================== - ------------------------------------------------------------------------------- -Prerequisites ------------------------------------------------------------------------------- - -Netstring does not need any other packages besides the O'Caml core. Netstring -needs at least O'Caml 3.00. The installation procedure defined in the Makefile -requires findlib [1] to work [2]. - ------------------------------------------------------------------------------- -Configuration ------------------------------------------------------------------------------- - -It is not necessary to configure "Netstring". - ------------------------------------------------------------------------------- -Compilation ------------------------------------------------------------------------------- - -The Makefile defines the following goals: - -- make all - compiles with the bytecode compiler and creates netstring.cma, - netstring_mt.cmo, netstring_top.cmo, netmappings_iso.cmo, and - netmappings_other.cmo - -- make opt - compiles with the native compiler and creates netstring.cmxa, - netstring_mt.cmx, netmappings_iso.cmx, and netmappings_other.cmx - -The archive netstring.cmx?a contains the functionality, and the two -single-module files netmappings_iso.cm[ox] and netmappings_other.cm[ox] add -configurations to the character set conversion module. These configurations are -optional: - -- Netmappings_iso: Conversion tables for the character sets ISO-8859-2, -3, - -4, -5, -6, -7, -8, -9, -10, 13, -14, and -15. - -- Netmappings_other: Conversion tables for the character sets WINDOWS-1250, - -1251, -1252, -1253, -1254, -1255, -1256, -1257, -1258; code pages 037, 424, - 437, 500, 737, 775, 850, 852, 855, 856, 857, 860, 861, 862, 863, 864, 865, - 866, 869, 874, 875, 1006, 1026; JIS-0201; KOI8R; Macintosh Roman encoding; - Adobe Standard Encoding, Symbol Encoding, and Zapf Dingbats Encodings. - -Even without these configuration files, the conversion module is able to handle -the encodings ISO-8859-1, US-ASCII, UTF-16, UTF-8, and the Java variant of -UTF-8. - -The module Netstring_mt must be linked into multi-threaded applications; -otherwise some mutexes remain uninitialized. - -The module Netstring_top loads several printers for abstract values (for -toploops). - ------------------------------------------------------------------------------- -Installation ------------------------------------------------------------------------------- - -The Makefile defines the following goals: - -- make install - installs the bytecode archive, the interface definitions, and if present, - the native archive in the default location of findlib - -- make install-cgi - Installs a pseudo package "cgi" which is compatible with the old cgi - package. This has the effect that software searching the "cgi" package will - find the netstring package instead. This is recommended. - -- make install-base64 - Installs a pseudo package "base64" which is compatible with the old base64 - package. This has the effect that software searching the "base64" package - will find the netstring package instead. This is recommended. - -- make uninstall - removes the package - -- make uninstall-cgi - removes the "cgi" compatibility package - -- make uninstall-base64 - removes the "base64" compatibility package - ------------------------------------------------------------------------------- -Linking netstring with findlib ------------------------------------------------------------------------------- - -The command - -ocamlfind ocamlc ... -package netstring ... -linkpkg ... - -links as much as possible code from netstring into your application: All -conversion tables; when -thread is specified, the initialization code for -multi-threaded programs; when a toploop is created, the code setting the value -printers. - -The following predicates reduce the amount of linked code: - -- netstring_only_iso: Only the conversion tables for the ISO-8859 series of - character sets are linked. - -- netstring_minimum: No additional conversion tables are linked; only - ISO-8859-1 and the UTF encodings work. - -For example, the command may look like - -ocamlfind ocamlc ... - -package netstring -predicates netstring_only_iso ... -linkpkg ... - -to link only the ISO-8859 conversion tables. - - --------------------------- - -[1] see http://www.ocaml-programming.de/packages/documentation/findlib/ - -[2] Findlib is a package manager, see the file ABOUT-FINDLIB. - - - diff --git a/helm/DEVEL/pxp/netstring/doc/INSTALL.xml b/helm/DEVEL/pxp/netstring/doc/INSTALL.xml deleted file mode 100644 index b5b53eddc..000000000 --- a/helm/DEVEL/pxp/netstring/doc/INSTALL.xml +++ /dev/null @@ -1,153 +0,0 @@ - - -%common; - -Netstring"> - -]> - - - The "Netstring" package - Prerequisites -

-&m; does not need any other packages besides the O'Caml core. &m; needs -at least O'Caml 3.00. The installation procedure defined in the Makefile -requires findlib to -workFindlib is a package manager, see the file -ABOUT-FINDLIB.. -

-
- - Configuration -

-It is not necessary to configure "Netstring". -

-
- - Compilation -

-The Makefile defines the following goals: -

-
    -
  • -

    make all

    -

    compiles with the bytecode compiler and creates netstring.cma, -netstring_mt.cmo, netstring_top.cmo, netmappings_iso.cmo, and -netmappings_other.cmo

    -
  • -
  • -

    make opt

    -

    compiles with the native compiler and creates netstring.cmxa, -netstring_mt.cmx, netmappings_iso.cmx, and netmappings_other.cmx

    -
  • -
- -

The archive netstring.cmx?a contains the functionality, and the two -single-module files netmappings_iso.cm[ox] and netmappings_other.cm[ox] add -configurations to the character set conversion module. These configurations are -optional:

- -
    -
  • Netmappings_iso: Conversion tables for the character sets -ISO-8859-2, -3, -4, -5, -6, -7, -8, -9, -10, 13, -14, and -15.

    -
  • -
  • Netmappings_other: Conversion tables for the character sets -WINDOWS-1250, -1251, -1252, -1253, -1254, -1255, -1256, -1257, -1258; -code pages 037, 424, 437, 500, 737, 775, 850, 852, 855, 856, 857, 860, 861, -862, 863, 864, 865, 866, 869, 874, 875, 1006, 1026; JIS-0201; KOI8R; Macintosh -Roman encoding; Adobe Standard Encoding, Symbol Encoding, and Zapf Dingbats -Encodings.

    -
  • -
- -

Even without these configuration files, the conversion module is able to -handle the encodings ISO-8859-1, US-ASCII, UTF-16, UTF-8, and the Java variant -of UTF-8.

- -

The module Netstring_mt must be linked into multi-threaded applications; -otherwise some mutexes remain uninitialized.

- -

The module Netstring_top loads several printers for abstract values (for -toploops).

- -
- - Installation -

-The Makefile defines the following goals:

-
    -
  • -

    make install

    -

    installs the bytecode archive, the interface definitions, and if -present, the native archive in the default location of findlib -

    -
  • - -
  • -

    make install-cgi

    -

    Installs a pseudo package "cgi" which is compatible with the old -cgi package. This has the effect that software searching the "cgi" package will -find the netstring package instead. This is recommended.

    -
  • - -
  • -

    make install-base64

    Installs a pseudo package "base64" -which is compatible with the old base64 package. This has the effect that -software searching the "base64" package will find the netstring package -instead. This is recommended.

    -
  • - -
  • -

    make uninstall

    -

    removes the package

    -
  • - -
  • -

    make uninstall-cgi

    -

    removes the "cgi" compatibility package

    -
  • - -
  • -

    make uninstall-base64

    -

    removes the "base64" compatibility package

    -
  • -
-
- - - - Linking netstring with findlib -

The command - -ocamlfind ocamlc ... -package netstring ... -linkpkg ... - -links as much as possible code from netstring into your application: All -conversion tables; when -thread is specified, the initialization code for -multi-threaded programs; when a toploop is created, the code setting the value -printers.

- -

The following predicates reduce the amount of linked code:

- -
    -
  • netstring_only_iso: Only the conversion tables for the ISO-8859 -series of character sets are linked.

    -
  • -
  • netstring_minimum: No additional conversion tables are linked; -only ISO-8859-1 and the UTF encodings work.

    -
  • -
- -

For example, the command may look like - - -ocamlfind ocamlc ... - -package netstring -predicates netstring_only_iso ... -linkpkg ... - - -to link only the ISO-8859 conversion tables.

-
- -
-
\ No newline at end of file diff --git a/helm/DEVEL/pxp/netstring/doc/Makefile b/helm/DEVEL/pxp/netstring/doc/Makefile deleted file mode 100644 index 7f8450be3..000000000 --- a/helm/DEVEL/pxp/netstring/doc/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -.PHONY: all -all: README INSTALL ABOUT-FINDLIB - -README: README.xml common.xml config.xml - readme -text README.xml >README - -INSTALL: INSTALL.xml common.xml config.xml - readme -text INSTALL.xml >INSTALL - -ABOUT-FINDLIB: ABOUT-FINDLIB.xml common.xml config.xml - readme -text ABOUT-FINDLIB.xml >ABOUT-FINDLIB - -.PHONY: clean -clean: - -.PHONY: CLEAN -CLEAN: clean - -.PHONY: distclean -distclean: clean - rm -f *~ - diff --git a/helm/DEVEL/pxp/netstring/doc/README b/helm/DEVEL/pxp/netstring/doc/README deleted file mode 100644 index b590416be..000000000 --- a/helm/DEVEL/pxp/netstring/doc/README +++ /dev/null @@ -1,212 +0,0 @@ -****************************************************************************** -README - Netstring, string processing functions for the net -****************************************************************************** - - -============================================================================== -Abstract -============================================================================== - -Netstring is a collection of string processing functions that are useful in -conjunction with Internet messages and protocols. In particular, it contains -functions for the following purposes: - -- Parsing MIME messages - -- Several encoding/decoding functions (Base 64, Quoted Printable, Q, - URL-encoding) - -- A new implementation of the CGI interface that allows users to upload files - -- A simple HTML parser - -- URL parsing, printing and processing - -- Conversion between character sets - -============================================================================== -Download -============================================================================== - -You can download Netstring as gzip'ed tarball [1]. - -============================================================================== -Documentation -============================================================================== - -Sorry, there is no manual. The mli files describe each function in detail. -Furthermore, the following additional information may be useful. - ------------------------------------------------------------------------------- -New CGI implementation ------------------------------------------------------------------------------- - -For a long time, the CGI implementation by Jean-Christophe Filliatre has been -the only freely available module that implemented the CGI interface (it also -based on code by Daniel de Rauglaudre). It worked well, but it did not support -file uploads because this requires a parser for MIME messages. - -The main goal of Netstring is to realize such uploads, and because of this it -contains an almost complete parser for MIME messages. - -The new CGI implementation provides the same functions than the old one, and -some extensions. If you call Cgi.parse_args(), you get the CGI parameters as -before, but as already explained this works also if the parameters are -encaspulated as MIME message. In the HTML code, you can select the MIME format -by using - -
-... -
- - -- this "enctype" attribute forces the browser to send the form parameters as -multipart MIME message (Note: You can neither send the parameters of a -conventional hyperlink as MIME message nor the form parameters if the "method" -is "get"). In many browsers only this particular encoding enables the file -upload elements, you cannot perform file uploads with other encodings. - -As MIME messages can transport MIME types, filename, and other additional -properties, it is also possible to get these using the enhanced interface. -After calling - -Cgi.parse_arguments config - -you can get all available information about a certain parameter by invoking - -let param = Cgi.argument "name" - -- where "param" has the type "argument". There are several accessor functions -to extract the various aspects of arguments (name, filename, value by string, -value by temporary file, MIME type, MIME header) from "argument" values. - ------------------------------------------------------------------------------- -Base64, and other encodings ------------------------------------------------------------------------------- - -Netstring is also the successor of the Base64 package. It provides a Base64 -compatible interface, and an enhanced API. The latter is contained in the -Netencoding module which also offers implementations of the "quoted printable", -"Q", and "URL" encodings. Please see netencoding.mli for details. - ------------------------------------------------------------------------------- -The MIME scanner functions ------------------------------------------------------------------------------- - -In the Mimestring module you can find several functions scanning parts of MIME -messages. These functions already cover most aspects of MIME messages: Scanning -of headers, analysis of structured header entries, and scanning of multipart -bodies. Of course, a full-featured MIME scanner would require some more -functions, especially concrete parsers for frequent structures (mail addresses -or date strings). - -Please see the file mimestring.mli for details. - ------------------------------------------------------------------------------- -The HTML parser ------------------------------------------------------------------------------- - -The HTML parser should be able to read every HTML file; whether it is correct -or not. The parser tries to recover from parsing errors as much as possible. - -The parser returns the HTML term as conventional recursive value (i.e. no -object-oriented design). - -The parser depends a bit on knowledge about the HTML version; mainly because it -needs to know the tags that are always empty. It may be necessary that you must -adjust this configuration before the parser works well enough for your purpose. - -Please see the Nethtml module for details. - ------------------------------------------------------------------------------- -The abstract data type URL ------------------------------------------------------------------------------- - -The module Neturl contains support for URL parsing and processing. The -implementation follows strictly the standards RFC 1738 and RFC 1808. URLs can -be parsed, and several accessor functions allow the user to get components of -parsed URLs, or to change components. Modifying URLs is safe; it is impossible -to create a URL that does not have a valid string representation. - -Both absolute and relative URLs are supported. It is possible to apply a -relative URL to a base URL in order to get the corresponding absolute URL. - ------------------------------------------------------------------------------- -Conversion between character sets and encodings ------------------------------------------------------------------------------- - -The module Netconversion converts strings from one characters set to another. -It is Unicode-based, and there are conversion tables for more than 50 -encodings. - -============================================================================== -Author, Copying -============================================================================== - -Netstring has been written by Gerd Stolpmann [2]. You may copy it as you like, -you may use it even for commercial purposes as long as the license conditions -are respected, see the file LICENSE coming with the distribution. It allows -almost everything. - -============================================================================== -History -============================================================================== - -- Changed in 0.9.3: Fixed a bug in the "install" rule of the Makefile. - -- Changed in 0.9.2: New format for the conversion tables which are now much - smaller. - -- Changed in 0.9.1: Updated the Makefile such that (native-code) compilation - of netmappings.ml becomes possible. - -- Changed in 0.9: Extended Mimestring module: It can now process RFC-2047 - messages. - New Netconversion module which converts strings between character encodings. - -- Changed in 0.8.1: Added the component url_accepts_8bits to - Neturl.url_syntax. This helps processing URLs which intentionally contain - bytes >= 0x80. - Fixed a bug: Every URL containing a 'j' was malformed! - -- Changed in 0.8: Added the module Neturl which provides the abstract data - types of URLs. - The whole package is now thread-safe. - Added printers for the various opaque data types. - Added labels to function arguments where appropriate. The following - functions changed their signatures significantly: Cgi.mk_memory_arg, - Cgi.mk_file_arg. - -- Changed in 0.7: Added workarounds for frequent browser bugs. Some functions - take now an additional argument specifying which workarounds are enabled. - -- Changed in 0.6.1: Updated URLs in documentation. - -- Changed in 0.6: The file upload has been re-implemented to support large - files; the file is now read block by block and the blocks can be collected - either in memory or in a temporary file. - Furthermore, the CGI API has been revised. There is now an opaque data type - "argument" that hides all implementation details and that is extensible (if - necessary, it is possible to add features without breaking the interface - again). - The CGI argument parser can be configured; currently it is possible to limit - the size of uploaded data, to control by which method arguments are - processed, and to set up where temporary files are created. - The other parts of the package that have nothing to do with CGI remain - unchanged. - -- Changed in 0.5.1: A mistake in the documentation has been corrected. - -- Initial version 0.5: The Netstring package wants to be the successor of the - Base64-0.2 and the Cgi-0.3 packages. The sum of both numbers is 0.5, and - because of this, the first version number is 0.5. - - --------------------------- - -[1] see http://www.ocaml-programming.de/packages/netstring-0.9.2.tar.gz - -[2] see mailto:gerd@gerd-stolpmann.de - - - diff --git a/helm/DEVEL/pxp/netstring/doc/README.xml b/helm/DEVEL/pxp/netstring/doc/README.xml deleted file mode 100644 index bbf473e99..000000000 --- a/helm/DEVEL/pxp/netstring/doc/README.xml +++ /dev/null @@ -1,244 +0,0 @@ - - -%common; - - -up'> - - -%config; - -]> - - - - Abstract -

-Netstring is a collection of string processing functions that are -useful in conjunction with Internet messages and protocols. In particular, -it contains functions for the following purposes:

- -
    -
  • Parsing MIME messages

    -
  • -
  • Several encoding/decoding functions (Base 64, Quoted Printable, Q, URL-encoding)

    -
  • -
  • A new implementation of the CGI interface that allows users to upload files

    -
  • -
  • A simple HTML parser

    -
  • -
  • URL parsing, printing and processing

    -
  • -
  • Conversion between character sets

    -
  • -
- -
- - - Download -

-You can download Netstring as gzip'ed tarball. -

- -
- - - Documentation -

-Sorry, there is no manual. The mli files describe each function in -detail. Furthermore, the following additional information may be useful.

- - - New CGI implementation - -

For a long time, the CGI implementation by Jean-Christophe Filliatre -has been the only freely available module that implemented the CGI interface -(it also based on code by Daniel de Rauglaudre). It worked well, but it did not -support file uploads because this requires a parser for MIME messages.

-

The main goal of Netstring is to realize such uploads, and because of -this it contains an almost complete parser for MIME messages.

-

The new CGI implementation provides the same functions than the old -one, and some extensions. If you call Cgi.parse_args(), you get the CGI -parameters as before, but as already explained this works also if the -parameters are encaspulated as MIME message. In the HTML code, you can select -the MIME format by using - -... - -]]> - -- this "enctype" attribute forces the browser to send the form parameters -as multipart MIME message (Note: You can neither send the parameters of a -conventional hyperlink as MIME message nor the form parameters if the -"method" is "get"). In many browsers only this particular encoding enables -the file upload elements, you cannot perform file uploads with other encodings. -

- -

As MIME messages can transport MIME types, filename, and other -additional properties, it is also possible to get these using the enhanced -interface. After calling - -you can get all available information about a certain parameter by invoking - -- where "param" has the type "argument". There are several accessor functions -to extract the various aspects of arguments (name, filename, value by string, -value by temporary file, MIME type, MIME header) from "argument" values. -

- -
- - - - Base64, and other encodings - -

Netstring is also the successor of the Base64 package. It provides a -Base64 compatible interface, and an enhanced API. The latter is contained in -the Netencoding module which also offers implementations of the "quoted -printable", "Q", and "URL" encodings. Please see netencoding.mli for -details.

- -
- - - - The MIME scanner functions - -

In the Mimestring module you can find several functions scanning parts -of MIME messages. These functions already cover most aspects of MIME messages: -Scanning of headers, analysis of structured header entries, and scanning of -multipart bodies. Of course, a full-featured MIME scanner would require some -more functions, especially concrete parsers for frequent structures -(mail addresses or date strings). -

-

Please see the file mimestring.mli for details.

-
- - - - The HTML parser - -

The HTML parser should be able to read every HTML file; whether it is -correct or not. The parser tries to recover from parsing errors as much as -possible. -

-

The parser returns the HTML term as conventional recursive value -(i.e. no object-oriented design).

-

The parser depends a bit on knowledge about the HTML version; mainly -because it needs to know the tags that are always empty. It may be necessary -that you must adjust this configuration before the parser works well enough for -your purpose. -

-

Please see the Nethtml module for details.

-
- - - The abstract data type URL -

The module Neturl contains support for URL parsing and processing. -The implementation follows strictly the standards RFC 1738 and RFC 1808. -URLs can be parsed, and several accessor functions allow the user to -get components of parsed URLs, or to change components. Modifying URLs -is safe; it is impossible to create a URL that does not have a valid -string representation.

- -

Both absolute and relative URLs are supported. It is possible to -apply a relative URL to a base URL in order to get the corresponding -absolute URL.

-
- - - Conversion between character sets and encodings -

The module Netconversion converts strings from one characters set -to another. It is Unicode-based, and there are conversion tables for more than -50 encodings.

-
- -
- - - Author, Copying -

-Netstring has been written by &person.gps;. You may copy it as you like, -you may use it even for commercial purposes as long as the license conditions -are respected, see the file LICENSE coming with the distribution. It allows -almost everything. -

-
- - - History - -
    -
  • Changed in 0.9.3: Fixed a bug in the "install" rule of -the Makefile.

    -
  • -
  • Changed in 0.9.2: New format for the conversion tables -which are now much smaller.

    -
  • -
  • Changed in 0.9.1: Updated the Makefile such that -(native-code) compilation of netmappings.ml becomes possible. -

    -
  • -
  • Changed in 0.9: Extended Mimestring module: It can -now process RFC-2047 messages.

    -

    New Netconversion module which converts strings between character -encodings.

    -
  • -
  • Changed in 0.8.1: Added the component -url_accepts_8bits to Neturl.url_syntax. This helps processing URLs which -intentionally contain bytes >= 0x80.

    -

    Fixed a bug: Every URL containing a 'j' was malformed!

    -
  • -
  • Changed in 0.8: Added the module Neturl which -provides the abstract data types of URLs.

    -

    The whole package is now thread-safe.

    -

    Added printers for the various opaque data types.

    -

    Added labels to function arguments where appropriate. The -following functions changed their signatures significantly: -Cgi.mk_memory_arg, Cgi.mk_file_arg.

    -
  • -
  • Changed in 0.7: Added workarounds for frequent -browser bugs. Some functions take now an additional argument -specifying which workarounds are enabled.

    -
  • -
  • Changed in 0.6.1: Updated URLs in documentation.

    -
  • - -
  • Changed in 0.6: The file upload has been re-implemented -to support large files; the file is now read block by block and the blocks can -be collected either in memory or in a temporary file.
    -Furthermore, the CGI API has been revised. There is now an opaque data type -"argument" that hides all implementation details and that is extensible (if -necessary, it is possible to add features without breaking the interface -again).
    -The CGI argument parser can be configured; currently it is possible to -limit the size of uploaded data, to control by which method arguments are -processed, and to set up where temporary files are created.
    -The other parts of the package that have nothing to do with CGI remain -unchanged. -

    -
  • - -
  • Changed in 0.5.1: A mistake in the documentation has -been corrected.

    -
  • - -
  • Initial version 0.5: -The Netstring package wants to be the successor of the Base64-0.2 and -the Cgi-0.3 packages. The sum of both numbers is 0.5, and because of this, -the first version number is 0.5. -

    -
  • -
-
- -
- diff --git a/helm/DEVEL/pxp/netstring/mimestring.ml b/helm/DEVEL/pxp/netstring/mimestring.ml deleted file mode 100644 index 8fc4bfcbe..000000000 --- a/helm/DEVEL/pxp/netstring/mimestring.ml +++ /dev/null @@ -1,1035 +0,0 @@ -(* $Id$ - * ---------------------------------------------------------------------- - * - *) - -module Str = Netstring_str;; - -let cr_or_lf_re = Str.regexp "[\013\n]";; - -let trim_right_spaces_re = - Str.regexp "[ \t]+$";; - -let trim_left_spaces_re = - Str.regexp "^[ \t]+";; - -let header_re = - Str.regexp "\\([^ \t\r\n:]+\\):\\([ \t]*.*\n\\([ \t].*\n\\)*\\)";; - -let empty_line_re = - Str.regexp "\013?\n";; - -let end_of_header_re = - Str.regexp "\n\013?\n";; - - -let scan_header ?(unfold=true) parstr ~start_pos:i0 ~end_pos:i1 = - let rec parse_header i l = - match Str.string_partial_match header_re parstr i with - Some r -> - let i' = Str.match_end r in - if i' > i1 then - failwith "Mimestring.scan_header"; - let name = String.lowercase(Str.matched_group r 1 parstr) in - let value_with_crlf = - Str.matched_group r 2 parstr in - let value = - if unfold then begin - let value_with_rspaces = - Str.global_replace cr_or_lf_re "" value_with_crlf in - let value_with_lspaces = - Str.global_replace trim_right_spaces_re "" value_with_rspaces in - Str.global_replace trim_left_spaces_re "" value_with_lspaces - end - else value_with_crlf - in - parse_header i' ( (name,value) :: l) - | None -> - (* The header must end with an empty line *) - begin match Str.string_partial_match empty_line_re parstr i with - Some r' -> - List.rev l, Str.match_end r' - | None -> - failwith "Mimestring.scan_header" - end - in - parse_header i0 [] -;; - -type s_token = - Atom of string - | EncodedWord of (string * string * string) - | QString of string - | Control of char - | Special of char - | DomainLiteral of string - | Comment - | End -;; - -type s_option = - No_backslash_escaping - | Return_comments - | Recognize_encoded_words -;; - -type s_extended_token = - { token : s_token; - token_pos : int; - token_line : int; - token_linepos : int; (* Position of the beginning of the line *) - token_len : int; - mutable token_sep : bool; (* separates adjacent encoded words *) - } -;; - -let get_token et = et.token;; -let get_pos et = et.token_pos;; -let get_line et = et.token_line;; -let get_column et = et.token_pos - et.token_linepos;; -let get_length et = et.token_len;; -let separates_adjacent_encoded_words et = et.token_sep;; - -let get_decoded_word et = - match et.token with - Atom s -> s - | QString s -> s - | Control c -> String.make 1 c - | Special c -> String.make 1 c - | DomainLiteral s -> s - | Comment -> "" - | EncodedWord (_, encoding, content) -> - ( match encoding with - ("Q"|"q") -> - Netencoding.Q.decode content - | ("B"|"b") -> - Netencoding.Base64.decode - ~url_variant:false - ~accept_spaces:false - content - | _ -> failwith "get_decoded_word" - ) - | End -> - failwith "get_decoded_word" -;; - -let get_charset et = - match et.token with - EncodedWord (charset, _, _) -> charset - | End -> failwith "get_charset" - | _ -> "US-ASCII" -;; - -type scanner_spec = - { (* What the user specifies: *) - scanner_specials : char list; - scanner_options : s_option list; - (* Derived from that: *) - mutable opt_no_backslash_escaping : bool; - mutable opt_return_comments : bool; - mutable opt_recognize_encoded_words : bool; - - mutable is_special : bool array; - mutable space_is_special : bool; - } -;; - -type scanner_target = - { scanned_string : string; - mutable scanner_pos : int; - mutable scanner_line : int; - mutable scanner_linepos : int; - (* Position of the beginning of the line *) - mutable scanned_tokens : s_extended_token Queue.t; - (* A queue of already scanned tokens in order to look ahead *) - mutable last_token : s_token; - (* The last returned token. It is only important whether it is - * EncodedWord or not. - *) - } -;; - -type mime_scanner = scanner_spec * scanner_target -;; - -let get_pos_of_scanner (spec, target) = - if spec.opt_recognize_encoded_words then - failwith "get_pos_of_scanner" - else - target.scanner_pos -;; - -let get_line_of_scanner (spec, target) = - if spec.opt_recognize_encoded_words then - failwith "get_line_of_scanner" - else - target.scanner_line -;; - -let get_column_of_scanner (spec, target) = - if spec.opt_recognize_encoded_words then - failwith "get_column_of_scanner" - else - target.scanner_pos - target.scanner_linepos -;; - -let create_mime_scanner ~specials ~scan_options = - let is_spcl = Array.create 256 false in - List.iter - (fun c -> is_spcl.( Char.code c ) <- true) - specials; - let spec = - { scanner_specials = specials; - scanner_options = scan_options; - opt_no_backslash_escaping = - List.mem No_backslash_escaping scan_options; - opt_return_comments = - List.mem Return_comments scan_options; - opt_recognize_encoded_words = - List.mem Recognize_encoded_words scan_options; - is_special = is_spcl; - space_is_special = is_spcl.(32); - } - in - (* Grab the remaining arguments: *) - fun ?(pos=0) ?(line=1) ?(column=0) s -> - let target = - { scanned_string = s; - scanner_pos = pos; - scanner_line = line; - scanner_linepos = pos - column; - scanned_tokens = Queue.create(); - last_token = Comment; (* Must not be initialized with EncodedWord *) - } - in - spec, target -;; - - -let encoded_word_re = - Str.regexp "=\\?\\([^?]+\\)\\?\\([^?]+\\)\\?\\([^?]+\\)\\?=";; - -let scan_next_token ((spec,target) as scn) = - let mk_pair t len = - { token = t; - token_pos = target.scanner_pos; - token_line = target.scanner_line; - token_linepos = target.scanner_linepos; - token_len = len; - token_sep = false; - }, - t - in - - (* Note: mk_pair creates a new token pair, and it assumes that - * target.scanner_pos (and also scanner_line and scanner_linepos) - * still contain the position of the beginning of the token. - *) - - let s = target.scanned_string in - let l = String.length s in - let rec scan i = - if i < l then begin - let c = s.[i] in - if spec.is_special.( Char.code c ) then begin - let pair = mk_pair (Special c) 1 in - target.scanner_pos <- target.scanner_pos + 1; - (match c with - '\n' -> - target.scanner_line <- target.scanner_line + 1; - target.scanner_linepos <- target.scanner_pos; - | _ -> () - ); - pair - end - else - match c with - '"' -> - (* Quoted string: *) - scan_qstring (i+1) (i+1) 0 - | '(' -> - (* Comment: *) - let i', line, linepos = - scan_comment (i+1) 0 target.scanner_line target.scanner_linepos - in - let advance() = - target.scanner_pos <- i'; - target.scanner_line <- line; - target.scanner_linepos <- linepos - in - if spec.opt_return_comments then begin - let pair = mk_pair Comment (i' - i) in - advance(); - pair - end - else - if spec.space_is_special then begin - let pair = mk_pair (Special ' ') (i' - i) in - advance(); - pair - end - else begin - advance(); - scan i' - end - | (' '|'\t'|'\r') -> - (* Ignore whitespace by default: *) - target.scanner_pos <- target.scanner_pos + 1; - scan (i+1) - | '\n' -> - (* Ignore whitespace by default: *) - target.scanner_pos <- target.scanner_pos + 1; - target.scanner_line <- target.scanner_line + 1; - target.scanner_linepos <- target.scanner_pos; - scan (i+1) - | ('\000'..'\031'|'\127'..'\255') -> - let pair = mk_pair (Control c) 1 in - target.scanner_pos <- target.scanner_pos + 1; - pair - | '[' -> - (* Domain literal: *) - scan_dliteral (i+1) (i+1) 0 - | _ -> - scan_atom i i - end - else - mk_pair End 0 - - and scan_atom i0 i = - let return_atom() = - let astring = String.sub s i0 (i-i0) in - let r = - if spec.opt_recognize_encoded_words then - Str.string_match ~groups:4 encoded_word_re astring 0 - else - None - in - match r with - None -> - (* An atom contains never a linefeed character, so we can ignore - * scanner_line here. - *) - let pair = mk_pair (Atom astring) (i-i0) in - target.scanner_pos <- i; - pair - | Some mr -> - (* Found an encoded word. *) - let charset = Str.matched_group mr 1 astring in - let encoding = Str.matched_group mr 2 astring in - let content = Str.matched_group mr 3 astring in - let t = EncodedWord(String.uppercase charset, - String.uppercase encoding, - content) in - let pair = mk_pair t (i-i0) in - target.scanner_pos <- i; - pair - in - - if i < l then - let c = s.[i] in - match c with - ('\000'..'\031'|'\127'..'\255'|'"'|'('|'['|' '|'\t'|'\r'|'\n') -> - return_atom() - | _ -> - if spec.is_special.( Char.code c ) then - return_atom() - else - scan_atom i0 (i+1) - else - return_atom() - - and scan_qstring i0 i n = - if i < l then - let c = s.[i] in - match c with - '"' -> - (* Regular end of the quoted string: *) - let content, line, linepos = copy_qstring i0 (i-1) n in - let pair = mk_pair (QString content) (i-i0+2) in - target.scanner_pos <- i+1; - target.scanner_line <- line; - target.scanner_linepos <- linepos; - pair - | '\\' when not spec.opt_no_backslash_escaping -> - scan_qstring i0 (i+2) (n+1) - | _ -> - scan_qstring i0 (i+1) (n+1) - else - (* Missing right double quote *) - let content, line, linepos = copy_qstring i0 (l-1) n in - let pair = mk_pair (QString content) (l-i0+1) in - target.scanner_pos <- l; - target.scanner_line <- line; - target.scanner_linepos <- linepos; - pair - - and copy_qstring i0 i1 n = - (* Used for quoted strings and for domain literals *) - let r = String.create n in - let k = ref 0 in - let line = ref target.scanner_line in - let linepos = ref target.scanner_linepos in - for i = i0 to i1 do - let c = s.[i] in - match c with - '\\' when i < i1 && not spec.opt_no_backslash_escaping -> () - | '\n' -> - line := !line + 1; - linepos := i+1; - r.[ !k ] <- c; - incr k - | _ -> - r.[ !k ] <- c; - incr k - done; - assert (!k = n); - r, !line, !linepos - - and scan_dliteral i0 i n = - if i < l then - let c = s.[i] in - match c with - ']' -> - (* Regular end of the domain literal: *) - let content, line, linepos = copy_qstring i0 (i-1) n in - let pair = mk_pair (DomainLiteral content) (i-i0+2) in - target.scanner_pos <- i+1; - target.scanner_line <- line; - target.scanner_linepos <- linepos; - pair - | '\\' when not spec.opt_no_backslash_escaping -> - scan_dliteral i0 (i+2) (n+1) - | _ -> - (* Note: '[' is not allowed by RFC 822; we treat it here as - * a regular character (questionable) - *) - scan_dliteral i0 (i+1) (n+1) - else - (* Missing right bracket *) - let content, line, linepos = copy_qstring i0 (l-1) n in - let pair = mk_pair (DomainLiteral content) (l-i0+1) in - target.scanner_pos <- l; - target.scanner_line <- line; - target.scanner_linepos <- linepos; - pair - - - and scan_comment i level line linepos = - if i < l then - let c = s.[i] in - match c with - ')' -> - (i+1), line, linepos - | '(' -> - (* nested comment *) - let i', line', linepos' = - scan_comment (i+1) (level+1) line linepos - in - scan_comment i' level line' linepos' - | '\\' when not spec.opt_no_backslash_escaping -> - if (i+1) < l && s.[i+1] = '\n' then - scan_comment (i+2) level (line+1) (i+2) - else - scan_comment (i+2) level line linepos - | '\n' -> - scan_comment (i+1) level (line+1) (i+1) - | _ -> - scan_comment (i+1) level line linepos - else - (* Missing closing ')' *) - i, line, linepos - in - - scan target.scanner_pos -;; - - -let scan_token ((spec,target) as scn) = - (* This function handles token queueing in order to recognize white space - * that separates adjacent encoded words. - *) - - let rec collect_whitespace () = - (* Scans whitespace tokens and returns them as: - * (ws_list, other_tok) if there is some other_tok following the - * list (other_tok = End is possible) - *) - let (et, t) as pair = scan_next_token scn in - ( match t with - (Special ' '|Special '\t'|Special '\n'|Special '\r') -> - let ws_list, tok = collect_whitespace() in - pair :: ws_list, tok - | _ -> - [], pair - ) - in - - try - (* Is there an already scanned token in the queue? *) - let et = Queue.take target.scanned_tokens in - let t = et.token in - target.last_token <- t; - et, et.token - with - Queue.Empty -> - (* If not: inspect the last token. If that token is an EncodedWord, - * the next tokens are scanned in advance to determine if there - * are spaces separating two EncodedWords. These tokens are put - * into the queue such that it is avoided that they are scanned - * twice. (The sole purpose of the queue.) - *) - match target.last_token with - EncodedWord(_,_,_) as ew -> - let ws_list, tok = collect_whitespace() in - (* If tok is an EncodedWord, too, the tokens in ws_list must - * be flagged as separating two adjacent encoded words. - *) - ( match tok with - _, EncodedWord(_,_,_) -> - List.iter - (fun (et,t) -> - et.token_sep <- true) - ws_list - | _ -> - () - ); - (* Anyway, queue the read tokens but the first up *) - ( match ws_list with - [] -> - (* Nothing to queue *) - let et, t = tok in - target.last_token <- t; - tok - | (et,t) as pair :: ws_list' -> - List.iter - (fun (et',_) -> - Queue.add et' target.scanned_tokens) - ws_list'; - ( match tok with - | _, End -> - () - | (et',_) -> - Queue.add et' target.scanned_tokens - ); - (* Return the first scanned token *) - target.last_token <- t; - pair - ) - | _ -> - (* Regular case: Scan one token; do not queue it up *) - let (et, t) as pair = scan_next_token scn in - target.last_token <- t; - pair -;; - - -let scan_token_list scn = - let rec collect() = - match scan_token scn with - _, End -> - [] - | pair -> - pair :: collect() - in - collect() -;; - - -let scan_structured_value s specials options = - let rec collect scn = - match scan_token scn with - _, End -> - [] - | _, t -> - t :: collect scn - in - let scn = create_mime_scanner specials options s in - collect scn -;; - - -let specials_rfc822 = - [ '<'; '>'; '@'; ','; ';'; ':'; '\\'; '.' ];; - - -let specials_rfc2045 = - [ '<'; '>'; '@'; ','; ';'; ':'; '\\'; '/' ];; - - -let scan_encoded_text_value s = - let specials = [ ' '; '\t'; '\r'; '\n'; '('; '['; '"' ] in - let options = [ Recognize_encoded_words ] in - let scn = create_mime_scanner specials options s in - - let rec collect () = - match scan_token scn with - _, End -> - [] - | et, _ when separates_adjacent_encoded_words et -> - collect() - | et, (Special _|Atom _|EncodedWord(_,_,_)) -> - et :: collect () - | _, _ -> - assert false - in - collect() -;; - - -let scan_value_with_parameters s options = - let rec parse_params tl = - match tl with - Atom n :: Special '=' :: Atom v :: tl' -> - (n,v) :: parse_rest tl' - | Atom n :: Special '=' :: QString v :: tl' -> - (n,v) :: parse_rest tl' - | _ -> - failwith "Mimestring.scan_value_with_parameters" - and parse_rest tl = - match tl with - [] -> [] - | Special ';' :: tl' -> - parse_params tl' - | _ -> - failwith "Mimestring.scan_value_with_parameters" - in - - (* Note: Even if not used here, the comma is a very common separator - * and should be recognized as being special. You will get a - * failure if there is a comma in the scanned string. - *) - let tl = scan_structured_value s [ ';'; '='; ',' ] options in - match tl with - [ Atom n ] -> n, [] - | [ QString n ] -> n, [] - | Atom n :: Special ';' :: tl' -> - n, parse_params tl' - | QString n :: Special ';' :: tl' -> - n, parse_params tl' - | _ -> - failwith "Mimestring.scan_value_with_parameters" -;; - - -let scan_mime_type s options = - let n, params = scan_value_with_parameters s options in - (String.lowercase n), - (List.map (fun (n,v) -> (String.lowercase n, v)) params) -;; - - -let lf_re = Str.regexp "[\n]";; - -let scan_multipart_body s ~start_pos:i0 ~end_pos:i1 ~boundary = - let l_s = String.length s in - if i0 < 0 or i1 < 0 or i0 > l_s or i1 >l_s then - invalid_arg "Mimestring.scan_multipart_body"; - - (* First compile the regexps scanning for 'boundary': *) - let boundary1_re = - Str.regexp ("\n--" ^ Str.quote boundary) in - let boundary2_re = - Str.regexp ("--" ^ Str.quote boundary) in - - let rec parse i = - (* i: Beginning of the current part (position directly after the - * boundary line - *) - (* Search for next boundary at position i *) - let i' = - try min (fst (Str.search_forward boundary1_re s i) + 1) i1 - with - Not_found -> i1 - in - (* i': Either the position of the first '-' of the boundary line, - * or i1 if no boundary has been found - *) - if i' >= i1 then - [] (* Ignore everything after the last boundary *) - else - let i'' = - try min (fst (Str.search_forward lf_re s i') + 1) i1 - with - Not_found -> i1 - in - (* i'': The position after the boundary line *) -(* - print_int i; print_newline(); - print_int i'; print_newline(); - print_int i''; print_newline(); - flush stdout; -*) - let header, k = scan_header s i i' in - (* header: the header of the part - * k: beginning of the body - *) - - let value = - (* We know that i'-1 is a linefeed character. i'-2 should be a CR - * character. Both characters are not part of the value. - *) - if i' >= 2 then - match s.[i'-2] with - '\013' -> String.sub s k (i'-2-k) - | _ -> String.sub s k (i'-1-k) - else - String.sub s k (i'-1-k) - in - - let pair = - (header, value) in - - if i'' >= i1 - then - [ pair ] - else - pair :: parse i'' - in - - (* Find the first boundary. This is a special case, because it may be - * right at the beginning of the string (no preceding CRLF) - *) - - let i_bnd = - if Str.string_partial_match boundary2_re s i0 <> None then - i0 - else - try min (fst (Str.search_forward boundary1_re s i0)) i1 - with - Not_found -> i1 - in - - if i_bnd >= i1 then - [] - else - let i_bnd' = - try min (fst (Str.search_forward lf_re s (i_bnd + 1)) + 1) i1 - with - Not_found -> i1 - in - if i_bnd' >= i1 then - [] - else - parse i_bnd' -;; - - -let scan_multipart_body_and_decode s ~start_pos:i0 ~end_pos:i1 ~boundary = - let parts = scan_multipart_body s i0 i1 boundary in - List.map - (fun (params, value) -> - let encoding = - try List.assoc "content-transfer-encoding" params - with Not_found -> "7bit" - in - - (* NOTE: In the case of "base64" and "quoted-printable", the allocation - * of the string "value" could be avoided. - *) - - let value' = - match encoding with - ("7bit"|"8bit"|"binary") -> value - | "base64" -> - Netencoding.Base64.decode_substring - value 0 (String.length value) false true - | "quoted-printable" -> - Netencoding.QuotedPrintable.decode_substring - value 0 (String.length value) - | _ -> - failwith "Mimestring.scan_multipart_body_and_decode: Unknown content-transfer-encoding" - in - (params, value') - ) - parts -;; - - -let scan_multipart_body_from_netstream s ~boundary ~create ~add ~stop = - - (* The block size of s must be at least the length of the boundary + 3. - * Otherwise it is not guaranteed that the boundary is always recognized. - *) - if Netstream.block_size s < String.length boundary + 3 then - invalid_arg "Mimestring.scan_multipart_body_from_netstream"; - - (* First compile the regexps scanning for 'boundary': *) - let boundary1_re = - Str.regexp ("\n--" ^ Str.quote boundary) in - let boundary2_re = - Str.regexp ("--" ^ Str.quote boundary) in - - (* Subtask 1: Search the end of the MIME header: CR LF CR LF - * (or LF LF). Enlarge the window until the complete header - * is covered by the window. - *) - let rec search_end_of_header k = - (* Search the end of the header beginning at position k of the - * current window. - * Return the position of the first character of the body. - *) - try - (* Search for LF CR? LF: *) - let i, r = Str.search_forward - end_of_header_re - (Netbuffer.unsafe_buffer (Netstream.window s)) - k - in - (* If match_end <= window_length, the search was successful. - * Otherwise, we searched in the uninitialized region of the - * buffer. - *) - if Str.match_end r <= Netstream.window_length s then - Str.match_end r - else - raise Not_found - with - Not_found -> - (* If the end of the stream is reached, the end of the header - * is missing: Error. - * Otherwise, we try to read another block, and continue. - *) - if Netstream.at_eos s then - failwith "Mimestring.scan_multipart_body_from_netstream: Unexpected end of stream"; - let w0 = Netstream.window_length s in - Netstream.want_another_block s; - search_end_of_header (max (w0 - 2) 0) - in - - (* Subtask 2: Search the first boundary line. *) - let rec search_first_boundary() = - (* Search boundary per regexp; return the position of the character - * immediately following the boundary (on the same line), or - * raise Not_found. - *) - try - (* Search boundary per regexp: *) - let i, r = Str.search_forward - boundary1_re - (Netbuffer.unsafe_buffer (Netstream.window s)) - 0 - in - (* If match_end <= window_length, the search was successful. - * Otherwise, we searched in the uninitialized region of the - * buffer. - *) - if Str.match_end r <= Netstream.window_length s then begin - Str.match_end r - end - else raise Not_found - with - Not_found -> - if Netstream.at_eos s then raise Not_found; - (* The regexp did not match: Move the window by one block. - *) - let n = - min - (Netstream.window_length s) - (Netstream.block_size s) - in - Netstream.move s n; - search_first_boundary() - in - - (* Subtask 3: Search the next boundary line. Invoke 'add' for every - * read chunk - *) - let rec search_next_boundary p = - (* Returns the position directly after the boundary on the same line *) - try - (* Search boundary per regexp: *) - let i,r = Str.search_forward - boundary1_re - (Netbuffer.unsafe_buffer (Netstream.window s)) - 0 - in - (* If match_end <= window_length, the search was successful. - * Otherwise, we searched in the uninitialized region of the - * buffer. - *) - if Str.match_end r <= Netstream.window_length s then begin - (* Add the last chunk of the part. *) - let n = - (* i is a LF. i - 1 should be CR. Ignore these characters. *) - if i >= 1 then - match (Netbuffer.unsafe_buffer (Netstream.window s)).[ i - 1 ] with - '\013' -> i - 1 - | _ -> i - else - i - in - (* Printf.printf "add n=%d\n" n; *) - add p s 0 n; - Str.match_end r - end - else raise Not_found - with - Not_found -> - if Netstream.at_eos s then - failwith "Mimestring.scan_multipart_body_from_netstream: next MIME boundary not found"; - (* The regexp did not match: Add the first block of the window; - * and move the window. - *) - let n = - min - (Netstream.window_length s) - (Netstream.block_size s) - in - (* Printf.printf "add n=%d\n" n; *) - add p s 0 n; - Netstream.move s n; - search_next_boundary p - in - - (* Subtask 4: Search the end of the boundary line *) - let rec search_end_of_line k = - (* Search LF beginning at position k. Discard any contents until that. *) - try - let i,r = Str.search_forward - lf_re - (Netbuffer.unsafe_buffer (Netstream.window s)) - k - in - (* If match_end <= window_length, the search was successful. - * Otherwise, we searched in the uninitialized region of the - * buffer. - *) - if Str.match_end r <= Netstream.window_length s then begin - Str.match_end r - end - else raise Not_found - with - Not_found -> - if Netstream.at_eos s then - failwith "Mimestring.scan_multipart_body_from_netstream: MIME boundary without line end"; - (* The regexp did not match: move the window. - *) - let n = Netstream.window_length s in - Netstream.move s n; - search_end_of_line 0 - in - - (* Subtask 5: Check whether "--" follows the boundary on the same line *) - let check_whether_last_boundary k = - (* k: The position directly after the boundary. *) - Netstream.want s (k+2); - let str = Netbuffer.unsafe_buffer (Netstream.window s) in - (Netstream.window_length s >= k+2) && str.[k] = '-' && str.[k+1] = '-' - in - - (* Subtask 6: Check whether the buffer begins with a boundary. *) - let check_beginning_is_boundary () = - let m = String.length boundary + 2 in - Netstream.want s m; - let str = Netbuffer.unsafe_buffer (Netstream.window s) in - (Netstream.window_length s >= m) && - (Str.string_partial_match boundary2_re str 0 <> None) - in - - let rec parse_part () = - (* The first byte of the current window of s contains the character - * directly following the boundary line that starts this part. - *) - (* Search the end of the MIME header: *) - let k_eoh = search_end_of_header 0 in - (* Printf.printf "k_eoh=%d\n" k_eoh; *) - (* Get the MIME header: *) - let str = Netbuffer.unsafe_buffer (Netstream.window s) in - let header, k_eoh' = scan_header str 0 k_eoh in - assert (k_eoh = k_eoh'); - (* Move the window over the header: *) - Netstream.move s k_eoh; - (* Create the part: *) - let p = create header in - let continue = - begin try - (* Search the next boundary; add the chunks while searching: *) - let k_eob = search_next_boundary p in - (* Printf.printf "k_eob=%d\n" k_eob; *) - (* Is this the last boundary? *) - if check_whether_last_boundary k_eob then begin - (* Skip the rest: *) - while not (Netstream.at_eos s) do - Netstream.move s (Netstream.window_length s) - done; - Netstream.move s (Netstream.window_length s); - false - end - else begin - (* Move to the beginning of the next line: *) - let k_eol = search_end_of_line k_eob in - Netstream.move s k_eol; - true - end - with - any -> - (try stop p with _ -> ()); - raise any - end in - stop p; - if continue then - (* Continue with next part: *) - parse_part() - in - - (* Check whether s directly begins with a boundary: *) - if check_beginning_is_boundary() then begin - (* Move to the beginning of the next line: *) - let k_eol = search_end_of_line 0 in - Netstream.move s k_eol; - (* Begin with first part: *) - parse_part() - end - else begin - (* Search the first boundary: *) - try - let k_eob = search_first_boundary() in - (* Printf.printf "k_eob=%d\n" k_eob; *) - (* Move to the beginning of the next line: *) - let k_eol = search_end_of_line k_eob in - (* Printf.printf "k_eol=%d\n" k_eol; *) - Netstream.move s k_eol; - (* Begin with first part: *) - parse_part() - with - Not_found -> - (* No boundary at all: The body is empty. *) - () - end; -;; - - -(* ====================================================================== - * History: - * - * $Log$ - * Revision 1.1 2000/11/17 09:57:27 lpadovan - * Initial revision - * - * Revision 1.8 2000/08/13 00:04:36 gerd - * Encoded_word -> EncodedWord - * Bugfixes. - * - * Revision 1.7 2000/08/07 00:25:14 gerd - * Implemented the new functions for structured field lexing. - * - * Revision 1.6 2000/06/25 22:34:43 gerd - * Added labels to arguments. - * - * Revision 1.5 2000/06/25 21:15:48 gerd - * Checked thread-safety. - * - * Revision 1.4 2000/05/16 22:30:14 gerd - * Added support for some types of malformed MIME messages. - * - * Revision 1.3 2000/04/15 13:09:01 gerd - * Implemented uploads to temporary files. - * - * Revision 1.2 2000/03/02 01:15:30 gerd - * Updated. - * - * Revision 1.1 2000/02/25 15:21:12 gerd - * Initial revision. - * - * - *) diff --git a/helm/DEVEL/pxp/netstring/mimestring.mli b/helm/DEVEL/pxp/netstring/mimestring.mli deleted file mode 100644 index 39634b59c..000000000 --- a/helm/DEVEL/pxp/netstring/mimestring.mli +++ /dev/null @@ -1,683 +0,0 @@ -(* $Id$ - * ---------------------------------------------------------------------- - * - *) - -(**********************************************************************) -(* Collection of auxiliary functions to parse MIME headers *) -(**********************************************************************) - - -val scan_header : - ?unfold:bool -> - string -> start_pos:int -> end_pos:int -> - ((string * string) list * int) - (* let params, i2 = scan_header s i0 i1: - * - * DESCRIPTION - * - * Scans the MIME header that begins at position i0 in the string s - * and that must end somewhere before position i1. It is intended - * that in i1 the character position following the end of the body of the - * MIME message is passed. - * Returns the parameters of the header as (name,value) pairs (in - * params), and in i2 the position of the character following - * directly after the header (i.e. after the blank line separating - * the header from the body). - * The following normalizations have already been applied: - * - The names are all in lowercase - * - Newline characters (CR and LF) have been removed (unless - * ?unfold:false has been passed) - * - Whitespace at the beginning and at the end of values has been - * removed (unless ?unfold:false is specified) - * The rules of RFC 2047 have NOT been applied. - * The function fails if the header violates the header format - * strongly. (Some minor deviations are tolerated, e.g. it is sufficient - * to separate lines by only LF instead of CRLF.) - * - * OPTIONS: - * - * unfold: If true (the default), folded lines are concatenated and - * returned as one line. This means that CR and LF characters are - * deleted and that whitespace at the beginning and the end of the - * string is removed. - * You may set ?unfold:false to locate individual characters in the - * parameter value exactly. - * - * ABOUT MIME MESSAGE FORMAT: - * - * This is the modern name for messages in "E-Mail format". Messages - * consist of a header and a body; the first empty line separates both - * parts. The header contains lines "param-name: param-value" where - * the param-name must begin on column 0 of the line, and the ":" - * separates the name and the value. So the format is roughly: - * - * param1-name: param1-value - * ... - * paramN-name: paramN-value - * - * body - * - * This function wants in i0 the position of the first character of - * param1-name in the string, and in i1 the position of the character - * following the body. It returns as i2 the position where the body - * begins. Furthermore, in 'params' all parameters are returned that - * exist in the header. - * - * DETAILS - * - * Note that parameter values are restricted; you cannot represent - * arbitrary strings. The following problems can arise: - * - Values cannot begin with whitespace characters, because there - * may be an arbitrary number of whitespaces between the ':' and the - * value. - * - Values (and names of parameters, too) must only be formed of - * 7 bit ASCII characters. (If this is not enough, the MIME standard - * knows the extension RFC 2047 that allows that header values may - * be composed of arbitrary characters of arbitrary character sets.) - * - Header values may be broken into several lines, the continuation - * lines must begin with whitespace characters. This means that values - * must not contain line breaks as semantical part of the value. - * And it may mean that ONE whitespace character is not distinguishable - * from SEVERAL whitespace characters. - * - Header lines must not be longer than 76 characters. Values that - * would result into longer lines must be broken into several lines. - * This means that you cannot represent strings that contain too few - * whitespace characters. - * - Some gateways pad the lines with spaces at the end of the lines. - * - * This implementation of a MIME scanner tolerates a number of - * deviations from the standard: long lines are not rejected; 8 bit - * values are accepted; lines may be ended only with LF instead of - * CRLF. - * Furthermore, header values are transformed: - * - leading and trailing spaces are always removed - * - CRs and LFs are deleted; it is guaranteed that there is at least - * one space or tab where CR/LFs are deleted. - * Last but not least, the names of the header values are converted - * to lowercase; MIME specifies that they are case-independent. - * - * COMPATIBILITY WITH THE STANDARD - * - * This function can parse all MIME headers that conform to RFC 822. - * But there may be still problems, as RFC 822 allows some crazy - * representations that are actually not used in practice. - * In particular, RFC 822 allows it to use backslashes to "indicate" - * that a CRLF sequence is semantically meant as line break. As this - * function normally deletes CRLFs, it is not possible to recognize such - * indicators in the result of the function. - *) - -(**********************************************************************) - -(* The following types and functions allow it to build scanners for - * structured MIME values in a highly configurable way. - * - * WHAT ARE STRUCTURED VALUES? - * - * RFC 822 (together with some other RFCs) defines lexical rules - * how formal MIME header values should be divided up into tokens. Formal - * MIME headers are those headers that are formed according to some - * grammar, e.g. mail addresses or MIME types. - * Some of the characters separate phrases of the value; these are - * the "special" characters. For example, '@' is normally a special - * character for mail addresses, because it separates the user name - * from the domain name. RFC 822 defines a fixed set of special - * characters, but other RFCs use different sets. Because of this, - * the following functions allow it to configure the set of special characters. - * Every sequence of characters may be embraced by double quotes, - * which means that the sequence is meant as literal data item; - * special characters are not recognized inside a quoted string. You may - * use the backslash to insert any character (including double quotes) - * verbatim into the quoted string (e.g. "He said: \"Give it to me!\""). - * The sequence of a backslash character and another character is called - * a quoted pair. - * Structured values may contain comments. The beginning of a comment - * is indicated by '(', and the end by ')'. Comments may be nested. - * Comments may contain quoted pairs. A - * comment counts as if a space character were written instead of it. - * Control characters are the ASCII characters 0 to 31, and 127. - * RFC 822 demands that MIME headers are 7 bit ASCII strings. Because - * of this, this function also counts the characters 128 to 255 as - * control characters. - * Domain literals are strings embraced by '[' and ']'; such literals - * may contain quoted pairs. Today, domain literals are used to specify - * IP addresses. - * Every character sequence not falling in one of the above categories - * is an atom (a sequence of non-special and non-control characters). - * When recognized, atoms may be encoded in a character set different than - * US-ASCII; such atoms are called encoded words (see RFC 2047). - * - * EXTENDED INTERFACE: - * - * In order to scan a string containing a MIME value, you must first - * create a mime_scanner using the function create_mime_scanner. - * The scanner contains the reference to the scanned string, and a - * specification how the string is to be scanned. The specification - * consists of the lists 'specials' and 'scan_options'. - * - * The character list 'specials' specifies the set of special characters. - * These characters are returned as Special c token; the following additional - * rules apply: - * - * - Spaces: - * If ' ' in specials: A space character is returned as Special ' '. - * Note that there may also be an effect on how comments are returned - * (see below). - * If ' ' not in specials: Spaces are ignored. - * - * - Tabs, CRs, LFs: - * If '\t' in specials: A tab character is returned as Special '\t'. - * If '\t' not in specials: Tabs are ignored. - * - * If '\r' in specials: A CR character is returned as Special '\r'. - * If '\r' not in specials: CRs are ignored. - * - * If '\n' in specials: A LF character is returned as Special '\n'. - * If '\n' not in specials: LFs are ignored. - * - * - Comments: - * If '(' in specials: Comments are not recognized. The character '(' - * is returned as Special '('. - * If '(' not in specials: Comments are recognized. How comments are - * returned, depends on the following: - * If Return_comments in scan_options: Outer comments are returned as - * Comment (note that inner comments count but - * are not returned as tokens) - * If otherwise ' ' in specials: Outer comments are returned as - * Special ' ' - * Otherwise: Comments are recognized but ignored. - * - * - Quoted strings: - * If '"' in specials: Quoted strings are not recognized, and double quotes - * are returned as Special '"'. - * If '"' not in specials: Quoted strings are returned as QString tokens. - * - * - Domain literals: - * If '[' in specials: Domain literals are not recognized, and left brackets - * are returned as Special '['. - * If '[' not in specials: Domain literals are returned as DomainLiteral - * tokens. - * - * Note that the rule for domain literals is completely new in netstring-0.9. - * It may cause incompatibilities with previous versions if '[' is not - * special. - * - * The general rule for special characters: Every special character c is - * returned as Special c, and any additional scanning functionality - * for this character is turned off. - * - * If recognized, quoted strings are returned as QString s, where - * s is the string without the embracing quotes, and with already - * decoded quoted pairs. - * - * Control characters c are returned as Control c. - * - * If recognized, comments may either be returned as spaces (in the case - * you are not interested in the contents of comments), or as Comment tokens. - * The contents of comments are not further scanned; you must start a - * subscanner to analyze comments as structured values. - * - * If recognized, domain literals are returned as DomainLiteral s, where - * s is the literal without brackets, and with decoded quoted pairs. - * - * Atoms are returned as Atom s where s is a longest sequence of - * atomic characters (all characters which are neither special nor control - * characters nor delimiters for substructures). If the option - * Recognize_encoded_words is on, atoms which look like encoded words - * are returned as EncodedWord tokens. (Important note: Neither '?' nor - * '=' must be special in order to enable this functionality.) - * - * After the mime_scanner has been created, you can scan the tokens by - * invoking scan_token which returns one token at a time, or by invoking - * scan_token_list which returns all following tokens. - * - * There are two token types: s_token is the base type and is intended to - * be used for pattern matching. s_extended_token is a wrapper that - * additionally contains information where the token occurs. - * - * SIMPLE INTERFACE - * - * Instead of creating a mime_scanner and calling the scan functions, - * you may also invoke scan_structured_value. This function returns the - * list of tokens directly; however, it is restricted to s_token. - * - * EXAMPLES - * - * scan_structured_value "user@domain.com" [ '@'; '.' ] [] - * = [ Atom "user"; Special '@'; Atom "domain"; Special '.'; Atom "com" ] - * - * scan_structured_value "user @ domain . com" [ '@'; '.' ] [] - * = [ Atom "user"; Special '@'; Atom "domain"; Special '.'; Atom "com" ] - * - * scan_structured_value "user(Do you know him?)@domain.com" [ '@'; '.' ] [] - * = [ Atom "user"; Special '@'; Atom "domain"; Special '.'; Atom "com" ] - * - * scan_structured_value "user(Do you know him?)@domain.com" [ '@'; '.' ] - * [ Return_comments ] - * = [ Atom "user"; Comment; Special '@'; Atom "domain"; Special '.'; - * Atom "com" ] - * - * scan_structured_value "user (Do you know him?) @ domain . com" - * [ '@'; '.'; ' ' ] [] - * = [ Atom "user"; Special ' '; Special ' '; Special ' '; Special '@'; - * Special ' '; Atom "domain"; - * Special ' '; Special '.'; Special ' '; Atom "com" ] - * - * scan_structured_value "user (Do you know him?) @ domain . com" - * [ '@'; '.'; ' ' ] [ Return_comments ] - * = [ Atom "user"; Special ' '; Comment; Special ' '; Special '@'; - * Special ' '; Atom "domain"; - * Special ' '; Special '.'; Special ' '; Atom "com" ] - * - * scan_structured_value "user @ domain . com" [ '@'; '.'; ' ' ] [] - * = [ Atom "user"; Special ' '; Special '@'; Special ' '; Atom "domain"; - * Special ' '; Special '.'; Special ' '; Atom "com" ] - * - * scan_structured_value "user(Do you know him?)@domain.com" ['@'; '.'; '('] - * [] - * = [ Atom "user"; Special '('; Atom "Do"; Atom "you"; Atom "know"; - * Atom "him?)"; Special '@'; Atom "domain"; Special '.'; Atom "com" ] - * - * scan_structured_value "\"My.name\"@domain.com" [ '@'; '.' ] [] - * = [ QString "My.name"; Special '@'; Atom "domain"; Special '.'; - * Atom "com" ] - * - * scan_structured_value "=?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?=" - * [ ] [ ] - * = [ Atom "=?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?=" ] - * - * scan_structured_value "=?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?=" - * [ ] [ Recognize_encoded_words ] - * = [ EncodedWord("ISO-8859-1", "Q", "Keld_J=F8rn_Simonsen") ] - * - *) - - - -type s_token = - Atom of string - | EncodedWord of (string * string * string) - | QString of string - | Control of char - | Special of char - | DomainLiteral of string - | Comment - | End - -(* - Words are: Atom, EncodedWord, QString. - * - Atom s: The character sequence forming the atom is contained in s - * - EncodedWord(charset, encoding, encoded_string) means: - * * charset is the (uppercase) character set - * * encoding is either "Q" or "B" - * * encoded_string: contains the text of the word; the text is represented - * as octet string following the conventions for character set charset and - * then encoded either as "Q" or "B" string. - * - QString s: Here, s are the characters inside the double quotes after - * decoding any quoted pairs (backslash + character pairs) - * - Control c: The control character c - * - Special c: The special character c - * - DomainLiteral s: s contains the characters inside the brackets after - * decoding any quoted pairs - * - Comment: if the option Return_comments is specified, this token - * represents the whole comment. - * - End: Is returned after the last token - *) - - -type s_option = - No_backslash_escaping - (* Do not handle backslashes in quoted string and comments as escape - * characters; backslashes are handled as normal characters. - * For example: "C:\dir\file" will be returned as - * QString "C:\dir\file", and not as QString "C:dirfile". - * - This is a common error in many MIME implementations. - *) - | Return_comments - (* Comments are returned as token Comment (unless '(' is included - * in the list of special characters, in which case comments are - * not recognized at all). - * You may get the exact location of the comment by applying - * get_pos and get_length to the extended token. - *) - | Recognize_encoded_words - (* Enables that encoded words are recognized and returned as - * EncodedWord(charset,encoding,content) instead of Atom. - *) - -type s_extended_token - (* An opaque type containing s_token plus: - * - where the token occurs - * - RFC-2047 access functions - *) - -val get_token : s_extended_token -> s_token - (* Return the s_token within the s_extended_token *) - -val get_decoded_word : s_extended_token -> string -val get_charset : s_extended_token -> string - (* Return the decoded word (the contents of the word after decoding the - * "Q" or "B" representation), and the character set of the decoded word - * (uppercase). - * These functions not only work for EncodedWord: - * - Atom: Returns the atom without decoding it - * - QString: Returns the characters inside the double quotes, and - * decodes any quoted pairs (backslash + character) - * - Control: Returns the one-character string - * - Special: Returns the one-character string - * - DomainLiteral: Returns the characters inside the brackets, and - * decodes any quoted pairs - * - Comment: Returns "" - * The character set is "US-ASCII" for these tokens. - *) - -val get_pos : s_extended_token -> int - (* Return the byte position where the token starts in the string - * (the first byte has position 0) - *) - -val get_line : s_extended_token -> int - (* Return the line number where the token starts (numbering begins - * usually with 1) - *) - -val get_column : s_extended_token -> int - (* Return the column of the line where the token starts (first column - * is number 0) - *) - -val get_length : s_extended_token -> int - (* Return the length of the token in bytes *) - -val separates_adjacent_encoded_words : s_extended_token -> bool - (* True iff the current token is white space (Special ' ', Special '\t', - * Special '\r' or Special '\n') and the last non-white space token - * was EncodedWord and the next non-white space token will be - * EncodedWord. - * Such spaces do not count and must be ignored by any application. - *) - - -type mime_scanner - -val create_mime_scanner : - specials:char list -> - scan_options:s_option list -> - ?pos:int -> - ?line:int -> - ?column:int -> - string -> - mime_scanner - (* Creates a new mime_scanner scanning the passed string. - * specials: The list of characters recognized as special characters. - * scan_options: The list of global options modifying the behaviour - * of the scanner - * pos: The position of the byte where the scanner starts in the - * passed string. Defaults to 0. - * line: The line number of this byte. Defaults to 1. - * column: The column number of this byte. Default to 0. - * - * The optional parameters pos, line, column are intentionally after - * scan_options and before the string argument, so you can specify - * scanners by partially applying arguments to create_mime_scanner - * which are not yet connected with a particular string: - * let my_scanner_spec = create_mime_scanner my_specials my_options in - * ... - * let my_scanner = my_scanner_spec my_string in - * ... - *) - -val get_pos_of_scanner : mime_scanner -> int -val get_line_of_scanner : mime_scanner -> int -val get_column_of_scanner : mime_scanner -> int - (* Return the current position, line, and column of a mime_scanner. - * The primary purpose of these functions is to simplify switching - * from one mime_scanner to another within a string: - * - * let scanner1 = create_mime_scanner ... s in - * ... now scanning some tokens from s using scanner1 ... - * let scanner2 = create_mime_scanner ... - * ?pos:(get_pos_of_scanner scanner1) - * ?line:(get_line_of_scanner scanner1) - * ?column:(get_column_of_scanner scanner1) - * s in - * ... scanning more tokens from s using scanner2 ... - * - * RESTRICTION: These functions are not available if the option - * Recognize_encoded_words is on. The reason is that this option - * enables look-ahead scanning; please use the location of the last - * scanned token instead. - * It is currently not clear whether a better implementation is needed - * (costs a bit more time). - * - * Note: To improve the performance of switching, it is recommended to - * create scanner specs in advance (see the example my_scanner_spec - * above). - *) - -val scan_token : mime_scanner -> (s_extended_token * s_token) - (* Returns the next token, or End if there is no more token. *) - -val scan_token_list : mime_scanner -> (s_extended_token * s_token) list - (* Returns all following tokens as a list (excluding End) *) - -val scan_structured_value : string -> char list -> s_option list -> s_token list - (* This function is included for backwards compatibility, and for all - * cases not requiring extended tokens. - * - * It scans the passed string according to the list of special characters - * and the list of options, and returns the list of all tokens. - *) - -val specials_rfc822 : char list -val specials_rfc2045 : char list - (* The sets of special characters defined by the RFCs 822 and 2045. - * - * CHANGE in netstring-0.9: '[' and ']' are no longer special because - * there is now support for domain literals. - * '?' and '=' are not special in the rfc2045 version because there is - * already support for encoded words. - *) - - -(**********************************************************************) - -(* Widely used scanners: *) - - -val scan_encoded_text_value : string -> s_extended_token list - (* Scans a "text" value. The returned token list contains only - * Special, Atom and EncodedWord tokens. - * Spaces, TABs, CRs, LFs are returned unless - * they occur between adjacent encoded words in which case - * they are ignored. - *) - - -val scan_value_with_parameters : string -> s_option list -> - (string * (string * string) list) - (* let name, params = scan_value_with_parameters s options: - * Scans phrases like - * name ; p1=v1 ; p2=v2 ; ... - * The scan is done with the set of special characters [';', '=']. - *) - -val scan_mime_type : string -> s_option list -> - (string * (string * string) list) - (* let name, params = scan_mime_type s options: - * Scans MIME types like - * text/plain; charset=iso-8859-1 - * The name of the type and the names of the parameters are converted - * to lower case. - *) - - -(**********************************************************************) - -(* Scanners for MIME bodies *) - -val scan_multipart_body : string -> start_pos:int -> end_pos:int -> - boundary:string -> - ((string * string) list * string) list - (* let [params1, value1; params2, value2; ...] - * = scan_multipart_body s i0 i1 b - * - * Scans the string s that is the body of a multipart message. - * The multipart message begins at position i0 in s and i1 the position - * of the character following the message. In b the boundary string - * must be passed (this is the "boundary" parameter of the multipart - * MIME type, e.g. multipart/mixed;boundary="some string" ). - * The return value is the list of the parts, where each part - * is returned as pair (params, value). The left component params - * is the list of name/value pairs of the header of the part. The - * right component is the RAW content of the part, i.e. if the part - * is encoded ("content-transfer-encoding"), the content is returned - * in the encoded representation. The caller must himself decode - * the content. - * The material before the first boundary and after the last - * boundary is not returned. - * - * MULTIPART MESSAGES - * - * The MIME standard defines a way to group several message parts to - * a larger message (for E-Mails this technique is known as "attaching" - * files to messages); these are the so-called multipart messages. - * Such messages are recognized by the major type string "multipart", - * e.g. multipart/mixed or multipart/form-data. Multipart types MUST - * have a boundary parameter because boundaries are essential for the - * representation. - * Multipart messages have a format like - * - * ...Header... - * Content-type: multipart/xyz; boundary="abc" - * ...Header... - * - * Body begins here ("prologue") - * --abc - * ...Header part 1... - * - * ...Body part 1... - * --abc - * ...Header part 2... - * - * - * ...Body part 2 - * --abc - * ... - * --abc-- - * Epilogue - * - * The parts are separated by boundary lines which begin with "--" and - * the string passed as boundary parameter. (Note that there may follow - * arbitrary text on boundary lines after "--abc".) The boundary is - * chosen such that it does not occur as prefix of any line of the - * inner parts of the message. - * The parts are again MIME messages, with header and body. Note - * that it is explicitely allowed that the parts are even multipart - * messages. - * The texts before the first boundary and after the last boundary - * are ignored. - * Note that multipart messages as a whole MUST NOT be encoded. - * Only the PARTS of the messages may be encoded (if they are not - * multipart messages themselves). - * - * Please read RFC 2046 if want to know the gory details of this - * brain-dead format. - *) - -val scan_multipart_body_and_decode : string -> start_pos:int -> end_pos:int -> - boundary:string -> - ((string * string) list * string) list - (* Same as scan_multipart_body, but decodes the bodies of the parts - * if they are encoded using the methods "base64" or "quoted printable". - * Fails, if an unknown encoding is used. - *) - -val scan_multipart_body_from_netstream - : Netstream.t -> - boundary:string -> - create:((string * string) list -> 'a) -> - add:('a -> Netstream.t -> int -> int -> unit) -> - stop:('a -> unit) -> - unit - (* scan_multipart_body_from_netstream s b create add stop: - * - * Reads the MIME message from the netstream s block by block. The - * parts are delimited by the boundary b. - * - * Once a new part is detected and begins, the function 'create' is - * called with the MIME header as argument. The result p of this function - * may be of any type. - * - * For every chunk of the part that is being read, the function 'add' - * is invoked: add p s k n. - * Here, p is the value returned by the 'create' invocation for the - * current part. s is the netstream. The current window of s contains - * the read chunk completely; the chunk begins at position k of the - * window (relative to the beginning of the window) and has a length - * of n bytes. - * - * When the part has been fully read, the function 'stop' is - * called with p as argument. - * - * That means, for every part the following is executed: - * - let p = create h - * - add p s k1 n1 - * - add p s k2 n2 - * - ... - * - add p s kN nN - * - stop p - * - * IMPORTANT PRECONDITION: - * - The block size of the netstream s must be at least - * String.length b + 3 - * - * EXCEPTIONS: - * - Exceptions can happen because of ill-formed input, and within - * the callbacks of the functions 'create', 'add', 'stop'. - * - If the exception happens while part p is being read, and the - * 'create' function has already been called (successfully), the - * 'stop' function is also called (you have the chance to close files). - *) - - -(* THREAD-SAFETY: - * The functions are thread-safe as long as the threads do not share - * values. - *) - -(* ====================================================================== - * History: - * - * $Log$ - * Revision 1.1 2000/11/17 09:57:27 lpadovan - * Initial revision - * - * Revision 1.8 2000/08/13 00:04:36 gerd - * Encoded_word -> EncodedWord - * Bugfixes. - * - * Revision 1.7 2000/08/07 00:25:00 gerd - * Major update of the interface for structured field lexing. - * - * Revision 1.6 2000/06/25 22:34:43 gerd - * Added labels to arguments. - * - * Revision 1.5 2000/06/25 21:15:48 gerd - * Checked thread-safety. - * - * Revision 1.4 2000/05/16 22:29:12 gerd - * New "option" arguments specifying the level of MIME - * compatibility. - * - * Revision 1.3 2000/04/15 13:09:01 gerd - * Implemented uploads to temporary files. - * - * Revision 1.2 2000/03/02 01:15:30 gerd - * Updated. - * - * Revision 1.1 2000/02/25 15:21:12 gerd - * Initial revision. - * - * - *) diff --git a/helm/DEVEL/pxp/netstring/netbuffer.ml b/helm/DEVEL/pxp/netstring/netbuffer.ml deleted file mode 100644 index d6fc40ff7..000000000 --- a/helm/DEVEL/pxp/netstring/netbuffer.ml +++ /dev/null @@ -1,145 +0,0 @@ -(* $Id$ - * ---------------------------------------------------------------------- - * - *) - -type t = - { mutable buffer : string; - mutable length : int; - } - -(* To help the garbage collector: - * The 'buffer' has a minimum length of 31 bytes. This minimum can still - * be stored in the minor heap. - * The 'buffer' has a length which is always near a multiple of two. This - * limits the number of different bucket sizes, and simplifies reallocation - * of freed memory. - *) - -(* Optimal string length: - * Every string takes: 1 word for the header, enough words for the - * contents + 1 Null byte (for C compatibility). - * If the buffer grows, it is best to use a new string length such - * that the number of words is exactly twice as large as for the previous - * string. - * n: length of the previous string in bytes - * w: storage size of the previous string in words - * n': length of the new string in bytes - * w' = 2*w: storage size of the new string in words - * - * w = (n+1) / word_length + 1 - * [it is assumed that (n+1) is always a multiple of word_length] - * - * n' = (2*w - 1) * word_length - 1 - * - * n' = [2 * ( [n+1] / word_length + 1) - 1] * word_length - 1 - * = ... - * = (2*n + 2) + word_length - 1 - * = 2 * n + word_length + 1 - * - * n'+1 is again a multiple of word_length: - * n'+1 = 2*n + 2 + word_length - * = 2*(n+1) + word_length - * = a multiple of word_length because n+1 is a multiple of word_length - *) - -let word_length = Sys.word_size / 8 (* in bytes *) - -let create n = - { buffer = String.create (max n 31); length = 0; } - -let contents b = - String.sub b.buffer 0 b.length - -let sub b ~pos:k ~len:n = - if k+n > b.length then - raise (Invalid_argument "Netbuffer.sub"); - String.sub b.buffer k n - -let unsafe_buffer b = - b.buffer - -let length b = - b.length - -let add_string b s = - let l = String.length s in - if l + b.length > String.length b.buffer then begin - let l' = l + b.length in - let rec new_size s = - if s >= l' then s else new_size(2*s + word_length + 1) - in - let buffer' = String.create (new_size (String.length b.buffer)) in - String.blit b.buffer 0 buffer' 0 b.length; - b.buffer <- buffer' - end; - String.blit s 0 b.buffer b.length l; - b.length <- b.length + l - -let add_sub_string b s ~pos:k ~len:l = - if l + b.length > String.length b.buffer then begin - let l' = l + b.length in - let rec new_size s = - if s >= l' then s else new_size(2*s + word_length + 1) - in - let buffer' = String.create (new_size (String.length b.buffer)) in - String.blit b.buffer 0 buffer' 0 b.length; - b.buffer <- buffer' - end; - String.blit s k b.buffer b.length l; - b.length <- b.length + l - -let delete b ~pos:k ~len:l = - (* deletes l bytes at position k in b *) - let n = String.length b.buffer in - if k+l <> n & k <> n then - String.blit b.buffer (k+l) b.buffer k (n-l-k); - b.length <- b.length - l; - () - -let try_shrinking b = - (* If the buffer size decreases drastically, reallocate the buffer *) - if b.length < (String.length b.buffer / 2) then begin - let rec new_size s = - if s >= b.length then s else new_size(2*s + word_length + 1) - in - let buffer' = String.create (new_size 31) in - String.blit b.buffer 0 buffer' 0 b.length; - b.buffer <- buffer' - end - -let clear b = - delete b 0 (b.length) - -let index_from b k c = - if k > b.length then - raise (Invalid_argument "Netbuffer.index_from"); - let p = String.index_from b.buffer k c in - if p >= b.length then raise Not_found; - p - -let print_buffer b = - Format.printf - "" - b.length - (String.length b.buffer) -;; - -(* ====================================================================== - * History: - * - * $Log$ - * Revision 1.1 2000/11/17 09:57:27 lpadovan - * Initial revision - * - * Revision 1.3 2000/06/25 22:34:43 gerd - * Added labels to arguments. - * - * Revision 1.2 2000/06/24 20:20:33 gerd - * Added the toploop printer. - * - * Revision 1.1 2000/04/15 13:07:48 gerd - * Initial revision. - * - * - *) diff --git a/helm/DEVEL/pxp/netstring/netbuffer.mli b/helm/DEVEL/pxp/netstring/netbuffer.mli deleted file mode 100644 index 0ecd61e6a..000000000 --- a/helm/DEVEL/pxp/netstring/netbuffer.mli +++ /dev/null @@ -1,93 +0,0 @@ -(* $Id$ - * ---------------------------------------------------------------------- - * - *) - - -(* A Netbuffer.t is a buffer that can grow and shrink dynamically. *) - -type t - -val create : int -> t - (* Creates a netbuffer which allocates initially this number of bytes. - * The logical length is zero. - *) - -val contents : t -> string - (* Returns the contents of the buffer as fresh string. *) - -val sub : t -> pos:int -> len:int -> string - (* sub nb k n: returns the n characters starting at position n from - * netbuffer nb as fresh string - *) - -val length : t -> int - (* Returns the logical length of the buffer *) - -val add_string : t -> string -> unit - (* add_string nb s: Adds a copy of the string s to the logical end of - * the netbuffer nb. If necessary, the nb grows. - *) - -val add_sub_string : t -> string -> pos:int -> len:int -> unit - (* add_sub_string nb s k n: Adds the substring of s starting at position - * k with length n to the logical end of the netbuffer nb. If necessary, - * the nb grows. - * This is semantically the same as - * add_string nb (String.sub s k n), but the extra copy is avoided. - *) - -val delete : t -> pos:int -> len:int -> unit - (* delete nb k n: Deletes the n bytes at position k of netbuffer nb - * in-place. - * The netbuffer does not shrink! - *) - -val clear : t -> unit - (* deletes all contents from the buffer. As 'delete', the netbuffer does - * not shrink. - *) - -val try_shrinking : t -> unit - (* try_shrinking nb: If the length of the buffer is less than half of - * the allocated space, the netbuffer is reallocated in order to save - * memory. - *) - -val index_from : t -> int -> char -> int - (* index_from nb k c: Searches the character c in the netbuffer beginning - * at position k. If found, the position of the left-most occurence is - * returned. Otherwise, Not_found is raised. - *) - -val unsafe_buffer : t -> string - (* WARNING! This is a low-level function! - * Returns the current string that internally holds the buffer. - * The byte positions 0 to length - 1 actually store the contents of - * the buffer. You can directly read and modify the buffer. Note that - * there is no protection if you read or write positions beyond the - * length of the buffer. - *) - -val print_buffer : t -> unit - (* For the toploop *) - - -(* ====================================================================== - * History: - * - * $Log$ - * Revision 1.1 2000/11/17 09:57:27 lpadovan - * Initial revision - * - * Revision 1.3 2000/06/25 22:34:43 gerd - * Added labels to arguments. - * - * Revision 1.2 2000/06/24 20:20:33 gerd - * Added the toploop printer. - * - * Revision 1.1 2000/04/15 13:07:48 gerd - * Initial revision. - * - * - *) diff --git a/helm/DEVEL/pxp/netstring/netconversion.ml b/helm/DEVEL/pxp/netstring/netconversion.ml deleted file mode 100644 index e740654ad..000000000 --- a/helm/DEVEL/pxp/netstring/netconversion.ml +++ /dev/null @@ -1,864 +0,0 @@ -(* $Id$ - * ---------------------------------------------------------------------- - *) - -exception Malformed_code - - -type encoding = - [ `Enc_utf8 (* UTF-8 *) - | `Enc_java - | `Enc_utf16 (* UTF-16 with unspecified endianess (restricted usage) *) - | `Enc_utf16_le (* UTF-16 little endian *) - | `Enc_utf16_be (* UTF-16 big endian *) - | `Enc_usascii (* US-ASCII (only 7 bit) *) - | `Enc_iso88591 (* ISO-8859-1 *) - | `Enc_iso88592 (* ISO-8859-2 *) - | `Enc_iso88593 (* ISO-8859-3 *) - | `Enc_iso88594 (* ISO-8859-4 *) - | `Enc_iso88595 (* ISO-8859-5 *) - | `Enc_iso88596 (* ISO-8859-6 *) - | `Enc_iso88597 (* ISO-8859-7 *) - | `Enc_iso88598 (* ISO-8859-8 *) - | `Enc_iso88599 (* ISO-8859-9 *) - | `Enc_iso885910 (* ISO-8859-10 *) - | `Enc_iso885913 (* ISO-8859-13 *) - | `Enc_iso885914 (* ISO-8859-14 *) - | `Enc_iso885915 (* ISO-8859-15 *) - | `Enc_koi8r (* KOI8-R *) - | `Enc_jis0201 (* JIS-0201 *) - (* Microsoft: *) - | `Enc_windows1250 (* WINDOWS-1250 *) - | `Enc_windows1251 (* WINDOWS-1251 *) - | `Enc_windows1252 (* WINDOWS-1252 *) - | `Enc_windows1253 (* WINDOWS-1253 *) - | `Enc_windows1254 (* WINDOWS-1254 *) - | `Enc_windows1255 (* WINDOWS-1255 *) - | `Enc_windows1256 (* WINDOWS-1256 *) - | `Enc_windows1257 (* WINDOWS-1257 *) - | `Enc_windows1258 (* WINDOWS-1258 *) - (* IBM, ASCII-based: *) - | `Enc_cp437 - | `Enc_cp737 - | `Enc_cp775 - | `Enc_cp850 - | `Enc_cp852 - | `Enc_cp855 - | `Enc_cp856 - | `Enc_cp857 - | `Enc_cp860 - | `Enc_cp861 - | `Enc_cp862 - | `Enc_cp863 - | `Enc_cp864 - | `Enc_cp865 - | `Enc_cp866 - | `Enc_cp869 - | `Enc_cp874 - | `Enc_cp1006 - (* IBM, EBCDIC-based: *) - | `Enc_cp037 - | `Enc_cp424 - | `Enc_cp500 - | `Enc_cp875 - | `Enc_cp1026 - (* Adobe: *) - | `Enc_adobe_standard_encoding - | `Enc_adobe_symbol_encoding - | `Enc_adobe_zapf_dingbats_encoding - (* Apple: *) - | `Enc_macroman - - ] -;; - - -let norm_enc_name e = - (* Removes some characters from e; uppercase *) - let e' = String.create (String.length e) in - let rec next i j = - if i < String.length e then - match e.[i] with - ('-'|'_'|'.') -> next (i+1) j - | c -> e'.[j] <- c; next (i+1) (j+1) - else - j - in - let l = next 0 0 in - String.uppercase(String.sub e' 0 l) -;; - - -let encoding_of_string e = - match norm_enc_name e with - ("UTF16"|"UCS2"|"ISO10646UCS2") -> `Enc_utf16 - | "UTF16BE" -> `Enc_utf16_be - | "UTF16LE" -> `Enc_utf16_le - | "UTF8" -> `Enc_utf8 - | ("UTF8JAVA"|"JAVA") -> `Enc_java - | ("USASCII"|"ASCII"|"ISO646US"|"IBM367"|"CP367") -> `Enc_usascii - | ("ISO88591"|"LATIN1"|"IBM819"|"CP819") -> `Enc_iso88591 - | ("ISO88592"|"LATIN2") -> `Enc_iso88592 - | ("ISO88593"|"LATIN3") -> `Enc_iso88593 - | ("ISO88594"|"LATIN4") -> `Enc_iso88594 - | ("ISO88595"|"CYRILLIC") -> `Enc_iso88595 - | ("ISO88596"|"ARABIC"|"ECMA114"|"ASMO708") -> `Enc_iso88596 - | ("ISO88597"|"GREEK"|"GREEK8"|"ELOT928"|"ECMA118") -> `Enc_iso88597 - | ("ISO88598"|"HEBREW") -> `Enc_iso88598 - | ("ISO88599"|"LATIN5") -> `Enc_iso88599 - | ("ISO885910"|"LATIN6") -> `Enc_iso885910 - | "ISO885913" -> `Enc_iso885913 - | "ISO885914" -> `Enc_iso885914 - | "ISO885915" -> `Enc_iso885915 - | "KOI8R" -> `Enc_koi8r - | ("JIS0201"|"JISX0201"|"X0201") -> `Enc_jis0201 - - | "WINDOWS1250" -> `Enc_windows1250 - | "WINDOWS1251" -> `Enc_windows1251 - | "WINDOWS1252" -> `Enc_windows1252 - | "WINDOWS1253" -> `Enc_windows1253 - | "WINDOWS1254" -> `Enc_windows1254 - | "WINDOWS1255" -> `Enc_windows1255 - | "WINDOWS1256" -> `Enc_windows1256 - | "WINDOWS1257" -> `Enc_windows1257 - | "WINDOWS1258" -> `Enc_windows1258 - - | ("CP437"|"IBM437") -> `Enc_cp437 - | ("CP737"|"IBM737") -> `Enc_cp737 - | ("CP775"|"IBM775") -> `Enc_cp775 - | ("CP850"|"IBM850") -> `Enc_cp850 - | ("CP852"|"IBM852") -> `Enc_cp852 - | ("CP855"|"IBM855") -> `Enc_cp855 - | ("CP856"|"IBM856") -> `Enc_cp856 - | ("CP857"|"IBM857") -> `Enc_cp857 - | ("CP860"|"IBM860") -> `Enc_cp860 - | ("CP861"|"IBM861") -> `Enc_cp861 - | ("CP862"|"IBM862") -> `Enc_cp862 - | ("CP863"|"IBM863") -> `Enc_cp863 - | ("CP864"|"IBM864") -> `Enc_cp864 - | ("CP865"|"IBM865") -> `Enc_cp865 - | ("CP866"|"IBM866") -> `Enc_cp866 - | ("CP869"|"IBM869") -> `Enc_cp869 - | ("CP874"|"IBM874") -> `Enc_cp874 - | ("CP1006"|"IBM1006") -> `Enc_cp1006 - - | ("CP037"|"IBM037"|"EBCDICCPUS"|"EBCDICCPCA"|"EBCDICCPWT"| - "EBCDICCPNL") -> `Enc_cp037 - | ("CP424"|"IBM424"|"EBCDICCPHE") -> `Enc_cp424 - | ("CP500"|"IBM500"|"EBCDICCPBE"|"EBCDICCPCH") -> `Enc_cp500 - | ("CP875"|"IBM875") -> `Enc_cp875 - | ("CP1026"|"IBM1026") -> `Enc_cp1026 - - | "ADOBESTANDARDENCODING" -> `Enc_adobe_standard_encoding - | "ADOBESYMBOLENCODING" -> `Enc_adobe_symbol_encoding - | "ADOBEZAPFDINGBATSENCODING" -> `Enc_adobe_zapf_dingbats_encoding - - | "MACINTOSH" -> `Enc_macroman - - | _ -> - failwith "Netconversion.encoding_of_string: unknown encoding" -;; - - -let string_of_encoding (e : encoding) = - (* If there is a "preferred MIME name", this name is returned (see IANA). *) - match e with - `Enc_utf16 -> "UTF-16" - | `Enc_utf16_be -> "UTF-16-BE" - | `Enc_utf16_le -> "UTF-16-LE" - | `Enc_utf8 -> "UTF-8" - | `Enc_java -> "UTF-8-JAVA" - | `Enc_usascii -> "US-ASCII" - | `Enc_iso88591 -> "ISO-8859-1" - | `Enc_iso88592 -> "ISO-8859-2" - | `Enc_iso88593 -> "ISO-8859-3" - | `Enc_iso88594 -> "ISO-8859-4" - | `Enc_iso88595 -> "ISO-8859-5" - | `Enc_iso88596 -> "ISO-8859-6" - | `Enc_iso88597 -> "ISO-8859-7" - | `Enc_iso88598 -> "ISO-8859-8" - | `Enc_iso88599 -> "ISO-8859-9" - | `Enc_iso885910 -> "ISO-8859-10" - | `Enc_iso885913 -> "ISO-8859-13" - | `Enc_iso885914 -> "ISO-8859-14" - | `Enc_iso885915 -> "ISO-8859-15" - | `Enc_koi8r -> "KOI8-R" - | `Enc_jis0201 -> "JIS_X0201" - | `Enc_windows1250 -> "WINDOWS-1250" - | `Enc_windows1251 -> "WINDOWS-1251" - | `Enc_windows1252 -> "WINDOWS-1252" - | `Enc_windows1253 -> "WINDOWS-1253" - | `Enc_windows1254 -> "WINDOWS-1254" - | `Enc_windows1255 -> "WINDOWS-1255" - | `Enc_windows1256 -> "WINDOWS-1256" - | `Enc_windows1257 -> "WINDOWS-1257" - | `Enc_windows1258 -> "WINDOWS-1258" - | `Enc_cp437 -> "CP437" - | `Enc_cp737 -> "CP737" - | `Enc_cp775 -> "CP775" - | `Enc_cp850 -> "CP850" - | `Enc_cp852 -> "CP852" - | `Enc_cp855 -> "CP855" - | `Enc_cp856 -> "CP856" - | `Enc_cp857 -> "CP857" - | `Enc_cp860 -> "CP860" - | `Enc_cp861 -> "CP861" - | `Enc_cp862 -> "CP862" - | `Enc_cp863 -> "CP863" - | `Enc_cp864 -> "CP864" - | `Enc_cp865 -> "CP865" - | `Enc_cp866 -> "CP866" - | `Enc_cp869 -> "CP869" - | `Enc_cp874 -> "CP874" - | `Enc_cp1006 -> "CP1006" - | `Enc_cp037 -> "CP037" - | `Enc_cp424 -> "CP424" - | `Enc_cp500 -> "CP500" - | `Enc_cp875 -> "CP875" - | `Enc_cp1026 -> "CP1026" - | `Enc_adobe_standard_encoding -> "ADOBE-STANDARD-ENCODING" - | `Enc_adobe_symbol_encoding -> "ADOBE-SYMBOL-ENCODING" - | `Enc_adobe_zapf_dingbats_encoding -> "ADOBE-ZAPF-DINGBATS-ENCODING" - | `Enc_macroman -> "MACINTOSH" -;; - - -let read_iso88591 write s_in p_in l_in = - let rec scan k_in k_out c_out = - if k_in < l_in then begin - let p = Char.code s_in.[p_in + k_in] in - let n = write p k_out c_out in - if n < 0 then - k_in, k_out, `Enc_iso88591 - else - scan (k_in + 1) (k_out + n) (c_out + 1) - end - else - k_in, k_out, `Enc_iso88591 - in - scan 0 0 0 -;; - - -let read_usascii write s_in p_in l_in = - let rec scan k_in k_out c_out = - if k_in < l_in then begin - let p = Char.code s_in.[p_in + k_in] in - if p >= 0x80 then raise Malformed_code; - let n = write p k_out c_out in - if n < 0 then - k_in, k_out, `Enc_usascii - else - scan (k_in + 1) (k_out + n) (c_out + 1) - end - else - k_in, k_out, `Enc_usascii - in - scan 0 0 0 -;; - - -let read_8bit m_to_unicode enc write s_in p_in l_in = - let rec scan k_in k_out c_out = - if k_in < l_in then begin - let p_local = Char.code s_in.[p_in + k_in] in - let p_uni = Array.unsafe_get m_to_unicode p_local in - if p_uni < 0 then raise Malformed_code; - let n = write p_uni k_out c_out in - if n < 0 then - k_in, k_out, enc - else - scan (k_in + 1) (k_out + n) (c_out + 1) - end - else - k_in, k_out, enc - in - scan 0 0 0 -;; - - -let read_utf8 is_java write s_in p_in l_in = - let rec scan k_in k_out c_out = - if k_in < l_in then begin - let n_out, n_in = - match s_in.[p_in + k_in] with - '\000' -> - if is_java then raise Malformed_code; - write 0 k_out c_out, 1 - | ('\001'..'\127' as c) -> - write (Char.code c) k_out c_out, 1 - | ('\128'..'\223' as c) -> - if k_in + 1 >= l_in then - -1, 0 - else begin - let n1 = Char.code c in - let n2 = Char.code (s_in.[p_in + k_in + 1]) in - if is_java && (n1 = 0x80 && n2 = 0xc0) then - write 0 k_out c_out, 2 - else begin - if n2 < 128 or n2 > 191 then raise Malformed_code; - let p = ((n1 land 0b11111) lsl 6) lor (n2 land 0b111111) in - if p < 128 then raise Malformed_code; - write p k_out c_out, 2 - end - end - | ('\224'..'\239' as c) -> - if k_in + 2 >= l_in then - -1, 0 - else begin - let n1 = Char.code c in - let n2 = Char.code (s_in.[p_in + k_in + 1]) in - let n3 = Char.code (s_in.[p_in + k_in + 2]) in - if n2 < 128 or n2 > 191 then raise Malformed_code; - if n3 < 128 or n3 > 191 then raise Malformed_code; - let p = - ((n1 land 0b1111) lsl 12) lor - ((n2 land 0b111111) lsl 6) lor - (n3 land 0b111111) - in - if p < 0x800 then raise Malformed_code; - if (p >= 0xd800 && p < 0xe000) then - (* Surrogate pairs are not supported in UTF-8 *) - raise Malformed_code; - if (p >= 0xfffe && p <= 0xffff) then - raise Malformed_code; - write p k_out c_out, 3 - end - | ('\240'..'\247' as c) -> - if k_in + 3 >= l_in then - -1, 0 - else begin - let n1 = Char.code c in - let n2 = Char.code (s_in.[p_in + k_in + 1]) in - let n3 = Char.code (s_in.[p_in + k_in + 2]) in - let n4 = Char.code (s_in.[p_in + k_in + 3]) in - if n2 < 128 or n2 > 191 then raise Malformed_code; - if n3 < 128 or n3 > 191 then raise Malformed_code; - if n4 < 128 or n4 > 191 then raise Malformed_code; - let p = ((n1 land 0b111) lsl 18) lor - ((n2 land 0b111111) lsl 12) lor - ((n3 land 0b111111) lsl 6) lor - (n4 land 0b111111) - in - if p < 0x10000 then raise Malformed_code; - if p >= 0x110000 then - (* These code points are not supported. *) - raise Malformed_code; - write p k_out c_out, 4 - end - | _ -> - (* Outside the valid range of XML characters *) - raise Malformed_code; - in - (* n_out: number of written bytes; -1 means out buf is full - * n_in: number of read bytes; 0 means end of in buf reached - * n_in = 0 implies n_out = -1 - *) - if n_out < 0 then - k_in, k_out, `Enc_utf8 - else - scan (k_in + n_in) (k_out + n_out) (c_out + 1) - end - else - k_in, k_out, `Enc_utf8 - in - scan 0 0 0 -;; - - -let surrogate_offset = 0x10000 - (0xD800 lsl 10) - 0xDC00;; - -let read_utf16_le k_in_0 write s_in p_in l_in = - let rec scan k_in k_out c_out = - if k_in + 1 < l_in then begin - let p = (Char.code s_in.[p_in + k_in]) lor ((Char.code s_in.[p_in + k_in + 1]) lsl 8) in - - if p >= 0xd800 & p < 0xe000 then begin - (* This is a surrogate pair. *) - if k_in + 3 < l_in then begin - if p <= 0xdbff then begin - let q = (Char.code s_in.[p_in + k_in + 2 ]) lor - ((Char.code s_in.[p_in + k_in + 3]) lsl 8) in - if q < 0xdc00 or q > 0xdfff then raise Malformed_code; - let eff_p = (p lsl 10) + q + surrogate_offset in - let n = write eff_p k_out c_out in - if n < 0 then - k_in, k_out, `Enc_utf16_le - else - scan (k_in + 4) (k_out + n) (c_out + 1) - end - else - (* Malformed pair: *) - raise Malformed_code; - end - else - (* Incomplete pair: *) - k_in, k_out, `Enc_utf16_le - end - - else - if p = 0xfffe then - (* Big endian byte order mark: It is illegal here *) - raise Malformed_code - else begin - (* A regular code point *) - let n = write p k_out c_out in - if n < 0 then - k_in, k_out, `Enc_utf16_le - else - scan (k_in + 2) (k_out + n) (c_out + 1) - end - end - else - (* Incomplete character: *) - k_in, k_out, `Enc_utf16_le - in - scan k_in_0 0 0 -;; - - -let read_utf16_be k_in_0 write s_in p_in l_in = - let rec scan k_in k_out c_out = - if k_in + 1 < l_in then begin - let p = (Char.code s_in.[p_in + k_in + 1]) lor ((Char.code s_in.[p_in + k_in]) lsl 8) in - - if p >= 0xd800 & p < 0xe000 then begin - (* This is a surrogate pair. *) - if k_in + 3 < l_in then begin - if p <= 0xdbff then begin - let q = (Char.code s_in.[p_in + k_in + 3 ]) lor - ((Char.code s_in.[p_in + k_in + 2]) lsl 8) in - if q < 0xdc00 or q > 0xdfff then raise Malformed_code; - let eff_p = (p lsl 10) + q + surrogate_offset in - let n = write eff_p k_out c_out in - if n < 0 then - k_in, k_out, `Enc_utf16_be - else - scan (k_in + 4) (k_out + n) (c_out + 1) - end - else - (* Malformed pair: *) - raise Malformed_code; - end - else - (* Incomplete pair: *) - k_in, k_out, `Enc_utf16_be - end - - else - if p = 0xfffe then - (* Little endian byte order mark: It is illegal here *) - raise Malformed_code - else begin - (* A regular code point *) - let n = write p k_out c_out in - if n < 0 then - k_in, k_out, `Enc_utf16_be - else - scan (k_in + 2) (k_out + n) (c_out + 1) - end - - end - else - (* Incomplete character: *) - k_in, k_out, `Enc_utf16_be - in - scan k_in_0 0 0 -;; - - -let read_utf16 write s_in p_in l_in = - (* Expect a BOM at the beginning of the text *) - if l_in >= 2 then begin - let c0 = s_in.[p_in + 0] in - let c1 = s_in.[p_in + 1] in - if c0 = '\254' & c1 = '\255' then begin - (* 0xfeff as big endian *) - read_utf16_be 2 write s_in p_in l_in - end - else - if c0 = '\255' & c1 = '\254' then begin - (* 0xfeff as little endian *) - read_utf16_le 2 write s_in p_in l_in - end - else - (* byte order mark missing *) - raise Malformed_code - end - else - 0, 0, `Enc_utf16 -;; - - -let write_iso88591 s_out p_out l_out max_chars w p k_out c_out = - if k_out < l_out && c_out < max_chars then begin - if p > 255 then begin - let subst = w p in - let l_subst = String.length subst in - if k_out + l_subst <= l_out then begin - (* Enough space to store 'subst': *) - String.blit subst 0 s_out (k_out+p_out) l_subst; - l_subst - end - else - (* Not enough space: Stop this round of recoding *) - -1 - end - else begin - s_out.[p_out + k_out] <- Char.chr p; - 1 - end - end - else - -1 (* End-of-buffer indicator *) -;; - - -let write_usascii s_out p_out l_out max_chars w p k_out c_out = - if k_out < l_out && c_out < max_chars then begin - if p > 127 then begin - let subst = w p in - let l_subst = String.length subst in - if k_out + l_subst <= l_out then begin - (* Enough space to store 'subst': *) - String.blit subst 0 s_out (k_out+p_out) l_subst; - l_subst - end - else - (* Not enough space: Stop this round of recoding *) - -1 - end - else begin - s_out.[p_out + k_out] <- Char.chr p; - 1 - end - end - else - -1 (* End-of-buffer indicator *) -;; - - -let write_8bit from_unicode s_out p_out l_out max_chars w p k_out c_out = - if k_out < l_out && c_out < max_chars then begin - let p' = - match Array.unsafe_get from_unicode (p land 255) with - Netmappings.U_nil -> -1 - | Netmappings.U_single (p0,q0) -> - if p0 = p then q0 else -1 - | Netmappings.U_list l -> - (try List.assoc p l with Not_found -> -1) - in - if p' < 0 then begin - let subst = w p in - let l_subst = String.length subst in - if k_out + l_subst <= l_out then begin - (* Enough space to store 'subst': *) - String.blit subst 0 s_out (k_out+p_out) l_subst; - l_subst - end - else - (* Not enough space: Stop this round of recoding *) - -1 - end - else begin - s_out.[p_out + k_out] <- Char.chr p'; - 1 - end - end - else - -1 (* End-of-buffer indicator *) -;; - - -let write_utf8 is_java s_out p_out l_out max_chars w p k_out c_out = - if p <= 127 && (not is_java || p <> 0) then begin - if k_out < l_out && c_out < max_chars then begin - s_out.[p_out + k_out] <- Char.chr p; - 1 - end - else -1 - end - else if p <= 0x7ff then begin - if k_out + 1 < l_out && c_out < max_chars then begin - s_out.[p_out + k_out] <- Char.chr (0xc0 lor (p lsr 6)); - s_out.[p_out + k_out + 1] <- Char.chr (0x80 lor (p land 0x3f)); - 2 - end - else -1 - end - else if p <= 0xffff then begin - (* Refuse writing surrogate pairs, and fffe, ffff *) - if (p >= 0xd800 & p < 0xe000) or (p >= 0xfffe) then - failwith "Netconversion.write_utf8"; - if k_out + 2 < l_out && c_out < max_chars then begin - s_out.[p_out + k_out] <- Char.chr (0xe0 lor (p lsr 12)); - s_out.[p_out + k_out + 1] <- Char.chr (0x80 lor ((p lsr 6) land 0x3f)); - s_out.[p_out + k_out + 2] <- Char.chr (0x80 lor (p land 0x3f)); - 3 - end - else -1 - end - else if p <= 0x10ffff then begin - if k_out + 3 < l_out && c_out < max_chars then begin - s_out.[p_out + k_out] <- Char.chr (0xf0 lor (p lsr 18)); - s_out.[p_out + k_out + 1] <- Char.chr (0x80 lor ((p lsr 12) land 0x3f)); - s_out.[p_out + k_out + 2] <- Char.chr (0x80 lor ((p lsr 6) land 0x3f)); - s_out.[p_out + k_out + 3] <- Char.chr (0x80 lor (p land 0x3f)); - 4 - end - else -1 - end - else - (* Higher code points are not possible in XML: *) - failwith "Netconversion.write_utf8" -;; - - -let write_utf16_le s_out p_out l_out max_chars w p k_out c_out = - if p >= 0xfffe then begin - if p <= 0xffff or p > 0x10ffff then failwith "Netconversion.write_utf16_le"; - (* Must be written as surrogate pair *) - if k_out + 3 < l_out && c_out < max_chars then begin - let high = (p lsr 10) + 0xd800 in - let low = (p land 0x3ff) + 0xdc00 in - s_out.[p_out + k_out ] <- Char.chr (high land 0xff); - s_out.[p_out + k_out + 1] <- Char.chr (high lsr 8); - s_out.[p_out + k_out + 2] <- Char.chr (low land 0xff); - s_out.[p_out + k_out + 3] <- Char.chr (low lsr 8); - 4 - end - else -1 - end - else begin - if k_out + 1 < l_out && c_out < max_chars then begin - s_out.[p_out + k_out ] <- Char.chr (p land 0xff); - s_out.[p_out + k_out + 1] <- Char.chr (p lsr 8); - 2 - end - else - -1 - end -;; - - -let write_utf16_be s_out p_out l_out max_chars w p k_out c_out = - if p >= 0xfffe then begin - if p <= 0xffff or p > 0x10ffff then failwith "Netconversion.write_utf16_be"; - (* Must be written as surrogate pair *) - if k_out + 3 < l_out && c_out < max_chars then begin - let high = (p lsr 10) + 0xd800 in - let low = (p land 0x3ff) + 0xdc00 in - s_out.[p_out + k_out + 1] <- Char.chr (high land 0xff); - s_out.[p_out + k_out ] <- Char.chr (high lsr 8); - s_out.[p_out + k_out + 3] <- Char.chr (low land 0xff); - s_out.[p_out + k_out + 2] <- Char.chr (low lsr 8); - 4 - end - else -1 - end - else begin - if k_out + 1 < l_out && c_out < max_chars then begin - s_out.[p_out + k_out + 1] <- Char.chr (p land 0xff); - s_out.[p_out + k_out ] <- Char.chr (p lsr 8); - 2 - end - else - -1 - end -;; - - -let recode ~in_enc - ~in_buf - ~in_pos - ~in_len - ~out_enc - ~out_buf - ~out_pos - ~out_len - ~max_chars - ~subst = - if (in_pos < 0 || in_len < 0 || in_pos + in_len > String.length in_buf || - out_pos < 0 || out_len < 0 || out_pos + out_len > String.length out_buf) - then - invalid_arg "Netconversion.recode"; - - let reader = - match in_enc with - `Enc_iso88591 -> read_iso88591 - | `Enc_usascii -> read_usascii - | `Enc_utf8 -> read_utf8 false - | `Enc_java -> read_utf8 true - | `Enc_utf16 -> read_utf16 - | `Enc_utf16_le -> read_utf16_le 0 - | `Enc_utf16_be -> read_utf16_be 0 - | _ -> - (try - let to_unicode' = Hashtbl.find Netmappings.to_unicode in_enc in - let to_unicode = - Netmappings.lock(); - Lazy.force to_unicode' in - Netmappings.unlock(); - read_8bit to_unicode in_enc - with - Not_found -> - failwith("Support for the encoding `" ^ - string_of_encoding in_enc ^ - "' has not been compiled into Netstring") - ) - in - let writer = - match out_enc with - `Enc_iso88591 -> write_iso88591 out_buf out_pos out_len max_chars subst - | `Enc_usascii -> write_usascii out_buf out_pos out_len max_chars subst - | `Enc_utf8 -> write_utf8 false - out_buf out_pos out_len max_chars subst - | `Enc_java -> write_utf8 true out_buf out_pos out_len max_chars subst - | `Enc_utf16 -> failwith "Netconversion.recode" - | `Enc_utf16_le -> write_utf16_le out_buf out_pos out_len max_chars subst - | `Enc_utf16_be -> write_utf16_be out_buf out_pos out_len max_chars subst - | _ -> - (try - let from_unicode' = Hashtbl.find Netmappings.from_unicode out_enc - in - let from_unicode = - Netmappings.lock(); - Lazy.force from_unicode' in - Netmappings.unlock(); - write_8bit from_unicode out_buf out_pos out_len max_chars subst - with - Not_found -> - failwith("Support for the encoding `" ^ - string_of_encoding out_enc ^ - "' has not been compiled into Netstring") - ) - in - reader writer in_buf in_pos in_len -;; - - -let makechar enc p = - match enc with - `Enc_iso88591 -> - if p > 255 then raise Not_found; - String.make 1 (Char.chr p) - | `Enc_usascii -> - if p > 127 then raise Not_found; - String.make 1 (Char.chr p) - | `Enc_utf8 -> - let s = String.create 4 in - let n = write_utf8 false s 0 4 1 (fun _ -> raise Not_found) p 0 0 in - String.sub s 0 n - | `Enc_java -> - let s = String.create 4 in - let n = write_utf8 true s 0 4 1 (fun _ -> raise Not_found) p 0 0 in - String.sub s 0 n - | `Enc_utf16_le -> - let s = String.create 4 in - let n = write_utf16_le s 0 4 1 (fun _ -> raise Not_found) p 0 0 in - String.sub s 0 n - | `Enc_utf16_be -> - let s = String.create 4 in - let n = write_utf16_be s 0 4 1 (fun _ -> raise Not_found) p 0 0 in - String.sub s 0 n - | `Enc_utf16 -> - failwith "Netconversion.makechar" - | _ -> - let s = String.create 1 in - let from_unicode' = - try - Hashtbl.find Netmappings.from_unicode enc - with - Not_found -> - failwith("Support for the encoding `" ^ - string_of_encoding enc ^ - "' has not been compiled into Netstring") - in - let from_unicode = - Netmappings.lock(); - Lazy.force from_unicode' in - Netmappings.unlock(); - let n = - write_8bit from_unicode s 0 1 1 (fun _ -> raise Not_found) p 0 0 in - s -;; - - -let recode_string ~in_enc ~out_enc ?(subst = (fun _ -> raise Not_found)) s = - - let length = String.length s in - let size = 1024 in - let out_buf = String.create size in - - let rec recode_loop k s_done in_enc = - (* 'k' bytes of 's' have already been processed, and the result is in - * 's_done'. - *) - (* Recode to 'out_buf': *) - let in_len = length - k in - let in_done, out_done, in_enc' = - recode ~in_enc:in_enc ~in_buf:s ~in_pos:k ~in_len:in_len - ~out_enc:out_enc ~out_buf:out_buf ~out_pos:0 ~out_len:size - ~max_chars:size ~subst:subst in - (* Collect the results: *) - let k' = k + in_done in - let s_done' = String.sub out_buf 0 out_done :: s_done in - (* Still something to do? *) - if k' < length then - recode_loop k' s_done' in_enc' - else - (* No: Concatenate s_done' to get the final result. *) - String.concat "" (List.rev s_done') - in - - recode_loop 0 [] in_enc -;; - - -(* ====================================================================== - * History: - * - * $Log$ - * Revision 1.1 2000/11/17 09:57:28 lpadovan - * Initial revision - * - * Revision 1.2 2000/08/29 00:46:41 gerd - * New type for the Unicode to 8 bit translation table. - * The Netmappings tables are now Lazy.t. - * - * Revision 1.1 2000/08/13 00:02:57 gerd - * Initial revision. - * - * - * ====================================================================== - * OLD LOGS FROM THE PXP PACKAGE (FILE NAME pxp_encoding.ml): - * - * Revision 1.5 2000/07/27 00:41:14 gerd - * new 8 bit codes - * - * Revision 1.4 2000/07/04 22:11:41 gerd - * Implemented the enhancements and extensions of - * rev. 1.4 of pxp_encoding.mli. - * - * Revision 1.3 2000/05/29 23:48:38 gerd - * Changed module names: - * Markup_aux into Pxp_aux - * Markup_codewriter into Pxp_codewriter - * Markup_document into Pxp_document - * Markup_dtd into Pxp_dtd - * Markup_entity into Pxp_entity - * Markup_lexer_types into Pxp_lexer_types - * Markup_reader into Pxp_reader - * Markup_types into Pxp_types - * Markup_yacc into Pxp_yacc - * See directory "compatibility" for (almost) compatible wrappers emulating - * Markup_document, Markup_dtd, Markup_reader, Markup_types, and Markup_yacc. - * - * Revision 1.2 2000/05/29 21:14:57 gerd - * Changed the type 'encoding' into a polymorphic variant. - * - * Revision 1.1 2000/05/20 20:30:50 gerd - * Initial revision. - * - * - *) diff --git a/helm/DEVEL/pxp/netstring/netconversion.mli b/helm/DEVEL/pxp/netstring/netconversion.mli deleted file mode 100644 index 5e3e4b4e1..000000000 --- a/helm/DEVEL/pxp/netstring/netconversion.mli +++ /dev/null @@ -1,241 +0,0 @@ -(* $Id$ - * ---------------------------------------------------------------------- - *) - -exception Malformed_code - -(* Encodings: - * - With the exception of UTF-8 and UTF-16, only single-byte character sets - * are supported. - * - I took the mappings from www.unicode.org, and the standard names of - * the character sets from IANA. Obviously, many character sets are missing - * that can be supported; especially ISO646 character sets, many EBCDIC - * code pages. - * - Because of the copyright statement from Unicode, I cannot put the - * source tables that describe the mappings into the distribution. They - * are publicly available from www.unicode.org. - * - Because of this, it is difficult for you to extend the list of character - * sets; you need the source tables I am not allowed to distribute. - * These tables have a very simple format: Every line describes a pair - * of code points; the left code (<= 0xff) is the code in the character - * set, the right code (<= 0xffff) is the Unicode equivalent. - * For an example, see - * http://www.unicode.org/Public/MAPPINGS/ISO8859/8859-2.TXT - * You can send me such files, and I will integrate them into the - * distribution (if possible). - * - I really do not know very much about the character sets used in - * East Asia. If you need them, please write the necessary conversion - * functions and send them to me. - * - * KNOWN PROBLEMS: - * - The following charsets do not have a bijective mapping to Unicode: - * adobe_standard_encoding, adobe_symbol_encoding, - * adobe_zapf_dingbats_encoding, cp1002 (0xFEBE). The current implementation - * simply removes one of the conflicting code point pairs - this might - * not what you want. - *) - -type encoding = - [ `Enc_utf8 (* UTF-8 *) - | `Enc_java (* The variant of UTF-8 used by Java *) - | `Enc_utf16 (* UTF-16 with unspecified endianess (restricted usage) *) - | `Enc_utf16_le (* UTF-16 little endian *) - | `Enc_utf16_be (* UTF-16 big endian *) - | `Enc_usascii (* US-ASCII (only 7 bit) *) - | `Enc_iso88591 (* ISO-8859-1 *) - | `Enc_iso88592 (* ISO-8859-2 *) - | `Enc_iso88593 (* ISO-8859-3 *) - | `Enc_iso88594 (* ISO-8859-4 *) - | `Enc_iso88595 (* ISO-8859-5 *) - | `Enc_iso88596 (* ISO-8859-6 *) - | `Enc_iso88597 (* ISO-8859-7 *) - | `Enc_iso88598 (* ISO-8859-8 *) - | `Enc_iso88599 (* ISO-8859-9 *) - | `Enc_iso885910 (* ISO-8859-10 *) - | `Enc_iso885913 (* ISO-8859-13 *) - | `Enc_iso885914 (* ISO-8859-14 *) - | `Enc_iso885915 (* ISO-8859-15 *) - | `Enc_koi8r (* KOI8-R *) - | `Enc_jis0201 (* JIS-0201 *) - (* Microsoft: *) - | `Enc_windows1250 (* WINDOWS-1250 *) - | `Enc_windows1251 (* WINDOWS-1251 *) - | `Enc_windows1252 (* WINDOWS-1252 *) - | `Enc_windows1253 (* WINDOWS-1253 *) - | `Enc_windows1254 (* WINDOWS-1254 *) - | `Enc_windows1255 (* WINDOWS-1255 *) - | `Enc_windows1256 (* WINDOWS-1256 *) - | `Enc_windows1257 (* WINDOWS-1257 *) - | `Enc_windows1258 (* WINDOWS-1258 *) - (* IBM, ASCII-based: *) - | `Enc_cp437 - | `Enc_cp737 - | `Enc_cp775 - | `Enc_cp850 - | `Enc_cp852 - | `Enc_cp855 - | `Enc_cp856 - | `Enc_cp857 - | `Enc_cp860 - | `Enc_cp861 - | `Enc_cp862 - | `Enc_cp863 - | `Enc_cp864 - | `Enc_cp865 - | `Enc_cp866 - | `Enc_cp869 - | `Enc_cp874 - | `Enc_cp1006 - (* IBM, EBCDIC-based: *) - | `Enc_cp037 - | `Enc_cp424 - | `Enc_cp500 - | `Enc_cp875 - | `Enc_cp1026 - (* Adobe: *) - | `Enc_adobe_standard_encoding - | `Enc_adobe_symbol_encoding - | `Enc_adobe_zapf_dingbats_encoding - (* Apple: *) - | `Enc_macroman - - ] - - -val encoding_of_string : string -> encoding;; - (* Returns the encoding of the name of the encoding. Fails if the - * encoding is unknown. - * E.g. encoding_of_string "iso-8859-1" = `Enc_iso88591 - *) - -val string_of_encoding : encoding -> string;; - (* Returns the name of the encoding. *) - - -val makechar : encoding -> int -> string - (* makechar enc i: - * Creates the string representing the code point i in encoding enc. - * Raises Not_found if the character is legal but cannot be represented - * in enc. - * - * Possible encodings: everything but `Enc_utf16. - *) - -val recode : in_enc:encoding -> - in_buf:string -> - in_pos:int -> - in_len:int -> - out_enc:encoding -> - out_buf:string -> - out_pos:int -> - out_len:int -> - max_chars:int -> - subst:(int -> string) -> (int * int * encoding) - (* - * let (in_n, out_n, in_enc') = - * recode in_enc in_buf in_len out_enc out_buf out_pos out_len max_chars - * subst: - * Converts the character sequence contained in the at most in_len bytes - * of in_buf starting at position in_pos, and writes the result - * into at most out_len bytes of out_buf starting at out_pos. - * At most max_chars are written into out_buf. - * The characters in in_buf are assumed to be encoded as in_enc, and the - * characters in out_buf will be encoded as out_enc. - * If there is a code point which cannot be represented in out_enc, - * the function subst is called with the code point as argument, and the - * resulting string (which must already be encoded as out_enc) is - * inserted instead. - * Note: It is possible that subst is called several times for the same - * character. - * Return value: out_n is the actual number of bytes written into out_buf. - * in_n is the actual number of bytes that have been converted from - * in_buf; in_n may be smaller than in_len because of incomplete - * multi-byte characters, or because the output buffer has less space - * for characters than the input buffer, or because of a change - * of the encoding variant. - * If there is at least one complete character in in_buf, and at least - * space for one complete character in out_buf, and max_chars >= 1, it is - * guaranteed that in_n > 0 or out_n > 0. - * in_enc' is normally identical to in_enc. However, there are cases - * in which the encoding can be refined when looking at the byte - * sequence; for example whether a little endian or big endian variant - * of the encoding is used. in_enc' is the variant of in_enc that was - * used for the last character that has been converted. - * - * NOTES: - * - * Supported range of code points: 0 to 0xd7ff, 0xe000 to 0xfffd, - * 0x10000 to 0x10ffff. - * - * Enc_utf8: Malformed UTF-8 byte sequences are always rejected. This - * is also true for the sequence 0xc0 0x80 which is used by some software - * (Java) as paraphrase for the code point 0. - * - * Enc_utf16: When reading from a string encoded as Enc_utf16, a byte - * order mark is expected at the beginning. The detected variant - * (Enc_utf16_le or Enc_utf16_be) is returned. The byte order mark is - * not included into the output string. - It is not possible to - * write as Enc_utf16. - * - * Enc_utf16_le, Enc_utf16_be: When reading from such a string, the - * code point 0xfeff is returned as it is; it is a "zero-width - * non-breaking space". The code point 0xfffe is rejected. - * - * Surrogate pairs: These are recognized (or written) only for a - * UTF-16 encoding; and rejected for any other encoding. - * - * Rejected byte sequences cause the exception Bad_character_stream. - *) - -val recode_string : in_enc:encoding -> - out_enc:encoding -> - ?subst:(int -> string) -> - string -> - string - (* Recodes a complete string from in_enc to out_enc, and returns it. - * The function subst is invoked for code points of in_enc that cannot - * be represented in out_enc, and the result of the function invocation - * is substituted. - * If subst is missing, Not_found is raised in this case. - *) - -(* ====================================================================== - * History: - * - * $Log$ - * Revision 1.1 2000/11/17 09:57:28 lpadovan - * Initial revision - * - * Revision 1.1 2000/08/13 00:02:57 gerd - * Initial revision. - * - * - * ====================================================================== - * OLD LOGS FROM THE PXP PACKAGE (FILE NAME pxp_encoding.mli): - * - * Revision 1.4 2000/07/04 22:05:58 gerd - * Enhanced version of 'recode'. Labeled arguments. - * New function 'recode_string'. - * - * Revision 1.3 2000/05/29 23:48:38 gerd - * Changed module names: - * Markup_aux into Pxp_aux - * Markup_codewriter into Pxp_codewriter - * Markup_document into Pxp_document - * Markup_dtd into Pxp_dtd - * Markup_entity into Pxp_entity - * Markup_lexer_types into Pxp_lexer_types - * Markup_reader into Pxp_reader - * Markup_types into Pxp_types - * Markup_yacc into Pxp_yacc - * See directory "compatibility" for (almost) compatible wrappers emulating - * Markup_document, Markup_dtd, Markup_reader, Markup_types, and Markup_yacc. - * - * Revision 1.2 2000/05/29 21:14:57 gerd - * Changed the type 'encoding' into a polymorphic variant. - * - * Revision 1.1 2000/05/20 20:30:50 gerd - * Initial revision. - * - * - *) diff --git a/helm/DEVEL/pxp/netstring/netencoding.ml b/helm/DEVEL/pxp/netstring/netencoding.ml deleted file mode 100644 index e87c4c397..000000000 --- a/helm/DEVEL/pxp/netstring/netencoding.ml +++ /dev/null @@ -1,903 +0,0 @@ -(* $Id$ - * ---------------------------------------------------------------------- - * - *) - - -module Str = Netstring_str;; - -module Base64 = struct - let b64_pattern plus slash = - [| 'A'; 'B'; 'C'; 'D'; 'E'; 'F'; 'G'; 'H'; 'I'; 'J'; 'K'; 'L'; 'M'; - 'N'; 'O'; 'P'; 'Q'; 'R'; 'S'; 'T'; 'U'; 'V'; 'W'; 'X'; 'Y'; 'Z'; - 'a'; 'b'; 'c'; 'd'; 'e'; 'f'; 'g'; 'h'; 'i'; 'j'; 'k'; 'l'; 'm'; - 'n'; 'o'; 'p'; 'q'; 'r'; 's'; 't'; 'u'; 'v'; 'w'; 'x'; 'y'; 'z'; - '0'; '1'; '2'; '3'; '4'; '5'; '6'; '7'; '8'; '9'; plus; slash |];; - - - let rfc_pattern = b64_pattern '+' '/';; - let url_pattern = b64_pattern '-' '/';; - - let encode_with_options b64 equal s pos len linelen crlf = - (* encode using "base64". - * 'b64': The encoding table, created by b64_pattern. - * 'equal': The character that should be used instead of '=' in the original - * encoding scheme. Pass '=' to get the original encoding scheme. - * s, pos, len, linelen: See the interface description of encode_substring. - *) - assert (Array.length b64 = 64); - if len < 0 or pos < 0 or pos > String.length s or linelen < 0 then - invalid_arg "Netencoding.Base64.encode_with_options"; - if pos + len > String.length s then - invalid_arg "Netencoding.Base64.encode_with_options"; - - let linelen = - (linelen/4) * 4 in - - let l_t = if len = 0 then 0 else ((len - 1) / 3 + 1) * 4 in - (* l_t: length of the result without additional line endings *) - - let l_t' = - if linelen < 4 then - l_t - else - if l_t = 0 then 0 else - let n_lines = ((l_t - 1) / linelen) + 1 in - l_t + n_lines * (if crlf then 2 else 1) - in - (* l_t': length of the result with CRLF or LF characters *) - - let t = String.make l_t' equal in - let j = ref 0 in - let q = ref 0 in - for k = 0 to len / 3 - 1 do - let p = pos + 3*k in - (* p >= pos >= 0: this is evident - * p+2 < pos+len <= String.length s: - * Because k <= len/3-1 - * 3*k <= 3*(len/3-1) = len - 3 - * pos+3*k+2 <= pos + len - 3 + 2 = pos + len - 1 < pos + len - * So it is proved that the following unsafe string accesses always - * work. - *) - let bits = (Char.code (String.unsafe_get s (p)) lsl 16) lor - (Char.code (String.unsafe_get s (p+1)) lsl 8) lor - (Char.code (String.unsafe_get s (p+2))) in - (* Obviously, 'bits' is a 24 bit entity (i.e. bits < 2**24) *) - assert(!j + 3 < l_t'); - String.unsafe_set t !j (Array.unsafe_get b64 ( bits lsr 18)); - String.unsafe_set t (!j+1) (Array.unsafe_get b64 ((bits lsr 12) land 63)); - String.unsafe_set t (!j+2) (Array.unsafe_get b64 ((bits lsr 6) land 63)); - String.unsafe_set t (!j+3) (Array.unsafe_get b64 ( bits land 63)); - j := !j + 4; - if linelen > 3 then begin - q := !q + 4; - if !q + 4 > linelen then begin - (* The next 4 characters won't fit on the current line. So insert - * a line ending. - *) - if crlf then begin - t.[ !j ] <- '\013'; - t.[ !j+1 ] <- '\010'; - j := !j + 2; - end - else begin - t.[ !j ] <- '\010'; - incr j - end; - q := 0; - end; - end; - done; - (* padding if needed: *) - let m = len mod 3 in - begin - match m with - 0 -> () - | 1 -> - let bits = Char.code (s.[pos + len - 1]) in - t.[ !j ] <- b64.( bits lsr 2); - t.[ !j + 1 ] <- b64.( (bits land 0x03) lsl 4); - j := !j + 4; - q := !q + 4; - | 2 -> - let bits = (Char.code (s.[pos + len - 2]) lsl 8) lor - (Char.code (s.[pos + len - 1])) in - t.[ !j ] <- b64.( bits lsr 10); - t.[ !j + 1 ] <- b64.((bits lsr 4) land 0x3f); - t.[ !j + 2 ] <- b64.((bits lsl 2) land 0x3f); - j := !j + 4; - q := !q + 4; - | _ -> assert false - end; - - (* If required, add another line end: *) - - if linelen > 3 & !q > 0 then begin - if crlf then begin - t.[ !j ] <- '\013'; - t.[ !j+1 ] <- '\010'; - j := !j + 2; - end - else begin - t.[ !j ] <- '\010'; - incr j - end; - end; - - t ;; - - - - let encode ?(pos=0) ?len ?(linelength=0) ?(crlf=false) s = - let l = match len with None -> String.length s - pos | Some x -> x in - encode_with_options rfc_pattern '=' s pos l linelength crlf;; - - - let encode_substring s ~pos ~len ~linelength ~crlf = - encode_with_options rfc_pattern '=' s pos len linelength crlf;; - - - let url_encode ?(pos=0) ?len ?(linelength=0) ?(crlf=false) s = - let l = match len with None -> String.length s - pos | Some x -> x in - encode_with_options url_pattern '.' s pos l linelength crlf;; - - - let decode_substring t ~pos ~len ~url_variant:p_url ~accept_spaces:p_spaces = - if len < 0 or pos < 0 or pos > String.length t then - invalid_arg "Netencoding.Base64.decode_substring"; - if pos + len > String.length t then - invalid_arg "Netencoding.Base64.decode_substring"; - - (* Compute the number of effective characters l_t in 't'; - * pad_chars: number of '=' characters at the end of the string. - *) - let l_t, pad_chars = - if p_spaces then begin - (* Count all non-whitespace characters: *) - let c = ref 0 in - let p = ref 0 in - for i = pos to pos + len - 1 do - match String.unsafe_get t i with - (' '|'\t'|'\r'|'\n') -> () - | ('='|'.') as ch -> - if ch = '.' & not p_url then - invalid_arg "Netencoding.Base64.decode_substring"; - incr c; - incr p; - if !p > 2 then - invalid_arg "Netencoding.Base64.decode_substring"; - for j = i+1 to pos + len - 1 do - match String.unsafe_get t j with - (' '|'\t'|'\r'|'\n'|'.'|'=') -> () - | _ -> - (* Only another '=' or spaces allowed *) - invalid_arg "Netencoding.Base64.decode_substring"; - done - | _ -> incr c - done; - if !c mod 4 <> 0 then - invalid_arg "Netencoding.Base64.decode_substring"; - !c, !p - end - else - len, - ( if len mod 4 <> 0 then - invalid_arg "Netencoding.Base64.decode_substring"; - if len > 0 then ( - if String.sub t (len - 2) 2 = "==" or - (p_url & String.sub t (len - 2) 2 = "..") then 2 - else - if String.sub t (len - 1) 1 = "=" or - (p_url & String.sub t (len - 1) 1 = ".") then 1 - else - 0 - ) - else 0 - ) - in - - let l_s = (l_t / 4) * 3 - pad_chars in (* sic! *) - let s = String.create l_s in - - let decode_char c = - match c with - 'A' .. 'Z' -> Char.code(c) - 65 (* 65 = Char.code 'A' *) - | 'a' .. 'z' -> Char.code(c) - 71 (* 71 = Char.code 'a' - 26 *) - | '0' .. '9' -> Char.code(c) + 4 (* -4 = Char.code '0' - 52 *) - | '+' -> 62 - | '-' -> if not p_url then - invalid_arg "Netencoding.Base64.decode_substring"; - 62 - | '/' -> 63 - | _ -> invalid_arg "Netencoding.Base64.decode_substring"; - in - - (* Decode all but the last quartet: *) - - let cursor = ref pos in - let rec next_char() = - match t.[ !cursor ] with - (' '|'\t'|'\r'|'\n') -> - if p_spaces then (incr cursor; next_char()) - else invalid_arg "Netencoding.Base64.decode_substring" - | c -> - incr cursor; c - in - - if p_spaces then begin - for k = 0 to l_t / 4 - 2 do - let q = 3*k in - let c0 = next_char() in - let c1 = next_char() in - let c2 = next_char() in - let c3 = next_char() in - let n0 = decode_char c0 in - let n1 = decode_char c1 in - let n2 = decode_char c2 in - let n3 = decode_char c3 in - let x0 = (n0 lsl 2) lor (n1 lsr 4) in - let x1 = ((n1 lsl 4) land 0xf0) lor (n2 lsr 2) in - let x2 = ((n2 lsl 6) land 0xc0) lor n3 in - String.unsafe_set s q (Char.chr x0); - String.unsafe_set s (q+1) (Char.chr x1); - String.unsafe_set s (q+2) (Char.chr x2); - done; - end - else begin - (* Much faster: *) - for k = 0 to l_t / 4 - 2 do - let p = pos + 4*k in - let q = 3*k in - let c0 = String.unsafe_get t p in - let c1 = String.unsafe_get t (p + 1) in - let c2 = String.unsafe_get t (p + 2) in - let c3 = String.unsafe_get t (p + 3) in - let n0 = decode_char c0 in - let n1 = decode_char c1 in - let n2 = decode_char c2 in - let n3 = decode_char c3 in - let x0 = (n0 lsl 2) lor (n1 lsr 4) in - let x1 = ((n1 lsl 4) land 0xf0) lor (n2 lsr 2) in - let x2 = ((n2 lsl 6) land 0xc0) lor n3 in - String.unsafe_set s q (Char.chr x0); - String.unsafe_set s (q+1) (Char.chr x1); - String.unsafe_set s (q+2) (Char.chr x2); - done; - cursor := pos + l_t - 4; - end; - - (* Decode the last quartet: *) - - if l_t > 0 then begin - let q = 3*(l_t / 4 - 1) in - let c0 = next_char() in - let c1 = next_char() in - let c2 = next_char() in - let c3 = next_char() in - - if (c2 = '=' & c3 = '=') or (p_url & c2 = '.' & c3 = '.') then begin - let n0 = decode_char c0 in - let n1 = decode_char c1 in - let x0 = (n0 lsl 2) lor (n1 lsr 4) in - s.[ q ] <- Char.chr x0; - end - else - if (c3 = '=') or (p_url & c3 = '.') then begin - let n0 = decode_char c0 in - let n1 = decode_char c1 in - let n2 = decode_char c2 in - let x0 = (n0 lsl 2) lor (n1 lsr 4) in - let x1 = ((n1 lsl 4) land 0xf0) lor (n2 lsr 2) in - s.[ q ] <- Char.chr x0; - s.[ q+1 ] <- Char.chr x1; - end - else begin - let n0 = decode_char c0 in - let n1 = decode_char c1 in - let n2 = decode_char c2 in - let n3 = decode_char c3 in - let x0 = (n0 lsl 2) lor (n1 lsr 4) in - let x1 = ((n1 lsl 4) land 0xf0) lor (n2 lsr 2) in - let x2 = ((n2 lsl 6) land 0xc0) lor n3 in - s.[ q ] <- Char.chr x0; - s.[ q+1 ] <- Char.chr x1; - s.[ q+2 ] <- Char.chr x2; - end - - end; - - s ;; - - - - let decode ?(pos=0) ?len ?(url_variant=true) ?(accept_spaces=false) s = - let l = match len with None -> String.length s - pos | Some x -> x in - decode_substring s pos l url_variant accept_spaces;; - - let decode_ignore_spaces s = - decode_substring s 0 (String.length s) true true;; - - -end - - - -module QuotedPrintable = struct - - let encode_substring s ~pos ~len = - - if len < 0 or pos < 0 or pos > String.length s then - invalid_arg "Netencoding.QuotedPrintable.encode_substring"; - if pos + len > String.length s then - invalid_arg "Netencoding.QuotedPrintable.encode_substring"; - - let rec count n i = - if i < len then - match String.unsafe_get s (pos+i) with - ('\r'|'\n') -> - count (n+1) (i+1) - | ('\000'..'\031'|'\127'..'\255'| - '!'|'"'|'#'|'$'|'@'|'['|']'|'^'|'\''|'{'|'|'|'}'|'~'|'=') -> - count (n+3) (i+1) - | ' ' -> - (* Protect spaces only if they occur at the end of a line *) - if i+1 < len then - match s.[pos+i+1] with - ('\r'|'\n') -> - count (n+3) (i+1) - | _ -> - count (n+1) (i+1) - else - count (n+3) (i+1) - | _ -> - count (n+1) (i+1) - else - n - in - - let l = count 0 0 in - let t = String.create l in - - let hexdigit = - [| '0'; '1'; '2'; '3'; '4'; '5'; '6'; '7'; - '8'; '9'; 'A'; 'B'; 'C'; 'D'; 'E'; 'F'; |] in - - let k = ref 0 in - - let add_quoted c = - t.[ !k ] <- '='; - t.[ !k+1 ] <- hexdigit.( Char.code c lsr 4 ); - t.[ !k+2 ] <- hexdigit.( Char.code c land 15 ) - in - - for i = 0 to len - 1 do - match String.unsafe_get s i with - ('\r'|'\n') as c -> - String.unsafe_set t !k c; - incr k - | ('\000'..'\031'|'\127'..'\255'| - '!'|'"'|'#'|'$'|'@'|'['|']'|'^'|'\''|'{'|'|'|'}'|'~'|'=') as c -> - add_quoted c; - k := !k + 3 - | ' ' -> - (* Protect spaces only if they occur at the end of a line *) - if i+1 < len then - match s.[pos+i+1] with - ('\r'|'\n') -> - add_quoted ' '; - k := !k + 3; - | _ -> - String.unsafe_set t !k ' '; - incr k - else begin - add_quoted ' '; - k := !k + 3; - end - | c -> - String.unsafe_set t !k c; - incr k - done; - - t ;; - - - let encode ?(pos=0) ?len s = - let l = match len with None -> String.length s - pos | Some x -> x in - encode_substring s pos l;; - - - - let decode_substring s ~pos ~len = - - if len < 0 or pos < 0 or pos > String.length s then - invalid_arg "Netencoding.QuotedPrintable.decode_substring"; - if pos + len > String.length s then - invalid_arg "Netencoding.QuotedPrintable.decode_substring"; - - let decode_hex c = - match c with - '0'..'9' -> Char.code c - 48 - | 'A'..'F' -> Char.code c - 55 - | 'a'..'f' -> Char.code c - 87 - | _ -> - invalid_arg "Netencoding.QuotedPrintable.decode_substring"; - in - - let rec count n i = - if i < len then - match String.unsafe_get s (pos+i) with - '=' -> - if i+1 = len then - (* A '=' at EOF is ignored *) - count n (i+1) - else - if i+1 < len then - match s.[pos+i+1] with - '\r' -> - (* Official soft break *) - if i+2 < len & s.[pos+i+2] = '\n' then - count n (i+3) - else - count n (i+2) - | '\n' -> - (* Inofficial soft break *) - count n (i+2) - | _ -> - if i+2 >= len then - invalid_arg - "Netencoding.QuotedPrintable.decode_substring"; - let _ = decode_hex s.[pos+i+1] in - let _ = decode_hex s.[pos+i+2] in - count (n+1) (i+3) - else - invalid_arg "Netencoding.QuotedPrintable.decode_substring" - | _ -> - count (n+1) (i+1) - else - n - in - - let l = count 0 0 in - let t = String.create l in - let k = ref pos in - let e = pos + len in - let i = ref 0 in - - while !i < l do - match String.unsafe_get s !k with - '=' -> - if !k+1 = e then - (* A '=' at EOF is ignored *) - () - else - if !k+1 < e then - match s.[!k+1] with - '\r' -> - (* Official soft break *) - if !k+2 < e & s.[!k+2] = '\n' then - k := !k + 3 - else - k := !k + 2 - | '\n' -> - (* Inofficial soft break *) - k := !k + 2 - | _ -> - if !k+2 >= e then - invalid_arg - "Netencoding.QuotedPrintable.decode_substring"; - let x1 = decode_hex s.[!k+1] in - let x2 = decode_hex s.[!k+2] in - t.[ !i ] <- Char.chr ((x1 lsl 4) lor x2); - k := !k + 3; - incr i - else - invalid_arg "Netencoding.QuotedPrintable.decode_substring" - | c -> - String.unsafe_set t !i c; - incr k; - incr i - done; - - t ;; - - - let decode ?(pos=0) ?len s = - let l = match len with None -> String.length s - pos | Some x -> x in - decode_substring s pos l;; - -end - - -module Q = struct - - let encode_substring s ~pos ~len = - - if len < 0 or pos < 0 or pos > String.length s then - invalid_arg "Netencoding.Q.encode_substring"; - if pos + len > String.length s then - invalid_arg "Netencoding.Q.encode_substring"; - - let rec count n i = - if i < len then - match String.unsafe_get s (pos+i) with - | ('A'..'Z'|'a'..'z'|'0'..'9') -> - count (n+1) (i+1) - | _ -> - count (n+3) (i+1) - else - n - in - - let l = count 0 0 in - let t = String.create l in - - let hexdigit = - [| '0'; '1'; '2'; '3'; '4'; '5'; '6'; '7'; - '8'; '9'; 'A'; 'B'; 'C'; 'D'; 'E'; 'F'; |] in - - let k = ref 0 in - - let add_quoted c = - t.[ !k ] <- '='; - t.[ !k+1 ] <- hexdigit.( Char.code c lsr 4 ); - t.[ !k+2 ] <- hexdigit.( Char.code c land 15 ) - in - - for i = 0 to len - 1 do - match String.unsafe_get s i with - | ('A'..'Z'|'a'..'z'|'0'..'9') as c -> - String.unsafe_set t !k c; - incr k - | c -> - add_quoted c; - k := !k + 3 - done; - - t ;; - - - let encode ?(pos=0) ?len s = - let l = match len with None -> String.length s - pos | Some x -> x in - encode_substring s pos l;; - - - - let decode_substring s ~pos ~len = - - if len < 0 or pos < 0 or pos > String.length s then - invalid_arg "Netencoding.Q.decode_substring"; - if pos + len > String.length s then - invalid_arg "Netencoding.Q.decode_substring"; - - let decode_hex c = - match c with - '0'..'9' -> Char.code c - 48 - | 'A'..'F' -> Char.code c - 55 - | 'a'..'f' -> Char.code c - 87 - | _ -> - invalid_arg "Netencoding.Q.decode_substring"; - in - - let rec count n i = - if i < len then - match String.unsafe_get s (pos+i) with - '=' -> - if i+2 >= len then - invalid_arg "Netencoding.Q.decode_substring"; - let _ = decode_hex s.[pos+i+1] in - let _ = decode_hex s.[pos+i+2] in - count (n+1) (i+3) - | _ -> (* including '_' *) - count (n+1) (i+1) - else - n - in - - let l = count 0 0 in - let t = String.create l in - let k = ref pos in - let e = pos + len in - let i = ref 0 in - - while !i < l do - match String.unsafe_get s !k with - '=' -> - if !k+2 >= e then - invalid_arg "Netencoding.Q.decode_substring"; - let x1 = decode_hex s.[!k+1] in - let x2 = decode_hex s.[!k+2] in - t.[ !i ] <- Char.chr ((x1 lsl 4) lor x2); - k := !k + 3; - incr i - | '_' -> - String.unsafe_set t !i ' '; - incr k; - incr i - | c -> - String.unsafe_set t !i c; - incr k; - incr i - done; - - t ;; - - - let decode ?(pos=0) ?len s = - let l = match len with None -> String.length s - pos | Some x -> x in - decode_substring s pos l ;; - -end - - -module Url = struct - let hex_digits = - [| '0'; '1'; '2'; '3'; '4'; '5'; '6'; '7'; - '8'; '9'; 'A'; 'B'; 'C'; 'D'; 'E'; 'F' |];; - - let to_hex2 k = - (* Converts k to a 2-digit hex string *) - let s = String.create 2 in - s.[0] <- hex_digits.( (k lsr 4) land 15 ); - s.[1] <- hex_digits.( k land 15 ); - s ;; - - - let of_hex1 c = - match c with - ('0'..'9') -> Char.code c - Char.code '0' - | ('A'..'F') -> Char.code c - Char.code 'A' + 10 - | ('a'..'f') -> Char.code c - Char.code 'a' + 10 - | _ -> - raise Not_found ;; - - - - let url_encoding_re = - Str.regexp "[^A-Za-z0-9$_.!*'(),-]";; - - let url_decoding_re = - Str.regexp "\\+\\|%..\\|%.\\|%";; - - - let encode s = - Str.global_substitute - url_encoding_re - (fun r _ -> - match Str.matched_string r s with - " " -> "+" - | x -> - let k = Char.code(x.[0]) in - "%" ^ to_hex2 k - ) - s ;; - - - let decode s = - let l = String.length s in - Str.global_substitute - url_decoding_re - (fun r _ -> - match Str.matched_string r s with - | "+" -> " " - | _ -> - let i = Str.match_beginning r in - (* Assertion: s.[i] = '%' *) - if i+2 >= l then failwith "Cgi.decode"; - let c1 = s.[i+1] in - let c2 = s.[i+2] in - begin - try - let k1 = of_hex1 c1 in - let k2 = of_hex1 c2 in - String.make 1 (Char.chr((k1 lsl 4) lor k2)) - with - Not_found -> - failwith "Cgi.decode" - end - ) - s ;; - -end - - -module Html = struct - - let eref_re = - Str.regexp - "&\\(#\\([0-9]+\\);\\|\\([a-zA-Z]+\\);\\)" ;; - let unsafe_re = Str.regexp "[<>&\"\000-\008\011-\012\014-\031\127-\255]" ;; - - let etable = - [ "lt", "<"; - "gt", ">"; - "amp", "&"; - "quot", "\""; - (* Note: " is new in HTML-4.0, but it has been widely used - * much earlier. - *) - "nbsp", "\160"; - "iexcl", "\161"; - "cent", "\162"; - "pound", "\163"; - "curren", "\164"; - "yen", "\165"; - "brvbar", "\166"; - "sect", "\167"; - "uml", "\168"; - "copy", "\169"; - "ordf", "\170"; - "laquo", "\171"; - "not", "\172"; - "shy", "\173"; - "reg", "\174"; - "macr", "\175"; - "deg", "\176"; - "plusmn", "\177"; - "sup2", "\178"; - "sup3", "\179"; - "acute", "\180"; - "micro", "\181"; - "para", "\182"; - "middot", "\183"; - "cedil", "\184"; - "sup1", "\185"; - "ordm", "\186"; - "raquo", "\187"; - "frac14", "\188"; - "frac12", "\189"; - "frac34", "\190"; - "iquest", "\191"; - "Agrave", "\192"; - "Aacute", "\193"; - "Acirc", "\194"; - "Atilde", "\195"; - "Auml", "\196"; - "Aring", "\197"; - "AElig", "\198"; - "Ccedil", "\199"; - "Egrave", "\200"; - "Eacute", "\201"; - "Ecirc", "\202"; - "Euml", "\203"; - "Igrave", "\204"; - "Iacute", "\205"; - "Icirc", "\206"; - "Iuml", "\207"; - "ETH", "\208"; - "Ntilde", "\209"; - "Ograve", "\210"; - "Oacute", "\211"; - "Ocirc", "\212"; - "Otilde", "\213"; - "Ouml", "\214"; - "times", "\215"; - "Oslash", "\216"; - "Ugrave", "\217"; - "Uacute", "\218"; - "Ucirc", "\219"; - "Uuml", "\220"; - "Yacute", "\221"; - "THORN", "\222"; - "szlig", "\223"; - "agrave", "\224"; - "aacute", "\225"; - "acirc", "\226"; - "atilde", "\227"; - "auml", "\228"; - "aring", "\229"; - "aelig", "\230"; - "ccedil", "\231"; - "egrave", "\232"; - "eacute", "\233"; - "ecirc", "\234"; - "euml", "\235"; - "igrave", "\236"; - "iacute", "\237"; - "icirc", "\238"; - "iuml", "\239"; - "eth", "\240"; - "ntilde", "\241"; - "ograve", "\242"; - "oacute", "\243"; - "ocirc", "\244"; - "otilde", "\245"; - "ouml", "\246"; - "divide", "\247"; - "oslash", "\248"; - "ugrave", "\249"; - "uacute", "\250"; - "ucirc", "\251"; - "uuml", "\252"; - "yacute", "\253"; - "thorn", "\254"; - "yuml", "\255"; - ] ;; - - let quick_etable = - let ht = Hashtbl.create 50 in - List.iter (fun (name,value) -> Hashtbl.add ht name value) etable; - (* Entities to be decoded, but that must not be encoded: *) - Hashtbl.add ht "apos" "'"; (* used in XML documents *) - ht ;; - - let rev_etable = - let a = Array.create 256 "" in - List.iter (fun (name,value) -> - a.(Char.code(value.[0])) <- "&" ^ name ^ ";") etable; - for i = 0 to 8 do - a.(i) <- "&#" ^ string_of_int i ^ ";" - done; - for i = 11 to 12 do - a.(i) <- "&#" ^ string_of_int i ^ ";" - done; - for i = 14 to 31 do - a.(i) <- "&#" ^ string_of_int i ^ ";" - done; - for i = 127 to 159 do - a.(i) <- "&#" ^ string_of_int i ^ ";" - done; - a ;; - - let decode_to_latin1 s = - Str.global_substitute - eref_re - (fun r _ -> - let t = Str.matched_string r s in - try - let n = int_of_string(Str.matched_group r 2 s) in - if n < 256 then - String.make 1 (Char.chr n) - else - t - with - Not_found -> - try - let name = Str.matched_group r 3 s in - try - Hashtbl.find quick_etable name - with - Not_found -> - t - with - Not_found -> assert false - ) - s ;; - - let encode_from_latin1 s = - Str.global_substitute - unsafe_re - (fun r _ -> - let t = Str.matched_string r s in - let i = Char.code (t.[0]) in - rev_etable.(i) - ) - s ;; -end - - - -(* ====================================================================== - * History: - * - * $Log$ - * Revision 1.1 2000/11/17 09:57:27 lpadovan - * Initial revision - * - * Revision 1.5 2000/06/25 22:34:43 gerd - * Added labels to arguments. - * - * Revision 1.4 2000/06/25 21:15:48 gerd - * Checked thread-safety. - * - * Revision 1.3 2000/03/03 17:03:16 gerd - * Q encoding: CR and LF are quoted. - * - * Revision 1.2 2000/03/03 01:08:29 gerd - * Added Netencoding.Html functions. - * - * Revision 1.1 2000/03/02 01:14:48 gerd - * Initial revision. - * - * - *) diff --git a/helm/DEVEL/pxp/netstring/netencoding.mli b/helm/DEVEL/pxp/netstring/netencoding.mli deleted file mode 100644 index 6466572b3..000000000 --- a/helm/DEVEL/pxp/netstring/netencoding.mli +++ /dev/null @@ -1,271 +0,0 @@ -(* $Id$ - * ---------------------------------------------------------------------- - * - *) - -(**********************************************************************) -(* Several encodings important for the net *) -(**********************************************************************) - - -(**********************************************************************) -(* Base 64 encoding *) -(**********************************************************************) - -(* See RFC 2045 for a description of Base 64 encoding. *) - -(* THREAD-SAFETY: - * All Base64 functions are reentrant and thus thread-safe. - *) - -module Base64 : sig - - val encode : ?pos:int -> ?len:int -> ?linelength:int -> ?crlf:bool -> - string -> string - (* Compute the "base 64" encoding of the given string argument. - * Note that the result is a string that only contains the characters - * a-z, A-Z, 0-9, +, /, =, and optionally spaces, CR and LF characters. - * - * If pos and/or len are passed, only the substring starting at - * pos (default: 0) with length len (default: rest of the string) - * is encoded. - * - * The result is divided up into lines not longer than 'linelength' - * (without counting the line separator); default: do not divide lines. - * If 'linelength' is smaller than 4, no line division is performed. - * If 'linelength' is not divisible by 4, the produced lines are a - * bit shorter than 'linelength'. - * - * If 'crlf' (default: false) the lines are ended by CRLF; otherwise - * they are only ended by LF. - * (You need the crlf option to produce correct MIME messages.) - * - *) - - val url_encode : ?pos:int -> ?len:int -> ?linelength:int -> ?crlf:bool -> - string -> string - (* Same as 'encode' but use slightly different characters that can be - * part of URLs without additional encodings. - * The encoded string consists only of the characters a-z, A-Z, 0-9, - * -, /, . - * 'url_encode' does NOT implement the Base 64 encoding as described - * in the standard! - *) - - val encode_substring : string -> pos:int -> len:int -> linelength:int -> - crlf:bool -> string - (* *** DEPRECATED FUNCTION *** Use 'encode' instead! *** - * - * encode_substring s pos len linelen crlf: - * Encodes the substring at position 'pos' in 's' with length 'len'. - * The result is divided up into lines not longer than 'linelen' (without - * counting the line separator). - * If 'linelen' is smaller than 4, no line division is performed. - * If 'linelen' is not divisible by 4, the produced lines are a - * bit shorter than 'linelen'. - * If 'crlf' the lines are ended by CRLF; otherwise they are only - * ended by LF. - * (You need the crlf option to produce correct MIME messages.) - *) - - val decode : ?pos:int -> ?len:int -> ?url_variant:bool -> - ?accept_spaces:bool -> string -> string - (* Decodes the given string argument. - * - * If pos and/or len are passed, only the substring starting at - * pos (default: 0) with length len (default: rest of the string) - * is decoded. - * - * If url_variant (default: true) is set, the functions also - * accepts the characters '-' and '.' as produced by 'url_encode'. - * - * If accept_spaces (default: false) is set, the function ignores - * white space contained in the string to decode (otherwise the - * function fails if it finds white space). - *) - - val decode_ignore_spaces : string -> string - (* *** DEPRECATED FUNCTION *** Use 'decode' instead! *** - * - * Decodes the string, too, but it is allowed that the string contains - * whitespace characters. - * This function is slower than 'decode'. - *) - - val decode_substring : string -> pos:int -> len:int -> url_variant:bool -> - accept_spaces:bool -> string - (* *** DEPRECATED FUNCTION *** Use 'decode' instead! *** - * - * decode_substring s pos len url spaces: - * Decodes the substring of 's' beginning at 'pos' with length 'len'. - * If 'url', strings created by 'url_encode' are accepted, too. - * If 'spaces', whitespace characters are allowed in the string. - *) -end - -(**********************************************************************) -(* Quoted printable encoding *) -(**********************************************************************) - -(* See RFC 2045. - * This implementation assumes that the encoded string has a text MIME - * type. Because of this, the characters CR and LF are never protected - * by hex tokens; they are copied literally to the output string. - *) - -(* THREAD-SAFETY: - * All QuotedPrintable functions are reentrant and thus thread-safe. - *) - -module QuotedPrintable : - sig - val encode : ?pos:int -> ?len:int -> string -> string - (* Encodes the string and returns it. - * Note line breaks: - * No additional soft line breaks are added. The characters CR - * and LF are not represented as =0D resp. =0A. (But other control - * characters ARE encoded.) - * Note unsafe characters: - * As recommended by RFC 2045, the characters !\"#$@[]^`{|}~ - * are additionally represented as hex tokens. -- " - * - * If pos and/or len are passed, only the substring starting at - * pos (default: 0) with length len (default: rest of the string) - * is encoded. - *) - - val encode_substring : string -> pos:int -> len:int -> string - (* *** DEPRECATED FUNCTION *** Use 'encode' instead! *** - * encode_substring s pos len: - * Encodes the substring of 's' beginning at 'pos' with length 'len'. - *) - - val decode : ?pos:int -> ?len:int -> string -> string - (* Decodes the string and returns it. - * Most format errors cause an Invalid_argument exception. - * Note that soft line breaks can be properly decoded although - * 'encode' will never produce them. - * - * If pos and/or len are passed, only the substring starting at - * pos (default: 0) with length len (default: rest of the string) - * is decoded. - *) - - val decode_substring : string -> pos:int -> len:int -> string - (* *** DEPRECATED FUNCTION *** Use 'decode' instead! *** - * decode_substring s pos len: - * Decodes the substring of 's' beginning at 'pos' with length 'len'. - *) - - end - -(**********************************************************************) -(* Q encoding *) -(**********************************************************************) - -(* See RFC 2047. - * The functions behave similar to those of QuotedPrintable. - *) - -(* THREAD-SAFETY: - * All Q functions are reentrant and thus thread-safe. - *) - -module Q : - sig - val encode : ?pos:int -> ?len:int -> string -> string - (* Note: - * All characters except alphanumeric characters are protected by - * hex tokens. - * In particular, spaces are represented as "=20", not as "_". - *) - - val decode : ?pos:int -> ?len:int -> string -> string - - val encode_substring : string -> pos:int -> len:int -> string - (* *** DEPRECATED FUNCTION *** Use 'encode' instead! *** *) - - val decode_substring : string -> pos:int -> len:int -> string - (* *** DEPRECATED FUNCTION *** Use 'decode' instead! *** *) - end - -(**********************************************************************) -(* B encoding *) -(**********************************************************************) - -(* The B encoding of RFC 2047 is the same as Base64. *) - - -(**********************************************************************) -(* URL-encoding *) -(**********************************************************************) - -(* Encoding/Decoding within URLs: - * - * The following two functions perform the '%'-substitution for - * characters that may otherwise be interpreted as metacharacters. - * - * According to: RFC 1738, RFC 1630 - *) - -(* THREAD-SAFETY: - * The Url functions are thread-safe. - *) - -module Url : - sig - val decode : string -> string - val encode : string -> string - end - - -(**********************************************************************) -(* HTMLization *) -(**********************************************************************) - -(* Encodes characters that need protection by converting them to - * entity references. E.g. "<" is converted to "<". - * As the entities may be named, there is a dependency on the character - * set. Currently, there are only functions for the Latin 1 alphabet. - *) - -(* THREAD-SAFETY: - * The Html functions are thread-safe. - *) - -module Html : - sig - val encode_from_latin1 : string -> string - (* Encodes the characters 0-8, 11-12, 14-31, '<', '>', '"', '&', - * 127-255. If the characters have a name, a named entity is - * preferred over a numeric entity. - *) - val decode_to_latin1 : string -> string - (* Decodes the string. Unknown named entities are left as they - * are (i.e. decode_to_latin1 "&nonsense;" = "&nonsense;"). - * The same applies to numeric entities greater than 255. - *) - end - - -(* ====================================================================== - * History: - * - * $Log$ - * Revision 1.1 2000/11/17 09:57:27 lpadovan - * Initial revision - * - * Revision 1.4 2000/06/25 22:34:43 gerd - * Added labels to arguments. - * - * Revision 1.3 2000/06/25 21:15:48 gerd - * Checked thread-safety. - * - * Revision 1.2 2000/03/03 01:08:29 gerd - * Added Netencoding.Html functions. - * - * Revision 1.1 2000/03/02 01:14:48 gerd - * Initial revision. - * - * - *) diff --git a/helm/DEVEL/pxp/netstring/nethtml.ml b/helm/DEVEL/pxp/netstring/nethtml.ml deleted file mode 100644 index 7f9d983cd..000000000 --- a/helm/DEVEL/pxp/netstring/nethtml.ml +++ /dev/null @@ -1,276 +0,0 @@ -(* $Id$ - * ---------------------------------------------------------------------- - * - *) - -open Nethtml_scanner;; - -type document = - Element of (string * (string*string) list * document list) - | Data of string -;; - - -exception End_of_scan;; - - -let no_end_tag = (* empty HTML elements *) - ref - [ "isindex"; - "base"; - "meta"; - "link"; - "hr"; - "input"; - "img"; - "param"; - "basefont"; - "br"; - "area"; - ] -;; - - -let special_tag = (* other lexical rules *) - ref - [ "script"; - "style"; - ] -;; - - -let rec parse_comment buf = - let t = scan_comment buf in - match t with - Mcomment -> - parse_comment buf - | Eof -> - raise End_of_scan - | _ -> - () -;; - - -let rec parse_doctype buf = - let t = scan_doctype buf in - match t with - Mdoctype -> - parse_doctype buf - | Eof -> - raise End_of_scan - | _ -> - () -;; - - -let parse_document buf = - let current_name = ref "" in - let current_atts = ref [] in - let current_subs = ref [] in - let stack = Stack.create() in - - let parse_atts() = - let rec next_no_space() = - match scan_element buf with - Space _ -> next_no_space() - | t -> t - in - - let rec parse_atts_lookahead next = - match next with - Relement -> [] - | Name n -> - begin match next_no_space() with - Is -> - begin match next_no_space() with - Name v -> - (String.lowercase n, String.uppercase v) :: - parse_atts_lookahead (next_no_space()) - | Literal v -> - (String.lowercase n,v) :: - parse_atts_lookahead (next_no_space()) - | Eof -> - raise End_of_scan - | Relement -> - (* Illegal *) - [] - | _ -> - (* Illegal *) - parse_atts_lookahead (next_no_space()) - end - | Eof -> - raise End_of_scan - | Relement -> - (* <==> *) - [ String.lowercase n, String.lowercase n ] - | next' -> - (* assume <==> *) - ( String.lowercase n, String.lowercase n ) :: - parse_atts_lookahead next' - end - | Eof -> - raise End_of_scan - | _ -> - (* Illegal *) - parse_atts_lookahead (next_no_space()) - in - parse_atts_lookahead (next_no_space()) - in - - let rec parse_special name = - (* Parse until
*) - match scan_special buf with - Lelementend n -> - if n = name then - "" - else - " - raise End_of_scan - | Cdata s -> - s ^ parse_special name - | _ -> - (* Illegal *) - parse_special name - in - - let rec skip_element() = - (* Skip until ">" *) - match scan_element buf with - Relement -> - () - | Eof -> - raise End_of_scan - | _ -> - skip_element() - in - - let rec parse_next() = - let t = scan_document buf in - match t with - Lcomment -> - parse_comment buf; - parse_next() - | Ldoctype -> - parse_doctype buf; - parse_next() - | Lelement name -> - let name = String.lowercase name in - if List.mem name !no_end_tag then begin - let atts = parse_atts() in - current_subs := (Element(name, atts, [])) :: !current_subs; - parse_next() - end - else if List.mem name !special_tag then begin - let atts = parse_atts() in - let data = parse_special name in - (* Read until ">" *) - skip_element(); - current_subs := (Element(name, atts, [Data data])) :: !current_subs; - parse_next() - end - else begin - let atts = parse_atts() in - Stack.push (!current_name, !current_atts, !current_subs) stack; - current_name := name; - current_atts := atts; - current_subs := []; - parse_next() - end - | Cdata data -> - current_subs := (Data data) :: !current_subs; - parse_next() - | Lelementend name -> - let name = String.lowercase name in - (* Read until ">" *) - skip_element(); - (* Search the element to close on the stack: *) - let found = ref (name = !current_name) in - Stack.iter - (fun (old_name, _, _) -> - if name = old_name then found := true) - stack; - (* If not found, the end tag is wrong. Simply ignore it. *) - if not !found then - parse_next() - else begin - (* Put the current element on to the stack: *) - Stack.push (!current_name, !current_atts, !current_subs) stack; - (* If found: Remove the elements from the stack, and append - * them to the previous element as sub elements - *) - let rec remove() = - let old_name, old_atts, old_subs = Stack.pop stack in - (* or raise Stack.Empty *) - if old_name = name then - old_name, old_atts, old_subs - else - let older_name, older_atts, older_subs = remove() in - older_name, - older_atts, - (Element (old_name, old_atts, List.rev old_subs) :: older_subs) - in - let old_name, old_atts, old_subs = remove() in - (* Remove one more element: the element containing the element - * currently being closed. - *) - let new_name, new_atts, new_subs = Stack.pop stack in - current_name := new_name; - current_atts := new_atts; - current_subs := (Element (old_name, old_atts, List.rev old_subs)) - :: new_subs; - (* Go on *) - parse_next() - end - | Eof -> - raise End_of_scan - | _ -> - parse_next() - in - try - parse_next(); - List.rev !current_subs - with - End_of_scan -> - (* Close all remaining elements: *) - Stack.push (!current_name, !current_atts, !current_subs) stack; - let rec remove() = - let old_name, old_atts, old_subs = Stack.pop stack in - (* or raise Stack.Empty *) - try - let older_name, older_atts, older_subs = remove() in - older_name, - older_atts, - (Element (old_name, old_atts, List.rev old_subs) :: older_subs) - with - Stack.Empty -> - old_name, old_atts, old_subs - in - let name, atts, subs = remove() in - List.rev subs -;; - - -let parse_string s = - let buf = Lexing.from_string s in - parse_document buf -;; - - -let parse_file fd = - let buf = Lexing.from_channel fd in - parse_document buf -;; - -(* ====================================================================== - * History: - * - * $Log$ - * Revision 1.1 2000/11/17 09:57:28 lpadovan - * Initial revision - * - * Revision 1.1 2000/03/03 01:07:25 gerd - * Initial revision. - * - * - *) diff --git a/helm/DEVEL/pxp/netstring/nethtml.mli b/helm/DEVEL/pxp/netstring/nethtml.mli deleted file mode 100644 index d7af381cc..000000000 --- a/helm/DEVEL/pxp/netstring/nethtml.mli +++ /dev/null @@ -1,72 +0,0 @@ -(* $Id$ - * ---------------------------------------------------------------------- - * - *) - - -(* The type 'document' represents parsed HTML documents. - * Element (name, args, subnodes): is an element node for an element of - * type 'name' (i.e. written ...) with arguments 'args' - * and subnodes 'subnodes' (the material within the element). The arguments - * are simply name/value pairs. Entity references (something like %xy;) - * occuring in the values are NOT resolved. - * Arguments without values (e.g. \n"; -print_string "\n"; -print_string "\n"; - -print_string "

POST URL-encoded form

\n"; -print_string "
\n"; -print_string "\n"; -print_string "\n"; -print_string "
\n"; - -print_string "

POST FORM-encoded form

\n"; -print_string "
\n"; -print_string "\n"; -print_string "\n"; -print_string "\n"; -print_string "
\n"; - -print_string "

File upload

\n"; -print_string "
\n"; -print_string "\n"; -print_string "\n"; -print_string "\n"; -print_string "
\n"; - - - -print_string "\n"; - -flush stdout -;; - - diff --git a/helm/DEVEL/pxp/netstring/tests/test_mimestring.ml b/helm/DEVEL/pxp/netstring/tests/test_mimestring.ml deleted file mode 100644 index db5eac930..000000000 --- a/helm/DEVEL/pxp/netstring/tests/test_mimestring.ml +++ /dev/null @@ -1,589 +0,0 @@ -#require "str";; -#directory "..";; -#load "netstring.cma";; - -open Mimestring;; - -(**********************************************************************) -(* scan_structured_value *) -(**********************************************************************) - -let t001() = - let r = scan_structured_value "user@domain.com" [ '@'; '.' ] [] in - r = [ Atom "user"; Special '@'; Atom "domain"; Special '.'; Atom "com" ] -;; - - -let t002() = - let r = scan_structured_value "user @ domain . com" [ '@'; '.' ] [] in - r = [ Atom "user"; Special '@'; Atom "domain"; Special '.'; Atom "com" ] -;; - - -let t003() = - let r = scan_structured_value "user(Do you know him?)@domain.com" [ '@'; '.' ] - [] in - r = [ Atom "user"; Special '@'; Atom "domain"; Special '.'; Atom "com" ] -;; - - -let t004() = - let r = scan_structured_value "user @ domain . com" [ '@'; '.'; ' ' ] [] in - r = [ Atom "user"; Special ' '; Special '@'; Special ' '; Atom "domain"; - Special ' '; Special '.'; Special ' '; Atom "com" ] -;; - - -let t005() = - let r = scan_structured_value "user(Do you know him?)@domain.com" - ['@'; '.'; '('] [] in - r = [ Atom "user"; Special '('; Atom "Do"; Atom "you"; Atom "know"; - Atom "him?)"; Special '@'; Atom "domain"; Special '.'; Atom "com" ] -;; - - -let t006() = - let r = scan_structured_value "\"My.name\"@domain.com" [ '@'; '.' ] [] in - r = [ QString "My.name"; Special '@'; Atom "domain"; Special '.'; - Atom "com" ] -;; - - -let t007() = - let r = scan_structured_value "\"\\\"()@. \"@domain.com" [ '@'; '.' ] [] in - r = [ QString "\"()@. "; Special '@'; Atom "domain"; Special '.'; - Atom "com" ] -;; - - -let t008() = - let r = scan_structured_value "a(b(c(d)e)f)g" [] [] in - r = [ Atom "a"; Atom "g" ] -;; - - -let t009() = - let r = scan_structured_value "a(b(c(d)e)f" [] [] in - r = [ Atom "a" ] -;; - - -let t010() = - let r = scan_structured_value "a(b\\(c\\(d\\)e)f" [] [] in - r = [ Atom "a"; Atom "f" ] -;; - - -let t011() = - let r = scan_structured_value "a(b(c(d)e)f\\" [] [] in - r = [ Atom "a" ] -;; - - -let t012() = - let r = scan_structured_value "\"abc" [] [] in - r = [ QString "abc" ] -;; - - -let t013() = - let r = scan_structured_value "\"abc\\" [] [] in - r = [ QString "abc\\" ] -;; - - -(* New tests for netstring-0.9: *) - -let t020() = - let r = scan_structured_value "user(Do you know him?)@domain.com" - [ '@'; '.' ] [ Return_comments ] in - r = [ Atom "user"; Comment; Special '@'; Atom "domain"; Special '.'; - Atom "com" ] -;; - -let t021() = - let r = scan_structured_value "user (Do you know him?) @ domain . com" - [ '@'; '.'; ' ' ] [] in - r = [ Atom "user"; Special ' '; Special ' '; Special ' '; Special '@'; - Special ' '; Atom "domain"; - Special ' '; Special '.'; Special ' '; Atom "com" ] -;; - -let t022() = - let r = scan_structured_value "user (Do you know him?) @ domain . com" - [ '@'; '.'; ' ' ] [ Return_comments ] in - r = [ Atom "user"; Special ' '; Comment; Special ' '; Special '@'; - Special ' '; Atom "domain"; - Special ' '; Special '.'; Special ' '; Atom "com" ] -;; - -let t023() = - let r = scan_structured_value "=?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?=" - [] [] in - r = [ Atom "=?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?=" ] -;; - -let t024() = - let r = scan_structured_value "=?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?=" - [ ] [ Recognize_encoded_words ] in - r = [ EncodedWord("ISO-8859-1", "Q", "Keld_J=F8rn_Simonsen") ] -;; - -let t025() = - let r = scan_structured_value - "=?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?= =?ISO-8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?=" - [] - [ Recognize_encoded_words ] in - r = [ EncodedWord - ("ISO-8859-1", "B", "SWYgeW91IGNhbiByZWFkIHRoaXMgeW8="); - EncodedWord - ("ISO-8859-2", "B", "dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==") - ] -;; - -(**********************************************************************) -(* s_extended_token *) -(**********************************************************************) - -let scan specials options str = - let scn = create_mime_scanner specials options str in - scan_token_list scn;; - -let t100() = - let r = scan [] [] "Two atoms" in - match r with - [ a1, Atom "Two"; a2, Atom "atoms" ] -> - - (get_pos a1 = 0) && - (get_line a1 = 1) && - (get_column a1 = 0) && - (get_length a1 = 3) && - (separates_adjacent_encoded_words a1 = false) && - - (get_pos a2 = 4) && - (get_line a2 = 1) && - (get_column a2 = 4) && - (get_length a2 = 5) && - (separates_adjacent_encoded_words a2 = false) - - | _ -> - false -;; - - -let t101() = - let r = scan [] [] " Two atoms " in - match r with - [ a1, Atom "Two"; a2, Atom "atoms" ] -> - - (get_pos a1 = 2) && - (get_line a1 = 1) && - (get_column a1 = 2) && - (get_length a1 = 3) && - (separates_adjacent_encoded_words a1 = false) && - - (get_pos a2 = 7) && - (get_line a2 = 1) && - (get_column a2 = 7) && - (get_length a2 = 5) && - (separates_adjacent_encoded_words a2 = false) - - | _ -> - false -;; - - -let t102() = - let r = scan [] [] " Two\n atoms " in - match r with - [ a1, Atom "Two"; a2, Atom "atoms" ] -> - - (get_pos a1 = 2) && - (get_line a1 = 1) && - (get_column a1 = 2) && - (get_length a1 = 3) && - (separates_adjacent_encoded_words a1 = false) && - - (get_pos a2 = 7) && - (get_line a2 = 2) && - (get_column a2 = 1) && - (get_length a2 = 5) && - (separates_adjacent_encoded_words a2 = false) - - | _ -> - false -;; - -let t110() = - let r = scan [] [] "\"Two\" \"qstrings\"" in - match r with - [ a1, QString "Two"; a2, QString "qstrings" ] -> - - (get_pos a1 = 0) && - (get_line a1 = 1) && - (get_column a1 = 0) && - (get_length a1 = 5) && - (separates_adjacent_encoded_words a1 = false) && - - (get_pos a2 = 6) && - (get_line a2 = 1) && - (get_column a2 = 6) && - (get_length a2 = 10) && - (separates_adjacent_encoded_words a2 = false) - - | _ -> - false -;; - -let t111() = - let r = scan [] [] " \"Two\" \"qstrings\" " in - match r with - [ a1, QString "Two"; a2, QString "qstrings" ] -> - - (get_pos a1 = 2) && - (get_line a1 = 1) && - (get_column a1 = 2) && - (get_length a1 = 5) && - (separates_adjacent_encoded_words a1 = false) && - - (get_pos a2 = 9) && - (get_line a2 = 1) && - (get_column a2 = 9) && - (get_length a2 = 10) && - (separates_adjacent_encoded_words a2 = false) - - | _ -> - false -;; - -let t112() = - let r = scan [] [] " \"Two\nlines\" \"and\nqstrings\" " in - match r with - [ a1, QString "Two\nlines"; a2, QString "and\nqstrings" ] -> - - (get_pos a1 = 2) && - (get_line a1 = 1) && - (get_column a1 = 2) && - (get_length a1 = 11) && - (separates_adjacent_encoded_words a1 = false) && - - (get_pos a2 = 15) && - (get_line a2 = 2) && - (get_column a2 = 8) && - (get_length a2 = 14) && - (separates_adjacent_encoded_words a2 = false) - - | _ -> - false -;; - -let t113() = - let r = scan [] [] " \"Two\\\nlines\" \"and\\\nqstrings\" " in - match r with - [ a1, QString "Two\nlines"; a2, QString "and\nqstrings" ] -> - - (get_pos a1 = 2) && - (get_line a1 = 1) && - (get_column a1 = 2) && - (get_length a1 = 12) && - (separates_adjacent_encoded_words a1 = false) && - - (get_pos a2 = 16) && - (get_line a2 = 2) && - (get_column a2 = 8) && - (get_length a2 = 15) && - (separates_adjacent_encoded_words a2 = false) - - | _ -> - false -;; - -let t120() = - (* Domain literals are implemented like quoted strings, so only the - * most complicated test case. - *) - let r = scan [] [] " [Two\\\nlines] [and\\\nliterals] " in - match r with - [ a1, DomainLiteral "Two\nlines"; a2, DomainLiteral "and\nliterals" ] -> - - (get_pos a1 = 2) && - (get_line a1 = 1) && - (get_column a1 = 2) && - (get_length a1 = 12) && - (separates_adjacent_encoded_words a1 = false) && - - (get_pos a2 = 16) && - (get_line a2 = 2) && - (get_column a2 = 8) && - (get_length a2 = 15) && - (separates_adjacent_encoded_words a2 = false) - - | _ -> - false -;; - -let t130() = - let r = scan [] [ Return_comments ] "(Two) (comments)" in - match r with - [ a1, Comment; a2, Comment ] -> - - (get_pos a1 = 0) && - (get_line a1 = 1) && - (get_column a1 = 0) && - (get_length a1 = 5) && - (separates_adjacent_encoded_words a1 = false) && - - (get_pos a2 = 6) && - (get_line a2 = 1) && - (get_column a2 = 6) && - (get_length a2 = 10) && - (separates_adjacent_encoded_words a2 = false) - - | _ -> - false -;; - -let t131() = - let r = scan [] [ Return_comments ] "(Two\nlines) (and\ncomments)" in - match r with - [ a1, Comment; a2, Comment ] -> - - (get_pos a1 = 0) && - (get_line a1 = 1) && - (get_column a1 = 0) && - (get_length a1 = 11) && - (separates_adjacent_encoded_words a1 = false) && - - (get_pos a2 = 12) && - (get_line a2 = 2) && - (get_column a2 = 7) && - (get_length a2 = 14) && - (separates_adjacent_encoded_words a2 = false) - - | _ -> - false -;; - -let t132() = - let r = scan [] [ Return_comments ] "(Two\\\nlines) (and\\\ncomments)" in - match r with - [ a1, Comment; a2, Comment ] -> - - (get_pos a1 = 0) && - (get_line a1 = 1) && - (get_column a1 = 0) && - (get_length a1 = 12) && - (separates_adjacent_encoded_words a1 = false) && - - (get_pos a2 = 13) && - (get_line a2 = 2) && - (get_column a2 = 7) && - (get_length a2 = 15) && - (separates_adjacent_encoded_words a2 = false) - - | _ -> - false -;; - -let t133() = - let r = scan [] [ Return_comments ] "(a\n(b\nc)d\ne(f)) atom" in - match r with - [ a1, Comment; a2, Atom "atom" ] -> - - (get_pos a1 = 0) && - (get_line a1 = 1) && - (get_column a1 = 0) && - (get_length a1 = 15) && - (separates_adjacent_encoded_words a1 = false) && - - (get_pos a2 = 16) && - (get_line a2 = 4) && - (get_column a2 = 6) && - (get_length a2 = 4) && - (separates_adjacent_encoded_words a2 = false) - - | _ -> - false -;; - -let t140() = - let r = scan [] [] "\031\031" in - match r with - [ a1, Control '\031'; a2, Control '\031' ] -> - - (get_pos a1 = 0) && - (get_line a1 = 1) && - (get_column a1 = 0) && - (get_length a1 = 1) && - (separates_adjacent_encoded_words a1 = false) && - - (get_pos a2 = 1) && - (get_line a2 = 1) && - (get_column a2 = 1) && - (get_length a2 = 1) && - (separates_adjacent_encoded_words a2 = false) - - | _ -> - false -;; - -let t150() = - let r = scan [ '\t'; '\n' ] [] " \t\n \n \t" in - match r with - [ a1, Special '\t'; _, Special '\n'; _, Special '\n'; a2, Special '\t'] -> - - (get_pos a1 = 1) && - (get_line a1 = 1) && - (get_column a1 = 1) && - (get_length a1 = 1) && - (separates_adjacent_encoded_words a1 = false) && - - (get_pos a2 = 8) && - (get_line a2 = 3) && - (get_column a2 = 2) && - (get_length a2 = 1) && - (separates_adjacent_encoded_words a2 = false) - - | _ -> - false -;; - -let t160() = - let r = scan [] [ Recognize_encoded_words ] - "=?iso8859-1?q?G=F6rd?= =?iso8859-1?q?G=F6rd?=" in - match r with - [ a1, EncodedWord("ISO8859-1", "Q", "G=F6rd"); - a2, EncodedWord("ISO8859-1", "Q", "G=F6rd"); ] -> - - (get_pos a1 = 0) && - (get_line a1 = 1) && - (get_column a1 = 0) && - (get_length a1 = 22) && - (separates_adjacent_encoded_words a1 = false) && - (get_decoded_word a1 = "Görd") && - (get_charset a1 = "ISO8859-1") && - - (get_pos a2 = 23) && - (get_line a2 = 1) && - (get_column a2 = 23) && - (get_length a2 = 22) && - (separates_adjacent_encoded_words a2 = false) && - (get_decoded_word a2 = "Görd") && - (get_charset a2 = "ISO8859-1") - - | _ -> - false -;; - -let t161() = - let r = scan [ ' ' ] [ Recognize_encoded_words ] - "=?iso8859-1?q?G=F6rd?= =?iso8859-1?q?G=F6rd?=" in - match r with - [ a1, EncodedWord("ISO8859-1", "Q", "G=F6rd"); - sp, Special ' '; - a2, EncodedWord("ISO8859-1", "Q", "G=F6rd"); ] -> - - (get_pos a1 = 0) && - (get_line a1 = 1) && - (get_column a1 = 0) && - (get_length a1 = 22) && - (separates_adjacent_encoded_words a1 = false) && - (get_decoded_word a1 = "Görd") && - (get_charset a1 = "ISO8859-1") && - - (get_pos a2 = 23) && - (get_line a2 = 1) && - (get_column a2 = 23) && - (get_length a2 = 22) && - (separates_adjacent_encoded_words a2 = false) && - (get_decoded_word a2 = "Görd") && - (get_charset a2 = "ISO8859-1") && - - (separates_adjacent_encoded_words sp = true) - - | _ -> - false -;; - -let t162() = - let r = scan [ ' ' ] [ Recognize_encoded_words ] - "=?iso8859-1?q?G=F6rd?= =?iso8859-1?q?G=F6rd?=" in - match r with - [ a1, EncodedWord("ISO8859-1", "Q", "G=F6rd"); - sp1, Special ' '; - sp2, Special ' '; - a2, EncodedWord("ISO8859-1", "Q", "G=F6rd"); ] -> - - (get_pos a1 = 0) && - (get_line a1 = 1) && - (get_column a1 = 0) && - (get_length a1 = 22) && - (separates_adjacent_encoded_words a1 = false) && - (get_decoded_word a1 = "Görd") && - (get_charset a1 = "ISO8859-1") && - - (get_pos a2 = 24) && - (get_line a2 = 1) && - (get_column a2 = 24) && - (get_length a2 = 22) && - (separates_adjacent_encoded_words a2 = false) && - (get_decoded_word a2 = "Görd") && - (get_charset a2 = "ISO8859-1") && - - (separates_adjacent_encoded_words sp1 = true) && - (separates_adjacent_encoded_words sp2 = true) - - | _ -> - false -;; - - - -(**********************************************************************) - -let test f n = - if f() then - print_endline ("Test " ^ n ^ " ok") - else - print_endline ("Test " ^ n ^ " FAILED!!!!"); - flush stdout -;; - -test t001 "001";; -test t002 "002";; -test t003 "003";; -test t004 "004";; -test t005 "005";; -test t006 "006";; -test t007 "007";; -test t008 "008";; -test t009 "009";; -test t010 "010";; -test t011 "011";; -test t012 "012";; -test t013 "013";; - -test t020 "020";; -test t021 "021";; -test t022 "022";; -test t023 "023";; -test t024 "024";; -test t025 "025";; - -test t100 "100";; -test t101 "101";; -test t102 "102";; -test t110 "110";; -test t111 "111";; -test t112 "112";; -test t113 "113";; -test t120 "120";; -test t130 "130";; -test t131 "131";; -test t132 "132";; -test t133 "133";; -test t140 "140";; -test t150 "150";; -test t160 "160";; -test t161 "161";; -test t162 "162";; diff --git a/helm/DEVEL/pxp/netstring/tests/test_netencoding.ml b/helm/DEVEL/pxp/netstring/tests/test_netencoding.ml deleted file mode 100644 index 29673fa5f..000000000 --- a/helm/DEVEL/pxp/netstring/tests/test_netencoding.ml +++ /dev/null @@ -1,223 +0,0 @@ -#require "str";; -#directory "..";; -#load "netstring.cma";; - - -open Netencoding;; - -(**********************************************************************) -(* Base64 *) -(**********************************************************************) - -(* Test strings: - * "", "a", "ab", "abc", "abcd", "abcde", - * "abcdefghijklmnopqrstuvwxyz". - *) - -let t001() = - (* ENCODE. No line breaks. *) - Base64.encode "" = "" & - Base64.encode "a" = "YQ==" & - Base64.encode "ab" = "YWI=" & - Base64.encode "abc" = "YWJj" & - Base64.encode "abcd" = "YWJjZA==" & - Base64.encode "abcde" = "YWJjZGU=" & - Base64.encode "abcdefghijklmnopqrstuvwxyz" = - "YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo=" -;; - - -let t002() = - (* ENCODE. Lines with length of 4, separated by LF *) - let abc = "abcdefghijklmnopqrstuvwxyz" in - Base64.encode_substring abc 0 0 4 false = "" & - Base64.encode_substring abc 0 1 4 false = "YQ==\n" & - Base64.encode_substring abc 0 2 4 false = "YWI=\n" & - Base64.encode_substring abc 0 3 4 false = "YWJj\n" & - Base64.encode_substring abc 0 4 4 false = "YWJj\nZA==\n" & - Base64.encode_substring abc 0 5 4 false = "YWJj\nZGU=\n" & - Base64.encode_substring abc 0 26 4 false = - "YWJj\nZGVm\nZ2hp\namts\nbW5v\ncHFy\nc3R1\ndnd4\neXo=\n" -;; - - -let t003() = - (* ENCODE. Lines with length of 5, separated by LF *) - let abc = "abcdefghijklmnopqrstuvwxyz" in - Base64.encode_substring abc 0 0 5 false = "" & - Base64.encode_substring abc 0 1 5 false = "YQ==\n" & - Base64.encode_substring abc 0 2 5 false = "YWI=\n" & - Base64.encode_substring abc 0 3 5 false = "YWJj\n" & - Base64.encode_substring abc 0 4 5 false = "YWJj\nZA==\n" & - Base64.encode_substring abc 0 5 5 false = "YWJj\nZGU=\n" & - Base64.encode_substring abc 0 26 5 false = - "YWJj\nZGVm\nZ2hp\namts\nbW5v\ncHFy\nc3R1\ndnd4\neXo=\n" -;; - - -let t004() = - (* ENCODE. Lines with length of 7, separated by LF *) - let abc = "abcdefghijklmnopqrstuvwxyz" in - Base64.encode_substring abc 0 0 7 false = "" & - Base64.encode_substring abc 0 1 7 false = "YQ==\n" & - Base64.encode_substring abc 0 2 7 false = "YWI=\n" & - Base64.encode_substring abc 0 3 7 false = "YWJj\n" & - Base64.encode_substring abc 0 4 7 false = "YWJj\nZA==\n" & - Base64.encode_substring abc 0 5 7 false = "YWJj\nZGU=\n" & - Base64.encode_substring abc 0 26 7 false = - "YWJj\nZGVm\nZ2hp\namts\nbW5v\ncHFy\nc3R1\ndnd4\neXo=\n" -;; - - -let t005() = - (* ENCODE. Lines with length of 8, separated by LF *) - let abc = "abcdefghijklmnopqrstuvwxyz" in - Base64.encode_substring abc 0 0 8 false = "" & - Base64.encode_substring abc 0 1 8 false = "YQ==\n" & - Base64.encode_substring abc 0 2 8 false = "YWI=\n" & - Base64.encode_substring abc 0 3 8 false = "YWJj\n" & - Base64.encode_substring abc 0 4 8 false = "YWJjZA==\n" & - Base64.encode_substring abc 0 5 8 false = "YWJjZGU=\n" & - Base64.encode_substring abc 0 26 8 false = - "YWJjZGVm\nZ2hpamts\nbW5vcHFy\nc3R1dnd4\neXo=\n" -;; - - -let t006() = - (* ENCODE. Lines with length of 8, separated by CRLF *) - let abc = "abcdefghijklmnopqrstuvwxyz" in - Base64.encode_substring abc 0 0 8 true = "" & - Base64.encode_substring abc 0 1 8 true = "YQ==\r\n" & - Base64.encode_substring abc 0 2 8 true = "YWI=\r\n" & - Base64.encode_substring abc 0 3 8 true = "YWJj\r\n" & - Base64.encode_substring abc 0 4 8 true = "YWJjZA==\r\n" & - Base64.encode_substring abc 0 5 8 true = "YWJjZGU=\r\n" & - Base64.encode_substring abc 0 26 8 true = - "YWJjZGVm\r\nZ2hpamts\r\nbW5vcHFy\r\nc3R1dnd4\r\neXo=\r\n" -;; - - -let t020() = - (* DECODE. First test without spaces *) - Base64.decode_substring "" 0 0 false false = "" & - Base64.decode_substring "YQ==" 0 4 false false = "a" & - Base64.decode_substring "YWI=" 0 4 false false = "ab" & - Base64.decode_substring "YWJj" 0 4 false false = "abc" & - Base64.decode_substring "YWJjZA==" 0 8 false false = "abcd" & - Base64.decode_substring "YWJjZGU=" 0 8 false false = "abcde" & - Base64.decode_substring - "YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXo=" 0 36 false false = - "abcdefghijklmnopqrstuvwxyz" -;; - - -let t021() = - (* DECODE. With spaces *) - Base64.decode_substring " \r\n\t" 0 4 false true = "" & - Base64.decode_substring " Y W J j\n Z G U = " 0 18 false true = "abcde" -;; - - -let t022() = - (* DECODE. With URL characters and spaces *) - Base64.decode_substring " Y W J j\n Z G U = " 0 18 true true = "abcde" & - Base64.decode_substring " Y W J j\n Z G U . " 0 18 true true = "abcde" -;; - -(**********************************************************************) -(* Quoted Printable *) -(**********************************************************************) - -let t100() = - (* ENCODE. *) - QuotedPrintable.encode "a %= 12345 &$[]\"" = "a %=3D 12345 &=24=5B=5D=22" & - QuotedPrintable.encode "\000\001\002" = "=00=01=02" & - QuotedPrintable.encode "abc\r\ndef\nghi" = "abc\r\ndef\nghi" & - QuotedPrintable.encode " abc\r\n def\n ghi" = " abc\r\n def\n ghi" & - QuotedPrintable.encode "abc \r\n def\nghi " = "abc=20\r\n def\nghi=20" -;; - - -let t120() = - (* DECODE. *) - QuotedPrintable.decode "a %=3D 12345 &=24=5B=5D=22" = "a %= 12345 &$[]\"" & - QuotedPrintable.decode "=00=01=02" = "\000\001\002" & - QuotedPrintable.decode "abc\r\ndef\nghi" = "abc\r\ndef\nghi" & - QuotedPrintable.decode " abc\r\n def\n ghi" = " abc\r\n def\n ghi" & - QuotedPrintable.decode "abc=20\r\n def\nghi=20" = "abc \r\n def\nghi " & - QuotedPrintable.decode "abc=\r\n def\nghi=20" = "abc def\nghi " -;; - -(**********************************************************************) -(* Q *) -(**********************************************************************) - -let t200() = - (* ENCODE. *) - Q.encode "a %= 12345 &$[]\"" = "a=20=25=3D=2012345=20=26=24=5B=5D=22" & - Q.encode "\000\001\002\r\n" = "=00=01=02=0D=0A" -;; - - -let t220() = - (* DECODE. *) - Q.decode "a=20=25=3D=2012345=20=26=24=5B=5D=22" = "a %= 12345 &$[]\"" & - Q.decode "=00=01=02=0D=0A" = "\000\001\002\r\n" & - Q.decode "a=20=25=3d=2012345=20=26=24=5b=5d=22" = "a %= 12345 &$[]\"" -;; - -(**********************************************************************) -(* Url *) -(**********************************************************************) - -(* Already tested for Cgi *) - -(**********************************************************************) -(* Html *) -(**********************************************************************) - -let t300() = - Html.encode_from_latin1 "<>&\"abcdefäöÜ\160\025'" = - "<>&"abcdefäöÜ '" -;; - - -let t320() = - Html.decode_to_latin1 - "<>&"abcdefäöÜ " = - "<>&\"abcdefäöÜ\160\025" & - Html.decode_to_latin1 "'" = "'" & - Html.decode_to_latin1 "&nonsense;" = "&nonsense;" & - Html.decode_to_latin1 "Ā" = "Ā" -;; - - -(**********************************************************************) - -let test f n = - if f() then - print_endline ("Test " ^ n ^ " ok") - else - print_endline ("Test " ^ n ^ " FAILED!!!!"); - flush stdout -;; - -test t001 "001"; -test t002 "002"; -test t003 "003"; -test t004 "004"; -test t005 "005"; -test t006 "006"; - -test t020 "020"; -test t021 "021"; -test t022 "022"; - -test t100 "100"; -test t120 "120"; - -test t200 "200"; -test t220 "220"; - -test t300 "300"; -test t320 "320"; diff --git a/helm/DEVEL/pxp/netstring/tests/test_neturl.ml b/helm/DEVEL/pxp/netstring/tests/test_neturl.ml deleted file mode 100644 index 633bfda09..000000000 --- a/helm/DEVEL/pxp/netstring/tests/test_neturl.ml +++ /dev/null @@ -1,969 +0,0 @@ -#directory "..";; -#load "netstring.cma";; - -open Neturl;; - - -let expect_malformed_url f = - try ignore(f()); false with Malformed_URL -> true;; - -let works f = - not (expect_malformed_url f) -;; - -(**********************************************************************) -(* extract_url_scheme *) -(**********************************************************************) - -let t001 () = - extract_url_scheme "a:bc" = "a" && - extract_url_scheme "A:bc" = "a" && - extract_url_scheme "a:b:c" = "a" && - extract_url_scheme "a+b-c:d:e" = "a+b-c" -;; - - -let t002 () = - let test s = - try ignore(extract_url_scheme s); false with Malformed_URL -> true - in - test "a" && - test "a/b:c" && - test "%61:b" && - test "a%3ab" -;; - -(**********************************************************************) -(* url_syntax *) -(**********************************************************************) - -let hashtbl_for_all f h = - let b = ref true in - Hashtbl.iter - (fun k v -> b := !b && f k v) - h; - !b -;; - -let t010 () = - url_syntax_is_valid null_url_syntax && - url_syntax_is_valid ip_url_syntax && - hashtbl_for_all - (fun _ syn -> - url_syntax_is_valid syn - ) - common_url_syntax -;; - -let t011 () = - url_syntax_is_valid (partial_url_syntax null_url_syntax) && - url_syntax_is_valid (partial_url_syntax ip_url_syntax) && - hashtbl_for_all - (fun _ syn -> - url_syntax_is_valid (partial_url_syntax syn) - ) - common_url_syntax -;; - -let t012 () = - let f = fun _ -> true in - let syn = - { url_enable_scheme = Url_part_not_recognized; - url_enable_user = Url_part_required; - url_enable_password = Url_part_allowed; - url_enable_host = Url_part_required; - url_enable_port = Url_part_not_recognized; - url_enable_path = Url_part_required; - url_enable_param = Url_part_not_recognized; - url_enable_query = Url_part_not_recognized; - url_enable_fragment = Url_part_required; - url_enable_other = Url_part_not_recognized; - url_accepts_8bits = false; - url_is_valid = f; - } in - let syn' = partial_url_syntax syn in - - (syn'.url_enable_scheme = Url_part_not_recognized) && - (syn'.url_enable_user = Url_part_allowed) && - (syn'.url_enable_password = Url_part_allowed) && - (syn'.url_enable_host = Url_part_allowed) && - (syn'.url_enable_port = Url_part_not_recognized) && - (syn'.url_enable_path = Url_part_allowed) && - (syn'.url_enable_param = Url_part_not_recognized) && - (syn'.url_enable_query = Url_part_not_recognized) && - (syn'.url_enable_fragment = Url_part_allowed) && - (syn'.url_enable_other = Url_part_not_recognized) && - (syn'.url_is_valid == f) && - - url_syntax_is_valid syn && - url_syntax_is_valid syn' -;; - -(**********************************************************************) -(* make_url *) -(**********************************************************************) - -let t020 () = - (* Basic functionality: *) - let http_syn = Hashtbl.find common_url_syntax "http" in - - let u1 = make_url - (* default: not encoded *) - ~scheme:"http" - ~user:"U" - ~password:"%()~$@" - ~host:"a.b.c" - ~port:81 - ~path:["";"?";""] - http_syn in - - url_provides - ~scheme:true ~user:true ~password:true ~host:true ~port:true ~path:true - u1 && - - not - (url_provides - ~scheme:true ~user:true ~password:true ~host:true ~port:true ~path:true - ~query:true u1) && - - (url_syntax_of_url u1 == http_syn) && - - (url_scheme u1 = "http") && - (url_user u1 = "U") && - (url_password u1 = "%()~$@") && - (url_host u1 = "a.b.c") && - (url_port u1 = 81) && - (url_path u1 = ["";"?";""]) && - - (url_user ~encoded:true u1 = "U") && - (url_password ~encoded:true u1 = "%25()%7E$%40") && - (url_path ~encoded:true u1 = ["";"%3F";""]) && - - string_of_url u1 = "http://U:%25()%7E$%40@a.b.c:81/%3F/" -;; - - -let t021 () = - (* Basic functionality: *) - let http_syn = Hashtbl.find common_url_syntax "http" in - - let u1 = make_url - ~encoded:true - ~scheme:"http" - ~user:"%55" - ~password:"%25()%7e$%40" - ~host:"a.b.c" - ~port:81 - ~path:["";"%3F";""] - http_syn in - - url_provides - ~scheme:true ~user:true ~password:true ~host:true ~port:true ~path:true - u1 && - - not - (url_provides - ~scheme:true ~user:true ~password:true ~host:true ~port:true ~path:true - ~query:true u1) && - - (url_syntax_of_url u1 == http_syn) && - - (url_scheme u1 = "http") && - (url_user u1 = "U") && - (url_password u1 = "%()~$@") && - (url_host u1 = "a.b.c") && - (url_port u1 = 81) && - (url_path u1 = ["";"?";""]) && - - (url_user ~encoded:true u1 = "%55") && - (url_password ~encoded:true u1 = "%25()%7e$%40") && - (url_path ~encoded:true u1 = ["";"%3F";""]) && - - string_of_url u1 = "http://%55:%25()%7e$%40@a.b.c:81/%3F/" -;; - - -(* NEGATIVE TESTS *) - -let t030 () = - (* It is not possible to add a component which is not recognized *) - let http_syn = Hashtbl.find common_url_syntax "http" in - - expect_malformed_url - (fun () -> - make_url - ~scheme:"http" - ~user:"U" - ~password:"%()~$@" - ~host:"a.b.c" - ~port:81 - ~path:["";"?";""] - ~fragment:"abc" - http_syn) -;; - - -let t031 () = - (* It is not possible to put malformed '%'-encodings into the URL *) - let http_syn = Hashtbl.find common_url_syntax "http" in - - works (* reference *) - (fun () -> - make_url - ~encoded:true - ~scheme:"http" - ~user:"U" - ~password:"XX" - ~host:"a.b.c" - ~port:81 - ~path:["";"a";""] - http_syn) && - - expect_malformed_url - (fun () -> - make_url - ~encoded:true - ~scheme:"http" - ~user:"U" - ~password:"%XX" - ~host:"a.b.c" - ~port:81 - ~path:["";"a";""] - http_syn) && - - expect_malformed_url - (fun () -> - make_url - ~encoded:true - ~scheme:"http" - ~user:"U" - ~password:"%X" - ~host:"a.b.c" - ~port:81 - ~path:["";"a";""] - http_syn) && - - expect_malformed_url - (fun () -> - make_url - ~encoded:true - ~scheme:"http" - ~user:"U" - ~password:"%" - ~host:"a.b.c" - ~port:81 - ~path:["";"a";""] - http_syn) -;; - -let t032 () = - (* It is not possible to put unsafe characters into the URL *) - let http_syn = Hashtbl.find common_url_syntax "http" in - - let make c = - make_url - ~encoded:true - ~scheme:"http" - ~user:"U" - ~password:(String.make 1 c) - ~host:"a.b.c" - ~port:81 - ~path:["";"a";""] - http_syn - in - - works (fun () -> make 'a') && (* reference *) - - (* List of unsafe characters taken from RFC1738: *) - expect_malformed_url (fun () -> make '<') && - expect_malformed_url (fun () -> make '>') && - expect_malformed_url (fun () -> make '"') && - expect_malformed_url (fun () -> make '#') && - (* Note: '#' would be considered as reserved if fragments were enabled *) - expect_malformed_url (fun () -> make '%') && - expect_malformed_url (fun () -> make '{') && - expect_malformed_url (fun () -> make '}') && - expect_malformed_url (fun () -> make '|') && - expect_malformed_url (fun () -> make '\\') && - expect_malformed_url (fun () -> make '^') && - expect_malformed_url (fun () -> make '[') && - expect_malformed_url (fun () -> make ']') && - expect_malformed_url (fun () -> make '`') && - expect_malformed_url (fun () -> make '~') && - (* Note: '~' is considered as safe in paths: *) - works - (fun () -> - make_url - ~encoded:true - ~scheme:"http" - ~user:"U" - ~password:"a" - ~host:"a.b.c" - ~port:81 - ~path:["";"~";""] - http_syn) -;; - -let t033 () = - (* It is not possible to put reserved characters into the URL *) - let http_syn = Hashtbl.find common_url_syntax "http" in - - let make_password c = - make_url - ~encoded:true - ~scheme:"http" - ~user:"U" - ~password:(String.make 1 c) - ~host:"a.b.c" - ~port:81 - ~path:["";"a";""] - http_syn - in - let make_path c = - make_url - ~encoded:true - ~scheme:"http" - ~user:"U" - ~password:"a" - ~host:"a.b.c" - ~port:81 - ~path:["";String.make 1 c;""] - http_syn - in - let make_query c = - make_url - ~encoded:true - ~scheme:"http" - ~user:"U" - ~password:"a" - ~host:"a.b.c" - ~port:81 - ~path:["";"a";""] - ~query:(String.make 1 c) - http_syn - in - - (* Note: There is a difference between RFC 1738 and RFC 1808 regarding - * which characters are reserved. RFC 1808 defines a fixed set of characters - * as reserved while RFC 1738 defines the reserved characters depending - * on the scheme. - * This implementation of URLs follows RFC 1738 (because of practical - * reasons). - *) - - works (fun () -> make_password 'a') && (* reference *) - works (fun () -> make_path 'a') && - works (fun () -> make_query 'a') && - - expect_malformed_url (fun () -> make_password ':') && - expect_malformed_url (fun () -> make_password '@') && - expect_malformed_url (fun () -> make_password '/') && - works (fun () -> make_password ';') && - works (fun () -> make_password '?') && - works (fun () -> make_password '=') && - works (fun () -> make_password '&') && - - (* Note: ';' is allowed in path and query because parameters are not - * recognized in HTTP syntax. - *) - - expect_malformed_url (fun () -> make_path '/') && - expect_malformed_url (fun () -> make_path '?') && - works (fun () -> make_path ':') && - works (fun () -> make_path '@') && - works (fun () -> make_path ';') && - works (fun () -> make_path '=') && - works (fun () -> make_path '&') && - - expect_malformed_url (fun () -> make_query '?') && - works (fun () -> make_query '/') && - works (fun () -> make_query ':') && - works (fun () -> make_query '@') && - works (fun () -> make_query ';') && - works (fun () -> make_query '=') && - works (fun () -> make_query '&') -;; - - -let t034 () = - (* It is not possible to create a URL with a password, but without user; - * and neither to create a URL with a port, but without host; - * and neither to create a URL with a user, but without host - *) - - expect_malformed_url - (fun () -> - make_url - ~scheme:"http" - ~password:"a" - ~host:"a.b.c" - ~path:["";"a";""] - ip_url_syntax) && - - expect_malformed_url - (fun () -> - make_url - ~scheme:"http" - ~user:"U" - ~path:["";"a";""] - ip_url_syntax) && - - expect_malformed_url - (fun () -> - make_url - ~scheme:"http" - ~port:81 - ~path:["";"a";""] - ip_url_syntax) -;; - - -let t035 () = - (* It is not possible to create a URL with illegal scheme prefix *) - - (* reference: *) - works - (fun () -> - make_url - ~scheme:"a" - ip_url_syntax) && - - expect_malformed_url - (fun () -> - make_url - ~scheme:":" - ip_url_syntax) && - - expect_malformed_url - (fun () -> - make_url - ~scheme:"a=b" - ip_url_syntax) && - - expect_malformed_url - (fun () -> - make_url - ~scheme:"a%62b" - ip_url_syntax) && - - expect_malformed_url - (fun () -> - make_url - ~scheme:"a&b" - ip_url_syntax) -;; - - -let t036 () = - (* It is not possible to have a path with double slashes *) - - (* reference: *) - works - (fun () -> - make_url - ~path:["";"a";""] - ip_url_syntax) && - - expect_malformed_url - (fun () -> - make_url - ~path:["";""] - ip_url_syntax) && - - expect_malformed_url - (fun () -> - make_url - ~path:["a";"";""] - ip_url_syntax) && - - expect_malformed_url - (fun () -> - make_url - ~path:["";"";"a"] - ip_url_syntax) && - - expect_malformed_url - (fun () -> - make_url - ~path:["a";"";"a"] - ip_url_syntax) -;; - - -let t037 () = - (* It is not possible to have port numbers outside 0..65535 *) - - (* reference: *) - works - (fun () -> - make_url - ~host:"a" - ~port:1 - ip_url_syntax) && - - expect_malformed_url - (fun () -> - make_url - ~host:"a" - ~port:(-1) - ip_url_syntax) && - - expect_malformed_url - (fun () -> - make_url - ~host:"a" - ~port:65536 - ip_url_syntax) -;; - - -let t038 () = - (* Several cases which are not allowed. *) - - expect_malformed_url - (fun () -> - make_url - ~host:"a" - ~path:["a"] - ip_url_syntax - ) && (* illegal: host + relative path *) - - expect_malformed_url - (fun () -> - make_url - ~host:"a" - ~path:[] - ~param:["x"] - ip_url_syntax - ) && (* illegal: host + no path + params *) - - expect_malformed_url - (fun () -> - make_url - ~host:"a" - ~path:[] - ~query:"x" - ip_url_syntax - ) (* illegal: host + no path + query *) -;; - -(**********************************************************************) -(* url_of_string *) -(**********************************************************************) - -let t050 () = - (* absolute URLs with ip_url_syntax *) - let identical s = - string_of_url (url_of_string ip_url_syntax s) = s in - - let fails s = - try ignore(url_of_string ip_url_syntax s); false - with Malformed_URL -> true - in - - identical "http:" && - - identical "http://host" && - identical "http://user@host" && - identical "http://user:password@host" && - identical "http://user@host:99" && - identical "http://user:password@host:99" && - - identical "http://host/" && - identical "http://user@host/" && - identical "http://user:password@host/" && - identical "http://user@host:99/" && - identical "http://user:password@host:99/" && - - identical "http://host/a/b" && - identical "http://user@host/a/b" && - identical "http://user:password@host/a/b" && - identical "http://user@host:99/a/b" && - identical "http://user:password@host:99/a/b" && - - identical "http://host/a/b/" && - identical "http://user@host/a/b/" && - identical "http://user:password@host/a/b/" && - identical "http://user@host:99/a/b/" && - identical "http://user:password@host:99/a/b/" && - - identical "http://host/?a=b&c=d" && - identical "http://user@host/?a=b&c=d" && - identical "http://user:password@host/?a=b&c=d" && - identical "http://user@host:99/?a=b&c=d" && - identical "http://user:password@host:99/?a=b&c=d" && - - fails "http://host?a=b&c=d" && - fails "http://user@host?a=b&c=d" && - fails "http://user:password@host?a=b&c=d" && - fails "http://user@host:99?a=b&c=d" && - fails "http://user:password@host:99?a=b&c=d" && - - identical "http://host/?a=/&c=/" && - identical "http://user@host/?a=/&c=/" && - identical "http://user:password@host/?a=/&c=/" && - identical "http://user@host:99/?a=/&c=/" && - identical "http://user:password@host:99/?a=/&c=/" && - - identical "http://host/;a;b" && - identical "http://user@host/;a;b" && - identical "http://user:password@host/;a;b" && - identical "http://user@host:99/;a;b" && - identical "http://user:password@host:99/;a;b" && - - fails "http://host;a;b" && - fails "http://user@host;a;b" && - fails "http://user:password@host;a;b" && - fails "http://user@host:99;a;b" && - fails "http://user:password@host:99;a;b" && - - identical "http://host/;a;b?a=b&c=d" && - identical "http://user@host/;a;b?a=b&c=d" && - identical "http://user:password@host/;a;b?a=b&c=d" && - identical "http://user@host:99/;a;b?a=b&c=d" && - identical "http://user:password@host:99/;a;b?a=b&c=d" && - - identical "http:#f" && - - identical "http://host#f" && - identical "http://user@host#f" && - identical "http://user:password@host#f" && - identical "http://user@host:99#f" && - identical "http://user:password@host:99#f" && - - identical "http://host/;a;b?a=b&c=d#f" && - identical "http://user@host/;a;b?a=b&c=d#f" && - identical "http://user:password@host/;a;b?a=b&c=d#f" && - identical "http://user@host:99/;a;b?a=b&c=d#f" && - identical "http://user:password@host:99/;a;b?a=b&c=d#f" && - - true -;; - - -let t051 () = - (* relative URLs with ip_url_syntax *) - let identical s = - string_of_url (url_of_string ip_url_syntax s) = s in - - let fails s = - try ignore(url_of_string ip_url_syntax s); false - with Malformed_URL -> true - in - - identical "//host" && - identical "//user@host" && - identical "//user:password@host" && - identical "//user@host:99" && - identical "//user:password@host:99" && - - identical "//host/" && - identical "//user@host/" && - identical "//user:password@host/" && - identical "//user@host:99/" && - identical "//user:password@host:99/" && - - identical "//host#f" && - identical "//user@host#f" && - identical "//user:password@host#f" && - identical "//user@host:99#f" && - identical "//user:password@host:99#f" && - - identical "/" && - identical "/a" && - identical "/a/" && - identical "/a/a" && - - identical "/;a;b" && - identical "/a;a;b" && - identical "/a/;a;b" && - identical "/a/a;a;b" && - - identical "/?a=b&c=d" && - identical "/a?a=b&c=d" && - identical "/a/?a=b&c=d" && - identical "/a/a?a=b&c=d" && - - identical "/;a;b?a=b&c=d" && - identical "/a;a;b?a=b&c=d" && - identical "/a/;a;b?a=b&c=d" && - identical "/a/a;a;b?a=b&c=d" && - - identical "/#f" && - identical "/a#f" && - identical "/a/#f" && - identical "/a/a#f" && - - identical "/;a;b#f" && - identical "/a;a;b#f" && - identical "/a/;a;b#f" && - identical "/a/a;a;b#f" && - - identical "/;a;b?a=b&c=d#f" && - identical "/a;a;b?a=b&c=d#f" && - identical "/a/;a;b?a=b&c=d#f" && - identical "/a/a;a;b?a=b&c=d#f" && - - identical "" && - identical "a" && - identical "a/" && - identical "a/a" && - - identical ";a;b" && - identical "a;a;b" && - identical "a/;a;b" && - identical "a/a;a;b" && - - identical "?a=b&c=d" && - identical "a?a=b&c=d" && - identical "a/?a=b&c=d" && - identical "a/a?a=b&c=d" && - - identical ";a;b?a=b&c=d" && - identical "a;a;b?a=b&c=d" && - identical "a/;a;b?a=b&c=d" && - identical "a/a;a;b?a=b&c=d" && - - identical "#f" && - identical "a#f" && - identical "a/#f" && - identical "a/a#f" && - - identical ";a;b#f" && - identical "a;a;b#f" && - identical "a/;a;b#f" && - identical "a/a;a;b#f" && - - identical ";a;b?a=b&c=d#f" && - identical "a;a;b?a=b&c=d#f" && - identical "a/;a;b?a=b&c=d#f" && - identical "a/a;a;b?a=b&c=d#f" && - - identical "." && - identical "./" && - identical "./a" && - - identical ".;a;b" && - identical "./;a;b" && - identical "./a;a;b" && - - identical ".?a=b&c=d" && - identical "./?a=b&c=d" && - identical "./a?a=b&c=d" && - - identical ".;a;b?a=b&c=d" && - identical "./;a;b?a=b&c=d" && - identical "./a;a;b?a=b&c=d" && - - identical ".#f" && - identical "./#f" && - identical "./a#f" && - - identical ".;a;b#f" && - identical "./;a;b#f" && - identical "./a;a;b#f" && - - identical ".;a;b?a=b&c=d#f" && - identical "./;a;b?a=b&c=d#f" && - identical "./a;a;b?a=b&c=d#f" && - - identical ".." && - identical "../" && - identical "../a" && - - identical "..;a;b" && - identical "../;a;b" && - identical "../a;a;b" && - - identical "..?a=b&c=d" && - identical "../?a=b&c=d" && - identical "../a?a=b&c=d" && - - identical "..;a;b?a=b&c=d" && - identical "../;a;b?a=b&c=d" && - identical "../a;a;b?a=b&c=d" && - - identical "..#f" && - identical "../#f" && - identical "../a#f" && - - identical "..;a;b#f" && - identical "../;a;b#f" && - identical "../a;a;b#f" && - - identical "..;a;b?a=b&c=d#f" && - identical "../;a;b?a=b&c=d#f" && - identical "../a;a;b?a=b&c=d#f" && - - string_of_url - (make_url ~path:["a:b"] ip_url_syntax) = "a%3Ab" && - - string_of_url - (make_url ~encoded:true ~path:["a:b"] ip_url_syntax) = "./a:b" && - - true -;; - - -let t052 () = - (* mailto: URLs *) - let mailto_syn = Hashtbl.find common_url_syntax "mailto" in - - let identical s = - string_of_url (url_of_string mailto_syn s) = s in - - let fails s = - try ignore(url_of_string mailto_syn s); false - with Malformed_URL -> true - in - - identical "mailto:user@host" && - identical "mailto:user@host;?;?" && - fails "mailto:user@host#f" -;; - -(**********************************************************************) -(* split_path/join_path/norm_path: *) -(**********************************************************************) - -let t060 () = - (split_path "" = []) && - (split_path "/" = [ "" ]) && - (split_path "/a" = [ ""; "a" ]) && - (split_path "a" = [ "a" ]) && - (split_path "a/" = [ "a"; "" ]) && - (split_path "/a/" = [ ""; "a"; "" ]) && - (split_path "/a/b" = [ ""; "a"; "b" ]) && - (split_path "/a/b/" = [ ""; "a"; "b"; "" ]) && - (split_path "/a/b/c" = [ ""; "a"; "b"; "c" ]) && - - (join_path [] = "") && - (join_path [ "" ] = "/") && - (join_path [ ""; "a" ] = "/a") && - (join_path [ "a" ] = "a") && - (join_path [ "a"; "" ] = "a/") && - (join_path [ ""; "a"; "" ] = "/a/") && - (join_path [ ""; "a"; "b" ] = "/a/b") && - (join_path [ ""; "a"; "b"; "" ] = "/a/b/") && - (join_path [ ""; "a"; "b"; "c" ] = "/a/b/c") && - - true -;; - - -let t061 () = - (norm_path ["."] = []) && - (norm_path ["."; ""] = []) && - (norm_path ["a"; "."] = ["a"; ""]) && - (norm_path ["a"; "b"; "."] = ["a"; "b"; ""]) && - (norm_path ["a"; "b"; ".."] = ["a"; ""]) && - (norm_path ["a"; "."; "b"; "."] = ["a"; "b"; ""]) && - (norm_path [".."] = [".."; ""]) && - (norm_path [".."; ""] = [".."; ""]) && - (norm_path ["a"; "b"; ".."; "c" ] = ["a"; "c"]) && - (norm_path ["a"; "b"; ".."; "c"; ""] = ["a"; "c"; ""]) && - (norm_path ["";"";"a";"";"b"] = [""; "a"; "b"]) && - (norm_path ["a"; "b"; ""; ".."; "c"; ""] = ["a"; "c"; ""]) && - (norm_path ["a"; ".."] = []) && - (norm_path ["";""] = [""]) && - (norm_path [""] = [""]) && - (norm_path [] = []) && - - true -;; - -(**********************************************************************) -(* apply_relative_url: *) -(**********************************************************************) - -let t070() = - (* Examples taken from RFC 1808 *) - let url = url_of_string ip_url_syntax in - let base = url "http://a/b/c/d;p?q#f" in - let aru = apply_relative_url base in - - (aru (url "g:h") = url "g:h") && - (aru (url "g") = url "http://a/b/c/g") && - (aru (url "./g") = url "http://a/b/c/g") && - (aru (url "g/") = url "http://a/b/c/g/") && - (aru (url "/g") = url "http://a/g") && - (aru (url "//g") = url "http://g") && - (aru (url "?y") = url "http://a/b/c/d;p?y") && - (aru (url "g?y") = url "http://a/b/c/g?y") && - (aru (url "g?y/./x") = url "http://a/b/c/g?y/./x") && - (aru (url "#s") = url "http://a/b/c/d;p?q#s") && - (aru (url "g#s") = url "http://a/b/c/g#s") && - (aru (url "g#s/./x") = url "http://a/b/c/g#s/./x") && - (aru (url "g?y#s") = url "http://a/b/c/g?y#s") && - (aru (url ";x") = url "http://a/b/c/d;x") && - (aru (url "g;x") = url "http://a/b/c/g;x") && - (aru (url "g;x?y#s") = url "http://a/b/c/g;x?y#s") && - (aru (url ".") = url "http://a/b/c/") && - (aru (url "./") = url "http://a/b/c/") && - (aru (url "..") = url "http://a/b/") && - (aru (url "../") = url "http://a/b/") && - (aru (url "../g") = url "http://a/b/g") && - (aru (url "../..") = url "http://a/") && - (aru (url "../../") = url "http://a/") && - (aru (url "../../g") = url "http://a/g") && - - (aru (url "") = url "http://a/b/c/d;p?q#f") && - (aru (url "../../../g") = url "http://a/../g") && - (aru (url "../../../../g") = url "http://a/../../g") && - (aru (url "/./g") = url "http://a/./g") && - (aru (url "/../g") = url "http://a/../g") && - (aru (url "g.") = url "http://a/b/c/g.") && - (aru (url ".g") = url "http://a/b/c/.g") && - (aru (url "g..") = url "http://a/b/c/g..") && - (aru (url "..g") = url "http://a/b/c/..g") && - (aru (url "./../g") = url "http://a/b/g") && - (aru (url "./g/.") = url "http://a/b/c/g/") && - (aru (url "g/./h") = url "http://a/b/c/g/h") && - (aru (url "g/../h") = url "http://a/b/c/h") && - (aru (url "http:g") = url "http:g") && - (aru (url "http:") = url "http:") && - - true -;; - - -(**********************************************************************) - -let test f n = - if f() then - print_endline ("Test " ^ n ^ " ok") - else - print_endline ("Test " ^ n ^ " FAILED!!!!"); - flush stdout -;; - -test t001 "001"; -test t002 "002"; - -test t010 "010"; -test t011 "011"; -test t012 "012"; - -test t020 "020"; -test t021 "021"; - -test t030 "030"; -test t031 "031"; -test t032 "032"; -test t033 "033"; -test t034 "034"; -test t035 "035"; -test t036 "036"; -test t037 "037"; -test t038 "038"; - -test t050 "050"; -test t051 "051"; -test t052 "052"; - -test t060 "060"; -test t061 "061"; - -test t070 "070"; -() -;; diff --git a/helm/DEVEL/pxp/netstring/tests/test_recode.ml b/helm/DEVEL/pxp/netstring/tests/test_recode.ml deleted file mode 100644 index 64a04caae..000000000 --- a/helm/DEVEL/pxp/netstring/tests/test_recode.ml +++ /dev/null @@ -1,169 +0,0 @@ - - -let make_iso enc = - let s = ref "" in - for i = 0 to 255 do - let u = try Netconversion.makechar (enc :> Netconversion.encoding) i - with Not_found -> "" in - s := !s ^ u - done; - !s -;; - -let make_ucs2 start stop = - let s = String.create ((stop - start) * 2) in - for i = 0 to stop-start-1 do - let k = 2 * i in - let c = i + start in - s.[k] <- Char.chr(c lsr 8); - s.[k+1] <- Char.chr(c land 0xff); - done; - s -;; - -let make_ucs4 start stop = - let s = String.create ((stop - start) * 4) in - for i = 0 to stop-start-1 do - let k = 4 * i in - let c = i + start in - s.[k] <- Char.chr(c lsr 24); - s.[k+1] <- Char.chr((c lsr 16) land 0xff); - s.[k+2] <- Char.chr((c lsr 8) land 0xff); - s.[k+3] <- Char.chr(c land 0xff); - done; - s -;; - -let name_of_encoding enc = - match enc with - `Enc_iso88591 -> "ISO_8859-1" - | `Enc_iso88592 -> "ISO_8859-2" - | `Enc_iso88593 -> "ISO_8859-3" - | `Enc_iso88594 -> "ISO_8859-4" - | `Enc_iso88595 -> "ISO_8859-5" - | `Enc_iso88596 -> "ISO_8859-6" - | `Enc_iso88597 -> "ISO_8859-7" - | `Enc_iso88598 -> "ISO_8859-8" - | `Enc_iso88599 -> "ISO_8859-9" - | `Enc_iso885910 -> "ISO_8859-10" - | `Enc_iso885913 -> "ISO_8859-13" - | `Enc_iso885914 -> "ISO_8859-14" - | `Enc_iso885915 -> "ISO_8859-15" - | `Enc_utf8 -> "UTF-8" - | `Enc_ucs4 -> "UCS-4" - | `Enc_ucs2 -> "UCS-2" - | `Enc_utf16 -> "UTF-16" - - (* Note: GNU-iconv assumes big endian byte order *) -;; - -let iconv_recode_string in_enc out_enc in_s = - let in_enc_name = name_of_encoding in_enc in - let out_enc_name = name_of_encoding out_enc in - let out_s = ref "" in - - let out_ch,in_ch = Unix.open_process ("iconv -f " ^ in_enc_name ^ " -t " ^ - out_enc_name) in - (* Write in_s to in_ch in a new thread: *) - ignore - (Thread.create - (fun () -> - output_string in_ch in_s; - close_out in_ch; - ) - () - ); - (* Read the result in the current thread: *) - let buf = String.create 1024 in - let n = ref 1 in - while !n <> 0 do - let n' = input out_ch buf 0 1024 in - out_s := !out_s ^ String.sub buf 0 n'; - n := n' - done; - ignore(Unix.close_process (out_ch,in_ch)); - !out_s -;; - -let test_iso_and_utf8 enc = - let name = name_of_encoding enc in - print_string ("Recode: " ^ name ^ " and UTF-8... "); flush stdout; - let s = make_iso enc in - let s1' = Netconversion.recode_string (enc :> Netconversion.encoding) - `Enc_utf8 s in - let s2' = iconv_recode_string enc `Enc_utf8 s in - assert(s1' = s2'); - let s1 = Netconversion.recode_string `Enc_utf8 - (enc :> Netconversion.encoding) s1' in - let s2 = iconv_recode_string `Enc_utf8 enc s1' in - assert(s1 = s2 && s1 = s); - print_endline "OK"; flush stdout -;; - -let test_utf16_and_utf8_0000_d7ff () = - print_string "Recode: UTF-16-BE and UTF-8, #0000-#D7FF... "; - flush stdout; - let s = make_ucs2 0 0xd800 in - let s1' = Netconversion.recode_string `Enc_utf16_be `Enc_utf8 s in - let s2' = iconv_recode_string `Enc_utf16 `Enc_utf8 s in - assert(s1' = s2'); - let s1 = Netconversion.recode_string `Enc_utf8 `Enc_utf16_be s1' in - let s2 = iconv_recode_string `Enc_utf8 `Enc_utf16 s1' in - assert(s1 = s2 && s1 = s); - print_endline "OK"; flush stdout -;; - -let test_utf16_and_utf8_e000_fffd () = - print_string "Recode: UTF-16-BE and UTF-8, #E000-#FFFD... "; - flush stdout; - let s = make_ucs2 0xe000 0xfffe in - let s1' = Netconversion.recode_string `Enc_utf16_be `Enc_utf8 s in - let s2' = iconv_recode_string `Enc_utf16 `Enc_utf8 s in - assert(s1' = s2'); - let s1 = Netconversion.recode_string `Enc_utf8 `Enc_utf16_be s1' in - let s2 = iconv_recode_string `Enc_utf8 `Enc_utf16 s1' in - assert(s1 = s2 && s1 = s); - print_endline "OK"; flush stdout -;; - -let test_utf16_and_utf8_10000_10FFFF () = - print_string "Recode: UTF-16-BE and UTF-8, #10000-#10FFFF... "; - flush stdout; - for i = 1 to 16 do - let s0 = make_ucs4 (i * 0x10000) (i * 0x10000 + 0x10000) in - let s = iconv_recode_string `Enc_ucs4 `Enc_utf16 s0 in - let s1' = Netconversion.recode_string `Enc_utf16_be `Enc_utf8 s in - let s2' = iconv_recode_string `Enc_utf16 `Enc_utf8 s in - assert(s1' = s2'); - let s1 = Netconversion.recode_string `Enc_utf8 `Enc_utf16_be s1' in - let s2 = iconv_recode_string `Enc_utf8 `Enc_utf16 s1' in - assert(s1 = s2 && s1 = s); - print_string "+"; flush stdout; - done; - print_endline "OK"; flush stdout -;; - - -print_endline "Warning: You need the command 'iconv' to run this test!"; -flush stdout; -test_iso_and_utf8 `Enc_iso88591; -test_iso_and_utf8 `Enc_iso88592; -test_iso_and_utf8 `Enc_iso88593; -test_iso_and_utf8 `Enc_iso88594; -test_iso_and_utf8 `Enc_iso88595; -test_iso_and_utf8 `Enc_iso88596; -test_iso_and_utf8 `Enc_iso88597; -(* test_iso_and_utf8 `Enc_iso88598; *) -test_iso_and_utf8 `Enc_iso88599; -test_iso_and_utf8 `Enc_iso885910; -(* test_iso_and_utf8 `Enc_iso885913; *) -(* test_iso_and_utf8 `Enc_iso885914; *) -(* test_iso_and_utf8 `Enc_iso885915; *) -test_utf16_and_utf8_0000_d7ff(); -test_utf16_and_utf8_e000_fffd(); -(* This test does not work because iconv does not support the surrogate - * representation of UTF-16: - * test_utf16_and_utf8_10000_10FFFF(); - *) -() -;; diff --git a/helm/DEVEL/pxp/netstring/tools/Makefile b/helm/DEVEL/pxp/netstring/tools/Makefile deleted file mode 100644 index b3c148db7..000000000 --- a/helm/DEVEL/pxp/netstring/tools/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -all: - $(MAKE) -C unimap_to_ocaml - -clean: - -CLEAN: clean - $(MAKE) -C unimap_to_ocaml CLEAN - -distclean: clean - $(MAKE) -C unimap_to_ocaml distclean diff --git a/helm/DEVEL/pxp/netstring/tools/unimap_to_ocaml/.cvsignore b/helm/DEVEL/pxp/netstring/tools/unimap_to_ocaml/.cvsignore deleted file mode 100644 index c1fcbc4ae..000000000 --- a/helm/DEVEL/pxp/netstring/tools/unimap_to_ocaml/.cvsignore +++ /dev/null @@ -1,7 +0,0 @@ -*.cmo -*.cmx -*.cmi - -*.o -*.a - diff --git a/helm/DEVEL/pxp/netstring/tools/unimap_to_ocaml/Makefile b/helm/DEVEL/pxp/netstring/tools/unimap_to_ocaml/Makefile deleted file mode 100644 index ed4277389..000000000 --- a/helm/DEVEL/pxp/netstring/tools/unimap_to_ocaml/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -all: unimap_to_ocaml - -unimap_to_ocaml: unimap_to_ocaml.ml - ocamlfind ocamlc -g -package str -linkpkg -custom \ - -o unimap_to_ocaml \ - unimap_to_ocaml.ml - -clean: - rm -f *.cmi *.cmo *.cma *.cmx *.o *.a *.cmxa - -CLEAN: clean - -distclean: clean - rm -f *~ unimap_to_ocaml - diff --git a/helm/DEVEL/pxp/netstring/tools/unimap_to_ocaml/unimap_to_ocaml.ml b/helm/DEVEL/pxp/netstring/tools/unimap_to_ocaml/unimap_to_ocaml.ml deleted file mode 100644 index 14a89e9d9..000000000 --- a/helm/DEVEL/pxp/netstring/tools/unimap_to_ocaml/unimap_to_ocaml.ml +++ /dev/null @@ -1,201 +0,0 @@ -(* $Id$ - * ---------------------------------------------------------------------- - * - *) - -open Printf;; - -let comment_re = Str.regexp "#.*$";; -let space_re = Str.regexp "[ \t\r\n]+";; - -let read_unimap_format_a fname f = - (* Reads a Unicode mapping in format A from a "local" code to Unicode. - * Returns a list of pairs (localcode, unicode). - *) - - let read_unimap_line() = - let s = input_line f in (* may raise End_of_file *) - let s' = Str.global_replace comment_re "" s in - let words = Str.split space_re s' in - match words with - [] -> raise Not_found - | [ localcode; unicode ] -> - int_of_string localcode, int_of_string unicode - | _ -> - failwith ("File " ^ fname ^ ": Do not know what to do with:\n" ^ s') - in - - let rec read_following_lines() = - try - let localcode, unicode = read_unimap_line() in - (* may raise End_of_file, Not_found *) - (localcode, unicode) :: read_following_lines() - with - Not_found -> read_following_lines() - | End_of_file -> [] - in - - read_following_lines() -;; - - -type from_uni_list = - U_nil - | U_single of (int * int) - | U_list of (int * int) list - -type from_unicode = - from_uni_list array;; - (* A hashtable with fixed size (256). A pair (unicode, localcode) is - * stored at the position unicode mod 256 in the array. - *) - - -let make_bijection unimap = - (* unimap: a list of pairs (localcode, unicode) - * returns a pair of arrays (m_to_unicode, m_from_unicode) with: - * - m_to_unicode.(localcode) = Some unicode, - * if the pair (localcode, unicode) exists - * m_to_unicode.(x) = None otherwise - * - m_from_unicode.(unicode lsr 8) = [ ...; (unicode,localcode); ... ] - *) - - let m_to_unicode = Array.create 256 None in - let m_from_unicode = Array.create 256 [] in - - List.iter - (fun (localcode, unicode) -> - assert(localcode < 256); - - (* Update m_to_unicode: *) - if m_to_unicode.(localcode) <> None then - failwith ("Local code point " ^ string_of_int localcode ^ - " mapped twice"); - m_to_unicode.(localcode) <- Some unicode; - - (* Update m_from_unicode: *) - let unilow = unicode land 255 in - if List.mem_assoc unicode (m_from_unicode.(unilow)) then - failwith ("Unicode code point " ^ string_of_int unicode ^ - " mapped twice"); - m_from_unicode.(unilow) <- - m_from_unicode.(unilow) @ [unicode,localcode]; - ) - unimap; - - m_to_unicode, m_from_unicode -;; - - -let to_unimap_as_string to_unimap = - let make_repr x = - match x with - None -> -1 - | Some u -> u - in - Marshal.to_string (Array.map make_repr to_unimap) [ Marshal.No_sharing ] -;; - - -let from_unimap_as_string from_unimap = - let make_repr l = - match l with - [] -> U_nil - | [u,l] -> U_single(u,l) - | _ -> U_list l - in - let m = Array.map make_repr from_unimap in - Marshal.to_string m [ Marshal.No_sharing ] -;; - - -let print_bijection f name m_to_unicode m_from_unicode = - (* Prints on file f this O'Caml code: - * let _to_unicode = ... - * let _from_unicode = ... - *) - fprintf f "let %s_to_unicode = lazy (Marshal.from_string \"%s\" 0 : int array);;\n" - name - (String.escaped (to_unimap_as_string m_to_unicode)); - - fprintf f "let %s_from_unicode = lazy (Marshal.from_string \"%s\" 0 : Netmappings.from_uni_list array);;\n " - name - (String.escaped (from_unimap_as_string m_from_unicode)); -;; - - -let main() = - let files = ref [] in - let outch = ref (lazy stdout) in - Arg.parse - [ "-o", Arg.String (fun s -> outch := lazy (open_out s)), - " Write result to this file"] - (fun s -> files := !files @ [s]) - "usage: unimap_to_ocaml file.unimap ..."; - - (* First read in all unimaps: *) - let unimaps = - List.map - (fun filename -> - let mapname = Str.replace_first (Str.regexp "\.unimap$") "" - (Filename.basename filename) in - let f = open_in filename in - prerr_endline ("Reading " ^ filename); - let unimap = read_unimap_format_a filename f in - close_in f; - mapname, unimap - ) - !files - in - - (* Second compute all bijections: *) - let bijections = - List.map - (fun (mapname, unimap) -> - prerr_endline ("Processing " ^ mapname); - let to_unicode, from_unicode = make_bijection unimap in - mapname, to_unicode, from_unicode - ) - unimaps - in - - let out = Lazy.force !outch in - (* Third output all results: *) - output_string out "(* WARNING! This is a generated file! *)\n"; - - List.iter - (fun (mapname, to_unicode, from_unicode) -> - print_bijection out mapname to_unicode from_unicode) - bijections; - List.iter - (fun (mapname, _, _) -> - fprintf out "Hashtbl.add Netmappings.to_unicode `Enc_%s %s_to_unicode;\n" - mapname mapname; - fprintf out "Hashtbl.add Netmappings.from_unicode `Enc_%s %s_from_unicode;\n" - mapname mapname; - ) - (List.rev bijections); - fprintf out "();;\n"; - - close_out out -;; - - -main();; - -(* ====================================================================== - * History: - * - * $Log$ - * Revision 1.1 2000/11/17 09:57:29 lpadovan - * Initial revision - * - * Revision 1.3 2000/08/29 00:48:52 gerd - * Conversion tables are now stored in marshalled form. - * New type for the conversion table Unicode to 8bit. - * - * Revision 1.2 2000/08/12 23:54:56 gerd - * Initial revision. - * - * - *) diff --git a/helm/DEVEL/pxp/ocaml-findlib-0.4.0-1.i386.rpm b/helm/DEVEL/pxp/ocaml-findlib-0.4.0-1.i386.rpm deleted file mode 100644 index 1877eeaba..000000000 Binary files a/helm/DEVEL/pxp/ocaml-findlib-0.4.0-1.i386.rpm and /dev/null differ diff --git a/helm/DEVEL/pxp/ocaml-findlib-0.4.0-1.src.rpm b/helm/DEVEL/pxp/ocaml-findlib-0.4.0-1.src.rpm deleted file mode 100644 index 6ae4bb227..000000000 Binary files a/helm/DEVEL/pxp/ocaml-findlib-0.4.0-1.src.rpm and /dev/null differ diff --git a/helm/DEVEL/pxp/ocaml-findlib.spec b/helm/DEVEL/pxp/ocaml-findlib.spec deleted file mode 100644 index 6d5cc6b96..000000000 --- a/helm/DEVEL/pxp/ocaml-findlib.spec +++ /dev/null @@ -1,80 +0,0 @@ -%define toolname findlib - -Summary: OCAML FindLib package manager -Name: ocaml-%{toolname} -Version: 0.4.0 -Release: 1 -Copyright: GPL-like -Group: Development/Languages -Source: http://www.ocaml-programming.de/packages/%{toolname}-%{version}.tar.gz -Vendor: Gerd Stolpmann -Url: http://www.ocaml-programming.de/packages/documentation/%{toolname}/ -Prereq: fileutils, ocaml -Requires: fileutils, ocaml - -%define dir_man usr/man -%define dir_bin usr/bin -%define dir_sitelib usr/lib/ocaml/site-lib -%define files_doc LICENSE README INSTALL - -BuildRoot: /tmp/root-%{name} - -%description -Provides a scheme to manage reusable software components (packages), -as collections of OCaml modules for which metainformation can be stored. -The library contains functions to look the directory up that -stores a package, to query metainformation about a package, and -to retrieve dependency information about multiple packages. -Metainformation includes a version string, the archives the package consists of, additional linker -options, and dependencies dependent on other packages. - -%prep -%setup -n %{toolname} -./configure -mandir "/%{dir_man}" -bindir "/%{dir_bin}" -sitelib "/%{dir_sitelib}" - -%build -make all -make opt - -%install -# Install binary, libs, manuals -DIR_BIN="${RPM_BUILD_ROOT}/%{dir_bin}" -DIR_MAN="${RPM_BUILD_ROOT}/%{dir_man}" -DIR_SITELIB="${RPM_BUILD_ROOT}/%{dir_sitelib}" -install -m 755 -d "${DIR_BIN}" -install -m 755 -d "${DIR_MAN}" -install -m 755 -d "${DIR_SITELIB}" -make install "OCAML_SITELIB=${DIR_SITELIB}" "OCAMLFIND_BIN=${DIR_BIN}" "OCAMLFIND_MAN=${DIR_MAN}" -# Move doc files to root, if needed -for F in %{files_doc} ; do test -f "./doc/${F}" && mv -f "./doc/${F}" . ; done - -# HTML manual -if test -d doc/html ; then mv doc/html htmlman; else mkdir htmlman ; fi - -%post -# Create a symbolic link to version-specific HTML manual -cd /usr/doc/HTML/ -if test -L "%{name}" ; then rm -f "%{name}" ; fi -if test ! -e "%{name}" ; then ln -s "../%{name}-%{version}/htmlman" "%{name}" ; fi - -%postun -cd /usr/doc/HTML/ -if test "$1" = "0" -a -L %{name} ; then rm -f %{name} ; fi - - -%clean -if test `dirname "${RPM_BUILD_ROOT}"` != "/" ; then rm -rf "${RPM_BUILD_ROOT}" ; fi - -%files -%defattr(-,root,root) -%doc %{files_doc} htmlman -/%{dir_bin} -/%{dir_man}/man1 -/%{dir_man}/man3 -/%{dir_man}/man5 -/%{dir_sitelib} - - -%changelog -* Fri Sep 1 2000 Olivier Montanuy -- created and tested package, with html manual diff --git a/helm/DEVEL/pxp/ocaml-netstring-0.9.3-2.i386.rpm b/helm/DEVEL/pxp/ocaml-netstring-0.9.3-2.i386.rpm deleted file mode 100644 index e9dc283f0..000000000 Binary files a/helm/DEVEL/pxp/ocaml-netstring-0.9.3-2.i386.rpm and /dev/null differ diff --git a/helm/DEVEL/pxp/ocaml-netstring-0.9.3-2.src.rpm b/helm/DEVEL/pxp/ocaml-netstring-0.9.3-2.src.rpm deleted file mode 100644 index 3c20f54f2..000000000 Binary files a/helm/DEVEL/pxp/ocaml-netstring-0.9.3-2.src.rpm and /dev/null differ diff --git a/helm/DEVEL/pxp/ocaml-netstring.spec b/helm/DEVEL/pxp/ocaml-netstring.spec deleted file mode 100644 index 073539989..000000000 --- a/helm/DEVEL/pxp/ocaml-netstring.spec +++ /dev/null @@ -1,73 +0,0 @@ -%define toolname netstring - -Summary: OCAML Netstring library -Name: ocaml-%{toolname} -Version: 0.9.3 -Release: 2 -Copyright: GPL-like -Group: Development/Languages -Source: http://www.ocaml-programming.de/packages/%{toolname}-%{version}.tar.gz -Vendor: Gerd Stolpmann -Url: http://www.ocaml-programming.de/packages/documentation/%{toolname}/ -Prereq: fileutils, ocaml, ocaml-findlib -Requires: fileutils, ocaml - -%define dir_sitelib usr/lib/ocaml/site-lib -%define files_doc LICENSE README INSTALL -BuildRoot: /tmp/root-%{name} - -%description -A collection of string processing functions for Internet protocols -- Parse MIME messages -- Encode/decode Base 64, Quoted Printable, Q, URL-encoding -- CGI interface that allows users to upload files -- Simple HTML parser -- URL parsing, printing and processing - -%prep -%setup -n %{toolname} -make clean - -%build -make all -make opt - -%install -# Install binary, libs, manuals - -DIR_INSTALL="${RPM_BUILD_ROOT}/%{dir_sitelib}/%{toolname}" -install -m 755 -d "${DIR_INSTALL}" -# Install in non-standard directory -# replace "$(OCAMLFIND) install" or "ocamlfind install" -cat Makefile | sed "s#[_A-Za-z\(\)\$]* install \$(NAME) #\$(TRICK) #" > Makefile.trick -# Ugly trick: replace "findlib" by "cp" -make -f Makefile.trick install "TRICK=cp -f --target-directory=${DIR_INSTALL}" -# Reference to obsolete CGI and BASE64 packages -for CMD in cgi base64 ; do - cat Makefile | sed "s#[_A-Za-z\(\)\$]* install $CMD #\$(TRICK) #" > Makefile.trick - DIR="${RPM_BUILD_ROOT}/%{dir_sitelib}/${CMD}" - install -m 755 -d "${DIR}" - make -f Makefile.trick "install-${CMD}" "TRICK=cp -f --target-directory=${DIR}" -done - -# Move doc files to root, if needed -for F in %{files_doc} ; do test -f "./doc/${F}" && mv -f "./doc/${F}" . ; done - -%clean -#if test `dirname "${RPM_BUILD_ROOT}"` != "/" ; then rm -rf "${RPM_BUILD_ROOT}" ; fi - -%files -%defattr(-,root,root) -%doc %{files_doc} -/%{dir_sitelib}/%{toolname} -# Reference to obsolete CGI and BASE64 packages -/%{dir_sitelib}/cgi -/%{dir_sitelib}/base64 - -%changelog -* Wed Sep 6 2000 Olivier Montanuy -- attempt to install cgi and base64 modules, for obsolete Makefiles - -* Fri Sep 1 2000 Olivier Montanuy -- created and tested package - diff --git a/helm/DEVEL/pxp/ocaml-pxp-1.0-1.i386.rpm b/helm/DEVEL/pxp/ocaml-pxp-1.0-1.i386.rpm deleted file mode 100644 index 3dac2d9dd..000000000 Binary files a/helm/DEVEL/pxp/ocaml-pxp-1.0-1.i386.rpm and /dev/null differ diff --git a/helm/DEVEL/pxp/ocaml-pxp-1.0-1.src.rpm b/helm/DEVEL/pxp/ocaml-pxp-1.0-1.src.rpm deleted file mode 100644 index c00caec41..000000000 Binary files a/helm/DEVEL/pxp/ocaml-pxp-1.0-1.src.rpm and /dev/null differ diff --git a/helm/DEVEL/pxp/ocaml-pxp.spec b/helm/DEVEL/pxp/ocaml-pxp.spec deleted file mode 100644 index ee2080d94..000000000 --- a/helm/DEVEL/pxp/ocaml-pxp.spec +++ /dev/null @@ -1,73 +0,0 @@ -%define toolname pxp - -Summary: OCAML PXP XML library -Name: ocaml-%{toolname} -Version: 1.0 -Release: 1 -Copyright: GPL-like -Group: Development/Languages -Source: http://www.ocaml-programming.de/packages/%{toolname}-%{version}.tar.gz -Vendor: Gerd Stolpmann -Url: http://www.ocaml-programming.de/packages/documentation/%{toolname}/ -Prereq: fileutils, ocaml, ocaml-findlib, ocaml-netstring -Requires: fileutils, ocaml, ocaml-netstring - -%define dir_sitelib usr/lib/ocaml/site-lib -%define files_doc LICENSE README INSTALL SPEC EXTENSIONS - -BuildRoot: /tmp/root-%{name} - -%description -PXP is a validating parser for XML-1.0 written entirely in Objective Caml. -PXP stands for Polymorphic XML parser, emphasizes its most useful property: -the API is polymorphic and can be configured such that different objects are -used to store different types of elements. -PXP was formerly known as "Markup". - -%prep -%setup -n %{toolname} -make clean - -%build -make all -make opt - -%install -# Install binary, libs, manuals - -DIR_INSTALL="${RPM_BUILD_ROOT}/%{dir_sitelib}/%{toolname}" -install -m 755 -d "${DIR_INSTALL}" -# Install in non-standard directory -# replace "$(OCAMLFIND) install" or "ocamlfind install" -cat Makefile | sed "s#[_A-Za-z\(\)\$]* install \$(NAME)#\$(TRICK)#" > Makefile.trick -# Ugly trick: replace "findlib" by "cp" -make -f Makefile.trick install "TRICK=cp -f --target-directory=${DIR_INSTALL}" - -# Move doc files to root, if needed -for F in %{files_doc} ; do test -f "./doc/${F}" && mv -f "./doc/${F}" . ; done - -# HTML manual -if test -d doc/manual/html ; then mv doc/manual/html htmlman; else mkdir htmlman ; fi - - -# Create a symbolic link to version-specific HTML manual -%post -cd /usr/doc/HTML/ -if test -L "%{name}" ; then rm -f "%{name}" ; fi -if test ! -e "%{name}" ; then ln -s "../%{name}-%{version}/htmlman" "%{name}" ; fi - -%postun -cd /usr/doc/HTML/ -if test "$1" = "0" -a -L %{name} ; then rm -f %{name} ; fi - -%clean -if test `dirname "${RPM_BUILD_ROOT}"` != "/" ; then rm -rf "${RPM_BUILD_ROOT}" ; fi - -%files -%defattr(-,root,root) -%doc %{files_doc} htmlman examples -/%{dir_sitelib}/%{toolname} - -%changelog -* Fri Sep 1 2000 Olivier Montanuy -- created and tested package diff --git a/helm/DEVEL/pxp/pxp-1.0.tar.gz b/helm/DEVEL/pxp/pxp-1.0.tar.gz deleted file mode 100644 index 9f6e01955..000000000 Binary files a/helm/DEVEL/pxp/pxp-1.0.tar.gz and /dev/null differ diff --git a/helm/DEVEL/pxp/pxp/.cvsignore b/helm/DEVEL/pxp/pxp/.cvsignore deleted file mode 100644 index deb5b7fba..000000000 --- a/helm/DEVEL/pxp/pxp/.cvsignore +++ /dev/null @@ -1,4 +0,0 @@ -*.cmo -*.cmx -*.cmi - diff --git a/helm/DEVEL/pxp/pxp/LICENSE b/helm/DEVEL/pxp/pxp/LICENSE deleted file mode 100644 index 55182a74d..000000000 --- a/helm/DEVEL/pxp/pxp/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright 1999 by Gerd Stolpmann - -The package "markup" is copyright by Gerd Stolpmann. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this document and the "markup" software (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -The Software is provided ``as is'', without warranty of any kind, express -or implied, including but not limited to the warranties of -merchantability, fitness for a particular purpose and noninfringement. -In no event shall Gerd Stolpmann be liable for any claim, damages or -other liability, whether in an action of contract, tort or otherwise, -arising from, out of or in connection with the Software or the use or -other dealings in the software. diff --git a/helm/DEVEL/pxp/pxp/META b/helm/DEVEL/pxp/pxp/META deleted file mode 100644 index 020128a0d..000000000 --- a/helm/DEVEL/pxp/pxp/META +++ /dev/null @@ -1,20 +0,0 @@ -version = "1.0" -requires = "netstring" -description = "Validating parser for XML-1.0" -archive(byte) = "pxp_types.cma - pxp_lex_iso88591.cma - pxp_lex_utf8.cma - pxp_engine.cma - pxp_utf8.cmo" -archive(byte, pxp_without_utf8) = "pxp_types.cma - pxp_lex_iso88591.cma - pxp_engine.cma" -archive(native) = "pxp_types.cmxa - pxp_lex_iso88591.cmxa - pxp_lex_utf8.cmxa - pxp_engine.cmxa - pxp_utf8.cmx" -archive(native, pxp_without_utf8) = "pxp_types.cmxa - pxp_lex_iso88591.cmxa - pxp_engine.cmxa" - diff --git a/helm/DEVEL/pxp/pxp/Makefile b/helm/DEVEL/pxp/pxp/Makefile deleted file mode 100644 index f08eab99d..000000000 --- a/helm/DEVEL/pxp/pxp/Makefile +++ /dev/null @@ -1,105 +0,0 @@ -# make all: make bytecode archive -# make opt: make native archive -# make install: install bytecode archive, and if present, native archive -# make uninstall: uninstall package -# make clean: remove intermediate files (in this directory) -# make CLEAN: remove intermediate files (recursively) -# make distclean: remove any superflous files (recursively) -# make release: cleanup, create archive, tag CVS module -# (for developers) - -#---------------------------------------------------------------------- - -include Makefile.conf - -.PHONY: all -all: - $(MAKE) -C m2parsergen all - $(MAKE) -C tools/ucs2_to_utf8 all - $(MAKE) -f Makefile.code all - $(MAKE) -C compatibility all - -.PHONY: opt -opt: - $(MAKE) -C m2parsergen all - $(MAKE) -C tools/ucs2_to_utf8 all - $(MAKE) -f Makefile.code opt - $(MAKE) -C compatibility opt - -.PHONY: install -install: all tmp/pxp_entity.mli - files=`tools/collect_files *.cmi *.cma *.cmxa *.a \ - pxp_utf8.cmo pxp_utf8.cmx pxp_utf8.o` && \ - ocamlfind install $(NAME) $(MLI) tmp/pxp_entity.mli $$files META - -.PHONY: uninstall -uninstall: - ocamlfind remove $(NAME) - -.PHONY: markup-install -markup-install: - $(MAKE) -C compatibility install - -.PHONY: markup-uninstall -markup-uninstall: - $(MAKE) -C compatibility uninstall - -tmp/pxp_entity.mli: pxp_entity.ml - mkdir -p tmp - rm -f tmp/pxp_entity.* - cp pxp_entity.ml tmp - echo '(* Sorry, this is currently undocumented *)' >tmp/mli - ocamlc -i -c tmp/pxp_entity.ml >>tmp/mli - mv tmp/mli tmp/pxp_entity.mli - -.PHONY: clean -clean: - rm -f *.cmi *.cmo *.cma *.cmx *.o *.a *.cmxa *.new *.old - rm -f pxp_yacc.ml - touch lexers/objects_iso88591 lexers/objects_utf8 lexers/depend - $(MAKE) -C lexers clean - $(MAKE) -C compatibility clean - -.PHONY: CLEAN -CLEAN: clean - $(MAKE) -C doc CLEAN - $(MAKE) -C examples CLEAN - $(MAKE) -C rtests CLEAN - $(MAKE) -C m2parsergen CLEAN - touch tools/ucs2_to_utf8/depend - $(MAKE) -C tools/ucs2_to_utf8 clean - -.PHONY: distclean -distclean: clean - rm -f *~ depend depend.pkg - $(MAKE) -C doc distclean - $(MAKE) -C examples distclean - $(MAKE) -C rtests distclean - $(MAKE) -C m2parsergen distclean - touch tools/ucs2_to_utf8/depend - $(MAKE) -C tools/ucs2_to_utf8 clean - $(MAKE) -C compatibility distclean - -RELEASE: META - awk '/version/ { print substr($$3,2,length($$3)-2) }' META >RELEASE - -.PHONY: dist -dist: RELEASE - r=`head -1 RELEASE`; cd ..; gtar czf $(NAME)-$$r.tar.gz --exclude='*/CVS*' --exclude="*~" --exclude="*/depend.pkg" --exclude="*/depend" --exclude="*/oo_questions*" --exclude="*/testsamples*" --exclude="*/tmp/*" --exclude="*reptil*" --exclude="*/doc/common.xml" --exclude="*/doc/config.xml" --exclude="*.fig.bak" --exclude="*/ps/pic*" --exclude="*/examples/panel*" --exclude="*/examples/xmlforms_gtk*" --exclude="*/Mail*" $(NAME)/* - -.PHONY: tag-release -tag-release: RELEASE - r=`head -1 RELEASE | sed -e s/\\\./-/g`; cd ..; cvs tag -F $(NAME)-$$r markup - -.PHONY: release -release: distclean - $(MAKE) tag-release - $(MAKE) dist - -.PHONY: dev -dev: - $(MAKE) all - -$(MAKE) uninstall - $(MAKE) install - $(MAKE) -C examples/validate distclean - $(MAKE) -C examples/validate validate diff --git a/helm/DEVEL/pxp/pxp/Makefile.code b/helm/DEVEL/pxp/pxp/Makefile.code deleted file mode 100644 index 3afed39ca..000000000 --- a/helm/DEVEL/pxp/pxp/Makefile.code +++ /dev/null @@ -1,96 +0,0 @@ -# make all: make bytecode archives -# make opt: make native archives -#---------------------------------------------------------------------- - -include Makefile.conf - -all: - $(MAKE) -f Makefile.code pxp_types.cma - $(MAKE) -f Makefile.code pxp_lex_iso88591.cma - if [ "x$(UTF8_SUPPORT)" = "xyes" ]; then $(MAKE) -f Makefile.code pxp_lex_utf8.cma; else rm -f pxp_lex_utf8.cma; fi - $(MAKE) -f Makefile.code pxp_engine.cma - if [ "x$(UTF8_SUPPORT)" = "xyes" ]; then $(MAKE) -f Makefile.code pxp_utf8.cmo; else rm -f pxp_utf8.cmo; fi - -opt: - $(MAKE) -f Makefile.code pxp_types.cmxa - $(MAKE) -f Makefile.code pxp_lex_iso88591.cmxa - if [ "x$(UTF8_SUPPORT)" = "xyes" ]; then $(MAKE) -f Makefile.code pxp_lex_utf8.cmxa; else rm -f pxp_lex_utf8.cmxa; fi - $(MAKE) -f Makefile.code pxp_engine.cmxa - if [ "x$(UTF8_SUPPORT)" = "xyes" ]; then $(MAKE) -f Makefile.code pxp_utf8.cmx; else rm -f pxp_utf8.cmx; fi - -#---------------------------------------------------------------------- - -pxp_types.cma: $(OBJECTS_types) - $(OCAMLC) -a -o pxp_types.cma $(OBJECTS_types) - -pxp_types.cmxa: $(XOBJECTS_types) - $(OCAMLOPT) -a -o pxp_types.cmxa $(XOBJECTS_types) - -pxp_engine.cma: $(OBJECTS_engine) - $(OCAMLC) -a -o pxp_engine.cma $(OBJECTS_engine) - -pxp_engine.cmxa: $(XOBJECTS_engine) - $(OCAMLOPT) -a -o pxp_engine.cmxa $(XOBJECTS_engine) - - -# The following rules are "phony" to force 'make' to go into the -# "lexers" subdirectory. - -.PHONY: pxp_lex_iso88591.cma -pxp_lex_iso88591.cma: $(CMI_types) - $(MAKE) -C lexers all_iso88591 - cp lexers/pxp_lex_iso88591.cma . - -.PHONY: pxp_lex_iso88591.cmxa -pxp_lex_iso88591.cmxa: $(CMI_types) - $(MAKE) -C lexers opt_iso88591 - cp lexers/pxp_lex_iso88591.cmxa lexers/pxp_lex_iso88591.a . - -.PHONY: pxp_lex_utf8.cma -pxp_lex_utf8.cma: $(CMI_types) - $(MAKE) -C lexers all_utf8 - cp lexers/pxp_lex_utf8.cma . - -.PHONY: pxp_lex_utf8.cmxa -pxp_lex_utf8.cmxa: $(CMI_types) - $(MAKE) -C lexers opt_utf8 - cp lexers/pxp_lex_utf8.cmxa lexers/pxp_lex_utf8.a . - -#---------------------------------------------------------------------- -# general rules: - -OPTIONS = -OCAMLC = $(OCAMLFIND) ocamlc -package "$(PACKAGES)" \ - -g -I lexers $(OPTIONS) $(ROPTIONS) -OCAMLOPT = $(OCAMLFIND) ocamlopt -package "$(PACKAGES)" \ - -p -I lexers $(OPTIONS) $(ROPTIONS) -OCAMLDEP = ocamldep $(OPTIONS) -OCAMLFIND = ocamlfind - -depend: *.ml *.mli pxp_yacc.ml - $(OCAMLDEP) *.ml *.mli >depend - -.SUFFIXES: .cmo .cmi .cmx .ml .mli .mll .m2y - -.ml.cmx: - $(OCAMLOPT) -c $< - -.ml.cmo: - $(OCAMLC) -c $< - -.mli.cmi: - $(OCAMLC) -c $< - -.mll.ml: - ocamllex $< - -.m2y.ml: - ./m2parsergen/m2parsergen < $< >`basename $< .m2y`.ml || { rm -f `basename $< .m2y`.ml; false; } - -*.mli: - - -# Generated dependencies: - -include depend - diff --git a/helm/DEVEL/pxp/pxp/Makefile.conf b/helm/DEVEL/pxp/pxp/Makefile.conf deleted file mode 100644 index 749c702c7..000000000 --- a/helm/DEVEL/pxp/pxp/Makefile.conf +++ /dev/null @@ -1,37 +0,0 @@ -# User-configurable section: - -# yes or no: Do you want that the parser has support for the internal -# representation as UTF-8 strings? "yes" is recommended, but the parser -# becomes much bigger -UTF8_SUPPORT = yes - -# --- End of User-configurable section. - -# Settings. - -NAME = pxp -PACKAGES = netstring - -# Caml objects that are needed by the lexers: -OBJECTS_types = \ - pxp_types.cmo pxp_lexer_types.cmo - -CMI_types = $(OBJECTS_types:.cmo=.cmi) - -# Caml objects that depend on the lexers: -OBJECTS_engine = \ - pxp_lexers.cmo \ - pxp_dfa.cmo \ - pxp_aux.cmo pxp_reader.cmo \ - pxp_entity.cmo pxp_dtd.cmo pxp_document.cmo \ - pxp_yacc.cmo pxp_codewriter.cmo - -# Same as native objects: -XOBJECTS_types = $(OBJECTS_types:.cmo=.cmx) -XOBJECTS_engine = $(OBJECTS_engine:.cmo=.cmx) - -# .mli files to install: - -MLI = pxp_document.mli pxp_dtd.mli \ - pxp_types.mli pxp_yacc.mli \ - pxp_codewriter.mli pxp_dfa.mli diff --git a/helm/DEVEL/pxp/pxp/RELEASE b/helm/DEVEL/pxp/pxp/RELEASE deleted file mode 100644 index d3827e75a..000000000 --- a/helm/DEVEL/pxp/pxp/RELEASE +++ /dev/null @@ -1 +0,0 @@ -1.0 diff --git a/helm/DEVEL/pxp/pxp/compatibility/.cvsignore b/helm/DEVEL/pxp/pxp/compatibility/.cvsignore deleted file mode 100644 index deb5b7fba..000000000 --- a/helm/DEVEL/pxp/pxp/compatibility/.cvsignore +++ /dev/null @@ -1,4 +0,0 @@ -*.cmo -*.cmx -*.cmi - diff --git a/helm/DEVEL/pxp/pxp/compatibility/META b/helm/DEVEL/pxp/pxp/compatibility/META deleted file mode 100644 index 441e30a0f..000000000 --- a/helm/DEVEL/pxp/pxp/compatibility/META +++ /dev/null @@ -1,6 +0,0 @@ -version = "PXP-emulator" -requires = "pxp" -description = "Validating parser for XML-1.0" -archive(byte) = "markup.cma" -archive(native) = "markup.cmxa" - diff --git a/helm/DEVEL/pxp/pxp/compatibility/Makefile b/helm/DEVEL/pxp/pxp/compatibility/Makefile deleted file mode 100644 index 187116ccb..000000000 --- a/helm/DEVEL/pxp/pxp/compatibility/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -# make all: make bytecode archive -# make opt: make native archive -# make install: install bytecode archive, and if present, native archive -# make uninstall: uninstall package -# make clean: remove intermediate files (in this directory) -# make CLEAN: remove intermediate files (recursively) -# make distclean: remove any superflous files (recursively) - -#---------------------------------------------------------------------- - -include Makefile.conf - -.PHONY: all -all: - $(MAKE) -f Makefile.code all - -.PHONY: opt -opt: - $(MAKE) -f Makefile.code opt - -.PHONY: install -install: all - files=`../tools/collect_files *.cmi *.cma *.cmxa *.a` && \ - ocamlfind install $(NAME) $(MLI) $$files META - -.PHONY: uninstall -uninstall: - ocamlfind remove $(NAME) - -.PHONY: clean -clean: - rm -f *.cmi *.cmo *.cma *.cmx *.o *.a *.cmxa *.new *.old - -.PHONY: CLEAN -CLEAN: clean - -.PHONY: distclean -distclean: clean - rm -f *~ depend depend.pkg - diff --git a/helm/DEVEL/pxp/pxp/compatibility/Makefile.code b/helm/DEVEL/pxp/pxp/compatibility/Makefile.code deleted file mode 100644 index 2733faa09..000000000 --- a/helm/DEVEL/pxp/pxp/compatibility/Makefile.code +++ /dev/null @@ -1,50 +0,0 @@ -# make all: make bytecode archives -# make opt: make native archives -#---------------------------------------------------------------------- - -include Makefile.conf - -.PHONY: all -all: markup.cma - -.PHONY: opt -opt: markup.cmxa - -#---------------------------------------------------------------------- - -markup.cma: $(OBJECTS) - $(OCAMLC) -a -o markup.cma $(OBJECTS) - -markup.cmxa: $(XOBJECTS) - $(OCAMLOPT) -a -o markup.cmxa $(XOBJECTS) - -#---------------------------------------------------------------------- -# general rules: - -OPTIONS = -OCAMLC = ocamlfind ocamlc -g -I .. -package netstring $(OPTIONS) $(ROPTIONS) -OCAMLOPT = ocamlfind ocamlopt -p -I .. -package netstring $(OPTIONS) $(ROPTIONS) -OCAMLDEP = ocamldep $(OPTIONS) -OCAMLFIND = ocamlfind - -depend: *.ml *.mli - $(OCAMLDEP) *.ml *.mli >depend - -.SUFFIXES: .cmo .cmi .cmx .ml .mli - -.ml.cmx: - $(OCAMLOPT) -c $< - -.ml.cmo: - $(OCAMLC) -c $< - -.mli.cmi: - $(OCAMLC) -c $< - -*.mli: - - -# Generated dependencies: - -include depend - diff --git a/helm/DEVEL/pxp/pxp/compatibility/Makefile.conf b/helm/DEVEL/pxp/pxp/compatibility/Makefile.conf deleted file mode 100644 index 061d0cae1..000000000 --- a/helm/DEVEL/pxp/pxp/compatibility/Makefile.conf +++ /dev/null @@ -1,9 +0,0 @@ -NAME = markup - -OBJECTS = markup_types.cmo markup_dtd.cmo markup_reader.cmo \ - markup_document.cmo markup_yacc.cmo -XOBJECTS = $(OBJECTS:.cmo=.cmx) - -MLI = markup_document.mli markup_dtd.mli \ - markup_types.mli markup_yacc.mli markup_reader.mli - diff --git a/helm/DEVEL/pxp/pxp/compatibility/README b/helm/DEVEL/pxp/pxp/compatibility/README deleted file mode 100644 index 50086732a..000000000 --- a/helm/DEVEL/pxp/pxp/compatibility/README +++ /dev/null @@ -1,21 +0,0 @@ -This directory contains the modules for Markup-0.2.10 -compatibility. The modules consist mainly of wrapper classes for the -new PXP classes, and translate the old methods to the new ones. - -Please note that the compatibility is not perfect. Sometimes there are -new methods which do not exist in Markup-0.2.10, and sometimes even -existing methods changed their signature. I have tried to avoid that, -but there are some ugly cases which are hard to solve without such -modifications. - -Translating old methods into new methods costs time and -memory. Because of this, it is best to consider the compatibility -modules as migration path to PXP: You can test whether PXP parses your -input files, and you can compare the old API with the new API -directly. (However, it is hard to test new features of PXP with the -compatibility modules; the old API does not reflect the new features.) - -The compatibility modules are currently maintained, but that will stop -once PXP has been established. - -(Gerd) diff --git a/helm/DEVEL/pxp/pxp/compatibility/markup_document.ml b/helm/DEVEL/pxp/pxp/compatibility/markup_document.ml deleted file mode 100644 index bbc497953..000000000 --- a/helm/DEVEL/pxp/pxp/compatibility/markup_document.ml +++ /dev/null @@ -1,374 +0,0 @@ -(* $Id$ - * ---------------------------------------------------------------------- - *) - -type node_type = - T_element of string - | T_data - -class type [ 'node ] extension = [ 'node ] Pxp_document.extension - -class type [ 'ext, 'node ] pxp_extension_type = -object ('self) - method clone : 'self - method node : 'self Pxp_document.node - method set_node : 'self Pxp_document.node -> unit - - method markup_node : 'node - method set_markup_node : 'node -> unit - - method set_index : 'self Pxp_yacc.index -> unit - method index : 'self Pxp_yacc.index - end -;; - - -class type [ 'ext ] node = - object ('self) - constraint 'ext = 'ext node #extension - method pxp_node : (('ext, 'ext node) pxp_extension_type) Pxp_document.node - - method extension : 'ext - method delete : unit - method parent : 'ext node - method root : 'ext node - method orphaned_clone : 'ext node - method orphaned_flat_clone : 'ext node - method add_node : 'ext node -> unit - method add_pinstr : Markup_dtd.proc_instruction -> unit - method pinstr : string -> Markup_dtd.proc_instruction list - method pinstr_names : string list - method sub_nodes : 'ext node list - method iter_nodes : ('ext node -> unit) -> unit - method iter_nodes_sibl : - ('ext node option -> 'ext node -> 'ext node option -> unit) -> unit - method set_nodes : 'ext node list -> unit - method data : string - method node_type : node_type - method attribute : string -> Markup_types.att_value - method attribute_names : string list - method attribute_type : string -> Markup_types.att_type - method attributes : (string * Markup_types.att_value) list - method required_string_attribute : string -> string - method required_list_attribute : string -> string list - method optional_string_attribute : string -> string option - method optional_list_attribute : string -> string list - method quick_set_attributes : (string * Markup_types.att_value) list -> unit - method find : string -> 'ext node - method reset_finder : unit - method dtd : Markup_dtd.dtd - method create_element : - Markup_dtd.dtd -> node_type -> (string * string) list -> 'ext node - method create_data : Markup_dtd.dtd -> string -> 'ext node - method local_validate : unit - method keep_always_whitespace_mode : unit - method write_compact_as_latin1 : Markup_types.output_stream -> unit - method internal_adopt : 'ext node option -> unit - method internal_delete : 'ext node -> unit - method internal_init : Markup_dtd.dtd -> string -> (string * string) list -> unit - end -;; - - -class [ 'ext ] pxp_extension init_markup_node = - (object (self : 'self) - (* constraint 'ext = 'ext node #extension *) - val mutable pxp_node = (None : - 'self Pxp_document.node option) - (* 'ext pxp_extension Pxp_document.node option *) - val mutable markup_node = (init_markup_node : 'ext node) - - val mutable index = (None : 'self Pxp_yacc.index option) - - method clone = - {< >} - - method node = - match pxp_node with - None -> - assert false - | Some n -> n - - method set_node n = - pxp_node <- Some n - - method markup_node = markup_node - - method set_markup_node n = markup_node <- n - - method set_index ix = - index <- Some ix - - method index = - match index with - None -> assert false - | Some x -> x - - end - : ['ext, 'ext node] pxp_extension_type ) -;; - - -class [ 'ext ] emulate_markup_node init_ext init_pxp_node = - object (self) - constraint 'ext = 'ext node #extension - val mutable pxp_node = (init_pxp_node : - ('ext, 'ext #node) - pxp_extension_type Pxp_document.node option) - val mutable extension = (init_ext : 'ext) - - method pxp_node = - match pxp_node with - None -> assert false - | Some n -> n - - method extension = extension - method delete = self # pxp_node # delete - method parent = self # pxp_node # parent # extension # markup_node - method root = self # pxp_node # root # extension # markup_node - - method orphaned_clone = - let ext' = extension # clone in - let pxp' = self # pxp_node # orphaned_clone in - let n = new emulate_markup_node ext' (Some pxp') in - ext' # set_node (n : 'ext #node :> 'ext node); - pxp' # extension # set_markup_node n; - n - - method orphaned_flat_clone = - let ext' = extension # clone in - let pxp' = self # pxp_node # orphaned_flat_clone in - let n = new emulate_markup_node ext' (Some pxp') in - ext' # set_node (n : 'ext #node :> 'ext node); - pxp' # extension # set_markup_node n; - n - - method dtd = self # pxp_node # dtd - - method add_node (n : 'ext node) = - let n_pxp = n # pxp_node in - self # pxp_node # add_node n_pxp - - method add_pinstr pi = - self # pxp_node # add_pinstr pi - - method sub_nodes = - let l = self # pxp_node # sub_nodes in - List.map (fun n_pxp -> n_pxp # extension # markup_node) l - - method pinstr name = - self # pxp_node # pinstr name - - method pinstr_names = - self # pxp_node # pinstr_names - - method iter_nodes f = - self # pxp_node # iter_nodes - (fun n_pxp -> f (n_pxp # extension # markup_node)) - - method iter_nodes_sibl f = - self # pxp_node # iter_nodes_sibl - (fun left_pxp node_pxp right_pxp -> - let left = - match left_pxp with - None -> None - | Some n_pxp -> Some (n_pxp # extension # markup_node) in - let right = - match right_pxp with - None -> None - | Some n_pxp -> Some (n_pxp # extension # markup_node) in - let node = - node_pxp # extension # markup_node in - f left node right - ) - - method set_nodes (l : 'ext node list) = - let l_pxp = List.map (fun n -> n # pxp_node) l in - self # pxp_node # set_nodes l_pxp - - method data = self # pxp_node # data - - method node_type = - match self # pxp_node # node_type with - Pxp_document.T_data -> T_data - | Pxp_document.T_element name -> T_element name - | Pxp_document.T_super_root -> T_element "-vr" - | Pxp_document.T_pinstr _ -> T_element "-pi" - | _ -> assert false - - method attribute name = - self # pxp_node # attribute name - - method attribute_names = - self # pxp_node # attribute_names - - method attribute_type name = - self # pxp_node # attribute_type name - - method attributes = - self # pxp_node # attributes - - method required_string_attribute name = - self # pxp_node # required_string_attribute name - - method required_list_attribute name = - self # pxp_node # required_list_attribute name - - method optional_string_attribute name = - self # pxp_node # optional_string_attribute name - - method optional_list_attribute name = - self # pxp_node # optional_list_attribute name - - method quick_set_attributes l = - self # pxp_node # quick_set_attributes l - - method find (name : string) = - let index = self # root # pxp_node # extension # index in - let n = index # find name in (* may raise Not_found *) - n # extension # markup_node - - method reset_finder = () - - method create_element dtd nt atts = - let nt_pxp = - match nt with - T_data -> Pxp_document.T_data - | T_element name -> Pxp_document.T_element name in - let node_pxp = - self # pxp_node # create_element dtd nt_pxp atts in - let ext' = extension # clone in - let n = new emulate_markup_node ext' (Some node_pxp) in - ext' # set_node (n : 'ext #node :> 'ext node); - node_pxp # extension # set_markup_node n; - n - - method create_data dtd s = - let node_pxp = - self # pxp_node # create_data dtd s in - let ext' = extension # clone in - let n = new emulate_markup_node ext' (Some node_pxp) in - ext' # set_node (n : 'ext #node :> 'ext node); - node_pxp # extension # set_markup_node n; - n - - method keep_always_whitespace_mode = - self # pxp_node # keep_always_whitespace_mode - - method write_compact_as_latin1 out = - self # pxp_node # write_compact_as_latin1 out - - method local_validate = - self # pxp_node # local_validate() - - method internal_adopt (p:'ext node option) = - assert false; - () - - method internal_delete (n:'ext node) = - assert false; - () - - method internal_init (d:Markup_dtd.dtd) (s:string) (atts:(string*string)list) = - assert false; - () - end -;; - -class [ 'ext ] data_impl ext data = - object (self) - inherit [ 'ext ] emulate_markup_node ext None - constraint 'ext = 'ext node #extension - initializer - if data <> "" then - failwith "Emulation of Markup_document: Cannot instantiate data node with non-empty string"; - let self' = (self : 'ext #node :> 'ext node ) in - pxp_node <- Some (new Pxp_document.data_impl (new pxp_extension self')) - - end -;; - -class [ 'ext ] element_impl ext = - object (self) - inherit [ 'ext ] emulate_markup_node ext None - initializer - let self' = (self : 'ext #node :> 'ext node ) in - pxp_node <- Some (new Pxp_document.element_impl (new pxp_extension self')) - end -;; - - -class [ 'ext ] document w = - object (self) - val pxp_doc = new Pxp_document.document - (w : Markup_types.collect_warnings :> Pxp_types.collect_warnings) - - val mutable standalone_flag = false - - method init_xml_version v = - pxp_doc # init_xml_version v - - method xml_version = - pxp_doc # xml_version - - method init_xml_standalone b = - standalone_flag <- b - - method xml_standalone = standalone_flag - - method init_root (r : 'ext node) = - pxp_doc # init_root (r # pxp_node); - self # dtd # set_standalone_declaration standalone_flag - (* questionable *) - - method root = - let pxp_root = pxp_doc # root in - pxp_root # extension # markup_node - - method dtd = - pxp_doc # dtd - - method add_pinstr pi = - pxp_doc # add_pinstr pi - - method pinstr name = - pxp_doc # pinstr name - - method pinstr_names = - pxp_doc # pinstr_names - - method write_compact_as_latin1 out = - pxp_doc # write_compact_as_latin1 out - - end -;; - -(* ====================================================================== - * History: - * - * $Log$ - * Revision 1.1 2000/11/17 09:57:30 lpadovan - * Initial revision - * - * Revision 1.6 2000/08/18 20:19:00 gerd - * Changed the emulation: there are now wrapper objects for nodes. - * This was necessary because node_type changed in PXP such that it became - * incompatible with Markup's node_type. - * - * Revision 1.5 2000/07/14 21:35:35 gerd - * Updated because of the simplification of Pxp_types.collect_warnings. - * - * Revision 1.4 2000/07/08 17:40:50 gerd - * Updated the simulation. - * - * Revision 1.3 2000/06/14 22:19:27 gerd - * Update because of additional 'encoding' methods. - * - * Revision 1.2 2000/05/30 00:08:40 gerd - * Bugfix. - * - * Revision 1.1 2000/05/29 23:43:51 gerd - * Initial compatibility revision. - * - *) - diff --git a/helm/DEVEL/pxp/pxp/compatibility/markup_document.mli b/helm/DEVEL/pxp/pxp/compatibility/markup_document.mli deleted file mode 100644 index 2e37f0f22..000000000 --- a/helm/DEVEL/pxp/pxp/compatibility/markup_document.mli +++ /dev/null @@ -1,420 +0,0 @@ -(* $Id$ - * ---------------------------------------------------------------------- - * Markup! The validating XML parser for Objective Caml. - * Copyright 1999 by Gerd Stolpmann. See LICENSE for details. - * - * THIS IS THE markup-0.2.10 COMPATIBLE INTERFACE TO markup_document.mli. - * It corresponds to revision 1.13 of markup_document.mli. - *) - -(**********************************************************************) -(* *) -(* Markup_document: *) -(* Object model of the document/element instances *) -(* *) -(**********************************************************************) - - -(* ====================================================================== - * OVERVIEW - * - * class type node ............. The common class type of the nodes of - * the element tree. Nodes are either - * elements (inner nodes) or data nodes - * (leaves) - * class type extension ........ The minimal properties of the so-called - * extensions of the nodes: Nodes can be - * customized by applying a class parameter - * that adds methods/values to nodes. - * class data_impl : node ...... Implements data nodes. - * class element_impl : node ... Implements element nodes - * class document .............. A document is an element with some additional - * properties - * - * ====================================================================== - * - * THE STRUCTURE OF NODE TREES: - * - * Every node except the root node has a parent node. The parent node is - * always an element, because data nodes never contain other nodes. - * In the other direction, element nodes may have children; both elements - * and data nodes are possible as children. - * Every node knows its parent (if any) and all its children (if any); - * the linkage is maintained in both directions. A node without a parent - * is called a root. - * It is not possible that a node is the child of two nodes (two different nodes - * or a multiple child of the same node). - * You can break the connection between a node and its parent; the method - * "delete" performs this operations and deletes the node from the parent's - * list of children. The node is now a root, for itself and for all - * subordinate nodes. In this context, the node is also called an orphan, - * because it has lost its parent (this is a bit misleading because the - * parent is not always the creator of a node). - * In order to simplify complex operations, you can also set the list of - * children of an element. Nodes that have been children before are unchanged; - * new nodes are added (and the linkage is set up), nodes no more occurring - * in the list are handled if they have been deleted. - * If you try to add a node that is not a root (either by an "add" or by a - * "set" operation) the operation fails. - * - * CREATION OF NODES - * - * The class interface supports creation of nodes by cloning a so-called - * exemplar. The idea is that it is sometimes useful to implement different - * element types by different classes, and to implement this by looking up - * exemplars. - * Imagine you have three element types A, B, and C, and three classes - * a, b, and c implementing the node interface (for example, by providing - * different extensions, see below). The XML parser can be configured to - * have a lookup table - * { A --> a0, B --> b0, C --> c0 } - * where a0, b0, c0 are exemplars of the classes a, b, and c, i.e. empty - * objects belonging to these classes. If the parser finds an instance of - * A, it looks up the exemplar a0 of A and clones it (actually, the method - * "create_element" performs this for elements, and "create_data" for data - * nodes). Clones belong to the same class as the original nodes, so the - * instances of the elements have the same classes as the configured - * exemplars. - * Note: This technique assumes that the interface of all exemplars is the - * same! - * - * THE EXTENSION - * - * The class type node and all its implementations have a class parameter - * 'ext which must at least fulfil the properties of the class type "extension". - * The idea is that you can add properties, for example: - * - * class my_extension = - * object - * (* minimal properties required by class type "extension": *) - * method clone = ... - * method node = ... - * method set_node n = ... - * (* here my own methods: *) - * method do_this_and_that ... - * end - * - * class my_element_impl = [ my_extension ] element_impl - * class my_data_impl = [ my_extension ] data_impl - * - * The whole XML parser is parameterized with 'ext, so your extension is - * visible everywhere (this is the reason why extensibility is solved by - * parametric polymorphism and not by inclusive polymorphism (subtyping)). - * - * - * SOME COMPLICATED TYPE EXPRESSIONS - * - * Sometimes the following type expressions turn out to be necessary: - * - * 'a node extension as 'a - * This is the type of an extension that belongs to a node that - * has an extension that is the same as we started with. - * - * 'a extension node as 'a - * This is the type of a node that has an extension that belongs to a - * node of the type we started with. - * - * - * DOCUMENTS - * ... - * - * ====================================================================== - * - * SIMPLE USAGE: ... - *) - - -open Markup_dtd - - -type node_type = - T_element of string - | T_data - - - -class type [ 'node ] extension = - object ('self) - method clone : 'self - (* "clone" should return an exact deep copy of the object. *) - method node : 'node - (* "node" returns the corresponding node of this extension. This method - * intended to return exactly what previously has been set by "set_node". - *) - method set_node : 'node -> unit - (* "set_node" is invoked once the extension is associated to a new - * node object. - *) - end -;; - -class type [ 'ext, 'node ] pxp_extension_type = -object ('self) - method clone : 'self - method node : 'self Pxp_document.node - method set_node : 'self Pxp_document.node -> unit - - method markup_node : 'node - method set_markup_node : 'node -> unit - - method set_index : 'self Pxp_yacc.index -> unit - method index : 'self Pxp_yacc.index - end -;; - -class type [ 'ext ] node = - object ('self) - constraint 'ext = 'ext node #extension - method pxp_node : (('ext, 'ext node) pxp_extension_type) Pxp_document.node - - method extension : 'ext - (* Return the extension of this node: *) - - method delete : unit - (* Delete this node from the parent's list of sub nodes. This node gets - * orphaned. - * 'delete' does nothing if this node does not have a parent. - *) - - method parent : 'ext node - (* Get the parent, or raise Not_found if this node is an orphan. *) - - method root : 'ext node - (* Get the direct or indirect parent that does not have a parent itself, - * i.e. the root of the tree. - *) - - method orphaned_clone : 'ext node - (* return an exact clone of this element and all sub nodes (deep copy) - * except string values which are shared by this node and the clone. - * The other exception is that the clone has no parent (i.e. it is now - * a root). - *) - - method orphaned_flat_clone : 'ext node - (* return a clone of this element where all subnodes are omitted. - * The type of the node, and the attributes are the same as in the - * original node. - * The clone has no parent. - *) - - method add_node : 'ext node -> unit - (* Append new sub nodes -- mainly used by the parser itself, but - * of course open for everybody. If an element is added, it must be - * an orphan (i.e. does not have a parent node); and after addition - * *this* node is the new parent. - *) - - method add_pinstr : proc_instruction -> unit - (* Add a processing instruction to the set of processing instructions of - * this node. Usually only elements contain processing instructions. - *) - - method pinstr : string -> proc_instruction list - (* Get all processing instructions with the passed name *) - - method pinstr_names : string list - (* Get a list of all names of processing instructions *) - - method sub_nodes : 'ext node list - (* Get the list of sub nodes *) - - method iter_nodes : ('ext node -> unit) -> unit - (* iterate over the sub nodes *) - - method iter_nodes_sibl : - ('ext node option -> 'ext node -> 'ext node option -> unit) -> unit - (* Here every iteration step can also access to the previous and to the - * following node if present: - *) - - method find : string -> 'ext node - (* Get the node that has an ID attribute with this value, or raise - * Not_found. - * "find" may also cause a Validation_error if something is wrong - * with the IDs. - *) - - method reset_finder : unit - (* makes that newly added nodes will also be found *) - - method set_nodes : 'ext node list -> unit - (* Set the list of sub nodes. Elements that are no longer sub nodes gets - * orphaned, and all new elements that previously were not sub nodes - * must have been orphaned. - *) - - method data : string - (* Get the data string of this node. For data nodes, this string is just - * the content. For elements, this string is the concatenation of all - * subordinate data nodes. - *) - - method node_type : node_type - (* Get the name of the element type. *) - - method attribute : string -> Markup_types.att_value - method attribute_names : string list - method attribute_type : string -> Markup_types.att_type - method attributes : (string * Markup_types.att_value) list - (* Get a specific attribute; get the names of all attributes; get the - * type of a specific attribute; get names and values of all attributes. - * Only elements have attributes. - * Note: If the DTD allows arbitrary for this element, "attribute_type" - * raises Undeclared. - *) - - method required_string_attribute : string -> string - method required_list_attribute : string -> string list - (* Return the attribute or fail if the attribute is not present: - * The first version passes the value always as string back; - * the second version always as list. - *) - - method optional_string_attribute : string -> string option - method optional_list_attribute : string -> string list - (* Return some attribute value or return None if the attribute is not - * present: - * The first version passes the value always as string back; - * the second version always as list. - *) - - method quick_set_attributes : (string * Markup_types.att_value) list -> unit - (* Sets the attributes but does not check whether they match the DTD. - *) - - method dtd : dtd - (* Get the DTD *) - - method create_element : dtd -> node_type -> (string * string) list -> 'ext node - (* create an "empty copy" of this element: - * - new DTD - * - new node type - * - new attribute list - * - empty list of nodes - *) - - method create_data : dtd -> string -> 'ext node - (* create an "empty copy" of this data node: *) - - method local_validate : unit - (* Check that this element conforms to the DTD: *) - - method keep_always_whitespace_mode : unit - (* Normally, add_node does not accept data nodes when the DTD does not - * allow data nodes or only whitespace ("ignorable whitespace"). - * Once you have invoked this method, ignorable whitespace is forced - * to be included into the document. - *) - - method write_compact_as_latin1 : Markup_types.output_stream -> unit - (* Write the contents of this node and the subtrees to the passed - * output stream; the character set ISO-8859-1 is used. The format - * is compact (the opposite of "pretty printing"). - *) - - (* ---------------------------------------- *) - (* internal methods: *) - method internal_adopt : 'ext node option -> unit - method internal_delete : 'ext node -> unit - method internal_init : dtd -> string -> (string * string) list -> unit - end -;; - -class [ 'ext ] data_impl : 'ext -> string -> [ 'ext ] node - -class [ 'ext ] element_impl : 'ext -> [ 'ext ] node - -class [ 'ext ] document : - Markup_types.collect_warnings -> - object - method init_xml_version : string -> unit - method init_xml_standalone : bool -> unit - method init_root : 'ext node -> unit - - method xml_version : string - method xml_standalone : bool - method dtd : dtd - method root : 'ext node - - method add_pinstr : proc_instruction -> unit - method pinstr : string -> proc_instruction list - method pinstr_names : string list - - method write_compact_as_latin1 : Markup_types.output_stream -> unit - (* Write the document to the passed - * output stream; the character set ISO-8859-1 is used. The format - * is compact (the opposite of "pretty printing"). - * If a DTD is present, the DTD is included into the internal subset. - *) - - end -;; - - -(* ====================================================================== - * History: - * - * $Log$ - * Revision 1.1 2000/11/17 09:57:30 lpadovan - * Initial revision - * - * Revision 1.4 2000/08/18 20:19:16 gerd - * Updates in the emulation because of PXP changes. - * - * Revision 1.3 2000/07/16 16:35:06 gerd - * Update because PXP interface contains now the method 'write'. - * - * Revision 1.2 2000/06/14 22:19:27 gerd - * Update because of additional 'encoding' methods. - * - * Revision 1.1 2000/05/29 23:43:51 gerd - * Initial compatibility revision. - * - * ====================================================================== - * OLD LOGS: - * - * Revision 1.13 2000/05/27 19:15:08 gerd - * Removed the method init_xml_standalone. - * - * Revision 1.12 2000/05/01 20:42:34 gerd - * New method write_compact_as_latin1. - * - * Revision 1.11 2000/04/30 18:15:57 gerd - * Beautifications. - * New method keep_always_whitespace_mode. - * - * Revision 1.10 2000/03/11 22:58:15 gerd - * Updated to support Markup_codewriter. - * - * Revision 1.9 2000/01/27 21:51:56 gerd - * Added method 'attributes'. - * - * Revision 1.8 2000/01/27 21:19:07 gerd - * Added further methods. - * - * Revision 1.7 1999/11/09 22:20:14 gerd - * Removed method init_dtd from class "document". The DTD is - * implicitly passed to the document by the root element. - * - * Revision 1.6 1999/09/01 22:51:40 gerd - * Added methods to store processing instructions. - * - * Revision 1.5 1999/09/01 16:19:57 gerd - * The "document" class has now a "warner" as class argument. - * - * Revision 1.4 1999/08/19 21:59:13 gerd - * Added method "reset_finder". - * - * Revision 1.3 1999/08/19 01:08:29 gerd - * Added method "find". - * - * Revision 1.2 1999/08/15 02:19:41 gerd - * Some new explanations: That unknown elements are not rejected - * if the DTD allows them. - * - * Revision 1.1 1999/08/10 00:35:51 gerd - * Initial revision. - * - * - *) diff --git a/helm/DEVEL/pxp/pxp/compatibility/markup_dtd.ml b/helm/DEVEL/pxp/pxp/compatibility/markup_dtd.ml deleted file mode 100644 index 7df5e29c6..000000000 --- a/helm/DEVEL/pxp/pxp/compatibility/markup_dtd.ml +++ /dev/null @@ -1,36 +0,0 @@ -(* $Id$ - * ---------------------------------------------------------------------- - *) - -class dtd w = - Pxp_dtd.dtd - (w : Markup_types.collect_warnings :> Pxp_types.collect_warnings) - `Enc_iso88591;; - -class dtd_element dtd name = - Pxp_dtd.dtd_element dtd name;; - -class dtd_notation name id = - Pxp_dtd.dtd_notation name id `Enc_iso88591;; - -class proc_instruction target value = - Pxp_dtd.proc_instruction target value `Enc_iso88591;; - - -(* ====================================================================== - * History: - * - * $Log$ - * Revision 1.1 2000/11/17 09:57:30 lpadovan - * Initial revision - * - * Revision 1.3 2000/07/14 21:35:35 gerd - * Updated because of the simplification of Pxp_types.collect_warnings. - * - * Revision 1.2 2000/06/14 22:19:27 gerd - * Update because of additional 'encoding' methods. - * - * Revision 1.1 2000/05/29 23:43:51 gerd - * Initial compatibility revision. - * - *) diff --git a/helm/DEVEL/pxp/pxp/compatibility/markup_dtd.mli b/helm/DEVEL/pxp/pxp/compatibility/markup_dtd.mli deleted file mode 100644 index 660b35ae8..000000000 --- a/helm/DEVEL/pxp/pxp/compatibility/markup_dtd.mli +++ /dev/null @@ -1,108 +0,0 @@ -(* $Id$ - * ---------------------------------------------------------------------- - * Markup! The validating XML parser for Objective Caml. - * Copyright 1999 by Gerd Stolpmann. See LICENSE for details. - * - * THIS IS THE markup-0.2.10 COMPATIBLE INTERFACE TO markup_dtd.mli. - * It corresponds to revision 1.11 of markup_dtd.mli. - *) - -(**********************************************************************) -(* *) -(* Markup_dtd: *) -(* Object model of document type declarations *) -(* *) -(**********************************************************************) - -(* ====================================================================== - * OVERVIEW - * - * class dtd ............... represents the whole DTD, including element - * declarations, entity declarations, notation - * declarations, and processing instructions - * class dtd_element ....... represents an element declaration consisting - * of a content model and an attribute list - * declaration - * class dtd_notation ...... represents a notation declaration - * class proc_instruction .. represents a processing instruction - * ====================================================================== - * - *) - - -class dtd : - Markup_types.collect_warnings -> - Pxp_dtd.dtd - (* Incompatibilities: - * add_gen_entity, gen_entity - *) - -class dtd_element : dtd -> string -> Pxp_dtd.dtd_element - (* Incompatibilities: - * set_content_model, add_attribute - *) - -class dtd_notation : string -> Markup_types.ext_id -> Pxp_dtd.dtd_notation - -class proc_instruction : string -> string -> Pxp_dtd.proc_instruction - -(* ====================================================================== - * History: - * - * $Log$ - * Revision 1.1 2000/11/17 09:57:30 lpadovan - * Initial revision - * - * Revision 1.1 2000/05/29 23:43:51 gerd - * Initial compatibility revision. - * - * ====================================================================== - * OLD LOGS: - * - * Revision 1.11 2000/05/29 21:14:57 gerd - * Changed the type 'encoding' into a polymorphic variant. - * - * Revision 1.10 2000/05/27 19:20:38 gerd - * Changed the interfaces for the standalone check: New - * methods: standalone_declaration, set_standalone_declaration, - * externally_declared, attribute_violates_standalone_declaration. - * The method set_content_model has been renamed to - * set_cm_and_extdecl; it now initializes also whether the element - * has been declared in an external entity. - * Methods add_gen_entity and gen_entity pass an additional - * boolean argument containing whether the declaration of the - * general entity happened in an external entity. - * Method add_attribute expects this argument, too, which - * states whether the declaration of the attribute happened in an - * external entity. - * - * Revision 1.9 2000/05/20 20:31:40 gerd - * Big change: Added support for various encodings of the - * internal representation. - * - * Revision 1.8 2000/05/06 23:10:26 gerd - * allow_arbitrary for elements, too. - * - * Revision 1.7 2000/05/01 20:42:52 gerd - * New method write_compact_as_latin1. - * - * Revision 1.6 2000/03/11 22:58:15 gerd - * Updated to support Markup_codewriter. - * - * Revision 1.5 2000/02/22 02:32:02 gerd - * Updated. - * - * Revision 1.4 1999/11/09 22:15:41 gerd - * Added method "arbitrary_allowed". - * - * Revision 1.3 1999/09/01 16:21:56 gerd - * "dtd" classes have now an argument that passes a "warner". - * - * Revision 1.2 1999/08/15 02:20:23 gerd - * New feature: a DTD can allow arbitrary elements. - * - * Revision 1.1 1999/08/10 00:35:51 gerd - * Initial revision. - * - * - *) diff --git a/helm/DEVEL/pxp/pxp/compatibility/markup_reader.ml b/helm/DEVEL/pxp/pxp/compatibility/markup_reader.ml deleted file mode 100644 index a196c2219..000000000 --- a/helm/DEVEL/pxp/pxp/compatibility/markup_reader.ml +++ /dev/null @@ -1,119 +0,0 @@ -(* $Id$ - * ---------------------------------------------------------------------- - *) - -open Markup_types;; - -class type resolver = - object - method open_in : ext_id -> Lexing.lexbuf - method close_in : unit - method change_encoding : string -> unit - method clone : resolver - end -;; - -(* General note: close_in is simulated by close_all. Of course, this is - * wrong, but it should not matter - *) - - -class resolve_read_channel ch the_warner = - object (self) - val pxp_resolver = - new Pxp_reader.resolve_read_this_channel - ~auto_close:false - ch - val warner = the_warner - - initializer - pxp_resolver # init_warner - (warner : Markup_types.collect_warnings :> Pxp_types.collect_warnings); - pxp_resolver # init_rep_encoding `Enc_iso88591; - - method open_in xid = - pxp_resolver # open_in xid - - method close_in = - pxp_resolver # close_all (* sic! *) - - method change_encoding enc = - pxp_resolver # change_encoding enc - - method clone = - ( {< pxp_resolver = pxp_resolver # clone >} : #resolver :> resolver ) - - end -;; - - -class resolve_read_string str = - object (self) - val pxp_resolver = - new Pxp_reader.resolve_read_this_string str - val warner = new Pxp_types.drop_warnings - - initializer - pxp_resolver # init_warner warner; - pxp_resolver # init_rep_encoding `Enc_iso88591; - - method open_in xid = - pxp_resolver # open_in xid - - method close_in = - pxp_resolver # close_all (* sic! *) - - method change_encoding enc = - pxp_resolver # change_encoding enc - - method clone = - ( {< pxp_resolver = pxp_resolver # clone >} : #resolver :> resolver ) - end -;; - - -class resolve_as_file the_warner = - object (self) - val pxp_resolver = - new Pxp_reader.resolve_as_file - ~system_encoding:`Enc_iso88591 - () - val warner = the_warner - - initializer - pxp_resolver # init_warner - (warner : Markup_types.collect_warnings :> Pxp_types.collect_warnings); - pxp_resolver # init_rep_encoding `Enc_iso88591; - - method open_in xid = - pxp_resolver # open_in xid - - method close_in = - pxp_resolver # close_all (* sic! *) - - method change_encoding enc = - pxp_resolver # change_encoding enc - - method clone = - ( {< pxp_resolver = pxp_resolver # clone >} : #resolver :> resolver ) - end -;; - - -(* ====================================================================== - * History: - * - * $Log$ - * Revision 1.1 2000/11/17 09:57:30 lpadovan - * Initial revision - * - * Revision 1.3 2000/07/14 21:35:35 gerd - * Updated because of the simplification of Pxp_types.collect_warnings. - * - * Revision 1.2 2000/07/08 17:40:50 gerd - * Updated the simulation. - * - * Revision 1.1 2000/05/29 23:43:51 gerd - * Initial compatibility revision. - * - *) diff --git a/helm/DEVEL/pxp/pxp/compatibility/markup_reader.mli b/helm/DEVEL/pxp/pxp/compatibility/markup_reader.mli deleted file mode 100644 index 8e5e2c8fc..000000000 --- a/helm/DEVEL/pxp/pxp/compatibility/markup_reader.mli +++ /dev/null @@ -1,141 +0,0 @@ -(* $Id$ - * ---------------------------------------------------------------------- - * Markup! The validating XML parser for Objective Caml. - * Copyright by Gerd Stolpmann. See LICENSE for details. - * - * THIS IS THE markup-0.2.10 COMPATIBLE INTERFACE TO markup_reader.mli. - * It corresponds to revision 1.3 of markup_reader.mli. - *) - -open Markup_types;; - - -(* The class type resolver is the official type of all "resolvers". - * Resolvers get file names (or better, external identifiers) and - * return lexbufs, scanning the file for tokens. Resolvers may be - * cloned, and clones can interpret relative file names relative to - * their creator. - *) - -class type resolver = - object - (* A resolver can open a character source, and returns this source as - * Lexing.lexbuf. - * The resolver should recode the source into ISO-8859-1. By default, - * a resolver should assume UTF-8 or UTF-16 encoding. Before - * 'change_encoding' is invoked, the resolver should only return - * lexbufs with one character. After 'change_encoding' has been invoked, - * there is no character limit anymore. - * 'change_encoding' can only be invoked once. This method is usually - * called after the prolog of the entity has been read. - * If this method is not called, it is up to the resolver to find out - * if UTF-8 or UTF-16 is used. It is recommended to invoke this method - * with an empty string to indicate this situation. - *) - method open_in : ext_id -> Lexing.lexbuf - method close_in : unit - method change_encoding : string -> unit - - - (* Every resolver can be cloned. The clone does not inherit the connection - * with the external object, i.e. it is closed. - *) - method clone : resolver - - end -;; - - -(* The following class is the current main implementation of resolvers. - * It fetches strings from an arbitrary source (by calling init_in, and - * then repeatedly next_string), recodes them to ISO-8859-1, and creates - * lexbufs for them. - * It is not complete, as the source is missing. - * - * Note that 'resolve_general' may change in future revisions; it is ugly. - *) - -(* -- This API simulation does not provide 'resolve_general' any longer - -class virtual resolve_general : - collect_warnings -> - object - val mutable encoding : string - val mutable encoding_requested : bool - val warner : collect_warnings - - method clone : resolver - - method private warn : int -> unit - method private autodetect : string -> unit - - method private virtual next_string : string -> int -> int -> int - method private virtual init_in : ext_id -> unit - method virtual close_in : unit - - method open_in : ext_id -> Lexing.lexbuf - - method change_encoding : string -> unit - end -*) - - -(* The next classes are resolvers for concrete input sources. *) - -class resolve_read_channel : - in_channel -> collect_warnings -> resolver;; - - (* Reads from the passed channel (it may be even a pipe). Note that this - * resolver cannot handle file inclusions, as it is pre-bound to a - * specific channel and is not able to interpret file names. - * That means, if there is a entity reference (something like &name; or - * %name;) to parse, and the definition points to another file, the - * resolver will fail. - *) - - -class resolve_read_string : - string -> resolver;; - - (* Reads from the passed string. As 'resolver_read_channel', this - * resolver cannot handle file inclusions. - *) - - -class resolve_as_file : - collect_warnings -> resolver;; - - (* Reads from the local file system. Every file name is interpreted as - * file name of the local file system, and the referred file is read. - * This resolver can handle file inclusions as long as they do not - * exceed the scope of the local file system (i.e. no URLs). - *) - -(* ====================================================================== - * History: - * - * $Log$ - * Revision 1.1 2000/11/17 09:57:30 lpadovan - * Initial revision - * - * Revision 1.2 2000/07/08 17:40:50 gerd - * Updated the simulation. - * - * Revision 1.1 2000/05/29 23:43:51 gerd - * Initial compatibility revision. - * - * ====================================================================== - * OLD LOGS: - * - * Revision 1.3 2000/05/29 21:14:57 gerd - * Changed the type 'encoding' into a polymorphic variant. - * - * Revision 1.2 2000/05/20 20:31:40 gerd - * Big change: Added support for various encodings of the - * internal representation. - * - * Revision 1.1 2000/03/13 23:41:54 gerd - * Initial revision. - * - * - *) diff --git a/helm/DEVEL/pxp/pxp/compatibility/markup_types.ml b/helm/DEVEL/pxp/pxp/compatibility/markup_types.ml deleted file mode 100644 index a0c0c271b..000000000 --- a/helm/DEVEL/pxp/pxp/compatibility/markup_types.ml +++ /dev/null @@ -1,103 +0,0 @@ -(* $Id$ - * ---------------------------------------------------------------------- - *) - - -type ext_id = Pxp_types.ext_id = - System of string - | Public of (string * string) - | Anonymous -type dtd_id = Pxp_types.dtd_id= - External of ext_id - | Derived of ext_id - | Internal -type content_model_type = Pxp_types.content_model_type = - Unspecified - | Empty - | Any - | Mixed of mixed_spec list - | Regexp of regexp_spec -and mixed_spec = Pxp_types.mixed_spec = - MPCDATA - | MChild of string -and regexp_spec = Pxp_types.regexp_spec = - Optional of regexp_spec - | Repeated of regexp_spec - | Repeated1 of regexp_spec - | Alt of regexp_spec list - | Seq of regexp_spec list - | Child of string -type att_type = Pxp_types.att_type = - A_cdata - | A_id - | A_idref - | A_idrefs - | A_entity - | A_entities - | A_nmtoken - | A_nmtokens - | A_notation of string list - | A_enum of string list -type att_default = Pxp_types.att_default = - D_required - | D_implied - | D_default of string - | D_fixed of string -type att_value = Pxp_types.att_value = - Value of string - | Valuelist of string list - | Implied_value - -class collect_warnings = -object - val mutable w = Buffer.create 100 - method print_warnings = - Buffer.contents w - method reset = - Buffer.clear w - method warn s = - Buffer.add_string w ("WARNING: " ^ s ^ "\n") -end - -exception Illegal_character of int -exception Validation_error = Pxp_types.Validation_error -exception WF_error = Pxp_types.WF_error -exception Character_not_supported = Pxp_types.Character_not_supported -exception Bad_character_stream = Netconversion.Malformed_code -exception At = Pxp_types.At -exception Undeclared = Pxp_types.Undeclared - -let string_of_exn = Pxp_types.string_of_exn - -type output_stream = Pxp_types.output_stream = - Out_buffer of Buffer.t - | Out_channel of out_channel - | Out_function of (string -> int -> int -> unit) - -let write = Pxp_types.write - - -(* ====================================================================== - * History: - * - * $Log$ - * Revision 1.1 2000/11/17 09:57:30 lpadovan - * Initial revision - * - * Revision 1.5 2000/08/18 20:19:16 gerd - * Updates in the emulation because of PXP changes. - * - * Revision 1.4 2000/07/16 18:30:15 gerd - * Updated because PXP does no longer have the exception - * Illegal_character. - * - * Revision 1.3 2000/07/14 21:35:35 gerd - * Updated because of the simplification of Pxp_types.collect_warnings. - * - * Revision 1.2 2000/07/08 17:40:50 gerd - * Updated the simulation. - * - * Revision 1.1 2000/05/29 23:43:51 gerd - * Initial compatibility revision. - * - *) diff --git a/helm/DEVEL/pxp/pxp/compatibility/markup_types.mli b/helm/DEVEL/pxp/pxp/compatibility/markup_types.mli deleted file mode 100644 index b33bb30b2..000000000 --- a/helm/DEVEL/pxp/pxp/compatibility/markup_types.mli +++ /dev/null @@ -1,125 +0,0 @@ -(* $Id$ - * ---------------------------------------------------------------------- - * Markup! The validating XML parser for Objective Caml. - * Copyright 1999 by Gerd Stolpmann. See LICENSE for details. - * - * THIS IS THE markup-0.2.10 COMPATIBLE INTERFACE TO markup_types.mli. - * It corresponds to revision 1.7 of markup_types.mli. - *) - - -type ext_id = Pxp_types.ext_id = - System of string - | Public of (string * string) - | Anonymous -type dtd_id = Pxp_types.dtd_id = - External of ext_id - | Derived of ext_id - | Internal -type content_model_type = Pxp_types.content_model_type = - Unspecified - | Empty - | Any - | Mixed of mixed_spec list - | Regexp of regexp_spec -and mixed_spec = Pxp_types.mixed_spec = - MPCDATA - | MChild of string -and regexp_spec = Pxp_types.regexp_spec = - Optional of regexp_spec - | Repeated of regexp_spec - | Repeated1 of regexp_spec - | Alt of regexp_spec list - | Seq of regexp_spec list - | Child of string -type att_type = Pxp_types.att_type = - A_cdata - | A_id - | A_idref - | A_idrefs - | A_entity - | A_entities - | A_nmtoken - | A_nmtokens - | A_notation of string list - | A_enum of string list -type att_default = Pxp_types.att_default = - D_required - | D_implied - | D_default of string - | D_fixed of string -type att_value = Pxp_types.att_value = - Value of string - | Valuelist of string list - | Implied_value - -class collect_warnings : - object - method warn : string -> unit - method print_warnings : string - method reset : unit - end -;; - - -exception Illegal_character of int -exception Validation_error of string -exception WF_error of string -exception Character_not_supported -exception Bad_character_stream -exception At of (string * exn) -exception Undeclared - -val string_of_exn : exn -> string - (* Converts a Markup exception into a readable string *) - - -type output_stream = Pxp_types.output_stream = - Out_buffer of Buffer.t - | Out_channel of out_channel - | Out_function of (string -> int -> int -> unit) - -val write : output_stream -> string -> int -> int -> unit - (* write os s pos len: Writes the string to the buffer/channel/stream *) - -(* ====================================================================== - * History: - * - * $Log$ - * Revision 1.1 2000/11/17 09:57:30 lpadovan - * Initial revision - * - * Revision 1.2 2000/07/08 17:40:50 gerd - * Updated the simulation. - * - * Revision 1.1 2000/05/29 23:43:51 gerd - * Initial compatibility revision. - * - * ====================================================================== - * OLD LOGS: - * - * Revision 1.7 2000/05/29 21:14:57 gerd - * Changed the type 'encoding' into a polymorphic variant. - * - * Revision 1.6 2000/05/20 20:31:40 gerd - * Big change: Added support for various encodings of the - * internal representation. - * - * Revision 1.5 2000/05/01 20:43:25 gerd - * New type output_stream; new function 'write'. - * - * Revision 1.4 1999/09/01 16:25:35 gerd - * Dropped Illegal_token and Content_not_allowed_here. WF_error can - * be used instead. - * - * Revision 1.3 1999/08/15 02:22:40 gerd - * Added exception Undeclared. - * - * Revision 1.2 1999/08/14 22:15:17 gerd - * New class "collect_warnings". - * - * Revision 1.1 1999/08/10 00:35:52 gerd - * Initial revision. - * - * - *) diff --git a/helm/DEVEL/pxp/pxp/compatibility/markup_yacc.ml b/helm/DEVEL/pxp/pxp/compatibility/markup_yacc.ml deleted file mode 100644 index 26c40de18..000000000 --- a/helm/DEVEL/pxp/pxp/compatibility/markup_yacc.ml +++ /dev/null @@ -1,245 +0,0 @@ -(* $Id$ - * ---------------------------------------------------------------------- - *) - -open Markup_types -open Markup_dtd -open Markup_document - -type config = - { warner : collect_warnings; - errors_with_line_numbers : bool; - processing_instructions_inline : bool; - virtual_root : bool; - debugging_mode : bool; - } - - -type source = - Entity of ((dtd -> Pxp_entity.entity) * Markup_reader.resolver) - | Channel of in_channel - | File of string - | Latin1 of string - | ExtID of (ext_id * Markup_reader.resolver) - -type 'ext domspec = - { map : (node_type, 'ext node) Hashtbl.t; - default_element : 'ext node; - } - - -class default_ext = - object(self) - val mutable node = (None : ('a extension node as 'a) option) - method clone = {< >} - method node = - match node with - None -> - assert false - | Some n -> n - method set_node n = - node <- Some n - end -;; - - -let default_extension = new default_ext;; - -let default_config = - { warner = new collect_warnings; - errors_with_line_numbers = true; - processing_instructions_inline = false; - virtual_root = false; - debugging_mode = false; - } - - -let default_dom = - let d = Hashtbl.create 2 in - Hashtbl.add d T_data (new data_impl default_extension ""); - { map = d; - default_element = new element_impl default_extension - } -;; - - -let pxp_config cfg = - { Pxp_yacc.default_config with - Pxp_yacc.warner = (cfg.warner :> Pxp_types.collect_warnings); - Pxp_yacc.errors_with_line_numbers = cfg.errors_with_line_numbers; - Pxp_yacc.enable_pinstr_nodes = cfg.processing_instructions_inline; - Pxp_yacc.enable_super_root_node = cfg.virtual_root; - Pxp_yacc.encoding = `Enc_iso88591; - Pxp_yacc.recognize_standalone_declaration = false; - Pxp_yacc.debugging_mode = cfg.debugging_mode; - } -;; - - -class pxp_resolver r = - object (self) - val markup_resolver = r - - method init_rep_encoding enc = - assert (enc = `Enc_iso88591 ) - - method init_warner w = - () - - method rep_encoding = `Enc_iso88591 - - method open_in xid = - markup_resolver # open_in xid - - method close_in = - markup_resolver # close_in - - method close_all = - markup_resolver # close_in - - method change_encoding enc = - markup_resolver # change_encoding enc - - method clone = - ( {< markup_resolver = markup_resolver # clone >} - : #Pxp_reader.resolver :> Pxp_reader.resolver ) - end -;; - - -let pxp_source src = - match src with - Entity (mkent, res) -> Pxp_yacc.Entity(mkent, new pxp_resolver res) - | ExtID (id, res) -> Pxp_yacc.ExtID(id, new pxp_resolver res) - | Channel ch -> Pxp_yacc.from_channel - ~system_encoding:`Enc_iso88591 ch - | File f -> Pxp_yacc.from_file - ~system_encoding:`Enc_iso88591 f - | Latin1 s -> Pxp_yacc.from_string ~fixenc:`Enc_iso88591 s -;; - - -let pxp_dom dom = - let dex = - try Hashtbl.find dom.map T_data - with Not_found -> assert false - in - let eex = dom.default_element in - let m = Hashtbl.create 100 in - Hashtbl.iter - (fun nt ex -> - match nt with - T_element name when name <> "-vr" && name <> "-pi" -> - let pxp_ex = ex # pxp_node in - Hashtbl.add m name pxp_ex - | _ -> () - ) - dom.map; - let srex = - try - Some ((Hashtbl.find dom.map (T_element "-vr")) # pxp_node) - with - Not_found -> None - in - let piex = - try - Some ((Hashtbl.find dom.map (T_element "-pi")) # pxp_node) - with - Not_found -> None - in - Pxp_document.make_spec_from_mapping - ?super_root_exemplar:srex - ?default_pinstr_exemplar:piex - ~data_exemplar:(dex # pxp_node) - ~default_element_exemplar:(eex # pxp_node) - ~element_mapping:m - () -;; - - -let markup_document w index doc = - let mdoc = new document w in - mdoc # init_xml_version (doc # xml_version); - mdoc # init_xml_standalone (doc # xml_standalone); - let r = doc # root # extension in - r # set_index index; - mdoc # init_root (r # markup_node); - List.iter - (fun piname -> - let l = doc # pinstr piname in - List.iter - (fun pi -> mdoc # add_pinstr pi) - l) - (doc # pinstr_names); - mdoc -;; - - - -let parse_dtd_entity cfg src = - Pxp_yacc.parse_dtd_entity - (pxp_config cfg) - (pxp_source src) -;; - - -let parse_document_entity cfg src dom = - let index = (new Pxp_yacc.hash_index :> 'ext Pxp_yacc.index) in - markup_document - cfg.warner - index - (Pxp_yacc.parse_document_entity - ~id_index:index - (pxp_config cfg) - (pxp_source src) - (pxp_dom dom)) -;; - - -let parse_content_entity cfg src dtd dom = - let index = (new Pxp_yacc.hash_index :> 'ext Pxp_yacc.index) in - let n = - (Pxp_yacc.parse_content_entity - ~id_index:index - (pxp_config cfg) - (pxp_source src) - dtd - (pxp_dom dom)) # extension in - n # set_index index; - n # markup_node -;; - - -let parse_wf_entity cfg src dom = - let index = (new Pxp_yacc.hash_index :> 'ext Pxp_yacc.index) in - (* Restriction: index is not filled! *) - markup_document - cfg.warner - index - (Pxp_yacc.parse_wfdocument_entity - (pxp_config cfg) - (pxp_source src) - (pxp_dom dom)) -;; - - -(* ====================================================================== - * History: - * - * $Log$ - * Revision 1.1 2000/11/17 09:57:30 lpadovan - * Initial revision - * - * Revision 1.4 2000/08/18 20:19:16 gerd - * Updates in the emulation because of PXP changes. - * - * Revision 1.3 2000/07/14 21:35:35 gerd - * Updated because of the simplification of Pxp_types.collect_warnings. - * - * Revision 1.2 2000/07/08 17:40:50 gerd - * Updated the simulation. - * - * Revision 1.1 2000/05/29 23:43:51 gerd - * Initial compatibility revision. - * - *) diff --git a/helm/DEVEL/pxp/pxp/compatibility/markup_yacc.mli b/helm/DEVEL/pxp/pxp/compatibility/markup_yacc.mli deleted file mode 100644 index daccad4c7..000000000 --- a/helm/DEVEL/pxp/pxp/compatibility/markup_yacc.mli +++ /dev/null @@ -1,233 +0,0 @@ -(* $Id$ - * ---------------------------------------------------------------------- - * Markup! The validating XML parser for Objective Caml. - * Copyright 1999 by Gerd Stolpmann. See LICENSE for details. - * - * THIS IS THE markup-0.2.10 COMPATIBLE INTERFACE TO markup_yacc.mli. - * It corresponds to revision 1.4 of markup_yacc.mli. - *) - - -(*$ markup-yacc.mli *) - -open Markup_types -open Markup_dtd -open Markup_document - -type config = - { warner : collect_warnings; - (* An object that collects warnings. *) - - errors_with_line_numbers : bool; - (* Whether error messages contain line numbers or not. The parser - * is 10 to 20 per cent faster if line numbers are turned off; - * you get only character positions in this case. - *) - - processing_instructions_inline : bool; - (* true: turns a special mode for processing instructions on. Normally, - * you cannot determine the exact location of a PI; you only know - * in which element the PI occurs. The "inline" mode makes it possible - * to find the exact location out: Every PI is artificially wrapped - * by a special element with name "-pi". For example, if the XML text - * is , the parser normally produces only an element - * object for "a", and puts the PIs "x" and "y" into it (without - * order). In inline mode, the object "a" will contain two objects - * with name "-pi", and the first object will contain "x", and the - * second "y". - * Notes: - * (1) The name "-pi" is reserved. You cannot use it for your own - * tags because tag names must not begin with '-'. - * (2) You need not to add a declaration for "-pi" to the DTD. These - * elements are handled separately. - * (3) Of course, the "-pi" objects are created from exemplars of - * your DOM map. - *) - - virtual_root : bool; - (* true: the topmost element of the XML tree is not the root element, - * but the so-called virtual root. The root element is a son of the - * virtual root. The virtual root is an ordinary element with name - * "-vr". - * The following behaviour changes, too: - * - PIs occurring outside the root element and outside the DTD are - * added to the virtual root instead of the document object - * - If processing_instructions_inline is also turned on, these PIs - * are added inline to the virtual root - * Notes: - * (1) The name "-vr" is reserved. You cannot use it for your own - * tags because tag names must not begin with '-'. - * (2) You need not to add a declaration for "-vr" to the DTD. These - * elements are handled separately. - * (3) Of course, the "-vr" objects are created from exemplars of - * your DOM map. - *) - - (* The following options are not implemented, or only for internal - * use. - *) - - debugging_mode : bool; - } - - -type source = - Entity of ((dtd -> Pxp_entity.entity) * Markup_reader.resolver) - | Channel of in_channel - | File of string - | Latin1 of string - | ExtID of (ext_id * Markup_reader.resolver) - -(* Note on sources: - * - * The sources do not have all the same capabilities. Here the differences: - * - * - File: A File source reads from a file by name. This has the advantage - * that references to external entites can be resolved. - The problem - * with SYSTEM references is that they usually contain relative file - * names; more exactly, a file name relative to the document containing it. - * It is only possible to convert such names to absolute file names if the - * name of the document containing such references is known; and File - * denotes this name. - * - * - Channel, Latin1: These sources read from documents given as channels or - * (Latin 1-encoded) strings. There is no file name, and because of this - * the documents must not contain references to external files (even - * if the file names are given as absolute names). - * - * - ExtID(x,r): The identifier x (either the SYSTEM or the PUBLIC name) of the - * entity to read from is passed to the resolver r as-is. - * The intention of this option is to allow customized - * resolvers to interpret external identifiers without any restriction. - * For example, you can assign the PUBLIC identifiers a meaning (they - * currently do not have any), or you can extend the "namespace" of - * identifiers. - * ExtID is the interface of choice for own extensions to resolvers. - * - * - Entity(m,r): You can implementy every behaviour by using a customized - * entity class. Once the DTD object d is known that will be used during - * parsing, the entity e = m d is determined and used together with the - * resolver r. - * This is only for hackers. - *) - - -type 'ext domspec = - { map : (node_type, 'ext node) Hashtbl.t; - default_element : 'ext node; - } - (* Specifies which node to use as exemplar for which node type. See the - * manual for explanations. - *) - -val default_config : config - (* - The resolver is able to read from files by name - * - Warnings are thrown away - * - Error message will contain line numbers - * - The internal encoding is ISO-8859-1 - * - standalone declaration is checked - *) - -val default_extension : ('a node extension) as 'a - (* A "null" extension; an extension that does not extend the funtionality *) - -val default_dom : ('a node extension as 'a) domspec - (* Specifies that you do not want to use extensions. *) - -val parse_dtd_entity : config -> source -> dtd - (* Parse an entity containing a DTD, and return this DTD. *) - -val parse_document_entity : config -> source -> 'ext domspec -> 'ext document - (* Parse a closed document, i.e. a document beginning with , - * and validate the contents of the document against the DTD contained - * and/or referenced in the document. - *) - -val parse_content_entity : config -> - source -> - dtd -> - 'ext domspec -> - 'ext node - (* Parse a file representing a well-formed fragment of a document. The - * fragment must be a single element (i.e. something like ...; - * not a sequence like ......). The element is validated - * against the passed DTD, but it is not checked whether the element is - * the root element specified in the DTD. - * Note that you can create DTDs that specify not to validate at all - * (invoke method allow_arbitrary on the DTD). - *) - -val parse_wf_entity : config -> source -> 'ext domspec -> 'ext document - (* Parse a closed document (see parse_document_entity), but do not - * validate it. Only checks on well-formedness are performed. - *) - -(*$-*) - - -(* ====================================================================== - * History: - * - * $Log$ - * Revision 1.1 2000/11/17 09:57:30 lpadovan - * Initial revision - * - * Revision 1.1 2000/05/29 23:43:51 gerd - * Initial compatibility revision. - * - * ====================================================================== - * OLD LOGS: - * - * Revision 1.4 2000/05/29 21:14:57 gerd - * Changed the type 'encoding' into a polymorphic variant. - * - * Revision 1.3 2000/05/27 19:24:01 gerd - * New option: recognize_standalone_declaration. - * - * Revision 1.2 2000/05/20 20:31:40 gerd - * Big change: Added support for various encodings of the - * internal representation. - * - * Revision 1.1 2000/05/06 23:21:49 gerd - * Initial revision. - * - * Revision 1.9 2000/04/30 18:23:38 gerd - * New config options 'processing_instructions_inline' and - * 'virtual_root'. - * - * Revision 1.8 2000/03/13 23:46:46 gerd - * Change: The 'resolver' component of the 'config' type has - * disappeared. Instead, there is a new resolver component in the Entity - * and ExtID values of 'source'. I hope that this makes clearer that the - * resolver has only an effect if used together with Entity and ExtID - * sources. - * Change: The Entity value can now return the entity dependent - * on the DTD that is going to be used. - * - * Revision 1.7 2000/02/22 02:32:02 gerd - * Updated. - * - * Revision 1.6 2000/02/22 01:52:45 gerd - * Added documentation. - * - * Revision 1.5 2000/01/20 20:54:43 gerd - * New config.errors_with_line_numbers. - * - * Revision 1.4 1999/09/01 23:09:10 gerd - * New function parse_wf_entity that simulates a well-formedness - * parser. - * - * Revision 1.3 1999/09/01 16:26:36 gerd - * Added an empty line. This is *really* a big change. - * - * Revision 1.2 1999/08/14 22:20:27 gerd - * The "config" slot has now a component "warner"which is - * an object with a "warn" method. This is used to warn about characters - * that cannot be represented in the Latin 1 alphabet. - * Furthermore, there is a new component "debugging_mode". - * - * Revision 1.1 1999/08/10 00:35:52 gerd - * Initial revision. - * - * - *) diff --git a/helm/DEVEL/pxp/pxp/doc/ABOUT-FINDLIB b/helm/DEVEL/pxp/pxp/doc/ABOUT-FINDLIB deleted file mode 100644 index d942e2786..000000000 --- a/helm/DEVEL/pxp/pxp/doc/ABOUT-FINDLIB +++ /dev/null @@ -1,52 +0,0 @@ -****************************************************************************** -ABOUT-FINDLIB - Package manager for O'Caml -****************************************************************************** - - -============================================================================== -Abstract -============================================================================== - -The findlib library provides a scheme to manage reusable software components -(packages), and includes tools that support this scheme. Packages are -collections of OCaml modules for which metainformation can be stored. The -packages are kept in the filesystem hierarchy, but with strict directory -structure. The library contains functions to look the directory up that stores -a package, to query metainformation about a package, and to retrieve dependency -information about multiple packages. There is also a tool that allows the user -to enter queries on the command-line. In order to simplify compilation and -linkage, there are new frontends of the various OCaml compilers that can -directly deal with packages. - -Together with the packages metainformation is stored. This includes a version -string, the archives the package consists of, and additional linker options. -Packages can also be dependent on other packages. There is a query which finds -out all predecessors of a list of packages and sorts them topologically. The -new compiler frontends do this implicitly. - -Metainformation can be conditional, i.e. depend on a set of predicates. This is -mainly used to be able to react on certain properties of the environment, such -as if the bytecode or the native compiler is invoked, if the application is -multi-threaded, and a few more. If the new compiler frontends are used, most -predicates are found out automatically. - -There is special support for scripts. A new directive, "#require", loads -packages into scripts. Of course, this works only with newly created toploops -which include the findlib library. - -============================================================================== -Where to get findlib -============================================================================== - -The manual of findlib is available online [1]. You can download findlib here -[2]. - - --------------------------- - -[1] see http://www.ocaml-programming.de/packages/documentation/findlib/ - -[2] see http://www.ocaml-programming.de/packages/findlib-0.3.1.tar.gz - - - diff --git a/helm/DEVEL/pxp/pxp/doc/ABOUT-FINDLIB.xml b/helm/DEVEL/pxp/pxp/doc/ABOUT-FINDLIB.xml deleted file mode 100644 index d1dc5b04e..000000000 --- a/helm/DEVEL/pxp/pxp/doc/ABOUT-FINDLIB.xml +++ /dev/null @@ -1,61 +0,0 @@ - - -%common; - -findlib"> -Findlib"> - -]> - - - - Abstract -

-The &f; library provides a scheme to manage reusable software -components (packages), and includes tools that support this -scheme. Packages are collections of OCaml modules for which -metainformation can be stored. The packages are kept in the filesystem -hierarchy, but with strict directory structure. The library contains -functions to look the directory up that stores a package, to query -metainformation about a package, and to retrieve dependency -information about multiple packages. There is also a tool that allows -the user to enter queries on the command-line. In order to simplify -compilation and linkage, there are new frontends of the various OCaml -compilers that can directly deal with packages. -

- -

-Together with the packages metainformation is stored. This includes a -version string, the archives the package consists of, and additional -linker options. Packages can also be dependent on other -packages. There is a query which finds out all predecessors of a list -of packages and sorts them topologically. The new compiler frontends -do this implicitly. -

- -

-Metainformation can be conditional, i.e. depend on a set of -predicates. This is mainly used to be able to react on certain -properties of the environment, such as if the bytecode or the native -compiler is invoked, if the application is multi-threaded, and a few -more. If the new compiler frontends are used, most predicates are -found out automatically. -

- -

-There is special support for scripts. A new directive, "#require", -loads packages into scripts. Of course, this works only with newly -created toploops which include the &f; library. -

- -
- - Where to get findlib -

-The manual of &f; is available online. -You can download &f; here. -

-
-
diff --git a/helm/DEVEL/pxp/pxp/doc/EXTENSIONS b/helm/DEVEL/pxp/pxp/doc/EXTENSIONS deleted file mode 100644 index a95683910..000000000 --- a/helm/DEVEL/pxp/pxp/doc/EXTENSIONS +++ /dev/null @@ -1,50 +0,0 @@ -****************************************************************************** -Extensions of the XML specification -****************************************************************************** - - -============================================================================== -This document -============================================================================== - -This parser has some options extending the XML specification. Here, the options -are explained. - -============================================================================== -Optional declarations instead of mandatory declarations -============================================================================== - -The XML spec demands that elements, notations, and attributes must be declared. -However, there are sometimes situations where a different rule would be better: -If there is a declaration, the actual instance of the element type, notation -reference or attribute must match the pattern of the declaration; but if the -declaration is missing, a reasonable default declaration should be assumed. - -I have an example that seems to be typical: The inclusion of HTML into a meta -language. Imagine you have defined some type of "generator" or other tool -working with HTML fragments, and your document contains two types of elements: -The generating elements (with a name like "gen:xxx"), and the object elements -which are HTML. As HTML is still evolving, you do not want to declare the HTML -elements; the HTML fragments should be treated as well-formed XML fragments. In -contrast to this, the elements of the generator should be declared and -validated because you can more easily detect errors. - -The following two processing instructions can be included into the DTD: - -- - - - References to unknown element types and notations no longer cause an error. - The element may contain everything, but it must be still well-formed. It may - have arbitrary attributes, and every attribute is treated as an #IMPLIED - CDATA attribute. - -- - - - References to unknown attributes inside one of the enumerated elements no - longer cause an error. Such an attribute is treated as an #IMPLIED CDATA - attribute. - If there are several "optional-attribute-declarations" PIs, they are all - interpreted (implicitly merged). - diff --git a/helm/DEVEL/pxp/pxp/doc/EXTENSIONS.xml b/helm/DEVEL/pxp/pxp/doc/EXTENSIONS.xml deleted file mode 100644 index e64d06152..000000000 --- a/helm/DEVEL/pxp/pxp/doc/EXTENSIONS.xml +++ /dev/null @@ -1,62 +0,0 @@ - - -%common; - - -up'> - - -%config; - -]> - - - - - This document -

This parser has some options extending the XML specification. Here, the -options are explained. -

-
- - - Optional declarations instead of mandatory declarations - -

The XML spec demands that elements, notations, and attributes must be -declared. However, there are sometimes situations where a different rule would -be better: If there is a declaration, the actual instance of the -element type, notation reference or attribute must match the pattern of the -declaration; but if the declaration is missing, a reasonable default declaration -should be assumed.

- -

I have an example that seems to be typical: The inclusion of HTML into a -meta language. Imagine you have defined some type of "generator" or other tool -working with HTML fragments, and your document contains two types of elements: -The generating elements (with a name like "gen:xxx"), and the object elements -which are HTML. As HTML is still evolving, you do not want to declare the HTML -elements; the HTML fragments should be treated as well-formed XML fragments. In -contrast to this, the elements of the generator should be declared and -validated because you can more easily detect errors.

- -

The following two processing instructions can be included into the DTD:

-
    -
  • ]]> - References to unknown element types and notations no longer cause an - error. The element may contain everything, but it must be still - well-formed. It may have arbitrary attributes, and every attribute is - treated as an #IMPLIED CDATA attribute.

    -
  • -
  • ]]> - References to unknown attributes inside one of the enumerated elements - no longer cause an error. Such an attribute is treated as an #IMPLIED - CDATA attribute. -

    - -

    If there are several "optional-attribute-declarations" PIs, they are all -interpreted (implicitly merged).

    -
  • -
-
-
diff --git a/helm/DEVEL/pxp/pxp/doc/INSTALL b/helm/DEVEL/pxp/pxp/doc/INSTALL deleted file mode 100644 index 9a49a2217..000000000 --- a/helm/DEVEL/pxp/pxp/doc/INSTALL +++ /dev/null @@ -1,154 +0,0 @@ -****************************************************************************** -INSTALL - PXP, the XML parser for O'Caml -****************************************************************************** - - -============================================================================== -The "pxp" package -============================================================================== - ------------------------------------------------------------------------------- -Prerequisites ------------------------------------------------------------------------------- - -PXP requires that the netstring package [1] is already installed. PXP works -only with O'Caml 3.00 (the support for 2.04 has been dropped). The installation -procedure defined in the Makefile requires findlib [2] to work [3]. - ------------------------------------------------------------------------------- -Configuration ------------------------------------------------------------------------------- - -It is not necessary to configure PXP; but you can switch off the UTF-8 support -by setting the variable - -UTF8_SUPPORT = no - -in Makefile.conf. In this case, the UTF-8 modules are not even compiled. - By -default, the UTF-8 support is enabled. - -Note: Compiling the UTF-8 modules lasts 10 minutes on my 400 Mhz Pentium II; if -this is too long, you can set UTF8_SUPPORT to "no". - ------------------------------------------------------------------------------- -Compilation ------------------------------------------------------------------------------- - -The Makefile defines the following goals: - -- make all - compiles with the bytecode compiler and creates the files pxp_types.cma, - pxp_lex_iso88591.cma, pxp_lex_utf8.cma (*), pxp_engine.cma, and pxp_utf8.cmo - (*). The (*) files are not built if the UTF-8 support is switched off. - -- make opt - compiles with the native compiler and creates the files pxp_types.cmxa, - pxp_lex_iso88591.cmxa, pxp_lex_utf8.cmxa (*), pxp_engine.cmxa, and - pxp_utf8.cmx (*). The (*) files are not built if the UTF-8 support is - switched off. - ------------------------------------------------------------------------------- -Installation ------------------------------------------------------------------------------- - -The Makefile defines the following goals: - -- make install - installs the bytecode archives, the interface definitions, and if present, - the native archives in the default location of findlib as package "pxp" - -- make uninstall - removes the package "pxp" - -- make markup-install - installs the Markup compatibility API as package "markup" - -- make markup-uninstall - removes the package "markup" - ------------------------------------------------------------------------------- -Usage with the help of "findlib" ------------------------------------------------------------------------------- - -You can refer to the parser as the findlib package "pxp": - -ocamlfind ocamlc -package pxp ... - -By default, the UTF-8 support modules will be linked in. If you do not need -them, you may define the predicate "pxp_without_utf8", which causes that the -UTF-8 relevant parts are not linked with your program; the difference in size -is about 1 MB: - -ocamlfind ocamlc -package pxp -predicates pxp_without_utf8 ... - -Note that you can also reduce the size of the resulting executable by -specifying Netstring-related predicates (e.g. netstring_only_iso); see the -documentation of Netstring. - ------------------------------------------------------------------------------- -Linking with the archives directly ------------------------------------------------------------------------------- - -If you need UTF-8 support, you must link your program as follows: - -ocamlc ... pxp_types.cma pxp_lex_iso88591.cma pxp_lex_utf8.cma - pxp_engine.cma pxp_utf8.cmo ... - -If you do not need UTF-8, the following suffices: - -ocamlc ... pxp_types.cma pxp_lex_iso88591.cma pxp_engine.cma ... - - - -============================================================================== -The examples -============================================================================== - -In the "examples" directory you find several applications of PXP. They require -that PXP has been installed using findlib. See the Makefiles in the directories -for descriptions of "make" goals. - -============================================================================== -Trouble shooting -============================================================================== - ------------------------------------------------------------------------------- -Solaris ------------------------------------------------------------------------------- - -The "make" utility of Solaris does not work properly enough; there is a bug in -it that prevents the so-called suffix rules from being recognized. There are -two solutions: - -- Install GNU make and use it instead of Solaris make. This is the recommended - way to solve the problem, as GNU make can process almost every Makefile from - open source projects, and you will never have problems with building - software again. - -- Add the following lines to Makefile.code: - - %.cmx: %.ml - $(OCAMLOPT) -c $< - - %.cmo: %.ml - $(OCAMLC) -c $< - - %.cmi: %.mli - $(OCAMLC) -c $< - - %.ml: %.mll - ocamllex $< - - - - --------------------------- - -[1] see http://www.ocaml-programming.de/packages/documentation/netstring - -[2] see http://www.ocaml-programming.de/packages/documentation/findlib/ - -[3] Findlib is a package manager, see the file ABOUT-FINDLIB. - - - diff --git a/helm/DEVEL/pxp/pxp/doc/INSTALL.xml b/helm/DEVEL/pxp/pxp/doc/INSTALL.xml deleted file mode 100644 index ac7832dbb..000000000 --- a/helm/DEVEL/pxp/pxp/doc/INSTALL.xml +++ /dev/null @@ -1,171 +0,0 @@ - - -%common; - -PXP"> - -]> - - - The "pxp" package - Prerequisites -

-&m; requires that the netstring package - is already installed. &m; works -only with O'Caml 3.00 (the support for 2.04 has been dropped). -The installation -procedure defined in the Makefile requires findlib to workFindlib is a -package manager, see the file ABOUT-FINDLIB.. -

-
- - Configuration -

-It is not necessary to configure PXP; but you can switch off the UTF-8 -support by setting the variable - - -UTF8_SUPPORT = no - - -in Makefile.conf. In this case, the UTF-8 modules are not even compiled. -- By default, the UTF-8 support is enabled. -

- -

-Note: Compiling the UTF-8 modules lasts 10 minutes on my 400 Mhz Pentium II; -if this is too long, you can set UTF8_SUPPORT to "no".

-
- - Compilation -

-The Makefile defines the following goals: -

-
    -
  • -

    make all

    -

    compiles with the bytecode compiler and creates the files -pxp_types.cma, pxp_lex_iso88591.cma, pxp_lex_utf8.cma (*), pxp_engine.cma, -and pxp_utf8.cmo (*). The (*) files are not built if the UTF-8 support -is switched off.

    -
  • -
  • -

    make opt

    -

    compiles with the native compiler and creates the files -pxp_types.cmxa, pxp_lex_iso88591.cmxa, pxp_lex_utf8.cmxa (*), pxp_engine.cmxa, -and pxp_utf8.cmx (*). The (*) files are not built if the UTF-8 support -is switched off.

    -
  • -
-
- - Installation -

-The Makefile defines the following goals:

-
    -
  • -

    make install

    -

    installs the bytecode archives, the interface definitions, and if -present, the native archives in the default location of findlib as -package "pxp" -

    -
  • -
  • -

    make uninstall

    -

    removes the package "pxp"

    -
  • -
  • -

    make markup-install

    -

    installs the Markup compatibility API as package "markup"

    -
  • -
  • -

    make markup-uninstall

    -

    removes the package "markup"

    -
  • -
-
- - - Usage with the help of "findlib" -

You can refer to the parser as the findlib package "pxp": - - -ocamlfind ocamlc -package pxp ... - - -By default, the UTF-8 support modules will be linked in. If you do not need -them, you may define the predicate "pxp_without_utf8", which causes that the -UTF-8 relevant parts are not linked with your program; the difference in size -is about 1 MB: - - -ocamlfind ocamlc -package pxp -predicates pxp_without_utf8 ... - - -Note that you can also reduce the size of the resulting executable by -specifying Netstring-related predicates (e.g. netstring_only_iso); see the -documentation of Netstring. -

-
- - - Linking with the archives directly -

If you need UTF-8 support, you must link your program as follows: - - -ocamlc ... pxp_types.cma pxp_lex_iso88591.cma pxp_lex_utf8.cma - pxp_engine.cma pxp_utf8.cmo ... - - -If you do not need UTF-8, the following suffices: - - -ocamlc ... pxp_types.cma pxp_lex_iso88591.cma pxp_engine.cma ... - - -

-
- -
- - The examples -

-In the "examples" directory you find several applications of &m;. They require -that &m; has been installed using findlib. See the Makefiles in the -directories for descriptions of "make" goals. -

-
- - Trouble shooting - Solaris -

-The "make" utility of Solaris does not work properly enough; there is a bug -in it that prevents the so-called suffix rules from being recognized. There -are two solutions:

-
    -
  • Install GNU make and use it instead of Solaris make. This is -the recommended way to solve the problem, as GNU make can process almost -every Makefile from open source projects, and you will never have problems -with building software again.

  • -
  • Add the following lines to Makefile.code: - -%.cmx: %.ml - $(OCAMLOPT) -c $< - -%.cmo: %.ml - $(OCAMLC) -c $< - -%.cmi: %.mli - $(OCAMLC) -c $< - -%.ml: %.mll - ocamllex $< - -

  • -
-
-
-
\ No newline at end of file diff --git a/helm/DEVEL/pxp/pxp/doc/Makefile b/helm/DEVEL/pxp/pxp/doc/Makefile deleted file mode 100644 index 0ed12741c..000000000 --- a/helm/DEVEL/pxp/pxp/doc/Makefile +++ /dev/null @@ -1,43 +0,0 @@ -.PHONY: all -all: README INSTALL ABOUT-FINDLIB SPEC PRERELEASE EXTENSIONS - -README: README.xml common.xml config.xml - readme -text README.xml >README - -INSTALL: INSTALL.xml common.xml config.xml - readme -text INSTALL.xml >INSTALL - -ABOUT-FINDLIB: ABOUT-FINDLIB.xml common.xml config.xml - readme -text ABOUT-FINDLIB.xml >ABOUT-FINDLIB - -SPEC: SPEC.xml common.xml config.xml - readme -text SPEC.xml >SPEC - -EXTENSIONS: EXTENSIONS.xml common.xml config.xml - readme -text EXTENSIONS.xml >EXTENSIONS - -PRERELEASE: PRERELEASE.xml common.xml config.xml - readme -text PRERELEASE.xml >PRERELEASE - -config.xml: - touch config.xml - -common.xml: - ln -s dist-common.xml common.xml - -.PHONY: clean -clean: - -.PHONY: CLEAN -CLEAN: clean - $(MAKE) -C manual CLEAN - -.PHONY: distclean -distclean: clean - rm -f *~ - $(MAKE) -C manual distclean - -.PHONY: symlinks -symlinks: - ln -s ../examples/readme/readme.dtd . - diff --git a/helm/DEVEL/pxp/pxp/doc/PRERELEASE b/helm/DEVEL/pxp/pxp/doc/PRERELEASE deleted file mode 100644 index bc46cd059..000000000 --- a/helm/DEVEL/pxp/pxp/doc/PRERELEASE +++ /dev/null @@ -1,103 +0,0 @@ -****************************************************************************** -README - PXP, the XML parser for O'Caml -****************************************************************************** - - -============================================================================== -Pre-release of PXP, the XML parser for O'Caml -============================================================================== - -PXP is the new, completely revised and partly rewritten validating XML parser -for O'Caml; the old name, "Markup", has been dropped. The current version of -PXP is still a bit experimental because it is not fully tested; however, it is -now stable enough to be used in experimental applications. - -PXP will retain most parts of Markup's API; the name PXP emphasizes the -strengths of the API: it is the Polymorphic XML Parser. The document objects -representing the parsed file have an interesting polymorphism which allows that -the user of the parser can control which kind of objects are actually created. -The current API supports the element type as criterion for object/class -selection; future APIs will extend this concept such that arbitrary criterions -are possible (e.g. you may want to have different classes for different -namespaces). - -The current development goals of PXP are: - -- Full XML-1.0 conformance: The current pre-release is now very close to - strict XML-1.0 conformance. The only bigger difference to the standard is - that PXP sometimes accepts DTDs as legal while the standard forbids them - (non-deterministic content models). - One of the more important improvements since 0.2.10 is the possibility to - represent XML documents internally as UTF-8 strings, not only as ISO-8859-1 - strings. Thanks to Claudio Sacerdoti Coen who contributed a special lexer - preprocessor hiding the details of the UTF-8 encoding in the lexer - definitions. - -- Correctness of validation: The well-formedness and valididity constraints - must be implemented as correct as possible. The last stable release had - already a regression test covering many aspects of XML. The test suite will - be extended. - -- Parsing performance: It should be possible to process large amounts of data - in a reasoable period of time. The last stable release had many stages of - processing that wasted time. - The current pre-release is already 30 per cent faster than 0.2.10. - -- Simplicity of usage: Unlike parsers basing on imperative languages and DOM, - the usage of PXP should be simple, even for complex tasks. The current - parser API has already many advantages over DOM; especially it is well - integrated into the functional and object-oriented language O'Caml. You do - not have to deal with artificial representations like "node lists" while the - programming environment already provides good support for list structures. - The fact that O'Caml allows a functional programming style is interesting - for programs transforming XML trees. - -============================================================================== -Download the PXP pre-release -============================================================================== - -The current pre-release is available under -http://www.ocaml-programming.de/packages/pxp-pre-0.99.8.tar.gz [1]. There is -currently no documentation for this version of the software; it is recommended -to use the Markup manual [2] and compare it with the current module interfaces. - -Please note that this is work in progress; it may still contain bugs and -irregularities. - -The parser works only with OCaml-3. The parser needs the netstring package [3], -at least version 0.9.1. - -I am very interested in your opinion to PXP; please contact me [4]. - -============================================================================== -Author, Credits, Copying -============================================================================== - -PXP has been written by Gerd Stolpmann [5]; it contains contributions by -Claudio Sacerdoti Coen. You may copy it as you like, you may use it even for -commercial purposes as long as the license conditions are respected, see the -file LICENSE coming with the distribution. It allows almost everything. - -============================================================================== -Where to find the stable release -============================================================================== - -Here. [6] - - --------------------------- - -[1] see http://www.ocaml-programming.de/packages/pxp-pre-0.99.8.tar.gz - -[2] see http://www.ocaml-programming.de/packages/documentation/markup/manual - -[3] see http://www.ocaml-programming.de/packages/documentation/netstring - -[4] see mailto:gerd@gerd-stolpmann.de - -[5] see mailto:gerd@gerd-stolpmann.de - -[6] see http://www.ocaml-programming.de/packages/documentation/markup - - - diff --git a/helm/DEVEL/pxp/pxp/doc/PRERELEASE.xml b/helm/DEVEL/pxp/pxp/doc/PRERELEASE.xml deleted file mode 100644 index f155abd96..000000000 --- a/helm/DEVEL/pxp/pxp/doc/PRERELEASE.xml +++ /dev/null @@ -1,116 +0,0 @@ - - -%common; - - -up'> - - -%config; - -]> - - - - Pre-release of PXP, the XML parser for O'Caml - -

PXP is the new, completely revised and partly rewritten -validating XML parser -for O'Caml; the old name, "Markup", has been dropped. The current version -of PXP is still a bit experimental because it is not fully tested; however, -it is now stable enough to be used in experimental applications. -

- -

PXP will retain most parts of Markup's API; the name PXP -emphasizes the strengths of the API: it is the Polymorphic XML Parser. -The document objects representing the parsed file have an interesting -polymorphism which allows that the user of the parser can control -which kind of objects are actually created. The current API supports -the element type as criterion for object/class selection; future APIs will -extend this concept such that arbitrary criterions are possible -(e.g. you may want to have different classes for different namespaces). -

- -

The current development goals of PXP are:

- -
    -
  • Full XML-1.0 conformance: The current pre-release -is now very close to strict XML-1.0 conformance. The only bigger -difference to the standard is that PXP sometimes accepts DTDs as legal -while the standard forbids them (non-deterministic content models).

    - -

    One of the more important improvements since 0.2.10 is the possibility to -represent XML documents internally as UTF-8 strings, not only as ISO-8859-1 -strings. Thanks to Claudio Sacerdoti Coen who contributed a special lexer -preprocessor hiding the details of the UTF-8 encoding in the lexer definitions. -

    -
  • - -
  • Correctness of validation: The well-formedness -and valididity constraints must be implemented as correct as possible. -The last stable release had already a regression test covering many -aspects of XML. The test suite will be extended.

    -
  • - -
  • Parsing performance: It should be possible to -process large amounts of data in a reasoable period of time. The last -stable release had many stages of processing that wasted time.

    - -

    The current pre-release is already 30 per cent faster than -0.2.10.

    -
  • - -
  • Simplicity of usage: Unlike parsers basing on -imperative languages and DOM, the usage of PXP should be simple, even -for complex tasks. The current parser API has already many advantages -over DOM; especially it is well integrated into the functional and -object-oriented language O'Caml. You do not have to deal with -artificial representations like "node lists" while the programming -environment already provides good support for list structures. The -fact that O'Caml allows a functional programming style is interesting -for programs transforming XML trees.

    -
  • -
-
- - - Download the PXP pre-release - -

The current pre-release is available under - -&url.gps-ocaml-download;/pxp-pre-0.99.8.tar.gz. There is currently no -documentation for this version of the software; it is recommended to use the Markup manual and compare it with the current -module interfaces.

- -

Please note that this is work in progress; it may still contain bugs -and irregularities.

- -

The parser works only with OCaml-3. The parser needs the netstring package, at least version 0.9.1. -

- -

I am very interested in your opinion to PXP; please contact me.

-
- - - Author, Credits, Copying -

-PXP has been written by &person.gps;; it contains contributions by -Claudio Sacerdoti Coen. You may copy it as you like, -you may use it even for commercial purposes as long as the license conditions -are respected, see the file LICENSE coming with the distribution. It allows -almost everything. -

-
- - - Where to find the stable release -

Here.

-
- -
- diff --git a/helm/DEVEL/pxp/pxp/doc/README b/helm/DEVEL/pxp/pxp/doc/README deleted file mode 100644 index b7ad5de59..000000000 --- a/helm/DEVEL/pxp/pxp/doc/README +++ /dev/null @@ -1,247 +0,0 @@ -****************************************************************************** -README - PXP, the XML parser for O'Caml -****************************************************************************** - - -============================================================================== -Abstract -============================================================================== - -PXP is a validating parser for XML-1.0 which has been written entirely in -Objective Caml. - -PXP is the new name of the parser formerly known as "Markup". PXP means -"Polymorphic XML parser" and emphasizes its most useful property: that the API -is polymorphic and can be configured such that different objects are used to -store different types of elements. - -============================================================================== -Download -============================================================================== - -You can download PXP as gzip'ed tarball [1]. The parser needs the Netstring [2] -package (0.9.3). Note that PXP requires O'Caml 3.00. - -============================================================================== -User's Manual -============================================================================== - -The manual is included in the distribution both as Postscript document and -bunch of HTML files. An online version can be found here [3]. - -============================================================================== -Author, Credits, Copying -============================================================================== - -PXP has been written by Gerd Stolpmann [4]; it contains contributions by -Claudio Sacerdoti Coen. You may copy it as you like, you may use it even for -commercial purposes as long as the license conditions are respected, see the -file LICENSE coming with the distribution. It allows almost everything. - -Thanks also to Alain Frisch and Haruo Hosoya for discussions and bug reports. - -============================================================================== -Description -============================================================================== - -PXP is a validating XML parser for O'Caml [5]. It strictly complies to the -XML-1.0 [6] standard. - -The parser is simple to call, usually only one statement (function call) is -sufficient to parse an XML document and to represent it as object tree. - -Once the document is parsed, it can be accessed using a class interface. The -interface allows arbitrary access including transformations. One of the -features of the document representation is its polymorphic nature; it is simple -to add custom methods to the document classes. Furthermore, the parser can be -configured such that different XML elements are represented by objects created -from different classes. This is a very powerful feature, because it simplifies -the structure of programs processing XML documents. - -Note that the class interface does not comply to the DOM standard. It was not a -development goal to realize a standard API (industrial developers can this much -better than I); however, the API is powerful enough to be considered as -equivalent with DOM. More important, the interface is compatible with the XML -information model required by many XML-related standards. - ------------------------------------------------------------------------------- -Detailed feature list ------------------------------------------------------------------------------- - -- The XML instance is validated against the DTD; any violation of a validation - constraint leads to the rejection of the instance. The validator has been - carefully implemented, and conforms strictly to the standard. If needed, it - is also possible to run the parser in a well-formedness mode. - -- If possible, the validator applies a deterministic finite automaton to - validate the content models. This ensures that validation can always be - performed in linear time. However, in the case that the content models are - not deterministic, the parser uses a backtracking algorithm which can be - much slower. - It is also possible to reject non-deterministic content - models. - -- In particular, the validator also checks the complicated rules whether - parentheses are properly nested with respect to entities, and whether the - standalone declaration is satisfied. On demand, it is checked whether the - IDREF attributes only refer to existing nodes. - -- Entity references are automatically resolved while the XML text is being - scanned. It is not possible to recognize in the object tree where a - referenced entity begins or ends; the object tree only represents the - logical structure. - -- External entities are loaded using a configurable resolver infrastructure. - It is possible to connect the parser with an arbitrary XML source. - -- The parser can read XML text encoded in a variety of character sets. - Independent of this, it is possible to choose the encoding of the internal - representation of the tree nodes; the parser automatically converts the - input text to this encoding. Currently, the parser supports UTF-8 and - ISO-8859-1 as internal encodings. - -- The interface of the parser has been designed such that it is best - integrated into the language O'Caml. The first goal was simplicity of usage - which is achieved by many convenience methods and functions, and by allowing - the user to select which parts of the XML text are actually represented in - the tree. For example, it is possible to store processing instructions as - tree nodes, but the parser can also be configured such that these - instructions are put into hashtables. The information model is compatible - with the requirements of XML-related standards such as XPath. - -- In particular, the node tree can optionally contain or leave out processing - instructions and comments. It is also possible to generate a "super root" - object which is the parent of the root element. The attributes of elements - are normally not stored as nodes, but it is possible to get them wrapped - into nodes. - -- There is also an interface for DTDs; you can parse and access sequences of - declarations. The declarations are fully represented as recursive O'Caml - values. - ------------------------------------------------------------------------------- -Code examples ------------------------------------------------------------------------------- - -This distribution contains several examples: - -- validate: simply parses a document and prints all error messages - -- readme: Defines a DTD for simple "README"-like documents, and offers - conversion to HTML and text files [7]. - -- xmlforms: This is already a sophisticated application that uses XML as style - sheet language and data storage format. It shows how a Tk user interface can - be configured by an XML style, and how data records can be stored using XML. - ------------------------------------------------------------------------------- -Restrictions and missing features ------------------------------------------------------------------------------- - -The following restrictions apply that are not violations of the standard: - -- The attributes "xml:space", and "xml:lang" are not supported specially. (The - application can do this.) - -- The built-in support for SYSTEM and PUBLIC identifiers is limited to local - file access. There is no support for catalogs. The parser offers a hook to - add missing features. - -- It is currently not possible to check for interoperatibility with SGML. - -The following features are also missing: - -- There is no special support for namespaces. (Perhaps in the next release?) - -- There is no support for XPATH or XSLT. - -However, I hope that these features will be implemented soon, either by myself -or by contributors (who are invited to do so). - ------------------------------------------------------------------------------- -Recent Changes ------------------------------------------------------------------------------- - -- Changed in 1.0: - Support for document order. - -- Changed in 0.99.8: - Several fixes of bugs reported by Haruo Hosoya and Alain Frisch. - The class type "node" has been extended: you can go directly to the next and - previous nodes in the list; you can refer to nodes by position. - There are now some iterators for nodes: find, find_all, find_element, - find_all_elements, map_tree, iter_tree. - Experimental support for viewing attributes as nodes; I hope that helps - Alain writing his XPath evaluator. - The user's manual has been revised and is almost up to date. - -- Changed in 0.99.7: - There are now additional node types T_super_root, T_pinstr and T_comment, - and the parser is able to create the corresponding nodes. - The functions for character set conversion have been moved to the Netstring - package; they are not specific for XML. - -- Changed in 0.99.6: - Implemented a check on deterministic content models. Added an alternate - validator basing on a DFA. - This means that now all mandatory features for - an XML-1.0 parser are implemented! The parser is now substantially complete. - -- Changed in 0.99.5: - The handling of ID and IDREF attributes has changed. The index of nodes - containing an ID attribute is now separated from the document. Optionally - the parser now checks whether the IDREF attributes refer to existing - elements. - The element nodes can optionally store the location in the source XML code. - The method 'write' writes the XML tree in every supported encoding. - (Successor of 'write_compact_as_latin1'.) - Several smaller changes and fixes. - -- Changed in 0.99.4: - The module Pxp_reader has been modernized. The resolver classes are simpler - to use. There is now support for URLs. - The interface of Pxp_yacc has been improved: The type 'source' is now - simpler. The type 'domspec' has gone; the new 'spec' is opaque and performs - better. There are some new parsing modes. - Many smaller changes. - -- Changed in 0.99.3: - The markup_* modules have been renamed to pxp_*. There is a new - compatibility API that tries to be compatible with markup-0.2.10. - The type "encoding" is now a polymorphic variant. - -- Changed in 0.99.2: - Added checks for the constraints about the standalone declaration. - Added regression tests about attribute normalization, attribute checks, - standalone checks. - Fixed some minor errors of the attribute normalization function. - The bytecode/native archives are now separated in a general part, in a - ISO-8859-1-relevant part, and a UTF-8-relevant part. The parser can again be - compiled with ocamlopt. - -- Changed in 0.99.1: - In general, this release is an early pre-release of the next stable version - 1.00. I do not recommend to use it for serious work; it is still very - experimental! - The core of the parser has been rewritten using a self-written parser - generator. - The lexer has been restructured, and can now handle UTF-8 encoded files. - Numerous other changes. - - --------------------------- - -[1] see http://www.ocaml-programming.de/packages/pxp-1.0.tar.gz - -[2] see http://www.ocaml-programming.de/packages/documentation/netstring - -[3] see http://www.ocaml-programming.de/packages/documentation/pxp/manual - -[4] see mailto:gerd@gerd-stolpmann.de - -[5] see http://caml.inria.fr/ - -[6] see http://www.w3.org/TR/1998/REC-xml-19980210.html - -[7] This particular document is an example of this DTD! - - - diff --git a/helm/DEVEL/pxp/pxp/doc/README.xml b/helm/DEVEL/pxp/pxp/doc/README.xml deleted file mode 100644 index 34c7726ad..000000000 --- a/helm/DEVEL/pxp/pxp/doc/README.xml +++ /dev/null @@ -1,423 +0,0 @@ - - - - - - -Gerd Stolpmann'> ---> - - -%common; - - -up'> - - -%config; - -]> - - - - Abstract -

-PXP is a validating parser for XML-1.0 which has been written -entirely in Objective Caml. -

- -

PXP is the new name of the parser formerly known as "Markup". -PXP means "Polymorphic XML parser" and emphasizes its most useful -property: that the API is polymorphic and can be configured such that -different objects are used to store different types of elements.

-
- - - Download -

-You can download PXP as gzip'ed tarball. The parser needs the Netstring package (0.9.3). Note that PXP -requires O'Caml 3.00. -

-
- - - User's Manual -

-The manual is included in the distribution both as Postscript document and -bunch of HTML files. An online version can be found here. -

-
- - - Author, Credits, Copying -

-PXP has been written by &person.gps;; it contains contributions by -Claudio Sacerdoti Coen. You may copy it as you like, -you may use it even for commercial purposes as long as the license conditions -are respected, see the file LICENSE coming with the distribution. It allows -almost everything. -

- -

Thanks also to Alain Frisch and Haruo Hosoya for discussions and bug -reports.

-
- - - Description -

-PXP is a validating XML parser for O'Caml. It strictly complies to the -XML-1.0 standard. -

- -

The parser is simple to call, usually only one statement (function -call) is sufficient to parse an XML document and to represent it as object -tree.

- -

-Once the document is parsed, it can be accessed using a class interface. -The interface allows arbitrary access including transformations. One of -the features of the document representation is its polymorphic nature; -it is simple to add custom methods to the document classes. Furthermore, -the parser can be configured such that different XML elements are represented -by objects created from different classes. This is a very powerful feature, -because it simplifies the structure of programs processing XML documents. -

- -

-Note that the class interface does not comply to the DOM standard. It was not a -development goal to realize a standard API (industrial developers can this much -better than I); however, the API is powerful enough to be considered as -equivalent with DOM. More important, the interface is compatible with the -XML information model required by many XML-related standards. -

- - - Detailed feature list - -
    -
  • The XML instance is validated against the DTD; any violation of -a validation constraint leads to the rejection of the instance. The validator -has been carefully implemented, and conforms strictly to the standard. If -needed, it is also possible to run the parser in a well-formedness mode.

    -
  • -
  • If possible, the validator applies a deterministic finite -automaton to validate the content models. This ensures that validation can -always be performed in linear time. However, in the case that the content -models are not deterministic, the parser uses a backtracking algorithm which -can be much slower. - It is also possible to reject non-deterministic content -models.

    -
  • -
  • In particular, the validator also checks the complicated rules -whether parentheses are properly nested with respect to entities, and whether -the standalone declaration is satisfied. On demand, it is checked whether the -IDREF attributes only refer to existing nodes.

    -
  • -
  • Entity references are automatically resolved while the XML text -is being scanned. It is not possible to recognize in the object tree where a -referenced entity begins or ends; the object tree only represents the logical structure.

    -
  • -
  • External entities are loaded using a configurable resolver -infrastructure. It is possible to connect the parser with an arbitrary XML source.

    -
  • -
  • The parser can read XML text encoded in a variety of character -sets. Independent of this, it is possible to choose the encoding of the -internal representation of the tree nodes; the parser automatically converts -the input text to this encoding. Currently, the parser supports UTF-8 and -ISO-8859-1 as internal encodings.

    -
  • -
  • The interface of the parser has been designed such that it is -best integrated into the language O'Caml. The first goal was simplicity of -usage which is achieved by many convenience methods and functions, and by -allowing the user to select which parts of the XML text are actually -represented in the tree. For example, it is possible to store processing -instructions as tree nodes, but the parser can also be configured such that -these instructions are put into hashtables. The information model is compatible -with the requirements of XML-related standards such as XPath.

    -
  • -
  • In particular, the node tree can optionally contain or leave out -processing instructions and comments. It is also possible to generate a "super -root" object which is the parent of the root element. The attributes of -elements are normally not stored as nodes, but it is possible to get them -wrapped into nodes.

    -
  • -
  • There is also an interface for DTDs; you can parse and access -sequences of declarations. The declarations are fully represented as recursive -O'Caml values. -

    -
  • -
-
- - - - Code examples -

-This distribution contains several examples:

-
    -
  • -validate: simply parses a -document and prints all error messages -

  • - -
  • -readme: Defines a DTD for simple "README"-like documents, and offers -conversion to HTML and text filesThis particular document is an -example of this DTD!. -

  • - -
  • -xmlforms: This is already a -sophisticated application that uses XML as style sheet language and data -storage format. It shows how a Tk user interface can be configured by an -XML style, and how data records can be stored using XML. -

  • -
-
- - - Restrictions and missing features -

-The following restrictions apply that are not violations of the standard: -

-
    -
  • -The attributes "xml:space", and "xml:lang" are not supported specially. - (The application can do this.)

  • - -
  • -The built-in support for SYSTEM and PUBLIC identifiers is limited to - local file access. There is no support for catalogs. The parser offers - a hook to add missing features.

  • - -
  • -It is currently not possible to check for interoperatibility with SGML. -

  • -
- -

The following features are also missing:

-
    -
  • There is no special support for namespaces. (Perhaps in the next release?)

    -
  • -
  • There is no support for XPATH or XSLT.

    -
  • -
-

However, I hope that these features will be implemented soon, either by -myself or by contributors (who are invited to do so).

-
- - - Recent Changes -
    -
  • -

    Changed in 1.0:

    -

    Support for document order.

    -
  • -
  • -

    Changed in 0.99.8:

    -

    Several fixes of bugs reported by Haruo Hosoya and Alain -Frisch.

    -

    The class type "node" has been extended: you can go directly to -the next and previous nodes in the list; you can refer to nodes by -position.

    -

    There are now some iterators for nodes: find, find_all, -find_element, find_all_elements, map_tree, iter_tree.

    -

    Experimental support for viewing attributes as nodes; I hope that -helps Alain writing his XPath evaluator.

    -

    The user's manual has been revised and is almost up to date.

    -
  • -
  • -

    Changed in 0.99.7:

    -

    There are now additional node types T_super_root, T_pinstr and -T_comment, and the parser is able to create the corresponding nodes.

    -

    The functions for character set conversion have been moved to -the Netstring package; they are not specific for XML.

    -
  • -
  • -

    Changed in 0.99.6:

    -

    Implemented a check on deterministic content models. Added -an alternate validator basing on a DFA. - This means that now all mandatory -features for an XML-1.0 parser are implemented! The parser is now substantially -complete.

    -
  • -
  • -

    Changed in 0.99.5:

    -

    The handling of ID and IDREF attributes has changed. The -index of nodes containing an ID attribute is now separated from the document. -Optionally the parser now checks whether the IDREF attributes refer to -existing elements.

    -

    The element nodes can optionally store the location in the -source XML code.

    -

    The method 'write' writes the XML tree in every supported -encoding. (Successor of 'write_compact_as_latin1'.)

    -

    Several smaller changes and fixes.

    -
  • -
  • -

    Changed in 0.99.4:

    -

    The module Pxp_reader has been modernized. The resolver classes -are simpler to use. There is now support for URLs.

    -

    The interface of Pxp_yacc has been improved: The type 'source' -is now simpler. The type 'domspec' has gone; the new 'spec' is opaque and -performs better. There are some new parsing modes.

    -

    Many smaller changes.

    -
  • -
  • -

    Changed in 0.99.3:

    -

    The markup_* modules have been renamed to pxp_*. There is a new -compatibility API that tries to be compatible with markup-0.2.10.

    -

    The type "encoding" is now a polymorphic variant.

    -
  • -
  • -

    Changed in 0.99.2:

    -

    Added checks for the constraints about the standalone -declaration.

    -

    Added regression tests about attribute normalization, -attribute checks, standalone checks.

    -

    Fixed some minor errors of the attribute normalization -function.

    -

    The bytecode/native archives are now separated in -a general part, in a ISO-8859-1-relevant part, and a UTF-8-relevant -part. The parser can again be compiled with ocamlopt.

    -
  • -
  • -

    Changed in 0.99.1:

    -

    In general, this release is an early pre-release of the -next stable version 1.00. I do not recommend to use it for serious -work; it is still very experimental!

    -

    The core of the parser has been rewritten using a self-written -parser generator.

    -

    The lexer has been restructured, and can now handle UTF-8 -encoded files.

    -

    Numerous other changes.

    -
  • - - -
-
-
-
- diff --git a/helm/DEVEL/pxp/pxp/doc/SPEC b/helm/DEVEL/pxp/pxp/doc/SPEC deleted file mode 100644 index 28e6914ce..000000000 --- a/helm/DEVEL/pxp/pxp/doc/SPEC +++ /dev/null @@ -1,185 +0,0 @@ -****************************************************************************** -Notes on the XML specification -****************************************************************************** - - -============================================================================== -This document -============================================================================== - -There are some points in the XML specification which are ambiguous. The -following notes discuss these points, and describe how this parser behaves. - -============================================================================== -Conditional sections and the token ]]> -============================================================================== - -It is unclear what happens if an ignored section contains the token ]]> at -places where it is normally allowed, i.e. within string literals and comments, -e.g. - - --> ]]> - -On the one hand, the production rule of the XML grammar does not treat such -tokens specially. Following the grammar, already the first ]]> ends the -conditional section - - - -and the other tokens are included into the DTD. - -On the other hand, we can read: "Like the internal and external DTD subsets, a -conditional section may contain one or more complete declarations, comments, -processing instructions, or nested conditional sections, intermingled with -white space" (XML 1.0 spec, section 3.4). Complete declarations and comments -may contain ]]>, so this is contradictory to the grammar. - -The intention of conditional sections is to include or exclude the section -depending on the current replacement text of a parameter entity. Almost always -such sections are used as in - - (or "IGNORE") - - -This means that if it is possible to include a section it must also be legal to -ignore the same section. This is a strong indication that the token ]]> must -not count as section terminator if it occurs in a string literal or comment. - -This parser implements the latter. - -============================================================================== -Conditional sections and the inclusion of parameter entities -============================================================================== - -It is unclear what happens if an ignored section contains a reference to a -parameter entity. In most cases, this is not problematic because nesting of -parameter entities must respect declaration braces. The replacement text of -parameter entities must either contain a whole number of declarations or only -inner material of one declaration. Almost always it does not matter whether -these references are resolved or not (the section is ignored). - -But there is one case which is not explicitly specified: Is it allowed that the -replacement text of an entity contains the end marker ]]> of an ignored -conditional section? Example: - -"> - must be contained in -the same entity as the corresponding of -declarations). So it is possible to conclude that ]]> may be in another entity. - -Of course, there are many arguments not to allow such constructs: The resulting -code is incomprehensive, and parsing takes longer (especially if the entities -are external). I think the best argument against this kind of XML is that the -XML spec is not detailed enough, as it contains no rules where entity -references should be recognized and where not. For example: - -"> -"> - - -Which token ]]> counts? From a logical point of view, the ]]> in the third line -ends the conditional section. As already pointed out, the XML spec permits the -interpretation that ]]> is recognized even in string literals, and this may be -also true if it is "imported" from a separate entity; and so the first ]]> -denotes the end of the section. - -As a practical solution, this parser does not expand parameter entities in -ignored sections. Furthermore, it is also not allowed that the ending ]]> of -ignored or included sections is contained in a different entity than the -starting -%ext; -%ent; - -"ext" contains: - -"> - - - -Here, the reference %ent; would be illegal if the standalone declaration is -strictly interpreted. This parser handles the references %ent; and %ext; -equivalently which means that %ent; is allowed, but the element type "el" is -treated as externally declared. - -General entities can occur within the DTD, but they can only be contained in -the default value of attributes, or in the definition of other general -entities. The latter can be ignored, because the check will be repeated when -the entities are expanded. Though, general entities occuring in default -attribute values are actually checked at the moment when the default is used in -an element instance. - -General entities occuring in the document body are always checked. - -NDATA entities can occur in ENTITY attribute values; either in the element -instance or in the default declaration. Both cases are checked. - diff --git a/helm/DEVEL/pxp/pxp/doc/SPEC.xml b/helm/DEVEL/pxp/pxp/doc/SPEC.xml deleted file mode 100644 index 906f45a79..000000000 --- a/helm/DEVEL/pxp/pxp/doc/SPEC.xml +++ /dev/null @@ -1,226 +0,0 @@ - - -%common; - - -up'> - - -%config; - -]> - - - - - This document -

There are some points in the XML specification which are ambiguous. -The following notes discuss these points, and describe how this parser -behaves.

-
- - - Conditional sections and the token ]]> - -

It is unclear what happens if an ignored section contains the -token ]]> at places where it is normally allowed, i.e. within string -literals and comments, e.g. - - -<![IGNORE[ <!-- ]]> --> ]]> - - -On the one hand, the production rule of the XML grammar does not treat such -tokens specially. Following the grammar, already the first ]]> ends -the conditional section - - -<![IGNORE[ <!-- ]]> - - -and the other tokens are included into the DTD.

- -

On the other hand, we can read: "Like the internal and external DTD subsets, -a conditional section may contain one or more complete declarations, comments, -processing instructions, or nested conditional sections, intermingled with -white space" (XML 1.0 spec, section 3.4). Complete declarations and comments -may contain ]]>, so this is contradictory to the grammar.

- -

The intention of conditional sections is to include or exclude the section -depending on the current replacement text of a parameter entity. Almost -always such sections are used as in - - -<!ENTITY % want.a.feature.or.not "INCLUDE"> (or "IGNORE") -<![ %want.a.feature.or.not; [ ... ]]> - - -This means that if it is possible to include a section it must also be -legal to ignore the same section. This is a strong indication that -the token ]]> must not count as section terminator if it occurs -in a string literal or comment.

- -

This parser implements the latter.

- -
- - - Conditional sections and the inclusion of parameter entities - -

It is unclear what happens if an ignored section contains a reference -to a parameter entity. In most cases, this is not problematic because -nesting of parameter entities must respect declaration braces. The -replacement text of parameter entities must either contain a whole -number of declarations or only inner material of one declaration. Almost always -it does not matter whether these references are resolved or not -(the section is ignored).

- -

But there is one case which is not explicitly specified: Is it allowed -that the replacement text of an entity contains the end marker ]]> -of an ignored conditional section? Example: - - -<!ENTITY % end "]]>"> -<![ IGNORE [ %end; - - -We do not find the statement in the XML spec that the ]]> must be contained -in the same entity as the corresponding <![ (as for the tokens <! and -> of declarations). So it is possible to conclude that ]]> may be in -another entity.

- -

Of course, there are many arguments not to allow such constructs: The -resulting code is incomprehensive, and parsing takes longer (especially if the -entities are external). I think the best argument against this kind of XML -is that the XML spec is not detailed enough, as it contains no rules where -entity references should be recognized and where not. For example: - - -<!ENTITY % y "]]>"> -<!ENTITY % x "<!ENTITY z '<![CDATA[some text%y;'>"> -<![ IGNORE [ %x; ]]> - - -Which token ]]> counts? From a logical point of view, the ]]> in the -third line ends the conditional section. As already pointed out, the XML spec -permits the interpretation that ]]> is recognized even in string literals, -and this may be also true if it is "imported" from a separate entity; and so -the first ]]> denotes the end of the section.

- -

As a practical solution, this parser does not expand parameter entities -in ignored sections. Furthermore, it is also not allowed that the ending ]]> -of ignored or included sections is contained in a different entity than the -starting <![ token.

-
- - - - Standalone documents and attribute normalization - -

-If a document is declared as stand-alone, a restriction on the effect of -attribute normalization takes effect for attributes declared in external -entities. Normally, the parser knows the type of the attribute from -the ATTLIST declaration, and it can normalize attribute values depending -on their types. For example, an NMTOKEN attribute can be written with -leading or trailing spaces, but the parser returns always the nmtoken -without such added spaces; in contrast to this, a CDATA attribute is -not normalized in this way. For stand-alone document the type information is -not available if the ATTLIST declaration is located in an external -entity. Because of this, the XML spec demands that attribute values must -be written in their normal form in this case, i.e. without additional -spaces. -

-

This parser interprets this restriction as follows. Obviously, -the substitution of character and entity references is not considered -as a "change of the value" as a result of the normalization, because -these operations will be performed identically if the ATTLIST declaration -is not available. The same applies to the substitution of TABs, CRs, -and LFs by space characters. Only the removal of spaces depending on -the type of the attribute changes the value if the ATTLIST is not -available. -

-

This means in detail: CDATA attributes never violate the -stand-alone status. ID, IDREF, NMTOKEN, ENTITY, NOTATION and enumerator -attributes must not be written with leading and/or trailing spaces. IDREF, -ENTITIES, and NMTOKENS attributes must not be written with extra spaces at the -beginning or at the end of the value, or between the tokens of the list. -

-

The whole check is dubious, because the attribute type expresses also a -semantical constraint, not only a syntactical one. At least this parser -distinguishes strictly between single-value and list types, and returns the -attribute values differently; the first are represented as Value s (where s is -a string), the latter are represented as Valuelist [s1; s2; ...; sN]. The -internal representation of the value is dependent on the attribute type, too, -such that even normalized values are processed differently depending on -whether the attribute has list type or not. For this parser, it makes still a -difference whether a value is normalized and processed as if it were CDATA, or -whether the value is processed according to its declared type. -

-

The stand-alone check is included to be able to make a statement -whether other, well-formedness parsers can process the document. Of course, -these parsers always process attributes as CDATA, and the stand-alone check -guarantees that these parsers will always see the normalized values. -

-
- - - Standalone documents and the restrictions on entity -references -

-Stand-alone documents must not refer to entities which are declared in an -external entity. This parser applies this rule only: to general and NDATA -entities when they occur in the document body (i.e. not in the DTD); and to -general and NDATA entities occuring in default attribute values declared in the -internal subset of the DTD. -

-

-Parameter entities are out of discussion for the stand-alone property. If there -is a parameter entity reference in the internal subset which was declared in an -external entity, it is not available in the same way as the external entity is -not available that contains its declaration. Because of this "equivalence", -parameter entity references are not checked on violations against the -stand-alone declaration. It simply does not matter. - Illustration: -

- -

-Main document: - - -%ext; -%ent; -]]> - -"ext" contains: - - "> -]]> -

- -

Here, the reference %ent; would be illegal if the standalone -declaration is strictly interpreted. This parser handles the references -%ent; and %ext; equivalently which means that %ent; is allowed, but the -element type "el" is treated as externally declared. -

- -

-General entities can occur within the DTD, but they can only be contained in -the default value of attributes, or in the definition of other general -entities. The latter can be ignored, because the check will be repeated when -the entities are expanded. Though, general entities occuring in default -attribute values are actually checked at the moment when the default is -used in an element instance. -

-

-General entities occuring in the document body are always checked.

-

-NDATA entities can occur in ENTITY attribute values; either in the element -instance or in the default declaration. Both cases are checked. -

-
- -
diff --git a/helm/DEVEL/pxp/pxp/doc/design.txt b/helm/DEVEL/pxp/pxp/doc/design.txt deleted file mode 100644 index bf75d0618..000000000 --- a/helm/DEVEL/pxp/pxp/doc/design.txt +++ /dev/null @@ -1,340 +0,0 @@ ------------------------------------------------- -*- indented-text -*- -Some Notes About the Design: ----------------------------------------------------------------------- - ----------------------------------------------------------------------- -Compilation ----------------------------------------------------------------------- - -Compilation is non-trivial because: - - - The lexer and parser generators ocamlllex resp. ocamlyacc normally - create code such that the parser module precedes the lexer module. - THIS design requires that the lexer layer precedes the entity layer - which precedes the parser layer, because the parsing results modify - the behaviour of the lexer and entity layers. There is no way to get - around this because of the nature of XML. - - So the dependency relation of the lexer and the parser is modified; - in particular the "token" type that is normally defined by the - generated parser is moved to a common prdecessor of both lexer - and parser. - - - Another modification of the standard way of handling parsers is that - the parser is turned into an object. This is necessary because the - whole parser is polymorphic, i.e. there is a type parameter (the - type of the node extension). - -...................................................................... - -First some modules are generated as illustrated by the following -diagram: - - - markup_yacc.mly - | | - \|/ \|/ [ocamlyacc, 1] - V V - markup_yacc.mli markup_yacc.ml - | --> renamed into markup_yacc.ml0 - [awk, 2] \|/ | - V \|/ [sed, 3] - markup_yacc_token.mlf V - | | markup_yacc.ml - markup_lexer_types_ | | - shadow.mli | | | markup_lexer_types_ - \|/ [sed, \|/ | shadow.ml - V 4] V | | - markup_lexer_types.mli | | [sed, 4] - \|/ \|/ - V V - markup_lexer_types.ml - - - markup_yacc_shadow.mli - | - \|/ [replaces, 5] - V - markup_yacc.mli - - - - markup_lexers.mll - | - \|/ [ocamllex, 6] - V - markup_lexers.ml - - -Notes: - - (1) ocamlyacc generates both a module and a module interface. - The module is postprocessed in step (3). The interface cannot - be used, but it contains the definition of the "token" type. - This definition is extracted in step (2). The interface is - completely replaced in step (5) by a different file. - - (2) An "awk" script extracts the definition of the type "token". - "token" is created by ocamlyacc upon the %token directives - in markup_yacc.mly, and normally "token" is defined in - the module generated by ocamlyacc. This turned out not to be - useful as the module dependency must be that the lexer is - an antecedent of the parser and not vice versa (as usually), - so the "token" type is "moved" to the module Markup_lexer_types - which is an antecedent of both the lexer and the parser. - - (3) A "sed" script turns the generated parser into an object. - This is rather simple; some "let" definitions must be rewritten - as "val" definitions, the other "let" definitions as - "method" definitions. The parser object is needed because - the whole parser has a polymorphic type parameter. - - (4) The implementation and definition of Markup_lexer_types are - both generated by inserting the "token" type definition - (in markup_lexer_types.mlf) into two pattern files, - markup_lexer_types_shadow.ml resp. -.mli. The point of insertion - is marked by the string INCLUDE_HERE. - - (5) The generated interface of the Markup_yacc module is replaced - by a hand-written file. - - (6) ocamllex generates the lexer; this process is not patched in any - way. - -...................................................................... - -After the additional modules have been generated, compilation proceeds -in the usual manner. - - ----------------------------------------------------------------------- -Hierarchy of parsing layers: ----------------------------------------------------------------------- - -From top to bottom: - - - Parser: Markup_yacc - + gets input stream from the main entity object - + checks most of the grammar - + creates the DTD object as side-effect - + creates the element tree as side-effect - + creates further entity objects that are entered into the DTD - - Entity layer: Markup_entity - + gets input stream from the lexers, or another entity object - + handles entity references: if a reference is encountered the - input stream is redirected such that the tokens come from the - referenced entity object - + handles conditional sections - - Lexer layer: Markup_lexers - + gets input from lexbuffers created by resolvers - + different lexers for different lexical contexts - + a lexer returns pairs (token,lexid), where token is the scanned - token, and lexid is the name of the lexer that must be used for - the next token - - Resolver layer: Markup_entity - + a resolver creates the lexbuf from some character source - + a resolver recodes the input and handles the encoding scheme - ----------------------------------------------------------------------- -The YACC based parser ----------------------------------------------------------------------- - -ocamlyacc allows it to pass an arbitrary 'next_token' function to the -parsing functions. We always use 'en # next_token()' where 'en' is the -main entity object representing the main file to be parsed. - -The parser is not functional, but uses mainly side-effects to accumulate -the structures that have been recognized. This is very important for the -entity definitions, because once an entity definition has been found there -may be a reference to it which is handled by the entity layer (which is -below the yacc layer). This means that such a definition modifies the -token source of the parser, and this can only be handled by side-effects -(at least in a sensible manner; a purely functional parser would have to -pass unresolved entity references to its caller, which would have to -resolve the reference and to re-parse the whole document!). - -Note that also element definitions profit from the imperative style of -the parser; an element instance can be validated directly once the end -tag has been read in. - ----------------------------------------------------------------------- -The entity layer ----------------------------------------------------------------------- - -The parser gets the tokens from the main entity object. This object -controls the underlying lexing mechanism (see below), and already -interprets the following: - -- Conditional sections (if they are allowed in this entity): - The structures and are - recognized and interpreted. - - This would be hard to realize by the yacc parser, because: - - INCLUDE and IGNORE are not recognized as lexical keywords but as names. - This means that the parser cannot select different rules for them. - - The text after IGNORE requires a different lexical handling. - -- Entity references: &name; and %name; - The named entity is looked up and the input source is redirected to it, i.e. - if the main entity object gets the message 'next_token' this message is - forwarded to the referenced entity. (This entity may choose to forward the - message again to a third entity, and so on.) - - There are some fine points: - - - It is okay that redirection happens at token level, not at character level: - + General entities must always match the 'content' production, and because - of this they must always consist of a whole number of tokens. - + If parameter entities are resolved, the XML specification states that - a space character is inserted before and after the replacement text. - This also means that such entities always consists of a whole number - of tokens. - - - There are some "nesting constraints": - + General entities must match the 'content' production. Because of this, - the special token Begin_entity is inserted before the first token of - the entity, and End_entity is inserted just before the Eof token. The - brace Begin_entity...End_entity is recognized by the yacc parser, but - only in the 'content' production. - + External parameter entities must match 'extSubsetDecl'. Again, - Begin_entity and End_entity tokens embrace the inner token stream. - The brace Begin_entity...End_entity is recognized by the yacc parser - at the appropriate position. - (As general and parameter entities are used in different contexts - (document vs. DTD), both kinds of entities can use the same brace - Begin_entity...End_entity.) - + TODO: - The constraints for internal parameter entities are not yet checked. - - - Recursive references can be detected because entities must be opened - before the 'next_token' method can be invoked. - ----------------------------------------------------------------------- -The lexer layer ----------------------------------------------------------------------- - -There are five main lexers, and a number of auxiliary lexers. The five -main lexers are: - -- Document (function scan_document): - Scans an XML document outside the DTD and outside the element instance. - -- Content (function scan_content): - Scans an element instance, but not within tags. - -- Within_tag (function scan_within_tag): - Scans within <...>, i.e. a tag denoting an element instance. - -- Document_type (function scan_document_type): - Scans after . - -- Declaration (function scan_declaration): - Scans sequences of declarations - -Why several lexers? Because there are different lexical rules in these -five regions of an XML document. - -Every lexer not only produces tokens, but also the name of the next lexer -to use. For example, if the Document lexer scans " - ]> - ∅ - - This is illegal, and the presence of an empty Begin_entity/End_entity pair - helps to recognize this. diff --git a/helm/DEVEL/pxp/pxp/doc/dist-common.xml b/helm/DEVEL/pxp/pxp/doc/dist-common.xml deleted file mode 100644 index d18a1500f..000000000 --- a/helm/DEVEL/pxp/pxp/doc/dist-common.xml +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Gerd Stolpmann'> - - - diff --git a/helm/DEVEL/pxp/pxp/doc/manual/Makefile b/helm/DEVEL/pxp/pxp/doc/manual/Makefile deleted file mode 100644 index 5a3e1ffab..000000000 --- a/helm/DEVEL/pxp/pxp/doc/manual/Makefile +++ /dev/null @@ -1,82 +0,0 @@ -DOCBOOK_HTML = /usr/share/sgml/docbkdsl/html -DOCBOOK_PRINT = /usr/share/sgml/docbkdsl/print -SRC = $(PWD)/src - -.PHONY: html ps - -default: html ps - -html: html/book1.htm html/pic/done - -ps: ps/markup.ps ps/pic/done - - -src/readme.ent: ../../examples/readme/to_html.ml - src/getcode.ml <../../examples/readme/to_html.ml >src/readme.ent - -src/yacc.mli.ent: ../../pxp_yacc.mli - src/getcode.ml <../../pxp_yacc.mli >src/yacc.mli.ent - -src/dtd.mli.ent: ../../pxp_dtd.mli - src/getcode.ml <../../pxp_dtd.mli >src/dtd.mli.ent - -html/book1.htm: src/*.sgml src/readme.ent src/yacc.mli.ent src/dtd.mli.ent - mkdir -p html - cp src/markup.css html; \ - cd html; \ - rm -f *.htm*; \ - jade -t sgml -D$(DOCBOOK_HTML) -D$(SRC) -ihtml markup.sgml; \ - true - touch html/TIMESTAMP - -html/pic/done: src/pic/*.fig - mkdir -p html/pic - l=`cd src/pic; echo *.fig`; \ - for x in $$l; do fig2dev -L gif src/pic/$$x html/pic/`basename $$x .fig`.gif; done - touch html/pic/done - -#man: src/findlib_reference.xml -# mkdir -p man -# cd man; \ -# rm -f *.[0-9]; \ -# db2man <../src/findlib_reference.xml - -ps/markup.tex: src/*.sgml src/readme.ent src/yacc.mli.ent src/dtd.mli.ent - mkdir -p ps - cd ps; \ - jade -t tex -D$(DOCBOOK_PRINT) -D$(SRC) markup.sgml; \ - true - -ps/markup.dvi: ps/markup.tex ps/pic/done - cd ps; \ - jadetex markup.tex; \ - jadetex markup.tex; \ - jadetex markup.tex - -ps/markup.ps: ps/markup.dvi - cd ps; \ - dvips -f markup.ps - -ps/pic/done: src/pic/*.fig - mkdir -p ps/pic - l=`cd src/pic; echo *.fig`; \ - for x in $$l; do fig2dev -L ps -m 0.8 src/pic/$$x ps/pic/`basename $$x .fig`.ps; done - touch ps/pic/done - -.SUFFIXES: .xml .sgml - -.sgml.xml: - sx -xndata $< >$@; true - - - -clean: - rm -rf html man ps - rm -f src/readme.ent - -CLEAN: clean - -distclean: - rm -f src/*~ - rm -f *~ - rm -f ps/*.aux ps/*.dvi ps/*.log ps/*.tex diff --git a/helm/DEVEL/pxp/pxp/doc/manual/html/TIMESTAMP b/helm/DEVEL/pxp/pxp/doc/manual/html/TIMESTAMP deleted file mode 100644 index e69de29bb..000000000 diff --git a/helm/DEVEL/pxp/pxp/doc/manual/html/c1567.html b/helm/DEVEL/pxp/pxp/doc/manual/html/c1567.html deleted file mode 100644 index ab88e87bf..000000000 --- a/helm/DEVEL/pxp/pxp/doc/manual/html/c1567.html +++ /dev/null @@ -1,434 +0,0 @@ -Configuring and calling the parser
The PXP user's guide
PrevNext

Chapter 4. Configuring and calling the parser

4.1. Overview

There are the following main functions invoking the parser (in Pxp_yacc): - -

  • parse_document_entity: You want to -parse a complete and closed document consisting of a DTD and the document body; -the body is validated against the DTD. This mode is interesting if you have a -file - -

    <!DOCTYPE root ... [ ... ] > <root> ... </root>
    - -and you can accept any DTD that is included in the file (e.g. because the file -is under your control).

  • parse_wfdocument_entity: You want to -parse a complete and closed document consisting of a DTD and the document body; -but the body is not validated, only checked for well-formedness. This mode is -preferred if validation costs too much time or if the DTD is missing.

  • parse_dtd_entity: You want only to -parse an entity (file) containing the external subset of a DTD. Sometimes it is -interesting to read such a DTD, for example to compare it with the DTD included -in a document, or to apply the next mode:

  • parse_content_entity: You want only to -parse an entity (file) containing a fragment of a document body; this fragment -is validated against the DTD you pass to the function. Especially, the fragment -must not have a <!DOCTYPE> clause, and must directly -begin with an element. The element is validated against the DTD. This mode is -interesting if you want to check documents against a fixed, immutable DTD.

  • parse_wfcontent_entity: This function -also parses a single element without DTD, but does not validate it.

  • extract_dtd_from_document_entity: This -function extracts the DTD from a closed document consisting of a DTD and a -document body. Both the internal and the external subsets are extracted.

In many cases, parse_document_entity is the preferred mode -to parse a document in a validating way, and -parse_wfdocument_entity is the mode of choice to parse a -file while only checking for well-formedness.

There are a number of variations of these modes. One important application of a -parser is to check documents of an untrusted source against a fixed DTD. One -solution is to not allow the <!DOCTYPE> clause in -these documents, and treat the document like a fragment (using mode -parse_content_entity). This is very simple, but -inflexible; users of such a system cannot even define additional entities to -abbreviate frequent phrases of their text.

It may be necessary to have a more intelligent checker. For example, it is also -possible to parse the document to check fully, i.e. with DTD, and to compare -this DTD with the prescribed one. In order to fully parse the document, mode -parse_document_entity is applied, and to get the DTD to -compare with mode parse_dtd_entity can be used.

There is another very important configurable aspect of the parser: the -so-called resolver. The task of the resolver is to locate the contents of an -(external) entity for a given entity name, and to make the contents accessible -as a character stream. (Furthermore, it also normalizes the character set; -but this is a detail we can ignore here.) Consider you have a file called -"main.xml" containing - -

<!ENTITY % sub SYSTEM "sub/sub.xml">
-%sub;
- -and a file stored in the subdirectory "sub" with name -"sub.xml" containing - -
<!ENTITY % subsub SYSTEM "subsub/subsub.xml">
-%subsub;
- -and a file stored in the subdirectory "subsub" of -"sub" with name "subsub.xml" (the -contents of this file do not matter). Here, the resolver must track that -the second entity subsub is located in the directory -"sub/subsub", i.e. the difficulty is to interpret the -system (file) names of entities relative to the entities containing them, -even if the entities are deeply nested.

There is not a fixed resolver already doing everything right - resolving entity -names is a task that highly depends on the environment. The XML specification -only demands that SYSTEM entities are interpreted like URLs -(which is not very precise, as there are lots of URL schemes in use), hoping -that this helps overcoming the local peculiarities of the environment; the idea -is that if you do not know your environment you can refer to other entities by -denoting URLs for them. I think that this interpretation of -SYSTEM names may have some applications in the internet, but -it is not the first choice in general. Because of this, the resolver is a -separate module of the parser that can be exchanged by another one if -necessary; more precisely, the parser already defines several resolvers.

The following resolvers do already exist: - -

  • Resolvers reading from arbitrary input channels. These -can be configured such that a certain ID is associated with the channel; in -this case inner references to external entities can be resolved. There is also -a special resolver that interprets SYSTEM IDs as URLs; this resolver can -process relative SYSTEM names and determine the corresponding absolute URL.

  • A resolver that reads always from a given O'Caml -string. This resolver is not able to resolve further names unless the string is -not associated with any name, i.e. if the document contained in the string -refers to an external entity, this reference cannot be followed in this -case.

  • A resolver for file names. The SYSTEM -name is interpreted as file URL with the slash "/" as separator for -directories. - This resolver is derived from the generic URL resolver.

- -The interface a resolver must have is documented, so it is possible to write -your own resolver. For example, you could connect the parser with an HTTP -client, and resolve URLs of the HTTP namespace. The resolver classes support -that several independent resolvers are combined to one more powerful resolver; -thus it is possible to combine a self-written resolver with the already -existing resolvers.

Note that the existing resolvers only interpret SYSTEM -names, not PUBLIC names. If it helps you, it is possible to -define resolvers for PUBLIC names, too; for example, such a -resolver could look up the public name in a hash table, and map it to a system -name which is passed over to the existing resolver for system names. It is -relatively simple to provide such a resolver.


PrevHomeNext
Details of the mapping from XML text to the tree representationUpResolvers and sources
\ No newline at end of file diff --git a/helm/DEVEL/pxp/pxp/doc/manual/html/c36.html b/helm/DEVEL/pxp/pxp/doc/manual/html/c36.html deleted file mode 100644 index d74ecbbca..000000000 --- a/helm/DEVEL/pxp/pxp/doc/manual/html/c36.html +++ /dev/null @@ -1,533 +0,0 @@ -What is XML?
The PXP user's guide
PrevNext

Chapter 1. What is XML?

1.1. Introduction

XML (short for Extensible Markup Language) -generalizes the idea that text documents are typically structured in sections, -sub-sections, paragraphs, and so on. The format of the document is not fixed -(as, for example, in HTML), but can be declared by a so-called DTD (document -type definition). The DTD describes only the rules how the document can be -structured, but not how the document can be processed. For example, if you want -to publish a book that uses XML markup, you will need a processor that converts -the XML file into a printable format such as Postscript. On the one hand, the -structure of XML documents is configurable; on the other hand, there is no -longer a canonical interpretation of the elements of the document; for example -one XML DTD might want that paragraphes are delimited by -para tags, and another DTD expects p tags -for the same purpose. As a result, for every DTD a new processor is required.

Although XML can be used to express structured text documents it is not limited -to this kind of application. For example, XML can also be used to exchange -structured data over a network, or to simply store structured data in -files. Note that XML documents cannot contain arbitrary binary data because -some characters are forbidden; for some applications you need to encode binary -data as text (e.g. the base 64 encoding).

1.1.1. The "hello world" example

The following example shows a very simple DTD, and a corresponding document -instance. The document is structured such that it consists of sections, and -that sections consist of paragraphs, and that paragraphs contain plain text:

<!ELEMENT document (section)+>
-<!ELEMENT section (paragraph)+>
-<!ELEMENT paragraph (#PCDATA)>

The following document is an instance of this DTD:

<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE document SYSTEM "simple.dtd">
-<document>
-  <section>
-    <paragraph>This is a paragraph of the first section.</paragraph>
-    <paragraph>This is another paragraph of the first section.</paragraph>
-  </section>
-  <section>
-    <paragraph>This is the only paragraph of the second section.</paragraph>
-  </section>
-</document>

As in HTML (and, of course, in grand-father SGML), the "pieces" of -the document are delimited by element braces, i.e. such a piece begins with -<name-of-the-type-of-the-piece> and ends with -</name-of-the-type-of-the-piece>, and the pieces are -called elements. Unlike HTML and SGML, both start tags and -end tags (i.e. the delimiters written in angle brackets) can never be left -out. For example, HTML calls the paragraphs simply p, and -because paragraphs never contain paragraphs, a sequence of several paragraphs -can be written as: - -

<p>First paragraph 
-<p>Second paragraph
- -This is not possible in XML; continuing our example above we must always write - -
<paragraph>First paragraph</paragraph>
-<paragraph>Second paragraph</paragraph>
- -The rationale behind that is to (1) simplify the development of XML parsers -(you need not convert the DTD into a deterministic finite automaton which is -required to detect omitted tags), and to (2) make it possible to parse the -document independent of whether the DTD is known or not.

The first line of our sample document, - -

<?xml version="1.0" encoding="ISO-8859-1"?>
- -is the so-called XML declaration. It expresses that the -document follows the conventions of XML version 1.0, and that the document is -encoded using characters from the ISO-8859-1 character set (often known as -"Latin 1", mostly used in Western Europe). Although the XML declaration is not -mandatory, it is good style to include it; everybody sees at the first glance -that the document uses XML markup and not the similar-looking HTML and SGML -markup languages. If you omit the XML declaration, the parser will assume -that the document is encoded as UTF-8 or UTF-16 (there is a rule that makes -it possible to distinguish between UTF-8 and UTF-16 automatically); these -are encodings of Unicode's universal character set. (Note that PXP, unlike its -predecessor "Markup", fully supports Unicode.)

The second line, - -

<!DOCTYPE document SYSTEM "simple.dtd">
- -names the DTD that is going to be used for the rest of the document. In -general, it is possible that the DTD consists of two parts, the so-called -external and the internal subset. "External" means that the DTD exists as a -second file; "internal" means that the DTD is included in the same file. In -this example, there is only an external subset, and the system identifier -"simple.dtd" specifies where the DTD file can be found. System identifiers are -interpreted as URLs; for instance this would be legal: - -
<!DOCTYPE document SYSTEM "http://host/location/simple.dtd">
- -Please note that PXP cannot interpret HTTP identifiers by default, but it is -possible to change the interpretation of system identifiers.

The word immediately following DOCTYPE determines which of -the declared element types (here "document", "section", and "paragraph") is -used for the outermost element, the root element. In this -example it is document because the outermost element is -delimited by <document> and -</document>.

The DTD consists of three declarations for element types: -document, section, and -paragraph. Such a declaration has two parts: - -

<!ELEMENT name content-model>
- -The content model is a regular expression which describes the possible inner -structure of the element. Here, document contains one or -more sections, and a section contains one or more -paragraphs. Note that these two element types are not allowed to contain -arbitrary text. Only the paragraph element type is declared -such that parsed character data (indicated by the symbol -#PCDATA) is permitted.

See below for a detailed discussion of content models.

1.1.2. XML parsers and processors

XML documents are human-readable, but this is not the main purpose of this -language. XML has been designed such that documents can be read by a program -called an XML parser. The parser checks that the document -is well-formatted, and it represents the document as objects of the programming -language. There are two aspects when checking the document: First, the document -must follow some basic syntactic rules, such as that tags are written in angle -brackets, that for every start tag there must be a corresponding end tag and so -on. A document respecting these rules is -well-formed. Second, the document must match the DTD in -which case the document is valid. Many parsers check only -on well-formedness and ignore the DTD; PXP is designed such that it can -even validate the document.

A parser does not make a sensible application, it only reads XML -documents. The whole application working with XML-formatted data is called an -XML processor. Often XML processors convert documents into -another format, such as HTML or Postscript. Sometimes processors extract data -of the documents and output the processed data again XML-formatted. The parser -can help the application processing the document; for example it can provide -means to access the document in a specific manner. PXP supports an -object-oriented access layer specially.

1.1.3. Discussion

As we have seen, there are two levels of description: On the one hand, XML can -define rules about the format of a document (the DTD), on the other hand, XML -expresses structured documents. There are a number of possible applications:

  • XML can be used to express structured texts. Unlike HTML, there is no canonical -interpretation; one would have to write a backend for the DTD that translates -the structured texts into a format that existing browsers, printers -etc. understand. The advantage of a self-defined document format is that it is -possible to design the format in a more problem-oriented way. For example, if -the task is to extract reports from a database, one can use a DTD that reflects -the structure of the report or the database. A possible approach would be to -have an element type for every database table and for every column. Once the -DTD has been designed, the report procedure can be splitted up in a part that -selects the database rows and outputs them as an XML document according to the -DTD, and in a part that translates the document into other formats. Of course, -the latter part can be solved in a generic way, e.g. there may be configurable -backends for all DTDs that follow the approach and have element types for -tables and columns.

    XML plays the role of a configurable intermediate format. The database -extraction function can be written without having to know the details of -typesetting; the backends can be written without having to know the details of -the database.

    Of course, there are traditional solutions. One can define an ad hoc -intermediate text file format. This disadvantage is that there are no names for -the pieces of the format, and that such formats usually lack of documentation -because of this. Another solution would be to have a binary representation, -either as language-dependent or language-independent structure (example of the -latter can be found in RPC implementations). The disadvantage is that it is -harder to view such representations, one has to write pretty printers for this -purpose. It is also more difficult to enter test data; XML is plain text that -can be written using an arbitrary editor (Emacs has even a good XML mode, -PSGML). All these alternatives suffer from a missing structure checker, -i.e. the programs processing these formats usually do not check the input file -or input object in detail; XML parsers check the syntax of the input (the -so-called well-formedness check), and the advanced parsers like PXP even -verify that the structure matches the DTD (the so-called validation).

  • XML can be used as configurable communication language. A fundamental problem -of every communication is that sender and receiver must follow the same -conventions about the language. For data exchange, the question is usually -which data records and fields are available, how they are syntactically -composed, and which values are possible for the various fields. Similar -questions arise for text document exchange. XML does not answer these problems -completely, but it reduces the number of ambiguities for such conventions: The -outlines of the syntax are specified by the DTD (but not necessarily the -details), and XML introduces canonical names for the components of documents -such that it is simpler to describe the rest of the syntax and the semantics -informally.

  • XML is a data storage format. Currently, every software product tends to use -its own way to store data; commercial software often does not describe such -formats, and it is a pain to integrate such software into a bigger project. -XML can help to improve this situation when several applications share the same -syntax of data files. DTDs are then neutral instances that check the format of -data files independent of applications.


PrevHomeNext
User's guideUpHighlights of XML
\ No newline at end of file diff --git a/helm/DEVEL/pxp/pxp/doc/manual/html/c533.html b/helm/DEVEL/pxp/pxp/doc/manual/html/c533.html deleted file mode 100644 index c58e6ff3e..000000000 --- a/helm/DEVEL/pxp/pxp/doc/manual/html/c533.html +++ /dev/null @@ -1,234 +0,0 @@ -Using PXP
The PXP user's guide
PrevNext

Chapter 2. Using PXP

2.1. Validation

The parser can be used to validate a document. This means -that all the constraints that must hold for a valid document are actually -checked. Validation is the default mode of PXP, i.e. every document is -validated while it is being parsed.

In the examples directory of the distribution you find the -pxpvalidate application. It is invoked in the following way: - -

pxpvalidate [ -wf ] file...
- -The files mentioned on the command line are validated, and every warning and -every error messages are printed to stderr.

The -wf switch modifies the behaviour such that a well-formedness parser is -simulated. In this mode, the ELEMENT, ATTLIST, and NOTATION declarations of the -DTD are ignored, and only the ENTITY declarations will take effect. This mode -is intended for documents lacking a DTD. Please note that the parser still -scans the DTD fully and will report all errors in the DTD; such checks are not -required by a well-formedness parser.

The pxpvalidate application is the simplest sensible program -using PXP, you may consider it as "hello world" program.


PrevHomeNext
A complete example: The readme DTDUpHow to parse a document from an application
\ No newline at end of file diff --git a/helm/DEVEL/pxp/pxp/doc/manual/html/c893.html b/helm/DEVEL/pxp/pxp/doc/manual/html/c893.html deleted file mode 100644 index 0e564fb20..000000000 --- a/helm/DEVEL/pxp/pxp/doc/manual/html/c893.html +++ /dev/null @@ -1,349 +0,0 @@ -The objects representing the document
The PXP user's guide
PrevNext

Chapter 3. The objects representing the document

This description might be out-of-date. See the module interface files -for updated information.

3.1. The document class

class [ 'ext ] document :
-  Pxp_types.collect_warnings -> 
-  object
-    method init_xml_version : string -> unit
-    method init_root : 'ext node -> unit
-
-    method xml_version : string
-    method xml_standalone : bool
-    method dtd : dtd
-    method root : 'ext node
-
-    method encoding : Pxp_types.rep_encoding
-
-    method add_pinstr : proc_instruction -> unit
-    method pinstr : string -> proc_instruction list
-    method pinstr_names : string list
-
-    method write : Pxp_types.output_stream -> Pxp_types.encoding -> unit
-
-  end
-;;
- -The methods beginning with init_ are only for internal use -of the parser.

  • xml_version: returns the version string at the beginning of -the document. For example, "1.0" is returned if the document begins with -<?xml version="1.0"?>.

  • xml_standalone: returns the boolean value of -standalone declaration in the XML declaration. If the -standalone attribute is missing, false is -returned.

  • dtd: returns a reference to the global DTD object.

  • root: returns a reference to the root element.

  • encoding: returns the internal encoding of the -document. This means that all strings of which the document consists are -encoded in this character set.

  • pinstr: returns the processing instructions outside the DTD -and outside the root element. The argument passed to the method names a -target, and the method returns all instructions with this -target. The target is the first word inside <? and -?>.

  • pinstr_names: returns the names of the processing instructions

  • add_pinstr: adds another processing instruction. This method -is used by the parser itself to enter the instructions returned by -pinstr, but you can also enter additional instructions.

  • write: writes the document to the passed stream as XML -text using the passed (external) encoding. The generated text is always valid -XML and can be parsed by PXP; however, the text is badly formatted (this is not -a pretty printer).


PrevHomeNext
Example: An HTML backend for the readme -DTDUpThe class type node
\ No newline at end of file diff --git a/helm/DEVEL/pxp/pxp/doc/manual/html/index.html b/helm/DEVEL/pxp/pxp/doc/manual/html/index.html deleted file mode 100644 index 3c07ff28f..000000000 --- a/helm/DEVEL/pxp/pxp/doc/manual/html/index.html +++ /dev/null @@ -1,330 +0,0 @@ -The PXP user's guide

The PXP user's guide

Gerd Stolpmann

Copyright © 1999, 2000 by Gerd Stolpmann

PXP is a validating parser for XML-1.0 which has been -written entirely in Objective Caml.

Download PXP:

The free PXP library can be downloaded at -http://www.ocaml-programming.de/packages/. This user's guide is included. -Newest releases of PXP will be announced in -The OCaml Link -Database.

License

This document, and the described software, "PXP", are copyright by -Gerd Stolpmann.

Permission is hereby granted, free of charge, to any person obtaining -a copy of this document and the "PXP" software (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions:

The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software.

The Software is provided ``as is'', without warranty of any kind, express -or implied, including but not limited to the warranties of -merchantability, fitness for a particular purpose and noninfringement. -In no event shall Gerd Stolpmann be liable for any claim, damages or -other liability, whether in an action of contract, tort or otherwise, -arising from, out of or in connection with the Software or the use or -other dealings in the software.



  Next
  User's guide
\ No newline at end of file diff --git a/helm/DEVEL/pxp/pxp/doc/manual/html/markup.css b/helm/DEVEL/pxp/pxp/doc/manual/html/markup.css deleted file mode 100644 index 67dfaecb7..000000000 --- a/helm/DEVEL/pxp/pxp/doc/manual/html/markup.css +++ /dev/null @@ -1,4 +0,0 @@ -.acronym { - font-weight: bold; - color: #c71585 -} diff --git a/helm/DEVEL/pxp/pxp/doc/manual/html/p34.html b/helm/DEVEL/pxp/pxp/doc/manual/html/p34.html deleted file mode 100644 index 9db427d34..000000000 --- a/helm/DEVEL/pxp/pxp/doc/manual/html/p34.html +++ /dev/null @@ -1,167 +0,0 @@ -User's guide
The PXP user's guide
PrevNext


PrevHomeNext
The PXP user's guide What is XML?
\ No newline at end of file diff --git a/helm/DEVEL/pxp/pxp/doc/manual/html/pic/done b/helm/DEVEL/pxp/pxp/doc/manual/html/pic/done deleted file mode 100644 index e69de29bb..000000000 diff --git a/helm/DEVEL/pxp/pxp/doc/manual/html/pic/extension_general.gif b/helm/DEVEL/pxp/pxp/doc/manual/html/pic/extension_general.gif deleted file mode 100644 index 6cc260a4e..000000000 Binary files a/helm/DEVEL/pxp/pxp/doc/manual/html/pic/extension_general.gif and /dev/null differ diff --git a/helm/DEVEL/pxp/pxp/doc/manual/html/pic/node_add.gif b/helm/DEVEL/pxp/pxp/doc/manual/html/pic/node_add.gif deleted file mode 100644 index 0091db2a2..000000000 Binary files a/helm/DEVEL/pxp/pxp/doc/manual/html/pic/node_add.gif and /dev/null differ diff --git a/helm/DEVEL/pxp/pxp/doc/manual/html/pic/node_clone.gif b/helm/DEVEL/pxp/pxp/doc/manual/html/pic/node_clone.gif deleted file mode 100644 index 97cd3639e..000000000 Binary files a/helm/DEVEL/pxp/pxp/doc/manual/html/pic/node_clone.gif and /dev/null differ diff --git a/helm/DEVEL/pxp/pxp/doc/manual/html/pic/node_delete.gif b/helm/DEVEL/pxp/pxp/doc/manual/html/pic/node_delete.gif deleted file mode 100644 index d521123a7..000000000 Binary files a/helm/DEVEL/pxp/pxp/doc/manual/html/pic/node_delete.gif and /dev/null differ diff --git a/helm/DEVEL/pxp/pxp/doc/manual/html/pic/node_general.gif b/helm/DEVEL/pxp/pxp/doc/manual/html/pic/node_general.gif deleted file mode 100644 index 5f6358cc3..000000000 Binary files a/helm/DEVEL/pxp/pxp/doc/manual/html/pic/node_general.gif and /dev/null differ diff --git a/helm/DEVEL/pxp/pxp/doc/manual/html/pic/node_term.gif b/helm/DEVEL/pxp/pxp/doc/manual/html/pic/node_term.gif deleted file mode 100644 index 5644c91f3..000000000 Binary files a/helm/DEVEL/pxp/pxp/doc/manual/html/pic/node_term.gif and /dev/null differ diff --git a/helm/DEVEL/pxp/pxp/doc/manual/html/x107.html b/helm/DEVEL/pxp/pxp/doc/manual/html/x107.html deleted file mode 100644 index 102aba218..000000000 --- a/helm/DEVEL/pxp/pxp/doc/manual/html/x107.html +++ /dev/null @@ -1,1694 +0,0 @@ -Highlights of XML
The PXP user's guide
PrevChapter 1. What is XML?Next

1.2. Highlights of XML

This section explains many of the features of XML, but not all, and some -features not in detail. For a complete description, see the XML -specification.

1.2.1. The DTD and the instance

The DTD contains various declarations; in general you can only use a feature if -you have previously declared it. The document instance file may contain the -full DTD, but it is also possible to split the DTD into an internal and an -external subset. A document must begin as follows if the full DTD is included: - -

<?xml version="1.0" encoding="Your encoding"?>
-<!DOCTYPE root [
-  Declarations
-]>
- -These declarations are called the internal subset. Note -that the usage of entities and conditional sections is restricted within the -internal subset.

If the declarations are located in a different file, you can refer to this file -as follows: - -

<?xml version="1.0" encoding="Your encoding"?>
-<!DOCTYPE root SYSTEM "file name">
- -The declarations in the file are called the external -subset. The file name is called the system -identifier. -It is also possible to refer to the file by a so-called -public identifier, but most XML applications won't use -this feature.

You can also specify both internal and external subsets. In this case, the -declarations of both subsets are mixed, and if there are conflicts, the -declaration of the internal subset overrides those of the external subset with -the same name. This looks as follows: - -

<?xml version="1.0" encoding="Your encoding"?>
-<!DOCTYPE root  SYSTEM "file name" [
-  Declarations
-]>

The XML declaration (the string beginning with <?xml and -ending at ?>) should specify the encoding of the -file. Common values are UTF-8, and the ISO-8859 series of character sets. Note -that every file parsed by the XML processor can begin with an XML declaration -and that every file may have its own encoding.

The name of the root element must be mentioned directly after the -DOCTYPE string. This means that a full document instance -looks like - -

<?xml version="1.0" encoding="Your encoding"?>
-<!DOCTYPE root  SYSTEM "file name" [
-  Declarations
-]>
-
-<root>
-  inner contents
-</root>

1.2.2. Reserved characters

Some characters are generally reserved to indicate markup such that they cannot -be used for character data. These characters are <, >, and -&. Furthermore, single and double quotes are sometimes reserved. If you -want to include such a character as character, write it as follows: - -

  • &lt; instead of <

  • &gt; instead of >

  • &amp; instead of &

  • &apos; instead of '

  • &quot; instead of "

- -All other characters are free in the document instance. It is possible to -include a character by its position in the Unicode alphabet: - -
&#n;
- -where n is the decimal number of the -character. Alternatively, you can specify the character by its hexadecimal -number: - -
&#xn;
- -In the scope of declarations, the character % is no longer free. To include it -as character, you must use the notations &#37; or -&#x25;.

Note that besides &lt;, &gt;, &amp;, -&apos;, and &quot; there are no predefines character entities. This is -different from HTML which defines a list of characters that can be referenced -by name (e.g. &auml; for ä); however, if you prefer named characters, you -can declare such entities yourself (see below).

1.2.3. Elements and ELEMENT declarations

Elements structure the document instance in a hierarchical way. There is a -top-level element, the root element, which contains a -sequence of inner elements and character sections. The inner elements are -structured in the same way. Every element has an element -type. The beginning of the element is indicated by a start -tag, written - -

<element-type>
- -and the element continues until the corresponding end tag -is reached: - -
</element-type>
- -In XML, it is not allowed to omit start or end tags, even if the DTD would -permit this. Note that there are no special rules how to interpret spaces or -newlines near start or end tags; all spaces and newlines count.

Every element type must be declared before it can be used. The declaration -consists of two parts: the ELEMENT declaration describes the content model, -i.e. which inner elements are allowed; the ATTLIST declaration describes the -attributes of the element.

An element can simply allow everything as content. This is written: - -

<!ELEMENT name ANY>
- -On the opposite, an element can be forced to be empty; declared by: - -
<!ELEMENT name EMPTY>
- -Note that there is an abbreviated notation for empty element instances: -<name/>.

There are two more sophisticated forms of declarations: so-called -mixed declarations, and regular -expressions. An element with mixed content contains character data -interspersed with inner elements, and the set of allowed inner elements can be -specified. In contrast to this, a regular expression declaration does not allow -character data, but the inner elements can be described by the more powerful -means of regular expressions.

A declaration for mixed content looks as follows: - -

<!ELEMENT name (#PCDATA | element1 | ... | elementn )*>
- -or if you do not want to allow any inner element, simply - -
<!ELEMENT name (#PCDATA)>

Example

If element type q is declared as - -

<!ELEMENT q (#PCDATA | r | s)*>
- -this is a legal instance: - -
<q>This is character data<r></r>with <s></s>inner elements</q>
- -But this is illegal because t has not been enumerated in the -declaration: - -
<q>This is character data<r></r>with <t></t>inner elements</q>

The other form uses a regular expression to describe the possible contents: - -

<!ELEMENT name regexp>
- -The following well-known regexp operators are allowed: - -

  • element-name

  • (subexpr1 , ... , subexprn )

  • (subexpr1 | ... | subexprn )

  • subexpr*

  • subexpr+

  • subexpr?

- -The , operator indicates a sequence of sub-models, the -| operator describes alternative sub-models. The -* indicates zero or more repetitions, and -+ one or more repetitions. Finally, ? can -be used for optional sub-models. As atoms the regexp can contain names of -elements; note that it is not allowed to include #PCDATA.

The exact syntax of the regular expressions is rather strange. This can be -explained best by a list of constraints: - -

  • The outermost expression must not be -element-name.

    Illegal: -<!ELEMENT x y>; this must be written as -<!ELEMENT x (y)>.

  • For the unary operators subexpr*, -subexpr+, and -subexpr?, the -subexpr must not be again an -unary operator.

    Illegal: -<!ELEMENT x y**>; this must be written as -<!ELEMENT x (y*)*>.

  • Between ) and one of the unary operatory -*, +, or ?, there must -not be whitespace.

    Illegal: -<!ELEMENT x (y|z) *>; this must be written as -<!ELEMENT x (y|z)*>.

  • There is the additional constraint that the -right parenthsis must be contained in the same entity as the left parenthesis; -see the section about parsed entities below.

Note that there is another restriction on regular expressions which must be -deterministic. This means that the parser must be able to see by looking at the -next token which alternative is actually used, or whether the repetition -stops. The reason for this is simply compatability with SGML (there is no -intrinsic reason for this rule; XML can live without this restriction).

Example

The elements are declared as follows: - -

<!ELEMENT q (r?, (s | t)+)>
-<!ELEMENT r (#PCDATA)>
-<!ELEMENT s EMPTY>
-<!ELEMENT t (q | r)>
- -This is a legal instance: - -
<q><r>Some characters</r><s/></q>
- -(Note: <s/> is an abbreviation for -<s></s>.) - -It would be illegal to leave <s/> out because at -least one instance of s or t must be -present. It would be illegal, too, if characters existed outside the -r element; the only exception is white space. -- This is -legal, too: - -
<q><s/><t><q><s/></q></t></q>

1.2.4. Attribute lists and ATTLIST declarations

Elements may have attributes. These are put into the start tag of an element as -follows: - -

<element-name attribute1="value1" ... attributen="valuen">
- -Instead of -"valuek" -it is also possible to use single quotes as in -'valuek'. -Note that you cannot use double quotes literally within the value of the -attribute if double quotes are the delimiters; the same applies to single -quotes. You can generally not use < and & as characters in attribute -values. It is possible to include the paraphrases &lt;, &gt;, -&amp;, &apos;, and &quot; (and any other reference to a general -entity as long as the entity is not defined by an external file) as well as -&#n;.

Before you can use an attribute you must declare it. An ATTLIST declaration -looks as follows: - -

<!ATTLIST element-name 
-          attribute-name attribute-type attribute-default
-          ...
-          attribute-name attribute-type attribute-default
->
- -There are a lot of types, but most important are: - -

  • CDATA: Every string is allowed as attribute value.

  • NMTOKEN: Every nametoken is allowed as attribute -value. Nametokens consist (mainly) of letters, digits, ., :, -, _ in arbitrary -order.

  • NMTOKENS: A space-separated list of nametokens is allowed as -attribute value.

- -The most interesting default declarations are: - -

  • #REQUIRED: The attribute must be specified.

  • #IMPLIED: The attribute can be specified but also can be -left out. The application can find out whether the attribute was present or -not.

  • "value" or -'value': This particular value is -used as default if the attribute is omitted in the element.

Example

This is a valid attribute declaration for element type r: - -

<!ATTLIST r 
-          x CDATA    #REQUIRED
-          y NMTOKEN  #IMPLIED
-          z NMTOKENS "one two three">
- -This means that x is a required attribute that cannot be -left out, while y and z are optional. The -XML parser indicates the application whether y is present or -not, but if z is missing the default value -"one two three" is returned automatically.

This is a valid example of these attributes: - -

<r x="He said: &quot;I don't like quotes!&quot;" y='1'>

1.2.5. Parsed entities

Elements describe the logical structure of the document, while -entities determine the physical structure. Entities are -the pieces of text the parser operates on, mostly files and macros. Entities -may be parsed in which case the parser reads the text and -interprets it as XML markup, or unparsed which simply -means that the data of the entity has a foreign format (e.g. a GIF icon).

If the parsed entity is going to be used as part of the DTD, it -is called a parameter entity. You can declare a parameter -entity with a fixed text as content by: - -

<!ENTITY % name "value">
- -Within the DTD, you can refer to this entity, i.e. read -the text of the entity, by: - -
%name;
- -Such entities behave like macros, i.e. when they are referred to, the -macro text is inserted and read instead of the original text. - -

Example

For example, you can declare two elements with the same content model by: - -

<!ENTITY % model "a | b | c">
-<!ELEMENT x (%model;)>
-<!ELEMENT y (%model;)>

- -If the contents of the entity are given as string constant, the entity is -called an internal entity. It is also possible to name a -file to be used as content (an external entity): - -
<!ENTITY % name SYSTEM "file name">
- -There are some restrictions for parameter entities: - -

  • If the internal parameter entity contains the first token of a declaration -(i.e. <!), it must also contain the last token of the -declaration, i.e. the >. This means that the entity -either contains a whole number of complete declarations, or some text from the -middle of one declaration.

    Illegal: -

    <!ENTITY % e "(a | b | c)>">
    -<!ELEMENT x %e;
    Because <! is contained in the main -entity, and the corresponding > is contained in the -entity e.

  • If the internal parameter entity contains a left paranthesis, it must also -contain the corresponding right paranthesis.

    Illegal: -

    <!ENTITY % e "(a | b | c">
    -<!ELEMENT x %e;)>
    Because ( is contained in the entity -e, and the corresponding ) is -contained in the main entity.

  • When reading text from an entity, the parser automatically inserts one space -character before the entity text and one space character after the entity -text. However, this rule is not applied within the definition of another -entity.

    Legal: -

     
    -<!ENTITY % suffix "gif"> 
    -<!ENTITY iconfile 'icon.%suffix;'>
    Because %suffix; is referenced within -the definition text for iconfile, no additional spaces are -added.

    Illegal: -

    <!ENTITY % suffix "test">
    -<!ELEMENT x.%suffix; ANY>
    -Because %suffix; is referenced outside the definition -text of another entity, the parser replaces %suffix; by -spacetestspace.

    Illegal: -

    <!ENTITY % e "(a | b | c)">
    -<!ELEMENT x %e;*>
    Because there is a whitespace between ) -and *, which is illegal.

  • An external parameter entity must always consist of a whole number of complete -declarations.

  • In the internal subset of the DTD, a reference to a parameter entity (internal -or external) is only allowed at positions where a new declaration can start.

If the parsed entity is going to be used in the document instance, it is called -a general entity. Such entities can be used as -abbreviations for frequent phrases, or to include external files. Internal -general entities are declared as follows: - -

<!ENTITY name "value">
- -External general entities are declared this way: - -
<!ENTITY name SYSTEM "file name">
- -References to general entities are written as: - -
&name;
- -The main difference between parameter and general entities is that the former -are only recognized in the DTD and that the latter are only recognized in the -document instance. As the DTD is parsed before the document, the parameter -entities are expanded first; for example it is possible to use the content of a -parameter entity as the name of a general entity: -&#38;%name;;[1].

General entities must respect the element hierarchy. This means that there must -be an end tag for every start tag in the entity value, and that end tags -without corresponding start tags are not allowed.

Example

If the author of a document changes sometimes, it is worthwhile to set up a -general entity containing the names of the authors. If the author changes, you -need only to change the definition of the entity, and do not need to check all -occurrences of authors' names: - -

<!ENTITY authors "Gerd Stolpmann">
- -In the document text, you can now refer to the author names by writing -&authors;.

Illegal: -The following two entities are illegal because the elements in the definition -do not nest properly: - -

<!ENTITY lengthy-tag "<section textcolor='white' background='graphic'>">
-<!ENTITY nonsense    "<a></b>">

Earlier in this introduction we explained that there are substitutes for -reserved characters: &lt;, &gt;, &amp;, &apos;, and -&quot;. These are simply predefined general entities; note that they are -the only predefined entities. It is allowed to define these entities again -as long as the meaning is unchanged.

1.2.6. Notations and unparsed entities

Unparsed entities have a foreign format and can thus not be read by the XML -parser. Unparsed entities are always external. The format of an unparsed entity -must have been declared, such a format is called a -notation. The entity can then be declared by referring to -this notation. As unparsed entities do not contain XML text, it is not possible -to include them directly into the document; you can only declare attributes -such that names of unparsed entities are acceptable values.

As you can see, unparsed entities are too complicated in order to have any -purpose. It is almost always better to simply pass the name of the data file as -normal attribute value, and let the application recognize and process the -foreign format.

Notes

[1]

This construct is only -allowed within the definition of another entity; otherwise extra spaces would -be added (as explained above). Such indirection is not recommended.

Complete example: -

<!ENTITY % variant "a">      <!-- or "b" -->
-<!ENTITY text-a "This is text A.">
-<!ENTITY text-b "This is text B.">
-<!ENTITY text "&#38;text-%variant;;">
-You can now write &text; in the document instance, and -depending on the value of variant either -text-a or text-b is inserted.


PrevHomeNext
What is XML?UpA complete example: The readme DTD
\ No newline at end of file diff --git a/helm/DEVEL/pxp/pxp/doc/manual/html/x1439.html b/helm/DEVEL/pxp/pxp/doc/manual/html/x1439.html deleted file mode 100644 index 267730574..000000000 --- a/helm/DEVEL/pxp/pxp/doc/manual/html/x1439.html +++ /dev/null @@ -1,464 +0,0 @@ -The class type extension
The PXP user's guide
PrevChapter 3. The objects representing the documentNext

3.3. The class type extension

class type [ 'node ] extension =
-  object ('self)
-    method clone : 'self
-      (* "clone" should return an exact deep copy of the object. *)
-    method node : 'node
-      (* "node" returns the corresponding node of this extension. This method
-       * intended to return exactly what previously has been set by "set_node".
-       *)
-    method set_node : 'node -> unit
-      (* "set_node" is invoked once the extension is associated to a new
-       * node object.
-       *)
-  end
- -This is the type of classes used for node extensions. For every node of the -document tree, there is not only the node object, but also -an extension object. The latter has minimal -functionality; it has only the necessary methods to be attached to the node -object containing the details of the node instance. The extension object is -called extension because its purpose is extensibility.

For some reasons, it is impossible to derive the -node classes (i.e. element_impl and -data_impl) such that the subclasses can be extended by new -new methods. But -subclassing nodes is a great feature, because it allows the user to provide -different classes for different types of nodes. The extension objects are a -workaround that is as powerful as direct subclassing, the costs are -some notation overhead.

Figure 3-6. The structure of nodes and extensions

The picture shows how the nodes and extensions are linked -together. Every node has a reference to its extension, and every extension has -a reference to its node. The methods extension and -node follow these references; a typical phrase is - -

self # node # attribute "xy"
- -to get the value of an attribute from a method defined in the extension object; -or - -
self # node # iter
-  (fun n -> n # extension # my_method ...)
- -to iterate over the subnodes and to call my_method of the -corresponding extension objects.

Note that extension objects do not have references to subnodes -(or "subextensions") themselves; in order to get one of the children of an -extension you must first go to the node object, then get the child node, and -finally reach the extension that is logically the child of the extension you -started with.

3.3.1. How to define an extension class

At minimum, you must define the methods -clone, node, and -set_node such that your class is compatible with the type -extension. The method set_node is called -during the initialization of the node, or after a node has been cloned; the -node object invokes set_node on the extension object to tell -it that this node is now the object the extension is linked to. The extension -must return the node object passed as argument of set_node -when the node method is called.

The clone method must return a copy of the -extension object; at least the object itself must be duplicated, but if -required, the copy should deeply duplicate all objects and values that are -referred by the extension, too. Whether this is required, depends on the -application; clone is invoked by the node object when one of -its cloning methods is called.

A good starting point for an extension class: - -

class custom_extension =
-  object (self)
-
-    val mutable node = (None : custom_extension node option)
-
-    method clone = {< >} 
-
-    method node =
-      match node with
-          None ->
-            assert false
-        | Some n -> n
-
-    method set_node n =
-      node <- Some n
-
-  end
- -This class is compatible with extension. The purpose of -defining such a class is, of course, adding further methods; and you can do it -without restriction.

Often, you want not only one extension class. In this case, -it is the simplest way that all your classes (for one kind of document) have -the same type (with respect to the interface; i.e. it does not matter if your -classes differ in the defined private methods and instance variables, but -public methods count). This approach avoids lots of coercions and problems with -type incompatibilities. It is simple to implement: - -

class custom_extension =
-  object (self)
-    val mutable node = (None : custom_extension node option)
-
-    method clone = ...      (* see above *)
-    method node = ...       (* see above *)
-    method set_node n = ... (* see above *)
-
-    method virtual my_method1 : ...
-    method virtual my_method2 : ...
-    ... (* etc. *)
-  end
-
-class custom_extension_kind_A =
-  object (self)
-    inherit custom_extension
-
-    method my_method1 = ...
-    method my_method2 = ...
-  end
-
-class custom_extension_kind_B =
-  object (self)
-    inherit custom_extension
-
-    method my_method1 = ...
-    method my_method2 = ...
-  end
- -If a class does not need a method (e.g. because it does not make sense, or it -would violate some important condition), it is possible to define the method -and to always raise an exception when the method is invoked -(e.g. assert false).

The latter is a strong recommendation: do not try to further -specialize the types of extension objects. It is difficult, sometimes even -impossible, and almost never worth-while.

3.3.2. How to bind extension classes to element types

Once you have defined your extension classes, you can bind them -to element types. The simplest case is that you have only one class and that -this class is to be always used. The parsing functions in the module -Pxp_yacc take a spec argument which -can be customized. If your single class has the name c, -this argument should be - -

let spec =
-  make_spec_from_alist
-    ~data_exemplar:            (new data_impl c)
-    ~default_element_exemplar: (new element_impl c)
-    ~element_alist:            []
-    ()
- -This means that data nodes will be created from the exemplar passed by -~data_exemplar and that all element nodes will be made from the exemplar -specified by ~default_element_exemplar. In ~element_alist, you can -pass that different exemplars are to be used for different element types; but -this is an optional feature. If you do not need it, pass the empty list.

Remember that an exemplar is a (node, extension) pair that serves as pattern -when new nodes (and the corresponding extension objects) are added to the -document tree. In this case, the exemplar contains c as -extension, and when nodes are created, the exemplar is cloned, and cloning -makes also a copy of c such that all nodes of the document -tree will have a copy of c as extension.

The ~element_alist argument can bind -specific element types to specific exemplars; as exemplars may be instances of -different classes it is effectively possible to bind element types to -classes. For example, if the element type "p" is implemented by class "c_p", -and "q" is realized by "c_q", you can pass the following value: - -

let spec =
-  make_spec_from_alist
-    ~data_exemplar:            (new data_impl c)
-    ~default_element_exemplar: (new element_impl c)
-    ~element_alist:            
-      [ "p", new element_impl c_p;
-        "q", new element_impl c_q;
-      ]
-    ()
- -The extension object c is still used for all data nodes and -for all other element types.


PrevHomeNext
The class type nodeUpDetails of the mapping from XML text to the tree representation
\ No newline at end of file diff --git a/helm/DEVEL/pxp/pxp/doc/manual/html/x1496.html b/helm/DEVEL/pxp/pxp/doc/manual/html/x1496.html deleted file mode 100644 index faea39fc6..000000000 --- a/helm/DEVEL/pxp/pxp/doc/manual/html/x1496.html +++ /dev/null @@ -1,442 +0,0 @@ -Details of the mapping from XML text to the tree representation
The PXP user's guide
PrevChapter 3. The objects representing the documentNext

3.4. Details of the mapping from XML text to the tree representation

3.4.1. The representation of character-free elements

If an element declaration does not allow the element to -contain character data, the following rules apply.

If the element must be empty, i.e. it is declared with the -keyword EMPTY, the element instance must be effectively -empty (it must not even contain whitespace characters). The parser guarantees -that a declared EMPTY element does never contain a data -node, even if the data node represents the empty string.

If the element declaration only permits other elements to occur -within that element but not character data, it is still possible to insert -whitespace characters between the subelements. The parser ignores these -characters, too, and does not create data nodes for them.

Example. Consider the following element types: - -

<!ELEMENT x ( #PCDATA | z )* >
-<!ELEMENT y ( z )* >
-<!ELEMENT z EMPTY>
- -Only x may contain character data, the keyword -#PCDATA indicates this. The other types are character-free.

The XML term - -

<x><z/> <z/></x>
- -will be internally represented by an element node for x -with three subnodes: the first z element, a data node -containing the space character, and the second z element. -In contrast to this, the term - -
<y><z/> <z/></y>
- -is represented by an element node for y with only -two subnodes, the two z elements. There -is no data node for the space character because spaces are ignored in the -character-free element y.

3.4.2. The representation of character data

The XML specification allows all Unicode characters in XML -texts. This parser can be configured such that UTF-8 is used to represent the -characters internally; however, the default character encoding is -ISO-8859-1. (Currently, no other encodings are possible for the internal string -representation; the type Pxp_types.rep_encoding enumerates -the possible encodings. Principially, the parser could use any encoding that is -ASCII-compatible, but there are currently only lexical analyzers for UTF-8 and -ISO-8859-1. It is currently impossible to use UTF-16 or UCS-4 as internal -encodings (or other multibyte encodings which are not ASCII-compatible) unless -major parts of the parser are rewritten - unlikely...)

The internal encoding may be different from the external encoding (specified -in the XML declaration <?xml ... encoding="..."?>); in -this case the strings are automatically converted to the internal encoding.

If the internal encoding is ISO-8859-1, it is possible that there are -characters that cannot be represented. In this case, the parser ignores such -characters and prints a warning (to the collect_warning -object that must be passed when the parser is called).

The XML specification allows lines to be separated by single LF -characters, by CR LF character sequences, or by single CR -characters. Internally, these separators are always converted to single LF -characters.

The parser guarantees that there are never two adjacent data -nodes; if necessary, data material that would otherwise be represented by -several nodes is collapsed into one node. Note that you can still create node -trees with adjacent data nodes; however, the parser does not return such trees.

Note that CDATA sections are not represented specially; such -sections are added to the current data material that being collected for the -next data node.

3.4.3. The representation of entities within documents

Entities are not represented within -documents! If the parser finds an entity reference in the document -content, the reference is immediately expanded, and the parser reads the -expansion text instead of the reference.

3.4.4. The representation of attributes

As attribute -values are composed of Unicode characters, too, the same problems with the -character encoding arise as for character material. Attribute values are -converted to the internal encoding, too; and if there are characters that -cannot be represented, these are dropped, and a warning is printed.

Attribute values are normalized before they are returned by -methods like attribute. First, any remaining entity -references are expanded; if necessary, expansion is performed recursively. -Second, newline characters (any of LF, CR LF, or CR characters) are converted -to single space characters. Note that especially the latter action is -prescribed by the XML standard (but is not converted -such that it is still possible to include line feeds into attributes).

3.4.5. The representation of processing instructions

Processing instructions are parsed to some extent: The first word of the -PI is called the target, and it is stored separated from the rest of the PI: - -

<?target rest?>
- -The exact location where a PI occurs is not represented (by default). The -parser puts the PI into the object that represents the embracing construct (an -element, a DTD, or the whole document); that means you can find out which PIs -occur in a certain element, in the DTD, or in the whole document, but you -cannot lookup the exact position within the construct.

If you require the exact location of PIs, it is possible to -create extra nodes for them. This mode is controled by the option -enable_pinstr_nodes. The additional nodes have the node type -T_pinstr target, and are created -from special exemplars contained in the spec (see -pxp_document.mli).

3.4.6. The representation of comments

Normally, comments are not represented; they are dropped by -default. However, if you require them, it is possible to create -T_comment nodes for them. This mode can be specified by the -option enable_comment_nodes. Comment nodes are created from -special exemplars contained in the spec (see -pxp_document.mli). You can access the contents of comments through the -method comment.

3.4.7. The attributes xml:lang and -xml:space

These attributes are not supported specially; they are handled -like any other attribute.

3.4.8. And what about namespaces?

Currently, there is no special support for namespaces. -However, the parser allows it that the colon occurs in names such that it is -possible to implement namespaces on top of the current API.

Some future release of PXP will support namespaces as built-in -feature...


PrevHomeNext
The class type extensionUpConfiguring and calling the parser
\ No newline at end of file diff --git a/helm/DEVEL/pxp/pxp/doc/manual/html/x1629.html b/helm/DEVEL/pxp/pxp/doc/manual/html/x1629.html deleted file mode 100644 index 06b1e60ea..000000000 --- a/helm/DEVEL/pxp/pxp/doc/manual/html/x1629.html +++ /dev/null @@ -1,895 +0,0 @@ -Resolvers and sources
The PXP user's guide
PrevChapter 4. Configuring and calling the parserNext

4.2. Resolvers and sources

4.2.1. Using the built-in resolvers (called sources)

The type source enumerates the two -possibilities where the document to parse comes from. - -

type source =
-    Entity of ((dtd -> Pxp_entity.entity) * Pxp_reader.resolver)
-  | ExtID of (ext_id * Pxp_reader.resolver)
- -You normally need not to worry about this type as there are convenience -functions that create source values: - - -

  • from_file s: The document is read from -file s; you may specify absolute or relative path names. -The file name must be encoded as UTF-8 string.

    There is an optional argument ~system_encoding -specifying the character encoding which is used for the names of the file -system. For example, if this encoding is ISO-8859-1 and s is -also a ISO-8859-1 string, you can form the source: - -

    let s_utf8  =  recode_string ~in_enc:`Enc_iso88591 ~out_enc:`Enc_utf8 s in
    -from_file ~system_encoding:`Enc_iso88591 s_utf8

    This source has the advantage that -it is able to resolve inner external entities; i.e. if your document includes -data from another file (using the SYSTEM attribute), this -mode will find that file. However, this mode cannot resolve -PUBLIC identifiers nor SYSTEM identifiers -other than "file:".

  • from_channel ch: The document is read -from the channel ch. In general, this source also supports -file URLs found in the document; however, by default only absolute URLs are -understood. It is possible to associate an ID with the channel such that the -resolver knows how to interpret relative URLs: - -

    from_channel ~id:(System "file:///dir/dir1/") ch
    - -There is also the ~system_encoding argument specifying how file names are -encoded. - The example from above can also be written (but it is no -longer possible to interpret relative URLs because there is no ~id argument, -and computing this argument is relatively complicated because it must -be a valid URL): - -
    let ch = open_in s in
    -let src = from_channel ~system_encoding:`Enc_iso88591 ch in
    -...;
    -close_in ch

  • from_string s: The string -s is the document to parse. This mode is not able to -interpret file names of SYSTEM clauses, nor it can look up -PUBLIC identifiers.

    Normally, the encoding of the string is detected as usual -by analyzing the XML declaration, if any. However, it is also possible to -specify the encoding directly: - -

    let src = from_string ~fixenc:`ISO-8859-2 s

  • ExtID (id, r): The document to parse -is denoted by the identifier id (either a -SYSTEM or PUBLIC clause), and this -identifier is interpreted by the resolver r. Use this mode -if you have written your own resolver.

    Which character sets are possible depends on the passed -resolver r.

  • Entity (get_entity, r): The document -to parse is returned by the function invocation get_entity -dtd, where dtd is the DTD object to use (it may be -empty). Inner external references occuring in this entity are resolved using -the resolver r.

    Which character sets are possible depends on the passed -resolver r.

4.2.2. The resolver API

A resolver is an object that can be opened like a file, but you -do not pass the file name to the resolver, but the XML identifier of the entity -to read from (either a SYSTEM or PUBLIC -clause). When opened, the resolver must return the -Lexing.lexbuf that reads the characters. The resolver can -be closed, and it can be cloned. Furthermore, it is possible to tell the -resolver which character set it should assume. - The following from Pxp_reader: - -

exception Not_competent
-exception Not_resolvable of exn
-
-class type resolver =
-  object
-    method init_rep_encoding : rep_encoding -> unit
-    method init_warner : collect_warnings -> unit
-    method rep_encoding : rep_encoding
-    method open_in : ext_id -> Lexing.lexbuf
-    method close_in : unit
-    method change_encoding : string -> unit
-    method clone : resolver
-    method close_all : unit
-  end
- -The resolver object must work as follows:

  • When the parser is called, it tells the resolver the -warner object and the internal encoding by invoking -init_warner and init_rep_encoding. The -resolver should store these values. The method rep_encoding -should return the internal encoding.

  • If the parser wants to read from the resolver, it invokes -the method open_in. Either the resolver succeeds, in which -case the Lexing.lexbuf reading from the file or stream must -be returned, or opening fails. In the latter case the method implementation -should raise an exception (see below).

  • If the parser finishes reading, it calls the -close_in method.

  • If the parser finds a reference to another external -entity in the input stream, it calls clone to get a second -resolver which must be initially closed (not yet connected with an input -stream). The parser then invokes open_in and the other -methods as described.

  • If you already know the character set of the input -stream, you should recode it to the internal encoding, and define the method -change_encoding as an empty method.

  • If you want to support multiple external character sets, -the object must follow a much more complicated protocol. Directly after -open_in has been called, the resolver must return a lexical -buffer that only reads one byte at a time. This is only possible if you create -the lexical buffer with Lexing.from_function; the function -must then always return 1 if the EOF is not yet reached, and 0 if EOF is -reached. If the parser has read the first line of the document, it will invoke -change_encoding to tell the resolver which character set to -assume. From this moment, the object can return more than one byte at once. The -argument of change_encoding is either the parameter of the -"encoding" attribute of the XML declaration, or the empty string if there is -not any XML declaration or if the declaration does not contain an encoding -attribute.

    At the beginning the resolver must only return one -character every time something is read from the lexical buffer. The reason for -this is that you otherwise would not exactly know at which position in the -input stream the character set changes.

    If you want automatic recognition of the character set, -it is up to the resolver object to implement this.

  • If an error occurs, the parser calls the method -close_all for the top-level resolver; this method should -close itself (if not already done) and all clones.

Exceptions. It is possible to chain resolvers such that when the first resolver is not able -to open the entity, the other resolvers of the chain are tried in turn. The -method open_in should raise the exception -Not_competent to indicate that the next resolver should try -to open the entity. If the resolver is able to handle the ID, but some other -error occurs, the exception Not_resolvable should be raised -to force that the chain breaks. -

Example: How to define a resolver that is equivalent to -from_string: ...

4.2.3. Predefined resolver components

There are some classes in Pxp_reader that define common resolver behaviour. - -

class resolve_read_this_channel : 
-    ?id:ext_id -> 
-    ?fixenc:encoding -> 
-    ?auto_close:bool -> 
-    in_channel -> 
-        resolver
- -Reads from the passed channel (it may be even a pipe). If the -~id argument is passed to the object, the created resolver -accepts only this ID. Otherwise all IDs are accepted. - Once the resolver has -been cloned, it does not accept any ID. This means that this resolver cannot -handle inner references to external entities. Note that you can combine this -resolver with another resolver that can handle inner references (such as -resolve_as_file); see class 'combine' below. - If you pass the -~fixenc argument, the encoding of the channel is set to the -passed value, regardless of any auto-recognition or any XML declaration. - If -~auto_close = true (which is the default), the channel is -closed after use. If ~auto_close = false, the channel is -left open. -

class resolve_read_any_channel : 
-    ?auto_close:bool -> 
-    channel_of_id:(ext_id -> (in_channel * encoding option)) -> 
-        resolver
- -This resolver calls the function ~channel_of_id to open a -new channel for the passed ext_id. This function must either -return the channel and the encoding, or it must fail with Not_competent. The -function must return None as encoding if the default -mechanism to recognize the encoding should be used. It must return -Some e if it is already known that the encoding of the -channel is e. If ~auto_close = true -(which is the default), the channel is closed after use. If -~auto_close = false, the channel is left open.

class resolve_read_url_channel :
-    ?base_url:Neturl.url ->
-    ?auto_close:bool -> 
-    url_of_id:(ext_id -> Neturl.url) -> 
-    channel_of_url:(Neturl.url -> (in_channel * encoding option)) -> 
-        resolver
- -When this resolver gets an ID to read from, it calls the function -~url_of_id to get the corresponding URL. This URL may be a -relative URL; however, a URL scheme must be used which contains a path. The -resolver converts the URL to an absolute URL if necessary. The second -function, ~channel_of_url, is fed with the absolute URL as -input. This function opens the resource to read from, and returns the channel -and the encoding of the resource.

Both functions, ~url_of_id and -~channel_of_url, can raise Not_competent to indicate that -the object is not able to read from the specified resource. However, there is a -difference: A Not_competent from ~url_of_id is left as it -is, but a Not_competent from ~channel_of_url is converted to -Not_resolvable. So only ~url_of_id decides which URLs are -accepted by the resolver and which not.

The function ~channel_of_url must return -None as encoding if the default mechanism to recognize the -encoding should be used. It must return Some e if it is -already known that the encoding of the channel is e.

If ~auto_close = true (which is the default), the channel is -closed after use. If ~auto_close = false, the channel is -left open.

Objects of this class contain a base URL relative to which relative URLs are -interpreted. When creating a new object, you can specify the base URL by -passing it as ~base_url argument. When an existing object is -cloned, the base URL of the clone is the URL of the original object. - Note -that the term "base URL" has a strict definition in RFC 1808.

class resolve_read_this_string : 
-    ?id:ext_id -> 
-    ?fixenc:encoding -> 
-    string -> 
-        resolver
- -Reads from the passed string. If the ~id argument is passed -to the object, the created resolver accepts only this ID. Otherwise all IDs are -accepted. - Once the resolver has been cloned, it does not accept any ID. This -means that this resolver cannot handle inner references to external -entities. Note that you can combine this resolver with another resolver that -can handle inner references (such as resolve_as_file); see class 'combine' -below. - If you pass the ~fixenc argument, the encoding of -the string is set to the passed value, regardless of any auto-recognition or -any XML declaration.

class resolve_read_any_string : 
-    string_of_id:(ext_id -> (string * encoding option)) -> 
-        resolver
- -This resolver calls the function ~string_of_id to get the -string for the passed ext_id. This function must either -return the string and the encoding, or it must fail with Not_competent. The -function must return None as encoding if the default -mechanism to recognize the encoding should be used. It must return -Some e if it is already known that the encoding of the -string is e.

class resolve_as_file :
-    ?file_prefix:[ `Not_recognized | `Allowed | `Required ] ->
-    ?host_prefix:[ `Not_recognized | `Allowed | `Required ] ->
-    ?system_encoding:encoding ->
-    ?url_of_id:(ext_id -> Neturl.url) -> 
-    ?channel_of_url: (Neturl.url -> (in_channel * encoding option)) ->
-    unit -> 
-        resolver
-Reads from the local file system. Every file name is interpreted as -file name of the local file system, and the referred file is read.

The full form of a file URL is: file://host/path, where -'host' specifies the host system where the file identified 'path' -resides. host = "" or host = "localhost" are accepted; other values -will raise Not_competent. The standard for file URLs is -defined in RFC 1738.

Option ~file_prefix: Specifies how the "file:" prefix of -file names is handled: -

  • `Not_recognized:The prefix is not -recognized.

  • `Allowed: The prefix is allowed but -not required (the default).

  • `Required: The prefix is -required.

Option ~host_prefix: Specifies how the "//host" phrase of -file names is handled: -

  • `Not_recognized:The prefix is not -recognized.

  • `Allowed: The prefix is allowed but -not required (the default).

  • `Required: The prefix is -required.

Option ~system_encoding: Specifies the encoding of file -names of the local file system. Default: UTF-8.

Options ~url_of_id, ~channel_of_url: Not -for the casual user!

class combine : 
-    ?prefer:resolver -> 
-    resolver list -> 
-        resolver
- -Combines several resolver objects. If a concrete entity with an -ext_id is to be opened, the combined resolver tries the -contained resolvers in turn until a resolver accepts opening the entity -(i.e. it does not raise Not_competent on open_in).

Clones: If the 'clone' method is invoked before 'open_in', all contained -resolvers are cloned separately and again combined. If the 'clone' method is -invoked after 'open_in' (i.e. while the resolver is open), additionally the -clone of the active resolver is flagged as being preferred, i.e. it is tried -first.


PrevHomeNext
Configuring and calling the parserUpThe DTD classes
\ No newline at end of file diff --git a/helm/DEVEL/pxp/pxp/doc/manual/html/x1812.html b/helm/DEVEL/pxp/pxp/doc/manual/html/x1812.html deleted file mode 100644 index 34f09c208..000000000 --- a/helm/DEVEL/pxp/pxp/doc/manual/html/x1812.html +++ /dev/null @@ -1,517 +0,0 @@ -The DTD classes
The PXP user's guide
PrevChapter 4. Configuring and calling the parserNext

4.3. The DTD classes

Sorry, not yet -written. Perhaps the interface definition of Pxp_dtd expresses the same:


(**********************************************************************)
-(*                                                                    *)
-(* Pxp_dtd:                                                           *)
-(*     Object model of document type declarations                     *)
-(*                                                                    *)
-(**********************************************************************)
-
-(* ======================================================================
- * OVERVIEW
- *
- * class dtd ............... represents the whole DTD, including element
- *                           declarations, entity declarations, notation
- *                           declarations, and processing instructions
- * class dtd_element ....... represents an element declaration consisting
- *                           of a content model and an attribute list
- *                           declaration
- * class dtd_notation ...... represents a notation declaration
- * class proc_instruction .. represents a processing instruction
- * ======================================================================
- *
- *)
-
-
-class dtd :
-  (* Creation:
-   *   new dtd
-   * creates a new, empty DTD object without any declaration, without a root
-   * element, without an ID.
-   *)
-  Pxp_types.collect_warnings -> 
-  Pxp_types.rep_encoding ->
-  object
-    method root : string option
-      (* get the name of the root element if present *)
-
-    method set_root : string -> unit
-      (* set the name of the root element. This method can be invoked 
-       * only once
-       *)
-
-    method id : Pxp_types.dtd_id option
-      (* get the identifier for this DTD *)
-
-    method set_id : Pxp_types.dtd_id -> unit
-      (* set the identifier. This method can be invoked only once *)
-
-    method encoding : Pxp_types.rep_encoding
-      (* returns the encoding used for character representation *)
-
-
-    method allow_arbitrary : unit
-      (* After this method has been invoked, the object changes its behaviour:
-       * - elements and notations that have not been added may be used in an
-       *   arbitrary way; the methods "element" and "notation" indicate this
-       *   by raising Undeclared instead of Validation_error.
-       *)
-
-    method disallow_arbitrary : unit
-
-    method arbitrary_allowed : bool
-      (* Returns whether arbitrary contents are allowed or not. *)
-
-    method standalone_declaration : bool
-      (* Whether there is a 'standalone' declaration or not. Strictly 
-       * speaking, this declaration is not part of the DTD, but it is
-       * included here because of practical reasons. 
-       * If not set, this property defaults to 'false'.
-       *)
-
-    method set_standalone_declaration : bool -> unit
-      (* Sets the 'standalone' declaration. *)
-
-
-    method add_element : dtd_element -> unit
-      (* add the given element declaration to this DTD. Raises Not_found
-       * if there is already an element declaration with the same name.
-       *)
-
-    method add_gen_entity : Pxp_entity.entity -> bool -> unit
-      (* add_gen_entity e extdecl:
-       * add the entity 'e' as general entity to this DTD (general entities
-       * are those represented by &name;). If there is already a declaration
-       * with the same name, the second definition is ignored; as exception from
-       * this rule, entities with names "lt", "gt", "amp", "quot", and "apos"
-       * may only be redeclared with a definition that is equivalent to the
-       * standard definition; otherwise a Validation_error is raised.
-       *
-       * 'extdecl': 'true' indicates that the entity declaration occurs in
-       * an external entity. (Used for the standalone check.)
-       *)
-
-    method add_par_entity : Pxp_entity.entity -> unit
-      (* add the given entity as parameter entity to this DTD (parameter
-       * entities are those represented by %name;). If there is already a 
-       * declaration with the same name, the second definition is ignored.
-       *)
-
-    method add_notation : dtd_notation -> unit
-      (* add the given notation to this DTD. If there is already a declaration
-       * with the same name, a Validation_error is raised.
-       *)
-
-    method add_pinstr : proc_instruction -> unit
-      (* add the given processing instruction to this DTD. *)
-
-    method element : string -> dtd_element
-      (* looks up the element declaration with the given name. Raises 
-       * Validation_error if the element cannot be found. (If "allow_arbitrary"
-       * has been invoked before, Unrestricted is raised instead.)
-       *)
-
-    method element_names : string list
-      (* returns the list of the names of all element declarations. *)
-
-    method gen_entity : string -> (Pxp_entity.entity * bool)
-      (* let e, extdecl = obj # gen_entity n:
-       * looks up the general entity 'e' with the name 'n'. Raises
-       * WF_error if the entity cannot be found.
-       * 'extdecl': indicates whether the entity declaration occured in an 
-       * external entity.
-       *)
-
-    method gen_entity_names : string list
-      (* returns the list of all general entity names *)
-
-    method par_entity : string -> Pxp_entity.entity
-      (* looks up the parameter entity with the given name. Raises
-       * WF_error if the entity cannot be found.
-       *)
-
-    method par_entity_names : string list
-      (* returns the list of all parameter entity names *)
-
-    method notation : string -> dtd_notation
-      (* looks up the notation declaration with the given name. Raises
-       * Validation_error if the notation cannot be found. (If "allow_arbitrary"
-       * has been invoked before, Unrestricted is raised instead.)
-       *)
-
-    method notation_names : string list
-      (* Returns the list of the names of all added notations *)
-
-    method pinstr : string -> proc_instruction list
-      (* looks up all processing instructions with the given target.
-       * The "target" is the identifier following "<?".
-       * Note: It is not possible to find out the exact position of the
-       * processing instruction.
-       *)
-
-    method pinstr_names : string list
-      (* Returns the list of the names (targets) of all added pinstrs *)
-
-    method validate : unit
-      (* ensures that the DTD is valid. This method is optimized such that
-       * actual validation is only performed if DTD has changed.
-       * If the DTD is invalid, mostly a Validation_error is raised,
-       * but other exceptions are possible, too.
-       *)
-
-    method only_deterministic_models : unit
-      (* Succeeds if all regexp content models are deterministic. 
-       * Otherwise Validation_error.
-       *)
-
-    method write : Pxp_types.output_stream -> Pxp_types.encoding -> bool -> unit
-      (* write_compact_as_latin1 os enc doctype:
-       * Writes the DTD as 'enc'-encoded string to 'os'. If 'doctype', a 
-       * DTD like <!DOCTYPE root [ ... ]> is written. If 'not doctype',
-       * only the declarations are written (the material within the
-       * square brackets).
-       *)
-
-    method write_compact_as_latin1 : Pxp_types.output_stream -> bool -> unit
-      (* DEPRECATED METHOD; included only to keep compatibility with
-       * older versions of the parser
-       *)
-
-
-    (*----------------------------------------*)
-    method invalidate : unit
-      (* INTERNAL METHOD *)
-    method warner : Pxp_types.collect_warnings
-      (* INTERNAL METHOD *)
-  end
-
-
-
-(* ---------------------------------------------------------------------- *)
-
-and dtd_element : dtd -> string -> 
-  (* Creation:
-   *   new dtd_element init_dtd init_name:
-   * creates a new dtd_element object for init_dtd with init_name.
-   * The strings are represented in the same encoding as init_dtd.
-   *)
-  object
-
-    method name : string
-      (* returns the name of the declared element *)
-
-    method externally_declared : bool
-      (* returns whether the element declaration occurs in an external
-       * entity.
-       *)
-
-    method content_model : Pxp_types.content_model_type
-      (* get the content model of this element declaration, or Unspecified *)
-
-    method content_dfa : Pxp_dfa.dfa_definition option
-      (* return the DFA of the content model if there is a DFA, or None.
-       * A DFA exists only for regexp style content models which are
-       * deterministic.
-       *)
-
-    method set_cm_and_extdecl : Pxp_types.content_model_type -> bool -> unit
-      (* set_cm_and_extdecl cm extdecl:
-       * set the content model to 'cm'. Once the content model is not 
-       * Unspecified, it cannot be set to a different value again.
-       * Furthermore, it is set whether the element occurs in an external
-       * entity ('extdecl').
-       *)
-
-    method encoding : Pxp_types.rep_encoding
-      (* Return the encoding of the strings *)
-
-    method allow_arbitrary : unit
-      (* After this method has been invoked, the object changes its behaviour:
-       * - attributes that have not been added may be used in an
-       *   arbitrary way; the method "attribute" indicates this
-       *   by raising Undeclared instead of Validation_error.
-       *)
-
-    method disallow_arbitrary : unit
-
-    method arbitrary_allowed : bool
-      (* Returns whether arbitrary attributes are allowed or not. *)
-
-    method attribute : string -> 
-                         Pxp_types.att_type * Pxp_types.att_default
-      (* get the type and default value of a declared attribute, or raise
-       * Validation_error if the attribute does not exist.
-       * If 'arbitrary_allowed', the exception Undeclared is raised instead
-       * of Validation_error.
-       *)
-
-    method attribute_violates_standalone_declaration : 
-               string -> string option -> bool
-      (* attribute_violates_standalone_declaration name v:
-       * Checks whether the attribute 'name' violates the "standalone"
-       * declaration if it has value 'v'.
-       * The method returns true if:
-       * - The attribute declaration occurs in an external entity, 
-       * and if one of the two conditions holds:
-       * - v = None, and there is a default for the attribute value
-       * - v = Some s, and the type of the attribute is not CDATA,
-       *   and s changes if normalized according to the rules of the
-       *   attribute type.
-       *
-       * The method raises Validation_error if the attribute does not exist.
-       * If 'arbitrary_allowed', the exception Undeclared is raised instead
-       * of Validation_error.
-       *)
-
-    method attribute_names : string list
-      (* get the list of all declared attributes *)
-
-    method names_of_required_attributes : string list
-      (* get the list of all attributes that are specified as required 
-       * attributes
-       *)
-
-    method id_attribute_name : string option
-      (* Returns the name of the attribute with type ID, or None. *)
-
-    method idref_attribute_names : string list
-      (* Returns the names of the attributes with type IDREF or IDREFS. *)
-
-    method add_attribute : string -> 
-                           Pxp_types.att_type -> 
-			   Pxp_types.att_default -> 
-			   bool ->
-			     unit
-      (* add_attribute name type default extdecl:
-       * add an attribute declaration for an attribute with the given name,
-       * type, and default value. If there is more than one declaration for
-       * an attribute name, the first declaration counts; the other declarations
-       * are ignored.
-       * 'extdecl': if true, the attribute declaration occurs in an external
-       * entity. This property is used to check the "standalone" attribute.
-       *)
-
-    method validate : unit
-      (* checks whether this element declaration (i.e. the content model and
-       * all attribute declarations) is valid for the associated DTD.
-       * Raises mostly Validation_error if the validation fails.
-       *)
-
-    method write : Pxp_types.output_stream -> Pxp_types.encoding -> unit
-      (* write_compact_as_latin1 os enc:
-       * Writes the <!ELEMENT ... > declaration to 'os' as 'enc'-encoded string.
-       *)
-
-    method write_compact_as_latin1 : Pxp_types.output_stream -> unit
-      (* DEPRECATED METHOD; included only to keep compatibility with
-       * older versions of the parser
-       *)
-  end
-
-(* ---------------------------------------------------------------------- *)
-
-and dtd_notation : string -> Pxp_types.ext_id -> Pxp_types.rep_encoding ->
-  (* Creation:
-   *    new dtd_notation a_name an_external_ID init_encoding
-   * creates a new dtd_notation object with the given name and the given
-   * external ID.
-   *)
-  object
-    method name : string
-    method ext_id : Pxp_types.ext_id
-    method encoding : Pxp_types.rep_encoding
-
-    method write : Pxp_types.output_stream -> Pxp_types.encoding -> unit
-      (* write_compact_as_latin1 os enc:
-       * Writes the <!NOTATION ... > declaration to 'os' as 'enc'-encoded 
-       * string.
-       *)
-
-    method write_compact_as_latin1 : Pxp_types.output_stream -> unit
-      (* DEPRECATED METHOD; included only to keep compatibility with
-       * older versions of the parser
-       *)
-
-  end
-
-(* ---------------------------------------------------------------------- *)
-
-and proc_instruction : string -> string -> Pxp_types.rep_encoding ->
-  (* Creation:
-   *   new proc_instruction a_target a_value
-   * creates a new proc_instruction object with the given target string and
-   * the given value string. 
-   * Note: A processing instruction is written as <?target value?>. 
-   *)
-  object
-    method target : string
-    method value : string
-    method encoding : Pxp_types.rep_encoding
-
-    method write : Pxp_types.output_stream -> Pxp_types.encoding -> unit
-      (* write os enc:
-       * Writes the <?...?> PI to 'os' as 'enc'-encoded string.
-       *)
-
-    method write_compact_as_latin1 : Pxp_types.output_stream -> unit
-      (* DEPRECATED METHOD; included only to keep compatibility with
-       * older versions of the parser
-       *)
-
-    method parse_pxp_option : (string * string * (string * string) list)
-      (* Parses a PI containing a PXP option. Such PIs are formed like:
-       *   <?target option-name option-att="value" option-att="value" ... ?>
-       * The method returns a triple
-       *   (target, option-name, [option-att, value; ...])
-       * or raises Error.
-       *)
-
-  end
-
-;;


PrevHomeNext
Resolvers and sourcesUpInvoking the parser
\ No newline at end of file diff --git a/helm/DEVEL/pxp/pxp/doc/manual/html/x1818.html b/helm/DEVEL/pxp/pxp/doc/manual/html/x1818.html deleted file mode 100644 index b289a3674..000000000 --- a/helm/DEVEL/pxp/pxp/doc/manual/html/x1818.html +++ /dev/null @@ -1,779 +0,0 @@ -Invoking the parser
The PXP user's guide
PrevChapter 4. Configuring and calling the parserNext

4.4. Invoking the parser

Here a description of Pxp_yacc.

4.4.1. Defaults

The following defaults are available: - -

val default_config : config
-val default_extension : ('a node extension) as 'a
-val default_spec : ('a node extension as 'a) spec

4.4.2. Parsing functions

In the following, the term "closed document" refers to -an XML structure like - -

<!DOCTYPE ... [ declarations ] >
-<root>
-...
-</root>
- -The term "fragment" refers to an XML structure like - -
<root>
-...
-</root>
- -i.e. only to one isolated element instance.

val parse_dtd_entity : config -> source -> dtd
- -Parses the declarations which are contained in the entity, and returns them as -dtd object.

val extract_dtd_from_document_entity : config -> source -> dtd
- -Extracts the DTD from a closed document. Both the internal and the external -subsets are extracted and combined to one dtd object. This -function does not parse the whole document, but only the parts that are -necessary to extract the DTD.

val parse_document_entity : 
-    ?transform_dtd:(dtd -> dtd) ->
-    ?id_index:('ext index) ->
-    config -> 
-    source -> 
-    'ext spec -> 
-        'ext document
- -Parses a closed document and validates it against the DTD that is contained in -the document (internal and external subsets). The option -~transform_dtd can be used to transform the DTD in the -document, and to use the transformed DTD for validation. If -~id_index is specified, an index of all ID attributes is -created.

val parse_wfdocument_entity : 
-    config -> 
-    source -> 
-    'ext spec -> 
-        'ext document
- -Parses a closed document, but checks it only on well-formedness.

val parse_content_entity  : 
-    ?id_index:('ext index) ->
-    config ->  
-    source -> 
-    dtd -> 
-    'ext spec -> 
-        'ext node
- -Parses a fragment, and validates the element.

val parse_wfcontent_entity : 
-    config -> 
-    source -> 
-    'ext spec -> 
-        'ext node
- -Parses a fragment, but checks it only on well-formedness.

4.4.3. Configuration options

type config =
-    { warner : collect_warnings;
-      errors_with_line_numbers : bool;
-      enable_pinstr_nodes : bool;
-      enable_super_root_node : bool;
-      enable_comment_nodes : bool;
-      encoding : rep_encoding;
-      recognize_standalone_declaration : bool;
-      store_element_positions : bool;
-      idref_pass : bool;
-      validate_by_dfa : bool;
-      accept_only_deterministic_models : bool;
-      ...
-    }
- -

  • warner:The parser prints -warnings by invoking the method warn for this warner -object. (Default: all warnings are dropped)

  • errors_with_line_numbers:If -true, errors contain line numbers; if false, errors contain only byte -positions. The latter mode is faster. (Default: true)

  • enable_pinstr_nodes:If true, -the parser creates extra nodes for processing instructions. If false, -processing instructions are simply added to the element or document surrounding -the instructions. (Default: false)

  • enable_super_root_node:If -true, the parser creates an extra node which is the parent of the root of the -document tree. This node is called super root; it is an element with type -T_super_root. - If there are processing instructions outside -the root element and outside the DTD, they are added to the super root instead -of the document. - If false, the super root node is not created. (Default: -false)

  • enable_comment_nodes:If true, -the parser creates nodes for comments with type T_comment; -if false, such nodes are not created. (Default: false)

  • encoding:Specifies the -internal encoding of the parser. Most strings are then represented according to -this encoding; however there are some exceptions (especially -ext_id values which are always UTF-8 encoded). -(Default: `Enc_iso88591)

  • recognize_standalone_declaration: If true and if the parser is -validating, the standalone="yes" declaration forces that it -is checked whether the document is a standalone document. - If false, or if the -parser is in well-formedness mode, such declarations are ignored. -(Default: true)

  • store_element_positions: If -true, for every non-data node the source position is stored. If false, the -position information is lost. If available, you can get the positions of nodes -by invoking the position method. -(Default: true)

  • idref_pass:If true and if -there is an ID index, the parser checks whether every IDREF or IDREFS attribute -refer to an existing node; this requires that the parser traverses the whole -doument tree. If false, this check is left out. (Default: false)

  • validate_by_dfa:If true and if -the content model for an element type is deterministic, a deterministic finite -automaton is used to validate whether the element contents match the content -model of the type. If false, or if a DFA is not available, a backtracking -algorithm is used for validation. (Default: true)

  • accept_only_deterministic_models: If true, only deterministic content -models are accepted; if false, any syntactically correct content models can be -processed. (Default: true)

4.4.4. Which configuration should I use?

First, I recommend to vary the default configuration instead of -creating a new configuration record. For instance, to set -idref_pass to true, change the default -as in: -

let config = { default_config with idref_pass = true }
-The background is that I can add more options to the record in future versions -of the parser without breaking your programs.

Do I need extra nodes for processing instructions? By default, such nodes are not created. This does not mean that the -processing instructions are lost; however, you cannot find out the exact -location where they occur. For example, the following XML text - -

<x><?pi1?><y/><?pi2?></x> 
- -will normally create one element node for x containing -one subnode for y. The processing -instructions are attached to x in a separate hash table; you -can access them using x # pinstr "pi1" and x # -pinstr "pi2", respectively. The information is lost where the -instructions occur within x.

If the option enable_pinstr_nodes is -turned on, the parser creates extra nodes pi1 and -pi2 such that the subnodes of x are now: - -

x # sub_nodes = [ pi1; y; pi2 ]
- -The extra nodes contain the processing instructions in the usual way, i.e. you -can access them using pi1 # pinstr "pi1" and pi2 # -pinstr "pi2", respectively.

Note that you will need an exemplar for the PI nodes (see -make_spec_from_alist).

Do I need a super root node? By default, there is no super root node. The -document object refers directly to the node representing the -root element of the document, i.e. - -

doc # root = r
- -if r is the root node. This is sometimes inconvenient: (1) -Some algorithms become simpler if every node has a parent, even the root -node. (2) Some standards such as XPath call the "root node" the node whose -child represents the root of the document. (3) The super root node can serve -as a container for processing instructions outside the root element. Because of -these reasons, it is possible to create an extra super root node, whose child -is the root node: - -
doc # root = sr         &&
-sr # sub_nodes = [ r ]
- -When extra nodes are also created for processing instructions, these nodes can -be added to the super root node if they occur outside the root element (reason -(3)), and the order reflects the order in the source text.

Note that you will need an exemplar for the super root node -(see make_spec_from_alist).

What is the effect of the UTF-8 encoding? By default, the parser represents strings (with few -exceptions) as ISO-8859-1 strings. These are well-known, and there are tools -and fonts for this encoding.

However, internationalization may require that you switch over -to UTF-8 encoding. In most environments, the immediate effect will be that you -cannot read strings with character codes >= 160 any longer; your terminal will -only show funny glyph combinations. It is strongly recommended to install -Unicode fonts (GNU Unifont, -Markus Kuhn's fonts) and terminal emulators -that can handle UTF-8 byte sequences. Furthermore, a Unicode editor may -be helpful (such as Yudit). There are -also FAQ by -Markus Kuhn.

By setting encoding to -`Enc_utf8 all strings originating from the parsed XML -document are represented as UTF-8 strings. This includes not only character -data and attribute values but also element names, attribute names and so on, as -it is possible to use any Unicode letter to form such names. Strictly -speaking, PXP is only XML-compliant if the UTF-8 mode is used; otherwise it -will have difficulties when validating documents containing -non-ISO-8859-1-names.

This mode does not have any impact on the external -representation of documents. The character set assumed when reading a document -is set in the XML declaration, and character set when writing a document must -be passed to the write method.

How do I check that nodes exist which are referred by IDREF attributes? First, you must create an index of all occurring ID -attributes: - -

let index = new hash_index
- -This index must be passed to the parsing function: - -
parse_document_entity
-  ~id_index:(index :> index)
-  config source spec
- -Next, you must turn on the idref_pass mode: - -
let config = { default_config with idref_pass = true }
- -Note that now the whole document tree will be traversed, and every node will be -checked for IDREF and IDREFS attributes. If the tree is big, this may take some -time.

What are deterministic content models? These type of models can speed up the validation checks; -furthermore they ensure SGML-compatibility. In particular, a content model is -deterministic if the parser can determine the actually used alternative by -inspecting only the current token. For example, this element has -non-deterministic contents: - -

<!ELEMENT x ((u,v) | (u,y+) | v)>
- -If the first element in x is u, the -parser does not know which of the alternatives (u,v) or -(u,y+) will work; the parser must also inspect the second -element to be able to distinguish between the alternatives. Because such -look-ahead (or "guessing") is required, this example is -non-deterministic.

The XML standard demands that content models must be -deterministic. So it is recommended to turn the option -accept_only_deterministic_models on; however, PXP can also -process non-deterministic models using a backtracking algorithm.

Deterministic models ensure that validation can be performed in -linear time. In order to get the maximum benefits, PXP also implements a -special validator that profits from deterministic models; this is the -deterministic finite automaton (DFA). This validator is enabled per element -type if the element type has a deterministic model and if the option -validate_by_dfa is turned on.

In general, I expect that the DFA method is faster than the -backtracking method; especially in the worst case the DFA takes only linear -time. However, if the content model has only few alternatives and the -alternatives do not nest, the backtracking algorithm may be better.


PrevHomeNext
The DTD classesUpUpdates
\ No newline at end of file diff --git a/helm/DEVEL/pxp/pxp/doc/manual/html/x1965.html b/helm/DEVEL/pxp/pxp/doc/manual/html/x1965.html deleted file mode 100644 index 8fc856264..000000000 --- a/helm/DEVEL/pxp/pxp/doc/manual/html/x1965.html +++ /dev/null @@ -1,152 +0,0 @@ -Updates
The PXP user's guide
PrevChapter 4. Configuring and calling the parser 

4.5. Updates

Some (often later added) features that are otherwise -not explained in the manual but worth to be mentioned.

  • Methods node_position, node_path, nth_node, -previous_node, next_node for nodes: See pxp_document.mli

  • Functions to determine the document order of nodes: -compare, create_ord_index, ord_number, ord_compare: See pxp_document.mli


PrevHome 
Invoking the parserUp 
\ No newline at end of file diff --git a/helm/DEVEL/pxp/pxp/doc/manual/html/x468.html b/helm/DEVEL/pxp/pxp/doc/manual/html/x468.html deleted file mode 100644 index dc9cc1e8c..000000000 --- a/helm/DEVEL/pxp/pxp/doc/manual/html/x468.html +++ /dev/null @@ -1,474 +0,0 @@ -A complete example: The readme DTD
The PXP user's guide
PrevChapter 1. What is XML?Next

1.3. A complete example: The readme DTD

The reason for readme was that I often wrote two versions -of files such as README and INSTALL which explain aspects of a distributed -software archive; one version was ASCII-formatted, the other was written in -HTML. Maintaining both versions means double amount of work, and changes -of one version may be forgotten in the other version. To improve this situation -I invented the readme DTD which allows me to maintain only -one source written as XML document, and to generate the ASCII and the HTML -version from it.

In this section, I explain only the DTD. The readme DTD is -contained in the PXP distribution together with the two converters to -produce ASCII and HTML. Another section of this manual describes the HTML -converter.

The documents have a simple structure: There are up to three levels of nested -sections, paragraphs, item lists, footnotes, hyperlinks, and text emphasis. The -outermost element has usually the type readme, it is -declared by - -

<!ELEMENT readme (sect1+)>
-<!ATTLIST readme
-          title CDATA #REQUIRED>
- -This means that this element contains one or more sections of the first level -(element type sect1), and that the element has a required -attribute title containing character data (CDATA). Note that -readme elements must not contain text data.

The three levels of sections are declared as follows: - -

<!ELEMENT sect1 (title,(sect2|p|ul)+)>
-
-<!ELEMENT sect2 (title,(sect3|p|ul)+)>
-
-<!ELEMENT sect3 (title,(p|ul)+)>
- -Every section has a title element as first subelement. After -the title an arbitrary but non-empty sequence of inner sections, paragraphs and -item lists follows. Note that the inner sections must belong to the next higher -section level; sect3 elements must not contain inner -sections because there is no next higher level.

Obviously, all three declarations allow paragraphs (p) and -item lists (ul). The definition can be simplified at this -point by using a parameter entity: - -

<!ENTITY % p.like "p|ul">
-
-<!ELEMENT sect1 (title,(sect2|%p.like;)+)>
-
-<!ELEMENT sect2 (title,(sect3|%p.like;)+)>
-
-<!ELEMENT sect3 (title,(%p.like;)+)>
- -Here, the entity p.like is nothing but a macro abbreviating -the same sequence of declarations; if new elements on the same level as -p and ul are later added, it is -sufficient only to change the entity definition. Note that there are some -restrictions on the usage of entities in this context; most important, entities -containing a left paranthesis must also contain the corresponding right -paranthesis.

Note that the entity p.like is a -parameter entity, i.e. the ENTITY declaration contains a -percent sign, and the entity is referred to by -%p.like;. This kind of entity must be used to abbreviate -parts of the DTD; the general entities declared without -percent sign and referred to as &name; are not allowed -in this context.

The title element specifies the title of the section in -which it occurs. The title is given as character data, optionally interspersed -with line breaks (br): - -

<!ELEMENT title (#PCDATA|br)*>
- -Compared with the title attribute of -the readme element, this element allows inner markup -(i.e. br) while attribute values do not: It is an error if -an attribute value contains the left angle bracket < literally such that it -is impossible to include inner elements.

The paragraph element p has a structure similar to -title, but it allows more inner elements: - -

<!ENTITY % text "br|code|em|footnote|a">
-
-<!ELEMENT p (#PCDATA|%text;)*>
- -Line breaks do not have inner structure, so they are declared as being empty: - -
<!ELEMENT br EMPTY>
- -This means that really nothing is allowed within br; you -must always write <br></br> or abbreviated -<br/>.

Code samples should be marked up by the code tag; emphasized -text can be indicated by em: - -

<!ELEMENT code (#PCDATA)>
-
-<!ELEMENT em (#PCDATA|%text;)*>
- -That code elements are not allowed to contain further markup -while em elements do is a design decision by the author of -the DTD.

Unordered lists simply consists of one or more list items, and a list item may -contain paragraph-level material: - -

<!ELEMENT ul (li+)>
-
-<!ELEMENT li (%p.like;)*>
- -Footnotes are described by the text of the note; this text may contain -text-level markup. There is no mechanism to describe the numbering scheme of -footnotes, or to specify how footnote references are printed. - -
<!ELEMENT footnote (#PCDATA|%text;)*>
- -Hyperlinks are written as in HTML. The anchor tag contains the text describing -where the link points to, and the href attribute is the -pointer (as URL). There is no way to describe locations of "hash marks". If the -link refers to another readme document, the attribute -readmeref should be used instead of href. -The reason is that the converted document has usually a different system -identifier (file name), and the link to a converted document must be -converted, too. - -
<!ELEMENT a (#PCDATA)*>
-<!ATTLIST a 
-          href      CDATA #IMPLIED
-          readmeref CDATA #IMPLIED
->
- -Note that although it is only sensible to specify one of the two attributes, -the DTD has no means to express this restriction.

So far the DTD. Finally, here is a document for it: - -

<?xml version="1.0" encoding="ISO-8859-1"?>
-<!DOCTYPE readme SYSTEM "readme.dtd">
-<readme title="How to use the readme converters">
-<sect1>
-  <title>Usage</title>
-  <p>
-    The <em>readme</em> converter is invoked on the command line by:
-  </p>
-  <p>
-    <code>readme [ -text | -html ] input.xml</code>
-  </p>
-  <p>
-    Here a list of options:
-  </p>
-  <ul>
-    <li>
-      <p><code>-text</code>: specifies that ASCII output should be produced</p>
-    </li>
-    <li>
-      <p><code>-html</code>: specifies that HTML output should be produced</p>
-    </li>
-  </ul>
-  <p>
-    The input file must be given on the command line. The converted output is
-    printed to <em>stdout</em>.
-  </p>
-</sect1>
-<sect1>
-  <title>Author</title>
-  <p>
-    The program has been written by
-    <a href="mailto:Gerd.Stolpmann@darmstadt.netsurf.de">Gerd Stolpmann</a>.
-  </p>
-</sect1>
-</readme>


PrevHomeNext
Highlights of XMLUpUsing PXP
\ No newline at end of file diff --git a/helm/DEVEL/pxp/pxp/doc/manual/html/x550.html b/helm/DEVEL/pxp/pxp/doc/manual/html/x550.html deleted file mode 100644 index f2dcdd79b..000000000 --- a/helm/DEVEL/pxp/pxp/doc/manual/html/x550.html +++ /dev/null @@ -1,765 +0,0 @@ -How to parse a document from an application
The PXP user's guide
PrevChapter 2. Using PXPNext

2.2. How to parse a document from an application

Let me first give a rough overview of the object model of the parser. The -following items are represented by objects: - -

  • Documents: The document representation is more or less the -anchor for the application; all accesses to the parsed entities start here. It -is described by the class document contained in the module -Pxp_document. You can get some global information, such -as the XML declaration the document begins with, the DTD of the document, -global processing instructions, and most important, the document tree.

  • The contents of documents: The contents have the structure -of a tree: Elements contain other elements and text[1]. - -The common type to represent both kinds of content is node -which is a class type that unifies the properties of elements and character -data. Every node has a list of children (which is empty if the element is empty -or the node represents text); nodes may have attributes; nodes have always text -contents. There are two implementations of node, the class -element_impl for elements, and the class -data_impl for text data. You find these classes and class -types in the module Pxp_document, too.

    Note that attribute lists are represented by non-class values.

  • The node extension: For advanced usage, every node of the -document may have an associated extension which is simply -a second object. This object must have the three methods -clone, node, and -set_node as bare minimum, but you are free to add methods as -you want. This is the preferred way to add functionality to the document -tree[2]. The class type extension is -defined in Pxp_document, too.

  • The DTD: Sometimes it is necessary to access the DTD of a -document; the average application does not need this feature. The class -dtd describes DTDs, and makes it possible to get -representations of element, entity, and notation declarations as well as -processing instructions contained in the DTD. This class, and -dtd_element, dtd_notation, and -proc_instruction can be found in the module -Pxp_dtd. There are a couple of classes representing -different kinds of entities; these can be found in the module -Pxp_entity.

- -Additionally, the following modules play a role: - -

  • Pxp_yacc: Here the main parsing functions such as -parse_document_entity are located. Some additional types and -functions allow the parser to be configured in a non-standard way.

  • Pxp_types: This is a collection of basic types and -exceptions.

- -There are some further modules that are needed internally but are not part of -the API.

Let the document to be parsed be stored in a file called -doc.xml. The parsing process is started by calling the -function - -

val parse_document_entity : config -> source -> 'ext spec -> 'ext document
- -defined in the module Pxp_yacc. The first argument -specifies some global properties of the parser; it is recommended to start with -the default_config. The second argument determines where the -document to be parsed comes from; this may be a file, a channel, or an entity -ID. To parse doc.xml, it is sufficient to pass -from_file "doc.xml".

The third argument passes the object specification to use. Roughly -speaking, it determines which classes implement the node objects of which -element types, and which extensions are to be used. The 'ext -polymorphic variable is the type of the extension. For the moment, let us -simply pass default_spec as this argument, and ignore it.

So the following expression parses doc.xml: - -

open Pxp_yacc
-let d = parse_document_entity default_config (from_file "doc.xml") default_spec
- -Note that default_config implies that warnings are collected -but not printed. Errors raise one of the exception defined in -Pxp_types; to get readable errors and warnings catch the -exceptions as follows: - -
class warner =
-  object 
-    method warn w =
-      print_endline ("WARNING: " ^ w)
-  end
-;;
-
-try
-  let config = { default_config with warner = new warner } in
-  let d = parse_document_entity config (from_file "doc.xml") default_spec
-  in
-    ...
-with
-   e ->
-     print_endline (Pxp_types.string_of_exn e)
- -Now d is an object of the document -class. If you want the node tree, you can get the root element by - -
let root = d # root
- -and if you would rather like to access the DTD, determine it by - -
let dtd = d # dtd
- -As it is more interesting, let us investigate the node tree now. Given the root -element, it is possible to recursively traverse the whole tree. The children of -a node n are returned by the method -sub_nodes, and the type of a node is returned by -node_type. This function traverses the tree, and prints the -type of each node: - -
let rec print_structure n =
-  let ntype = n # node_type in
-  match ntype with
-    T_element name ->
-      print_endline ("Element of type " ^ name);
-      let children = n # sub_nodes in
-      List.iter print_structure children
-  | T_data ->
-      print_endline "Data"
-  | _ ->
-      (* Other node types are not possible unless the parser is configured
-         differently.
-       *)
-      assert false
- -You can call this function by - -
print_structure root
- -The type returned by node_type is either T_element -name or T_data. The name of the -element type is the string included in the angle brackets. Note that only -elements have children; data nodes are always leaves of the tree.

There are some more methods in order to access a parsed node tree: - -

  • n # parent: Returns the parent node, or raises -Not_found if the node is already the root

  • n # root: Returns the root of the node tree.

  • n # attribute a: Returns the value of the attribute with -name a. The method returns a value for every -declared attribute, independently of whether the attribute -instance is defined or not. If the attribute is not declared, -Not_found will be raised. (In well-formedness mode, every -attribute is considered as being implicitly declared with type -CDATA.)

    The following return values are possible: Value s, -Valuelist sl , and Implied_value. -The first two value types indicate that the attribute value is available, -either because there is a definition -a="value" -in the XML text, or because there is a default value (declared in the -DTD). Only if both the instance definition and the default declaration are -missing, the latter value Implied_value will be returned.

    In the DTD, every attribute is typed. There are single-value types (CDATA, ID, -IDREF, ENTITY, NMTOKEN, enumerations), in which case the method passes -Value s back, where s is the normalized -string value of the attribute. The other types (IDREFS, ENTITIES, NMTOKENS) -represent list values, and the parser splits the XML literal into several -tokens and returns these tokens as Valuelist sl.

    Normalization means that entity references (the -&name; tokens) and -character references -(&#number;) are replaced -by the text they represent, and that white space characters are converted into -plain spaces.

  • n # data: Returns the character data contained in the -node. For data nodes, the meaning is obvious as this is the main content of -data nodes. For element nodes, this method returns the concatenated contents of -all inner data nodes.

    Note that entity references included in the text are resolved while they are -being parsed; for example the text "a &lt;&gt; b" will be returned -as "a <> b" by this method. Spaces of data nodes are always -preserved. Newlines are preserved, but always converted to \n characters even -if newlines are encoded as \r\n or \r. Normally you will never see two adjacent -data nodes because the parser collapses all data material at one location into -one node. (However, if you create your own tree or transform the parsed tree, -it is possible to have adjacent data nodes.)

    Note that elements that do not allow #PCDATA as content -will not have data nodes as children. This means that spaces and newlines, the -only character material allowed for such elements, are silently dropped.

- -For example, if the task is to print all contents of elements with type -"valuable" whose attribute "priority" is "1", this function can help: - -
let rec print_valuable_prio1 n =
-  let ntype = n # node_type in
-  match ntype with
-    T_element "valuable" when n # attribute "priority" = Value "1" ->
-      print_endline "Valuable node with priotity 1 found:";
-      print_endline (n # data)
-  | (T_element _ | T_data) ->
-      let children = n # sub_nodes in
-      List.iter print_valuable_prio1 children
-  | _ ->
-      assert false
- -You can call this function by: - -
print_valuable_prio1 root
- -If you like a DSSSL-like style, you can make the function -process_children explicit: - -
let rec print_valuable_prio1 n =
-
-  let process_children n =
-    let children = n # sub_nodes in
-    List.iter print_valuable_prio1 children 
-  in
-
-  let ntype = n # node_type in
-  match ntype with
-    T_element "valuable" when n # attribute "priority" = Value "1" ->
-      print_endline "Valuable node with priority 1 found:";
-      print_endline (n # data)
-  | (T_element _ | T_data) ->
-      process_children n
-  | _ ->
-      assert false
- -So far, O'Caml is now a simple "style-sheet language": You can form a big -"match" expression to distinguish between all significant cases, and provide -different reactions on different conditions. But this technique has -limitations; the "match" expression tends to get larger and larger, and it is -difficult to store intermediate values as there is only one big -recursion. Alternatively, it is also possible to represent the various cases as -classes, and to use dynamic method lookup to find the appropiate class. The -next section explains this technique in detail.

Notes

[1]

Elements may -also contain processing instructions. Unlike other document models, PXP -separates processing instructions from the rest of the text and provides a -second interface to access them (method pinstr). However, -there is a parser option (enable_pinstr_nodes) which changes -the behaviour of the parser such that extra nodes for processing instructions -are included into the tree.

Furthermore, the tree does normally not contain nodes for XML comments; -they are ignored by default. Again, there is an option -(enable_comment_nodes) changing this.

[2]

Due to the typing system it is more or less impossible to -derive recursive classes in O'Caml. To get around this, it is common practice -to put the modifiable or extensible part of recursive objects into parallel -objects.


PrevHomeNext
Using PXPUpClass-based processing of the node tree
\ No newline at end of file diff --git a/helm/DEVEL/pxp/pxp/doc/manual/html/x675.html b/helm/DEVEL/pxp/pxp/doc/manual/html/x675.html deleted file mode 100644 index cf3f4737c..000000000 --- a/helm/DEVEL/pxp/pxp/doc/manual/html/x675.html +++ /dev/null @@ -1,538 +0,0 @@ -Class-based processing of the node tree
The PXP user's guide
PrevChapter 2. Using PXPNext

2.3. Class-based processing of the node tree

By default, the parsed node tree consists of objects of the same class; this is -a good design as long as you want only to access selected parts of the -document. For complex transformations, it may be better to use different -classes for objects describing different element types.

For example, if the DTD declares the element types a, -b, and c, and if the task is to convert -an arbitrary document into a printable format, the idea is to define for every -element type a separate class that has a method print. The -classes are eltype_a, eltype_b, and -eltype_c, and every class implements -print such that elements of the type corresponding to the -class are converted to the output format.

The parser supports such a design directly. As it is impossible to derive -recursive classes in O'Caml[1], the specialized element classes cannot be formed by -simply inheriting from the built-in classes of the parser and adding methods -for customized functionality. To get around this limitation, every node of the -document tree is represented by two objects, one called -"the node" and containing the recursive definition of the tree, one called "the -extension". Every node object has a reference to the extension, and the -extension has a reference to the node. The advantage of this model is that it -is now possible to customize the extension without affecting the typing -constraints of the recursive node definition.

Every extension must have the three methods clone, -node, and set_node. The method -clone creates a deep copy of the extension object and -returns it; node returns the node object for this extension -object; and set_node is used to tell the extension object -which node is associated with it, this method is automatically called when the -node tree is initialized. The following definition is a good starting point -for these methods; usually clone must be further refined -when instance variables are added to the class: - -

class custom_extension =
-  object (self)
-
-    val mutable node = (None : custom_extension node option)
-
-    method clone = {< >} 
-    method node =
-      match node with
-          None ->
-            assert false
-        | Some n -> n
-    method set_node n =
-      node <- Some n
-
-  end
- -This part of the extension is usually the same for all classes, so it is a good -idea to consider custom_extension as the super-class of the -further class definitions. Continuining the example of above, we can define the -element type classes as follows: - -
class virtual custom_extension =
-  object (self)
-    ... clone, node, set_node defined as above ...
-
-    method virtual print : out_channel -> unit
-  end
-
-class eltype_a =
-  object (self)
-    inherit custom_extension
-    method print ch = ...
-  end
-
-class eltype_b =
-  object (self)
-    inherit custom_extension
-    method print ch = ...
-  end
-
-class eltype_c =
-  object (self)
-    inherit custom_extension
-    method print ch = ...
-  end
- -The method print can now be implemented for every element -type separately. Note that you get the associated node by invoking - -
self # node
- -and you get the extension object of a node n by writing - -
n # extension
- -It is guaranteed that - -
self # node # extension == self
- -always holds.

Here are sample definitions of the print -methods: - -

class eltype_a =
-  object (self)
-    inherit custom_extension
-    method print ch = 
-      (* Nodes <a>...</a> are only containers: *)
-      output_string ch "(";
-      List.iter
-        (fun n -> n # extension # print ch)
-        (self # node # sub_nodes);
-      output_string ch ")";
-  end
-
-class eltype_b =
-  object (self)
-    inherit custom_extension
-    method print ch =
-      (* Print the value of the CDATA attribute "print": *)
-      match self # node # attribute "print" with
-        Value s       -> output_string ch s
-      | Implied_value -> output_string ch "<missing>"
-      | Valuelist l   -> assert false   
-                         (* not possible because the att is CDATA *)
-  end
-
-class eltype_c =
-  object (self)
-    inherit custom_extension
-    method print ch = 
-      (* Print the contents of this element: *)
-      output_string ch (self # node # data)
-  end
-
-class null_extension =
-  object (self)
-    inherit custom_extension
-    method print ch = assert false
-  end

The remaining task is to configure the parser such that these extension classes -are actually used. Here another problem arises: It is not possible to -dynamically select the class of an object to be created. As workaround, -PXP allows the user to specify exemplar objects for -the various element types; instead of creating the nodes of the tree by -applying the new operator the nodes are produced by -duplicating the exemplars. As object duplication preserves the class of the -object, one can create fresh objects of every class for which previously an -exemplar has been registered.

Exemplars are meant as objects without contents, the only interesting thing is -that exemplars are instances of a certain class. The creation of an exemplar -for an element node can be done by: - -

let element_exemplar = new element_impl extension_exemplar
- -And a data node exemplar is created by: - -
let data_exemplar = new data_impl extension_exemplar
- -The classes element_impl and data_impl -are defined in the module Pxp_document. The constructors -initialize the fresh objects as empty objects, i.e. without children, without -data contents, and so on. The extension_exemplar is the -initial extension object the exemplars are associated with.

Once the exemplars are created and stored somewhere (e.g. in a hash table), you -can take an exemplar and create a concrete instance (with contents) by -duplicating it. As user of the parser you are normally not concerned with this -as this is part of the internal logic of the parser, but as background knowledge -it is worthwhile to mention that the two methods -create_element and create_data actually -perform the duplication of the exemplar for which they are invoked, -additionally apply modifications to the clone, and finally return the new -object. Moreover, the extension object is copied, too, and the new node object -is associated with the fresh extension object. Note that this is the reason why -every extension object must have a clone method.

The configuration of the set of exemplars is passed to the -parse_document_entity function as third argument. In our -example, this argument can be set up as follows: - -

let spec =
-  make_spec_from_alist
-    ~data_exemplar:            (new data_impl (new null_extension))
-    ~default_element_exemplar: (new element_impl (new null_extension))
-    ~element_alist:
-       [ "a",  new element_impl (new eltype_a);
-         "b",  new element_impl (new eltype_b);
-         "c",  new element_impl (new eltype_c);
-       ]
-    ()
- -The ~element_alist function argument defines the mapping -from element types to exemplars as associative list. The argument -~data_exemplar specifies the exemplar for data nodes, and -the ~default_element_exemplar is used whenever the parser -finds an element type for which the associative list does not define an -exemplar.

The configuration is now complete. You can still use the same parsing -functions, only the initialization is a bit different. For example, call the -parser by: - -

let d = parse_document_entity default_config (from_file "doc.xml") spec
- -Note that the resulting document d has a usable type; -especially the print method we added is visible. So you can -print your document by - -
d # root # extension # print stdout

This object-oriented approach looks rather complicated; this is mostly caused -by working around some problems of the strict typing system of O'Caml. Some -auxiliary concepts such as extensions were needed, but the practical -consequences are low. In the next section, one of the examples of the -distribution is explained, a converter from readme -documents to HTML.

Notes

[1]

The problem is that the subclass is -usually not a subtype in this case because O'Caml has a contravariant subtyping -rule.


PrevHomeNext
How to parse a document from an applicationUpExample: An HTML backend for the readme -DTD
\ No newline at end of file diff --git a/helm/DEVEL/pxp/pxp/doc/manual/html/x738.html b/helm/DEVEL/pxp/pxp/doc/manual/html/x738.html deleted file mode 100644 index 674180172..000000000 --- a/helm/DEVEL/pxp/pxp/doc/manual/html/x738.html +++ /dev/null @@ -1,1036 +0,0 @@ -Example: An HTML backend for the readme -DTD
The PXP user's guide
PrevChapter 2. Using PXPNext

2.4. Example: An HTML backend for the readme -DTD

The converter from readme documents to HTML -documents follows strictly the approach to define one class per element -type. The HTML code is similar to the readme source, -because of this most elements can be converted in the following way: Given the -input element - -

<e>content</e>
- -the conversion text is the concatenation of a computed prefix, the recursively -converted content, and a computed suffix.

Only one element type cannot be handled by this scheme: -footnote. Footnotes are collected while they are found in -the input text, and they are printed after the main text has been converted and -printed.

2.4.1. Header

open Pxp_types
-open Pxp_document

2.4.2. Type declarations

class type footnote_printer =
-  object
-    method footnote_to_html : store_type -> out_channel -> unit
-  end
-
-and store_type =
-  object
-    method alloc_footnote : footnote_printer -> int
-    method print_footnotes : out_channel -> unit
-  end
-;;

2.4.3. Class store

The store is a container for footnotes. You can add a -footnote by invoking alloc_footnote; the argument is an -object of the class footnote_printer, the method returns the -number of the footnote. The interesting property of a footnote is that it can -be converted to HTML, so a footnote_printer is an object -with a method footnote_to_html. The class -footnote which is defined below has a compatible method -footnote_to_html such that objects created from it can be -used as footnote_printers.

The other method, print_footnotes prints the footnotes as -definition list, and is typically invoked after the main material of the page -has already been printed. Every item of the list is printed by -footnote_to_html.

class store =
-  object (self)
-
-    val mutable footnotes = ( [] : (int * footnote_printer) list )
-    val mutable next_footnote_number = 1
-
-    method alloc_footnote n =
-      let number = next_footnote_number in
-      next_footnote_number <- number+1;
-      footnotes <- footnotes @ [ number, n ];
-      number
-
-    method print_footnotes ch =
-      if footnotes <> [] then begin
-	output_string ch "<hr align=left noshade=noshade width=\"30%\">\n";
-	output_string ch "<dl>\n";
-	List.iter
-	  (fun (_,n) -> 
-	     n # footnote_to_html (self : #store_type :> store_type) ch)
-	  footnotes;
-	output_string ch "</dl>\n";
-      end
-
-  end
-;;

2.4.4. Function escape_html

This function converts the characters <, >, &, and " to their HTML -representation. For example, -escape_html "<>" = "&lt;&gt;". Other -characters are left unchanged. - -

let escape_html s =
-  Str.global_substitute
-    (Str.regexp "<\\|>\\|&\\|\"")
-    (fun s ->
-      match Str.matched_string s with
-        "<" -> "&lt;"
-      | ">" -> "&gt;"
-      | "&" -> "&amp;"
-      | "\"" -> "&quot;"
-      | _ -> assert false)
-    s
-;;

2.4.5. Virtual class shared

This virtual class is the abstract superclass of the extension classes shown -below. It defines the standard methods clone, -node, and set_node, and declares the type -of the virtual method to_html. This method recursively -traverses the whole element tree, and prints the converted HTML code to the -output channel passed as second argument. The first argument is the reference -to the global store object which collects the footnotes. - -

class virtual shared =
-  object (self)
-
-    (* --- default_ext --- *)
-
-    val mutable node = (None : shared node option)
-
-    method clone = {< >} 
-    method node =
-      match node with
-          None ->
-            assert false
-        | Some n -> n
-    method set_node n =
-      node <- Some n
-
-    (* --- virtual --- *)
-
-    method virtual to_html : store -> out_channel -> unit
-
-  end
-;;

2.4.6. Class only_data

This class defines to_html such that the character data of -the current node is converted to HTML. Note that self is an -extension object, self # node is the node object, and -self # node # data returns the character data of the node. - -

class only_data =
-  object (self)
-    inherit shared
-
-    method to_html store ch =
-      output_string ch (escape_html (self # node # data))
-  end
-;;

2.4.7. Class readme

This class converts elements of type readme to HTML. Such an -element is (by definition) always the root element of the document. First, the -HTML header is printed; the title attribute of the element -determines the title of the HTML page. Some aspects of the HTML page can be -configured by setting certain parameter entities, for example the background -color, the text color, and link colors. After the header, the -body tag, and the headline have been printed, the contents -of the page are converted by invoking to_html on all -children of the current node (which is the root node). Then, the footnotes are -appended to this by telling the global store object to print -the footnotes. Finally, the end tags of the HTML pages are printed.

This class is an example how to access the value of an attribute: The value is -determined by invoking self # node # attribute "title". As -this attribute has been declared as CDATA and as being required, the value has -always the form Value s where s is the -string value of the attribute.

You can also see how entity contents can be accessed. A parameter entity object -can be looked up by self # node # dtd # par_entity "name", -and by invoking replacement_text the value of the entity -is returned after inner parameter and character entities have been -processed. Note that you must use gen_entity instead of -par_entity to access general entities.

class readme =
-  object (self)
-    inherit shared
-
-    method to_html store ch =
-      (* output header *)
-      output_string 
-	ch "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">";
-      output_string
-	ch "<!-- WARNING! This is a generated file, do not edit! -->\n";
-      let title = 
-	match self # node # attribute "title" with
-	    Value s -> s
-	  | _ -> assert false
-      in
-      let html_header, _ =
-	try (self # node # dtd # par_entity "readme:html:header") 
-            # replacement_text
-	with WF_error _ -> "", false in
-      let html_trailer, _ =
-	try (self # node # dtd # par_entity "readme:html:trailer")
-            # replacement_text
-	with WF_error _ -> "", false in
-      let html_bgcolor, _ =
-	try (self # node # dtd # par_entity "readme:html:bgcolor")
-            # replacement_text
-	with WF_error _ -> "white", false in
-      let html_textcolor, _ =
-	try (self # node # dtd # par_entity "readme:html:textcolor")
-            # replacement_text
-	with WF_error _ -> "", false in
-      let html_alinkcolor, _ =
-	try (self # node # dtd # par_entity "readme:html:alinkcolor")
-            # replacement_text
-	with WF_error _ -> "", false in
-      let html_vlinkcolor, _ =
-	try (self # node # dtd # par_entity "readme:html:vlinkcolor")
-            # replacement_text
-	with WF_error _ -> "", false in
-      let html_linkcolor, _ =
-	try (self # node # dtd # par_entity "readme:html:linkcolor")
-            # replacement_text
-	with WF_error _ -> "", false in
-      let html_background, _ =
-	try (self # node # dtd # par_entity "readme:html:background")
-            # replacement_text
-	with WF_error _ -> "", false in
-
-      output_string ch "<html><header><title>\n";
-      output_string ch (escape_html title);
-      output_string ch "</title></header>\n";
-      output_string ch "<body ";
-      List.iter
-	(fun (name,value) ->
-	   if value <> "" then 
-	     output_string ch (name ^ "=\"" ^ escape_html value ^ "\" "))
-	[ "bgcolor",    html_bgcolor;
-	  "text",       html_textcolor;
-	  "link",       html_linkcolor;
-	  "alink",      html_alinkcolor;
-	  "vlink",      html_vlinkcolor;
-	];
-      output_string ch ">\n";
-      output_string ch html_header;
-      output_string ch "<h1>";
-      output_string ch (escape_html title);
-      output_string ch "</h1>\n";
-      (* process main content: *)
-      List.iter
-	(fun n -> n # extension # to_html store ch)
-	(self # node # sub_nodes);
-      (* now process footnotes *)
-      store # print_footnotes ch;
-      (* trailer *)
-      output_string ch html_trailer;
-      output_string ch "</html>\n";
-
-  end
-;;

2.4.8. Classes section, sect1, -sect2, and sect3

As the conversion process is very similar, the conversion classes of the three -section levels are derived from the more general section -class. The HTML code of the section levels only differs in the type of the -headline, and because of this the classes describing the section levels can be -computed by replacing the class argument the_tag of -section by the HTML name of the headline tag.

Section elements are converted to HTML by printing a headline and then -converting the contents of the element recursively. More precisely, the first -sub-element is always a title element, and the other -elements are the contents of the section. This structure is declared in the -DTD, and it is guaranteed that the document matches the DTD. Because of this -the title node can be separated from the rest without any checks.

Both the title node, and the body nodes are then converted to HTML by calling -to_html on them.

class section the_tag =
-  object (self)
-    inherit shared
-
-    val tag = the_tag
-
-    method to_html store ch =
-      let sub_nodes = self # node # sub_nodes in
-      match sub_nodes with
-	  title_node :: rest ->
-	    output_string ch ("<" ^ tag ^ ">\n");
-	    title_node # extension # to_html store ch;
-	    output_string ch ("\n</" ^ tag ^ ">");
-	    List.iter
-	      (fun n -> n # extension # to_html store ch)
-	      rest
-	| _ ->
-	    assert false
-  end
-;;
-
-class sect1 = section "h1";;
-class sect2 = section "h3";;
-class sect3 = section "h4";;

2.4.9. Classes map_tag, p, -em, ul, li

Several element types are converted to HTML by simply mapping them to -corresponding HTML element types. The class map_tag -implements this, and the class argument the_target_tag -determines the tag name to map to. The output consists of the start tag, the -recursively converted inner elements, and the end tag. - -

class map_tag the_target_tag =
-  object (self)
-    inherit shared
-
-    val target_tag = the_target_tag
-
-    method to_html store ch =
-      output_string ch ("<" ^ target_tag ^ ">\n");
-      List.iter
-	(fun n -> n # extension # to_html store ch)
-	(self # node # sub_nodes);
-      output_string ch ("\n</" ^ target_tag ^ ">");
-  end
-;;
-
-class p = map_tag "p";;
-class em = map_tag "b";;
-class ul = map_tag "ul";;
-class li = map_tag "li";;

2.4.10. Class br

Element of type br are mapped to the same HTML type. Note -that HTML forbids the end tag of br. - -

class br =
-  object (self)
-    inherit shared
-
-    method to_html store ch =
-      output_string ch "<br>\n";
-      List.iter
-	(fun n -> n # extension # to_html store ch)
-	(self # node # sub_nodes);
-  end
-;;

2.4.11. Class code

The code type is converted to a pre -section (preformatted text). As the meaning of tabs is unspecified in HTML, -tabs are expanded to spaces. - -

class code =
-  object (self)
-    inherit shared
-
-    method to_html store ch =
-      let data = self # node # data in
-      (* convert tabs *)
-      let l = String.length data in
-      let rec preprocess i column =
-	(* this is very ineffective but comprehensive: *)
-	if i < l then
-	  match data.[i] with
-	      '\t' ->
-		let n = 8 - (column mod 8) in
-		String.make n ' ' ^ preprocess (i+1) (column + n)
-	    | '\n' ->
-		"\n" ^ preprocess (i+1) 0
-	    | c ->
-		String.make 1 c ^ preprocess (i+1) (column + 1)
-	else
-	  ""
-      in
-      output_string ch "<p><pre>";
-      output_string ch (escape_html (preprocess 0 0));
-      output_string ch "</pre></p>";
-
-  end
-;;

2.4.12. Class a

Hyperlinks, expressed by the a element type, are converted -to the HTML a type. If the target of the hyperlink is given -by href, the URL of this attribute can be used -directly. Alternatively, the target can be given by -readmeref in which case the ".html" suffix must be added to -the file name.

Note that within a only #PCDATA is allowed, so the contents -can be converted directly by applying escape_html to the -character data contents. - -

class a =
-  object (self)
-    inherit shared
-
-    method to_html store ch =
-      output_string ch "<a ";
-      let href =
-	match self # node # attribute "href" with
-	    Value v -> escape_html v
-	  | Valuelist _ -> assert false
-	  | Implied_value ->
-	      begin match self # node # attribute "readmeref" with
-		  Value v -> escape_html v ^ ".html"
-		| Valuelist _ -> assert false
-		| Implied_value ->
-		    ""
-	      end
-      in
-      if href <> "" then
-	output_string ch ("href=\""  ^ href ^ "\"");
-      output_string ch ">";
-      output_string ch (escape_html (self # node # data));
-      output_string ch "</a>";
-	
-  end
-;;

2.4.13. Class footnote

The footnote class has two methods: -to_html to convert the footnote reference to HTML, and -footnote_to_html to convert the footnote text itself.

The footnote reference is converted to a local hyperlink; more precisely, to -two anchor tags which are connected with each other. The text anchor points to -the footnote anchor, and the footnote anchor points to the text anchor.

The footnote must be allocated in the store object. By -allocating the footnote, you get the number of the footnote, and the text of -the footnote is stored until the end of the HTML page is reached when the -footnotes can be printed. The to_html method stores simply -the object itself, such that the footnote_to_html method is -invoked on the same object that encountered the footnote.

The to_html only allocates the footnote, and prints the -reference anchor, but it does not print nor convert the contents of the -note. This is deferred until the footnotes actually get printed, i.e. the -recursive call of to_html on the sub nodes is done by -footnote_to_html.

Note that this technique does not work if you make another footnote within a -footnote; the second footnote gets allocated but not printed.

class footnote =
-  object (self)
-    inherit shared
-
-    val mutable footnote_number = 0
-
-    method to_html store ch =
-      let number = 
-	store # alloc_footnote (self : #shared :> footnote_printer) in
-      let foot_anchor = 
-	"footnote" ^ string_of_int number in
-      let text_anchor =
-	"textnote" ^ string_of_int number in
-      footnote_number <- number;
-      output_string ch ( "<a name=\"" ^ text_anchor ^ "\" href=\"#" ^ 
-			 foot_anchor ^ "\">[" ^ string_of_int number ^ 
-			 "]</a>" )
-
-    method footnote_to_html store ch =
-      (* prerequisite: we are in a definition list <dl>...</dl> *)
-      let foot_anchor = 
-	"footnote" ^ string_of_int footnote_number in
-      let text_anchor =
-	"textnote" ^ string_of_int footnote_number in
-      output_string ch ("<dt><a name=\"" ^ foot_anchor ^ "\" href=\"#" ^ 
-			text_anchor ^ "\">[" ^ string_of_int footnote_number ^ 
-			"]</a></dt>\n<dd>");
-      List.iter
-	(fun n -> n # extension # to_html store ch)
-	(self # node # sub_nodes);
-      output_string ch ("\n</dd>")
- 
-  end
-;;

2.4.14. The specification of the document model

This code sets up the hash table that connects element types with the exemplars -of the extension classes that convert the elements to HTML. - -

open Pxp_yacc
-
-let tag_map =
-  make_spec_from_alist
-    ~data_exemplar:(new data_impl (new only_data))
-    ~default_element_exemplar:(new element_impl (new no_markup))
-    ~element_alist:
-      [ "readme", (new element_impl (new readme));
-	"sect1",  (new element_impl (new sect1));
-	"sect2",  (new element_impl (new sect2));
-	"sect3",  (new element_impl (new sect3));
-	"title",  (new element_impl (new no_markup));
-	"p",      (new element_impl (new p));
-	"br",     (new element_impl (new br));
-	"code",   (new element_impl (new code));
-	"em",     (new element_impl (new em));
-	"ul",     (new element_impl (new ul));
-	"li",     (new element_impl (new li));
-	"footnote", (new element_impl (new footnote : #shared :> shared));
-	"a",      (new element_impl (new a));
-      ]
-    ()
-;;


PrevHomeNext
Class-based processing of the node treeUpThe objects representing the document
\ No newline at end of file diff --git a/helm/DEVEL/pxp/pxp/doc/manual/html/x939.html b/helm/DEVEL/pxp/pxp/doc/manual/html/x939.html deleted file mode 100644 index cf177f88e..000000000 --- a/helm/DEVEL/pxp/pxp/doc/manual/html/x939.html +++ /dev/null @@ -1,2337 +0,0 @@ -The class type node
The PXP user's guide
PrevChapter 3. The objects representing the documentNext

3.2. The class type node

From Pxp_document: - -

type node_type =
-  T_data
-| T_element of string
-| T_super_root
-| T_pinstr of string
-| T_comment
-and some other, reserved types
-;;
-
-class type [ 'ext ] node =
-  object ('self)
-    constraint 'ext = 'ext node #extension
-
-    (* General observers *)
-
-    method extension : 'ext
-    method dtd : dtd
-    method parent : 'ext node
-    method root : 'ext node
-    method sub_nodes : 'ext node list
-    method iter_nodes : ('ext node -> unit) -> unit
-    method iter_nodes_sibl : 
-           ('ext node option -> 'ext node -> 'ext node option -> unit) -> unit
-    method node_type : node_type
-    method encoding : Pxp_types.rep_encoding
-    method data : string
-    method position : (string * int * int)
-    method comment : string option
-    method pinstr : string -> proc_instruction list
-    method pinstr_names : string list
-    method write : Pxp_types.output_stream -> Pxp_types.encoding -> unit
-
-    (* Attribute observers *)
-
-    method attribute : string -> Pxp_types.att_value
-    method required_string_attribute : string -> string
-    method optional_string_attribute : string -> string option
-    method required_list_attribute : string -> string list
-    method optional_list_attribute : string -> string list
-    method attribute_names : string list
-    method attribute_type : string -> Pxp_types.att_type
-    method attributes : (string * Pxp_types.att_value) list
-    method id_attribute_name : string
-    method id_attribute_value : string
-    method idref_attribute_names : string
-
-    (* Modifying methods *)
-
-    method add_node : ?force:bool -> 'ext node -> unit
-    method add_pinstr : proc_instruction -> unit
-    method delete : unit
-    method set_nodes : 'ext node list -> unit
-    method quick_set_attributes : (string * Pxp_types.att_value) list -> unit
-    method set_comment : string option -> unit
-
-    (* Cloning methods *)
-
-    method orphaned_clone : 'self
-    method orphaned_flat_clone : 'self
-    method create_element : 
-              ?position:(string * int * int) ->
-              dtd -> node_type -> (string * string) list ->
-                  'ext node
-    method create_data : dtd -> string -> 'ext node
-    method keep_always_whitespace_mode : unit
-
-    (* Validating methods *)
-
-    method local_validate : ?use_dfa:bool -> unit -> unit
-
-    (* ... Internal methods are undocumented. *)
-
-  end
-;;
- -In the module Pxp_types you can find another type -definition that is important in this context: - -
type Pxp_types.att_value =
-    Value     of string
-  | Valuelist of string list
-  | Implied_value
-;;

3.2.1. The structure of document trees

A node represents either an element or a character data section. There are two -classes implementing the two aspects of nodes: element_impl -and data_impl. The latter class does not implement all -methods because some methods do not make sense for data nodes.

(Note: PXP also supports a mode which forces that processing instructions and -comments are represented as nodes of the document tree. However, these nodes -are instances of element_impl with node types -T_pinstr and T_comment, -respectively. This mode must be explicitly configured; the basic representation -knows only element and data nodes.)

The following figure -(A tree with element nodes, data nodes, and attributes) shows an example how -a tree is constructed from element and data nodes. The circular areas -represent element nodes whereas the ovals denote data nodes. Only elements -may have subnodes; data nodes are always leaves of the tree. The subnodes -of an element can be either element or data nodes; in both cases the O'Caml -objects storing the nodes have the class type node.

Attributes (the clouds in the picture) are not directly -integrated into the tree; there is always an extra link to the attribute -list. This is also true for processing instructions (not shown in the -picture). This means that there are separated access methods for attributes and -processing instructions.

Figure 3-1. A tree with element nodes, data nodes, and attributes

Only elements, data sections, attributes and processing -instructions (and comments, if configured) can, directly or indirectly, occur -in the document tree. It is impossible to add entity references to the tree; if -the parser finds such a reference, not the reference as such but the referenced -text (i.e. the tree representing the structured text) is included in the -tree.

Note that the parser collapses as much data material into one -data node as possible such that there are normally never two adjacent data -nodes. This invariant is enforced even if data material is included by entity -references or CDATA sections, or if a data sequence is interrupted by -comments. So a &amp; b <-- comment --> c <![CDATA[ -<> d]]> is represented by only one data node, for -instance. However, you can create document trees manually which break this -invariant; it is only the way the parser forms the tree.

Figure 3-2. Nodes are doubly linked trees

The node tree has links in both directions: Every node has a link to its parent -(if any), and it has links to the subnodes (see -figure Nodes are doubly linked trees). Obviously, -this doubly-linked structure simplifies the navigation in the tree; but has -also some consequences for the possible operations on trees.

Because every node must have at most one parent node, -operations are illegal if they violate this condition. The following figure -(A node can only be added if it is a root) shows on the left side -that node y is added to x as new subnode -which is allowed because y does not have a parent yet. The -right side of the picture illustrates what would happen if y -had a parent node; this is illegal because y would have two -parents after the operation.

Figure 3-3. A node can only be added if it is a root

The "delete" operation simply removes the links between two nodes. In the -picture (A deleted node becomes the root of the subtree) the node -x is deleted from the list of subnodes of -y. After that, x becomes the root of the -subtree starting at this node.

Figure 3-4. A deleted node becomes the root of the subtree

It is also possible to make a clone of a subtree; illustrated in -The clone of a subtree. In this case, the -clone is a copy of the original subtree except that it is no longer a -subnode. Because cloning never keeps the connection to the parent, the clones -are called orphaned.

Figure 3-5. The clone of a subtree

3.2.2. The methods of the class type node

General observers - .

  • extension: The reference to the extension object which -belongs to this node (see ...).

  • dtd: Returns a reference to the global DTD. All nodes -of a tree must share the same DTD.

  • parent: Get the father node. Raises -Not_found in the case the node does not have a -parent, i.e. the node is the root.

  • root: Gets the reference to the root node of the tree. -Every node is contained in a tree with a root, so this method always -succeeds. Note that this method searches the root, -which costs time proportional to the length of the path to the root.

  • sub_nodes: Returns references to the children. The returned -list reflects the order of the children. For data nodes, this method returns -the empty list.

  • iter_nodes f: Iterates over the children, and calls -f for every child in turn.

  • iter_nodes_sibl f: Iterates over the children, and calls -f for every child in turn. f gets as -arguments the previous node, the current node, and the next node.

  • node_type: Returns either T_data which -means that the node is a data node, or T_element n -which means that the node is an element of type n. -If configured, possible node types are also T_pinstr t -indicating that the node represents a processing instruction with target -t, and T_comment in which case the node -is a comment.

  • encoding: Returns the encoding of the strings.

  • data: Returns the character data of this node and all -children, concatenated as one string. The encoding of the string is what -the method encoding returns. -- For data nodes, this method simply returns the represented characters. -For elements, the meaning of the method has been extended such that it -returns something useful, i.e. the effectively contained characters, without -markup. (For T_pinstr and T_comment -nodes, the method returns the empty string.)

  • position: If configured, this method returns the position of -the element as triple (entity, line, byteposition). For data nodes, the -position is not stored. If the position is not available the triple -"?", 0, 0 is returned.

  • comment: Returns Some text for comment -nodes, and None for other nodes. The text -is everything between the comment delimiters <-- and --->.

  • pinstr n: Returns all processing instructions that are -directly contained in this element and that have a target -specification of n. The target is the first word after -the <?.

  • pinstr_names: Returns the list of all targets of processing -instructions directly contained in this element.

  • write s enc: Prints the node and all subnodes to the passed -output stream as valid XML text, using the passed external encoding.

-

Attribute observers - .

  • attribute n: Returns the value of the attribute with name -n. This method returns a value for every declared -attribute, and it raises Not_found for any undeclared -attribute. Note that it even returns a value if the attribute is actually -missing but is declared as #IMPLIED or has a default -value. - Possible values are: -

    • Implied_value: The attribute has been declared with the -keyword #IMPLIED, and the attribute is missing in the -attribute list of this element.

    • Value s: The attribute has been declared as type -CDATA, as ID, as -IDREF, as ENTITY, or as -NMTOKEN, or as enumeration or notation, and one of the two -conditions holds: (1) The attribute value is present in the attribute list in -which case the value is returned in the string s. (2) The -attribute has been omitted, and the DTD declared the attribute with a default -value. The default value is returned in s. -- Summarized, Value s is returned for non-implied, non-list -attribute values.

    • Valuelist l: The attribute has been declared as type -IDREFS, as ENTITIES, or -as NMTOKENS, and one of the two conditions holds: (1) The -attribute value is present in the attribute list in which case the -space-separated tokens of the value are returned in the string list -l. (2) The attribute has been omitted, and the DTD declared -the attribute with a default value. The default value is returned in -l. -- Summarized, Valuelist l is returned for all list-type -attribute values.

    - -Note that before the attribute value is returned, the value is normalized. This -means that newlines are converted to spaces, and that references to character -entities (i.e. &#n;) and -general entities -(i.e. &name;) are expanded; -if necessary, expansion is performed recursively.

    In well-formedness mode, there is no DTD which could declare an -attribute. Because of this, every occuring attribute is considered as a CDATA -attribute.

  • required_string_attribute n: returns the Value attribute -called n, or the Valuelist attribute as a string where the list elements -are separated by spaces. If the attribute value is implied, or if the -attribute does not exists, the method will fail. - This method is convenient -if you expect a non-implied and non-list attribute value.

  • optional_string_attribute n: returns the Value attribute -called n, or the Valuelist attribute as a string where the list elements -are separated by spaces. If the attribute value is implied, or if the -attribute does not exists, the method returns None. - This method is -convenient if you expect a non-list attribute value including the implied -value.

  • required_list_attribute n: returns the Valuelist attribute -called n, or the Value attribute as a list with a single element. -If the attribute value is implied, or if the -attribute does not exists, the method will fail. - This method is -convenient if you expect a list attribute value.

  • optional_list_attribute n: returns the Valuelist attribute -called n, or the Value attribute as a list with a single element. -If the attribute value is implied, or if the -attribute does not exists, an empty list will be returned. - This method -is convenient if you expect a list attribute value or the implied value.

  • attribute_names: returns the list of all attribute names of -this element. As this is a validating parser, this list is equal to the -list of declared attributes.

  • attribute_type n: returns the type of the attribute called -n. See the module Pxp_types for a -description of the encoding of the types.

  • attributes: returns the list of pairs of names and values -for all attributes of -this element.

  • id_attribute_name: returns the name of the attribute that is -declared with type ID. There is at most one such attribute. The method raises -Not_found if there is no declared ID attribute for the -element type.

  • id_attribute_value: returns the value of the attribute that -is declared with type ID. There is at most one such attribute. The method raises -Not_found if there is no declared ID attribute for the -element type.

  • idref_attribute_names: returns the list of attribute names -that are declared as IDREF or IDREFS.

-

Modifying methods - . The following methods are only defined for element nodes (more exactly: -the methods are defined for data nodes, too, but fail always). - -

  • add_node sn: Adds sub node sn to the list -of children. This operation is illustrated in the picture -A node can only be added if it is a root. This method expects that -sn is a root, and it requires that sn and -the current object share the same DTD.

    Because add_node is the method the parser itself uses -to add new nodes to the tree, it performs by default some simple validation -checks: If the content model is a regular expression, it is not allowed to add -data nodes to this node unless the new nodes consist only of whitespace. In -this case, the new data nodes are silently dropped (you can change this by -invoking keep_always_whitespace_mode).

    If the document is flagged as stand-alone, these data nodes only -containing whitespace are even forbidden if the element declaration is -contained in an external entity. This case is detected and rejected.

    If the content model is EMPTY, it is not allowed to -add any data node unless the data node is empty. In this case, the new data -node is silently dropped.

    These checks only apply if there is a DTD. In well-formedness mode, it is -assumed that every element is declared with content model -ANY which prohibits any validation check. Furthermore, you -turn these checks off by passing ~force:true as first -argument.

  • add_pinstr pi: Adds the processing instruction -pi to the list of processing instructions.

  • delete: Deletes this node from the tree. After this -operation, this node is no longer the child of the former father node; and the -node loses the connection to the father as well. This operation is illustrated -by the figure A deleted node becomes the root of the subtree.

  • set_nodes nl: Sets the list of children to -nl. It is required that every member of nl -is a root, and that all members and the current object share the same DTD. -Unlike add_node, no validation checks are performed.

  • quick_set_attributes atts: sets the attributes of this -element to atts. It is not checked -whether atts matches the DTD or not; it is up to the -caller of this method to ensure this. (This method may be useful to transform -the attribute values, i.e. apply a mapping to every attribute.)

  • set_comment text: This method is only applicable to -T_comment nodes; it sets the comment text contained by such -nodes.

Cloning methods - .

  • orphaned_clone: Returns a clone of the node and the complete -tree below this node (deep clone). The clone does not have a parent (i.e. the -reference to the parent node is not cloned). While -copying the subtree, strings are skipped; it is likely that the original tree -and the copy tree share strings. Extension objects are cloned by invoking -the clone method on the original objects; how much of -the extension objects is cloned depends on the implemention of this method.

    This operation is illustrated by the figure -The clone of a subtree.

  • orphaned_flat_clone: Returns a clone of the node, -but sets the list of sub nodes to [], i.e. the sub nodes are not cloned.

  • -create_element dtd nt al: Returns a flat copy of this node -(which must be an element) with the following modifications: The DTD is set to -dtd; the node type is set to nt, and the -new attribute list is set to al (given as list of -(name,value) pairs). The copy does not have children nor a parent. It does not -contain processing instructions. See -the example below.

    Note that you can specify the position of the new node -by the optional argument ~position.

  • -create_data dtd cdata: Returns a flat copy of this node -(which must be a data node) with the following modifications: The DTD is set to -dtd; the node type is set to T_data; the -attribute list is empty (data nodes never have attributes); the list of -children and PIs is empty, too (same reason). The new node does not have a -parent. The value cdata is the new character content of the -node. See -the example below.

  • keep_always_whitespace_mode: Even data nodes which are -normally dropped because they only contain ignorable whitespace, can added to -this node once this mode is turned on. (This mode is useful to produce -canonical XML.)

Validating methods - . There is one method which locally validates the node, i.e. checks whether the -subnodes match the content model of this node. - -

  • local_validate: Checks that this node conforms to the -DTD by comparing the type of the subnodes with the content model for this -node. (Applications need not call this method unless they add new nodes -themselves to the tree.)

3.2.3. The class element_impl

This class is an implementation of node which -realizes element nodes: - -

class [ 'ext ] element_impl : 'ext -> [ 'ext ] node

Constructor. You can create a new instance by - -

new element_impl extension_object
- -which creates a special form of empty element which already contains a -reference to the extension_object, but is -otherwise empty. This special form is called an -exemplar. The purpose of exemplars is that they serve as -patterns that can be duplicated and filled with data. The method -create_element is designed to perform this action.

Example. First, create an exemplar by - -

let exemplar_ext = ... in
-let exemplar     = new element_impl exemplar_ext in
- -The exemplar is not used in node trees, but only as -a pattern when the element nodes are created: - -
let element = exemplar # create_element dtd (T_element name) attlist 
- -The element is a copy of exemplar -(even the extension exemplar_ext has been copied) -which ensures that element and its extension are objects -of the same class as the exemplars; note that you need not to pass a -class name or other meta information. The copy is initially connected -with the dtd, it gets a node type, and the attribute list -is filled. The element is now fully functional; it can -be added to another element as child, and it can contain references to -subnodes.

3.2.4. The class data_impl

This class is an implementation of node which -should be used for all character data nodes: - -

class [ 'ext ] data_impl : 'ext -> [ 'ext ] node

Constructor. You can create a new instance by - -

new data_impl extension_object
- -which creates an empty exemplar node which is connected to -extension_object. The node does not contain a -reference to any DTD, and because of this it cannot be added to node trees.

To get a fully working data node, apply the method -create_data to the exemplar (see example).

Example. First, create an exemplar by - -

let exemplar_ext = ... in
-let exemplar     = new exemplar_ext data_impl in
- -The exemplar is not used in node trees, but only as -a pattern when the data nodes are created: - -
let data_node = exemplar # create_data dtd "The characters contained in the data node" 
- -The data_node is a copy of exemplar. -The copy is initially connected -with the dtd, and it is filled with character material. -The data_node is now fully functional; it can -be added to an element as child.

3.2.5. The type spec

The type spec defines a way to handle the details of -creating nodes from exemplars. - -

type 'ext spec
-constraint 'ext = 'ext node #extension
-
-val make_spec_from_mapping :
-      ?super_root_exemplar : 'ext node ->
-      ?comment_exemplar : 'ext node ->
-      ?default_pinstr_exemplar : 'ext node ->
-      ?pinstr_mapping : (string, 'ext node) Hashtbl.t ->
-      data_exemplar: 'ext node ->
-      default_element_exemplar: 'ext node ->
-      element_mapping: (string, 'ext node) Hashtbl.t -> 
-      unit -> 
-        'ext spec
-
-val make_spec_from_alist :
-      ?super_root_exemplar : 'ext node ->
-      ?comment_exemplar : 'ext node ->
-      ?default_pinstr_exemplar : 'ext node ->
-      ?pinstr_alist : (string * 'ext node) list ->
-      data_exemplar: 'ext node ->
-      default_element_exemplar: 'ext node ->
-      element_alist: (string * 'ext node) list -> 
-      unit -> 
-        'ext spec
- -The two functions make_spec_from_mapping and -make_spec_from_alist create spec -values. Both functions are functionally equivalent and the only difference is -that the first function prefers hashtables and the latter associative lists to -describe mappings from names to exemplars.

You can specify exemplars for the various kinds of nodes that need to be -generated when an XML document is parsed: - -

  • ~super_root_exemplar: This exemplar -is used to create the super root. This special node is only created if the -corresponding configuration option has been selected; it is the parent node of -the root node which may be convenient if every working node must have a parent.

  • ~comment_exemplar: This exemplar is -used when a comment node must be created. Note that such nodes are only created -if the corresponding configuration option is "on".

  • ~default_pinstr_exemplar: If a node -for a processing instruction must be created, and the instruction is not listed -in the table passed by ~pinstr_mapping or -~pinstr_alist, this exemplar is used. -Again the configuration option must be "on" in order to create such nodes at -all.

  • ~pinstr_mapping or -~pinstr_alist: Map the target names of processing -instructions to exemplars. These mappings are only used when nodes for -processing instructions are created.

  • ~data_exemplar: The exemplar for -ordinary data nodes.

  • ~default_element_exemplar: This -exemplar is used if an element node must be created, but the element type -cannot be found in the tables element_mapping or -element_alist.

  • ~element_mapping or -~element_alist: Map the element types to exemplars. These -mappings are used to create element nodes.

- -In most cases, you only want to create spec values to pass -them to the parser functions found in Pxp_yacc. However, it -might be useful to apply spec values directly.

The following functions create various types of nodes by selecting the -corresponding exemplar from the passed spec value, and by -calling create_element or create_data on -the exemplar. - -

val create_data_node : 
-      'ext spec -> 
-      dtd -> 
-      (* data material: *) string -> 
-          'ext node
-
-val create_element_node : 
-      ?position:(string * int * int) ->
-      'ext spec -> 
-      dtd -> 
-      (* element type: *) string -> 
-      (* attributes: *) (string * string) list -> 
-          'ext node
-
-val create_super_root_node :
-      ?position:(string * int * int) ->
-      'ext spec -> 
-       dtd -> 
-           'ext node
-
-val create_comment_node :
-      ?position:(string * int * int) ->
-      'ext spec -> 
-      dtd -> 
-      (* comment text: *) string -> 
-          'ext node
-
-val create_pinstr_node :
-      ?position:(string * int * int) ->
-      'ext spec -> 
-      dtd -> 
-      proc_instruction -> 
-          'ext node

3.2.6. Examples

Building trees. Here is the piece of code that creates the tree of -the figure A tree with element nodes, data nodes, and attributes. The extension -object and the DTD are beyond the scope of this example. - -

let exemplar_ext = ... (* some extension *) in
-let dtd = ... (* some DTD *) in
-
-let element_exemplar = new element_impl exemplar_ext in
-let data_exemplar    = new data_impl    exemplar_ext in
-
-let a1 = element_exemplar # create_element dtd (T_element "a") ["att", "apple"]
-and b1 = element_exemplar # create_element dtd (T_element "b") []
-and c1 = element_exemplar # create_element dtd (T_element "c") []
-and a2 = element_exemplar # create_element dtd (T_element "a") ["att", "orange"]
-in
-
-let cherries = data_exemplar # create_data dtd "Cherries" in
-let orange   = data_exemplar # create_data dtd "An orange" in
-
-a1 # add_node b1;
-a1 # add_node c1;
-b1 # add_node a2;
-b1 # add_node cherries;
-a2 # add_node orange;
- -Alternatively, the last block of statements could also be written as: - -
a1 # set_nodes [b1; c1];
-b1 # set_nodes [a2; cherries];
-a2 # set_nodes [orange];
- -The root of the tree is a1, i.e. it is true that - -
x # root == a1
- -for every x from { a1, a2, -b1, c1, cherries, -orange }.

Furthermore, the following properties hold: - -

  a1 # attribute "att" = Value "apple"
-& a2 # attribute "att" = Value "orange"
-
-& cherries # data = "Cherries"
-&   orange # data = "An orange"
-&       a1 # data = "CherriesAn orange"
-
-&       a1 # node_type = T_element "a"
-&       a2 # node_type = T_element "a"
-&       b1 # node_type = T_element "b"
-&       c1 # node_type = T_element "c"
-& cherries # node_type = T_data
-&   orange # node_type = T_data
-
-&       a1 # sub_nodes = [ b1; c1 ]
-&       a2 # sub_nodes = [ orange ]
-&       b1 # sub_nodes = [ a2; cherries ]
-&       c1 # sub_nodes = []
-& cherries # sub_nodes = []
-&   orange # sub_nodes = []
-
-&       a2 # parent == a1
-&       b1 # parent == b1
-&       c1 # parent == a1
-& cherries # parent == b1
-&   orange # parent == a2

Searching nodes. The following function searches all nodes of a tree -for which a certain condition holds: - -

let rec search p t =
-  if p t then
-    t :: search_list p (t # sub_nodes)
-  else
-    search_list p (t # sub_nodes)
-
-and search_list p l =
-  match l with
-    []      -> []
-  | t :: l' -> (search p t) @ (search_list p l')
-;;

For example, if you want to search all elements of a certain -type et, the function search can be -applied as follows: - -

let search_element_type et t =
-  search (fun x -> x # node_type = T_element et) t
-;;

Getting attribute values. Suppose we have the declaration: - -

<!ATTLIST e a CDATA #REQUIRED
-            b CDATA #IMPLIED
-            c CDATA "12345">
- -In this case, every element e must have an attribute -a, otherwise the parser would indicate an error. If -the O'Caml variable n holds the node of the tree -corresponding to the element, you can get the value of the attribute -a by - -
let value_of_a = n # required_string_attribute "a"
- -which is more or less an abbreviation for - -
let value_of_a = 
-  match n # attribute "a" with
-    Value s -> s
-  | _       -> assert false
- -- as the attribute is required, the attribute method always -returns a Value.

In contrast to this, the attribute b can be -omitted. In this case, the method required_string_attribute -works only if the attribute is there, and the method will fail if the attribute -is missing. To get the value, you can apply the method -optional_string_attribute: - -

let value_of_b = n # optional_string_attribute "b"
- -Now, value_of_b is of type string option, -and None represents the omitted attribute. Alternatively, -you could also use attribute: - -
let value_of_b = 
-  match n # attribute "b" with
-    Value s       -> Some s
-  | Implied_value -> None
-  | _             -> assert false

The attribute c behaves much like -a, because it has always a value. If the attribute is -omitted, the default, here "12345", will be returned instead. Because of this, -you can again use required_string_attribute to get the -value.

The type CDATA is the most general string -type. The types NMTOKEN, ID, -IDREF, ENTITY, and all enumerators and -notations are special forms of string types that restrict the possible -values. From O'Caml, they behave like CDATA, i.e. you can -use the methods required_string_attribute and -optional_string_attribute, too.

In contrast to this, the types NMTOKENS, -IDREFS, and ENTITIES mean lists of -strings. Suppose we have the declaration: - -

<!ATTLIST f d NMTOKENS #REQUIRED
-            e NMTOKENS #IMPLIED>
- -The type NMTOKENS stands for lists of space-separated -tokens; for example the value "1 abc 23ef" means the list -["1"; "abc"; "23ef"]. (Again, IDREFS -and ENTITIES have more restricted values.) To get the -value of attribute d, one can use - -
let value_of_d = n # required_list_attribute "d"
- -or - -
let value_of_d = 
-  match n # attribute "d" with
-    Valuelist l -> l
-  | _           -> assert false
- -As d is required, the attribute cannot be omitted, and -the attribute method returns always a -Valuelist.

For optional attributes like e, apply - -

let value_of_e = n # optional_list_attribute "e"
- -or - -
let value_of_e = 
-  match n # attribute "e" with
-    Valuelist l   -> l
-  | Implied_value -> []
-  | _             -> assert false
- -Here, the case that the attribute is missing counts like the empty list.

3.2.7. Iterators

There are also several iterators in Pxp_document; please see -the mli file for details. You can find examples for them in the -"simple_transformation" directory. - -

val find : ?deeply:bool -> 
-           f:('ext node -> bool) -> 'ext node -> 'ext node
-
-val find_all : ?deeply:bool ->
-               f:('ext node -> bool) -> 'ext node -> 'ext node list
-
-val find_element : ?deeply:bool ->
-                   string -> 'ext node -> 'ext node
-
-val find_all_elements : ?deeply:bool ->
-                        string -> 'ext node -> 'ext node list
-
-exception Skip
-val map_tree :  pre:('exta node -> 'extb node) ->
-               ?post:('extb node -> 'extb node) ->
-               'exta node -> 
-                   'extb node
-
-
-val map_tree_sibl : 
-        pre: ('exta node option -> 'exta node -> 'exta node option -> 
-                  'extb node) ->
-       ?post:('extb node option -> 'extb node -> 'extb node option -> 
-                  'extb node) ->
-       'exta node -> 
-           'extb node
-
-val iter_tree : ?pre:('ext node -> unit) ->
-                ?post:('ext node -> unit) ->
-                'ext node -> 
-                    unit
-
-val iter_tree_sibl :
-       ?pre: ('ext node option -> 'ext node -> 'ext node option -> unit) ->
-       ?post:('ext node option -> 'ext node -> 'ext node option -> unit) ->
-       'ext node -> 
-           unit


PrevHomeNext
The objects representing the documentUpThe class type extension
\ No newline at end of file diff --git a/helm/DEVEL/pxp/pxp/doc/manual/ps/markup.ps b/helm/DEVEL/pxp/pxp/doc/manual/ps/markup.ps deleted file mode 100644 index 3a98c7964..000000000 --- a/helm/DEVEL/pxp/pxp/doc/manual/ps/markup.ps +++ /dev/null @@ -1,8866 +0,0 @@ -%!PS-Adobe-2.0 -%%Creator: dvips(k) 5.86 Copyright 1999 Radical Eye Software -%%Pages: 96 -%%PageOrder: Ascend -%%BoundingBox: 0 0 596 842 -%%DocumentFonts: Helvetica-Bold Times-Roman Times-Bold Times-Italic -%%+ Courier Courier-Oblique Helvetica-BoldOblique Courier-Bold -%%DocumentPaperSizes: a4 -%%EndComments -%DVIPSWebPage: (www.radicaleye.com) -%DVIPSCommandLine: dvips -f -%DVIPSParameters: dpi=600, compressed -%DVIPSSource: TeX output 2000.08.30:1757 -%%BeginProcSet: texc.pro -%! -/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S -N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 -mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 -0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ -landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize -mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ -matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round -exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ -statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] -N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin -/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array -/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 -array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N -df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A -definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get -}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} -B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr -1 add N}if}B/id 0 N/rw 0 N/rc 0 N/gp 0 N/cp 0 N/G 0 N/CharBuilder{save 3 -1 roll S A/base get 2 index get S/BitMaps get S get/Cd X pop/ctr 0 N Cdx -0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx -sub Cy .1 sub]/id Ci N/rw Cw 7 add 8 idiv string N/rc 0 N/gp 0 N/cp 0 N{ -rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagemask restore}B/G{{id gp get/gp -gp 1 add N A 18 mod S 18 idiv pl S get exec}loop}B/adv{cp add/cp X}B -/chg{rw cp id gp 4 index getinterval putinterval A gp add/gp X adv}B/nd{ -/cp 0 N rw exit}B/lsh{rw cp 2 copy get A 0 eq{pop 1}{A 255 eq{pop 254}{ -A A add 255 and S 1 and or}ifelse}ifelse put 1 adv}B/rsh{rw cp 2 copy -get A 0 eq{pop 128}{A 255 eq{pop 127}{A 2 idiv S 128 and or}ifelse} -ifelse put 1 adv}B/clr{rw cp 2 index string putinterval adv}B/set{rw cp -fillstr 0 4 index getinterval putinterval adv}B/fillstr 18 string 0 1 17 -{2 copy 255 put pop}for N/pl[{adv 1 chg}{adv 1 chg nd}{1 add chg}{1 add -chg nd}{adv lsh}{adv lsh nd}{adv rsh}{adv rsh nd}{1 add adv}{/rc X nd}{ -1 add set}{1 add clr}{adv 2 chg}{adv 2 chg nd}{pop nd}]A{bind pop} -forall N/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn -/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put -}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ -bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A -mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ -SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ -userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X -1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 -index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N -/p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{ -/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) -(LaserWriter 16/600)]{A length product length le{A length product exch 0 -exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse -end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask -grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} -imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round -exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto -fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p -delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M} -B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{ -p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S -rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end - -%%EndProcSet -%%BeginProcSet: 8r.enc -% @@psencodingfile@{ -% author = "S. Rahtz, P. MacKay, Alan Jeffrey, B. Horn, K. Berry", -% version = "0.6", -% date = "1 July 1998", -% filename = "8r.enc", -% email = "tex-fonts@@tug.org", -% docstring = "Encoding for TrueType or Type 1 fonts -% to be used with TeX." -% @} -% -% Idea is to have all the characters normally included in Type 1 fonts -% available for typesetting. This is effectively the characters in Adobe -% Standard Encoding + ISO Latin 1 + extra characters from Lucida. -% -% Character code assignments were made as follows: -% -% (1) the Windows ANSI characters are almost all in their Windows ANSI -% positions, because some Windows users cannot easily reencode the -% fonts, and it makes no difference on other systems. The only Windows -% ANSI characters not available are those that make no sense for -% typesetting -- rubout (127 decimal), nobreakspace (160), softhyphen -% (173). quotesingle and grave are moved just because it's such an -% irritation not having them in TeX positions. -% -% (2) Remaining characters are assigned arbitrarily to the lower part -% of the range, avoiding 0, 10 and 13 in case we meet dumb software. -% -% (3) Y&Y Lucida Bright includes some extra text characters; in the -% hopes that other PostScript fonts, perhaps created for public -% consumption, will include them, they are included starting at 0x12. -% -% (4) Remaining positions left undefined are for use in (hopefully) -% upward-compatible revisions, if someday more characters are generally -% available. -% -% (5) hyphen appears twice for compatibility with both -% ASCII and Windows. -% -/TeXBase1Encoding [ -% 0x00 (encoded characters from Adobe Standard not in Windows 3.1) - /.notdef /dotaccent /fi /fl - /fraction /hungarumlaut /Lslash /lslash - /ogonek /ring /.notdef - /breve /minus /.notdef -% These are the only two remaining unencoded characters, so may as -% well include them. - /Zcaron /zcaron -% 0x10 - /caron /dotlessi -% (unusual TeX characters available in, e.g., Lucida Bright) - /dotlessj /ff /ffi /ffl - /.notdef /.notdef /.notdef /.notdef - /.notdef /.notdef /.notdef /.notdef - % very contentious; it's so painful not having quoteleft and quoteright - % at 96 and 145 that we move the things normally found there to here. - /grave /quotesingle -% 0x20 (ASCII begins) - /space /exclam /quotedbl /numbersign - /dollar /percent /ampersand /quoteright - /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash -% 0x30 - /zero /one /two /three /four /five /six /seven - /eight /nine /colon /semicolon /less /equal /greater /question -% 0x40 - /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O -% 0x50 - /P /Q /R /S /T /U /V /W - /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore -% 0x60 - /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o -% 0x70 - /p /q /r /s /t /u /v /w - /x /y /z /braceleft /bar /braceright /asciitilde - /.notdef % rubout; ASCII ends -% 0x80 - /.notdef /.notdef /quotesinglbase /florin - /quotedblbase /ellipsis /dagger /daggerdbl - /circumflex /perthousand /Scaron /guilsinglleft - /OE /.notdef /.notdef /.notdef -% 0x90 - /.notdef /.notdef /.notdef /quotedblleft - /quotedblright /bullet /endash /emdash - /tilde /trademark /scaron /guilsinglright - /oe /.notdef /.notdef /Ydieresis -% 0xA0 - /.notdef % nobreakspace - /exclamdown /cent /sterling - /currency /yen /brokenbar /section - /dieresis /copyright /ordfeminine /guillemotleft - /logicalnot - /hyphen % Y&Y (also at 45); Windows' softhyphen - /registered - /macron -% 0xD0 - /degree /plusminus /twosuperior /threesuperior - /acute /mu /paragraph /periodcentered - /cedilla /onesuperior /ordmasculine /guillemotright - /onequarter /onehalf /threequarters /questiondown -% 0xC0 - /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla - /Egrave /Eacute /Ecircumflex /Edieresis - /Igrave /Iacute /Icircumflex /Idieresis -% 0xD0 - /Eth /Ntilde /Ograve /Oacute - /Ocircumflex /Otilde /Odieresis /multiply - /Oslash /Ugrave /Uacute /Ucircumflex - /Udieresis /Yacute /Thorn /germandbls -% 0xE0 - /agrave /aacute /acircumflex /atilde - /adieresis /aring /ae /ccedilla - /egrave /eacute /ecircumflex /edieresis - /igrave /iacute /icircumflex /idieresis -% 0xF0 - /eth /ntilde /ograve /oacute - /ocircumflex /otilde /odieresis /divide - /oslash /ugrave /uacute /ucircumflex - /udieresis /yacute /thorn /ydieresis -] def - -%%EndProcSet -%%BeginProcSet: texps.pro -%! -TeXDict begin/rf{findfont dup length 1 add dict begin{1 index/FID ne 2 -index/UniqueID ne and{def}{pop pop}ifelse}forall[1 index 0 6 -1 roll -exec 0 exch 5 -1 roll VResolution Resolution div mul neg 0 0]/Metrics -exch def dict begin Encoding{exch dup type/integertype ne{pop pop 1 sub -dup 0 le{pop}{[}ifelse}{FontMatrix 0 get div Metrics 0 get div def} -ifelse}forall Metrics/Metrics currentdict end def[2 index currentdict -end definefont 3 -1 roll makefont/setfont cvx]cvx def}def/ObliqueSlant{ -dup sin S cos div neg}B/SlantFont{4 index mul add}def/ExtendFont{3 -1 -roll mul exch}def/ReEncodeFont{CharStrings rcheck{/Encoding false def -dup[exch{dup CharStrings exch known not{pop/.notdef/Encoding true def} -if}forall Encoding{]exch pop}{cleartomark}ifelse}if/Encoding exch def} -def end - -%%EndProcSet -%%BeginProcSet: special.pro -%! -TeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N -/vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N -/rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N -/@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{ -/hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho -X}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B -/@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{ -/urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known -{userdict/md get type/dicttype eq{userdict begin md length 10 add md -maxlength ge{/md md dup length 20 add dict copy def}if end md begin -/letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S -atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{ -itransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll -transform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll -curveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf -pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack} -if}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1 --1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3 -get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip -yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub -neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{ -noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop -90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get -neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr -1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr -2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4 --1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S -TR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{ -Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale -}if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState -save N userdict maxlength dict begin/magscale true def normalscale -currentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts -/psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x -psf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx -psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub -TR/showpage{}N/erasepage{}N/copypage{}N/p 3 def @MacSetUp}N/doclip{ -psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2 -roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath -moveto}N/endTexFig{end psf$SavedState restore}N/@beginspecial{SDict -begin/SpecialSave save N gsave normalscale currentpoint TR -@SpecialDefaults count/ocount X/dcount countdictstack N}N/@setspecial{ -CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto -closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx -sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR -}{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse -CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury -lineto closepath clip}if/showpage{}N/erasepage{}N/copypage{}N newpath}N -/@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{end} -repeat grestore SpecialSave restore end}N/@defspecial{SDict begin}N -/@fedspecial{end}B/li{lineto}B/rl{rlineto}B/rc{rcurveto}B/np{/SaveX -currentpoint/SaveY X N 1 setlinecap newpath}N/st{stroke SaveX SaveY -moveto}N/fil{fill SaveX SaveY moveto}N/ellipse{/endangle X/startangle X -/yrad X/xrad X/savematrix matrix currentmatrix N TR xrad yrad scale 0 0 -1 startangle endangle arc savematrix setmatrix}N end - -%%EndProcSet -%%BeginProcSet: color.pro -%! -TeXDict begin/setcmykcolor where{pop}{/setcmykcolor{dup 10 eq{pop -setrgbcolor}{1 sub 4 1 roll 3{3 index add neg dup 0 lt{pop 0}if 3 1 roll -}repeat setrgbcolor pop}ifelse}B}ifelse/TeXcolorcmyk{setcmykcolor}def -/TeXcolorrgb{setrgbcolor}def/TeXcolorgrey{setgray}def/TeXcolorgray{ -setgray}def/TeXcolorhsb{sethsbcolor}def/currentcmykcolor where{pop}{ -/currentcmykcolor{currentrgbcolor 10}B}ifelse/DC{exch dup userdict exch -known{pop pop}{X}ifelse}B/GreenYellow{0.15 0 0.69 0 setcmykcolor}DC -/Yellow{0 0 1 0 setcmykcolor}DC/Goldenrod{0 0.10 0.84 0 setcmykcolor}DC -/Dandelion{0 0.29 0.84 0 setcmykcolor}DC/Apricot{0 0.32 0.52 0 -setcmykcolor}DC/Peach{0 0.50 0.70 0 setcmykcolor}DC/Melon{0 0.46 0.50 0 -setcmykcolor}DC/YellowOrange{0 0.42 1 0 setcmykcolor}DC/Orange{0 0.61 -0.87 0 setcmykcolor}DC/BurntOrange{0 0.51 1 0 setcmykcolor}DC -/Bittersweet{0 0.75 1 0.24 setcmykcolor}DC/RedOrange{0 0.77 0.87 0 -setcmykcolor}DC/Mahogany{0 0.85 0.87 0.35 setcmykcolor}DC/Maroon{0 0.87 -0.68 0.32 setcmykcolor}DC/BrickRed{0 0.89 0.94 0.28 setcmykcolor}DC/Red{ -0 1 1 0 setcmykcolor}DC/OrangeRed{0 1 0.50 0 setcmykcolor}DC/RubineRed{ -0 1 0.13 0 setcmykcolor}DC/WildStrawberry{0 0.96 0.39 0 setcmykcolor}DC -/Salmon{0 0.53 0.38 0 setcmykcolor}DC/CarnationPink{0 0.63 0 0 -setcmykcolor}DC/Magenta{0 1 0 0 setcmykcolor}DC/VioletRed{0 0.81 0 0 -setcmykcolor}DC/Rhodamine{0 0.82 0 0 setcmykcolor}DC/Mulberry{0.34 0.90 -0 0.02 setcmykcolor}DC/RedViolet{0.07 0.90 0 0.34 setcmykcolor}DC -/Fuchsia{0.47 0.91 0 0.08 setcmykcolor}DC/Lavender{0 0.48 0 0 -setcmykcolor}DC/Thistle{0.12 0.59 0 0 setcmykcolor}DC/Orchid{0.32 0.64 0 -0 setcmykcolor}DC/DarkOrchid{0.40 0.80 0.20 0 setcmykcolor}DC/Purple{ -0.45 0.86 0 0 setcmykcolor}DC/Plum{0.50 1 0 0 setcmykcolor}DC/Violet{ -0.79 0.88 0 0 setcmykcolor}DC/RoyalPurple{0.75 0.90 0 0 setcmykcolor}DC -/BlueViolet{0.86 0.91 0 0.04 setcmykcolor}DC/Periwinkle{0.57 0.55 0 0 -setcmykcolor}DC/CadetBlue{0.62 0.57 0.23 0 setcmykcolor}DC -/CornflowerBlue{0.65 0.13 0 0 setcmykcolor}DC/MidnightBlue{0.98 0.13 0 -0.43 setcmykcolor}DC/NavyBlue{0.94 0.54 0 0 setcmykcolor}DC/RoyalBlue{1 -0.50 0 0 setcmykcolor}DC/Blue{1 1 0 0 setcmykcolor}DC/Cerulean{0.94 0.11 -0 0 setcmykcolor}DC/Cyan{1 0 0 0 setcmykcolor}DC/ProcessBlue{0.96 0 0 0 -setcmykcolor}DC/SkyBlue{0.62 0 0.12 0 setcmykcolor}DC/Turquoise{0.85 0 -0.20 0 setcmykcolor}DC/TealBlue{0.86 0 0.34 0.02 setcmykcolor}DC -/Aquamarine{0.82 0 0.30 0 setcmykcolor}DC/BlueGreen{0.85 0 0.33 0 -setcmykcolor}DC/Emerald{1 0 0.50 0 setcmykcolor}DC/JungleGreen{0.99 0 -0.52 0 setcmykcolor}DC/SeaGreen{0.69 0 0.50 0 setcmykcolor}DC/Green{1 0 -1 0 setcmykcolor}DC/ForestGreen{0.91 0 0.88 0.12 setcmykcolor}DC -/PineGreen{0.92 0 0.59 0.25 setcmykcolor}DC/LimeGreen{0.50 0 1 0 -setcmykcolor}DC/YellowGreen{0.44 0 0.74 0 setcmykcolor}DC/SpringGreen{ -0.26 0 0.76 0 setcmykcolor}DC/OliveGreen{0.64 0 0.95 0.40 setcmykcolor} -DC/RawSienna{0 0.72 1 0.45 setcmykcolor}DC/Sepia{0 0.83 1 0.70 -setcmykcolor}DC/Brown{0 0.81 1 0.60 setcmykcolor}DC/Tan{0.14 0.42 0.56 0 -setcmykcolor}DC/Gray{0 0 0 0.50 setcmykcolor}DC/Black{0 0 0 1 -setcmykcolor}DC/White{0 0 0 0 setcmykcolor}DC end - -%%EndProcSet -TeXDict begin 39158280 55380996 1000 600 600 () @start -/Fa 106[21 149[{TeXBase1Encoding ReEncodeFont}1 59.7758 -/Times-Roman rf /Fb 135[77 2[77 77 77 3[77 77 77 3[77 -3[77 77 77 99[{TeXBase1Encoding ReEncodeFont}11 129.116 -/Courier-Bold rf /Fc 134[65 65 2[65 65 65 65 1[65 65 -65 65 65 2[65 65 65 65 65 65 65 65 65 1[65 36[65 6[65 -65 65 49[{TeXBase1Encoding ReEncodeFont}25 107.597 /Courier-Bold -rf /Fd 141[56 4[128 7[80 88 2[80 97[{TeXBase1Encoding ReEncodeFont}5 -143.462 /Helvetica-BoldOblique rf /Fe 147[21 4[37 1[33 -3[37 23[25 14[25 58[{TeXBase1Encoding ReEncodeFont}6 -74.7198 /Times-Italic rf /Ff 204[25 25 25 49[{ -TeXBase1Encoding ReEncodeFont}3 49.8132 /Times-Roman -rf -%DVIPSBitmapFont: Fg cmmi8 8 2 -/Fg 2 63 df60 -D<12E012F812FEEA3F80EA0FE0EA03F8EA00FEEB3F80EB0FE0EB03F8EB00FC143FEC0FC0 -EC07F0EC01FCEC007FED1FC0ED07F0ED01FCED007FEE1FC01607161FEE7F00ED01FCED07 -F0ED1FC0037FC7FCEC01FCEC07F0EC0FC0023FC8FC14FCEB03F8EB0FE0EB3F8001FEC9FC -EA03F8EA0FE0EA3F8000FECAFC12F812E02A2B7AA537>62 D E -%EndDVIPSBitmapFont -/Fh 131[40 1[40 40 40 40 40 40 40 40 40 40 40 40 40 40 -40 40 1[40 40 40 1[40 40 40 40 40 1[40 5[40 3[40 40 40 -40 40 40 40 40 40 40 40 1[40 40 40 1[40 40 40 40 40 1[40 -40 40 40 40 40 1[40 4[40 1[40 1[40 40 40 40 40 40 40 -40 40 40 40 1[40 40 40 33[{TeXBase1Encoding ReEncodeFont}69 -67.2479 /Courier rf /Fi 105[37 28[37 37 54 37 37 21 29 -25 37 37 37 37 58 21 37 1[21 37 37 25 33 37 33 37 33 -7[54 54 3[46 5[54 66 46 2[25 2[42 2[50 50 54 5[21 21 -11[19 1[19 2[25 25 25 4[30 31[42 2[{TeXBase1Encoding ReEncodeFont}45 -74.7198 /Times-Roman rf /Fj 135[55 7[61 2[89 28 6[55 -3[55 27[66 69[{TeXBase1Encoding ReEncodeFont}7 99.6264 -/Helvetica-Bold rf /Fk 145[27 2[27 57[27 49[{ -TeXBase1Encoding ReEncodeFont}3 44.8318 /Courier-Oblique -rf /Fl 135[50 3[50 50 3[50 50 3[50 50 3[50 1[50 50 2[50 -95[{TeXBase1Encoding ReEncodeFont}11 83.022 /Courier-Oblique -rf -%DVIPSBitmapFont: Fm cmmi10 10 2 -/Fm 2 63 df60 -D<126012FCB4FCEA7FC0EA1FF0EA07FCEA01FF38007FC0EB1FF0EB07FCEB01FF9038007F -C0EC1FF0EC07FCEC01FF9138007FC0ED1FF0ED07FCED01FF9238007FC0EE1FF0EE07FCEE -01FF9338007F80EF1FC0A2EF7F80933801FF00EE07FCEE1FF0EE7FC04B48C7FCED07FCED -1FF0ED7FC04A48C8FCEC07FCEC1FF0EC7FC04948C9FCEB07FCEB1FF0EB7FC04848CAFCEA -07FCEA3FF0EA7FC048CBFC12FC1270323279AD41>62 D E -%EndDVIPSBitmapFont -/Fn 134[45 45 1[45 45 45 45 45 1[45 45 45 45 45 1[45 -45 45 45 45 45 45 45 45 45 1[45 5[45 2[45 8[45 5[45 2[45 -45 1[45 19[45 45 44[{TeXBase1Encoding ReEncodeFont}32 -74.7198 /Courier-Oblique rf -%DVIPSBitmapFont: Fo cmmi9 9 2 -/Fo 2 63 df<171C177EEE01FEEE07FCEE1FF0EE7FC0923801FF00ED07FCED1FF0ED7FC0 -4A48C7FCEC07FCEC1FF0EC7FC04948C8FCEB07FCEB1FF0EB7FC04848C9FCEA07FCEA1FF0 -EA7FC048CAFCA2EA7FC0EA1FF0EA07FCEA01FF38007FC0EB1FF0EB07FCEB01FF9038007F -C0EC1FF0EC07FCEC01FF9138007FC0ED1FF0ED07FCED01FF9238007FC0EE1FF0EE07FCEE -01FEEE007E171C2F2E7AA93C>60 D<127012FCB4FCEA7FC0EA1FF0EA07FCEA01FF38007F -C0EB1FF0EB07FCEB01FF9038007FC0EC1FF0EC07FCEC01FF9138007FC0ED1FF0ED07FCED -01FF9238007FC0EE1FF0EE07FCEE01FEA2EE07FCEE1FF0EE7FC0923801FF00ED07FCED1F -F0ED7FC04A48C7FCEC07FCEC1FF0EC7FC04948C8FCEB07FCEB1FF0EB7FC04848C9FCEA07 -FCEA1FF0EA7FC048CAFC12FC12702F2E7AA93C>62 D E -%EndDVIPSBitmapFont -/Fp 134[66 66 93 66 73 40 66 47 1[73 73 73 106 33 2[33 -73 73 40 66 73 66 73 66 8[80 113 80 86 73 80 86 1[80 -1[86 100 73 2[33 86 1[73 80 86 86 1[86 1[73 5[66 66 66 -66 66 66 66 66 66 66 1[33 40 33 2[40 40 5[57 31[73 2[{ -TeXBase1Encoding ReEncodeFont}58 119.552 /Helvetica-Bold -rf /Fq 129[45 45 45 45 45 45 45 45 45 45 45 45 45 45 -45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 -45 45 45 45 1[45 45 45 45 45 45 45 45 45 45 45 45 45 -45 45 1[45 45 45 45 45 45 45 45 45 45 45 45 45 45 45 -45 45 45 45 1[45 45 45 45 45 45 45 45 45 45 45 45 45 -45 45 45 45 1[45 45 45 33[{TeXBase1Encoding ReEncodeFont}90 -74.7198 /Courier rf /Fr 134[37 37 55 37 42 23 32 32 1[42 -42 42 60 23 37 23 23 42 42 23 37 42 37 42 42 1[42 6[51 -69 1[60 46 42 2[51 1[55 69 46 2[28 3[51 60 55 1[51 1[42 -4[28 42 42 42 42 42 42 42 42 42 42 1[21 28 21 2[28 28 -6[28 30[42 2[{TeXBase1Encoding ReEncodeFont}58 83.022 -/Times-Italic rf /Fs 138[105 57 96 67 1[105 105 105 153 -48 1[48 48 105 105 57 96 105 96 105 96 8[115 163 1[124 -105 3[115 2[143 105 5[105 2[124 3[105 10[96 96 96 96 -2[48 43[105 2[{TeXBase1Encoding ReEncodeFont}35 172.154 -/Helvetica-Bold rf /Ft 106[23 29 29 25[33 33 48 33 33 -18 26 22 1[33 33 33 52 18 33 18 18 33 33 22 29 33 29 -33 29 8[48 3[41 37 2[37 6[22 1[48 12[18 10[18 17 1[17 -2[22 22 5[27 31[37 2[{TeXBase1Encoding ReEncodeFont}41 -66.4176 /Times-Roman rf /Fu 134[42 42 60 42 46 28 32 -37 1[46 42 46 69 23 46 1[23 46 42 28 37 46 37 46 42 9[83 -60 60 55 46 60 3[60 78 55 2[32 65 65 51 55 60 60 55 60 -1[42 6[42 1[42 42 42 42 42 42 2[21 28 21 4[28 39[{ -TeXBase1Encoding ReEncodeFont}53 83.022 /Times-Bold rf -/Fv 27[37 58[63 42[45 40 1[40 37 42 42 60 42 42 23 32 -28 42 42 42 42 65 23 42 23 23 42 42 28 37 42 37 42 37 -28 42 1[28 23 28 1[60 60 78 60 60 51 46 55 60 46 60 60 -74 51 60 1[28 60 60 46 51 60 55 55 60 1[37 47 47 47 23 -23 42 42 42 42 42 42 42 42 42 42 23 21 28 21 2[28 28 -28 65 69 1[42 34 28 29[46 46 2[{TeXBase1Encoding ReEncodeFont}90 -83.022 /Times-Roman rf /Fw 136[65 1[51 1[46 32 2[51 51 -1[23 2[23 51 51 1[46 51 2[46 8[55 3[51 3[55 11[60 9[28 -18[23 39[{TeXBase1Encoding ReEncodeFont}19 83.022 /Helvetica-Bold -rf /Fx 134[80 80 112 80 88 48 80 56 1[88 88 88 128 40 -80 1[40 88 88 48 80 88 80 88 80 8[96 1[96 104 88 96 104 -2[112 104 120 88 2[40 104 112 1[96 104 104 1[104 6[48 -4[80 80 80 80 80 2[40 48 45[{TeXBase1Encoding ReEncodeFont}48 -143.462 /Helvetica-Bold rf /Fy 138[126 1[115 80 8[57 -126 126 1[115 126 11[138 2[149 126 3[138 6[57 26[57 6[57 -39[{TeXBase1Encoding ReEncodeFont}15 206.584 /Helvetica-Bold -rf end -%%EndProlog -%%BeginSetup -%%Feature: *Resolution 600dpi -TeXDict begin -%%BeginPaperSize: a4 -a4 -%%EndPaperSize - -%%EndSetup -%%Page: 1 1 -1 0 bop Black Black 890 647 a Fy(The)58 b(PXP)f(user')-12 -b(s)58 b(guide)1384 2594 y Fx(Ger)m(d)39 b(Stolpmann)p -Black Black eop -%%Page: 2 2 -2 1 bop Black Black -2 579 a Fw(The)22 b(PXP)j(user')-5 -b(s)23 b(guide)-2 687 y Fv(by)d(Gerd)f(Stolpmann)-2 903 -y(Cop)o(yright)f(\251)j(1999,)e(2000)g(by)g(Gerd)h(Stolpmann)-2 -1135 y(PXP)h(is)g(a)g(v)n(alidating)d(parser)i(for)f(XML-1.0)g(which)h -(has)g(been)g(written)g(entirely)f(in)h(Objecti)n(v)o(e)g(Caml.)-2 -1285 y Fw(Do)o(wnload)h(PXP:)j Fv(The)c(free)g(PXP)h(library)e(can)h -(be)g(do)n(wnloaded)d(at)k(http://www)-5 b(.ocaml-programming)o(.de)o -(/pack)o(age)o(s/.)15 b(This)-2 1393 y(user')-5 b(s)20 -b(guide)f(is)j(included.)c(Ne)n(west)j(releases)f(of)g(PXP)h(will)g(be) -f(announced)e(in)i(The)g(OCaml)g(Link)g(Database)-2 1500 -y(\(http://www)-5 b(.npc.de/ocaml/linkdb)o(/\).)-2 1899 -y Fu(License)-2 2090 y Ft(This)16 b(document,)j(and)e(the)h(described)h -(softw)o(are,)f("PXP",)e(are)i(cop)o(yright)i(by)d(Gerd)g(Stolpmann.)-2 -2198 y(Permission)h(is)e(hereby)j(granted,)f(free)g(of)f(char)o(ge,)h -(to)f(an)o(y)h(person)f(obtaining)j(a)d(cop)o(y)h(of)f(this)h(document) -g(and)g(the)f("PXP")g(softw)o(are)i(\(the)f("Softw)o(are"\),)g(to)f -(deal)i(in)-2 2306 y(the)f(Softw)o(are)g(without)h(restriction,)g -(including)h(without)e(limitation)i(the)e(rights)g(to)f(use,)g(cop)o(y) -l(,)g(modify)l(,)g(mer)o(ge,)g(publish,)h(distrib)o(ute,)h(sublicense,) -g(and/or)f(sell)-2 2414 y(copies)g(of)f(the)h(Softw)o(are,)g(and)g(to)f -(permit)h(persons)f(to)h(whom)e(the)i(Softw)o(are)h(is)e(furnished)h -(to)f(do)g(so,)g(subject)h(to)g(the)f(follo)n(wing)j(conditions:)-2 -2522 y(The)d(abo)o(v)o(e)h(cop)o(yright)h(notice)g(and)f(this)f -(permission)h(notice)h(shall)f(be)g(included)h(in)e(all)h(copies)h(or)e -(substantial)i(portions)g(of)e(the)g(Softw)o(are.)-2 -2630 y(The)g(Softw)o(are)h(is)f(pro)o(vided)i(\223as)e(is\224,)g -(without)i(w)o(arranty)g(of)e(an)o(y)g(kind,)h(e)o(xpress)f(or)g -(implied,)i(including)g(b)o(ut)e(not)h(limited)h(to)e(the)h(w)o -(arranties)h(of)e(merchantability)l(,)-2 2737 y(\002tness)g(for)g(a)g -(particular)j(purpose)e(and)g(noninfringement.)i(In)d(no)g(e)n(v)o(ent) -h(shall)h(Gerd)e(Stolpmann)h(be)g(liable)h(for)e(an)o(y)g(claim,)h -(damages)g(or)f(other)h(liability)l(,)i(whether)-2 2845 -y(in)d(an)g(action)i(of)e(contract,)i(tort)f(or)f(otherwise,)i(arising) -f(from,)e(out)i(of)f(or)g(in)g(connection)j(with)e(the)f(Softw)o(are)i -(or)e(the)h(use)f(or)g(other)h(dealings)h(in)e(the)h(softw)o(are.)p -Black Black eop -%%Page: 3 3 -3 2 bop Black Black -2 621 a Fs(T)-14 b(ab)n(le)48 b(of)g(Contents)396 -815 y Fu(I.)21 b(User')m(s)g(guide)p Black 4 w(.)p Black -Black -1 w(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black 4 w(6)596 -943 y Fv(1.)f(What)g(is)h(XML?)p Black 4 w(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black 4 w(7)795 1051 -y(1.1.)e(Introduction)p Black 14 w(.)p Black Black -1 -w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black 4 w(7)994 1159 -y(1.1.1.)g(The)g("hello)h(w)o(orld")g(e)o(xample)p Black -13 w(.)p Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black 4 w(7)994 1267 y(1.1.2.)f(XML)h(parsers)g(and)f -(processors)p Black 3 w(.)p Black Black -2 w(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black 4 w(9)994 1375 y(1.1.3.)g(Discussion)p -Black 9 w(.)p Black Black -1 w(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -4 w(9)795 1483 y(1.2.)g(Highlights)g(of)h(XML)p Black -10 w(.)p Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black 4 w(11)994 -1591 y(1.2.1.)f(The)g(DTD)i(and)e(the)i(instance)p Black -15 w(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black 4 w(11)994 1699 y(1.2.2.)e(Reserv)o(ed)g(characters)p -Black 19 w(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black 4 w(12)994 1807 y(1.2.3.)g(Elements)g(and)h -(ELEMENT)f(declarations)p Black 7 w(.)p Black Black -2 -w(.)p Black Black(.)p Black Black(.)p Black Black -1 -w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black 4 w(13)994 -1915 y(1.2.4.)g(Attrib)n(ute)g(lists)j(and)e(A)-9 b(TTLIST)19 -b(declarations)p Black 6 w(.)p Black Black -2 w(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black 4 w(15)994 2023 y(1.2.5.)g(P)o(arsed)g(entities)p -Black 18 w(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black 4 w(16)994 2131 y(1.2.6.)g(Notations)g(and)h -(unparsed)e(entities)p Black 14 w(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black 4 w(19)795 2238 y(1.3.)h(A)i(complete)e(e)o(xample:)g -(The)h Fr(r)m(eadme)f Fv(DTD)p Black 3 w(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black 4 w(20)596 2346 y(2.)h(Using)g(PXP)p Black -6 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black 4 w(24)795 2454 y(2.1.)f(V)-9 b(alidation)p -Black 3 w(.)p Black Black -2 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black 4 w(24)795 -2562 y(2.2.)19 b(Ho)n(w)h(to)g(parse)g(a)h(document)d(from)h(an)h -(application)p Black 10 w(.)p Black Black -2 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black 4 w(24)795 -2670 y(2.3.)f(Class-based)h(processing)f(of)h(the)g(node)g(tree)p -Black 8 w(.)p Black Black -1 w(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black 4 w(29)795 -2778 y(2.4.)f(Example:)g(An)h(HTML)g(back)o(end)f(for)g(the)i -Fr(r)m(eadme)e Fv(DTD)p Black 3 w(.)p Black Black -1 -w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black 4 w(33)994 2886 y(2.4.1.)g(Header)p -Black 9 w(.)p Black Black -2 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black 4 w(33)994 2994 y(2.4.2.)g(T)-7 b(ype)19 -b(declarations)p Black 14 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black 4 w(33)994 3102 y(2.4.3.)g(Class)i Fq(store)p Black -11 w Fv(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black 4 w(34)994 3210 y(2.4.4.)e(Function)g -Fq(escape_html)p Black Fv(.)p Black Black -2 w(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -4 w(35)994 3318 y(2.4.5.)g(V)-5 b(irtual)20 b(class)h -Fq(shared)p Black 4 w Fv(.)p Black Black -2 w(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black 4 w(35)994 3426 y(2.4.6.)e(Class)i -Fq(only_data)p Black 17 w Fv(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black 4 w(36)994 -3534 y(2.4.7.)e(Class)i Fq(readme)p Black 8 w Fv(.)p -Black Black -1 w(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black 4 w(36)994 3642 y(2.4.8.)e(Classes)i -Fq(section)p Fv(,)f Fq(sect1)p Fv(,)f Fq(sect2)p Fv(,)h(and)g -Fq(sect3)p Black 13 w Fv(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black 4 w(39)994 3749 y(2.4.9.)f(Classes)i -Fq(map_tag)p Fv(,)f Fq(p)p Fv(,)g Fq(em)p Fv(,)g Fq(ul)p -Fv(,)g Fq(li)p Black 16 w Fv(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black 4 w(39)994 -3857 y(2.4.10.)e(Class)k Fq(br)p Black Fv(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black 4 w(40)994 3965 y(2.4.11.)c(Class)k -Fq(code)p Black 13 w Fv(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black 4 w(40)994 4073 y(2.4.12.)c(Class)k -Fq(a)p Black 4 w Fv(.)p Black Black -1 w(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black 4 w(41)994 -4181 y(2.4.13.)c(Class)k Fq(footnote)p Black 1 w Fv(.)p -Black Black -2 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black 4 w(42)994 4289 -y(2.4.14.)c(The)i(speci\002cation)f(of)h(the)g(document)f(model)p -Black 12 w(.)p Black Black -2 w(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black 4 w(43)596 4397 y(3.)h(The)f(objects)h -(representing)e(the)j(document)p Black 4 w(.)p Black -Black -3 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -4 w(46)795 4505 y(3.1.)e(The)h Fq(document)f Fv(class)p -Black 7 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black 4 w(46)795 4613 y(3.2.)g(The)h(class)h(type)f -Fq(node)p Black 2 w Fv(.)p Black Black -2 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -4 w(47)994 4721 y(3.2.1.)f(The)g(structure)h(of)g(document)e(trees)p -Black 3 w(.)p Black Black -1 w(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black 4 w(49)994 -4829 y(3.2.2.)h(The)g(methods)h(of)f(the)i(class)g(type)f -Fq(node)p Black 13 w Fv(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black 4 w(52)p Black 3842 -5278 a Fr(3)p Black eop -%%Page: 4 4 -4 3 bop Black Black 994 579 a Fv(3.2.3.)19 b(The)g(class)j -Fq(element_impl)p Black 2 w Fv(.)p Black Black -3 w(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black 4 w(56)994 687 y(3.2.4.)d(The)g(class)j Fq(data_impl)p -Black 12 w Fv(.)p Black Black -2 w(.)p Black Black -1 -w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black 4 w(57)994 -795 y(3.2.5.)d(The)g(type)h Fq(spec)p Black 5 w Fv(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black 4 w(58)994 903 y(3.2.6.)f(Examples)p Black -5 w(.)p Black Black -3 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black 4 w(60)994 -1011 y(3.2.7.)g(Iterators)p Black 12 w(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black 4 w(64)795 1119 y(3.3.)g(The)h(class)h(type)f Fq(extension)p -Black 6 w Fv(.)p Black Black -2 w(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black 4 w(65)994 1226 y(3.3.1.)f(Ho)n(w)h(to)g(de\002ne) -g(an)g(e)o(xtension)f(class)p Black 13 w(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black 4 w(66)994 1334 -y(3.3.2.)g(Ho)n(w)h(to)g(bind)f(e)o(xtension)g(classes)i(to)g(element)e -(types)p Black 10 w(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -4 w(68)795 1442 y(3.4.)g(Details)i(of)f(the)g(mapping)e(from)i(XML)g -(te)o(xt)g(to)g(the)g(tree)h(representation)p Black 13 -w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black 4 w(69)994 -1550 y(3.4.1.)e(The)g(representation)g(of)g(character)n(-free)f -(elements)p Black 9 w(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -4 w(69)994 1658 y(3.4.2.)h(The)g(representation)g(of)g(character)g -(data)p Black 10 w(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black 4 w(70)994 1766 -y(3.4.3.)g(The)g(representation)g(of)g(entities)i(within)f(documents)p -Black 12 w(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black 4 w(70)994 1874 y(3.4.4.)f(The)g(representation)g -(of)g(attrib)n(utes)p Black 20 w(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black 4 w(71)994 1982 y(3.4.5.)g(The)g(representation)g(of)g -(processing)g(instructions)p Black(.)p Black Black -1 -w(.)p Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black 4 w(71)994 2090 y(3.4.6.)g(The)g -(representation)g(of)g(comments)p Black 7 w(.)p Black -Black -1 w(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black 4 w(71)994 2198 y(3.4.7.)g(The)g(attrib)n(utes)i -Fq(xml:lang)e Fv(and)h Fq(xml:space)p Black 10 w Fv(.)p -Black Black -2 w(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black 4 w(72)994 2306 y(3.4.8.)f(And)g(what)h(about)g(namespaces?)p -Black 12 w(.)p Black Black -2 w(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black 4 w(72)596 -2414 y(4.)g(Con\002guring)e(and)h(calling)h(the)g(parser)p -Black 11 w(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black 4 w(73)795 2522 y(4.1.)f(Ov)o(ervie)n(w)p -Black 19 w(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black 4 w(73)795 -2630 y(4.2.)g(Resolv)o(ers)h(and)g(sources)p Black 2 -w(.)p Black Black -1 w(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black 4 w(75)994 2737 -y(4.2.1.)f(Using)h(the)g(b)n(uilt-in)f(resolv)o(ers)h(\(called)f -(sources\))p Black 5 w(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -4 w(75)994 2845 y(4.2.2.)g(The)g(resolv)o(er)g(API)p -Black 11 w(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black 4 w(76)994 2953 y(4.2.3.)g(Prede\002ned)f(resolv)o(er)h -(components)p Black 13 w(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black 4 w(78)795 3061 -y(4.3.)g(The)h(DTD)g(classes)p Black 1 w(.)p Black Black -1 w(.)p Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black 4 w(81)795 -3169 y(4.4.)f(In)m(v)n(oking)f(the)i(parser)p Black 14 -w(.)p Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black 4 w(89)994 -3277 y(4.4.1.)f(Def)o(aults)p Black 10 w(.)p Black Black --1 w(.)p Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black 4 w(89)994 3385 y(4.4.2.)g(P)o(arsing)g(functions)p -Black 4 w(.)p Black Black -3 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black 4 w(90)994 3493 y(4.4.3.)g(Con\002guration)f(options)p -Black 19 w(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black 4 w(91)994 3601 y(4.4.4.)h(Which)h -(con\002guration)d(should)i(I)i(use?)p Black 18 w(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -4 w(93)795 3709 y(4.5.)e(Updates)p Black 10 w(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black 4 w(95)p Black 3842 5278 a -Fr(4)p Black eop -%%Page: 5 5 -5 4 bop Black Black -2 621 a Fs(List)48 b(of)g(Figures)396 -815 y Fv(3-1.)19 b(A)i(tree)f(with)h(element)e(nodes,)h(data)g(nodes,)f -(and)g(attrib)n(utes)p Black 18 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black 4 w(49)396 923 y(3-2.)g(Nodes)h(are)g(doubly)f(link)o -(ed)g(trees)p Black 15 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black 4 w(50)396 -1031 y(3-3.)g(A)i(node)e(can)h(only)g(be)g(added)f(if)h(it)h(is)g(a)g -(root)p Black 5 w(.)p Black Black -1 w(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black 4 w(51)396 1139 y(3-4.)e(A)i(deleted)f(node)f -(becomes)g(the)h(root)g(of)g(the)g(subtree)p Black 3 -w(.)p Black Black -1 w(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -4 w(51)396 1247 y(3-5.)f(The)h(clone)g(of)g(a)g(subtree)p -Black 18 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black 4 w(52)396 1355 y(3-6.)f(The)h(structure)g -(of)f(nodes)h(and)g(e)o(xtensions)p Black 18 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black -1 w(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black Black(.)p Black Black(.)p Black Black(.)p Black -Black -1 w(.)p Black Black(.)p Black Black(.)p Black -Black(.)p Black Black -1 w(.)p Black Black(.)p Black -Black(.)p Black Black(.)p Black Black -1 w(.)p Black -Black(.)p Black Black(.)p Black Black(.)p Black Black --1 w(.)p Black Black(.)p Black Black(.)p Black Black(.)p -Black Black -1 w(.)p Black Black(.)p Black Black(.)p -Black Black(.)p Black Black(.)p Black Black -1 w(.)p -Black 4 w(65)p Black 3842 5278 a Fr(5)p Black eop -%%Page: 6 6 -6 5 bop Black Black 1241 647 a Fy(I.)58 b(User')-12 b(s)57 -b(guide)p Black Black eop -%%Page: 7 7 -7 6 bop Black Black -2 621 a Fs(Chapter)48 b(1.)f(What)h(is)f(XML?)-2 -1055 y Fx(1.1.)39 b(Intr)m(oduction)396 1235 y Fv(XML)20 -b(\(short)g(for)f Fr(Extensible)h(Markup)g(Langua)o(g)o(e)p -Fv(\))e(generalizes)h(the)h(idea)g(that)g(te)o(xt)g(documents)f(are)h -(typically)396 1343 y(structured)f(in)h(sections,)g(sub-sections,)f -(paragraphs,)f(and)i(so)g(on.)g(The)g(format)f(of)h(the)g(document)e -(is)j(not)f(\002x)o(ed)g(\(as,)396 1451 y(for)g(e)o(xample,)e(in)j -(HTML\),)e(b)n(ut)h(can)g(be)g(declared)f(by)h(a)h(so-called)e(DTD)i -(\(document)c(type)j(de\002nition\).)f(The)g(DTD)396 -1559 y(describes)h(only)f(the)i(rules)f(ho)n(w)f(the)i(document)d(can)i -(be)g(structured,)e(b)n(ut)j(not)e(ho)n(w)h(the)g(document)e(can)i(be) -396 1667 y(processed.)f(F)o(or)h(e)o(xample,)e(if)j(you)e(w)o(ant)i(to) -f(publish)f(a)i(book)e(that)h(uses)h(XML)f(markup,)e(you)h(will)i(need) -f(a)g(processor)396 1775 y(that)h(con)m(v)o(erts)d(the)i(XML)g(\002le)h -(into)f(a)h(printable)e(format)g(such)h(as)h(Postscript.)f(On)g(the)g -(one)g(hand,)f(the)h(structure)f(of)396 1883 y(XML)h(documents)f(is)i -(con\002gurable;)d(on)i(the)g(other)f(hand,)g(there)h(is)h(no)f(longer) -f(a)h(canonical)f(interpretation)f(of)i(the)396 1991 -y(elements)g(of)g(the)g(document;)f(for)g(e)o(xample)g(one)h(XML)g(DTD) -g(might)g(w)o(ant)g(that)g(paragraphes)e(are)i(delimited)g(by)396 -2099 y Fq(para)g Fv(tags,)h(and)e(another)g(DTD)h(e)o(xpects)g -Fq(p)g Fv(tags)h(for)e(the)i(same)f(purpose.)e(As)j(a)g(result,)f(for)g -(e)n(v)o(ery)e(DTD)j(a)f(ne)n(w)396 2206 y(processor)f(is)i(required.) -396 2356 y(Although)e(XML)h(can)g(be)g(used)g(to)g(e)o(xpress)g -(structured)f(te)o(xt)h(documents)e(it)j(is)g(not)f(limited)g(to)g -(this)h(kind)e(of)396 2464 y(application.)g(F)o(or)h(e)o(xample,)e(XML) -i(can)g(also)h(be)f(used)g(to)g(e)o(xchange)e(structured)h(data)h(o)o -(v)o(er)f(a)h(netw)o(ork,)f(or)h(to)396 2572 y(simply)g(store)g -(structured)f(data)h(in)g(\002les.)h(Note)f(that)h(XML)f(documents)e -(cannot)i(contain)f(arbitrary)f(binary)h(data)396 2680 -y(because)g(some)g(characters)g(are)g(forbidden;)e(for)i(some)g -(applications)g(you)f(need)h(to)h(encode)e(binary)g(data)h(as)h(te)o -(xt)g(\(e.g.)396 2788 y(the)g(base)h(64)f(encoding\).)-2 -3116 y Fp(1.1.1.)35 b(The)f("hello)g(w)n(orld")e(e)n(xample)396 -3283 y Fv(The)20 b(follo)n(wing)f(e)o(xample)f(sho)n(ws)j(a)f(v)o(ery)f -(simple)i(DTD,)f(and)f(a)i(corresponding)c(document)h(instance.)h(The) -396 3391 y(document)f(is)k(structured)c(such)i(that)h(it)f(consists)h -(of)f(sections,)g(and)g(that)g(sections)g(consist)h(of)f(paragraphs,)d -(and)j(that)396 3499 y(paragraphs)e(contain)h(plain)h(te)o(xt:)396 -3679 y Fq()396 -3777 y()396 3874 -y()396 4065 y Fv(The)20 -b(follo)n(wing)f(document)f(is)j(an)f(instance)g(of)g(this)h(DTD:)396 -4245 y Fq()396 -4342 y()396 -4439 y()486 4536 y(
)576 4633 y(This)e(is) -i(a)h(paragraph)e(of)i(the)f(first)g(section.)576 -4731 y(This)e(is)i(another)g(paragraph)f(of)i(the)f(first)g -(section.)486 4828 y(
)p Black 3839 -5278 a Fr(7)p Black eop -%%Page: 8 8 -8 7 bop Black 3028 67 a Fr(Chapter)19 b(1.)h(What)h(is)g(XML?)p -Black 486 579 a Fq(
)576 676 y(This)42 -b(is)i(the)h(only)f(paragraph)f(of)i(the)f(second)g -(section.)486 773 y(
)396 870 y(
)396 -1061 y Fv(As)21 b(in)g(HTML)f(\(and,)f(of)h(course,)f(in)h(grand-f)o -(ather)d(SGML\),)j(the)g("pieces")g(of)g(the)g(document)f(are)h -(delimited)f(by)396 1169 y(element)h(braces,)f(i.e.)i(such)f(a)g(piece) -g(be)o(gins)f(with)i Fo(<)p Fq(name-of-the-type-of-the-piece)p -Fo(>)15 b Fv(and)20 b(ends)g(with)396 1277 y Fo(<)p Fq -(/name-of-the-type-of-the-piece)p Fo(>)p Fv(,)15 b(and)20 -b(the)g(pieces)g(are)g(called)g Fr(elements)p Fv(.)g(Unlik)o(e)g(HTML)g -(and)396 1385 y(SGML,)g(both)g(start)g(tags)h(and)f(end)f(tags)i -(\(i.e.)f(the)g(delimiters)g(written)g(in)g(angle)g(brack)o(ets\))f -(can)h(ne)n(v)o(er)f(be)h(left)g(out.)396 1493 y(F)o(or)g(e)o(xample,)f -(HTML)h(calls)h(the)f(paragraphs)e(simply)i Fq(p)p Fv(,)g(and)f -(because)h(paragraphs)e(ne)n(v)o(er)h(contain)g(paragraphs,)f(a)396 -1601 y(sequence)h(of)h(se)n(v)o(eral)g(paragraphs)e(can)i(be)g(written) -g(as:)396 1781 y Fq(

First)44 b(paragraph)396 1878 -y(

Second)g(paragraph)396 2069 y Fv(This)21 b(is)g(not)f(possible)g -(in)g(XML;)g(continuing)e(our)i(e)o(xample)e(abo)o(v)o(e)h(we)h(must)h -(al)o(w)o(ays)f(write)396 2249 y Fq(First)42 -b(paragraph)396 2346 y(Second)g -(paragraph)396 2537 y Fv(The)20 b(rationale)f(behind)g -(that)h(is)i(to)e(\(1\))f(simplify)h(the)g(de)n(v)o(elopment)d(of)j -(XML)h(parsers)f(\(you)e(need)i(not)g(con)m(v)o(ert)e(the)396 -2645 y(DTD)j(into)f(a)g(deterministic)f(\002nite)i(automaton)d(which)i -(is)h(required)d(to)j(detect)f(omitted)f(tags\),)h(and)g(to)g(\(2\))g -(mak)o(e)f(it)396 2753 y(possible)h(to)h(parse)e(the)i(document)d -(independent)f(of)j(whether)f(the)i(DTD)f(is)h(kno)n(wn)e(or)h(not.)396 -2903 y(The)g(\002rst)h(line)f(of)g(our)g(sample)g(document,)396 -3083 y Fq()396 -3274 y Fv(is)21 b(the)e(so-called)g Fr(XML)h(declar)o(ation)p -Fv(.)d(It)j(e)o(xpresses)e(that)i(the)f(document)f(follo)n(ws)h(the)g -(con)m(v)o(entions)e(of)i(XML)g(v)o(ersion)396 3382 y(1.0,)h(and)f -(that)h(the)h(document)d(is)j(encoded)d(using)i(characters)f(from)g -(the)i(ISO-8859-1)c(character)i(set)i(\(often)e(kno)n(wn)396 -3490 y(as)i("Latin)e(1",)g(mostly)h(used)f(in)h(W)-7 -b(estern)20 b(Europe\).)d(Although)h(the)i(XML)g(declaration)e(is)i -(not)g(mandatory)-5 b(,)16 b(it)21 b(is)f(good)396 3598 -y(style)h(to)f(include)f(it;)i(e)n(v)o(erybody)c(sees)k(at)g(the)f -(\002rst)h(glance)f(that)g(the)g(document)e(uses)j(XML)f(markup)f(and)g -(not)h(the)396 3706 y(similar)n(-looking)e(HTML)i(and)g(SGML)g(markup)f -(languages.)f(If)i(you)g(omit)g(the)g(XML)g(declaration,)e(the)j -(parser)e(will)396 3813 y(assume)h(that)h(the)f(document)e(is)j -(encoded)e(as)i(UTF-8)e(or)h(UTF-16)f(\(there)h(is)h(a)g(rule)e(that)i -(mak)o(es)f(it)h(possible)f(to)396 3921 y(distinguish)f(between)h -(UTF-8)g(and)f(UTF-16)g(automatically\);)g(these)h(are)g(encodings)f -(of)h(Unicode')-5 b(s)19 b(uni)n(v)o(ersal)396 4029 y(character)g(set.) -i(\(Note)f(that)g(PXP,)h(unlik)o(e)e(its)i(predecessor)e("Markup",)f -(fully)i(supports)f(Unicode.\))396 4179 y(The)h(second)f(line,)396 -4359 y Fq()396 -4550 y Fv(names)20 b(the)g(DTD)h(that)f(is)h(going)e(to)h(be)g(used)g -(for)g(the)g(rest)h(of)f(the)g(document.)e(In)i(general,)f(it)i(is)g -(possible)f(that)g(the)396 4658 y(DTD)h(consists)f(of)g(tw)o(o)h -(parts,)f(the)g(so-called)f(e)o(xternal)g(and)h(the)g(internal)f -(subset.)h("External")f(means)h(that)g(the)h(DTD)396 -4766 y(e)o(xists)g(as)g(a)f(second)g(\002le;)h("internal")e(means)h -(that)g(the)g(DTD)h(is)g(included)d(in)j(the)f(same)g(\002le.)h(In)f -(this)g(e)o(xample,)f(there)p Black 3842 5278 a Fr(8)p -Black eop -%%Page: 9 9 -9 8 bop Black 3028 67 a Fr(Chapter)19 b(1.)h(What)h(is)g(XML?)p -Black 396 579 a Fv(is)g(only)f(an)g(e)o(xternal)f(subset,)h(and)g(the)g -(system)g(identi\002er)g("simple.dtd")e(speci\002es)j(where)f(the)g -(DTD)g(\002le)h(can)f(be)396 687 y(found.)e(System)j(identi\002ers)f -(are)g(interpreted)e(as)j(URLs;)g(for)f(instance)g(this)g(w)o(ould)g -(be)g(le)o(gal:)396 867 y Fq()396 1058 y Fv(Please)21 -b(note)f(that)g(PXP)h(cannot)e(interpret)g(HTTP)i(identi\002ers)e(by)h -(def)o(ault,)f(b)n(ut)i(it)g(is)g(possible)f(to)g(change)f(the)396 -1166 y(interpretation)f(of)i(system)h(identi\002ers.)396 -1315 y(The)f(w)o(ord)g(immediately)f(follo)n(wing)f Fq(DOCTYPE)i -Fv(determines)f(which)g(of)h(the)g(declared)f(element)h(types)g(\(here) -396 1423 y("document",)e("section",)h(and)h("paragraph"\))d(is)k(used)f -(for)g(the)g(outermost)f(element,)g(the)h Fr(r)l(oot)h(element)q -Fv(.)f(In)g(this)396 1531 y(e)o(xample)f(it)i(is)g Fq(document)f -Fv(because)f(the)h(outermost)f(element)h(is)h(delimited)e(by)h -Fo(<)p Fq(document)p Fo(>)f Fv(and)396 1639 y Fo(<)p -Fq(/document)p Fo(>)p Fv(.)396 1789 y(The)h(DTD)g(consists)h(of)f -(three)g(declarations)f(for)g(element)h(types:)g Fq(document)p -Fv(,)f Fq(section)p Fv(,)g(and)h Fq(paragraph)p Fv(.)f(Such)396 -1896 y(a)i(declaration)d(has)j(tw)o(o)f(parts:)396 2077 -y Fo(<)p Fq(!ELEMENT)43 b Fn(name)i(content-model)p Fo(>)396 -2268 y Fv(The)20 b(content)f(model)h(is)h(a)f(re)o(gular)f(e)o -(xpression)g(which)g(describes)h(the)g(possible)g(inner)f(structure)h -(of)g(the)g(element.)396 2376 y(Here,)g Fq(document)f -Fv(contains)h(one)g(or)g(more)f(sections,)h(and)g(a)g -Fq(section)g Fv(contains)f(one)h(or)g(more)f(paragraphs.)f(Note)396 -2483 y(that)j(these)f(tw)o(o)g(element)g(types)g(are)g(not)g(allo)n -(wed)f(to)i(contain)e(arbitrary)g(te)o(xt.)g(Only)h(the)g -Fq(paragraph)g Fv(element)f(type)396 2591 y(is)i(declared)e(such)h -(that)h(parsed)e(character)g(data)h(\(indicated)f(by)h(the)g(symbol)f -Fq(#PCDATA)p Fv(\))g(is)i(permitted.)396 2741 y(See)g(belo)n(w)e(for)h -(a)h(detailed)e(discussion)h(of)g(content)f(models.)-2 -3110 y Fp(1.1.2.)35 b(XML)e(par)n(ser)n(s)h(and)g(pr)n(ocessor)n(s)396 -3278 y Fv(XML)20 b(documents)f(are)h(human-readable,)c(b)n(ut)21 -b(this)f(is)h(not)f(the)h(main)e(purpose)g(of)h(this)h(language.)d(XML) -i(has)g(been)396 3386 y(designed)f(such)h(that)g(documents)f(can)h(be)g -(read)g(by)f(a)i(program)d(called)i(an)g Fr(XML)h(par)o(ser)r -Fv(.)f(The)g(parser)g(checks)f(that)396 3494 y(the)h(document)f(is)i -(well-formatted,)d(and)h(it)i(represents)f(the)g(document)e(as)j -(objects)f(of)g(the)g(programming)d(language.)396 3602 -y(There)j(are)g(tw)o(o)g(aspects)h(when)e(checking)g(the)h(document:)e -(First,)j(the)f(document)e(must)j(follo)n(w)e(some)h(basic)396 -3710 y(syntactic)g(rules,)g(such)g(as)h(that)f(tags)h(are)f(written)g -(in)g(angle)g(brack)o(ets,)f(that)h(for)g(e)n(v)o(ery)f(start)h(tag)h -(there)e(must)i(be)f(a)396 3818 y(corresponding)d(end)j(tag)g(and)f(so) -i(on.)f(A)g(document)e(respecting)h(these)i(rules)f(is)h -Fr(well-formed)r Fv(.)f(Second,)f(the)396 3926 y(document)f(must)j -(match)e(the)i(DTD)f(in)g(which)g(case)h(the)f(document)e(is)j -Fr(valid)r Fv(.)f(Man)o(y)f(parsers)h(check)f(only)h(on)396 -4034 y(well-formedness)e(and)i(ignore)f(the)h(DTD;)h(PXP)g(is)g -(designed)e(such)g(that)i(it)g(can)f(e)n(v)o(en)f(v)n(alidate)g(the)i -(document.)396 4183 y(A)g(parser)f(does)f(not)h(mak)o(e)g(a)h(sensible) -f(application,)e(it)j(only)f(reads)g(XML)g(documents.)e(The)i(whole)g -(application)396 4291 y(w)o(orking)f(with)h(XML-formatted)e(data)i(is)h -(called)f(an)g Fr(XML)h(pr)l(ocessor)r Fv(.)f(Often)g(XML)g(processors) -f(con)m(v)o(ert)396 4399 y(documents)g(into)h(another)e(format,)h(such) -h(as)h(HTML)f(or)g(Postscript.)g(Sometimes)g(processors)f(e)o(xtract)g -(data)h(of)g(the)396 4507 y(documents)f(and)g(output)g(the)i(processed) -e(data)h(again)f(XML-formatted.)e(The)j(parser)g(can)g(help)f(the)i -(application)396 4615 y(processing)e(the)h(document;)f(for)g(e)o -(xample)g(it)i(can)f(pro)o(vide)e(means)i(to)g(access)h(the)f(document) -e(in)j(a)f(speci\002c)h(manner)-5 b(.)396 4723 y(PXP)21 -b(supports)e(an)i(object-oriented)c(access)k(layer)e(specially)-5 -b(.)p Black 3842 5278 a Fr(9)p Black eop -%%Page: 10 10 -10 9 bop Black 3028 67 a Fr(Chapter)19 b(1.)h(What)h(is)g(XML?)p -Black -2 583 a Fp(1.1.3.)35 b(Discussion)396 751 y Fv(As)21 -b(we)g(ha)n(v)o(e)e(seen,)h(there)g(are)g(tw)o(o)h(le)n(v)o(els)f(of)g -(description:)f(On)h(the)g(one)g(hand,)f(XML)h(can)g(de\002ne)f(rules)i -(about)e(the)396 859 y(format)g(of)h(a)h(document)d(\(the)i(DTD\),)g -(on)f(the)i(other)e(hand,)g(XML)h(e)o(xpresses)g(structured)f -(documents.)f(There)h(are)h(a)396 967 y(number)f(of)h(possible)f -(applications:)p Black 396 1199 a Ft(\225)p Black 60 -w Fv(XML)i(can)f(be)g(used)g(to)g(e)o(xpress)f(structured)g(te)o(xts.)h -(Unlik)o(e)g(HTML,)g(there)g(is)h(no)e(canonical)g(interpretation;)g -(one)479 1307 y(w)o(ould)h(ha)n(v)o(e)f(to)i(write)f(a)h(back)o(end)d -(for)i(the)g(DTD)g(that)h(translates)f(the)g(structured)f(te)o(xts)h -(into)g(a)h(format)e(that)479 1415 y(e)o(xisting)h(bro)n(wsers,)f -(printers)g(etc.)i(understand.)c(The)j(adv)n(antage)e(of)i(a)h -(self-de\002ned)e(document)f(format)h(is)i(that)f(it)479 -1523 y(is)h(possible)f(to)h(design)e(the)h(format)f(in)i(a)f(more)g -(problem-oriented)c(w)o(ay)-5 b(.)20 b(F)o(or)f(e)o(xample,)g(if)h(the) -h(task)f(is)h(to)g(e)o(xtract)479 1631 y(reports)f(from)f(a)h -(database,)g(one)f(can)h(use)h(a)f(DTD)h(that)f(re\003ects)h(the)f -(structure)f(of)h(the)g(report)f(or)h(the)g(database.)g(A)479 -1739 y(possible)g(approach)e(w)o(ould)i(be)g(to)g(ha)n(v)o(e)g(an)g -(element)f(type)h(for)g(e)n(v)o(ery)f(database)g(table)h(and)g(for)g(e) -n(v)o(ery)e(column.)479 1847 y(Once)i(the)g(DTD)h(has)f(been)g -(designed,)e(the)j(report)e(procedure)e(can)j(be)g(splitted)h(up)e(in)i -(a)f(part)g(that)h(selects)g(the)479 1955 y(database)f(ro)n(ws)g(and)g -(outputs)f(them)h(as)h(an)f(XML)g(document)e(according)g(to)j(the)f -(DTD,)g(and)g(in)g(a)g(part)g(that)479 2063 y(translates)h(the)f -(document)e(into)i(other)f(formats.)g(Of)i(course,)e(the)h(latter)h -(part)e(can)h(be)h(solv)o(ed)e(in)h(a)h(generic)e(w)o(ay)-5 -b(,)479 2170 y(e.g.)20 b(there)g(may)f(be)h(con\002gurable)e(back)o -(ends)h(for)h(all)g(DTDs)h(that)f(follo)n(w)g(the)g(approach)e(and)i -(ha)n(v)o(e)f(element)h(types)479 2278 y(for)g(tables)g(and)g(columns.) -479 2428 y(XML)h(plays)f(the)g(role)g(of)g(a)g(con\002gurable)e -(intermediate)h(format.)g(The)g(database)h(e)o(xtraction)e(function)h -(can)h(be)479 2536 y(written)g(without)g(ha)n(ving)f(to)h(kno)n(w)f -(the)h(details)h(of)f(typesetting;)f(the)h(back)o(ends)f(can)h(be)g -(written)g(without)g(ha)n(ving)479 2644 y(to)h(kno)n(w)e(the)h(details) -h(of)e(the)i(database.)479 2793 y(Of)g(course,)e(there)h(are)g -(traditional)f(solutions.)g(One)h(can)g(de\002ne)g(an)g(ad)g(hoc)g -(intermediate)e(te)o(xt)j(\002le)f(format.)f(This)479 -2901 y(disadv)n(antage)f(is)k(that)e(there)g(are)g(no)f(names)h(for)g -(the)g(pieces)g(of)g(the)g(format,)f(and)h(that)g(such)g(formats)g -(usually)f(lack)479 3009 y(of)h(documentation)d(because)j(of)g(this.)g -(Another)f(solution)g(w)o(ould)h(be)g(to)g(ha)n(v)o(e)g(a)h(binary)e -(representation,)e(either)j(as)479 3117 y(language-dependent)c(or)k -(language-independent)14 b(structure)20 b(\(e)o(xample)e(of)i(the)g -(latter)h(can)f(be)g(found)e(in)j(RPC)479 3225 y(implementations\).)d -(The)i(disadv)n(antage)e(is)j(that)f(it)h(is)g(harder)e(to)i(vie)n(w)f -(such)g(representations,)e(one)h(has)i(to)f(write)479 -3333 y(pretty)g(printers)f(for)h(this)g(purpose.)f(It)h(is)h(also)g -(more)e(dif)n(\002cult)h(to)g(enter)g(test)h(data;)f(XML)g(is)h(plain)f -(te)o(xt)g(that)h(can)f(be)479 3441 y(written)g(using)g(an)g(arbitrary) -f(editor)g(\(Emacs)h(has)g(e)n(v)o(en)f(a)i(good)e(XML)h(mode,)f -(PSGML\).)h(All)h(these)f(alternati)n(v)o(es)479 3549 -y(suf)n(fer)g(from)f(a)h(missing)g(structure)g(check)o(er)m(,)e(i.e.)i -(the)h(programs)d(processing)h(these)h(formats)f(usually)h(do)g(not)479 -3657 y(check)g(the)g(input)f(\002le)i(or)f(input)g(object)f(in)i -(detail;)f(XML)g(parsers)g(check)f(the)h(syntax)g(of)g(the)g(input)g -(\(the)f(so-called)479 3765 y(well-formedness)f(check\),)h(and)h(the)g -(adv)n(anced)e(parsers)i(lik)o(e)g(PXP)h(e)n(v)o(en)f(v)o(erify)e(that) -j(the)f(structure)f(matches)h(the)479 3872 y(DTD)h(\(the)f(so-called)f -(v)n(alidation\).)p Black 396 4022 a Ft(\225)p Black -60 w Fv(XML)i(can)f(be)g(used)g(as)g(con\002gurable)e(communication)g -(language.)g(A)i(fundamental)e(problem)h(of)h(e)n(v)o(ery)479 -4130 y(communication)e(is)j(that)f(sender)f(and)h(recei)n(v)o(er)f -(must)h(follo)n(w)g(the)g(same)g(con)m(v)o(entions)e(about)h(the)h -(language.)e(F)o(or)479 4238 y(data)i(e)o(xchange,)e(the)i(question)f -(is)j(usually)d(which)h(data)g(records)f(and)h(\002elds)g(are)g(a)n(v)n -(ailable,)g(ho)n(w)g(the)o(y)f(are)479 4346 y(syntactically)h -(composed,)e(and)i(which)f(v)n(alues)h(are)g(possible)g(for)g(the)g(v)n -(arious)f(\002elds.)h(Similar)h(questions)e(arise)479 -4454 y(for)h(te)o(xt)g(document)e(e)o(xchange.)g(XML)i(does)g(not)g -(answer)g(these)g(problems)f(completely)-5 b(,)18 b(b)n(ut)i(it)h -(reduces)e(the)479 4562 y(number)g(of)h(ambiguities)f(for)g(such)h(con) -m(v)o(entions:)e(The)i(outlines)f(of)h(the)g(syntax)g(are)g -(speci\002ed)g(by)g(the)g(DTD)g(\(b)n(ut)479 4669 y(not)g(necessarily)g -(the)g(details\),)g(and)g(XML)g(introduces)e(canonical)h(names)h(for)g -(the)g(components)e(of)i(documents)479 4777 y(such)g(that)h(it)f(is)i -(simpler)d(to)i(describe)e(the)h(rest)h(of)f(the)g(syntax)g(and)f(the)h -(semantics)h(informally)-5 b(.)p Black 3800 5278 a Fr(10)p -Black eop -%%Page: 11 11 -11 10 bop Black 3028 67 a Fr(Chapter)19 b(1.)h(What)h(is)g(XML?)p -Black Black 396 579 a Ft(\225)p Black 60 w Fv(XML)f(is)g(a)g(data)f -(storage)g(format.)f(Currently)-5 b(,)17 b(e)n(v)o(ery)h(softw)o(are)h -(product)f(tends)h(to)h(use)f(its)i(o)n(wn)d(w)o(ay)i(to)f(store)h -(data;)479 687 y(commercial)f(softw)o(are)h(often)f(does)h(not)g -(describe)f(such)h(formats,)f(and)h(it)h(is)g(a)g(pain)e(to)i(inte)o -(grate)e(such)h(softw)o(are)479 795 y(into)g(a)g(bigger)f(project.)f -(XML)i(can)g(help)f(to)h(impro)o(v)o(e)e(this)j(situation)e(when)g(se)n -(v)o(eral)g(applications)g(share)h(the)g(same)479 903 -y(syntax)g(of)g(data)g(\002les.)h(DTDs)f(are)g(then)g(neutral)g -(instances)g(that)g(check)f(the)h(format)g(of)f(data)i(\002les)g -(independent)c(of)479 1011 y(applications.)-2 1512 y -Fx(1.2.)39 b(Highlights)e(of)i(XML)396 1692 y Fv(This)21 -b(section)f(e)o(xplains)f(man)o(y)g(of)h(the)g(features)f(of)h(XML,)g -(b)n(ut)h(not)e(all,)i(and)f(some)g(features)f(not)h(in)g(detail.)g(F)o -(or)g(a)396 1800 y(complete)f(description,)g(see)i(the)f(XML)g -(speci\002cation)396 1908 y(\(http://www)-5 b(.w3.or)o -(g/TR/1998/REC-xml-)o(19)o(98)o(02)o(10)o(.htm)o(l\).)-2 -2236 y Fp(1.2.1.)35 b(The)f(DTD)g(and)g(the)f(instance)396 -2404 y Fv(The)20 b(DTD)g(contains)g(v)n(arious)f(declarations;)g(in)h -(general)f(you)h(can)g(only)f(use)i(a)f(feature)f(if)i(you)e(ha)n(v)o -(e)h(pre)n(viously)396 2512 y(declared)f(it.)i(The)f(document)e -(instance)i(\002le)h(may)e(contain)g(the)i(full)f(DTD,)g(b)n(ut)g(it)h -(is)g(also)g(possible)f(to)g(split)h(the)f(DTD)396 2619 -y(into)g(an)g(internal)g(and)f(an)h(e)o(xternal)f(subset.)h(A)h -(document)d(must)j(be)o(gin)e(as)h(follo)n(ws)g(if)h(the)f(full)g(DTD)g -(is)h(included:)396 2800 y Fo(<)p Fq(?xml)44 b(version="1.0")f -(encoding=")p Fn(Your)f(encoding)t Fq("?)p Fo(>)396 2897 -y(<)p Fq(!DOCTYPE)h Fn(root)i Fq([)486 2994 y Fn(Declarations)396 -3091 y Fq(])p Fo(>)396 3282 y Fv(These)20 b(declarations)f(are)h -(called)g(the)h Fr(internal)e(subset)q Fv(.)i(Note)f(that)g(the)g -(usage)g(of)g(entities)h(and)e(conditional)g(sections)396 -3390 y(is)i(restricted)f(within)g(the)g(internal)g(subset.)396 -3539 y(If)g(the)h(declarations)d(are)j(located)e(in)h(a)h(dif)n(ferent) -e(\002le,)h(you)f(can)h(refer)g(to)g(this)h(\002le)g(as)g(follo)n(ws:) -396 3720 y Fo(<)p Fq(?xml)44 b(version="1.0")f(encoding=")p -Fn(Your)f(encoding)t Fq("?)p Fo(>)396 3817 y(<)p Fq(!DOCTYPE)h -Fn(root)i Fq(SYSTEM)e(")p Fn(file)h(name)p Fq(")p Fo(>)396 -4008 y Fv(The)20 b(declarations)f(in)h(the)h(\002le)f(are)h(called)f -(the)g Fr(e)n(xternal)g(subset)q Fv(.)g(The)g(\002le)h(name)f(is)h -(called)f(the)g Fr(system)h(identi\002er)r Fv(.)e(It)396 -4116 y(is)i(also)g(possible)f(to)g(refer)g(to)g(the)g(\002le)h(by)f(a)g -(so-called)g Fr(public)f(identi\002er)r Fv(,)g(b)n(ut)i(most)f(XML)g -(applications)f(w)o(on')o(t)g(use)396 4223 y(this)i(feature.)396 -4373 y(Y)-9 b(ou)20 b(can)g(also)g(specify)g(both)f(internal)h(and)f(e) -o(xternal)g(subsets.)i(In)e(this)i(case,)g(the)f(declarations)f(of)h -(both)f(subsets)i(are)396 4481 y(mix)o(ed,)e(and)h(if)g(there)g(are)g -(con\003icts,)g(the)g(declaration)f(of)h(the)g(internal)f(subset)i(o)o -(v)o(errides)d(those)i(of)g(the)g(e)o(xternal)396 4589 -y(subset)h(with)f(the)g(same)h(name.)e(This)h(looks)g(as)h(follo)n(ws:) -396 4769 y Fo(<)p Fq(?xml)44 b(version="1.0")f(encoding=")p -Fn(Your)f(encoding)t Fq("?)p Fo(>)396 4866 y(<)p Fq(!DOCTYPE)h -Fn(root)89 b Fq(SYSTEM)44 b(")p Fn(file)g(name)p Fq(")g([)p -Black 3800 5278 a Fr(11)p Black eop -%%Page: 12 12 -12 11 bop Black 3028 67 a Fr(Chapter)19 b(1.)h(What)h(is)g(XML?)p -Black 486 579 a Fn(Declarations)396 676 y Fq(])p Fo(>)396 -909 y Fv(The)f(XML)g(declaration)f(\(the)h(string)g(be)o(ginning)d -(with)k Fo(<)p Fq(?xml)e Fv(and)h(ending)f(at)i Fq(?)p -Fo(>)p Fv(\))f(should)f(specify)g(the)h(encoding)396 -1016 y(of)g(the)g(\002le.)h(Common)e(v)n(alues)h(are)g(UTF-8,)f(and)h -(the)g(ISO-8859)e(series)j(of)f(character)f(sets.)i(Note)f(that)g(e)n -(v)o(ery)f(\002le)396 1124 y(parsed)h(by)f(the)i(XML)f(processor)f(can) -h(be)o(gin)f(with)h(an)g(XML)h(declaration)d(and)i(that)g(e)n(v)o(ery)f -(\002le)i(may)e(ha)n(v)o(e)h(its)h(o)n(wn)396 1232 y(encoding.)396 -1382 y(The)f(name)g(of)g(the)g(root)f(element)h(must)g(be)g(mentioned)f -(directly)g(after)h(the)g Fq(DOCTYPE)g Fv(string.)f(This)i(means)e -(that)i(a)396 1490 y(full)f(document)f(instance)g(looks)h(lik)o(e)396 -1670 y Fo(<)p Fq(?xml)44 b(version="1.0")f(encoding=")p -Fn(Your)f(encoding)t Fq("?)p Fo(>)396 1767 y(<)p Fq(!DOCTYPE)h -Fn(root)89 b Fq(SYSTEM)44 b(")p Fn(file)g(name)p Fq(")g([)486 -1864 y Fn(Declarations)396 1961 y Fq(])p Fo(>)396 2156 -y(<)p Fn(root)p Fo(>)486 2253 y Fn(inner)g(contents)396 -2350 y Fo(<)p Fq(/)p Fn(root)p Fo(>)-2 2802 y Fp(1.2.2.)35 -b(Reser)q(ved)h(c)o(haracter)n(s)396 2970 y Fv(Some)20 -b(characters)f(are)i(generally)d(reserv)o(ed)h(to)h(indicate)g(markup)e -(such)i(that)g(the)o(y)g(cannot)f(be)h(used)g(for)g(character)396 -3078 y(data.)g(These)g(characters)f(are)h Fm(<)p Fv(,)h -Fm(>)p Fv(,)f(and)f(&.)h(Furthermore,)e(single)i(and)g(double)e(quotes) -i(are)g(sometimes)g(reserv)o(ed.)396 3186 y(If)g(you)g(w)o(ant)g(to)g -(include)f(such)h(a)h(character)e(as)i(character)m(,)d(write)j(it)f(as) -h(follo)n(ws:)p Black 396 3473 a Ft(\225)p Black 60 w -Fq(<)f Fv(instead)g(of)g Fm(<)p Black 396 3581 a Ft(\225)p -Black 60 w Fq(>)g Fv(instead)g(of)g Fm(>)p Black 396 -3689 a Ft(\225)p Black 60 w Fq(&)g Fv(instead)g(of)g(&)p -Black 396 3797 a Ft(\225)p Black 60 w Fq(')g Fv(instead)g(of)g(')p -Black 396 3905 a Ft(\225)p Black 60 w Fq(")g Fv(instead)g(of)g(") -396 4054 y(All)h(other)e(characters)h(are)g(free)g(in)g(the)g(document) -e(instance.)i(It)g(is)i(possible)d(to)i(include)e(a)i(character)e(by)g -(its)j(position)396 4162 y(in)f(the)f(Unicode)f(alphabet:)396 -4342 y Fq(&#)p Fn(n)p Fq(;)396 4533 y Fv(where)h Fl(n)g -Fv(is)i(the)e(decimal)f(number)g(of)h(the)g(character)-5 -b(.)19 b(Alternati)n(v)o(ely)-5 b(,)18 b(you)h(can)h(specify)g(the)g -(character)f(by)h(its)396 4641 y(he)o(xadecimal)e(number:)396 -4822 y Fq(&#x)p Fn(n)p Fq(;)p Black 3800 5278 a Fr(12)p -Black eop -%%Page: 13 13 -13 12 bop Black 3028 67 a Fr(Chapter)19 b(1.)h(What)h(is)g(XML?)p -Black 396 579 a Fv(In)f(the)g(scope)g(of)g(declarations,)f(the)h -(character)f(\045)i(is)g(no)f(longer)f(free.)g(T)-7 b(o)20 -b(include)g(it)h(as)f(character)m(,)f(you)g(must)h(use)396 -687 y(the)g(notations)g Fq(%)g Fv(or)f Fq(%)p -Fv(.)396 836 y(Note)h(that)h(besides)f(<,)g(>,)g(&,)f -(',)g(and)h(")f(there)h(are)g(no)g(prede\002nes)f(character)g -(entities.)h(This)396 944 y(is)h(dif)n(ferent)e(from)g(HTML)h(which)g -(de\002nes)g(a)g(list)i(of)d(characters)h(that)g(can)g(be)g(referenced) -e(by)i(name)f(\(e.g.)h(ä)396 1052 y(for)g(\344\);)g(ho)n(we)n(v)o -(er)m(,)e(if)i(you)g(prefer)e(named)i(characters,)f(you)g(can)h -(declare)f(such)h(entities)h(yourself)e(\(see)h(belo)n(w\).)-2 -1422 y Fp(1.2.3.)35 b(Elements)g(and)f(ELEMENT)e(dec)n(larations)396 -1589 y Fv(Elements)20 b(structure)f(the)h(document)f(instance)g(in)i(a) -f(hierarchical)f(w)o(ay)-5 b(.)20 b(There)f(is)i(a)g(top-le)n(v)o(el)d -(element,)i(the)g Fr(r)l(oot)396 1697 y(element)q Fv(,)g(which)g -(contains)g(a)g(sequence)f(of)h(inner)g(elements)f(and)h(character)f -(sections.)h(The)g(inner)f(elements)h(are)396 1805 y(structured)f(in)h -(the)f(same)h(w)o(ay)-5 b(.)20 b(Ev)o(ery)e(element)h(has)h(an)g -Fr(element)f(type)p Fv(.)h(The)f(be)o(ginning)f(of)h(the)h(element)f -(is)i(indicated)396 1913 y(by)f(a)h Fr(start)g(ta)o(g)p -Fv(,)e(written)396 2093 y Fo(<)p Fn(element-type)p Fo(>)396 -2284 y Fv(and)h(the)g(element)g(continues)f(until)h(the)g -(corresponding)d Fr(end)i(ta)o(g)h Fv(is)h(reached:)396 -2465 y Fo(<)p Fq(/)p Fn(element-type)p Fo(>)396 2655 -y Fv(In)f(XML,)f(it)i(is)f(not)g(allo)n(wed)f(to)h(omit)f(start)i(or)e -(end)g(tags,)h(e)n(v)o(en)f(if)h(the)g(DTD)g(w)o(ould)f(permit)g(this.) -h(Note)g(that)g(there)f(are)396 2763 y(no)h(special)g(rules)g(ho)n(w)g -(to)g(interpret)g(spaces)g(or)g(ne)n(wlines)g(near)f(start)i(or)f(end)g -(tags;)g(all)h(spaces)f(and)g(ne)n(wlines)g(count.)396 -2913 y(Ev)o(ery)f(element)h(type)f(must)i(be)f(declared)f(before)f(it)j -(can)f(be)g(used.)g(The)g(declaration)f(consists)h(of)g(tw)o(o)h -(parts:)f(the)396 3021 y(ELEMENT)f(declaration)f(describes)h(the)h -(content)f(model,)f(i.e.)i(which)f(inner)g(elements)g(are)h(allo)n -(wed;)f(the)h(A)-9 b(TTLIST)396 3129 y(declaration)19 -b(describes)h(the)g(attrib)n(utes)g(of)g(the)g(element.)396 -3278 y(An)g(element)g(can)g(simply)g(allo)n(w)g(e)n(v)o(erything)e(as)i -(content.)f(This)i(is)g(written:)396 3458 y Fo(<)p Fq(!ELEMENT)43 -b Fn(name)i Fq(ANY)p Fo(>)396 3649 y Fv(On)20 b(the)h(opposite,)e(an)h -(element)f(can)h(be)g(forced)f(to)i(be)f(empty;)f(declared)g(by:)396 -3829 y Fo(<)p Fq(!ELEMENT)43 b Fn(name)i Fq(EMPTY)p Fo(>)396 -4020 y Fv(Note)20 b(that)h(there)e(is)j(an)e(abbre)n(viated)e(notation) -h(for)g(empty)g(element)h(instances:)g Fo(<)p Fn(name)p -Fq(/)p Fo(>)p Fv(.)396 4170 y(There)g(are)g(tw)o(o)g(more)g -(sophisticated)f(forms)g(of)h(declarations:)f(so-called)h -Fr(mixed)g(declar)o(ations)p Fv(,)e(and)i Fr(r)m(e)m(gular)396 -4278 y(e)n(xpr)m(essions)p Fv(.)g(An)h(element)e(with)i(mix)o(ed)e -(content)g(contains)g(character)g(data)h(interspersed)f(with)i(inner)e -(elements,)396 4386 y(and)h(the)g(set)h(of)f(allo)n(wed)g(inner)f -(elements)h(can)g(be)g(speci\002ed.)g(In)f(contrast)h(to)g(this,)h(a)g -(re)o(gular)d(e)o(xpression)396 4494 y(declaration)h(does)h(not)g(allo) -n(w)g(character)f(data,)h(b)n(ut)g(the)g(inner)f(elements)h(can)g(be)g -(described)f(by)h(the)g(more)g(po)n(werful)396 4601 y(means)g(of)g(re)o -(gular)f(e)o(xpressions.)396 4751 y(A)i(declaration)e(for)g(mix)o(ed)g -(content)g(looks)h(as)h(follo)n(ws:)p Black 3800 5278 -a Fr(13)p Black eop -%%Page: 14 14 -14 13 bop Black 3028 67 a Fr(Chapter)19 b(1.)h(What)h(is)g(XML?)p -Black 396 579 a Fo(<)p Fq(!ELEMENT)43 b Fn(name)i Fq(\(#PCDATA)e(|)i -Fn(element)1892 609 y Fk(1)1962 579 y Fq(|)g(...)f(|)h -Fn(element)2636 609 y Fk(n)2707 579 y Fq(\)*)p Fo(>)396 -770 y Fv(or)20 b(if)h(you)e(do)h(not)g(w)o(ant)g(to)g(allo)n(w)g(an)o -(y)g(inner)f(element,)h(simply)396 950 y Fo(<)p Fq(!ELEMENT)43 -b Fn(name)i Fq(\(#PCDATA\))p Fo(>)396 1279 y Fj(Example)479 -1426 y Fi(If)19 b(element)g(type)g Fh(q)g Fi(is)g(declared)h(as)479 -1596 y Fh()479 -1776 y Fi(this)19 b(is)f(a)h(le)o(gal)g(instance:)479 -1947 y Fh(This)43 b(is)e(character)j(datawith)h(inner) -g(elements)479 2127 y Fi(But)19 b(this)g(is)f(ille)o(gal)g(because) -i Fh(t)f Fi(has)h(not)f(been)g(enumerated)i(in)e(the)g(declaration:)479 -2297 y Fh(This)43 b(is)e(character)j(datawith)h(inner) -g(elements)396 2571 y Fv(The)20 b(other)f(form)h(uses)g(a)h(re)o -(gular)e(e)o(xpression)f(to)j(describe)e(the)h(possible)g(contents:)396 -2752 y Fo(<)p Fq(!ELEMENT)43 b Fn(name)i(regexp)p Fo(>)396 -2942 y Fv(The)20 b(follo)n(wing)f(well-kno)n(wn)f(re)o(ge)o(xp)g -(operators)h(are)h(allo)n(wed:)p Black 396 3299 a Ft(\225)p -Black 60 w Fn(element-name)p Black 396 3407 a Ft(\225)p -Black 60 w Fq(\()p Fn(subexpr)839 3437 y Fk(1)910 3407 -y Fq(,)g Fv(...)g Fq(,)45 b Fn(subexpr)1463 3437 y Fk(n)1533 -3407 y Fq(\))p Black 396 3515 a Ft(\225)p Black 60 w -Fq(\()p Fn(subexpr)839 3545 y Fk(1)910 3515 y Fq(|)20 -b Fv(...)g Fq(|)45 b Fn(subexpr)1463 3545 y Fk(n)1533 -3515 y Fq(\))p Black 396 3623 a Ft(\225)p Black 60 w -Fn(subexpr)s Fq(*)p Black 396 3731 a Ft(\225)p Black -60 w Fn(subexpr)s Fq(+)p Black 396 3839 a Ft(\225)p Black -60 w Fn(subexpr)s Fq(?)396 3989 y Fv(The)20 b Fq(,)h -Fv(operator)d(indicates)i(a)h(sequence)e(of)h(sub-models,)e(the)i -Fq(|)h Fv(operator)d(describes)i(alternati)n(v)o(e)f(sub-models.)f(The) -396 4096 y Fq(*)j Fv(indicates)f(zero)f(or)h(more)g(repetitions,)f(and) -g Fq(+)i Fv(one)f(or)f(more)h(repetitions.)f(Finally)-5 -b(,)19 b Fq(?)i Fv(can)f(be)g(used)g(for)f(optional)396 -4204 y(sub-models.)g(As)i(atoms)f(the)g(re)o(ge)o(xp)e(can)i(contain)f -(names)h(of)g(elements;)g(note)g(that)g(it)h(is)g(not)f(allo)n(wed)f -(to)i(include)396 4312 y Fq(#PCDATA)p Fv(.)396 4462 y(The)f(e)o(xact)g -(syntax)f(of)h(the)g(re)o(gular)f(e)o(xpressions)g(is)i(rather)e -(strange.)h(This)g(can)g(be)g(e)o(xplained)f(best)h(by)g(a)g(list)i(of) -396 4570 y(constraints:)p Black 396 4802 a Ft(\225)p -Black 60 w Fv(The)e(outermost)f(e)o(xpression)g(must)h(not)g(be)g -Fn(element-name)p Fv(.)p Black 3800 5278 a Fr(14)p Black -eop -%%Page: 15 15 -15 14 bop Black 3028 67 a Fr(Chapter)19 b(1.)h(What)h(is)g(XML?)p -Black 479 579 a(Ille)m(gal:)e Fq()p -Fv(;)21 b(this)f(must)h(be)f(written)g(as)h Fq()p Fv(.)p Black 396 728 a Ft(\225)p Black -60 w Fv(F)o(or)20 b(the)g(unary)f(operators)g Fn(subexpr)s -Fq(*)p Fv(,)g Fn(subexpr)s Fq(+)p Fv(,)g(and)g Fn(subexpr)s -Fq(?)p Fv(,)g(the)h Fn(subexpr)i Fv(must)f(not)f(be)g(again)f(an)479 -836 y(unary)g(operator)-5 b(.)479 986 y Fr(Ille)m(gal:)19 -b Fq()p Fv(;)20 b(this)h(must)f(be)g(written)g -(as)h Fq()p Fv(.)p Black 396 -1135 a Ft(\225)p Black 60 w Fv(Between)21 b Fq(\))f Fv(and)g(one)f(of)h -(the)h(unary)d(operatory)g Fq(*)p Fv(,)j Fq(+)p Fv(,)f(or)g -Fq(?)p Fv(,)g(there)g(must)g(not)g(be)g(whitespace.)479 -1285 y Fr(Ille)m(gal:)f Fq()p -Fv(;)21 b(this)f(must)h(be)f(written)g(as)h Fq()p Fv(.)p Black 396 1434 a Ft(\225)p Black -60 w Fv(There)20 b(is)h(the)f(additional)f(constraint)g(that)h(the)h -(right)e(parenthsis)g(must)i(be)f(contained)e(in)j(the)f(same)g(entity) -g(as)h(the)479 1542 y(left)g(parenthesis;)e(see)i(the)f(section)g -(about)f(parsed)h(entities)g(belo)n(w)-5 b(.)396 1733 -y(Note)20 b(that)g(there)g(is)h(another)e(restriction)g(on)h(re)o -(gular)e(e)o(xpressions)h(which)h(must)g(be)g(deterministic.)f(This)h -(means)g(that)396 1841 y(the)g(parser)g(must)g(be)g(able)g(to)h(see)g -(by)e(looking)g(at)i(the)f(ne)o(xt)f(tok)o(en)h(which)f(alternati)n(v)o -(e)g(is)i(actually)f(used,)g(or)f(whether)396 1949 y(the)h(repetition)f -(stops.)i(The)f(reason)f(for)g(this)i(is)g(simply)f(compatability)f -(with)h(SGML)g(\(there)g(is)h(no)f(intrinsic)f(reason)396 -2057 y(for)h(this)h(rule;)e(XML)i(can)f(li)n(v)o(e)g(without)f(this)i -(restriction\).)396 2302 y Fj(Example)479 2449 y Fi(The)e(elements)g -(are)g(declared)h(as)f(follo)n(ws:)479 2620 y Fh()479 2707 y()479 2795 y()479 2882 -y()479 3062 y Fi(This)19 -b(is)f(a)h(le)o(gal)g(instance:)479 3233 y Fh(Some)44 -b(characters<)q(/q>)479 3413 y Fi(\(Note:)19 -b Fg(<)p Fh(s/)p Fg(>)g Fi(is)g(an)g(abbre)n(viation)h(for)f -Fg(<)p Fh(s)p Fg(><)p Fh(/s)p Fg(>)p Fi(.\))g(It)f(w)o(ould)i(be)f -(ille)o(gal)f(to)h(lea)o(v)o(e)g Fh()h Fi(out)f(because)h(at)f -(least)f(one)479 3510 y(instance)i(of)f Fh(s)g Fi(or)g -Fh(t)g Fi(must)g(be)g(present.)g(It)f(w)o(ould)i(be)f(ille)o(gal,)f -(too,)h(if)f(characters)i(e)o(xisted)f(outside)h(the)e -Fh(r)i Fi(element;)f(the)g(only)479 3607 y(e)o(xception)h(is)f(white)g -(space.)g(\226)g(This)f(is)h(le)o(gal,)f(too:)479 3778 -y Fh(<)q(/q>)q()-2 4230 -y Fp(1.2.4.)35 b(Attrib)n(ute)e(lists)h(and)g(A)-11 b(TTLIST)34 -b(dec)n(larations)396 4398 y Fv(Elements)20 b(may)g(ha)n(v)o(e)f -(attrib)n(utes.)h(These)g(are)g(put)g(into)g(the)g(start)h(tag)f(of)g -(an)g(element)g(as)h(follo)n(ws:)396 4578 y Fo(<)p Fn(element-name)43 -b(attribute)1444 4608 y Fk(1)1469 4578 y Fq(=")p Fn(value)1784 -4608 y Fk(1)1810 4578 y Fq(")i(...)f Fn(attribute)2484 -4608 y Fk(n)2509 4578 y Fq(=")p Fn(value)2824 4608 y -Fk(n)2850 4578 y Fq(")p Fo(>)396 4769 y Fv(Instead)20 -b(of)g Fq(")p Fn(value)1017 4799 y Fk(k)1043 4769 y Fq(")g -Fv(it)h(is)g(also)g(possible)f(to)g(use)g(single)g(quotes)g(as)h(in)f -Fq(')p Fn(value)2817 4799 y Fk(k)2843 4769 y Fq(')p Fv(.)g(Note)h(that) -f(you)f(cannot)g(use)396 4877 y(double)g(quotes)h(literally)g(within)g -(the)g(v)n(alue)f(of)h(the)g(attrib)n(ute)g(if)h(double)d(quotes)i(are) -g(the)g(delimiters;)g(the)g(same)p Black 3800 5278 a -Fr(15)p Black eop -%%Page: 16 16 -16 15 bop Black 3028 67 a Fr(Chapter)19 b(1.)h(What)h(is)g(XML?)p -Black 396 579 a Fv(applies)f(to)h(single)f(quotes.)f(Y)-9 -b(ou)20 b(can)g(generally)e(not)i(use)g Fm(<)h Fv(and)e(&)i(as)g -(characters)e(in)h(attrib)n(ute)g(v)n(alues.)g(It)g(is)396 -687 y(possible)g(to)h(include)e(the)h(paraphrases)e(<,)j(>,)f -(&,)f(',)g(and)h(")f(\(and)g(an)o(y)g(other)h(reference)e -(to)j(a)396 795 y(general)e(entity)h(as)h(long)f(as)g(the)h(entity)f -(is)h(not)e(de\002ned)h(by)f(an)i(e)o(xternal)d(\002le\))j(as)g(well)g -(as)g(&#)p Fl(n)p Fv(;.)396 944 y(Before)f(you)f(can)h(use)h(an)f -(attrib)n(ute)g(you)f(must)h(declare)g(it.)g(An)g(A)-9 -b(TTLIST)20 b(declaration)e(looks)i(as)h(follo)n(ws:)396 -1124 y Fo(<)p Fq(!ATTLIST)43 b Fn(element-name)845 1222 -y(attribute-name)f(attribute-type)h(attribute-default)845 -1319 y Fq(...)845 1416 y Fn(attribute-name)f(attribute-type)h -(attribute-default)396 1513 y Fo(>)396 1704 y Fv(There)20 -b(are)g(a)g(lot)h(of)f(types,)f(b)n(ut)i(most)f(important)f(are:)p -Black 396 2061 a Ft(\225)p Black 60 w Fq(CDATA)p Fv(:)h(Ev)o(ery)f -(string)h(is)h(allo)n(wed)f(as)g(attrib)n(ute)g(v)n(alue.)p -Black 396 2169 a Ft(\225)p Black 60 w Fq(NMTOKEN)p Fv(:)g(Ev)o(ery)f -(nametok)o(en)f(is)j(allo)n(wed)f(as)g(attrib)n(ute)g(v)n(alue.)g -(Nametok)o(ens)f(consist)h(\(mainly\))f(of)g(letters,)479 -2277 y(digits,)h(.,)h(:,)f(-,)g(_)h(in)f(arbitrary)f(order)-5 -b(.)p Black 396 2385 a Ft(\225)p Black 60 w Fq(NMTOKENS)p -Fv(:)20 b(A)g(space-separated)f(list)i(of)f(nametok)o(ens)e(is)k(allo)n -(wed)d(as)i(attrib)n(ute)f(v)n(alue.)396 2534 y(The)g(most)g -(interesting)g(def)o(ault)f(declarations)g(are:)p Black -396 2767 a Ft(\225)p Black 60 w Fq(#REQUIRED)p Fv(:)h(The)f(attrib)n -(ute)h(must)g(be)h(speci\002ed.)p Black 396 2874 a Ft(\225)p -Black 60 w Fq(#IMPLIED)p Fv(:)e(The)h(attrib)n(ute)f(can)g(be)h -(speci\002ed)f(b)n(ut)h(also)g(can)f(be)h(left)g(out.)f(The)g -(application)g(can)g(\002nd)g(out)h(whether)479 2982 -y(the)g(attrib)n(ute)g(w)o(as)h(present)f(or)g(not.)p -Black 396 3090 a Ft(\225)p Black 60 w Fq(")p Fn(value)p -Fq(")g Fv(or)f Fq(')p Fn(value)p Fq(')p Fv(:)h(This)g(particular)e(v)n -(alue)i(is)g(used)g(as)h(def)o(ault)e(if)h(the)g(attrib)n(ute)g(is)g -(omitted)g(in)g(the)g(element.)396 3378 y Fj(Example)479 -3525 y Fi(This)f(is)f(a)h(v)n(alid)g(attrib)o(ute)g(declaration)g(for)g -(element)g(type)h Fh(r)p Fi(:)479 3695 y Fh()479 4137 y Fi(This)19 b(means)g(that)g Fh(x)g -Fi(is)g(a)g(required)g(attrib)o(ute)f(that)h(cannot)h(be)f(left)g(out,) -f(while)h Fh(y)g Fi(and)h Fh(z)f Fi(are)g(optional.)g(The)g(XML)g -(parser)479 4235 y(indicates)h(the)f(application)g(whether)h -Fh(y)f Fi(is)f(present)i(or)f(not,)f(b)o(ut)h(if)f Fh(z)h -Fi(is)g(missing)g(the)g(def)o(ault)h(v)n(alue)f("one)h(tw)o(o)f(three") -h(is)479 4332 y(returned)g(automatically)-5 b(.)479 4470 -y(This)19 b(is)f(a)h(v)n(alid)g(e)o(xample)h(of)f(these)g(attrib)o -(utes:)479 4641 y Fh()p Black 3798 5278 a Fr(16)p -Black eop -%%Page: 17 17 -17 16 bop Black 3028 67 a Fr(Chapter)19 b(1.)h(What)h(is)g(XML?)p -Black -2 583 a Fp(1.2.5.)35 b(P)l(ar)n(sed)g(entities)396 -751 y Fv(Elements)20 b(describe)f(the)i(logical)e(structure)h(of)g(the) -g(document,)e(while)i Fr(entities)g Fv(determine)f(the)h(physical)g -(structure.)396 859 y(Entities)h(are)f(the)g(pieces)g(of)g(te)o(xt)g -(the)g(parser)g(operates)f(on,)h(mostly)g(\002les)h(and)f(macros.)f -(Entities)h(may)g(be)g Fr(par)o(sed)i Fv(in)396 967 y(which)e(case)h -(the)f(parser)f(reads)h(the)g(te)o(xt)h(and)e(interprets)g(it)i(as)g -(XML)g(markup,)d(or)i Fr(unpar)o(sed)h Fv(which)e(simply)h(means)396 -1075 y(that)h(the)f(data)g(of)g(the)g(entity)g(has)g(a)h(foreign)d -(format)h(\(e.g.)h(a)g(GIF)h(icon\).)396 1224 y(If)f(the)g(parsed)f -(entity)g(is)i(going)e(to)h(be)g(used)f(as)i(part)e(of)h(the)g(DTD,)g -(it)g(is)h(called)f(a)g Fr(par)o(ameter)f(entity)p Fv(.)h(Y)-9 -b(ou)19 b(can)h(declare)396 1332 y(a)h(parameter)e(entity)g(with)i(a)f -(\002x)o(ed)g(te)o(xt)g(as)h(content)e(by:)396 1512 y -Fo(<)p Fq(!ENTITY)44 b(\045)g Fn(name)g Fq(")p Fn(value)p -Fq(")p Fo(>)396 1703 y Fv(W)m(ithin)20 b(the)h(DTD,)f(you)f(can)h -Fr(r)m(efer)h(to)f Fv(this)h(entity)-5 b(,)19 b(i.e.)i(read)e(the)h(te) -o(xt)g(of)g(the)h(entity)-5 b(,)19 b(by:)396 1883 y Fq(\045)p -Fn(name)p Fq(;)396 2074 y Fv(Such)h(entities)h(beha)n(v)o(e)e(lik)o(e)h -(macros,)f(i.e.)i(when)e(the)o(y)h(are)g(referred)e(to,)i(the)g(macro)g -(te)o(xt)g(is)h(inserted)e(and)h(read)396 2182 y(instead)g(of)g(the)g -(original)f(te)o(xt.)396 2478 y Fj(Example)479 2625 y -Fi(F)o(or)g(e)o(xample,)g(you)h(can)f(declare)h(tw)o(o)f(elements)g -(with)f(the)h(same)h(content)f(model)h(by:)479 2795 y -Fh()479 -2882 y()479 2970 y()396 3202 y Fv(If)20 b(the)h(contents)e(of)h(the)g -(entity)g(are)g(gi)n(v)o(en)f(as)i(string)f(constant,)f(the)h(entity)g -(is)h(called)f(an)g Fr(internal)g Fv(entity)-5 b(.)19 -b(It)i(is)g(also)396 3310 y(possible)f(to)h(name)e(a)i(\002le)g(to)f -(be)g(used)g(as)h(content)e(\(an)h Fr(e)n(xternal)g Fv(entity\):)396 -3490 y Fo(<)p Fq(!ENTITY)44 b(\045)g Fn(name)g Fq(SYSTEM)g(")p -Fn(file)g(name)p Fq(")p Fo(>)396 3681 y Fv(There)20 b(are)g(some)g -(restrictions)f(for)h(parameter)f(entities:)p Black 396 -4038 a Ft(\225)p Black 60 w Fv(If)h(the)h(internal)e(parameter)g -(entity)g(contains)h(the)g(\002rst)h(tok)o(en)e(of)h(a)h(declaration)e -(\(i.e.)g Fo(<)p Fq(!)p Fv(\),)h(it)h(must)f(also)h(contain)479 -4146 y(the)f(last)i(tok)o(en)d(of)h(the)g(declaration,)e(i.e.)j(the)f -Fo(>)p Fv(.)g(This)g(means)g(that)h(the)f(entity)g(either)g(contains)f -(a)i(whole)e(number)479 4254 y(of)h(complete)f(declarations,)g(or)h -(some)g(te)o(xt)g(from)f(the)h(middle)g(of)g(one)f(declaration.)479 -4404 y Fr(Ille)m(gal:)479 4542 y Fq(">)479 4639 y()j Fv(is)h(contained)e(in)h(the)h(entity)e Fq(e)p -Fv(.)p Black 3797 5278 a Fr(17)p Black eop -%%Page: 18 18 -18 17 bop Black 3028 67 a Fr(Chapter)19 b(1.)h(What)h(is)g(XML?)p -Black Black 396 579 a Ft(\225)p Black 60 w Fv(If)f(the)h(internal)e -(parameter)g(entity)g(contains)h(a)h(left)f(paranthesis,)f(it)i(must)f -(also)h(contain)e(the)h(corresponding)d(right)479 687 -y(paranthesis.)479 836 y Fr(Ille)m(gal:)479 975 y Fq()479 1072 y()479 1222 y Fv(Because)21 b Fq(\()f Fv(is)h(contained)e(in)h -(the)g(entity)g Fq(e)p Fv(,)h(and)e(the)i(corresponding)16 -b Fq(\))21 b Fv(is)g(contained)e(in)h(the)g(main)g(entity)-5 -b(.)p Black 396 1371 a Ft(\225)p Black 60 w Fv(When)20 -b(reading)e(te)o(xt)i(from)f(an)g(entity)-5 b(,)19 b(the)h(parser)f -(automatically)f(inserts)i(one)g(space)f(character)g(before)f(the)i -(entity)479 1479 y(te)o(xt)g(and)g(one)g(space)g(character)f(after)h -(the)g(entity)g(te)o(xt.)f(Ho)n(we)n(v)o(er)m(,)f(this)j(rule)f(is)h -(not)f(applied)f(within)h(the)g(de\002nition)479 1587 -y(of)g(another)f(entity)-5 b(.)479 1736 y Fr(Le)m(gal:)479 -1875 y Fq()479 1972 -y()479 2121 -y Fv(Because)21 b Fq(\045suffix;)e Fv(is)i(referenced)d(within)i(the)g -(de\002nition)f(te)o(xt)h(for)g Fq(iconfile)p Fv(,)f(no)h(additional)f -(spaces)h(are)479 2229 y(added.)479 2379 y Fr(Ille)m(gal:)479 -2517 y Fq()479 2615 -y()479 2764 y Fv(Because)21 -b Fq(\045suffix;)e Fv(is)i(referenced)d(outside)i(the)g(de\002nition)f -(te)o(xt)h(of)g(another)f(entity)-5 b(,)19 b(the)h(parser)g(replaces) -479 2872 y Fq(\045suffix;)g Fv(by)f Fn(space)p Fq(test)p -Fn(space)p Fv(.)479 3021 y Fr(Ille)m(gal:)479 3160 y -Fq()479 -3257 y()479 3407 y Fv(Because)21 -b(there)e(is)j(a)e(whitespace)g(between)f Fq(\))i Fv(and)e -Fq(*)p Fv(,)i(which)e(is)i(ille)o(gal.)p Black 396 3556 -a Ft(\225)p Black 60 w Fv(An)f(e)o(xternal)f(parameter)g(entity)h(must) -g(al)o(w)o(ays)h(consist)f(of)g(a)h(whole)e(number)g(of)h(complete)f -(declarations.)p Black 396 3664 a Ft(\225)p Black 60 -w Fv(In)h(the)g(internal)g(subset)g(of)g(the)g(DTD,)g(a)h(reference)d -(to)j(a)f(parameter)f(entity)h(\(internal)f(or)h(e)o(xternal\))e(is)k -(only)479 3772 y(allo)n(wed)e(at)h(positions)e(where)h(a)g(ne)n(w)g -(declaration)f(can)h(start.)396 3963 y(If)g(the)f(parsed)g(entity)g(is) -h(going)e(to)i(be)f(used)g(in)h(the)f(document)e(instance,)i(it)h(is)h -(called)e(a)h Fr(g)o(ener)o(al)e(entity)p Fv(.)h(Such)g(entities)396 -4071 y(can)h(be)g(used)g(as)h(abbre)n(viations)d(for)i(frequent)e -(phrases,)i(or)g(to)g(include)f(e)o(xternal)g(\002les.)i(Internal)e -(general)g(entities)i(are)396 4179 y(declared)e(as)i(follo)n(ws:)396 -4359 y Fo(<)p Fq(!ENTITY)44 b Fn(name)g Fq(")p Fn(value)p -Fq(")p Fo(>)396 4550 y Fv(External)19 b(general)g(entities)i(are)f -(declared)f(this)i(w)o(ay:)396 4730 y Fo(<)p Fq(!ENTITY)44 -b Fn(name)g Fq(SYSTEM)g(")p Fn(file)g(name)p Fq(")p Fo(>)p -Black 3800 5278 a Fr(18)p Black eop -%%Page: 19 19 -19 18 bop Black 3028 67 a Fr(Chapter)19 b(1.)h(What)h(is)g(XML?)p -Black 396 579 a Fv(References)f(to)g(general)f(entities)i(are)f -(written)g(as:)396 759 y Fq(&)p Fn(name)p Fq(;)396 950 -y Fv(The)g(main)g(dif)n(ference)e(between)h(parameter)g(and)h(general)f -(entities)h(is)i(that)e(the)g(former)f(are)h(only)f(recognized)f(in)j -(the)396 1058 y(DTD)g(and)e(that)i(the)f(latter)g(are)g(only)g -(recognized)e(in)i(the)g(document)e(instance.)i(As)h(the)f(DTD)g(is)i -(parsed)d(before)g(the)396 1166 y(document,)f(the)i(parameter)f -(entities)i(are)f(e)o(xpanded)d(\002rst;)k(for)f(e)o(xample)f(it)i(is)g -(possible)f(to)g(use)h(the)f(content)f(of)h(a)396 1274 -y(parameter)f(entity)h(as)h(the)f(name)g(of)f(a)i(general)e(entity:)h -Fq(&\045name;;)2557 1241 y Ff(1)2580 1274 y Fv(.)396 -1423 y(General)g(entities)g(must)h(respect)e(the)i(element)e(hierarchy) --5 b(.)17 b(This)k(means)f(that)g(there)g(must)g(be)g(an)g(end)g(tag)g -(for)g(e)n(v)o(ery)396 1531 y(start)h(tag)f(in)h(the)f(entity)g(v)n -(alue,)f(and)h(that)g(end)f(tags)i(without)e(corresponding)e(start)k -(tags)f(are)g(not)g(allo)n(wed.)396 1777 y Fj(Example)479 -1924 y Fi(If)f(the)f(author)i(of)f(a)f(document)j(changes)f(sometimes,) -f(it)f(is)g(w)o(orthwhile)h(to)g(set)f(up)i(a)e(general)i(entity)e -(containing)i(the)f(names)479 2021 y(of)g(the)g(authors.)h(If)e(the)h -(author)h(changes,)g(you)f(need)h(only)g(to)e(change)j(the)e -(de\002nition)g(of)g(the)g(entity)-5 b(,)18 b(and)i(do)f(not)h(need)f -(to)479 2118 y(check)h(all)f(occurrences)h(of)f(authors')h(names:)479 -2289 y Fh()479 -2469 y Fi(In)19 b(the)g(document)i(te)o(xt,)d(you)i(can)f(no)n(w)h -(refer)e(to)h(the)g(author)h(names)f(by)h(writing)e Fh(&authors;)p -Fi(.)479 2607 y Fe(Ille)m(gal:)h Fi(The)g(follo)n(wing)g(tw)o(o)g -(entities)g(are)g(ille)o(gal)f(because)i(the)f(elements)g(in)g(the)g -(de\002nition)g(do)g(not)h(nest)f(properly:)479 2778 -y Fh()q(">)479 2865 y(">)396 3139 y Fv(Earlier)20 b(in)g(this)h(introduction)d(we)i -(e)o(xplained)e(that)j(there)e(are)i(substitutes)f(for)g(reserv)o(ed)e -(characters:)i(<,)g(>,)396 3247 y(&,)f(',)h(and)f -(".)g(These)h(are)g(simply)g(prede\002ned)e(general)h(entities;)i -(note)f(that)g(the)o(y)g(are)g(the)g(only)396 3355 y(prede\002ned)e -(entities.)j(It)f(is)h(allo)n(wed)f(to)g(de\002ne)g(these)g(entities)h -(again)e(as)i(long)e(as)i(the)f(meaning)f(is)i(unchanged.)-2 -3725 y Fp(1.2.6.)35 b(Notations)g(and)e(unpar)n(sed)i(entities)396 -3892 y Fv(Unparsed)19 b(entities)i(ha)n(v)o(e)e(a)i(foreign)d(format)i -(and)f(can)h(thus)g(not)g(be)g(read)g(by)g(the)g(XML)g(parser)-5 -b(.)20 b(Unparsed)f(entities)396 4000 y(are)h(al)o(w)o(ays)h(e)o -(xternal.)e(The)h(format)f(of)h(an)g(unparsed)e(entity)i(must)g(ha)n(v) -o(e)g(been)f(declared,)g(such)h(a)h(format)e(is)i(called)f(a)396 -4108 y Fr(notation)p Fv(.)f(The)g(entity)h(can)g(then)g(be)g(declared)f -(by)h(referring)e(to)i(this)h(notation.)e(As)i(unparsed)d(entities)j -(do)f(not)396 4216 y(contain)f(XML)i(te)o(xt,)e(it)i(is)h(not)d -(possible)h(to)h(include)e(them)h(directly)f(into)h(the)g(document;)e -(you)i(can)g(only)f(declare)396 4324 y(attrib)n(utes)h(such)g(that)h -(names)e(of)h(unparsed)f(entities)h(are)h(acceptable)e(v)n(alues.)396 -4474 y(As)i(you)f(can)g(see,)g(unparsed)f(entities)h(are)g(too)g -(complicated)f(in)h(order)f(to)h(ha)n(v)o(e)g(an)o(y)f(purpose.)g(It)h -(is)h(almost)f(al)o(w)o(ays)396 4581 y(better)g(to)g(simply)g(pass)h -(the)f(name)g(of)g(the)g(data)g(\002le)h(as)g(normal)e(attrib)n(ute)g -(v)n(alue,)h(and)f(let)i(the)f(application)f(recognize)396 -4689 y(and)h(process)g(the)g(foreign)e(format.)p Black -3800 5278 a Fr(19)p Black eop -%%Page: 20 20 -20 19 bop Black 3028 67 a Fr(Chapter)19 b(1.)h(What)h(is)g(XML?)p -Black -2 597 a Fx(1.3.)39 b(A)g(complete)f(e)n(xample:)g(The)h -Fd(readme)k Fx(DTD)396 777 y Fv(The)20 b(reason)g(for)f -Fr(r)m(eadme)h Fv(w)o(as)h(that)f(I)g(often)g(wrote)g(tw)o(o)g(v)o -(ersions)f(of)h(\002les)h(such)f(as)h(README)g(and)e(INST)-8 -b(ALL)396 885 y(which)20 b(e)o(xplain)f(aspects)h(of)g(a)h(distrib)n -(uted)e(softw)o(are)h(archi)n(v)o(e;)f(one)g(v)o(ersion)g(w)o(as)i -(ASCII-formatted,)d(the)i(other)g(w)o(as)396 993 y(written)g(in)h -(HTML.)e(Maintaining)g(both)g(v)o(ersions)h(means)f(double)g(amount)g -(of)h(w)o(ork,)f(and)h(changes)f(of)h(one)f(v)o(ersion)396 -1101 y(may)h(be)g(for)o(gotten)e(in)i(the)g(other)f(v)o(ersion.)g(T)-7 -b(o)20 b(impro)o(v)o(e)e(this)j(situation)e(I)i(in)m(v)o(ented)d(the)i -Fr(r)m(eadme)g Fv(DTD)g(which)f(allo)n(ws)396 1209 y(me)h(to)h -(maintain)e(only)h(one)f(source)h(written)g(as)g(XML)h(document,)d(and) -h(to)i(generate)e(the)h(ASCII)g(and)g(the)g(HTML)396 -1317 y(v)o(ersion)f(from)g(it.)396 1466 y(In)h(this)h(section,)f(I)g(e) -o(xplain)f(only)g(the)i(DTD.)f(The)f Fr(r)m(eadme)h Fv(DTD)h(is)g -(contained)d(in)j(the)f(PXP)h(distrib)n(ution)e(together)396 -1574 y(with)i(the)f(tw)o(o)g(con)m(v)o(erters)e(to)j(produce)d(ASCII)i -(and)g(HTML.)g(Another)e(section)i(of)g(this)h(manual)e(describes)h -(the)396 1682 y(HTML)g(con)m(v)o(erter)-5 b(.)396 1831 -y(The)20 b(documents)f(ha)n(v)o(e)g(a)i(simple)f(structure:)f(There)h -(are)g(up)g(to)g(three)g(le)n(v)o(els)g(of)g(nested)g(sections,)g -(paragraphs,)d(item)396 1939 y(lists,)22 b(footnotes,)c(hyperlinks,)g -(and)h(te)o(xt)h(emphasis.)g(The)g(outermost)f(element)g(has)i(usually) -e(the)h(type)g Fq(readme)p Fv(,)g(it)h(is)396 2047 y(declared)e(by)396 -2228 y Fq()396 2325 -y()396 -2613 y Fv(This)21 b(means)f(that)g(this)h(element)e(contains)h(one)f -(or)h(more)f(sections)i(of)f(the)g(\002rst)h(le)n(v)o(el)f(\(element)f -(type)h Fq(sect1)p Fv(\),)f(and)396 2721 y(that)i(the)f(element)f(has)i -(a)f(required)f(attrib)n(ute)h Fq(title)f Fv(containing)g(character)g -(data)h(\(CD)m(A)-9 b(T)h(A\).)19 b(Note)h(that)h Fq(readme)396 -2829 y Fv(elements)f(must)g(not)g(contain)f(te)o(xt)h(data.)396 -2978 y(The)g(three)g(le)n(v)o(els)g(of)g(sections)g(are)g(declared)f -(as)i(follo)n(ws:)396 3158 y Fq()396 3352 y()396 3547 y()396 3738 y Fv(Ev)o(ery)19 b(section)h(has)g(a)h -Fq(title)f Fv(element)g(as)g(\002rst)h(subelement.)e(After)h(the)g -(title)h(an)f(arbitrary)f(b)n(ut)h(non-empty)396 3846 -y(sequence)f(of)h(inner)g(sections,)g(paragraphs)e(and)h(item)i(lists)g -(follo)n(ws.)f(Note)g(that)g(the)g(inner)g(sections)g(must)g(belong)f -(to)396 3954 y(the)h(ne)o(xt)g(higher)f(section)h(le)n(v)o(el;)g -Fq(sect3)g Fv(elements)f(must)i(not)f(contain)f(inner)g(sections)h -(because)g(there)g(is)h(no)e(ne)o(xt)396 4061 y(higher)g(le)n(v)o(el.) -396 4211 y(Ob)o(viously)-5 b(,)18 b(all)j(three)f(declarations)e(allo)n -(w)j(paragraphs)d(\()p Fq(p)p Fv(\))h(and)h(item)g(lists)i(\()p -Fq(ul)p Fv(\).)e(The)f(de\002nition)g(can)h(be)396 4319 -y(simpli\002ed)g(at)h(this)g(point)e(by)h(using)f(a)i(parameter)e -(entity:)396 4499 y Fq()396 -4693 y()p -Black 3800 5278 a Fr(20)p Black eop -%%Page: 21 21 -21 20 bop Black 3028 67 a Fr(Chapter)19 b(1.)h(What)h(is)g(XML?)p -Black 396 579 a Fq()396 773 y()396 964 y Fv(Here,)20 b(the)g(entity)g -Fq(p.like)g Fv(is)h(nothing)e(b)n(ut)h(a)g(macro)g(abbre)n(viating)d -(the)j(same)h(sequence)e(of)h(declarations;)f(if)h(ne)n(w)396 -1072 y(elements)f(on)h(the)f(same)h(le)n(v)o(el)f(as)h -Fq(p)g Fv(and)f Fq(ul)h Fv(are)f(later)h(added,)e(it)i(is)h(suf)n -(\002cient)e(only)f(to)i(change)e(the)i(entity)f(de\002nition.)396 -1180 y(Note)h(that)h(there)e(are)i(some)f(restrictions)f(on)h(the)g -(usage)g(of)g(entities)h(in)f(this)h(conte)o(xt;)e(most)h(important,)e -(entities)396 1288 y(containing)h(a)h(left)h(paranthesis)e(must)h(also) -h(contain)e(the)h(corresponding)d(right)i(paranthesis.)396 -1437 y(Note)h(that)h(the)f(entity)g Fq(p.like)g Fv(is)h(a)f -Fr(par)o(ameter)i Fv(entity)-5 b(,)19 b(i.e.)h(the)g(ENTITY)g -(declaration)e(contains)i(a)g(percent)f(sign,)396 1545 -y(and)h(the)g(entity)g(is)h(referred)e(to)h(by)g Fq(\045p.like;)p -Fv(.)f(This)h(kind)g(of)f(entity)h(must)h(be)f(used)g(to)g(abbre)n -(viate)e(parts)j(of)f(the)396 1653 y(DTD;)g(the)g Fr(g)o(ener)o(al)f -Fv(entities)h(declared)e(without)h(percent)g(sign)h(and)f(referred)f -(to)i(as)g Fq(&name;)f Fv(are)h(not)f(allo)n(wed)g(in)h(this)396 -1761 y(conte)o(xt.)396 1911 y(The)g Fq(title)g Fv(element)g -(speci\002es)g(the)h(title)f(of)g(the)h(section)f(in)g(which)g(it)g -(occurs.)g(The)f(title)i(is)h(gi)n(v)o(en)c(as)j(character)396 -2019 y(data,)f(optionally)f(interspersed)f(with)j(line)f(breaks)g(\()p -Fq(br)p Fv(\):)396 2199 y Fq() -396 2390 y Fv(Compared)19 b(with)h(the)g Fq(title)g Fr(attrib)n(ute)g -Fv(of)g(the)h Fq(readme)e Fv(element,)h(this)g(element)g(allo)n(ws)g -(inner)g(markup)e(\(i.e.)i Fq(br)p Fv(\))396 2498 y(while)g(attrib)n -(ute)g(v)n(alues)g(do)g(not:)g(It)g(is)h(an)g(error)e(if)h(an)g(attrib) -n(ute)g(v)n(alue)g(contains)f(the)h(left)h(angle)e(brack)o(et)g -Fm(<)i Fv(literally)396 2605 y(such)f(that)g(it)h(is)h(impossible)d(to) -h(include)g(inner)f(elements.)396 2755 y(The)h(paragraph)e(element)h -Fq(p)i Fv(has)f(a)h(structure)e(similar)i(to)f Fq(title)p -Fv(,)g(b)n(ut)g(it)h(allo)n(ws)f(more)g(inner)f(elements:)396 -2935 y Fq()396 -3129 y()396 3320 -y Fv(Line)20 b(breaks)g(do)f(not)h(ha)n(v)o(e)g(inner)f(structure,)g -(so)i(the)o(y)e(are)h(declared)f(as)i(being)e(empty:)396 -3500 y Fq()396 3691 y Fv(This)21 -b(means)f(that)g(really)g(nothing)e(is)j(allo)n(wed)f(within)g -Fq(br)p Fv(;)g(you)f(must)i(al)o(w)o(ays)f(write)h Fq(

)e -Fv(or)h(abbre)n(viated)396 3799 y Fq(
)p Fv(.)396 -3949 y(Code)g(samples)h(should)e(be)h(mark)o(ed)f(up)h(by)f(the)h -Fq(code)h Fv(tag;)f(emphasized)f(te)o(xt)h(can)g(be)g(indicated)f(by)h -Fq(em)p Fv(:)396 4129 y Fq()396 -4323 y()396 4514 -y Fv(That)20 b Fq(code)g Fv(elements)g(are)g(not)g(allo)n(wed)g(to)g -(contain)f(further)g(markup)f(while)i Fq(em)h Fv(elements)f(do)g(is)h -(a)f(design)g(decision)396 4622 y(by)g(the)g(author)f(of)h(the)g(DTD.) -396 4772 y(Unordered)e(lists)k(simply)d(consists)i(of)f(one)g(or)g -(more)f(list)i(items,)g(and)e(a)i(list)g(item)g(may)e(contain)g -(paragraph-le)n(v)o(el)396 4879 y(material:)p Black 3800 -5278 a Fr(21)p Black eop -%%Page: 22 22 -22 21 bop Black 3028 67 a Fr(Chapter)19 b(1.)h(What)h(is)g(XML?)p -Black 396 579 a Fq()396 773 -y()396 964 y Fv(F)o(ootnotes)19 -b(are)h(described)f(by)h(the)g(te)o(xt)g(of)g(the)g(note;)g(this)h(te)o -(xt)f(may)g(contain)f(te)o(xt-le)n(v)o(el)g(markup.)f(There)h(is)i(no) -396 1072 y(mechanism)e(to)i(describe)e(the)h(numbering)e(scheme)h(of)h -(footnotes,)f(or)h(to)g(specify)g(ho)n(w)f(footnote)g(references)f(are) -396 1180 y(printed.)396 1360 y Fq()396 1551 y Fv(Hyperlinks)19 -b(are)h(written)g(as)h(in)f(HTML.)g(The)g(anchor)f(tag)h(contains)f -(the)h(te)o(xt)g(describing)f(where)h(the)g(link)g(points)g(to,)396 -1659 y(and)g(the)g Fq(href)g Fv(attrib)n(ute)g(is)h(the)f(pointer)f -(\(as)i(URL\).)f(There)f(is)j(no)d(w)o(ay)i(to)f(describe)f(locations)h -(of)g("hash)g(marks".)f(If)396 1767 y(the)h(link)g(refers)g(to)g -(another)f Fr(r)m(eadme)h Fv(document,)e(the)i(attrib)n(ute)g -Fq(readmeref)f Fv(should)g(be)h(used)g(instead)g(of)g -Fq(href)p Fv(.)396 1875 y(The)g(reason)g(is)h(that)f(the)g(con)m(v)o -(erted)e(document)g(has)i(usually)g(a)h(dif)n(ferent)d(system)i -(identi\002er)g(\(\002le)h(name\),)d(and)i(the)396 1983 -y(link)g(to)h(a)f(con)m(v)o(erted)e(document)g(must)i(be)g(con)m(v)o -(erted,)e(too.)396 2163 y Fq()396 -2260 y()396 -2742 y Fv(Note)20 b(that)h(although)d(it)j(is)g(only)e(sensible)i(to)f -(specify)g(one)f(of)h(the)g(tw)o(o)h(attrib)n(utes,)f(the)g(DTD)g(has)h -(no)e(means)h(to)396 2850 y(e)o(xpress)g(this)g(restriction.)396 -3000 y(So)h(f)o(ar)f(the)g(DTD.)g(Finally)-5 b(,)19 b(here)h(is)h(a)g -(document)d(for)i(it:)396 3180 y Fq()396 3277 y()396 3374 y()396 3471 y()486 3569 y -(Usage)486 3666 y(

)576 3763 y(The)g(readme)e -(converter)i(is)g(invoked)g(on)g(the)h(command)e(line)h(by:)486 -3860 y(

)486 3957 y(

)576 4054 y(readme)e([)j(-text)f(|)h -(-html)f(])g(input.xml)486 4151 y(

)486 4248 -y(

)576 4346 y(Here)g(a)g(list)h(of)f(options:)486 -4443 y(

)486 4540 y(
    )576 4637 y(
  • )665 4734 -y(

    -)396 4831 y(text:)f(specifies)g(that)i(ASCII)f -(output)f(should)h(be)h(produced

    )p Black 3800 5278 -a Fr(22)p Black eop -%%Page: 23 23 -23 22 bop Black 3028 67 a Fr(Chapter)19 b(1.)h(What)h(is)g(XML?)p -Black 576 579 a Fq(
  • )576 676 y(
  • )665 773 y(

    -)396 -870 y(html:)43 b(specifies)g(that)i(HTML)f(output)g(should)f(be) -i(produced

    )576 967 y(
  • )486 1065 y(
)486 1162 -y(

)576 1259 y(The)f(input)g(file)g(must)g(be)h(given)f(on)g(the)h -(command)e(line.)h(The)h(converted)e(output)h(is)576 -1356 y(printed)f(to)i(stdout.)486 1453 y(

)396 -1550 y()396 1647 y()486 1745 y(Author)486 -1842 y(

)576 1939 y(The)f(program)g(has)g(been)g(written)g(by)576 -2036 y(Ge) -o(rd)39 b(Stolpmann.)486 2133 y(

)396 2230 y(
)396 -2327 y()-2 2746 y Fx(Notes)p Black 396 2926 -a Fv(1.)p Black 70 w(This)20 b(construct)g(is)h(only)e(allo)n(wed)h -(within)g(the)g(de\002nition)f(of)h(another)e(entity;)i(otherwise)g(e)o -(xtra)f(spaces)i(w)o(ould)529 3034 y(be)f(added)f(\(as)i(e)o(xplained)d -(abo)o(v)o(e\).)g(Such)i(indirection)e(is)j(not)f(recommended.)529 -3172 y Fi(Complete)f(e)o(xample:)529 3343 y Fh()243 b()529 -3430 y()529 -3518 y()529 -3605 y()529 -3785 y Fi(Y)-8 b(ou)19 b(can)h(no)n(w)f(write)f Fh(&text;)j -Fi(in)e(the)g(document)h(instance,)f(and)h(depending)h(on)e(the)g(v)n -(alue)g(of)g Fh(variant)i Fi(either)e Fh(text-a)i Fi(or)529 -3882 y Fh(text-b)g Fi(is)d(inserted.)p Black 3800 5278 -a Fr(23)p Black eop -%%Page: 24 24 -24 23 bop Black Black -2 621 a Fs(Chapter)48 b(2.)f(Using)i(PXP)-2 -1055 y Fx(2.1.)39 b(V)-9 b(alidation)396 1235 y Fv(The)20 -b(parser)g(can)g(be)g(used)g(to)g Fr(validate)f Fv(a)i(document.)d -(This)i(means)g(that)g(all)h(the)f(constraints)g(that)g(must)g(hold)g -(for)f(a)396 1343 y(v)n(alid)h(document)e(are)i(actually)g(check)o(ed.) -f(V)-9 b(alidation)19 b(is)i(the)f(def)o(ault)f(mode)h(of)g(PXP,)g -(i.e.)h(e)n(v)o(ery)d(document)h(is)396 1451 y(v)n(alidated)g(while)i -(it)f(is)i(being)d(parsed.)396 1600 y(In)h(the)g Fq(examples)g -Fv(directory)e(of)i(the)g(distrib)n(ution)f(you)h(\002nd)g(the)g -Fq(pxpvalidate)f Fv(application.)f(It)j(is)g(in)m(v)n(ok)o(ed)d(in)j -(the)396 1708 y(follo)n(wing)e(w)o(ay:)396 1888 y Fq(pxpvalidate)43 -b([)i(-wf)f(])h Fn(file)p Fq(...)396 2079 y Fv(The)20 -b(\002les)h(mentioned)e(on)g(the)i(command)d(line)i(are)g(v)n -(alidated,)f(and)h(e)n(v)o(ery)e(w)o(arning)h(and)h(e)n(v)o(ery)f -(error)g(messages)h(are)396 2187 y(printed)f(to)i(stderr)-5 -b(.)396 2337 y(The)20 b(-wf)g(switch)h(modi\002es)e(the)i(beha)n(viour) -d(such)i(that)g(a)h(well-formedness)d(parser)h(is)i(simulated.)f(In)g -(this)g(mode,)f(the)396 2445 y(ELEMENT)-6 b(,)19 b(A)-9 -b(TTLIST)j(,)19 b(and)g(NO)m(T)-8 b(A)f(TION)20 b(declarations)f(of)h -(the)g(DTD)g(are)g(ignored,)e(and)i(only)f(the)i(ENTITY)396 -2553 y(declarations)e(will)i(tak)o(e)f(ef)n(fect.)g(This)g(mode)f(is)i -(intended)e(for)h(documents)e(lacking)h(a)i(DTD.)f(Please)h(note)f -(that)g(the)396 2661 y(parser)g(still)h(scans)g(the)f(DTD)g(fully)g -(and)g(will)h(report)e(all)h(errors)g(in)g(the)g(DTD;)h(such)f(checks)f -(are)h(not)g(required)f(by)g(a)396 2769 y(well-formedness)f(parser)-5 -b(.)396 2918 y(The)20 b Fq(pxpvalidate)f Fv(application)g(is)i(the)f -(simplest)h(sensible)f(program)e(using)i(PXP,)g(you)g(may)f(consider)g -(it)i(as)396 3026 y("hello)f(w)o(orld")f(program.)-2 -3445 y Fx(2.2.)39 b(Ho)n(w)g(to)g(par)n(se)f(a)i(document)d(fr)m(om)i -(an)g(application)396 3624 y Fv(Let)21 b(me)f(\002rst)h(gi)n(v)o(e)e(a) -i(rough)d(o)o(v)o(ervie)n(w)g(of)i(the)h(object)e(model)g(of)h(the)h -(parser)-5 b(.)19 b(The)h(follo)n(wing)f(items)h(are)h(represented)396 -3732 y(by)f(objects:)p Black 396 4055 a Ft(\225)p Black -60 w Fr(Documents:)f Fv(The)h(document)e(representation)g(is)j(more)e -(or)h(less)h(the)f(anchor)f(for)g(the)h(application;)f(all)i(accesses)g -(to)479 4163 y(the)f(parsed)g(entities)h(start)f(here.)g(It)g(is)h -(described)e(by)h(the)g(class)h Fq(document)f Fv(contained)e(in)j(the)f -(module)479 4271 y Fq(Pxp_document)p Fv(.)f(Y)-9 b(ou)19 -b(can)h(get)h(some)f(global)f(information,)e(such)j(as)h(the)f(XML)h -(declaration)d(the)j(document)479 4379 y(be)o(gins)f(with,)g(the)g(DTD) -g(of)g(the)g(document,)e(global)i(processing)e(instructions,)h(and)h -(most)g(important,)f(the)479 4487 y(document)f(tree.)p -Black 396 4595 a Ft(\225)p Black 60 w Fr(The)j(contents)e(of)h -(documents:)f Fv(The)h(contents)f(ha)n(v)o(e)h(the)g(structure)f(of)h -(a)h(tree:)f(Elements)g(contain)f(other)g(elements)479 -4703 y(and)h(te)o(xt)744 4670 y Ff(1)768 4703 y Fv(.)h(The)e(common)g -(type)h(to)g(represent)f(both)g(kinds)h(of)g(content)f(is)i -Fq(node)f Fv(which)g(is)h(a)g(class)g(type)e(that)479 -4811 y(uni\002es)h(the)h(properties)d(of)i(elements)g(and)g(character)f -(data.)h(Ev)o(ery)e(node)i(has)g(a)h(list)g(of)f(children)f(\(which)g -(is)i(empty)p Black 3800 5278 a Fr(24)p Black eop -%%Page: 25 25 -25 24 bop Black 3136 67 a Fr(Chapter)20 b(2.)g(Using)g(PXP)p -Black 479 579 a Fv(if)h(the)f(element)g(is)h(empty)e(or)h(the)g(node)f -(represents)h(te)o(xt\);)f(nodes)h(may)g(ha)n(v)o(e)f(attrib)n(utes;)h -(nodes)g(ha)n(v)o(e)f(al)o(w)o(ays)i(te)o(xt)479 687 -y(contents.)d(There)g(are)g(tw)o(o)h(implementations)e(of)h -Fq(node)p Fv(,)h(the)f(class)i Fq(element_impl)d Fv(for)h(elements,)g -(and)g(the)h(class)479 795 y Fq(data_impl)h Fv(for)f(te)o(xt)h(data.)g -(Y)-9 b(ou)20 b(\002nd)f(these)i(classes)g(and)f(class)h(types)f(in)g -(the)g(module)f Fq(Pxp_document)p Fv(,)g(too.)479 944 -y(Note)h(that)h(attrib)n(ute)f(lists)h(are)f(represented)f(by)g -(non-class)h(v)n(alues.)p Black 396 1094 a Ft(\225)p -Black 60 w Fr(The)h(node)e(e)n(xtension:)g Fv(F)o(or)h(adv)n(anced)e -(usage,)i(e)n(v)o(ery)e(node)i(of)f(the)i(document)d(may)i(ha)n(v)o(e)f -(an)h(associated)479 1202 y Fr(e)n(xtension)g Fv(which)g(is)h(simply)f -(a)g(second)f(object.)h(This)g(object)g(must)g(ha)n(v)o(e)g(the)g -(three)g(methods)f Fq(clone)p Fv(,)g Fq(node)p Fv(,)h(and)479 -1310 y Fq(set_node)f Fv(as)h(bare)f(minimum,)e(b)n(ut)j(you)e(are)i -(free)e(to)i(add)f(methods)f(as)i(you)f(w)o(ant.)g(This)g(is)i(the)e -(preferred)e(w)o(ay)j(to)479 1417 y(add)g(functionality)e(to)i(the)h -(document)d(tree)1746 1384 y Ff(2)1770 1417 y Fv(.)j(The)e(class)j -(type)d Fq(extension)h Fv(is)h(de\002ned)e(in)h Fq(Pxp_document)p -Fv(,)f(too.)p Black 396 1525 a Ft(\225)p Black 60 w Fr(The)i(DTD:)f -Fv(Sometimes)g(it)h(is)g(necessary)e(to)i(access)f(the)h(DTD)f(of)g(a)h -(document;)d(the)i(a)n(v)o(erage)f(application)g(does)479 -1633 y(not)h(need)g(this)g(feature.)f(The)h(class)h Fq(dtd)g -Fv(describes)e(DTDs,)i(and)e(mak)o(es)h(it)h(possible)f(to)h(get)f -(representations)e(of)479 1741 y(element,)i(entity)-5 -b(,)19 b(and)h(notation)e(declarations)h(as)i(well)g(as)g(processing)e -(instructions)g(contained)f(in)j(the)f(DTD.)479 1849 -y(This)g(class,)g(and)f Fq(dtd_element)p Fv(,)g Fq(dtd_notation)p -Fv(,)e(and)i Fq(proc_instruction)f Fv(can)h(be)h(found)e(in)i(the)f -(module)479 1957 y Fq(Pxp_dtd)p Fv(.)h(There)f(are)h(a)h(couple)e(of)h -(classes)h(representing)d(dif)n(ferent)h(kinds)g(of)h(entities;)h -(these)f(can)g(be)g(found)f(in)479 2065 y(the)h(module)f -Fq(Pxp_entity)p Fv(.)396 2214 y(Additionally)-5 b(,)18 -b(the)i(follo)n(wing)f(modules)g(play)h(a)g(role:)p Black -396 2447 a Ft(\225)p Black 60 w Fr(Pxp_yacc:)e Fv(Here)i(the)h(main)e -(parsing)h(functions)e(such)i(as)h Fq(parse_document_entity)c -Fv(are)k(located.)e(Some)479 2555 y(additional)g(types)h(and)g -(functions)f(allo)n(w)h(the)g(parser)f(to)i(be)f(con\002gured)e(in)i(a) -h(non-standard)c(w)o(ay)-5 b(.)p Black 396 2663 a Ft(\225)p -Black 60 w Fr(Pxp_types:)19 b Fv(This)h(is)h(a)g(collection)e(of)h -(basic)g(types)g(and)g(e)o(xceptions.)396 2812 y(There)g(are)g(some)g -(further)e(modules)i(that)g(are)g(needed)f(internally)g(b)n(ut)h(are)g -(not)g(part)g(of)g(the)g(API.)396 2962 y(Let)h(the)f(document)e(to)i -(be)h(parsed)e(be)h(stored)g(in)g(a)h(\002le)g(called)f -Fq(doc.xml)p Fv(.)f(The)h(parsing)f(process)h(is)h(started)f(by)396 -3070 y(calling)g(the)g(function)396 3250 y Fq(val)45 -b(parse_document_entity)c(:)k(config)e(->)i(source)f(->)g('ext)g(spec)h -(->)f('ext)g(document)396 3441 y Fv(de\002ned)19 b(in)i(the)f(module)f -Fq(Pxp_yacc)p Fv(.)g(The)h(\002rst)h(ar)o(gument)d(speci\002es)i(some)g -(global)g(properties)e(of)i(the)g(parser;)g(it)h(is)396 -3549 y(recommended)c(to)j(start)g(with)g(the)g Fq(default_config)p -Fv(.)e(The)h(second)g(ar)o(gument)e(determines)i(where)g(the)h -(document)396 3657 y(to)h(be)f(parsed)f(comes)h(from;)f(this)i(may)f -(be)g(a)g(\002le,)h(a)g(channel,)d(or)i(an)g(entity)g(ID.)g(T)-7 -b(o)21 b(parse)f Fq(doc.xml)p Fv(,)f(it)i(is)g(suf)n(\002cient)396 -3764 y(to)g(pass)f Fq(from_file)44 b("doc.xml")p Fv(.)396 -3914 y(The)20 b(third)g(ar)o(gument)e(passes)i(the)h(object)e -(speci\002cation)h(to)g(use.)g(Roughly)f(speaking,)g(it)i(determines)e -(which)g(classes)396 4022 y(implement)g(the)h(node)g(objects)f(of)h -(which)g(element)g(types,)f(and)h(which)g(e)o(xtensions)f(are)h(to)g -(be)g(used.)g(The)g Fq('ext)396 4130 y Fv(polymorphic)d(v)n(ariable)i -(is)j(the)e(type)f(of)h(the)h(e)o(xtension.)d(F)o(or)i(the)g(moment,)f -(let)i(us)f(simply)g(pass)h Fq(default_spec)d Fv(as)396 -4238 y(this)j(ar)o(gument,)d(and)h(ignore)g(it.)396 4387 -y(So)i(the)f(follo)n(wing)e(e)o(xpression)h(parses)h -Fq(doc.xml)p Fv(:)396 4567 y Fq(open)44 b(Pxp_yacc)396 -4664 y(let)h(d)f(=)h(parse_document_entity)c(default_config)i -(\(from_file)g("doc.xml"\))g(de-)396 4762 y(fault_spec)p -Black 3800 5278 a Fr(25)p Black eop -%%Page: 26 26 -26 25 bop Black 3136 67 a Fr(Chapter)20 b(2.)g(Using)g(PXP)p -Black 396 579 a Fv(Note)g(that)h Fq(default_config)d -Fv(implies)i(that)h(w)o(arnings)e(are)h(collected)g(b)n(ut)g(not)g -(printed.)e(Errors)h(raise)i(one)f(of)g(the)396 687 y(e)o(xception)f -(de\002ned)g(in)h Fq(Pxp_types)p Fv(;)f(to)i(get)f(readable)f(errors)g -(and)h(w)o(arnings)f(catch)h(the)g(e)o(xceptions)f(as)i(follo)n(ws:)396 -867 y Fq(class)44 b(warner)g(=)486 964 y(object)576 1061 -y(method)f(warn)i(w)f(=)665 1158 y(print_endline)f(\("WARNING:)g(")i(^) -f(w\))486 1256 y(end)396 1353 y(;;)396 1547 y(try)486 -1644 y(let)g(config)g(=)h({)f(default_config)f(with)h(warner)g(=)h(new) -f(warner)g(})g(in)486 1741 y(let)g(d)h(=)g(parse_document_entity)c -(config)j(\(from_file)f("doc.xml"\))g(default_spec)486 -1838 y(in)576 1935 y(...)396 2033 y(with)531 2130 y(e)h(->)620 -2227 y(print_endline)f(\(Pxp_types.string_of_exn)e(e\))396 -2418 y Fv(No)n(w)20 b Fq(d)h Fv(is)g(an)f(object)g(of)g(the)g -Fq(document)f Fv(class.)i(If)f(you)g(w)o(ant)g(the)g(node)f(tree,)h -(you)g(can)g(get)g(the)g(root)f(element)h(by)396 2598 -y Fq(let)45 b(root)f(=)g(d)h(#)g(root)396 2789 y Fv(and)20 -b(if)g(you)g(w)o(ould)f(rather)h(lik)o(e)g(to)g(access)h(the)f(DTD,)g -(determine)f(it)i(by)396 2969 y Fq(let)45 b(dtd)f(=)h(d)f(#)h(dtd)396 -3160 y Fv(As)21 b(it)g(is)g(more)f(interesting,)f(let)h(us)h(in)m(v)o -(estigate)e(the)h(node)f(tree)h(no)n(w)-5 b(.)19 b(Gi)n(v)o(en)g(the)i -(root)e(element,)g(it)i(is)h(possible)d(to)396 3268 y(recursi)n(v)o -(ely)f(tra)n(v)o(erse)h(the)h(whole)f(tree.)g(The)g(children)g(of)g(a)h -(node)f Fq(n)h Fv(are)f(returned)f(by)h(the)h(method)e -Fq(sub_nodes)p Fv(,)g(and)396 3376 y(the)i(type)g(of)g(a)h(node)e(is)i -(returned)d(by)i Fq(node_type)p Fv(.)f(This)i(function)d(tra)n(v)o -(erses)i(the)g(tree,)g(and)g(prints)g(the)g(type)f(of)h(each)396 -3484 y(node:)396 3664 y Fq(let)45 b(rec)f(print_structure)e(n)j(=)486 -3761 y(let)f(ntype)g(=)h(n)g(#)f(node_type)g(in)486 3858 -y(match)g(ntype)g(with)576 3955 y(T_element)f(name)h(->)665 -4053 y(print_endline)f(\("Element)g(of)i(type)f(")h(^)f(name\);)665 -4150 y(let)h(children)e(=)i(n)f(#)h(sub_nodes)e(in)665 -4247 y(List.iter)h(print_structure)e(children)486 4344 -y(|)j(T_data)e(->)665 4441 y(print_endline)g("Data")486 -4538 y(|)i(_)f(->)665 4635 y(\(*)h(Other)f(node)g(types)g(are)g(not)h -(possible)e(unless)h(the)g(parser)g(is)h(configured)800 -4733 y(differently.)710 4830 y(*\))p Black 3798 5278 -a Fr(26)p Black eop -%%Page: 27 27 -27 26 bop Black 3136 67 a Fr(Chapter)20 b(2.)g(Using)g(PXP)p -Black 665 579 a Fq(assert)44 b(false)396 770 y Fv(Y)-9 -b(ou)20 b(can)g(call)g(this)h(function)e(by)396 950 y -Fq(print_structure)43 b(root)396 1141 y Fv(The)20 b(type)g(returned)e -(by)i Fq(node_type)f Fv(is)i(either)f Fq(T_element)43 -b(name)21 b Fv(or)e Fq(T_data)p Fv(.)h(The)g Fq(name)g -Fv(of)g(the)g(element)g(type)396 1249 y(is)h(the)g(string)e(included)g -(in)i(the)f(angle)f(brack)o(ets.)h(Note)g(that)g(only)f(elements)h(ha)n -(v)o(e)g(children;)f(data)h(nodes)f(are)h(al)o(w)o(ays)396 -1357 y(lea)n(v)o(es)h(of)e(the)i(tree.)396 1506 y(There)f(are)g(some)g -(more)f(methods)g(in)i(order)e(to)h(access)h(a)f(parsed)g(node)f(tree:) -p Black 396 1739 a Ft(\225)p Black 60 w Fq(n)45 b(#)g(parent)p -Fv(:)19 b(Returns)h(the)h(parent)e(node,)g(or)h(raises)h -Fq(Not_found)e Fv(if)h(the)g(node)g(is)h(already)e(the)h(root)p -Black 396 1847 a Ft(\225)p Black 60 w Fq(n)45 b(#)g(root)p -Fv(:)20 b(Returns)g(the)g(root)g(of)f(the)i(node)e(tree.)p -Black 396 1955 a Ft(\225)p Black 60 w Fq(n)45 b(#)g(attribute)e(a)p -Fv(:)21 b(Returns)f(the)g(v)n(alue)f(of)h(the)g(attrib)n(ute)g(with)h -(name)e Fq(a)p Fv(.)i(The)e(method)g(returns)h(a)g(v)n(alue)g(for)479 -2063 y(e)n(v)o(ery)f Fr(declar)m(ed)j Fv(attrib)n(ute,)d(independently) -e(of)j(whether)f(the)i(attrib)n(ute)e(instance)h(is)h(de\002ned)e(or)h -(not.)g(If)g(the)479 2170 y(attrib)n(ute)g(is)h(not)f(declared,)f -Fq(Not_found)g Fv(will)i(be)f(raised.)g(\(In)f(well-formedness)f(mode,) -h(e)n(v)o(ery)g(attrib)n(ute)h(is)479 2278 y(considered)f(as)i(being)e -(implicitly)h(declared)e(with)j(type)f Fq(CDATA)p Fv(.\))479 -2428 y(The)g(follo)n(wing)f(return)g(v)n(alues)g(are)i(possible:)f -Fq(Value)44 b(s)p Fv(,)20 b Fq(Valuelist)43 b(sl)21 b -Fv(,)f(and)g Fq(Implied_value)p Fv(.)e(The)i(\002rst)479 -2536 y(tw)o(o)h(v)n(alue)e(types)h(indicate)g(that)g(the)g(attrib)n -(ute)g(v)n(alue)g(is)h(a)n(v)n(ailable,)e(either)h(because)g(there)f -(is)i(a)g(de\002nition)479 2644 y Fn(a)p Fq(=")p Fn(value)p -Fq(")f Fv(in)g(the)g(XML)g(te)o(xt,)g(or)g(because)g(there)f(is)i(a)g -(def)o(ault)e(v)n(alue)h(\(declared)f(in)h(the)g(DTD\).)g(Only)g(if)g -(both)479 2752 y(the)g(instance)g(de\002nition)f(and)h(the)g(def)o -(ault)g(declaration)e(are)i(missing,)g(the)h(latter)f(v)n(alue)f -Fq(Implied_value)g Fv(will)479 2860 y(be)h(returned.)479 -3009 y(In)g(the)g(DTD,)h(e)n(v)o(ery)d(attrib)n(ute)i(is)h(typed.)e -(There)h(are)g(single-v)n(alue)e(types)i(\(CD)m(A)-9 -b(T)h(A,)20 b(ID,)g(IDREF)-7 b(,)21 b(ENTITY)-11 b(,)479 -3117 y(NMT)o(OKEN,)19 b(enumerations\),)f(in)i(which)g(case)g(the)h -(method)d(passes)j Fq(Value)44 b(s)21 b Fv(back,)e(where)h -Fq(s)g Fv(is)h(the)479 3225 y(normalized)e(string)g(v)n(alue)h(of)g -(the)g(attrib)n(ute.)g(The)f(other)h(types)g(\(IDREFS,)g(ENTITIES,)f -(NMT)o(OKENS\))479 3333 y(represent)g(list)j(v)n(alues,)d(and)h(the)g -(parser)g(splits)h(the)f(XML)g(literal)h(into)e(se)n(v)o(eral)h(tok)o -(ens)g(and)f(returns)h(these)g(tok)o(ens)479 3441 y(as)h -Fq(Valuelist)44 b(sl)p Fv(.)479 3590 y(Normalization)19 -b(means)h(that)g(entity)g(references)e(\(the)i Fq(&)p -Fn(name)p Fq(;)g Fv(tok)o(ens\))f(and)h(character)f(references)479 -3698 y(\()p Fq(&#)p Fn(number)s Fq(;)p Fv(\))g(are)h(replaced)f(by)g -(the)i(te)o(xt)f(the)o(y)f(represent,)g(and)h(that)g(white)g(space)g -(characters)f(are)i(con)m(v)o(erted)479 3806 y(into)f(plain)g(spaces.)p -Black 396 3955 a Ft(\225)p Black 60 w Fq(n)45 b(#)g(data)p -Fv(:)20 b(Returns)g(the)g(character)f(data)h(contained)f(in)h(the)g -(node.)f(F)o(or)h(data)g(nodes,)f(the)h(meaning)f(is)i(ob)o(vious)479 -4063 y(as)g(this)g(is)g(the)f(main)g(content)f(of)h(data)g(nodes.)f(F)o -(or)h(element)g(nodes,)f(this)i(method)e(returns)g(the)h(concatenated) -479 4171 y(contents)g(of)g(all)g(inner)g(data)g(nodes.)479 -4321 y(Note)g(that)h(entity)f(references)e(included)h(in)h(the)h(te)o -(xt)f(are)g(resolv)o(ed)f(while)h(the)o(y)f(are)h(being)g(parsed;)f -(for)h(e)o(xample)479 4429 y(the)g(te)o(xt)h("a)f(<>)g(b")g(will) -h(be)f(returned)e(as)j("a)g(<>)f(b")g(by)g(this)h(method.)d(Spaces)j -(of)f(data)g(nodes)f(are)h(al)o(w)o(ays)479 4537 y(preserv)o(ed.)e(Ne)n -(wlines)j(are)f(preserv)o(ed,)e(b)n(ut)i(al)o(w)o(ays)g(con)m(v)o -(erted)e(to)i(\\n)h(characters)e(e)n(v)o(en)g(if)i(ne)n(wlines)e(are)i -(encoded)479 4644 y(as)g(\\r\\n)f(or)g(\\r)-5 b(.)21 -b(Normally)e(you)g(will)i(ne)n(v)o(er)e(see)i(tw)o(o)f(adjacent)f(data) -i(nodes)e(because)h(the)g(parser)f(collapses)h(all)h(data)479 -4752 y(material)f(at)h(one)e(location)h(into)g(one)f(node.)g(\(Ho)n(we) -n(v)o(er)m(,)f(if)i(you)g(create)g(your)f(o)n(wn)g(tree)h(or)g -(transform)f(the)h(parsed)479 4860 y(tree,)g(it)h(is)g(possible)f(to)h -(ha)n(v)o(e)e(adjacent)h(data)g(nodes.\))p Black 3797 -5278 a Fr(27)p Black eop -%%Page: 28 28 -28 27 bop Black 3136 67 a Fr(Chapter)20 b(2.)g(Using)g(PXP)p -Black 479 579 a Fv(Note)g(that)h(elements)f(that)g(do)g -Fr(not)h Fv(allo)n(w)f(#PCD)m(A)-9 b(T)h(A)20 b(as)h(content)e(will)i -(not)f(ha)n(v)o(e)g(data)g(nodes)f(as)i(children.)e(This)479 -687 y(means)h(that)g(spaces)h(and)f(ne)n(wlines,)f(the)h(only)g -(character)f(material)g(allo)n(wed)h(for)g(such)f(elements,)h(are)g -(silently)479 795 y(dropped.)396 986 y(F)o(or)g(e)o(xample,)e(if)i(the) -f(task)h(is)h(to)f(print)f(all)h(contents)f(of)g(elements)h(with)f -(type)h("v)n(aluable")e(whose)h(attrib)n(ute)g("priority")396 -1094 y(is)i("1",)f(this)h(function)d(can)i(help:)396 -1274 y Fq(let)45 b(rec)f(print_valuable_prio1)d(n)k(=)486 -1371 y(let)f(ntype)g(=)h(n)g(#)f(node_type)g(in)486 1468 -y(match)g(ntype)g(with)576 1565 y(T_element)f("valuable")g(when)h(n)h -(#)g(attribute)e("priority")g(=)i(Value)f("1")g(->)665 -1662 y(print_endline)f("Valuable)g(node)h(with)h(priotity)e(1)i -(found:";)665 1759 y(print_endline)e(\(n)h(#)h(data\))486 -1857 y(|)g(\(T_element)e(_)h(|)h(T_data\))f(->)665 1954 -y(let)h(children)e(=)i(n)f(#)h(sub_nodes)e(in)665 2051 -y(List.iter)h(print_valuable_prio1)d(children)486 2148 -y(|)k(_)f(->)665 2245 y(assert)g(false)396 2436 y Fv(Y)-9 -b(ou)20 b(can)g(call)g(this)h(function)e(by:)396 2616 -y Fq(print_valuable_prio1)42 b(root)396 2807 y Fv(If)20 -b(you)g(lik)o(e)g(a)h(DSSSL-lik)o(e)f(style,)g(you)g(can)g(mak)o(e)f -(the)h(function)f Fq(process_children)f Fv(e)o(xplicit:)396 -2987 y Fq(let)45 b(rec)f(print_valuable_prio1)d(n)k(=)486 -3182 y(let)f(process_children)e(n)j(=)576 3279 y(let)f(children)f(=)i -(n)g(#)f(sub_nodes)g(in)576 3376 y(List.iter)f(print_valuable_prio1)e -(children)486 3473 y(in)486 3667 y(let)j(ntype)g(=)h(n)g(#)f(node_type) -g(in)486 3764 y(match)g(ntype)g(with)576 3862 y(T_element)f("valuable") -g(when)h(n)h(#)g(attribute)e("priority")g(=)i(Value)f("1")g(->)665 -3959 y(print_endline)f("Valuable)g(node)h(with)h(priority)e(1)i -(found:";)665 4056 y(print_endline)e(\(n)h(#)h(data\))486 -4153 y(|)g(\(T_element)e(_)h(|)h(T_data\))f(->)665 4250 -y(process_children)e(n)486 4347 y(|)j(_)f(->)665 4444 -y(assert)g(false)396 4635 y Fv(So)21 b(f)o(ar)m(,)e(O'Caml)h(is)i(no)n -(w)d(a)i(simple)f("style-sheet)g(language":)e(Y)-9 b(ou)20 -b(can)g(form)f(a)h(big)g("match")g(e)o(xpression)e(to)396 -4743 y(distinguish)h(between)h(all)h(signi\002cant)e(cases,)i(and)f -(pro)o(vide)e(dif)n(ferent)g(reactions)i(on)g(dif)n(ferent)e -(conditions.)h(But)h(this)396 4851 y(technique)f(has)h(limitations;)g -(the)h("match")e(e)o(xpression)g(tends)h(to)g(get)g(lar)o(ger)f(and)h -(lar)o(ger)m(,)e(and)i(it)g(is)i(dif)n(\002cult)d(to)i(store)p -Black 3800 5278 a Fr(28)p Black eop -%%Page: 29 29 -29 28 bop Black 3136 67 a Fr(Chapter)20 b(2.)g(Using)g(PXP)p -Black 396 579 a Fv(intermediate)f(v)n(alues)h(as)h(there)e(is)j(only)d -(one)h(big)f(recursion.)g(Alternati)n(v)o(ely)-5 b(,)18 -b(it)j(is)g(also)f(possible)g(to)h(represent)e(the)396 -687 y(v)n(arious)g(cases)i(as)g(classes,)g(and)f(to)g(use)h(dynamic)d -(method)h(lookup)g(to)h(\002nd)g(the)g(appropiate)e(class.)j(The)f(ne)o -(xt)f(section)396 795 y(e)o(xplains)g(this)i(technique)e(in)h(detail.) --2 1213 y Fx(2.3.)39 b(Class-based)e(pr)m(ocessing)g(of)j(the)f(node)f -(tree)396 1393 y Fv(By)21 b(def)o(ault,)e(the)h(parsed)g(node)f(tree)h -(consists)h(of)f(objects)g(of)g(the)g(same)g(class;)h(this)g(is)g(a)g -(good)e(design)g(as)i(long)e(as)i(you)396 1501 y(w)o(ant)g(only)e(to)h -(access)h(selected)f(parts)g(of)g(the)h(document.)c(F)o(or)j(comple)o -(x)f(transformations,)e(it)k(may)f(be)g(better)g(to)g(use)396 -1609 y(dif)n(ferent)f(classes)i(for)f(objects)g(describing)e(dif)n -(ferent)h(element)g(types.)396 1758 y(F)o(or)h(e)o(xample,)f(if)h(the)g -(DTD)h(declares)e(the)i(element)e(types)h Fq(a)p Fv(,)h -Fq(b)p Fv(,)f(and)g Fq(c)p Fv(,)g(and)g(if)g(the)g(task)h(is)g(to)f -(con)m(v)o(ert)e(an)j(arbitrary)396 1866 y(document)d(into)i(a)h -(printable)e(format,)g(the)h(idea)g(is)h(to)f(de\002ne)g(for)g(e)n(v)o -(ery)f(element)g(type)h(a)g(separate)g(class)h(that)g(has)f(a)396 -1974 y(method)f Fq(print)p Fv(.)h(The)g(classes)h(are)f -Fq(eltype_a)p Fv(,)f Fq(eltype_b)p Fv(,)g(and)h Fq(eltype_c)p -Fv(,)f(and)h(e)n(v)o(ery)f(class)i(implements)396 2082 -y Fq(print)f Fv(such)g(that)g(elements)g(of)g(the)g(type)g -(corresponding)d(to)j(the)g(class)i(are)e(con)m(v)o(erted)d(to)k(the)f -(output)f(format.)396 2232 y(The)h(parser)g(supports)f(such)h(a)g -(design)g(directly)-5 b(.)19 b(As)i(it)g(is)g(impossible)e(to)i(deri)n -(v)o(e)d(recursi)n(v)o(e)h(classes)i(in)g(O'Caml)3703 -2198 y Ff(3)3727 2232 y Fv(,)g(the)396 2340 y(specialized)f(element)f -(classes)j(cannot)d(be)h(formed)f(by)g(simply)h(inheriting)f(from)g -(the)h(b)n(uilt-in)g(classes)h(of)f(the)g(parser)396 -2447 y(and)g(adding)f(methods)g(for)g(customized)g(functionality)-5 -b(.)18 b(T)-7 b(o)20 b(get)g(around)f(this)h(limitation,)g(e)n(v)o(ery) -f(node)g(of)h(the)396 2555 y(document)e(tree)j(is)g(represented)d(by)i -Fr(two)h Fv(objects,)e(one)h(called)g("the)g(node")f(and)h(containing)e -(the)i(recursi)n(v)o(e)396 2663 y(de\002nition)f(of)h(the)g(tree,)g -(one)g(called)g("the)g(e)o(xtension".)e(Ev)o(ery)h(node)g(object)h(has) -g(a)h(reference)e(to)h(the)g(e)o(xtension,)f(and)396 -2771 y(the)h(e)o(xtension)f(has)i(a)f(reference)f(to)h(the)g(node.)f -(The)h(adv)n(antage)e(of)i(this)h(model)e(is)i(that)g(it)g(is)g(no)n(w) -e(possible)h(to)396 2879 y(customize)g(the)g(e)o(xtension)f(without)g -(af)n(fecting)g(the)h(typing)f(constraints)g(of)h(the)h(recursi)n(v)o -(e)d(node)h(de\002nition.)396 3029 y(Ev)o(ery)g(e)o(xtension)g(must)h -(ha)n(v)o(e)g(the)g(three)g(methods)f Fq(clone)p Fv(,)g -Fq(node)p Fv(,)h(and)g Fq(set_node)p Fv(.)f(The)h(method)f -Fq(clone)h Fv(creates)396 3137 y(a)h(deep)e(cop)o(y)h(of)g(the)g(e)o -(xtension)f(object)g(and)h(returns)f(it;)i Fq(node)f -Fv(returns)g(the)g(node)f(object)h(for)f(this)i(e)o(xtension)e(object;) -396 3244 y(and)h Fq(set_node)f Fv(is)i(used)f(to)h(tell)g(the)f(e)o -(xtension)f(object)g(which)h(node)f(is)i(associated)f(with)g(it,)h -(this)g(method)e(is)396 3352 y(automatically)g(called)h(when)g(the)g -(node)f(tree)h(is)h(initialized.)f(The)g(follo)n(wing)e(de\002nition)h -(is)i(a)g(good)e(starting)h(point)396 3460 y(for)g(these)g(methods;)f -(usually)h Fq(clone)g Fv(must)g(be)g(further)f(re\002ned)g(when)h -(instance)g(v)n(ariables)f(are)h(added)f(to)h(the)h(class:)396 -3640 y Fq(class)44 b(custom_extension)e(=)486 3738 y(object)i(\(self\)) -576 3932 y(val)g(mutable)g(node)g(=)g(\(None)g(:)h(custom_extension)d -(node)i(option\))576 4126 y(method)f(clone)h(=)h({<)g(>})576 -4223 y(method)e(node)i(=)665 4320 y(match)f(node)g(with)845 -4418 y(None)g(->)934 4515 y(assert)g(false)755 4612 y(|)h(Some)f(n)g -(->)h(n)576 4709 y(method)e(set_node)h(n)h(=)665 4806 -y(node)f(<-)h(Some)f(n)p Black 3800 5278 a Fr(29)p Black -eop -%%Page: 30 30 -30 29 bop Black 3136 67 a Fr(Chapter)20 b(2.)g(Using)g(PXP)p -Black 486 676 a Fq(end)396 867 y Fv(This)h(part)e(of)h(the)h(e)o -(xtension)d(is)j(usually)f(the)g(same)h(for)e(all)i(classes,)g(so)g(it) -g(is)g(a)f(good)f(idea)h(to)g(consider)396 975 y Fq(custom_extension)e -Fv(as)j(the)f(super)n(-class)g(of)g(the)h(further)d(class)j -(de\002nitions.)e(Continuining)f(the)j(e)o(xample)d(of)396 -1083 y(abo)o(v)o(e,)h(we)h(can)g(de\002ne)g(the)g(element)g(type)f -(classes)j(as)e(follo)n(ws:)396 1263 y Fq(class)44 b(virtual)g -(custom_extension)e(=)486 1360 y(object)i(\(self\))576 -1457 y(...)g(clone,)g(node,)g(set_node)f(defined)h(as)g(above)g(...)576 -1652 y(method)f(virtual)h(print)g(:)h(out_channel)e(->)h(unit)486 -1749 y(end)396 1943 y(class)g(eltype_a)g(=)486 2040 y(object)g -(\(self\))576 2137 y(inherit)f(custom_extension)576 2234 -y(method)g(print)h(ch)h(=)g(...)486 2332 y(end)396 2526 -y(class)f(eltype_b)g(=)486 2623 y(object)g(\(self\))576 -2720 y(inherit)f(custom_extension)576 2817 y(method)g(print)h(ch)h(=)g -(...)486 2914 y(end)396 3109 y(class)f(eltype_c)g(=)486 -3206 y(object)g(\(self\))576 3303 y(inherit)f(custom_extension)576 -3400 y(method)g(print)h(ch)h(=)g(...)486 3497 y(end)396 -3688 y Fv(The)20 b(method)f Fq(print)h Fv(can)g(no)n(w)f(be)i -(implemented)d(for)h(e)n(v)o(ery)g(element)h(type)g(separately)-5 -b(.)18 b(Note)i(that)h(you)e(get)h(the)396 3796 y(associated)g(node)f -(by)h(in)m(v)n(oking)396 3976 y Fq(self)44 b(#)h(node)396 -4167 y Fv(and)20 b(you)f(get)h(the)h(e)o(xtension)d(object)i(of)g(a)h -(node)e Fq(n)h Fv(by)g(writing)396 4347 y Fq(n)45 b(#)g(extension)396 -4538 y Fv(It)21 b(is)g(guaranteed)d(that)396 4718 y Fq(self)44 -b(#)h(node)f(#)h(extension)e(==)i(self)p Black 3800 5278 -a Fr(30)p Black eop -%%Page: 31 31 -31 30 bop Black 3136 67 a Fr(Chapter)20 b(2.)g(Using)g(PXP)p -Black 396 579 a Fv(al)o(w)o(ays)h(holds.)396 728 y(Here)f(are)g(sample) -g(de\002nitions)g(of)g(the)g Fq(print)g Fv(methods:)396 -909 y Fq(class)44 b(eltype_a)g(=)486 1006 y(object)g(\(self\))576 -1103 y(inherit)f(custom_extension)576 1200 y(method)g(print)h(ch)h(=) -665 1297 y(\(*)g(Nodes)f(...)f(are)h(only)g(containers:)f(*\)) -665 1394 y(output_string)g(ch)h("\(";)665 1491 y(List.iter)755 -1588 y(\(fun)g(n)h(->)f(n)h(#)g(extension)e(#)i(print)f(ch\))755 -1686 y(\(self)g(#)h(node)f(#)g(sub_nodes\);)665 1783 -y(output_string)f(ch)h("\)";)486 1880 y(end)396 2074 -y(class)g(eltype_b)g(=)486 2171 y(object)g(\(self\))576 -2268 y(inherit)f(custom_extension)576 2366 y(method)g(print)h(ch)h(=) -665 2463 y(\(*)g(Print)f(the)g(value)g(of)h(the)f(CDATA)g(attribute)f -("print":)h(*\))665 2560 y(match)g(self)g(#)h(node)f(#)h(attribute)e -("print")h(with)755 2657 y(Value)g(s)314 b(->)44 b(output_string)f(ch)h -(s)665 2754 y(|)h(Implied_value)e(->)h(output_string)f(ch)h -("")665 2851 y(|)h(Valuelist)e(l)135 b(->)44 -b(assert)g(false)1517 2948 y(\(*)h(not)f(possible)f(because)h(the)g -(att)h(is)f(CDATA)g(*\))486 3045 y(end)396 3240 y(class)g(eltype_c)g(=) -486 3337 y(object)g(\(self\))576 3434 y(inherit)f(custom_extension)576 -3531 y(method)g(print)h(ch)h(=)665 3628 y(\(*)g(Print)f(the)g(contents) -g(of)g(this)g(element:)g(*\))665 3725 y(output_string)f(ch)h(\(self)g -(#)h(node)f(#)h(data\))486 3823 y(end)396 4017 y(class)f -(null_extension)f(=)486 4114 y(object)h(\(self\))576 -4211 y(inherit)f(custom_extension)576 4308 y(method)g(print)h(ch)h(=)g -(assert)e(false)486 4405 y(end)396 4638 y Fv(The)20 b(remaining)f(task) -h(is)h(to)g(con\002gure)d(the)i(parser)g(such)g(that)g(these)g(e)o -(xtension)f(classes)i(are)f(actually)g(used.)g(Here)396 -4746 y(another)f(problem)f(arises:)j(It)g(is)g(not)f(possible)g(to)g -(dynamically)e(select)j(the)f(class)h(of)f(an)g(object)g(to)g(be)h -(created.)e(As)396 4854 y(w)o(orkaround,)e(PXP)k(allo)n(ws)g(the)f -(user)g(to)g(specify)g Fr(e)n(xemplar)g(objects)g Fv(for)f(the)h(v)n -(arious)g(element)f(types;)h(instead)g(of)p Black 3800 -5278 a Fr(31)p Black eop -%%Page: 32 32 -32 31 bop Black 3136 67 a Fr(Chapter)20 b(2.)g(Using)g(PXP)p -Black 396 579 a Fv(creating)f(the)i(nodes)e(of)h(the)g(tree)g(by)g -(applying)f(the)h Fq(new)g Fv(operator)e(the)j(nodes)e(are)h(produced)e -(by)i(duplicating)e(the)396 687 y(e)o(x)o(emplars.)h(As)h(object)g -(duplication)f(preserv)o(es)g(the)h(class)h(of)f(the)g(object,)f(one)h -(can)g(create)g(fresh)g(objects)g(of)g(e)n(v)o(ery)396 -795 y(class)h(for)f(which)g(pre)n(viously)e(an)i(e)o(x)o(emplar)e(has)j -(been)e(re)o(gistered.)396 944 y(Ex)o(emplars)g(are)h(meant)g(as)h -(objects)f(without)f(contents,)g(the)h(only)g(interesting)f(thing)g(is) -j(that)e(e)o(x)o(emplars)e(are)396 1052 y(instances)i(of)g(a)h(certain) -f(class.)g(The)g(creation)f(of)h(an)h(e)o(x)o(emplar)d(for)h(an)h -(element)g(node)f(can)h(be)g(done)f(by:)396 1232 y Fq(let)45 -b(element_exemplar)d(=)i(new)h(element_impl)e(extension_exemplar)396 -1423 y Fv(And)20 b(a)h(data)f(node)f(e)o(x)o(emplar)f(is)j(created)f -(by:)396 1603 y Fq(let)45 b(data_exemplar)d(=)j(new)f(data_impl)g -(extension_exemplar)396 1794 y Fv(The)20 b(classes)h -Fq(element_impl)e Fv(and)h Fq(data_impl)f Fv(are)h(de\002ned)f(in)i -(the)f(module)f Fq(Pxp_document)p Fv(.)f(The)396 1902 -y(constructors)h(initialize)h(the)g(fresh)g(objects)g(as)h(empty)e -(objects,)h(i.e.)g(without)g(children,)e(without)i(data)g(contents,)f -(and)396 2010 y(so)i(on.)e(The)h Fq(extension_exemplar)e -Fv(is)j(the)f(initial)h(e)o(xtension)e(object)g(the)h(e)o(x)o(emplars)f -(are)h(associated)g(with.)396 2160 y(Once)g(the)g(e)o(x)o(emplars)f -(are)h(created)f(and)h(stored)g(some)n(where)f(\(e.g.)g(in)h(a)h(hash)f -(table\),)f(you)h(can)g(tak)o(e)g(an)g(e)o(x)o(emplar)396 -2268 y(and)g(create)g(a)g(concrete)f(instance)h(\(with)g(contents\))f -(by)h(duplicating)e(it.)j(As)g(user)f(of)g(the)g(parser)g(you)f(are)h -(normally)396 2376 y(not)g(concerned)e(with)i(this)h(as)g(this)g(is)g -(part)f(of)g(the)g(internal)f(logic)h(of)g(the)g(parser)m(,)f(b)n(ut)h -(as)h(background)c(kno)n(wledge)h(it)396 2483 y(is)j(w)o(orthwhile)e -(to)i(mention)e(that)h(the)g(tw)o(o)h(methods)e Fq(create_element)f -Fv(and)i Fq(create_data)f Fv(actually)g(perform)396 2591 -y(the)h(duplication)f(of)g(the)i(e)o(x)o(emplar)d(for)h(which)h(the)o -(y)f(are)h(in)m(v)n(ok)o(ed,)e(additionally)g(apply)i(modi\002cations)e -(to)j(the)f(clone,)396 2699 y(and)g(\002nally)g(return)f(the)h(ne)n(w)g -(object.)f(Moreo)o(v)o(er)m(,)f(the)i(e)o(xtension)e(object)i(is)h -(copied,)e(too,)h(and)f(the)i(ne)n(w)f(node)f(object)396 -2807 y(is)i(associated)f(with)g(the)g(fresh)g(e)o(xtension)e(object.)i -(Note)g(that)g(this)g(is)h(the)f(reason)g(why)f(e)n(v)o(ery)g(e)o -(xtension)f(object)i(must)396 2915 y(ha)n(v)o(e)g(a)g -Fq(clone)g Fv(method.)396 3065 y(The)g(con\002guration)e(of)i(the)g -(set)h(of)f(e)o(x)o(emplars)e(is)j(passed)f(to)h(the)f -Fq(parse_document_entity)d Fv(function)i(as)i(third)396 -3173 y(ar)o(gument.)d(In)i(our)f(e)o(xample,)g(this)h(ar)o(gument)e -(can)i(be)g(set)h(up)f(as)h(follo)n(ws:)396 3353 y Fq(let)45 -b(spec)f(=)486 3450 y(make_spec_from_alist)576 3547 y(~data_exemplar:) -535 b(\(new)44 b(data_impl)g(\(new)g(null_extension\)\))576 -3644 y(~default_element_exemplar:)c(\(new)k(element_impl)f(\(new)h -(null_extension\)\))576 3741 y(~element_alist:)710 3838 -y([)h("a",)89 b(new)44 b(element_impl)f(\(new)h(eltype_a\);)800 -3935 y("b",)89 b(new)44 b(element_impl)f(\(new)h(eltype_b\);)800 -4033 y("c",)89 b(new)44 b(element_impl)f(\(new)h(eltype_c\);)710 -4130 y(])576 4227 y(\(\))396 4418 y Fv(The)20 b Fq(~element_alist)f -Fv(function)f(ar)o(gument)g(de\002nes)i(the)g(mapping)e(from)h(element) -h(types)g(to)g(e)o(x)o(emplars)f(as)396 4526 y(associati)n(v)o(e)h -(list.)h(The)f(ar)o(gument)e Fq(~data_exemplar)g Fv(speci\002es)j(the)f -(e)o(x)o(emplar)e(for)i(data)g(nodes,)f(and)h(the)396 -4634 y Fq(~default_element_exemplar)d Fv(is)k(used)f(whene)n(v)o(er)e -(the)i(parser)g(\002nds)g(an)g(element)g(type)f(for)h(which)g(the)396 -4742 y(associati)n(v)o(e)g(list)h(does)f(not)g(de\002ne)g(an)g(e)o(x)o -(emplar)-5 b(.)p Black 3800 5278 a Fr(32)p Black eop -%%Page: 33 33 -33 32 bop Black 3136 67 a Fr(Chapter)20 b(2.)g(Using)g(PXP)p -Black 396 579 a Fv(The)g(con\002guration)e(is)j(no)n(w)e(complete.)g(Y) --9 b(ou)20 b(can)g(still)h(use)g(the)f(same)g(parsing)f(functions,)g -(only)g(the)h(initialization)g(is)396 687 y(a)h(bit)f(dif)n(ferent.)f -(F)o(or)g(e)o(xample,)g(call)i(the)f(parser)f(by:)396 -867 y Fq(let)45 b(d)f(=)h(parse_document_entity)c(default_config)i -(\(from_file)g("doc.xml"\))g(spec)396 1058 y Fv(Note)20 -b(that)h(the)f(resulting)f(document)f Fq(d)j Fv(has)f(a)h(usable)f -(type;)g(especially)f(the)i Fq(print)f Fv(method)e(we)j(added)e(is)i -(visible.)396 1166 y(So)g(you)e(can)h(print)g(your)e(document)h(by)396 -1346 y Fq(d)45 b(#)g(root)f(#)g(extension)g(#)g(print)g(stdout)396 -1578 y Fv(This)21 b(object-oriented)c(approach)h(looks)i(rather)f -(complicated;)g(this)h(is)i(mostly)d(caused)h(by)g(w)o(orking)e(around) -h(some)396 1686 y(problems)g(of)h(the)g(strict)h(typing)e(system)h(of)g -(O'Caml.)g(Some)g(auxiliary)f(concepts)g(such)h(as)h(e)o(xtensions)e -(were)396 1794 y(needed,)g(b)n(ut)h(the)g(practical)g(consequences)e -(are)i(lo)n(w)-5 b(.)20 b(In)g(the)g(ne)o(xt)f(section,)h(one)g(of)g -(the)g(e)o(xamples)f(of)h(the)396 1902 y(distrib)n(ution)f(is)i(e)o -(xplained,)d(a)j(con)m(v)o(erter)d(from)h Fr(r)m(eadme)h -Fv(documents)e(to)i(HTML.)-2 2321 y Fx(2.4.)39 b(Example:)f(An)h(HTML)f -(bac)m(kend)g(f)m(or)h(the)g Fd(readme)44 b Fx(DTD)396 -2501 y Fv(The)20 b(con)m(v)o(erter)e(from)h Fr(r)m(eadme)h -Fv(documents)e(to)i(HTML)g(documents)f(follo)n(ws)h(strictly)g(the)g -(approach)e(to)j(de\002ne)e(one)396 2609 y(class)i(per)f(element)g -(type.)f(The)h(HTML)g(code)g(is)h(similar)f(to)g(the)h -Fr(r)m(eadme)e Fv(source,)g(because)h(of)g(this)h(most)f(elements)396 -2716 y(can)g(be)g(con)m(v)o(erted)e(in)i(the)g(follo)n(wing)f(w)o(ay:)h -(Gi)n(v)o(en)g(the)g(input)f(element)396 2897 y Fq(content)396 -3088 y Fv(the)h(con)m(v)o(ersion)e(te)o(xt)i(is)h(the)f(concatenation)e -(of)i(a)h(computed)d(pre\002x,)h(the)h(recursi)n(v)o(ely)f(con)m(v)o -(erted)e(content,)i(and)h(a)396 3195 y(computed)e(suf)n(\002x.)396 -3345 y(Only)i(one)g(element)f(type)h(cannot)f(be)h(handled)f(by)h(this) -g(scheme:)g Fq(footnote)p Fv(.)f(F)o(ootnotes)g(are)h(collected)g -(while)g(the)o(y)396 3453 y(are)g(found)f(in)h(the)g(input)g(te)o(xt,)g -(and)f(the)o(y)h(are)g(printed)f(after)h(the)g(main)g(te)o(xt)g(has)g -(been)g(con)m(v)o(erted)d(and)j(printed.)-2 3781 y Fp(2.4.1.)35 -b(Header)396 4021 y Fq(open)44 b(Pxp_types)396 4118 y(open)g -(Pxp_document)-2 4571 y Fp(2.4.2.)35 b(T)-7 b(ype)34 -b(dec)n(larations)396 4811 y Fq(class)44 b(type)g(footnote_printer)f(=) -p Black 3800 5278 a Fr(33)p Black eop -%%Page: 34 34 -34 33 bop Black 3136 67 a Fr(Chapter)20 b(2.)g(Using)g(PXP)p -Black 486 579 a Fq(object)576 676 y(method)43 b(footnote_to_html)g(:)h -(store_type)f(-)p Fo(>)i Fq(out_channel)e(-)p Fo(>)h -Fq(unit)486 773 y(end)396 967 y(and)h(store_type)e(=)486 -1065 y(object)576 1162 y(method)g(alloc_footnote)g(:)i -(footnote_printer)d(-)p Fo(>)i Fq(int)576 1259 y(method)f -(print_footnotes)g(:)h(out_channel)f(-)p Fo(>)i Fq(unit)486 -1356 y(end)396 1453 y(;;)-2 1906 y Fp(2.4.3.)35 b(Class)g -Fc(store)396 2073 y Fv(The)20 b Fq(store)g Fv(is)h(a)g(container)d(for) -i(footnotes.)f(Y)-9 b(ou)19 b(can)h(add)g(a)g(footnote)f(by)h(in)m(v)n -(oking)e Fq(alloc_footnote)p Fv(;)g(the)396 2181 y(ar)o(gument)g(is)j -(an)f(object)g(of)g(the)g(class)h Fq(footnote_printer)p -Fv(,)d(the)i(method)f(returns)g(the)i(number)d(of)i(the)g(footnote.)396 -2289 y(The)g(interesting)f(property)f(of)i(a)h(footnote)d(is)k(that)e -(it)h(can)f(be)g(con)m(v)o(erted)d(to)k(HTML,)e(so)i(a)g -Fq(footnote_printer)d Fv(is)396 2397 y(an)i(object)g(with)g(a)h(method) -e Fq(footnote_to_html)p Fv(.)f(The)i(class)h Fq(footnote)e -Fv(which)h(is)h(de\002ned)e(belo)n(w)h(has)g(a)396 2505 -y(compatible)f(method)g Fq(footnote_to_html)f Fv(such)i(that)g(objects) -g(created)f(from)h(it)h(can)f(be)g(used)g(as)396 2613 -y Fq(footnote_printer)p Fv(s.)396 2763 y(The)g(other)f(method,)g -Fq(print_footnotes)f Fv(prints)i(the)g(footnotes)f(as)i(de\002nition)e -(list,)i(and)f(is)h(typically)e(in)m(v)n(ok)o(ed)396 -2870 y(after)h(the)g(main)g(material)g(of)g(the)g(page)g(has)g(already) -f(been)h(printed.)e(Ev)o(ery)h(item)h(of)g(the)h(list)g(is)g(printed)e -(by)396 2978 y Fq(footnote_to_html)p Fv(.)396 3200 y -Fq(class)44 b(store)g(=)486 3297 y(object)g(\(self\))576 -3491 y(val)g(mutable)g(footnotes)f(=)i(\()f([])h(:)f(\(int)h(*)f -(footnote_printer\))e(list)i(\))576 3589 y(val)g(mutable)g -(next_footnote_number)d(=)k(1)576 3783 y(method)e(alloc_footnote)g(n)i -(=)665 3880 y(let)g(number)e(=)i(next_footnote_number)d(in)665 -3977 y(next_footnote_number)g Fo(<)p Fq(-)i(number+1;)665 -4074 y(footnotes)g Fo(<)p Fq(-)g(footnotes)f(@)i([)g(number,)e(n)i(];) -665 4171 y(number)576 4366 y(method)e(print_footnotes)g(ch)h(=)665 -4463 y(if)h(footnotes)e Fo(<>)h Fq([])h(then)f(begin)396 -4560 y(output_string)f(ch)h(")p Fo(<)p Fq(hr)g(align=left)g -(noshade=noshade)e(width=\\"30\045\\")p Fo(>)p Fq(\\n";)396 -4657 y(output_string)h(ch)h(")p Fo(<)p Fq(dl)p Fo(>)p -Fq(\\n";)396 4754 y(List.iter)486 4851 y(\(fun)g(\(_,n\))g(-)p -Fo(>)p Black 3800 5278 a Fr(34)p Black eop -%%Page: 35 35 -35 34 bop Black 3136 67 a Fr(Chapter)20 b(2.)g(Using)g(PXP)p -Black 620 579 a Fq(n)45 b(#)g(footnote_to_html)d(\(self)i(:)h -(#store_type)e(:)p Fo(>)h Fq(store_type\))f(ch\))486 -676 y(footnotes;)396 773 y(output_string)g(ch)h(")p Fo(<)p -Fq(/dl)p Fo(>)p Fq(\\n";)665 870 y(end)486 1065 y(end)396 -1162 y(;;)-2 1614 y Fp(2.4.4.)35 b(Function)f Fc(escape_html)396 -1782 y Fv(This)21 b(function)d(con)m(v)o(erts)h(the)h(characters)f -Fm(<)p Fv(,)h Fm(>)p Fv(,)g(&,)g(and)g(")h(to)f(their)g(HTML)g -(representation.)e(F)o(or)h(e)o(xample,)396 1890 y Fq(escape_html)43 -b(")p Fo(<>)p Fq(")h(=)h("<>")p Fv(.)19 b(Other)g(characters)h -(are)g(left)g(unchanged.)396 2070 y Fq(let)45 b(escape_html)e(s)h(=)486 -2167 y(Str.global_substitute)576 2264 y(\(Str.regexp)f(")p -Fo(<)p Fq(\\\\|)p Fo(>)p Fq(\\\\|&\\\\|\\""\))576 2362 -y(\(fun)h(s)g(-)p Fo(>)665 2459 y Fq(match)g(Str.matched_string)e(s)j -(with)755 2556 y(")p Fo(<)p Fq(")f(-)p Fo(>)h Fq("<")665 -2653 y(|)g(")p Fo(>)p Fq(")f(-)p Fo(>)h Fq(">")665 -2750 y(|)g("&")f(-)p Fo(>)h Fq("&")665 2847 y(|)g("\\"")f(-)p -Fo(>)g Fq(""")665 2944 y(|)h(_)g(-)p Fo(>)f Fq(assert)g(false\)) -576 3042 y(s)396 3139 y(;;)-2 3591 y Fp(2.4.5.)35 b(Vir)r(tual)f(c)n -(lass)h Fc(shared)396 3759 y Fv(This)21 b(virtual)e(class)i(is)g(the)g -(abstract)f(superclass)g(of)f(the)i(e)o(xtension)d(classes)k(sho)n(wn)d -(belo)n(w)-5 b(.)19 b(It)i(de\002nes)f(the)g(standard)396 -3867 y(methods)f Fq(clone)p Fv(,)h Fq(node)p Fv(,)g(and)g -Fq(set_node)p Fv(,)f(and)g(declares)h(the)g(type)g(of)g(the)g(virtual)g -(method)e Fq(to_html)p Fv(.)i(This)396 3975 y(method)f(recursi)n(v)o -(ely)f(tra)n(v)o(erses)i(the)g(whole)g(element)g(tree,)g(and)f(prints)h -(the)g(con)m(v)o(erted)e(HTML)i(code)f(to)i(the)f(output)396 -4083 y(channel)f(passed)h(as)h(second)f(ar)o(gument.)d(The)j(\002rst)h -(ar)o(gument)d(is)j(the)f(reference)f(to)h(the)g(global)f -Fq(store)h Fv(object)g(which)396 4191 y(collects)h(the)f(footnotes.)396 -4371 y Fq(class)44 b(virtual)g(shared)g(=)486 4468 y(object)g(\(self\)) -576 4662 y(\(*)g(--)h(default_ext)e(--)h(*\))576 4857 -y(val)g(mutable)g(node)g(=)g(\(None)g(:)h(shared)f(node)g(option\))p -Black 3800 5278 a Fr(35)p Black eop -%%Page: 36 36 -36 35 bop Black 3136 67 a Fr(Chapter)20 b(2.)g(Using)g(PXP)p -Black 576 676 a Fq(method)43 b(clone)h(=)h({)p Fo(<)f(>)p -Fq(})576 773 y(method)f(node)i(=)665 870 y(match)f(node)g(with)845 -967 y(None)g(-)p Fo(>)934 1065 y Fq(assert)g(false)755 -1162 y(|)h(Some)f(n)g(-)p Fo(>)h Fq(n)576 1259 y(method)e(set_node)h(n) -h(=)665 1356 y(node)f Fo(<)p Fq(-)h(Some)f(n)576 1550 -y(\(*)g(--)h(virtual)e(--)i(*\))576 1745 y(method)e(virtual)h(to_html)g -(:)g(store)g(-)p Fo(>)h Fq(out_channel)e(-)p Fo(>)h Fq(unit)486 -1939 y(end)396 2036 y(;;)-2 2489 y Fp(2.4.6.)35 b(Class)g -Fc(only_data)396 2656 y Fv(This)21 b(class)g(de\002nes)f -Fq(to_html)f Fv(such)h(that)h(the)f(character)f(data)h(of)g(the)g -(current)f(node)g(is)i(con)m(v)o(erted)d(to)i(HTML.)g(Note)396 -2764 y(that)h Fq(self)f Fv(is)h(an)f(e)o(xtension)f(object,)g -Fq(self)44 b(#)h(node)20 b Fv(is)h(the)f(node)f(object,)h(and)f -Fq(self)45 b(#)f(node)g(#)h(data)20 b Fv(returns)396 -2872 y(the)g(character)f(data)h(of)g(the)h(node.)396 -3052 y Fq(class)44 b(only_data)g(=)486 3149 y(object)g(\(self\))576 -3247 y(inherit)f(shared)576 3441 y(method)g(to_html)h(store)g(ch)h(=) -665 3538 y(output_string)e(ch)h(\(escape_html)f(\(self)h(#)h(node)f(#)h -(data\)\))486 3635 y(end)396 3732 y(;;)-2 4185 y Fp(2.4.7.)35 -b(Class)g Fc(readme)396 4353 y Fv(This)21 b(class)g(con)m(v)o(erts)d -(elements)i(of)g(type)g Fq(readme)g Fv(to)g(HTML.)g(Such)f(an)h -(element)g(is)h(\(by)f(de\002nition\))e(al)o(w)o(ays)j(the)396 -4461 y(root)f(element)f(of)h(the)g(document.)e(First,)j(the)f(HTML)g -(header)f(is)j(printed;)d(the)h Fq(title)g Fv(attrib)n(ute)f(of)h(the)h -(element)396 4568 y(determines)e(the)i(title)f(of)g(the)h(HTML)f(page.) -f(Some)h(aspects)g(of)g(the)g(HTML)g(page)g(can)g(be)g(con\002gured)e -(by)h(setting)396 4676 y(certain)h(parameter)f(entities,)h(for)g(e)o -(xample)e(the)i(background)d(color)m(,)i(the)h(te)o(xt)g(color)m(,)f -(and)h(link)g(colors.)f(After)h(the)396 4784 y(header)m(,)f(the)h -Fq(body)g Fv(tag,)g(and)g(the)g(headline)f(ha)n(v)o(e)g(been)h -(printed,)f(the)h(contents)f(of)h(the)g(page)g(are)g(con)m(v)o(erted)e -(by)p Black 3798 5278 a Fr(36)p Black eop -%%Page: 37 37 -37 36 bop Black 3136 67 a Fr(Chapter)20 b(2.)g(Using)g(PXP)p -Black 396 579 a Fv(in)m(v)n(oking)e Fq(to_html)i Fv(on)g(all)g -(children)f(of)h(the)g(current)f(node)g(\(which)h(is)h(the)f(root)f -(node\).)g(Then,)g(the)h(footnotes)f(are)396 687 y(appended)f(to)j -(this)f(by)g(telling)g(the)g(global)f Fq(store)h Fv(object)g(to)g -(print)g(the)g(footnotes.)f(Finally)-5 b(,)19 b(the)h(end)g(tags)g(of)g -(the)396 795 y(HTML)g(pages)g(are)g(printed.)396 944 -y(This)h(class)g(is)g(an)f(e)o(xample)f(ho)n(w)g(to)i(access)g(the)f(v) -n(alue)f(of)h(an)g(attrib)n(ute:)g(The)g(v)n(alue)g(is)h(determined)d -(by)i(in)m(v)n(oking)396 1052 y Fq(self)44 b(#)h(node)f(#)h(attribute)e -("title")p Fv(.)20 b(As)h(this)f(attrib)n(ute)g(has)g(been)g(declared)f -(as)i(CD)m(A)-9 b(T)h(A)20 b(and)g(as)h(being)396 1160 -y(required,)d(the)j(v)n(alue)e(has)i(al)o(w)o(ays)f(the)g(form)g -Fq(Value)44 b(s)20 b Fv(where)g Fq(s)g Fv(is)h(the)g(string)e(v)n(alue) -h(of)g(the)g(attrib)n(ute.)396 1310 y(Y)-9 b(ou)20 b(can)g(also)g(see)h -(ho)n(w)f(entity)g(contents)f(can)h(be)g(accessed.)g(A)h(parameter)e -(entity)g(object)h(can)g(be)g(look)o(ed)f(up)h(by)396 -1417 y Fq(self)44 b(#)h(node)f(#)h(dtd)f(#)h(par_entity)e("name")p -Fv(,)20 b(and)f(by)h(in)m(v)n(oking)e Fq(replacement_text)g -Fv(the)i(v)n(alue)g(of)396 1525 y(the)g(entity)g(is)h(returned)e(after) -h(inner)f(parameter)g(and)g(character)g(entities)i(ha)n(v)o(e)f(been)f -(processed.)g(Note)h(that)g(you)396 1633 y(must)g(use)h -Fq(gen_entity)e Fv(instead)h(of)g Fq(par_entity)f Fv(to)h(access)h -(general)e(entities.)396 1855 y Fq(class)44 b(readme)g(=)486 -1952 y(object)g(\(self\))576 2049 y(inherit)f(shared)576 -2244 y(method)g(to_html)h(store)g(ch)h(=)665 2341 y(\(*)g(output)f -(header)f(*\))665 2438 y(output_string)396 2535 y(ch)i(")p -Fo(<)p Fq(!DOCTYPE)e(HTML)h(PUBLIC)g(\\"-//W3C//DTD)e(HTML)j(3.2)f -(Final//EN\\")p Fo(>)p Fq(";)665 2632 y(output_string)396 -2729 y(ch)h(")p Fo(<)p Fq(!-)f(WARNING!)f(This)h(is)h(a)g(generated)e -(file,)h(do)g(not)h(edit!)f(-)p Fo(>)p Fq(\\n";)665 2826 -y(let)h(title)f(=)396 2923 y(match)g(self)g(#)h(node)f(#)h(attribute)e -("title")h(with)576 3021 y(Value)g(s)g(-)p Fo(>)h Fq(s)486 -3118 y(|)g(_)f(-)p Fo(>)h Fq(assert)e(false)665 3215 -y(in)665 3312 y(let)i(html_header,)d(_)j(=)396 3409 y(try)g(\(self)f(#) -g(node)g(#)h(dtd)f(#)h(par_entity)e("readme:html:header"\))934 -3506 y(#)i(replacement_text)396 3603 y(with)f(WF_error)g(_)h(-)p -Fo(>)f Fq("",)g(false)g(in)665 3701 y(let)h(html_trailer,)d(_)j(=)396 -3798 y(try)g(\(self)f(#)g(node)g(#)h(dtd)f(#)h(par_entity)e -("readme:html:trailer"\))934 3895 y(#)i(replacement_text)396 -3992 y(with)f(WF_error)g(_)h(-)p Fo(>)f Fq("",)g(false)g(in)665 -4089 y(let)h(html_bgcolor,)d(_)j(=)396 4186 y(try)g(\(self)f(#)g(node)g -(#)h(dtd)f(#)h(par_entity)e("readme:html:bgcolor"\))934 -4283 y(#)i(replacement_text)396 4380 y(with)f(WF_error)g(_)h(-)p -Fo(>)f Fq("white",)f(false)h(in)665 4478 y(let)h(html_textcolor,)d(_)j -(=)396 4575 y(try)g(\(self)f(#)g(node)g(#)h(dtd)f(#)h(par_entity)e -("readme:html:textcolor"\))934 4672 y(#)i(replacement_text)396 -4769 y(with)f(WF_error)g(_)h(-)p Fo(>)f Fq("",)g(false)g(in)665 -4866 y(let)h(html_alinkcolor,)d(_)i(=)p Black 3797 5278 -a Fr(37)p Black eop -%%Page: 38 38 -38 37 bop Black 3136 67 a Fr(Chapter)20 b(2.)g(Using)g(PXP)p -Black 396 579 a Fq(try)45 b(\(self)f(#)g(node)g(#)h(dtd)f(#)h -(par_entity)e("readme:html:alinkcolor"\))934 676 y(#)i -(replacement_text)396 773 y(with)f(WF_error)g(_)h(-)p -Fo(>)f Fq("",)g(false)g(in)665 870 y(let)h(html_vlinkcolor,)d(_)i(=)396 -967 y(try)h(\(self)f(#)g(node)g(#)h(dtd)f(#)h(par_entity)e -("readme:html:vlinkcolor"\))934 1065 y(#)i(replacement_text)396 -1162 y(with)f(WF_error)g(_)h(-)p Fo(>)f Fq("",)g(false)g(in)665 -1259 y(let)h(html_linkcolor,)d(_)j(=)396 1356 y(try)g(\(self)f(#)g -(node)g(#)h(dtd)f(#)h(par_entity)e("readme:html:linkcolor"\))934 -1453 y(#)i(replacement_text)396 1550 y(with)f(WF_error)g(_)h(-)p -Fo(>)f Fq("",)g(false)g(in)665 1647 y(let)h(html_background,)d(_)i(=) -396 1745 y(try)h(\(self)f(#)g(node)g(#)h(dtd)f(#)h(par_entity)e -("readme:html:background"\))934 1842 y(#)i(replacement_text)396 -1939 y(with)f(WF_error)g(_)h(-)p Fo(>)f Fq("",)g(false)g(in)665 -2133 y(output_string)f(ch)h(")p Fo(<)p Fq(html)p Fo(><)p -Fq(header)p Fo(><)p Fq(title)p Fo(>)p Fq(\\n";)665 2230 -y(output_string)f(ch)h(\(escape_html)f(title\);)665 2327 -y(output_string)g(ch)h(")p Fo(<)p Fq(/title)p Fo(><)p -Fq(/header)p Fo(>)p Fq(\\n";)665 2424 y(output_string)f(ch)h(")p -Fo(<)p Fq(body)g(";)665 2522 y(List.iter)396 2619 y(\(fun)g -(\(name,value\))f(-)p Fo(>)531 2716 y Fq(if)h(value)g -Fo(<>)h Fq("")f(then)620 2813 y(output_string)f(ch)i(\(name)f(^)g -("=\\"")g(^)h(escape_html)e(value)h(^)h("\\")f("\)\))396 -2910 y([)h("bgcolor",)178 b(html_bgcolor;)486 3007 y("text",)313 -b(html_textcolor;)486 3104 y("link",)g(html_linkcolor;)486 -3202 y("alink",)268 b(html_alinkcolor;)486 3299 y("vlink",)g -(html_vlinkcolor;)396 3396 y(];)665 3493 y(output_string)43 -b(ch)h(")p Fo(>)p Fq(\\n";)665 3590 y(output_string)f(ch)h -(html_header;)665 3687 y(output_string)f(ch)h(")p Fo(<)p -Fq(h1)p Fo(>)p Fq(";)665 3784 y(output_string)f(ch)h(\(escape_html)f -(title\);)665 3882 y(output_string)g(ch)h(")p Fo(<)p -Fq(/h1)p Fo(>)p Fq(\\n";)665 3979 y(\(*)h(process)e(main)i(content:)e -(*\))665 4076 y(List.iter)396 4173 y(\(fun)h(n)h(-)p -Fo(>)f Fq(n)h(#)g(extension)e(#)i(to_html)e(store)h(ch\))396 -4270 y(\(self)g(#)h(node)f(#)h(sub_nodes\);)665 4367 -y(\(*)g(now)f(process)g(footnotes)f(*\))665 4464 y(store)h(#)h -(print_footnotes)d(ch;)665 4561 y(\(*)j(trailer)e(*\))665 -4659 y(output_string)g(ch)h(html_trailer;)665 4756 y(output_string)f -(ch)h(")p Fo(<)p Fq(/html)p Fo(>)p Fq(\\n";)p Black 3800 -5278 a Fr(38)p Black eop -%%Page: 39 39 -39 38 bop Black 3136 67 a Fr(Chapter)20 b(2.)g(Using)g(PXP)p -Black 486 579 a Fq(end)396 676 y(;;)-2 1129 y Fp(2.4.8.)35 -b(Classes)h Fc(section)p Fp(,)31 b Fc(sect1)p Fp(,)g -Fc(sect2)p Fp(,)g(and)j Fc(sect3)396 1296 y Fv(As)21 -b(the)f(con)m(v)o(ersion)e(process)i(is)h(v)o(ery)e(similar)m(,)h(the)g -(con)m(v)o(ersion)d(classes)22 b(of)e(the)g(three)g(section)f(le)n(v)o -(els)i(are)f(deri)n(v)o(ed)396 1404 y(from)f(the)i(more)e(general)g -Fq(section)h Fv(class.)h(The)e(HTML)h(code)g(of)g(the)g(section)g(le)n -(v)o(els)g(only)f(dif)n(fers)h(in)g(the)g(type)g(of)396 -1512 y(the)g(headline,)f(and)h(because)f(of)h(this)h(the)f(classes)i -(describing)c(the)i(section)g(le)n(v)o(els)g(can)g(be)h(computed)d(by)i -(replacing)396 1620 y(the)g(class)i(ar)o(gument)17 b -Fq(the_tag)j Fv(of)g Fq(section)g Fv(by)f(the)i(HTML)e(name)h(of)g(the) -g(headline)f(tag.)396 1770 y(Section)h(elements)g(are)g(con)m(v)o -(erted)e(to)i(HTML)g(by)g(printing)e(a)j(headline)e(and)h(then)f(con)m -(v)o(erting)f(the)i(contents)f(of)h(the)396 1878 y(element)g(recursi)n -(v)o(ely)-5 b(.)18 b(More)h(precisely)-5 b(,)19 b(the)h(\002rst)h -(sub-element)e(is)i(al)o(w)o(ays)f(a)h Fq(title)f Fv(element,)f(and)h -(the)g(other)396 1985 y(elements)g(are)g(the)g(contents)g(of)g(the)g -(section.)g(This)g(structure)f(is)j(declared)c(in)j(the)f(DTD,)g(and)g -(it)h(is)g(guaranteed)d(that)396 2093 y(the)i(document)f(matches)g(the) -i(DTD.)f(Because)g(of)g(this)h(the)f(title)h(node)e(can)h(be)g -(separated)f(from)g(the)h(rest)h(without)f(an)o(y)396 -2201 y(checks.)396 2351 y(Both)g(the)h(title)g(node,)e(and)g(the)h -(body)f(nodes)h(are)g(then)f(con)m(v)o(erted)f(to)i(HTML)g(by)g -(calling)g Fq(to_html)f Fv(on)h(them.)396 2572 y Fq(class)44 -b(section)g(the_tag)g(=)486 2670 y(object)g(\(self\))576 -2767 y(inherit)f(shared)576 2961 y(val)h(tag)g(=)h(the_tag)576 -3155 y(method)e(to_html)h(store)g(ch)h(=)665 3252 y(let)g(sub_nodes)e -(=)i(self)f(#)g(node)h(#)f(sub_nodes)g(in)665 3350 y(match)g(sub_nodes) -g(with)486 3447 y(title_node)f(::)i(rest)f(-)p Fo(>)576 -3544 y Fq(output_string)e(ch)j(\(")p Fo(<)p Fq(")f(^)g(tag)h(^)f(")p -Fo(>)p Fq(\\n"\);)576 3641 y(title_node)f(#)h(extension)g(#)g(to_html)g -(store)g(ch;)576 3738 y(output_string)e(ch)j(\("\\n)p -Fo(<)p Fq(/")e(^)i(tag)f(^)h(")p Fo(>)p Fq("\);)576 3835 -y(List.iter)665 3932 y(\(fun)f(n)h(-)p Fo(>)f Fq(n)h(#)g(extension)e(#) -i(to_html)e(store)h(ch\))665 4029 y(rest)396 4127 y(|)h(_)g(-)p -Fo(>)576 4224 y Fq(assert)e(false)486 4321 y(end)396 -4418 y(;;)396 4612 y(class)h(sect1)g(=)h(section)f("h1";;)396 -4709 y(class)g(sect2)g(=)h(section)f("h3";;)396 4807 -y(class)g(sect3)g(=)h(section)f("h4";;)p Black 3800 5278 -a Fr(39)p Black eop -%%Page: 40 40 -40 39 bop Black 3136 67 a Fr(Chapter)20 b(2.)g(Using)g(PXP)p -Black -2 583 a Fp(2.4.9.)35 b(Classes)h Fc(map_tag)p -Fp(,)31 b Fc(p)p Fp(,)i Fc(em)p Fp(,)f Fc(ul)p Fp(,)h -Fc(li)396 751 y Fv(Se)n(v)o(eral)20 b(element)f(types)h(are)g(con)m(v)o -(erted)e(to)i(HTML)g(by)g(simply)g(mapping)e(them)i(to)g(corresponding) -d(HTML)396 859 y(element)j(types.)g(The)f(class)j Fq(map_tag)d -Fv(implements)g(this,)i(and)f(the)g(class)h(ar)o(gument)d -Fq(the_target_tag)396 967 y Fv(determines)h(the)i(tag)f(name)f(to)i -(map)e(to.)h(The)g(output)f(consists)i(of)f(the)g(start)h(tag,)f(the)g -(recursi)n(v)o(ely)e(con)m(v)o(erted)g(inner)396 1075 -y(elements,)i(and)g(the)g(end)f(tag.)396 1255 y Fq(class)44 -b(map_tag)g(the_target_tag)e(=)486 1352 y(object)i(\(self\))576 -1449 y(inherit)f(shared)576 1643 y(val)h(target_tag)f(=)i -(the_target_tag)576 1838 y(method)e(to_html)h(store)g(ch)h(=)665 -1935 y(output_string)e(ch)h(\(")p Fo(<)p Fq(")g(^)h(target_tag)e(^)i(") -p Fo(>)p Fq(\\n"\);)665 2032 y(List.iter)396 2129 y(\(fun)f(n)h(-)p -Fo(>)f Fq(n)h(#)g(extension)e(#)i(to_html)e(store)h(ch\))396 -2226 y(\(self)g(#)h(node)f(#)h(sub_nodes\);)665 2323 -y(output_string)e(ch)h(\("\\n)p Fo(<)p Fq(/")g(^)h(target_tag)e(^)h(")p -Fo(>)p Fq("\);)486 2420 y(end)396 2518 y(;;)396 2712 -y(class)g(p)h(=)g(map_tag)e("p";;)396 2809 y(class)h(em)h(=)f(map_tag)g -("b";;)396 2906 y(class)g(ul)h(=)f(map_tag)g("ul";;)396 -3003 y(class)g(li)h(=)f(map_tag)g("li";;)-2 3456 y Fp(2.4.10.)36 -b(Class)f Fc(br)396 3624 y Fv(Element)20 b(of)g(type)f -Fq(br)i Fv(are)f(mapped)f(to)h(the)g(same)g(HTML)g(type.)g(Note)g(that) -g(HTML)g(forbids)f(the)h(end)g(tag)g(of)g Fq(br)p Fv(.)396 -3804 y Fq(class)44 b(br)h(=)486 3901 y(object)f(\(self\))576 -3998 y(inherit)f(shared)576 4192 y(method)g(to_html)h(store)g(ch)h(=) -665 4289 y(output_string)e(ch)h(")p Fo(<)p Fq(br)p Fo(>)p -Fq(\\n";)665 4387 y(List.iter)396 4484 y(\(fun)g(n)h(-)p -Fo(>)f Fq(n)h(#)g(extension)e(#)i(to_html)e(store)h(ch\))396 -4581 y(\(self)g(#)h(node)f(#)h(sub_nodes\);)486 4678 -y(end)396 4775 y(;;)p Black 3800 5278 a Fr(40)p Black -eop -%%Page: 41 41 -41 40 bop Black 3136 67 a Fr(Chapter)20 b(2.)g(Using)g(PXP)p -Black -2 583 a Fp(2.4.11.)36 b(Class)f Fc(code)396 751 -y Fv(The)20 b Fq(code)g Fv(type)g(is)h(con)m(v)o(erted)d(to)i(a)h -Fq(pre)f Fv(section)g(\(preformatted)d(te)o(xt\).)i(As)i(the)g(meaning) -d(of)i(tabs)h(is)g(unspeci\002ed)e(in)396 859 y(HTML,)h(tabs)g(are)h(e) -o(xpanded)c(to)k(spaces.)396 1039 y Fq(class)44 b(code)g(=)486 -1136 y(object)g(\(self\))576 1233 y(inherit)f(shared)576 -1427 y(method)g(to_html)h(store)g(ch)h(=)665 1525 y(let)g(data)f(=)g -(self)h(#)f(node)g(#)h(data)f(in)665 1622 y(\(*)h(convert)e(tabs)i(*\)) -665 1719 y(let)g(l)f(=)h(String.length)e(data)h(in)665 -1816 y(let)h(rec)f(preprocess)f(i)i(column)f(=)396 1913 -y(\(*)h(this)f(is)g(very)h(ineffective)e(but)h(comprehensive:)e(*\))396 -2010 y(if)j(i)f Fo(<)h Fq(l)g(then)486 2107 y(match)f(data.[i])f(with) -665 2205 y('\\t')h(-)p Fo(>)396 2302 y Fq(let)h(n)f(=)h(8)g(-)f -(\(column)g(mod)g(8\))h(in)396 2399 y(String.make)e(n)i(')g(')f(^)h -(preprocess)e(\(i+1\))h(\(column)g(+)g(n\))576 2496 y(|)g('\\n')g(-)p -Fo(>)396 2593 y Fq("\\n")g(^)h(preprocess)e(\(i+1\))h(0)576 -2690 y(|)g(c)h(-)p Fo(>)396 2787 y Fq(String.make)e(1)i(c)g(^)f -(preprocess)f(\(i+1\))h(\(column)g(+)h(1\))396 2884 y(else)486 -2982 y("")665 3079 y(in)665 3176 y(output_string)e(ch)h(")p -Fo(<)p Fq(p)p Fo(><)p Fq(pre)p Fo(>)p Fq(";)665 3273 -y(output_string)f(ch)h(\(escape_html)f(\(preprocess)g(0)i(0\)\);)665 -3370 y(output_string)e(ch)h(")p Fo(<)p Fq(/pre)p Fo(><)p -Fq(/p)p Fo(>)p Fq(";)486 3564 y(end)396 3662 y(;;)-2 -4114 y Fp(2.4.12.)36 b(Class)f Fc(a)396 4282 y Fv(Hyperlinks,)19 -b(e)o(xpressed)g(by)g(the)i Fq(a)f Fv(element)g(type,)f(are)h(con)m(v)o -(erted)e(to)i(the)g(HTML)g Fq(a)h Fv(type.)e(If)i(the)f(tar)o(get)f(of) -h(the)396 4390 y(hyperlink)e(is)j(gi)n(v)o(en)d(by)i -Fq(href)p Fv(,)g(the)g(URL)g(of)g(this)g(attrib)n(ute)g(can)g(be)g -(used)g(directly)-5 b(.)18 b(Alternati)n(v)o(ely)-5 b(,)18 -b(the)i(tar)o(get)f(can)h(be)396 4498 y(gi)n(v)o(en)f(by)h -Fq(readmeref)f Fv(in)i(which)e(case)i(the)f(".html")g(suf)n(\002x)f -(must)i(be)f(added)f(to)h(the)g(\002le)h(name.)396 4647 -y(Note)f(that)h(within)f Fq(a)g Fv(only)g(#PCD)m(A)-9 -b(T)h(A)20 b(is)h(allo)n(wed,)e(so)i(the)f(contents)f(can)h(be)g(con)m -(v)o(erted)e(directly)h(by)h(applying)396 4755 y Fq(escape_html)f -Fv(to)i(the)f(character)f(data)h(contents.)p Black 3800 -5278 a Fr(41)p Black eop -%%Page: 42 42 -42 41 bop Black 3136 67 a Fr(Chapter)20 b(2.)g(Using)g(PXP)p -Black 396 579 a Fq(class)44 b(a)h(=)486 676 y(object)f(\(self\))576 -773 y(inherit)f(shared)576 967 y(method)g(to_html)h(store)g(ch)h(=)665 -1065 y(output_string)e(ch)h(")p Fo(<)p Fq(a)h(";)665 -1162 y(let)g(href)f(=)396 1259 y(match)g(self)g(#)h(node)f(#)h -(attribute)e("href")h(with)576 1356 y(Value)g(v)g(-)p -Fo(>)h Fq(escape_html)e(v)486 1453 y(|)i(Valuelist)e(_)i(-)p -Fo(>)f Fq(assert)g(false)486 1550 y(|)h(Implied_value)d(-)p -Fo(>)665 1647 y Fq(begin)i(match)g(self)g(#)h(node)f(#)h(attribute)e -("readmeref")g(with)486 1745 y(Value)h(v)h(-)p Fo(>)f -Fq(escape_html)f(v)i(^)f(".html")396 1842 y(|)h(Valuelist)e(_)i(-)p -Fo(>)f Fq(assert)g(false)396 1939 y(|)h(Implied_value)e(-)p -Fo(>)576 2036 y Fq("")665 2133 y(end)665 2230 y(in)665 -2327 y(if)i(href)f Fo(<>)g Fq("")h(then)396 2424 y(output_string)e(ch)h -(\("href=\\"")88 b(^)45 b(href)f(^)h("\\""\);)665 2522 -y(output_string)e(ch)h(")p Fo(>)p Fq(";)665 2619 y(output_string)f(ch)h -(\(escape_html)f(\(self)h(#)h(node)f(#)h(data\)\);)665 -2716 y(output_string)e(ch)h(")p Fo(<)p Fq(/a)p Fo(>)p -Fq(";)486 2910 y(end)396 3007 y(;;)-2 3460 y Fp(2.4.13.)36 -b(Class)f Fc(footnote)396 3628 y Fv(The)20 b Fq(footnote)g -Fv(class)h(has)f(tw)o(o)h(methods:)e Fq(to_html)g Fv(to)i(con)m(v)o -(ert)d(the)i(footnote)f(reference)f(to)i(HTML,)g(and)396 -3736 y Fq(footnote_to_html)e Fv(to)j(con)m(v)o(ert)d(the)i(footnote)f -(te)o(xt)h(itself.)396 3885 y(The)g(footnote)f(reference)f(is)j(con)m -(v)o(erted)d(to)i(a)h(local)f(hyperlink;)e(more)h(precisely)-5 -b(,)19 b(to)h(tw)o(o)h(anchor)d(tags)j(which)e(are)396 -3993 y(connected)g(with)h(each)g(other)-5 b(.)19 b(The)h(te)o(xt)g -(anchor)f(points)h(to)g(the)g(footnote)f(anchor)m(,)f(and)h(the)i -(footnote)d(anchor)h(points)396 4101 y(to)i(the)f(te)o(xt)g(anchor)-5 -b(.)396 4250 y(The)20 b(footnote)f(must)h(be)g(allocated)f(in)i(the)f -Fq(store)g Fv(object.)f(By)i(allocating)e(the)h(footnote,)f(you)g(get)h -(the)g(number)f(of)396 4358 y(the)h(footnote,)f(and)g(the)i(te)o(xt)f -(of)f(the)i(footnote)d(is)j(stored)f(until)g(the)g(end)g(of)g(the)g -(HTML)g(page)f(is)j(reached)c(when)i(the)396 4466 y(footnotes)f(can)h -(be)g(printed.)f(The)h Fq(to_html)f Fv(method)g(stores)i(simply)e(the)i -(object)e(itself,)i(such)f(that)g(the)396 4574 y Fq(footnote_to_html)e -Fv(method)h(is)i(in)m(v)n(ok)o(ed)e(on)g(the)i(same)f(object)g(that)g -(encountered)d(the)k(footnote.)p Black 3800 5278 a Fr(42)p -Black eop -%%Page: 43 43 -43 42 bop Black 3136 67 a Fr(Chapter)20 b(2.)g(Using)g(PXP)p -Black 396 579 a Fv(The)g Fq(to_html)g Fv(only)f(allocates)h(the)h -(footnote,)d(and)h(prints)h(the)g(reference)f(anchor)m(,)f(b)n(ut)i(it) -h(does)f(not)g(print)g(nor)396 687 y(con)m(v)o(ert)e(the)j(contents)e -(of)h(the)g(note.)g(This)g(is)h(deferred)d(until)j(the)f(footnotes)e -(actually)i(get)g(printed,)f(i.e.)h(the)g(recursi)n(v)o(e)396 -795 y(call)h(of)f Fq(to_html)f Fv(on)h(the)g(sub)g(nodes)g(is)h(done)e -(by)h Fq(footnote_to_html)p Fv(.)396 944 y(Note)g(that)h(this)f -(technique)f(does)h(not)g(w)o(ork)f(if)i(you)e(mak)o(e)h(another)f -(footnote)f(within)i(a)h(footnote;)d(the)i(second)396 -1052 y(footnote)f(gets)h(allocated)g(b)n(ut)g(not)g(printed.)396 -1274 y Fq(class)44 b(footnote)g(=)486 1371 y(object)g(\(self\))576 -1468 y(inherit)f(shared)576 1662 y(val)h(mutable)g(footnote_number)e(=) -j(0)576 1857 y(method)e(to_html)h(store)g(ch)h(=)665 -1954 y(let)g(number)e(=)396 2051 y(store)h(#)h(alloc_footnote)d(\(self) -i(:)h(#shared)f(:)p Fo(>)g Fq(footnote_printer\))e(in)665 -2148 y(let)j(foot_anchor)e(=)396 2245 y("footnote")g(^)i(string_of_int) -e(number)h(in)665 2342 y(let)h(text_anchor)e(=)396 2439 -y("textnote")g(^)i(string_of_int)e(number)h(in)665 2537 -y(footnote_number)f Fo(<)p Fq(-)h(number;)665 2634 y(output_string)f -(ch)h(\()h(")p Fo(<)p Fq(a)f(name=\\"")g(^)g(text_anchor)f(^)i("\\")f -(href=\\"#")g(^)441 2731 y(foot_anchor)f(^)i("\\")p Fo(>)p -Fq([")e(^)i(string_of_int)e(number)h(^)441 2828 y("])p -Fo(<)p Fq(/a)p Fo(>)p Fq(")g(\))576 3022 y(method)f(footnote_to_html)g -(store)h(ch)g(=)665 3119 y(\(*)h(prerequisite:)d(we)j(are)f(in)h(a)f -(definition)g(list)g Fo(<)p Fq(dl)p Fo(>)p Fq(...)p Fo(<)p -Fq(/dl)p Fo(>)e Fq(*\))665 3217 y(let)j(foot_anchor)e(=)396 -3314 y("footnote")g(^)i(string_of_int)e(footnote_number)f(in)665 -3411 y(let)j(text_anchor)e(=)396 3508 y("textnote")g(^)i(string_of_int) -e(footnote_number)f(in)665 3605 y(output_string)h(ch)h(\(")p -Fo(<)p Fq(dt)p Fo(><)p Fq(a)g(name=\\"")f(^)i(foot_anchor)e(^)h("\\")h -(href=\\"#")e(^)396 3702 y(text_anchor)g(^)i("\\")p Fo(>)p -Fq([")f(^)g(string_of_int)f(footnote_number)f(^)396 3799 -y("])p Fo(<)p Fq(/a)p Fo(><)p Fq(/dt)p Fo(>)p Fq(\\n)p -Fo(<)p Fq(dd)p Fo(>)p Fq("\);)665 3896 y(List.iter)396 -3994 y(\(fun)i(n)h(-)p Fo(>)f Fq(n)h(#)g(extension)e(#)i(to_html)e -(store)h(ch\))396 4091 y(\(self)g(#)h(node)f(#)h(sub_nodes\);)665 -4188 y(output_string)e(ch)h(\("\\n)p Fo(<)p Fq(/dd)p -Fo(>)p Fq("\))486 4382 y(end)396 4479 y(;;)p Black 3800 -5278 a Fr(43)p Black eop -%%Page: 44 44 -44 43 bop Black 3136 67 a Fr(Chapter)20 b(2.)g(Using)g(PXP)p -Black -2 583 a Fp(2.4.14.)36 b(The)d(speci\002cation)j(of)e(the)f -(document)i(model)396 751 y Fv(This)21 b(code)e(sets)i(up)f(the)g(hash) -g(table)g(that)h(connects)e(element)h(types)g(with)g(the)g(e)o(x)o -(emplars)f(of)h(the)g(e)o(xtension)f(classes)396 859 -y(that)i(con)m(v)o(ert)d(the)i(elements)g(to)g(HTML.)396 -1039 y Fq(open)44 b(Pxp_yacc)396 1233 y(let)h(tag_map)e(=)486 -1330 y(make_spec_from_alist)576 1427 y(~data_exemplar:\(new)e -(data_impl)j(\(new)g(only_data\)\))576 1525 y -(~default_element_exemplar:\(new)39 b(element_impl)k(\(new)h -(no_markup\)\))576 1622 y(~element_alist:)665 1719 y([)h("readme",)e -(\(new)h(element_impl)f(\(new)h(readme\)\);)396 1816 -y("sect1",)89 b(\(new)44 b(element_impl)f(\(new)h(sect1\)\);)396 -1913 y("sect2",)89 b(\(new)44 b(element_impl)f(\(new)h(sect2\)\);)396 -2010 y("sect3",)89 b(\(new)44 b(element_impl)f(\(new)h(sect3\)\);)396 -2107 y("title",)89 b(\(new)44 b(element_impl)f(\(new)h(no_markup\)\);) -396 2205 y("p",)269 b(\(new)44 b(element_impl)f(\(new)h(p\)\);)396 -2302 y("br",)224 b(\(new)44 b(element_impl)f(\(new)h(br\)\);)396 -2399 y("code",)134 b(\(new)44 b(element_impl)f(\(new)h(code\)\);)396 -2496 y("em",)224 b(\(new)44 b(element_impl)f(\(new)h(em\)\);)396 -2593 y("ul",)224 b(\(new)44 b(element_impl)f(\(new)h(ul\)\);)396 -2690 y("li",)224 b(\(new)44 b(element_impl)f(\(new)h(li\)\);)396 -2787 y("footnote",)f(\(new)h(element_impl)f(\(new)h(footnote)g(:)h -(#shared)e(:)p Fo(>)i Fq(shared\)\);)396 2884 y("a",)269 -b(\(new)44 b(element_impl)f(\(new)h(a\)\);)665 2982 y(])576 -3079 y(\(\))396 3176 y(;;)-2 3678 y Fx(Notes)p Black -396 3857 a Fv(1.)p Black 70 w(Elements)20 b(may)g(also)g(contain)f -(processing)g(instructions.)g(Unlik)o(e)h(other)f(document)g(models,)g -(PXP)i(separates)529 3965 y(processing)e(instructions)g(from)g(the)i -(rest)f(of)g(the)g(te)o(xt)g(and)g(pro)o(vides)e(a)j(second)e(interf)o -(ace)h(to)g(access)h(them)529 4073 y(\(method)e Fq(pinstr)p -Fv(\).)g(Ho)n(we)n(v)o(er)m(,)f(there)h(is)j(a)e(parser)g(option)f(\()p -Fq(enable_pinstr_nodes)p Fv(\))e(which)i(changes)g(the)529 -4181 y(beha)n(viour)f(of)i(the)g(parser)g(such)g(that)g(e)o(xtra)g -(nodes)f(for)h(processing)e(instructions)i(are)g(included)e(into)i(the) -h(tree.)529 4320 y Fi(Furthermore,)e(the)g(tree)g(does)g(normally)h -(not)f(contain)h(nodes)g(for)e(XML)h(comments;)h(the)o(y)f(are)g -(ignored)h(by)f(def)o(ault.)g(Again,)529 4417 y(there)g(is)g(an)g -(option)h(\()p Fh(enable_comment_nodes)p Fi(\))25 b(changing)c(this.)p -Black 396 4566 a Fv(2.)p Black 70 w(Due)f(to)h(the)f(typing)f(system)h -(it)h(is)g(more)e(or)h(less)i(impossible)d(to)i(deri)n(v)o(e)d(recursi) -n(v)o(e)h(classes)i(in)g(O'Caml.)f(T)-7 b(o)20 b(get)529 -4674 y(around)e(this,)j(it)g(is)g(common)d(practice)i(to)g(put)g(the)g -(modi\002able)f(or)h(e)o(xtensible)f(part)h(of)g(recursi)n(v)o(e)f -(objects)h(into)529 4782 y(parallel)g(objects.)p Black -3800 5278 a Fr(44)p Black eop -%%Page: 45 45 -45 44 bop Black 3136 67 a Fr(Chapter)20 b(2.)g(Using)g(PXP)p -Black Black 396 579 a Fv(3.)p Black 70 w(The)g(problem)e(is)k(that)e -(the)g(subclass)h(is)g(usually)e(not)h(a)h(subtype)e(in)h(this)h(case)f -(because)g(O'Caml)g(has)h(a)529 687 y(contra)n(v)n(ariant)d(subtyping)g -(rule.)p Black 3800 5278 a Fr(45)p Black eop -%%Page: 46 46 -46 45 bop Black Black -2 621 a Fs(Chapter)48 b(3.)f(The)h(objects)g -(representing)g(the)-2 845 y(document)396 1093 y Fr(This)21 -b(description)e(might)h(be)g(out-of-date)o(.)e(See)i(the)g(module)f -(interface)h(\002les)g(for)h(updated)d(information.)-2 -1470 y Fx(3.1.)39 b(The)g Fb(document)44 b Fx(c)m(lass)396 -1722 y Fq(class)g([)h('ext)f(])h(document)e(:)486 1819 -y(Pxp_types.collect_warnings)d(->)486 1916 y(object)576 -2013 y(method)j(init_xml_version)g(:)h(string)g(->)h(unit)576 -2111 y(method)e(init_root)h(:)g('ext)h(node)f(->)g(unit)576 -2305 y(method)f(xml_version)g(:)i(string)576 2402 y(method)e -(xml_standalone)g(:)i(bool)576 2499 y(method)e(dtd)i(:)f(dtd)576 -2596 y(method)f(root)i(:)f('ext)g(node)576 2791 y(method)f(encoding)h -(:)h(Pxp_types.rep_encoding)576 2985 y(method)e(add_pinstr)h(:)g -(proc_instruction)e(->)j(unit)576 3082 y(method)e(pinstr)h(:)h(string)f -(->)g(proc_instruction)e(list)576 3179 y(method)h(pinstr_names)g(:)i -(string)f(list)576 3373 y(method)f(write)h(:)h(Pxp_types.output_stream) -c(->)k(Pxp_types.encoding)c(->)k(unit)486 3568 y(end)396 -3665 y(;;)396 3856 y Fv(The)20 b(methods)f(be)o(ginning)f(with)i -Fq(init_)g Fv(are)g(only)g(for)f(internal)h(use)g(of)g(the)g(parser)-5 -b(.)p Black 396 4088 a Ft(\225)p Black 60 w Fq(xml_version)p -Fv(:)19 b(returns)h(the)g(v)o(ersion)f(string)h(at)g(the)g(be)o -(ginning)e(of)i(the)g(document.)e(F)o(or)i(e)o(xample,)f("1.0")g(is)479 -4196 y(returned)g(if)h(the)g(document)f(be)o(gins)g(with)h -Fo(<)p Fq(?xml)44 b(version="1.0"?)p Fo(>)p Fv(.)p Black -396 4304 a Ft(\225)p Black 60 w Fq(xml_standalone)p Fv(:)19 -b(returns)g(the)h(boolean)f(v)n(alue)g(of)h Fq(standalone)f -Fv(declaration)g(in)h(the)h(XML)f(declaration.)e(If)479 -4412 y(the)i Fq(standalone)g Fv(attrib)n(ute)f(is)i(missing,)f -Fq(false)g Fv(is)h(returned.)p Black 396 4520 a Ft(\225)p -Black 60 w Fq(dtd)p Fv(:)g(returns)e(a)i(reference)d(to)i(the)h(global) -e(DTD)h(object.)p Black 396 4628 a Ft(\225)p Black 60 -w Fq(root)p Fv(:)g(returns)g(a)g(reference)f(to)h(the)g(root)g -(element.)p Black 396 4736 a Ft(\225)p Black 60 w Fq(encoding)p -Fv(:)g(returns)f(the)h(internal)g(encoding)e(of)i(the)g(document.)e -(This)i(means)g(that)g(all)h(strings)f(of)g(which)g(the)479 -4844 y(document)e(consists)j(are)f(encoded)f(in)h(this)h(character)e -(set.)p Black 3798 5278 a Fr(46)p Black eop -%%Page: 47 47 -47 46 bop Black 2225 67 a Fr(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr) -m(esenting)g(the)g(document)p Black Black 396 579 a Ft(\225)p -Black 60 w Fq(pinstr)p Fv(:)g(returns)f(the)i(processing)d -(instructions)i(outside)f(the)h(DTD)h(and)e(outside)h(the)g(root)g -(element.)f(The)479 687 y(ar)o(gument)f(passed)i(to)h(the)f(method)f -(names)g(a)i Fr(tar)m(g)o(et)q Fv(,)g(and)e(the)h(method)f(returns)g -(all)i(instructions)e(with)i(this)g(tar)o(get.)479 795 -y(The)f(tar)o(get)f(is)j(the)e(\002rst)h(w)o(ord)e(inside)h -Fo(<)p Fq(?)h Fv(and)e Fq(?)p Fo(>)p Fv(.)p Black 396 -903 a Ft(\225)p Black 60 w Fq(pinstr_names)p Fv(:)g(returns)g(the)i -(names)e(of)h(the)h(processing)d(instructions)p Black -396 1011 a Ft(\225)p Black 60 w Fq(add_pinstr)p Fv(:)h(adds)h(another)f -(processing)g(instruction.)f(This)j(method)e(is)i(used)f(by)f(the)h -(parser)g(itself)h(to)f(enter)g(the)479 1119 y(instructions)f(returned) -g(by)h Fq(pinstr)p Fv(,)f(b)n(ut)h(you)g(can)g(also)g(enter)g -(additional)f(instructions.)p Black 396 1226 a Ft(\225)p -Black 60 w Fq(write)p Fv(:)h(writes)h(the)f(document)e(to)j(the)f -(passed)g(stream)g(as)h(XML)f(te)o(xt)g(using)g(the)g(passed)g(\(e)o -(xternal\))e(encoding.)479 1334 y(The)i(generated)f(te)o(xt)h(is)h(al)o -(w)o(ays)f(v)n(alid)g(XML)g(and)g(can)g(be)g(parsed)g(by)f(PXP;)i(ho)n -(we)n(v)o(er)m(,)d(the)i(te)o(xt)g(is)h(badly)479 1442 -y(formatted)e(\(this)h(is)h(not)f(a)h(pretty)e(printer\).)-2 -1861 y Fx(3.2.)39 b(The)g(c)m(lass)g(type)g Fb(node)396 -2041 y Fv(From)20 b Fq(Pxp_document)p Fv(:)396 2221 y -Fq(type)44 b(node_type)g(=)486 2318 y(T_data)396 2415 -y(|)h(T_element)e(of)i(string)396 2512 y(|)g(T_super_root)396 -2609 y(|)g(T_pinstr)e(of)i(string)396 2706 y(|)g(T_comment)396 -2804 y Fn(and)g(some)f(other,)g(reserved)f(types)396 -2901 y Fq(;;)396 3095 y(class)h(type)g([)h('ext)f(])h(node)f(=)486 -3192 y(object)g(\('self\))576 3289 y(constraint)f('ext)h(=)h('ext)f -(node)g(#extension)576 3484 y(\(*)g Fn(General)g(observers)f -Fq(*\))576 3678 y(method)g(extension)h(:)g('ext)576 3775 -y(method)f(dtd)i(:)f(dtd)576 3872 y(method)f(parent)h(:)h('ext)f(node) -576 3969 y(method)f(root)i(:)f('ext)g(node)576 4066 y(method)f -(sub_nodes)h(:)g('ext)h(node)f(list)576 4164 y(method)f(iter_nodes)h(:) -g(\('ext)g(node)g(-)p Fo(>)h Fq(unit\))f(-)p Fo(>)g Fq(unit)576 -4261 y(method)f(iter_nodes_sibl)g(:)889 4358 y(\('ext)h(node)h(option)e -(-)p Fo(>)i Fq('ext)f(node)g(-)p Fo(>)g Fq('ext)h(node)f(option)g(-)p -Fo(>)g Fq(unit\))g(-)396 4455 y Fo(>)h Fq(unit)576 4552 -y(method)e(node_type)h(:)g(node_type)576 4649 y(method)f(encoding)h(:)h -(Pxp_types.rep_encoding)576 4746 y(method)e(data)i(:)f(string)576 -4843 y(method)f(position)h(:)h(\(string)e(*)i(int)f(*)h(int\))p -Black 3797 5278 a Fr(47)p Black eop -%%Page: 48 48 -48 47 bop Black 2225 67 a Fr(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr) -m(esenting)g(the)g(document)p Black 576 579 a Fq(method)43 -b(comment)h(:)h(string)f(option)576 676 y(method)f(pinstr)h(:)h(string) -f(-)p Fo(>)g Fq(proc_instruction)e(list)576 773 y(method)h -(pinstr_names)g(:)i(string)f(list)576 870 y(method)f(write)h(:)h -(Pxp_types.output_stream)c(->)k(Pxp_types.encoding)c(->)k(unit)576 -1065 y(\(*)f Fn(Attribute)f(observers)h Fq(*\))576 1259 -y(method)f(attribute)h(:)g(string)g(-)p Fo(>)h Fq(Pxp_types.att_value) -576 1356 y(method)e(required_string_attribute)e(:)k(string)f(-)p -Fo(>)g Fq(string)576 1453 y(method)f(optional_string_attribute)e(:)k -(string)f(-)p Fo(>)g Fq(string)g(option)576 1550 y(method)f -(required_list_attribute)e(:)k(string)f(-)p Fo(>)g Fq(string)g(list)576 -1647 y(method)f(optional_list_attribute)e(:)k(string)f(-)p -Fo(>)g Fq(string)g(list)576 1745 y(method)f(attribute_names)g(:)h -(string)g(list)576 1842 y(method)f(attribute_type)g(:)i(string)e(-)p -Fo(>)i Fq(Pxp_types.att_type)576 1939 y(method)e(attributes)h(:)g -(\(string)g(*)h(Pxp_types.att_value\))c(list)576 2036 -y(method)i(id_attribute_name)f(:)j(string)576 2133 y(method)e -(id_attribute_value)f(:)j(string)576 2230 y(method)e -(idref_attribute_names)f(:)i(string)576 2424 y(\(*)g -Fn(Modifying)f(methods)h Fq(*\))576 2619 y(method)f(add_node)h(:)h -(?force:bool)e(-)p Fo(>)h Fq('ext)g(node)g(-)p Fo(>)h -Fq(unit)576 2716 y(method)e(add_pinstr)h(:)g(proc_instruction)e(-)p -Fo(>)j Fq(unit)576 2813 y(method)e(delete)h(:)h(unit)576 -2910 y(method)e(set_nodes)h(:)g('ext)h(node)f(list)g(-)p -Fo(>)g Fq(unit)576 3007 y(method)f(quick_set_attributes)f(:)j(\(string) -e(*)i(Pxp_types.att_value\))c(list)j(-)p Fo(>)h Fq(unit)576 -3104 y(method)e(set_comment)g(:)i(string)f(option)g(-)p -Fo(>)g Fq(unit)576 3299 y(\(*)g Fn(Cloning)g(methods)f -Fq(*\))576 3493 y(method)g(orphaned_clone)g(:)i('self)576 -3590 y(method)e(orphaned_flat_clone)f(:)j('self)576 3687 -y(method)e(create_element)g(:)1024 3784 y(?position:\(string)f(*)j(int) -f(*)h(int\))f(-)p Fo(>)1024 3882 y Fq(dtd)g(-)p Fo(>)h -Fq(node_type)e(-)p Fo(>)h Fq(\(string)g(*)h(string\))e(list)h(-)p -Fo(>)1203 3979 y Fq('ext)g(node)576 4076 y(method)f(create_data)g(:)i -(dtd)f(-)p Fo(>)h Fq(string)f(-)p Fo(>)g Fq('ext)g(node)576 -4173 y(method)f(keep_always_whitespace_mode)e(:)j(unit)576 -4367 y(\(*)g Fn(Validating)f(methods)h Fq(*\))576 4561 -y(method)f(local_validate)g(:)i(?use_dfa:bool)d(->)j(unit)f(->)g(unit) -576 4756 y(\(*)g(...)g(Internal)g(methods)g(are)g(undocumented.)f(*\))p -Black 3800 5278 a Fr(48)p Black eop -%%Page: 49 49 -49 48 bop Black 2225 67 a Fr(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr) -m(esenting)g(the)g(document)p Black 486 579 a Fq(end)396 -676 y(;;)396 867 y Fv(In)g(the)g(module)f Fq(Pxp_types)g -Fv(you)h(can)g(\002nd)g(another)e(type)i(de\002nition)f(that)h(is)i -(important)c(in)j(this)f(conte)o(xt:)396 1047 y Fq(type)44 -b(Pxp_types.att_value)e(=)576 1144 y(Value)223 b(of)44 -b(string)486 1241 y(|)h(Valuelist)e(of)h(string)g(list)486 -1339 y(|)h(Implied_value)396 1436 y(;;)-2 1847 y Fp(3.2.1.)35 -b(The)f(structure)f(of)g(document)i(trees)396 2015 y -Fv(A)21 b(node)e(represents)g(either)h(an)g(element)g(or)g(a)g -(character)f(data)h(section.)g(There)g(are)g(tw)o(o)g(classes)h -(implementing)d(the)396 2122 y(tw)o(o)j(aspects)f(of)g(nodes:)g -Fq(element_impl)e Fv(and)i Fq(data_impl)p Fv(.)f(The)h(latter)g(class)h -(does)f(not)g(implement)f(all)i(methods)396 2230 y(because)f(some)g -(methods)f(do)h(not)g(mak)o(e)f(sense)i(for)e(data)h(nodes.)396 -2380 y(\(Note:)g(PXP)h(also)g(supports)e(a)h(mode)g(which)f(forces)h -(that)g(processing)f(instructions)g(and)h(comments)f(are)396 -2488 y(represented)g(as)i(nodes)e(of)h(the)g(document)e(tree.)i(Ho)n -(we)n(v)o(er)m(,)e(these)j(nodes)e(are)h(instances)g(of)g -Fq(element_impl)f Fv(with)396 2596 y(node)g(types)h Fq(T_pinstr)g -Fv(and)f Fq(T_comment)p Fv(,)g(respecti)n(v)o(ely)-5 -b(.)18 b(This)j(mode)e(must)h(be)g(e)o(xplicitly)g(con\002gured;)d(the) -k(basic)396 2704 y(representation)d(kno)n(ws)i(only)f(element)h(and)f -(data)h(nodes.\))396 2853 y(The)g(follo)n(wing)f(\002gure)g(\()p -Fr(A)h(tr)m(ee)h(with)g(element)f(nodes,)f(data)g(nodes,)h(and)f -(attrib)n(utes)p Fv(\))h(sho)n(ws)g(an)g(e)o(xample)f(ho)n(w)h(a)396 -2961 y(tree)g(is)i(constructed)c(from)h(element)h(and)f(data)i(nodes.)e -(The)h(circular)f(areas)h(represent)f(element)h(nodes)f(whereas)h(the) -396 3069 y(o)o(v)n(als)f(denote)f(data)i(nodes.)e(Only)h(elements)g -(may)g(ha)n(v)o(e)g(subnodes;)f(data)h(nodes)g(are)g(al)o(w)o(ays)h -(lea)n(v)o(es)f(of)h(the)f(tree.)g(The)396 3177 y(subnodes)g(of)h(an)g -(element)g(can)g(be)g(either)g(element)f(or)h(data)g(nodes;)g(in)g -(both)f(cases)i(the)g(O'Caml)f(objects)g(storing)f(the)396 -3285 y(nodes)h(ha)n(v)o(e)f(the)i(class)g(type)e Fq(node)p -Fv(.)396 3434 y(Attrib)n(utes)h(\(the)g(clouds)g(in)g(the)g(picture\))f -(are)h(not)g(directly)g(inte)o(grated)e(into)i(the)g(tree;)h(there)e -(is)i(al)o(w)o(ays)g(an)f(e)o(xtra)g(link)396 3542 y(to)h(the)f(attrib) -n(ute)g(list.)h(This)f(is)h(also)g(true)f(for)f(processing)g -(instructions)g(\(not)h(sho)n(wn)f(in)h(the)h(picture\).)d(This)j -(means)396 3650 y(that)g(there)e(are)h(separated)g(access)g(methods)g -(for)f(attrib)n(utes)h(and)g(processing)f(instructions.)p -Black 3800 5278 a Fr(49)p Black eop -%%Page: 50 50 -50 49 bop Black 2225 67 a Fr(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr) -m(esenting)g(the)g(document)p Black 396 579 a Fu(Figur)o(e)g(3-1.)f(A)i -(tr)o(ee)e(with)i(element)f(nodes,)h(data)e(nodes,)i(and)f(attrib)n -(utes)396 2578 y - currentpoint currentpoint translate 1 1 scale neg exch neg exch translate - 396 2578 a @beginspecial 0 @llx 0 @lly -329 @urx 218 @ury 3290 @rwi @setspecial -%%BeginDocument: pic/node_term.ps -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: src/pic/node_term.fig -%%Creator: fig2dev Version 3.2 Patchlevel 1 -%%CreationDate: Sun Aug 27 02:05:42 2000 -%%For: gerd@ice (Gerd Stolpmann) -%%Orientation: Portrait -%%BoundingBox: 0 0 329 218 -%%Pages: 0 -%%BeginSetup -%%EndSetup -%%Magnification: 0.8000 -%%EndComments -/$F2psDict 200 dict def -$F2psDict begin -$F2psDict /mtrx matrix put -/col-1 {0 setgray} bind def -/col0 {0.000 0.000 0.000 srgb} bind def -/col1 {0.000 0.000 1.000 srgb} bind def -/col2 {0.000 1.000 0.000 srgb} bind def -/col3 {0.000 1.000 1.000 srgb} bind def -/col4 {1.000 0.000 0.000 srgb} bind def -/col5 {1.000 0.000 1.000 srgb} bind def -/col6 {1.000 1.000 0.000 srgb} bind def -/col7 {1.000 1.000 1.000 srgb} bind def -/col8 {0.000 0.000 0.560 srgb} bind def -/col9 {0.000 0.000 0.690 srgb} bind def -/col10 {0.000 0.000 0.820 srgb} bind def -/col11 {0.530 0.810 1.000 srgb} bind def -/col12 {0.000 0.560 0.000 srgb} bind def -/col13 {0.000 0.690 0.000 srgb} bind def -/col14 {0.000 0.820 0.000 srgb} bind def -/col15 {0.000 0.560 0.560 srgb} bind def -/col16 {0.000 0.690 0.690 srgb} bind def -/col17 {0.000 0.820 0.820 srgb} bind def -/col18 {0.560 0.000 0.000 srgb} bind def -/col19 {0.690 0.000 0.000 srgb} bind def -/col20 {0.820 0.000 0.000 srgb} bind def -/col21 {0.560 0.000 0.560 srgb} bind def -/col22 {0.690 0.000 0.690 srgb} bind def -/col23 {0.820 0.000 0.820 srgb} bind def -/col24 {0.500 0.190 0.000 srgb} bind def -/col25 {0.630 0.250 0.000 srgb} bind def -/col26 {0.750 0.380 0.000 srgb} bind def -/col27 {1.000 0.500 0.500 srgb} bind def -/col28 {1.000 0.630 0.630 srgb} bind def -/col29 {1.000 0.750 0.750 srgb} bind def -/col30 {1.000 0.880 0.880 srgb} bind def -/col31 {1.000 0.840 0.000 srgb} bind def - -end -save --1.0 251.0 translate -1 -1 scale - -/cp {closepath} bind def -/ef {eofill} bind def -/gr {grestore} bind def -/gs {gsave} bind def -/sa {save} bind def -/rs {restore} bind def -/l {lineto} bind def -/m {moveto} bind def -/rm {rmoveto} bind def -/n {newpath} bind def -/s {stroke} bind def -/sh {show} bind def -/slc {setlinecap} bind def -/slj {setlinejoin} bind def -/slw {setlinewidth} bind def -/srgb {setrgbcolor} bind def -/rot {rotate} bind def -/sc {scale} bind def -/sd {setdash} bind def -/ff {findfont} bind def -/sf {setfont} bind def -/scf {scalefont} bind def -/sw {stringwidth} bind def -/tr {translate} bind def -/tnt {dup dup currentrgbcolor - 4 -2 roll dup 1 exch sub 3 -1 roll mul add - 4 -2 roll dup 1 exch sub 3 -1 roll mul add - 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} - bind def -/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul - 4 -2 roll mul srgb} bind def -/reencdict 12 dict def /ReEncode { reencdict begin -/newcodesandnames exch def /newfontname exch def /basefontname exch def -/basefontdict basefontname findfont def /newfont basefontdict maxlength dict def -basefontdict { exch dup /FID ne { dup /Encoding eq -{ exch dup length array copy newfont 3 1 roll put } -{ exch newfont 3 1 roll put } ifelse } { pop pop } ifelse } forall -newfont /FontName newfontname put newcodesandnames aload pop -128 1 255 { newfont /Encoding get exch /.notdef put } for -newcodesandnames length 2 idiv { newfont /Encoding get 3 1 roll put } repeat -newfontname newfont definefont pop end } def -/isovec [ -8#200 /grave 8#201 /acute 8#202 /circumflex 8#203 /tilde -8#204 /macron 8#205 /breve 8#206 /dotaccent 8#207 /dieresis -8#210 /ring 8#211 /cedilla 8#212 /hungarumlaut 8#213 /ogonek 8#214 /caron -8#220 /dotlessi 8#230 /oe 8#231 /OE -8#240 /space 8#241 /exclamdown 8#242 /cent 8#243 /sterling -8#244 /currency 8#245 /yen 8#246 /brokenbar 8#247 /section 8#250 /dieresis -8#251 /copyright 8#252 /ordfeminine 8#253 /guillemotleft 8#254 /logicalnot -8#255 /endash 8#256 /registered 8#257 /macron 8#260 /degree 8#261 /plusminus -8#262 /twosuperior 8#263 /threesuperior 8#264 /acute 8#265 /mu 8#266 /paragraph -8#267 /periodcentered 8#270 /cedilla 8#271 /onesuperior 8#272 /ordmasculine -8#273 /guillemotright 8#274 /onequarter 8#275 /onehalf -8#276 /threequarters 8#277 /questiondown 8#300 /Agrave 8#301 /Aacute -8#302 /Acircumflex 8#303 /Atilde 8#304 /Adieresis 8#305 /Aring -8#306 /AE 8#307 /Ccedilla 8#310 /Egrave 8#311 /Eacute -8#312 /Ecircumflex 8#313 /Edieresis 8#314 /Igrave 8#315 /Iacute -8#316 /Icircumflex 8#317 /Idieresis 8#320 /Eth 8#321 /Ntilde 8#322 /Ograve -8#323 /Oacute 8#324 /Ocircumflex 8#325 /Otilde 8#326 /Odieresis 8#327 /multiply -8#330 /Oslash 8#331 /Ugrave 8#332 /Uacute 8#333 /Ucircumflex -8#334 /Udieresis 8#335 /Yacute 8#336 /Thorn 8#337 /germandbls 8#340 /agrave -8#341 /aacute 8#342 /acircumflex 8#343 /atilde 8#344 /adieresis 8#345 /aring -8#346 /ae 8#347 /ccedilla 8#350 /egrave 8#351 /eacute -8#352 /ecircumflex 8#353 /edieresis 8#354 /igrave 8#355 /iacute -8#356 /icircumflex 8#357 /idieresis 8#360 /eth 8#361 /ntilde 8#362 /ograve -8#363 /oacute 8#364 /ocircumflex 8#365 /otilde 8#366 /odieresis 8#367 /divide -8#370 /oslash 8#371 /ugrave 8#372 /uacute 8#373 /ucircumflex -8#374 /udieresis 8#375 /yacute 8#376 /thorn 8#377 /ydieresis] def -/Helvetica-Bold /Helvetica-Bold-iso isovec ReEncode -/Helvetica /Helvetica-iso isovec ReEncode -/Helvetica-Oblique /Helvetica-Oblique-iso isovec ReEncode - /DrawEllipse { - /endangle exch def - /startangle exch def - /yrad exch def - /xrad exch def - /y exch def - /x exch def - /savematrix mtrx currentmatrix def - x y tr xrad yrad sc 0 0 1 startangle endangle arc - closepath - savematrix setmatrix - } def - -/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def -/$F2psEnd {$F2psEnteredState restore end} def -%%EndProlog - -$F2psBegin -10 setmiterlimit -n -1000 5962 m -1000 -1000 l 7537 -1000 l 7537 5962 l cp clip - 0.05039 0.05039 sc -% Polyline -7.500 slw -n 1770 2700 m 1665 2700 1665 3045 105 arcto 4 {pop} repeat - 1665 3150 2730 3150 105 arcto 4 {pop} repeat - 2835 3150 2835 2805 105 arcto 4 {pop} repeat - 2835 2700 1770 2700 105 arcto 4 {pop} repeat - cp gs col7 0.75 shd ef gr gs col0 s gr -% Ellipse -n 2250 1125 225 225 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 1575 2025 225 225 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 2925 2025 225 225 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 900 2925 242 242 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Polyline -n 420 3825 m 315 3825 315 4170 105 arcto 4 {pop} repeat - 315 4275 1380 4275 105 arcto 4 {pop} repeat - 1485 4275 1485 3930 105 arcto 4 {pop} repeat - 1485 3825 420 3825 105 arcto 4 {pop} repeat - cp gs col7 0.75 shd ef gr gs col0 s gr -% Polyline -n 2085 1275 m 1582 1807 l gs col0 s gr -% Polyline -n 2407 1297 m 2940 1800 l gs col0 s gr -% Polyline -n 1417 2190 m 900 2692 l gs col0 s gr -% Polyline -n 1740 2190 m 2257 2700 l gs col0 s gr -% Polyline -n 892 3180 m 892 3825 l gs col0 s gr -% Polyline -n 45 675 m 6525 675 l 6525 4950 l 45 4950 l cp gs col0 s gr -% Polyline -n 2250 3600 m 2263 3597 l 2277 3594 l 2293 3592 l 2309 3589 l 2326 3586 l - 2344 3583 l 2362 3580 l 2381 3578 l 2399 3575 l 2418 3572 l - 2436 3569 l 2454 3566 l 2471 3563 l 2488 3561 l 2504 3558 l - 2520 3555 l 2537 3552 l 2555 3548 l 2571 3545 l 2588 3541 l - 2604 3537 l 2621 3533 l 2637 3528 l 2653 3524 l 2669 3520 l - 2684 3517 l 2700 3514 l 2715 3512 l 2730 3510 l 2745 3510 l - 2762 3511 l 2777 3512 l 2793 3514 l 2807 3517 l 2821 3520 l - 2835 3524 l 2849 3528 l 2863 3532 l 2877 3537 l 2893 3542 l - 2908 3548 l 2925 3555 l 2938 3561 l 2951 3568 l 2965 3575 l - 2978 3584 l 2992 3593 l 3007 3602 l 3021 3612 l 3035 3623 l - 3050 3633 l 3064 3643 l 3079 3652 l 3093 3661 l 3108 3670 l - 3122 3677 l 3136 3684 l 3150 3690 l 3166 3696 l 3182 3701 l - 3198 3706 l 3214 3710 l 3230 3713 l 3246 3716 l 3263 3719 l - 3279 3721 l 3295 3724 l 3311 3726 l 3327 3729 l 3343 3731 l - 3359 3733 l 3375 3735 l 3391 3736 l 3407 3737 l 3423 3738 l - 3439 3738 l 3455 3738 l 3471 3738 l 3488 3737 l 3504 3737 l - 3520 3736 l 3536 3736 l 3552 3735 l 3568 3735 l 3584 3735 l - 3600 3735 l 3616 3735 l 3632 3735 l 3648 3734 l 3663 3734 l - 3678 3733 l 3693 3732 l 3708 3731 l 3723 3730 l 3739 3729 l - 3755 3729 l 3771 3729 l 3788 3730 l 3806 3732 l 3825 3735 l - 3840 3738 l 3856 3741 l 3874 3745 l 3892 3749 l 3911 3753 l - 3931 3757 l 3951 3762 l 3972 3767 l 3993 3772 l 4014 3777 l - 4034 3782 l 4054 3787 l 4072 3793 l 4089 3799 l 4105 3805 l - 4119 3811 l 4130 3818 l 4140 3825 l 4150 3835 l 4157 3846 l - 4161 3858 l 4163 3870 l 4164 3883 l 4163 3897 l 4161 3911 l - 4159 3925 l 4156 3939 l 4154 3952 l 4151 3966 l 4148 3979 l - 4144 3992 l 4140 4005 l 4135 4018 l 4128 4031 l 4121 4045 l - 4112 4058 l 4104 4073 l 4095 4087 l 4085 4101 l 4075 4116 l - 4065 4129 l 4055 4143 l 4043 4155 l 4032 4166 l 4019 4176 l - 4005 4185 l 3992 4192 l 3978 4197 l 3963 4202 l 3947 4206 l - 3930 4210 l 3913 4213 l 3896 4216 l 3878 4218 l 3861 4220 l - 3843 4222 l 3825 4224 l 3807 4226 l 3789 4228 l 3771 4229 l - 3753 4230 l 3735 4230 l 3717 4230 l 3698 4228 l 3678 4226 l - 3659 4224 l 3639 4220 l 3619 4216 l 3598 4212 l 3578 4208 l - 3557 4203 l 3536 4199 l 3516 4195 l 3496 4191 l 3477 4189 l - 3457 4187 l 3438 4185 l 3420 4185 l 3402 4185 l 3384 4186 l - 3367 4188 l 3350 4190 l 3333 4193 l 3317 4196 l 3301 4200 l - 3285 4203 l 3269 4207 l 3253 4211 l 3237 4214 l 3220 4218 l - 3203 4221 l 3186 4224 l 3168 4227 l 3150 4230 l 3132 4233 l - 3113 4236 l 3094 4239 l 3074 4242 l 3055 4246 l 3035 4249 l - 3015 4253 l 2995 4257 l 2974 4260 l 2954 4264 l 2934 4267 l - 2914 4270 l 2894 4272 l 2874 4274 l 2855 4275 l 2835 4275 l - 2815 4275 l 2795 4274 l 2775 4272 l 2755 4270 l 2734 4268 l - 2713 4265 l 2692 4262 l 2671 4259 l 2650 4256 l 2630 4252 l - 2609 4249 l 2590 4245 l 2571 4242 l 2553 4238 l 2536 4234 l - 2520 4230 l 2503 4225 l 2487 4219 l 2473 4213 l 2460 4207 l - 2448 4200 l 2437 4192 l 2426 4185 l 2415 4178 l 2404 4170 l - 2393 4163 l 2380 4157 l 2368 4151 l 2354 4145 l 2340 4140 l - 2325 4135 l 2310 4131 l 2294 4128 l 2277 4125 l 2260 4122 l - 2243 4120 l 2225 4118 l 2208 4115 l 2191 4113 l 2174 4110 l - 2158 4107 l 2143 4104 l 2128 4100 l 2115 4095 l 2101 4089 l - 2087 4083 l 2074 4076 l 2061 4070 l 2049 4063 l 2037 4056 l - 2025 4049 l 2014 4042 l 2004 4034 l 1995 4025 l 1987 4016 l - 1980 4005 l 1975 3993 l 1972 3980 l 1971 3965 l 1970 3949 l - 1971 3932 l 1972 3915 l 1973 3898 l 1974 3881 l 1976 3865 l - 1977 3850 l 1978 3837 l 1980 3825 l 1983 3812 l 1986 3801 l - 1990 3792 l 1994 3784 l 1998 3776 l 2003 3768 l 2008 3761 l - 2013 3752 l 2019 3744 l 2025 3735 l 2032 3726 l 2040 3717 l - 2048 3707 l 2057 3698 l 2066 3688 l 2075 3678 l 2084 3669 l - 2094 3660 l 2104 3652 l 2115 3645 l 2127 3639 l 2138 3633 l - 2150 3628 l 2162 3624 l 2174 3620 l 2186 3617 l 2200 3613 l - 2214 3609 l 2231 3604 l cp gs col0 s gr -% Polyline -n 3645 1080 m 3660 1077 l 3677 1074 l 3694 1071 l 3713 1068 l 3733 1065 l - 3754 1063 l 3775 1060 l 3798 1058 l 3820 1056 l 3843 1053 l - 3866 1051 l 3889 1049 l 3912 1047 l 3934 1045 l 3955 1043 l - 3976 1041 l 3996 1039 l 4015 1038 l 4033 1036 l 4050 1035 l - 4071 1034 l 4090 1033 l 4109 1032 l 4127 1032 l 4144 1031 l - 4161 1031 l 4177 1031 l 4193 1031 l 4209 1031 l 4225 1031 l - 4241 1031 l 4257 1032 l 4273 1032 l 4289 1033 l 4304 1034 l - 4320 1035 l 4337 1037 l 4354 1039 l 4371 1041 l 4387 1044 l - 4403 1047 l 4419 1050 l 4435 1053 l 4450 1057 l 4466 1060 l - 4481 1063 l 4497 1067 l 4513 1071 l 4529 1075 l 4545 1080 l - 4561 1085 l 4577 1091 l 4592 1097 l 4607 1103 l 4622 1110 l - 4637 1118 l 4651 1125 l 4666 1132 l 4681 1140 l 4697 1147 l - 4713 1153 l 4731 1159 l 4750 1165 l 4770 1170 l 4787 1174 l - 4804 1177 l 4823 1180 l 4842 1182 l 4863 1184 l 4884 1186 l - 4906 1188 l 4928 1189 l 4950 1190 l 4972 1192 l 4994 1193 l - 5016 1195 l 5037 1197 l 5058 1200 l 5077 1203 l 5096 1206 l - 5113 1210 l 5130 1215 l 5148 1221 l 5165 1228 l 5181 1235 l - 5197 1242 l 5212 1250 l 5228 1259 l 5243 1267 l 5257 1276 l - 5272 1285 l 5286 1294 l 5299 1303 l 5312 1312 l 5324 1322 l - 5336 1331 l 5346 1340 l 5355 1350 l 5365 1363 l 5373 1378 l - 5380 1392 l 5386 1408 l 5390 1424 l 5394 1440 l 5398 1456 l - 5401 1472 l 5402 1488 l 5403 1502 l 5403 1517 l 5400 1530 l - 5395 1543 l 5389 1555 l 5381 1568 l 5372 1580 l 5363 1592 l - 5354 1604 l 5343 1616 l 5331 1627 l 5318 1638 l 5303 1648 l - 5286 1657 l 5265 1665 l 5251 1669 l 5235 1673 l 5219 1677 l - 5201 1680 l 5182 1683 l 5162 1685 l 5141 1688 l 5119 1690 l - 5097 1692 l 5075 1694 l 5053 1696 l 5030 1697 l 5008 1699 l - 4986 1701 l 4964 1703 l 4943 1704 l 4921 1706 l 4901 1707 l - 4880 1709 l 4860 1710 l 4840 1711 l 4819 1712 l 4799 1713 l - 4779 1713 l 4758 1713 l 4738 1714 l 4717 1714 l 4697 1714 l - 4676 1714 l 4655 1714 l 4635 1714 l 4614 1714 l 4594 1714 l - 4573 1714 l 4553 1713 l 4533 1713 l 4513 1713 l 4494 1712 l - 4474 1711 l 4455 1710 l 4434 1709 l 4413 1707 l 4392 1705 l - 4372 1703 l 4351 1701 l 4331 1698 l 4311 1695 l 4291 1692 l - 4271 1690 l 4251 1687 l 4231 1684 l 4211 1681 l 4191 1678 l - 4172 1675 l 4152 1673 l 4133 1670 l 4114 1668 l 4095 1665 l - 4074 1662 l 4053 1659 l 4033 1657 l 4012 1654 l 3992 1651 l - 3972 1648 l 3951 1645 l 3931 1643 l 3911 1640 l 3891 1637 l - 3872 1634 l 3852 1631 l 3833 1628 l 3815 1626 l 3797 1623 l - 3780 1620 l 3761 1617 l 3743 1614 l 3725 1611 l 3708 1608 l - 3692 1605 l 3675 1602 l 3659 1600 l 3643 1597 l 3627 1594 l - 3612 1591 l 3597 1587 l 3582 1584 l 3568 1580 l 3555 1575 l - 3541 1569 l 3527 1563 l 3514 1556 l 3501 1550 l 3489 1543 l - 3477 1536 l 3465 1529 l 3454 1522 l 3444 1514 l 3435 1505 l - 3427 1496 l 3420 1485 l 3415 1473 l 3412 1460 l 3411 1445 l - 3410 1430 l 3411 1414 l 3412 1397 l 3413 1380 l 3414 1364 l - 3416 1348 l 3417 1333 l 3418 1318 l 3420 1305 l 3423 1290 l - 3425 1275 l 3428 1261 l 3431 1247 l 3434 1233 l 3437 1220 l - 3442 1207 l 3447 1194 l 3455 1182 l 3465 1170 l 3474 1162 l - 3483 1155 l 3493 1148 l 3504 1141 l 3515 1134 l 3526 1127 l - 3538 1121 l 3550 1114 l 3563 1108 l 3577 1102 l 3591 1096 l - 3607 1090 l 3625 1085 l cp gs col0 s gr -% Polyline -n 2475 1215 m 2477 1217 l 2482 1221 l 2491 1229 l 2503 1239 l 2517 1252 l - 2534 1267 l 2552 1282 l 2570 1296 l 2588 1310 l 2605 1322 l - 2621 1332 l 2638 1342 l 2655 1350 l 2669 1356 l 2684 1362 l - 2700 1368 l 2717 1374 l 2734 1380 l 2752 1386 l 2770 1392 l - 2789 1398 l 2808 1403 l 2827 1409 l 2846 1415 l 2865 1420 l - 2884 1425 l 2902 1429 l 2920 1433 l 2937 1436 l 2954 1438 l - 2970 1440 l 2988 1441 l 3006 1441 l 3024 1440 l 3041 1439 l - 3059 1437 l 3076 1434 l 3094 1431 l 3111 1428 l 3129 1425 l - 3146 1421 l 3162 1417 l 3179 1414 l 3195 1409 l 3211 1405 l - 3226 1400 l 3240 1395 l 3256 1388 l 3271 1380 l 3287 1370 l - 3304 1358 l 3322 1344 l 3340 1329 l 3359 1314 l 3376 1299 l - 3391 1286 l 3404 1275 l 3412 1267 l 3418 1262 l 3420 1260 l gs col0 s gr -% Polyline -n 1125 3060 m 1126 3063 l 1127 3068 l 1129 3078 l 1132 3093 l 1136 3112 l - 1141 3135 l 1146 3162 l 1153 3190 l 1159 3219 l 1166 3248 l - 1173 3275 l 1180 3301 l 1187 3324 l 1193 3345 l 1200 3364 l - 1207 3381 l 1215 3397 l 1224 3414 l 1234 3429 l 1245 3444 l - 1256 3459 l 1267 3473 l 1279 3486 l 1291 3499 l 1304 3512 l - 1316 3525 l 1329 3537 l 1342 3550 l 1355 3562 l 1368 3574 l - 1382 3585 l 1396 3596 l 1410 3607 l 1425 3617 l 1441 3626 l - 1457 3635 l 1473 3644 l 1490 3653 l 1507 3661 l 1524 3669 l - 1542 3677 l 1559 3685 l 1577 3692 l 1595 3700 l 1613 3706 l - 1631 3713 l 1649 3718 l 1668 3723 l 1687 3727 l 1704 3730 l - 1723 3732 l 1743 3733 l 1764 3734 l 1788 3734 l 1814 3733 l - 1841 3732 l 1869 3731 l 1898 3729 l 1926 3727 l 1952 3725 l - 1975 3724 l 1993 3722 l 2008 3721 l 2017 3721 l 2022 3720 l - 2025 3720 l gs col0 s gr -/Helvetica-iso ff 180.00 scf sf -3600 1260 m -gs 1 -1 sc (attributes:) col0 sh gr -/Helvetica-iso ff 180.00 scf sf -3600 1485 m -gs 1 -1 sc ("att" -> Value "apple") col0 sh gr -/Helvetica-iso ff 180.00 scf sf -2250 3780 m -gs 1 -1 sc (attributes:) col0 sh gr -/Helvetica-Oblique-iso ff 180.00 scf sf -390 4725 m -gs 1 -1 sc (An orangeCherries) col0 sh gr -/Helvetica-iso ff 180.00 scf sf -2250 4005 m -gs 1 -1 sc ("att" -> Value "orange") col0 sh gr -/Helvetica-Bold-iso ff 180.00 scf sf -1815 3015 m -gs 1 -1 sc ("Cherries") col0 sh gr -/Helvetica-Bold-iso ff 180.00 scf sf -375 4125 m -gs 1 -1 sc ("An orange") col0 sh gr -/Helvetica-Bold-iso ff 180.00 scf sf -750 2985 m -gs 1 -1 sc () col0 sh gr -/Helvetica-Bold-iso ff 180.00 scf sf -1410 2085 m -gs 1 -1 sc () col0 sh gr -/Helvetica-Bold-iso ff 180.00 scf sf -2790 2070 m -gs 1 -1 sc () col0 sh gr -/Helvetica-Bold-iso ff 180.00 scf sf -2100 1200 m -gs 1 -1 sc () col0 sh gr -$F2psEnd -rs - -%%EndDocument - @endspecial 396 2578 a - currentpoint currentpoint translate 1 1 div 1 1 div scale neg exch -neg exch translate - 396 2578 a 357 x Fv(Only)g(elements,)g(data)g -(sections,)g(attrib)n(utes)g(and)g(processing)e(instructions)i(\(and)f -(comments,)g(if)h(con\002gured\))e(can,)396 3043 y(directly)i(or)g -(indirectly)-5 b(,)18 b(occur)h(in)h(the)h(document)d(tree.)i(It)g(is)h -(impossible)f(to)g(add)g(entity)g(references)f(to)h(the)g(tree;)g(if) -396 3151 y(the)g(parser)g(\002nds)g(such)g(a)h(reference,)d(not)i(the)g -(reference)f(as)i(such)f(b)n(ut)g(the)g(referenced)e(te)o(xt)i(\(i.e.)g -(the)g(tree)396 3259 y(representing)e(the)j(structured)d(te)o(xt\))i -(is)h(included)e(in)h(the)g(tree.)396 3409 y(Note)g(that)h(the)f -(parser)f(collapses)i(as)g(much)e(data)h(material)g(into)g(one)f(data)h -(node)f(as)i(possible)f(such)g(that)g(there)g(are)396 -3517 y(normally)f(ne)n(v)o(er)g(tw)o(o)h(adjacent)f(data)i(nodes.)e -(This)h(in)m(v)n(ariant)f(is)i(enforced)d(e)n(v)o(en)h(if)i(data)f -(material)f(is)j(included)c(by)396 3625 y(entity)i(references)f(or)h -(CD)m(A)-9 b(T)h(A)20 b(sections,)g(or)g(if)h(a)f(data)g(sequence)f(is) -j(interrupted)c(by)h(comments.)g(So)i Fq(a)44 b(&)g(b)396 -3732 y Fo(<)p Fq(-)h(comment)e(-)p Fo(>)i Fq(c)f Fo(<)p -Fq(![CDATA[)g Fo(<>)g Fq(d]])p Fo(>)20 b Fv(is)h(represented)d(by)i -(only)g(one)f(data)h(node,)f(for)h(instance.)396 3840 -y(Ho)n(we)n(v)o(er)m(,)e(you)i(can)g(create)g(document)e(trees)i -(manually)f(which)h(break)f(this)i(in)m(v)n(ariant;)d(it)j(is)g(only)f -(the)g(w)o(ay)g(the)396 3948 y(parser)g(forms)f(the)h(tree.)p -Black 3800 5278 a Fr(50)p Black eop -%%Page: 51 51 -51 50 bop Black 2225 67 a Fr(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr) -m(esenting)g(the)g(document)p Black 396 579 a Fu(Figur)o(e)g(3-2.)f -(Nodes)h(ar)o(e)g(doubly)g(link)o(ed)i(tr)o(ees)396 1537 -y - currentpoint currentpoint translate 1 1 scale neg exch neg exch translate - 396 1537 a @beginspecial 0 @llx 0 @lly 138 @urx 93 -@ury 1380 @rwi @setspecial -%%BeginDocument: pic/node_general.ps -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: src/pic/node_general.fig -%%Creator: fig2dev Version 3.2 Patchlevel 1 -%%CreationDate: Sun Aug 27 02:05:42 2000 -%%For: gerd@ice (Gerd Stolpmann) -%%Orientation: Portrait -%%BoundingBox: 0 0 138 93 -%%Pages: 0 -%%BeginSetup -%%EndSetup -%%Magnification: 0.8000 -%%EndComments -/$F2psDict 200 dict def -$F2psDict begin -$F2psDict /mtrx matrix put -/col-1 {0 setgray} bind def -/col0 {0.000 0.000 0.000 srgb} bind def -/col1 {0.000 0.000 1.000 srgb} bind def -/col2 {0.000 1.000 0.000 srgb} bind def -/col3 {0.000 1.000 1.000 srgb} bind def -/col4 {1.000 0.000 0.000 srgb} bind def -/col5 {1.000 0.000 1.000 srgb} bind def -/col6 {1.000 1.000 0.000 srgb} bind def -/col7 {1.000 1.000 1.000 srgb} bind def -/col8 {0.000 0.000 0.560 srgb} bind def -/col9 {0.000 0.000 0.690 srgb} bind def -/col10 {0.000 0.000 0.820 srgb} bind def -/col11 {0.530 0.810 1.000 srgb} bind def -/col12 {0.000 0.560 0.000 srgb} bind def -/col13 {0.000 0.690 0.000 srgb} bind def -/col14 {0.000 0.820 0.000 srgb} bind def -/col15 {0.000 0.560 0.560 srgb} bind def -/col16 {0.000 0.690 0.690 srgb} bind def -/col17 {0.000 0.820 0.820 srgb} bind def -/col18 {0.560 0.000 0.000 srgb} bind def -/col19 {0.690 0.000 0.000 srgb} bind def -/col20 {0.820 0.000 0.000 srgb} bind def -/col21 {0.560 0.000 0.560 srgb} bind def -/col22 {0.690 0.000 0.690 srgb} bind def -/col23 {0.820 0.000 0.820 srgb} bind def -/col24 {0.500 0.190 0.000 srgb} bind def -/col25 {0.630 0.250 0.000 srgb} bind def -/col26 {0.750 0.380 0.000 srgb} bind def -/col27 {1.000 0.500 0.500 srgb} bind def -/col28 {1.000 0.630 0.630 srgb} bind def -/col29 {1.000 0.750 0.750 srgb} bind def -/col30 {1.000 0.880 0.880 srgb} bind def -/col31 {1.000 0.840 0.000 srgb} bind def - -end -save --22.0 126.0 translate -1 -1 scale - -/cp {closepath} bind def -/ef {eofill} bind def -/gr {grestore} bind def -/gs {gsave} bind def -/sa {save} bind def -/rs {restore} bind def -/l {lineto} bind def -/m {moveto} bind def -/rm {rmoveto} bind def -/n {newpath} bind def -/s {stroke} bind def -/sh {show} bind def -/slc {setlinecap} bind def -/slj {setlinejoin} bind def -/slw {setlinewidth} bind def -/srgb {setrgbcolor} bind def -/rot {rotate} bind def -/sc {scale} bind def -/sd {setdash} bind def -/ff {findfont} bind def -/sf {setfont} bind def -/scf {scalefont} bind def -/sw {stringwidth} bind def -/tr {translate} bind def -/tnt {dup dup currentrgbcolor - 4 -2 roll dup 1 exch sub 3 -1 roll mul add - 4 -2 roll dup 1 exch sub 3 -1 roll mul add - 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} - bind def -/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul - 4 -2 roll mul srgb} bind def - /DrawEllipse { - /endangle exch def - /startangle exch def - /yrad exch def - /xrad exch def - /y exch def - /x exch def - /savematrix mtrx currentmatrix def - x y tr xrad yrad sc 0 0 1 startangle endangle arc - closepath - savematrix setmatrix - } def - -/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def -/$F2psEnd {$F2psEnteredState restore end} def -%%EndProlog - -$F2psBegin -10 setmiterlimit -n -1000 3487 m -1000 -1000 l 4162 -1000 l 4162 3487 l cp clip - 0.05039 0.05039 sc -7.500 slw -% Ellipse -n 2025 2025 229 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 1350 2025 225 225 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 2700 2025 225 225 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 2025 1125 225 225 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Polyline -gs clippath -1743 1345 m 1845 1275 l 1788 1385 l 1877 1284 l 1832 1244 l cp -clip -n 1380 1800 m 1845 1275 l gs col7 0.75 shd ef gr gs col0 s gr gr - -% arrowhead -n 1743 1345 m 1845 1275 l 1788 1385 l 1765 1365 l 1743 1345 l cp gs col7 1.00 shd ef gr col0 s -% Polyline -gs clippath -1384 1745 m 1282 1815 l 1339 1705 l 1250 1807 l 1295 1846 l cp -clip -n 1815 1207 m 1282 1815 l gs col7 0.75 shd ef gr gs col0 s gr gr - -% arrowhead -n 1384 1745 m 1282 1815 l 1339 1705 l 1361 1725 l 1384 1745 l cp gs 0.00 setgray ef gr col0 s -% Polyline -gs clippath -2025 1470 m 2055 1350 l 2085 1470 l 2085 1335 l 2025 1335 l cp -clip -n 2055 1792 m 2055 1350 l gs col7 0.75 shd ef gr gs col0 s gr gr - -% arrowhead -n 2025 1470 m 2055 1350 l 2085 1470 l 2055 1470 l 2025 1470 l cp gs col7 1.00 shd ef gr col0 s -% Polyline -gs clippath -2010 1687 m 1980 1807 l 1950 1687 l 1950 1822 l 2010 1822 l cp -clip -n 1980 1350 m 1980 1807 l gs col7 0.75 shd ef gr gs col0 s gr gr - -% arrowhead -n 2010 1687 m 1980 1807 l 1950 1687 l 1980 1687 l 2010 1687 l cp gs 0.00 setgray ef gr col0 s -% Polyline -gs clippath -2511 1750 m 2550 1867 l 2461 1782 l 2533 1896 l 2583 1864 l cp -clip -n 2190 1297 m 2550 1867 l gs col7 0.75 shd ef gr gs col0 s gr gr - -% arrowhead -n 2511 1750 m 2550 1867 l 2461 1782 l 2486 1766 l 2511 1750 l cp gs 0.00 setgray ef gr col0 s -% Polyline -gs clippath -2262 1353 m 2220 1237 l 2312 1320 l 2237 1208 l 2187 1241 l cp -clip -n 2602 1807 m 2220 1237 l gs col7 0.75 shd ef gr gs col0 s gr gr - -% arrowhead -n 2262 1353 m 2220 1237 l 2312 1320 l 2287 1337 l 2262 1353 l cp gs col7 1.00 shd ef gr col0 s -% Polyline -n 450 675 m 3150 675 l 3150 2475 l 450 2475 l cp gs col0 s gr -/Courier ff 150.00 scf sf -2377 1342 m -gs 1 -1 sc (parent) col0 sh gr -/Courier ff 150.00 scf sf -645 1628 m -gs 1 -1 sc (sub_nodes) col0 sh gr -$F2psEnd -rs - -%%EndDocument - @endspecial 396 1537 a - currentpoint currentpoint translate 1 1 div 1 1 div scale neg exch -neg exch translate - 396 1537 a 357 x Fv(The)e(node)f(tree)h(has)h -(links)f(in)g(both)g(directions:)f(Ev)o(ery)g(node)g(has)h(a)h(link)f -(to)g(its)i(parent)d(\(if)h(an)o(y\),)f(and)g(it)i(has)g(links)f(to)396 -2002 y(the)g(subnodes)f(\(see)i(\002gure)e Fr(Nodes)h(ar)m(e)h(doubly)d -(link)o(ed)i(tr)m(ees)p Fv(\).)h(Ob)o(viously)-5 b(,)18 -b(this)i(doubly-link)o(ed)d(structure)396 2110 y(simpli\002es)k(the)f -(na)n(vigation)e(in)j(the)f(tree;)g(b)n(ut)g(has)h(also)f(some)g -(consequences)f(for)g(the)h(possible)g(operations)f(on)h(trees.)396 -2259 y(Because)h(e)n(v)o(ery)d(node)i(must)g(ha)n(v)o(e)f(at)i(most)f -Fr(one)g Fv(parent)f(node,)g(operations)g(are)h(ille)o(gal)g(if)g(the)o -(y)f(violate)h(this)396 2367 y(condition.)e(The)i(follo)n(wing)f -(\002gure)g(\()p Fr(A)h(node)g(can)f(only)h(be)g(added)f(if)i(it)g(is)g -(a)f(r)l(oot)q Fv(\))g(sho)n(ws)h(on)e(the)i(left)f(side)h(that)f(node) -396 2475 y Fq(y)h Fv(is)g(added)e(to)h Fq(x)h Fv(as)g(ne)n(w)f(subnode) -e(which)i(is)h(allo)n(wed)f(because)f Fq(y)i Fv(does)f(not)g(ha)n(v)o -(e)f(a)i(parent)e(yet.)h(The)g(right)f(side)i(of)396 -2583 y(the)f(picture)g(illustrates)g(what)h(w)o(ould)e(happen)g(if)h -Fq(y)h Fv(had)e(a)i(parent)e(node;)g(this)i(is)g(ille)o(gal)f(because)f -Fq(y)i Fv(w)o(ould)e(ha)n(v)o(e)h(tw)o(o)396 2691 y(parents)g(after)g -(the)g(operation.)396 2923 y Fu(Figur)o(e)g(3-3.)f(A)i(node)f(can)g -(only)g(be)h(added)g(if)f(it)h(is)g(a)f(r)o(oot)396 4165 -y - currentpoint currentpoint translate 1 1 scale neg exch neg exch translate - 396 4165 a @beginspecial 0 @llx 0 @lly 422 @urx 127 -@ury 4220 @rwi @setspecial -%%BeginDocument: pic/node_add.ps -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: src/pic/node_add.fig -%%Creator: fig2dev Version 3.2 Patchlevel 1 -%%CreationDate: Sun Aug 27 02:05:42 2000 -%%For: gerd@ice (Gerd Stolpmann) -%%Orientation: Portrait -%%BoundingBox: 0 0 422 127 -%%Pages: 0 -%%BeginSetup -%%EndSetup -%%Magnification: 0.8000 -%%EndComments -/$F2psDict 200 dict def -$F2psDict begin -$F2psDict /mtrx matrix put -/col-1 {0 setgray} bind def -/col0 {0.000 0.000 0.000 srgb} bind def -/col1 {0.000 0.000 1.000 srgb} bind def -/col2 {0.000 1.000 0.000 srgb} bind def -/col3 {0.000 1.000 1.000 srgb} bind def -/col4 {1.000 0.000 0.000 srgb} bind def -/col5 {1.000 0.000 1.000 srgb} bind def -/col6 {1.000 1.000 0.000 srgb} bind def -/col7 {1.000 1.000 1.000 srgb} bind def -/col8 {0.000 0.000 0.560 srgb} bind def -/col9 {0.000 0.000 0.690 srgb} bind def -/col10 {0.000 0.000 0.820 srgb} bind def -/col11 {0.530 0.810 1.000 srgb} bind def -/col12 {0.000 0.560 0.000 srgb} bind def -/col13 {0.000 0.690 0.000 srgb} bind def -/col14 {0.000 0.820 0.000 srgb} bind def -/col15 {0.000 0.560 0.560 srgb} bind def -/col16 {0.000 0.690 0.690 srgb} bind def -/col17 {0.000 0.820 0.820 srgb} bind def -/col18 {0.560 0.000 0.000 srgb} bind def -/col19 {0.690 0.000 0.000 srgb} bind def -/col20 {0.820 0.000 0.000 srgb} bind def -/col21 {0.560 0.000 0.560 srgb} bind def -/col22 {0.690 0.000 0.690 srgb} bind def -/col23 {0.820 0.000 0.820 srgb} bind def -/col24 {0.500 0.190 0.000 srgb} bind def -/col25 {0.630 0.250 0.000 srgb} bind def -/col26 {0.750 0.380 0.000 srgb} bind def -/col27 {1.000 0.500 0.500 srgb} bind def -/col28 {1.000 0.630 0.630 srgb} bind def -/col29 {1.000 0.750 0.750 srgb} bind def -/col30 {1.000 0.880 0.880 srgb} bind def -/col31 {1.000 0.840 0.000 srgb} bind def - -end -save --33.0 171.0 translate -1 -1 scale - -/cp {closepath} bind def -/ef {eofill} bind def -/gr {grestore} bind def -/gs {gsave} bind def -/sa {save} bind def -/rs {restore} bind def -/l {lineto} bind def -/m {moveto} bind def -/rm {rmoveto} bind def -/n {newpath} bind def -/s {stroke} bind def -/sh {show} bind def -/slc {setlinecap} bind def -/slj {setlinejoin} bind def -/slw {setlinewidth} bind def -/srgb {setrgbcolor} bind def -/rot {rotate} bind def -/sc {scale} bind def -/sd {setdash} bind def -/ff {findfont} bind def -/sf {setfont} bind def -/scf {scalefont} bind def -/sw {stringwidth} bind def -/tr {translate} bind def -/tnt {dup dup currentrgbcolor - 4 -2 roll dup 1 exch sub 3 -1 roll mul add - 4 -2 roll dup 1 exch sub 3 -1 roll mul add - 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} - bind def -/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul - 4 -2 roll mul srgb} bind def - /DrawEllipse { - /endangle exch def - /startangle exch def - /yrad exch def - /xrad exch def - /y exch def - /x exch def - /savematrix mtrx currentmatrix def - x y tr xrad yrad sc 0 0 1 startangle endangle arc - closepath - savematrix setmatrix - } def - -/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def -/$F2psEnd {$F2psEnteredState restore end} def -%%EndProlog - -$F2psBegin -10 setmiterlimit -n -1000 4387 m -1000 -1000 l 10012 -1000 l 10012 4387 l cp clip - 0.05039 0.05039 sc -7.500 slw -% Ellipse -n 6141 1350 242 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 6141 2250 242 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 5426 2250 242 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 6856 2250 242 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 7571 2925 242 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 8524 2925 242 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 8047 2250 242 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 1866 1350 242 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 1866 2250 242 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 1151 2250 242 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 2581 2250 242 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 3296 2925 242 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 4249 2925 242 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 3772 2250 242 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 8325 1350 242 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Polyline -gs clippath -5507 1945 m 5402 2017 l 5460 1904 l 5369 2008 l 5415 2049 l cp -clip -n 5910 1440 m 5402 2017 l gs col7 0.75 shd ef gr gs col0 s gr gr - -% arrowhead -n 5507 1945 m 5402 2017 l 5460 1904 l 5484 1924 l 5507 1945 l cp gs 0.00 setgray ef gr col0 s -% Polyline -gs clippath -6134 1902 m 6101 2025 l 6072 1901 l 6070 2039 l 6132 2041 l cp -clip -n 6109 1590 m 6101 2025 l gs col7 0.75 shd ef gr gs col0 s gr gr - -% arrowhead -n 6134 1902 m 6101 2025 l 6072 1901 l 6103 1901 l 6134 1902 l cp gs 0.00 setgray ef gr col0 s -% Polyline -gs clippath -6649 1952 m 6697 2070 l 6599 1989 l 6681 2100 l 6731 2064 l cp -clip -n 6307 1537 m 6697 2070 l gs col7 0.75 shd ef gr gs col0 s gr gr - -% arrowhead -n 6649 1952 m 6697 2070 l 6599 1989 l 6624 1970 l 6649 1952 l cp gs 0.00 setgray ef gr col0 s -% Polyline -gs clippath -7696 2606 m 7602 2692 l 7645 2572 l 7568 2687 l 7619 2722 l cp -clip -n 7832 2347 m 7602 2692 l gs col7 0.75 shd ef gr gs col0 s gr gr - -% arrowhead -n 7696 2606 m 7602 2692 l 7645 2572 l 7671 2589 l 7696 2606 l cp gs 0.00 setgray ef gr col0 s -% Polyline -gs clippath -8306 2632 m 8349 2752 l 8255 2666 l 8332 2782 l 8383 2747 l cp -clip -n 8150 2452 m 8349 2752 l gs col7 0.75 shd ef gr gs col0 s gr gr - -% arrowhead -n 8306 2632 m 8349 2752 l 8255 2666 l 8281 2649 l 8306 2632 l cp gs 0.00 setgray ef gr col0 s -% Polyline -gs clippath -5853 1564 m 5958 1492 l 5899 1605 l 5991 1501 l 5945 1460 l cp -clip -n 5490 2017 m 5958 1492 l gs col7 0.75 shd ef gr gs col0 s gr gr - -% arrowhead -n 5853 1564 m 5958 1492 l 5899 1605 l 5876 1584 l 5853 1564 l cp gs col7 1.00 shd ef gr col0 s -% Polyline -gs clippath -6140 1698 m 6173 1575 l 6201 1699 l 6204 1561 l 6142 1559 l cp -clip -n 6164 2010 m 6173 1575 l gs col7 0.75 shd ef gr gs col0 s gr gr - -% arrowhead -n 6140 1698 m 6173 1575 l 6201 1699 l 6170 1699 l 6140 1698 l cp gs col7 1.00 shd ef gr col0 s -% Polyline -gs clippath -6404 1588 m 6355 1470 l 6454 1551 l 6371 1440 l 6321 1476 l cp -clip -n 6768 2025 m 6355 1470 l gs col7 0.75 shd ef gr gs col0 s gr gr - -% arrowhead -n 6404 1588 m 6355 1470 l 6454 1551 l 6429 1569 l 6404 1588 l cp gs col7 1.00 shd ef gr col0 s -% Polyline -gs clippath -7784 2499 m 7880 2415 l 7835 2534 l 7914 2420 l 7863 2385 l cp -clip -n 7673 2715 m 7880 2415 l gs col7 0.75 shd ef gr gs col0 s gr gr - -% arrowhead -n 7784 2499 m 7880 2415 l 7835 2534 l 7810 2517 l 7784 2499 l cp gs col7 1.00 shd ef gr col0 s -% Polyline -gs clippath -8263 2535 m 8222 2415 l 8315 2502 l 8240 2386 l 8188 2419 l cp -clip -n 8412 2707 m 8222 2415 l gs col7 0.75 shd ef gr gs col0 s gr gr - -% arrowhead -n 8263 2535 m 8222 2415 l 8315 2502 l 8289 2519 l 8263 2535 l cp gs col7 1.00 shd ef gr col0 s -% Polyline -gs clippath -1232 1945 m 1127 2017 l 1185 1904 l 1094 2008 l 1140 2049 l cp -clip -n 1635 1440 m 1127 2017 l gs col7 0.75 shd ef gr gs col0 s gr gr - -% arrowhead -n 1232 1945 m 1127 2017 l 1185 1904 l 1209 1924 l 1232 1945 l cp gs 0.00 setgray ef gr col0 s -% Polyline -gs clippath -1859 1902 m 1826 2025 l 1797 1901 l 1795 2039 l 1857 2041 l cp -clip -n 1834 1590 m 1826 2025 l gs col7 0.75 shd ef gr gs col0 s gr gr - -% arrowhead -n 1859 1902 m 1826 2025 l 1797 1901 l 1828 1902 l 1859 1902 l cp gs 0.00 setgray ef gr col0 s -% Polyline -gs clippath -2374 1952 m 2422 2070 l 2324 1989 l 2406 2100 l 2456 2064 l cp -clip -n 2032 1537 m 2422 2070 l gs col7 0.75 shd ef gr gs col0 s gr gr - -% arrowhead -n 2374 1952 m 2422 2070 l 2324 1989 l 2349 1970 l 2374 1952 l cp gs 0.00 setgray ef gr col0 s -% Polyline -gs clippath -3421 2606 m 3327 2692 l 3370 2572 l 3293 2687 l 3344 2722 l cp -clip -n 3557 2347 m 3327 2692 l gs col7 0.75 shd ef gr gs col0 s gr gr - -% arrowhead -n 3421 2606 m 3327 2692 l 3370 2572 l 3396 2589 l 3421 2606 l cp gs 0.00 setgray ef gr col0 s -% Polyline -gs clippath -4031 2632 m 4074 2752 l 3980 2666 l 4057 2782 l 4108 2747 l cp -clip -n 3875 2452 m 4074 2752 l gs col7 0.75 shd ef gr gs col0 s gr gr - -% arrowhead -n 4031 2632 m 4074 2752 l 3980 2666 l 4006 2649 l 4031 2632 l cp gs 0.00 setgray ef gr col0 s -% Polyline -gs clippath -1578 1564 m 1683 1492 l 1624 1605 l 1716 1501 l 1670 1460 l cp -clip -n 1215 2017 m 1683 1492 l gs col7 0.75 shd ef gr gs col0 s gr gr - -% arrowhead -n 1578 1564 m 1683 1492 l 1624 1605 l 1601 1584 l 1578 1564 l cp gs col7 1.00 shd ef gr col0 s -% Polyline -gs clippath -1865 1698 m 1898 1575 l 1926 1699 l 1929 1561 l 1867 1559 l cp -clip -n 1889 2010 m 1898 1575 l gs col7 0.75 shd ef gr gs col0 s gr gr - -% arrowhead -n 1865 1698 m 1898 1575 l 1926 1699 l 1895 1698 l 1865 1698 l cp gs col7 1.00 shd ef gr col0 s -% Polyline -gs clippath -2129 1588 m 2080 1470 l 2179 1551 l 2096 1440 l 2046 1476 l cp -clip -n 2493 2025 m 2080 1470 l gs col7 0.75 shd ef gr gs col0 s gr gr - -% arrowhead -n 2129 1588 m 2080 1470 l 2179 1551 l 2154 1569 l 2129 1588 l cp gs col7 1.00 shd ef gr col0 s -% Polyline -gs clippath -3509 2499 m 3605 2415 l 3560 2534 l 3639 2420 l 3588 2385 l cp -clip -n 3398 2715 m 3605 2415 l gs col7 0.75 shd ef gr gs col0 s gr gr - -% arrowhead -n 3509 2499 m 3605 2415 l 3560 2534 l 3535 2517 l 3509 2499 l cp gs col7 1.00 shd ef gr col0 s -% Polyline -gs clippath -3988 2535 m 3947 2415 l 4040 2502 l 3965 2386 l 3913 2419 l cp -clip -n 4137 2707 m 3947 2415 l gs col7 0.75 shd ef gr gs col0 s gr gr - -% arrowhead -n 3988 2535 m 3947 2415 l 4040 2502 l 4014 2519 l 3988 2535 l cp gs col7 1.00 shd ef gr col0 s -% Polyline - [60] 0 sd -n 6387 1372 m 8023 2017 l gs col7 0.75 shd ef gr gs col0 s gr [] 0 sd -% Polyline -n 4950 900 m 9000 900 l 9000 3375 l 4950 3375 l cp gs col0 s gr -% Polyline - [60] 0 sd -n 2112 1372 m 3748 2017 l gs col7 0.75 shd ef gr gs col0 s gr [] 0 sd -% Polyline -n 675 900 m 4725 900 l 4725 3375 l 675 3375 l cp gs col0 s gr -% Polyline -gs clippath -8119 1904 m 8055 2010 l 8061 1886 l 8022 2016 l 8079 2033 l cp -clip -n 8197 1545 m 8055 2010 l gs col0 s gr gr - -% arrowhead -n 8119 1904 m 8055 2010 l 8061 1886 l 8090 1895 l 8119 1904 l cp gs 0.00 setgray ef gr col0 s -% Polyline -gs clippath -8214 1695 m 8280 1590 l 8271 1713 l 8313 1585 l 8256 1566 l cp -clip -n 8137 2025 m 8280 1590 l gs col0 s gr gr - -% arrowhead -n 8214 1695 m 8280 1590 l 8271 1713 l 8243 1704 l 8214 1695 l cp gs col7 1.00 shd ef gr col0 s -% Polyline -30.000 slw -gs clippath -7687 2205 m 7502 2333 l 7594 2129 l 7410 2351 l 7503 2428 l cp -clip -n 7875 1500 m 7620 1965 l 7845 1920 l 7485 2355 l gs col0 s gr gr - -% arrowhead -15.000 slw -n 7687 2205 m 7502 2333 l 7594 2129 l 7618 2195 l 7687 2205 l cp gs 0.00 setgray ef gr col0 s -/Courier-Bold ff 195.00 scf sf -6094 1379 m -gs 1 -1 sc (x) col0 sh gr -/Courier-Bold ff 195.00 scf sf -7991 2265 m -gs 1 -1 sc (y) col0 sh gr -/Courier-Bold ff 195.00 scf sf -1819 1379 m -gs 1 -1 sc (x) col0 sh gr -/Courier-Bold ff 195.00 scf sf -3716 2265 m -gs 1 -1 sc (y) col0 sh gr -/Courier ff 180.00 scf sf -6459 1335 m -gs 1 -1 sc (x # add_node y) col0 sh gr -/Courier ff 180.00 scf sf -2214 1365 m -gs 1 -1 sc (x # add_node y) col0 sh gr -$F2psEnd -rs - -%%EndDocument - @endspecial 396 4165 a - currentpoint currentpoint translate 1 1 div 1 1 div scale neg exch -neg exch translate - 396 4165 a 357 x Fv(The)g("delete")g(operation) -e(simply)i(remo)o(v)o(es)f(the)h(links)g(between)f(tw)o(o)i(nodes.)e -(In)h(the)g(picture)f(\()p Fr(A)i(deleted)e(node)396 -4629 y(becomes)h(the)g(r)l(oot)g(of)h(the)f(subtr)m(ee)p -Fv(\))g(the)g(node)f Fq(x)i Fv(is)g(deleted)e(from)h(the)g(list)h(of)f -(subnodes)f(of)h Fq(y)p Fv(.)g(After)g(that,)g Fq(x)396 -4737 y Fv(becomes)g(the)g(root)f(of)h(the)g(subtree)g(starting)g(at)g -(this)h(node.)p Black 3800 5278 a Fr(51)p Black eop -%%Page: 52 52 -52 51 bop Black 2225 67 a Fr(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr) -m(esenting)g(the)g(document)p Black 396 579 a Fu(Figur)o(e)g(3-4.)f(A)i -(deleted)f(node)g(becomes)h(the)f(r)o(oot)f(of)h(the)g(subtr)o(ee)396 -1912 y - currentpoint currentpoint translate 1 1 scale neg exch neg exch translate - 396 1912 a @beginspecial 0 @llx 0 @lly 388 @urx -138 @ury 3880 @rwi @setspecial -%%BeginDocument: pic/node_delete.ps -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: src/pic/node_delete.fig -%%Creator: fig2dev Version 3.2 Patchlevel 1 -%%CreationDate: Sun Aug 27 02:05:42 2000 -%%For: gerd@ice (Gerd Stolpmann) -%%Orientation: Portrait -%%BoundingBox: 0 0 388 138 -%%Pages: 0 -%%BeginSetup -%%EndSetup -%%Magnification: 0.8000 -%%EndComments -/$F2psDict 200 dict def -$F2psDict begin -$F2psDict /mtrx matrix put -/col-1 {0 setgray} bind def -/col0 {0.000 0.000 0.000 srgb} bind def -/col1 {0.000 0.000 1.000 srgb} bind def -/col2 {0.000 1.000 0.000 srgb} bind def -/col3 {0.000 1.000 1.000 srgb} bind def -/col4 {1.000 0.000 0.000 srgb} bind def -/col5 {1.000 0.000 1.000 srgb} bind def -/col6 {1.000 1.000 0.000 srgb} bind def -/col7 {1.000 1.000 1.000 srgb} bind def -/col8 {0.000 0.000 0.560 srgb} bind def -/col9 {0.000 0.000 0.690 srgb} bind def -/col10 {0.000 0.000 0.820 srgb} bind def -/col11 {0.530 0.810 1.000 srgb} bind def -/col12 {0.000 0.560 0.000 srgb} bind def -/col13 {0.000 0.690 0.000 srgb} bind def -/col14 {0.000 0.820 0.000 srgb} bind def -/col15 {0.000 0.560 0.560 srgb} bind def -/col16 {0.000 0.690 0.690 srgb} bind def -/col17 {0.000 0.820 0.820 srgb} bind def -/col18 {0.560 0.000 0.000 srgb} bind def -/col19 {0.690 0.000 0.000 srgb} bind def -/col20 {0.820 0.000 0.000 srgb} bind def -/col21 {0.560 0.000 0.560 srgb} bind def -/col22 {0.690 0.000 0.690 srgb} bind def -/col23 {0.820 0.000 0.820 srgb} bind def -/col24 {0.500 0.190 0.000 srgb} bind def -/col25 {0.630 0.250 0.000 srgb} bind def -/col26 {0.750 0.380 0.000 srgb} bind def -/col27 {1.000 0.500 0.500 srgb} bind def -/col28 {1.000 0.630 0.630 srgb} bind def -/col29 {1.000 0.750 0.750 srgb} bind def -/col30 {1.000 0.880 0.880 srgb} bind def -/col31 {1.000 0.840 0.000 srgb} bind def - -end -save --78.0 205.0 translate -1 -1 scale - -/cp {closepath} bind def -/ef {eofill} bind def -/gr {grestore} bind def -/gs {gsave} bind def -/sa {save} bind def -/rs {restore} bind def -/l {lineto} bind def -/m {moveto} bind def -/rm {rmoveto} bind def -/n {newpath} bind def -/s {stroke} bind def -/sh {show} bind def -/slc {setlinecap} bind def -/slj {setlinejoin} bind def -/slw {setlinewidth} bind def -/srgb {setrgbcolor} bind def -/rot {rotate} bind def -/sc {scale} bind def -/sd {setdash} bind def -/ff {findfont} bind def -/sf {setfont} bind def -/scf {scalefont} bind def -/sw {stringwidth} bind def -/tr {translate} bind def -/tnt {dup dup currentrgbcolor - 4 -2 roll dup 1 exch sub 3 -1 roll mul add - 4 -2 roll dup 1 exch sub 3 -1 roll mul add - 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} - bind def -/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul - 4 -2 roll mul srgb} bind def - /DrawEllipse { - /endangle exch def - /startangle exch def - /yrad exch def - /xrad exch def - /y exch def - /x exch def - /savematrix mtrx currentmatrix def - x y tr xrad yrad sc 0 0 1 startangle endangle arc - closepath - savematrix setmatrix - } def - -/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def -/$F2psEnd {$F2psEnteredState restore end} def -%%EndProlog - -$F2psBegin -10 setmiterlimit -n -1000 5062 m -1000 -1000 l 10237 -1000 l 10237 5062 l cp clip - 0.05039 0.05039 sc -7.500 slw -% Ellipse -n 2700 2700 229 229 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr - -% Ellipse -n 2250 3600 229 229 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr - -% Ellipse -n 3150 3600 229 229 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr - -% Polyline -gs clippath -2322 3272 m 2235 3360 l 2271 3242 l 2202 3358 l 2253 3388 l cp -clip -n 2535 2857 m 2235 3360 l gs col0 s gr gr - -% arrowhead -n 2322 3272 m 2235 3360 l 2271 3242 l 2296 3257 l 2322 3272 l cp gs 0.00 setgray ef gr col0 s -% Polyline -gs clippath -2978 3298 m 3000 3420 l 2924 3323 l 2979 3446 l 3034 3421 l cp -clip -n 2782 2932 m 3000 3420 l gs col0 s gr gr - -% arrowhead -n 2978 3298 m 3000 3420 l 2924 3323 l 2951 3310 l 2978 3298 l cp gs 0.00 setgray ef gr col0 s -% Polyline -gs clippath -2500 2998 m 2587 2910 l 2552 3029 l 2620 2912 l 2569 2882 l cp -clip -n 2317 3367 m 2587 2910 l gs col0 s gr gr - -% arrowhead -n 2500 2998 m 2587 2910 l 2552 3029 l 2526 3013 l 2500 2998 l cp gs col7 1.00 shd ef gr col0 s -% Polyline -gs clippath -2864 3009 m 2842 2887 l 2918 2984 l 2863 2861 l 2808 2886 l cp -clip -n 3060 3375 m 2842 2887 l gs col0 s gr gr - -% arrowhead -n 2864 3009 m 2842 2887 l 2918 2984 l 2891 2997 l 2864 3009 l cp gs col7 1.00 shd ef gr col0 s -% Ellipse -n 2700 1800 229 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 2025 2700 229 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 3375 2700 229 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 6345 1800 229 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 5670 2700 229 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 7020 2700 229 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 8325 1800 229 229 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr - -% Ellipse -n 7875 2700 229 229 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr - -% Ellipse -n 8775 2700 229 229 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr - -% Polyline -gs clippath -2707 2152 m 2737 2032 l 2767 2152 l 2767 2017 l 2707 2017 l cp -clip -n 2737 2460 m 2737 2032 l gs col0 s gr gr - -% arrowhead -n 2707 2152 m 2737 2032 l 2767 2152 l 2737 2152 l 2707 2152 l cp gs col7 1.00 shd ef gr col0 s -% Polyline -gs clippath -2692 2347 m 2662 2467 l 2632 2347 l 2632 2482 l 2692 2482 l cp -clip -n 2662 2032 m 2662 2467 l gs col0 s gr gr - -% arrowhead -n 2692 2347 m 2662 2467 l 2632 2347 l 2662 2347 l 2692 2347 l cp gs 0.00 setgray ef gr col0 s -% Polyline -1 slj -60.000 slw -n 4050 2610 m 4725 2610 l gs col0 s gr -% Polyline -n 4050 2745 m 4725 2745 l gs col0 s gr -% Polyline -1 slc -n 4500 2385 m 4950 2655 l 4500 2970 l gs col0 s gr -% Polyline -0 slj -0 slc -7.500 slw -gs clippath -2125 2394 m 2025 2467 l 2078 2355 l 1992 2459 l 2039 2498 l cp -clip -n 2490 1905 m 2025 2467 l gs col0 s gr gr - -% arrowhead -n 2125 2394 m 2025 2467 l 2078 2355 l 2101 2375 l 2125 2394 l cp gs 0.00 setgray ef gr col0 s -% Polyline -gs clippath -3158 2426 m 3202 2542 l 3109 2461 l 3186 2571 l 3235 2537 l cp -clip -n 2827 2002 m 3202 2542 l gs col0 s gr gr - -% arrowhead -n 3158 2426 m 3202 2542 l 3109 2461 l 3134 2443 l 3158 2426 l cp gs 0.00 setgray ef gr col0 s -% Polyline -gs clippath -2436 2039 m 2535 1965 l 2482 2077 l 2568 1972 l 2521 1934 l cp -clip -n 2115 2475 m 2535 1965 l gs col0 s gr gr - -% arrowhead -n 2436 2039 m 2535 1965 l 2482 2077 l 2459 2058 l 2436 2039 l cp gs col7 1.00 shd ef gr col0 s -% Polyline -gs clippath -2916 2073 m 2872 1957 l 2965 2038 l 2888 1928 l 2839 1962 l cp -clip -n 3255 2505 m 2872 1957 l gs col0 s gr gr - -% arrowhead -n 2916 2073 m 2872 1957 l 2965 2038 l 2941 2055 l 2916 2073 l cp gs col7 1.00 shd ef gr col0 s -% Polyline -gs clippath -5770 2394 m 5670 2467 l 5723 2355 l 5637 2459 l 5684 2498 l cp -clip -n 6135 1905 m 5670 2467 l gs col0 s gr gr - -% arrowhead -n 5770 2394 m 5670 2467 l 5723 2355 l 5746 2375 l 5770 2394 l cp gs 0.00 setgray ef gr col0 s -% Polyline -gs clippath -6803 2426 m 6847 2542 l 6754 2461 l 6831 2571 l 6880 2537 l cp -clip -n 6472 2002 m 6847 2542 l gs col0 s gr gr - -% arrowhead -n 6803 2426 m 6847 2542 l 6754 2461 l 6779 2443 l 6803 2426 l cp gs 0.00 setgray ef gr col0 s -% Polyline -gs clippath -6081 2039 m 6180 1965 l 6127 2077 l 6213 1972 l 6166 1934 l cp -clip -n 5760 2475 m 6180 1965 l gs col0 s gr gr - -% arrowhead -n 6081 2039 m 6180 1965 l 6127 2077 l 6104 2058 l 6081 2039 l cp gs col7 1.00 shd ef gr col0 s -% Polyline -gs clippath -6561 2073 m 6517 1957 l 6610 2038 l 6533 1928 l 6484 1962 l cp -clip -n 6900 2505 m 6517 1957 l gs col0 s gr gr - -% arrowhead -n 6561 2073 m 6517 1957 l 6610 2038 l 6586 2055 l 6561 2073 l cp gs col7 1.00 shd ef gr col0 s -% Polyline -gs clippath -7947 2372 m 7860 2460 l 7896 2342 l 7827 2458 l 7878 2488 l cp -clip -n 8160 1957 m 7860 2460 l gs col0 s gr gr - -% arrowhead -n 7947 2372 m 7860 2460 l 7896 2342 l 7921 2357 l 7947 2372 l cp gs 0.00 setgray ef gr col0 s -% Polyline -gs clippath -8603 2398 m 8625 2520 l 8549 2423 l 8604 2546 l 8659 2521 l cp -clip -n 8407 2032 m 8625 2520 l gs col0 s gr gr - -% arrowhead -n 8603 2398 m 8625 2520 l 8549 2423 l 8576 2410 l 8603 2398 l cp gs 0.00 setgray ef gr col0 s -% Polyline -gs clippath -8125 2098 m 8212 2010 l 8177 2129 l 8245 2012 l 8194 1982 l cp -clip -n 7942 2467 m 8212 2010 l gs col0 s gr gr - -% arrowhead -n 8125 2098 m 8212 2010 l 8177 2129 l 8151 2113 l 8125 2098 l cp gs col7 1.00 shd ef gr col0 s -% Polyline -gs clippath -8489 2109 m 8467 1987 l 8543 2084 l 8488 1961 l 8433 1986 l cp -clip -n 8685 2475 m 8467 1987 l gs col0 s gr gr - -% arrowhead -n 8489 2109 m 8467 1987 l 8543 2084 l 8516 2097 l 8489 2109 l cp gs col7 1.00 shd ef gr col0 s -/Courier ff 180.00 scf sf -3960 2250 m -gs 1 -1 sc (x # delete) col0 sh gr -% Polyline -1 slj -1 slc -45.000 slw -n 2595 2362 m 2820 2137 l gs col0 s gr -% Polyline -n 2595 2137 m 2820 2362 l gs col0 s gr -% Polyline -0 slj -0 slc -7.500 slw -n 1575 1350 m 9225 1350 l 9225 4050 l 1575 4050 l cp gs col0 s gr -/Courier-Bold ff 180.00 scf sf -2640 2752 m -gs 1 -1 sc (x) col0 sh gr -/Courier-Bold ff 180.00 scf sf -8280 1845 m -gs 1 -1 sc (x) col0 sh gr -/Courier-Bold ff 180.00 scf sf -2655 1845 m -gs 1 -1 sc (y) col0 sh gr -/Courier-Bold ff 180.00 scf sf -6300 1845 m -gs 1 -1 sc (y) col0 sh gr -$F2psEnd -rs - -%%EndDocument - @endspecial 396 1912 a - currentpoint currentpoint translate 1 1 div 1 1 div scale neg exch -neg exch translate - 396 1912 a 357 x Fv(It)g(is)h(also)e(possible)h -(to)f(mak)o(e)h(a)g(clone)e(of)i(a)g(subtree;)f(illustrated)g(in)h -Fr(The)f(clone)g(of)h(a)f(subtr)m(ee)p Fv(.)h(In)f(this)h(case,)g(the)f -(clone)396 2377 y(is)i(a)g(cop)o(y)e(of)h(the)g(original)f(subtree)h(e) -o(xcept)f(that)h(it)h(is)h(no)d(longer)g(a)i(subnode.)d(Because)i -(cloning)f(ne)n(v)o(er)g(k)o(eeps)h(the)396 2485 y(connection)e(to)j -(the)f(parent,)f(the)h(clones)g(are)g(called)g Fr(orphaned)r -Fv(.)396 2717 y Fu(Figur)o(e)g(3-5.)f(The)i(clone)f(of)g(a)g(subtr)o -(ee)396 4050 y - currentpoint currentpoint translate 1 1 scale neg exch neg exch translate - 396 4050 a @beginspecial 0 @llx 0 @lly -388 @urx 138 @ury 3880 @rwi @setspecial -%%BeginDocument: pic/node_clone.ps -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: src/pic/node_clone.fig -%%Creator: fig2dev Version 3.2 Patchlevel 1 -%%CreationDate: Sun Aug 27 02:05:42 2000 -%%For: gerd@ice (Gerd Stolpmann) -%%Orientation: Portrait -%%BoundingBox: 0 0 388 138 -%%Pages: 0 -%%BeginSetup -%%EndSetup -%%Magnification: 0.8000 -%%EndComments -/$F2psDict 200 dict def -$F2psDict begin -$F2psDict /mtrx matrix put -/col-1 {0 setgray} bind def -/col0 {0.000 0.000 0.000 srgb} bind def -/col1 {0.000 0.000 1.000 srgb} bind def -/col2 {0.000 1.000 0.000 srgb} bind def -/col3 {0.000 1.000 1.000 srgb} bind def -/col4 {1.000 0.000 0.000 srgb} bind def -/col5 {1.000 0.000 1.000 srgb} bind def -/col6 {1.000 1.000 0.000 srgb} bind def -/col7 {1.000 1.000 1.000 srgb} bind def -/col8 {0.000 0.000 0.560 srgb} bind def -/col9 {0.000 0.000 0.690 srgb} bind def -/col10 {0.000 0.000 0.820 srgb} bind def -/col11 {0.530 0.810 1.000 srgb} bind def -/col12 {0.000 0.560 0.000 srgb} bind def -/col13 {0.000 0.690 0.000 srgb} bind def -/col14 {0.000 0.820 0.000 srgb} bind def -/col15 {0.000 0.560 0.560 srgb} bind def -/col16 {0.000 0.690 0.690 srgb} bind def -/col17 {0.000 0.820 0.820 srgb} bind def -/col18 {0.560 0.000 0.000 srgb} bind def -/col19 {0.690 0.000 0.000 srgb} bind def -/col20 {0.820 0.000 0.000 srgb} bind def -/col21 {0.560 0.000 0.560 srgb} bind def -/col22 {0.690 0.000 0.690 srgb} bind def -/col23 {0.820 0.000 0.820 srgb} bind def -/col24 {0.500 0.190 0.000 srgb} bind def -/col25 {0.630 0.250 0.000 srgb} bind def -/col26 {0.750 0.380 0.000 srgb} bind def -/col27 {1.000 0.500 0.500 srgb} bind def -/col28 {1.000 0.630 0.630 srgb} bind def -/col29 {1.000 0.750 0.750 srgb} bind def -/col30 {1.000 0.880 0.880 srgb} bind def -/col31 {1.000 0.840 0.000 srgb} bind def - -end -save --78.0 205.0 translate -1 -1 scale - -/cp {closepath} bind def -/ef {eofill} bind def -/gr {grestore} bind def -/gs {gsave} bind def -/sa {save} bind def -/rs {restore} bind def -/l {lineto} bind def -/m {moveto} bind def -/rm {rmoveto} bind def -/n {newpath} bind def -/s {stroke} bind def -/sh {show} bind def -/slc {setlinecap} bind def -/slj {setlinejoin} bind def -/slw {setlinewidth} bind def -/srgb {setrgbcolor} bind def -/rot {rotate} bind def -/sc {scale} bind def -/sd {setdash} bind def -/ff {findfont} bind def -/sf {setfont} bind def -/scf {scalefont} bind def -/sw {stringwidth} bind def -/tr {translate} bind def -/tnt {dup dup currentrgbcolor - 4 -2 roll dup 1 exch sub 3 -1 roll mul add - 4 -2 roll dup 1 exch sub 3 -1 roll mul add - 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} - bind def -/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul - 4 -2 roll mul srgb} bind def - /DrawEllipse { - /endangle exch def - /startangle exch def - /yrad exch def - /xrad exch def - /y exch def - /x exch def - /savematrix mtrx currentmatrix def - x y tr xrad yrad sc 0 0 1 startangle endangle arc - closepath - savematrix setmatrix - } def - -/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def -/$F2psEnd {$F2psEnteredState restore end} def -%%EndProlog - -$F2psBegin -10 setmiterlimit -n -1000 5062 m -1000 -1000 l 10237 -1000 l 10237 5062 l cp clip - 0.05039 0.05039 sc -7.500 slw -% Ellipse -n 2700 1800 229 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 2025 2700 229 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 3375 2700 229 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 6345 1800 229 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 5670 2700 229 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 7020 2700 229 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 8325 1800 229 229 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr - -% Ellipse -n 7875 2700 229 229 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr - -% Ellipse -n 8775 2700 229 229 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr - -% Ellipse -n 6345 2700 229 229 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr - -% Ellipse -n 5895 3600 229 229 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr - -% Ellipse -n 6795 3600 229 229 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr - -% Ellipse -n 2700 2700 229 229 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr - -% Ellipse -n 2250 3600 229 229 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr - -% Ellipse -n 3150 3600 229 229 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr - -% Polyline -1 slj -60.000 slw -n 4050 2610 m 4725 2610 l gs col0 s gr -% Polyline -n 4050 2745 m 4725 2745 l gs col0 s gr -% Polyline -1 slc -n 4500 2385 m 4950 2655 l 4500 2970 l gs col0 s gr -% Polyline -0 slj -0 slc -7.500 slw -gs clippath -2125 2394 m 2025 2467 l 2078 2355 l 1992 2459 l 2039 2498 l cp -clip -n 2490 1905 m 2025 2467 l gs col0 s gr gr - -% arrowhead -n 2125 2394 m 2025 2467 l 2078 2355 l 2101 2375 l 2125 2394 l cp gs 0.00 setgray ef gr col0 s -% Polyline -gs clippath -3158 2426 m 3202 2542 l 3109 2461 l 3186 2571 l 3235 2537 l cp -clip -n 2827 2002 m 3202 2542 l gs col0 s gr gr - -% arrowhead -n 3158 2426 m 3202 2542 l 3109 2461 l 3134 2443 l 3158 2426 l cp gs 0.00 setgray ef gr col0 s -% Polyline -gs clippath -2436 2039 m 2535 1965 l 2482 2077 l 2568 1972 l 2521 1934 l cp -clip -n 2115 2475 m 2535 1965 l gs col0 s gr gr - -% arrowhead -n 2436 2039 m 2535 1965 l 2482 2077 l 2459 2058 l 2436 2039 l cp gs col7 1.00 shd ef gr col0 s -% Polyline -gs clippath -2916 2073 m 2872 1957 l 2965 2038 l 2888 1928 l 2839 1962 l cp -clip -n 3255 2505 m 2872 1957 l gs col0 s gr gr - -% arrowhead -n 2916 2073 m 2872 1957 l 2965 2038 l 2941 2055 l 2916 2073 l cp gs col7 1.00 shd ef gr col0 s -% Polyline -gs clippath -5770 2394 m 5670 2467 l 5723 2355 l 5637 2459 l 5684 2498 l cp -clip -n 6135 1905 m 5670 2467 l gs col0 s gr gr - -% arrowhead -n 5770 2394 m 5670 2467 l 5723 2355 l 5746 2375 l 5770 2394 l cp gs 0.00 setgray ef gr col0 s -% Polyline -gs clippath -6803 2426 m 6847 2542 l 6754 2461 l 6831 2571 l 6880 2537 l cp -clip -n 6472 2002 m 6847 2542 l gs col0 s gr gr - -% arrowhead -n 6803 2426 m 6847 2542 l 6754 2461 l 6779 2443 l 6803 2426 l cp gs 0.00 setgray ef gr col0 s -% Polyline -gs clippath -6081 2039 m 6180 1965 l 6127 2077 l 6213 1972 l 6166 1934 l cp -clip -n 5760 2475 m 6180 1965 l gs col0 s gr gr - -% arrowhead -n 6081 2039 m 6180 1965 l 6127 2077 l 6104 2058 l 6081 2039 l cp gs col7 1.00 shd ef gr col0 s -% Polyline -gs clippath -6561 2073 m 6517 1957 l 6610 2038 l 6533 1928 l 6484 1962 l cp -clip -n 6900 2505 m 6517 1957 l gs col0 s gr gr - -% arrowhead -n 6561 2073 m 6517 1957 l 6610 2038 l 6586 2055 l 6561 2073 l cp gs col7 1.00 shd ef gr col0 s -% Polyline -gs clippath -7947 2372 m 7860 2460 l 7896 2342 l 7827 2458 l 7878 2488 l cp -clip -n 8160 1957 m 7860 2460 l gs col0 s gr gr - -% arrowhead -n 7947 2372 m 7860 2460 l 7896 2342 l 7921 2357 l 7947 2372 l cp gs 0.00 setgray ef gr col0 s -% Polyline -gs clippath -8603 2398 m 8625 2520 l 8549 2423 l 8604 2546 l 8659 2521 l cp -clip -n 8407 2032 m 8625 2520 l gs col0 s gr gr - -% arrowhead -n 8603 2398 m 8625 2520 l 8549 2423 l 8576 2410 l 8603 2398 l cp gs 0.00 setgray ef gr col0 s -% Polyline -gs clippath -8125 2098 m 8212 2010 l 8177 2129 l 8245 2012 l 8194 1982 l cp -clip -n 7942 2467 m 8212 2010 l gs col0 s gr gr - -% arrowhead -n 8125 2098 m 8212 2010 l 8177 2129 l 8151 2113 l 8125 2098 l cp gs col7 1.00 shd ef gr col0 s -% Polyline -gs clippath -8489 2109 m 8467 1987 l 8543 2084 l 8488 1961 l 8433 1986 l cp -clip -n 8685 2475 m 8467 1987 l gs col0 s gr gr - -% arrowhead -n 8489 2109 m 8467 1987 l 8543 2084 l 8516 2097 l 8489 2109 l cp gs col7 1.00 shd ef gr col0 s -% Polyline -gs clippath -6352 2152 m 6382 2032 l 6412 2152 l 6412 2017 l 6352 2017 l cp -clip -n 6382 2460 m 6382 2032 l gs col0 s gr gr - -% arrowhead -n 6352 2152 m 6382 2032 l 6412 2152 l 6382 2152 l 6352 2152 l cp gs col7 1.00 shd ef gr col0 s -% Polyline -gs clippath -6337 2347 m 6307 2467 l 6277 2347 l 6277 2482 l 6337 2482 l cp -clip -n 6307 2032 m 6307 2467 l gs col0 s gr gr - -% arrowhead -n 6337 2347 m 6307 2467 l 6277 2347 l 6307 2347 l 6337 2347 l cp gs 0.00 setgray ef gr col0 s -% Polyline -gs clippath -5967 3272 m 5880 3360 l 5916 3242 l 5847 3358 l 5898 3388 l cp -clip -n 6180 2857 m 5880 3360 l gs col0 s gr gr - -% arrowhead -n 5967 3272 m 5880 3360 l 5916 3242 l 5941 3257 l 5967 3272 l cp gs 0.00 setgray ef gr col0 s -% Polyline -gs clippath -6623 3298 m 6645 3420 l 6569 3323 l 6624 3446 l 6679 3421 l cp -clip -n 6427 2932 m 6645 3420 l gs col0 s gr gr - -% arrowhead -n 6623 3298 m 6645 3420 l 6569 3323 l 6596 3310 l 6623 3298 l cp gs 0.00 setgray ef gr col0 s -% Polyline -gs clippath -6145 2998 m 6232 2910 l 6197 3029 l 6265 2912 l 6214 2882 l cp -clip -n 5962 3367 m 6232 2910 l gs col0 s gr gr - -% arrowhead -n 6145 2998 m 6232 2910 l 6197 3029 l 6171 3013 l 6145 2998 l cp gs col7 1.00 shd ef gr col0 s -% Polyline -gs clippath -6509 3009 m 6487 2887 l 6563 2984 l 6508 2861 l 6453 2886 l cp -clip -n 6705 3375 m 6487 2887 l gs col0 s gr gr - -% arrowhead -n 6509 3009 m 6487 2887 l 6563 2984 l 6536 2997 l 6509 3009 l cp gs col7 1.00 shd ef gr col0 s -% Polyline -gs clippath -2707 2152 m 2737 2032 l 2767 2152 l 2767 2017 l 2707 2017 l cp -clip -n 2737 2460 m 2737 2032 l gs col0 s gr gr - -% arrowhead -n 2707 2152 m 2737 2032 l 2767 2152 l 2737 2152 l 2707 2152 l cp gs col7 1.00 shd ef gr col0 s -% Polyline -gs clippath -2692 2347 m 2662 2467 l 2632 2347 l 2632 2482 l 2692 2482 l cp -clip -n 2662 2032 m 2662 2467 l gs col0 s gr gr - -% arrowhead -n 2692 2347 m 2662 2467 l 2632 2347 l 2662 2347 l 2692 2347 l cp gs 0.00 setgray ef gr col0 s -% Polyline -gs clippath -2322 3272 m 2235 3360 l 2271 3242 l 2202 3358 l 2253 3388 l cp -clip -n 2535 2857 m 2235 3360 l gs col0 s gr gr - -% arrowhead -n 2322 3272 m 2235 3360 l 2271 3242 l 2296 3257 l 2322 3272 l cp gs 0.00 setgray ef gr col0 s -% Polyline -gs clippath -2978 3298 m 3000 3420 l 2924 3323 l 2979 3446 l 3034 3421 l cp -clip -n 2782 2932 m 3000 3420 l gs col0 s gr gr - -% arrowhead -n 2978 3298 m 3000 3420 l 2924 3323 l 2951 3310 l 2978 3298 l cp gs 0.00 setgray ef gr col0 s -% Polyline -gs clippath -2500 2998 m 2587 2910 l 2552 3029 l 2620 2912 l 2569 2882 l cp -clip -n 2317 3367 m 2587 2910 l gs col0 s gr gr - -% arrowhead -n 2500 2998 m 2587 2910 l 2552 3029 l 2526 3013 l 2500 2998 l cp gs col7 1.00 shd ef gr col0 s -% Polyline -gs clippath -2864 3009 m 2842 2887 l 2918 2984 l 2863 2861 l 2808 2886 l cp -clip -n 3060 3375 m 2842 2887 l gs col0 s gr gr - -% arrowhead -n 2864 3009 m 2842 2887 l 2918 2984 l 2891 2997 l 2864 3009 l cp gs col7 1.00 shd ef gr col0 s -% Polyline -n 1575 1350 m 9225 1350 l 9225 4050 l 1575 4050 l cp gs col0 s gr -/Courier-Bold ff 180.00 scf sf -2655 1845 m -gs 1 -1 sc (y) col0 sh gr -/Courier-Bold ff 180.00 scf sf -6300 1845 m -gs 1 -1 sc (y) col0 sh gr -/Courier-Bold ff 180.00 scf sf -6285 2752 m -gs 1 -1 sc (x) col0 sh gr -/Courier-Bold ff 180.00 scf sf -2640 2752 m -gs 1 -1 sc (x) col0 sh gr -/Courier ff 180.00 scf sf -3690 2025 m -gs 1 -1 sc (let x' =) col0 sh gr -/Courier ff 180.00 scf sf -3690 2205 m -gs 1 -1 sc (x # orphaned_clone) col0 sh gr -/Courier-Bold ff 180.00 scf sf -8235 1845 m -gs 1 -1 sc (x') col0 sh gr -$F2psEnd -rs - -%%EndDocument - @endspecial 396 4050 a - currentpoint currentpoint translate 1 1 div 1 1 div scale neg exch -neg exch translate - 396 4050 a -2 4627 a Fp(3.2.2.)35 -b(The)f(methods)g(of)f(the)h(c)n(lass)h(type)f Fc(node)p -Black 3800 5278 a Fr(52)p Black eop -%%Page: 53 53 -53 52 bop Black 2225 67 a Fr(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr) -m(esenting)g(the)g(document)p Black 396 579 a Fu(General)g(obser)o(v)o -(ers)g(.)p Black 396 866 a Ft(\225)p Black 60 w Fq(extension)p -Fv(:)g(The)f(reference)g(to)h(the)h(e)o(xtension)d(object)i(which)g -(belongs)f(to)h(this)h(node)e(\(see)h(...\).)p Black -396 974 a Ft(\225)p Black 60 w Fq(dtd)p Fv(:)h(Returns)f(a)g(reference) -f(to)h(the)g(global)g(DTD.)g(All)h(nodes)e(of)h(a)h(tree)f(must)g -(share)g(the)g(same)h(DTD.)p Black 396 1082 a Ft(\225)p -Black 60 w Fq(parent)p Fv(:)f(Get)h(the)f(f)o(ather)f(node.)g(Raises)j -Fq(Not_found)d Fv(in)i(the)f(case)g(the)h(node)e(does)h(not)f(ha)n(v)o -(e)h(a)h(parent,)e(i.e.)h(the)479 1190 y(node)f(is)j(the)e(root.)p -Black 396 1298 a Ft(\225)p Black 60 w Fq(root)p Fv(:)g(Gets)h(the)g -(reference)d(to)i(the)h(root)e(node)g(of)h(the)g(tree.)g(Ev)o(ery)f -(node)g(is)i(contained)e(in)h(a)h(tree)f(with)h(a)f(root,)f(so)479 -1406 y(this)h(method)f(al)o(w)o(ays)h(succeeds.)e(Note)i(that)g(this)g -(method)e Fr(sear)m(c)o(hes)h Fv(the)h(root,)e(which)h(costs)h(time)g -(proportional)d(to)479 1514 y(the)j(length)g(of)g(the)g(path)g(to)g -(the)g(root.)p Black 396 1622 a Ft(\225)p Black 60 w -Fq(sub_nodes)p Fv(:)g(Returns)g(references)e(to)j(the)f(children.)f -(The)g(returned)g(list)i(re\003ects)g(the)f(order)f(of)h(the)g -(children.)e(F)o(or)479 1730 y(data)i(nodes,)g(this)g(method)f(returns) -g(the)i(empty)e(list.)p Black 396 1838 a Ft(\225)p Black -60 w Fq(iter_nodes)43 b(f)p Fv(:)21 b(Iterates)f(o)o(v)o(er)f(the)h -(children,)f(and)g(calls)i Fq(f)g Fv(for)e(e)n(v)o(ery)g(child)h(in)g -(turn.)p Black 396 1945 a Ft(\225)p Black 60 w Fq(iter_nodes_sibl)43 -b(f)p Fv(:)20 b(Iterates)g(o)o(v)o(er)f(the)h(children,)f(and)h(calls)g -Fq(f)h Fv(for)f(e)n(v)o(ery)e(child)i(in)h(turn.)e Fq(f)h -Fv(gets)h(as)479 2053 y(ar)o(guments)d(the)j(pre)n(vious)d(node,)h(the) -h(current)f(node,)g(and)h(the)g(ne)o(xt)f(node.)p Black -396 2161 a Ft(\225)p Black 60 w Fq(node_type)p Fv(:)h(Returns)g(either) -f Fq(T_data)h Fv(which)g(means)g(that)g(the)g(node)f(is)i(a)g(data)f -(node,)f(or)h Fq(T_element)43 b(n)479 2269 y Fv(which)20 -b(means)g(that)g(the)g(node)f(is)j(an)e(element)f(of)h(type)g -Fq(n)p Fv(.)g(If)g(con\002gured,)e(possible)i(node)f(types)h(are)g -(also)479 2377 y Fq(T_pinstr)44 b(t)20 b Fv(indicating)f(that)h(the)h -(node)e(represents)g(a)i(processing)e(instruction)g(with)h(tar)o(get)f -Fq(t)p Fv(,)i(and)479 2485 y Fq(T_comment)f Fv(in)g(which)g(case)g(the) -g(node)g(is)h(a)f(comment.)p Black 396 2593 a Ft(\225)p -Black 60 w Fq(encoding)p Fv(:)g(Returns)g(the)g(encoding)e(of)i(the)g -(strings.)p Black 396 2701 a Ft(\225)p Black 60 w Fq(data)p -Fv(:)g(Returns)g(the)h(character)e(data)h(of)g(this)g(node)f(and)h(all) -h(children,)d(concatenated)h(as)i(one)e(string.)h(The)479 -2809 y(encoding)e(of)i(the)h(string)e(is)j(what)e(the)g(method)f -Fq(encoding)g Fv(returns.)g(-)i(F)o(or)e(data)h(nodes,)g(this)g(method) -f(simply)479 2917 y(returns)h(the)g(represented)e(characters.)h(F)o(or) -h(elements,)g(the)g(meaning)f(of)g(the)i(method)d(has)j(been)e(e)o -(xtended)g(such)479 3025 y(that)i(it)f(returns)g(something)e(useful,)i -(i.e.)g(the)g(ef)n(fecti)n(v)o(ely)f(contained)f(characters,)h(without) -h(markup.)e(\(F)o(or)479 3133 y Fq(T_pinstr)i Fv(and)f -Fq(T_comment)h Fv(nodes,)f(the)h(method)f(returns)g(the)h(empty)g -(string.\))p Black 396 3241 a Ft(\225)p Black 60 w Fq(position)p -Fv(:)g(If)g(con\002gured,)d(this)k(method)e(returns)g(the)h(position)g -(of)g(the)g(element)g(as)g(triple)g(\(entity)-5 b(,)19 -b(line,)479 3349 y(byteposition\).)f(F)o(or)i(data)g(nodes,)f(the)h -(position)g(is)h(not)f(stored.)f(If)h(the)g(position)g(is)h(not)f(a)n -(v)n(ailable)f(the)i(triple)f Fq("?",)479 3456 y(0,)45 -b(0)20 b Fv(is)h(returned.)p Black 396 3564 a Ft(\225)p -Black 60 w Fq(comment)p Fv(:)f(Returns)g Fq(Some)44 b(text)20 -b Fv(for)f(comment)g(nodes,)g(and)g Fq(None)h Fv(for)g(other)f(nodes.)g -(The)h Fq(text)f Fv(is)i(e)n(v)o(erything)479 3672 y(between)f(the)g -(comment)f(delimiters)g Fo(<)p Fq(-)i Fv(and)e Fq(-)p -Fo(>)p Fv(.)p Black 396 3780 a Ft(\225)p Black 60 w Fq(pinstr)44 -b(n)p Fv(:)21 b(Returns)f(all)h(processing)d(instructions)i(that)g(are) -g(directly)f(contained)g(in)h(this)h(element)e(and)h(that)g(ha)n(v)o(e) -479 3888 y(a)h Fr(tar)m(g)o(et)h Fv(speci\002cation)d(of)h -Fq(n)p Fv(.)g(The)g(tar)o(get)f(is)j(the)e(\002rst)h(w)o(ord)e(after)h -(the)g Fo(<)p Fq(?)p Fv(.)p Black 396 3996 a Ft(\225)p -Black 60 w Fq(pinstr_names)p Fv(:)f(Returns)h(the)g(list)i(of)e(all)g -(tar)o(gets)g(of)g(processing)f(instructions)g(directly)g(contained)g -(in)h(this)479 4104 y(element.)p Black 396 4212 a Ft(\225)p -Black 60 w Fq(write)44 b(s)h(enc)p Fv(:)20 b(Prints)h(the)f(node)f(and) -h(all)h(subnodes)d(to)j(the)f(passed)g(output)f(stream)h(as)h(v)n(alid) -f(XML)g(te)o(xt,)g(using)479 4320 y(the)g(passed)h(e)o(xternal)e -(encoding.)396 4511 y Fu(Attrib)n(ute)h(obser)o(v)o(ers)h(.)p -Black 396 4743 a Ft(\225)p Black 60 w Fq(attribute)44 -b(n)p Fv(:)20 b(Returns)g(the)h(v)n(alue)e(of)h(the)g(attrib)n(ute)g -(with)g(name)g Fq(n)p Fv(.)g(This)h(method)d(returns)i(a)g(v)n(alue)g -(for)f(e)n(v)o(ery)479 4851 y(declared)g(attrib)n(ute,)h(and)f(it)i -(raises)g Fq(Not_found)e Fv(for)h(an)o(y)f(undeclared)f(attrib)n(ute.)i -(Note)g(that)g(it)h(e)n(v)o(en)e(returns)h(a)p Black -3800 5278 a Fr(53)p Black eop -%%Page: 54 54 -54 53 bop Black 2225 67 a Fr(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr) -m(esenting)g(the)g(document)p Black 479 579 a Fv(v)n(alue)g(if)g(the)g -(attrib)n(ute)g(is)h(actually)f(missing)g(b)n(ut)g(is)h(declared)e(as)i -Fq(#IMPLIED)f Fv(or)g(has)g(a)h(def)o(ault)e(v)n(alue.)g(-)i(Possible) -479 687 y(v)n(alues)f(are:)p Black 479 919 a Fa(\225)p -Black 62 w Fq(Implied_value)p Fv(:)f(The)h(attrib)n(ute)g(has)g(been)g -(declared)e(with)j(the)f(k)o(e)o(yw)o(ord)e Fq(#IMPLIED)p -Fv(,)i(and)f(the)h(attrib)n(ute)g(is)562 1027 y(missing)g(in)h(the)f -(attrib)n(ute)g(list)h(of)f(this)h(element.)p Black 479 -1135 a Fa(\225)p Black 62 w Fq(Value)44 b(s)p Fv(:)21 -b(The)f(attrib)n(ute)g(has)g(been)g(declared)e(as)j(type)f -Fq(CDATA)p Fv(,)g(as)h Fq(ID)p Fv(,)f(as)h Fq(IDREF)p -Fv(,)e(as)i Fq(ENTITY)p Fv(,)f(or)g(as)562 1243 y Fq(NMTOKEN)p -Fv(,)g(or)g(as)g(enumeration)e(or)i(notation,)f(and)g(one)h(of)g(the)g -(tw)o(o)h(conditions)d(holds:)i(\(1\))g(The)g(attrib)n(ute)562 -1351 y(v)n(alue)g(is)h(present)e(in)i(the)f(attrib)n(ute)g(list)h(in)f -(which)g(case)h(the)f(v)n(alue)f(is)j(returned)c(in)i(the)h(string)e -Fq(s)p Fv(.)i(\(2\))e(The)562 1459 y(attrib)n(ute)h(has)h(been)e -(omitted,)g(and)h(the)g(DTD)g(declared)f(the)i(attrib)n(ute)e(with)i(a) -f(def)o(ault)g(v)n(alue.)f(The)h(def)o(ault)562 1567 -y(v)n(alue)f(is)i(returned)d(in)i Fq(s)p Fv(.)g(-)g(Summarized,)d -Fq(Value)44 b(s)20 b Fv(is)h(returned)d(for)h(non-implied,)e(non-list)i -(attrib)n(ute)g(v)n(alues.)p Black 479 1675 a Fa(\225)p -Black 62 w Fq(Valuelist)44 b(l)p Fv(:)20 b(The)g(attrib)n(ute)g(has)g -(been)g(declared)f(as)i(type)e Fq(IDREFS)p Fv(,)h(as)h -Fq(ENTITIES)p Fv(,)e(or)h(as)h Fq(NMTOKENS)p Fv(,)562 -1783 y(and)f(one)g(of)f(the)i(tw)o(o)f(conditions)f(holds:)h(\(1\))f -(The)h(attrib)n(ute)g(v)n(alue)f(is)i(present)f(in)g(the)h(attrib)n -(ute)e(list)j(in)e(which)562 1891 y(case)h(the)f(space-separated)e(tok) -o(ens)i(of)g(the)g(v)n(alue)g(are)g(returned)e(in)j(the)f(string)g -(list)h Fq(l)p Fv(.)f(\(2\))g(The)g(attrib)n(ute)g(has)562 -1999 y(been)g(omitted,)f(and)h(the)g(DTD)g(declared)f(the)h(attrib)n -(ute)g(with)h(a)f(def)o(ault)g(v)n(alue.)f(The)h(def)o(ault)f(v)n(alue) -h(is)h(returned)562 2107 y(in)g Fq(l)p Fv(.)f(-)g(Summarized,)f -Fq(Valuelist)43 b(l)20 b Fv(is)i(returned)c(for)i(all)g(list-type)g -(attrib)n(ute)g(v)n(alues.)396 2256 y(Note)g(that)h(before)d(the)j -(attrib)n(ute)f(v)n(alue)f(is)i(returned,)d(the)i(v)n(alue)g(is)h -(normalized.)d(This)j(means)e(that)i(ne)n(wlines)e(are)479 -2364 y(con)m(v)o(erted)f(to)i(spaces,)g(and)g(that)g(references)f(to)h -(character)f(entities)i(\(i.e.)f Fq(&#)p Fn(n)p Fq(;)p -Fv(\))g(and)f(general)g(entities)i(\(i.e.)479 2472 y -Fq(&)p Fn(name)p Fq(;)p Fv(\))f(are)g(e)o(xpanded;)e(if)i(necessary)-5 -b(,)19 b(e)o(xpansion)f(is)j(performed)d(recursi)n(v)o(ely)-5 -b(.)479 2621 y(In)20 b(well-formedness)e(mode,)h(there)h(is)h(no)f(DTD) -g(which)g(could)f(declare)h(an)g(attrib)n(ute.)f(Because)i(of)f(this,)g -(e)n(v)o(ery)479 2729 y(occuring)f(attrib)n(ute)g(is)i(considered)e(as) -i(a)f(CD)m(A)-9 b(T)h(A)21 b(attrib)n(ute.)p Black 396 -2879 a Ft(\225)p Black 60 w Fq(required_string_attribute)41 -b(n)p Fv(:)21 b(returns)e(the)h(V)-9 b(alue)20 b(attrib)n(ute)g(called) -g(n,)g(or)g(the)g(V)-9 b(aluelist)20 b(attrib)n(ute)g(as)h(a)479 -2987 y(string)f(where)g(the)g(list)h(elements)f(are)g(separated)f(by)h -(spaces.)g(If)h(the)f(attrib)n(ute)g(v)n(alue)f(is)i(implied,)e(or)h -(if)h(the)479 3094 y(attrib)n(ute)f(does)g(not)g(e)o(xists,)g(the)g -(method)f(will)i(f)o(ail.)g(-)f(This)g(method)f(is)i(con)m(v)o(enient)d -(if)i(you)g(e)o(xpect)f(a)h(non-implied)479 3202 y(and)g(non-list)f -(attrib)n(ute)h(v)n(alue.)p Black 396 3310 a Ft(\225)p -Black 60 w Fq(optional_string_attribute)41 b(n)p Fv(:)21 -b(returns)e(the)h(V)-9 b(alue)20 b(attrib)n(ute)g(called)g(n,)g(or)g -(the)g(V)-9 b(aluelist)20 b(attrib)n(ute)g(as)h(a)479 -3418 y(string)f(where)g(the)g(list)h(elements)f(are)g(separated)f(by)h -(spaces.)g(If)h(the)f(attrib)n(ute)g(v)n(alue)f(is)i(implied,)e(or)h -(if)h(the)479 3526 y(attrib)n(ute)f(does)g(not)g(e)o(xists,)g(the)g -(method)f(returns)h(None.)f(-)h(This)h(method)e(is)i(con)m(v)o(enient)c -(if)k(you)e(e)o(xpect)g(a)i(non-list)479 3634 y(attrib)n(ute)f(v)n -(alue)g(including)e(the)i(implied)g(v)n(alue.)p Black -396 3742 a Ft(\225)p Black 60 w Fq(required_list_attribute)41 -b(n)p Fv(:)20 b(returns)f(the)g(V)-9 b(aluelist)20 b(attrib)n(ute)f -(called)g(n,)g(or)g(the)h(V)-9 b(alue)19 b(attrib)n(ute)g(as)h(a)g -(list)479 3850 y(with)h(a)f(single)g(element.)g(If)g(the)g(attrib)n -(ute)g(v)n(alue)f(is)i(implied,)f(or)g(if)g(the)g(attrib)n(ute)g(does)g -(not)g(e)o(xists,)g(the)g(method)479 3958 y(will)h(f)o(ail.)g(-)f(This) -g(method)f(is)i(con)m(v)o(enient)d(if)i(you)g(e)o(xpect)f(a)h(list)i -(attrib)n(ute)d(v)n(alue.)p Black 396 4066 a Ft(\225)p -Black 60 w Fq(optional_list_attribute)41 b(n)p Fv(:)20 -b(returns)f(the)g(V)-9 b(aluelist)20 b(attrib)n(ute)f(called)g(n,)g(or) -g(the)h(V)-9 b(alue)19 b(attrib)n(ute)g(as)h(a)g(list)479 -4174 y(with)h(a)f(single)g(element.)g(If)g(the)g(attrib)n(ute)g(v)n -(alue)f(is)i(implied,)f(or)g(if)g(the)g(attrib)n(ute)g(does)g(not)g(e)o -(xists,)g(an)g(empty)g(list)479 4282 y(will)h(be)f(returned.)e(-)j -(This)f(method)f(is)i(con)m(v)o(enient)d(if)i(you)f(e)o(xpect)h(a)g -(list)i(attrib)n(ute)d(v)n(alue)h(or)g(the)g(implied)f(v)n(alue.)p -Black 396 4390 a Ft(\225)p Black 60 w Fq(attribute_names)p -Fv(:)g(returns)g(the)h(list)h(of)f(all)h(attrib)n(ute)f(names)g(of)g -(this)g(element.)g(As)h(this)f(is)i(a)e(v)n(alidating)479 -4498 y(parser)m(,)f(this)i(list)g(is)g(equal)f(to)g(the)h(list)g(of)f -(declared)f(attrib)n(utes.)p Black 396 4605 a Ft(\225)p -Black 60 w Fq(attribute_type)43 b(n)p Fv(:)20 b(returns)g(the)g(type)g -(of)g(the)g(attrib)n(ute)g(called)g Fq(n)p Fv(.)g(See)h(the)f(module)f -Fq(Pxp_types)g Fv(for)g(a)479 4713 y(description)g(of)h(the)g(encoding) -e(of)i(the)g(types.)p Black 396 4821 a Ft(\225)p Black -60 w Fq(attributes)p Fv(:)f(returns)h(the)g(list)h(of)f(pairs)g(of)g -(names)g(and)g(v)n(alues)g(for)f(all)i(attrib)n(utes)f(of)g(this)h -(element.)p Black 3800 5278 a Fr(54)p Black eop -%%Page: 55 55 -55 54 bop Black 2225 67 a Fr(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr) -m(esenting)g(the)g(document)p Black Black 396 579 a Ft(\225)p -Black 60 w Fq(id_attribute_name)p Fv(:)e(returns)h(the)i(name)e(of)h -(the)g(attrib)n(ute)g(that)g(is)h(declared)e(with)h(type)g(ID.)g(There) -f(is)i(at)g(most)479 687 y(one)f(such)g(attrib)n(ute.)f(The)h(method)f -(raises)i Fq(Not_found)e Fv(if)i(there)e(is)i(no)f(declared)f(ID)i -(attrib)n(ute)e(for)h(the)g(element)479 795 y(type.)p -Black 396 903 a Ft(\225)p Black 60 w Fq(id_attribute_value)p -Fv(:)e(returns)h(the)i(v)n(alue)e(of)h(the)g(attrib)n(ute)g(that)g(is)h -(declared)e(with)i(type)e(ID.)i(There)e(is)i(at)479 1011 -y(most)g(one)e(such)h(attrib)n(ute.)g(The)g(method)e(raises)j -Fq(Not_found)e Fv(if)i(there)f(is)h(no)e(declared)g(ID)i(attrib)n(ute)f -(for)f(the)479 1119 y(element)h(type.)p Black 396 1226 -a Ft(\225)p Black 60 w Fq(idref_attribute_names)p Fv(:)d(returns)h(the) -h(list)i(of)e(attrib)n(ute)f(names)h(that)h(are)f(declared)f(as)i -(IDREF)f(or)g(IDREFS.)396 1417 y Fu(Modifying)h(methods)h(.)f -Fv(The)g(follo)n(wing)f(methods)g(are)h(only)f(de\002ned)g(for)h -(element)f(nodes)h(\(more)f(e)o(xactly:)g(the)396 1525 -y(methods)g(are)i(de\002ned)e(for)g(data)h(nodes,)f(too,)h(b)n(ut)g(f)o -(ail)h(al)o(w)o(ays\).)p Black 396 1758 a Ft(\225)p Black -60 w Fq(add_node)44 b(sn)p Fv(:)20 b(Adds)g(sub)g(node)g -Fq(sn)g Fv(to)g(the)g(list)i(of)e(children.)e(This)j(operation)d(is)j -(illustrated)f(in)g(the)g(picture)g Fr(A)479 1866 y(node)f(can)h(only)g -(be)g(added)f(if)h(it)h(is)h(a)e(r)l(oot)q Fv(.)g(This)h(method)e(e)o -(xpects)g(that)h Fq(sn)h Fv(is)g(a)g(root,)e(and)g(it)i(requires)f -(that)g Fq(sn)g Fv(and)479 1974 y(the)g(current)f(object)h(share)g(the) -g(same)h(DTD.)479 2123 y(Because)g Fq(add_node)e Fv(is)i(the)f(method)f -(the)h(parser)g(itself)h(uses)g(to)f(add)g(ne)n(w)g(nodes)f(to)h(the)h -(tree,)e(it)i(performs)e(by)479 2231 y(def)o(ault)h(some)g(simple)g(v)n -(alidation)f(checks:)g(If)h(the)h(content)e(model)g(is)i(a)g(re)o -(gular)e(e)o(xpression,)f(it)j(is)g(not)f(allo)n(wed)f(to)479 -2339 y(add)h(data)g(nodes)f(to)i(this)g(node)e(unless)h(the)g(ne)n(w)g -(nodes)g(consist)g(only)f(of)h(whitespace.)g(In)g(this)g(case,)h(the)f -(ne)n(w)g(data)479 2447 y(nodes)g(are)g(silently)g(dropped)e(\(you)h -(can)h(change)f(this)h(by)g(in)m(v)n(oking)e Fq -(keep_always_whitespace_mode)p Fv(\).)479 2596 y(If)i(the)h(document)d -(is)j(\003agged)e(as)i(stand-alone,)d(these)j(data)f(nodes)f(only)g -(containing)g(whitespace)g(are)h(e)n(v)o(en)479 2704 -y(forbidden)e(if)i(the)h(element)e(declaration)g(is)i(contained)d(in)j -(an)f(e)o(xternal)f(entity)-5 b(.)19 b(This)h(case)h(is)g(detected)f -(and)479 2812 y(rejected.)479 2962 y(If)g(the)h(content)e(model)g(is)i -Fq(EMPTY)p Fv(,)f(it)h(is)g(not)f(allo)n(wed)f(to)i(add)e(an)o(y)h -(data)g(node)f(unless)h(the)g(data)g(node)g(is)h(empty)-5 -b(.)18 b(In)479 3070 y(this)j(case,)f(the)h(ne)n(w)f(data)g(node)f(is)i -(silently)f(dropped.)479 3219 y(These)g(checks)g(only)f(apply)h(if)g -(there)g(is)h(a)f(DTD.)h(In)f(well-formedness)e(mode,)h(it)i(is)g -(assumed)e(that)i(e)n(v)o(ery)d(element)479 3327 y(is)j(declared)e -(with)i(content)e(model)g Fq(ANY)h Fv(which)g(prohibits)f(an)o(y)g(v)n -(alidation)g(check.)g(Furthermore,)f(you)h(turn)h(these)479 -3435 y(checks)g(of)n(f)f(by)h(passing)g Fq(~force:true)f -Fv(as)i(\002rst)g(ar)o(gument.)p Black 396 3584 a Ft(\225)p -Black 60 w Fq(add_pinstr)43 b(pi)p Fv(:)21 b(Adds)f(the)g(processing)f -(instruction)g Fq(pi)h Fv(to)h(the)f(list)h(of)f(processing)f -(instructions.)p Black 396 3692 a Ft(\225)p Black 60 -w Fq(delete)p Fv(:)h(Deletes)h(this)g(node)e(from)g(the)h(tree.)g -(After)g(this)h(operation,)d(this)i(node)g(is)h(no)f(longer)e(the)j -(child)e(of)h(the)479 3800 y(former)f(f)o(ather)g(node;)f(and)i(the)g -(node)e(loses)j(the)e(connection)f(to)i(the)g(f)o(ather)f(as)h(well.)h -(This)e(operation)f(is)j(illustrated)479 3908 y(by)f(the)g(\002gure)g -Fr(A)g(deleted)g(node)f(becomes)g(the)i(r)l(oot)f(of)g(the)h(subtr)m -(ee)p Fv(.)p Black 396 4016 a Ft(\225)p Black 60 w Fq(set_nodes)44 -b(nl)p Fv(:)20 b(Sets)h(the)f(list)i(of)e(children)e(to)j -Fq(nl)p Fv(.)f(It)g(is)i(required)c(that)i(e)n(v)o(ery)f(member)g(of)h -Fq(nl)g Fv(is)h(a)g(root,)e(and)479 4124 y(that)i(all)f(members)f(and)h -(the)g(current)f(object)h(share)g(the)g(same)g(DTD.)g(Unlik)o(e)g -Fq(add_node)p Fv(,)g(no)f(v)n(alidation)g(checks)479 -4232 y(are)h(performed.)p Black 396 4340 a Ft(\225)p -Black 60 w Fq(quick_set_attributes)42 b(atts)p Fv(:)20 -b(sets)h(the)f(attrib)n(utes)h(of)e(this)i(element)f(to)g -Fq(atts)p Fv(.)g(It)g(is)i Fr(not)f Fv(check)o(ed)479 -4448 y(whether)e Fq(atts)i Fv(matches)e(the)i(DTD)f(or)g(not;)g(it)h -(is)g(up)f(to)g(the)g(caller)g(of)g(this)h(method)e(to)h(ensure)g -(this.)g(\(This)479 4556 y(method)f(may)h(be)g(useful)g(to)g(transform) -e(the)j(attrib)n(ute)f(v)n(alues,)f(i.e.)h(apply)f(a)i(mapping)d(to)j -(e)n(v)o(ery)e(attrib)n(ute.\))p Black 396 4664 a Ft(\225)p -Black 60 w Fq(set_comment)43 b(text)p Fv(:)20 b(This)h(method)e(is)i -(only)e(applicable)g(to)h Fq(T_comment)g Fv(nodes;)f(it)i(sets)g(the)g -(comment)d(te)o(xt)479 4772 y(contained)h(by)h(such)g(nodes.)p -Black 3800 5278 a Fr(55)p Black eop -%%Page: 56 56 -56 55 bop Black 2225 67 a Fr(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr) -m(esenting)g(the)g(document)p Black 396 579 a Fu(Cloning)g(methods)h(.) -p Black 396 811 a Ft(\225)p Black 60 w Fq(orphaned_clone)p -Fv(:)e(Returns)h(a)g(clone)g(of)g(the)g(node)f(and)h(the)g(complete)f -(tree)h(belo)n(w)g(this)h(node)e(\(deep)g(clone\).)479 -919 y(The)h(clone)g(does)g(not)g(ha)n(v)o(e)f(a)i(parent)e(\(i.e.)h -(the)g(reference)f(to)h(the)g(parent)f(node)g(is)j Fr(not)f -Fv(cloned\).)d(While)j(cop)o(ying)479 1027 y(the)f(subtree,)g(strings)g -(are)g(skipped;)f(it)i(is)g(lik)o(ely)f(that)h(the)f(original)f(tree)h -(and)g(the)g(cop)o(y)f(tree)h(share)g(strings.)479 1135 -y(Extension)f(objects)h(are)g(cloned)f(by)h(in)m(v)n(oking)e(the)i -Fq(clone)g Fv(method)f(on)h(the)g(original)f(objects;)h(ho)n(w)g(much)f -(of)h(the)479 1243 y(e)o(xtension)f(objects)h(is)h(cloned)e(depends)g -(on)h(the)g(implemention)e(of)i(this)h(method.)479 1393 -y(This)g(operation)d(is)j(illustrated)f(by)g(the)g(\002gure)f -Fr(The)i(clone)e(of)i(a)f(subtr)m(ee)p Fv(.)p Black 396 -1542 a Ft(\225)p Black 60 w Fq(orphaned_flat_clone)p -Fv(:)e(Returns)i(a)h(clone)e(of)h(the)g(node,)f(b)n(ut)h(sets)i(the)e -(list)h(of)f(sub)g(nodes)g(to)g([],)g(i.e.)g(the)g(sub)479 -1650 y(nodes)g(are)g(not)g(cloned.)p Black 396 1758 a -Ft(\225)p Black 81 w Fq(create_element)42 b(dtd)i(nt)h(al)p -Fv(:)20 b(Returns)f(a)i(\003at)f(cop)o(y)f(of)g(this)i(node)d(\(which)h -(must)h(be)f(an)h(element\))f(with)h(the)479 1866 y(follo)n(wing)f -(modi\002cations:)g(The)h(DTD)g(is)h(set)g(to)f Fq(dtd)p -Fv(;)h(the)f(node)f(type)h(is)h(set)g(to)f Fq(nt)p Fv(,)g(and)g(the)g -(ne)n(w)g(attrib)n(ute)g(list)h(is)479 1974 y(set)g(to)f -Fq(al)g Fv(\(gi)n(v)o(en)e(as)i(list)h(of)f(\(name,v)n(alue\))d -(pairs\).)i(The)g(cop)o(y)g(does)h(not)f(ha)n(v)o(e)g(children)g(nor)g -(a)h(parent.)f(It)h(does)f(not)479 2082 y(contain)g(processing)g -(instructions.)g(See)i(the)f(e)o(xample)f(belo)n(w.)479 -2231 y(Note)h(that)h(you)e(can)h(specify)g(the)g(position)f(of)h(the)g -(ne)n(w)g(node)f(by)h(the)g(optional)f(ar)o(gument)f -Fq(~position)p Fv(.)p Black 396 2380 a Ft(\225)p Black -81 w Fq(create_data)43 b(dtd)h(cdata)p Fv(:)20 b(Returns)g(a)h(\003at)g -(cop)o(y)e(of)h(this)h(node)e(\(which)g(must)h(be)h(a)f(data)g(node\))f -(with)h(the)479 2488 y(follo)n(wing)f(modi\002cations:)g(The)h(DTD)g -(is)h(set)g(to)f Fq(dtd)p Fv(;)h(the)f(node)f(type)h(is)h(set)g(to)f -Fq(T_data)p Fv(;)g(the)g(attrib)n(ute)g(list)h(is)479 -2596 y(empty)f(\(data)f(nodes)h(ne)n(v)o(er)f(ha)n(v)o(e)g(attrib)n -(utes\);)h(the)g(list)h(of)f(children)f(and)h(PIs)h(is)g(empty)-5 -b(,)19 b(too)g(\(same)h(reason\).)f(The)479 2704 y(ne)n(w)h(node)f -(does)h(not)g(ha)n(v)o(e)g(a)g(parent.)f(The)h(v)n(alue)g -Fq(cdata)g Fv(is)h(the)f(ne)n(w)g(character)f(content)g(of)h(the)g -(node.)f(See)i(the)479 2812 y(e)o(xample)e(belo)n(w.)p -Black 396 2920 a Ft(\225)p Black 60 w Fq(keep_always_whitespace_mode)p -Fv(:)e(Ev)o(en)i(data)h(nodes)f(which)h(are)g(normally)f(dropped)e -(because)j(the)o(y)f(only)479 3028 y(contain)g(ignorable)f(whitespace,) -h(can)h(added)e(to)i(this)h(node)d(once)h(this)i(mode)e(is)h(turned)f -(on.)g(\(This)h(mode)f(is)h(useful)479 3136 y(to)h(produce)d(canonical) -h(XML.\))396 3327 y Fu(V)-8 b(alidating)20 b(methods)h(.)f -Fv(There)f(is)j(one)d(method)g(which)h(locally)f(v)n(alidates)h(the)g -(node,)f(i.e.)i(checks)e(whether)g(the)396 3435 y(subnodes)g(match)h -(the)g(content)f(model)g(of)h(this)h(node.)p Black 396 -3667 a Ft(\225)p Black 60 w Fq(local_validate)p Fv(:)e(Checks)h(that)g -(this)h(node)e(conforms)f(to)j(the)f(DTD)g(by)g(comparing)e(the)i(type) -g(of)g(the)479 3775 y(subnodes)e(with)i(the)g(content)e(model)h(for)g -(this)h(node.)e(\(Applications)g(need)h(not)g(call)h(this)h(method)d -(unless)h(the)o(y)g(add)479 3883 y(ne)n(w)h(nodes)g(themselv)o(es)f(to) -i(the)f(tree.\))-2 4294 y Fp(3.2.3.)35 b(The)f(c)n(lass)h -Fc(element_impl)396 4462 y Fv(This)21 b(class)g(is)g(an)f -(implementation)e(of)i Fq(node)g Fv(which)g(realizes)g(element)g -(nodes:)396 4642 y Fq(class)44 b([)h('ext)f(])h(element_impl)e(:)h -('ext)g(->)h([)g('ext)f(])g(node)396 4875 y Fu(Constructor)-8 -b(.)19 b Fv(Y)-9 b(ou)20 b(can)g(create)f(a)i(ne)n(w)f(instance)g(by)p -Black 3798 5278 a Fr(56)p Black eop -%%Page: 57 57 -57 56 bop Black 2225 67 a Fr(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr) -m(esenting)g(the)g(document)p Black 396 579 a Fq(new)45 -b(element_impl)d Fn(extension_object)396 770 y Fv(which)20 -b(creates)g(a)h(special)f(form)f(of)h(empty)f(element)h(which)g -(already)f(contains)g(a)i(reference)d(to)j(the)396 878 -y Fl(extension_object)p Fv(,)d(b)n(ut)i(is)h(otherwise)f(empty)-5 -b(.)18 b(This)j(special)f(form)f(is)i(called)f(an)g Fr(e)n(xemplar)r -Fv(.)g(The)g(purpose)f(of)396 986 y(e)o(x)o(emplars)g(is)i(that)f(the)o -(y)g(serv)o(e)f(as)i(patterns)f(that)g(can)g(be)g(duplicated)f(and)g -(\002lled)i(with)f(data.)g(The)g(method)396 1094 y Fq(create_element)f -Fv(is)i(designed)e(to)h(perform)e(this)j(action.)396 -1243 y Fu(Example.)f Fv(First,)h(create)f(an)g(e)o(x)o(emplar)e(by)396 -1423 y Fq(let)45 b(exemplar_ext)d(=)j(...)f(in)396 1520 -y(let)h(exemplar)222 b(=)45 b(new)f(element_impl)f(exemplar_ext)g(in) -396 1711 y Fv(The)20 b Fq(exemplar)g Fv(is)h(not)f(used)f(in)i(node)e -(trees,)h(b)n(ut)g(only)g(as)h(a)f(pattern)g(when)f(the)h(element)g -(nodes)f(are)i(created:)396 1891 y Fq(let)45 b(element)e(=)i(exemplar)e -(#)i(create_element)e(dtd)h(\(T_element)f(name\))h(attlist)396 -2082 y Fv(The)20 b Fq(element)g Fv(is)h(a)f(cop)o(y)g(of)g -Fq(exemplar)f Fv(\(e)n(v)o(en)g(the)h(e)o(xtension)f -Fq(exemplar_ext)g Fv(has)h(been)g(copied\))e(which)396 -2190 y(ensures)h(that)h Fq(element)f Fv(and)g(its)i(e)o(xtension)d(are) -i(objects)f(of)h(the)f(same)h(class)h(as)f(the)g(e)o(x)o(emplars;)e -(note)h(that)h(you)e(need)396 2298 y(not)i(to)g(pass)h(a)g(class)g -(name)f(or)f(other)h(meta)g(information.)d(The)j(cop)o(y)g(is)h -(initially)f(connected)e(with)j(the)f Fq(dtd)p Fv(,)g(it)h(gets)f(a)396 -2406 y(node)f(type,)h(and)g(the)g(attrib)n(ute)g(list)h(is)g(\002lled.) -f(The)g Fq(element)g Fv(is)h(no)n(w)e(fully)h(functional;)e(it)j(can)f -(be)g(added)f(to)i(another)396 2514 y(element)f(as)h(child,)e(and)h(it) -h(can)f(contain)f(references)g(to)h(subnodes.)-2 2884 -y Fp(3.2.4.)35 b(The)f(c)n(lass)h Fc(data_impl)396 3051 -y Fv(This)21 b(class)g(is)g(an)f(implementation)e(of)i -Fq(node)g Fv(which)g(should)f(be)h(used)g(for)f(all)i(character)e(data) -h(nodes:)396 3232 y Fq(class)44 b([)h('ext)f(])h(data_impl)e(:)i('ext)f -(->)g([)h('ext)f(])h(node)396 3464 y Fu(Constructor)-8 -b(.)19 b Fv(Y)-9 b(ou)20 b(can)g(create)f(a)i(ne)n(w)f(instance)g(by) -396 3644 y Fq(new)45 b(data_impl)e Fn(extension_object)396 -3835 y Fv(which)20 b(creates)g(an)g(empty)g(e)o(x)o(emplar)e(node)h -(which)h(is)h(connected)d(to)i Fl(extension_object)p -Fv(.)e(The)i(node)f(does)396 3943 y(not)h(contain)f(a)i(reference)d(to) -j(an)o(y)e(DTD,)h(and)g(because)f(of)h(this)h(it)g(cannot)e(be)h(added) -f(to)i(node)e(trees.)396 4093 y(T)-7 b(o)21 b(get)f(a)g(fully)g(w)o -(orking)f(data)h(node,)f(apply)g(the)h(method)f Fq(create_data)g -Fv(to)h(the)g(e)o(x)o(emplar)f(\(see)h(e)o(xample\).)396 -4242 y Fu(Example.)g Fv(First,)h(create)f(an)g(e)o(x)o(emplar)e(by)396 -4422 y Fq(let)45 b(exemplar_ext)d(=)j(...)f(in)396 4519 -y(let)h(exemplar)222 b(=)45 b(new)f(exemplar_ext)f(data_impl)h(in)396 -4710 y Fv(The)20 b Fq(exemplar)g Fv(is)h(not)f(used)f(in)i(node)e -(trees,)h(b)n(ut)g(only)g(as)h(a)f(pattern)g(when)f(the)h(data)g(nodes) -g(are)g(created:)p Black 3797 5278 a Fr(57)p Black eop -%%Page: 58 58 -58 57 bop Black 2225 67 a Fr(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr) -m(esenting)g(the)g(document)p Black 396 579 a Fq(let)45 -b(data_node)e(=)i(exemplar)e(#)i(create_data)e(dtd)h("The)g(characters) -f(con-)396 676 y(tained)h(in)h(the)f(data)g(node")396 -867 y Fv(The)20 b Fq(data_node)f Fv(is)i(a)g(cop)o(y)e(of)h -Fq(exemplar)p Fv(.)g(The)f(cop)o(y)h(is)h(initially)f(connected)e(with) -j(the)f Fq(dtd)p Fv(,)g(and)f(it)i(is)h(\002lled)396 -975 y(with)f(character)e(material.)g(The)h Fq(data_node)f -Fv(is)i(no)n(w)f(fully)g(functional;)e(it)j(can)f(be)g(added)f(to)h(an) -h(element)e(as)i(child.)-2 1345 y Fp(3.2.5.)35 b(The)f(type)g -Fc(spec)396 1512 y Fv(The)20 b(type)g Fq(spec)g Fv(de\002nes)g(a)g(w)o -(ay)h(to)f(handle)f(the)h(details)h(of)f(creating)f(nodes)g(from)h(e)o -(x)o(emplars.)396 1692 y Fq(type)44 b('ext)h(spec)396 -1790 y(constraint)e('ext)i(=)f('ext)g(node)h(#extension)396 -1984 y(val)g(make_spec_from_mapping)c(:)665 2081 y -(?super_root_exemplar)h(:)i('ext)h(node)f(->)665 2178 -y(?comment_exemplar)e(:)j('ext)f(node)g(->)665 2275 y -(?default_pinstr_exemplar)d(:)k('ext)f(node)g(->)665 -2372 y(?pinstr_mapping)f(:)h(\(string,)g('ext)g(node\))g(Hashtbl.t)f -(->)665 2469 y(data_exemplar:)g('ext)h(node)g(->)665 -2567 y(default_element_exemplar:)d('ext)j(node)g(->)665 -2664 y(element_mapping:)e(\(string,)i('ext)g(node\))g(Hashtbl.t)f(->) -665 2761 y(unit)h(->)755 2858 y('ext)g(spec)396 3052 -y(val)h(make_spec_from_alist)c(:)665 3149 y(?super_root_exemplar)h(:)i -('ext)h(node)f(->)665 3247 y(?comment_exemplar)e(:)j('ext)f(node)g(->) -665 3344 y(?default_pinstr_exemplar)d(:)k('ext)f(node)g(->)665 -3441 y(?pinstr_alist)f(:)i(\(string)e(*)i('ext)f(node\))g(list)g(->)665 -3538 y(data_exemplar:)f('ext)h(node)g(->)665 3635 y -(default_element_exemplar:)d('ext)j(node)g(->)665 3732 -y(element_alist:)f(\(string)g(*)i('ext)f(node\))g(list)g(->)665 -3829 y(unit)g(->)755 3927 y('ext)g(spec)396 4117 y Fv(The)20 -b(tw)o(o)h(functions)d Fq(make_spec_from_mapping)f Fv(and)j -Fq(make_spec_from_alist)d Fv(create)j Fq(spec)g Fv(v)n(alues.)396 -4225 y(Both)g(functions)f(are)h(functionally)e(equi)n(v)n(alent)h(and)g -(the)i(only)e(dif)n(ference)f(is)j(that)g(the)f(\002rst)h(function)d -(prefers)396 4333 y(hashtables)i(and)g(the)g(latter)g(associati)n(v)o -(e)g(lists)h(to)g(describe)e(mappings)g(from)g(names)h(to)g(e)o(x)o -(emplars.)396 4483 y(Y)-9 b(ou)20 b(can)g(specify)f(e)o(x)o(emplars)g -(for)g(the)i(v)n(arious)e(kinds)g(of)h(nodes)g(that)g(need)g(to)g(be)g -(generated)e(when)i(an)g(XML)396 4591 y(document)e(is)k(parsed:)p -Black 3800 5278 a Fr(58)p Black eop -%%Page: 59 59 -59 58 bop Black 2225 67 a Fr(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr) -m(esenting)g(the)g(document)p Black Black 396 579 a Ft(\225)p -Black 60 w Fq(~super_root_exemplar)p Fv(:)e(This)i(e)o(x)o(emplar)e(is) -j(used)f(to)h(create)f(the)g(super)f(root.)h(This)g(special)g(node)g -(is)h(only)479 687 y(created)f(if)g(the)g(corresponding)d -(con\002guration)h(option)h(has)h(been)g(selected;)g(it)h(is)g(the)f -(parent)f(node)g(of)h(the)h(root)479 795 y(node)e(which)h(may)g(be)g -(con)m(v)o(enient)d(if)k(e)n(v)o(ery)e(w)o(orking)f(node)i(must)g(ha)n -(v)o(e)f(a)i(parent.)p Black 396 903 a Ft(\225)p Black -60 w Fq(~comment_exemplar)p Fv(:)d(This)j(e)o(x)o(emplar)d(is)j(used)f -(when)f(a)i(comment)e(node)g(must)h(be)g(created.)g(Note)g(that)g(such) -479 1011 y(nodes)g(are)g(only)f(created)h(if)g(the)g(corresponding)d -(con\002guration)h(option)h(is)i("on".)p Black 396 1119 -a Ft(\225)p Black 60 w Fq(~default_pinstr_exemplar)p -Fv(:)c(If)j(a)h(node)e(for)g(a)i(processing)e(instruction)g(must)h(be)g -(created,)f(and)h(the)479 1226 y(instruction)f(is)i(not)f(listed)h(in)f -(the)g(table)h(passed)f(by)f Fq(~pinstr_mapping)g Fv(or)h -Fq(~pinstr_alist)p Fv(,)e(this)j(e)o(x)o(emplar)479 1334 -y(is)g(used.)f(Again)f(the)i(con\002guration)c(option)i(must)h(be)g -("on")g(in)g(order)f(to)i(create)e(such)h(nodes)g(at)h(all.)p -Black 396 1442 a Ft(\225)p Black 60 w Fq(~pinstr_mapping)e -Fv(or)g Fq(~pinstr_alist)p Fv(:)g(Map)h(the)g(tar)o(get)g(names)f(of)h -(processing)f(instructions)g(to)479 1550 y(e)o(x)o(emplars.)g(These)h -(mappings)e(are)i(only)g(used)g(when)f(nodes)h(for)f(processing)g -(instructions)g(are)h(created.)p Black 396 1658 a Ft(\225)p -Black 60 w Fq(~data_exemplar)p Fv(:)f(The)h(e)o(x)o(emplar)e(for)h -(ordinary)f(data)i(nodes.)p Black 396 1766 a Ft(\225)p -Black 60 w Fq(~default_element_exemplar)p Fv(:)d(This)j(e)o(x)o(emplar) -e(is)k(used)e(if)g(an)g(element)g(node)f(must)h(be)g(created,)f(b)n(ut) -i(the)479 1874 y(element)f(type)g(cannot)f(be)h(found)e(in)j(the)f -(tables)g Fq(element_mapping)e Fv(or)i Fq(element_alist)p -Fv(.)p Black 396 1982 a Ft(\225)p Black 60 w Fq(~element_mapping)e -Fv(or)i Fq(~element_alist)p Fv(:)f(Map)h(the)g(element)f(types)h(to)h -(e)o(x)o(emplars.)d(These)i(mappings)f(are)479 2090 y(used)h(to)h -(create)e(element)h(nodes.)396 2239 y(In)g(most)g(cases,)h(you)e(only)h -(w)o(ant)g(to)g(create)g Fq(spec)g Fv(v)n(alues)g(to)h(pass)f(them)g -(to)g(the)h(parser)e(functions)g(found)f(in)396 2347 -y Fq(Pxp_yacc)p Fv(.)h(Ho)n(we)n(v)o(er)m(,)f(it)j(might)f(be)g(useful) -g(to)g(apply)f Fq(spec)h Fv(v)n(alues)g(directly)-5 b(.)396 -2497 y(The)20 b(follo)n(wing)f(functions)f(create)i(v)n(arious)f(types) -h(of)g(nodes)g(by)g(selecting)f(the)i(corresponding)16 -b(e)o(x)o(emplar)j(from)g(the)396 2605 y(passed)h Fq(spec)g -Fv(v)n(alue,)g(and)f(by)h(calling)g Fq(create_element)e -Fv(or)i Fq(create_data)f Fv(on)h(the)g(e)o(x)o(emplar)-5 -b(.)396 2785 y Fq(val)45 b(create_data_node)d(:)665 2882 -y('ext)i(spec)h(->)665 2979 y(dtd)g(->)665 3076 y(\(*)g(data)f -(material:)f(*\))i(string)f(->)845 3173 y('ext)g(node)396 -3368 y(val)h(create_element_node)c(:)665 3465 y(?position:\(string)h(*) -j(int)f(*)h(int\))f(->)665 3562 y('ext)g(spec)h(->)665 -3659 y(dtd)g(->)665 3756 y(\(*)g(element)e(type:)h(*\))h(string)f(->) -665 3853 y(\(*)h(attributes:)e(*\))h(\(string)g(*)h(string\))e(list)h -(->)845 3950 y('ext)g(node)396 4145 y(val)h(create_super_root_node)c(:) -665 4242 y(?position:\(string)h(*)j(int)f(*)h(int\))f(->)665 -4339 y('ext)g(spec)h(->)710 4436 y(dtd)f(->)889 4533 -y('ext)h(node)396 4728 y(val)g(create_comment_node)c(:)665 -4825 y(?position:\(string)h(*)j(int)f(*)h(int\))f(->)p -Black 3800 5278 a Fr(59)p Black eop -%%Page: 60 60 -60 59 bop Black 2225 67 a Fr(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr) -m(esenting)g(the)g(document)p Black 665 579 a Fq('ext)44 -b(spec)h(->)665 676 y(dtd)g(->)665 773 y(\(*)g(comment)e(text:)h(*\))h -(string)f(->)845 870 y('ext)g(node)396 1065 y(val)h(create_pinstr_node) -c(:)665 1162 y(?position:\(string)h(*)j(int)f(*)h(int\))f(->)665 -1259 y('ext)g(spec)h(->)665 1356 y(dtd)g(->)665 1453 -y(proc_instruction)d(->)845 1550 y('ext)i(node)-2 2003 -y Fp(3.2.6.)35 b(Examples)396 2171 y Fu(Building)22 b(tr)o(ees.)d -Fv(Here)h(is)h(the)g(piece)e(of)h(code)g(that)g(creates)g(the)h(tree)f -(of)g(the)g(\002gure)f Fr(A)i(tr)m(ee)g(with)f(element)g(nodes,)396 -2279 y(data)g(nodes,)f(and)g(attrib)n(utes)p Fv(.)h(The)g(e)o(xtension) -f(object)h(and)f(the)h(DTD)h(are)f(be)o(yond)e(the)i(scope)g(of)g(this) -g(e)o(xample.)396 2459 y Fq(let)45 b(exemplar_ext)d(=)j(...)f(\(*)h -(some)f(extension)f(*\))i(in)396 2556 y(let)g(dtd)f(=)h(...)f(\(*)g -(some)h(DTD)f(*\))g(in)396 2750 y(let)h(element_exemplar)d(=)i(new)h -(element_impl)e(exemplar_ext)f(in)396 2847 y(let)j(data_exemplar)177 -b(=)44 b(new)h(data_impl)178 b(exemplar_ext)42 b(in)396 -3042 y(let)j(a1)f(=)h(element_exemplar)d(#)j(cre-)396 -3139 y(ate_element)e(dtd)i(\(T_element)e("a"\))h(["att",)g("apple"])396 -3236 y(and)h(b1)f(=)h(element_exemplar)d(#)j(create_element)d(dtd)i -(\(T_element)g("b"\))g([])396 3333 y(and)h(c1)f(=)h(element_exemplar)d -(#)j(create_element)d(dtd)i(\(T_element)g("c"\))g([])396 -3430 y(and)h(a2)f(=)h(element_exemplar)d(#)j(cre-)396 -3527 y(ate_element)e(dtd)i(\(T_element)e("a"\))h(["att",)g("orange"]) -396 3624 y(in)396 3819 y(let)h(cherries)e(=)i(data_exemplar)d(#)j -(create_data)e(dtd)h("Cherries")g(in)396 3916 y(let)h(orange)133 -b(=)45 b(data_exemplar)d(#)j(create_data)e(dtd)h("An)h(orange")e(in)396 -4110 y(a1)i(#)f(add_node)g(b1;)396 4207 y(a1)h(#)f(add_node)g(c1;)396 -4304 y(b1)h(#)f(add_node)g(a2;)396 4401 y(b1)h(#)f(add_node)g -(cherries;)396 4499 y(a2)h(#)f(add_node)g(orange;)396 -4689 y Fv(Alternati)n(v)o(ely)-5 b(,)18 b(the)i(last)h(block)f(of)g -(statements)g(could)f(also)i(be)f(written)g(as:)396 4870 -y Fq(a1)45 b(#)f(set_nodes)g([b1;)g(c1];)p Black 3800 -5278 a Fr(60)p Black eop -%%Page: 61 61 -61 60 bop Black 2225 67 a Fr(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr) -m(esenting)g(the)g(document)p Black 396 579 a Fq(b1)45 -b(#)f(set_nodes)g([a2;)g(cherries];)396 676 y(a2)h(#)f(set_nodes)g -([orange];)396 867 y Fv(The)20 b(root)g(of)g(the)g(tree)g(is)h -Fq(a1)p Fv(,)f(i.e.)g(it)h(is)g(true)f(that)396 1047 -y Fq(x)45 b(#)g(root)f(==)g(a1)396 1238 y Fv(for)20 b(e)n(v)o(ery)f(x)h -(from)f({)i Fq(a1)p Fv(,)f Fq(a2)p Fv(,)g Fq(b1)p Fv(,)g -Fq(c1)p Fv(,)g Fq(cherries)p Fv(,)g Fq(orange)f Fv(}.)396 -1388 y(Furthermore,)f(the)i(follo)n(wing)f(properties)f(hold:)486 -1568 y Fq(a1)44 b(#)h(attribute)e("att")h(=)h(Value)f("apple")396 -1665 y(&)h(a2)f(#)h(attribute)e("att")h(=)h(Value)f("orange")396 -1859 y(&)h(cherries)e(#)i(data)f(=)h("Cherries")396 1956 -y(&)135 b(orange)43 b(#)i(data)f(=)h("An)f(orange")396 -2053 y(&)314 b(a1)44 b(#)h(data)f(=)h("CherriesAn)e(orange")396 -2248 y(&)314 b(a1)44 b(#)h(node_type)e(=)i(T_element)e("a")396 -2345 y(&)314 b(a2)44 b(#)h(node_type)e(=)i(T_element)e("a")396 -2442 y(&)314 b(b1)44 b(#)h(node_type)e(=)i(T_element)e("b")396 -2539 y(&)314 b(c1)44 b(#)h(node_type)e(=)i(T_element)e("c")396 -2636 y(&)i(cherries)e(#)i(node_type)e(=)i(T_data)396 -2733 y(&)135 b(orange)43 b(#)i(node_type)e(=)i(T_data)396 -2928 y(&)314 b(a1)44 b(#)h(sub_nodes)e(=)i([)g(b1;)f(c1)h(])396 -3025 y(&)314 b(a2)44 b(#)h(sub_nodes)e(=)i([)g(orange)f(])396 -3122 y(&)314 b(b1)44 b(#)h(sub_nodes)e(=)i([)g(a2;)f(cherries)g(])396 -3219 y(&)314 b(c1)44 b(#)h(sub_nodes)e(=)i([])396 3316 -y(&)g(cherries)e(#)i(sub_nodes)e(=)i([])396 3413 y(&)135 -b(orange)43 b(#)i(sub_nodes)e(=)i([])396 3608 y(&)314 -b(a2)44 b(#)h(parent)f(==)g(a1)396 3705 y(&)314 b(b1)44 -b(#)h(parent)f(==)g(b1)396 3802 y(&)314 b(c1)44 b(#)h(parent)f(==)g(a1) -396 3899 y(&)h(cherries)e(#)i(parent)f(==)g(b1)396 3996 -y(&)135 b(orange)43 b(#)i(parent)f(==)g(a2)396 4229 y -Fu(Sear)o(ching)19 b(nodes.)g Fv(The)g(follo)n(wing)e(function)h -(searches)h(all)g(nodes)g(of)g(a)g(tree)h(for)e(which)h(a)g(certain)g -(condition)e(holds:)396 4409 y Fq(let)45 b(rec)f(search)g(p)g(t)h(=)486 -4506 y(if)f(p)h(t)g(then)576 4603 y(t)f(::)h(search_list)e(p)h(\(t)h(#) -g(sub_nodes\))486 4700 y(else)576 4797 y(search_list)e(p)h(\(t)h(#)f -(sub_nodes\))p Black 3800 5278 a Fr(61)p Black eop -%%Page: 62 62 -62 61 bop Black 2225 67 a Fr(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr) -m(esenting)g(the)g(document)p Black 396 676 a Fq(and)45 -b(search_list)e(p)h(l)h(=)486 773 y(match)f(l)h(with)576 -870 y([])268 b(-)p Fo(>)45 b Fq([])486 967 y(|)g(t)f(::)h(l')f(-)p -Fo(>)h Fq(\(search)e(p)i(t\))f(@)h(\(search_list)e(p)i(l'\))396 -1065 y(;;)396 1297 y Fv(F)o(or)20 b(e)o(xample,)f(if)h(you)f(w)o(ant)i -(to)f(search)g(all)h(elements)f(of)f(a)i(certain)f(type)f -Fq(et)p Fv(,)i(the)f(function)e Fq(search)i Fv(can)g(be)g(applied)396 -1405 y(as)h(follo)n(ws:)396 1585 y Fq(let)45 b(search_element_type)c -(et)k(t)f(=)486 1682 y(search)g(\(fun)g(x)h(-)p Fo(>)f -Fq(x)h(#)f(node_type)g(=)g(T_element)g(et\))g(t)396 1779 -y(;;)396 2012 y Fu(Getting)20 b(attrib)n(ute)f(v)o(alues.)h -Fv(Suppose)f(we)i(ha)n(v)o(e)f(the)g(declaration:)396 -2192 y Fq()396 -2577 y Fv(In)20 b(this)h(case,)f(e)n(v)o(ery)f(element)h -Fq(e)g Fv(must)h(ha)n(v)o(e)e(an)h(attrib)n(ute)g Fq(a)p -Fv(,)g(otherwise)g(the)g(parser)g(w)o(ould)f(indicate)h(an)g(error)-5 -b(.)19 b(If)h(the)396 2685 y(O'Caml)h(v)n(ariable)e Fq(n)h -Fv(holds)g(the)g(node)f(of)h(the)g(tree)h(corresponding)16 -b(to)21 b(the)f(element,)f(you)g(can)h(get)h(the)f(v)n(alue)f(of)h(the) -396 2793 y(attrib)n(ute)g Fq(a)h Fv(by)396 2973 y Fq(let)45 -b(value_of_a)e(=)h(n)h(#)g(required_string_attribute)40 -b("a")396 3164 y Fv(which)20 b(is)h(more)e(or)h(less)i(an)e(abbre)n -(viation)d(for)396 3344 y Fq(let)45 b(value_of_a)e(=)486 -3442 y(match)h(n)h(#)f(attribute)g("a")g(with)576 3539 -y(Value)g(s)g(->)h(s)486 3636 y(|)g(_)313 b(->)45 b(assert)f(false)396 -3827 y Fv(-)21 b(as)g(the)f(attrib)n(ute)g(is)h(required,)d(the)i -Fq(attribute)f Fv(method)g(al)o(w)o(ays)i(returns)e(a)i -Fq(Value)p Fv(.)396 3976 y(In)f(contrast)g(to)g(this,)h(the)f(attrib)n -(ute)g Fq(b)g Fv(can)g(be)g(omitted.)g(In)f(this)i(case,)g(the)f -(method)396 4084 y Fq(required_string_attribute)d Fv(w)o(orks)j(only)f -(if)h(the)h(attrib)n(ute)f(is)h(there,)e(and)h(the)g(method)f(will)i(f) -o(ail)f(if)h(the)396 4192 y(attrib)n(ute)f(is)h(missing.)f(T)-7 -b(o)20 b(get)h(the)f(v)n(alue,)f(you)g(can)h(apply)g(the)g(method)f -Fq(optional_string_attribute)p Fv(:)396 4372 y Fq(let)45 -b(value_of_b)e(=)h(n)h(#)g(optional_string_attribute)40 -b("b")396 4563 y Fv(No)n(w)-5 b(,)20 b Fq(value_of_b)f -Fv(is)i(of)f(type)g Fq(string)43 b(option)p Fv(,)20 b(and)f -Fq(None)i Fv(represents)e(the)h(omitted)g(attrib)n(ute.)f(Alternati)n -(v)o(ely)-5 b(,)396 4671 y(you)20 b(could)f(also)h(use)h -Fq(attribute)p Fv(:)396 4851 y Fq(let)45 b(value_of_b)e(=)p -Black 3800 5278 a Fr(62)p Black eop -%%Page: 63 63 -63 62 bop Black 2225 67 a Fr(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr) -m(esenting)g(the)g(document)p Black 486 579 a Fq(match)44 -b(n)h(#)f(attribute)g("b")g(with)576 676 y(Value)g(s)313 -b(->)45 b(Some)f(s)486 773 y(|)h(Implied_value)d(->)j(None)486 -870 y(|)g(_)582 b(->)45 b(assert)f(false)396 1103 y Fv(The)20 -b(attrib)n(ute)g Fq(c)h Fv(beha)n(v)o(es)e(much)g(lik)o(e)h -Fq(a)p Fv(,)h(because)e(it)i(has)g(al)o(w)o(ays)f(a)h(v)n(alue.)e(If)h -(the)g(attrib)n(ute)g(is)h(omitted,)f(the)g(def)o(ault,)396 -1211 y(here)g("12345",)e(will)j(be)f(returned)e(instead.)i(Because)g -(of)g(this,)h(you)e(can)h(again)f(use)396 1319 y Fq -(required_string_attribute)e Fv(to)j(get)g(the)h(v)n(alue.)396 -1468 y(The)f(type)g Fq(CDATA)g Fv(is)h(the)f(most)g(general)f(string)h -(type.)g(The)g(types)g Fq(NMTOKEN)p Fv(,)f Fq(ID)p Fv(,)h -Fq(IDREF)p Fv(,)g Fq(ENTITY)p Fv(,)f(and)h(all)396 1576 -y(enumerators)e(and)i(notations)f(are)h(special)h(forms)e(of)h(string)g -(types)g(that)g(restrict)g(the)h(possible)f(v)n(alues.)f(From)396 -1684 y(O'Caml,)h(the)o(y)g(beha)n(v)o(e)f(lik)o(e)h Fq(CDATA)p -Fv(,)g(i.e.)g(you)f(can)h(use)h(the)f(methods)f Fq -(required_string_attribute)e Fv(and)396 1792 y Fq -(optional_string_attribute)p Fv(,)g(too.)396 1941 y(In)j(contrast)g(to) -g(this,)h(the)f(types)g Fq(NMTOKENS)p Fv(,)f Fq(IDREFS)p -Fv(,)g(and)h Fq(ENTITIES)g Fv(mean)f(lists)j(of)e(strings.)g(Suppose)f -(we)h(ha)n(v)o(e)396 2049 y(the)g(declaration:)396 2229 -y Fq()396 2517 y Fv(The)20 -b(type)g Fq(NMTOKENS)f Fv(stands)i(for)e(lists)j(of)e(space-separated)e -(tok)o(ens;)i(for)f(e)o(xample)g(the)h(v)n(alue)g Fq("1)44 -b(abc)h(23ef")396 2625 y Fv(means)20 b(the)g(list)i Fq(["1";)44 -b("abc";)f("23ef"])p Fv(.)20 b(\(Again,)e Fq(IDREFS)i -Fv(and)g Fq(ENTITIES)f Fv(ha)n(v)o(e)h(more)f(restricted)h(v)n -(alues.\))396 2733 y(T)-7 b(o)21 b(get)f(the)g(v)n(alue)g(of)f(attrib)n -(ute)h Fq(d)p Fv(,)h(one)e(can)h(use)396 2913 y Fq(let)45 -b(value_of_d)e(=)h(n)h(#)g(required_list_attribute)c("d")396 -3104 y Fv(or)396 3285 y Fq(let)k(value_of_d)e(=)486 3382 -y(match)h(n)h(#)f(attribute)g("d")g(with)576 3479 y(Valuelist)f(l)i(->) -f(l)486 3576 y(|)h(_)493 b(->)44 b(assert)g(false)396 -3767 y Fv(As)21 b Fq(d)g Fv(is)g(required,)d(the)i(attrib)n(ute)g -(cannot)f(be)h(omitted,)g(and)f(the)h Fq(attribute)g -Fv(method)e(returns)i(al)o(w)o(ays)g(a)396 3875 y Fq(Valuelist)p -Fv(.)396 4024 y(F)o(or)g(optional)f(attrib)n(utes)h(lik)o(e)h -Fq(e)p Fv(,)f(apply)396 4204 y Fq(let)45 b(value_of_e)e(=)h(n)h(#)g -(optional_list_attribute)c("e")396 4395 y Fv(or)396 4576 -y Fq(let)k(value_of_e)e(=)486 4673 y(match)h(n)h(#)f(attribute)g("e")g -(with)576 4770 y(Valuelist)f(l)134 b(->)45 b(l)486 4867 -y(|)g(Implied_value)d(->)j([])p Black 3800 5278 a Fr(63)p -Black eop -%%Page: 64 64 -64 63 bop Black 2225 67 a Fr(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr) -m(esenting)g(the)g(document)p Black 486 579 a Fq(|)45 -b(_)582 b(->)45 b(assert)f(false)396 770 y Fv(Here,)20 -b(the)g(case)h(that)f(the)g(attrib)n(ute)g(is)h(missing)f(counts)g(lik) -o(e)g(the)h(empty)e(list.)-2 1139 y Fp(3.2.7.)35 b(Iterator)n(s)396 -1307 y Fv(There)20 b(are)g(also)g(se)n(v)o(eral)g(iterators)g(in)g -(Pxp_document;)d(please)j(see)h(the)f(mli)h(\002le)f(for)g(details.)g -(Y)-9 b(ou)20 b(can)g(\002nd)396 1415 y(e)o(xamples)f(for)h(them)g(in)g -(the)g("simple_transformation")d(directory)-5 b(.)396 -1595 y Fq(val)45 b(find)f(:)g(?deeply:bool)f(->)889 1692 -y(f:\('ext)h(node)g(->)h(bool\))f(->)g('ext)g(node)h(->)f('ext)g(node) -396 1887 y(val)h(find_all)e(:)i(?deeply:bool)e(->)1069 -1984 y(f:\('ext)g(node)i(->)f(bool\))g(->)h('ext)f(node)g(->)g('ext)h -(node)f(list)396 2178 y(val)h(find_element)d(:)j(?deeply:bool)e(->)1248 -2275 y(string)h(->)g('ext)h(node)f(->)g('ext)g(node)396 -2469 y(val)h(find_all_elements)d(:)i(?deeply:bool)f(->)1472 -2567 y(string)h(->)h('ext)f(node)g(->)g('ext)h(node)f(list)396 -2761 y(exception)g(Skip)396 2858 y(val)h(map_tree)e(:)90 -b(pre:\('exta)43 b(node)h(->)g('extb)g(node\))g(->)1069 -2955 y(?post:\('extb)f(node)h(->)g('extb)g(node\))g(->)1069 -3052 y('exta)g(node)g(->)1248 3149 y('extb)g(node)396 -3441 y(val)h(map_tree_sibl)d(:)755 3538 y(pre:)i(\('exta)g(node)g -(option)g(->)g('exta)g(node)h(->)f('exta)g(node)g(option)g(->)1203 -3635 y('extb)g(node\))g(->)710 3732 y(?post:\('extb)f(node)h(option)g -(->)g('extb)g(node)h(->)f('extb)g(node)g(option)g(->)1203 -3829 y('extb)g(node\))g(->)710 3927 y('exta)g(node)g(->)889 -4024 y('extb)g(node)396 4218 y(val)h(iter_tree)e(:)i(?pre:\('ext)e -(node)h(->)g(unit\))g(->)1114 4315 y(?post:\('ext)f(node)h(->)g(unit\)) -g(->)1114 4412 y('ext)g(node)g(->)1293 4509 y(unit)396 -4704 y(val)h(iter_tree_sibl)d(:)710 4801 y(?pre:)i(\('ext)g(node)g -(option)g(->)h('ext)f(node)g(->)g('ext)h(node)f(option)g(->)g(unit\))g -(->)p Black 3800 5278 a Fr(64)p Black eop -%%Page: 65 65 -65 64 bop Black 2225 67 a Fr(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr) -m(esenting)g(the)g(document)p Black 710 579 a Fq(?post:\('ext)43 -b(node)h(option)g(->)h('ext)f(node)g(->)g('ext)h(node)f(option)g(->)g -(unit\))g(->)710 676 y('ext)g(node)g(->)889 773 y(unit)-2 -1358 y Fx(3.3.)39 b(The)g(c)m(lass)g(type)g Fb(extension)396 -1610 y Fq(class)44 b(type)g([)h('node)f(])h(extension)e(=)486 -1707 y(object)h(\('self\))576 1804 y(method)f(clone)h(:)h('self)665 -1901 y(\(*)g("clone")e(should)h(return)g(an)h(exact)f(deep)g(copy)g(of) -g(the)h(object.)e(*\))576 1998 y(method)g(node)i(:)f('node)665 -2095 y(\(*)h("node")f(returns)f(the)i(corresponding)d(node)i(of)h(this) -f(extension.)f(This)h(method)710 2193 y(*)h(intended)e(to)i(return)f -(exactly)f(what)h(previ-)396 2290 y(ously)g(has)h(been)f(set)g(by)h -("set_node".)710 2387 y(*\))576 2484 y(method)e(set_node)h(:)h('node)f -(->)g(unit)665 2581 y(\(*)h("set_node")e(is)h(invoked)g(once)g(the)h -(extension)e(is)h(associated)g(to)g(a)h(new)710 2678 -y(*)g(node)f(object.)710 2775 y(*\))486 2873 y(end)396 -3063 y Fv(This)21 b(is)g(the)f(type)g(of)g(classes)h(used)f(for)f(node) -h(e)o(xtensions.)e(F)o(or)i(e)n(v)o(ery)f(node)g(of)h(the)g(document)e -(tree,)i(there)g(is)h(not)396 3171 y(only)f(the)g Fq(node)g -Fv(object,)f(b)n(ut)h(also)g(an)g Fq(extension)f Fv(object.)h(The)f -(latter)i(has)f(minimal)f(functionality;)f(it)j(has)f(only)g(the)396 -3279 y(necessary)g(methods)f(to)h(be)g(attached)g(to)g(the)g(node)f -(object)h(containing)e(the)j(details)f(of)g(the)g(node)f(instance.)h -(The)396 3387 y(e)o(xtension)f(object)h(is)h(called)f(e)o(xtension)f -(because)g(its)i(purpose)e(is)i(e)o(xtensibility)-5 b(.)396 -3537 y(F)o(or)20 b(some)g(reasons,)g(it)h(is)g(impossible)e(to)i(deri)n -(v)o(e)d(the)j Fq(node)f Fv(classes)h(\(i.e.)f Fq(element_impl)f -Fv(and)g Fq(data_impl)p Fv(\))g(such)396 3645 y(that)i(the)f -(subclasses)g(can)g(be)g(e)o(xtended)f(by)g(ne)n(w)h(ne)n(w)g(methods.) -f(But)i(subclassing)f(nodes)f(is)i(a)g(great)f(feature,)396 -3753 y(because)g(it)h(allo)n(ws)f(the)g(user)g(to)h(pro)o(vide)d(dif)n -(ferent)g(classes)k(for)d(dif)n(ferent)g(types)h(of)g(nodes.)f(The)h(e) -o(xtension)f(objects)396 3860 y(are)h(a)h(w)o(orkaround)c(that)j(is)i -(as)e(po)n(werful)f(as)i(direct)f(subclassing,)f(the)h(costs)h(are)f -(some)g(notation)f(o)o(v)o(erhead.)p Black 3800 5278 -a Fr(65)p Black eop -%%Page: 66 66 -66 65 bop Black 2225 67 a Fr(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr) -m(esenting)g(the)g(document)p Black 396 579 a Fu(Figur)o(e)g(3-6.)f -(The)i(structur)o(e)f(of)g(nodes)g(and)h(extensions)396 -1928 y - currentpoint currentpoint translate 1 1 scale neg exch neg exch translate - 396 1928 a @beginspecial 0 @llx 0 @lly 206 @urx -140 @ury 2060 @rwi @setspecial -%%BeginDocument: pic/extension_general.ps -%!PS-Adobe-2.0 EPSF-2.0 -%%Title: src/pic/extension_general.fig -%%Creator: fig2dev Version 3.2 Patchlevel 1 -%%CreationDate: Sun Aug 27 02:05:42 2000 -%%For: gerd@ice (Gerd Stolpmann) -%%Orientation: Portrait -%%BoundingBox: 0 0 206 140 -%%Pages: 0 -%%BeginSetup -%%EndSetup -%%Magnification: 0.8000 -%%EndComments -/$F2psDict 200 dict def -$F2psDict begin -$F2psDict /mtrx matrix put -/col-1 {0 setgray} bind def -/col0 {0.000 0.000 0.000 srgb} bind def -/col1 {0.000 0.000 1.000 srgb} bind def -/col2 {0.000 1.000 0.000 srgb} bind def -/col3 {0.000 1.000 1.000 srgb} bind def -/col4 {1.000 0.000 0.000 srgb} bind def -/col5 {1.000 0.000 1.000 srgb} bind def -/col6 {1.000 1.000 0.000 srgb} bind def -/col7 {1.000 1.000 1.000 srgb} bind def -/col8 {0.000 0.000 0.560 srgb} bind def -/col9 {0.000 0.000 0.690 srgb} bind def -/col10 {0.000 0.000 0.820 srgb} bind def -/col11 {0.530 0.810 1.000 srgb} bind def -/col12 {0.000 0.560 0.000 srgb} bind def -/col13 {0.000 0.690 0.000 srgb} bind def -/col14 {0.000 0.820 0.000 srgb} bind def -/col15 {0.000 0.560 0.560 srgb} bind def -/col16 {0.000 0.690 0.690 srgb} bind def -/col17 {0.000 0.820 0.820 srgb} bind def -/col18 {0.560 0.000 0.000 srgb} bind def -/col19 {0.690 0.000 0.000 srgb} bind def -/col20 {0.820 0.000 0.000 srgb} bind def -/col21 {0.560 0.000 0.560 srgb} bind def -/col22 {0.690 0.000 0.690 srgb} bind def -/col23 {0.820 0.000 0.820 srgb} bind def -/col24 {0.500 0.190 0.000 srgb} bind def -/col25 {0.630 0.250 0.000 srgb} bind def -/col26 {0.750 0.380 0.000 srgb} bind def -/col27 {1.000 0.500 0.500 srgb} bind def -/col28 {1.000 0.630 0.630 srgb} bind def -/col29 {1.000 0.750 0.750 srgb} bind def -/col30 {1.000 0.880 0.880 srgb} bind def -/col31 {1.000 0.840 0.000 srgb} bind def - -end -save --22.0 205.0 translate -1 -1 scale - -/cp {closepath} bind def -/ef {eofill} bind def -/gr {grestore} bind def -/gs {gsave} bind def -/sa {save} bind def -/rs {restore} bind def -/l {lineto} bind def -/m {moveto} bind def -/rm {rmoveto} bind def -/n {newpath} bind def -/s {stroke} bind def -/sh {show} bind def -/slc {setlinecap} bind def -/slj {setlinejoin} bind def -/slw {setlinewidth} bind def -/srgb {setrgbcolor} bind def -/rot {rotate} bind def -/sc {scale} bind def -/sd {setdash} bind def -/ff {findfont} bind def -/sf {setfont} bind def -/scf {scalefont} bind def -/sw {stringwidth} bind def -/tr {translate} bind def -/tnt {dup dup currentrgbcolor - 4 -2 roll dup 1 exch sub 3 -1 roll mul add - 4 -2 roll dup 1 exch sub 3 -1 roll mul add - 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} - bind def -/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul - 4 -2 roll mul srgb} bind def - /DrawEllipse { - /endangle exch def - /startangle exch def - /yrad exch def - /xrad exch def - /y exch def - /x exch def - /savematrix mtrx currentmatrix def - x y tr xrad yrad sc 0 0 1 startangle endangle arc - closepath - savematrix setmatrix - } def - -/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def -/$F2psEnd {$F2psEnteredState restore end} def -%%EndProlog - -$F2psBegin -10 setmiterlimit -n -1000 5050 m -1000 -1000 l 5514 -1000 l 5514 5050 l cp clip - 0.05039 0.05039 sc -7.500 slw -% Ellipse -n 1575 2250 229 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 1575 3375 225 225 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 675 3375 229 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 2475 3375 229 229 0 360 DrawEllipse gs col7 0.75 shd ef gr gs col0 s gr - -% Ellipse -n 3600 2475 180 180 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr - -% Ellipse -n 2880 2475 180 180 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr - -% Ellipse -n 4320 2475 186 186 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr - -% Ellipse -n 3600 1485 186 186 0 360 DrawEllipse gs col7 0.50 shd ef gr gs col0 s gr - -% Polyline -n 675 3150 m 1395 2385 l gs col0 s gr -% Polyline -n 1575 2475 m 1575 3150 l gs col0 s gr -% Polyline -n 1755 2385 m 2475 3150 l gs col0 s gr -% Polyline - [60] 0 sd -gs clippath -3288 1467 m 3412 1462 l 3305 1524 l 3435 1487 l 3418 1429 l cp -clip -n 1537 2010 m 3412 1462 l gs col0 s gr gr - [] 0 sd -% arrowhead -n 3288 1467 m 3412 1462 l 3305 1524 l col0 s -% Polyline - [60] 0 sd -gs clippath -1796 2042 m 1672 2047 l 1779 1984 l 1649 2022 l 1666 2080 l cp -clip -n 3412 1537 m 1672 2047 l gs col0 s gr gr - [] 0 sd -% arrowhead -n 1796 2042 m 1672 2047 l 1779 1984 l col0 s -% Polyline - [60] 0 sd -gs clippath -2584 2524 m 2707 2512 l 2604 2581 l 2731 2535 l 2711 2479 l cp -933 3183 m 810 3195 l 913 3126 l 786 3172 l 806 3228 l cp -clip -n 810 3195 m 2707 2512 l gs col0 s gr gr - [] 0 sd -% arrowhead -n 933 3183 m 810 3195 l 913 3126 l col0 s -% arrowhead -n 2584 2524 m 2707 2512 l 2604 2581 l col0 s -% Polyline - [60] 0 sd -gs clippath -3319 2594 m 3442 2580 l 3340 2650 l 3467 2603 l 3446 2547 l cp -1863 3203 m 1740 3217 l 1842 3147 l 1715 3194 l 1736 3250 l cp -clip -n 1740 3217 m 3442 2580 l gs col0 s gr gr - [] 0 sd -% arrowhead -n 1863 3203 m 1740 3217 l 1842 3147 l col0 s -% arrowhead -n 3319 2594 m 3442 2580 l 3340 2650 l col0 s -% Polyline - [60] 0 sd -gs clippath -4054 2626 m 4177 2610 l 4076 2682 l 4202 2632 l 4180 2577 l cp -2763 3194 m 2640 3210 l 2741 3138 l 2615 3188 l 2637 3243 l cp -clip -n 2640 3210 m 4177 2610 l gs col0 s gr gr - [] 0 sd -% arrowhead -n 2763 3194 m 2640 3210 l 2741 3138 l col0 s -% arrowhead -n 4054 2626 m 4177 2610 l 4076 2682 l col0 s -/Courier-Bold ff 180.00 scf sf -3555 1530 m -gs 1 -1 sc (x) col0 sh gr -/Courier-Bold ff 180.00 scf sf -1530 2295 m -gs 1 -1 sc (n) col0 sh gr -/Courier ff 180.00 scf sf -1658 1950 m -gs 1 -1 sc 17.0 rot (n # extension) col0 sh gr -/Courier ff 180.00 scf sf -2475 1950 m -gs 1 -1 sc 17.0 rot (x # node) col0 sh gr -/Helvetica ff 180.00 scf sf -1020 4050 m -gs 1 -1 sc (The node tree) col0 sh gr -/Helvetica ff 180.00 scf sf -3225 3285 m -gs 1 -1 sc (The extensions) col0 sh gr -$F2psEnd -rs - -%%EndDocument - @endspecial 396 1928 a - currentpoint currentpoint translate 1 1 div 1 1 div scale neg exch -neg exch translate - 396 1928 a 357 x Fv(The)f(picture)f(sho)n(ws)i -(ho)n(w)e(the)i(nodes)e(and)h(e)o(xtensions)f(are)h(link)o(ed)f -(together)-5 b(.)19 b(Ev)o(ery)g(node)g(has)i(a)f(reference)f(to)h(its) -396 2393 y(e)o(xtension,)f(and)g(e)n(v)o(ery)g(e)o(xtension)g(has)h(a)h -(reference)d(to)j(its)g(node.)e(The)h(methods)f Fq(extension)g -Fv(and)h Fq(node)g Fv(follo)n(w)396 2501 y(these)h(references;)e(a)h -(typical)g(phrase)f(is)396 2681 y Fq(self)44 b(#)h(node)f(#)h -(attribute)e("xy")396 2872 y Fv(to)21 b(get)f(the)g(v)n(alue)g(of)f(an) -i(attrib)n(ute)e(from)h(a)g(method)f(de\002ned)g(in)h(the)h(e)o -(xtension)d(object;)i(or)396 3053 y Fq(self)44 b(#)h(node)f(#)h(iter) -486 3150 y(\(fun)f(n)h(-)p Fo(>)f Fq(n)h(#)f(extension)g(#)g(my_method) -g(...\))396 3341 y Fv(to)21 b(iterate)f(o)o(v)o(er)f(the)h(subnodes)f -(and)g(to)i(call)f Fq(my_method)f Fv(of)h(the)h(corresponding)16 -b(e)o(xtension)j(objects.)396 3490 y(Note)h(that)h(e)o(xtension)d -(objects)i(do)g(not)g(ha)n(v)o(e)g(references)e(to)j(subnodes)e(\(or)g -("sube)o(xtensions"\))f(themselv)o(es;)h(in)i(order)396 -3598 y(to)g(get)f(one)f(of)h(the)h(children)d(of)i(an)g(e)o(xtension)f -(you)g(must)i(\002rst)g(go)e(to)i(the)f(node)f(object,)h(then)f(get)h -(the)h(child)e(node,)396 3706 y(and)h(\002nally)g(reach)f(the)i(e)o -(xtension)d(that)j(is)g(logically)e(the)h(child)g(of)g(the)g(e)o -(xtension)f(you)g(started)h(with.)-2 4034 y Fp(3.3.1.)35 -b(Ho)n(w)f(to)f(de\002ne)h(an)g(e)n(xtension)i(c)n(lass)396 -4202 y Fv(At)21 b(minimum,)e(you)g(must)h(de\002ne)g(the)g(methods)f -Fq(clone)p Fv(,)h Fq(node)p Fv(,)g(and)f Fq(set_node)h -Fv(such)f(that)i(your)e(class)i(is)396 4310 y(compatible)e(with)h(the)h -(type)e Fq(extension)p Fv(.)g(The)h(method)f Fq(set_node)g -Fv(is)i(called)f(during)f(the)h(initialization)g(of)g(the)396 -4418 y(node,)f(or)h(after)g(a)h(node)e(has)h(been)g(cloned;)f(the)h -(node)f(object)h(in)m(v)n(ok)o(es)f Fq(set_node)g Fv(on)h(the)g(e)o -(xtension)f(object)h(to)g(tell)396 4526 y(it)h(that)f(this)h(node)e(is) -i(no)n(w)f(the)g(object)g(the)g(e)o(xtension)f(is)i(link)o(ed)f(to.)g -(The)f(e)o(xtension)g(must)h(return)f(the)i(node)e(object)396 -4633 y(passed)h(as)h(ar)o(gument)d(of)i Fq(set_node)f -Fv(when)h(the)g Fq(node)g Fv(method)f(is)i(called.)p -Black 3798 5278 a Fr(66)p Black eop -%%Page: 67 67 -67 66 bop Black 2225 67 a Fr(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr) -m(esenting)g(the)g(document)p Black 396 579 a Fv(The)g -Fq(clone)g Fv(method)f(must)h(return)f(a)i(cop)o(y)e(of)h(the)g(e)o -(xtension)f(object;)h(at)g(least)h(the)f(object)g(itself)h(must)f(be) -396 687 y(duplicated,)f(b)n(ut)h(if)g(required,)e(the)j(cop)o(y)e -(should)g(deeply)g(duplicate)g(all)i(objects)f(and)g(v)n(alues)g(that)g -(are)g(referred)e(by)396 795 y(the)i(e)o(xtension,)f(too.)h(Whether)f -(this)i(is)g(required,)d(depends)h(on)h(the)g(application;)f -Fq(clone)h Fv(is)h(in)m(v)n(ok)o(ed)d(by)i(the)g(node)396 -903 y(object)g(when)g(one)f(of)h(its)h(cloning)e(methods)g(is)i -(called.)396 1052 y(A)g(good)e(starting)h(point)f(for)h(an)g(e)o -(xtension)e(class:)396 1232 y Fq(class)44 b(custom_extension)e(=)486 -1329 y(object)i(\(self\))576 1524 y(val)g(mutable)g(node)g(=)g(\(None)g -(:)h(custom_extension)d(node)i(option\))576 1718 y(method)f(clone)h(=)h -({<)g(>})576 1912 y(method)e(node)i(=)665 2009 y(match)f(node)g(with) -845 2107 y(None)g(->)934 2204 y(assert)g(false)755 2301 -y(|)h(Some)f(n)g(->)h(n)576 2495 y(method)e(set_node)h(n)h(=)665 -2592 y(node)f(<-)h(Some)f(n)486 2786 y(end)396 2977 y -Fv(This)21 b(class)g(is)g(compatible)e(with)h Fq(extension)p -Fv(.)f(The)h(purpose)e(of)i(de\002ning)f(such)h(a)h(class)g(is,)g(of)f -(course,)f(adding)396 3085 y(further)g(methods;)g(and)h(you)f(can)h(do) -g(it)h(without)e(restriction.)396 3235 y(Often,)h(you)f(w)o(ant)h(not)g -(only)g(one)f(e)o(xtension)g(class.)i(In)f(this)h(case,)f(it)h(is)g -(the)f(simplest)h(w)o(ay)f(that)g(all)h(your)e(classes)i(\(for)396 -3343 y(one)f(kind)f(of)h(document\))e(ha)n(v)o(e)i(the)g(same)g(type)g -(\(with)g(respect)g(to)g(the)g(interf)o(ace;)g(i.e.)g(it)h(does)f(not)g -(matter)g(if)g(your)396 3451 y(classes)i(dif)n(fer)d(in)h(the)g -(de\002ned)f(pri)n(v)n(ate)h(methods)f(and)g(instance)h(v)n(ariables,)f -(b)n(ut)h(public)g(methods)f(count\).)f(This)396 3559 -y(approach)g(a)n(v)n(oids)i(lots)h(of)f(coercions)f(and)h(problems)e -(with)j(type)f(incompatibilities.)e(It)j(is)g(simple)f(to)g(implement:) -396 3739 y Fq(class)44 b(custom_extension)e(=)486 3836 -y(object)i(\(self\))576 3933 y(val)g(mutable)g(node)g(=)g(\(None)g(:)h -(custom_extension)d(node)i(option\))576 4127 y(method)f(clone)h(=)h -(...)269 b(\(*)44 b(see)g(above)g(*\))576 4224 y(method)f(node)i(=)f -(...)314 b(\(*)44 b(see)g(above)g(*\))576 4322 y(method)f(set_node)h(n) -h(=)f(...)h(\(*)f(see)g(above)g(*\))576 4516 y(method)f(virtual)h -(my_method1)f(:)i(...)576 4613 y(method)e(virtual)h(my_method2)f(:)i -(...)576 4710 y(...)f(\(*)g(etc.)h(*\))486 4807 y(end)p -Black 3797 5278 a Fr(67)p Black eop -%%Page: 68 68 -68 67 bop Black 2225 67 a Fr(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr) -m(esenting)g(the)g(document)p Black 396 676 a Fq(class)44 -b(custom_extension_kind_A)d(=)486 773 y(object)j(\(self\))576 -870 y(inherit)f(custom_extension)576 1065 y(method)g(my_method1)h(=)g -(...)576 1162 y(method)f(my_method2)h(=)g(...)486 1259 -y(end)396 1453 y(class)g(custom_extension_kind_B)d(=)486 -1550 y(object)j(\(self\))576 1647 y(inherit)f(custom_extension)576 -1842 y(method)g(my_method1)h(=)g(...)576 1939 y(method)f(my_method2)h -(=)g(...)486 2036 y(end)396 2227 y Fv(If)20 b(a)h(class)g(does)f(not)g -(need)f(a)i(method)e(\(e.g.)g(because)h(it)h(does)e(not)h(mak)o(e)g -(sense,)g(or)g(it)h(w)o(ould)f(violate)f(some)396 2335 -y(important)g(condition\),)f(it)j(is)g(possible)f(to)g(de\002ne)g(the)g -(method)f(and)g(to)i(al)o(w)o(ays)f(raise)h(an)f(e)o(xception)e(when)i -(the)396 2443 y(method)f(is)i(in)m(v)n(ok)o(ed)e(\(e.g.)g -Fq(assert)44 b(false)p Fv(\).)396 2592 y(The)20 b(latter)g(is)i(a)e -(strong)g(recommendation:)c(do)k(not)g(try)g(to)g(further)f(specialize) -h(the)g(types)g(of)g(e)o(xtension)f(objects.)h(It)g(is)396 -2700 y(dif)n(\002cult,)g(sometimes)g(e)n(v)o(en)f(impossible,)g(and)h -(almost)g(ne)n(v)o(er)f(w)o(orth-while.)-2 3070 y Fp(3.3.2.)35 -b(Ho)n(w)f(to)f(bind)h(e)n(xtension)h(c)n(lasses)h(to)d(element)i -(types)396 3237 y Fv(Once)20 b(you)f(ha)n(v)o(e)h(de\002ned)f(your)g(e) -o(xtension)g(classes,)i(you)e(can)h(bind)g(them)f(to)i(element)e -(types.)h(The)g(simplest)h(case)f(is)396 3345 y(that)h(you)e(ha)n(v)o -(e)g(only)h(one)f(class)j(and)d(that)i(this)f(class)h(is)h(to)e(be)g -(al)o(w)o(ays)h(used.)e(The)h(parsing)f(functions)g(in)h(the)h(module) -396 3453 y Fq(Pxp_yacc)f Fv(tak)o(e)g(a)h Fq(spec)f Fv(ar)o(gument)d -(which)j(can)g(be)g(customized.)f(If)h(your)f(single)h(class)h(has)g -(the)f(name)f Fq(c)p Fv(,)i(this)396 3561 y(ar)o(gument)d(should)h(be) -396 3741 y Fq(let)45 b(spec)f(=)486 3839 y(make_spec_from_alist)576 -3936 y(~data_exemplar:)535 b(\(new)44 b(data_impl)g(c\))576 -4033 y(~default_element_exemplar:)c(\(new)k(element_impl)f(c\))576 -4130 y(~element_alist:)535 b([])576 4227 y(\(\))396 4418 -y Fv(This)21 b(means)f(that)g(data)g(nodes)f(will)i(be)f(created)g -(from)f(the)h(e)o(x)o(emplar)e(passed)i(by)g(~data_e)o(x)o(emplar)d -(and)j(that)g(all)396 4526 y(element)g(nodes)f(will)i(be)f(made)g(from) -f(the)h(e)o(x)o(emplar)e(speci\002ed)i(by)g(~def)o(ault_element_e)o(x)o -(emplar)-5 b(.)15 b(In)396 4634 y(~element_alist,)k(you)h(can)g(pass)g -(that)h(dif)n(ferent)d(e)o(x)o(emplars)h(are)h(to)g(be)g(used)g(for)g -(dif)n(ferent)e(element)i(types;)g(b)n(ut)g(this)396 -4742 y(is)h(an)g(optional)d(feature.)h(If)h(you)g(do)g(not)f(need)h -(it,)h(pass)f(the)g(empty)g(list.)p Black 3800 5278 a -Fr(68)p Black eop -%%Page: 69 69 -69 68 bop Black 2225 67 a Fr(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr) -m(esenting)g(the)g(document)p Black 396 579 a Fv(Remember)f(that)i(an)f -(e)o(x)o(emplar)e(is)j(a)g(\(node,)d(e)o(xtension\))h(pair)g(that)i -(serv)o(es)f(as)h(pattern)e(when)h(ne)n(w)g(nodes)f(\(and)g(the)396 -687 y(corresponding)e(e)o(xtension)i(objects\))g(are)h(added)f(to)i -(the)f(document)e(tree.)i(In)g(this)h(case,)f(the)g(e)o(x)o(emplar)f -(contains)g Fq(c)i Fv(as)396 795 y(e)o(xtension,)e(and)g(when)h(nodes)f -(are)i(created,)e(the)h(e)o(x)o(emplar)e(is)j(cloned,)e(and)h(cloning)f -(mak)o(es)h(also)g(a)h(cop)o(y)e(of)h Fq(c)h Fv(such)396 -903 y(that)g(all)f(nodes)g(of)g(the)g(document)e(tree)i(will)h(ha)n(v)o -(e)f(a)g(cop)o(y)g(of)g Fq(c)g Fv(as)h(e)o(xtension.)396 -1052 y(The)f Fq(~element_alist)f Fv(ar)o(gument)e(can)j(bind)g -(speci\002c)g(element)g(types)g(to)g(speci\002c)g(e)o(x)o(emplars;)f -(as)i(e)o(x)o(emplars)396 1160 y(may)f(be)g(instances)g(of)g(dif)n -(ferent)f(classes)i(it)g(is)g(ef)n(fecti)n(v)o(ely)d(possible)i(to)h -(bind)e(element)h(types)g(to)g(classes.)h(F)o(or)396 -1268 y(e)o(xample,)e(if)h(the)g(element)g(type)g("p")g(is)h -(implemented)d(by)i(class)h("c_p",)e(and)h("q")g(is)h(realized)f(by)f -("c_q",)h(you)f(can)396 1376 y(pass)i(the)f(follo)n(wing)f(v)n(alue:) -396 1556 y Fq(let)45 b(spec)f(=)486 1653 y(make_spec_from_alist)576 -1750 y(~data_exemplar:)535 b(\(new)44 b(data_impl)g(c\))576 -1847 y(~default_element_exemplar:)c(\(new)k(element_impl)f(c\))576 -1945 y(~element_alist:)665 2042 y([)i("p",)f(new)g(element_impl)f(c_p;) -755 2139 y("q",)h(new)g(element_impl)f(c_q;)665 2236 -y(])576 2333 y(\(\))396 2524 y Fv(The)20 b(e)o(xtension)f(object)h -Fq(c)g Fv(is)h(still)h(used)e(for)f(all)i(data)f(nodes)f(and)h(for)g -(all)g(other)g(element)f(types.)-2 3026 y Fx(3.4.)39 -b(Details)f(of)i(the)f(mapping)e(fr)m(om)i(XML)g(te)n(xt)g(to)g(the)g -(tree)-2 3212 y(representation)-2 3540 y Fp(3.4.1.)c(The)f -(representation)h(of)e(c)o(haracter)n(-free)h(elements)396 -3708 y Fv(If)20 b(an)g(element)g(declaration)f(does)h(not)f(allo)n(w)i -(the)f(element)f(to)i(contain)e(character)g(data,)h(the)g(follo)n(wing) -e(rules)j(apply)-5 b(.)396 3858 y(If)20 b(the)h(element)e(must)h(be)g -(empty)-5 b(,)19 b(i.e.)h(it)h(is)g(declared)e(with)i(the)f(k)o(e)o(yw) -o(ord)e Fq(EMPTY)p Fv(,)i(the)g(element)g(instance)g(must)g(be)396 -3965 y(ef)n(fecti)n(v)o(ely)f(empty)g(\(it)h(must)h(not)f(e)n(v)o(en)f -(contain)g(whitespace)h(characters\).)e(The)i(parser)g(guarantees)e -(that)j(a)f(declared)396 4073 y Fq(EMPTY)g Fv(element)g(does)g(ne)n(v)o -(er)f(contain)g(a)h(data)g(node,)f(e)n(v)o(en)g(if)i(the)f(data)g(node) -f(represents)h(the)g(empty)f(string.)396 4223 y(If)h(the)h(element)e -(declaration)g(only)g(permits)h(other)f(elements)h(to)h(occur)e(within) -h(that)g(element)g(b)n(ut)g(not)g(character)396 4331 -y(data,)g(it)h(is)g(still)g(possible)f(to)h(insert)f(whitespace)g -(characters)f(between)g(the)h(subelements.)f(The)h(parser)g(ignores)f -(these)396 4439 y(characters,)g(too,)h(and)g(does)f(not)h(create)g -(data)g(nodes)g(for)f(them.)396 4588 y Fu(Example.)h -Fv(Consider)g(the)g(follo)n(wing)f(element)g(types:)396 -4768 y Fq()396 -4865 y()p Black 3800 -5278 a Fr(69)p Black eop -%%Page: 70 70 -70 69 bop Black 2225 67 a Fr(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr) -m(esenting)g(the)g(document)p Black 396 579 a Fq()396 770 y Fv(Only)20 b Fq(x)h Fv(may)e(contain)h -(character)e(data,)i(the)h(k)o(e)o(yw)o(ord)d Fq(#PCDATA)h -Fv(indicates)h(this.)h(The)f(other)f(types)h(are)396 -878 y(character)n(-free.)396 1027 y(The)g(XML)g(term)396 -1207 y Fq()44 b()396 1398 y Fv(will)21 -b(be)f(internally)f(represented)g(by)g(an)i(element)e(node)g(for)h -Fq(x)g Fv(with)h(three)f(subnodes:)e(the)j(\002rst)g -Fq(z)f Fv(element,)g(a)g(data)396 1506 y(node)f(containing)g(the)h -(space)g(character)m(,)e(and)i(the)g(second)g Fq(z)g -Fv(element.)g(In)f(contrast)h(to)g(this,)h(the)f(term)396 -1686 y Fq()44 b()396 1877 y Fv(is)21 b(represented)e(by) -h(an)g(element)f(node)g(for)h Fq(y)h Fv(with)f(only)f -Fr(two)i Fv(subnodes,)e(the)h(tw)o(o)g Fq(z)h Fv(elements.)e(There)h -(is)h(no)f(data)396 1985 y(node)f(for)h(the)g(space)g(character)f -(because)h(spaces)g(are)g(ignored)f(in)h(the)g(character)n(-free)e -(element)i Fq(y)p Fv(.)-2 2355 y Fp(3.4.2.)35 b(The)f(representation)h -(of)e(c)o(haracter)h(data)396 2523 y Fv(The)20 b(XML)g(speci\002cation) -g(allo)n(ws)g(all)h(Unicode)e(characters)g(in)i(XML)f(te)o(xts.)g(This) -g(parser)g(can)g(be)g(con\002gured)e(such)396 2631 y(that)j(UTF-8)e(is) -i(used)f(to)h(represent)e(the)h(characters)f(internally;)g(ho)n(we)n(v) -o(er)m(,)f(the)i(def)o(ault)g(character)e(encoding)h(is)396 -2738 y(ISO-8859-1.)e(\(Currently)-5 b(,)18 b(no)i(other)f(encodings)g -(are)h(possible)g(for)f(the)i(internal)e(string)h(representation;)e -(the)i(type)396 2846 y Fq(Pxp_types.rep_encoding)d Fv(enumerates)i(the) -h(possible)g(encodings.)e(Principially)-5 b(,)19 b(the)h(parser)g -(could)f(use)h(an)o(y)396 2954 y(encoding)e(that)j(is)g -(ASCII-compatible,)d(b)n(ut)i(there)g(are)g(currently)e(only)i(le)o -(xical)f(analyzers)h(for)f(UTF-8)h(and)396 3062 y(ISO-8859-1.)d(It)k -(is)g(currently)d(impossible)i(to)g(use)h(UTF-16)e(or)h(UCS-4)g(as)h -(internal)f(encodings)e(\(or)i(other)f(multibyte)396 -3170 y(encodings)g(which)g(are)h(not)g(ASCII-compatible\))e(unless)i -(major)g(parts)g(of)g(the)g(parser)g(are)g(re)n(written)f(-)i(unlik)o -(ely)-5 b(...\))396 3320 y(The)20 b(internal)g(encoding)e(may)h(be)h -(dif)n(ferent)f(from)g(the)h(e)o(xternal)f(encoding)f(\(speci\002ed)i -(in)g(the)g(XML)h(declaration)396 3428 y Fo(<)p Fq(?xml)44 -b(...)g(encoding="..."?)p Fo(>)p Fv(\);)18 b(in)j(this)f(case)h(the)f -(strings)g(are)g(automatically)f(con)m(v)o(erted)f(to)i(the)g(internal) -396 3535 y(encoding.)396 3685 y(If)g(the)h(internal)e(encoding)f(is)j -(ISO-8859-1,)c(it)k(is)g(possible)f(that)g(there)g(are)g(characters)g -(that)g(cannot)f(be)h(represented.)396 3793 y(In)g(this)h(case,)f(the)g -(parser)g(ignores)f(such)h(characters)f(and)h(prints)g(a)h(w)o(arning)e -(\(to)h(the)g Fq(collect_warning)e Fv(object)396 3901 -y(that)j(must)f(be)g(passed)g(when)g(the)g(parser)f(is)i(called\).)396 -4050 y(The)f(XML)g(speci\002cation)g(allo)n(ws)g(lines)h(to)f(be)g -(separated)g(by)f(single)h(LF)h(characters,)e(by)h(CR)h(LF)g(character) -396 4158 y(sequences,)e(or)h(by)g(single)g(CR)i(characters.)d -(Internally)-5 b(,)18 b(these)i(separators)f(are)h(al)o(w)o(ays)h(con)m -(v)o(erted)d(to)i(single)g(LF)396 4266 y(characters.)396 -4416 y(The)g(parser)g(guarantees)e(that)j(there)e(are)i(ne)n(v)o(er)d -(tw)o(o)j(adjacent)e(data)h(nodes;)g(if)g(necessary)-5 -b(,)19 b(data)h(material)g(that)g(w)o(ould)396 4523 y(otherwise)g(be)g -(represented)e(by)i(se)n(v)o(eral)g(nodes)f(is)i(collapsed)f(into)f -(one)h(node.)f(Note)h(that)g(you)g(can)g(still)h(create)f(node)396 -4631 y(trees)h(with)f(adjacent)g(data)g(nodes;)f(ho)n(we)n(v)o(er)m(,)f -(the)i(parser)g(does)f(not)h(return)f(such)h(trees.)p -Black 3800 5278 a Fr(70)p Black eop -%%Page: 71 71 -71 70 bop Black 2225 67 a Fr(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr) -m(esenting)g(the)g(document)p Black 396 579 a Fv(Note)g(that)h(CD)m(A) --9 b(T)h(A)20 b(sections)g(are)g(not)g(represented)f(specially;)h(such) -g(sections)g(are)g(added)f(to)h(the)h(current)d(data)396 -687 y(material)i(that)g(being)g(collected)f(for)h(the)g(ne)o(xt)f(data) -h(node.)-2 1056 y Fp(3.4.3.)35 b(The)f(representation)h(of)e(entities)h -(within)g(documents)396 1224 y Fr(Entities)21 b(ar)m(e)f(not)g(r)m(epr) -m(esented)f(within)i(documents!)d Fv(If)i(the)h(parser)e(\002nds)h(an)h -(entity)e(reference)g(in)h(the)g(document)396 1332 y(content,)f(the)h -(reference)f(is)i(immediately)e(e)o(xpanded,)e(and)j(the)g(parser)g -(reads)g(the)g(e)o(xpansion)e(te)o(xt)i(instead)g(of)g(the)396 -1440 y(reference.)-2 1810 y Fp(3.4.4.)35 b(The)f(representation)h(of)e -(attrib)n(utes)396 1977 y Fv(As)21 b(attrib)n(ute)f(v)n(alues)g(are)g -(composed)e(of)i(Unicode)f(characters,)g(too,)h(the)g(same)h(problems)d -(with)j(the)f(character)396 2085 y(encoding)e(arise)j(as)g(for)e -(character)g(material.)h(Attrib)n(ute)g(v)n(alues)g(are)g(con)m(v)o -(erted)d(to)k(the)f(internal)f(encoding,)f(too;)i(and)396 -2193 y(if)h(there)e(are)i(characters)e(that)h(cannot)f(be)h -(represented,)e(these)j(are)f(dropped,)e(and)h(a)i(w)o(arning)e(is)i -(printed.)396 2343 y(Attrib)n(ute)f(v)n(alues)g(are)g(normalized)e -(before)h(the)o(y)h(are)g(returned)e(by)i(methods)f(lik)o(e)h -Fq(attribute)p Fv(.)f(First,)i(an)o(y)396 2451 y(remaining)e(entity)h -(references)e(are)i(e)o(xpanded;)e(if)j(necessary)-5 -b(,)19 b(e)o(xpansion)f(is)j(performed)c(recursi)n(v)o(ely)-5 -b(.)18 b(Second,)396 2558 y(ne)n(wline)i(characters)f(\(an)o(y)g(of)h -(LF)-7 b(,)21 b(CR)g(LF)-7 b(,)21 b(or)f(CR)h(characters\))e(are)h(con) -m(v)o(erted)e(to)i(single)g(space)h(characters.)e(Note)396 -2666 y(that)i(especially)e(the)i(latter)f(action)g(is)h(prescribed)d -(by)i(the)g(XML)g(standard)f(\(b)n(ut)41 b(is)21 b(not)f(con)m(v)o -(erted)e(such)i(that)g(it)h(is)396 2774 y(still)h(possible)e(to)g -(include)f(line)h(feeds)g(into)g(attrib)n(utes\).)-2 -3144 y Fp(3.4.5.)35 b(The)f(representation)h(of)e(pr)n(ocessing)h -(instructions)396 3312 y Fv(Processing)20 b(instructions)f(are)h -(parsed)g(to)g(some)g(e)o(xtent:)f(The)h(\002rst)h(w)o(ord)f(of)g(the)g -(PI)g(is)i(called)e(the)g(tar)o(get,)f(and)g(it)i(is)396 -3420 y(stored)f(separated)f(from)g(the)i(rest)f(of)g(the)g(PI:)396 -3600 y Fq()396 3791 y Fv(The)20 b(e)o(xact)g -(location)f(where)h(a)g(PI)h(occurs)e(is)i(not)f(represented)f(\(by)g -(def)o(ault\).)g(The)h(parser)f(puts)i(the)f(PI)g(into)g(the)396 -3899 y(object)g(that)g(represents)g(the)g(embracing)e(construct)h(\(an) -h(element,)f(a)i(DTD,)f(or)g(the)g(whole)g(document\);)e(that)i(means) -396 4007 y(you)g(can)g(\002nd)f(out)h(which)g(PIs)h(occur)e(in)h(a)h -(certain)f(element,)f(in)h(the)h(DTD,)f(or)g(in)g(the)g(whole)g -(document,)e(b)n(ut)i(you)396 4114 y(cannot)f(lookup)g(the)h(e)o(xact)g -(position)f(within)h(the)g(construct.)396 4264 y(If)g(you)g(require)e -(the)j(e)o(xact)e(location)h(of)g(PIs,)g(it)h(is)g(possible)f(to)g -(create)g(e)o(xtra)g(nodes)f(for)h(them.)f(This)i(mode)e(is)396 -4372 y(controled)g(by)g(the)i(option)e Fq(enable_pinstr_nodes)p -Fv(.)e(The)j(additional)f(nodes)g(ha)n(v)o(e)h(the)g(node)f(type)h -Fq(T_pinstr)396 4480 y Fn(target)p Fv(,)g(and)f(are)i(created)e(from)g -(special)h(e)o(x)o(emplars)f(contained)f(in)j(the)f Fq(spec)g -Fv(\(see)g(pxp_document.mli\).)p Black 3800 5278 a Fr(71)p -Black eop -%%Page: 72 72 -72 71 bop Black 2225 67 a Fr(Chapter)20 b(3.)g(The)g(objects)g(r)m(epr) -m(esenting)g(the)g(document)p Black -2 583 a Fp(3.4.6.)35 -b(The)f(representation)h(of)e(comments)396 751 y Fv(Normally)-5 -b(,)19 b(comments)g(are)h(not)g(represented;)e(the)o(y)i(are)g(dropped) -e(by)h(def)o(ault.)h(Ho)n(we)n(v)o(er)m(,)e(if)i(you)f(require)g(them,) -h(it)h(is)396 859 y(possible)f(to)h(create)e Fq(T_comment)h -Fv(nodes)f(for)h(them.)f(This)i(mode)e(can)h(be)g(speci\002ed)g(by)g -(the)g(option)396 967 y Fq(enable_comment_nodes)p Fv(.)d(Comment)j -(nodes)f(are)h(created)g(from)f(special)h(e)o(x)o(emplars)f(contained)f -(in)j(the)f Fq(spec)396 1075 y Fv(\(see)h(pxp_document.mli\).)15 -b(Y)-9 b(ou)19 b(can)h(access)h(the)f(contents)g(of)g(comments)f -(through)f(the)i(method)f Fq(comment)p Fv(.)-2 1444 y -Fp(3.4.7.)35 b(The)f(attrib)n(utes)f Fc(xml:lang)d Fp(and)k -Fc(xml:space)396 1612 y Fv(These)20 b(attrib)n(utes)g(are)g(not)g -(supported)f(specially;)h(the)o(y)f(are)h(handled)f(lik)o(e)h(an)o(y)g -(other)f(attrib)n(ute.)-2 1982 y Fp(3.4.8.)35 b(And)f(what)f(about)h -(namespaces?)396 2149 y Fv(Currently)-5 b(,)19 b(there)g(is)i(no)f -(special)h(support)d(for)i(namespaces.)f(Ho)n(we)n(v)o(er)m(,)f(the)i -(parser)g(allo)n(ws)g(it)h(that)f(the)h(colon)e(occurs)396 -2257 y(in)i(names)e(such)h(that)h(it)g(is)g(possible)f(to)g(implement)f -(namespaces)g(on)h(top)g(of)g(the)g(current)f(API.)396 -2407 y(Some)h(future)f(release)h(of)g(PXP)h(will)g(support)e -(namespaces)g(as)i(b)n(uilt-in)f(feature...)p Black 3800 -5278 a Fr(72)p Black eop -%%Page: 73 73 -73 72 bop Black Black -2 621 a Fs(Chapter)48 b(4.)f(Con\002guring)j -(and)e(calling)f(the)h(par)m(ser)-2 1055 y Fx(4.1.)39 -b(Over)q(vie)n(w)396 1235 y Fv(There)20 b(are)g(the)g(follo)n(wing)f -(main)g(functions)g(in)m(v)n(oking)f(the)i(parser)g(\(in)g(Pxp_yacc\):) -p Black 396 1558 a Ft(\225)p Black 60 w Fr(par)o(se_document_entity:)d -Fv(Y)-9 b(ou)19 b(w)o(ant)i(to)f(parse)g(a)g(complete)g(and)f(closed)h -(document)e(consisting)i(of)g(a)g(DTD)h(and)479 1666 -y(the)f(document)f(body;)g(the)h(body)f(is)i(v)n(alidated)e(against)g -(the)h(DTD.)h(This)f(mode)f(is)i(interesting)f(if)g(you)f(ha)n(v)o(e)h -(a)h(\002le)479 1835 y Fq()f -()g(...)h()396 1984 y Fv(and)20 b(you)f(can)h(accept)g(an) -o(y)f(DTD)i(that)f(is)h(included)e(in)h(the)g(\002le)h(\(e.g.)f -(because)f(the)h(\002le)h(is)g(under)e(your)g(control\).)p -Black 396 2092 a Ft(\225)p Black 60 w Fr(par)o(se_wfdocument_entity:)e -Fv(Y)-9 b(ou)20 b(w)o(ant)g(to)g(parse)g(a)h(complete)e(and)h(closed)f -(document)g(consisting)g(of)h(a)h(DTD)479 2200 y(and)f(the)g(document)e -(body;)h(b)n(ut)h(the)h(body)d(is)k(not)d(v)n(alidated,)g(only)h(check) -o(ed)e(for)i(well-formedness.)e(This)i(mode)f(is)479 -2308 y(preferred)f(if)j(v)n(alidation)d(costs)j(too)f(much)f(time)i(or) -f(if)g(the)g(DTD)h(is)g(missing.)p Black 396 2416 a Ft(\225)p -Black 60 w Fr(par)o(se_dtd_entity:)d Fv(Y)-9 b(ou)20 -b(w)o(ant)g(only)f(to)i(parse)e(an)i(entity)e(\(\002le\))i(containing)d -(the)i(e)o(xternal)f(subset)h(of)g(a)h(DTD.)479 2524 -y(Sometimes)f(it)h(is)g(interesting)e(to)i(read)e(such)h(a)h(DTD,)f -(for)g(e)o(xample)e(to)j(compare)d(it)j(with)g(the)f(DTD)g(included)f -(in)h(a)479 2632 y(document,)e(or)i(to)g(apply)g(the)g(ne)o(xt)f(mode:) -p Black 396 2740 a Ft(\225)p Black 60 w Fr(par)o(se_content_entity:)e -Fv(Y)-9 b(ou)20 b(w)o(ant)g(only)g(to)g(parse)g(an)g(entity)g -(\(\002le\))g(containing)e(a)j(fragment)d(of)i(a)h(document)479 -2848 y(body;)e(this)i(fragment)d(is)j(v)n(alidated)f(against)f(the)h -(DTD)h(you)e(pass)i(to)f(the)g(function.)e(Especially)-5 -b(,)19 b(the)i(fragment)479 2956 y(must)g(not)e(ha)n(v)o(e)h(a)65 -b Fo(<)p Fq(!DOCTYPE)p Fo(>)19 b Fv(clause,)h(and)g(must)g(directly)g -(be)o(gin)f(with)h(an)g(element.)f(The)h(element)g(is)479 -3064 y(v)n(alidated)f(against)h(the)g(DTD.)g(This)h(mode)e(is)i -(interesting)e(if)i(you)e(w)o(ant)h(to)h(check)e(documents)f(against)i -(a)h(\002x)o(ed,)479 3172 y(immutable)e(DTD.)p Black -396 3280 a Ft(\225)p Black 60 w Fr(par)o(se_wfcontent_entity:)f -Fv(This)i(function)f(also)h(parses)g(a)h(single)f(element)g(without)f -(DTD,)h(b)n(ut)g(does)g(not)g(v)n(alidate)479 3388 y(it.)p -Black 396 3495 a Ft(\225)p Black 60 w Fr(e)n(xtr)o(act_dtd_fr)l -(om_document_entity:)15 b Fv(This)20 b(function)f(e)o(xtracts)g(the)i -(DTD)f(from)f(a)i(closed)f(document)479 3603 y(consisting)g(of)g(a)g -(DTD)h(and)e(a)i(document)d(body)-5 b(.)18 b(Both)j(the)f(internal)f -(and)h(the)g(e)o(xternal)f(subsets)h(are)h(e)o(xtracted.)396 -3794 y(In)f(man)o(y)f(cases,)i Fq(parse_document_entity)c -Fv(is)k(the)f(preferred)e(mode)i(to)g(parse)g(a)g(document)f(in)h(a)h -(v)n(alidating)396 3902 y(w)o(ay)-5 b(,)20 b(and)g Fq -(parse_wfdocument_entity)c Fv(is)22 b(the)e(mode)f(of)h(choice)f(to)i -(parse)f(a)g(\002le)h(while)f(only)g(checking)e(for)396 -4010 y(well-formedness.)396 4160 y(There)i(are)g(a)g(number)f(of)h(v)n -(ariations)f(of)h(these)g(modes.)f(One)h(important)f(application)g(of)h -(a)g(parser)g(is)h(to)f(check)396 4268 y(documents)f(of)h(an)g -(untrusted)f(source)g(against)h(a)g(\002x)o(ed)g(DTD.)g(One)g(solution) -f(is)i(to)g(not)f(allo)n(w)g(the)g Fo(<)p Fq(!DOCTYPE)p -Fo(>)396 4375 y Fv(clause)g(in)h(these)f(documents,)e(and)i(treat)g -(the)h(document)d(lik)o(e)i(a)h(fragment)d(\(using)i(mode)f -Fr(par)o(se_content_entity)p Fv(\).)396 4483 y(This)i(is)g(v)o(ery)e -(simple,)h(b)n(ut)g(in\003e)o(xible;)f(users)i(of)e(such)h(a)h(system)f -(cannot)f(e)n(v)o(en)h(de\002ne)f(additional)g(entities)i(to)396 -4591 y(abbre)n(viate)e(frequent)f(phrases)i(of)g(their)g(te)o(xt.)396 -4741 y(It)h(may)e(be)i(necessary)e(to)h(ha)n(v)o(e)g(a)h(more)e -(intelligent)g(check)o(er)-5 b(.)20 b(F)o(or)g(e)o(xample,)e(it)j(is)g -(also)g(possible)e(to)i(parse)f(the)396 4849 y(document)e(to)j(check)e -(fully)-5 b(,)19 b(i.e.)h(with)h(DTD,)f(and)f(to)i(compare)d(this)j -(DTD)f(with)h(the)f(prescribed)f(one.)g(In)h(order)f(to)p -Black 3800 5278 a Fr(73)p Black eop -%%Page: 74 74 -74 73 bop Black 2348 67 a Fr(Chapter)20 b(4.)g(Con\002guring)e(and)i -(calling)f(the)h(par)o(ser)p Black 396 579 a Fv(fully)g(parse)g(the)g -(document,)e(mode)h Fr(par)o(se_document_entity)e Fv(is)k(applied,)e -(and)h(to)g(get)g(the)g(DTD)h(to)f(compare)f(with)396 -687 y(mode)g Fr(par)o(se_dtd_entity)f Fv(can)i(be)h(used.)396 -836 y(There)f(is)h(another)d(v)o(ery)i(important)e(con\002gurable)g -(aspect)i(of)g(the)g(parser:)g(the)g(so-called)g(resolv)o(er)-5 -b(.)19 b(The)h(task)g(of)g(the)396 944 y(resolv)o(er)f(is)i(to)g -(locate)f(the)g(contents)f(of)h(an)g(\(e)o(xternal\))f(entity)g(for)h -(a)h(gi)n(v)o(en)e(entity)g(name,)h(and)f(to)i(mak)o(e)e(the)i -(contents)396 1052 y(accessible)g(as)f(a)h(character)e(stream.)h -(\(Furthermore,)d(it)k(also)f(normalizes)g(the)g(character)f(set;)i(b)n -(ut)f(this)h(is)g(a)f(detail)h(we)396 1160 y(can)f(ignore)f(here.\))g -(Consider)h(you)f(ha)n(v)o(e)h(a)g(\002le)h(called)f -Fq("main.xml")f Fv(containing)396 1340 y Fq()396 1437 y(\045sub;)396 -1628 y Fv(and)20 b(a)h(\002le)f(stored)g(in)g(the)h(subdirectory)c -Fq("sub")j Fv(with)h(name)e Fq("sub.xml")g Fv(containing)396 -1808 y Fq() -396 1906 y(\045subsub;)396 2097 y Fv(and)20 b(a)g(\002le)h(stored)e(in) -h(the)g(subdirectory)d Fq("subsub")j Fv(of)f Fq("sub")h -Fv(with)g(name)f Fq("subsub.xml")g Fv(\(the)g(contents)h(of)f(this)396 -2204 y(\002le)i(do)f(not)g(matter\).)f(Here,)h(the)g(resolv)o(er)f -(must)h(track)g(that)g(the)g(second)g(entity)g Fq(subsub)f -Fv(is)i(located)f(in)g(the)h(directory)396 2312 y Fq("sub/subsub")p -Fv(,)e(i.e.)h(the)g(dif)n(\002culty)f(is)i(to)g(interpret)e(the)h -(system)g(\(\002le\))h(names)e(of)h(entities)h(relati)n(v)o(e)e(to)i -(the)f(entities)396 2420 y(containing)f(them,)g(e)n(v)o(en)g(if)i(the)f -(entities)h(are)f(deeply)f(nested.)396 2570 y(There)h(is)h(not)f(a)g -(\002x)o(ed)g(resolv)o(er)f(already)g(doing)g(e)n(v)o(erything)e(right) -j(-)g(resolving)f(entity)h(names)g(is)h(a)f(task)h(that)f(highly)396 -2678 y(depends)f(on)h(the)g(en)m(vironment.)d(The)j(XML)g -(speci\002cation)f(only)h(demands)f(that)h Fq(SYSTEM)g -Fv(entities)g(are)g(interpreted)396 2786 y(lik)o(e)h(URLs)g(\(which)e -(is)i(not)f(v)o(ery)f(precise,)h(as)h(there)e(are)i(lots)f(of)g(URL)h -(schemes)f(in)g(use\),)g(hoping)f(that)h(this)h(helps)396 -2894 y(o)o(v)o(ercoming)c(the)j(local)g(peculiarities)g(of)g(the)g(en)m -(vironment;)d(the)k(idea)f(is)h(that)f(if)h(you)e(do)h(not)f(kno)n(w)h -(your)396 3001 y(en)m(vironment)d(you)j(can)g(refer)f(to)h(other)g -(entities)g(by)g(denoting)e(URLs)k(for)d(them.)h(I)g(think)g(that)g -(this)h(interpretation)d(of)396 3109 y Fq(SYSTEM)i Fv(names)g(may)g(ha) -n(v)o(e)f(some)h(applications)f(in)i(the)f(internet,)f(b)n(ut)h(it)h -(is)g(not)f(the)g(\002rst)h(choice)f(in)g(general.)396 -3217 y(Because)h(of)f(this,)g(the)g(resolv)o(er)f(is)i(a)g(separate)f -(module)e(of)i(the)h(parser)e(that)h(can)g(be)h(e)o(xchanged)c(by)j -(another)f(one)g(if)396 3325 y(necessary;)h(more)f(precisely)-5 -b(,)19 b(the)h(parser)g(already)f(de\002nes)h(se)n(v)o(eral)f(resolv)o -(ers.)396 3475 y(The)h(follo)n(wing)f(resolv)o(ers)g(do)h(already)f(e)o -(xist:)p Black 396 3707 a Ft(\225)p Black 60 w Fv(Resolv)o(ers)h -(reading)f(from)g(arbitrary)g(input)g(channels.)g(These)h(can)g(be)g -(con\002gured)e(such)i(that)g(a)h(certain)f(ID)g(is)479 -3815 y(associated)g(with)h(the)f(channel;)f(in)h(this)h(case)g(inner)e -(references)g(to)h(e)o(xternal)f(entities)i(can)f(be)g(resolv)o(ed.)e -(There)i(is)479 3923 y(also)h(a)f(special)h(resolv)o(er)e(that)h -(interprets)f(SYSTEM)i(IDs)f(as)h(URLs;)g(this)g(resolv)o(er)e(can)h -(process)g(relati)n(v)o(e)479 4031 y(SYSTEM)h(names)e(and)h(determine)f -(the)h(corresponding)d(absolute)i(URL.)p Black 396 4139 -a Ft(\225)p Black 60 w Fv(A)i(resolv)o(er)e(that)h(reads)g(al)o(w)o -(ays)h(from)e(a)i(gi)n(v)o(en)d(O'Caml)j(string.)e(This)i(resolv)o(er)e -(is)i(not)f(able)g(to)g(resolv)o(e)f(further)479 4247 -y(names)h(unless)g(the)h(string)f(is)h(not)f(associated)g(with)g(an)o -(y)f(name,)h(i.e.)g(if)g(the)g(document)f(contained)f(in)j(the)f -(string)479 4355 y(refers)g(to)g(an)g(e)o(xternal)f(entity)-5 -b(,)20 b(this)g(reference)f(cannot)g(be)h(follo)n(wed)f(in)h(this)h -(case.)p Black 396 4463 a Ft(\225)p Black 60 w Fv(A)g(resolv)o(er)e -(for)g(\002le)i(names.)f(The)g Fq(SYSTEM)g Fv(name)f(is)i(interpreted)e -(as)i(\002le)f(URL)h(with)g(the)f(slash)h("/")f(as)h(separator)479 -4571 y(for)f(directories.)f(-)h(This)h(resolv)o(er)d(is)k(deri)n(v)o -(ed)c(from)h(the)h(generic)f(URL)i(resolv)o(er)-5 b(.)396 -4720 y(The)20 b(interf)o(ace)f(a)i(resolv)o(er)e(must)h(ha)n(v)o(e)g -(is)h(documented,)c(so)k(it)g(is)g(possible)f(to)g(write)g(your)f(o)n -(wn)h(resolv)o(er)-5 b(.)19 b(F)o(or)396 4828 y(e)o(xample,)g(you)g -(could)g(connect)g(the)h(parser)g(with)g(an)h(HTTP)f(client,)g(and)f -(resolv)o(e)h(URLs)h(of)f(the)g(HTTP)g(namespace.)p Black -3800 5278 a Fr(74)p Black eop -%%Page: 75 75 -75 74 bop Black 2348 67 a Fr(Chapter)20 b(4.)g(Con\002guring)e(and)i -(calling)f(the)h(par)o(ser)p Black 396 579 a Fv(The)g(resolv)o(er)f -(classes)i(support)e(that)h(se)n(v)o(eral)g(independent)e(resolv)o(ers) -h(are)h(combined)e(to)i(one)g(more)f(po)n(werful)396 -687 y(resolv)o(er;)g(thus)h(it)h(is)g(possible)f(to)h(combine)d(a)j -(self-written)e(resolv)o(er)g(with)i(the)f(already)f(e)o(xisting)g -(resolv)o(ers.)396 836 y(Note)h(that)h(the)f(e)o(xisting)f(resolv)o -(ers)h(only)f(interpret)g Fq(SYSTEM)h Fv(names,)f(not)h -Fq(PUBLIC)g Fv(names.)g(If)g(it)h(helps)f(you,)f(it)h(is)396 -944 y(possible)g(to)f(de\002ne)h(resolv)o(ers)e(for)h -Fq(PUBLIC)h Fv(names,)f(too;)g(for)g(e)o(xample,)f(such)i(a)g(resolv)o -(er)e(could)h(look)g(up)g(the)h(public)396 1052 y(name)g(in)g(a)h(hash) -f(table,)g(and)f(map)h(it)h(to)f(a)h(system)f(name)g(which)g(is)h -(passed)f(o)o(v)o(er)f(to)h(the)g(e)o(xisting)g(resolv)o(er)e(for)396 -1160 y(system)j(names.)e(It)i(is)g(relati)n(v)o(ely)e(simple)h(to)g -(pro)o(vide)f(such)g(a)i(resolv)o(er)-5 b(.)-2 1579 y -Fx(4.2.)39 b(Resolver)n(s)e(and)i(sour)m(ces)-2 1907 -y Fp(4.2.1.)c(Using)f(the)g(b)n(uilt-in)f(resolver)n(s)i(\(called)g -(sour)n(ces\))396 2075 y Fv(The)20 b(type)g Fq(source)g -Fv(enumerates)e(the)j(tw)o(o)f(possibilities)h(where)e(the)h(document)f -(to)h(parse)g(comes)g(from.)396 2255 y Fq(type)44 b(source)g(=)576 -2352 y(Entity)f(of)i(\(\(dtd)f(-)p Fo(>)g Fq(Pxp_entity.entity\))e(*)j -(Pxp_reader.resolver\))486 2449 y(|)g(ExtID)f(of)g(\(ext_id)g(*)g -(Pxp_reader.resolver\))396 2640 y Fv(Y)-9 b(ou)20 b(normally)e(need)i -(not)g(to)g(w)o(orry)f(about)h(this)g(type)g(as)h(there)f(are)g(con)m -(v)o(enience)d(functions)i(that)h(create)g Fq(source)396 -2748 y Fv(v)n(alues:)p Black 396 3105 a Ft(\225)p Black -60 w Fq(from_file)44 b(s)p Fv(:)20 b(The)g(document)e(is)j(read)f(from) -f(\002le)i Fq(s)p Fv(;)g(you)e(may)h(specify)f(absolute)h(or)g(relati)n -(v)o(e)f(path)h(names.)479 3213 y(The)g(\002le)h(name)f(must)g(be)g -(encoded)e(as)j(UTF-8)f(string.)479 3362 y(There)g(is)h(an)f(optional)f -(ar)o(gument)f Fq(~system_encoding)g Fv(specifying)g(the)j(character)d -(encoding)h(which)g(is)i(used)479 3470 y(for)f(the)g(names)g(of)g(the)g -(\002le)h(system.)f(F)o(or)g(e)o(xample,)e(if)j(this)g(encoding)d(is)j -(ISO-8859-1)c(and)j Fq(s)g Fv(is)i(also)e(a)479 3578 -y(ISO-8859-1)e(string,)h(you)h(can)g(form)f(the)h(source:)479 -3717 y Fq(let)45 b(s_utf8)88 b(=)i(recode_string)42 b -(~in_enc:`Enc_iso88591)g(~out_enc:`Enc_utf8)g(s)i(in)479 -3814 y(from_file)g(~system_encoding:`Enc_iso88591)39 -b(s_utf8)479 4005 y Fv(This)21 b Fq(source)e Fv(has)i(the)f(adv)n -(antage)e(that)j(it)f(is)i(able)e(to)g(resolv)o(e)f(inner)h(e)o -(xternal)f(entities;)h(i.e.)g(if)h(your)e(document)479 -4113 y(includes)g(data)g(from)g(another)f(\002le)i(\(using)f(the)g -Fq(SYSTEM)g Fv(attrib)n(ute\),)g(this)g(mode)g(will)h(\002nd)f(that)h -(\002le.)g(Ho)n(we)n(v)o(er)m(,)d(this)479 4221 y(mode)j(cannot)f -(resolv)o(e)g Fq(PUBLIC)h Fv(identi\002ers)f(nor)h Fq(SYSTEM)g -Fv(identi\002ers)f(other)h(than)g("\002le:".)p Black -396 4370 a Ft(\225)p Black 60 w Fq(from_channel)43 b(ch)p -Fv(:)21 b(The)e(document)g(is)i(read)e(from)h(the)g(channel)f -Fq(ch)p Fv(.)h(In)g(general,)f(this)h(source)g(also)g(supports)479 -4478 y(\002le)h(URLs)g(found)e(in)h(the)g(document;)f(ho)n(we)n(v)o(er) -m(,)e(by)j(def)o(ault)f(only)h(absolute)f(URLs)i(are)f(understood.)e -(It)i(is)479 4586 y(possible)g(to)h(associate)f(an)g(ID)g(with)h(the)f -(channel)f(such)h(that)g(the)g(resolv)o(er)f(kno)n(ws)h(ho)n(w)f(to)i -(interpret)e(relati)n(v)o(e)479 4694 y(URLs:)479 4832 -y Fq(from_channel)43 b(~id:\(System)g("file:///dir/dir1/"\))f(ch)p -Black 3800 5278 a Fr(75)p Black eop -%%Page: 76 76 -76 75 bop Black 2348 67 a Fr(Chapter)20 b(4.)g(Con\002guring)e(and)i -(calling)f(the)h(par)o(ser)p Black 396 579 a Fv(There)g(is)h(also)f -(the)g(~system_encoding)e(ar)o(gument)f(specifying)i(ho)n(w)h(\002le)h -(names)e(are)i(encoded.)d(-)i(The)g(e)o(xample)479 687 -y(from)f(abo)o(v)o(e)g(can)h(also)g(be)h(written)f(\(b)n(ut)f(it)i(is)g -(no)f(longer)f(possible)h(to)g(interpret)f(relati)n(v)o(e)h(URLs)h -(because)e(there)h(is)479 795 y(no)g(~id)g(ar)o(gument,)e(and)i -(computing)d(this)k(ar)o(gument)d(is)j(relati)n(v)o(ely)e(complicated)g -(because)g(it)i(must)f(be)h(a)f(v)n(alid)479 903 y(URL\):)479 -1041 y Fq(let)45 b(ch)f(=)h(open_in)e(s)i(in)479 1138 -y(let)g(src)f(=)h(from_channel)d(~system_encoding:`Enc_iso88591)e(ch)45 -b(in)479 1236 y(...;)479 1333 y(close_in)f(ch)p Black -396 1482 a Ft(\225)p Black 60 w Fq(from_string)f(s)p -Fv(:)21 b(The)f(string)g Fq(s)g Fv(is)h(the)g(document)d(to)i(parse.)g -(This)g(mode)f(is)j(not)d(able)h(to)h(interpret)e(\002le)i(names)479 -1590 y(of)f Fq(SYSTEM)g Fv(clauses,)g(nor)g(it)h(can)f(look)f(up)h -Fq(PUBLIC)f Fv(identi\002ers.)479 1740 y(Normally)-5 -b(,)19 b(the)h(encoding)e(of)i(the)g(string)g(is)h(detected)e(as)i -(usual)f(by)g(analyzing)f(the)h(XML)g(declaration,)e(if)j(an)o(y)-5 -b(.)479 1847 y(Ho)n(we)n(v)o(er)m(,)18 b(it)j(is)g(also)g(possible)f -(to)g(specify)g(the)g(encoding)e(directly:)479 1986 y -Fq(let)45 b(src)f(=)h(from_string)e(~fixenc:`ISO-8859-2)e(s)p -Black 396 2177 a Ft(\225)p Black 60 w Fq(ExtID)j(\(id,)g(r\))p -Fv(:)21 b(The)f(document)e(to)i(parse)g(is)h(denoted)e(by)h(the)g -(identi\002er)g Fq(id)g Fv(\(either)f(a)i Fq(SYSTEM)f -Fv(or)g Fq(PUBLIC)479 2285 y Fv(clause\),)g(and)g(this)g(identi\002er)g -(is)h(interpreted)d(by)i(the)g(resolv)o(er)f Fq(r)p Fv(.)i(Use)f(this)h -(mode)e(if)i(you)e(ha)n(v)o(e)h(written)g(your)f(o)n(wn)479 -2393 y(resolv)o(er)-5 b(.)479 2542 y(Which)20 b(character)f(sets)j(are) -e(possible)g(depends)e(on)i(the)g(passed)h(resolv)o(er)d -Fq(r)p Fv(.)p Black 396 2692 a Ft(\225)p Black 60 w Fq(Entity)44 -b(\(get_entity,)f(r\))p Fv(:)20 b(The)g(document)e(to)j(parse)f(is)h -(returned)d(by)i(the)g(function)f(in)m(v)n(ocation)479 -2800 y Fq(get_entity)43 b(dtd)p Fv(,)20 b(where)g Fq(dtd)g -Fv(is)h(the)g(DTD)f(object)g(to)g(use)g(\(it)h(may)f(be)g(empty\).)f -(Inner)f(e)o(xternal)h(references)479 2908 y(occuring)g(in)h(this)h -(entity)e(are)i(resolv)o(ed)d(using)i(the)g(resolv)o(er)f -Fq(r)p Fv(.)479 3057 y(Which)h(character)f(sets)j(are)e(possible)g -(depends)e(on)i(the)g(passed)h(resolv)o(er)d Fq(r)p Fv(.)-2 -3510 y Fp(4.2.2.)35 b(The)f(resolver)g(API)396 3677 y -Fv(A)21 b(resolv)o(er)e(is)i(an)f(object)g(that)g(can)g(be)g(opened)e -(lik)o(e)j(a)f(\002le,)h(b)n(ut)f(you)f(do)h(not)g(pass)g(the)h(\002le) -f(name)g(to)g(the)g(resolv)o(er)m(,)f(b)n(ut)396 3785 -y(the)h(XML)h(identi\002er)e(of)h(the)g(entity)g(to)h(read)e(from)g -(\(either)h(a)g Fq(SYSTEM)g Fv(or)g Fq(PUBLIC)g Fv(clause\).)f(When)h -(opened,)f(the)396 3893 y(resolv)o(er)g(must)h(return)f(the)i -Fq(Lexing.lexbuf)d Fv(that)i(reads)g(the)h(characters.)e(The)g(resolv)o -(er)g(can)h(be)h(closed,)e(and)h(it)396 4001 y(can)g(be)g(cloned.)f -(Furthermore,)f(it)j(is)g(possible)f(to)g(tell)h(the)f(resolv)o(er)f -(which)h(character)f(set)i(it)g(should)e(assume.)h(-)g(The)396 -4109 y(follo)n(wing)f(from)g(Pxp_reader:)396 4289 y Fq(exception)44 -b(Not_competent)396 4386 y(exception)g(Not_resolvable)e(of)j(exn)396 -4581 y(class)f(type)g(resolver)g(=)486 4678 y(object)576 -4775 y(method)f(init_rep_encoding)f(:)j(rep_encoding)e(->)h(unit)576 -4872 y(method)f(init_warner)g(:)i(collect_warnings)d(->)j(unit)p -Black 3798 5278 a Fr(76)p Black eop -%%Page: 77 77 -77 76 bop Black 2348 67 a Fr(Chapter)20 b(4.)g(Con\002guring)e(and)i -(calling)f(the)h(par)o(ser)p Black 576 579 a Fq(method)43 -b(rep_encoding)g(:)i(rep_encoding)576 676 y(method)e(open_in)h(:)h -(ext_id)f(->)g(Lexing.lexbuf)576 773 y(method)f(close_in)h(:)h(unit)576 -870 y(method)e(change_encoding)g(:)h(string)g(->)h(unit)576 -967 y(method)e(clone)h(:)h(resolver)576 1065 y(method)e(close_all)h(:)g -(unit)486 1162 y(end)396 1353 y Fv(The)20 b(resolv)o(er)f(object)h -(must)g(w)o(ork)f(as)i(follo)n(ws:)p Black 396 1627 a -Ft(\225)p Black 60 w Fv(When)f(the)h(parser)e(is)i(called,)f(it)h -(tells)g(the)f(resolv)o(er)f(the)h(w)o(arner)g(object)f(and)h(the)g -(internal)g(encoding)e(by)i(in)m(v)n(oking)479 1735 y -Fq(init_warner)f Fv(and)h Fq(init_rep_encoding)p Fv(.)d(The)j(resolv)o -(er)f(should)g(store)i(these)f(v)n(alues.)f(The)h(method)479 -1843 y Fq(rep_encoding)f Fv(should)g(return)g(the)h(internal)g -(encoding.)p Black 396 1950 a Ft(\225)p Black 60 w Fv(If)g(the)h -(parser)e(w)o(ants)i(to)f(read)g(from)f(the)h(resolv)o(er)m(,)e(it)j -(in)m(v)n(ok)o(es)f(the)g(method)f Fq(open_in)p Fv(.)g(Either)h(the)g -(resolv)o(er)479 2058 y(succeeds,)g(in)g(which)g(case)g(the)h -Fq(Lexing.lexbuf)d Fv(reading)h(from)g(the)h(\002le)h(or)f(stream)g -(must)g(be)h(returned,)d(or)479 2166 y(opening)h(f)o(ails.)h(In)g(the)g -(latter)h(case)f(the)h(method)d(implementation)g(should)h(raise)i(an)f -(e)o(xception)e(\(see)j(belo)n(w\).)p Black 396 2274 -a Ft(\225)p Black 60 w Fv(If)f(the)h(parser)e(\002nishes)i(reading,)d -(it)j(calls)g(the)f Fq(close_in)g Fv(method.)p Black -396 2382 a Ft(\225)p Black 60 w Fv(If)g(the)h(parser)e(\002nds)h(a)h -(reference)d(to)j(another)e(e)o(xternal)f(entity)i(in)h(the)f(input)f -(stream,)h(it)h(calls)g Fq(clone)f Fv(to)g(get)h(a)479 -2490 y(second)f(resolv)o(er)f(which)g(must)h(be)h(initially)f(closed)g -(\(not)f(yet)h(connected)f(with)h(an)g(input)f(stream\).)h(The)g -(parser)479 2598 y(then)g(in)m(v)n(ok)o(es)f Fq(open_in)h -Fv(and)f(the)i(other)e(methods)g(as)i(described.)p Black -396 2706 a Ft(\225)p Black 60 w Fv(If)f(you)g(already)f(kno)n(w)g(the)h -(character)f(set)i(of)f(the)g(input)g(stream,)f(you)h(should)f(recode)g -(it)i(to)f(the)g(internal)479 2814 y(encoding,)e(and)i(de\002ne)f(the)i -(method)d Fq(change_encoding)h Fv(as)i(an)f(empty)f(method.)p -Black 396 2922 a Ft(\225)p Black 60 w Fv(If)h(you)g(w)o(ant)g(to)g -(support)f(multiple)h(e)o(xternal)f(character)g(sets,)i(the)f(object)f -(must)i(follo)n(w)e(a)i(much)e(more)479 3030 y(complicated)g(protocol.) -f(Directly)i(after)g Fq(open_in)f Fv(has)i(been)e(called,)h(the)g -(resolv)o(er)f(must)h(return)f(a)i(le)o(xical)f(b)n(uf)n(fer)479 -3138 y(that)h(only)e(reads)h(one)g(byte)f(at)i(a)g(time.)f(This)g(is)h -(only)f(possible)f(if)i(you)e(create)h(the)g(le)o(xical)g(b)n(uf)n(fer) -f(with)479 3246 y Fq(Lexing.from_function)p Fv(;)e(the)j(function)d -(must)j(then)f(al)o(w)o(ays)h(return)e(1)i(if)f(the)h(EOF)g(is)g(not)f -(yet)h(reached,)e(and)h(0)479 3354 y(if)i(EOF)f(is)h(reached.)e(If)h -(the)g(parser)g(has)g(read)g(the)g(\002rst)h(line)f(of)g(the)h -(document,)c(it)k(will)g(in)m(v)n(ok)o(e)479 3461 y Fq(change_encoding) -e Fv(to)h(tell)h(the)f(resolv)o(er)f(which)h(character)e(set)j(to)g -(assume.)f(From)f(this)i(moment,)e(the)h(object)479 3569 -y(can)g(return)f(more)h(than)f(one)h(byte)g(at)g(once.)g(The)g(ar)o -(gument)d(of)j Fq(change_encoding)f Fv(is)i(either)e(the)i(parameter)d -(of)479 3677 y(the)i("encoding")e(attrib)n(ute)i(of)g(the)g(XML)h -(declaration,)d(or)i(the)g(empty)f(string)h(if)h(there)e(is)j(not)d(an) -o(y)h(XML)479 3785 y(declaration)f(or)h(if)g(the)h(declaration)d(does)i -(not)g(contain)f(an)h(encoding)e(attrib)n(ute.)479 3935 -y(At)j(the)f(be)o(ginning)e(the)i(resolv)o(er)f(must)h(only)g(return)f -(one)g(character)g(e)n(v)o(ery)g(time)h(something)f(is)i(read)f(from)f -(the)479 4043 y(le)o(xical)h(b)n(uf)n(fer)-5 b(.)19 b(The)h(reason)f -(for)h(this)h(is)g(that)f(you)f(otherwise)h(w)o(ould)f(not)h(e)o -(xactly)g(kno)n(w)f(at)h(which)g(position)f(in)479 4151 -y(the)h(input)g(stream)g(the)g(character)f(set)i(changes.)479 -4300 y(If)f(you)g(w)o(ant)g(automatic)f(recognition)f(of)i(the)g -(character)f(set,)i(it)g(is)g(up)f(to)g(the)g(resolv)o(er)f(object)h -(to)g(implement)f(this.)p Black 396 4449 a Ft(\225)p -Black 60 w Fv(If)h(an)g(error)g(occurs,)f(the)h(parser)g(calls)g(the)h -(method)d Fq(close_all)i Fv(for)f(the)h(top-le)n(v)o(el)f(resolv)o(er;) -g(this)i(method)479 4557 y(should)e(close)i(itself)g(\(if)f(not)g -(already)f(done\))f(and)i(all)h(clones.)396 4748 y Fu(Exceptions.)f -Fv(It)h(is)g(possible)f(to)g(chain)g(resolv)o(ers)f(such)h(that)g(when) -g(the)g(\002rst)h(resolv)o(er)e(is)i(not)f(able)g(to)g(open)f(the)396 -4856 y(entity)-5 b(,)20 b(the)g(other)f(resolv)o(ers)g(of)h(the)g -(chain)g(are)g(tried)g(in)g(turn.)g(The)g(method)e Fq(open_in)i -Fv(should)f(raise)i(the)f(e)o(xception)p Black 3797 5278 -a Fr(77)p Black eop -%%Page: 78 78 -78 77 bop Black 2348 67 a Fr(Chapter)20 b(4.)g(Con\002guring)e(and)i -(calling)f(the)h(par)o(ser)p Black 396 579 a Fq(Not_competent)f -Fv(to)h(indicate)g(that)g(the)g(ne)o(xt)g(resolv)o(er)f(should)g(try)h -(to)g(open)f(the)i(entity)-5 b(.)19 b(If)h(the)g(resolv)o(er)f(is)i -(able)f(to)396 687 y(handle)f(the)i(ID,)f(b)n(ut)g(some)g(other)f -(error)g(occurs,)g(the)i(e)o(xception)d Fq(Not_resolvable)g -Fv(should)i(be)g(raised)g(to)g(force)396 795 y(that)h(the)f(chain)f -(breaks.)396 944 y(Example:)g(Ho)n(w)h(to)h(de\002ne)e(a)i(resolv)o(er) -e(that)h(is)h(equi)n(v)n(alent)e(to)h(from_string:)e(...)-2 -1314 y Fp(4.2.3.)35 b(Prede\002ned)f(resolver)h(components)396 -1482 y Fv(There)20 b(are)g(some)g(classes)h(in)f(Pxp_reader)e(that)j -(de\002ne)e(common)g(resolv)o(er)f(beha)n(viour)-5 b(.)396 -1662 y Fq(class)44 b(resolve_read_this_channel)d(:)576 -1759 y(?id:ext_id)i(->)576 1856 y(?fixenc:encoding)f(->)576 -1953 y(?auto_close:bool)g(->)576 2050 y(in_channel)h(->)755 -2147 y(resolver)396 2338 y Fv(Reads)21 b(from)e(the)h(passed)g(channel) -f(\(it)i(may)f(be)g(e)n(v)o(en)f(a)i(pipe\).)e(If)h(the)g -Fq(~id)g Fv(ar)o(gument)e(is)j(passed)f(to)h(the)f(object,)f(the)396 -2446 y(created)h(resolv)o(er)f(accepts)h(only)f(this)i(ID.)f(Otherwise) -g(all)h(IDs)f(are)g(accepted.)f(-)i(Once)f(the)g(resolv)o(er)f(has)h -(been)396 2554 y(cloned,)f(it)h(does)g(not)f(accept)h(an)o(y)f(ID.)g -(This)h(means)g(that)g(this)g(resolv)o(er)e(cannot)h(handle)g(inner)g -(references)f(to)i(e)o(xternal)396 2662 y(entities.)h(Note)f(that)g -(you)f(can)h(combine)f(this)i(resolv)o(er)e(with)h(another)f(resolv)o -(er)g(that)h(can)g(handle)f(inner)g(references)396 2770 -y(\(such)h(as)h(resolv)o(e_as_\002le\);)d(see)j(class)g('combine')d -(belo)n(w)-5 b(.)19 b(-)h(If)g(you)g(pass)g(the)h Fq(~fixenc)e -Fv(ar)o(gument,)f(the)i(encoding)396 2878 y(of)g(the)g(channel)f(is)i -(set)g(to)g(the)f(passed)g(v)n(alue,)f(re)o(gardless)g(of)h(an)o(y)f -(auto-recognition)e(or)j(an)o(y)f(XML)h(declaration.)f(-)h(If)396 -2986 y Fq(~auto_close)43 b(=)i(true)20 b Fv(\(which)f(is)i(the)g(def)o -(ault\),)e(the)h(channel)f(is)i(closed)f(after)g(use.)g(If)g -Fq(~auto_close)43 b(=)396 3094 y(false)p Fv(,)20 b(the)g(channel)f(is)i -(left)g(open.)396 3315 y Fq(class)44 b(resolve_read_any_channel)d(:)576 -3413 y(?auto_close:bool)h(->)576 3510 y(channel_of_id:\(ext_id)f(->)j -(\(in_channel)f(*)i(encoding)f(option\)\))f(->)755 3607 -y(resolver)396 3798 y Fv(This)21 b(resolv)o(er)e(calls)h(the)h -(function)d Fq(~channel_of_id)h Fv(to)h(open)f(a)i(ne)n(w)f(channel)f -(for)g(the)h(passed)g Fq(ext_id)p Fv(.)g(This)396 3906 -y(function)f(must)h(either)g(return)f(the)h(channel)f(and)h(the)g -(encoding,)e(or)i(it)g(must)h(f)o(ail)f(with)h(Not_competent.)c(The)396 -4014 y(function)i(must)h(return)f Fq(None)h Fv(as)h(encoding)d(if)j -(the)f(def)o(ault)f(mechanism)g(to)h(recognize)f(the)h(encoding)e -(should)h(be)396 4122 y(used.)g(It)i(must)e(return)g -Fq(Some)44 b(e)20 b Fv(if)g(it)h(is)f(already)f(kno)n(wn)f(that)i(the)g -(encoding)d(of)j(the)f(channel)g(is)i Fq(e)p Fv(.)e(If)h -Fq(~auto_close)396 4230 y(=)45 b(true)19 b Fv(\(which)g(is)h(the)f(def) -o(ault\),)f(the)i(channel)e(is)i(closed)f(after)g(use.)h(If)f -Fq(~auto_close)43 b(=)h(false)p Fv(,)19 b(the)h(channel)e(is)396 -4337 y(left)j(open.)396 4559 y Fq(class)44 b(resolve_read_url_channel)d -(:)576 4656 y(?base_url:Neturl.url)g(->)576 4753 y(?auto_close:bool)h -(->)576 4851 y(url_of_id:\(ext_id)g(->)i(Neturl.url\))f(->)p -Black 3800 5278 a Fr(78)p Black eop -%%Page: 79 79 -79 78 bop Black 2348 67 a Fr(Chapter)20 b(4.)g(Con\002guring)e(and)i -(calling)f(the)h(par)o(ser)p Black 576 579 a Fq -(channel_of_url:\(Neturl.url)40 b(->)45 b(\(in_channel)e(*)h(encoding)g -(option\)\))f(->)755 676 y(resolver)396 867 y Fv(When)20 -b(this)h(resolv)o(er)e(gets)h(an)h(ID)f(to)g(read)g(from,)f(it)i(calls) -g(the)f(function)e Fq(~url_of_id)h Fv(to)i(get)f(the)g(corresponding) -396 975 y(URL.)h(This)f(URL)h(may)f(be)g(a)g(relati)n(v)o(e)g(URL;)h -(ho)n(we)n(v)o(er)m(,)c(a)k(URL)g(scheme)f(must)g(be)g(used)g(which)f -(contains)h(a)h(path.)396 1083 y(The)f(resolv)o(er)f(con)m(v)o(erts)g -(the)h(URL)h(to)f(an)g(absolute)f(URL)i(if)g(necessary)-5 -b(.)19 b(The)g(second)h(function,)396 1191 y Fq(~channel_of_url)p -Fv(,)e(is)j(fed)f(with)h(the)f(absolute)f(URL)i(as)g(input.)e(This)h -(function)f(opens)g(the)i(resource)e(to)h(read)396 1299 -y(from,)f(and)h(returns)f(the)h(channel)f(and)h(the)g(encoding)e(of)i -(the)g(resource.)396 1448 y(Both)g(functions,)f Fq(~url_of_id)g -Fv(and)h Fq(~channel_of_url)p Fv(,)e(can)i(raise)g(Not_competent)e(to)i -(indicate)g(that)g(the)396 1556 y(object)g(is)h(not)f(able)g(to)g(read) -g(from)f(the)h(speci\002ed)g(resource.)f(Ho)n(we)n(v)o(er)m(,)f(there)i -(is)h(a)f(dif)n(ference:)f(A)h(Not_competent)396 1664 -y(from)f Fq(~url_of_id)g Fv(is)j(left)e(as)h(it)g(is,)g(b)n(ut)f(a)h -(Not_competent)c(from)i Fq(~channel_of_url)g Fv(is)i(con)m(v)o(erted)c -(to)396 1772 y(Not_resolv)n(able.)h(So)i(only)g Fq(~url_of_id)f -Fv(decides)h(which)f(URLs)i(are)f(accepted)g(by)f(the)i(resolv)o(er)e -(and)g(which)h(not.)396 1921 y(The)g(function)f Fq(~channel_of_url)f -Fv(must)i(return)f Fq(None)h Fv(as)h(encoding)d(if)j(the)f(def)o(ault)f -(mechanism)g(to)i(recognize)396 2029 y(the)f(encoding)f(should)g(be)h -(used.)g(It)g(must)g(return)f Fq(Some)44 b(e)21 b Fv(if)g(it)f(is)i -(already)d(kno)n(wn)f(that)j(the)f(encoding)e(of)i(the)396 -2137 y(channel)f(is)i Fq(e)p Fv(.)396 2287 y(If)f Fq(~auto_close)43 -b(=)i(true)20 b Fv(\(which)f(is)i(the)g(def)o(ault\),)e(the)h(channel)f -(is)i(closed)f(after)g(use.)g(If)g Fq(~auto_close)43 -b(=)396 2395 y(false)p Fv(,)20 b(the)g(channel)f(is)i(left)g(open.)396 -2544 y(Objects)f(of)g(this)g(class)h(contain)e(a)h(base)g(URL)g(relati) -n(v)o(e)f(to)h(which)g(relati)n(v)o(e)f(URLs)h(are)g(interpreted.)e -(When)i(creating)e(a)396 2652 y(ne)n(w)i(object,)g(you)f(can)h(specify) -f(the)i(base)f(URL)h(by)f(passing)f(it)i(as)g Fq(~base_url)e -Fv(ar)o(gument.)f(When)i(an)g(e)o(xisting)396 2760 y(object)g(is)h -(cloned,)e(the)h(base)g(URL)h(of)f(the)g(clone)g(is)h(the)f(URL)h(of)f -(the)g(original)f(object.)h(-)g(Note)g(that)g(the)h(term)f("base)396 -2868 y(URL")h(has)f(a)h(strict)g(de\002nition)e(in)h(RFC)i(1808.)396 -3089 y Fq(class)44 b(resolve_read_this_string)d(:)576 -3187 y(?id:ext_id)i(->)576 3284 y(?fixenc:encoding)f(->)576 -3381 y(string)h(->)755 3478 y(resolver)396 3669 y Fv(Reads)21 -b(from)e(the)h(passed)g(string.)g(If)g(the)g Fq(~id)h -Fv(ar)o(gument)c(is)k(passed)g(to)f(the)g(object,)g(the)g(created)f -(resolv)o(er)g(accepts)396 3777 y(only)h(this)g(ID.)g(Otherwise)g(all)h -(IDs)g(are)f(accepted.)f(-)h(Once)g(the)g(resolv)o(er)f(has)i(been)e -(cloned,)g(it)i(does)f(not)g(accept)g(an)o(y)396 3885 -y(ID.)g(This)h(means)f(that)g(this)h(resolv)o(er)e(cannot)g(handle)g -(inner)g(references)g(to)h(e)o(xternal)f(entities.)i(Note)f(that)g(you) -f(can)396 3993 y(combine)g(this)i(resolv)o(er)e(with)h(another)f -(resolv)o(er)g(that)h(can)g(handle)f(inner)g(references)g(\(such)h(as)h -(resolv)o(e_as_\002le\);)396 4101 y(see)g(class)g('combine')d(belo)n(w) --5 b(.)19 b(-)i(If)f(you)f(pass)i(the)f Fq(~fixenc)f -Fv(ar)o(gument,)f(the)i(encoding)e(of)i(the)g(string)g(is)h(set)g(to)g -(the)396 4209 y(passed)f(v)n(alue,)g(re)o(gardless)e(of)i(an)o(y)g -(auto-recognition)c(or)k(an)o(y)f(XML)i(declaration.)396 -4430 y Fq(class)44 b(resolve_read_any_string)d(:)576 -4527 y(string_of_id:\(ext_id)g(->)k(\(string)e(*)i(encoding)e -(option\)\))h(->)755 4625 y(resolver)p Black 3800 5278 -a Fr(79)p Black eop -%%Page: 80 80 -80 79 bop Black 2348 67 a Fr(Chapter)20 b(4.)g(Con\002guring)e(and)i -(calling)f(the)h(par)o(ser)p Black 396 579 a Fv(This)h(resolv)o(er)e -(calls)h(the)h(function)d Fq(~string_of_id)h Fv(to)h(get)g(the)g -(string)g(for)g(the)g(passed)g Fq(ext_id)p Fv(.)g(This)g(function)396 -687 y(must)g(either)g(return)f(the)i(string)e(and)h(the)g(encoding,)e -(or)i(it)h(must)f(f)o(ail)h(with)f(Not_competent.)e(The)h(function)g -(must)396 795 y(return)g Fq(None)h Fv(as)h(encoding)d(if)j(the)f(def)o -(ault)g(mechanism)e(to)j(recognize)d(the)i(encoding)f(should)g(be)h -(used.)g(It)g(must)396 903 y(return)f Fq(Some)44 b(e)21 -b Fv(if)g(it)f(is)i(already)d(kno)n(wn)f(that)j(the)f(encoding)e(of)i -(the)g(string)g(is)h Fq(e)p Fv(.)396 1124 y Fq(class)44 -b(resolve_as_file)f(:)576 1222 y(?file_prefix:[)f(`Not_recognized)g(|)j -(`Allowed)f(|)g(`Required)g(])g(->)576 1319 y(?host_prefix:[)e -(`Not_recognized)g(|)j(`Allowed)f(|)g(`Required)g(])g(->)576 -1416 y(?system_encoding:encoding)c(->)576 1513 y(?url_of_id:\(ext_id)h -(->)k(Neturl.url\))e(->)576 1610 y(?channel_of_url:)f(\(Neturl.url)h -(->)h(\(in_channel)f(*)i(encoding)e(option\)\))h(->)576 -1707 y(unit)g(->)755 1804 y(resolver)396 1995 y Fv(Reads)21 -b(from)e(the)h(local)g(\002le)h(system.)f(Ev)o(ery)f(\002le)i(name)f -(is)h(interpreted)d(as)j(\002le)g(name)f(of)f(the)i(local)f(\002le)h -(system,)f(and)396 2103 y(the)g(referred)f(\002le)i(is)g(read.)396 -2253 y(The)f(full)g(form)f(of)h(a)h(\002le)g(URL)g(is:)g -(\002le://host/path,)e(where)h('host')f(speci\002es)i(the)f(host)g -(system)g(where)g(the)g(\002le)396 2361 y(identi\002ed)g('path')f -(resides.)h(host)g(=)g("")h(or)f(host)g(=)h("localhost")e(are)h -(accepted;)f(other)h(v)n(alues)f(will)i(raise)396 2468 -y(Not_competent.)d(The)i(standard)f(for)g(\002le)i(URLs)g(is)g -(de\002ned)e(in)i(RFC)g(1738.)396 2618 y(Option)f Fq(~file_prefix)p -Fv(:)e(Speci\002es)j(ho)n(w)f(the)g("\002le:")h(pre\002x)e(of)h(\002le) -h(names)f(is)h(handled:)p Black 396 2850 a Ft(\225)p -Black 60 w Fq(`Not_recognized:)p Fv(The)c(pre\002x)j(is)h(not)f -(recognized.)p Black 396 2958 a Ft(\225)p Black 60 w -Fq(`Allowed:)g Fv(The)f(pre\002x)h(is)h(allo)n(wed)e(b)n(ut)i(not)f -(required)e(\(the)i(def)o(ault\).)p Black 396 3066 a -Ft(\225)p Black 60 w Fq(`Required:)f Fv(The)h(pre\002x)g(is)h -(required.)396 3257 y(Option)f Fq(~host_prefix:)e Fv(Speci\002es)j(ho)n -(w)e(the)i("//host")f(phrase)f(of)h(\002le)h(names)f(is)h(handled:)p -Black 396 3490 a Ft(\225)p Black 60 w Fq(`Not_recognized:)p -Fv(The)c(pre\002x)j(is)h(not)f(recognized.)p Black 396 -3598 a Ft(\225)p Black 60 w Fq(`Allowed:)g Fv(The)f(pre\002x)h(is)h -(allo)n(wed)e(b)n(ut)i(not)f(required)e(\(the)i(def)o(ault\).)p -Black 396 3706 a Ft(\225)p Black 60 w Fq(`Required:)f -Fv(The)h(pre\002x)g(is)h(required.)396 3896 y(Option)f -Fq(~system_encoding:)e Fv(Speci\002es)i(the)g(encoding)e(of)i(\002le)h -(names)f(of)g(the)g(local)g(\002le)h(system.)f(Def)o(ault:)396 -4004 y(UTF-8.)396 4154 y(Options)g Fq(~url_of_id)p Fv(,)f -Fq(~channel_of_url)p Fv(:)f(Not)i(for)g(the)g(casual)g(user!)396 -4376 y Fq(class)44 b(combine)g(:)576 4473 y(?prefer:resolver)e(->)576 -4570 y(resolver)h(list)h(->)755 4667 y(resolver)p Black -3800 5278 a Fr(80)p Black eop -%%Page: 81 81 -81 80 bop Black 2348 67 a Fr(Chapter)20 b(4.)g(Con\002guring)e(and)i -(calling)f(the)h(par)o(ser)p Black 396 579 a Fv(Combines)g(se)n(v)o -(eral)f(resolv)o(er)g(objects.)h(If)g(a)h(concrete)e(entity)g(with)i -(an)f Fq(ext_id)g Fv(is)h(to)f(be)g(opened,)f(the)h(combined)396 -687 y(resolv)o(er)f(tries)i(the)f(contained)f(resolv)o(ers)g(in)h(turn) -g(until)g(a)g(resolv)o(er)f(accepts)h(opening)f(the)h(entity)g(\(i.e.)g -(it)g(does)g(not)396 795 y(raise)h(Not_competent)c(on)j(open_in\).)396 -944 y(Clones:)h(If)f(the)g('clone')f(method)g(is)i(in)m(v)n(ok)o(ed)d -(before)h('open_in',)e(all)k(contained)e(resolv)o(ers)g(are)h(cloned)f -(separately)396 1052 y(and)h(again)f(combined.)f(If)i(the)g('clone')f -(method)g(is)i(in)m(v)n(ok)o(ed)e(after)g('open_in')f(\(i.e.)i(while)g -(the)g(resolv)o(er)f(is)i(open\),)396 1160 y(additionally)e(the)h -(clone)f(of)h(the)h(acti)n(v)o(e)e(resolv)o(er)g(is)i(\003agged)f(as)g -(being)g(preferred,)d(i.e.)k(it)f(is)i(tried)e(\002rst.)-2 -1662 y Fx(4.3.)39 b(The)g(DTD)g(c)m(lasses)396 1841 y -Fr(Sorry)-5 b(,)21 b(not)f(yet)g(written.)h(P)-7 b(erhaps)20 -b(the)g(interface)g(de\002nition)e(of)j(Pxp_dtd)d(e)n(xpr)m(esses)j -(the)f(same:)396 2063 y Fq(\(****************************************)o -(******)o(******)o(******)o(******)o(*****)o(*\))396 -2160 y(\(*)3048 b(*\))396 2257 y(\(*)45 b(Pxp_dtd:)2643 -b(*\))396 2354 y(\(*)224 b(Object)44 b(model)g(of)g(document)g(type)g -(declarations)939 b(*\))396 2452 y(\(*)3048 b(*\))396 -2549 y(\(****************************************)o(******)o(******)o -(******)o(******)o(*****)o(*\))396 2743 y(\(*)45 b -(======================================)o(======)o(======)o(======)o -(======)o(=====)o(===)441 2840 y(*)g(OVERVIEW)441 2937 -y(*)441 3034 y(*)g(class)f(dtd)g(...............)e(represents)i(the)g -(whole)g(DTD,)g(including)f(element)441 3132 y(*)1210 -b(declarations,)43 b(entity)h(declarations,)f(notation)441 -3229 y(*)1210 b(declarations,)43 b(and)h(processing)g(instructions)441 -3326 y(*)h(class)f(dtd_element)f(.......)g(represents)h(an)g(element)g -(declaration)f(consisting)441 3423 y(*)1210 b(of)45 b(a)g(content)e -(model)h(and)h(an)f(attribute)f(list)441 3520 y(*)1210 -b(declaration)441 3617 y(*)45 b(class)f(dtd_notation)f(......)g -(represents)h(a)g(notation)g(declaration)441 3714 y(*)h(class)f -(proc_instruction)e(..)i(represents)g(a)g(processing)f(instruction)441 -3811 y(*)i(======================================)o(======)o(======)o -(======)o(======)o(=====)o(===)441 3909 y(*)441 4006 -y(*\))396 4297 y(class)f(dtd)h(:)486 4394 y(\(*)f(Creation:)531 -4491 y(*)134 b(new)44 b(dtd)531 4589 y(*)g(creates)g(a)h(new,)f(empty)g -(DTD)g(object)g(without)g(any)g(declaration,)f(without)g(a)i(root)531 -4686 y(*)f(element,)g(without)g(an)g(ID.)531 4783 y(*\))p -Black 3800 5278 a Fr(81)p Black eop -%%Page: 82 82 -82 81 bop Black 2348 67 a Fr(Chapter)20 b(4.)g(Con\002guring)e(and)i -(calling)f(the)h(par)o(ser)p Black 486 579 a Fq -(Pxp_types.collect_warnings)40 b(-)p Fo(>)486 676 y Fq -(Pxp_types.rep_encoding)h(-)p Fo(>)486 773 y Fq(object)576 -870 y(method)i(root)i(:)f(string)g(option)665 967 y(\(*)h(get)f(the)g -(name)h(of)f(the)g(root)h(element)e(if)i(present)e(*\))576 -1162 y(method)g(set_root)h(:)h(string)e(-)p Fo(>)i Fq(unit)665 -1259 y(\(*)g(set)f(the)g(name)h(of)f(the)g(root)h(element.)e(This)h -(method)g(can)g(be)h(invoked)710 1356 y(*)g(only)f(once)710 -1453 y(*\))576 1647 y(method)f(id)i(:)g(Pxp_types.dtd_id)d(option)665 -1745 y(\(*)j(get)f(the)g(identifier)g(for)g(this)g(DTD)g(*\))576 -1939 y(method)f(set_id)h(:)h(Pxp_types.dtd_id)d(-)p Fo(>)i -Fq(unit)665 2036 y(\(*)h(set)f(the)g(identifier.)f(This)i(method)e(can) -i(be)f(invoked)g(only)g(once)g(*\))576 2230 y(method)f(encoding)h(:)h -(Pxp_types.rep_encoding)665 2327 y(\(*)g(returns)e(the)i(encoding)e -(used)h(for)h(character)e(representation)g(*\))576 2619 -y(method)g(allow_arbitrary)g(:)h(unit)665 2716 y(\(*)h(After)f(this)g -(method)g(has)g(been)g(invoked,)g(the)g(ob-)396 2813 -y(ject)g(changes)g(its)g(behaviour:)710 2910 y(*)h(-)f(elements)g(and)g -(notations)g(that)g(have)g(not)g(been)g(added)g(may)h(be)f(used)g(in)h -(an)710 3007 y(*)134 b(arbitrary)44 b(way;)g(the)g(methods)g("element") -f(and)i("notation")e(indicate)g(this)710 3104 y(*)134 -b(by)45 b(raising)f(Undeclared)f(instead)g(of)i(Validation_error.)710 -3202 y(*\))576 3396 y(method)e(disallow_arbitrary)f(:)j(unit)576 -3590 y(method)e(arbitrary_allowed)f(:)j(bool)665 3687 -y(\(*)g(Returns)e(whether)h(arbitrary)f(contents)h(are)g(allowed)g(or)g -(not.)h(*\))576 3882 y(method)e(standalone_declaration)f(:)i(bool)665 -3979 y(\(*)h(Whether)e(there)h(is)h(a)g('standalone')d(declaration)h -(or)i(not.)f(Strictly)710 4076 y(*)h(speaking,)e(this)h(declaration)f -(is)i(not)f(part)g(of)h(the)f(DTD,)g(but)h(it)f(is)710 -4173 y(*)h(included)e(here)h(because)g(of)h(practical)e(reasons.)710 -4270 y(*)i(If)f(not)h(set,)f(this)g(property)f(defaults)h(to)g -('false'.)710 4367 y(*\))576 4561 y(method)f -(set_standalone_declaration)e(:)k(bool)f(-)p Fo(>)g Fq(unit)665 -4659 y(\(*)h(Sets)f(the)g('standalone')f(declaration.)g(*\))p -Black 3800 5278 a Fr(82)p Black eop -%%Page: 83 83 -83 82 bop Black 2348 67 a Fr(Chapter)20 b(4.)g(Con\002guring)e(and)i -(calling)f(the)h(par)o(ser)p Black 576 579 a Fq(method)43 -b(add_element)g(:)i(dtd_element)e(-)p Fo(>)h Fq(unit)665 -676 y(\(*)h(add)f(the)g(given)g(element)g(declaration)f(to)i(this)f -(DTD.)g(Raises)g(Not_found)710 773 y(*)h(if)f(there)g(is)h(already)e -(an)i(element)f(declaration)f(with)h(the)g(same)g(name.)710 -870 y(*\))576 1065 y(method)f(add_gen_entity)g(:)i(Pxp_entity.entity)d -(-)p Fo(>)i Fq(bool)g(-)p Fo(>)g Fq(unit)665 1162 y(\(*)h -(add_gen_entity)d(e)j(extdecl:)710 1259 y(*)g(add)f(the)g(entity)g('e') -h(as)f(general)g(entity)g(to)g(this)g(DTD)h(\(general)e(entities)710 -1356 y(*)i(are)f(those)g(represented)f(by)i(&name;\).)e(If)i(there)f -(is)g(already)g(a)g(declaration)710 1453 y(*)h(with)f(the)g(same)g -(name,)g(the)h(second)f(definition)f(is)h(ignored;)g(as)g(excep-)396 -1550 y(tion)g(from)710 1647 y(*)h(this)f(rule,)g(entities)f(with)i -(names)f("lt",)g("gt",)g("amp",)f("quot",)h(and)g("apos")710 -1745 y(*)h(may)f(only)g(be)h(redeclared)e(with)h(a)h(definition)e(that) -h(is)h(equivalent)e(to)h(the)710 1842 y(*)h(standard)e(definition;)g -(otherwise)h(a)g(Validation_error)e(is)j(raised.)710 -1939 y(*)710 2036 y(*)g('extdecl':)e('true')h(indicates)f(that)h(the)h -(entity)e(declaration)g(occurs)h(in)710 2133 y(*)h(an)f(external)g -(entity.)f(\(Used)h(for)h(the)f(standalone)f(check.\))710 -2230 y(*\))576 2424 y(method)g(add_par_entity)g(:)i(Pxp_entity.entity)d -(-)p Fo(>)i Fq(unit)665 2522 y(\(*)h(add)f(the)g(given)g(entity)g(as)h -(parameter)e(entity)h(to)g(this)h(DTD)f(\(parameter)710 -2619 y(*)h(entities)e(are)i(those)f(represented)f(by)h(\045name;\).)g -(If)g(there)g(is)h(already)e(a)710 2716 y(*)i(declaration)e(with)h(the) -g(same)g(name,)g(the)h(second)f(definition)f(is)h(ignored.)710 -2813 y(*\))576 3007 y(method)f(add_notation)g(:)i(dtd_notation)e(-)p -Fo(>)h Fq(unit)665 3104 y(\(*)h(add)f(the)g(given)g(notation)g(to)g -(this)h(DTD.)f(If)g(there)g(is)h(al-)396 3202 y(ready)f(a)h -(declaration)710 3299 y(*)g(with)f(the)g(same)g(name,)g(a)h -(Validation_error)d(is)j(raised.)710 3396 y(*\))576 3590 -y(method)e(add_pinstr)h(:)g(proc_instruction)e(-)p Fo(>)j -Fq(unit)665 3687 y(\(*)g(add)f(the)g(given)g(processing)g(instruction)f -(to)h(this)g(DTD.)g(*\))576 3882 y(method)f(element)h(:)h(string)f(-)p -Fo(>)g Fq(dtd_element)665 3979 y(\(*)h(looks)f(up)g(the)h(element)e -(declaration)g(with)h(the)h(given)f(name.)g(Raises)710 -4076 y(*)h(Validation_error)d(if)i(the)h(element)e(can-)396 -4173 y(not)i(be)f(found.)g(\(If)g("allow_arbitrary")710 -4270 y(*)h(has)f(been)g(invoked)g(before,)g(Unrestricted)e(is)j(raised) -f(instead.\))710 4367 y(*\))576 4561 y(method)f(element_names)g(:)i -(string)f(list)665 4659 y(\(*)h(returns)e(the)i(list)f(of)g(the)h -(names)f(of)g(all)h(element)e(declarations.)g(*\))576 -4853 y(method)g(gen_entity)h(:)g(string)g(-)p Fo(>)g -Fq(\(Pxp_entity.entity)e(*)j(bool\))p Black 3800 5278 -a Fr(83)p Black eop -%%Page: 84 84 -84 83 bop Black 2348 67 a Fr(Chapter)20 b(4.)g(Con\002guring)e(and)i -(calling)f(the)h(par)o(ser)p Black 665 579 a Fq(\(*)45 -b(let)f(e,)h(extdecl)e(=)i(obj)f(#)h(gen_entity)e(n:)710 -676 y(*)i(looks)f(up)g(the)h(general)e(entity)h('e')g(with)h(the)f -(name)g('n'.)g(Raises)710 773 y(*)h(WF_error)e(if)i(the)f(entity)g -(cannot)g(be)g(found.)710 870 y(*)h('extdecl':)e(indicates)g(whether)h -(the)g(entity)g(declaration)f(occured)h(in)g(an)710 967 -y(*)h(external)e(entity.)710 1065 y(*\))576 1259 y(method)g -(gen_entity_names)g(:)h(string)g(list)665 1356 y(\(*)h(returns)e(the)i -(list)f(of)g(all)h(general)e(entity)h(names)g(*\))576 -1550 y(method)f(par_entity)h(:)g(string)g(-)p Fo(>)g -Fq(Pxp_entity.entity)665 1647 y(\(*)h(looks)f(up)g(the)h(parameter)e -(entity)h(with)g(the)g(given)g(name.)g(Raises)710 1745 -y(*)h(WF_error)e(if)i(the)f(entity)g(cannot)g(be)g(found.)710 -1842 y(*\))576 2036 y(method)f(par_entity_names)g(:)h(string)g(list)665 -2133 y(\(*)h(returns)e(the)i(list)f(of)g(all)h(parameter)e(entity)h -(names)g(*\))576 2327 y(method)f(notation)h(:)h(string)e(-)p -Fo(>)i Fq(dtd_notation)665 2424 y(\(*)g(looks)f(up)g(the)h(notation)e -(declaration)g(with)h(the)h(given)f(name.)g(Raises)710 -2522 y(*)h(Validation_error)d(if)i(the)h(notation)e(can-)396 -2619 y(not)i(be)f(found.)g(\(If)g("allow_arbitrary")710 -2716 y(*)h(has)f(been)g(invoked)g(before,)g(Unrestricted)e(is)j(raised) -f(instead.\))710 2813 y(*\))576 3007 y(method)f(notation_names)g(:)i -(string)e(list)665 3104 y(\(*)i(Returns)e(the)i(list)f(of)g(the)h -(names)f(of)g(all)h(added)f(notations)f(*\))576 3299 -y(method)g(pinstr)h(:)h(string)f(-)p Fo(>)g Fq(proc_instruction)e(list) -665 3396 y(\(*)j(looks)f(up)g(all)h(processing)e(instructions)g(with)h -(the)g(given)g(target.)710 3493 y(*)h(The)f("target")g(is)g(the)g -(identifier)g(following)f(")p Fo(<)p Fq(?".)710 3590 -y(*)i(Note:)f(It)g(is)h(not)f(possible)g(to)g(find)g(out)h(the)f(exact) -g(position)f(of)i(the)710 3687 y(*)g(processing)e(instruction.)710 -3784 y(*\))576 3979 y(method)g(pinstr_names)g(:)i(string)f(list)665 -4076 y(\(*)h(Returns)e(the)i(list)f(of)g(the)h(names)f(\(targets\))f -(of)i(all)f(added)g(pinstrs)f(*\))576 4270 y(method)g(validate)h(:)h -(unit)665 4367 y(\(*)g(ensures)e(that)i(the)f(DTD)g(is)h(valid.)f(This) -g(method)g(is)g(optimized)f(such)h(that)710 4464 y(*)h(actual)f -(validation)f(is)h(only)g(performed)g(if)g(DTD)h(has)f(changed.)710 -4561 y(*)h(If)f(the)h(DTD)f(is)g(invalid,)g(mostly)g(a)g -(Validation_error)f(is)h(raised,)710 4659 y(*)h(but)f(other)g -(exceptions)f(are)i(possible,)e(too.)710 4756 y(*\))p -Black 3800 5278 a Fr(84)p Black eop -%%Page: 85 85 -85 84 bop Black 2348 67 a Fr(Chapter)20 b(4.)g(Con\002guring)e(and)i -(calling)f(the)h(par)o(ser)p Black 576 579 a Fq(method)43 -b(only_deterministic_models)e(:)k(unit)665 676 y(\(*)g(Succeeds)e(if)i -(all)f(regexp)g(content)g(models)f(are)i(deterministic.)710 -773 y(*)g(Otherwise)e(Validation_error.)710 870 y(*\))576 -1065 y(method)g(write)h(:)h(Pxp_types.output_stream)c(-)p -Fo(>)j Fq(Pxp_types.encoding)e(-)p Fo(>)j Fq(bool)f(-)396 -1162 y Fo(>)h Fq(unit)665 1259 y(\(*)g(write_compact_as_latin1)c(os)j -(enc)h(doctype:)710 1356 y(*)g(Writes)f(the)g(DTD)g(as)h('enc'-encoded) -d(string)i(to)h('os'.)f(If)g('doctype',)f(a)710 1453 -y(*)i(DTD)f(like)g Fo(<)p Fq(!DOCTYPE)f(root)i([)f(...)h(])p -Fo(>)f Fq(is)g(written.)g(If)g('not)h(doctype',)710 1550 -y(*)g(only)f(the)g(declarations)f(are)h(written)g(\(the)g(material)g -(within)g(the)710 1647 y(*)h(square)f(brackets\).)710 -1745 y(*\))576 1939 y(method)f(write_compact_as_latin1)e(:)k -(Pxp_types.output_stream)c(-)p Fo(>)j Fq(bool)h(-)p Fo(>)f -Fq(unit)665 2036 y(\(*)h(DEPRECATED)e(METHOD;)h(included)f(only)h(to)h -(keep)f(compatibility)f(with)710 2133 y(*)i(older)f(versions)f(of)i -(the)f(parser)710 2230 y(*\))576 2522 y -(\(*---------------------------*\))576 2619 y(method)f(invalidate)h(:)g -(unit)665 2716 y(\(*)h(INTERNAL)e(METHOD)h(*\))576 2813 -y(method)f(warner)h(:)h(Pxp_types.collect_warnings)665 -2910 y(\(*)g(INTERNAL)e(METHOD)h(*\))486 3007 y(end)396 -3396 y(\(*)h(--------------------------------------)o(------)o(---)39 -b(*\))396 3590 y(and)45 b(dtd_element)e(:)h(dtd)h(-)p -Fo(>)f Fq(string)g(-)p Fo(>)486 3687 y Fq(\(*)g(Creation:)531 -3784 y(*)134 b(new)44 b(dtd_element)f(init_dtd)h(init_name:)531 -3882 y(*)g(creates)g(a)h(new)f(dtd_element)f(object)h(for)g(init_dtd)g -(with)g(init_name.)531 3979 y(*)g(The)h(strings)e(are)i(represented)e -(in)h(the)h(same)f(encoding)f(as)i(init_dtd.)531 4076 -y(*\))486 4173 y(object)576 4367 y(method)e(name)i(:)f(string)665 -4464 y(\(*)h(returns)e(the)i(name)f(of)g(the)h(declared)e(element)h -(*\))576 4659 y(method)f(externally_declared)f(:)j(bool)665 -4756 y(\(*)g(returns)e(whether)h(the)g(element)g(declaration)f(occurs)h -(in)g(an)h(external)710 4853 y(*)g(entity.)p Black 3800 -5278 a Fr(85)p Black eop -%%Page: 86 86 -86 85 bop Black 2348 67 a Fr(Chapter)20 b(4.)g(Con\002guring)e(and)i -(calling)f(the)h(par)o(ser)p Black 710 579 a Fq(*\))576 -773 y(method)43 b(content_model)g(:)i(Pxp_types.content_model_type)665 -870 y(\(*)g(get)f(the)g(content)g(model)g(of)h(this)f(element)f -(declaration,)g(or)i(Unspecified)e(*\))576 1065 y(method)g(content_dfa) -g(:)i(Pxp_dfa.dfa_definition)c(option)665 1162 y(\(*)k(return)f(the)g -(DFA)g(of)h(the)f(content)g(model)g(if)g(there)g(is)h(a)f(DFA,)h(or)f -(None.)710 1259 y(*)h(A)f(DFA)h(exists)f(only)g(for)g(regexp)g(style)g -(content)g(models)f(which)h(are)710 1356 y(*)h(deterministic.)710 -1453 y(*\))576 1647 y(method)e(set_cm_and_extdecl)f(:)j -(Pxp_types.content_model_type)40 b(-)p Fo(>)k Fq(bool)h(-)p -Fo(>)f Fq(unit)665 1745 y(\(*)h(set_cm_and_extdecl)d(cm)i(extdecl:)710 -1842 y(*)h(set)f(the)g(content)g(model)g(to)h('cm'.)f(Once)g(the)g -(content)g(model)g(is)g(not)710 1939 y(*)h(Unspecified,)e(it)h(cannot)g -(be)g(set)h(to)f(a)h(different)e(value)h(again.)710 2036 -y(*)h(Furthermore,)e(it)h(is)h(set)f(whether)g(the)g(element)g(occurs)f -(in)i(an)f(external)710 2133 y(*)h(entity)f(\('extdecl'\).)710 -2230 y(*\))576 2424 y(method)f(encoding)h(:)h(Pxp_types.rep_encoding) -665 2522 y(\(*)g(Return)f(the)g(encoding)f(of)i(the)f(strings)g(*\))576 -2716 y(method)f(allow_arbitrary)g(:)h(unit)665 2813 y(\(*)h(After)f -(this)g(method)g(has)g(been)g(invoked,)g(the)g(ob-)396 -2910 y(ject)g(changes)g(its)g(behaviour:)710 3007 y(*)h(-)f(attributes) -g(that)g(have)g(not)g(been)g(added)g(may)h(be)f(used)g(in)h(an)710 -3104 y(*)134 b(arbitrary)44 b(way;)g(the)g(method)g("attribute")f -(indicates)g(this)710 3202 y(*)134 b(by)45 b(raising)f(Undeclared)f -(instead)g(of)i(Validation_error.)710 3299 y(*\))576 -3493 y(method)e(disallow_arbitrary)f(:)j(unit)576 3687 -y(method)e(arbitrary_allowed)f(:)j(bool)665 3784 y(\(*)g(Returns)e -(whether)h(arbitrary)f(attributes)h(are)g(allowed)g(or)g(not.)g(*\))576 -3979 y(method)f(attribute)h(:)g(string)g(-)p Fo(>)1517 -4076 y Fq(Pxp_types.att_type)e(*)j(Pxp_types.att_default)665 -4173 y(\(*)g(get)f(the)g(type)h(and)f(default)g(value)g(of)g(a)h -(declared)e(attribute,)g(or)i(raise)710 4270 y(*)g(Validation_error)d -(if)i(the)h(attribute)e(does)h(not)h(exist.)710 4367 -y(*)g(If)f('arbitrary_allowed',)e(the)i(exception)f(Undeclared)h(is)g -(raised)g(instead)710 4464 y(*)h(of)f(Validation_error.)710 -4561 y(*\))576 4756 y(method)f -(attribute_violates_standalone_declaration)38 b(:)1069 -4853 y(string)44 b(-)p Fo(>)g Fq(string)g(option)g(-)p -Fo(>)g Fq(bool)p Black 3798 5278 a Fr(86)p Black eop -%%Page: 87 87 -87 86 bop Black 2348 67 a Fr(Chapter)20 b(4.)g(Con\002guring)e(and)i -(calling)f(the)h(par)o(ser)p Black 665 579 a Fq(\(*)45 -b(attribute_violates_standalone_declarat)o(ion)39 b(name)44 -b(v:)710 676 y(*)h(Checks)f(whether)f(the)i(attribute)e('name')h -(violates)f(the)i("standalone")710 773 y(*)g(declaration)e(if)h(it)h -(has)f(value)g('v'.)710 870 y(*)h(The)f(method)g(returns)g(true)g(if:) -710 967 y(*)h(-)f(The)h(attribute)e(declaration)g(occurs)h(in)g(an)h -(external)e(entity,)710 1065 y(*)i(and)f(if)h(one)f(of)g(the)h(two)f -(conditions)f(holds:)710 1162 y(*)i(-)f(v)h(=)g(None,)f(and)g(there)g -(is)h(a)f(default)g(for)g(the)h(attribute)e(value)710 -1259 y(*)i(-)f(v)h(=)g(Some)f(s,)g(and)h(the)f(type)g(of)h(the)f -(attribute)f(is)i(not)f(CDATA,)710 1356 y(*)134 b(and)45 -b(s)f(changes)g(if)h(normalized)e(according)g(to)i(the)f(rules)g(of)g -(the)710 1453 y(*)134 b(attribute)44 b(type.)710 1550 -y(*)710 1647 y(*)h(The)f(method)g(raises)g(Validation_error)e(if)i(the) -h(attribute)e(does)h(not)g(exist.)710 1745 y(*)h(If)f -('arbitrary_allowed',)e(the)i(exception)f(Undeclared)h(is)g(raised)g -(instead)710 1842 y(*)h(of)f(Validation_error.)710 1939 -y(*\))576 2133 y(method)f(attribute_names)g(:)h(string)g(list)665 -2230 y(\(*)h(get)f(the)g(list)h(of)f(all)g(declared)g(attributes)f(*\)) -576 2424 y(method)g(names_of_required_attributes)e(:)j(string)g(list) -665 2522 y(\(*)h(get)f(the)g(list)h(of)f(all)g(attributes)g(that)g(are) -g(specified)f(as)i(required)710 2619 y(*)g(attributes)710 -2716 y(*\))576 2910 y(method)e(id_attribute_name)f(:)j(string)f(option) -665 3007 y(\(*)h(Returns)e(the)i(name)f(of)g(the)h(attribute)e(with)h -(type)g(ID,)h(or)f(None.)g(*\))576 3202 y(method)f -(idref_attribute_names)f(:)i(string)g(list)665 3299 y(\(*)h(Returns)e -(the)i(names)f(of)g(the)h(attributes)e(with)h(type)g(IDREF)g(or)h -(IDREFS.)e(*\))576 3493 y(method)g(add_attribute)g(:)i(string)f(-)p -Fo(>)1607 3590 y Fq(Pxp_types.att_type)e(-)p Fo(>)531 -3687 y Fq(Pxp_types.att_default)f(-)p Fo(>)531 3784 y -Fq(bool)j(-)p Fo(>)620 3882 y Fq(unit)665 3979 y(\(*)h(add_attribute)d -(name)j(type)f(default)f(extdecl:)710 4076 y(*)i(add)f(an)h(attribute)e -(declaration)g(for)h(an)h(attribute)e(with)h(the)h(given)e(name,)710 -4173 y(*)i(type,)f(and)g(default)g(value.)g(If)g(there)g(is)h(more)f -(than)g(one)g(declaration)f(for)710 4270 y(*)i(an)f(attribute)g(name,)g -(the)g(first)g(declara-)396 4367 y(tion)g(counts;)g(the)g(other)g -(declarations)710 4464 y(*)h(are)f(ignored.)710 4561 -y(*)h('extdecl':)e(if)h(true,)g(the)h(attribute)e(declaration)g(occurs) -h(in)g(an)h(external)710 4659 y(*)g(entity.)e(This)i(property)e(is)i -(used)f(to)g(check)g(the)h("standalone")d(attribute.)710 -4756 y(*\))p Black 3797 5278 a Fr(87)p Black eop -%%Page: 88 88 -88 87 bop Black 2348 67 a Fr(Chapter)20 b(4.)g(Con\002guring)e(and)i -(calling)f(the)h(par)o(ser)p Black 576 579 a Fq(method)43 -b(validate)h(:)h(unit)665 676 y(\(*)g(checks)f(whether)f(this)h -(element)g(declaration)f(\(i.e.)h(the)g(content)g(model)g(and)710 -773 y(*)h(all)f(attribute)f(declarations\))g(is)i(valid)f(for)g(the)g -(associated)f(DTD.)710 870 y(*)i(Raises)f(mostly)f(Validation_error)g -(if)h(the)g(validation)g(fails.)710 967 y(*\))576 1162 -y(method)f(write)h(:)h(Pxp_types.output_stream)c(-)p -Fo(>)j Fq(Pxp_types.encoding)e(-)p Fo(>)j Fq(unit)665 -1259 y(\(*)g(write_compact_as_latin1)c(os)j(enc:)710 -1356 y(*)h(Writes)f(the)g Fo(<)p Fq(!ELEMENT)f(...)h -Fo(>)h Fq(declaration)e(to)h('os')h(as)f('enc'-)396 1453 -y(encoded)g(string.)710 1550 y(*\))576 1745 y(method)f -(write_compact_as_latin1)e(:)k(Pxp_types.output_stream)c(-)p -Fo(>)j Fq(unit)665 1842 y(\(*)h(DEPRECATED)e(METHOD;)h(included)f(only) -h(to)h(keep)f(compatibility)f(with)710 1939 y(*)i(older)f(versions)f -(of)i(the)f(parser)710 2036 y(*\))486 2133 y(end)396 -2327 y(\(*)h(--------------------------------------)o(------)o(---)39 -b(*\))396 2522 y(and)45 b(dtd_notation)d(:)j(string)f(-)p -Fo(>)g Fq(Pxp_types.ext_id)e(-)p Fo(>)j Fq(Pxp_types.rep_encoding)c(-)p -Fo(>)486 2619 y Fq(\(*)j(Creation:)531 2716 y(*)179 b(new)44 -b(dtd_notation)f(a_name)h(an_external_ID)e(init_encoding)531 -2813 y(*)i(creates)g(a)h(new)f(dtd_notation)f(object)h(with)g(the)g -(given)g(name)g(and)h(the)f(given)531 2910 y(*)g(external)g(ID.)531 -3007 y(*\))486 3104 y(object)576 3202 y(method)f(name)i(:)f(string)576 -3299 y(method)f(ext_id)h(:)h(Pxp_types.ext_id)576 3396 -y(method)e(encoding)h(:)h(Pxp_types.rep_encoding)576 -3590 y(method)e(write)h(:)h(Pxp_types.output_stream)c(-)p -Fo(>)j Fq(Pxp_types.encoding)e(-)p Fo(>)j Fq(unit)665 -3687 y(\(*)g(write_compact_as_latin1)c(os)j(enc:)710 -3784 y(*)h(Writes)f(the)g Fo(<)p Fq(!NOTATION)f(...)h -Fo(>)h Fq(declaration)e(to)h('os')g(as)h('enc'-encoded)710 -3882 y(*)g(string.)710 3979 y(*\))576 4173 y(method)e -(write_compact_as_latin1)e(:)k(Pxp_types.output_stream)c(-)p -Fo(>)j Fq(unit)665 4270 y(\(*)h(DEPRECATED)e(METHOD;)h(included)f(only) -h(to)h(keep)f(compatibility)f(with)710 4367 y(*)i(older)f(versions)f -(of)i(the)f(parser)710 4464 y(*\))486 4659 y(end)396 -4853 y(\(*)h(--------------------------------------)o(------)o(---)39 -b(*\))p Black 3800 5278 a Fr(88)p Black eop -%%Page: 89 89 -89 88 bop Black 2348 67 a Fr(Chapter)20 b(4.)g(Con\002guring)e(and)i -(calling)f(the)h(par)o(ser)p Black 396 676 a Fq(and)45 -b(proc_instruction)d(:)i(string)g(-)p Fo(>)h Fq(string)e(-)p -Fo(>)i Fq(Pxp_types.rep_encoding)c(-)p Fo(>)486 773 y -Fq(\(*)j(Creation:)531 870 y(*)134 b(new)44 b(proc_instruction)f -(a_target)g(a_value)531 967 y(*)h(creates)g(a)h(new)f(proc_instruction) -e(object)i(with)g(the)h(given)f(target)f(string)h(and)531 -1065 y(*)g(the)h(given)f(value)g(string.)531 1162 y(*)g(Note:)g(A)h -(processing)e(instruction)g(is)i(written)e(as)i Fo(<)p -Fq(?target)e(value?)p Fo(>)p Fq(.)531 1259 y(*\))486 -1356 y(object)576 1453 y(method)g(target)h(:)h(string)576 -1550 y(method)e(value)h(:)h(string)576 1647 y(method)e(encoding)h(:)h -(Pxp_types.rep_encoding)576 1842 y(method)e(write)h(:)h -(Pxp_types.output_stream)c(-)p Fo(>)j Fq(Pxp_types.encoding)e(-)p -Fo(>)j Fq(unit)665 1939 y(\(*)g(write)f(os)g(enc:)710 -2036 y(*)h(Writes)f(the)g Fo(<)p Fq(?...?)p Fo(>)f Fq(PI)i(to)f('os')h -(as)f('enc'-encoded)f(string.)710 2133 y(*\))576 2327 -y(method)g(write_compact_as_latin1)e(:)k(Pxp_types.output_stream)c(-)p -Fo(>)j Fq(unit)665 2424 y(\(*)h(DEPRECATED)e(METHOD;)h(included)f(only) -h(to)h(keep)f(compatibility)f(with)710 2522 y(*)i(older)f(versions)f -(of)i(the)f(parser)710 2619 y(*\))576 2813 y(method)f(parse_pxp_option) -g(:)h(\(string)g(*)h(string)e(*)i(\(string)f(*)g(string\))g(list\))665 -2910 y(\(*)h(Parses)f(a)g(PI)h(containing)e(a)i(PXP)f(option.)g(Such)g -(PIs)g(are)g(formed)g(like:)710 3007 y(*)134 b Fo(<)p -Fq(?target)44 b(option-name)f(option-att="value")f(option-att="value")f -(...)k(?)p Fo(>)710 3104 y Fq(*)g(The)f(method)g(returns)g(a)g(triple) -710 3202 y(*)134 b(\(target,)44 b(option-name,)f([option-att,)g(value;) -g(...]\))710 3299 y(*)i(or)f(raises)g(Error.)710 3396 -y(*\))486 3590 y(end)396 3784 y(;;)-2 4286 y Fx(4.4.)39 -b(In)-6 b(v)l(oking)38 b(the)h(par)n(ser)396 4466 y Fv(Here)20 -b(a)h(description)e(of)h(Pxp_yacc.)-2 4794 y Fp(4.4.1.)35 -b(Defaults)p Black 3800 5278 a Fr(89)p Black eop -%%Page: 90 90 -90 89 bop Black 2348 67 a Fr(Chapter)20 b(4.)g(Con\002guring)e(and)i -(calling)f(the)h(par)o(ser)p Black 396 579 a Fv(The)g(follo)n(wing)f -(def)o(aults)g(are)i(a)n(v)n(ailable:)396 759 y Fq(val)45 -b(default_config)d(:)j(config)396 856 y(val)g(default_extension)d(:)i -(\('a)h(node)f(extension\))f(as)h('a)396 953 y(val)h(default_spec)d(:)j -(\('a)f(node)h(extension)e(as)h('a\))h(spec)-2 1406 y -Fp(4.4.2.)35 b(P)l(ar)n(sing)f(functions)396 1574 y Fv(In)20 -b(the)g(follo)n(wing,)f(the)h(term)g("closed)g(document")e(refers)h(to) -i(an)f(XML)g(structure)f(lik)o(e)396 1754 y Fo(<)p Fq(!DOCTYPE)43 -b(...)i([)f Fn(declarations)f Fq(])i Fo(>)396 1851 y(<)p -Fn(root)p Fo(>)396 1948 y Fq(...)396 2045 y Fo(<)p Fq(/)p -Fn(root)p Fo(>)396 2236 y Fv(The)20 b(term)g("fragment")e(refers)i(to)g -(an)g(XML)h(structure)e(lik)o(e)396 2416 y Fo(<)p Fn(root)p -Fo(>)396 2513 y Fq(...)396 2611 y Fo(<)p Fq(/)p Fn(root)p -Fo(>)396 2802 y Fv(i.e.)h(only)g(to)g(one)g(isolated)g(element)f -(instance.)396 3023 y Fq(val)45 b(parse_dtd_entity)d(:)i(config)g(->)h -(source)f(->)g(dtd)396 3214 y Fv(P)o(arses)21 b(the)f(declarations)f -(which)h(are)g(contained)e(in)j(the)f(entity)-5 b(,)19 -b(and)h(returns)f(them)h(as)h Fq(dtd)f Fv(object.)396 -3436 y Fq(val)45 b(extract_dtd_from_document_entity)39 -b(:)45 b(config)f(->)g(source)g(->)g(dtd)396 3627 y Fv(Extracts)20 -b(the)g(DTD)h(from)e(a)h(closed)g(document.)e(Both)i(the)h(internal)e -(and)h(the)g(e)o(xternal)f(subsets)h(are)h(e)o(xtracted)d(and)396 -3735 y(combined)g(to)i(one)f Fq(dtd)h Fv(object.)f(This)h(function)e -(does)h(not)h(parse)f(the)h(whole)f(document,)f(b)n(ut)i(only)e(the)i -(parts)g(that)g(are)396 3843 y(necessary)g(to)g(e)o(xtract)f(the)i -(DTD.)396 4064 y Fq(val)45 b(parse_document_entity)c(:)576 -4161 y(?transform_dtd:\(dtd)g(->)k(dtd\))f(->)576 4259 -y(?id_index:\('ext)e(index\))i(->)576 4356 y(config)f(->)576 -4453 y(source)g(->)576 4550 y('ext)h(spec)g(->)755 4647 -y('ext)g(document)p Black 3800 5278 a Fr(90)p Black eop -%%Page: 91 91 -91 90 bop Black 2348 67 a Fr(Chapter)20 b(4.)g(Con\002guring)e(and)i -(calling)f(the)h(par)o(ser)p Black 396 579 a Fv(P)o(arses)h(a)g(closed) -e(document)g(and)g(v)n(alidates)h(it)h(against)e(the)i(DTD)f(that)g(is) -h(contained)e(in)h(the)h(document)d(\(internal)396 687 -y(and)i(e)o(xternal)f(subsets\).)h(The)g(option)f Fq(~transform_dtd)f -Fv(can)i(be)g(used)g(to)g(transform)f(the)h(DTD)h(in)f(the)g(document,) -396 795 y(and)g(to)g(use)h(the)f(transformed)e(DTD)i(for)g(v)n -(alidation.)e(If)i Fq(~id_index)g Fv(is)h(speci\002ed,)e(an)h(inde)o(x) -f(of)h(all)h(ID)f(attrib)n(utes)h(is)396 903 y(created.)396 -1124 y Fq(val)45 b(parse_wfdocument_entity)c(:)576 1222 -y(config)i(->)576 1319 y(source)g(->)576 1416 y('ext)h(spec)g(->)755 -1513 y('ext)g(document)396 1704 y Fv(P)o(arses)21 b(a)g(closed)e -(document,)f(b)n(ut)j(checks)e(it)i(only)e(on)h(well-formedness.)396 -1926 y Fq(val)45 b(parse_content_entity)86 b(:)576 2023 -y(?id_index:\('ext)42 b(index\))i(->)576 2120 y(config)f(->)576 -2217 y(source)g(->)576 2314 y(dtd)h(->)576 2411 y('ext)g(spec)g(->)755 -2508 y('ext)g(node)396 2699 y Fv(P)o(arses)21 b(a)g(fragment,)d(and)h -(v)n(alidates)h(the)g(element.)396 2921 y Fq(val)45 b -(parse_wfcontent_entity)c(:)576 3018 y(config)i(->)576 -3115 y(source)g(->)576 3212 y('ext)h(spec)g(->)755 3310 -y('ext)g(node)396 3500 y Fv(P)o(arses)21 b(a)g(fragment,)d(b)n(ut)i -(checks)g(it)g(only)g(on)g(well-formedness.)-2 3870 y -Fp(4.4.3.)35 b(Con\002guration)f(options)396 4110 y Fq(type)44 -b(config)g(=)576 4207 y({)g(warner)g(:)h(collect_warnings;)665 -4304 y(errors_with_line_numbers)c(:)k(bool;)665 4401 -y(enable_pinstr_nodes)d(:)j(bool;)665 4499 y(enable_super_root_node)c -(:)k(bool;)665 4596 y(enable_comment_nodes)d(:)i(bool;)665 -4693 y(encoding)g(:)g(rep_encoding;)665 4790 y -(recognize_standalone_declaration)c(:)k(bool;)p Black -3800 5278 a Fr(91)p Black eop -%%Page: 92 92 -92 91 bop Black 2348 67 a Fr(Chapter)20 b(4.)g(Con\002guring)e(and)i -(calling)f(the)h(par)o(ser)p Black 665 579 a Fq -(store_element_positions)41 b(:)k(bool;)665 676 y(idref_pass)e(:)i -(bool;)665 773 y(validate_by_dfa)e(:)h(bool;)665 870 -y(accept_only_deterministic_models)c(:)k(bool;)665 967 -y(...)576 1065 y(})p Black 396 1422 a Ft(\225)p Black -60 w Fq(warner:)p Fv(The)19 b(parser)h(prints)f(w)o(arnings)h(by)f(in)m -(v)n(oking)f(the)j(method)d Fq(warn)j Fv(for)e(this)i(w)o(arner)e -(object.)h(\(Def)o(ault:)f(all)479 1530 y(w)o(arnings)h(are)g -(dropped\))p Black 396 1637 a Ft(\225)p Black 60 w Fq -(errors_with_line_numbers:)p Fv(If)c(true,)k(errors)f(contain)g(line)i -(numbers;)d(if)j(f)o(alse,)f(errors)g(contain)f(only)g(byte)479 -1745 y(positions.)h(The)g(latter)g(mode)f(is)i(f)o(aster)-5 -b(.)21 b(\(Def)o(ault:)e(true\))p Black 396 1853 a Ft(\225)p -Black 60 w Fq(enable_pinstr_nodes:)p Fv(If)e(true,)j(the)g(parser)f -(creates)i(e)o(xtra)e(nodes)g(for)h(processing)f(instructions.)g(If)h -(f)o(alse,)479 1961 y(processing)f(instructions)g(are)h(simply)g(added) -f(to)i(the)f(element)f(or)h(document)f(surrounding)e(the)j -(instructions.)479 2069 y(\(Def)o(ault:)g(f)o(alse\))p -Black 396 2177 a Ft(\225)p Black 60 w Fq(enable_super_root_node:)p -Fv(If)c(true,)k(the)g(parser)g(creates)g(an)g(e)o(xtra)g(node)f(which)g -(is)j(the)e(parent)f(of)h(the)g(root)479 2285 y(of)g(the)g(document)f -(tree.)h(This)g(node)f(is)i(called)f(super)g(root;)f(it)i(is)g(an)g -(element)e(with)i(type)e Fq(T_super_root)p Fv(.)g(-)h(If)479 -2393 y(there)g(are)g(processing)f(instructions)g(outside)h(the)g(root)f -(element)h(and)g(outside)f(the)i(DTD,)f(the)o(y)f(are)h(added)f(to)i -(the)479 2501 y(super)f(root)f(instead)h(of)g(the)g(document.)e(-)j(If) -f(f)o(alse,)g(the)g(super)g(root)g(node)f(is)i(not)f(created.)f(\(Def)o -(ault:)h(f)o(alse\))p Black 396 2609 a Ft(\225)p Black -60 w Fq(enable_comment_nodes:)p Fv(If)d(true,)i(the)i(parser)e(creates) -h(nodes)g(for)f(comments)g(with)i(type)f Fq(T_comment)p -Fv(;)f(if)479 2717 y(f)o(alse,)i(such)f(nodes)f(are)h(not)g(created.)f -(\(Def)o(ault:)h(f)o(alse\))p Black 396 2825 a Ft(\225)p -Black 60 w Fq(encoding:)p Fv(Speci\002es)f(the)i(internal)e(encoding)f -(of)i(the)g(parser)-5 b(.)20 b(Most)g(strings)h(are)f(then)f -(represented)g(according)479 2933 y(to)i(this)f(encoding;)f(ho)n(we)n -(v)o(er)f(there)h(are)i(some)f(e)o(xceptions)e(\(especially)i -Fq(ext_id)f Fv(v)n(alues)h(which)g(are)g(al)o(w)o(ays)479 -3041 y(UTF-8)g(encoded\).)e(\(Def)o(ault:)h(`Enc_iso88591\))p -Black 396 3148 a Ft(\225)p Black 60 w Fq -(recognize_standalone_declaration:)c Fv(If)21 b(true)e(and)h(if)h(the)f -(parser)f(is)i(v)n(alidating,)e(the)479 3256 y Fq(standalone="yes")f -Fv(declaration)h(forces)h(that)g(it)h(is)g(check)o(ed)e(whether)g(the)h -(document)e(is)j(a)g(standalone)479 3364 y(document.)d(-)j(If)f(f)o -(alse,)g(or)g(if)g(the)h(parser)e(is)i(in)g(well-formedness)d(mode,)h -(such)h(declarations)f(are)h(ignored.)479 3472 y(\(Def)o(ault:)g -(true\))p Black 396 3580 a Ft(\225)p Black 60 w Fq -(store_element_positions:)d Fv(If)j(true,)g(for)f(e)n(v)o(ery)g -(non-data)f(node)h(the)i(source)e(position)g(is)j(stored.)d(If)h(f)o -(alse,)479 3688 y(the)g(position)g(information)e(is)j(lost.)f(If)g(a)n -(v)n(ailable,)g(you)f(can)h(get)g(the)g(positions)g(of)g(nodes)f(by)h -(in)m(v)n(oking)e(the)479 3796 y Fq(position)i Fv(method.)e(\(Def)o -(ault:)i(true\))p Black 396 3904 a Ft(\225)p Black 60 -w Fq(idref_pass:)p Fv(If)e(true)i(and)g(if)g(there)g(is)h(an)f(ID)h -(inde)o(x,)e(the)h(parser)f(checks)h(whether)f(e)n(v)o(ery)g(IDREF)i -(or)e(IDREFS)479 4012 y(attrib)n(ute)h(refer)g(to)g(an)g(e)o(xisting)f -(node;)h(this)g(requires)g(that)g(the)g(parser)g(tra)n(v)o(erses)g(the) -g(whole)f(doument)g(tree.)h(If)479 4120 y(f)o(alse,)h(this)f(check)g -(is)h(left)f(out.)g(\(Def)o(ault:)g(f)o(alse\))p Black -396 4228 a Ft(\225)p Black 60 w Fq(validate_by_dfa:)p -Fv(If)e(true)h(and)h(if)h(the)f(content)f(model)g(for)h(an)g(element)g -(type)f(is)i(deterministic,)e(a)479 4336 y(deterministic)h(\002nite)g -(automaton)e(is)j(used)f(to)h(v)n(alidate)e(whether)g(the)i(element)e -(contents)h(match)f(the)i(content)479 4444 y(model)e(of)h(the)g(type.)g -(If)g(f)o(alse,)g(or)g(if)g(a)g(DF)-6 b(A)21 b(is)g(not)f(a)n(v)n -(ailable,)f(a)h(backtracking)e(algorithm)g(is)j(used)f(for)f(v)n -(alidation.)479 4552 y(\(Def)o(ault:)h(true\))p Black -396 4659 a Ft(\225)p Black 60 w Fq(accept_only_deterministic_models:)15 -b Fv(If)21 b(true,)e(only)h(deterministic)f(content)g(models)h(are)g -(accepted;)f(if)479 4767 y(f)o(alse,)i(an)o(y)e(syntactically)h -(correct)f(content)g(models)h(can)g(be)g(processed.)f(\(Def)o(ault:)g -(true\))p Black 3800 5278 a Fr(92)p Black eop -%%Page: 93 93 -93 92 bop Black 2348 67 a Fr(Chapter)20 b(4.)g(Con\002guring)e(and)i -(calling)f(the)h(par)o(ser)p Black -2 583 a Fp(4.4.4.)35 -b(Whic)o(h)f(con\002guration)g(should)g(I)f(use?)396 -751 y Fv(First,)21 b(I)f(recommend)e(to)i(v)n(ary)g(the)g(def)o(ault)f -(con\002guration)f(instead)i(of)g(creating)f(a)i(ne)n(w)f -(con\002guration)d(record.)i(F)o(or)396 859 y(instance,)h(to)g(set)h -Fq(idref_pass)e Fv(to)i Fq(true)p Fv(,)e(change)g(the)i(def)o(ault)e -(as)i(in:)396 1039 y Fq(let)45 b(config)e(=)i({)g(default_config)d -(with)i(idref_pass)g(=)g(true)g(})396 1230 y Fv(The)20 -b(background)d(is)k(that)f(I)h(can)f(add)f(more)h(options)f(to)h(the)g -(record)f(in)i(future)e(v)o(ersions)g(of)h(the)g(parser)f(without)396 -1338 y(breaking)g(your)f(programs.)396 1487 y Fu(Do)i(I)i(need)e(extra) -f(nodes)i(f)n(or)f(pr)o(ocessing)g(instructions?)g Fv(By)g(def)o(ault,) -g(such)g(nodes)f(are)h(not)g(created.)f(This)i(does)396 -1595 y(not)f(mean)g(that)g(the)g(processing)f(instructions)g(are)h -(lost;)h(ho)n(we)n(v)o(er)m(,)d(you)h(cannot)g(\002nd)h(out)g(the)g(e)o -(xact)g(location)f(where)396 1703 y(the)o(y)h(occur)-5 -b(.)19 b(F)o(or)h(e)o(xample,)e(the)j(follo)n(wing)d(XML)i(te)o(xt)396 -1883 y Fq()396 2074 y Fv(will)h(normally)e -(create)h(one)f(element)h(node)f(for)h Fq(x)g Fv(containing)e -Fr(one)i Fv(subnode)f(for)g Fq(y)p Fv(.)h(The)g(processing)f -(instructions)396 2182 y(are)h(attached)g(to)g Fq(x)h -Fv(in)f(a)h(separate)e(hash)h(table;)h(you)e(can)h(access)h(them)e -(using)h Fq(x)45 b(#)f(pinstr)g("pi1")20 b Fv(and)g Fq(x)44 -b(#)396 2290 y(pinstr)g("pi2")p Fv(,)20 b(respecti)n(v)o(ely)-5 -b(.)18 b(The)i(information)d(is)k(lost)g(where)f(the)g(instructions)f -(occur)g(within)h Fq(x)p Fv(.)396 2439 y(If)g(the)h(option)d -Fq(enable_pinstr_nodes)g Fv(is)j(turned)e(on,)h(the)g(parser)f(creates) -i(e)o(xtra)e(nodes)g Fq(pi1)i Fv(and)e Fq(pi2)i Fv(such)f(that)396 -2547 y(the)g(subnodes)f(of)h Fq(x)h Fv(are)f(no)n(w:)396 -2728 y Fq(x)45 b(#)g(sub_nodes)e(=)i([)f(pi1;)g(y;)h(pi2)f(])396 -2919 y Fv(The)20 b(e)o(xtra)g(nodes)f(contain)g(the)h(processing)f -(instructions)g(in)i(the)f(usual)g(w)o(ay)-5 b(,)20 b(i.e.)g(you)f(can) -h(access)h(them)f(using)f Fq(pi1)396 3026 y(#)45 b(pinstr)f("pi1")20 -b Fv(and)f Fq(pi2)45 b(#)f(pinstr)g("pi2")p Fv(,)20 b(respecti)n(v)o -(ely)-5 b(.)396 3176 y(Note)20 b(that)h(you)e(will)i(need)e(an)i(e)o(x) -o(emplar)d(for)h(the)i(PI)f(nodes)g(\(see)g Fq(make_spec_from_alist)p -Fv(\).)396 3325 y Fu(Do)g(I)i(need)e(a)h(super)g(r)o(oot)d(node?)i -Fv(By)h(def)o(ault,)e(there)h(is)h(no)f(super)f(root)h(node.)f(The)h -Fq(document)f Fv(object)h(refers)396 3433 y(directly)g(to)g(the)g(node) -f(representing)f(the)j(root)e(element)h(of)g(the)g(document,)e(i.e.)396 -3613 y Fq(doc)45 b(#)f(root)g(=)h(r)396 3804 y Fv(if)21 -b Fq(r)f Fv(is)h(the)g(root)e(node.)g(This)h(is)i(sometimes)d(incon)m -(v)o(enient:)f(\(1\))h(Some)h(algorithms)f(become)g(simpler)h(if)g(e)n -(v)o(ery)f(node)396 3912 y(has)i(a)f(parent,)f(e)n(v)o(en)g(the)i(root) -e(node.)g(\(2\))h(Some)g(standards)f(such)h(as)h(XP)o(ath)f(call)g(the) -h("root)e(node")g(the)h(node)f(whose)396 4020 y(child)h(represents)f -(the)i(root)e(of)h(the)g(document.)e(\(3\))i(The)g(super)f(root)h(node) -f(can)h(serv)o(e)f(as)i(a)g(container)e(for)g(processing)396 -4128 y(instructions)g(outside)h(the)g(root)g(element.)f(Because)i(of)e -(these)i(reasons,)e(it)i(is)g(possible)f(to)h(create)f(an)g(e)o(xtra)f -(super)h(root)396 4236 y(node,)f(whose)h(child)g(is)h(the)f(root)g -(node:)396 4416 y Fq(doc)45 b(#)f(root)g(=)h(sr)403 b(&&)396 -4513 y(sr)45 b(#)f(sub_nodes)g(=)g([)h(r)g(])396 4704 -y Fv(When)20 b(e)o(xtra)g(nodes)f(are)h(also)h(created)e(for)h -(processing)f(instructions,)g(these)h(nodes)f(can)h(be)h(added)e(to)h -(the)g(super)g(root)396 4812 y(node)f(if)h(the)o(y)e(occur)h(outside)g -(the)g(root)g(element)g(\(reason)f(\(3\)\),)h(and)g(the)g(order)g -(re\003ects)g(the)h(order)e(in)i(the)f(source)g(te)o(xt.)p -Black 3800 5278 a Fr(93)p Black eop -%%Page: 94 94 -94 93 bop Black 2348 67 a Fr(Chapter)20 b(4.)g(Con\002guring)e(and)i -(calling)f(the)h(par)o(ser)p Black 396 579 a Fv(Note)g(that)h(you)e -(will)i(need)e(an)i(e)o(x)o(emplar)d(for)h(the)i(super)e(root)h(node)f -(\(see)h Fq(make_spec_from_alist)p Fv(\).)396 728 y Fu(What)g(is)h(the) -g(effect)e(of)h(the)h(UTF-8)e(encoding?)h Fv(By)h(def)o(ault,)e(the)h -(parser)g(represents)f(strings)h(\(with)g(fe)n(w)396 -836 y(e)o(xceptions\))e(as)j(ISO-8859-1)c(strings.)i(These)h(are)g -(well-kno)n(wn,)d(and)j(there)f(are)h(tools)g(and)f(fonts)g(for)h(this) -g(encoding.)396 986 y(Ho)n(we)n(v)o(er)m(,)e(internationalization)g -(may)h(require)g(that)i(you)e(switch)h(o)o(v)o(er)f(to)i(UTF-8)e -(encoding.)f(In)i(most)396 1094 y(en)m(vironments,)d(the)k(immediate)e -(ef)n(fect)h(will)g(be)h(that)f(you)f(cannot)g(read)h(strings)g(with)g -(character)f(codes)h(>=)h(160)e(an)o(y)396 1202 y(longer;)g(your)g -(terminal)h(will)h(only)e(sho)n(w)h(funn)o(y)e(glyph)h(combinations.)f -(It)i(is)h(strongly)e(recommended)e(to)k(install)396 -1310 y(Unicode)e(fonts)h(\(GNU)g(Unifont)f -(\(http://czyborra.com/unifon)o(t/\),)c(Markus)k(K)o(uhn')-5 -b(s)19 b(fonts)396 1417 y(\(http://www)-5 b(.cl.cam.ac.uk/~mgk25)o(/do) -m(wnlo)o(ad/u)o(cs-fo)o(nts.tar)g(.g)o(z\)\))14 b(and)20 -b(terminal)f(emulators)h(that)g(can)g(handle)396 1525 -y(UTF-8)g(byte)g(sequences)f(\(http://myweb)m(.clark.net/pub/d)o(ick)o -(e)o(y)o(/xter)o(m/x)o(term.)o(html\))o(.)c(Furthermore,)i(a)k(Unicode) -396 1633 y(editor)f(may)f(be)i(helpful)e(\(such)g(as)i(Y)-9 -b(udit)20 b(\(ftp://metalab)m(.unc.edu/pub)o(/Linu)o(x/ap)o(ps/ed)o -(itors/X/\)\))o(.)15 b(There)k(are)h(also)396 1741 y(F)-6 -b(A)h(Q)21 b(\(http://www)-5 b(.cl.cam.ac.uk/~mgk25)o(/unico)o(de)o -(.htm)o(l\))15 b(by)20 b(Markus)f(K)o(uhn.)396 1891 y(By)i(setting)f -Fq(encoding)f Fv(to)i Fq(`Enc_utf8)e Fv(all)i(strings)f(originating)e -(from)h(the)i(parsed)e(XML)h(document)e(are)396 1999 -y(represented)h(as)i(UTF-8)e(strings.)h(This)h(includes)e(not)h(only)f -(character)g(data)h(and)g(attrib)n(ute)g(v)n(alues)g(b)n(ut)g(also)g -(element)396 2107 y(names,)g(attrib)n(ute)g(names)g(and)f(so)i(on,)e -(as)i(it)g(is)g(possible)f(to)h(use)f(an)o(y)f(Unicode)g(letter)i(to)f -(form)f(such)h(names.)g(Strictly)396 2214 y(speaking,)f(PXP)i(is)g -(only)e(XML-compliant)f(if)j(the)f(UTF-8)g(mode)f(is)i(used;)f -(otherwise)g(it)h(will)g(ha)n(v)o(e)e(dif)n(\002culties)396 -2322 y(when)h(v)n(alidating)f(documents)f(containing)g -(non-ISO-8859-1-names.)396 2472 y(This)j(mode)e(does)h(not)g(ha)n(v)o -(e)f(an)o(y)h(impact)f(on)h(the)g(e)o(xternal)f(representation)f(of)i -(documents.)f(The)g(character)g(set)396 2580 y(assumed)h(when)g -(reading)e(a)j(document)d(is)j(set)g(in)g(the)f(XML)g(declaration,)e -(and)i(character)f(set)i(when)e(writing)h(a)396 2688 -y(document)e(must)j(be)f(passed)g(to)g(the)g Fq(write)g -Fv(method.)396 2837 y Fu(Ho)o(w)g(do)h(I)g(check)f(that)g(nodes)h -(exist)f(which)h(ar)o(e)e(r)o(eferr)o(ed)g(by)i(IDREF)g(attrib)n(utes?) -e Fv(First,)i(you)e(must)h(create)g(an)396 2945 y(inde)o(x)f(of)h(all)h -(occurring)d(ID)i(attrib)n(utes:)396 3125 y Fq(let)45 -b(index)f(=)g(new)h(hash_index)396 3316 y Fv(This)21 -b(inde)o(x)e(must)h(be)g(passed)g(to)g(the)h(parsing)e(function:)396 -3496 y Fq(parse_document_entity)486 3593 y(~id_index:\(index)42 -b(:>)j(index\))486 3691 y(config)f(source)g(spec)396 -3882 y Fv(Ne)o(xt,)20 b(you)f(must)h(turn)g(on)g(the)g -Fq(idref_pass)f Fv(mode:)396 4062 y Fq(let)45 b(config)e(=)i({)g -(default_config)d(with)i(idref_pass)g(=)g(true)g(})396 -4253 y Fv(Note)20 b(that)h(no)n(w)e(the)i(whole)e(document)f(tree)j -(will)g(be)f(tra)n(v)o(ersed,)f(and)g(e)n(v)o(ery)g(node)g(will)i(be)f -(check)o(ed)f(for)h(IDREF)g(and)396 4361 y(IDREFS)h(attrib)n(utes.)f -(If)g(the)g(tree)g(is)h(big,)f(this)h(may)f(tak)o(e)g(some)g(time.)396 -4510 y Fu(What)g(ar)o(e)g(deterministic)g(content)g(models?)g -Fv(These)g(type)g(of)g(models)g(can)g(speed)f(up)h(the)g(v)n(alidation) -f(checks;)396 4618 y(furthermore)f(the)o(y)h(ensure)g -(SGML-compatibility)-5 b(.)18 b(In)i(particular)m(,)e(a)j(content)e -(model)g(is)i(deterministic)e(if)i(the)f(parser)396 4726 -y(can)g(determine)f(the)h(actually)g(used)g(alternati)n(v)o(e)f(by)g -(inspecting)g(only)h(the)g(current)f(tok)o(en.)g(F)o(or)h(e)o(xample,)e -(this)396 4834 y(element)i(has)g(non-deterministic)e(contents:)p -Black 3800 5278 a Fr(94)p Black eop -%%Page: 95 95 -95 94 bop Black 2348 67 a Fr(Chapter)20 b(4.)g(Con\002guring)e(and)i -(calling)f(the)h(par)o(ser)p Black 396 579 a Fq()396 770 y Fv(If)20 -b(the)h(\002rst)f(element)g(in)g Fq(x)h Fv(is)g Fq(u)p -Fv(,)f(the)h(parser)e(does)h(not)g(kno)n(w)f(which)h(of)g(the)g -(alternati)n(v)o(es)f Fq(\(u,v\))h Fv(or)g Fq(\(u,y+\))g -Fv(will)396 878 y(w)o(ork;)g(the)g(parser)g(must)g(also)g(inspect)g -(the)h(second)e(element)g(to)i(be)f(able)g(to)g(distinguish)g(between)f -(the)h(alternati)n(v)o(es.)396 986 y(Because)h(such)f(look-ahead)d -(\(or)j("guessing"\))e(is)k(required,)c(this)i(e)o(xample)f(is)i -(non-deterministic.)396 1135 y(The)f(XML)g(standard)f(demands)g(that)i -(content)e(models)g(must)i(be)f(deterministic.)f(So)h(it)h(is)g -(recommended)c(to)k(turn)e(the)396 1243 y(option)g Fq -(accept_only_deterministic_models)d Fv(on;)j(ho)n(we)n(v)o(er)m(,)f -(PXP)j(can)f(also)h(process)e(non-deterministic)396 1351 -y(models)h(using)g(a)g(backtracking)e(algorithm.)396 -1500 y(Deterministic)i(models)g(ensure)f(that)h(v)n(alidation)f(can)h -(be)g(performed)e(in)i(linear)g(time.)g(In)g(order)f(to)h(get)g(the)396 -1608 y(maximum)f(bene\002ts,)h(PXP)h(also)f(implements)f(a)i(special)f -(v)n(alidator)f(that)h(pro\002ts)g(from)f(deterministic)h(models;)f -(this)396 1716 y(is)i(the)g(deterministic)e(\002nite)h(automaton)f -(\(DF)-6 b(A\).)19 b(This)i(v)n(alidator)d(is)k(enabled)d(per)g -(element)h(type)g(if)g(the)g(element)396 1824 y(type)g(has)g(a)h -(deterministic)e(model)h(and)f(if)i(the)f(option)f Fq(validate_by_dfa)f -Fv(is)j(turned)e(on.)396 1974 y(In)h(general,)f(I)h(e)o(xpect)g(that)g -(the)g(DF)-6 b(A)21 b(method)e(is)i(f)o(aster)f(than)g(the)g -(backtracking)e(method;)g(especially)i(in)h(the)f(w)o(orst)396 -2082 y(case)h(the)f(DF)-6 b(A)21 b(tak)o(es)f(only)g(linear)f(time.)i -(Ho)n(we)n(v)o(er)m(,)d(if)i(the)g(content)g(model)f(has)h(only)g(fe)n -(w)g(alternati)n(v)o(es)f(and)h(the)396 2190 y(alternati)n(v)o(es)f(do) -h(not)g(nest,)g(the)h(backtracking)c(algorithm)i(may)g(be)i(better)-5 -b(.)-2 2691 y Fx(4.5.)39 b(Updates)396 2871 y Fr(Some)20 -b(\(often)f(later)i(added\))d(featur)m(es)i(that)g(ar)m(e)h(otherwise)f -(not)g(e)n(xplained)f(in)h(the)h(manual)d(b)n(ut)j(worth)f(to)g(be)396 -2979 y(mentioned.)p Black 396 3211 a Ft(\225)p Black -60 w Fv(Methods)g(node_position,)d(node_path,)g(nth_node,)h(pre)n -(vious_node,)e(ne)o(xt_node)h(for)j(nodes:)f(See)479 -3319 y(pxp_document.mli)p Black 396 3427 a Ft(\225)p -Black 60 w Fv(Functions)h(to)g(determine)f(the)h(document)e(order)h(of) -h(nodes:)f(compare,)g(create_ord_inde)o(x,)c(ord_number)m(,)479 -3535 y(ord_compare:)i(See)k(pxp_document.mli)p Black -3800 5278 a Fr(95)p Black eop -%%Page: 96 96 -96 95 bop Black Black Black Black eop -%%Trailer -end -userdict /end-hook known{end-hook}if -%%EOF diff --git a/helm/DEVEL/pxp/pxp/doc/manual/src/dtd.mli.ent b/helm/DEVEL/pxp/pxp/doc/manual/src/dtd.mli.ent deleted file mode 100644 index f2e0eb85c..000000000 --- a/helm/DEVEL/pxp/pxp/doc/manual/src/dtd.mli.ent +++ /dev/null @@ -1,374 +0,0 @@ - - diff --git a/helm/DEVEL/pxp/pxp/doc/manual/src/getcode.ml b/helm/DEVEL/pxp/pxp/doc/manual/src/getcode.ml deleted file mode 100755 index 4db669036..000000000 --- a/helm/DEVEL/pxp/pxp/doc/manual/src/getcode.ml +++ /dev/null @@ -1,56 +0,0 @@ -#! /bin/sh -# (* -exec ocamlfattop "$0" -*) directory ".";; - -open Str;; - -let name_re = regexp "(\\*\\$[ \t]*\\([a-zA-Z0-9.-]*\\)[ \t]*\\*)";; -let subst_re = regexp "[<>&'%]";; - -let begin_entity name = - "\n" -;; - - -let text = ref "" in -let within_entity = ref false in -try - while true do - let line = read_line() in - if string_match name_re line 0 then begin - let name = matched_group 1 line in - if !within_entity then - text := !text ^ "\n" ^ end_entity(); - within_entity := false; - if name <> "-" then begin - text := !text ^ begin_entity name; - within_entity := true - end - end - else - if !within_entity then begin - let line' = - global_substitute subst_re - (fun s -> - let s' = matched_group 0 s in - match s' with - "<" -> "<" - | ">" -> ">" - | "&" -> "&" - | "'" -> "'" - | "%" -> "&percent;" - | _ -> assert false) - line - in - text := !text ^ "\n" ^ line' - end - done; -with End_of_file -> - if !within_entity then - text := !text ^ "\n" ^ end_entity(); - print_string !text -;; diff --git a/helm/DEVEL/pxp/pxp/doc/manual/src/markup.css b/helm/DEVEL/pxp/pxp/doc/manual/src/markup.css deleted file mode 100644 index 67dfaecb7..000000000 --- a/helm/DEVEL/pxp/pxp/doc/manual/src/markup.css +++ /dev/null @@ -1,4 +0,0 @@ -.acronym { - font-weight: bold; - color: #c71585 -} diff --git a/helm/DEVEL/pxp/pxp/doc/manual/src/markup.dsl b/helm/DEVEL/pxp/pxp/doc/manual/src/markup.dsl deleted file mode 100644 index cd9b1e2bf..000000000 --- a/helm/DEVEL/pxp/pxp/doc/manual/src/markup.dsl +++ /dev/null @@ -1,74 +0,0 @@ - - - - - -]]> - - -]]> -]> - - - - -;; HTML: - - - -;; printing: - - - -;; both: - -(define %section-autolabel% - ;; Are sections enumerated? - #t) - - - - - diff --git a/helm/DEVEL/pxp/pxp/doc/manual/src/markup.sgml b/helm/DEVEL/pxp/pxp/doc/manual/src/markup.sgml deleted file mode 100644 index 1cb2064cb..000000000 --- a/helm/DEVEL/pxp/pxp/doc/manual/src/markup.sgml +++ /dev/null @@ -1,5109 +0,0 @@ -PXP"> -PXP"> - - - - - -%readme.code.to-html; -%get.markup-yacc.mli; -%get.markup-dtd.mli; - - - -]> - - - - - The PXP user's guide - - - - - Gerd - Stolpmann - - -
- gerd@gerd-stolpmann.de -
-
-
-
-
- - - 1999, 2000Gerd Stolpmann - - - - - -&markup; is a validating parser for XML-1.0 which has been -written entirely in Objective Caml. - - - Download &markup;: - -The free &markup; library can be downloaded at - -http://www.ocaml-programming.de/packages/ -. This user's guide is included. -Newest releases of &markup; will be announced in -The OCaml Link -Database. - - - - - - License - -This document, and the described software, "&markup;", are copyright by -Gerd Stolpmann. - - - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this document and the "&markup;" software (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - - -The Software is provided ``as is'', without warranty of any kind, express -or implied, including but not limited to the warranties of -merchantability, fitness for a particular purpose and noninfringement. -In no event shall Gerd Stolpmann be liable for any claim, damages or -other liability, whether in an action of contract, tort or otherwise, -arising from, out of or in connection with the Software or the use or -other dealings in the software. - - - -
- - - - - - User's guide - - - What is XML? - - - Introduction - - XML (short for Extensible Markup Language) -generalizes the idea that text documents are typically structured in sections, -sub-sections, paragraphs, and so on. The format of the document is not fixed -(as, for example, in HTML), but can be declared by a so-called DTD (document -type definition). The DTD describes only the rules how the document can be -structured, but not how the document can be processed. For example, if you want -to publish a book that uses XML markup, you will need a processor that converts -the XML file into a printable format such as Postscript. On the one hand, the -structure of XML documents is configurable; on the other hand, there is no -longer a canonical interpretation of the elements of the document; for example -one XML DTD might want that paragraphes are delimited by -para tags, and another DTD expects p tags -for the same purpose. As a result, for every DTD a new processor is required. - - - -Although XML can be used to express structured text documents it is not limited -to this kind of application. For example, XML can also be used to exchange -structured data over a network, or to simply store structured data in -files. Note that XML documents cannot contain arbitrary binary data because -some characters are forbidden; for some applications you need to encode binary -data as text (e.g. the base 64 encoding). - - - - - The "hello world" example - -The following example shows a very simple DTD, and a corresponding document -instance. The document is structured such that it consists of sections, and -that sections consist of paragraphs, and that paragraphs contain plain text: - - - - - - -]]> - - - The following document is an instance of this DTD: - - - - - -
- This is a paragraph of the first section. - This is another paragraph of the first section. -
-
- This is the only paragraph of the second section. -
-
-]]> -
- - As in HTML (and, of course, in grand-father SGML), the "pieces" of -the document are delimited by element braces, i.e. such a piece begins with -<name-of-the-type-of-the-piece> and ends with -</name-of-the-type-of-the-piece>, and the pieces are -called elements. Unlike HTML and SGML, both start tags and -end tags (i.e. the delimiters written in angle brackets) can never be left -out. For example, HTML calls the paragraphs simply p, and -because paragraphs never contain paragraphs, a sequence of several paragraphs -can be written as: - -First paragraph -

Second paragraph]]> - -This is not possible in XML; continuing our example above we must always write - -First paragraph -Second paragraph]]> - -The rationale behind that is to (1) simplify the development of XML parsers -(you need not convert the DTD into a deterministic finite automaton which is -required to detect omitted tags), and to (2) make it possible to parse the -document independent of whether the DTD is known or not. - - - -The first line of our sample document, - - -]]> - - -is the so-called XML declaration. It expresses that the -document follows the conventions of XML version 1.0, and that the document is -encoded using characters from the ISO-8859-1 character set (often known as -"Latin 1", mostly used in Western Europe). Although the XML declaration is not -mandatory, it is good style to include it; everybody sees at the first glance -that the document uses XML markup and not the similar-looking HTML and SGML -markup languages. If you omit the XML declaration, the parser will assume -that the document is encoded as UTF-8 or UTF-16 (there is a rule that makes -it possible to distinguish between UTF-8 and UTF-16 automatically); these -are encodings of Unicode's universal character set. (Note that &pxp;, unlike its -predecessor "Markup", fully supports Unicode.) - - - -The second line, - - -]]> - - -names the DTD that is going to be used for the rest of the document. In -general, it is possible that the DTD consists of two parts, the so-called -external and the internal subset. "External" means that the DTD exists as a -second file; "internal" means that the DTD is included in the same file. In -this example, there is only an external subset, and the system identifier -"simple.dtd" specifies where the DTD file can be found. System identifiers are -interpreted as URLs; for instance this would be legal: - - -]]> - - -Please note that &pxp; cannot interpret HTTP identifiers by default, but it is -possible to change the interpretation of system identifiers. - - - -The word immediately following DOCTYPE determines which of -the declared element types (here "document", "section", and "paragraph") is -used for the outermost element, the root element. In this -example it is document because the outermost element is -delimited by <document> and -</document>. - - - -The DTD consists of three declarations for element types: -document, section, and -paragraph. Such a declaration has two parts: - - -<!ELEMENT name content-model> - - -The content model is a regular expression which describes the possible inner -structure of the element. Here, document contains one or -more sections, and a section contains one or more -paragraphs. Note that these two element types are not allowed to contain -arbitrary text. Only the paragraph element type is declared -such that parsed character data (indicated by the symbol -#PCDATA) is permitted. - - - -See below for a detailed discussion of content models. - - - - - XML parsers and processors - -XML documents are human-readable, but this is not the main purpose of this -language. XML has been designed such that documents can be read by a program -called an XML parser. The parser checks that the document -is well-formatted, and it represents the document as objects of the programming -language. There are two aspects when checking the document: First, the document -must follow some basic syntactic rules, such as that tags are written in angle -brackets, that for every start tag there must be a corresponding end tag and so -on. A document respecting these rules is -well-formed. Second, the document must match the DTD in -which case the document is valid. Many parsers check only -on well-formedness and ignore the DTD; &pxp; is designed such that it can -even validate the document. - - - -A parser does not make a sensible application, it only reads XML -documents. The whole application working with XML-formatted data is called an -XML processor. Often XML processors convert documents into -another format, such as HTML or Postscript. Sometimes processors extract data -of the documents and output the processed data again XML-formatted. The parser -can help the application processing the document; for example it can provide -means to access the document in a specific manner. &pxp; supports an -object-oriented access layer specially. - - - - - Discussion - -As we have seen, there are two levels of description: On the one hand, XML can -define rules about the format of a document (the DTD), on the other hand, XML -expresses structured documents. There are a number of possible applications: - - - - - -XML can be used to express structured texts. Unlike HTML, there is no canonical -interpretation; one would have to write a backend for the DTD that translates -the structured texts into a format that existing browsers, printers -etc. understand. The advantage of a self-defined document format is that it is -possible to design the format in a more problem-oriented way. For example, if -the task is to extract reports from a database, one can use a DTD that reflects -the structure of the report or the database. A possible approach would be to -have an element type for every database table and for every column. Once the -DTD has been designed, the report procedure can be splitted up in a part that -selects the database rows and outputs them as an XML document according to the -DTD, and in a part that translates the document into other formats. Of course, -the latter part can be solved in a generic way, e.g. there may be configurable -backends for all DTDs that follow the approach and have element types for -tables and columns. - - - -XML plays the role of a configurable intermediate format. The database -extraction function can be written without having to know the details of -typesetting; the backends can be written without having to know the details of -the database. - - - -Of course, there are traditional solutions. One can define an ad hoc -intermediate text file format. This disadvantage is that there are no names for -the pieces of the format, and that such formats usually lack of documentation -because of this. Another solution would be to have a binary representation, -either as language-dependent or language-independent structure (example of the -latter can be found in RPC implementations). The disadvantage is that it is -harder to view such representations, one has to write pretty printers for this -purpose. It is also more difficult to enter test data; XML is plain text that -can be written using an arbitrary editor (Emacs has even a good XML mode, -PSGML). All these alternatives suffer from a missing structure checker, -i.e. the programs processing these formats usually do not check the input file -or input object in detail; XML parsers check the syntax of the input (the -so-called well-formedness check), and the advanced parsers like &markup; even -verify that the structure matches the DTD (the so-called validation). - - - - - - -XML can be used as configurable communication language. A fundamental problem -of every communication is that sender and receiver must follow the same -conventions about the language. For data exchange, the question is usually -which data records and fields are available, how they are syntactically -composed, and which values are possible for the various fields. Similar -questions arise for text document exchange. XML does not answer these problems -completely, but it reduces the number of ambiguities for such conventions: The -outlines of the syntax are specified by the DTD (but not necessarily the -details), and XML introduces canonical names for the components of documents -such that it is simpler to describe the rest of the syntax and the semantics -informally. - - - - - -XML is a data storage format. Currently, every software product tends to use -its own way to store data; commercial software often does not describe such -formats, and it is a pain to integrate such software into a bigger project. -XML can help to improve this situation when several applications share the same -syntax of data files. DTDs are then neutral instances that check the format of -data files independent of applications. - - - - - - - - - - - - - Highlights of XML - - -This section explains many of the features of XML, but not all, and some -features not in detail. For a complete description, see the XML -specification. - - - - The DTD and the instance - -The DTD contains various declarations; in general you can only use a feature if -you have previously declared it. The document instance file may contain the -full DTD, but it is also possible to split the DTD into an internal and an -external subset. A document must begin as follows if the full DTD is included: - - -<?xml version="1.0" encoding="Your encoding"?> -<!DOCTYPE root [ - Declarations -]> - - -These declarations are called the internal subset. Note -that the usage of entities and conditional sections is restricted within the -internal subset. - - -If the declarations are located in a different file, you can refer to this file -as follows: - - -<?xml version="1.0" encoding="Your encoding"?> -<!DOCTYPE root SYSTEM "file name"> - - -The declarations in the file are called the external -subset. The file name is called the system -identifier. -It is also possible to refer to the file by a so-called -public identifier, but most XML applications won't use -this feature. - - -You can also specify both internal and external subsets. In this case, the -declarations of both subsets are mixed, and if there are conflicts, the -declaration of the internal subset overrides those of the external subset with -the same name. This looks as follows: - - -<?xml version="1.0" encoding="Your encoding"?> -<!DOCTYPE root SYSTEM "file name" [ - Declarations -]> - - - - -The XML declaration (the string beginning with <?xml and -ending at ?>) should specify the encoding of the -file. Common values are UTF-8, and the ISO-8859 series of character sets. Note -that every file parsed by the XML processor can begin with an XML declaration -and that every file may have its own encoding. - - - -The name of the root element must be mentioned directly after the -DOCTYPE string. This means that a full document instance -looks like - - -<?xml version="1.0" encoding="Your encoding"?> -<!DOCTYPE root SYSTEM "file name" [ - Declarations -]> - -<root> - inner contents -</root> - - - - - - - - Reserved characters - -Some characters are generally reserved to indicate markup such that they cannot -be used for character data. These characters are <, >, and -&. Furthermore, single and double quotes are sometimes reserved. If you -want to include such a character as character, write it as follows: - - - - -&lt; instead of < - - - - -&gt; instead of > - - - - -&amp; instead of & - - - - -&apos; instead of ' - - - - -&quot; instead of " - - - - -All other characters are free in the document instance. It is possible to -include a character by its position in the Unicode alphabet: - - -&#n; - - -where n is the decimal number of the -character. Alternatively, you can specify the character by its hexadecimal -number: - - -&#xn; - - -In the scope of declarations, the character % is no longer free. To include it -as character, you must use the notations &#37; or -&#x25;. - - - Note that besides &lt;, &gt;, &amp;, -&apos;, and &quot; there are no predefines character entities. This is -different from HTML which defines a list of characters that can be referenced -by name (e.g. &auml; for ä); however, if you prefer named characters, you -can declare such entities yourself (see below). - - - - - - - Elements and ELEMENT declarations - - -Elements structure the document instance in a hierarchical way. There is a -top-level element, the root element, which contains a -sequence of inner elements and character sections. The inner elements are -structured in the same way. Every element has an element -type. The beginning of the element is indicated by a start -tag, written - - -<element-type> - - -and the element continues until the corresponding end tag -is reached: - - -</element-type> - - -In XML, it is not allowed to omit start or end tags, even if the DTD would -permit this. Note that there are no special rules how to interpret spaces or -newlines near start or end tags; all spaces and newlines count. - - - -Every element type must be declared before it can be used. The declaration -consists of two parts: the ELEMENT declaration describes the content model, -i.e. which inner elements are allowed; the ATTLIST declaration describes the -attributes of the element. - - - -An element can simply allow everything as content. This is written: - - -<!ELEMENT name ANY> - - -On the opposite, an element can be forced to be empty; declared by: - - -<!ELEMENT name EMPTY> - - -Note that there is an abbreviated notation for empty element instances: -<name/>. - - - -There are two more sophisticated forms of declarations: so-called -mixed declarations, and regular -expressions. An element with mixed content contains character data -interspersed with inner elements, and the set of allowed inner elements can be -specified. In contrast to this, a regular expression declaration does not allow -character data, but the inner elements can be described by the more powerful -means of regular expressions. - - - -A declaration for mixed content looks as follows: - - -<!ELEMENT name (#PCDATA | element1 | ... | elementn )*> - - -or if you do not want to allow any inner element, simply - - -<!ELEMENT name (#PCDATA)> - - - - -

- Example - -If element type q is declared as - - -]]> - - -this is a legal instance: - - -This is character datawith inner elements]]> - - -But this is illegal because t has not been enumerated in the -declaration: - - -This is character datawith inner elements]]> - - -
- - -The other form uses a regular expression to describe the possible contents: - - -<!ELEMENT name regexp> - - -The following well-known regexp operators are allowed: - - - - -element-name - - - - - -(subexpr1 , ... , subexprn ) - - - - - -(subexpr1 | ... | subexprn ) - - - - - -subexpr* - - - - - -subexpr+ - - - - - -subexpr? - - - - -The , operator indicates a sequence of sub-models, the -| operator describes alternative sub-models. The -* indicates zero or more repetitions, and -+ one or more repetitions. Finally, ? can -be used for optional sub-models. As atoms the regexp can contain names of -elements; note that it is not allowed to include #PCDATA. - - - -The exact syntax of the regular expressions is rather strange. This can be -explained best by a list of constraints: - - - - -The outermost expression must not be -element-name. - - Illegal: -]]>; this must be written as -]]>. - - - -For the unary operators subexpr*, -subexpr+, and -subexpr?, the -subexpr must not be again an -unary operator. - - Illegal: -]]>; this must be written as -]]>. - - - -Between ) and one of the unary operatory -*, +, or ?, there must -not be whitespace. - Illegal: -]]>; this must be written as -]]>. - - There is the additional constraint that the -right parenthsis must be contained in the same entity as the left parenthesis; -see the section about parsed entities below. - - - - - - -Note that there is another restriction on regular expressions which must be -deterministic. This means that the parser must be able to see by looking at the -next token which alternative is actually used, or whether the repetition -stops. The reason for this is simply compatability with SGML (there is no -intrinsic reason for this rule; XML can live without this restriction). - - -
- Example - -The elements are declared as follows: - - - - - - -]]> - -This is a legal instance: - - -Some characters]]> - - -(Note: <s/> is an abbreviation for -<s></s>.) - -It would be illegal to leave ]]> out because at -least one instance of s or t must be -present. It would be illegal, too, if characters existed outside the -r element; the only exception is white space. -- This is -legal, too: - - -]]> - - -
- -
- - - - - Attribute lists and ATTLIST declarations - -Elements may have attributes. These are put into the start tag of an element as -follows: - - -<element-name attribute1="value1" ... attributen="valuen"> - - -Instead of -"valuek" -it is also possible to use single quotes as in -'valuek'. -Note that you cannot use double quotes literally within the value of the -attribute if double quotes are the delimiters; the same applies to single -quotes. You can generally not use < and & as characters in attribute -values. It is possible to include the paraphrases &lt;, &gt;, -&amp;, &apos;, and &quot; (and any other reference to a general -entity as long as the entity is not defined by an external file) as well as -&#n;. - - - -Before you can use an attribute you must declare it. An ATTLIST declaration -looks as follows: - - -<!ATTLIST element-name - attribute-name attribute-type attribute-default - ... - attribute-name attribute-type attribute-default -> - - -There are a lot of types, but most important are: - - - - -CDATA: Every string is allowed as attribute value. - - - - -NMTOKEN: Every nametoken is allowed as attribute -value. Nametokens consist (mainly) of letters, digits, ., :, -, _ in arbitrary -order. - - - - -NMTOKENS: A space-separated list of nametokens is allowed as -attribute value. - - - - -The most interesting default declarations are: - - - - -#REQUIRED: The attribute must be specified. - - - - -#IMPLIED: The attribute can be specified but also can be -left out. The application can find out whether the attribute was present or -not. - - - - -"value" or -'value': This particular value is -used as default if the attribute is omitted in the element. - - - - - -
- Example - -This is a valid attribute declaration for element type r: - - - -]]> - -This means that x is a required attribute that cannot be -left out, while y and z are optional. The -XML parser indicates the application whether y is present or -not, but if z is missing the default value -"one two three" is returned automatically. - - - -This is a valid example of these attributes: - - -]]> - - -
- -
- - - Parsed entities - -Elements describe the logical structure of the document, while -entities determine the physical structure. Entities are -the pieces of text the parser operates on, mostly files and macros. Entities -may be parsed in which case the parser reads the text and -interprets it as XML markup, or unparsed which simply -means that the data of the entity has a foreign format (e.g. a GIF icon). - - - If the parsed entity is going to be used as part of the DTD, it -is called a parameter entity. You can declare a parameter -entity with a fixed text as content by: - - -<!ENTITY % name "value"> - - -Within the DTD, you can refer to this entity, i.e. read -the text of the entity, by: - - -%name; - - -Such entities behave like macros, i.e. when they are referred to, the -macro text is inserted and read instead of the original text. - -
- Example - -For example, you can declare two elements with the same content model by: - - - - - -]]> - - - -
- -If the contents of the entity are given as string constant, the entity is -called an internal entity. It is also possible to name a -file to be used as content (an external entity): - - -<!ENTITY % name SYSTEM "file name"> - - -There are some restrictions for parameter entities: - - - - -If the internal parameter entity contains the first token of a declaration -(i.e. <!), it must also contain the last token of the -declaration, i.e. the >. This means that the entity -either contains a whole number of complete declarations, or some text from the -middle of one declaration. - -Illegal: - -"> - Because <! is contained in the main -entity, and the corresponding > is contained in the -entity e. - - - -If the internal parameter entity contains a left paranthesis, it must also -contain the corresponding right paranthesis. - -Illegal: - - - -]]> Because ( is contained in the entity -e, and the corresponding ) is -contained in the main entity. - - - -When reading text from an entity, the parser automatically inserts one space -character before the entity text and one space character after the entity -text. However, this rule is not applied within the definition of another -entity. -Legal: - - - -]]> Because %suffix; is referenced within -the definition text for iconfile, no additional spaces are -added. - -Illegal: - - - -]]> -Because %suffix; is referenced outside the definition -text of another entity, the parser replaces %suffix; by -spacetestspace. -Illegal: - - - -]]> Because there is a whitespace between ) -and *, which is illegal. - - - -An external parameter entity must always consist of a whole number of complete -declarations. - - - - -In the internal subset of the DTD, a reference to a parameter entity (internal -or external) is only allowed at positions where a new declaration can start. - - - -
- - -If the parsed entity is going to be used in the document instance, it is called -a general entity. Such entities can be used as -abbreviations for frequent phrases, or to include external files. Internal -general entities are declared as follows: - - -<!ENTITY name "value"> - - -External general entities are declared this way: - - -<!ENTITY name SYSTEM "file name"> - - -References to general entities are written as: - - -&name; - - -The main difference between parameter and general entities is that the former -are only recognized in the DTD and that the latter are only recognized in the -document instance. As the DTD is parsed before the document, the parameter -entities are expanded first; for example it is possible to use the content of a -parameter entity as the name of a general entity: -&#38;%name;;This construct is only -allowed within the definition of another entity; otherwise extra spaces would -be added (as explained above). Such indirection is not recommended. - -Complete example: - - - - - -]]> -You can now write &text; in the document instance, and -depending on the value of variant either -text-a or text-b is inserted. -. - - -General entities must respect the element hierarchy. This means that there must -be an end tag for every start tag in the entity value, and that end tags -without corresponding start tags are not allowed. - - -
- Example - -If the author of a document changes sometimes, it is worthwhile to set up a -general entity containing the names of the authors. If the author changes, you -need only to change the definition of the entity, and do not need to check all -occurrences of authors' names: - - - -]]> - - -In the document text, you can now refer to the author names by writing -&authors;. - - - -Illegal: -The following two entities are illegal because the elements in the definition -do not nest properly: - - -"> -"> -]]> - -
- - -Earlier in this introduction we explained that there are substitutes for -reserved characters: &lt;, &gt;, &amp;, &apos;, and -&quot;. These are simply predefined general entities; note that they are -the only predefined entities. It is allowed to define these entities again -as long as the meaning is unchanged. - - - - - Notations and unparsed entities - -Unparsed entities have a foreign format and can thus not be read by the XML -parser. Unparsed entities are always external. The format of an unparsed entity -must have been declared, such a format is called a -notation. The entity can then be declared by referring to -this notation. As unparsed entities do not contain XML text, it is not possible -to include them directly into the document; you can only declare attributes -such that names of unparsed entities are acceptable values. - - - -As you can see, unparsed entities are too complicated in order to have any -purpose. It is almost always better to simply pass the name of the data file as -normal attribute value, and let the application recognize and process the -foreign format. - - - - - - - - - - - A complete example: The <emphasis>readme</emphasis> DTD - -The reason for readme was that I often wrote two versions -of files such as README and INSTALL which explain aspects of a distributed -software archive; one version was ASCII-formatted, the other was written in -HTML. Maintaining both versions means double amount of work, and changes -of one version may be forgotten in the other version. To improve this situation -I invented the readme DTD which allows me to maintain only -one source written as XML document, and to generate the ASCII and the HTML -version from it. - - - -In this section, I explain only the DTD. The readme DTD is -contained in the &markup; distribution together with the two converters to -produce ASCII and HTML. Another section of this manual describes the HTML -converter. - - - -The documents have a simple structure: There are up to three levels of nested -sections, paragraphs, item lists, footnotes, hyperlinks, and text emphasis. The -outermost element has usually the type readme, it is -declared by - - - - -]]> - -This means that this element contains one or more sections of the first level -(element type sect1), and that the element has a required -attribute title containing character data (CDATA). Note that -readme elements must not contain text data. - - - -The three levels of sections are declared as follows: - - - - - - - -]]> - -Every section has a title element as first subelement. After -the title an arbitrary but non-empty sequence of inner sections, paragraphs and -item lists follows. Note that the inner sections must belong to the next higher -section level; sect3 elements must not contain inner -sections because there is no next higher level. - - - -Obviously, all three declarations allow paragraphs (p) and -item lists (ul). The definition can be simplified at this -point by using a parameter entity: - - - - - - - - - -]]> - -Here, the entity p.like is nothing but a macro abbreviating -the same sequence of declarations; if new elements on the same level as -p and ul are later added, it is -sufficient only to change the entity definition. Note that there are some -restrictions on the usage of entities in this context; most important, entities -containing a left paranthesis must also contain the corresponding right -paranthesis. - - - -Note that the entity p.like is a -parameter entity, i.e. the ENTITY declaration contains a -percent sign, and the entity is referred to by -%p.like;. This kind of entity must be used to abbreviate -parts of the DTD; the general entities declared without -percent sign and referred to as &name; are not allowed -in this context. - - - -The title element specifies the title of the section in -which it occurs. The title is given as character data, optionally interspersed -with line breaks (br): - - - -]]> - -Compared with the title attribute of -the readme element, this element allows inner markup -(i.e. br) while attribute values do not: It is an error if -an attribute value contains the left angle bracket < literally such that it -is impossible to include inner elements. - - - -The paragraph element p has a structure similar to -title, but it allows more inner elements: - - - - - -]]> - -Line breaks do not have inner structure, so they are declared as being empty: - - - -]]> - -This means that really nothing is allowed within br; you -must always write
]]>
or abbreviated -]]>. -
- - -Code samples should be marked up by the code tag; emphasized -text can be indicated by em: - - - - - -]]> - -That code elements are not allowed to contain further markup -while em elements do is a design decision by the author of -the DTD. - - - -Unordered lists simply consists of one or more list items, and a list item may -contain paragraph-level material: - - - - - -]]> - -Footnotes are described by the text of the note; this text may contain -text-level markup. There is no mechanism to describe the numbering scheme of -footnotes, or to specify how footnote references are printed. - - - -]]> - -Hyperlinks are written as in HTML. The anchor tag contains the text describing -where the link points to, and the href attribute is the -pointer (as URL). There is no way to describe locations of "hash marks". If the -link refers to another readme document, the attribute -readmeref should be used instead of href. -The reason is that the converted document has usually a different system -identifier (file name), and the link to a converted document must be -converted, too. - - - - -]]> - -Note that although it is only sensible to specify one of the two attributes, -the DTD has no means to express this restriction. - - - -So far the DTD. Finally, here is a document for it: - - - - - - - Usage -

- The readme converter is invoked on the command line by: -

-

- readme [ -text | -html ] input.xml -

-

- Here a list of options: -

-
    -
  • -

    -text: specifies that ASCII output should be produced

    -
  • -
  • -

    -html: specifies that HTML output should be produced

    -
  • -
-

- The input file must be given on the command line. The converted output is - printed to stdout. -

-
- - Author -

- The program has been written by - Gerd Stolpmann. -

-
-
-]]>
- -
- - -
- - - - - - Using &markup; - - - Validation - -The parser can be used to validate a document. This means -that all the constraints that must hold for a valid document are actually -checked. Validation is the default mode of &markup;, i.e. every document is -validated while it is being parsed. - - - -In the examples directory of the distribution you find the -pxpvalidate application. It is invoked in the following way: - - -pxpvalidate [ -wf ] file... - - -The files mentioned on the command line are validated, and every warning and -every error messages are printed to stderr. - - - -The -wf switch modifies the behaviour such that a well-formedness parser is -simulated. In this mode, the ELEMENT, ATTLIST, and NOTATION declarations of the -DTD are ignored, and only the ENTITY declarations will take effect. This mode -is intended for documents lacking a DTD. Please note that the parser still -scans the DTD fully and will report all errors in the DTD; such checks are not -required by a well-formedness parser. - - - -The pxpvalidate application is the simplest sensible program -using &markup;, you may consider it as "hello world" program. - - - - - - - - - How to parse a document from an application - -Let me first give a rough overview of the object model of the parser. The -following items are represented by objects: - - - - -Documents: The document representation is more or less the -anchor for the application; all accesses to the parsed entities start here. It -is described by the class document contained in the module -Pxp_document. You can get some global information, such -as the XML declaration the document begins with, the DTD of the document, -global processing instructions, and most important, the document tree. - - - - - -The contents of documents: The contents have the structure -of a tree: Elements contain other elements and textElements may -also contain processing instructions. Unlike other document models, &markup; -separates processing instructions from the rest of the text and provides a -second interface to access them (method pinstr). However, -there is a parser option (enable_pinstr_nodes) which changes -the behaviour of the parser such that extra nodes for processing instructions -are included into the tree. -Furthermore, the tree does normally not contain nodes for XML comments; -they are ignored by default. Again, there is an option -(enable_comment_nodes) changing this. -. - -The common type to represent both kinds of content is node -which is a class type that unifies the properties of elements and character -data. Every node has a list of children (which is empty if the element is empty -or the node represents text); nodes may have attributes; nodes have always text -contents. There are two implementations of node, the class -element_impl for elements, and the class -data_impl for text data. You find these classes and class -types in the module Pxp_document, too. - - - -Note that attribute lists are represented by non-class values. - - - - - -The node extension: For advanced usage, every node of the -document may have an associated extension which is simply -a second object. This object must have the three methods -clone, node, and -set_node as bare minimum, but you are free to add methods as -you want. This is the preferred way to add functionality to the document -treeDue to the typing system it is more or less impossible to -derive recursive classes in O'Caml. To get around this, it is common practice -to put the modifiable or extensible part of recursive objects into parallel -objects. . The class type extension is -defined in Pxp_document, too. - - - - - -The DTD: Sometimes it is necessary to access the DTD of a -document; the average application does not need this feature. The class -dtd describes DTDs, and makes it possible to get -representations of element, entity, and notation declarations as well as -processing instructions contained in the DTD. This class, and -dtd_element, dtd_notation, and -proc_instruction can be found in the module -Pxp_dtd. There are a couple of classes representing -different kinds of entities; these can be found in the module -Pxp_entity. - - - - -Additionally, the following modules play a role: - - - - -Pxp_yacc: Here the main parsing functions such as -parse_document_entity are located. Some additional types and -functions allow the parser to be configured in a non-standard way. - - - - - -Pxp_types: This is a collection of basic types and -exceptions. - - - - -There are some further modules that are needed internally but are not part of -the API. - - - -Let the document to be parsed be stored in a file called -doc.xml. The parsing process is started by calling the -function - - -val parse_document_entity : config -> source -> 'ext spec -> 'ext document - - -defined in the module Pxp_yacc. The first argument -specifies some global properties of the parser; it is recommended to start with -the default_config. The second argument determines where the -document to be parsed comes from; this may be a file, a channel, or an entity -ID. To parse doc.xml, it is sufficient to pass -from_file "doc.xml". - - - -The third argument passes the object specification to use. Roughly -speaking, it determines which classes implement the node objects of which -element types, and which extensions are to be used. The 'ext -polymorphic variable is the type of the extension. For the moment, let us -simply pass default_spec as this argument, and ignore it. - - - -So the following expression parses doc.xml: - - -open Pxp_yacc -let d = parse_document_entity default_config (from_file "doc.xml") default_spec - - -Note that default_config implies that warnings are collected -but not printed. Errors raise one of the exception defined in -Pxp_types; to get readable errors and warnings catch the -exceptions as follows: - - - - print_endline (Pxp_types.string_of_exn e) -]]> - -Now d is an object of the document -class. If you want the node tree, you can get the root element by - - -let root = d # root - - -and if you would rather like to access the DTD, determine it by - - -let dtd = d # dtd - - -As it is more interesting, let us investigate the node tree now. Given the root -element, it is possible to recursively traverse the whole tree. The children of -a node n are returned by the method -sub_nodes, and the type of a node is returned by -node_type. This function traverses the tree, and prints the -type of each node: - - - - print_endline ("Element of type " ^ name); - let children = n # sub_nodes in - List.iter print_structure children - | T_data -> - print_endline "Data" - | _ -> - (* Other node types are not possible unless the parser is configured - differently. - *) - assert false -]]> - -You can call this function by - - -print_structure root - - -The type returned by node_type is either T_element -name or T_data. The name of the -element type is the string included in the angle brackets. Note that only -elements have children; data nodes are always leaves of the tree. - - - -There are some more methods in order to access a parsed node tree: - - - - -n # parent: Returns the parent node, or raises -Not_found if the node is already the root - - - - -n # root: Returns the root of the node tree. - - - - -n # attribute a: Returns the value of the attribute with -name a. The method returns a value for every -declared attribute, independently of whether the attribute -instance is defined or not. If the attribute is not declared, -Not_found will be raised. (In well-formedness mode, every -attribute is considered as being implicitly declared with type -CDATA.) - - - -The following return values are possible: Value s, -Valuelist sl , and Implied_value. -The first two value types indicate that the attribute value is available, -either because there is a definition -a="value" -in the XML text, or because there is a default value (declared in the -DTD). Only if both the instance definition and the default declaration are -missing, the latter value Implied_value will be returned. - - - -In the DTD, every attribute is typed. There are single-value types (CDATA, ID, -IDREF, ENTITY, NMTOKEN, enumerations), in which case the method passes -Value s back, where s is the normalized -string value of the attribute. The other types (IDREFS, ENTITIES, NMTOKENS) -represent list values, and the parser splits the XML literal into several -tokens and returns these tokens as Valuelist sl. - - - -Normalization means that entity references (the -&name; tokens) and -character references -(&#number;) are replaced -by the text they represent, and that white space characters are converted into -plain spaces. - - - - -n # data: Returns the character data contained in the -node. For data nodes, the meaning is obvious as this is the main content of -data nodes. For element nodes, this method returns the concatenated contents of -all inner data nodes. - - -Note that entity references included in the text are resolved while they are -being parsed; for example the text will be returned -as b"]]> by this method. Spaces of data nodes are always -preserved. Newlines are preserved, but always converted to \n characters even -if newlines are encoded as \r\n or \r. Normally you will never see two adjacent -data nodes because the parser collapses all data material at one location into -one node. (However, if you create your own tree or transform the parsed tree, -it is possible to have adjacent data nodes.) - - -Note that elements that do not allow #PCDATA as content -will not have data nodes as children. This means that spaces and newlines, the -only character material allowed for such elements, are silently dropped. - - - - -For example, if the task is to print all contents of elements with type -"valuable" whose attribute "priority" is "1", this function can help: - - - - print_endline "Valuable node with priotity 1 found:"; - print_endline (n # data) - | (T_element _ | T_data) -> - let children = n # sub_nodes in - List.iter print_valuable_prio1 children - | _ -> - assert false -]]> - -You can call this function by: - - -print_valuable_prio1 root - - -If you like a DSSSL-like style, you can make the function -process_children explicit: - - - - print_endline "Valuable node with priority 1 found:"; - print_endline (n # data) - | (T_element _ | T_data) -> - process_children n - | _ -> - assert false -]]> - -So far, O'Caml is now a simple "style-sheet language": You can form a big -"match" expression to distinguish between all significant cases, and provide -different reactions on different conditions. But this technique has -limitations; the "match" expression tends to get larger and larger, and it is -difficult to store intermediate values as there is only one big -recursion. Alternatively, it is also possible to represent the various cases as -classes, and to use dynamic method lookup to find the appropiate class. The -next section explains this technique in detail. - - - - - - - - - - Class-based processing of the node tree - -By default, the parsed node tree consists of objects of the same class; this is -a good design as long as you want only to access selected parts of the -document. For complex transformations, it may be better to use different -classes for objects describing different element types. - - - -For example, if the DTD declares the element types a, -b, and c, and if the task is to convert -an arbitrary document into a printable format, the idea is to define for every -element type a separate class that has a method print. The -classes are eltype_a, eltype_b, and -eltype_c, and every class implements -print such that elements of the type corresponding to the -class are converted to the output format. - - - -The parser supports such a design directly. As it is impossible to derive -recursive classes in O'CamlThe problem is that the subclass is -usually not a subtype in this case because O'Caml has a contravariant subtyping -rule. , the specialized element classes cannot be formed by -simply inheriting from the built-in classes of the parser and adding methods -for customized functionality. To get around this limitation, every node of the -document tree is represented by two objects, one called -"the node" and containing the recursive definition of the tree, one called "the -extension". Every node object has a reference to the extension, and the -extension has a reference to the node. The advantage of this model is that it -is now possible to customize the extension without affecting the typing -constraints of the recursive node definition. - - - -Every extension must have the three methods clone, -node, and set_node. The method -clone creates a deep copy of the extension object and -returns it; node returns the node object for this extension -object; and set_node is used to tell the extension object -which node is associated with it, this method is automatically called when the -node tree is initialized. The following definition is a good starting point -for these methods; usually clone must be further refined -when instance variables are added to the class: - - -} - method node = - match node with - None -> - assert false - | Some n -> n - method set_node n = - node <- Some n - - end -]]> - - -This part of the extension is usually the same for all classes, so it is a good -idea to consider custom_extension as the super-class of the -further class definitions. Continuining the example of above, we can define the -element type classes as follows: - - - unit - end - -class eltype_a = - object (self) - inherit custom_extension - method print ch = ... - end - -class eltype_b = - object (self) - inherit custom_extension - method print ch = ... - end - -class eltype_c = - object (self) - inherit custom_extension - method print ch = ... - end -]]> - -The method print can now be implemented for every element -type separately. Note that you get the associated node by invoking - - -self # node - - -and you get the extension object of a node n by writing - - -n # extension - - -It is guaranteed that - - -self # node # extension == self - - -always holds. - - - Here are sample definitions of the print -methods: - -... are only containers: *) - output_string ch "("; - List.iter - (fun n -> n # extension # print ch) - (self # node # sub_nodes); - output_string ch ")"; - end - -class eltype_b = - object (self) - inherit custom_extension - method print ch = - (* Print the value of the CDATA attribute "print": *) - match self # node # attribute "print" with - Value s -> output_string ch s - | Implied_value -> output_string ch "" - | Valuelist l -> assert false - (* not possible because the att is CDATA *) - end - -class eltype_c = - object (self) - inherit custom_extension - method print ch = - (* Print the contents of this element: *) - output_string ch (self # node # data) - end - -class null_extension = - object (self) - inherit custom_extension - method print ch = assert false - end -]]> - - - - -The remaining task is to configure the parser such that these extension classes -are actually used. Here another problem arises: It is not possible to -dynamically select the class of an object to be created. As workaround, -&markup; allows the user to specify exemplar objects for -the various element types; instead of creating the nodes of the tree by -applying the new operator the nodes are produced by -duplicating the exemplars. As object duplication preserves the class of the -object, one can create fresh objects of every class for which previously an -exemplar has been registered. - - - -Exemplars are meant as objects without contents, the only interesting thing is -that exemplars are instances of a certain class. The creation of an exemplar -for an element node can be done by: - - -let element_exemplar = new element_impl extension_exemplar - - -And a data node exemplar is created by: - - -let data_exemplar = new data_impl extension_exemplar - - -The classes element_impl and data_impl -are defined in the module Pxp_document. The constructors -initialize the fresh objects as empty objects, i.e. without children, without -data contents, and so on. The extension_exemplar is the -initial extension object the exemplars are associated with. - - - -Once the exemplars are created and stored somewhere (e.g. in a hash table), you -can take an exemplar and create a concrete instance (with contents) by -duplicating it. As user of the parser you are normally not concerned with this -as this is part of the internal logic of the parser, but as background knowledge -it is worthwhile to mention that the two methods -create_element and create_data actually -perform the duplication of the exemplar for which they are invoked, -additionally apply modifications to the clone, and finally return the new -object. Moreover, the extension object is copied, too, and the new node object -is associated with the fresh extension object. Note that this is the reason why -every extension object must have a clone method. - - - -The configuration of the set of exemplars is passed to the -parse_document_entity function as third argument. In our -example, this argument can be set up as follows: - - - - -The ~element_alist function argument defines the mapping -from element types to exemplars as associative list. The argument -~data_exemplar specifies the exemplar for data nodes, and -the ~default_element_exemplar is used whenever the parser -finds an element type for which the associative list does not define an -exemplar. - - - -The configuration is now complete. You can still use the same parsing -functions, only the initialization is a bit different. For example, call the -parser by: - - -let d = parse_document_entity default_config (from_file "doc.xml") spec - - -Note that the resulting document d has a usable type; -especially the print method we added is visible. So you can -print your document by - - -d # root # extension # print stdout - - - - -This object-oriented approach looks rather complicated; this is mostly caused -by working around some problems of the strict typing system of O'Caml. Some -auxiliary concepts such as extensions were needed, but the practical -consequences are low. In the next section, one of the examples of the -distribution is explained, a converter from readme -documents to HTML. - - - - - - - - - - Example: An HTML backend for the <emphasis>readme</emphasis> -DTD - - The converter from readme documents to HTML -documents follows strictly the approach to define one class per element -type. The HTML code is similar to the readme source, -because of this most elements can be converted in the following way: Given the -input element - - -content]]> - - -the conversion text is the concatenation of a computed prefix, the recursively -converted content, and a computed suffix. - - - -Only one element type cannot be handled by this scheme: -footnote. Footnotes are collected while they are found in -the input text, and they are printed after the main text has been converted and -printed. - - - - Header - -&readme.code.header; - - - - - Type declarations - -&readme.code.footnote-printer; - - - - - Class <literal>store</literal> - -The store is a container for footnotes. You can add a -footnote by invoking alloc_footnote; the argument is an -object of the class footnote_printer, the method returns the -number of the footnote. The interesting property of a footnote is that it can -be converted to HTML, so a footnote_printer is an object -with a method footnote_to_html. The class -footnote which is defined below has a compatible method -footnote_to_html such that objects created from it can be -used as footnote_printers. - - -The other method, print_footnotes prints the footnotes as -definition list, and is typically invoked after the main material of the page -has already been printed. Every item of the list is printed by -footnote_to_html. - - - -&readme.code.store; - - - - - Function <literal>escape_html</literal> - -This function converts the characters <, >, &, and " to their HTML -representation. For example, -escape_html "<>" = "&lt;&gt;". Other -characters are left unchanged. - -&readme.code.escape-html; - - - - - Virtual class <literal>shared</literal> - -This virtual class is the abstract superclass of the extension classes shown -below. It defines the standard methods clone, -node, and set_node, and declares the type -of the virtual method to_html. This method recursively -traverses the whole element tree, and prints the converted HTML code to the -output channel passed as second argument. The first argument is the reference -to the global store object which collects the footnotes. - -&readme.code.shared; - - - - - Class <literal>only_data</literal> - -This class defines to_html such that the character data of -the current node is converted to HTML. Note that self is an -extension object, self # node is the node object, and -self # node # data returns the character data of the node. - -&readme.code.only-data; - - - - - Class <literal>readme</literal> - -This class converts elements of type readme to HTML. Such an -element is (by definition) always the root element of the document. First, the -HTML header is printed; the title attribute of the element -determines the title of the HTML page. Some aspects of the HTML page can be -configured by setting certain parameter entities, for example the background -color, the text color, and link colors. After the header, the -body tag, and the headline have been printed, the contents -of the page are converted by invoking to_html on all -children of the current node (which is the root node). Then, the footnotes are -appended to this by telling the global store object to print -the footnotes. Finally, the end tags of the HTML pages are printed. - - - -This class is an example how to access the value of an attribute: The value is -determined by invoking self # node # attribute "title". As -this attribute has been declared as CDATA and as being required, the value has -always the form Value s where s is the -string value of the attribute. - - - -You can also see how entity contents can be accessed. A parameter entity object -can be looked up by self # node # dtd # par_entity "name", -and by invoking replacement_text the value of the entity -is returned after inner parameter and character entities have been -processed. Note that you must use gen_entity instead of -par_entity to access general entities. - - - -&readme.code.readme; - - - - - Classes <literal>section</literal>, <literal>sect1</literal>, -<literal>sect2</literal>, and <literal>sect3</literal> - -As the conversion process is very similar, the conversion classes of the three -section levels are derived from the more general section -class. The HTML code of the section levels only differs in the type of the -headline, and because of this the classes describing the section levels can be -computed by replacing the class argument the_tag of -section by the HTML name of the headline tag. - - - -Section elements are converted to HTML by printing a headline and then -converting the contents of the element recursively. More precisely, the first -sub-element is always a title element, and the other -elements are the contents of the section. This structure is declared in the -DTD, and it is guaranteed that the document matches the DTD. Because of this -the title node can be separated from the rest without any checks. - - - -Both the title node, and the body nodes are then converted to HTML by calling -to_html on them. - - - -&readme.code.section; - - - - - Classes <literal>map_tag</literal>, <literal>p</literal>, -<literal>em</literal>, <literal>ul</literal>, <literal>li</literal> - -Several element types are converted to HTML by simply mapping them to -corresponding HTML element types. The class map_tag -implements this, and the class argument the_target_tag -determines the tag name to map to. The output consists of the start tag, the -recursively converted inner elements, and the end tag. - -&readme.code.map-tag; - - - - - Class <literal>br</literal> - -Element of type br are mapped to the same HTML type. Note -that HTML forbids the end tag of br. - -&readme.code.br; - - - - - Class <literal>code</literal> - -The code type is converted to a pre -section (preformatted text). As the meaning of tabs is unspecified in HTML, -tabs are expanded to spaces. - -&readme.code.code; - - - - - Class <literal>a</literal> - -Hyperlinks, expressed by the a element type, are converted -to the HTML a type. If the target of the hyperlink is given -by href, the URL of this attribute can be used -directly. Alternatively, the target can be given by -readmeref in which case the ".html" suffix must be added to -the file name. - - - -Note that within a only #PCDATA is allowed, so the contents -can be converted directly by applying escape_html to the -character data contents. - -&readme.code.a; - - - - - Class <literal>footnote</literal> - -The footnote class has two methods: -to_html to convert the footnote reference to HTML, and -footnote_to_html to convert the footnote text itself. - - - -The footnote reference is converted to a local hyperlink; more precisely, to -two anchor tags which are connected with each other. The text anchor points to -the footnote anchor, and the footnote anchor points to the text anchor. - - - -The footnote must be allocated in the store object. By -allocating the footnote, you get the number of the footnote, and the text of -the footnote is stored until the end of the HTML page is reached when the -footnotes can be printed. The to_html method stores simply -the object itself, such that the footnote_to_html method is -invoked on the same object that encountered the footnote. - - - -The to_html only allocates the footnote, and prints the -reference anchor, but it does not print nor convert the contents of the -note. This is deferred until the footnotes actually get printed, i.e. the -recursive call of to_html on the sub nodes is done by -footnote_to_html. - - - -Note that this technique does not work if you make another footnote within a -footnote; the second footnote gets allocated but not printed. - - - -&readme.code.footnote; - - - - - The specification of the document model - -This code sets up the hash table that connects element types with the exemplars -of the extension classes that convert the elements to HTML. - -&readme.code.tag-map; - - - - - - - - - - - - The objects representing the document - - -This description might be out-of-date. See the module interface files -for updated information. - - - The <literal>document</literal> class - - - - object - method init_xml_version : string -> unit - method init_root : 'ext node -> unit - - method xml_version : string - method xml_standalone : bool - method dtd : dtd - method root : 'ext node - - method encoding : Pxp_types.rep_encoding - - method add_pinstr : proc_instruction -> unit - method pinstr : string -> proc_instruction list - method pinstr_names : string list - - method write : Pxp_types.output_stream -> Pxp_types.encoding -> unit - - end -;; -]]> - - -The methods beginning with init_ are only for internal use -of the parser. - - - - - -xml_version: returns the version string at the beginning of -the document. For example, "1.0" is returned if the document begins with -<?xml version="1.0"?>. - - - -xml_standalone: returns the boolean value of -standalone declaration in the XML declaration. If the -standalone attribute is missing, false is -returned. - - - -dtd: returns a reference to the global DTD object. - - - -root: returns a reference to the root element. - - - -encoding: returns the internal encoding of the -document. This means that all strings of which the document consists are -encoded in this character set. - - - - -pinstr: returns the processing instructions outside the DTD -and outside the root element. The argument passed to the method names a -target, and the method returns all instructions with this -target. The target is the first word inside <? and -?>. - - - -pinstr_names: returns the names of the processing instructions - - - -add_pinstr: adds another processing instruction. This method -is used by the parser itself to enter the instructions returned by -pinstr, but you can also enter additional instructions. - - - - -write: writes the document to the passed stream as XML -text using the passed (external) encoding. The generated text is always valid -XML and can be parsed by PXP; however, the text is badly formatted (this is not -a pretty printer). - - - - - - - - The class type <literal>node</literal> - - -From Pxp_document: - - -type node_type = - T_data -| T_element of string -| T_super_root -| T_pinstr of string -| T_comment -and some other, reserved types -;; - -class type [ 'ext ] node = - object ('self) - constraint 'ext = 'ext node #extension - - (* *) - - method extension : 'ext - method dtd : dtd - method parent : 'ext node - method root : 'ext node - method sub_nodes : 'ext node list - method iter_nodes : ('ext node &fun; unit) &fun; unit - method iter_nodes_sibl : - ('ext node option &fun; 'ext node &fun; 'ext node option &fun; unit) &fun; unit - method node_type : node_type - method encoding : Pxp_types.rep_encoding - method data : string - method position : (string * int * int) - method comment : string option - method pinstr : string &fun; proc_instruction list - method pinstr_names : string list - method write : Pxp_types.output_stream -> Pxp_types.encoding -> unit - - (* *) - - method attribute : string &fun; Pxp_types.att_value - method required_string_attribute : string &fun; string - method optional_string_attribute : string &fun; string option - method required_list_attribute : string &fun; string list - method optional_list_attribute : string &fun; string list - method attribute_names : string list - method attribute_type : string &fun; Pxp_types.att_type - method attributes : (string * Pxp_types.att_value) list - method id_attribute_name : string - method id_attribute_value : string - method idref_attribute_names : string - - (* *) - - method add_node : ?force:bool &fun; 'ext node &fun; unit - method add_pinstr : proc_instruction &fun; unit - method delete : unit - method set_nodes : 'ext node list &fun; unit - method quick_set_attributes : (string * Pxp_types.att_value) list &fun; unit - method set_comment : string option &fun; unit - - (* *) - - method orphaned_clone : 'self - method orphaned_flat_clone : 'self - method create_element : - ?position:(string * int * int) &fun; - dtd &fun; node_type &fun; (string * string) list &fun; - 'ext node - method create_data : dtd &fun; string &fun; 'ext node - method keep_always_whitespace_mode : unit - - (* *) - - method local_validate : ?use_dfa:bool -> unit -> unit - - (* ... Internal methods are undocumented. *) - - end -;; - - -In the module Pxp_types you can find another type -definition that is important in this context: - - -type Pxp_types.att_value = - Value of string - | Valuelist of string list - | Implied_value -;; - - - - - The structure of document trees - - -A node represents either an element or a character data section. There are two -classes implementing the two aspects of nodes: element_impl -and data_impl. The latter class does not implement all -methods because some methods do not make sense for data nodes. - - - -(Note: PXP also supports a mode which forces that processing instructions and -comments are represented as nodes of the document tree. However, these nodes -are instances of element_impl with node types -T_pinstr and T_comment, -respectively. This mode must be explicitly configured; the basic representation -knows only element and data nodes.) - - - The following figure -() shows an example how -a tree is constructed from element and data nodes. The circular areas -represent element nodes whereas the ovals denote data nodes. Only elements -may have subnodes; data nodes are always leaves of the tree. The subnodes -of an element can be either element or data nodes; in both cases the O'Caml -objects storing the nodes have the class type node. - - Attributes (the clouds in the picture) are not directly -integrated into the tree; there is always an extra link to the attribute -list. This is also true for processing instructions (not shown in the -picture). This means that there are separated access methods for attributes and -processing instructions. - -
-A tree with element nodes, data nodes, and attributes - -
- - Only elements, data sections, attributes and processing -instructions (and comments, if configured) can, directly or indirectly, occur -in the document tree. It is impossible to add entity references to the tree; if -the parser finds such a reference, not the reference as such but the referenced -text (i.e. the tree representing the structured text) is included in the -tree. - - Note that the parser collapses as much data material into one -data node as possible such that there are normally never two adjacent data -nodes. This invariant is enforced even if data material is included by entity -references or CDATA sections, or if a data sequence is interrupted by -comments. So a &amp; b <-- comment --> c <![CDATA[ -<> d]]> is represented by only one data node, for -instance. However, you can create document trees manually which break this -invariant; it is only the way the parser forms the tree. - - -
-Nodes are doubly linked trees - -
- - -The node tree has links in both directions: Every node has a link to its parent -(if any), and it has links to the subnodes (see -figure ). Obviously, -this doubly-linked structure simplifies the navigation in the tree; but has -also some consequences for the possible operations on trees. - - -Because every node must have at most one parent node, -operations are illegal if they violate this condition. The following figure -() shows on the left side -that node y is added to x as new subnode -which is allowed because y does not have a parent yet. The -right side of the picture illustrates what would happen if y -had a parent node; this is illegal because y would have two -parents after the operation. - -
-A node can only be added if it is a root - - -
- - -The "delete" operation simply removes the links between two nodes. In the -picture () the node -x is deleted from the list of subnodes of -y. After that, x becomes the root of the -subtree starting at this node. - -
-A deleted node becomes the root of the subtree - -
- - -It is also possible to make a clone of a subtree; illustrated in -. In this case, the -clone is a copy of the original subtree except that it is no longer a -subnode. Because cloning never keeps the connection to the parent, the clones -are called orphaned. - - -
-The clone of a subtree - -
-
- - - The methods of the class type <literal>node</literal> - - - - - <link linkend="type-node-general.sig">General observers</link> - - - - - - -extension: The reference to the extension object which -belongs to this node (see ...). - - - -dtd: Returns a reference to the global DTD. All nodes -of a tree must share the same DTD. - - - - -parent: Get the father node. Raises -Not_found in the case the node does not have a -parent, i.e. the node is the root. - - - -root: Gets the reference to the root node of the tree. -Every node is contained in a tree with a root, so this method always -succeeds. Note that this method searches the root, -which costs time proportional to the length of the path to the root. - - - - -sub_nodes: Returns references to the children. The returned -list reflects the order of the children. For data nodes, this method returns -the empty list. - - - - -iter_nodes f: Iterates over the children, and calls -f for every child in turn. - - - - -iter_nodes_sibl f: Iterates over the children, and calls -f for every child in turn. f gets as -arguments the previous node, the current node, and the next node. - - - -node_type: Returns either T_data which -means that the node is a data node, or T_element n -which means that the node is an element of type n. -If configured, possible node types are also T_pinstr t -indicating that the node represents a processing instruction with target -t, and T_comment in which case the node -is a comment. - - - - -encoding: Returns the encoding of the strings. - - - -data: Returns the character data of this node and all -children, concatenated as one string. The encoding of the string is what -the method encoding returns. -- For data nodes, this method simply returns the represented characters. -For elements, the meaning of the method has been extended such that it -returns something useful, i.e. the effectively contained characters, without -markup. (For T_pinstr and T_comment -nodes, the method returns the empty string.) - - - - -position: If configured, this method returns the position of -the element as triple (entity, line, byteposition). For data nodes, the -position is not stored. If the position is not available the triple -"?", 0, 0 is returned. - - - - -comment: Returns Some text for comment -nodes, and None for other nodes. The text -is everything between the comment delimiters <-- and --->. - - - - -pinstr n: Returns all processing instructions that are -directly contained in this element and that have a target -specification of n. The target is the first word after -the <?. - - - - -pinstr_names: Returns the list of all targets of processing -instructions directly contained in this element. - - - -write s enc: Prints the node and all subnodes to the passed -output stream as valid XML text, using the passed external encoding. - - - - - - - - - - <link linkend="type-node-atts.sig">Attribute observers</link> - - - - - -attribute n: Returns the value of the attribute with name -n. This method returns a value for every declared -attribute, and it raises Not_found for any undeclared -attribute. Note that it even returns a value if the attribute is actually -missing but is declared as #IMPLIED or has a default -value. - Possible values are: - - - -Implied_value: The attribute has been declared with the -keyword #IMPLIED, and the attribute is missing in the -attribute list of this element. - - - -Value s: The attribute has been declared as type -CDATA, as ID, as -IDREF, as ENTITY, or as -NMTOKEN, or as enumeration or notation, and one of the two -conditions holds: (1) The attribute value is present in the attribute list in -which case the value is returned in the string s. (2) The -attribute has been omitted, and the DTD declared the attribute with a default -value. The default value is returned in s. -- Summarized, Value s is returned for non-implied, non-list -attribute values. - - - - -Valuelist l: The attribute has been declared as type -IDREFS, as ENTITIES, or -as NMTOKENS, and one of the two conditions holds: (1) The -attribute value is present in the attribute list in which case the -space-separated tokens of the value are returned in the string list -l. (2) The attribute has been omitted, and the DTD declared -the attribute with a default value. The default value is returned in -l. -- Summarized, Valuelist l is returned for all list-type -attribute values. - - - - -Note that before the attribute value is returned, the value is normalized. This -means that newlines are converted to spaces, and that references to character -entities (i.e. &#n;) and -general entities -(i.e. &name;) are expanded; -if necessary, expansion is performed recursively. - - - -In well-formedness mode, there is no DTD which could declare an -attribute. Because of this, every occuring attribute is considered as a CDATA -attribute. - - - - -required_string_attribute n: returns the Value attribute -called n, or the Valuelist attribute as a string where the list elements -are separated by spaces. If the attribute value is implied, or if the -attribute does not exists, the method will fail. - This method is convenient -if you expect a non-implied and non-list attribute value. - - - - -optional_string_attribute n: returns the Value attribute -called n, or the Valuelist attribute as a string where the list elements -are separated by spaces. If the attribute value is implied, or if the -attribute does not exists, the method returns None. - This method is -convenient if you expect a non-list attribute value including the implied -value. - - - - -required_list_attribute n: returns the Valuelist attribute -called n, or the Value attribute as a list with a single element. -If the attribute value is implied, or if the -attribute does not exists, the method will fail. - This method is -convenient if you expect a list attribute value. - - - - -optional_list_attribute n: returns the Valuelist attribute -called n, or the Value attribute as a list with a single element. -If the attribute value is implied, or if the -attribute does not exists, an empty list will be returned. - This method -is convenient if you expect a list attribute value or the implied value. - - - - -attribute_names: returns the list of all attribute names of -this element. As this is a validating parser, this list is equal to the -list of declared attributes. - - - - -attribute_type n: returns the type of the attribute called -n. See the module Pxp_types for a -description of the encoding of the types. - - - - -attributes: returns the list of pairs of names and values -for all attributes of -this element. - - - -id_attribute_name: returns the name of the attribute that is -declared with type ID. There is at most one such attribute. The method raises -Not_found if there is no declared ID attribute for the -element type. - - - -id_attribute_value: returns the value of the attribute that -is declared with type ID. There is at most one such attribute. The method raises -Not_found if there is no declared ID attribute for the -element type. - - - -idref_attribute_names: returns the list of attribute names -that are declared as IDREF or IDREFS. - - - - - - - - - <link linkend="type-node-mods.sig">Modifying methods</link> - - - -The following methods are only defined for element nodes (more exactly: -the methods are defined for data nodes, too, but fail always). - - - - -add_node sn: Adds sub node sn to the list -of children. This operation is illustrated in the picture -. This method expects that -sn is a root, and it requires that sn and -the current object share the same DTD. - - -Because add_node is the method the parser itself uses -to add new nodes to the tree, it performs by default some simple validation -checks: If the content model is a regular expression, it is not allowed to add -data nodes to this node unless the new nodes consist only of whitespace. In -this case, the new data nodes are silently dropped (you can change this by -invoking keep_always_whitespace_mode). - - -If the document is flagged as stand-alone, these data nodes only -containing whitespace are even forbidden if the element declaration is -contained in an external entity. This case is detected and rejected. - -If the content model is EMPTY, it is not allowed to -add any data node unless the data node is empty. In this case, the new data -node is silently dropped. - - -These checks only apply if there is a DTD. In well-formedness mode, it is -assumed that every element is declared with content model -ANY which prohibits any validation check. Furthermore, you -turn these checks off by passing ~force:true as first -argument. - - - -add_pinstr pi: Adds the processing instruction -pi to the list of processing instructions. - - - - - -delete: Deletes this node from the tree. After this -operation, this node is no longer the child of the former father node; and the -node loses the connection to the father as well. This operation is illustrated -by the figure . - - - - -set_nodes nl: Sets the list of children to -nl. It is required that every member of nl -is a root, and that all members and the current object share the same DTD. -Unlike add_node, no validation checks are performed. - - - - -quick_set_attributes atts: sets the attributes of this -element to atts. It is not checked -whether atts matches the DTD or not; it is up to the -caller of this method to ensure this. (This method may be useful to transform -the attribute values, i.e. apply a mapping to every attribute.) - - - - -set_comment text: This method is only applicable to -T_comment nodes; it sets the comment text contained by such -nodes. - - - - - - - - - <link linkend="type-node-cloning.sig">Cloning methods</link> - - - - - - -orphaned_clone: Returns a clone of the node and the complete -tree below this node (deep clone). The clone does not have a parent (i.e. the -reference to the parent node is not cloned). While -copying the subtree, strings are skipped; it is likely that the original tree -and the copy tree share strings. Extension objects are cloned by invoking -the clone method on the original objects; how much of -the extension objects is cloned depends on the implemention of this method. - - This operation is illustrated by the figure -. - - - - -orphaned_flat_clone: Returns a clone of the node, -but sets the list of sub nodes to [], i.e. the sub nodes are not cloned. - - - - - -create_element dtd nt al: Returns a flat copy of this node -(which must be an element) with the following modifications: The DTD is set to -dtd; the node type is set to nt, and the -new attribute list is set to al (given as list of -(name,value) pairs). The copy does not have children nor a parent. It does not -contain processing instructions. See -the example below. - - - Note that you can specify the position of the new node -by the optional argument ~position. - - - - -create_data dtd cdata: Returns a flat copy of this node -(which must be a data node) with the following modifications: The DTD is set to -dtd; the node type is set to T_data; the -attribute list is empty (data nodes never have attributes); the list of -children and PIs is empty, too (same reason). The new node does not have a -parent. The value cdata is the new character content of the -node. See -the example below. - - - - -keep_always_whitespace_mode: Even data nodes which are -normally dropped because they only contain ignorable whitespace, can added to -this node once this mode is turned on. (This mode is useful to produce -canonical XML.) - - - - - - - - - - <link linkend="type-node-weird.sig">Validating methods</link> - - -There is one method which locally validates the node, i.e. checks whether the -subnodes match the content model of this node. - - - - -local_validate: Checks that this node conforms to the -DTD by comparing the type of the subnodes with the content model for this -node. (Applications need not call this method unless they add new nodes -themselves to the tree.) - - - - - - - - - The class <literal>element_impl</literal> - -This class is an implementation of node which -realizes element nodes: - - - [ 'ext ] node -]]> - - - - - Constructor - -You can create a new instance by - - -new element_impl extension_object - - -which creates a special form of empty element which already contains a -reference to the extension_object, but is -otherwise empty. This special form is called an -exemplar. The purpose of exemplars is that they serve as -patterns that can be duplicated and filled with data. The method - -create_element is designed to perform this action. - - - - - - Example - - First, create an exemplar by - - -let exemplar_ext = ... in -let exemplar = new element_impl exemplar_ext in - - -The exemplar is not used in node trees, but only as -a pattern when the element nodes are created: - - -let element = exemplar # create_element dtd (T_element name) attlist - - -The element is a copy of exemplar -(even the extension exemplar_ext has been copied) -which ensures that element and its extension are objects -of the same class as the exemplars; note that you need not to pass a -class name or other meta information. The copy is initially connected -with the dtd, it gets a node type, and the attribute list -is filled. The element is now fully functional; it can -be added to another element as child, and it can contain references to -subnodes. - - - - - - - The class <literal>data_impl</literal> - -This class is an implementation of node which -should be used for all character data nodes: - - - [ 'ext ] node -]]> - - - - - - Constructor - -You can create a new instance by - - -new data_impl extension_object - - -which creates an empty exemplar node which is connected to -extension_object. The node does not contain a -reference to any DTD, and because of this it cannot be added to node trees. - - - - To get a fully working data node, apply the method -create_data - to the exemplar (see example). - - - - - Example - - First, create an exemplar by - - -let exemplar_ext = ... in -let exemplar = new exemplar_ext data_impl in - - -The exemplar is not used in node trees, but only as -a pattern when the data nodes are created: - - -let data_node = exemplar # create_data dtd "The characters contained in the data node" - - -The data_node is a copy of exemplar. -The copy is initially connected -with the dtd, and it is filled with character material. -The data_node is now fully functional; it can -be added to an element as child. - - - - - - The type <literal>spec</literal> - -The type spec defines a way to handle the details of -creating nodes from exemplars. - - - ?comment_exemplar : 'ext node -> - ?default_pinstr_exemplar : 'ext node -> - ?pinstr_mapping : (string, 'ext node) Hashtbl.t -> - data_exemplar: 'ext node -> - default_element_exemplar: 'ext node -> - element_mapping: (string, 'ext node) Hashtbl.t -> - unit -> - 'ext spec - -val make_spec_from_alist : - ?super_root_exemplar : 'ext node -> - ?comment_exemplar : 'ext node -> - ?default_pinstr_exemplar : 'ext node -> - ?pinstr_alist : (string * 'ext node) list -> - data_exemplar: 'ext node -> - default_element_exemplar: 'ext node -> - element_alist: (string * 'ext node) list -> - unit -> - 'ext spec -]]> - -The two functions make_spec_from_mapping and -make_spec_from_alist create spec -values. Both functions are functionally equivalent and the only difference is -that the first function prefers hashtables and the latter associative lists to -describe mappings from names to exemplars. - - - -You can specify exemplars for the various kinds of nodes that need to be -generated when an XML document is parsed: - - - - ~super_root_exemplar: This exemplar -is used to create the super root. This special node is only created if the -corresponding configuration option has been selected; it is the parent node of -the root node which may be convenient if every working node must have a parent. - - - ~comment_exemplar: This exemplar is -used when a comment node must be created. Note that such nodes are only created -if the corresponding configuration option is "on". - - - - ~default_pinstr_exemplar: If a node -for a processing instruction must be created, and the instruction is not listed -in the table passed by ~pinstr_mapping or -~pinstr_alist, this exemplar is used. -Again the configuration option must be "on" in order to create such nodes at -all. - - - - ~pinstr_mapping or -~pinstr_alist: Map the target names of processing -instructions to exemplars. These mappings are only used when nodes for -processing instructions are created. - - - ~data_exemplar: The exemplar for -ordinary data nodes. - - - ~default_element_exemplar: This -exemplar is used if an element node must be created, but the element type -cannot be found in the tables element_mapping or -element_alist. - - - ~element_mapping or -~element_alist: Map the element types to exemplars. These -mappings are used to create element nodes. - - - -In most cases, you only want to create spec values to pass -them to the parser functions found in Pxp_yacc. However, it -might be useful to apply spec values directly. - - -The following functions create various types of nodes by selecting the -corresponding exemplar from the passed spec value, and by -calling create_element or create_data on -the exemplar. - - - dtd -> - (* data material: *) string -> - 'ext node - -val create_element_node : - ?position:(string * int * int) -> - 'ext spec -> - dtd -> - (* element type: *) string -> - (* attributes: *) (string * string) list -> - 'ext node - -val create_super_root_node : - ?position:(string * int * int) -> - 'ext spec -> - dtd -> - 'ext node - -val create_comment_node : - ?position:(string * int * int) -> - 'ext spec -> - dtd -> - (* comment text: *) string -> - 'ext node - -val create_pinstr_node : - ?position:(string * int * int) -> - 'ext spec -> - dtd -> - proc_instruction -> - 'ext node -]]> - - - - - Examples - - - Building trees. - - Here is the piece of code that creates the tree of -the figure . The extension -object and the DTD are beyond the scope of this example. - - -let exemplar_ext = ... (* some extension *) in -let dtd = ... (* some DTD *) in - -let element_exemplar = new element_impl exemplar_ext in -let data_exemplar = new data_impl exemplar_ext in - -let a1 = element_exemplar # create_element dtd (T_element "a") ["att", "apple"] -and b1 = element_exemplar # create_element dtd (T_element "b") [] -and c1 = element_exemplar # create_element dtd (T_element "c") [] -and a2 = element_exemplar # create_element dtd (T_element "a") ["att", "orange"] -in - -let cherries = data_exemplar # create_data dtd "Cherries" in -let orange = data_exemplar # create_data dtd "An orange" in - -a1 # add_node b1; -a1 # add_node c1; -b1 # add_node a2; -b1 # add_node cherries; -a2 # add_node orange; - - -Alternatively, the last block of statements could also be written as: - - -a1 # set_nodes [b1; c1]; -b1 # set_nodes [a2; cherries]; -a2 # set_nodes [orange]; - - -The root of the tree is a1, i.e. it is true that - - -x # root == a1 - - -for every x from { a1, a2, -b1, c1, cherries, -orange }. - - - -Furthermore, the following properties hold: - - - a1 # attribute "att" = Value "apple" -& a2 # attribute "att" = Value "orange" - -& cherries # data = "Cherries" -& orange # data = "An orange" -& a1 # data = "CherriesAn orange" - -& a1 # node_type = T_element "a" -& a2 # node_type = T_element "a" -& b1 # node_type = T_element "b" -& c1 # node_type = T_element "c" -& cherries # node_type = T_data -& orange # node_type = T_data - -& a1 # sub_nodes = [ b1; c1 ] -& a2 # sub_nodes = [ orange ] -& b1 # sub_nodes = [ a2; cherries ] -& c1 # sub_nodes = [] -& cherries # sub_nodes = [] -& orange # sub_nodes = [] - -& a2 # parent == a1 -& b1 # parent == b1 -& c1 # parent == a1 -& cherries # parent == b1 -& orange # parent == a2 - - - - Searching nodes. - - The following function searches all nodes of a tree -for which a certain condition holds: - - -let rec search p t = - if p t then - t :: search_list p (t # sub_nodes) - else - search_list p (t # sub_nodes) - -and search_list p l = - match l with - [] -> [] - | t :: l' -> (search p t) @ (search_list p l') -;; - - - - - For example, if you want to search all elements of a certain -type et, the function search can be -applied as follows: - - -let search_element_type et t = - search (fun x -> x # node_type = T_element et) t -;; - - - - - Getting attribute values. - - Suppose we have the declaration: - -]]> - - -In this case, every element e must have an attribute -a, otherwise the parser would indicate an error. If -the O'Caml variable n holds the node of the tree -corresponding to the element, you can get the value of the attribute -a by - - -let value_of_a = n # required_string_attribute "a" - - -which is more or less an abbreviation for - - s - | _ -> assert false]]> - - -- as the attribute is required, the attribute method always -returns a Value. - - - - In contrast to this, the attribute b can be -omitted. In this case, the method required_string_attribute -works only if the attribute is there, and the method will fail if the attribute -is missing. To get the value, you can apply the method -optional_string_attribute: - - -let value_of_b = n # optional_string_attribute "b" - - -Now, value_of_b is of type string option, -and None represents the omitted attribute. Alternatively, -you could also use attribute: - - Some s - | Implied_value -> None - | _ -> assert false]]> - - - - The attribute c behaves much like -a, because it has always a value. If the attribute is -omitted, the default, here "12345", will be returned instead. Because of this, -you can again use required_string_attribute to get the -value. - - - The type CDATA is the most general string -type. The types NMTOKEN, ID, -IDREF, ENTITY, and all enumerators and -notations are special forms of string types that restrict the possible -values. From O'Caml, they behave like CDATA, i.e. you can -use the methods required_string_attribute and -optional_string_attribute, too. - - - In contrast to this, the types NMTOKENS, -IDREFS, and ENTITIES mean lists of -strings. Suppose we have the declaration: - -]]> - - -The type NMTOKENS stands for lists of space-separated -tokens; for example the value "1 abc 23ef" means the list -["1"; "abc"; "23ef"]. (Again, IDREFS -and ENTITIES have more restricted values.) To get the -value of attribute d, one can use - - -let value_of_d = n # required_list_attribute "d" - - -or - - l - | _ -> assert false]]> - - -As d is required, the attribute cannot be omitted, and -the attribute method returns always a -Valuelist. - - - For optional attributes like e, apply - - -let value_of_e = n # optional_list_attribute "e" - - -or - - l - | Implied_value -> [] - | _ -> assert false]]> - - -Here, the case that the attribute is missing counts like the empty list. - - - - - - - Iterators - - There are also several iterators in Pxp_document; please see -the mli file for details. You can find examples for them in the -"simple_transformation" directory. - - - f:('ext node -> bool) -> 'ext node -> 'ext node - -val find_all : ?deeply:bool -> - f:('ext node -> bool) -> 'ext node -> 'ext node list - -val find_element : ?deeply:bool -> - string -> 'ext node -> 'ext node - -val find_all_elements : ?deeply:bool -> - string -> 'ext node -> 'ext node list - -exception Skip -val map_tree : pre:('exta node -> 'extb node) -> - ?post:('extb node -> 'extb node) -> - 'exta node -> - 'extb node - - -val map_tree_sibl : - pre: ('exta node option -> 'exta node -> 'exta node option -> - 'extb node) -> - ?post:('extb node option -> 'extb node -> 'extb node option -> - 'extb node) -> - 'exta node -> - 'extb node - -val iter_tree : ?pre:('ext node -> unit) -> - ?post:('ext node -> unit) -> - 'ext node -> - unit - -val iter_tree_sibl : - ?pre: ('ext node option -> 'ext node -> 'ext node option -> unit) -> - ?post:('ext node option -> 'ext node -> 'ext node option -> unit) -> - 'ext node -> - unit -]]> - - - -
- - - - - The class type <literal>extension</literal> - - - - unit - (* "set_node" is invoked once the extension is associated to a new - * node object. - *) - end -]]> - - -This is the type of classes used for node extensions. For every node of the -document tree, there is not only the node object, but also -an extension object. The latter has minimal -functionality; it has only the necessary methods to be attached to the node -object containing the details of the node instance. The extension object is -called extension because its purpose is extensibility. - - For some reasons, it is impossible to derive the -node classes (i.e. element_impl and -data_impl) such that the subclasses can be extended by new -new methods. But -subclassing nodes is a great feature, because it allows the user to provide -different classes for different types of nodes. The extension objects are a -workaround that is as powerful as direct subclassing, the costs are -some notation overhead. - - -
-The structure of nodes and extensions - - -
- - The picture shows how the nodes and extensions are linked -together. Every node has a reference to its extension, and every extension has -a reference to its node. The methods extension and -node follow these references; a typical phrase is - - -self # node # attribute "xy" - - -to get the value of an attribute from a method defined in the extension object; -or - - -self # node # iter - (fun n -> n # extension # my_method ...) - - -to iterate over the subnodes and to call my_method of the -corresponding extension objects. - - - Note that extension objects do not have references to subnodes -(or "subextensions") themselves; in order to get one of the children of an -extension you must first go to the node object, then get the child node, and -finally reach the extension that is logically the child of the extension you -started with. - - - How to define an extension class - - At minimum, you must define the methods -clone, node, and -set_node such that your class is compatible with the type -extension. The method set_node is called -during the initialization of the node, or after a node has been cloned; the -node object invokes set_node on the extension object to tell -it that this node is now the object the extension is linked to. The extension -must return the node object passed as argument of set_node -when the node method is called. - - The clone method must return a copy of the -extension object; at least the object itself must be duplicated, but if -required, the copy should deeply duplicate all objects and values that are -referred by the extension, too. Whether this is required, depends on the -application; clone is invoked by the node object when one of -its cloning methods is called. - - A good starting point for an extension class: - - -} - - method node = - match node with - None -> - assert false - | Some n -> n - - method set_node n = - node <- Some n - - end -]]> - - -This class is compatible with extension. The purpose of -defining such a class is, of course, adding further methods; and you can do it -without restriction. - - - Often, you want not only one extension class. In this case, -it is the simplest way that all your classes (for one kind of document) have -the same type (with respect to the interface; i.e. it does not matter if your -classes differ in the defined private methods and instance variables, but -public methods count). This approach avoids lots of coercions and problems with -type incompatibilities. It is simple to implement: - - - - - -If a class does not need a method (e.g. because it does not make sense, or it -would violate some important condition), it is possible to define the method -and to always raise an exception when the method is invoked -(e.g. assert false). - - - The latter is a strong recommendation: do not try to further -specialize the types of extension objects. It is difficult, sometimes even -impossible, and almost never worth-while. - - - - How to bind extension classes to element types - - Once you have defined your extension classes, you can bind them -to element types. The simplest case is that you have only one class and that -this class is to be always used. The parsing functions in the module -Pxp_yacc take a spec argument which -can be customized. If your single class has the name c, -this argument should be - - -let spec = - make_spec_from_alist - ~data_exemplar: (new data_impl c) - ~default_element_exemplar: (new element_impl c) - ~element_alist: [] - () - - -This means that data nodes will be created from the exemplar passed by -~data_exemplar and that all element nodes will be made from the exemplar -specified by ~default_element_exemplar. In ~element_alist, you can -pass that different exemplars are to be used for different element types; but -this is an optional feature. If you do not need it, pass the empty list. - - - -Remember that an exemplar is a (node, extension) pair that serves as pattern -when new nodes (and the corresponding extension objects) are added to the -document tree. In this case, the exemplar contains c as -extension, and when nodes are created, the exemplar is cloned, and cloning -makes also a copy of c such that all nodes of the document -tree will have a copy of c as extension. - - - The ~element_alist argument can bind -specific element types to specific exemplars; as exemplars may be instances of -different classes it is effectively possible to bind element types to -classes. For example, if the element type "p" is implemented by class "c_p", -and "q" is realized by "c_q", you can pass the following value: - - -let spec = - make_spec_from_alist - ~data_exemplar: (new data_impl c) - ~default_element_exemplar: (new element_impl c) - ~element_alist: - [ "p", new element_impl c_p; - "q", new element_impl c_q; - ] - () - - -The extension object c is still used for all data nodes and -for all other element types. - - - - -
- - - - - Details of the mapping from XML text to the tree representation - - - - The representation of character-free elements - - If an element declaration does not allow the element to -contain character data, the following rules apply. - - If the element must be empty, i.e. it is declared with the -keyword EMPTY, the element instance must be effectively -empty (it must not even contain whitespace characters). The parser guarantees -that a declared EMPTY element does never contain a data -node, even if the data node represents the empty string. - - If the element declaration only permits other elements to occur -within that element but not character data, it is still possible to insert -whitespace characters between the subelements. The parser ignores these -characters, too, and does not create data nodes for them. - - - Example. - - Consider the following element types: - - - - -]]> - -Only x may contain character data, the keyword -#PCDATA indicates this. The other types are character-free. - - - - The XML term - - -]]> - -will be internally represented by an element node for x -with three subnodes: the first z element, a data node -containing the space character, and the second z element. -In contrast to this, the term - - -]]> - -is represented by an element node for y with only -two subnodes, the two z elements. There -is no data node for the space character because spaces are ignored in the -character-free element y. - - - - - - The representation of character data - - The XML specification allows all Unicode characters in XML -texts. This parser can be configured such that UTF-8 is used to represent the -characters internally; however, the default character encoding is -ISO-8859-1. (Currently, no other encodings are possible for the internal string -representation; the type Pxp_types.rep_encoding enumerates -the possible encodings. Principially, the parser could use any encoding that is -ASCII-compatible, but there are currently only lexical analyzers for UTF-8 and -ISO-8859-1. It is currently impossible to use UTF-16 or UCS-4 as internal -encodings (or other multibyte encodings which are not ASCII-compatible) unless -major parts of the parser are rewritten - unlikely...) - - - -The internal encoding may be different from the external encoding (specified -in the XML declaration <?xml ... encoding="..."?>); in -this case the strings are automatically converted to the internal encoding. - - - -If the internal encoding is ISO-8859-1, it is possible that there are -characters that cannot be represented. In this case, the parser ignores such -characters and prints a warning (to the collect_warning -object that must be passed when the parser is called). - - - The XML specification allows lines to be separated by single LF -characters, by CR LF character sequences, or by single CR -characters. Internally, these separators are always converted to single LF -characters. - - The parser guarantees that there are never two adjacent data -nodes; if necessary, data material that would otherwise be represented by -several nodes is collapsed into one node. Note that you can still create node -trees with adjacent data nodes; however, the parser does not return such trees. - - - Note that CDATA sections are not represented specially; such -sections are added to the current data material that being collected for the -next data node. - - - - - The representation of entities within documents - - Entities are not represented within -documents! If the parser finds an entity reference in the document -content, the reference is immediately expanded, and the parser reads the -expansion text instead of the reference. - - - - - The representation of attributes As attribute -values are composed of Unicode characters, too, the same problems with the -character encoding arise as for character material. Attribute values are -converted to the internal encoding, too; and if there are characters that -cannot be represented, these are dropped, and a warning is printed. - - Attribute values are normalized before they are returned by -methods like attribute. First, any remaining entity -references are expanded; if necessary, expansion is performed recursively. -Second, newline characters (any of LF, CR LF, or CR characters) are converted -to single space characters. Note that especially the latter action is -prescribed by the XML standard (but is not converted -such that it is still possible to include line feeds into attributes). - - - - - The representation of processing instructions -Processing instructions are parsed to some extent: The first word of the -PI is called the target, and it is stored separated from the rest of the PI: - - -]]> - -The exact location where a PI occurs is not represented (by default). The -parser puts the PI into the object that represents the embracing construct (an -element, a DTD, or the whole document); that means you can find out which PIs -occur in a certain element, in the DTD, or in the whole document, but you -cannot lookup the exact position within the construct. - - - If you require the exact location of PIs, it is possible to -create extra nodes for them. This mode is controled by the option -enable_pinstr_nodes. The additional nodes have the node type -T_pinstr target, and are created -from special exemplars contained in the spec (see -pxp_document.mli). - - - - The representation of comments - -Normally, comments are not represented; they are dropped by -default. However, if you require them, it is possible to create -T_comment nodes for them. This mode can be specified by the -option enable_comment_nodes. Comment nodes are created from -special exemplars contained in the spec (see -pxp_document.mli). You can access the contents of comments through the -method comment. - - - - The attributes <literal>xml:lang</literal> and -<literal>xml:space</literal> - - These attributes are not supported specially; they are handled -like any other attribute. - - - - - And what about namespaces? - Currently, there is no special support for namespaces. -However, the parser allows it that the colon occurs in names such that it is -possible to implement namespaces on top of the current API. - - Some future release of PXP will support namespaces as built-in -feature... - - - - -
- - - - - Configuring and calling the parser - - - - - - - Overview - -There are the following main functions invoking the parser (in Pxp_yacc): - - - - parse_document_entity: You want to -parse a complete and closed document consisting of a DTD and the document body; -the body is validated against the DTD. This mode is interesting if you have a -file - - ... -]]> - -and you can accept any DTD that is included in the file (e.g. because the file -is under your control). - - - - parse_wfdocument_entity: You want to -parse a complete and closed document consisting of a DTD and the document body; -but the body is not validated, only checked for well-formedness. This mode is -preferred if validation costs too much time or if the DTD is missing. - - - - parse_dtd_entity: You want only to -parse an entity (file) containing the external subset of a DTD. Sometimes it is -interesting to read such a DTD, for example to compare it with the DTD included -in a document, or to apply the next mode: - - - - parse_content_entity: You want only to -parse an entity (file) containing a fragment of a document body; this fragment -is validated against the DTD you pass to the function. Especially, the fragment -must not have a <!DOCTYPE> clause, and must directly -begin with an element. The element is validated against the DTD. This mode is -interesting if you want to check documents against a fixed, immutable DTD. - - - - parse_wfcontent_entity: This function -also parses a single element without DTD, but does not validate it. - - - extract_dtd_from_document_entity: This -function extracts the DTD from a closed document consisting of a DTD and a -document body. Both the internal and the external subsets are extracted. - - - - - -In many cases, parse_document_entity is the preferred mode -to parse a document in a validating way, and -parse_wfdocument_entity is the mode of choice to parse a -file while only checking for well-formedness. - - - -There are a number of variations of these modes. One important application of a -parser is to check documents of an untrusted source against a fixed DTD. One -solution is to not allow the <!DOCTYPE> clause in -these documents, and treat the document like a fragment (using mode -parse_content_entity). This is very simple, but -inflexible; users of such a system cannot even define additional entities to -abbreviate frequent phrases of their text. - - - -It may be necessary to have a more intelligent checker. For example, it is also -possible to parse the document to check fully, i.e. with DTD, and to compare -this DTD with the prescribed one. In order to fully parse the document, mode -parse_document_entity is applied, and to get the DTD to -compare with mode parse_dtd_entity can be used. - - - -There is another very important configurable aspect of the parser: the -so-called resolver. The task of the resolver is to locate the contents of an -(external) entity for a given entity name, and to make the contents accessible -as a character stream. (Furthermore, it also normalizes the character set; -but this is a detail we can ignore here.) Consider you have a file called -"main.xml" containing - - -%sub; -]]> - -and a file stored in the subdirectory "sub" with name -"sub.xml" containing - - -%subsub; -]]> - -and a file stored in the subdirectory "subsub" of -"sub" with name "subsub.xml" (the -contents of this file do not matter). Here, the resolver must track that -the second entity subsub is located in the directory -"sub/subsub", i.e. the difficulty is to interpret the -system (file) names of entities relative to the entities containing them, -even if the entities are deeply nested. - - - -There is not a fixed resolver already doing everything right - resolving entity -names is a task that highly depends on the environment. The XML specification -only demands that SYSTEM entities are interpreted like URLs -(which is not very precise, as there are lots of URL schemes in use), hoping -that this helps overcoming the local peculiarities of the environment; the idea -is that if you do not know your environment you can refer to other entities by -denoting URLs for them. I think that this interpretation of -SYSTEM names may have some applications in the internet, but -it is not the first choice in general. Because of this, the resolver is a -separate module of the parser that can be exchanged by another one if -necessary; more precisely, the parser already defines several resolvers. - - - -The following resolvers do already exist: - - - - Resolvers reading from arbitrary input channels. These -can be configured such that a certain ID is associated with the channel; in -this case inner references to external entities can be resolved. There is also -a special resolver that interprets SYSTEM IDs as URLs; this resolver can -process relative SYSTEM names and determine the corresponding absolute URL. - - - - A resolver that reads always from a given O'Caml -string. This resolver is not able to resolve further names unless the string is -not associated with any name, i.e. if the document contained in the string -refers to an external entity, this reference cannot be followed in this -case. - - - A resolver for file names. The SYSTEM -name is interpreted as file URL with the slash "/" as separator for -directories. - This resolver is derived from the generic URL resolver. - - - -The interface a resolver must have is documented, so it is possible to write -your own resolver. For example, you could connect the parser with an HTTP -client, and resolve URLs of the HTTP namespace. The resolver classes support -that several independent resolvers are combined to one more powerful resolver; -thus it is possible to combine a self-written resolver with the already -existing resolvers. - - - -Note that the existing resolvers only interpret SYSTEM -names, not PUBLIC names. If it helps you, it is possible to -define resolvers for PUBLIC names, too; for example, such a -resolver could look up the public name in a hash table, and map it to a system -name which is passed over to the existing resolver for system names. It is -relatively simple to provide such a resolver. - - - - - - - Resolvers and sources - - - Using the built-in resolvers (called sources) - - The type source enumerates the two -possibilities where the document to parse comes from. - - -type source = - Entity of ((dtd -> Pxp_entity.entity) * Pxp_reader.resolver) - | ExtID of (ext_id * Pxp_reader.resolver) - - -You normally need not to worry about this type as there are convenience -functions that create source values: - - - - - from_file s: The document is read from -file s; you may specify absolute or relative path names. -The file name must be encoded as UTF-8 string. - - -There is an optional argument ~system_encoding -specifying the character encoding which is used for the names of the file -system. For example, if this encoding is ISO-8859-1 and s is -also a ISO-8859-1 string, you can form the source: - - - - - -This source has the advantage that -it is able to resolve inner external entities; i.e. if your document includes -data from another file (using the SYSTEM attribute), this -mode will find that file. However, this mode cannot resolve -PUBLIC identifiers nor SYSTEM identifiers -other than "file:". - - - - from_channel ch: The document is read -from the channel ch. In general, this source also supports -file URLs found in the document; however, by default only absolute URLs are -understood. It is possible to associate an ID with the channel such that the -resolver knows how to interpret relative URLs: - - -from_channel ~id:(System "file:///dir/dir1/") ch - - -There is also the ~system_encoding argument specifying how file names are -encoded. - The example from above can also be written (but it is no -longer possible to interpret relative URLs because there is no ~id argument, -and computing this argument is relatively complicated because it must -be a valid URL): - - -let ch = open_in s in -let src = from_channel ~system_encoding:`Enc_iso88591 ch in -...; -close_in ch - - - - - from_string s: The string -s is the document to parse. This mode is not able to -interpret file names of SYSTEM clauses, nor it can look up -PUBLIC identifiers. - - Normally, the encoding of the string is detected as usual -by analyzing the XML declaration, if any. However, it is also possible to -specify the encoding directly: - - -let src = from_string ~fixenc:`ISO-8859-2 s - - - - - ExtID (id, r): The document to parse -is denoted by the identifier id (either a -SYSTEM or PUBLIC clause), and this -identifier is interpreted by the resolver r. Use this mode -if you have written your own resolver. - Which character sets are possible depends on the passed -resolver r. - - - Entity (get_entity, r): The document -to parse is returned by the function invocation get_entity -dtd, where dtd is the DTD object to use (it may be -empty). Inner external references occuring in this entity are resolved using -the resolver r. - Which character sets are possible depends on the passed -resolver r. - - - - - - - The resolver API - - A resolver is an object that can be opened like a file, but you -do not pass the file name to the resolver, but the XML identifier of the entity -to read from (either a SYSTEM or PUBLIC -clause). When opened, the resolver must return the -Lexing.lexbuf that reads the characters. The resolver can -be closed, and it can be cloned. Furthermore, it is possible to tell the -resolver which character set it should assume. - The following from Pxp_reader: - - unit - method init_warner : collect_warnings -> unit - method rep_encoding : rep_encoding - method open_in : ext_id -> Lexing.lexbuf - method close_in : unit - method change_encoding : string -> unit - method clone : resolver - method close_all : unit - end -]]> - -The resolver object must work as follows: - - - - - When the parser is called, it tells the resolver the -warner object and the internal encoding by invoking -init_warner and init_rep_encoding. The -resolver should store these values. The method rep_encoding -should return the internal encoding. - - - - If the parser wants to read from the resolver, it invokes -the method open_in. Either the resolver succeeds, in which -case the Lexing.lexbuf reading from the file or stream must -be returned, or opening fails. In the latter case the method implementation -should raise an exception (see below). - - - If the parser finishes reading, it calls the -close_in method. - - - If the parser finds a reference to another external -entity in the input stream, it calls clone to get a second -resolver which must be initially closed (not yet connected with an input -stream). The parser then invokes open_in and the other -methods as described. - - - If you already know the character set of the input -stream, you should recode it to the internal encoding, and define the method -change_encoding as an empty method. - - - If you want to support multiple external character sets, -the object must follow a much more complicated protocol. Directly after -open_in has been called, the resolver must return a lexical -buffer that only reads one byte at a time. This is only possible if you create -the lexical buffer with Lexing.from_function; the function -must then always return 1 if the EOF is not yet reached, and 0 if EOF is -reached. If the parser has read the first line of the document, it will invoke -change_encoding to tell the resolver which character set to -assume. From this moment, the object can return more than one byte at once. The -argument of change_encoding is either the parameter of the -"encoding" attribute of the XML declaration, or the empty string if there is -not any XML declaration or if the declaration does not contain an encoding -attribute. - - At the beginning the resolver must only return one -character every time something is read from the lexical buffer. The reason for -this is that you otherwise would not exactly know at which position in the -input stream the character set changes. - - If you want automatic recognition of the character set, -it is up to the resolver object to implement this. - - - If an error occurs, the parser calls the method -close_all for the top-level resolver; this method should -close itself (if not already done) and all clones. - - - - Exceptions - -It is possible to chain resolvers such that when the first resolver is not able -to open the entity, the other resolvers of the chain are tried in turn. The -method open_in should raise the exception -Not_competent to indicate that the next resolver should try -to open the entity. If the resolver is able to handle the ID, but some other -error occurs, the exception Not_resolvable should be raised -to force that the chain breaks. - - - - Example: How to define a resolver that is equivalent to -from_string: ... - - - - - Predefined resolver components - -There are some classes in Pxp_reader that define common resolver behaviour. - - - ?fixenc:encoding -> - ?auto_close:bool -> - in_channel -> - resolver -]]> - -Reads from the passed channel (it may be even a pipe). If the -~id argument is passed to the object, the created resolver -accepts only this ID. Otherwise all IDs are accepted. - Once the resolver has -been cloned, it does not accept any ID. This means that this resolver cannot -handle inner references to external entities. Note that you can combine this -resolver with another resolver that can handle inner references (such as -resolve_as_file); see class 'combine' below. - If you pass the -~fixenc argument, the encoding of the channel is set to the -passed value, regardless of any auto-recognition or any XML declaration. - If -~auto_close = true (which is the default), the channel is -closed after use. If ~auto_close = false, the channel is -left open. - - - - - channel_of_id:(ext_id -> (in_channel * encoding option)) -> - resolver -]]> - -This resolver calls the function ~channel_of_id to open a -new channel for the passed ext_id. This function must either -return the channel and the encoding, or it must fail with Not_competent. The -function must return None as encoding if the default -mechanism to recognize the encoding should be used. It must return -Some e if it is already known that the encoding of the -channel is e. If ~auto_close = true -(which is the default), the channel is closed after use. If -~auto_close = false, the channel is left open. - - - - - ?auto_close:bool -> - url_of_id:(ext_id -> Neturl.url) -> - channel_of_url:(Neturl.url -> (in_channel * encoding option)) -> - resolver -]]> - -When this resolver gets an ID to read from, it calls the function -~url_of_id to get the corresponding URL. This URL may be a -relative URL; however, a URL scheme must be used which contains a path. The -resolver converts the URL to an absolute URL if necessary. The second -function, ~channel_of_url, is fed with the absolute URL as -input. This function opens the resource to read from, and returns the channel -and the encoding of the resource. - - -Both functions, ~url_of_id and -~channel_of_url, can raise Not_competent to indicate that -the object is not able to read from the specified resource. However, there is a -difference: A Not_competent from ~url_of_id is left as it -is, but a Not_competent from ~channel_of_url is converted to -Not_resolvable. So only ~url_of_id decides which URLs are -accepted by the resolver and which not. - - -The function ~channel_of_url must return -None as encoding if the default mechanism to recognize the -encoding should be used. It must return Some e if it is -already known that the encoding of the channel is e. - - -If ~auto_close = true (which is the default), the channel is -closed after use. If ~auto_close = false, the channel is -left open. - - -Objects of this class contain a base URL relative to which relative URLs are -interpreted. When creating a new object, you can specify the base URL by -passing it as ~base_url argument. When an existing object is -cloned, the base URL of the clone is the URL of the original object. - Note -that the term "base URL" has a strict definition in RFC 1808. - - - - - ?fixenc:encoding -> - string -> - resolver -]]> - -Reads from the passed string. If the ~id argument is passed -to the object, the created resolver accepts only this ID. Otherwise all IDs are -accepted. - Once the resolver has been cloned, it does not accept any ID. This -means that this resolver cannot handle inner references to external -entities. Note that you can combine this resolver with another resolver that -can handle inner references (such as resolve_as_file); see class 'combine' -below. - If you pass the ~fixenc argument, the encoding of -the string is set to the passed value, regardless of any auto-recognition or -any XML declaration. - - - - (string * encoding option)) -> - resolver -]]> - -This resolver calls the function ~string_of_id to get the -string for the passed ext_id. This function must either -return the string and the encoding, or it must fail with Not_competent. The -function must return None as encoding if the default -mechanism to recognize the encoding should be used. It must return -Some e if it is already known that the encoding of the -string is e. - - - - - ?host_prefix:[ `Not_recognized | `Allowed | `Required ] -> - ?system_encoding:encoding -> - ?url_of_id:(ext_id -> Neturl.url) -> - ?channel_of_url: (Neturl.url -> (in_channel * encoding option)) -> - unit -> - resolver -]]> -Reads from the local file system. Every file name is interpreted as -file name of the local file system, and the referred file is read. - - -The full form of a file URL is: file://host/path, where -'host' specifies the host system where the file identified 'path' -resides. host = "" or host = "localhost" are accepted; other values -will raise Not_competent. The standard for file URLs is -defined in RFC 1738. - - -Option ~file_prefix: Specifies how the "file:" prefix of -file names is handled: - - - `Not_recognized:The prefix is not -recognized. - - - `Allowed: The prefix is allowed but -not required (the default). - - - `Required: The prefix is -required. - - - - -Option ~host_prefix: Specifies how the "//host" phrase of -file names is handled: - - - `Not_recognized:The prefix is not -recognized. - - - `Allowed: The prefix is allowed but -not required (the default). - - - `Required: The prefix is -required. - - - - -Option ~system_encoding: Specifies the encoding of file -names of the local file system. Default: UTF-8. - - -Options ~url_of_id, ~channel_of_url: Not -for the casual user! - - - - - resolver list -> - resolver -]]> - -Combines several resolver objects. If a concrete entity with an -ext_id is to be opened, the combined resolver tries the -contained resolvers in turn until a resolver accepts opening the entity -(i.e. it does not raise Not_competent on open_in). - - -Clones: If the 'clone' method is invoked before 'open_in', all contained -resolvers are cloned separately and again combined. If the 'clone' method is -invoked after 'open_in' (i.e. while the resolver is open), additionally the -clone of the active resolver is flagged as being preferred, i.e. it is tried -first. - - - - - - - The DTD classes Sorry, not yet -written. Perhaps the interface definition of Pxp_dtd expresses the same: - - -&markup-dtd1.mli;&markup-dtd2.mli; - - - - - Invoking the parser - - Here a description of Pxp_yacc. - - - Defaults - The following defaults are available: - - -val default_config : config -val default_extension : ('a node extension) as 'a -val default_spec : ('a node extension as 'a) spec - - - - - - Parsing functions - In the following, the term "closed document" refers to -an XML structure like - - -<!DOCTYPE ... [ declarations ] > -<root> -... -</root> - - -The term "fragment" refers to an XML structure like - - -<root> -... -</root> - - -i.e. only to one isolated element instance. - - - - source -> dtd -]]> - -Parses the declarations which are contained in the entity, and returns them as -dtd object. - - - - source -> dtd -]]> - -Extracts the DTD from a closed document. Both the internal and the external -subsets are extracted and combined to one dtd object. This -function does not parse the whole document, but only the parts that are -necessary to extract the DTD. - - - - dtd) -> - ?id_index:('ext index) -> - config -> - source -> - 'ext spec -> - 'ext document -]]> - -Parses a closed document and validates it against the DTD that is contained in -the document (internal and external subsets). The option -~transform_dtd can be used to transform the DTD in the -document, and to use the transformed DTD for validation. If -~id_index is specified, an index of all ID attributes is -created. - - - - - source -> - 'ext spec -> - 'ext document -]]> - -Parses a closed document, but checks it only on well-formedness. - - - - - config -> - source -> - dtd -> - 'ext spec -> - 'ext node -]]> - -Parses a fragment, and validates the element. - - - - - source -> - 'ext spec -> - 'ext node -]]> - -Parses a fragment, but checks it only on well-formedness. - - - - - Configuration options - - - - - - warner:The parser prints -warnings by invoking the method warn for this warner -object. (Default: all warnings are dropped) - - errors_with_line_numbers:If -true, errors contain line numbers; if false, errors contain only byte -positions. The latter mode is faster. (Default: true) - - enable_pinstr_nodes:If true, -the parser creates extra nodes for processing instructions. If false, -processing instructions are simply added to the element or document surrounding -the instructions. (Default: false) - - enable_super_root_node:If -true, the parser creates an extra node which is the parent of the root of the -document tree. This node is called super root; it is an element with type -T_super_root. - If there are processing instructions outside -the root element and outside the DTD, they are added to the super root instead -of the document. - If false, the super root node is not created. (Default: -false) - - enable_comment_nodes:If true, -the parser creates nodes for comments with type T_comment; -if false, such nodes are not created. (Default: false) - - encoding:Specifies the -internal encoding of the parser. Most strings are then represented according to -this encoding; however there are some exceptions (especially -ext_id values which are always UTF-8 encoded). -(Default: `Enc_iso88591) - - -recognize_standalone_declaration: If true and if the parser is -validating, the standalone="yes" declaration forces that it -is checked whether the document is a standalone document. - If false, or if the -parser is in well-formedness mode, such declarations are ignored. -(Default: true) - - - store_element_positions: If -true, for every non-data node the source position is stored. If false, the -position information is lost. If available, you can get the positions of nodes -by invoking the position method. -(Default: true) - - idref_pass:If true and if -there is an ID index, the parser checks whether every IDREF or IDREFS attribute -refer to an existing node; this requires that the parser traverses the whole -doument tree. If false, this check is left out. (Default: false) - - validate_by_dfa:If true and if -the content model for an element type is deterministic, a deterministic finite -automaton is used to validate whether the element contents match the content -model of the type. If false, or if a DFA is not available, a backtracking -algorithm is used for validation. (Default: true) - - - -accept_only_deterministic_models: If true, only deterministic content -models are accepted; if false, any syntactically correct content models can be -processed. (Default: true) - - - - - - Which configuration should I use? - First, I recommend to vary the default configuration instead of -creating a new configuration record. For instance, to set -idref_pass to true, change the default -as in: - -let config = { default_config with idref_pass = true } - -The background is that I can add more options to the record in future versions -of the parser without breaking your programs. - - - Do I need extra nodes for processing instructions? -By default, such nodes are not created. This does not mean that the -processing instructions are lost; however, you cannot find out the exact -location where they occur. For example, the following XML text - - -]]> - -will normally create one element node for x containing -one subnode for y. The processing -instructions are attached to x in a separate hash table; you -can access them using x # pinstr "pi1" and x # -pinstr "pi2", respectively. The information is lost where the -instructions occur within x. - - - - If the option enable_pinstr_nodes is -turned on, the parser creates extra nodes pi1 and -pi2 such that the subnodes of x are now: - - - -The extra nodes contain the processing instructions in the usual way, i.e. you -can access them using pi1 # pinstr "pi1" and pi2 # -pinstr "pi2", respectively. - - - Note that you will need an exemplar for the PI nodes (see -make_spec_from_alist). - - - Do I need a super root node? - By default, there is no super root node. The -document object refers directly to the node representing the -root element of the document, i.e. - - - -if r is the root node. This is sometimes inconvenient: (1) -Some algorithms become simpler if every node has a parent, even the root -node. (2) Some standards such as XPath call the "root node" the node whose -child represents the root of the document. (3) The super root node can serve -as a container for processing instructions outside the root element. Because of -these reasons, it is possible to create an extra super root node, whose child -is the root node: - - - -When extra nodes are also created for processing instructions, these nodes can -be added to the super root node if they occur outside the root element (reason -(3)), and the order reflects the order in the source text. - - - Note that you will need an exemplar for the super root node -(see make_spec_from_alist). - - - What is the effect of the UTF-8 encoding? - By default, the parser represents strings (with few -exceptions) as ISO-8859-1 strings. These are well-known, and there are tools -and fonts for this encoding. - - However, internationalization may require that you switch over -to UTF-8 encoding. In most environments, the immediate effect will be that you -cannot read strings with character codes >= 160 any longer; your terminal will -only show funny glyph combinations. It is strongly recommended to install -Unicode fonts (GNU Unifont, - -Markus Kuhn's fonts) and terminal emulators -that can handle UTF-8 byte sequences. Furthermore, a Unicode editor may -be helpful (such as Yudit). There are -also FAQ by -Markus Kuhn. - - By setting encoding to -`Enc_utf8 all strings originating from the parsed XML -document are represented as UTF-8 strings. This includes not only character -data and attribute values but also element names, attribute names and so on, as -it is possible to use any Unicode letter to form such names. Strictly -speaking, PXP is only XML-compliant if the UTF-8 mode is used; otherwise it -will have difficulties when validating documents containing -non-ISO-8859-1-names. - - - This mode does not have any impact on the external -representation of documents. The character set assumed when reading a document -is set in the XML declaration, and character set when writing a document must -be passed to the write method. - - - - How do I check that nodes exist which are referred by IDREF attributes? - First, you must create an index of all occurring ID -attributes: - - - -This index must be passed to the parsing function: - - index) - config source spec -]]> - -Next, you must turn on the idref_pass mode: - - - -Note that now the whole document tree will be traversed, and every node will be -checked for IDREF and IDREFS attributes. If the tree is big, this may take some -time. - - - - - What are deterministic content models? - These type of models can speed up the validation checks; -furthermore they ensure SGML-compatibility. In particular, a content model is -deterministic if the parser can determine the actually used alternative by -inspecting only the current token. For example, this element has -non-deterministic contents: - - -]]> - -If the first element in x is u, the -parser does not know which of the alternatives (u,v) or -(u,y+) will work; the parser must also inspect the second -element to be able to distinguish between the alternatives. Because such -look-ahead (or "guessing") is required, this example is -non-deterministic. - - - The XML standard demands that content models must be -deterministic. So it is recommended to turn the option -accept_only_deterministic_models on; however, PXP can also -process non-deterministic models using a backtracking algorithm. - - Deterministic models ensure that validation can be performed in -linear time. In order to get the maximum benefits, PXP also implements a -special validator that profits from deterministic models; this is the -deterministic finite automaton (DFA). This validator is enabled per element -type if the element type has a deterministic model and if the option -validate_by_dfa is turned on. - - In general, I expect that the DFA method is faster than the -backtracking method; especially in the worst case the DFA takes only linear -time. However, if the content model has only few alternatives and the -alternatives do not nest, the backtracking algorithm may be better. - - - - - - - - - Updates - - Some (often later added) features that are otherwise -not explained in the manual but worth to be mentioned. - - - Methods node_position, node_path, nth_node, -previous_node, next_node for nodes: See pxp_document.mli - - Functions to determine the document order of nodes: -compare, create_ord_index, ord_number, ord_compare: See pxp_document.mli - - - - - - - - - diff --git a/helm/DEVEL/pxp/pxp/doc/manual/src/pic/extension_general.fig b/helm/DEVEL/pxp/pxp/doc/manual/src/pic/extension_general.fig deleted file mode 100644 index 445095f07..000000000 --- a/helm/DEVEL/pxp/pxp/doc/manual/src/pic/extension_general.fig +++ /dev/null @@ -1,47 +0,0 @@ -#FIG 3.2 -Portrait -Center -Metric -A4 -100.00 -Single --2 -1200 2 -1 3 0 1 0 7 100 0 15 0.000 1 0.0000 1575 2250 229 229 1575 2250 1800 2295 -1 3 0 1 0 7 100 0 15 0.000 1 0.0000 1575 3375 225 225 1575 3375 1800 3375 -1 3 0 1 0 7 100 0 15 0.000 1 0.0000 675 3375 229 229 675 3375 900 3420 -1 3 0 1 0 7 100 0 15 0.000 1 0.0000 2475 3375 229 229 2475 3375 2700 3420 -1 3 0 1 0 7 100 0 10 0.000 1 0.0000 3600 2475 180 180 3600 2475 3780 2475 -1 3 0 1 0 7 100 0 10 0.000 1 0.0000 2880 2475 180 180 2880 2475 3060 2475 -1 3 0 1 0 7 100 0 10 0.000 1 0.0000 4320 2475 186 186 4320 2475 4500 2520 -1 3 0 1 0 7 100 0 10 0.000 1 0.0000 3600 1485 186 186 3600 1485 3780 1530 -2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2 - 675 3150 1395 2385 -2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2 - 1575 2475 1575 3150 -2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2 - 1755 2385 2475 3150 -2 1 1 1 0 7 100 0 -1 4.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 1537 2010 3412 1462 -2 1 1 1 0 7 100 0 -1 4.000 0 0 -1 1 0 2 - 0 0 1.00 60.00 120.00 - 3412 1537 1672 2047 -2 1 1 1 0 7 100 0 -1 4.000 0 0 -1 1 1 2 - 0 0 1.00 60.00 120.00 - 0 0 1.00 60.00 120.00 - 810 3195 2707 2512 -2 1 1 1 0 7 100 0 -1 4.000 0 0 -1 1 1 2 - 0 0 1.00 60.00 120.00 - 0 0 1.00 60.00 120.00 - 1740 3217 3442 2580 -2 1 1 1 0 7 100 0 -1 4.000 0 0 -1 1 1 2 - 0 0 1.00 60.00 120.00 - 0 0 1.00 60.00 120.00 - 2640 3210 4177 2610 -4 0 0 80 0 14 12 0.0000 4 75 105 3555 1530 x\001 -4 0 0 80 0 14 12 0.0000 4 75 105 1530 2295 n\001 -4 0 0 80 0 12 12 0.2967 4 135 1365 1658 1950 n # extension\001 -4 0 0 80 0 12 12 0.2967 4 135 840 2475 1950 x # node\001 -4 0 0 80 0 16 12 0.0000 4 135 1140 1020 4050 The node tree\001 -4 0 0 80 0 16 12 0.0000 4 135 1245 3225 3285 The extensions\001 diff --git a/helm/DEVEL/pxp/pxp/doc/manual/src/pic/node_add.fig b/helm/DEVEL/pxp/pxp/doc/manual/src/pic/node_add.fig deleted file mode 100644 index 071683488..000000000 --- a/helm/DEVEL/pxp/pxp/doc/manual/src/pic/node_add.fig +++ /dev/null @@ -1,107 +0,0 @@ -#FIG 3.2 -Portrait -Center -Metric -A4 -100.00 -Single --2 -1200 2 -1 1 0 1 0 7 100 0 15 0.000 1 0.0000 6141 1350 242 229 6141 1350 6379 1395 -1 1 0 1 0 7 100 0 15 0.000 1 0.0000 6141 2250 242 229 6141 2250 6379 2295 -1 1 0 1 0 7 100 0 15 0.000 1 0.0000 5426 2250 242 229 5426 2250 5665 2295 -1 1 0 1 0 7 100 0 15 0.000 1 0.0000 6856 2250 242 229 6856 2250 7094 2295 -1 1 0 1 0 7 100 0 15 0.000 1 0.0000 7571 2925 242 229 7571 2925 7809 2970 -1 1 0 1 0 7 100 0 15 0.000 1 0.0000 8524 2925 242 229 8524 2925 8762 2970 -1 1 0 1 0 7 100 0 15 0.000 1 0.0000 8047 2250 242 229 8047 2250 8285 2295 -1 1 0 1 0 7 100 0 15 0.000 1 0.0000 1866 1350 242 229 1866 1350 2104 1395 -1 1 0 1 0 7 100 0 15 0.000 1 0.0000 1866 2250 242 229 1866 2250 2104 2295 -1 1 0 1 0 7 100 0 15 0.000 1 0.0000 1151 2250 242 229 1151 2250 1390 2295 -1 1 0 1 0 7 100 0 15 0.000 1 0.0000 2581 2250 242 229 2581 2250 2819 2295 -1 1 0 1 0 7 100 0 15 0.000 1 0.0000 3296 2925 242 229 3296 2925 3534 2970 -1 1 0 1 0 7 100 0 15 0.000 1 0.0000 4249 2925 242 229 4249 2925 4487 2970 -1 1 0 1 0 7 100 0 15 0.000 1 0.0000 3772 2250 242 229 3772 2250 4010 2295 -1 1 0 1 0 7 100 0 15 0.000 1 0.0000 8325 1350 242 229 8325 1350 8563 1395 -2 1 0 1 0 7 100 0 15 0.000 0 0 -1 1 0 2 - 1 1 1.00 61.76 123.53 - 5910 1440 5402 2017 -2 1 0 1 0 7 100 0 15 0.000 0 0 -1 1 0 2 - 1 1 1.00 61.76 123.53 - 6109 1590 6101 2025 -2 1 0 1 0 7 100 0 15 0.000 0 0 -1 1 0 2 - 1 1 1.00 61.76 123.53 - 6307 1537 6697 2070 -2 1 0 1 0 7 100 0 15 0.000 0 0 -1 1 0 2 - 1 1 1.00 61.76 123.53 - 7832 2347 7602 2692 -2 1 0 1 0 7 100 0 15 0.000 0 0 -1 1 0 2 - 1 1 1.00 61.76 123.53 - 8150 2452 8349 2752 -2 1 0 1 0 7 100 0 15 0.000 0 0 -1 1 0 2 - 1 0 1.00 61.76 123.53 - 5490 2017 5958 1492 -2 1 0 1 0 7 100 0 15 0.000 0 0 -1 1 0 2 - 1 0 1.00 61.76 123.53 - 6164 2010 6173 1575 -2 1 0 1 0 7 100 0 15 0.000 0 0 -1 1 0 2 - 1 0 1.00 61.76 123.53 - 6768 2025 6355 1470 -2 1 0 1 0 7 100 0 15 0.000 0 0 -1 1 0 2 - 1 0 1.00 61.76 123.53 - 7673 2715 7880 2415 -2 1 0 1 0 7 100 0 15 0.000 0 0 -1 1 0 2 - 1 0 1.00 61.76 123.53 - 8412 2707 8222 2415 -2 1 1 1 0 7 95 0 15 4.000 0 0 -1 0 0 2 - 6387 1372 8023 2017 -2 2 0 1 0 7 95 0 -1 0.000 0 0 -1 0 0 5 - 4950 900 9000 900 9000 3375 4950 3375 4950 900 -2 1 0 1 0 7 100 0 15 0.000 0 0 -1 1 0 2 - 1 1 1.00 61.75 123.51 - 1635 1440 1127 2017 -2 1 0 1 0 7 100 0 15 0.000 0 0 -1 1 0 2 - 1 1 1.00 61.75 123.51 - 1834 1590 1826 2025 -2 1 0 1 0 7 100 0 15 0.000 0 0 -1 1 0 2 - 1 1 1.00 61.75 123.51 - 2032 1537 2422 2070 -2 1 0 1 0 7 100 0 15 0.000 0 0 -1 1 0 2 - 1 1 1.00 61.75 123.51 - 3557 2347 3327 2692 -2 1 0 1 0 7 100 0 15 0.000 0 0 -1 1 0 2 - 1 1 1.00 61.75 123.51 - 3875 2452 4074 2752 -2 1 0 1 0 7 100 0 15 0.000 0 0 -1 1 0 2 - 1 0 1.00 61.75 123.51 - 1215 2017 1683 1492 -2 1 0 1 0 7 100 0 15 0.000 0 0 -1 1 0 2 - 1 0 1.00 61.75 123.51 - 1889 2010 1898 1575 -2 1 0 1 0 7 100 0 15 0.000 0 0 -1 1 0 2 - 1 0 1.00 61.75 123.51 - 2493 2025 2080 1470 -2 1 0 1 0 7 100 0 15 0.000 0 0 -1 1 0 2 - 1 0 1.00 61.75 123.51 - 3398 2715 3605 2415 -2 1 0 1 0 7 100 0 15 0.000 0 0 -1 1 0 2 - 1 0 1.00 61.75 123.51 - 4137 2707 3947 2415 -2 1 1 1 0 7 95 0 15 4.000 0 0 -1 0 0 2 - 2112 1372 3748 2017 -2 2 0 1 0 7 95 0 -1 0.000 0 0 -1 0 0 5 - 675 900 4725 900 4725 3375 675 3375 675 900 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 8197 1545 8055 2010 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 0 1.00 60.00 120.00 - 8137 2025 8280 1590 -2 1 0 3 0 7 95 0 -1 0.000 0 0 -1 1 0 4 - 2 1 2.00 120.00 180.00 - 7875 1500 7620 1965 7845 1920 7485 2355 -4 0 0 95 0 14 13 0.0000 4 79 111 6094 1379 x\001 -4 0 0 95 0 14 13 0.0000 4 111 111 7991 2265 y\001 -4 0 0 95 0 14 13 0.0000 4 79 111 1819 1379 x\001 -4 0 0 95 0 14 13 0.0000 4 111 111 3716 2265 y\001 -4 0 0 95 0 12 12 0.0000 4 150 1470 6459 1335 x # add_node y\001 -4 0 0 95 0 12 12 0.0000 4 150 1470 2214 1365 x # add_node y\001 diff --git a/helm/DEVEL/pxp/pxp/doc/manual/src/pic/node_clone.fig b/helm/DEVEL/pxp/pxp/doc/manual/src/pic/node_clone.fig deleted file mode 100644 index ed1865f87..000000000 --- a/helm/DEVEL/pxp/pxp/doc/manual/src/pic/node_clone.fig +++ /dev/null @@ -1,111 +0,0 @@ -#FIG 3.2 -Portrait -Center -Metric -A4 -100.00 -Single --2 -1200 2 -1 3 0 1 0 7 95 0 15 4.000 1 0.0000 2700 1800 229 229 2700 1800 2925 1845 -1 3 0 1 0 7 95 0 15 4.000 1 0.0000 2025 2700 229 229 2025 2700 2250 2745 -1 3 0 1 0 7 95 0 15 4.000 1 0.0000 3375 2700 229 229 3375 2700 3600 2745 -1 3 0 1 0 7 95 0 15 4.000 1 0.0000 6345 1800 229 229 6345 1800 6570 1845 -1 3 0 1 0 7 95 0 15 4.000 1 0.0000 5670 2700 229 229 5670 2700 5895 2745 -1 3 0 1 0 7 95 0 15 4.000 1 0.0000 7020 2700 229 229 7020 2700 7245 2745 -1 3 0 1 0 7 95 0 10 4.000 1 0.0000 8325 1800 229 229 8325 1800 8550 1845 -1 3 0 1 0 7 95 0 10 4.000 1 0.0000 7875 2700 229 229 7875 2700 8100 2745 -1 3 0 1 0 7 95 0 10 4.000 1 0.0000 8775 2700 229 229 8775 2700 9000 2745 -1 3 0 1 0 7 95 0 10 4.000 1 0.0000 6345 2700 229 229 6345 2700 6570 2745 -1 3 0 1 0 7 95 0 10 4.000 1 0.0000 5895 3600 229 229 5895 3600 6120 3645 -1 3 0 1 0 7 95 0 10 4.000 1 0.0000 6795 3600 229 229 6795 3600 7020 3645 -1 3 0 1 0 7 95 0 10 4.000 1 0.0000 2700 2700 229 229 2700 2700 2925 2745 -1 3 0 1 0 7 95 0 10 4.000 1 0.0000 2250 3600 229 229 2250 3600 2475 3645 -1 3 0 1 0 7 95 0 10 4.000 1 0.0000 3150 3600 229 229 3150 3600 3375 3645 -2 1 0 5 0 7 95 0 -1 12.000 1 0 -1 0 0 2 - 4050 2610 4725 2610 -2 1 0 5 0 7 95 0 -1 12.000 1 0 -1 0 0 2 - 4050 2745 4725 2745 -2 1 0 5 0 7 95 0 -1 12.000 1 1 -1 0 0 3 - 4500 2385 4950 2655 4500 2970 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 2490 1905 2025 2467 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 2827 2002 3202 2542 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 0 1.00 60.00 120.00 - 2115 2475 2535 1965 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 0 1.00 60.00 120.00 - 3255 2505 2872 1957 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 6135 1905 5670 2467 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 6472 2002 6847 2542 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 0 1.00 60.00 120.00 - 5760 2475 6180 1965 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 0 1.00 60.00 120.00 - 6900 2505 6517 1957 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 8160 1957 7860 2460 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 8407 2032 8625 2520 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 0 1.00 60.00 120.00 - 7942 2467 8212 2010 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 0 1.00 60.00 120.00 - 8685 2475 8467 1987 -2 2 0 1 0 7 80 0 -1 4.000 0 0 -1 0 0 5 - 1575 1350 9225 1350 9225 4050 1575 4050 1575 1350 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 0 1.00 60.00 120.00 - 6382 2460 6382 2032 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 6307 2032 6307 2467 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 6180 2857 5880 3360 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 6427 2932 6645 3420 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 0 1.00 60.00 120.00 - 5962 3367 6232 2910 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 0 1.00 60.00 120.00 - 6705 3375 6487 2887 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 0 1.00 60.00 120.00 - 2737 2460 2737 2032 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 2662 2032 2662 2467 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 2535 2857 2235 3360 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 2782 2932 3000 3420 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 0 1.00 60.00 120.00 - 2317 3367 2587 2910 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 0 1.00 60.00 120.00 - 3060 3375 2842 2887 -4 0 0 80 0 14 12 0.0000 4 105 105 2655 1845 y\001 -4 0 0 80 0 14 12 0.0000 4 105 105 6300 1845 y\001 -4 0 0 80 0 14 12 0.0000 4 75 105 6285 2752 x\001 -4 0 0 80 0 14 12 0.0000 4 75 105 2640 2752 x\001 -4 0 0 80 0 12 12 0.0000 4 105 840 3690 2025 let x' =\001 -4 0 0 80 0 12 12 0.0000 4 150 1890 3690 2205 x # orphaned_clone\001 -4 0 0 80 0 14 12 0.0000 4 105 210 8235 1845 x'\001 diff --git a/helm/DEVEL/pxp/pxp/doc/manual/src/pic/node_delete.fig b/helm/DEVEL/pxp/pxp/doc/manual/src/pic/node_delete.fig deleted file mode 100644 index a9fc87eef..000000000 --- a/helm/DEVEL/pxp/pxp/doc/manual/src/pic/node_delete.fig +++ /dev/null @@ -1,96 +0,0 @@ -#FIG 3.2 -Portrait -Center -Metric -A4 -100.00 -Single --2 -1200 2 -6 2550 2092 2865 2407 -2 1 0 4 0 7 80 0 -1 0.000 1 1 -1 0 0 2 - 2595 2362 2820 2137 -2 1 0 4 0 7 80 0 -1 0.000 1 1 -1 0 0 2 - 2595 2137 2820 2362 --6 -6 1980 2430 3420 3870 -1 3 0 1 0 7 95 0 10 4.000 1 0.0000 2700 2700 229 229 2700 2700 2925 2745 -1 3 0 1 0 7 95 0 10 4.000 1 0.0000 2250 3600 229 229 2250 3600 2475 3645 -1 3 0 1 0 7 95 0 10 4.000 1 0.0000 3150 3600 229 229 3150 3600 3375 3645 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 2535 2857 2235 3360 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 2782 2932 3000 3420 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 0 1.00 60.00 120.00 - 2317 3367 2587 2910 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 0 1.00 60.00 120.00 - 3060 3375 2842 2887 --6 -1 3 0 1 0 7 95 0 15 4.000 1 0.0000 2700 1800 229 229 2700 1800 2925 1845 -1 3 0 1 0 7 95 0 15 4.000 1 0.0000 2025 2700 229 229 2025 2700 2250 2745 -1 3 0 1 0 7 95 0 15 4.000 1 0.0000 3375 2700 229 229 3375 2700 3600 2745 -1 3 0 1 0 7 95 0 15 4.000 1 0.0000 6345 1800 229 229 6345 1800 6570 1845 -1 3 0 1 0 7 95 0 15 4.000 1 0.0000 5670 2700 229 229 5670 2700 5895 2745 -1 3 0 1 0 7 95 0 15 4.000 1 0.0000 7020 2700 229 229 7020 2700 7245 2745 -1 3 0 1 0 7 95 0 10 4.000 1 0.0000 8325 1800 229 229 8325 1800 8550 1845 -1 3 0 1 0 7 95 0 10 4.000 1 0.0000 7875 2700 229 229 7875 2700 8100 2745 -1 3 0 1 0 7 95 0 10 4.000 1 0.0000 8775 2700 229 229 8775 2700 9000 2745 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 0 1.00 60.00 120.00 - 2737 2460 2737 2032 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 2662 2032 2662 2467 -2 1 0 5 0 7 95 0 -1 12.000 1 0 -1 0 0 2 - 4050 2610 4725 2610 -2 1 0 5 0 7 95 0 -1 12.000 1 0 -1 0 0 2 - 4050 2745 4725 2745 -2 1 0 5 0 7 95 0 -1 12.000 1 1 -1 0 0 3 - 4500 2385 4950 2655 4500 2970 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 2490 1905 2025 2467 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 2827 2002 3202 2542 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 0 1.00 60.00 120.00 - 2115 2475 2535 1965 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 0 1.00 60.00 120.00 - 3255 2505 2872 1957 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 6135 1905 5670 2467 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 6472 2002 6847 2542 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 0 1.00 60.00 120.00 - 5760 2475 6180 1965 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 0 1.00 60.00 120.00 - 6900 2505 6517 1957 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 8160 1957 7860 2460 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 8407 2032 8625 2520 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 0 1.00 60.00 120.00 - 7942 2467 8212 2010 -2 1 0 1 0 7 95 0 -1 4.000 0 0 -1 1 0 2 - 1 0 1.00 60.00 120.00 - 8685 2475 8467 1987 -2 2 0 1 0 7 80 0 -1 4.000 0 0 -1 0 0 5 - 1575 1350 9225 1350 9225 4050 1575 4050 1575 1350 -4 0 0 80 0 14 12 0.0000 4 75 105 2640 2752 x\001 -4 0 0 95 0 12 12 0.0000 4 135 1050 3960 2250 x # delete\001 -4 0 0 80 0 14 12 0.0000 4 75 105 8280 1845 x\001 -4 0 0 80 0 14 12 0.0000 4 105 105 2655 1845 y\001 -4 0 0 80 0 14 12 0.0000 4 105 105 6300 1845 y\001 diff --git a/helm/DEVEL/pxp/pxp/doc/manual/src/pic/node_general.fig b/helm/DEVEL/pxp/pxp/doc/manual/src/pic/node_general.fig deleted file mode 100644 index 231e76da9..000000000 --- a/helm/DEVEL/pxp/pxp/doc/manual/src/pic/node_general.fig +++ /dev/null @@ -1,35 +0,0 @@ -#FIG 3.2 -Portrait -Center -Metric -A4 -100.00 -Single --2 -1200 2 -1 3 0 1 0 7 100 0 15 0.000 1 0.0000 2025 2025 229 229 2025 2025 2250 2070 -1 3 0 1 0 7 100 0 15 0.000 1 0.0000 1350 2025 225 225 1350 2025 1575 2025 -1 3 0 1 0 7 100 0 15 0.000 1 0.0000 2700 2025 225 225 2700 2025 2925 2025 -1 3 0 1 0 7 100 0 15 0.000 1 0.0000 2025 1125 225 225 2025 1125 2250 1125 -2 1 0 1 0 7 100 0 15 0.000 0 0 -1 1 0 2 - 1 0 1.00 60.00 120.00 - 1380 1800 1845 1275 -2 1 0 1 0 7 100 0 15 0.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 1815 1207 1282 1815 -2 1 0 1 0 7 100 0 15 0.000 0 0 -1 1 0 2 - 1 0 1.00 60.00 120.00 - 2055 1792 2055 1350 -2 1 0 1 0 7 100 0 15 0.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 1980 1350 1980 1807 -2 1 0 1 0 7 100 0 15 0.000 0 0 -1 1 0 2 - 1 1 1.00 60.00 120.00 - 2190 1297 2550 1867 -2 1 0 1 0 7 100 0 15 0.000 0 0 -1 1 0 2 - 1 0 1.00 60.00 120.00 - 2602 1807 2220 1237 -2 2 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 5 - 450 675 3150 675 3150 2475 450 2475 450 675 -4 0 0 100 0 12 10 0.0000 4 120 540 2377 1342 parent\001 -4 0 0 100 0 12 10 0.0000 4 105 810 645 1628 sub_nodes\001 diff --git a/helm/DEVEL/pxp/pxp/doc/manual/src/pic/node_term.fig b/helm/DEVEL/pxp/pxp/doc/manual/src/pic/node_term.fig deleted file mode 100644 index 54965fe63..000000000 --- a/helm/DEVEL/pxp/pxp/doc/manual/src/pic/node_term.fig +++ /dev/null @@ -1,63 +0,0 @@ -#FIG 3.2 -Portrait -Center -Metric -A4 -100.00 -Single --2 -1200 2 -6 1665 2700 2835 3150 -2 4 0 1 0 7 100 0 15 0.000 0 0 7 0 0 5 - 2835 3150 2835 2700 1665 2700 1665 3150 2835 3150 -4 0 0 80 0 18 12 0.0000 4 135 930 1815 3015 "Cherries"\001 --6 -1 3 0 1 0 7 100 0 15 0.000 1 0.0000 2250 1125 225 225 2250 1125 2475 1125 -1 3 0 1 0 7 100 0 15 0.000 1 0.0000 1575 2025 225 225 1575 2025 1800 2025 -1 3 0 1 0 7 100 0 15 0.000 1 0.0000 2925 2025 225 225 2925 2025 3150 2025 -1 3 0 1 0 7 100 0 15 0.000 1 0.0000 900 2925 242 242 900 2925 1125 3015 -2 4 0 1 0 7 100 0 15 0.000 0 0 7 0 0 5 - 1485 4275 1485 3825 315 3825 315 4275 1485 4275 -2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2 - 2085 1275 1582 1807 -2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2 - 2407 1297 2940 1800 -2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2 - 1417 2190 900 2692 -2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2 - 1740 2190 2257 2700 -2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2 - 892 3180 892 3825 -2 2 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 5 - 45 675 6525 675 6525 4950 45 4950 45 675 -3 3 0 1 0 7 100 0 -1 0.000 0 0 0 22 - 2115 3645 2250 3600 2520 3555 2745 3510 2925 3555 3150 3690 - 3375 3735 3600 3735 3825 3735 4140 3825 4140 4005 4005 4185 - 3735 4230 3420 4185 3150 4230 2835 4275 2520 4230 2340 4140 - 2115 4095 1980 4005 1980 3825 2025 3735 - -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 - -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 - -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -3 3 0 1 0 7 100 0 -1 0.000 0 0 0 17 - 3465 1170 3645 1080 4050 1035 4320 1035 4545 1080 4770 1170 - 5130 1215 5355 1350 5400 1530 5265 1665 4860 1710 4455 1710 - 4095 1665 3780 1620 3555 1575 3420 1485 3420 1305 - -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 - -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 -1.000 - -1.000 -3 2 0 1 0 7 100 0 -1 0.000 0 0 0 5 - 2475 1215 2655 1350 2970 1440 3240 1395 3420 1260 - 0.000 -1.000 -1.000 -1.000 0.000 -3 2 0 1 0 7 100 0 -1 0.000 0 0 0 5 - 1125 3060 1215 3397 1410 3607 1687 3727 2025 3720 - 0.000 -1.000 -1.000 -1.000 0.000 -4 0 0 80 0 18 12 0.0000 4 180 1065 375 4125 "An orange"\001 -4 0 0 80 0 18 12 0.0000 4 90 315 750 2985 \001 -4 0 0 80 0 18 12 0.0000 4 135 315 1410 2085 \001 -4 0 0 80 0 18 12 0.0000 4 90 315 2790 2070 \001 -4 0 0 80 0 18 12 0.0000 4 90 315 2100 1200 \001 -4 0 0 100 0 16 12 0.0000 4 135 795 3600 1260 attributes:\001 -4 0 0 100 0 16 12 0.0000 4 180 1680 3600 1485 "att" -> Value "apple"\001 -4 0 0 100 0 16 12 0.0000 4 135 795 2250 3780 attributes:\001 -4 0 0 100 0 17 12 0.0000 4 180 5910 390 4725 An orangeCherries\001 -4 0 0 100 0 16 12 0.0000 4 180 1800 2250 4005 "att" -> Value "orange"\001 diff --git a/helm/DEVEL/pxp/pxp/doc/manual/src/readme.ent b/helm/DEVEL/pxp/pxp/doc/manual/src/readme.ent deleted file mode 100644 index e9fdfc35a..000000000 --- a/helm/DEVEL/pxp/pxp/doc/manual/src/readme.ent +++ /dev/null @@ -1,364 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/helm/DEVEL/pxp/pxp/doc/manual/src/yacc.mli.ent b/helm/DEVEL/pxp/pxp/doc/manual/src/yacc.mli.ent deleted file mode 100644 index 604918bd8..000000000 --- a/helm/DEVEL/pxp/pxp/doc/manual/src/yacc.mli.ent +++ /dev/null @@ -1,376 +0,0 @@ - diff --git a/helm/DEVEL/pxp/pxp/examples/Makefile b/helm/DEVEL/pxp/pxp/examples/Makefile deleted file mode 100644 index 934385757..000000000 --- a/helm/DEVEL/pxp/pxp/examples/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -.PHONY: all -all: - -.PHONY: clean -clean: - -.PHONY: CLEAN -CLEAN: clean - $(MAKE) -C xmlforms CLEAN - $(MAKE) -C validate CLEAN - $(MAKE) -C readme CLEAN - $(MAKE) -C simple_transformation CLEAN - -.PHONY: distclean -distclean: clean - rm -f *~ - $(MAKE) -C xmlforms distclean - $(MAKE) -C validate distclean - $(MAKE) -C readme distclean - $(MAKE) -C simple_transformation distclean - - diff --git a/helm/DEVEL/pxp/pxp/examples/readme/.cvsignore b/helm/DEVEL/pxp/pxp/examples/readme/.cvsignore deleted file mode 100644 index 2395c1946..000000000 --- a/helm/DEVEL/pxp/pxp/examples/readme/.cvsignore +++ /dev/null @@ -1,10 +0,0 @@ -*.cmi -*.cmo -*.cma -*.cmx -*.o -*.a -*.cmxa -depend -depend.pkg - diff --git a/helm/DEVEL/pxp/pxp/examples/readme/Makefile b/helm/DEVEL/pxp/pxp/examples/readme/Makefile deleted file mode 100644 index df5f6ed0d..000000000 --- a/helm/DEVEL/pxp/pxp/examples/readme/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -# make readme: make bytecode executable -# make readme.opt: make native executable -# make clean: remove intermediate files -# make CLEAN: remove intermediate files (recursively) -# make distclean: remove any superflous files -# make install -#---------------------------------------------------------------------- - -BIN = /usr/local/bin - -.PHONY: readme -readme: - $(MAKE) -f Makefile.code readme - -.PHONY: readme.opt -readme.opt: - $(MAKE) -f Makefile.code readme.opt - - -.PHONY: clean -clean: - rm -f *.cmi *.cmo *.cma *.cmx *.o *.a *.cmxa - -.PHONY: CLEAN -CLEAN: clean - -.PHONY: distclean -distclean: clean - rm -f *~ depend depend.pkg - rm -f readme readme.opt - -.PHONY: install -install: - cp readme $(BIN) diff --git a/helm/DEVEL/pxp/pxp/examples/readme/Makefile.code b/helm/DEVEL/pxp/pxp/examples/readme/Makefile.code deleted file mode 100644 index 0514ddf33..000000000 --- a/helm/DEVEL/pxp/pxp/examples/readme/Makefile.code +++ /dev/null @@ -1,57 +0,0 @@ -#---------------------------------------------------------------------- -# specific rules for this package: - -OBJECTS = to_html.cmo to_text.cmo -XOBJECTS = $(OBJECTS:.cmo=.cmx) -ARCHIVE = readme.cma -XARCHIVE = readme.cmxa -NAME = readme -REQUIRES = str pxp - -readme: $(ARCHIVE) main.cmo - ocamlfind ocamlc -o readme -custom -package "$(REQUIRES)" \ - -linkpkg $(ARCHIVE) main.cmo - -readme.opt: $(XARCHIVE) main.cmx - ocamlfind ocamlopt -o readme.opt -custom -package "$(REQUIRES)" \ - -linkpkg $(XARCHIVE) main.cmx - -$(ARCHIVE): $(OBJECTS) - $(OCAMLC) -a -o $(ARCHIVE) $(OBJECTS) - -$(XARCHIVE): $(XOBJECTS) - $(OCAMLOPT) -a -o $(XARCHIVE) $(XOBJECTS) - -#---------------------------------------------------------------------- -# general rules: - -OPTIONS = -OCAMLC = ocamlc -g $(OPTIONS) $(ROPTIONS) -OCAMLOPT = ocamlopt -p $(OPTIONS) $(ROPTIONS) -OCAMLDEP = ocamldep $(OPTIONS) -OCAMLFIND = ocamlfind - -depend: *.ml *.mli - $(OCAMLDEP) *.ml *.mli >depend - -depend.pkg: Makefile - $(OCAMLFIND) use -p ROPTIONS= $(REQUIRES) >depend.pkg - -.SUFFIXES: .cmo .cmi .cmx .ml .mli .mll .mly - -.ml.cmx: - $(OCAMLOPT) -c $< - -.ml.cmo: - $(OCAMLC) -c $< - -.mli.cmi: - $(OCAMLC) -c $< - -.mll.ml: - ocamllex $< - -*.mli: - -include depend -include depend.pkg diff --git a/helm/DEVEL/pxp/pxp/examples/readme/main.ml b/helm/DEVEL/pxp/pxp/examples/readme/main.ml deleted file mode 100644 index 4e3837aa9..000000000 --- a/helm/DEVEL/pxp/pxp/examples/readme/main.ml +++ /dev/null @@ -1,108 +0,0 @@ -(* $Id$ - * ---------------------------------------------------------------------- - * - *) - -open Pxp_types -open Pxp_document -open Pxp_yacc - - -let rec print_error e = - prerr_endline(string_of_exn e) -;; - - -let run f a = - try f a with - e -> print_error e -;; - - -let convert_to_html filename = - (* read in style definition *) - let document = - parse_document_entity - { default_config with encoding = `Enc_iso88591 } - (from_file filename) - To_html.tag_map - in - let root = document # root in - let store = new To_html.store in - root # extension # to_html store stdout -;; - - -let convert_to_text filename = - (* read in style definition *) - let document = - parse_document_entity - default_config - (from_file filename) - To_text.tag_map - in - let root = document # root in - let store = new To_text.store in - let box = new To_text.box 79 79 in - root # extension # to_box store box; - box # output 0 0 stdout -;; - - -let main() = - let want_html = ref false in - let want_text = ref false in - let filename = ref None in - Arg.parse - [ "-html", Arg.Set want_html, - " convert file to html"; - "-text", Arg.Set want_text, - " convert file to text"; - ] - (fun s -> - match !filename with - None -> filename := Some s - | Some _ -> - raise (Arg.Bad "Multiple arguments not allowed.")) - "usage: readme [ -text | -html ] input.xml >output"; - let fn = - match !filename with - None -> - prerr_endline "readme: no input"; - exit 1 - | Some s -> s - in - match !want_html, !want_text with - true, false -> - run convert_to_html fn - | false, true -> - run convert_to_text fn - | _ -> - prerr_endline ("readme: Please select exactly one output format") -;; - -main();; - -(* ====================================================================== - * History: - * - * $Log$ - * Revision 1.1 2000/11/17 09:57:31 lpadovan - * Initial revision - * - * Revision 1.5 2000/07/08 17:58:17 gerd - * Updated because of PXP API changes. - * - * Revision 1.4 2000/06/04 20:25:38 gerd - * Updates because of renamed PXP modules. - * - * Revision 1.3 2000/05/01 16:46:40 gerd - * Using the new error formatter. - * - * Revision 1.2 1999/08/23 16:54:19 gerd - * Minor changes. - * - * Revision 1.1 1999/08/22 22:29:32 gerd - * Initial revision. - * - *) diff --git a/helm/DEVEL/pxp/pxp/examples/readme/readme.dtd b/helm/DEVEL/pxp/pxp/examples/readme/readme.dtd deleted file mode 100644 index 8ff6a9f75..000000000 --- a/helm/DEVEL/pxp/pxp/examples/readme/readme.dtd +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/helm/DEVEL/pxp/pxp/examples/readme/to_html.ml b/helm/DEVEL/pxp/pxp/examples/readme/to_html.ml deleted file mode 100644 index f717b2259..000000000 --- a/helm/DEVEL/pxp/pxp/examples/readme/to_html.ml +++ /dev/null @@ -1,432 +0,0 @@ -(* $Id$ - * ---------------------------------------------------------------------- - * - *) - - -(*$ readme.code.header *) -open Pxp_types -open Pxp_document -(*$-*) - - -(*$ readme.code.footnote-printer *) -class type footnote_printer = - object - method footnote_to_html : store_type -> out_channel -> unit - end - -and store_type = - object - method alloc_footnote : footnote_printer -> int - method print_footnotes : out_channel -> unit - end -;; -(*$-*) - - -(*$ readme.code.store *) -class store = - object (self) - - val mutable footnotes = ( [] : (int * footnote_printer) list ) - val mutable next_footnote_number = 1 - - method alloc_footnote n = - let number = next_footnote_number in - next_footnote_number <- number+1; - footnotes <- footnotes @ [ number, n ]; - number - - method print_footnotes ch = - if footnotes <> [] then begin - output_string ch "
\n"; - output_string ch "
\n"; - List.iter - (fun (_,n) -> - n # footnote_to_html (self : #store_type :> store_type) ch) - footnotes; - output_string ch "
\n"; - end - - end -;; -(*$-*) - - - -(*$ readme.code.escape-html *) -let escape_html s = - Str.global_substitute - (Str.regexp "<\\|>\\|&\\|\"") - (fun s -> - match Str.matched_string s with - "<" -> "<" - | ">" -> ">" - | "&" -> "&" - | "\"" -> """ - | _ -> assert false) - s -;; -(*$-*) - - -(*$ readme.code.shared *) -class virtual shared = - object (self) - - (* --- default_ext --- *) - - val mutable node = (None : shared node option) - - method clone = {< >} - method node = - match node with - None -> - assert false - | Some n -> n - method set_node n = - node <- Some n - - (* --- virtual --- *) - - method virtual to_html : store -> out_channel -> unit - - end -;; -(*$-*) - - -(*$ readme.code.only-data *) -class only_data = - object (self) - inherit shared - - method to_html store ch = - output_string ch (escape_html (self # node # data)) - end -;; -(*$-*) - - -(*$ readme.code.no-markup *) -class no_markup = - object (self) - inherit shared - - method to_html store ch = - List.iter - (fun n -> n # extension # to_html store ch) - (self # node # sub_nodes) - end -;; -(*$-*) - - -(*$ readme.code.readme *) -class readme = - object (self) - inherit shared - - method to_html store ch = - (* output header *) - output_string - ch ""; - output_string - ch "\n"; - let title = - match self # node # attribute "title" with - Value s -> s - | _ -> assert false - in - let html_header, _ = - try (self # node # dtd # par_entity "readme:html:header") - # replacement_text - with WF_error _ -> "", false in - let html_trailer, _ = - try (self # node # dtd # par_entity "readme:html:trailer") - # replacement_text - with WF_error _ -> "", false in - let html_bgcolor, _ = - try (self # node # dtd # par_entity "readme:html:bgcolor") - # replacement_text - with WF_error _ -> "white", false in - let html_textcolor, _ = - try (self # node # dtd # par_entity "readme:html:textcolor") - # replacement_text - with WF_error _ -> "", false in - let html_alinkcolor, _ = - try (self # node # dtd # par_entity "readme:html:alinkcolor") - # replacement_text - with WF_error _ -> "", false in - let html_vlinkcolor, _ = - try (self # node # dtd # par_entity "readme:html:vlinkcolor") - # replacement_text - with WF_error _ -> "", false in - let html_linkcolor, _ = - try (self # node # dtd # par_entity "readme:html:linkcolor") - # replacement_text - with WF_error _ -> "", false in - let html_background, _ = - try (self # node # dtd # par_entity "readme:html:background") - # replacement_text - with WF_error _ -> "", false in - - output_string ch "
\n"; - output_string ch (escape_html title); - output_string ch "
\n"; - output_string ch " - if value <> "" then - output_string ch (name ^ "=\"" ^ escape_html value ^ "\" ")) - [ "bgcolor", html_bgcolor; - "text", html_textcolor; - "link", html_linkcolor; - "alink", html_alinkcolor; - "vlink", html_vlinkcolor; - ]; - output_string ch ">\n"; - output_string ch html_header; - output_string ch "

"; - output_string ch (escape_html title); - output_string ch "

\n"; - (* process main content: *) - List.iter - (fun n -> n # extension # to_html store ch) - (self # node # sub_nodes); - (* now process footnotes *) - store # print_footnotes ch; - (* trailer *) - output_string ch html_trailer; - output_string ch "\n"; - - end -;; -(*$-*) - - -(*$ readme.code.section *) -class section the_tag = - object (self) - inherit shared - - val tag = the_tag - - method to_html store ch = - let sub_nodes = self # node # sub_nodes in - match sub_nodes with - title_node :: rest -> - output_string ch ("<" ^ tag ^ ">\n"); - title_node # extension # to_html store ch; - output_string ch ("\n"); - List.iter - (fun n -> n # extension # to_html store ch) - rest - | _ -> - assert false - end -;; - -class sect1 = section "h1";; -class sect2 = section "h3";; -class sect3 = section "h4";; -(*$-*) - - -(*$ readme.code.map-tag *) -class map_tag the_target_tag = - object (self) - inherit shared - - val target_tag = the_target_tag - - method to_html store ch = - output_string ch ("<" ^ target_tag ^ ">\n"); - List.iter - (fun n -> n # extension # to_html store ch) - (self # node # sub_nodes); - output_string ch ("\n"); - end -;; - -class p = map_tag "p";; -class em = map_tag "b";; -class ul = map_tag "ul";; -class li = map_tag "li";; -(*$-*) - - -(*$ readme.code.br *) -class br = - object (self) - inherit shared - - method to_html store ch = - output_string ch "
\n"; - List.iter - (fun n -> n # extension # to_html store ch) - (self # node # sub_nodes); - end -;; -(*$-*) - - -(*$ readme.code.code *) -class code = - object (self) - inherit shared - - method to_html store ch = - let data = self # node # data in - (* convert tabs *) - let l = String.length data in - let rec preprocess i column = - (* this is very ineffective but comprehensive: *) - if i < l then - match data.[i] with - '\t' -> - let n = 8 - (column mod 8) in - String.make n ' ' ^ preprocess (i+1) (column + n) - | '\n' -> - "\n" ^ preprocess (i+1) 0 - | c -> - String.make 1 c ^ preprocess (i+1) (column + 1) - else - "" - in - output_string ch "

";
-      output_string ch (escape_html (preprocess 0 0));
-      output_string ch "

"; - - end -;; -(*$-*) - - -(*$ readme.code.a *) -class a = - object (self) - inherit shared - - method to_html store ch = - output_string ch " escape_html v - | Valuelist _ -> assert false - | Implied_value -> - begin match self # node # attribute "readmeref" with - Value v -> escape_html v ^ ".html" - | Valuelist _ -> assert false - | Implied_value -> - "" - end - in - if href <> "" then - output_string ch ("href=\"" ^ href ^ "\""); - output_string ch ">"; - output_string ch (escape_html (self # node # data)); - output_string ch ""; - - end -;; -(*$-*) - - -(*$ readme.code.footnote *) -class footnote = - object (self) - inherit shared - - val mutable footnote_number = 0 - - method to_html store ch = - let number = - store # alloc_footnote (self : #shared :> footnote_printer) in - let foot_anchor = - "footnote" ^ string_of_int number in - let text_anchor = - "textnote" ^ string_of_int number in - footnote_number <- number; - output_string ch ( "[" ^ string_of_int number ^ - "]" ) - - method footnote_to_html store ch = - (* prerequisite: we are in a definition list
...
*) - let foot_anchor = - "footnote" ^ string_of_int footnote_number in - let text_anchor = - "textnote" ^ string_of_int footnote_number in - output_string ch ("
[" ^ string_of_int footnote_number ^ - "]
\n
"); - List.iter - (fun n -> n # extension # to_html store ch) - (self # node # sub_nodes); - output_string ch ("\n
") - - end -;; -(*$-*) - - -(**********************************************************************) - -(*$ readme.code.tag-map *) -open Pxp_yacc - -let tag_map = - make_spec_from_alist - ~data_exemplar:(new data_impl (new only_data)) - ~default_element_exemplar:(new element_impl (new no_markup)) - ~element_alist: - [ "readme", (new element_impl (new readme)); - "sect1", (new element_impl (new sect1)); - "sect2", (new element_impl (new sect2)); - "sect3", (new element_impl (new sect3)); - "title", (new element_impl (new no_markup)); - "p", (new element_impl (new p)); - "br", (new element_impl (new br)); - "code", (new element_impl (new code)); - "em", (new element_impl (new em)); - "ul", (new element_impl (new ul)); - "li", (new element_impl (new li)); - "footnote", (new element_impl (new footnote : #shared :> shared)); - "a", (new element_impl (new a)); - ] - () -;; -(*$-*) - - -(* ====================================================================== - * History: - * - * $Log$ - * Revision 1.1 2000/11/17 09:57:31 lpadovan - * Initial revision - * - * Revision 1.6 2000/08/22 14:34:25 gerd - * Using make_spec_from_alist instead of make_spec_from_mapping. - * - * Revision 1.5 2000/08/18 21:15:14 gerd - * Update because of PXP API change: par_entity raises WF_error - * instead of Validation error if the entity is not defined. - * Further minor updates. - * - * Revision 1.4 2000/07/08 17:58:17 gerd - * Updated because of PXP API changes. - * - * Revision 1.3 2000/06/04 20:25:38 gerd - * Updates because of renamed PXP modules. - * - * Revision 1.2 1999/09/12 20:09:32 gerd - * Added section marks. - * - * Revision 1.1 1999/08/22 22:29:32 gerd - * Initial revision. - * - * - *) diff --git a/helm/DEVEL/pxp/pxp/examples/readme/to_text.ml b/helm/DEVEL/pxp/pxp/examples/readme/to_text.ml deleted file mode 100644 index fc45f45cd..000000000 --- a/helm/DEVEL/pxp/pxp/examples/readme/to_text.ml +++ /dev/null @@ -1,599 +0,0 @@ -(* $Id$ - * ---------------------------------------------------------------------- - * - *) - -open Pxp_types -open Pxp_document - - -(**********************************************************************) -(* The box class represents formatted text *) -(**********************************************************************) - -class type formatted_text = - object - method output : int -> int -> out_channel -> unit - (* output initial_indent indent ch: - * 'initial_indent' is how far the first line should be indented; - * 'indent' how far the rest. 'ch' is the channel on which the lines - * are to be printed. - *) - - method multiline : bool - (* whether the box occupies multiple lines *) - - method width_of_last_line : int - (* returns the width of the last line *) - end -;; - - -type text = - Text of string - | Box of formatted_text -;; - - -let textwidth tl = - let rec compute tl r = - match tl with - [] -> r - | t :: tl' -> - begin match t with - Text s -> - compute tl' (r + String.length s) - | Box b -> - if b # multiline then - compute tl' (b # width_of_last_line) - else - compute tl' (r + b # width_of_last_line) - end - in - compute (List.rev tl) 0 -;; - - -class box the_initial_width the_width = - object (self) - - (* The 'initial_width' is the width that is available on the first - * line of output; the 'width' is the width that is available in the - * rest. - *) - - val initial_width = the_initial_width - val width = the_width - - (* state: *) - - val mutable space_added = false - val mutable linefeed_added = false - val mutable is_first_line = true - val mutable lines = [] - (* lines in reverse order (first line = last element) *) - val mutable current_line = [] - (* not member of 'lines'; again reverse order *) - val mutable current_indent = 0 - - method add_space = - if not space_added then begin - space_added <- true; - linefeed_added <- true; - current_line <- Text " " :: current_line - end - - method ignore_space = - space_added <- true; - linefeed_added <- true - - method add_linefeed = - if not linefeed_added then begin - linefeed_added <- true; - if not space_added then - current_line <- Text " " :: current_line - end - - method ignore_linefeed = - linefeed_added <- true - - method add_newline = - lines <- current_line :: lines; - current_line <- []; - space_added <- true; - linefeed_added <- true; - is_first_line <- false; - current_indent <- 0; - - method add_word s = - (* first try to add 's' to 'current_line' *) - let current_line' = Text s :: current_line in - let current_width = - if is_first_line then initial_width else width in - if textwidth current_line' + current_indent <= current_width then begin - (* ok, the line does not become too long *) - current_line <- current_line'; - space_added <- false; - linefeed_added <- false - end - else begin - (* The line would be too long. *) - lines <- current_line :: lines; - current_line <- [Text s]; - space_added <- false; - linefeed_added <- false; - is_first_line <- false; - current_indent <- 0; - end - - method add_box b = - current_line <- Box b :: current_line; - space_added <- false; - linefeed_added <- false; - - - method width_of_last_line = - textwidth current_line + current_indent - - - method available_width = - let current_width = - if is_first_line then initial_width else width in - current_width - textwidth current_line - current_indent - - - method multiline = - lines <> [] or - (List.exists - (function - Text _ -> false - | Box b -> b # multiline) - current_line) - - method output initial_indent indent ch = - let eff_lines = - List.rev - (current_line :: lines) in - let rec out_lines cur_indent ll = - match ll with - [] -> () - | l :: ll' -> - output_string ch (String.make cur_indent ' '); - List.iter - (function - Text s -> - output_string ch s - | Box b -> - b # output 0 indent ch - ) - (List.rev l); - if ll' <> [] then - output_string ch "\n"; - out_lines indent ll' - in - out_lines initial_indent eff_lines - end -;; - - -class listitem_box listmark indent totalwidth = - let initial_newline = String.length listmark >= indent in - object (self) - inherit box totalwidth (totalwidth - indent) as super - - val extra_indent = indent - - initializer - self # add_word listmark; - if initial_newline then - self # add_newline - else begin - current_line <- Text (String.make (indent - String.length listmark) ' ') - :: current_line; - space_added <- true; - linefeed_added <- true; - end - - - method output initial_indent indent ch = - super # output initial_indent (indent + extra_indent) ch - end -;; - - -(**********************************************************************) -(* Footnotes etc. *) -(**********************************************************************) - - -class type footnote_printer = - object - method footnote_to_box : store_type -> box -> unit - end - -and store_type = - object - method alloc_footnote : footnote_printer -> int - method print_footnotes : box -> unit - end -;; - - -class store = - object (self) - - val mutable footnotes = ( [] : (int * footnote_printer) list ) - val mutable next_footnote_number = 1 - - method alloc_footnote n = - let number = next_footnote_number in - next_footnote_number <- number+1; - footnotes <- footnotes @ [ number, n ]; - number - - method print_footnotes (b : box) = - if footnotes <> [] then begin - b # add_newline; - b # add_newline; - let w = b # available_width in - b # add_word (String.make (w/3) '-'); - b # add_newline; - b # add_newline; - List.iter - (fun (_,n) -> - n # footnote_to_box (self : #store_type :> store_type) b) - footnotes; - b # add_newline; - end - end -;; - - - -(**********************************************************************) -(* The extension objects *) -(**********************************************************************) - - -class virtual shared = - object (self) - - (* --- default_ext --- *) - - val mutable node = (None : shared node option) - - method clone = {< >} - method node = - match node with - None -> - assert false - | Some n -> n - method set_node n = - node <- Some n - - (* --- virtual --- *) - - method virtual to_box : store -> box -> unit - (* to_box store b: - * formats the element using box 'b' - *) - end -;; - - -class only_data = - object (self) - inherit shared - - val white_space_re = Str.regexp "[ \t]+\\|\n" - - method to_box store b = - let s = self # node # data in - let splitted = Str.full_split white_space_re s in - List.iter - (function - Str.Delim "\n" -> - b # add_linefeed - | Str.Delim _ -> - b # add_space - | Str.Text s -> - b # add_word s) - splitted - end -;; - - -class no_markup = - object (self) - inherit shared - - method to_box store b = - List.iter - (fun n -> n # extension # to_box store b) - (self # node # sub_nodes) - end -;; - - -class readme = - object (self) - inherit shared - - method to_box store b = - let title = - match self # node # attribute "title" with - Value s -> s - | _ -> assert false - in - let w = b # available_width in - let line = String.make (w-1) '*' in - b # add_word line; - b # add_newline; - b # add_word title; - b # add_newline; - b # add_word line; - b # add_newline; - b # add_newline; - (* process main content: *) - List.iter - (fun n -> n # extension # to_box store b) - (self # node # sub_nodes); - (* now process footnotes *) - store # print_footnotes b; - (* trailer *) - b # add_newline; - end -;; - - -class section the_tag = - object (self) - inherit shared - - val tag = the_tag - - method to_box store b = - let sub_nodes = self # node # sub_nodes in - match sub_nodes with - title_node :: rest -> - b # add_newline; - let w = b # available_width in - let line = String.make (w-1) tag in - b # add_word line; - b # add_newline; - b # add_word (title_node # data); - b # add_newline; - b # add_word line; - b # add_newline; - List.iter - (fun n -> - n # extension # to_box store b) - rest; - | _ -> - assert false - end -;; - -class sect1 = section '=';; -class sect2 = section '-';; -class sect3 = section ':';; - - -class p = - object (self) - inherit shared - - method to_box store b = - let within_list = - match self # node # parent # node_type with - T_element "li" -> true - | T_element _ -> false - | _ -> assert false - in - if not within_list then - b # add_newline; - let w = b # available_width in - let b' = new box w w in - b' # ignore_space; - List.iter - (fun n -> n # extension # to_box store b') - (self # node # sub_nodes); - b # add_box (b' :> formatted_text); - b # add_newline; - end -;; - - -class li = - object (self) - inherit shared - - method to_box store b = - b # add_newline; - let w = b # available_width in - let b' = new listitem_box "-" 3 w in - b' # ignore_space; - List.iter - (fun n -> n # extension # to_box store b') - (self # node # sub_nodes); - b # add_box (b' :> formatted_text); - end -;; - - -class code = - object (self) - inherit shared - - method to_box store b = - b # add_newline; - let w = b # available_width in - let b' = new box w w in - b' # ignore_space; - let data = self # node # data in - (* convert tabs *) - let l = String.length data in - let rec add s i column = - (* this is very ineffective but comprehensive: *) - if i < l then - match data.[i] with - '\t' -> - let n = 8 - (column mod 8) in - add (s ^ String.make n ' ') (i+1) (column + n) - | '\n' -> - b' # add_word s; - b' # add_newline; - add "" (i+1) 0 - | c -> - add (s ^ String.make 1 c) (i+1) (column + 1) - else - if s <> "" then begin - b' # add_word s; - b' # add_newline; - end - in - add "" 0 0; - b # add_box (b' :> formatted_text); - b # add_newline; - end -;; - - -class br = - object (self) - inherit shared - - method to_box store b = - b # add_newline; - end -;; - - -class footnote = - object (self) - inherit shared - - val mutable footnote_number = 0 - - method to_box store b = - let number = - store # alloc_footnote (self : #shared :> footnote_printer) in - footnote_number <- number; - b # add_space; - b # add_word ("[" ^ string_of_int number ^ "]"); - - method footnote_to_box store b = - let w = b # available_width in - let n = "[" ^ string_of_int footnote_number ^ "]" in - let b' = new listitem_box n 6 w in - b' # ignore_space; - List.iter - (fun n -> n # extension # to_box store b') - (self # node # sub_nodes); - b # add_box (b' :> formatted_text); - b # add_newline; - b # add_newline; - - end -;; - - -class a = - object (self) - inherit shared - - val mutable footnote_number = 0 - val mutable a_href = "" - - method to_box store b = - let href = - match self # node # attribute "href" with - Value v -> "see " ^ v - | Valuelist _ -> assert false - | Implied_value -> - begin match self # node # attribute "readmeref" with - Value v -> "see file " ^ v - | Valuelist _ -> assert false - | Implied_value -> - "" - end - in - a_href <- href; - List.iter - (fun n -> n # extension # to_box store b) - (self # node # sub_nodes); - if href <> "" then begin - let number = - store # alloc_footnote (self : #shared :> footnote_printer) in - footnote_number <- number; - b # add_space; - b # add_word ("[" ^ string_of_int number ^ "]"); - end - - method footnote_to_box store b = - if a_href <> "" then begin - let w = b # available_width in - let n = "[" ^ string_of_int footnote_number ^ "]" in - let b' = new listitem_box n 6 w in - b' # ignore_space; - b' # add_word a_href; - b # add_box (b' :> formatted_text); - b # add_newline; - b # add_newline; - end - end -;; - -(**********************************************************************) - -open Pxp_yacc - -let tag_map = - make_spec_from_alist - ~data_exemplar:(new data_impl (new only_data)) - ~default_element_exemplar:(new element_impl (new no_markup)) - ~element_alist: - [ "readme", (new element_impl (new readme)); - "sect1", (new element_impl (new sect1)); - "sect2", (new element_impl (new sect2)); - "sect3", (new element_impl (new sect3)); - "title", (new element_impl (new no_markup)); - "p", (new element_impl (new p)); - "br", (new element_impl (new br)); - "code", (new element_impl (new code)); - "em", (new element_impl (new no_markup)); - "ul", (new element_impl (new no_markup)); - "li", (new element_impl (new li)); - "footnote", (new element_impl (new footnote : #shared :> shared)); - "a", (new element_impl (new a : #shared :> shared)); - ] - () -;; - - - - -(* ====================================================================== - * History: - * - * $Log$ - * Revision 1.1 2000/11/17 09:57:31 lpadovan - * Initial revision - * - * Revision 1.5 2000/08/22 14:34:25 gerd - * Using make_spec_from_alist instead of make_spec_from_mapping. - * - * Revision 1.4 2000/08/18 21:15:25 gerd - * Minor updates because of PXP API changes. - * - * Revision 1.3 2000/07/08 17:58:17 gerd - * Updated because of PXP API changes. - * - * Revision 1.2 2000/06/04 20:25:38 gerd - * Updates because of renamed PXP modules. - * - * Revision 1.1 1999/08/22 22:29:32 gerd - * Initial revision. - * - * - *) diff --git a/helm/DEVEL/pxp/pxp/examples/simple_transformation/Makefile b/helm/DEVEL/pxp/pxp/examples/simple_transformation/Makefile deleted file mode 100644 index 27be18c30..000000000 --- a/helm/DEVEL/pxp/pxp/examples/simple_transformation/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -all: print sort delcol - -print: print.ml - ocamlfind ocamlc -o print -package pxp -linkpkg -custom \ - -predicates pxp_without_utf8 print.ml - -sort: sort.ml - ocamlfind ocamlc -o sort -package pxp -linkpkg -custom \ - -predicates pxp_without_utf8 sort.ml - -delcol: delcol.ml - ocamlfind ocamlc -o delcol -package pxp -linkpkg -custom \ - -predicates pxp_without_utf8 delcol.ml - -clean: - rm -f *.cmo *.cma *.cmi *.cmxa *.a *.o - -distclean: clean - rm -f *~ print sort delcol - -CLEAN: clean diff --git a/helm/DEVEL/pxp/pxp/examples/simple_transformation/README b/helm/DEVEL/pxp/pxp/examples/simple_transformation/README deleted file mode 100644 index 5b9212862..000000000 --- a/helm/DEVEL/pxp/pxp/examples/simple_transformation/README +++ /dev/null @@ -1,17 +0,0 @@ -Usage: - sort -by phone - match n # node_type with - T_element name when name = col -> - raise Skip - | _ -> n # orphaned_flat_clone) - tree -;; - - -let main() = - let column = ref "" in - Arg.parse - [ "-col", Arg.String (fun s -> column := s), - " (last-name|first-name|phone)"; - ] - (fun _ -> raise (Arg.Bad "Bad usage")) - "usage: sort [ options ]"; - if !column = "" then ( - prerr_endline "Column not specified!"; - exit 1; - ); - if not(List.mem !column ["last-name"; "first-name"; "phone"]) then ( - prerr_endline ("Unknown column: " ^ !column); - exit 1 - ); - try - let dtd = parse_dtd_entity default_config (from_file "record.dtd") in - let tree = - parse_content_entity default_config (from_channel stdin) dtd default_spec - in - print_endline ""; - (delcol !column tree) # write (Out_channel stdout) `Enc_iso88591 - with - x -> - prerr_endline(string_of_exn x); - exit 1 -;; - - -main();; - -(* ====================================================================== - * History: - * - * $Log$ - * Revision 1.1 2000/11/17 09:57:32 lpadovan - * Initial revision - * - * Revision 1.2 2000/08/24 09:42:52 gerd - * Updated a comment. - * - * Revision 1.1 2000/08/24 09:39:59 gerd - * Initial revision. - * - * - *) diff --git a/helm/DEVEL/pxp/pxp/examples/simple_transformation/print.ml b/helm/DEVEL/pxp/pxp/examples/simple_transformation/print.ml deleted file mode 100644 index 56f5fb69b..000000000 --- a/helm/DEVEL/pxp/pxp/examples/simple_transformation/print.ml +++ /dev/null @@ -1,60 +0,0 @@ -(* $Id$ - * ---------------------------------------------------------------------- - * - *) - -(* Read a record-list structure and print it *) -open Pxp_types;; -open Pxp_document;; -open Pxp_yacc;; - -let print tree = - iter_tree - ~pre: - (fun n -> - match n # node_type with - T_element "last-name" -> - print_endline ("Last name: " ^ n # data) - | T_element "first-name" -> - print_endline ("First name: " ^ n # data) - | T_element "phone" -> - print_endline ("Telephone number: " ^ n # data) - | _ -> - ()) - ~post: - (fun n -> - match n # node_type with - T_element "record" -> - print_newline() - | _ -> - ()) - tree -;; - -let main() = - try - let dtd = parse_dtd_entity default_config (from_file "record.dtd") in - let tree = - parse_content_entity default_config (from_channel stdin) dtd default_spec in - print tree - with - x -> - prerr_endline(string_of_exn x); - exit 1 -;; - - -main();; - -(* ====================================================================== - * History: - * - * $Log$ - * Revision 1.1 2000/11/17 09:57:32 lpadovan - * Initial revision - * - * Revision 1.1 2000/08/22 21:57:43 gerd - * Initial revision. - * - * - *) diff --git a/helm/DEVEL/pxp/pxp/examples/simple_transformation/record.dtd b/helm/DEVEL/pxp/pxp/examples/simple_transformation/record.dtd deleted file mode 100644 index b054ccd29..000000000 --- a/helm/DEVEL/pxp/pxp/examples/simple_transformation/record.dtd +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/helm/DEVEL/pxp/pxp/examples/simple_transformation/sample.xml b/helm/DEVEL/pxp/pxp/examples/simple_transformation/sample.xml deleted file mode 100644 index 00d36b09b..000000000 --- a/helm/DEVEL/pxp/pxp/examples/simple_transformation/sample.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - Stolpmann - Gerd - 997705 - - - Smith - Jack - 12345 - - - Ützgür - xxx - 7654 - - diff --git a/helm/DEVEL/pxp/pxp/examples/simple_transformation/sort.ml b/helm/DEVEL/pxp/pxp/examples/simple_transformation/sort.ml deleted file mode 100644 index 297730f66..000000000 --- a/helm/DEVEL/pxp/pxp/examples/simple_transformation/sort.ml +++ /dev/null @@ -1,83 +0,0 @@ -(* $Id$ - * ---------------------------------------------------------------------- - * - *) - -(* Read a record-list, sort it, and print it as XML *) -open Pxp_types;; -open Pxp_document;; -open Pxp_yacc;; - -let sort by tree = - map_tree - ~pre: - (fun n -> n # orphaned_flat_clone) - ~post: - (fun n -> - match n # node_type with - T_element "record-list" -> - let l = n # sub_nodes in - let l' = List.sort - (fun a b -> - let a_string = - try (find_element by a) # data - with Not_found -> "" in - let b_string = - try (find_element by b) # data - with Not_found -> "" in - Pervasives.compare a_string b_string) - l in - n # set_nodes l'; - n - | _ -> - n) - tree -;; - - -let main() = - let criterion = ref "last-name" in - Arg.parse - [ "-by", Arg.String (fun s -> criterion := s), - " (last-name|first-name|phone)"; - ] - (fun _ -> raise (Arg.Bad "Bad usage")) - "usage: sort [ options ]"; - if not(List.mem !criterion ["last-name"; "first-name"; "phone"]) then ( - prerr_endline ("Unknown criterion: " ^ !criterion); - exit 1 - ); - try - let dtd = parse_dtd_entity default_config (from_file "record.dtd") in - let tree = - parse_content_entity default_config (from_channel stdin) dtd default_spec - in - print_endline ""; - (sort !criterion tree) # write (Out_channel stdout) `Enc_iso88591 - with - x -> - prerr_endline(string_of_exn x); - exit 1 -;; - - -main();; - -(* ====================================================================== - * History: - * - * $Log$ - * Revision 1.1 2000/11/17 09:57:32 lpadovan - * Initial revision - * - * Revision 1.3 2000/08/30 16:05:44 gerd - * Minor update - * - * Revision 1.2 2000/08/24 09:40:11 gerd - * Allow that columns are missing. - * - * Revision 1.1 2000/08/22 21:57:44 gerd - * Initial revision. - * - * - *) diff --git a/helm/DEVEL/pxp/pxp/examples/validate/.cvsignore b/helm/DEVEL/pxp/pxp/examples/validate/.cvsignore deleted file mode 100644 index e125622dd..000000000 --- a/helm/DEVEL/pxp/pxp/examples/validate/.cvsignore +++ /dev/null @@ -1,13 +0,0 @@ -*.cmi -*.cmo -*.cma -*.cmx -*.o -*.a -*.cmxa -*.new -*.mlf -*.ml0 -depend -depend.pkg - diff --git a/helm/DEVEL/pxp/pxp/examples/validate/Makefile b/helm/DEVEL/pxp/pxp/examples/validate/Makefile deleted file mode 100644 index 64b691887..000000000 --- a/helm/DEVEL/pxp/pxp/examples/validate/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -# make validate: make bytecode executable -# make validate.opt: make native executable -# make clean: remove intermediate files (in this directory) -# make CLEAN: remove intermediate files (recursively) -# make distclean: remove any superflous files (recursively) -#---------------------------------------------------------------------- - -pxpvalidate: validate.ml - ocamlfind ocamlc -o pxpvalidate -package "pxp" -linkpkg validate.ml - -pxpvalidate.opt: validate.ml - ocamlfind ocamlopt -o pxpvalidate.opt -package "pxp" -linkpkg validate.ml - -#---------------------------------------------------------------------- -.PHONY: all -all: - -.PHONY: clean -clean: - rm -f *.cmi *.cmo *.cma *.cmx *.o *.a *.cmxa - -.PHONY: CLEAN -CLEAN: clean - -.PHONY: distclean -distclean: clean - rm -f *~ - rm -f pxpvalidate pxpvalidate.opt diff --git a/helm/DEVEL/pxp/pxp/examples/validate/validate.ml b/helm/DEVEL/pxp/pxp/examples/validate/validate.ml deleted file mode 100644 index 3bb83d2d1..000000000 --- a/helm/DEVEL/pxp/pxp/examples/validate/validate.ml +++ /dev/null @@ -1,126 +0,0 @@ -(* $Id$ - * ---------------------------------------------------------------------- - * - *) - - -open Pxp_document;; -open Pxp_yacc;; -open Pxp_types;; - -let error_happened = ref false;; - -let print_error e = - print_endline (string_of_exn e) -;; - -class warner = - object - method warn w = - print_endline ("WARNING: " ^ w) - end -;; - -let parse debug wf iso88591 filename = - try - (* Parse the document: *) - let parse_fn = - if wf then parse_wfdocument_entity - else - let index = new hash_index in - parse_document_entity - ?transform_dtd:None - ~id_index:(index :> 'ext index) - in - let doc = - parse_fn - { default_config with - debugging_mode = debug; - encoding = if iso88591 then `Enc_iso88591 else `Enc_utf8; - idref_pass = true; - warner = new warner - } - (from_file filename) - default_spec - in - () - with - e -> - (* Print error; remember that there was an error *) - error_happened := true; - print_error e -;; - - -let main() = - let debug = ref false in - let wf = ref false in - let iso88591 = ref false in - let files = ref [] in - Arg.parse - [ "-d", Arg.Set debug, - " turn debugging mode on"; - "-wf", Arg.Set wf, - " check only on well-formedness"; - "-iso-8859-1", Arg.Set iso88591, - " use ISO-8859-1 as internal encoding instead of UTF-8"; - ] - (fun x -> files := x :: !files) - " -usage: pxpvalidate [options] file ... - -- checks the validity of XML documents. See below for list of options. - -PXP - The XML parser for Objective Caml - -List of options:"; - files := List.rev !files; - List.iter (parse !debug !wf !iso88591) !files; -;; - - -main(); -if !error_happened then exit(1);; - -(* ====================================================================== - * History: - * - * $Log$ - * Revision 1.1 2000/11/17 09:57:31 lpadovan - * Initial revision - * - * Revision 1.10 2000/08/30 15:58:41 gerd - * Updated. - * - * Revision 1.9 2000/07/14 14:57:30 gerd - * Updated: warner - * - * Revision 1.8 2000/07/14 14:13:15 gerd - * Cosmetic changes. - * - * Revision 1.7 2000/07/14 14:11:06 gerd - * Updated because of changes of the PXP API. - * - * Revision 1.6 2000/07/08 21:53:00 gerd - * Updated because of PXP interface changes. - * - * Revision 1.5 2000/06/04 20:21:55 gerd - * Updated to new module names. - * - * Revision 1.4 2000/05/01 16:44:57 gerd - * Added check for ID uniqueness. - * Using new error formatter. - * - * Revision 1.3 1999/11/09 22:27:30 gerd - * The programs returns now an exit code of 1 if one of the - * XML files produces an error. - * - * Revision 1.2 1999/09/01 23:09:56 gerd - * Added the option -wf that switches to well-formedness checking - * instead of validation. - * - * Revision 1.1 1999/08/14 22:20:53 gerd - * Initial revision. - * - * - *) diff --git a/helm/DEVEL/pxp/pxp/examples/xmlforms/.cvsignore b/helm/DEVEL/pxp/pxp/examples/xmlforms/.cvsignore deleted file mode 100644 index e125622dd..000000000 --- a/helm/DEVEL/pxp/pxp/examples/xmlforms/.cvsignore +++ /dev/null @@ -1,13 +0,0 @@ -*.cmi -*.cmo -*.cma -*.cmx -*.o -*.a -*.cmxa -*.new -*.mlf -*.ml0 -depend -depend.pkg - diff --git a/helm/DEVEL/pxp/pxp/examples/xmlforms/Makefile b/helm/DEVEL/pxp/pxp/examples/xmlforms/Makefile deleted file mode 100644 index 5a0ba32b3..000000000 --- a/helm/DEVEL/pxp/pxp/examples/xmlforms/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -# make xmlforms: make bytecode executable -# make xmlforms.opt: make native executable -# make clean: remove intermediate files -# make CLEAN: remove intermediate files (recursively) -# make distclean: remove any superflous files -# make release: cleanup, create archive, tag CVS module -# (for developers) -#---------------------------------------------------------------------- - -.PHONY: xmlforms -xmlforms: - $(MAKE) -f Makefile.code xmlforms - -.PHONY: xmlforms.opt -xmlforms.opt: - $(MAKE) -f Makefile.code xmlforms.opt - - -.PHONY: clean -clean: - rm -f *.cmi *.cmo *.cma *.cmx *.o *.a *.cmxa - -.PHONY: CLEAN -CLEAN: clean - $(MAKE) -C styles CLEAN - -.PHONY: distclean -distclean: clean - rm -f *~ depend depend.pkg - rm -f xmlforms xmlforms.opt - $(MAKE) -C styles distclean - - diff --git a/helm/DEVEL/pxp/pxp/examples/xmlforms/Makefile.code b/helm/DEVEL/pxp/pxp/examples/xmlforms/Makefile.code deleted file mode 100644 index f99674042..000000000 --- a/helm/DEVEL/pxp/pxp/examples/xmlforms/Makefile.code +++ /dev/null @@ -1,57 +0,0 @@ -#---------------------------------------------------------------------- -# specific rules for this package: - -OBJECTS = ds_context.cmo ds_style.cmo -XOBJECTS = $(OBJECTS:.cmo=.cmx) -ARCHIVE = xmlforms.cma -XARCHIVE = xmlforms.cmxa -NAME = xmlforms -REQUIRES = camltk str pxp - -xmlforms: $(ARCHIVE) ds_app.cmo - ocamlfind ocamlc -g -o xmlforms -custom -package "$(REQUIRES)" \ - -linkpkg $(ARCHIVE) ds_app.cmo - -xmlform.opt: $(XARCHIVE) ds_app.cmx - ocamlfind ocamlopt -o xmlforms.opt -custom -package "$(REQUIRES)" \ - -linkpkg $(XARCHIVE) ds_app.cmx - -$(ARCHIVE): $(OBJECTS) - $(OCAMLC) -a -o $(ARCHIVE) $(OBJECTS) - -$(XARCHIVE): $(XOBJECTS) - $(OCAMLOPT) -a -o $(XARCHIVE) $(XOBJECTS) - -#---------------------------------------------------------------------- -# general rules: - -OPTIONS = -OCAMLC = ocamlc -g $(OPTIONS) $(ROPTIONS) -OCAMLOPT = ocamlopt -p $(OPTIONS) $(ROPTIONS) -OCAMLDEP = ocamldep $(OPTIONS) -OCAMLFIND = ocamlfind - -depend: *.ml *.mli - $(OCAMLDEP) *.ml *.mli >depend - -depend.pkg: Makefile - $(OCAMLFIND) use -p ROPTIONS= $(REQUIRES) >depend.pkg - -.SUFFIXES: .cmo .cmi .cmx .ml .mli .mll .mly - -.ml.cmx: - $(OCAMLOPT) -c $< - -.ml.cmo: - $(OCAMLC) -c $< - -.mli.cmi: - $(OCAMLC) -c $< - -.mll.ml: - ocamllex $< - -*.mli: - -include depend -include depend.pkg diff --git a/helm/DEVEL/pxp/pxp/examples/xmlforms/README b/helm/DEVEL/pxp/pxp/examples/xmlforms/README deleted file mode 100644 index 806a4094a..000000000 --- a/helm/DEVEL/pxp/pxp/examples/xmlforms/README +++ /dev/null @@ -1,61 +0,0 @@ ------------------------------------------------------------------------------ -xmlforms ------------------------------------------------------------------------------ - -THE IDEA: - -This example uses XML for two purposes: - -- The "story" and layout of the application is specified in XML -- The data records are stored in XML - -An "application" is a set of "masks" or sequences of masks, and every mask -is thought as a visible page of the application, containing layout -elements and functional elements. Layout is specified in TeX-style using -hboxes, vboxes, hspaces, vspaces. Functional elements are "entries" (input -box for a string with one line), "textboxes" (input boxes with several -lines), and buttons. - -See styles/ds-style.dtd for the DTD of an application specification, and -the other xml files in this directory for examples. - -The entries and textboxes are bound to "slots", i.e. string variables. If -the application is started, the slots are read from a file, and if the -user presses a special "save" button, the slots are stored into this file. -The format of this data file is again XML; the simplistic DTD can be found -in styles/ds-object.dtd. - - -THE IMPLEMENTATION: - -There is currently a mapping of the specifications to ocamltk, done by a -program called "xmlforms". - - -HOW TO COMPILE: - -It is assumed that "findlib" is present on your system; see ABOUT-FINDLIB -in the toplevel directory. -The "markup" module must have been installed. - -- "make xmlforms" produces a bytecode executable "xmlforms" -- "make xmlforms.opt" produces a native executable "xmlforms.opt" - -Note that you cannot start the executables directly: - - -HOW TO START AN APPLICATION: - -As "xmlforms" is a generic executable, there is a simple mechanism to bind -it to a specific instance of an application. For example, in the "styles" -subdirectory there is the application specification "crazy-style.xml". To -start it, make a symlink called "crazy" referring to the "xmlforms" -binary, set the environment variable DATASHEETS to the directory where the -DTDs and XML files can be found, and start "crazy": - - ln -s ../xmlforms crazy - DATASHEETS=. crazy my-record.xml - -(If you do not set DATASHEETS, a default directory, normally -"/opt/xmlforms/lib" is used.) - diff --git a/helm/DEVEL/pxp/pxp/examples/xmlforms/ds_app.ml b/helm/DEVEL/pxp/pxp/examples/xmlforms/ds_app.ml deleted file mode 100644 index 55589ea59..000000000 --- a/helm/DEVEL/pxp/pxp/examples/xmlforms/ds_app.ml +++ /dev/null @@ -1,107 +0,0 @@ -(* $Id$ - * ---------------------------------------------------------------------- - * - *) - -open Tk -open Pxp_types -open Pxp_document -open Pxp_yacc -open Ds_context -open Ds_style - - -let installdir = - try Sys.getenv "DATASHEETS" with - Not_found -> "/opt/xmlforms/lib" -let style_sysid = ref "" -let object_dtd_sysid = Filename.concat installdir "ds-object.dtd" -let object_dtd_root = "record" - - -let rec print_error e = - print_endline (string_of_exn e) -;; - - -let run f arg1 arg2 = - try f arg1 arg2 with - e -> print_error e -;; - - -let edit filename cmd = - (* read in style definition *) - let index = new hash_index in - let style = - parse_document_entity - ~id_index:(index :> 'ext index) - default_config - (from_file !style_sysid) - tag_map - in - let root = style # root in - root # extension # prepare (index :> 'ext index); - - let obj_dtd = - parse_dtd_entity - default_config - (from_file object_dtd_sysid) - in - obj_dtd # set_root object_dtd_root; - - let topframe = openTk() in - let context = new context filename obj_dtd index root topframe in - - Toplevel.configure topframe [ Width (Centimeters 20.0); - Height (Centimeters 12.0); - ]; - Pack.propagate_set topframe false; - Wm.title_set topframe cmd; - context # goto (root # extension # start_node_name); - mainLoop() -;; - - -let main() = - let cmd = Filename.basename Sys.argv.(0) in - match Sys.argv with - [| _; filename |] -> - style_sysid := Filename.concat installdir (cmd ^ "-style.xml"); - run edit filename cmd - | _ -> - prerr_endline ("usage: " ^ cmd ^ " filename"); - exit(1) -;; - -main();; - -(* ====================================================================== - * History: - * - * $Log$ - * Revision 1.1 2000/11/17 09:57:32 lpadovan - * Initial revision - * - * Revision 1.6 2000/07/16 19:36:03 gerd - * Updated. - * - * Revision 1.5 2000/07/08 22:03:11 gerd - * Updates because of PXP interface changes. - * - * Revision 1.4 2000/06/04 20:29:19 gerd - * Updates because of renamed PXP modules. - * - * Revision 1.3 2000/05/01 16:48:45 gerd - * Using the new error formatter. - * - * Revision 1.2 1999/12/17 21:34:29 gerd - * The name of the root element is set to "record" in the - * object_dtd; otherwise the parser would not check that the root - * element is the right element. - * - * Revision 1.1 1999/08/21 19:11:05 gerd - * Initial revision. - * - * - *) diff --git a/helm/DEVEL/pxp/pxp/examples/xmlforms/ds_context.ml b/helm/DEVEL/pxp/pxp/examples/xmlforms/ds_context.ml deleted file mode 100644 index 453ca00f0..000000000 --- a/helm/DEVEL/pxp/pxp/examples/xmlforms/ds_context.ml +++ /dev/null @@ -1,238 +0,0 @@ -(* $Id$ - * ---------------------------------------------------------------------- - * - *) - -open Pxp_types -open Pxp_document -open Pxp_yacc - -let empty_record = new element_impl (Pxp_yacc.default_extension);; -let empty_dnode = new data_impl Pxp_yacc.default_extension;; - -class context the_filename the_obj_dtd the_index the_root the_topframe = - object (self) - val filename = the_filename - val obj_dtd = the_obj_dtd - val node_index = the_index - val mutable obj = empty_record # create_element - the_obj_dtd (T_element "record") [] - val root = the_root - val topframe = the_topframe - val mutable wdg = None - - val mutable history = ( [| |] : string array ) - val mutable index = 0 - - initializer - self # load_obj - - method obj = obj - - (* history *) - - method private leave_node = - begin match wdg with - None -> () - | Some w -> Tk.destroy w - end; - wdg <- None - - method private enter_node = - let where = history.(index) in - let n = - try node_index # find where with - Not_found -> failwith ("Mask not found: " ^ where) in - let w = n # extension # create_widget topframe self in - Tk.pack [w] (n # extension # pack_opts @ [ Tk.Expand true] ); - wdg <- Some w - - - - method previous = - if index > 0 then - index <- index - 1 - else - raise Not_found; - self # leave_node; - self # enter_node; - - - method next = - if index < Array.length history - 1 then - index <- index + 1 - else - raise Not_found; - self # leave_node; - self # enter_node; - - - method goto where = - assert (index <= Array.length history); - self # leave_node; - let persisting_history = - if index < Array.length history then - Array.sub history 0 (index+1) - else - history - in - history <- Array.concat [ persisting_history; [| where |] ]; - index <- Array.length history - 1; - self # enter_node; - - - method current = - if index < Array.length history then - history.(index) - else - raise Not_found - - - (* read, write the slots of object *) - - method search_slot name = - let rec search n = - match n # node_type with - T_element "string" -> - if n # required_string_attribute "name" = name then - n - else raise Not_found - | T_element _ -> - search_list (n # sub_nodes) - | T_data -> - raise Not_found - | _ -> - assert false - - and search_list l = - match l with - x :: l' -> - (try search x with Not_found -> search_list l') - | [] -> - raise Not_found - in - search obj - - method get_slot name = - let d = (self # search_slot name) # data in - d - - method set_slot name value = - let dtd = obj # dtd in - begin try - let n = self # search_slot name in - n # delete - with - Not_found -> () - end; - let e_string = empty_record # create_element dtd (T_element "string") - [ "name", name ] in - let dnode = empty_dnode # create_data dtd value in - e_string # add_node dnode; - e_string # local_validate(); - obj # add_node e_string; - assert(self # get_slot name = value) - - (* load, save object *) - - - method load_obj = - if Sys.file_exists filename then begin - obj <- parse_content_entity - default_config - (from_file filename) - obj_dtd - default_spec - end - else begin - print_string "New file!\n"; - flush stdout - end - - - method save_obj = - let fd = open_out filename in - try - - let re1 = Str.regexp "&" in - let re2 = Str.regexp "<" in - let re3 = Str.regexp "'" in - let re4 = Str.regexp ">" in - let protect s = - let s1 = Str.global_replace re1 "&" s in - let s2 = Str.global_replace re2 "<" s1 in - let s3 = Str.global_replace re3 "'" s2 in - let s4 = Str.global_replace re2 ">" s1 in - s3 - in - - let rec iterate (n : 'node extension node as 'node) = - match n # node_type with - T_data -> - output_string fd (protect (n # data)) - | T_element name -> - output_string fd ("<" ^ name ^ "\n"); - let anames = n # attribute_names in - List.iter - (fun aname -> - let aval = n # attribute aname in - let v = - match aval with - Value s -> - aname ^ "='" ^ protect s ^ "'\n" - | Valuelist l -> - aname ^ "='" ^ String.concat " " (List.map protect l) ^ "'\n" - | Implied_value -> - "" - in - output_string fd v) - anames; - output_string fd ">"; - List.iter iterate (n # sub_nodes); - output_string fd (""); - | _ -> - assert false - in - - output_string fd "\n"; - iterate obj; - close_out fd - with - e -> - close_out fd; - raise e - - end -;; - - -(* ====================================================================== - * History: - * - * $Log$ - * Revision 1.1 2000/11/17 09:57:31 lpadovan - * Initial revision - * - * Revision 1.7 2000/08/30 15:58:49 gerd - * Updated. - * - * Revision 1.6 2000/07/23 20:25:05 gerd - * Update because of API change: local_validate. - * - * Revision 1.5 2000/07/16 19:36:03 gerd - * Updated. - * - * Revision 1.4 2000/07/08 22:03:11 gerd - * Updates because of PXP interface changes. - * - * Revision 1.3 2000/06/04 20:29:19 gerd - * Updates because of renamed PXP modules. - * - * Revision 1.2 2000/05/30 00:09:08 gerd - * Minor fix. - * - * Revision 1.1 1999/08/21 19:11:05 gerd - * Initial revision. - * - * - *) diff --git a/helm/DEVEL/pxp/pxp/examples/xmlforms/ds_style.ml b/helm/DEVEL/pxp/pxp/examples/xmlforms/ds_style.ml deleted file mode 100644 index 08d0daa03..000000000 --- a/helm/DEVEL/pxp/pxp/examples/xmlforms/ds_style.ml +++ /dev/null @@ -1,778 +0,0 @@ -(* $Id$ - * ---------------------------------------------------------------------- - * - *) - -open Pxp_types -open Pxp_document -open Ds_context - - -let get_dimension s = - let re = Str.regexp "\\([0-9]*\\(.[0-9]+\\)?\\)[ \t\n]*\\(px\\|cm\\|in\\|mm\\|pt\\)" in - if Str.string_match re s 0 then begin - let number = Str.matched_group 1 s in - let dim = Str.matched_group 3 s in - match dim with - "px" -> Tk.Pixels (int_of_float (float_of_string number)) - | "cm" -> Tk.Centimeters (float_of_string number) - | "in" -> Tk.Inches (float_of_string number) - | "mm" -> Tk.Millimeters (float_of_string number) - | "pt" -> Tk.PrinterPoint (float_of_string number) - | _ -> assert false - end - else - failwith ("Bad dimension: " ^ s) -;; - - -class virtual shared = - object(self) - - (* --- default_ext --- *) - - val mutable node = (None : shared node option) - - method clone = {< >} - method node = - match node with - None -> - assert false - | Some n -> n - method set_node n = - node <- Some n - - (* --- shared attributes: color & font settings --- *) - - val mutable fgcolor = (None : string option) - val mutable bgcolor = (None : string option) - val mutable font = (None : string option) - - method fgcolor = - (* Get the foreground color: If there is a local value, return it; - * otherwise ask parent node - *) - match fgcolor with - Some c -> c - | None -> try self # node # parent # extension # fgcolor with - Not_found -> failwith "#fgcolor" - - method bgcolor = - (* Get the background color: If there is a local value, return it; - * otherwise ask parent node - *) - match bgcolor with - Some c -> c - | None -> try self # node # parent # extension # bgcolor with - Not_found -> failwith "#bgcolor" - - method font = - (* Get the current font: If there is a local value, return it; - * otherwise ask parent node - *) - match font with - Some c -> c - | None -> try self # node # parent # extension # font with - Not_found -> failwith "#font" - - method private init_color_and_font = - let get_color n = - try - match self # node # attribute n with - Value v -> Some v - | Implied_value -> None - | _ -> assert false - with Not_found -> None in - fgcolor <- get_color "fgcolor"; - bgcolor <- get_color "bgcolor"; - font <- get_color "font"; (* sic! *) - - - method private bg_color_opt = - [ Tk.Background (Tk.NamedColor (self # bgcolor)) ] - - method private fg_color_opt = - [ Tk.Foreground (Tk.NamedColor (self # fgcolor)) ] - - method private font_opt = - [ Tk.Font (self # font) ] - - (* --- virtual --- *) - - method virtual prepare : shared Pxp_yacc.index -> unit - method virtual create_widget : Widget.widget -> context -> Widget.widget - - method pack_opts = ( [] : Tk.options list ) - method xstretchable = false - method ystretchable = false - - method accept (c:context) = () - - method private get_mask = - (* find parent which is a mask *) - let rec search n = - match n # node_type with - T_element "mask" -> - n # extension - | T_element _ -> - search (n # parent) - | _ -> - assert false - in - search (self # node) - - - method private accept_mask (c:context) = - let rec iterate n = - n # extension # accept c; - List.iter iterate (n # sub_nodes) - in - iterate (self # get_mask # node) - - - method start_node_name = - (failwith "#start_node_name" : string) - - (* --- debug --- *) - - method private name = - let nt = self # node # node_type in - match nt with - T_element n -> n - | T_data -> "#PCDATA" - | _ -> assert false - - end -;; - - -class default = - object (self) - inherit shared - - method prepare idx = - self # init_color_and_font - - method create_widget w c = - failwith "default # create_widget" - end -;; - - -let dummy_node = new element_impl (new default);; - -class application = - object (self) - inherit shared - - val mutable start_node = dummy_node - - method prepare idx = - (* prepare this node *) - self # init_color_and_font; - if fgcolor = None then fgcolor <- Some "black"; - if bgcolor = None then bgcolor <- Some "white"; - if font = None then font <- Some "fixed"; - let start = - match self # node # attribute "start" with - Value v -> v - | _ -> assert false in - start_node <- (try idx # find start with - Not_found -> failwith "Start node not found"); - (* iterate over the subtree *) - let rec iterate n = - n # extension # prepare idx; - List.iter iterate (n # sub_nodes) - in - List.iter iterate (self # node # sub_nodes) - - - method start_node_name = - match self # node # attribute "start" with - Value v -> v - | _ -> assert false - - method create_widget w c = - start_node # extension # create_widget w c - - method pack_opts = - start_node # extension # pack_opts - end -;; - - -class sequence = - object (self) - inherit shared - - method prepare idx = - self # init_color_and_font; - - method create_widget w c = - let node = List.hd (self # node # sub_nodes) in - node # extension # create_widget w c - - method pack_opts = - let node = List.hd (self # node # sub_nodes) in - node # extension # pack_opts - end -;; - - -class vbox = - object (self) - inherit shared - - val mutable att_halign = "left" - - method prepare idx = - self # init_color_and_font; - match self # node # attribute "halign" with - Value v -> att_halign <- v - | _ -> assert false - - method create_widget w c = - let f = Frame.create w (self # bg_color_opt) in - let nodes = self # node # sub_nodes in - let options = - match att_halign with - "left" -> [ Tk.Anchor Tk.W ] - | "right" -> [ Tk.Anchor Tk.E ] - | "center" -> [ Tk.Anchor Tk.Center ] - | _ -> assert false - in - List.iter - (fun n -> - let opts = n # extension # pack_opts in - let wdg = n # extension # create_widget f c in - Tk.pack [wdg] (options @ opts); - ) - nodes; - f - - method pack_opts = - match self # xstretchable, self # ystretchable with - true, false -> [ Tk.Fill Tk.Fill_X; (* Tk.Expand true *) ] - | false, true -> [ Tk.Fill Tk.Fill_Y; (* Tk.Expand true *) ] - | true, true -> [ Tk.Fill Tk.Fill_Both; (* Tk.Expand true *) ] - | false, false -> [] - - method xstretchable = - let nodes = self # node # sub_nodes in - List.exists (fun n -> n # extension # xstretchable) nodes - - method ystretchable = - let nodes = self # node # sub_nodes in - List.exists (fun n -> n # extension # ystretchable) nodes - - end - -;; - - -class mask = - object (self) - - inherit vbox - - method prepare idx = - self # init_color_and_font; - att_halign <- "left" - end -;; - - -class hbox = - object (self) - inherit shared - - val mutable att_width = None - val mutable att_halign = "left" - val mutable att_valign = "top" - - method prepare idx = - self # init_color_and_font; - begin match self # node # attribute "halign" with - Value v -> att_halign <- v - | _ -> assert false - end; - begin match self # node # attribute "valign" with - Value v -> att_valign <- v - | _ -> assert false - end; - begin match self # node # attribute "width" with - Value v -> att_width <- Some (get_dimension v) - | Implied_value -> att_width <- None - | _ -> assert false - end - - method create_widget w c = - let f1 = Frame.create w (self # bg_color_opt) in - let f_extra = - match att_width with - None -> [] - | Some wd -> - [ Canvas.create f1 - ( [ Tk.Width wd; Tk.Height (Tk.Pixels 0); - Tk.Relief Tk.Flat; - Tk.HighlightThickness (Tk.Pixels 0); - ] @ - self # bg_color_opt ) ] - in - let f2 = Frame.create f1 (self # bg_color_opt) in - let nodes = self # node # sub_nodes in - - let outer_pack_opts = - match att_halign with - "left" -> [ Tk.Anchor Tk.W ] - | "right" -> [ Tk.Anchor Tk.E ] - | "center" -> [ Tk.Anchor Tk.Center ] - | _ -> assert false - in - let inner_pack_opts = - match att_valign with - "top" -> [ Tk.Anchor Tk.N ] - | "bottom" -> [ Tk.Anchor Tk.S ] - | "center" -> [ Tk.Anchor Tk.Center ] - | _ -> assert false - in - List.iter - (fun n -> - let opts = n # extension # pack_opts in - let wdg = n # extension # create_widget f2 c in - Tk.pack [wdg] (inner_pack_opts @ [ Tk.Side Tk.Side_Left ] @ opts); - ) - nodes; - let extra_opts = self # pack_opts in - Tk.pack (f_extra @ [f2]) (outer_pack_opts @ extra_opts); - f1 - - method pack_opts = - match self # xstretchable, self # ystretchable with - true, false -> [ Tk.Fill Tk.Fill_X; (* Tk.Expand true *) ] - | false, true -> [ Tk.Fill Tk.Fill_Y; (* Tk.Expand true *) ] - | true, true -> [ Tk.Fill Tk.Fill_Both; (* Tk.Expand true *) ] - | false, false -> [] - - method xstretchable = - let nodes = self # node # sub_nodes in - List.exists (fun n -> n # extension # xstretchable) nodes - - method ystretchable = - let nodes = self # node # sub_nodes in - List.exists (fun n -> n # extension # ystretchable) nodes - - end -;; - -class vspace = - object (self) - inherit shared - - val mutable att_height = Tk.Pixels 0 - val mutable att_fill = false - - method prepare idx = - self # init_color_and_font; - begin match self # node # attribute "height" with - Value v -> att_height <- get_dimension v - | _ -> assert false - end; - begin match self # node # attribute "fill" with - Value "yes" -> att_fill <- true - | Value "no" -> att_fill <- false - | _ -> assert false - end - - - method create_widget w c = - let f = Frame.create w ( self # bg_color_opt ) in - let strut = - Canvas.create f - ( [ Tk.Height att_height; Tk.Width (Tk.Pixels 0); - Tk.Relief Tk.Flat; - Tk.HighlightThickness (Tk.Pixels 0); - ] @ - self # bg_color_opt ) in - if att_fill then - Tk.pack [strut] [Tk.Fill Tk.Fill_Y; Tk.Expand true] - else - Tk.pack [strut] []; - f - - method pack_opts = - if att_fill then [ Tk.Fill Tk.Fill_Y; Tk.Expand true ] else [] - - method ystretchable = att_fill - end -;; - -class hspace = - object (self) - inherit shared - - - val mutable att_width = Tk.Pixels 0 - val mutable att_fill = false - - method prepare idx = - self # init_color_and_font; - begin match self # node # attribute "width" with - Value v -> att_width <- get_dimension v - | _ -> assert false - end; - begin match self # node # attribute "fill" with - Value "yes" -> att_fill <- true - | Value "no" -> att_fill <- false - | _ -> assert false - end - - - method create_widget w c = - let f = Frame.create w ( self # bg_color_opt ) in - let strut = - Canvas.create f - ( [ Tk.Width att_width; Tk.Height (Tk.Pixels 0); - Tk.Relief Tk.Flat; - Tk.HighlightThickness (Tk.Pixels 0); - ] @ - self # bg_color_opt ) in - if att_fill then - Tk.pack [strut] [Tk.Fill Tk.Fill_X; Tk.Expand true] - else - Tk.pack [strut] []; - f - - method pack_opts = - if att_fill then [ Tk.Fill Tk.Fill_X; Tk.Expand true ] else [] - - method xstretchable = att_fill - end -;; - -class label = - object (self) - inherit shared - - val mutable att_textwidth = (-1) - val mutable att_halign = "left" - - method prepare idx = - self # init_color_and_font; - att_textwidth <- (match self # node # attribute "textwidth" with - Value v -> - let w = try int_of_string v - with _ -> failwith ("Not an integer: " ^ v) in - w - | Implied_value -> - (-1) - | _ -> assert false); - att_halign <- (match self # node # attribute "halign" with - Value v -> v - | _ -> assert false); - - - method create_widget w c = - let opts_textwidth = if att_textwidth < 0 then [] else - [ Tk.TextWidth att_textwidth ] in - let opts_halign = - match att_halign with - "left" -> [ Tk.Anchor Tk.W ] - | "right" -> [ Tk.Anchor Tk.E ] - | "center" -> [ Tk.Anchor Tk.Center ] - | _ -> assert false - in - let opts_content = - [ Tk.Text (self # node # data) ] in - let label = Label.create w (opts_textwidth @ opts_halign @ - opts_content @ self # bg_color_opt @ - self # fg_color_opt @ self # font_opt) in - label - - end -;; - -class entry = - object (self) - inherit shared - - val mutable tv = lazy (Textvariable.create()) - val mutable att_textwidth = (-1) - val mutable att_slot = "" - - method prepare idx = - self # init_color_and_font; - tv <- lazy (Textvariable.create()); - att_textwidth <- (match self # node # attribute "textwidth" with - Value v -> - let w = try int_of_string v - with _ -> failwith ("Not an integer: " ^ v) in - w - | Implied_value -> - (-1) - | _ -> assert false); - att_slot <- (match self # node # attribute "slot" with - Value v -> v - | _ -> assert false); - - method create_widget w c = - let opts_textwidth = if att_textwidth < 0 then [] else - [ Tk.TextWidth att_textwidth ] in - let e = Entry.create w ( [ Tk.TextVariable (Lazy.force tv) ] @ - self # fg_color_opt @ - self # bg_color_opt @ - self # font_opt @ - opts_textwidth - ) in - let s = - try c # get_slot att_slot with - Not_found -> self # node # data in - Textvariable.set (Lazy.force tv) s; - e - - method accept c = - c # set_slot att_slot (Textvariable.get (Lazy.force tv)) - - end -;; - -class textbox = - object (self) - inherit shared - - val mutable att_textwidth = (-1) - val mutable att_textheight = (-1) - val mutable att_slot = "" - val mutable last_widget = None - - method prepare idx = - self # init_color_and_font; - att_textwidth <- (match self # node # attribute "textwidth" with - Value v -> - let w = try int_of_string v - with _ -> failwith ("Not an integer: " ^ v) in - w - | Implied_value -> - (-1) - | _ -> assert false); - att_textheight <- (match self # node # attribute "textheight" with - Value v -> - let w = try int_of_string v - with _ -> failwith ("Not an integer: " ^ v) in - w - | Implied_value -> - (-1) - | _ -> assert false); - att_slot <- (match self # node # attribute "slot" with - Value v -> v - | Implied_value -> "" - | _ -> assert false); - - - method create_widget w c = - let opts_textwidth = if att_textwidth < 0 then [] else - [ Tk.TextWidth att_textwidth ] in - let opts_textheight = if att_textheight < 0 then [] else - [ Tk.TextHeight att_textheight ] in - let f = Frame.create w (self # bg_color_opt) in - let vscrbar = Scrollbar.create f [ Tk.Orient Tk.Vertical ] in - let e = Text.create f ( [ ] @ - self # fg_color_opt @ - self # bg_color_opt @ - self # font_opt @ - opts_textwidth @ opts_textheight - ) in - last_widget <- Some e; - Scrollbar.configure vscrbar [ Tk.ScrollCommand - (fun s -> Text.yview e s); - Tk.Width (Tk.Pixels 9) ]; - Text.configure e [ Tk.YScrollCommand - (fun a b -> Scrollbar.set vscrbar a b) ]; - let s = - if att_slot <> "" then - try c # get_slot att_slot with - Not_found -> self # node # data - else - self # node # data - in - (* Text.insert appends always a newline to the last line; so strip - * an existing newline first - *) - let s' = - if s <> "" & s.[String.length s - 1] = '\n' then - String.sub s 0 (String.length s - 1) - else - s in - Text.insert e (Tk.TextIndex(Tk.End,[])) s' []; - if att_slot = "" then - Text.configure e [ Tk.State Tk.Disabled ]; - Tk.pack [e] [ Tk.Side Tk.Side_Left ]; - Tk.pack [vscrbar] [ Tk.Side Tk.Side_Left; Tk.Fill Tk.Fill_Y ]; - f - - method accept c = - if att_slot <> "" then - match last_widget with - None -> () - | Some w -> - let s = - Text.get - w - (Tk.TextIndex(Tk.LineChar(1,0),[])) - (Tk.TextIndex(Tk.End,[])) in - c # set_slot att_slot s - - end -;; - -class button = - object (self) - inherit shared - - val mutable att_label = "" - val mutable att_action = "" - val mutable att_goto = "" - - method prepare idx = - self # init_color_and_font; - att_label <- (match self # node # attribute "label" with - Value v -> v - | _ -> assert false); - att_action <- (match self # node # attribute "action" with - Value v -> v - | _ -> assert false); - att_goto <- (match self # node # attribute "goto" with - Value v -> v - | Implied_value -> "" - | _ -> assert false); - if att_action = "goto" then begin - try let _ = idx # find att_goto in () with - Not_found -> failwith ("Target `" ^ att_goto ^ "' not found") - end; - if att_action = "list-prev" or att_action = "list-next" then begin - let m = self # get_mask in - if m # node # parent # node_type <> T_element "sequence" then - failwith ("action " ^ att_action ^ " must not be used out of "); - end; - - - method create_widget w c = - let cmd () = - self # accept_mask c; - match att_action with - "goto" -> - c # goto att_goto - | "save" -> - c # save_obj - | "exit" -> - Protocol.closeTk() - | "save-exit" -> - c # save_obj; - Protocol.closeTk() - | "list-prev" -> - let m = self # get_mask # node in - let s = m # parent in - let rec search l = - match l with - x :: y :: l' -> - if y == m then - match x # attribute "name" with - Value s -> c # goto s - | _ -> assert false - else - search (y :: l') - | _ -> () - in - search (s # sub_nodes) - | "list-next" -> - let m = self # get_mask # node in - let s = m # parent in - let rec search l = - match l with - x :: y :: l' -> - if x == m then - match y # attribute "name" with - Value s -> c # goto s - | _ -> assert false - else - search (y :: l') - | _ -> () - in - search (s # sub_nodes) - | "hist-prev" -> - (try c # previous with Not_found -> ()) - | "hist-next" -> - (try c # next with Not_found -> ()) - | _ -> () - in - let b = Button.create w ( [ Tk.Text att_label; Tk.Command cmd ] @ - self # fg_color_opt @ - self # bg_color_opt @ - self # font_opt ) in - b - - - end -;; - - -(**********************************************************************) - -open Pxp_yacc - -let tag_map = - make_spec_from_mapping - ~data_exemplar:(new data_impl (new default)) - ~default_element_exemplar:(new element_impl (new default)) - ~element_mapping: - (let m = Hashtbl.create 50 in - Hashtbl.add m "application" - (new element_impl (new application)); - Hashtbl.add m "sequence" - (new element_impl (new sequence)); - Hashtbl.add m "mask" - (new element_impl (new mask)); - Hashtbl.add m "vbox" - (new element_impl (new vbox)); - Hashtbl.add m "hbox" - (new element_impl (new hbox)); - Hashtbl.add m "vspace" - (new element_impl (new vspace)); - Hashtbl.add m "hspace" - (new element_impl (new hspace)); - Hashtbl.add m "label" - (new element_impl (new label)); - Hashtbl.add m "entry" - (new element_impl (new entry)); - Hashtbl.add m "textbox" - (new element_impl (new textbox)); - Hashtbl.add m "button" - (new element_impl (new button)); - m) - () -;; - -(* ====================================================================== - * History: - * - * $Log$ - * Revision 1.1 2000/11/17 09:57:31 lpadovan - * Initial revision - * - * Revision 1.5 2000/08/30 15:58:49 gerd - * Updated. - * - * Revision 1.4 2000/07/16 19:36:03 gerd - * Updated. - * - * Revision 1.3 2000/07/08 22:03:11 gerd - * Updates because of PXP interface changes. - * - * Revision 1.2 2000/06/04 20:29:19 gerd - * Updates because of renamed PXP modules. - * - * Revision 1.1 1999/08/21 19:11:05 gerd - * Initial revision. - * - * - *) diff --git a/helm/DEVEL/pxp/pxp/examples/xmlforms/styles/Makefile b/helm/DEVEL/pxp/pxp/examples/xmlforms/styles/Makefile deleted file mode 100644 index c0068a59d..000000000 --- a/helm/DEVEL/pxp/pxp/examples/xmlforms/styles/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -.PHONY: all -all: - -.PHONY: clean -clean: - -.PHONY: CLEAN -CLEAN: clean - -.PHONY: distclean -distclean: clean - rm -f *~ - -.PHONY: symlinks -symlinks: - for x in *-style.xml; do ln -s ../xmlforms $${x%-style.xml} || true; done diff --git a/helm/DEVEL/pxp/pxp/examples/xmlforms/styles/address-style.xml b/helm/DEVEL/pxp/pxp/examples/xmlforms/styles/address-style.xml deleted file mode 100644 index d3af5daa0..000000000 --- a/helm/DEVEL/pxp/pxp/examples/xmlforms/styles/address-style.xml +++ /dev/null @@ -1,361 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - '> - - - - - - - - - - - - - '> - - - - - - - - - - - - - '> - - - - - - - - - - - -