HardcoreProcessing/ 40755 1750 1750 0 6774200052 12746 5 ustar anoq anoq HardcoreProcessing/TheConstruct/ 40755 1750 1750 0 6774177576 15423 5 ustar anoq anoq HardcoreProcessing/TheConstruct/COPYING 100644 1750 1750 36073 6774176563 16577 0 ustar anoq anoq
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
HardcoreProcessing/TheConstruct/licence/ 40755 1750 1750 0 6774176563 17020 5 ustar anoq anoq HardcoreProcessing/TheConstruct/licence/COPYING 100644 1750 1750 36073 6774176563 20201 0 ustar anoq anoq
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
HardcoreProcessing/TheConstruct/docs/ 40755 1750 1750 0 6774176563 16346 5 ustar anoq anoq HardcoreProcessing/TheConstruct/docs/tex/ 40755 1750 1750 0 6774176563 17146 5 ustar anoq anoq HardcoreProcessing/TheConstruct/docs/tex/TheConstruct.tex 100644 1750 1750 11452 6774176563 22435 0 ustar anoq anoq \documentclass[a4paper,final,10pt]{article}
\title{The Construct}
\author{\'{A}NOQ of the Sun, Hardcore Processing
\footnote{\copyright 1999 \'{A}NOQ of the Sun (alias Johnny Andersen)} }
\begin{document}
\maketitle
\section*{The Construct}
This is a GUI builder for \verb'ML::AbstractUI', which is also on this homepage.
Actually it is the first GUI builder ever written in \verb'Standard ML'!
It is all distributed under the GNU General Public Licence (\verb'GPL'),
which (in short) only allows you to write any extensions for The Construct if
you distribute all the sourcecode for your extensions
under a \verb'GPL' compatiple licence. However you may of course
use the user interfaces generated with The Construct for whatever
you like.
\subsection*{Requirements}
To use The Construct you will need one of the supported hardware platforms.
When compiling applications with user interfaces generated
with The Construct or when compiling The Construct itself,
the requirements are the same as those for \verb'ML::AbstractUI'.
\subsection*{Downloading}
If you just want to see The Construct running, all you need is a binary
distribution. There is one for \verb'MS-Windows' here:
TheConstruct19990927x86Win.tar.gz.
And one for \verb'Linux/X-Windows' here:
TheConstruct19990927x86Linux.tar.gz.
These two files are packed with tar, so to unpack you do something like \verb'gzip -d file.tar.gz'
followed by \verb'tar -xvf file.tar'.
You can also download the source code which is ready for compilation with \verb'SML/NJ' here:
TheConstruct19990927SMLNJsrc.tar.
And a version prepared for \verb'MLWorks' here:
TheConstruct19990927MLWsrc.tar.
These are packed with tar, so to unpack you do something like \verb'tar -xvf file.tar'.
Each of these distributions expect that you have installed \verb'ML::AbstractUI'
and that you unpack the distribution from the same directory that
you unpacked \verb'ML::AbstractUI' from. This is to make sure that
the directory called TheConstruct is put into the directory called
HardcoreProcessing in both distributions so that all paths in the
project are valid.
\subsection*{Compiling}
To compile with the \verb'SML/NJ' version, go to the directory
\verb'HardcoreProcessing/TheConstruct/srcSML' in the distribution, start
the compiler with \verb'CM' and \verb'CML' and call the usual
\verb'CM.make();'. Then call \verb'TheConstruct.start ();' to start it.
With MLWorks you load the project file for the desired demo in the directory
\verb'HardcoreProcessing/TheConstruct/srcSML'
in the distribution. Then hit \verb'project->compile target sources'
in the menu, wait for a couple of hours, hit \verb'project->load targets'
and wait for a couple of hours again. Then call \verb'TheConstruct.start ();'
to start it.
\subsection*{Documentation}
The documentation for The Construct is very short and follows here:
In The Construct you can either create your own user interfaces from
scratch or you can load existing user interfaces and modify them.
To create a completely new and empty window, use the
\verb'Window' button in the \verb'UI Palette' window. To add user interface
controls to the window, press the button for the control you need in the
\verb'UI Palette' window, followed by a click on the window where the
control should be.
You can customize your window and the user interface controls that you
have created by clicking on them and using the \verb'Protocol accessor'
window. Some of the protocols are marked with \verb'N/A' or
\verb'(only for bindings)', which means that you can't edit them in
\verb'The Construct' - either because
it does not make sense or because a protocol editor has not yet been
implemented for the protocol.
You can create a binding for a protocol by toggling the button
on the left of the \verb'Protocol accessor' window for the
desired protocol and writing the name of the binding in the
textfield.
To load an existing user interface, type the name of the
file in the textfield beside the button \verb'Load' in
the \verb'Operator' window and press the \verb'Load'
button. Saving a user interface is done similarly with
the save button, which will export the user interface
as \verb'Standard ML' code ready to be compiled directly
into an application or to be loaded into The Construct
later.
Protocols with bindings will be accessible from
your application when you compile an exported user interface
file into the application. You can look at the generated
file to see how.
That's it - now go create some graphical user interfaces! :)
\end{document}
HardcoreProcessing/TheConstruct/docs/html/ 40755 1750 1750 0 6774176563 17312 5 ustar anoq anoq HardcoreProcessing/TheConstruct/docs/html/TheConstruct.html 100644 1750 1750 14322 6774176563 22744 0 ustar anoq anoq
Hardcore Processing - homepage
THE CONSTRUCT
The Construct
This is a GUI builder for ML::AbstractUI, which is also on this homepage.
Actually it is the first GUI builder ever written in Standard ML!
It is all distributed under the GNU General Public Licence (GPL),
which (in short) only allows you to write any extensions for The Construct if
you distribute all the sourcecode for your extensions
under a GPL compatiple licence. However you may of course
use the user interfaces generated with The Construct for whatever
you like.
Requirements
To use The Construct you will need one of the supported hardware platforms.
When compiling applications with user interfaces generated
with The Construct or when compiling The Construct itself,
the requirements are the same as those for ML::AbstractUI.
Downloading
If you just want to see The Construct running, all you need is a binary
distribution. There is one for 'MS-Windows' here:
TheConstruct19990927x86Win.tar.gz.
And one for 'Linux/X-Windows' here:
TheConstruct19990927x86Linux.tar.gz.
These two files are packed with tar, so to unpack you do something like gzip -d file.tar.gz
followed by tar -xvf file.tar.
You can also download the source code which is ready for compilation with SML/NJ here:
TheConstruct19990927SMLNJsrc.tar.
And a version prepared for MLWorks here:
TheConstruct19990927MLWsrc.tar.
These are packed with tar, so to unpack you do something like tar -xvf file.tar.
Each of these distributions expect that you have installed ML::AbstractUI
and that you unpack the distribution from the same directory that
you unpacked ML::AbstractUI from. This is to make sure that
the directory called TheConstruct is put into the directory called
HardcoreProcessing in both distributions so that all paths in the
project are valid.
Compiling
To compile with the SML/NJ version, go to the directory
'HardcoreProcessing/TheConstruct/srcSML' in the distribution, start
the compiler with 'CM' and 'CML' and call the usual
'CM.make();'. Then call 'TheConstruct.start ();' to start it.
With MLWorks you load the project file for the desired demo in the directory
'HardcoreProcessing/TheConstruct/srcSML'
in the distribution. Then hit 'project->compile target sources'
in the menu, wait for a couple of hours, hit 'project->load targets'
and wait for a couple of hours again. Then call 'TheConstruct.start ();'
to start it.
Documentation
The documentation for The Construct is very short and follows here:
In The Construct you can either create your own user interfaces from
scratch or you can load existing user interfaces and modify them.
To create a completely new and empty window, use the
'Window' button in the 'UI Palette' window. To add user interface
controls to the window, press the button for the control you need in the
'UI Palette' window, followed by a click on the window where the
control should be.
You can customize your window and the user interface controls that you
have created by clicking on them and using the 'Protocol accessor'
window. Some of the protocols are marked with 'N/A' or
'(only for bindings)', which means that you can't edit them in
The Construct - either because
it does not make sense or because a protocol editor has not yet been
implemented for the protocol.
You can create a binding for a protocol by toggling the button
on the left of the 'Protocol accessor' window for the
desired protocol and writing the name of the binding in the
textfield.
To load an existing user interface, type the name of the
file in the textfield beside the button 'Load' in
the 'Operator' window and press the 'Load'
button. Saving a user interface is done similarly with
the save button, which will export the user interface
as Standard ML code ready to be compiled directly
into an application or to be loaded into The Construct
later.
Protocols with bindings will be accessible from
your application when you compile an exported user interface
file into the application. You can look at the generated
file to see how.
That's it - now go create some graphical user interfaces! :)
HardcoreProcessing/TheConstruct/docs/postscript/ 40755 1750 1750 0 6774176563 20560 5 ustar anoq anoq HardcoreProcessing/TheConstruct/docs/postscript/TheConstruct.ps 100644 1750 1750 162326 6774176563 23720 0 ustar anoq anoq %!PS-Adobe-2.0
%%Creator: dvips(k) 5.82 Copyright 1998 Radical Eye Software
%%Title: TheConstruct.dvi
%%Pages: 2
%%PageOrder: Ascend
%%BoundingBox: 0 0 596 842
%%EndComments
%DVIPSWebPage: (www.radicaleye.com)
%DVIPSCommandLine: dvips -o TheConstruct.ps TheConstruct.dvi
%DVIPSParameters: dpi=600, compressed
%DVIPSSource: TeX output 1999.09.28:1833
%%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/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 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/IE 256 array N 2 string 0 1 255{IE 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
TeXDict begin 39158280 55380996 1000 600 600 (TheConstruct.dvi)
@start
%DVIPSBitmapFont: Fa cmr8 8 26
/Fa 26 122 df<13E0EA01F01203A2EA07E0EA0FC0EA1F00121E5A5A12E012400C0C72AD
23>19 D<13031307130E131C1338137013F0EA01E013C01203EA0780A2EA0F00A2121EA3
5AA45AA512F8A25AAB7EA21278A57EA47EA37EA2EA0780A2EA03C0120113E0EA00F01370
1338131C130E1307130310437AB11B>40 D<12C07E12707E7E7E120FEA0780120313C0EA
01E0A2EA00F0A21378A3133CA4131EA5131FA2130FAB131FA2131EA5133CA41378A313F0
A2EA01E0A2EA03C013801207EA0F00120E5A5A5A5A5A10437CB11B>I<130C133C137CEA
03FC12FFEAFC7C1200B3B113FE387FFFFEA2172C7AAB23>49 D57 D<4A7E4A7EA34A7EA24A7EA3EC1BF81419A2EC30FCA2EC70FEEC607EA24A7E
A349486C7EA2010380EC000FA201066D7EA3496D7EA2011FB57EA29038180001496D7EA3
49147EA201E0147F4980A20001ED1F801203000716C0D80FF0EC3FE0D8FFFC0103B5FCA2
302F7EAE35>65 D<90387FFFF0A201001300147EB3AD123812FEA314FE5C1278387001F8
6C485A381E07E03807FF80D801FCC7FC1C2E7DAC24>74 D78 DI81
D<90383F80303901FFF0703807C07C390F000EF0001E13074813034813011400127000F0
1470A315307EA26C1400127E127FEA3FE013FE381FFFE06C13FC6C13FF00011480D8003F
13E013039038003FF0EC07F81401140015FC157C12C0153CA37EA215787E6C14706C14F0
6CEB01E039F78003C039E3F00F0038E07FFE38C00FF01E2F7CAD27>83
D<13FF000713C0380F01F0381C00F8003F137C80A2143F001E7FC7FCA4EB07FF137F3801
FE1FEA07F0EA1FC0EA3F80EA7F00127E00FE14065AA3143F7E007E137F007FEBEF8C391F
83C7FC390FFF03F83901FC01E01F207D9E23>97 D99
D<15F8141FA214011400ACEB0FE0EB7FF83801F81E3803E0073807C003380F8001EA1F00
481300123E127EA25AA9127C127EA2003E13017EEB8003000F13073903E00EFC3A01F03C
FFC038007FF090391FC0F800222F7EAD27>II<
EB03F0EB0FFCEB3E1EEB7C3F13F8EA01F0A23803E00C1400AAB512E0A23803E000B3A648
7E387FFF80A2182F7FAE16>I104
DI
108 D<3807C0FE39FFC3FF809038C703E0390FDE01F0EA07F8496C7EA25BA25BB2486C48
7E3AFFFE1FFFC0A2221E7E9D27>110 DI<380781F8
38FF87FEEB8E3FEA0F9CEA07B813B0EBF01EEBE000A45BB0487EB5FCA2181E7E9D1C>
114 D<3801FE183807FFB8381E01F8EA3C00481378481338A21418A27E7EB41300EA7FF0
6CB4FC6C13C06C13F0000113F838001FFC130138C0007E143EA26C131EA27EA26C133CA2
6C137838FF01F038E3FFC000C0130017207E9E1C>I<1360A413E0A312011203A2120712
1FB512F0A23803E000AF1418A714383801F03014703800F860EB3FE0EB0F80152A7FA81B
>II<3AFFFC01FFC0A23A0FE0007E00000714
7C1538000314306D137000011460A26C6C5BA2EBFC01017C5BEB7E03013E90C7FCA2EB1F
06A2148EEB0F8CA2EB07D8A2EB03F0A36D5AA26D5AA2495AA2130391C8FC1278EAFC06A2
5B131CEA7838EA7070EA3FE0EA0F80222B7F9C25>121 D E
%EndDVIPSBitmapFont
%DVIPSBitmapFont: Fb cmsy6 6 1
/Fb 1 4 df<136013701360A20040132000E0137038F861F0387E67E0381FFF803807FE
00EA00F0EA07FE381FFF80387E67E038F861F038E060700040132000001300A213701360
14157B9620>3 D E
%EndDVIPSBitmapFont
%DVIPSBitmapFont: Fc cmbx12 12 20
/Fc 20 120 df67
DI82 D<903801FFE0011F13FE017F6D7E48B612E03A03FE007FF84848EB1FFC6D
6D7E486C6D7EA26F7FA36F7F6C5A6C5AEA00F090C7FCA40203B5FC91B6FC1307013F13F1
9038FFFC01000313E0000F1380381FFE00485A5B127F5B12FF5BA35DA26D5B6C6C5B4B13
F0D83FFE013EEBFFC03A1FFF80FC7F0007EBFFF86CECE01FC66CEB8007D90FFCC9FC322F
7DAD36>97 D99 DII103 D<137C48B4FC4813804813C0A24813E0A56C13
C0A26C13806C1300EA007C90C7FCAAEB7FC0EA7FFFA512037EB3AFB6FCA518467CC520>
105 D108
D<90277F8007FEEC0FFCB590263FFFC090387FFF8092B5D8F001B512E002816E4880913D
87F01FFC0FE03FF8913D8FC00FFE1F801FFC0003D99F009026FF3E007F6C019E6D013C13
0F02BC5D02F86D496D7EA24A5D4A5DA34A5DB3A7B60081B60003B512FEA5572D7CAC5E>
I<90397F8007FEB590383FFF8092B512E0028114F8913987F03FFC91388F801F00039039
9F000FFE6C139E14BC02F86D7E5CA25CA35CB3A7B60083B512FEA5372D7CAC3E>II<90397FC00FF8B590B57E02C314
E002CF14F89139DFC03FFC9139FF001FFE000301FCEB07FF6C496D13804A15C04A6D13E0
5C7013F0A2EF7FF8A4EF3FFCACEF7FF8A318F017FFA24C13E06E15C06E5B6E4913806E49
13006E495A9139DFC07FFC02CFB512F002C314C002C091C7FCED1FF092C9FCADB67EA536
407DAC3E>II<90
387F807FB53881FFE0028313F0028F13F8ED8FFC91389F1FFE000313BE6C13BC14F8A214
F0ED0FFC9138E007F8ED01E092C7FCA35CB3A5B612E0A5272D7DAC2E>I<90391FFC0380
90B51287000314FF120F381FF003383FC00049133F48C7121F127E00FE140FA215077EA2
7F01E090C7FC13FE387FFFF014FF6C14C015F06C14FC6C800003806C15806C7E010F14C0
EB003F020313E0140000F0143FA26C141F150FA27EA26C15C06C141FA26DEB3F8001E0EB
7F009038F803FE90B55A00FC5CD8F03F13E026E007FEC7FC232F7CAD2C>III119
D E
%EndDVIPSBitmapFont
%DVIPSBitmapFont: Fd cmtt10 10 49
/Fd 49 123 df<143814FC13011303EB07F8EB0FF0EB1FC0EB3F80EB7F0013FE485A485A
5B12075B120F5B485AA2123F90C7FCA25A127EA312FE5AAC7E127EA3127F7EA27F121FA2
6C7E7F12077F12037F6C7E6C7E137FEB3F80EB1FC0EB0FF0EB07F8EB03FC130113001438
164272B92C>40 D<127012FC7E7E6C7E6C7EEA0FE06C7E6C7E6C7E6C7E137F7F1480131F
14C0130FEB07E0A214F01303A214F81301A314FC1300AC130114F8A3130314F0A2130714
E0A2EB0FC0131F1480133F14005B13FE485A485A485A485AEA3FC0485A48C7FC5A5A1270
164279B92C>I<007FB6FCB71280A46C150021067B9B2C>45 D<121FEA3F80EA7FC0EAFF
E0A5EA7FC0EA3F80EA1F000B0B708A2C>I<1507ED0F80151FA2153F16005D157E15FE5D
14015D14035DA214075D140F5D141F5D143F92C7FC5C147E14FE5CA213015C13035C1307
5C130F5C131F5CA2133F91C8FC5B137E13FE5B12015B12035B12075BA2120F5B121F5B12
3F90C9FC5A127E12FE5AA25A127821417BB92C>I<121FEA3F80EA7FC0EAFFE0A5EA7FC0
EA3F80EA1F00C7FCAE121FEA3F80EA7FC0EAFFE0A5EA7FC0EA3F80EA1F000B2470A32C>
58 DI<127012FC7E6C7E13E06C7EEA1FFC6C7E3803FF80C67FEB7FF0EB1FF8EB
0FFEEB03FF6D13C06D6C7EEC3FF8EC0FFC6EB4FC0201138080A25C02071300EC0FFCEC3F
F8EC7FE049485A4990C7FCEB0FFEEB1FF8EB7FF0EBFFC000035BD80FFEC8FC485AEA7FF0
485A138048C9FC5A1270212A7BAD2C>62 D<14FE497EA4497FA214EFA2130781A214C7A2
010F7FA314C390381F83F0A590383F01F8A490387E00FCA549137E90B512FEA34880A290
38F8003FA34848EB1F80A4000715C049130FD87FFEEBFFFC6D5AB514FE6C15FC497E2734
7EB32C>65 D<02FF13700107EBE0F84913F9013F13FD4913FFEBFF813901FE007F484813
1FD807F0130F1507485A491303485A150148C7FCA25A007EEC00F01600A212FE5AAB7E12
7EA3007F15F06CEC01F8A26C7EA26C6C13036D14F06C6C130716E0D803FC131F6C6CEB3F
C03A00FF81FF806DB512006D5B010F5B6D13F00100138025357DB32C>67
D<903901FC038090390FFF87C04913EF017F13FF90B6FC4813073803FC01497E4848137F
4848133F49131F121F5B003F140F90C7FCA2127EED078092C7FCA212FE5AA8913803FFF8
4A13FCA27E007E6D13F89138000FC0A36C141FA27F121F6D133F120F6D137F6C7E6C6C13
FF6D5A3801FF076C90B5FC6D13EF011F13CF6DEB0780D901FCC7FC26357DB32C>71
DI<007FB512F8B612FCA36C14F839000F
C000B3B3A5007FB512F8B612FCA36C14F81E3379B22C>I<0107B512804914C0A36D1480
90390003F000B3AF1218127EA2B4FCA24A5A48130F007F131F9038C07FC06CB55A6C91C7
FC6C5B000313F838007FC022347BB22C>I<387FFFE0B57EA36C5BD803F0C8FCB3AE16F0
ED01F8A8007FB6FCB7FCA36C15F025337DB22C>76 DIII<007FB512C0B6
12F88115FF6C15802603F00013C0153FED0FE0ED07F0A2150316F81501A6150316F01507
A2ED0FE0ED3FC015FF90B61280160015FC5D15C001F0C8FCB0387FFF80B57EA36C5B2533
7EB22C>I<90381FF80790B5EA0F804814CF000714FF5A381FF01F383FC003497E48C7FC
007E147F00FE143F5A151FA46CEC0F00007E91C7FC127F7FEA3FE0EA1FFCEBFFC06C13FC
0003EBFFC06C14F06C6C7F01077F9038007FFEEC07FF02001380153FED1FC0A2ED0FE0A2
0078140712FCA56CEC0FC0A26CEC1F806D133F01E0EB7F009038FE01FF90B55A5D00F914
F0D8F83F13C0D8700790C7FC23357CB32C>83 D<007FB612FCB712FEA43AFC007E007EA7
0078153CC71400B3AF90383FFFFCA2497F6D5BA227337EB22C>I<3B7FFF803FFFC0B56C
4813E0A36C496C13C03B03F00001F800B3AF6D130300015DA26D130700005D6D130F017F
495A6D6C485AECE0FF6DB5C7FC6D5B010313F86D5B9038003F802B3480B22C>I87
D<3A3FFF03FFE0484913F0148714076C6D13E03A01F800FE007F0000495A13FE017E5BEB
7F03013F5B1487011F5B14CF010F5B14FF6D5BA26D90C7FCA26D5AA26D5AA2497EA2497E
A2497F81EB0FCF81EB1FC7EC87F0EB3F83EC03F8EB7F01017E7FEBFE00497F0001147E49
137F000380491480151FD87FFEEBFFFC6D5AB514FE6C15FC497E27337EB22C>I<3801FF
F0000713FE001F6D7E15E048809038C01FF81407EC01FC381F80000006C77EC8127EA3EC
FFFE131F90B5FC1203120F48EB807E383FF800EA7FC090C7FC12FE5AA47E007F14FEEB80
03383FE01F6CB612FC6C15FE6C14BF0001EBFE1F3A003FF007FC27247CA32C>97
DI<903803FFE0011F13F8017F13FE48B5FC48804848C6FCEA0FF0485A49137E4848
131890C9FC5A127EA25AA8127EA2127F6C140F6DEB1F806C7E6D133F6C6CEB7F003907FE
03FF6CB55A6C5C6C6C5B011F13E0010390C7FC21247AA32C>IIIIII<1307
EB1FC0A2497EA36D5AA20107C7FC90C8FCA7387FFFC080B5FC7EA2EA0007B3A8007FB512
FCB612FEA36C14FC1F3479B32C>I<140EEC3F80A2EC7FC0A3EC3F80A2EC0E0091C7FCA7
48B512804814C0A37EC7120FB3B3A2141F003C1480007E133FB414005CEB01FEEBFFFC6C
5B5C001F5B000790C7FC1A467CB32C>II<387FFFE0B57EA37EEA0003B3B3A5007FB612
80B712C0A36C158022337BB22C>I<3A7F83F007E09039CFFC1FF83AFFDFFE3FFCD87FFF
13FF91B57E3A07FE1FFC3E01FCEBF83F496C487E01F013E001E013C0A301C01380B33B7F
FC3FF87FF0027F13FFD8FFFE6D13F8D87FFC4913F0023F137F2D2481A32C>I<397FF01F
E039FFF87FFC9038F9FFFE01FB7F6CB6FC00019038F03F80ECC01F02807FEC000F5B5BA2
5BB3267FFFE0B5FCB500F11480A36C01E0140029247FA32C>II<397FF01FE039FF
F8FFF801FB13FE90B6FC6C158000019038F07FC09138801FE091380007F049EB03F85BED
01FC491300A216FE167EA816FE6D14FCA2ED01F86D13036DEB07F0150F9138801FE09138
E07FC091B51280160001FB5B01F813F8EC3FC091C8FCAD387FFFE0B57EA36C5B27367FA3
2C>I114
D<90387FF8700003B512F8120F5A5A387FC00F387E00034813015AA36CEB00F0007F1400
13F0383FFFC06C13FE6CEBFF80000314E0C66C13F8010113FCEB0007EC00FE0078147F00
FC143F151F7EA26C143F6D133E6D13FE9038F007FC90B5FC15F815E000F8148039701FFC
0020247AA32C>I<131E133FA9007FB6FCB71280A36C1500D8003FC8FCB1ED03C0ED07E0
A5EC800F011FEB1FC0ECE07F6DB51280160001035B6D13F89038003FE0232E7EAD2C>I<
3A7FF003FF80486C487FA3007F7F0001EB000FB3A3151FA2153F6D137F3900FE03FF90B7
FC6D15807F6D13CF902603FE07130029247FA32C>I<3A7FFF01FFFCB514FE148314016C
15FC3A03E0000F80A26D131F00011500A26D5B0000143EA26D137E017C137CA2017E13FC
013E5BA2EB3F01011F5BA21483010F5BA214C701075BA214EF01035BA214FF6D90C7FCA2
6D5A147C27247EA32C>II<3A3FFF03
FFF048018713F8A36C010313F03A00FC007E005D90387E01F8013F5BEB1F83EC87E09038
0FCFC0903807EF80EB03FF6D90C7FC5C6D5A147C14FE130180903803EF80903807CFC0EB
0FC7EC83E090381F01F0013F7FEB7E00017C137C49137E0001803A7FFF01FFFC1483B514
FE6C15FC140127247EA32C>I<3A7FFF01FFFCB5008113FE148314816C010113FC3A03E0
000F806C7E151F6D140012005D6D133E137C017E137E013E137CA2013F13FC6D5BA2EB0F
815DA2EB07C1ECC3E0A2EB03E3ECE7C0130114F75DEB00FFA292C7FC80A2143EA2147E14
7CA214FC5CA2EA0C01003F5BEA7F83EB87E0EA7E0F495A387FFF806C90C8FC6C5A6C5AEA
07E027367EA32C>I<003FB612E04815F0A4007EC7EA1FE0ED3FC0ED7F80EDFF004A5A00
3C495AC7485A4A5A4A5A4A5A4A5A4AC7FCEB01FC495AEB0FF0495A495A495A49C8FC4848
EB01E04848EB03F0485A485A485A485A485AB7FCA46C15E024247DA32C>I
E
%EndDVIPSBitmapFont
%DVIPSBitmapFont: Fe cmr10 10 66
/Fe 66 123 df12 D<121C127FEAFF80A8EA7F00AB123EAB121CABC7
FCA8121C127FEAFF80A5EA7F00121C093C79BB17>33 D<001C131C007F137F39FF80FF80
A26D13C0A3007F137F001C131C00001300A40001130101801380A2000313030100130048
5B00061306000E130E485B485B485B006013601A197DB92A>I<121C127FEAFF80A213C0
A3127F121C1200A412011380A2120313005A1206120E5A5A5A12600A1979B917>39
D<146014E0EB01C0EB0380EB0700130E131E5B5BA25B485AA2485AA212075B120F90C7FC
A25A121EA2123EA35AA65AB2127CA67EA3121EA2121F7EA27F12077F1203A26C7EA26C7E
1378A27F7F130E7FEB0380EB01C0EB00E01460135278BD20>I<12C07E12707E7E7E120F
6C7E6C7EA26C7E6C7EA21378A2137C133C133E131EA2131F7FA21480A3EB07C0A6EB03E0
B2EB07C0A6EB0F80A31400A25B131EA2133E133C137C1378A25BA2485A485AA2485A48C7
FC120E5A5A5A5A5A13527CBD20>I<121C127FEAFF80A213C0A3127F121C1200A4120113
80A2120313005A1206120E5A5A5A12600A19798817>44 DI<12
1C127FEAFF80A5EA7F00121C0909798817>I<150C151E153EA2153C157CA2157815F8A2
15F01401A215E01403A215C01407A21580140FA215005CA2141E143EA2143C147CA21478
14F8A25C1301A25C1303A2495AA25C130FA291C7FC5BA2131E133EA2133C137CA2137813
F8A25B1201A25B1203A25B1207A25B120FA290C8FC5AA2121E123EA2123C127CA2127812
F8A25A12601F537BBD2A>IIII54 D<12301238123E003FB612E0A316C05A168016000070C712
060060140E5D151800E01438485C5D5DC712014A5A92C7FC5C140E140C141C5CA25CA214
F0495AA21303A25C1307A2130FA3495AA3133FA5137FA96DC8FC131E233B7BB82A>III<121C127FEAFF80A5EA7F00121CC7
FCB2121C127FEAFF80A5EA7F00121C092479A317>I<121C127FEAFF80A5EA7F00121CC7
FCA8121CAB123EAB127FABEAFF80A8EA7F00121C093C79A917>60
D<007FB812F8B912FCA26C17F8CCFCAE007FB812F8B912FCA26C17F836167B9F41>I<13
0EEB3F80497EA56D5A010EC7FC90C8FCA81306A4130E130CA6131CA35BA213785BA21201
485A1207485A485A123F48C8FCA200FE14F0EC01F8EC03FCA41401EC00F8007E1438007F
14706C14E0391F8003C0390FC01F003803FFFC38007FE01E3B7CA927>I<1538A3157CA3
15FEA34A7EA34A6C7EA202077FEC063FA2020E7FEC0C1FA2021C7FEC180FA202387FEC30
07A202707FEC6003A202C07F1501A2D901807F81A249C77F167FA20106810107B6FCA249
81010CC7121FA2496E7EA3496E7EA3496E7EA213E0707E1201486C81D80FFC02071380B5
6C90B512FEA3373C7DBB3E>65 D<913A01FF800180020FEBE003027F13F8903A01FF807E
07903A03FC000F0FD90FF0EB039F4948EB01DFD93F80EB00FF49C8127F01FE153F120148
48151F4848150FA248481507A2485A1703123F5B007F1601A35B00FF93C7FCAD127F6DED
0180A3123F7F001F160318006C7E5F6C7E17066C6C150E6C6C5D00001618017F15386D6C
5CD91FE05C6D6CEB03C0D903FCEB0F80902701FF803FC7FC9039007FFFFC020F13F00201
1380313D7BBA3C>67 DIIIIII<013FB512E0A39039001FFC00EC07F8B3B3A3123FEA7F80EAFFC0A44A5A
1380D87F005B0070131F6C5C6C495A6C49C7FC380781FC3801FFF038007F80233B7DB82B
>I76 DII80
D82 DI<003FB812E0A3D9C003EB001F273E0001FE
130348EE01F00078160000701770A300601730A400E01738481718A4C71600B3B0913807
FF80011FB612E0A335397DB83C>II<
B5D8FC07B5D8F001B5FCA30007902780001FFEC7EA1FF86C48C7D80FF8EC07E000010307
ED03C01B807F6C6F6C1500A26E5F017F6E6C1406A280013F4A6C5CA280011F4A6D5BEE06
7FA26D6C010E6D5BEE0C3FA26D6C011C6D5BEE181FA26D6C6F5BEE300FA26D6C6F485AEE
6007A26D6C4CC7FC9338C003FCA203805D913B7F818001FE06A203C1150EDA3FC3C7EAFF
0CA203E3151CDA1FE6EC7F98A215F6DA0FFCEC3FF0A302075E4B141FA202035E4B140FA2
02015E4B1407A2020093C8FC4B80503B7EB855>87 D89 D97 DIIII<147E903803FF809038
0FC1E0EB1F8790383F0FF0137EA213FCA23901F803C091C7FCADB512FCA3D801F8C7FCB3
AB487E387FFFF8A31C3B7FBA19>II
IIIII<2703F00FF0EB1FE000FFD93FFCEB7F
F8913AF03F01E07E903BF1C01F83803F3D0FF3800FC7001F802603F70013CE01FE14DC49
D907F8EB0FC0A2495CA3495CB3A3486C496CEB1FE0B500C1B50083B5FCA340257EA445>
I<3903F00FF000FFEB3FFCECF03F9039F1C01F803A0FF3800FC03803F70013FE496D7EA2
5BA35BB3A3486C497EB500C1B51280A329257EA42E>II<3903F01FE0
00FFEB7FF89038F1E07E9039F3801F803A0FF7000FC0D803FEEB07E049EB03F04914F849
130116FC150016FEA3167FAA16FEA3ED01FCA26DEB03F816F06D13076DEB0FE001F614C0
9039F7803F009038F1E07E9038F0FFF8EC1FC091C8FCAB487EB512C0A328357EA42E>I<
D903F813C090381FFE0190387E07819038FC01C33903F000E3000714774848133749133F
001F141F485A150F48C7FCA312FEAA127FA37E6D131F121F6D133F120F6C6C137F6C6C13
EF3901F801CF39007E078F90381FFE0FEB07F890C7FCABED1FE00203B5FCA328357DA42C
>I<3807E01F00FFEB7FC09038E1E3E09038E387F0380FE707EA03E613EE9038EC03E090
38FC0080491300A45BB3A2487EB512F0A31C257EA421>II<1318A51338A31378A313F81201120312
07001FB5FCB6FCA2D801F8C7FCB215C0A93800FC011580EB7C03017E13006D5AEB0FFEEB
01F81A347FB220>IIIIII<003FB512FCA2EB8003D83E0013F8003CEB07F00038EB0FE0
12300070EB1FC0EC3F800060137F150014FE495AA2C6485A495AA2495A495A495AA29038
7F000613FEA2485A485A0007140E5B4848130C4848131CA24848133C48C7127C48EB03FC
90B5FCA21F247EA325>I E
%EndDVIPSBitmapFont
%DVIPSBitmapFont: Ff cmbx12 14.4 11
/Ff 11 118 df<932601FFFCEC01C0047FD9FFC013030307B600F81307033F03FE131F92
B8EA803F0203DAE003EBC07F020F01FCC7383FF0FF023F01E0EC0FF94A01800203B5FC49
4848C9FC4901F8824949824949824949824949824990CA7E494883A2484983485B1B7F48
5B481A3FA24849181FA3485B1B0FA25AA298C7FC5CA2B5FCAE7EA280A2F307C07EA36C7F
A21B0F6C6D1980A26C1A1F6C7F1C006C6D606C6D187EA26D6C606D6D4C5A6D6D16036D6D
4C5A6D6D4C5A6D01FC4C5A6D6DEE7F806D6C6C6C4BC7FC6E01E0EC07FE020F01FEEC1FF8
0203903AFFE001FFF0020091B612C0033F93C8FC030715FCDB007F14E0040101FCC9FC52
5479D261>67 D<003FBC1280A59126C0003F9038C0007F49C71607D87FF8060113C001E0
8449197F49193F90C8171FA2007E1A0FA3007C1A07A500FC1BE0481A03A6C994C7FCB3B3
AC91B912F0A553517BD05E>84 D<913801FFF8021FEBFF8091B612F0010315FC010F9038
C00FFE903A1FFE0001FFD97FFC491380D9FFF05B4817C048495B5C5A485BA2486F138091
C7FC486F1300705A4892C8FC5BA312FFAD127F7FA27EA2EF03E06C7F17076C6D15C07E6E
140F6CEE1F806C6DEC3F006C6D147ED97FFE5C6D6CEB03F8010F9038E01FF0010390B55A
01001580023F49C7FC020113E033387CB63C>99 D<913803FFC0023F13FC49B6FC010715
C04901817F903A3FFC007FF849486D7E49486D7E4849130F48496D7E48178048497F18C0
488191C7FC4817E0A248815B18F0A212FFA490B8FCA318E049CAFCA6127FA27F7EA218E0
6CEE01F06E14037E6C6DEC07E0A26C6DEC0FC06C6D141F6C6DEC3F806D6CECFF00D91FFE
EB03FE903A0FFFC03FF8010390B55A010015C0021F49C7FC020113F034387CB63D>101
D104 D110 D<913801FFE0021F13FE91B612C0010315
F0010F9038807FFC903A1FFC000FFED97FF86D6C7E49486D7F48496D7F48496D7F4A147F
48834890C86C7EA24883A248486F7EA3007F1880A400FF18C0AC007F1880A3003F18006D
5DA26C5FA26C5F6E147F6C5F6C6D4A5A6C6D495B6C6D495B6D6C495BD93FFE011F90C7FC
903A0FFF807FFC6D90B55A010015C0023F91C8FC020113E03A387CB643>I<90397FE003
FEB590380FFF80033F13E04B13F09238FE1FF89139E1F83FFC0003D9E3E013FEC6ECC07F
ECE78014EF150014EE02FEEB3FFC5CEE1FF8EE0FF04A90C7FCA55CB3AAB612FCA52F367C
B537>114 D<903903FFF00F013FEBFE1F90B7FC120348EB003FD80FF81307D81FE01301
48487F4980127F90C87EA24881A27FA27F01F091C7FC13FCEBFFC06C13FF15F86C14FF16
C06C15F06C816C816C81C681013F1580010F15C01300020714E0EC003F030713F0150100
78EC007F00F8153F161F7E160FA27E17E07E6D141F17C07F6DEC3F8001F8EC7F0001FEEB
01FE9039FFC00FFC6DB55AD8FC1F14E0D8F807148048C601F8C7FC2C387CB635>I<143E
A6147EA414FEA21301A313031307A2130F131F133F13FF5A000F90B6FCB8FCA426003FFE
C8FCB3A9EE07C0AB011FEC0F8080A26DEC1F0015806DEBC03E6DEBF0FC6DEBFFF86D6C5B
021F5B020313802A4D7ECB34>II
E
%EndDVIPSBitmapFont
%DVIPSBitmapFont: Fg cmsy8 8 2
/Fg 2 14 df<130C131EA50060EB01800078130739FC0C0FC0007FEB3F80393F8C7F0038
07CCF83801FFE038007F80011EC7FCEB7F803801FFE03807CCF8383F8C7F397F0C3F8000
FCEB0FC039781E078000601301000090C7FCA5130C1A1D7C9E23>3
D
13 D E
%EndDVIPSBitmapFont
%DVIPSBitmapFont: Fh cmr12 12 30
/Fh 30 118 df<131F1480133F137FA2EBFF00485A485A5B485A485A138048C7FC123E12
3C5A12E0124011126CC431>19 D<121EEA7F8012FF13C0A213E0A3127FEA1E601200A413
E013C0A312011380120313005A1206120E5A5A5A12600B1D78891B>44
D<143014F013011303131F13FFB5FC13E713071200B3B3B0497E497E007FB6FCA3204278
C131>49 DI<14FF010713E0011F13F8
90387F00FE01FC133FD801F0EB1F804848EB0FC049EB07E00007EC03F048481301A290C7
13F8481400A47FA26D130116F07F6C6CEB03E013FC6C6CEB07C09039FF800F806C9038C0
1F006CEBF03EECF87839007FFEF090383FFFC07F01077F6D13F8497F90381E7FFFD97C1F
1380496C13C02601E00313E048486C13F000079038007FF84848EB3FFC48C7120F003EEC
07FE150148140016FF167F48153FA2161FA56C151E007C153EA2007E153C003E157C6C15
F86DEB01F06C6CEB03E06C6CEB07C0D803F8EB1F80C6B4EBFF0090383FFFFC010F13F001
01138028447CC131>56 D<14FF010713E0011F13F890387F80FC9038FC007E48487F4848
EB1F804848EB0FC0000FEC07E0485AED03F0485A16F8007F140190C713FCA25AA216FE15
00A516FFA46C5CA36C7E5D121F7F000F5C6C6C130E150C6C6C131C6C6C5BD8007C5B9038
3F01E090390FFF80FE903801FE0090C8FC150116FCA4ED03F8A216F0D80F801307486C14
E0486C130F16C0ED1F80A249EB3F0049137E001EC75A001C495A000F495A3907E01FE06C
B51280C649C7FCEB1FF028447CC131>I<16C04B7EA34B7EA34B7EA34B7EA3ED19FEA3ED
30FFA203707FED607FA203E07FEDC03FA2020180ED801FA2DA03007F160FA20206801607
A24A6D7EA34A6D7EA34A6D7EA20270810260147FA202E08191B7FCA249820280C7121FA2
49C87F170FA20106821707A2496F7EA3496F7EA3496F7EA201788313F8486C83D80FFF03
037FB500E0027FEBFFC0A342477DC649>65 D72 D78
DIII<49B41303010FEBE007013F13F8
9039FE00FE0FD801F8131FD807E0EB079F49EB03DF48486DB4FC48C8FC4881003E81127E
82127C00FC81A282A37E82A27EA26C6C91C7FC7F7FEA3FF813FE381FFFE06C13FE6CEBFF
E06C14FC6C14FF6C15C0013F14F0010F80010180D9001F7F14019138001FFF0303138081
6F13C0167F163F161F17E000C0150FA31607A37EA36C16C0160F7E17806C151F6C16006C
5D6D147ED8FBC05CD8F9F0495AD8F07C495A90393FC00FE0D8E00FB51280010149C7FC39
C0003FF02B487BC536>83 D97 DII<167FED3FFFA315018182B3EC7F809038
03FFF090380FC07C90383F000E017E1307496D5AD803F87F48487F5B000F81485AA2485A
A2127FA290C8FC5AAB7E7FA2123FA26C7EA2000F5D7F6C6C5B00035C6C6C9038077F806C
6C010E13C0013F011C13FE90380FC0F8903803FFE09026007F0013002F467DC436>IIIIII109 D<3901FC01FE00FF903807FFC091381E
07F091383801F8000701707F0003EBE0002601FDC07F5C01FF147F91C7FCA25BA35BB3A8
486CECFF80B5D8F83F13FEA32F2C7DAB36>II<3901FC03FC00FF90380FFF8091383C07E091387001F83A07FDE000FE00030180137F
D801FFEC3F8091C7EA1FC04915E049140F17F0160717F8160317FCA3EE01FEABEE03FCA3
EE07F8A217F0160F6D15E0EE1FC06D143F17806EEB7E00D9FDC05B9039FCF003F891383C
0FE091381FFF80DA03FCC7FC91C9FCAE487EB512F8A32F3F7DAB36>I<3903F803F000FF
EB1FFCEC3C3EEC707F0007EBE0FF3803F9C000015B13FBEC007E153C01FF13005BA45BB3
A748B4FCB512FEA3202C7DAB26>114 D<90383FE0183901FFFC383907E01F78390F0003
F8001E1301481300007C1478127800F81438A21518A27EA27E6C6C13006C7E13FC383FFF
E06C13FC6C13FF6C14C06C14E0C614F0011F13F81300EC0FFC140300C0EB01FE1400157E
7E153EA27EA36C143C6C147C15786C14F86CEB01F039F38003E039F1F00F8039E07FFE00
38C00FF01F2E7DAC26>I<1306A5130EA4131EA3133E137EA213FE12011207001FB512F0
B6FCA2C648C7FCB3A4150CAA017E131C017F1318A26D133890381F8030ECC070903807E0
E0903801FFC09038007F001E3E7EBC26>II E
%EndDVIPSBitmapFont
%DVIPSBitmapFont: Fi cmr17 17.28 11
/Fi 11 118 df67 D<003FBC12F8A49126C000039038C0000301FCC76C49EB007F01F0190F
01C019074848F103FC90C81701007E1A00007C1B7CA300781B3CA400701B1CA600F01B1E
481B0EA7C91800B3B3B3A54C7FA2041F13F84AB87EA457627CE160>84
D<4AB47E020F13F8023F13FE9139FF007F80D903FCEB07E0D907F0EB01F0D91FE0EB0078
49488049488049C87E48485D4915FF00034B138048485CA2485AA2485AA2003F6F130049
EC007C94C7FC127FA35B12FFAD127F7FA4123F7FA2001FEE01C07F000F16036D16801207
6C6C15076D160000015E6C6C151E6D6C5C6D6C5C6D6C5CD90FF8495AD903FCEB07C0903A
00FF803F8091263FFFFEC7FC020F13F80201138032417CBF3A>99
D101
D104
D110 DI<9039078003F8D807FFEB0FFFB5
013F13C092387C0FE0913881F01F9238E03FF00001EB838039007F8700148FEB3F8E029C
EB1FE0EE0FC00298EB030002B890C7FCA214B014F0A25CA55CB3B0497EEBFFF8B612FCA4
2C3F7CBE33>114 D<9139FFE00180010FEBFC03017FEBFF073A01FF001FCFD803F8EB03
EFD807E0EB01FF48487F4848147F48C8123F003E151F007E150F127CA200FC1507A31603
7EA27E7F6C7E6D91C7FC13F8EA3FFE381FFFF06CEBFF806C14F86C14FF6C15C06C6C14F0
011F80010714FED9007F7F02031480DA003F13C01503030013E0167F00E0ED1FF0160F17
F86C15071603A36C1501A37EA26C16F016037E17E06D14076DEC0FC06D1580D8FDF0141F
D8F8F8EC7F00013E14FC3AF01FC00FF80107B512E0D8E001148027C0003FF8C7FC2D417D
BF34>I<1438A71478A414F8A31301A31303A21307130F131FA2137F13FF1203000F90B6
FCB8FCA3260007F8C8FCB3AE17E0AE6D6CEB01C0A316036D6C148016076D6C14006E6C5A
91383FC01E91381FF07C6EB45A020313E09138007F802B597FD733>II E
%EndDVIPSBitmapFont
end
%%EndProlog
%%BeginSetup
%%Feature: *Resolution 600dpi
TeXDict begin
%%PaperSize: A4
%%EndSetup
%%Page: 1 1
1 0 bop 1452 880 a Fi(The)43 b(Construct)1017 1096 y
Fh(\023)1005 1121 y(ANOQ)33 b(of)f(the)h(Sun,)g(Hardcore)g(Pro)s
(cessing)2739 1085 y Fg(\003)1455 1316 y Fh(Septem)m(b)s(er)g(28,)f
(1999)440 1798 y Ff(The)44 b(Construct)440 1980 y Fe(This)24
b(is)g(a)g(GUI)g(builder)g(for)g Fd(ML::AbstractUI)p
Fe(,)18 b(whic)n(h)24 b(is)g(also)f(on)h(this)g(homepage.)34
b(Ac-)440 2080 y(tually)20 b(it)h(is)g(the)f(\014rst)h(GUI)g(builder)f
(ev)n(er)f(written)i(in)g Fd(Standard)40 b(ML)p Fe(!)20
b(It)g(is)h(all)f(distributed)440 2179 y(under)26 b(the)h(GNU)g
(General)f(Public)g(Licence)h(\()p Fd(GPL)p Fe(\),)f(whic)n(h)g(\(in)h
(short\))f(only)g(allo)n(ws)f(y)n(ou)440 2279 y(to)31
b(write)h(an)n(y)f(extensions)f(for)h(The)h(Construct)f(if)h(y)n(ou)f
(distribute)h(all)f(the)h(sourceco)r(de)440 2379 y(for)24
b(y)n(our)g(extensions)g(under)h(a)f Fd(GPL)g Fe(compatiple)g(licence.)
36 b(Ho)n(w)n(ev)n(er)23 b(y)n(ou)h(ma)n(y)g(of)h(course)440
2478 y(use)i(the)h(user)f(in)n(terfaces)g(generated)g(with)h(The)f
(Construct)g(for)g(whatev)n(er)g(y)n(ou)g(lik)n(e.)440
2711 y Fc(Requiremen)m(ts)440 2864 y Fe(T)-7 b(o)29 b(use)g(The)h
(Construct)f(y)n(ou)g(will)g(need)h(one)f(of)g(the)h(supp)r(orted)g
(hardw)n(are)d(platforms.)440 2964 y(When)22 b(compiling)g
(applications)f(with)h(user)g(in)n(terfaces)f(generated)f(with)j(The)f
(Construct)440 3063 y(or)i(when)h(compiling)f(The)h(Construct)f
(itself,)i(the)f(requiremen)n(ts)f(are)f(the)j(same)e(as)g(those)440
3163 y(for)j Fd(ML::AbstractUI)p Fe(.)440 3395 y Fc(Do)m(wnloading)440
3548 y Fe(If)d(y)n(ou)f(just)h(w)n(an)n(t)f(to)h(see)f(The)h(Construct)
f(running,)h(all)f(y)n(ou)g(need)h(is)f(a)h(binary)f(distribu-)440
3648 y(tion.)34 b(There)18 b(is)g(one)g(for)g Fd(MS-Windows)c
Fe(here:)32 b(TheConstruct1)o(99)o(90)o(927)o(x8)o(6Win.tar.g)o(z.)440
3748 y(And)g(one)f(for)g Fd(Linux/X-Windows)12 b Fe(here:)32
b(TheConstruct19)o(99)o(09)o(27)o(x8)o(6Lin)n(ux.tar)o(.gz)o(A>.)565
3847 y(These)37 b(t)n(w)n(o)g(\014les)g(are)g(pac)n(k)n(ed)g(with)h
(tar,)i(so)d(to)g(unpac)n(k)g(y)n(ou)g(do)h(something)f(lik)n(e)440
3947 y Fd(gzip)42 b(-d)h(file.tar.gz)23 b Fe(follo)n(w)n(ed)j(b)n(y)i
Fd(tar)42 b(-xvf)g(file.tar)p Fe(.)565 4047 y(Y)-7 b(ou)27
b(can)g(also)g(do)n(wnload)f(the)i(source)f(co)r(de)g(whic)n(h)h(is)f
(ready)g(for)g(compilation)g(with)440 4146 y Fd(SML/NJ)16
b Fe(here:)32 b(TheCo)o(nstruct19)o(99)o(09)o(27)o(SMLNJsrc)o(.tar)o(A>.)440
4246 y(And)g(a)f(v)n(ersion)f(prepared)g(for)h Fd(MLWorks)d
Fe(here:)32 b(TheCons)o(truct199)o(90)o(92)o(7ML)f(Wsrc.tar)o(.)565
4345 y(These)18 b(are)f(pac)n(k)n(ed)g(with)i(tar,)h(so)d(to)i(unpac)n
(k)e(y)n(ou)h(do)g(something)g(lik)n(e)g Fd(tar)42 b(-xvf)g(file.tar)p
Fe(.)565 4445 y(Eac)n(h)27 b(of)h(these)g(distributions)h(exp)r(ect)f
(that)h(y)n(ou)f(ha)n(v)n(e)f(installed)h Fd(ML::AbstractUI)440
4545 y Fe(and)20 b(that)g(y)n(ou)f(unpac)n(k)h(the)g(distribution)g
(from)g(the)g(same)f(directory)g(that)h(y)n(ou)f(unpac)n(k)n(ed)440
4644 y Fd(ML::AbstractUI)j Fe(from.)37 b(This)27 b(is)h(to)f(mak)n(e)g
(sure)g(that)h(the)g(directory)f(called)g(TheCon-)440
4744 y(struct)g(is)g(put)h(in)n(to)f(the)h(directory)e(called)h
(HardcorePro)r(cessing)c(in)28 b(b)r(oth)g(distributions)440
4844 y(so)f(that)h(all)f(paths)h(in)f(the)h(pro)5 b(ject)27
b(are)g(v)-5 b(alid.)p 440 4913 1146 4 v 531 4974 a Fb(\003)587
4995 y Fa(c)567 4997 y Fg(\015)p Fa(1999)811 4981 y(\023)802
4997 y(ANOQ)23 b(of)h(the)g(Sun)g(\(alias)g(Johnn)n(y)h(Andersen\))1851
5662 y Fe(1)p eop
%%Page: 2 2
2 1 bop 440 531 a Fc(Compiling)440 685 y Fe(T)-7 b(o)18
b(compile)g(with)h(the)g Fd(SML/NJ)d Fe(v)n(ersion,)j(go)e(to)h(the)h
(directory)e Fd(HardcoreProcessi)o(ng/)o(Th)o(eCo)o(ns)o(tru)o(ct)o(/s)
o(rcS)o(ML)440 784 y Fe(in)43 b(the)g(distribution,)k(start)42
b(the)h(compiler)f(with)h Fd(CM)f Fe(and)g Fd(CML)g Fe(and)g(call)h
(the)g(usual)440 884 y Fd(CM.make\(\);)p Fe(.)33 b(Then)28
b(call)f Fd(TheConstruct.sta)o(rt)37 b(\(\);)26 b Fe(to)i(start)f(it.)
565 983 y(With)k(ML)-9 b(W)i(orks)29 b(y)n(ou)h(load)f(the)i(pro)5
b(ject)30 b(\014le)g(for)g(the)h(desired)f(demo)g(in)g(the)h(direc-)440
1083 y(tory)19 b Fd(HardcoreProcessin)o(g/)o(The)o(Co)o(ns)o(tru)o(ct)o
(/sr)o(cS)o(ML)14 b Fe(in)20 b(the)g(distribution.)35
b(Then)20 b(hit)440 1183 y Fd(project->compile)37 b(target)k(sources)30
b Fe(in)j(the)f(men)n(u,)i(w)n(ait)e(for)g(a)h(couple)f(of)g(hours,)440
1282 y(hit)i Fd(project->load)k(targets)31 b Fe(and)j(w)n(ait)f(for)g
(a)g(couple)g(of)h(hours)e(again.)54 b(Then)34 b(call)440
1382 y Fd(TheConstruct.sta)o(rt)j(\(\);)27 b Fe(to)g(start)g(it.)440
1614 y Fc(Do)s(cumen)m(tation)440 1768 y Fe(The)h(do)r(cumen)n(tation)f
(for)g(The)h(Construct)f(is)g(v)n(ery)g(short)g(and)g(follo)n(ws)g
(here:)565 1867 y(In)21 b(The)h(Construct)f(y)n(ou)g(can)g(either)g
(create)g(y)n(our)f(o)n(wn)h(user)g(in)n(terfaces)f(from)i(scratc)n(h)
440 1967 y(or)d(y)n(ou)h(can)g(load)f(existing)h(user)g(in)n(terfaces)f
(and)i(mo)r(dify)f(them.)35 b(T)-7 b(o)20 b(create)g(a)g(completely)440
2066 y(new)25 b(and)g(empt)n(y)h(windo)n(w,)f(use)g(the)g
Fd(Window)e Fe(button)j(in)f(the)h Fd(UI)43 b(Palette)22
b Fe(windo)n(w.)36 b(T)-7 b(o)440 2166 y(add)28 b(user)f(in)n(terface)h
(con)n(trols)e(to)i(the)h(windo)n(w,)e(press)g(the)i(button)f(for)g
(the)g(con)n(trol)f(y)n(ou)440 2266 y(need)j(in)g(the)h
Fd(UI)43 b(Palette)27 b Fe(windo)n(w,)j(follo)n(w)n(ed)f(b)n(y)h(a)f
(clic)n(k)h(on)g(the)g(windo)n(w)f(where)h(the)440 2365
y(con)n(trol)c(should)i(b)r(e.)565 2465 y(Y)-7 b(ou)37
b(can)f(customize)h(y)n(our)f(windo)n(w)g(and)h(the)h(user)e(in)n
(terface)g(con)n(trols)g(that)h(y)n(ou)440 2565 y(ha)n(v)n(e)32
b(created)g(b)n(y)g(clic)n(king)g(on)g(them)i(and)e(using)h(the)g
Fd(Protocol)40 b(accessor)30 b Fe(windo)n(w.)440 2664
y(Some)35 b(of)g(the)g(proto)r(cols)e(are)h(mark)n(ed)g(with)i
Fd(N/A)d Fe(or)h Fd(\(only)42 b(for)g(bindings\))p Fe(,)33
b(whic)n(h)440 2764 y(means)28 b(that)g(y)n(ou)g(can't)g(edit)h(them)f
(in)h Fd(The)42 b(Construct)25 b Fe(-)j(either)g(b)r(ecause)g(it)g(do)r
(es)g(not)440 2864 y(mak)n(e)h(sense)g(or)g(b)r(ecause)g(a)g(proto)r
(col)g(editor)g(has)g(not)h(y)n(et)f(b)r(een)h(implemen)n(ted)h(for)e
(the)440 2963 y(proto)r(col.)565 3063 y(Y)-7 b(ou)25
b(can)f(create)h(a)f(binding)i(for)e(a)h(proto)r(col)f(b)n(y)g
(toggling)g(the)i(button)f(on)g(the)h(left)f(of)440 3162
y(the)i Fd(Protocol)40 b(accessor)23 b Fe(windo)n(w)j(for)g(the)h
(desired)f(proto)r(col)f(and)i(writing)f(the)h(name)440
3262 y(of)h(the)g(binding)f(in)h(the)g(text\014eld.)565
3362 y(T)-7 b(o)28 b(load)g(an)h(existing)g(user)f(in)n(terface,)h(t)n
(yp)r(e)g(the)g(name)g(of)g(the)g(\014le)g(in)g(the)h(text\014eld)440
3461 y(b)r(eside)36 b(the)g(button)g Fd(Load)d Fe(in)j(the)g
Fd(Operator)c Fe(windo)n(w)j(and)g(press)g(the)h Fd(Load)e
Fe(button.)440 3561 y(Sa)n(ving)23 b(a)h(user)g(in)n(terface)f(is)i
(done)f(similarly)f(with)i(the)g(sa)n(v)n(e)d(button,)k(whic)n(h)e
(will)h(exp)r(ort)440 3661 y(the)33 b(user)e(in)n(terface)h(as)g
Fd(Standard)40 b(ML)31 b Fe(co)r(de)h(ready)g(to)g(b)r(e)g(compiled)h
(directly)f(in)n(to)g(an)440 3760 y(application)27 b(or)g(to)g(b)r(e)h
(loaded)f(in)n(to)g(The)h(Construct)f(later.)565 3860
y(Proto)r(cols)j(with)i(bindings)g(will)g(b)r(e)h(accessible)e(from)h
(y)n(our)e(application)i(when)g(y)n(ou)440 3959 y(compile)24
b(an)g(exp)r(orted)g(user)g(in)n(terface)f(\014le)i(in)n(to)f(the)h
(application.)35 b(Y)-7 b(ou)24 b(can)g(lo)r(ok)g(at)g(the)440
4059 y(generated)i(\014le)i(to)g(see)f(ho)n(w.)565 4159
y(That's)g(it)h(-)f(no)n(w)g(go)g(create)g(some)g(graphical)f(user)h
(in)n(terfaces!)36 b(:\))1851 5662 y(2)p eop
%%Trailer
end
userdict /end-hook known{end-hook}if
%%EOF
HardcoreProcessing/TheConstruct/srcSML/ 40755 1750 1750 0 6774177702 16555 5 ustar anoq anoq HardcoreProcessing/TheConstruct/srcSML/Controller/ 40755 1750 1750 0 6774177665 20710 5 ustar anoq anoq HardcoreProcessing/TheConstruct/srcSML/Controller/TheConstruct.sml 100644 1750 1750 5462 6774177704 24150 0 ustar anoq anoq (*
This file is part of The Construct - a graphical user interface
builder for ML::AbstractUI written in Standard ML.
Copyright (C) 1999 ANOQ of the Sun (alias Johnny Andersen)
E-mail: anoq@HardcoreProcessing.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
If you are interested in a warranty or commercial support for this
software, contact Hardcore Processing
for more information.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*)
(*require "protocolaccessorcontr";*)
(*require "operatorcontr";*)
(*require "uicontrolpalettecontr";*)
(*require "operator";*)
(*require "protocolaccessor";*)
(*require "uicontrolpalette";*)
(*require "$.errorhandlingwinnt.exceptions";*)
(*require "$.mlabstractuiwinnt.uiwindowstoportable";*)
signature THE_CONSTRUCT =
sig
val start : unit -> unit
end
functor FTheConstruct() :> THE_CONSTRUCT =
struct
fun start () =
let
fun app () =
let
val masterNode = uiCore.createMasterNode ()
val accessorGUI =
ProtocolAccessor.createGraph masterNode
val controlPaletteGUI =
UIControlPalette.createGraph masterNode
val accessorContr =
ProtocolAccessorContr.createController
masterNode accessorGUI
val controlPaletteContr =
UIControlPaletteContr.createController
masterNode
accessorContr
controlPaletteGUI
val operatorGUI =
Operator.createGraph masterNode
val _ = OperatorContr.createController
masterNode operatorGUI
accessorContr controlPaletteContr
val _ = Excn.checkedExec
uiCore.createGUI masterNode ()
in
uiCore.runGUI masterNode
end
in
uiCore.runApp app
end
end
structure TheConstruct = FTheConstruct()
HardcoreProcessing/TheConstruct/srcSML/Controller/ProtocolAccessorContr.sml 100644 1750 1750 36501 6774177704 26033 0 ustar anoq anoq (*
This file is part of The Construct - a graphical user interface
builder for ML::AbstractUI written in Standard ML.
Copyright (C) 1999 ANOQ of the Sun (alias Johnny Andersen)
E-mail: anoq@HardcoreProcessing.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
If you are interested in a warranty or commercial support for this
software, contact Hardcore Processing
for more information.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*)
(*require "$.collections.simplesets";*)
(*require "$.gtwinnt.dgpcommon";*)
(*require "$.gtwinnt.dgnodes";*)
(*require "$.gtwinnt.dgshorthand";*)
(*require "$.mlabstractuiwinnt.winregistered";*)
(*require "$.mlabstractuiwinnt.lfnmisc";*)
(*require "$.mlabstractuiwinnt.lfngeometry";*)
(*require "$.mlabstractuiwinnt.lfnmiscnotify";*)
(*require "$.mlabstractuiwinnt.lfnsimpletext";*)
(*require "$.basis.__list";*)
(*require "protocolmanip";*)
signature PROTOCOL_ACCESSOR_CONTR =
sig
type t = {access : DGNodes.t -> unit,
clear : unit -> unit,
getAccessed : unit -> DGNodes.t option,
checkBinding : DGNodes.t -> (bool * string),
addBindDesc : DGNodes.t -> string -> unit}
val createController : DGNodes.t ->
{protocolAccessor : DGNodes.t} ->
t
end
functor FProtocolAccessorContr() :> PROTOCOL_ACCESSOR_CONTR =
struct
open DGShorthand
type t = {access : DGNodes.t -> unit,
clear : unit -> unit,
getAccessed : unit -> DGNodes.t option,
checkBinding : DGNodes.t -> (bool * string),
addBindDesc : DGNodes.t -> string -> unit}
(* FIXME: Put this in a general place... *)
(* From L.C. Paulson's ML for the Working Programmer p. 110 *)
fun qsort _ [] = []
| qsort _ [x] = [x]
| qsort lessThanEqF (a::bs) =
let
fun partition (left, right, []) =
(qsort lessThanEqF left) @
(a :: qsort lessThanEqF right)
| partition (left, right, x :: xs) =
if lessThanEqF (x, a) then
partition (x::left, right, xs)
else
partition (left, x::right, xs)
in
partition ([], [], bs)
end
fun createController masterNode {protocolAccessor} =
let
val masterCh = masterNode +: "Children"
val winCh = protocolAccessor +: "Children"
val protocolSlots = ref nil
val slotHeight = 18
fun checkBinding node =
let
(* This line may raise an exception
which is caught below *)
val bindDescNode = hd (node +# "BindingName")
val name = PString.read
(DGPString.p bindDescNode)
in
(true, name)
end
handle _ => (false, "")
fun addValueBinding cnt =
let
val binder = Reg.createA "ToggleButton"
val _ = winCh ~+ binder
val _ = LFNGeometry.setPosY binder (slotHeight + cnt * slotHeight)
val _ = LFNGeometry.setSizeX binder slotHeight
val _ = LFNMisc.createControl binder
val bindName = Reg.createA "TextField"
val _ = winCh ~+ bindName
val _ = LFNGeometry.setPosY bindName (slotHeight + cnt * slotHeight)
val _ = LFNGeometry.setPosX bindName slotHeight
val _ = LFNGeometry.setSizeX bindName 182
val _ = LFNMisc.createControl bindName
in
{binder = binder,
bindName = bindName}
end
fun addEditor cnt =
let
val nameLabel = Reg.createA "TextLabel"
val _ = winCh ~+ nameLabel
val _ = LFNGeometry.setPosX nameLabel 200
val _ = LFNGeometry.setPosY nameLabel (slotHeight + cnt * slotHeight)
val _ = LFNMisc.createControl nameLabel
val editField = Reg.createA "TextField"
val _ = winCh ~+ editField
val _ = LFNGeometry.setPosY editField (slotHeight + cnt * slotHeight)
val _ = LFNGeometry.setPosX editField 300
val _ = LFNGeometry.setSizeX editField 200
val _ = LFNMisc.createControl editField
in
{nameLabel = nameLabel,
editField = editField}
end
fun addProtocolSlot cnt =
let
val {binder, bindName} = addValueBinding cnt
val {nameLabel, editField} = addEditor cnt
in
{binder = binder, bindName = bindName,
nameLabel = nameLabel, editField = editField,
changeID = ref NONE,
focusChangeID = ref NONE,
toggleID = ref NONE,
bindNameChangeID = ref NONE}
end
fun setSlotVisibility value
{binder, bindName,
nameLabel, editField,
changeID, focusChangeID,
toggleID, bindNameChangeID} =
let
val _ = LFNMisc.setVisible binder value
val _ = LFNMisc.setVisible bindName value
val _ = LFNMisc.setVisible nameLabel value
val _ = LFNMisc.setVisible editField value
in
()
end
fun strAddBindDesc graphNode name =
let
val bindDescProt = DGPString.add graphNode
"BindingName"
(name, graphNode)
in
()
end
fun addBindDesc graphNode bindName =
let
val name = PString.read
(DGPString.p
(bindName +: "EditableText"))
in
strAddBindDesc graphNode name
end
fun removeBindDesc graphNode =
let
(* This line may raise an exception
which is caught below *)
val bindDescNode = hd (graphNode +# "BindingName")
in
DGNodes.disconnect graphNode bindDescNode
end
handle _ => ()
fun removeSlotNotifier (slot as {changeID, focusChangeID,
toggleID, bindNameChangeID,
binder,
bindName, nameLabel,
editField}) =
(case !changeID of
NONE => ()
| SOME(theNode, theID) =>
LFNMiscNotify.removeEditableTextChangedNotifier theNode theID;
changeID := NONE;
case !focusChangeID of
NONE => ()
| SOME(theNode, theID) =>
LFNMiscNotify.removeFocusChangedNotifier theNode theID;
focusChangeID := NONE;
case !toggleID of
NONE => ()
| SOME(theNode, theID) =>
LFNMiscNotify.removeToggleValueChangedNotifier theNode theID;
toggleID := NONE;
case !bindNameChangeID of
NONE => ()
| SOME(theNode, theID) =>
LFNMiscNotify.removeEditableTextChangedNotifier theNode theID;
bindNameChangeID := NONE)
fun clearSlot slot =
(removeSlotNotifier slot;
setSlotVisibility false slot)
fun clearSlots () =
List.app clearSlot (!protocolSlots)
fun setupSlot node (slot as
{binder, bindName,
nameLabel, editField,
changeID, focusChangeID,
toggleID, bindNameChangeID}) =
let
val typeName = DGNodes.typeName node
val _ = removeSlotNotifier slot
val _ = LFNSimpleText.setText nameLabel typeName
fun onBindNameEdit sender value =
let
(* This line may raise an exception
which is caught below *)
val bindDescNode = hd (node +# "BindingName")
in
PString.write (DGPString.p bindDescNode) value
end
handle _ => ()
fun onToggle sender value =
case value of
true =>
(addBindDesc node bindName;
PBool.write (DGPBool.p (bindName +: "HasFocus")) true)
| false =>
(removeBindDesc node)
in
case ProtocolManip.getProtocol
(DGNodes.protocolName node) of
NONE =>
(LFNSimpleText.setEditableText editField
("N/A: " ^ (DGNodes.protocolName node));
changeID := NONE;
focusChangeID := NONE;
toggleID := NONE;
bindNameChangeID := NONE;
PBool.write
(DGPBool.p (binder +: "ToggleValue")) false;
LFNSimpleText.setEditableText bindName "")
| SOME({readAsString, writeAsString, saveSML}) =>
let
val (hasBinding, theValueOfIt) =
checkBinding node
val _ = PBool.write
(DGPBool.p (binder +: "ToggleValue"))
hasBinding
val _ = LFNSimpleText.setEditableText
bindName theValueOfIt
in
(LFNSimpleText.setEditableText editField (readAsString node);
changeID := SOME(
LFNMiscNotify.addEditableTextChangedNotifier
editField
(fn _ => fn value => writeAsString (node, value)));
focusChangeID := SOME(
LFNMiscNotify.addFocusChangedNotifier
editField
(fn _ => fn value => if value = false then
LFNSimpleText.setEditableText
editField (readAsString node)
else ()));
toggleID := SOME(
LFNMiscNotify.addToggleValueChangedNotifier
binder onToggle);
bindNameChangeID := SOME(
LFNMiscNotify.addEditableTextChangedNotifier
bindName onBindNameEdit))
end
end
val lastAccessed = ref NONE
(* FIXME: Also in PrettyPrinter... *)
val excludeList = ["Create", "Children",
"TCConstructed", "BindingName"]
fun access control =
let
val _ = lastAccessed := SOME(control)
(* Lazy creation of slots as they are needed *)
fun setupSlots nil nil _ = nil
| setupSlots nil (slot::slots) cnt =
(clearSlot slot;
slot::setupSlots nil slots (cnt + 1))
| setupSlots (node::nodes) nil cnt =
let
val newSlot = addProtocolSlot cnt
val _ = setupSlot node newSlot
in
newSlot::setupSlots nodes nil (cnt + 1)
end
| setupSlots (node::nodes) (slot::slots) cnt =
let
val _ = setSlotVisibility true slot
val _ = setupSlot node slot
in
slot::setupSlots nodes slots (cnt + 1)
end
val connected = DGNodes.connected control
fun filterF node =
not (SimpleSets.contains
(DGNodes.typeName node)
excludeList)
fun lessThanEqF (node1, node2) =
DGNodes.typeName node1 <=
DGNodes.typeName node2
val connected =
qsort lessThanEqF
(List.filter filterF connected)
val accessNodes = control::connected
val _ = protocolSlots := setupSlots
accessNodes (!protocolSlots) 0
val _ = LFNGeometry.setSizeY
protocolAccessor
(slotHeight + (length accessNodes) * slotHeight)
in
()
end
fun clear () =
(lastAccessed := NONE;
clearSlots ();
LFNGeometry.setSizeY protocolAccessor slotHeight)
fun getAccessed () =
!lastAccessed
val _ = clear ()
in
{access = access,
clear = clear,
getAccessed = getAccessed,
checkBinding = checkBinding,
addBindDesc = strAddBindDesc}
end
end
structure ProtocolAccessorContr = FProtocolAccessorContr()
HardcoreProcessing/TheConstruct/srcSML/Controller/UIControlPaletteContr.sml 100644 1750 1750 16553 6774177704 25751 0 ustar anoq anoq (*
This file is part of The Construct - a graphical user interface
builder for ML::AbstractUI written in Standard ML.
Copyright (C) 1999 ANOQ of the Sun (alias Johnny Andersen)
E-mail: anoq@HardcoreProcessing.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
If you are interested in a warranty or commercial support for this
software, contact Hardcore Processing
for more information.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*)
(*require "$.basis.__list";*)
(*require "$.gtwinnt.dgnodes";*)
(*require "$.gtwinnt.dgshorthand";*)
(*require "$.gtwinnt.dgpcommon";*)
(*require "$.mlabstractuiwinnt.winregistered";*)
(*require "$.mlabstractuiwinnt.lfnmisc";*)
(*require "$.mlabstractuiwinnt.lfngeometry";*)
(*require "$.mlabstractuiwinnt.lfnmiscnotify";*)
(*require "$.mlabstractuiwinnt.lfnpointernotify";*)
(*require "$.mlabstractuiwinnt.lfnsimpletext";*)
(*require "protocolaccessorcontr";*)
signature UI_CONTROL_PALETTE_CONTR =
sig
val createController : DGNodes.t ->
ProtocolAccessorContr.t ->
{controlPalette : DGNodes.t} ->
{isTCConstructed : DGNodes.t -> bool,
createNamedControl : string -> DGNodes.t}
end
functor FUIControlPaletteContr() :> UI_CONTROL_PALETTE_CONTR =
struct
open DGShorthand
fun createController masterNode
{access, clear,
getAccessed, checkBinding,
addBindDesc}
{controlPalette} =
let
val buttonHeight = 18
val regs = Reg.registered ()
val masterCh = masterNode +: "Children"
val winCh = controlPalette +: "Children"
val _ = LFNGeometry.setSizeY controlPalette (length regs * buttonHeight)
val consOptRef = ref NONE
fun addTCConstructed node =
DGPNull.add node "TCConstructed" ()
fun isTCConstructed node =
let
val n = hd (node +# "TCConstructed")
in
true
end
handle _ => false
(* FIXME: Don't ever copy code... *)
fun createNamedControl controlName =
let
fun doCreate () =
let
val newControl = Reg.createA controlName
val _ = addTCConstructed newControl
fun onMouseDown _ {button, point} =
access newControl
val _ = LFNPointerNotify.addPointerDownNotifier
newControl onMouseDown
in
newControl
end
fun doCreateTopLevel () =
let
val topLevel = Reg.createA controlName
val _ = addTCConstructed topLevel
val topLevelCh = topLevel +: "Children"
fun onMouseDown _ {button, point} =
case !consOptRef of
NONE => access topLevel
| SOME(control) =>
(consOptRef := NONE;
topLevelCh ~+ control;
LFNGeometry.placeAt control point;
LFNMisc.createControl control;
access control)
val _ = LFNPointerNotify.addPointerDownNotifier
topLevel onMouseDown
in
topLevel
end
in
if controlName = "Window" then
doCreateTopLevel ()
else
doCreate ()
end
fun addCreateButton (controlName, cnt) =
let
val createButton = Reg.createA "Button"
val _ = winCh ~+ createButton
val _ = LFNSimpleText.setText createButton controlName
val _ = LFNGeometry.setPosY createButton (cnt * buttonHeight)
fun doCreate _ () =
let
val newControl = Reg.createA controlName
val _ = addTCConstructed newControl
fun onMouseDown _ {button, point} =
access newControl
val _ = LFNPointerNotify.addPointerDownNotifier
newControl onMouseDown
in
consOptRef := SOME(newControl)
end
fun doCreateTopLevel _ () =
let
val topLevel = Reg.createA controlName
val _ = addTCConstructed topLevel
val _ = masterCh ~+ topLevel
val topLevelCh = topLevel +: "Children"
fun onMouseDown _ {button, point} =
case !consOptRef of
NONE => access topLevel
| SOME(control) =>
(consOptRef := NONE;
topLevelCh ~+ control;
LFNGeometry.placeAt control point;
LFNMisc.createControl control;
access control)
val _ = LFNPointerNotify.addPointerDownNotifier
topLevel onMouseDown
in
(LFNMisc.createControl topLevel;
access topLevel)
end
val _ = if controlName = "Window" then
LFNMiscNotify.addActionNotifier createButton doCreateTopLevel
else
LFNMiscNotify.addActionNotifier createButton doCreate
in
cnt + 1
end
val _ = List.foldl addCreateButton 0 regs
in
{isTCConstructed = isTCConstructed,
createNamedControl = createNamedControl}
end
end
structure UIControlPaletteContr = FUIControlPaletteContr()
HardcoreProcessing/TheConstruct/srcSML/Controller/OperatorContr.sml 100644 1750 1750 7725 6774177704 24330 0 ustar anoq anoq (*
This file is part of The Construct - a graphical user interface
builder for ML::AbstractUI written in Standard ML.
Copyright (C) 1999 ANOQ of the Sun (alias Johnny Andersen)
E-mail: anoq@HardcoreProcessing.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
If you are interested in a warranty or commercial support for this
software, contact Hardcore Processing
for more information.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*)
(*require "$.gtwinnt.dgnodes";*)
(*require "$.gtwinnt.dgpcommon";*)
(*require "$.mlabstractuiwinnt.pnotifiers";*)
(*require "protocolaccessorcontr";*)
(*require "$.errorhandling.exceptions";*)
(*require "simplesmlprettyprint";*)
(*require "$.mlabstractuiwinnt.uiwindowstoportable";*)
(*require "simplesmluieval";*)
(*require "simplesml97parser";*)
signature OPERATOR_CONTR =
sig
val createController : DGNodes.t ->
{loadFileName : PString.t,
saveFileName : PString.t,
onLoad : PNotify.t,
onSave : PNotify.t,
messageString : PString.t} ->
ProtocolAccessorContr.t ->
{isTCConstructed : DGNodes.t -> bool,
createNamedControl : string -> DGNodes.t} ->
unit
end
functor FOperatorContr() :> OPERATOR_CONTR =
struct
fun createController masterNode
{loadFileName, saveFileName,
onLoad, onSave,
messageString}
{access, clear,
getAccessed, checkBinding,
addBindDesc}
{isTCConstructed,
createNamedControl} =
let
fun outF str =
PString.write messageString str
fun doLoad _ () =
let
val absSyn =
Excn.checkedExecOutF
outF
SimpleSML97Parser.parseFile
(PString.read loadFileName)
nil
in
Excn.checkedExecOutF
outF
(SimpleSMLUIEval.smlAbsSynToUI
masterNode addBindDesc createNamedControl)
absSyn
()
end
fun doSave _ () =
case getAccessed () of
NONE => outF "You must select a window to be saved!"
| SOME(aNode) =>
if DGNodes.typeName aNode = "Window" then
Excn.checkedExecOutF
outF
(fn () => (SimpleSMLPrettyPrint.saveFile
checkBinding isTCConstructed aNode
(PString.read saveFileName);
outF "Save was successful!"))
() ()
else
outF "You must select a window to be saved!"
val _ = PNotify.addNotifier onLoad doLoad
val _ = PNotify.addNotifier onSave doSave
in
()
end
end
structure OperatorContr = FOperatorContr()
HardcoreProcessing/TheConstruct/srcSML/UserInterface/ 40755 1750 1750 0 6774177665 21324 5 ustar anoq anoq HardcoreProcessing/TheConstruct/srcSML/UserInterface/UIControlPalette_sig.sml 100644 1750 1750 2350 6774177704 26167 0 ustar anoq anoq (*
This file is part of The Construct - a graphical user interface
builder for ML::AbstractUI written in Standard ML.
Copyright (C) 1999 ANOQ of the Sun (alias Johnny Andersen)
E-mail: anoq@HardcoreProcessing.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
If you are interested in a warranty or commercial support for this
software, contact Hardcore Processing
for more information.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*)
(*require "$.gtwinnt.dgnodes";*)
signature UI_CONTROL_PALETTE =
sig
val createGraph : DGNodes.t ->
{controlPalette : DGNodes.t}
end
HardcoreProcessing/TheConstruct/srcSML/UserInterface/UIControlPalette.sml 100644 1750 1750 5371 6774177704 25333 0 ustar anoq anoq (*
This file is part of The Construct - a graphical user interface
builder for ML::AbstractUI written in Standard ML.
Copyright (C) 1999 ANOQ of the Sun (alias Johnny Andersen)
E-mail: anoq@HardcoreProcessing.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
If you are interested in a warranty or commercial support for this
software, contact Hardcore Processing
for more information.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*)
(*require "$.mlabstractuiwinnt.winregistered";*)
(*require "$.gtwinnt.dgnodes";*)
(*require "$.gtwinnt.dgshorthand";*)
(*require "$.gtwinnt.dgpcommon";*)
(*require "$.mlabstractuiwinnt.pnotifiers";*)
(*require "uicontrolpalette_sig";*)
functor FUIControlPalette() :> UI_CONTROL_PALETTE =
struct
fun createGraph masterNode =
let
open DGShorthand
val masterCh = masterNode +: "Children"
val controlPalette = Reg.createA "Window"
val _ = masterCh ~+ controlPalette
val tmpProtNode = controlPalette +: "OnPointerDown"
val protocol0 = DGPPointerButtonNotify.p tmpProtNode
val tmpProtNode = controlPalette +: "Text"
val protocol1 = DGPString.p tmpProtNode
val _ = PString.write protocol1 "UI Palette"
val tmpProtNode = controlPalette +: "Visible"
val protocol2 = DGPBool.p tmpProtNode
val _ = PBool.write protocol2 true
val tmpProtNode = controlPalette +: "PosY"
val protocol3 = DGPInt.p tmpProtNode
val _ = PInt.write protocol3 308
val tmpProtNode = controlPalette +: "PosX"
val protocol4 = DGPInt.p tmpProtNode
val _ = PInt.write protocol4 608
val tmpProtNode = controlPalette +: "SizeY"
val protocol5 = DGPInt.p tmpProtNode
val _ = PInt.write protocol5 100
val tmpProtNode = controlPalette +: "SizeX"
val protocol6 = DGPInt.p tmpProtNode
val _ = PInt.write protocol6 150
in
{controlPalette = controlPalette}
end
end
structure UIControlPalette = FUIControlPalette()
HardcoreProcessing/TheConstruct/srcSML/UserInterface/ProtocolAccessor_sig.sml 100644 1750 1750 2351 6774177704 26257 0 ustar anoq anoq (*
This file is part of The Construct - a graphical user interface
builder for ML::AbstractUI written in Standard ML.
Copyright (C) 1999 ANOQ of the Sun (alias Johnny Andersen)
E-mail: anoq@HardcoreProcessing.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
If you are interested in a warranty or commercial support for this
software, contact Hardcore Processing
for more information.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*)
(*require "$.gtwinnt.dgnodes";*)
signature PROTOCOL_ACCESSOR =
sig
val createGraph : DGNodes.t ->
{protocolAccessor : DGNodes.t}
end
HardcoreProcessing/TheConstruct/srcSML/UserInterface/ProtocolAccessor.sml 100644 1750 1750 12040 6774177704 25431 0 ustar anoq anoq (*
This file is part of The Construct - a graphical user interface
builder for ML::AbstractUI written in Standard ML.
Copyright (C) 1999 ANOQ of the Sun (alias Johnny Andersen)
E-mail: anoq@HardcoreProcessing.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
If you are interested in a warranty or commercial support for this
software, contact Hardcore Processing
for more information.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*)
(*require "$.mlabstractuiwinnt.winregistered";*)
(*require "$.gtwinnt.dgnodes";*)
(*require "$.gtwinnt.dgshorthand";*)
(*require "$.gtwinnt.dgpcommon";*)
(*require "$.mlabstractuiwinnt.pnotifiers";*)
(*require "protocolaccessor_sig";*)
functor FProtocolAccessor() :> PROTOCOL_ACCESSOR =
struct
fun createGraph masterNode =
let
open DGShorthand
val masterCh = masterNode +: "Children"
val protocolAccessor = Reg.createA "Window"
val _ = masterCh ~+ protocolAccessor
val tmpProtNode = protocolAccessor +: "OnPointerDown"
val protocol0 = DGPPointerButtonNotify.p tmpProtNode
val tmpProtNode = protocolAccessor +: "Text"
val protocol1 = DGPString.p tmpProtNode
val _ = PString.write protocol1 "Protocol Accessor"
val tmpProtNode = protocolAccessor +: "Visible"
val protocol2 = DGPBool.p tmpProtNode
val _ = PBool.write protocol2 true
val tmpProtNode = protocolAccessor +: "PosY"
val protocol3 = DGPInt.p tmpProtNode
val _ = PInt.write protocol3 151
val tmpProtNode = protocolAccessor +: "PosX"
val protocol4 = DGPInt.p tmpProtNode
val _ = PInt.write protocol4 513
val tmpProtNode = protocolAccessor +: "SizeY"
val protocol5 = DGPInt.p tmpProtNode
val _ = PInt.write protocol5 100
val tmpProtNode = protocolAccessor +: "SizeX"
val protocol6 = DGPInt.p tmpProtNode
val _ = PInt.write protocol6 500
val children7 = protocolAccessor +: "Children"
val control8 = Reg.createA "TextLabel"
val _ = children7 ~+ control8
val tmpProtNode = control8 +: "OnPointerDown"
val protocol9 = DGPPointerButtonNotify.p tmpProtNode
val tmpProtNode = control8 +: "Visible"
val protocol10 = DGPBool.p tmpProtNode
val _ = PBool.write protocol10 true
val tmpProtNode = control8 +: "PosY"
val protocol11 = DGPInt.p tmpProtNode
val _ = PInt.write protocol11 0
val tmpProtNode = control8 +: "PosX"
val protocol12 = DGPInt.p tmpProtNode
val _ = PInt.write protocol12 200
val tmpProtNode = control8 +: "SizeY"
val protocol13 = DGPInt.p tmpProtNode
val _ = PInt.write protocol13 18
val tmpProtNode = control8 +: "SizeX"
val protocol14 = DGPInt.p tmpProtNode
val _ = PInt.write protocol14 300
val tmpProtNode = control8 +: "Text"
val protocol15 = DGPString.p tmpProtNode
val _ = PString.write protocol15 "Protocols"
val control17 = Reg.createA "TextLabel"
val _ = children7 ~+ control17
val tmpProtNode = control17 +: "OnPointerDown"
val protocol18 = DGPPointerButtonNotify.p tmpProtNode
val tmpProtNode = control17 +: "Visible"
val protocol19 = DGPBool.p tmpProtNode
val _ = PBool.write protocol19 true
val tmpProtNode = control17 +: "PosY"
val protocol20 = DGPInt.p tmpProtNode
val _ = PInt.write protocol20 0
val tmpProtNode = control17 +: "PosX"
val protocol21 = DGPInt.p tmpProtNode
val _ = PInt.write protocol21 0
val tmpProtNode = control17 +: "SizeY"
val protocol22 = DGPInt.p tmpProtNode
val _ = PInt.write protocol22 18
val tmpProtNode = control17 +: "SizeX"
val protocol23 = DGPInt.p tmpProtNode
val _ = PInt.write protocol23 200
val tmpProtNode = control17 +: "Text"
val protocol24 = DGPString.p tmpProtNode
val _ = PString.write protocol24 "Bindings"
in
{protocolAccessor = protocolAccessor}
end
end
structure ProtocolAccessor = FProtocolAccessor()
HardcoreProcessing/TheConstruct/srcSML/UserInterface/Operator.sml 100644 1750 1750 21372 6774177704 23750 0 ustar anoq anoq (*
This file is part of The Construct - a graphical user interface
builder for ML::AbstractUI written in Standard ML.
Copyright (C) 1999 ANOQ of the Sun (alias Johnny Andersen)
E-mail: anoq@HardcoreProcessing.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
If you are interested in a warranty or commercial support for this
software, contact Hardcore Processing
for more information.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*)
(*require "$.gtwinnt.dgshorthand";*)
(*require "$.gtwinnt.dgpcommon";*)
(*require "$.mlabstractuiwinnt.pnotifiers";*)
(*require "$.mlabstractuiwinnt.winregistered";*)
functor FOperator() =
struct
fun createGraph masterNode =
let
open DGShorthand
val masterCh = masterNode +: "Children"
val window0 = Reg.createA "Window"
val _ = masterCh ~+ window0
val tmpProtNode = window0 +: "OnPointerDown"
val protocol1 = DGPPointerButtonNotify.p tmpProtNode
val tmpProtNode = window0 +: "Text"
val protocol2 = DGPString.p tmpProtNode
val _ = PString.write protocol2 "Operator"
val tmpProtNode = window0 +: "Visible"
val protocol3 = DGPBool.p tmpProtNode
val _ = PBool.write protocol3 true
val tmpProtNode = window0 +: "PosY"
val protocol4 = DGPInt.p tmpProtNode
val _ = PInt.write protocol4 22
val tmpProtNode = window0 +: "PosX"
val protocol5 = DGPInt.p tmpProtNode
val _ = PInt.write protocol5 0
val tmpProtNode = window0 +: "SizeY"
val protocol6 = DGPInt.p tmpProtNode
val _ = PInt.write protocol6 54
val tmpProtNode = window0 +: "SizeX"
val protocol7 = DGPInt.p tmpProtNode
val _ = PInt.write protocol7 275
val children8 = window0 +: "Children"
val control9 = Reg.createA "TextLabel"
val _ = children8 ~+ control9
val tmpProtNode = control9 +: "OnPointerDown"
val protocol10 = DGPPointerButtonNotify.p tmpProtNode
val tmpProtNode = control9 +: "Visible"
val protocol11 = DGPBool.p tmpProtNode
val _ = PBool.write protocol11 true
val tmpProtNode = control9 +: "PosY"
val protocol12 = DGPInt.p tmpProtNode
val _ = PInt.write protocol12 36
val tmpProtNode = control9 +: "PosX"
val protocol13 = DGPInt.p tmpProtNode
val _ = PInt.write protocol13 0
val tmpProtNode = control9 +: "SizeY"
val protocol14 = DGPInt.p tmpProtNode
val _ = PInt.write protocol14 18
val tmpProtNode = control9 +: "SizeX"
val protocol15 = DGPInt.p tmpProtNode
val _ = PInt.write protocol15 275
val tmpProtNode = control9 +: "Text"
val messageString = DGPString.p tmpProtNode
val _ = PString.write messageString ""
val control17 = Reg.createA "Button"
val _ = children8 ~+ control17
val tmpProtNode = control17 +: "OnPointerDown"
val protocol18 = DGPPointerButtonNotify.p tmpProtNode
val tmpProtNode = control17 +: "Visible"
val protocol19 = DGPBool.p tmpProtNode
val _ = PBool.write protocol19 true
val tmpProtNode = control17 +: "PosY"
val protocol20 = DGPInt.p tmpProtNode
val _ = PInt.write protocol20 0
val tmpProtNode = control17 +: "PosX"
val protocol21 = DGPInt.p tmpProtNode
val _ = PInt.write protocol21 0
val tmpProtNode = control17 +: "SizeY"
val protocol22 = DGPInt.p tmpProtNode
val _ = PInt.write protocol22 18
val tmpProtNode = control17 +: "SizeX"
val protocol23 = DGPInt.p tmpProtNode
val _ = PInt.write protocol23 75
val tmpProtNode = control17 +: "OnAction"
val onLoad = DGPNotify.p tmpProtNode
val tmpProtNode = control17 +: "Text"
val protocol24 = DGPString.p tmpProtNode
val _ = PString.write protocol24 "Load"
val control26 = Reg.createA "Button"
val _ = children8 ~+ control26
val tmpProtNode = control26 +: "OnPointerDown"
val protocol27 = DGPPointerButtonNotify.p tmpProtNode
val tmpProtNode = control26 +: "Visible"
val protocol28 = DGPBool.p tmpProtNode
val _ = PBool.write protocol28 true
val tmpProtNode = control26 +: "PosY"
val protocol29 = DGPInt.p tmpProtNode
val _ = PInt.write protocol29 18
val tmpProtNode = control26 +: "PosX"
val protocol30 = DGPInt.p tmpProtNode
val _ = PInt.write protocol30 0
val tmpProtNode = control26 +: "SizeY"
val protocol31 = DGPInt.p tmpProtNode
val _ = PInt.write protocol31 18
val tmpProtNode = control26 +: "SizeX"
val protocol32 = DGPInt.p tmpProtNode
val _ = PInt.write protocol32 75
val tmpProtNode = control26 +: "OnAction"
val onSave = DGPNotify.p tmpProtNode
val tmpProtNode = control26 +: "Text"
val protocol33 = DGPString.p tmpProtNode
val _ = PString.write protocol33 "Save"
val control35 = Reg.createA "TextField"
val _ = children8 ~+ control35
val tmpProtNode = control35 +: "OnPointerDown"
val protocol36 = DGPPointerButtonNotify.p tmpProtNode
val tmpProtNode = control35 +: "Visible"
val protocol37 = DGPBool.p tmpProtNode
val _ = PBool.write protocol37 true
val tmpProtNode = control35 +: "PosY"
val protocol38 = DGPInt.p tmpProtNode
val _ = PInt.write protocol38 0
val tmpProtNode = control35 +: "PosX"
val protocol39 = DGPInt.p tmpProtNode
val _ = PInt.write protocol39 75
val tmpProtNode = control35 +: "SizeY"
val protocol40 = DGPInt.p tmpProtNode
val _ = PInt.write protocol40 18
val tmpProtNode = control35 +: "SizeX"
val protocol41 = DGPInt.p tmpProtNode
val _ = PInt.write protocol41 200
val tmpProtNode = control35 +: "HasFocus"
val protocol42 = DGPBool.p tmpProtNode
val _ = PBool.write protocol42 false
val tmpProtNode = control35 +: "EditableText"
val loadFileName = DGPString.p tmpProtNode
val _ = PString.write loadFileName ""
val control44 = Reg.createA "TextField"
val _ = children8 ~+ control44
val tmpProtNode = control44 +: "OnPointerDown"
val protocol45 = DGPPointerButtonNotify.p tmpProtNode
val tmpProtNode = control44 +: "Visible"
val protocol46 = DGPBool.p tmpProtNode
val _ = PBool.write protocol46 true
val tmpProtNode = control44 +: "PosY"
val protocol47 = DGPInt.p tmpProtNode
val _ = PInt.write protocol47 18
val tmpProtNode = control44 +: "PosX"
val protocol48 = DGPInt.p tmpProtNode
val _ = PInt.write protocol48 75
val tmpProtNode = control44 +: "SizeY"
val protocol49 = DGPInt.p tmpProtNode
val _ = PInt.write protocol49 18
val tmpProtNode = control44 +: "SizeX"
val protocol50 = DGPInt.p tmpProtNode
val _ = PInt.write protocol50 200
val tmpProtNode = control44 +: "HasFocus"
val protocol51 = DGPBool.p tmpProtNode
val _ = PBool.write protocol51 true
val tmpProtNode = control44 +: "EditableText"
val saveFileName = DGPString.p tmpProtNode
val _ = PString.write saveFileName ""
in
{saveFileName = saveFileName,
loadFileName = loadFileName,
onSave = onSave,
onLoad = onLoad,
messageString = messageString}
end
end
structure Operator = FOperator()
HardcoreProcessing/TheConstruct/srcSML/ProtocolManip/ 40755 1750 1750 0 6774177704 21345 5 ustar anoq anoq HardcoreProcessing/TheConstruct/srcSML/ProtocolManip/ProtocolManip.sml 100644 1750 1750 15415 6774177704 24773 0 ustar anoq anoq (*
This file is part of The Construct - a graphical user interface
builder for ML::AbstractUI written in Standard ML.
Copyright (C) 1999 ANOQ of the Sun (alias Johnny Andersen)
E-mail: anoq@HardcoreProcessing.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
If you are interested in a warranty or commercial support for this
software, contact Hardcore Processing
for more information.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*)
(*require "$.collectionswinnt.dictionary";*)
(*require "$.gtwinnt.dgpcommon";*)
(*require "$.basis.__int";*)
(*require "$.gtwinnt.dgnodes";*)
(*require "$.mlabstractui.pnotifiers";*)
(*require "$.mlabstractui.uiprotocols";*)
functor FProtocolManip() =
struct
val funcDict = ref (StringDict.empty :
int StringDict.t)
fun addFunction name args =
(funcDict :=
StringDict.insert
(!funcDict) name args)
fun functionArgs name =
case StringDict.lookup
(!funcDict) name of
NONE => 0 (* It is not a function... *)
| SOME(args) => args
val _ = addFunction "Reg.createA" 1
type registeredP =
{readAsString : DGNodes.t -> string,
writeAsString : (DGNodes.t * string) -> unit,
saveSML : ((string -> unit) * (unit -> unit)) ->
(DGNodes.t * string * string) -> unit}
val protDict = ref (StringDict.empty :
registeredP StringDict.t)
fun addProtocol {readAsString, writeAsString, typeName, saveSML} =
(protDict :=
StringDict.insert
(!protDict) typeName
{readAsString = readAsString,
writeAsString = writeAsString,
saveSML = saveSML};
addFunction ("DGP" ^ typeName ^ ".p") 1;
addFunction ("P" ^ typeName ^ ".write") 2)
fun getProtocol typeName =
StringDict.lookup
(!protDict) typeName
(* PString protocol *)
fun readPString node =
PString.read (DGPString.p node)
fun savePString (outF, outLF) (node, binding, protBinding) =
(outF ("val " ^ protBinding);
outF " = DGPString.p ";
outF binding; outLF ();
outF ("val _ = PString.write " ^ protBinding ^ " \"");
outF (readPString node); outF "\""; outLF ())
val _ = addProtocol
{typeName = "String",
readAsString = readPString,
writeAsString = fn (node, value) =>
PString.write (DGPString.p node) value,
saveSML = savePString}
(* PBool protocol *)
fun readPBool node =
case PBool.read (DGPBool.p node) of
true => "true"
| false => "false"
fun writePBool (node, value) =
case value of
"true" => PBool.write (DGPBool.p node) true
| "false" => PBool.write (DGPBool.p node) false
| _ => ()
fun savePBool (outF, outLF) (node, binding, protBinding) =
(outF ("val " ^ protBinding ^ " = DGPBool.p ");
outF binding; outLF ();
outF ("val _ = PBool.write " ^ protBinding ^ " ");
outF (readPBool node); outLF ())
val _ = addProtocol
{typeName = "Bool",
readAsString = readPBool,
writeAsString = writePBool,
saveSML = savePBool}
(* PInt protocol *)
fun readPInt node =
Int.toString(PInt.read (DGPInt.p node))
fun savePInt (outF, outLF) (node, binding, protBinding) =
(outF ("val " ^ protBinding ^ " = DGPInt.p ");
outF binding; outLF ();
outF ("val _ = PInt.write " ^ protBinding ^ " ");
outF (readPInt node); outLF ())
val _ = addProtocol
{typeName = "Int",
readAsString = readPInt,
writeAsString = fn (node, value) =>
(case Int.fromString value of
NONE => ()
| SOME(anInt) =>
PInt.write
(DGPInt.p node)
anInt),
saveSML = savePInt}
(* PNotify protocol *)
fun readPNotify node =
"(only for bindings)"
fun savePNotify (outF, outLF) (node, binding, protBinding) =
(outF ("val " ^ protBinding ^ " = DGPNotify.p ");
outF binding; outLF ())
val _ = addProtocol
{typeName = "Notify",
readAsString = readPNotify,
writeAsString = fn (node, value) => (),
saveSML = savePNotify}
(* PPointerButtonNotify protocol *)
fun readPPointerButtonNotify node =
"(only for bindings)"
fun savePPointerButtonNotify (outF, outLF) (node, binding, protBinding) =
(outF ("val " ^ protBinding ^ " = DGPPointerButtonNotify.p ");
outF binding; outLF ())
val _ = addProtocol
{typeName = "PointerButtonNotify",
readAsString = readPPointerButtonNotify,
writeAsString = fn (node, value) => (),
saveSML = savePPointerButtonNotify}
(* PStrings protocol *)
fun readPStrings node =
"(only for bindings)"
fun savePStrings (outF, outLF) (node, binding, protBinding) =
(outF ("val " ^ protBinding ^ " = DGPStrings.p ");
outF binding; outLF ())
val _ = addProtocol
{typeName = "Strings",
readAsString = readPStrings,
writeAsString = fn (node, value) => (),
saveSML = savePStrings}
(* PItemSelections protocol *)
fun readPItemSelections node =
"(only for bindings)"
fun savePItemSelections (outF, outLF) (node, binding, protBinding) =
(outF ("val " ^ protBinding ^ " = DGPItemSelections.p ");
outF binding; outLF ())
val _ = addProtocol
{typeName = "ItemSelections",
readAsString = readPItemSelections,
writeAsString = fn (node, value) => (),
saveSML = savePItemSelections}
end
structure ProtocolManip = FProtocolManip()
HardcoreProcessing/TheConstruct/srcSML/sources.cm 100644 1750 1750 1262 6774177704 20661 0 ustar anoq anoq Group is
../../MLAbstractUI/srcSML/sources.cm
../../ParsingToolkit/srcSML/sources.cm
ml-yacc-lib.cm
FileIO/sml97.lex
FileIO/SimpleSML97.grm
(*FileIO/sml97.grm*)
FileIO/SML97Key_sig.sml
FileIO/SML97Key.sml
FileIO/AbsSynSimpleSML.sml
FileIO/AbsSynSimpleSML_sig.sml
FileIO/SimpleSML97Parser.sml
FileIO/SimpleSMLUIEval.sml
FileIO/SimpleSMLPrettyPrint.sml
Controller/TheConstruct.sml
Controller/ProtocolAccessorContr.sml
Controller/UIControlPaletteContr.sml
Controller/OperatorContr.sml
UserInterface/UIControlPalette_sig.sml
UserInterface/UIControlPalette.sml
UserInterface/ProtocolAccessor_sig.sml
UserInterface/ProtocolAccessor.sml
UserInterface/Operator.sml
ProtocolManip/ProtocolManip.sml
HardcoreProcessing/TheConstruct/srcSML/FileIO/ 40755 1750 1750 0 6774177704 17666 5 ustar anoq anoq HardcoreProcessing/TheConstruct/srcSML/FileIO/sml97.lex 100644 1750 1750 11506 6774177704 21473 0 ustar anoq anoq (*
This file is part of The Construct - a graphical user interface
builder for ML::AbstractUI written in Standard ML.
Copyright (C) 1999 ANOQ of the Sun (alias Johnny Andersen)
E-mail: anoq@HardcoreProcessing.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
If you are interested in a warranty or commercial support for this
software, contact Hardcore Processing
for more information.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*)
(*require "simplesml97_grm"; *)
(*require "sml97key"; *)
(*require "$.parsingtkwinnt.lexerrormsg";*)
(*require "$.parsingtkwinnt.lexmisc";*)
structure Key = FSML97Key(Tokens)
type pos = int
type svalue = Tokens.svalue
type ('a, 'b) token = ('a, 'b) Tokens.token
type lexresult = (svalue, pos) token
val lineNum = ErrorMsg.lineNum
val linePos = ErrorMsg.linePos
val error = ErrorMsg.error
val commentNest = ErrorMsg.commentNest
val decStringToInt = LexMisc.decStringToInt
val decStringToReal = LexMisc.decStringToReal
(* FIXME: Do this right! *)
fun fl (pos, rg) = (pos, pos + rg);
fun vfl (value, pos, rg) = ((value, pos, pos + rg));
fun eof() = let val pos = hd(!linePos) in Tokens.EOF( fl (pos, 0)) end
%%
%header (functor FSML97LexFun(
structure Tokens : SML97_TOKENS));
%full
ws=[\ \t];
digit=[0-9];
letter=[A-Za-z];
symbol=[!%&$#+-/:<=>?@\~`^|*];
hatescape=[A-Z@\\_^]|"["|"]";
stdescape=[abfnrtv];
strws=[\ \t\n\f];
alphanumident={letter}(({letter}|{digit}|"_"|"'")*);
identifier={alphanumident}|({symbol}+);
%s MLCOMMENT;
%%
\n => (lineNum := !lineNum+1;
linePos := yypos :: !linePos;
continue());
{ws}+ => (continue());
"(*" => (YYBEGIN MLCOMMENT; continue ());
"~"{digit}+ => (Tokens.LITNEGINT(
vfl (decStringToInt (yytext, yypos),
yypos, size yytext)));
{digit}+ => (Tokens.LITPOSINT(
vfl (decStringToInt (yytext, yypos),
yypos, size yytext)));
"[" => (Tokens.LBRACKET( fl (yypos, 1) ));
"]" => (Tokens.RBRACKET( fl (yypos, 1) ));
"{" => (Tokens.LCBRACE( fl (yypos, 1) ));
"}" => (Tokens.RCBRACE( fl (yypos, 1) ));
"(" => (Tokens.LPAREN( fl (yypos, 1) ));
")" => (Tokens.RPAREN( fl (yypos, 1) ));
"," => (Tokens.COMMA( fl (yypos, 1) ));
";" => (Tokens.SEMICOLON( fl (yypos, 1) ));
"..." => (Tokens.DOTDOTDOT( fl (yypos, 3) ));
"_" => (Tokens.UNDERSCORE( fl (yypos, 1) ));
{identifier} => (Key.checkKeyword (yytext, yypos));
{identifier}("."{identifier})+
=> (Tokens.COMPIDENT(
vfl (yytext, yypos, size yytext)
));
"'""'"?"_"?{alphanumident}
=> (Tokens.TYPEVAR(
vfl (yytext, yypos, size yytext)
));
"~"?{digit}+("."{digit}+)("E""~"?{digit}+)?
=> (Tokens.LITREAL(
vfl (decStringToReal (yytext, yypos),
yypos, size yytext)));
"~"?{digit}+("E""~"?{digit}+) =>
(Tokens.LITREAL(
vfl (decStringToReal (yytext, yypos),
yypos, size yytext)));
"#"?\"([^\\\"\n]|(\\({stdescape}|
("^"{hatescape})|
({digit}{3})|
(\") | (\\) |
({strws}+\\)
)))*\" =>
(Key.getStringOrChar(yytext, yypos));
"(*" => (commentNest := (!commentNest) + 1;
continue ());
"*)" => (if !commentNest <= 0 then
(YYBEGIN INITIAL)
else
(commentNest := (!commentNest) - 1);
continue());
. => (continue());
. => (error yypos ("illegal character " ^ yytext); continue());
HardcoreProcessing/TheConstruct/srcSML/FileIO/sml97.grm 100644 1750 1750 50676 6774177704 21503 0 ustar anoq anoq (*
This file is part of The Construct - a graphical user interface
builder for ML::AbstractUI written in Standard ML.
Copyright (C) 1999 ANOQ of the Sun (alias Johnny Andersen)
E-mail: anoq@HardcoreProcessing.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
If you are interested in a warranty or commercial support for this
software, contact Hardcore Processing
for more information.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*)
%%
(* Keywords *)
%term IF
| THEN
| ELSE
| STRUCTURE
| STRUCT
| SIGNATURE
| FUNCTOR
| LOCAL
| IN
| END
| AND
| ANDALSO
| ORELSE
| VAL
| TYPE
| EQTYPE
| DATATYPE
| ABSTYPE
| WITH
| EXCEPTION
| OPEN
| WITHTYPE
| OP
| LET
| SIG
| WHERE
| SHARING
| INCLUDE
| OF
| FUN
| INFIX
| INFIXR
| NONFIX
| HANDLE
| RAISE
| CASE
| FN
| WHILE
| DO
| AS
| REC
(* Symbols *)
| COMMA
| SEMICOLON
| EQUAL
| COLON
| LPAREN
| RPAREN
| LBRACKET
| RBRACKET
| LCBRACE
| RCBRACE
| OPAQUECONSTR
| PIPE
| HASH
| EQUALGREATER
| UNDERSCORE
| DOTDOTDOT
| ASTERISK
| DASHGREATER
(* Tokens with semantic values *)
| LITSTRING of string
| LITCHAR of char
| LITPOSINT of int
| LITNEGINT of int
| LITREAL of real
| IDENT of string
| COMPIDENT of string
| TYPEVAR of string
| EOF
%nonterm program
| top_decls
| top_decl
| object_decls
| object_decl
| struct_bindings
| struct_binding
| sig_constr_opt
| sig_constraint
| signature_decl
| sig_bindings
| sig_binding
| functor_decl
| functor_bindings
| functor_binding
| functor_param
| structuree
| signaturee
| sig_wheres
| sig_where
| specifications_opt
| specifications
| specification
| val_specs
| val_spec
| type_specs
| type_spec
| eqtype_specs
| eqtype_spec
| exception_specs
| structure_specs
| structure_spec
| sharing_specs
| sharing_spec
| eqcompound_idents
| declarations_opt
| declarations
| declaration
| withtype_clause
| withtype_opt
| value_bindings
| value_binding
| fun_bindings
| fun_binding
| fun_bindcase
| excn_bindings
| excn_bindings_opt
| of_type_opt
| operator_decl
| fun_heading
| type_bindings
| type_binding
| datatype_bindings
| datatype_binding
| datatype_cases
| datatype_case
| type_var_list
| type_vars
| expression
| typed_expr
| bool_expr
| handle_expr
| while_expr
| if_expr
| raise_expr
| case_expr
| boolean_op
| atomic_expressions
| atomic_expression
| expressions_semi
| expressions
| expressions_opt
| label_exp
| label_exps
| label_exps_opt
| match
| match_cases
| match_case
| patterns
| patterns_opt
| pattern
| atomic_patterns
| atomic_pattern
| record_patterns_opt
| record_patterns
| record_pattern
| as_pattern_opt
| lltype
| typee
| types
| startype
| paramtype
| label_type
| label_types
| label_types_opt
| colon_type_opt
| rec_opt
| semicolon_opt
| digit_opt
| compound_name
| compound_ident
| compound_idents
| infix_no_compound
| infix_operator
| label
| ident
| idents
| name
| constant
%pos int
%left ASTERISK IDENT COMPIDENT
%right DASHGREATER SEMICOLON
%start program
%verbose
%eop EOF %noshift EOF
%name SML97
%header (functor FSML97LrValsFun(
structure Token : TOKEN
structure Abs : ABS_SYN_SIMPLE_SML)
)
%%
(* This is based on the syntax charts from
L.C. Paulson's "ML for the Working Programmer",
starting from page 457. *)
program : top_decls ()
top_decls : ()
| top_decl semicolon_opt
top_decls ()
top_decl : expression ()
| object_decl ()
| signature_decl ()
| functor_decl ()
object_decls : ()
| object_decl semicolon_opt
object_decls ()
object_decl : declaration ()
| STRUCTURE struct_bindings ()
| LOCAL object_decls IN
object_decls END ()
struct_bindings : struct_binding ()
| struct_binding AND
struct_bindings ()
struct_binding : ident sig_constr_opt
EQUAL structuree ()
sig_constr_opt : ()
| sig_constraint ()
sig_constraint : COLON signaturee ()
| OPAQUECONSTR signaturee ()
signature_decl : SIGNATURE sig_bindings ()
sig_bindings : sig_binding ()
| sig_binding AND sig_bindings ()
sig_binding : ident EQUAL signaturee ()
functor_decl : FUNCTOR functor_bindings ()
functor_bindings : functor_binding ()
| functor_binding AND
functor_bindings ()
functor_binding : ident LPAREN functor_param
RPAREN sig_constr_opt
EQUAL structuree ()
functor_param : ident COLON signaturee ()
| specifications_opt ()
structuree : STRUCT object_decls END ()
| compound_ident ()
| ident LPAREN structuree
RPAREN ()
| ident LPAREN object_decls
RPAREN ()
| LET object_decls IN
structuree END ()
| structuree sig_constraint ()
signaturee : SIG specifications_opt END ()
| ident ()
| signaturee WHERE TYPE
sig_wheres ()
sig_wheres : sig_where ()
| sig_where AND sig_wheres ()
sig_where : type_var_list compound_ident
EQUAL typee ()
specifications_opt : ()
| specifications ()
specifications : specification ()
| specification semicolon_opt
specifications ()
specification : VAL val_specs ()
| TYPE type_specs ()
| EQTYPE eqtype_specs ()
| DATATYPE datatype_bindings ()
| EXCEPTION exception_specs ()
| STRUCTURE structure_specs ()
| SHARING sharing_specs ()
| INCLUDE idents ()
val_specs : val_spec ()
| val_spec AND val_specs ()
val_spec : ident COLON typee ()
type_specs : type_spec ()
| type_spec AND type_specs ()
type_spec : type_var_list ident ()
| type_var_list ident
EQUAL typee ()
eqtype_specs : eqtype_spec ()
| eqtype_spec AND eqtype_specs ()
eqtype_spec : type_var_list ident ()
exception_specs : ident OF typee ()
| ident of_type_opt AND
exception_specs ()
structure_specs : structure_spec ()
| structure_spec AND
structure_specs ()
structure_spec : ident COLON signaturee ()
sharing_specs : sharing_spec ()
| sharing_spec AND
sharing_specs ()
sharing_spec : TYPE eqcompound_idents ()
| eqcompound_idents ()
eqcompound_idents : compound_ident ()
| compound_ident EQUAL
eqcompound_idents ()
declarations_opt : ()
| declarations ()
declarations : declaration ()
| declaration semicolon_opt
declarations ()
declaration : VAL value_bindings ()
| FUN fun_bindings ()
| TYPE type_bindings ()
| DATATYPE datatype_bindings
withtype_clause ()
| ABSTYPE datatype_bindings
withtype_opt WITH
declarations_opt END ()
| EXCEPTION excn_bindings ()
| LOCAL declarations_opt IN
declarations_opt END ()
| OPEN compound_idents ()
| operator_decl ()
withtype_clause : WITHTYPE type_bindings ()
withtype_opt : withtype_clause ()
| ()
value_bindings : value_binding ()
| value_binding AND
value_bindings ()
value_binding : rec_opt pattern EQUAL
expression ()
fun_bindings : fun_binding ()
| fun_binding AND fun_bindings ()
fun_binding : fun_bindcase ()
| fun_bindcase PIPE fun_binding ()
fun_bindcase : fun_heading colon_type_opt
EQUAL expression ()
(* The exception bindings seems complex to describe... *)
excn_bindings : name of_type_opt
excn_bindings_opt ()
| name EQUAL compound_name AND
excn_bindings ()
excn_bindings_opt : AND excn_bindings ()
| ()
of_type_opt : OF typee ()
| ()
operator_decl : INFIX digit_opt idents ()
| INFIXR digit_opt idents ()
| NONFIX idents ()
fun_heading : name atomic_pattern
atomic_patterns ()
| LPAREN atomic_pattern
infix_operator
atomic_pattern RPAREN
atomic_patterns ()
| atomic_pattern infix_operator
atomic_pattern ()
type_bindings : type_binding ()
| type_binding AND
type_bindings ()
type_binding : type_var_list ident EQUAL
typee ()
datatype_bindings : datatype_binding ()
| datatype_binding AND
datatype_bindings ()
datatype_binding : type_var_list ident EQUAL
datatype_cases ()
datatype_cases : datatype_case ()
| datatype_case PIPE
datatype_cases ()
datatype_case : ident of_type_opt ()
type_var_list : ()
| TYPEVAR ()
| LPAREN type_vars RPAREN ()
type_vars : TYPEVAR ()
| TYPEVAR COMMA type_vars ()
(* FIXME: These expressions problably have wrong precedens... *)
typed_expr : atomic_expressions COLON
typee ()
| atomic_expressions ()
bool_expr : typed_expr boolean_op
bool_expr ()
| typed_expr ()
handle_expr : handle_expr HANDLE match ()
| bool_expr ()
raise_expr : RAISE raise_expr ()
| handle_expr ()
if_expr : IF expression THEN expression
ELSE if_expr ()
| raise_expr ()
while_expr : WHILE expression DO
while_expr ()
| if_expr ()
case_expr : CASE expression OF match ()
| while_expr ()
expression : FN match ()
| case_expr ()
boolean_op : ORELSE ()
| ANDALSO ()
(* Atomic and infix expressions are merged here
becuase the parser can never know if a symbol
is an infix operator or an operand... *)
atomic_expressions : atomic_expression ()
| atomic_expression
atomic_expressions ()
atomic_expression : infix_no_compound ()
| compound_name ()
| constant ()
| LPAREN expressions_opt
RPAREN ()
| LPAREN expression
SEMICOLON expressions_semi
RPAREN ()
| LBRACKET expressions_opt
RBRACKET ()
| LCBRACE label_exps_opt
RCBRACE ()
| HASH label ()
| LET declarations_opt IN
expressions_semi END ()
expressions_semi : expression ()
| expression SEMICOLON
expressions_semi ()
expressions : expression ()
| expression COMMA expressions ()
expressions_opt : ()
| expressions ()
label_exp : label EQUAL expression ()
label_exps : label_exp ()
| label_exp COMMA label_exps ()
label_exps_opt : ()
| label_exps ()
match : match_cases ()
match_cases : match_case ()
| match_case PIPE match_cases ()
match_case : pattern EQUALGREATER
expression ()
patterns : pattern ()
| pattern COMMA patterns ()
patterns_opt : ()
| patterns ()
pattern : atomic_pattern ()
| compound_name atomic_pattern ()
| pattern infix_operator
pattern ()
| pattern COLON typee ()
| name colon_type_opt AS
pattern ()
atomic_patterns : ()
| atomic_pattern
atomic_patterns ()
atomic_pattern : UNDERSCORE ()
| compound_name ()
| constant ()
| LPAREN patterns_opt RPAREN ()
| LBRACKET patterns_opt
RBRACKET ()
| LCBRACE record_patterns_opt
RCBRACE ()
record_patterns_opt : ()
| record_patterns ()
record_patterns : record_pattern ()
| DOTDOTDOT ()
| record_pattern COMMA
record_patterns ()
record_pattern : label EQUAL pattern ()
| ident colon_type_opt
as_pattern_opt ()
as_pattern_opt : AS pattern ()
| ()
(* FIXME: I hope I have got these type precedences right... *)
typee : startype ()
| startype DASHGREATER typee ()
types : typee ()
| typee COMMA types ()
startype : paramtype ()
| paramtype ASTERISK startype ()
paramtype : lltype ()
| paramtype compound_ident ()
| compound_ident ()
| LPAREN typee COMMA types
RPAREN compound_ident ()
lltype : TYPEVAR ()
| LCBRACE label_types_opt
RCBRACE ()
| LPAREN typee RPAREN ()
label_type : label COLON typee ()
label_types : label_type ()
| label_type COMMA label_types ()
label_types_opt : ()
| label_types ()
colon_type_opt : ()
| COLON typee ()
rec_opt : ()
| REC ()
semicolon_opt : ()
| SEMICOLON ()
(* FIXME: Should really only be one digit *)
digit_opt : ()
| LITPOSINT ()
compound_name : compound_ident ()
| OP infix_operator ()
compound_ident : COMPIDENT ()
| IDENT ()
compound_idents : compound_ident ()
| compound_ident
compound_idents ()
infix_no_compound : ASTERISK ()
| EQUAL ()
infix_operator : ident ()
| infix_no_compound ()
label : ident ()
| LITPOSINT ()
ident : IDENT ()
idents : ident ()
| ident idents ()
name : ident ()
| OP infix_operator ()
constant : LITPOSINT ()
| LITNEGINT ()
| LITSTRING ()
| LITCHAR ()
| LITREAL ()
HardcoreProcessing/TheConstruct/srcSML/FileIO/SimpleSML97.grm 100644 1750 1750 60644 6774177704 22511 0 ustar anoq anoq %%
(*
This file is part of The Construct - a graphical user interface
builder for ML::AbstractUI written in Standard ML.
Copyright (C) 1999 ANOQ of the Sun (alias Johnny Andersen)
E-mail: anoq@HardcoreProcessing.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
If you are interested in a warranty or commercial support for this
software, contact Hardcore Processing
for more information.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*)
(* Keywords *)
%term IF
| THEN
| ELSE
| STRUCTURE
| STRUCT
| SIGNATURE
| FUNCTOR
| LOCAL
| IN
| END
| AND
| ANDALSO
| ORELSE
| VAL
| TYPE
| EQTYPE
| DATATYPE
| ABSTYPE
| WITH
| EXCEPTION
| OPEN
| WITHTYPE
| OP
| LET
| SIG
| WHERE
| SHARING
| INCLUDE
| OF
| FUN
| INFIX
| INFIXR
| NONFIX
| HANDLE
| RAISE
| CASE
| FN
| WHILE
| DO
| AS
| REC
(* Symbols *)
| COMMA
| SEMICOLON
| EQUAL
| COLON
| LPAREN
| RPAREN
| LBRACKET
| RBRACKET
| LCBRACE
| RCBRACE
| OPAQUECONSTR
| PIPE
| HASH
| EQUALGREATER
| UNDERSCORE
| DOTDOTDOT
| ASTERISK
| DASHGREATER
(* Tokens with semantic values *)
| LITSTRING of string
| LITCHAR of char
| LITPOSINT of int
| LITNEGINT of int
| LITREAL of real
| IDENT of string
| COMPIDENT of string
| TYPEVAR of string
| EOF
%nonterm program of Abs.decl list
| top_decls of Abs.decl list
| top_decl of Abs.decl
| object_decls of Abs.decl list
| object_decl of Abs.decl
| struct_bindings
| struct_binding
| sig_constr_opt
| sig_constraint
| signature_decl
| sig_bindings
| sig_binding
| functor_decl of Abs.decl
| functor_bindings of Abs.decl
| functor_binding of Abs.decl
| functor_param
| structuree of Abs.decl
| signaturee
(*| sig_wheres*)
| sig_where
| specifications_opt
| specifications
| specification
| val_specs
| val_spec
| type_specs
| type_spec
| eqtype_specs
| eqtype_spec
| exception_specs
| structure_specs
| structure_spec
| sharing_specs
| sharing_spec
| eqcompound_idents
| declarations_opt of Abs.decl list
| declarations of Abs.decl list
| declaration of Abs.decl
| withtype_clause
| withtype_opt
| value_bindings of Abs.decl
| value_binding of Abs.decl
| fun_bindings of Abs.decl
| fun_binding of Abs.decl
| fun_bindcase of Abs.decl
| excn_bindings
| excn_bindings_opt
| of_type_opt
(*| operator_decl*)
| fun_heading
| type_bindings
| type_binding
| datatype_bindings
| datatype_binding
| datatype_cases
| datatype_case
| type_var_list
| type_vars
| expression of Abs.expr
| typed_expr of Abs.expr
| bool_expr of Abs.expr
(*| handle_expr
| while_expr*)
| if_expr of Abs.expr
| raise_expr of Abs.expr
(*| case_expr*)
| boolean_op
| atomic_expressions of Abs.expr list
| atomic_expression of Abs.expr
| expressions_semi of Abs.expr list
| expressions of Abs.expr list
| expressions_opt of Abs.expr list
| label_exp of Abs.symbol * Abs.expr
| label_exps of (Abs.symbol * Abs.expr) list
| label_exps_opt of (Abs.symbol * Abs.expr) list
(*| match
| match_cases
| match_case*)
| patterns of Abs.pattern list
| patterns_opt of Abs.pattern list
| pattern of Abs.pattern
| atomic_patterns of Abs.pattern list
| atomic_pattern of Abs.pattern
| record_patterns_opt
| record_patterns
| record_pattern
| as_pattern_opt
| lltype
| typee
| types
| startype
| paramtype
| label_type
| label_types
| label_types_opt
| colon_type_opt
| rec_opt
| semicolon_opt
(*| digit_opt*)
| compound_name of Abs.symbol
| compound_ident of Abs.symbol
| compound_idents of Abs.symbol list
| infix_no_compound
| infix_operator
| label of Abs.symbol
| ident of Abs.symbol
| idents of Abs.symbol list
| name of Abs.symbol
| constant of Abs.expr
%pos int
%left ASTERISK IDENT COMPIDENT
%right DASHGREATER SEMICOLON
%start program
%verbose
%eop EOF %noshift EOF
%name SML97
%header (functor FSML97LrValsFun(
structure Token : TOKEN
structure Abs : ABS_SYN_SIMPLE_SML)
)
%%
(* This is based on the syntax charts from
L.C. Paulson's "ML for the Working Programmer",
starting from page 457. *)
program : top_decls (top_decls)
top_decls : (nil)
| top_decl semicolon_opt
top_decls (top_decl::top_decls)
top_decl : object_decl (Abs.NotImplDecl)
| signature_decl (Abs.NotImplDecl)
| functor_decl (functor_decl)
(* | expression (Abs.NotImplDecl) *)
object_decls : (nil)
| object_decl semicolon_opt
object_decls (object_decl::object_decls)
object_decl : declaration (declaration)
| STRUCTURE struct_bindings (Abs.NotImplDecl)
(* FIXME: Local has been removed in object declarations *)
(*| LOCAL object_decls IN
object_decls END ()*)
struct_bindings : struct_binding ()
| struct_binding AND
struct_bindings ()
struct_binding : ident sig_constr_opt
EQUAL structuree ()
sig_constr_opt : ()
| sig_constraint ()
sig_constraint : COLON signaturee ()
| OPAQUECONSTR signaturee ()
signature_decl : SIGNATURE sig_bindings ()
sig_bindings : sig_binding ()
| sig_binding AND sig_bindings ()
sig_binding : ident EQUAL signaturee ()
functor_decl : FUNCTOR functor_bindings (functor_bindings)
functor_bindings : functor_binding (functor_binding)
| functor_binding AND
functor_bindings (Abs.NotImplDecl)
functor_binding : ident LPAREN functor_param
RPAREN sig_constr_opt
EQUAL structuree (structuree)
functor_param : ident COLON signaturee ()
| specifications_opt ()
structuree : STRUCT object_decls END (Abs.Structure{decls = object_decls})
| compound_ident (Abs.NotImplDecl)
| ident LPAREN structuree
RPAREN (Abs.NotImplDecl)
| ident LPAREN object_decls
RPAREN (Abs.NotImplDecl)
| LET object_decls IN
structuree END (Abs.NotImplDecl)
| structuree sig_constraint (structuree)
signaturee : SIG specifications_opt END ()
| ident ()
| signaturee WHERE TYPE
(*sig_wheres*) sig_where ()
(*sig_wheres : sig_where ()
| sig_where AND sig_wheres ()*)
sig_where : type_var_list compound_ident
EQUAL typee ()
specifications_opt : ()
| specifications ()
specifications : specification ()
| specification semicolon_opt
specifications ()
specification : VAL val_specs ()
| TYPE type_specs ()
| EQTYPE eqtype_specs ()
| DATATYPE datatype_bindings ()
| EXCEPTION exception_specs ()
| STRUCTURE structure_specs ()
| SHARING sharing_specs ()
| INCLUDE idents ()
val_specs : val_spec ()
| val_spec AND val_specs ()
val_spec : ident COLON typee ()
type_specs : type_spec ()
| type_spec AND type_specs ()
type_spec : type_var_list ident ()
| type_var_list ident
EQUAL typee ()
eqtype_specs : eqtype_spec ()
| eqtype_spec AND eqtype_specs ()
eqtype_spec : type_var_list ident ()
exception_specs : ident OF typee ()
| ident of_type_opt AND
exception_specs ()
structure_specs : structure_spec ()
| structure_spec AND
structure_specs ()
structure_spec : ident COLON signaturee ()
sharing_specs : sharing_spec ()
| sharing_spec AND
sharing_specs ()
sharing_spec : TYPE eqcompound_idents ()
| eqcompound_idents ()
eqcompound_idents : compound_ident ()
| compound_ident EQUAL
eqcompound_idents ()
declarations_opt : (nil)
| declarations (declarations)
declarations : declaration ([declaration])
| declaration semicolon_opt
declarations (declaration::
declarations)
declaration : VAL value_bindings (value_bindings)
| FUN fun_bindings (fun_bindings)
| TYPE type_bindings (Abs.NotImplDecl)
| DATATYPE datatype_bindings
withtype_clause (Abs.NotImplDecl)
| ABSTYPE datatype_bindings
withtype_opt WITH
declarations_opt END (Abs.NotImplDecl)
| EXCEPTION excn_bindings (Abs.NotImplDecl)
| OPEN compound_idents (Abs.OpenDecl{structs = compound_idents})
(*| operator_decl () *)
| LOCAL declarations_opt IN
declarations_opt END (Abs.NotImplDecl)
withtype_clause : WITHTYPE type_bindings ()
withtype_opt : withtype_clause ()
| ()
value_bindings : value_binding (value_binding)
| value_binding AND
value_bindings (Abs.NotImplDecl)
value_binding : rec_opt pattern EQUAL
expression (Abs.ValDecl
{pattern = pattern,
typ = NONE,
expr = expression})
fun_bindings : fun_binding (fun_binding)
| fun_binding AND fun_bindings (Abs.NotImplDecl)
fun_binding : fun_bindcase (fun_bindcase)
| fun_bindcase PIPE fun_binding (Abs.NotImplDecl)
fun_bindcase : fun_heading colon_type_opt
EQUAL expression (Abs.FuncDecl{name = "", params = nil,
result = (), body = expression})
(* The exception bindings seems complex to describe... *)
excn_bindings : name of_type_opt
excn_bindings_opt ()
| name EQUAL compound_name AND
excn_bindings ()
excn_bindings_opt : AND excn_bindings ()
| ()
of_type_opt : OF typee ()
| ()
(*
operator_decl : INFIX digit_opt idents ()
| INFIXR digit_opt idents ()
| NONFIX idents ()
*)
fun_heading : name atomic_pattern
atomic_patterns ()
| LPAREN atomic_pattern
infix_operator
atomic_pattern RPAREN
atomic_patterns ()
(* FIXME: Infix function declarations removed *)
(*| atomic_pattern infix_operator
atomic_pattern ()*)
type_bindings : type_binding ()
| type_binding AND
type_bindings ()
type_binding : type_var_list ident EQUAL
typee ()
datatype_bindings : datatype_binding ()
| datatype_binding AND
datatype_bindings ()
datatype_binding : type_var_list ident EQUAL
datatype_cases ()
datatype_cases : datatype_case ()
| datatype_case PIPE
datatype_cases ()
datatype_case : ident of_type_opt ()
type_var_list : ()
| TYPEVAR ()
| LPAREN type_vars RPAREN ()
type_vars : TYPEVAR ()
| TYPEVAR COMMA type_vars ()
(* FIXME: These expressions problably have wrong precedens... *)
typed_expr : atomic_expressions COLON
typee (Abs.NotImplExpr)
| atomic_expressions (Abs.OperaExpr
{operas =
atomic_expressions})
bool_expr : typed_expr boolean_op
bool_expr (Abs.NotImplExpr)
| typed_expr (typed_expr)
(*
handle_expr : handle_expr HANDLE match ()
| bool_expr ()
*)
raise_expr : RAISE raise_expr (Abs.NotImplExpr)
| (*handle_expr*) bool_expr (bool_expr)
if_expr : IF expression THEN expression
ELSE if_expr (Abs.NotImplExpr)
| raise_expr (raise_expr)
(*while_expr*)
expression : WHILE expression DO
expression (Abs.NotImplExpr)
| if_expr (if_expr)
(*
case_expr : CASE expression OF match ()
| while_expr ()
expression : FN match ()
| case_expr ()
*)
boolean_op : ORELSE ()
| ANDALSO ()
(* Atomic and infix expressions are merged here
becuase the parser can never know if a symbol
is an infix operator or an operand... *)
atomic_expressions : atomic_expression ([atomic_expression])
| atomic_expression
atomic_expressions (atomic_expression::
atomic_expressions)
(* FIXME: ... *)
atomic_expression : infix_no_compound (Abs.VarExpr(
Abs.SimpleVar("")))
| compound_name (Abs.VarExpr(
Abs.SimpleVar(
compound_name)))
| constant (constant)
| LPAREN expressions_opt
RPAREN (Abs.NotImplExpr)
| LPAREN expression
SEMICOLON expressions_semi
RPAREN (Abs.NotImplExpr)
| LBRACKET expressions_opt
RBRACKET (Abs.NotImplExpr)
| LCBRACE label_exps_opt
RCBRACE (Abs.RecordExpr
{fields = label_exps_opt,
typ = ()})
| HASH label (Abs.NotImplExpr)
| LET declarations_opt IN
expressions_semi END (Abs.LetExpr
{decls = declarations_opt,
body = expressions_semi})
expressions_semi : expression ([expression])
| expression SEMICOLON
expressions_semi (expression::
expressions_semi)
expressions : expression ([expression])
| expression COMMA expressions (expression::
expressions)
expressions_opt : (nil)
| expressions (expressions)
label_exp : label EQUAL expression (label, expression)
label_exps : label_exp ([label_exp])
| label_exp COMMA label_exps (label_exp::label_exps)
label_exps_opt : (nil)
| label_exps (label_exps)
(* FIXME: Everything using matches have been removed
i.e. handle, fn and case *)
(*match : match_cases ()
match_cases : match_case ()
| match_case PIPE match_cases ()
match_case : pattern EQUALGREATER
expression ()
*)
patterns : pattern ([pattern])
| pattern COMMA patterns (pattern::patterns)
patterns_opt : (nil)
| patterns (patterns)
pattern : atomic_pattern (atomic_pattern)
(* Pattern matching capabilities have been reduced *)
(*| compound_name atomic_pattern ()
| pattern infix_operator
pattern ()
| pattern COLON typee ()
| name colon_type_opt AS
pattern ()*)
atomic_patterns : (nil)
| atomic_pattern
atomic_patterns (atomic_pattern::
atomic_patterns)
atomic_pattern : UNDERSCORE (Abs.WildcardPattern)
| compound_name (Abs.SymbolPattern(compound_name))
(* FIXME: ... *)
| constant (Abs.WildcardPattern)
| LPAREN patterns_opt RPAREN (Abs.WildcardPattern)
| LBRACKET patterns_opt
RBRACKET (Abs.WildcardPattern)
| LCBRACE record_patterns_opt
RCBRACE (Abs.WildcardPattern)
record_patterns_opt : ()
| record_patterns ()
record_patterns : record_pattern ()
| DOTDOTDOT ()
| record_pattern COMMA
record_patterns ()
record_pattern : label EQUAL pattern ()
| ident colon_type_opt
as_pattern_opt ()
as_pattern_opt : AS pattern ()
| ()
(* FIXME: I hope I have got these type precedences right... *)
typee : startype ()
| startype DASHGREATER typee ()
types : typee ()
| typee COMMA types ()
startype : paramtype ()
| paramtype ASTERISK startype ()
paramtype : lltype ()
| paramtype compound_ident ()
| compound_ident ()
| LPAREN typee COMMA types
RPAREN compound_ident ()
lltype : TYPEVAR ()
| LCBRACE label_types_opt
RCBRACE ()
| LPAREN typee RPAREN ()
label_type : label COLON typee ()
label_types : label_type ()
| label_type COMMA label_types ()
label_types_opt : ()
| label_types ()
colon_type_opt : ()
| COLON typee ()
rec_opt : ()
| REC ()
semicolon_opt : ()
| SEMICOLON ()
(* FIXME: Should really only be one digit *)
(*digit_opt : ()
| LITPOSINT ()*)
compound_name : compound_ident (compound_ident)
| OP infix_operator ("") (* FIXME: ... *)
compound_ident : COMPIDENT (COMPIDENT)
| IDENT (IDENT)
compound_idents : compound_ident ([compound_ident])
| compound_ident
compound_idents (compound_ident::
compound_idents)
infix_no_compound : ASTERISK ()
| EQUAL ()
infix_operator : ident ()
| infix_no_compound ()
label : ident (ident)
| LITPOSINT (Int.toString LITPOSINT)
ident : IDENT (IDENT)
idents : ident ([ident])
| ident idents (ident::idents)
name : ident (ident)
| OP infix_operator ("") (* FIXME: ... *)
constant : LITPOSINT (Abs.IntExpr(LITPOSINT))
| LITNEGINT (Abs.IntExpr(LITNEGINT))
| LITSTRING (Abs.StringExpr(LITSTRING))
| LITCHAR (Abs.CharExpr(LITCHAR))
| LITREAL (Abs.RealExpr(LITREAL))
HardcoreProcessing/TheConstruct/srcSML/FileIO/SimpleSMLPrettyPrint.sml 100644 1750 1750 21240 6774177704 24551 0 ustar anoq anoq (*
This file is part of The Construct - a graphical user interface
builder for ML::AbstractUI written in Standard ML.
Copyright (C) 1999 ANOQ of the Sun (alias Johnny Andersen)
E-mail: anoq@HardcoreProcessing.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
If you are interested in a warranty or commercial support for this
software, contact Hardcore Processing
for more information.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*)
(*require "$.gtwinnt.dgnodes";*)
(*require "$.collectionswinnt.simplesets";*)
(*require "$.gtwinnt.dgshorthand";*)
(*require "$.basis.__list";*)
(*require "$.basis.__int";*)
(*require "$.basis.__text_io";*)
(*require "$.commonfunctionswinnt.util";*)
(*require "protocolmanip";*)
(*require "$.basis.__os_path";*)
(*require "$.system.__os";*)
functor FSimpleSMLPrettyPrint() =
struct
(* FIXME: Also in ProtocolAccessorContr... *)
val excludeList = ["Create", "Children",
"TCConstructed", "BindingName"]
fun prettyPrintProtocolNode outF space
getBindingName protocolNode
fromBinding =
let
fun outLF () = (outF "\n"; outF space)
val typeName = DGNodes.typeName protocolNode
in
case ProtocolManip.getProtocol
(DGNodes.protocolName protocolNode) of
NONE => ()
| SOME({readAsString, writeAsString, saveSML}) =>
let
val bindingName = "tmpProtNode"
val protBindingName = getBindingName protocolNode "protocol"
in
(outF ("val " ^ bindingName ^ " = ");
outF fromBinding;
outF " +: \""; outF typeName;
outF "\""; outLF ();
saveSML (outF, outLF) (protocolNode, bindingName, protBindingName))
end
end
fun prettyPrintNode outF space getBindingName
isTCConstructed node fromBinding =
let
val nodes = DGNodes.connected node
fun outLF () = (outF "\n"; outF space)
fun handleNode node =
let
val typeName = DGNodes.typeName node
in
if SimpleSets.contains typeName excludeList then
()
else
prettyPrintProtocolNode outF space getBindingName
node fromBinding
end
fun printChildren () =
let
open DGShorthand
val nodeCh = node +: "Children"
val childrenBindName = getBindingName nodeCh "children"
val childNodes = DGNodes.connected nodeCh
val _ = if length childNodes > 0 then
(outLF ();
outF ("val " ^ childrenBindName ^ " = ");
outF fromBinding;
outF " +: \"Children\"";
outLF ())
else ()
fun printChild childNode =
if isTCConstructed childNode then
let
val typeName = DGNodes.typeName childNode
val childBindName = getBindingName childNode "control"
val _ = outLF ()
val _ = outF ("val " ^ childBindName ^
" = Reg.createA \"" ^
typeName ^ "\"")
val _ = outLF ()
val _ = outF ("val _ = " ^ childrenBindName ^ " ~+ " ^ childBindName)
val _ = outLF ()
in
prettyPrintNode outF space getBindingName
isTCConstructed childNode
childBindName
end
else ()
in
List.app printChild childNodes
end
in
(List.app handleNode nodes;
printChildren ())
end
fun prettyPrint outF space checkBinding isTCConstructed windowNode =
let
val bindings = ref nil
val uniquenessCounter = ref 0
fun getStrCnt () =
let
val c = !uniquenessCounter
in
(uniquenessCounter := c + 1;
Int.toString c)
end
fun getBindingName node defaultBaseName =
let
val (_, boundName) = checkBinding node
in
if boundName = "" then
defaultBaseName ^ (getStrCnt ())
else
(bindings := boundName :: (!bindings);
boundName)
end
val _ = outF space
val winBinding = getBindingName windowNode "window"
val _ = outF "val masterCh = masterNode +: \"Children\"\n"
val _ = outF space
val _ = outF ("val " ^ winBinding ^ " = Reg.createA \"Window\"\n")
val _ = outF space
val _ = outF ("val _ = masterCh ~+ " ^ winBinding ^ "\n")
val _ = outF space
val _ = prettyPrintNode outF space getBindingName
isTCConstructed windowNode winBinding
in
!bindings
end
fun saveStart fileName outF =
let
val _ = outF "functor F"
val _ = outF (OS.Path.base fileName)
val _ = outF "() =\n"
val _ = outF " struct\n"
val _ = outF " fun createGraph "
val _ = outF "masterNode =\n"
val _ = outF " let\n"
val _ = outF " open DGShorthand\n"
val _ = outF "\n"
in
()
end
fun saveGraph checkBinding isTCConstructed windowNode outF =
let
fun addBinding (name, genComma) =
(if genComma then
(outF ",\n"; outF " ")
else ();
outF name; outF " = ";
outF name; true)
val bindings = prettyPrint outF
" "
checkBinding isTCConstructed windowNode
val _ = outF "\n in\n"
val _ = outF " {"
val _ = List.foldl addBinding false bindings
val _ = outF "}\n"
val _ = outF " end\n"
in
()
end
fun saveEnd fileName outF =
let
val _ = outF " end\n\n"
val _ = outF "structure "
val _ = outF (OS.Path.base fileName)
val _ = outF " = F"
val _ = outF (OS.Path.base fileName)
val _ = outF "()\n"
in
()
end
fun saveOutF checkBinding isTCConstructed windowNode fileName outF =
let
val _ = saveStart fileName outF
val _ = saveGraph checkBinding isTCConstructed windowNode outF
val _ = saveEnd fileName outF
in
()
end
fun saveFile checkBinding isTCConstructed windowNode fileName =
let
val outStr = TextIO.openOut fileName
fun outF value =
TextIO.output (outStr, value)
in
Util.finalize
(fn () => (saveOutF checkBinding isTCConstructed
windowNode fileName outF;
TextIO.flushOut outStr))
(fn () => TextIO.closeOut outStr)
end
end
structure SimpleSMLPrettyPrint =
FSimpleSMLPrettyPrint()
HardcoreProcessing/TheConstruct/srcSML/FileIO/SML97Key_sig.sml 100644 1750 1750 2324 6774177704 22627 0 ustar anoq anoq (*
This file is part of The Construct - a graphical user interface
builder for ML::AbstractUI written in Standard ML.
Copyright (C) 1999 ANOQ of the Sun (alias Johnny Andersen)
E-mail: anoq@HardcoreProcessing.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
If you are interested in a warranty or commercial support for this
software, contact Hardcore Processing
for more information.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*)
signature SML97_KEY =
sig
type token
val getStringOrChar : string * int -> token
val checkKeyword : string * int -> token
end
HardcoreProcessing/TheConstruct/srcSML/FileIO/SML97Key.sml 100644 1750 1750 21220 6774177704 22001 0 ustar anoq anoq (*
This file is part of The Construct - a graphical user interface
builder for ML::AbstractUI written in Standard ML.
Copyright (C) 1999 ANOQ of the Sun (alias Johnny Andersen)
E-mail: anoq@HardcoreProcessing.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
If you are interested in a warranty or commercial support for this
software, contact Hardcore Processing
for more information.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*)
(*require "sml97key_sig";*)
(*require "$.basis.__string_cvt";*)
(*require "$.parsingtoolkitwinnt.lexmisc";*)
(*require "simplesml97_grm.sml";*)
(*require "$.errorhandlingwinnt.exceptions";*)
(*require "$.basis.__char";*)
(*require "$.basis.__string";*)
functor FSML97Key(Tokens : SML97_TOKENS) : SML97_KEY =
struct
type token = (Tokens.svalue, int) Tokens.token
(* FIXME: Do this right! *)
fun vfl (value, pos, rg) = ((value, pos, pos + rg))
fun checkKeyword (yytext, yypos) =
let
(* FIXME: Do this right! *)
fun fl (pos, rg) = (pos, pos + rg)
in
case yytext of
(* Symbols which are also valid symbolic names *)
":" => (Tokens.COLON( fl (yypos, 1) ))
| "=" => (Tokens.EQUAL( fl (yypos, 1) ))
| ":>" => (Tokens.OPAQUECONSTR( fl (yypos, 2) ))
| "|" => (Tokens.PIPE( fl (yypos, 1) ))
| "=>" => (Tokens.EQUALGREATER( fl (yypos, 2) ))
| "->" => (Tokens.DASHGREATER( fl (yypos, 2) ))
| "#" => (Tokens.HASH( fl (yypos, 1) ))
| "*" => (Tokens.ASTERISK( fl (yypos, 1) ))
(* Keywords *)
| "if" => (Tokens.IF( fl (yypos, 2) ))
| "then" => (Tokens.THEN( fl (yypos, 4) ))
| "else" => (Tokens.ELSE( fl (yypos, 4) ))
| "and" => (Tokens.AND( fl (yypos, 3) ))
| "op" => (Tokens.OP( fl (yypos, 2) ))
| "structure" => (Tokens.STRUCTURE( fl (yypos, 9) ))
| "signature" => (Tokens.SIGNATURE( fl (yypos, 9) ))
| "struct" => (Tokens.STRUCT( fl (yypos, 6) ))
| "functor" => (Tokens.FUNCTOR( fl (yypos, 7) ))
| "local" => (Tokens.LOCAL( fl (yypos, 5) ))
| "in" => (Tokens.IN( fl (yypos, 2) ))
| "end" => (Tokens.END( fl (yypos, 3) ))
| "orelse" => (Tokens.ORELSE( fl (yypos, 6) ))
| "andalso" => (Tokens.ANDALSO( fl (yypos, 7) ))
| "val" => (Tokens.VAL( fl (yypos, 3) ))
| "type" => (Tokens.TYPE( fl (yypos, 4) ))
| "eqtype" => (Tokens.EQTYPE( fl (yypos, 6) ))
| "datatype" => (Tokens.DATATYPE( fl (yypos, 8) ))
| "abstype" => (Tokens.ABSTYPE( fl (yypos, 7) ))
| "with" => (Tokens.WITH( fl (yypos, 4) ))
| "exception" => (Tokens.EXCEPTION( fl (yypos, 9) ))
| "open" => (Tokens.OPEN( fl (yypos, 4) ))
| "withtype" => (Tokens.WITHTYPE( fl (yypos, 8) ))
| "let" => (Tokens.LET( fl (yypos, 3) ))
| "sig" => (Tokens.SIG( fl (yypos, 3) ))
| "where" => (Tokens.WHERE( fl (yypos, 5) ))
| "sharing" => (Tokens.SHARING( fl (yypos, 7) ))
| "include" => (Tokens.INCLUDE( fl (yypos, 7) ))
| "infix" => (Tokens.INFIX( fl (yypos, 5) ))
| "infixr" => (Tokens.INFIXR( fl (yypos, 6) ))
| "nonfix" => (Tokens.NONFIX( fl (yypos, 6) ))
| "while" => (Tokens.WHILE( fl (yypos, 5) ))
| "do" => (Tokens.DO( fl (yypos, 2) ))
| "handle" => (Tokens.HANDLE( fl (yypos, 6) ))
| "raise" => (Tokens.RAISE( fl (yypos, 5) ))
| "fn" => (Tokens.FN( fl (yypos, 2) ))
| "case" => (Tokens.CASE( fl (yypos, 4) ))
| "as" => (Tokens.AS( fl (yypos, 2) ))
| "rec" => (Tokens.REC( fl (yypos, 3) ))
| "fun" => (Tokens.FUN( fl (yypos, 3)))
(* Otherwise it's an identifier *)
| _ => (Tokens.IDENT( vfl (yytext, yypos, size yytext) ))
end
fun getStringOrChar (yytext, yypos) =
let
fun errStr beforeChar errorString =
Excn.eRaiseBug
("There's a bug in the SML'97 lexer or " ^
"in the SML97Key.getStringOrChar function! " ^
"Unknown escape char after " ^
(Char.toString beforeChar) ^ ": " ^
errorString)
fun err beforeChar errorChar =
errStr beforeChar (Char.toString errorChar)
fun eatBreak getc strm =
case getc strm of
NONE => errStr #" " ""
| SOME(a, strma) =>
(case a of
#" " => eatBreak getc strma
| #"\t" => eatBreak getc strma
| #"\n" => eatBreak getc strma
| #"\f" => eatBreak getc strma
| #"\\" => SOME("", strma)
| _ => err #" " a)
fun escapeBackslash getc strm =
case getc strm of
NONE => errStr #"\\" ""
| SOME(a, strma) =>
(case a of
#"\\" => SOME("\\", strma)
| #"\"" => SOME("\"", strma)
| #"a" => SOME("\a", strma)
| #"b" => SOME("\b", strma)
| #"f" => SOME("\f", strma)
| #"n" => SOME("\n", strma)
| #"r" => SOME("\r", strma)
| #"t" => SOME("\t", strma)
| #"v" => SOME("\v", strma)
| #"^" => Excn.eRaiseNotImplemented
("In SML97Key.getStringOrChar: " ^
"Escape codes beginning with \\^ not implemented!")
| #" " => eatBreak getc strma
| #"\t" => eatBreak getc strma
| #"\n" => eatBreak getc strma
| #"\f" => eatBreak getc strma
| _ => err #"\\" a)
fun escapeChar getc strm =
case getc strm of
NONE => NONE
| SOME(a, strma) =>
(case a of
#"\\" =>
(case getc strma of
NONE => errStr #"\\" ""
| SOME(b, strmb) =>
(case b of
#"\\" => SOME("\\", strmb)
| #"n" => SOME("\n", strmb)
| #"\"" => SOME("\"", strmb)
| _ => err a b))
| _ => SOME(Char.toString a, strma))
fun escapeIt concatWith getc strm =
case escapeChar getc strm of
NONE => SOME(concatWith, strm)
| SOME(str, rest) =>
escapeIt (concatWith ^ str) getc rest
fun convertIt inString =
case StringCvt.scanString (escapeIt "") inString of
NONE => Excn.eRaiseBug ("Bug in SML97Key.getStringOrChar function!")
| SOME(outString) => outString
in
(* Check if it's a char or a string, and trim off the quotes *)
if String.isPrefix "#" yytext then
case Char.fromString
(convertIt
(LexMisc.trimlr 2 1 yytext)) of
NONE =>
Excn.eRaiseGeneric
("PARSE_ERROR",
"Illegal character constant! (FIXME: No position reported...)")
| SOME(c) =>
Tokens.LITCHAR ( vfl(c, yypos, size yytext))
else
Tokens.LITSTRING
(vfl (convertIt
(LexMisc.trimlr 1 1 yytext),
yypos, size yytext))
end
end
HardcoreProcessing/TheConstruct/srcSML/FileIO/AbsSynSimpleSML.sml 100644 1750 1750 4455 6774177704 23435 0 ustar anoq anoq (*
This file is part of The Construct - a graphical user interface
builder for ML::AbstractUI written in Standard ML.
Copyright (C) 1999 ANOQ of the Sun (alias Johnny Andersen)
E-mail: anoq@HardcoreProcessing.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
If you are interested in a warranty or commercial support for this
software, contact Hardcore Processing
for more information.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*)
(*require "abssynsimplesml_sig";*)
functor FAbsSynSimpleSML() : ABS_SYN_SIMPLE_SML =
struct
type symbol = string
type typ = unit
datatype var =
SimpleVar of symbol
and expr =
VarExpr of var
| IntExpr of int
| RealExpr of real
| StringExpr of string
| CharExpr of char
| BoolExpr of bool
| UnitExpr
| CallExpr of {func : symbol, args : expr list}
| OpExpr of {left : expr, oper : symbol, right : expr}
| OperaExpr of {operas : expr list}
| RecordExpr of {fields : (symbol * expr) list, typ : typ}
| LetExpr of {decls : decl list, body : expr list}
| NotImplExpr
and decl =
FuncDecl of {name : symbol, params : field list,
result : typ, body : expr}
| ValDecl of {pattern : pattern, typ : typ option, expr : expr}
| TypeDecl of {name : symbol, typ : typ}
| OpenDecl of {structs : symbol list}
| Structure of {decls : decl list}
| NotImplDecl
and pattern =
WildcardPattern
| SymbolPattern of symbol
(*and typ =
NameType of symbol
| RecordType of field list *)
and field =
Field of {name : symbol, typ : typ}
type program = decl list
end
structure AbsSynSimpleSML = FAbsSynSimpleSML()
HardcoreProcessing/TheConstruct/srcSML/FileIO/AbsSynSimpleSML_sig.sml 100644 1750 1750 4305 6774177704 24271 0 ustar anoq anoq (*
This file is part of The Construct - a graphical user interface
builder for ML::AbstractUI written in Standard ML.
Copyright (C) 1999 ANOQ of the Sun (alias Johnny Andersen)
E-mail: anoq@HardcoreProcessing.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
If you are interested in a warranty or commercial support for this
software, contact Hardcore Processing
for more information.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*)
signature ABS_SYN_SIMPLE_SML =
sig
type symbol = string
type typ = unit
datatype var =
SimpleVar of symbol
and expr =
VarExpr of var
| IntExpr of int
| RealExpr of real
| StringExpr of string
| CharExpr of char
| BoolExpr of bool
| UnitExpr
| CallExpr of {func : symbol, args : expr list}
| OpExpr of {left : expr, oper : symbol, right : expr}
| OperaExpr of {operas : expr list}
| RecordExpr of {fields : (symbol * expr) list, typ : typ}
| LetExpr of {decls : decl list, body : expr list}
| NotImplExpr
and decl =
FuncDecl of {name : symbol, params : field list,
result : typ, body : expr}
| ValDecl of {pattern : pattern, typ : typ option, expr : expr}
| TypeDecl of {name : symbol, typ : typ}
| OpenDecl of {structs : symbol list}
| Structure of {decls : decl list}
| NotImplDecl
and pattern =
WildcardPattern
| SymbolPattern of symbol
(*and typ =
NameType of symbol
| RecordType of field list *)
and field =
Field of {name : symbol, typ : typ}
type program = decl list
end
HardcoreProcessing/TheConstruct/srcSML/FileIO/SimpleSMLUIEval.sml 100644 1750 1750 32277 6774177704 23406 0 ustar anoq anoq (*
This file is part of The Construct - a graphical user interface
builder for ML::AbstractUI written in Standard ML.
Copyright (C) 1999 ANOQ of the Sun (alias Johnny Andersen)
E-mail: anoq@HardcoreProcessing.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
If you are interested in a warranty or commercial support for this
software, contact Hardcore Processing
for more information.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*)
(*require "protocolmanip";*)
(*require "$.basis.__list";*)
(*require "$.basis.__string";*)
(*require "abssynsimplesml_sig";*)
(*require "abssynsimplesml";*)
(*require "$.mlabstractui.uiwindowstoportable";*)
(*require "$.gtwinnt.dgnodes";*)
(*require "$.gtwinnt.dgshorthand";*)
(*require "$.dgpcommon";*)
(*require "$.mlabstractui.pnotifiers";*)
(*require "$.mlabstractui.uiprotocols";*)
(*require "$.collectionswinnt.dictionary";*)
(*require "$.collectionswinnt.simplesets";*)
(*require "$.errorhandlingwinnt.exceptions";*)
functor FSimpleSMLUIEval (Abs : ABS_SYN_SIMPLE_SML) =
struct
open DGShorthand
datatype assoc =
LeftAssoc
| RightAssoc
| NonAssoc
val operators = ref (StringDict.empty :
{assoc : assoc} StringDict.t)
fun addOperator name assoc =
operators :=
StringDict.insert
(!operators)
name
{assoc = assoc}
fun isOperator (Abs.VarExpr(Abs.SimpleVar(name))) =
(case StringDict.lookup (!operators) name of
NONE => false
| SOME(_) => true)
| isOperator _ = false
fun functionArgs (Abs.VarExpr(Abs.SimpleVar(name))) =
ProtocolManip.functionArgs name
| functionArgs _ = 0
fun getSymbol (Abs.VarExpr(Abs.SimpleVar(name))) =
name
| getSymbol _ =
Excn.eRaiseBug("Bug in SimpleSMLUIEval")
val _ = addOperator "+:" LeftAssoc
val _ = addOperator "~+" LeftAssoc
fun arrangeCalls nil = nil
| arrangeCalls (e::rest) =
let
val args = functionArgs e
in
if args = 0 then
e::arrangeCalls rest
else
(Abs.CallExpr{func = getSymbol(e),
args = List.take(rest, args)})
::arrangeCalls (List.drop(rest, args))
end
(* FIXME: Only left associtive operators are supported
and this does problably not even work when mixing
with function application. *)
fun arrangeOperators NONE nil = nil
| arrangeOperators (SOME(prev)) nil = [prev]
| arrangeOperators NONE [opera] = [opera]
| arrangeOperators (SOME(prev)) [opera] = [prev, opera]
| arrangeOperators NONE (opera1::opera2::rest) =
if isOperator opera1 then
Excn.eRaiseGeneric("SMLUIEval", "No left operand for operator " ^
(getSymbol opera1))
else
arrangeOperators (SOME(opera1)) (opera2::rest)
| arrangeOperators (SOME(prev)) (opera1::opera2::rest) =
if isOperator opera1 then
(* Here we assume left associativity *)
arrangeOperators
(SOME (Abs.OpExpr{left = prev,
oper = getSymbol opera1,
right = opera2}))
rest
else
prev :: arrangeOperators (SOME(opera1)) (opera2::rest)
fun preArrange operas =
hd (arrangeOperators NONE (arrangeCalls operas))
fun getBindings [Abs.OperaExpr{operas =
[Abs.RecordExpr {fields, typ}]}] =
map #1 fields
| getBindings _ =
Excn.eRaiseGeneric("SMLUIEval",
("Expecting a record-expression as " ^
"return value in the let-expression!"))
datatype SMLBindings =
IntProt of PInt.t
| BoolProt of PBool.t
| StringProt of PString.t
| StringsProt of PStrings.t
| NotifyProt of PNotify.t
| PointerButtonNotifyProt of PPointerButtonNotify.t
| ItemSelectionsProt of PItemSelections.t
| GraphNode of DGNodes.t
| Unit
(* Like getSymbol above but without exception *)
fun getVarName (Abs.VarExpr(Abs.SimpleVar(n))) =
n
| getVarName _ = ""
fun getLitString (Abs.StringExpr(s)) =
s
| getLitString _ =
Excn.eRaiseGeneric("SMLUIEval",
("String constant expected!"))
fun getLitInt (Abs.IntExpr(i)) =
i
| getLitInt _ =
Excn.eRaiseGeneric("SMLUIEval",
("Integer constant expected!"))
fun getLitBool expr =
case getSymbol expr of
"true" => true
| "false" => false
| _ =>
Excn.eRaiseGeneric("SMLUIEval",
("Boolean constant expected!"))
fun getNamedNode n nil =
Excn.eRaiseGeneric("SMLUIEval",
("Non-existant binding: " ^ n))
| getNamedNode n ({decl = GraphNode(aNode), name}::rest) =
if name = n then
aNode
else getNamedNode n rest
| getNamedNode n (_::rest) =
getNamedNode n rest
fun getNamedPInt n nil =
Excn.eRaiseGeneric("SMLUIEval",
("Non-existant binding: " ^ n))
| getNamedPInt n ({decl = IntProt(aProt), name}::rest) =
if name = n then
aProt
else getNamedPInt n rest
| getNamedPInt n (_::rest) =
getNamedPInt n rest
fun getNamedPBool n nil =
Excn.eRaiseGeneric("SMLUIEval",
("Non-existant binding: " ^ n))
| getNamedPBool n ({decl = BoolProt(aProt), name}::rest) =
if name = n then
aProt
else getNamedPBool n rest
| getNamedPBool n (_::rest) =
getNamedPBool n rest
fun getNamedPString n nil =
Excn.eRaiseGeneric("SMLUIEval",
("Non-existant binding: " ^ n))
| getNamedPString n ({decl = StringProt(aProt), name}::rest) =
if name = n then
aProt
else getNamedPString n rest
| getNamedPString n (_::rest) =
getNamedPString n rest
fun evalExpr createNamedControl bindings (Abs.OperaExpr{operas}) =
evalExpr createNamedControl bindings (preArrange operas)
| evalExpr createNamedControl bindings (Abs.CallExpr{func, args}) =
(case func of
"Reg.createA" =>
GraphNode(createNamedControl (getLitString(hd args)))
| "PInt.write" =>
(PInt.write (getNamedPInt (getVarName (hd args)) bindings)
(getLitInt(hd (tl args))); Unit)
| "DGPInt.p" =>
IntProt (DGPInt.p (getNamedNode (getVarName (hd args)) bindings))
| "PBool.write" =>
(PBool.write (getNamedPBool (getVarName (hd args)) bindings)
(getLitBool(hd (tl args))); Unit)
| "DGPBool.p" =>
BoolProt (DGPBool.p (getNamedNode (getVarName (hd args)) bindings))
| "PString.write" =>
(PString.write (getNamedPString (getVarName (hd args)) bindings)
(getLitString(hd (tl args))); Unit)
| "DGPString.p" =>
StringProt (DGPString.p (getNamedNode (getVarName (hd args)) bindings))
| "DGPStrings.p" =>
StringsProt (DGPStrings.p (getNamedNode (getVarName (hd args)) bindings))
| "DGPNotify.p" =>
NotifyProt (DGPNotify.p (getNamedNode (getVarName (hd args)) bindings))
| "DGPPointerButtonNotify.p" =>
PointerButtonNotifyProt (DGPPointerButtonNotify.p (getNamedNode (getVarName (hd args)) bindings))
| "DGPItemSelections.p" =>
ItemSelectionsProt (DGPItemSelections.p (getNamedNode (getVarName (hd args)) bindings))
| _ =>
Excn.eRaiseGeneric("SMLUIEval",
("Unsupported function: " ^ func)))
| evalExpr _ bindings (Abs.OpExpr{left, oper, right}) =
(case oper of
"+:" => GraphNode((getNamedNode (getVarName left) bindings)
+: (getLitString right))
| "~+" => ((getNamedNode (getVarName left) bindings)
~+ (getNamedNode (getVarName right) bindings); Unit)
| _ =>
Excn.eRaiseGeneric("SMLUIEval",
("Unsupported operator: " ^ oper)))
| evalExpr _ _ _ =
Excn.eRaiseGeneric("SMLUIEval",
("Operator or function call expression expected!"))
(* This function is necessary because in the file,
the _protocols_ are bound - not the protocol nodes.
It adds the binding description to the protocol node
that the protocol binding came from... *)
fun checkAddBindDesc addBindDesc newBindings name
(Abs.OperaExpr{operas}) =
checkAddBindDesc addBindDesc newBindings name
(preArrange operas)
| checkAddBindDesc addBindDesc newBindings name
(Abs.CallExpr{func, args}) =
let
val symSize = String.size func
val argName = getVarName (hd args)
in
if String.sub (func, symSize - 2) = #"." andalso
String.sub (func, symSize - 1) = #"p" then
addBindDesc (getNamedNode argName newBindings) name
else ()
end
| checkAddBindDesc _ _ _ _ = ()
fun evalDecl addBindDesc createNamedControl
publicBindings bindings
(Abs.ValDecl{pattern, typ, expr}) =
(case pattern of
Abs.WildcardPattern =>
(evalExpr createNamedControl bindings expr; bindings)
| Abs.SymbolPattern(s) =>
let
val newDecl = evalExpr createNamedControl bindings expr
val newBindings =
{decl = newDecl, name = s} :: bindings
val _ = if SimpleSets.contains s publicBindings then
case newDecl of
GraphNode(aNode) =>
addBindDesc aNode s
| _ =>
checkAddBindDesc
addBindDesc newBindings s expr
else ()
in
newBindings
end)
| evalDecl _ _ _ bindings (Abs.OpenDecl _) =
bindings
| evalDecl _ _ _ _ _ =
Excn.eRaiseGeneric("SMLUIEval",
("Expecting only val and open declarations " ^
"in the let-expression!"))
fun evalDecls _ _ _ _ nil = ()
| evalDecls addBindDesc createNamedControl
publicBindings bindings (decl::decls) =
let
val newBindings =
evalDecl addBindDesc createNamedControl
publicBindings bindings decl
in
evalDecls addBindDesc createNamedControl
publicBindings newBindings decls
end
fun extractLetExpr ((Abs.Structure{decls}::_) : Abs.program) =
(case decls of
(Abs.FuncDecl{name, params, result, body}::_) =>
(case body of
(Abs.OperaExpr{operas}) =>
(case operas of
((Abs.LetExpr{decls, body})::_) =>
(decls, body)
| _ => Excn.eRaiseGeneric("SMLUIEval",
"The expected let-expression is not found!"))
| _ => Excn.eRaiseGeneric("SMLUIEval",
"The expected operators/operands expression is not found!"))
| _ => Excn.eRaiseGeneric("SMLUIEval",
"The expected function declaration is not found!"))
| extractLetExpr _ =
Excn.eRaiseGeneric("SMLUIEval",
"The expected main-structure is not found!")
fun smlAbsSynToUI masterNode addBindDesc createNamedControl prog =
let
val (decls, body) = extractLetExpr prog
val publicBindings = getBindings body
val bindings = [{decl = GraphNode(masterNode), name = "masterNode"}]
val _ = evalDecls addBindDesc createNamedControl
publicBindings bindings decls
in
(* FIXME: Only create controls for loaded window... *)
uiCore.createGUI masterNode
end
end
structure SimpleSMLUIEval = FSimpleSMLUIEval(AbsSynSimpleSML)
HardcoreProcessing/TheConstruct/srcSML/FileIO/SimpleSML97Parser.sml 100644 1750 1750 6513 6774177704 23647 0 ustar anoq anoq (*
This file is part of The Construct - a graphical user interface
builder for ML::AbstractUI written in Standard ML.
Copyright (C) 1999 ANOQ of the Sun (alias Johnny Andersen)
E-mail: anoq@HardcoreProcessing.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
If you are interested in a warranty or commercial support for this
software, contact Hardcore Processing
for more information.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*)
(*require "$.parsingtoolkitwinnt.lexerrormsg";*)
(*require "abssynsimplesml";*)
(*require "$.basis.__text_io";*)
(*require "$.errorhandlingwinnt.exceptions";*)
(*require "$.commonfunctions.util";*)
(*require "simplesml97_grm";*)
(*require "_simplesml97_grm";*)
(*require "sml97_lex";*)
(*require "$.mlyacc.base";*)
(*require "$.mlyacc.parser2";*)
(*require "$.mlyacc.join";*)
(*require "$.mlyacc.lrtable";*)
(*require "$.mlyacc.stream";*)
functor FSimpleSML97Parser () (* FIXME: Make a signature *) =
struct
structure SML97LrVals = FSML97LrValsFun(
structure Token = LrParser.Token
structure Abs = AbsSynSimpleSML)
structure SML97Lex = FSML97LexFun(
structure Tokens = SML97LrVals.Tokens)
structure SMLParser = Join(structure ParserData = SML97LrVals.ParserData
structure Lex = SML97Lex
structure LrParser = LrParser)
fun scanFile filename =
let
val _ = ErrorMsg.reset()
val inFile = TextIO.openIn filename
in
Util.finalize
(fn _ =>
let
fun get _ = TextIO.input inFile
fun parseError(s,p1,p2) = ErrorMsg.error p1 s
in
SML97Lex.makeLexer get
end)
(fn _ => TextIO.closeIn inFile)
end
handle LrParser.ParseError =>
Excn.eRaiseGeneric ("SimpleSML97Parse",
"Error occurred during scanning!")
fun parseFile filename =
let
val _ = ErrorMsg.reset()
val inFile = TextIO.openIn filename
in
Util.finalize
(fn _ =>
let
fun get _ = TextIO.input inFile
fun parseError(s,p1,p2) = ErrorMsg.error p1 s
val lexer = LrParser.Stream.streamify
(SML97Lex.makeLexer get)
val (abssyn, _) = SMLParser.parse(15, lexer, parseError, ())
in
abssyn : AbsSynSimpleSML.program
end)
(fn _ => TextIO.closeIn inFile)
end
handle LrParser.ParseError =>
Excn.eRaiseGeneric ("SimpleSML97Parse",
"Error occurred during parsing!")
end
structure SimpleSML97Parser = FSimpleSML97Parser()
HardcoreProcessing/TheConstructDemos/ 40755 1750 1750 0 6774176563 16406 5 ustar anoq anoq HardcoreProcessing/TheConstructDemos/srcSML/ 40755 1750 1750 0 6774176563 17551 5 ustar anoq anoq HardcoreProcessing/TheConstructDemos/srcSML/CeX3DOrganizer/ 40755 1750 1750 0 6774176563 22300 5 ustar anoq anoq HardcoreProcessing/TheConstructDemos/srcSML/CeX3DOrganizer/CeX3DOrganizer.sml 100644 1750 1750 33542 6774176563 25670 0 ustar anoq anoq (*
This file is part of The Construct - a graphical user interface
builder for ML::AbstractUI written in Standard ML.
Copyright (C) 1999 ANOQ of the Sun (alias Johnny Andersen)
E-mail: anoq@HardcoreProcessing.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
If you are interested in a warranty or commercial support for this
software, contact Hardcore Processing
for more information.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*)
functor FCeX3DOrganizer() =
struct
fun createGraph masterNode =
let
open DGShorthand
val masterCh = masterNode +: "Children"
val window0 = Reg.createA "Window"
val _ = masterCh ~+ window0
val tmpProtNode = window0 +: "OnPointerDown"
val protocol1 = DGPPointerButtonNotify.p tmpProtNode
val tmpProtNode = window0 +: "Text"
val protocol2 = DGPString.p tmpProtNode
val _ = PString.write protocol2 "CeX3D Organizer"
val tmpProtNode = window0 +: "Visible"
val protocol3 = DGPBool.p tmpProtNode
val _ = PBool.write protocol3 true
val tmpProtNode = window0 +: "PosY"
val protocol4 = DGPInt.p tmpProtNode
val _ = PInt.write protocol4 84
val tmpProtNode = window0 +: "PosX"
val protocol5 = DGPInt.p tmpProtNode
val _ = PInt.write protocol5 540
val tmpProtNode = window0 +: "SizeY"
val protocol6 = DGPInt.p tmpProtNode
val _ = PInt.write protocol6 380
val tmpProtNode = window0 +: "SizeX"
val protocol7 = DGPInt.p tmpProtNode
val _ = PInt.write protocol7 400
val children8 = window0 +: "Children"
val control9 = Reg.createA "Button"
val _ = children8 ~+ control9
val tmpProtNode = control9 +: "OnPointerDown"
val protocol10 = DGPPointerButtonNotify.p tmpProtNode
val tmpProtNode = control9 +: "Visible"
val protocol11 = DGPBool.p tmpProtNode
val _ = PBool.write protocol11 true
val tmpProtNode = control9 +: "PosY"
val protocol12 = DGPInt.p tmpProtNode
val _ = PInt.write protocol12 360
val tmpProtNode = control9 +: "PosX"
val protocol13 = DGPInt.p tmpProtNode
val _ = PInt.write protocol13 150
val tmpProtNode = control9 +: "SizeY"
val protocol14 = DGPInt.p tmpProtNode
val _ = PInt.write protocol14 18
val tmpProtNode = control9 +: "SizeX"
val protocol15 = DGPInt.p tmpProtNode
val _ = PInt.write protocol15 75
val tmpProtNode = control9 +: "OnAction"
val pasteAction = DGPNotify.p tmpProtNode
val tmpProtNode = control9 +: "Text"
val protocol16 = DGPString.p tmpProtNode
val _ = PString.write protocol16 "Paste"
val control18 = Reg.createA "Button"
val _ = children8 ~+ control18
val tmpProtNode = control18 +: "OnPointerDown"
val protocol19 = DGPPointerButtonNotify.p tmpProtNode
val tmpProtNode = control18 +: "Visible"
val protocol20 = DGPBool.p tmpProtNode
val _ = PBool.write protocol20 true
val tmpProtNode = control18 +: "PosY"
val protocol21 = DGPInt.p tmpProtNode
val _ = PInt.write protocol21 360
val tmpProtNode = control18 +: "PosX"
val protocol22 = DGPInt.p tmpProtNode
val _ = PInt.write protocol22 75
val tmpProtNode = control18 +: "SizeY"
val protocol23 = DGPInt.p tmpProtNode
val _ = PInt.write protocol23 18
val tmpProtNode = control18 +: "SizeX"
val protocol24 = DGPInt.p tmpProtNode
val _ = PInt.write protocol24 75
val tmpProtNode = control18 +: "OnAction"
val copyAction = DGPNotify.p tmpProtNode
val tmpProtNode = control18 +: "Text"
val protocol25 = DGPString.p tmpProtNode
val _ = PString.write protocol25 "Copy"
val control27 = Reg.createA "Button"
val _ = children8 ~+ control27
val tmpProtNode = control27 +: "OnPointerDown"
val protocol28 = DGPPointerButtonNotify.p tmpProtNode
val tmpProtNode = control27 +: "Visible"
val protocol29 = DGPBool.p tmpProtNode
val _ = PBool.write protocol29 true
val tmpProtNode = control27 +: "PosY"
val protocol30 = DGPInt.p tmpProtNode
val _ = PInt.write protocol30 360
val tmpProtNode = control27 +: "PosX"
val protocol31 = DGPInt.p tmpProtNode
val _ = PInt.write protocol31 0
val tmpProtNode = control27 +: "SizeY"
val protocol32 = DGPInt.p tmpProtNode
val _ = PInt.write protocol32 18
val tmpProtNode = control27 +: "SizeX"
val protocol33 = DGPInt.p tmpProtNode
val _ = PInt.write protocol33 75
val tmpProtNode = control27 +: "OnAction"
val cutAction = DGPNotify.p tmpProtNode
val tmpProtNode = control27 +: "Text"
val protocol34 = DGPString.p tmpProtNode
val _ = PString.write protocol34 "Cut"
val control36 = Reg.createA "TextLabel"
val _ = children8 ~+ control36
val tmpProtNode = control36 +: "OnPointerDown"
val protocol37 = DGPPointerButtonNotify.p tmpProtNode
val tmpProtNode = control36 +: "Visible"
val protocol38 = DGPBool.p tmpProtNode
val _ = PBool.write protocol38 true
val tmpProtNode = control36 +: "PosY"
val protocol39 = DGPInt.p tmpProtNode
val _ = PInt.write protocol39 340
val tmpProtNode = control36 +: "PosX"
val protocol40 = DGPInt.p tmpProtNode
val _ = PInt.write protocol40 0
val tmpProtNode = control36 +: "SizeY"
val protocol41 = DGPInt.p tmpProtNode
val _ = PInt.write protocol41 18
val tmpProtNode = control36 +: "SizeX"
val protocol42 = DGPInt.p tmpProtNode
val _ = PInt.write protocol42 400
val tmpProtNode = control36 +: "Text"
val messageString = DGPString.p tmpProtNode
val _ = PString.write messageString "Error messages will be shown here"
val control44 = Reg.createA "TextLabel"
val _ = children8 ~+ control44
val tmpProtNode = control44 +: "OnPointerDown"
val protocol45 = DGPPointerButtonNotify.p tmpProtNode
val tmpProtNode = control44 +: "Visible"
val protocol46 = DGPBool.p tmpProtNode
val _ = PBool.write protocol46 true
val tmpProtNode = control44 +: "PosY"
val protocol47 = DGPInt.p tmpProtNode
val _ = PInt.write protocol47 20
val tmpProtNode = control44 +: "PosX"
val protocol48 = DGPInt.p tmpProtNode
val _ = PInt.write protocol48 0
val tmpProtNode = control44 +: "SizeY"
val protocol49 = DGPInt.p tmpProtNode
val _ = PInt.write protocol49 18
val tmpProtNode = control44 +: "SizeX"
val protocol50 = DGPInt.p tmpProtNode
val _ = PInt.write protocol50 400
val tmpProtNode = control44 +: "Text"
val pathString = DGPString.p tmpProtNode
val _ = PString.write pathString ""
val control52 = Reg.createA "Button"
val _ = children8 ~+ control52
val tmpProtNode = control52 +: "OnPointerDown"
val protocol53 = DGPPointerButtonNotify.p tmpProtNode
val tmpProtNode = control52 +: "Visible"
val protocol54 = DGPBool.p tmpProtNode
val _ = PBool.write protocol54 true
val tmpProtNode = control52 +: "PosY"
val protocol55 = DGPInt.p tmpProtNode
val _ = PInt.write protocol55 0
val tmpProtNode = control52 +: "PosX"
val protocol56 = DGPInt.p tmpProtNode
val _ = PInt.write protocol56 325
val tmpProtNode = control52 +: "SizeY"
val protocol57 = DGPInt.p tmpProtNode
val _ = PInt.write protocol57 18
val tmpProtNode = control52 +: "SizeX"
val protocol58 = DGPInt.p tmpProtNode
val _ = PInt.write protocol58 75
val tmpProtNode = control52 +: "OnAction"
val saveAction = DGPNotify.p tmpProtNode
val tmpProtNode = control52 +: "Text"
val protocol59 = DGPString.p tmpProtNode
val _ = PString.write protocol59 "Save"
val control61 = Reg.createA "TextField"
val _ = children8 ~+ control61
val tmpProtNode = control61 +: "OnPointerDown"
val protocol62 = DGPPointerButtonNotify.p tmpProtNode
val tmpProtNode = control61 +: "Visible"
val protocol63 = DGPBool.p tmpProtNode
val _ = PBool.write protocol63 true
val tmpProtNode = control61 +: "PosY"
val protocol64 = DGPInt.p tmpProtNode
val _ = PInt.write protocol64 0
val tmpProtNode = control61 +: "PosX"
val protocol65 = DGPInt.p tmpProtNode
val _ = PInt.write protocol65 0
val tmpProtNode = control61 +: "SizeY"
val protocol66 = DGPInt.p tmpProtNode
val _ = PInt.write protocol66 18
val tmpProtNode = control61 +: "SizeX"
val protocol67 = DGPInt.p tmpProtNode
val _ = PInt.write protocol67 250
val tmpProtNode = control61 +: "HasFocus"
val protocol68 = DGPBool.p tmpProtNode
val _ = PBool.write protocol68 false
val tmpProtNode = control61 +: "EditableText"
val filenameString = DGPString.p tmpProtNode
val _ = PString.write filenameString ""
val control70 = Reg.createA "ListBox"
val _ = children8 ~+ control70
val tmpProtNode = control70 +: "OnPointerDown"
val protocol71 = DGPPointerButtonNotify.p tmpProtNode
val tmpProtNode = control70 +: "Visible"
val protocol72 = DGPBool.p tmpProtNode
val _ = PBool.write protocol72 true
val tmpProtNode = control70 +: "PosY"
val protocol73 = DGPInt.p tmpProtNode
val _ = PInt.write protocol73 39
val tmpProtNode = control70 +: "PosX"
val protocol74 = DGPInt.p tmpProtNode
val _ = PInt.write protocol74 0
val tmpProtNode = control70 +: "SizeY"
val protocol75 = DGPInt.p tmpProtNode
val _ = PInt.write protocol75 300
val tmpProtNode = control70 +: "SizeX"
val protocol76 = DGPInt.p tmpProtNode
val _ = PInt.write protocol76 400
val tmpProtNode = control70 +: "OnDoubleClick"
val listboxDoubleClick = DGPPointerButtonNotify.p tmpProtNode
val tmpProtNode = control70 +: "OnClick"
val protocol79 = DGPPointerButtonNotify.p tmpProtNode
val tmpProtNode = control70 +: "SelectableItems"
val listboxSel = DGPItemSelections.p tmpProtNode
val tmpProtNode = control70 +: "TextLines"
val listboxLines = DGPStrings.p tmpProtNode
val children80 = control70 +: "Children"
val control81 = Reg.createA "Button"
val _ = children8 ~+ control81
val tmpProtNode = control81 +: "OnPointerDown"
val protocol82 = DGPPointerButtonNotify.p tmpProtNode
val tmpProtNode = control81 +: "Visible"
val protocol83 = DGPBool.p tmpProtNode
val _ = PBool.write protocol83 true
val tmpProtNode = control81 +: "PosY"
val protocol84 = DGPInt.p tmpProtNode
val _ = PInt.write protocol84 0
val tmpProtNode = control81 +: "PosX"
val protocol85 = DGPInt.p tmpProtNode
val _ = PInt.write protocol85 250
val tmpProtNode = control81 +: "SizeY"
val protocol86 = DGPInt.p tmpProtNode
val _ = PInt.write protocol86 18
val tmpProtNode = control81 +: "SizeX"
val protocol87 = DGPInt.p tmpProtNode
val _ = PInt.write protocol87 75
val tmpProtNode = control81 +: "OnAction"
val loadAction = DGPNotify.p tmpProtNode
val tmpProtNode = control81 +: "Text"
val protocol88 = DGPString.p tmpProtNode
val _ = PString.write protocol88 "Load"
in
{loadAction = loadAction,
listboxLines = listboxLines,
listboxSel = listboxSel,
listboxDoubleClick = listboxDoubleClick,
filenameString = filenameString,
saveAction = saveAction,
pathString = pathString,
messageString = messageString,
cutAction = cutAction,
copyAction = copyAction,
pasteAction = pasteAction}
end
end
structure CeX3DOrganizer = FCeX3DOrganizer()
HardcoreProcessing/TheConstructDemos/srcSML/TheConstructItself/ 40755 1750 1750 0 6774176563 23345 5 ustar anoq anoq HardcoreProcessing/TheConstructDemos/srcSML/TheConstructItself/Operator.sml 100644 1750 1750 21122 6774176563 25770 0 ustar anoq anoq (*
This file is part of The Construct - a graphical user interface
builder for ML::AbstractUI written in Standard ML.
Copyright (C) 1999 ANOQ of the Sun (alias Johnny Andersen)
E-mail: anoq@HardcoreProcessing.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
If you are interested in a warranty or commercial support for this
software, contact Hardcore Processing
for more information.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*)
functor FOperator() =
struct
fun createGraph masterNode =
let
open DGShorthand
val masterCh = masterNode +: "Children"
val window0 = Reg.createA "Window"
val _ = masterCh ~+ window0
val tmpProtNode = window0 +: "OnPointerDown"
val protocol1 = DGPPointerButtonNotify.p tmpProtNode
val tmpProtNode = window0 +: "Text"
val protocol2 = DGPString.p tmpProtNode
val _ = PString.write protocol2 "Operator"
val tmpProtNode = window0 +: "Visible"
val protocol3 = DGPBool.p tmpProtNode
val _ = PBool.write protocol3 true
val tmpProtNode = window0 +: "PosY"
val protocol4 = DGPInt.p tmpProtNode
val _ = PInt.write protocol4 22
val tmpProtNode = window0 +: "PosX"
val protocol5 = DGPInt.p tmpProtNode
val _ = PInt.write protocol5 0
val tmpProtNode = window0 +: "SizeY"
val protocol6 = DGPInt.p tmpProtNode
val _ = PInt.write protocol6 54
val tmpProtNode = window0 +: "SizeX"
val protocol7 = DGPInt.p tmpProtNode
val _ = PInt.write protocol7 275
val children8 = window0 +: "Children"
val control9 = Reg.createA "TextLabel"
val _ = children8 ~+ control9
val tmpProtNode = control9 +: "OnPointerDown"
val protocol10 = DGPPointerButtonNotify.p tmpProtNode
val tmpProtNode = control9 +: "Visible"
val protocol11 = DGPBool.p tmpProtNode
val _ = PBool.write protocol11 true
val tmpProtNode = control9 +: "PosY"
val protocol12 = DGPInt.p tmpProtNode
val _ = PInt.write protocol12 36
val tmpProtNode = control9 +: "PosX"
val protocol13 = DGPInt.p tmpProtNode
val _ = PInt.write protocol13 0
val tmpProtNode = control9 +: "SizeY"
val protocol14 = DGPInt.p tmpProtNode
val _ = PInt.write protocol14 18
val tmpProtNode = control9 +: "SizeX"
val protocol15 = DGPInt.p tmpProtNode
val _ = PInt.write protocol15 275
val tmpProtNode = control9 +: "Text"
val messageString = DGPString.p tmpProtNode
val _ = PString.write messageString ""
val control17 = Reg.createA "Button"
val _ = children8 ~+ control17
val tmpProtNode = control17 +: "OnPointerDown"
val protocol18 = DGPPointerButtonNotify.p tmpProtNode
val tmpProtNode = control17 +: "Visible"
val protocol19 = DGPBool.p tmpProtNode
val _ = PBool.write protocol19 true
val tmpProtNode = control17 +: "PosY"
val protocol20 = DGPInt.p tmpProtNode
val _ = PInt.write protocol20 0
val tmpProtNode = control17 +: "PosX"
val protocol21 = DGPInt.p tmpProtNode
val _ = PInt.write protocol21 0
val tmpProtNode = control17 +: "SizeY"
val protocol22 = DGPInt.p tmpProtNode
val _ = PInt.write protocol22 18
val tmpProtNode = control17 +: "SizeX"
val protocol23 = DGPInt.p tmpProtNode
val _ = PInt.write protocol23 75
val tmpProtNode = control17 +: "OnAction"
val onLoad = DGPNotify.p tmpProtNode
val tmpProtNode = control17 +: "Text"
val protocol24 = DGPString.p tmpProtNode
val _ = PString.write protocol24 "Load"
val control26 = Reg.createA "Button"
val _ = children8 ~+ control26
val tmpProtNode = control26 +: "OnPointerDown"
val protocol27 = DGPPointerButtonNotify.p tmpProtNode
val tmpProtNode = control26 +: "Visible"
val protocol28 = DGPBool.p tmpProtNode
val _ = PBool.write protocol28 true
val tmpProtNode = control26 +: "PosY"
val protocol29 = DGPInt.p tmpProtNode
val _ = PInt.write protocol29 18
val tmpProtNode = control26 +: "PosX"
val protocol30 = DGPInt.p tmpProtNode
val _ = PInt.write protocol30 0
val tmpProtNode = control26 +: "SizeY"
val protocol31 = DGPInt.p tmpProtNode
val _ = PInt.write protocol31 18
val tmpProtNode = control26 +: "SizeX"
val protocol32 = DGPInt.p tmpProtNode
val _ = PInt.write protocol32 75
val tmpProtNode = control26 +: "OnAction"
val onSave = DGPNotify.p tmpProtNode
val tmpProtNode = control26 +: "Text"
val protocol33 = DGPString.p tmpProtNode
val _ = PString.write protocol33 "Save"
val control35 = Reg.createA "TextField"
val _ = children8 ~+ control35
val tmpProtNode = control35 +: "OnPointerDown"
val protocol36 = DGPPointerButtonNotify.p tmpProtNode
val tmpProtNode = control35 +: "Visible"
val protocol37 = DGPBool.p tmpProtNode
val _ = PBool.write protocol37 true
val tmpProtNode = control35 +: "PosY"
val protocol38 = DGPInt.p tmpProtNode
val _ = PInt.write protocol38 0
val tmpProtNode = control35 +: "PosX"
val protocol39 = DGPInt.p tmpProtNode
val _ = PInt.write protocol39 75
val tmpProtNode = control35 +: "SizeY"
val protocol40 = DGPInt.p tmpProtNode
val _ = PInt.write protocol40 18
val tmpProtNode = control35 +: "SizeX"
val protocol41 = DGPInt.p tmpProtNode
val _ = PInt.write protocol41 200
val tmpProtNode = control35 +: "HasFocus"
val protocol42 = DGPBool.p tmpProtNode
val _ = PBool.write protocol42 false
val tmpProtNode = control35 +: "EditableText"
val loadFileName = DGPString.p tmpProtNode
val _ = PString.write loadFileName ""
val control44 = Reg.createA "TextField"
val _ = children8 ~+ control44
val tmpProtNode = control44 +: "OnPointerDown"
val protocol45 = DGPPointerButtonNotify.p tmpProtNode
val tmpProtNode = control44 +: "Visible"
val protocol46 = DGPBool.p tmpProtNode
val _ = PBool.write protocol46 true
val tmpProtNode = control44 +: "PosY"
val protocol47 = DGPInt.p tmpProtNode
val _ = PInt.write protocol47 18
val tmpProtNode = control44 +: "PosX"
val protocol48 = DGPInt.p tmpProtNode
val _ = PInt.write protocol48 75
val tmpProtNode = control44 +: "SizeY"
val protocol49 = DGPInt.p tmpProtNode
val _ = PInt.write protocol49 18
val tmpProtNode = control44 +: "SizeX"
val protocol50 = DGPInt.p tmpProtNode
val _ = PInt.write protocol50 200
val tmpProtNode = control44 +: "HasFocus"
val protocol51 = DGPBool.p tmpProtNode
val _ = PBool.write protocol51 true
val tmpProtNode = control44 +: "EditableText"
val saveFileName = DGPString.p tmpProtNode
val _ = PString.write saveFileName ""
in
{saveFileName = saveFileName,
loadFileName = loadFileName,
onSave = onSave,
onLoad = onLoad,
messageString = messageString}
end
end
structure Operator = FOperator()
HardcoreProcessing/TheConstructDemos/srcSML/TheConstructItself/ProtocolAccessor.sml 100644 1750 1750 7331 6774176563 27447 0 ustar anoq anoq functor FProtocolAccessor() =
struct
fun createGraph masterNode =
let
open DGShorthand
val masterCh = masterNode +: "Children"
val protocolAccessor = Reg.createA "Window"
val _ = masterCh ~+ protocolAccessor
val tmpProtNode = protocolAccessor +: "OnPointerDown"
val protocol0 = DGPPointerButtonNotify.p tmpProtNode
val tmpProtNode = protocolAccessor +: "Text"
val protocol1 = DGPString.p tmpProtNode
val _ = PString.write protocol1 "Protocol Accessor"
val tmpProtNode = protocolAccessor +: "Visible"
val protocol2 = DGPBool.p tmpProtNode
val _ = PBool.write protocol2 true
val tmpProtNode = protocolAccessor +: "PosY"
val protocol3 = DGPInt.p tmpProtNode
val _ = PInt.write protocol3 151
val tmpProtNode = protocolAccessor +: "PosX"
val protocol4 = DGPInt.p tmpProtNode
val _ = PInt.write protocol4 513
val tmpProtNode = protocolAccessor +: "SizeY"
val protocol5 = DGPInt.p tmpProtNode
val _ = PInt.write protocol5 100
val tmpProtNode = protocolAccessor +: "SizeX"
val protocol6 = DGPInt.p tmpProtNode
val _ = PInt.write protocol6 500
val children7 = protocolAccessor +: "Children"
val control8 = Reg.createA "TextLabel"
val _ = children7 ~+ control8
val tmpProtNode = control8 +: "OnPointerDown"
val protocol9 = DGPPointerButtonNotify.p tmpProtNode
val tmpProtNode = control8 +: "Visible"
val protocol10 = DGPBool.p tmpProtNode
val _ = PBool.write protocol10 true
val tmpProtNode = control8 +: "PosY"
val protocol11 = DGPInt.p tmpProtNode
val _ = PInt.write protocol11 0
val tmpProtNode = control8 +: "PosX"
val protocol12 = DGPInt.p tmpProtNode
val _ = PInt.write protocol12 200
val tmpProtNode = control8 +: "SizeY"
val protocol13 = DGPInt.p tmpProtNode
val _ = PInt.write protocol13 18
val tmpProtNode = control8 +: "SizeX"
val protocol14 = DGPInt.p tmpProtNode
val _ = PInt.write protocol14 300
val tmpProtNode = control8 +: "Text"
val protocol15 = DGPString.p tmpProtNode
val _ = PString.write protocol15 "Protocols"
val control17 = Reg.createA "TextLabel"
val _ = children7 ~+ control17
val tmpProtNode = control17 +: "OnPointerDown"
val protocol18 = DGPPointerButtonNotify.p tmpProtNode
val tmpProtNode = control17 +: "Visible"
val protocol19 = DGPBool.p tmpProtNode
val _ = PBool.write protocol19 true
val tmpProtNode = control17 +: "PosY"
val protocol20 = DGPInt.p tmpProtNode
val _ = PInt.write protocol20 0
val tmpProtNode = control17 +: "PosX"
val protocol21 = DGPInt.p tmpProtNode
val _ = PInt.write protocol21 0
val tmpProtNode = control17 +: "SizeY"
val protocol22 = DGPInt.p tmpProtNode
val _ = PInt.write protocol22 18
val tmpProtNode = control17 +: "SizeX"
val protocol23 = DGPInt.p tmpProtNode
val _ = PInt.write protocol23 200
val tmpProtNode = control17 +: "Text"
val protocol24 = DGPString.p tmpProtNode
val _ = PString.write protocol24 "Bindings"
in
{protocolAccessor = protocolAccessor}
end
end
structure ProtocolAccessor = FProtocolAccessor()
HardcoreProcessing/TheConstructDemos/srcSML/TheConstructItself/UIControlPalette.sml 100644 1750 1750 2661 6774176563 27361 0 ustar anoq anoq functor FUIControlPalette() =
struct
fun createGraph masterNode =
let
open DGShorthand
val masterCh = masterNode +: "Children"
val controlPalette = Reg.createA "Window"
val _ = masterCh ~+ controlPalette
val tmpProtNode = controlPalette +: "OnPointerDown"
val protocol0 = DGPPointerButtonNotify.p tmpProtNode
val tmpProtNode = controlPalette +: "Text"
val protocol1 = DGPString.p tmpProtNode
val _ = PString.write protocol1 "UI Palette"
val tmpProtNode = controlPalette +: "Visible"
val protocol2 = DGPBool.p tmpProtNode
val _ = PBool.write protocol2 true
val tmpProtNode = controlPalette +: "PosY"
val protocol3 = DGPInt.p tmpProtNode
val _ = PInt.write protocol3 308
val tmpProtNode = controlPalette +: "PosX"
val protocol4 = DGPInt.p tmpProtNode
val _ = PInt.write protocol4 608
val tmpProtNode = controlPalette +: "SizeY"
val protocol5 = DGPInt.p tmpProtNode
val _ = PInt.write protocol5 100
val tmpProtNode = controlPalette +: "SizeX"
val protocol6 = DGPInt.p tmpProtNode
val _ = PInt.write protocol6 150
in
{controlPalette = controlPalette}
end
end
structure UIControlPalette = FUIControlPalette()
HardcoreProcessing/README_TheConstruct.txt 100644 1750 1750 334 6774200043 17226 0 ustar anoq anoq The licence for this software is found in
HardcoreProcessing/TheConstruct/licence/
The documentation is found in
HardcoreProcessing/TheConstruct/docs/
The source code is found in
HardcoreProcessing/TheConstruct/srcSML/