Programming guideline of WinDom
Any window can be divide in several areas that we frame. Each of
these frames are viewed like a standard window by WinDom. The main
window containing the frame window have a specific status and, off
course, specific event functions. A frame can be optionnally resized
by the user. The more interesting thing is you can used any
predefined window (by WinDom like formulars or user window) as frame
and build complex window. A good example is a text editor using
windows divided in several frames. Each frame is focused on a region
of a same buffer.
Principle
A Frame window (i.e. the main window) is a standard window with
specific event functions. The data field of the window point to a
special structure describes the frames and other usefull
informations. The event functions of the Frame window use the event
function of the framd windows. For example, the redraw function draws
the frames (borders of each areas) and calls the redraw function of
the framed window on the correct aeras.
A framed window is always a WinDom window, described by a WINDOW
structure but does not exist as a standard window. It exists only for
the main window.
How create a frame
- Initialize the frame environnement in WinDom: FrameInit(),
- Create a main window wich will containt the frame:
FrameCreate(),
- Create the windows that we want include in the frame window
(but don't open them),
- Transform them in frame windows: FrameAttach(),
- set some optional parameters: FrameSet(),
- finaly, open the main window and handle the GEM events,
- At the end, close the frame environnement: FrameExit().
The FrameFind(), FrameSearch() and FrameCalc() functions works
specifically on a framed window. Others window function from the
WinDom library can be used on framed window or standard window (for
example the usefull WindSet()).
A lot of bugs occurs specially during the frame resizing events.