home *** CD-ROM | disk | FTP | other *** search
-
- INTRODUCTION
- ~~~~~~~~~~~~
-
- The original files for Amiga-E programmer that came with the
- developer archive of MUI 2.1 (mui21dev.lha) are not very usefull.
- The muimaster.m file, that should define the functions of the
- muimaster.library, does this only for the functions of MUI 1.4
- and the mui.e file is only a very very bad replacement for the
- mui.h file that C programmer could use!
-
- Thats why I created my own MUI-AmigaE-interface. This archive
- (as a replacement of the original Amiga-E drawer of the mui21dev
- archive) contains nearly all what's needed to write MUI-programs
- in E and some additional informations in this file! The only
- "extra" you need (to use the macrofiles) is the program "Mac2E".
-
-
-
- THE FILES
- ~~~~~~~~~
-
- "ReadMe" - This file. Please read the entire file before mailing
- me something like: "This files are creating only errors, what
- make I wrong?" There are some special problems with MUI and
- Amiga-E which can cause big trouble :-( Go on reading and
- don't make this faults :-)
-
- "Modules/muimaster.m" - This file defines the functions of the
- muimaster.library. Copy it to EMODULES: and write
- "MODULE 'muimaster'" in your source to use it.
-
- "Modules/libraries/mui.m" - This file (and the next one) contain
- the most definitions of the mui.h file that came for C
- programmer with the developer archive of MUI 2.1. Use this C
- mui.h file with its comments to get more information about
- this definitions!
- In this mui.m module all CONSTs and the structs (OBJECTs)
- which are of interest for E programmer, are defined. To see
- which structs are in this module, use the ShowModule-tool that
- came with the E compiler. Therefore all OBJECTs are collected
- at the beginning of the module.
- The CONSTs are written exactly the same way as in the mui.h
- file (with lowercase letters - that is no problem as long as
- the two first are uppercase, even if the E-language-descrip-
- tion says that CONSTs have to be totaly uppercase!) So it's no
- problem to use this files even if you have used the macrofile
- that came with "Mac2E" until now.
- The identifiers of the OBJECTs are written totaly
- lowercase!!
- Copy this file to EMODULES:libraries/ and write
- "MODULE 'libraries/mui'" in your source to use it.
-
- "MacroFiles/mui.e" - This file contains the most macro defini-
- tions of the mui.h file which are, caused by the limitations
- of E, not in the file above. Only "the most", because some of
- them couldn't be translated to E, but they are not very
- important.
- To use this file and its macrodefinitions you need the
- program "Mac2E", and if you use a version >= 3 of "Mac2E"
- you first have to create the pre-analysed macrofile which is
- not included in this archive.
- As a result of moving the CONSTs to the E-module-file
- mui.m above, instead of using only one macrofile like the one
- that came with "Mac2E", it's possible to write MUI programs
- *without* using this macrofile and "Mac2E", but I wouldn't do
- so!!! With this macrofile it's possible to write MUI programs
- in E nearly the same way as in C.
- The more interesting advantage of puting the CONSTs in a
- E-module is the much more readable source after using "Mac2E".
- Sometimes - not often, but sometimes - it's better to search
- an error in the source that is created by "Mac2E" and than
- it's better to read "MUIA_String_Contents" instead of
- "$80428FFD".
- The macronames are written the same way as the C originals
- in mui.h - with one exception: The macro "String" is renamed
- to "StringMUI" to avoid conflicts with the E-Function String()
- Copy this file to ... where you want it - for example in a
- MacroFiles-directory in your Amiga-E-directory.
-
- "Sources/doMethod.e" - To write MUI programs, you need a DoMethod
- function. Because this function is part of the amiga.lib,
- which we don't have as E programmer (until now), you have to
- write your own one, or better use this one.
- Copy it to your source to use it and look at the demo-
- source "Sources/MUI_Demo.e" to see, how to use it.
-
- "Source/installhook.e" - Sometimes - for example if you use
- PopUps - you need hooks. This source gives you a PROC that
- makes it very easy to install the needed hook-structures.
- Look at this source (the comments) and the demo-source
- "Sources/PopUp.e" to see, how to use it.
-
- "Source/MUI-Demo.e" - This is a translation of the C demo-source
- "MUI-Demo.c" that came with MUI. Use it to see, how to write
- MUI-programms in E and where are the differences between C
- and E.
-
- "Source/PopUp.e" - This is a translation of the demo-source
- "PopUp.c" that came with MUI. Use it to see, how to use the
- installhook-PROC.
-
-
-
- PROBLEMS WITH MUI AND E
- ~~~~~~~~~~~~~~~~~~~~~~~
-
- TRUE=1 or TRUE=-1
- -----------------
-
- In C TRUE has the value 1 but in E TRUE has the value -1.
- That can cause problems, therefore a CONST "MUI_TRUE" with
- value 1 is defined in "Modules/libraries/mui.m". Use this
- instead of TRUE whenever you want to give TRUE to MUI. See
- "Sources/MUI_Demo.e" and "Sources/PopUp.e"
-
-
- Problem with SetAttrsA()
- ------------------------
-
- Whenever you try to set an attribut to the value it allready
- has, MUI overwrites this attribut in the taglist with TAG_IGNORE
- to make shure that notify-class don't react on it. This is
- nessesary to prevent endless-notification-loops. As long as you
- are a C programmer and use SetAttr() that is no problem, because
- then MUI changes only a *copy* of the original-datas of the
- SetAttrs()-call. But if you use SetAttrsA(), as we must do
- because SetAttrs() is a function of amiga.lib, it is a problem!
- You only give a PTR to the original-datas with SetAttrsA() and
- now MUI changes this *original*-datas. If you than uses this
- datas again, they are still changed and nothing (TAG_IGNORE)
- will happen. One possible way to avoid this problem is, to make
- the attribut a non-constant data. Instead of
-
- SetAttrsA(obj, [ MUIA_..., value, ..., TAG_DONE])
-
- write
-
- SetAttrsA(obj, [ var + MUIA_..., value, ..., TAG_DONE])
- ~~~~~~~
- with var=0. Now everytime this SetAttrsA()-call is executet, the
- attribute is again "evaluated" and stored in the list.
- Because of that I have defined the macros set() and nnset()
- in "MacroFiles/mui.e" this way and if you want to use them you
- have to DEFine a global(!) variable setAttrsA in your source
- and set it to 0 (DEF setAttrsA=0) !!!
- BTW: x:=[...]; SetAttrsA(obj,x); SetAttrsA(obj,x) has *NOT*
- the wished result!
-
-
- TAG_IGNORE,0,
- -------------
-
- Some of the macros in "MacroFiles/mui.e" are ending with
- "[ TAG_IGNORE,0,". That seems to be superfluous but it is
- needed, because in E if you want to split a statement over
- several lines, you can't end a line with "[" but with a comma.
- (See program "OptiMUI" that cames with "Mac2E")
-
-
-
- AUTHORS (AND COPYRIGHTS)
- ~~~~~~~~~~~~~~~~~~~~~~~~
-
- Stefan Stuntz: - MUI with mui.h and the original C versions of
- MUI-Demo.e and PopUp.e
-
- Lionel Vintenat: - Mac2E
-
-
- Wouter van Oortmerssen: - Amiga-E
- - doMethod.e
- - installhook.e
-
- Jan Hendrik Schulz: - muimaster.m
- - mui.m
- - mui.e
- - translations of MUI-Demo and PopUp to E
- - this ReadMe-file
- (To contact me: schulzj@eva.fmi.uni-passau.de or
- schulzj@kirk.fmi.uni-passau.de )
-
-
-
- FUTURE
- ~~~~~~
- - With future versions of MUI this files will be included.
-
-