Downloading JEWL

[Back to JEWL home page]


Download instructions

  Download latest version

The JEWL download directory is at http://www.it.brighton.ac.uk/staff/je/jewl/download. (Note that this has moved.)

The latest version of JEWL is version 1.7 which can be downloaded here (250902 bytes). This version has been fixed to work with the latest GNAT 2006 (Ada 2005) release.


Installation instructions

  1. Unzip the distribution file into an empty directory (e.g. C:\JEWL). The distribution contains a file readme.txt and three subdirectories (source, docs and examples). The source directory contains the source code for JEWL, the docs directory contains documentation in HTML format, and the examples directory contains a selection of small example programs.

  2. Compile the source files. If you are using the GNAT compiler, go into the source subdirectory and type:
        gnatmake jewl-io.adb
    This will generate .ali and .o files for each of the packages which make up the JEWL library.

  3. You will need to ensure that the compiler can find the files in the source subdirectory. For the GNAT compiler, you can copy the contents of this directory into the same directory as your own source code, although this is wasteful of disk space. A better solution is to define environment variables called ADA_INCLUDE_PATH and ADA_OBJECTS_PATH which give the full pathname of the source subdirectory. For example, in Windows 95/98 you could add the following lines to your C:\AUTOEXEC.BAT file:
        set ADA_INCLUDE_PATH=C:\JEWL\source
        set ADA_OBJECTS_PATH=C:\JEWL\source
    (assuming that the path to the source subdirectory is C:\JEWL\source). Other solutions are possible: for example, you can use the -I compiler switch with the GNAT compiler. For details of how your compiler locates library files, consult the documentation for the compiler.

  4. Change to the examples subdirectory and compile the example programs. For example, guess_me.adb is a simple guessing game using JEWL.IO which can be compiled by GNAT as follows:
        gnatmake guess_me.adb
    If you haven't used the ADA_INCLUDE_PATH and ADA_OBJECTS_PATH environment variables as described above, you can specify the path to the source subdirectory using the -I switch:
        gnatmake -IC:\JEWL\source guess_me.adb
    In most cases, you will want to use the -mwindows switch with the GNAT linker to specify that you are building a GUI program which does not perform any console I/O. Otherwise, a console window will be displayed in addition to the application window. For example, sketch.adb (a simple sketchpad) can be compiled using GNAT as follows:
        gnatmake sketch.adb -largs -mwindows
    The -largs switch causes gnatmake to pass any following arguments to the linker. If -mwindows is not specified, a console window (which is not used) will be displayed behind the main window for the application.

    Note that JEWL.IO generates console output, so if you are using this package you should not use the -mwindows switch.


Revision history

Version
Date
Changes
1.1
9 Apr 2000
(Initial release.)
1.2
18 Apr 2000
  1. Fixes due to GNAT 3.10 problems compiling code involving allocators which use tagged type aggregate extensions as initializers. The new code is equivalent to the original, but unpacked into a sequence of smaller steps that GNAT 3.10 can cope with.
  2. Minor documentation errors corrected.
  3. Some redundant with clauses removed.
1.3
7 Jul 2000
  1. A predefined instantiation of JEWL.Windows for type Character (JEWL.Simple_Windows) was added, and JEWL.IO was modified to use JEWL.Simple_Windows.
  2. A JEWL.IO bug was fixed (Put_Line to file wrote the newline to the standard output instead of to the file).
  3. Panels were fixed so that mouse clicks are now passed on correctly to subwindows.
  4. Memos were fixed so that tabs are now handled properly.
  5. A password feature was added to editboxes.
  6. Minor typos were fixed in comments within the package sources and documentation was corrected and updated.
1.4
25 Jan 2001
This release saw a lot of changes:
  1. Added support for drawing bitmaps on canvases (Draw_Image operations and new type Image_Type).
  2. Added Play_Sound
  3. Added several new operations on all windows: Get_Origin, Get_Width, Get_Height, Set_Origin, Set_Size and Focus.
  4. Added several functions giving screen and window dimensions: Screen_Width, Screen_Height, Frame_Width, Frame_Height, Dialog_Width, Dialog_Height and Menu_Height.
  5. Canvases can now handle keyboard events: new constructor and Key_Code added.
  6. Added procedure Play_Sound.
  7. Operations "+" and "-" added for Point_Type.
  8. Pens can now be zero pixels wide.
  9. The absolute origin of a frame can now have be specified when the frame is created.
  10. Added new File_Dialog operations Add_Filter and Set_Directory.
  11. Added Get_Line renames to JEWL.IO for compatibility with Ada.Text_IO.
  12. Added all the Get(File,Item) operations mentioned in documentation but unaccountably missing.
  13. Documentation updated to reflect the above changes.
  14. HTML versions of public package specifications added with links from main documentation pages.
Other internal changes:
  1. Canvas fonts, pens etc. now use JEWL.Reference_Counted_Type rather than reinventing this particular wheel, as do images.
  2. Various minor code formatting changes: some code reordered for clarity, some comments added or amended,.
  3. Changes introduced in 1.2 to support GNAT 3.10 have been reversed, since GNAT 3.10 still couldn't compile this code correctly...
1.5
22 Aug 2001
  1. Minor bugfix to Get_Text for combo boxes.
  2. Minor changes to documentation (including new example involving dialogs).
1.6
2 Nov 2001
  1. Fixed canvas bug when saving an empty canvas.
  2. Restore with no prior Save now acts as Erase.
  3. Removed redundant variable declaration in Image function.

[Back to JEWL home page]



JEWL Documentation — © John English 2000