This release now deals with the HTML files, as an help
format. Some tools manage HTML files. You can renumber title and create an
"Table of Content" file or create an
index file
with all the anchor of a group of files.
Many bugs from
the previous release have been fixed. The windows library can now manage
font selection, in the same way on all the system supported by camlwin.
In the module windows.
The type window is introduce, in replacement of an identifier number.
The typing is enforced. But, in order to initialize a value, a function
default_window
is added.
The event type is increased with
Close, Redraw, Resize, Time
.
So, the event structure is better typed.
The Time event is a new event. If it is added in the list of desired events,
a click event occurs if no other event has been generated. The delay of a
time event is configured with
set_time_event
.
All the drawing function are buffered. So, they are really drawn only
when you call one of the functions:
gr_flush,
get_event,
system
.
The font selection is now system independent. You can choose between
6 sizes, 2 types, 4 attributes. The function set_text_size
has been removed, because
set_font
does all the work.
In the module Camlwin
New features were added to Camlwin. A gr_minput function is added,
in complement of gr_input. With gr_minput, you can specify a window
with many input area of differents types.The result is a vector of
melted_type
.
gr_select_font
is a new function that opens a window that
graphically chooses a font, and returns the result at the end.
gr_select_color
is a new function that open a window that
graphically choose a color and return the result.
The melted type has a new case:
float_type
.
3 new graphic objects:
- the area,
- the extended text,
- the extended prompt.
The area just defines a box on a window, in order to visualy group objects.
The extended prompts are like prompts, except that a font is specified.
The extended text displays text with diffrent fonts and colors in the same
line. They manage hypertext navigation.
In order to add help in your program, Camlwin can compile
HTML files
into an internal format, and display them in extended text.
4 new field in the window_type:
resize_callback : window_type -> event -> bool
time_callback : window_type -> event -> bool
help_file : string
miscellaneous : melted_type vect
resize_callback is not used in this release, but will be in the near future.
time_callback is the callback function used when a time event occurred.
help_file points to the main help file associated with the window. The file
is browsed when the user press F1. The help directory is defined with
CAMLHELP environment variable.
miscellaneous have no precise utility, but can be used to attached datas to
a window.
gr_use_time_event: int -> unit
gr_use_time_event 0 disable Time event in the current program.
if gr_use_time_event x is called, the time_callback of the main window is
called each x time delay.
received a time event .
Camlwin is now able to draw the object in the Motif, and Next Step look.
The pure graphic objects gr_ellipse and gr_rectangle can now be filled or not.
In Camlprog.
Camlprog can now compile different files. Each project can have a specific
compiler associated with a file suffix. The link phase can also be
parameterized, in order to produce libraries, programs and include help files.
Absent from the previous release
- camlhelp: help compiler and viewer,
- pbm2caml: reads pbm, pgm, ppm image format, in order to
import images.
- onehelp: appends all the help files of a project in one file, in order
to print the help, or use html2latex.
- examples: morpion has been rewrited, an adress book is added in order
to show
an other example, with Time event. The last example, is a graphical object
that draws graphs.