Window library WindOpen()
Programming guideline of WinDom

WindCreate()

NAME

WindCreate - Create a window descriptor.

PROTOTYPAGE

WINDOW *WindCreate( int attrib, int x, int y, int w, int h);

PARAMETERS

attrib:
bit field of window widget ( CLOSER, ..., MENUBAR),

x,y,w,h:
maximal size of the window.

return:
a pointer to a descriptor of the window created or NULL if an error occurs.

DESCRIPTION

WindCreate() is the equivalent of the AES function wind_create(). It creates a window. However, the window is not opened at screen yet. This action is performed by WindOpen().

The first parameter attrib defines the widget of the window. Notice that the SMALLER widget (devoted to iconify the window) is available with all TOS version. When this widget is not available, the window can be iconified by shift-clicking the closer widget. The WM_BOTTOMED is supported by WinDom for any TOS version. With TOS unsorpting this feature, a window can be 'bottomed', i.e. send to the background, by shift-clicking the mover widget.

Attribute MENUBAR is specific to xaAES. For other system it as no signification. If set and if the configuration variable windom.menu.system is set to True, xaAES will handle a menu in the window. In other cases, WinDom kernel handles it.

WindCreate() remplaces completly wind_create() that means wind_create() should never be used except some very special cases. WindCreate() performes the following actions:

  1. a WINDOW structure is created and inserted in the internal WinDom list (see AddWindows()),

  2. the GEM window is created,

  3. standard events function are attribuated to the window (via the EvntAttach() function).

The last point is very important: when a window is created by WindCreate(), this window is ready to live in the WinDom environnement, the standard functions (see next section), handle most of GEM events. Of course, these standard function are very common and basic and the developper should need to change some of these functons (for that purpose, see the Event library).

STANDARD EVENT FUNCTIONS

We list the standard functions, linked by default when a window is created with the WindCreate() function. These functions use the WindSet() function to manipulate the window.

Standard event function defined by WindCreate()
Name Event Description
WindClear WM_REDRAW Draw the window workspace background
std_cls WM_CLOSED send a WM_DESTROY message
std_dstry WM_DESTROY close an delete the window. Send an AP_TERM
message if no more windows are opened and if
a desktop menu is not defined.
std_tpd WM_TOPPED Put in foreground the window.
std_mvd WM_MOVED Place in right coordinate the window. Set
win->fullsize to 0.
std_szd WM_SIZED Adjust the window size and update the sliders.
std_fld WM_FULLED Set the window in full screen or adjust the
window to the previous position according the
win->fullsize value.
std_icn WM_ICONIFY Iconify the window.
std_unicn WM_UNICONIFY Uniconify the window or open windows closed if
the icon window result of a WM_ALLICONIFY event.
std_allicn WM_ALLICONIFY Close all opened windows and iconify the window.
std_hsld WM_HSLID Update the horizontal slider to new position
(with WindSlider()). Send a WM_REDRAW evnt.
std_vsld WM_VSLID Update the verticatal slider to new position
(with WindSlider()). Send a WM_REDRAW evnt.
std_arrwd WM_ARROWED This function used the sub function listed
below depending the sub-mode of the message.
These functions update the sliders, send a
WM_REDRAW message and perform blitcopy of
window workspace areas.
std_dnpgd WA_DNPAGE sub function of std_arrwd.
std_uppgd WA_UPPAGE idem
std_lfpgd WA_LFPAGE idem
std_rtpgd WA_RTPAGE idem
std_dnlnd WA_DNLINE idem
std_uplnd WA_UPLINE idem
std_lflnd WA_LFLINE idem
std_rtlnd WA_RTLINE idem

SEE ALSO

WindOpen(), WindClose(), WindDelete(), WindClear(), WindSet(), WindGet(), WindSlider(), GrectCenter(), AddWindow(), windom.window.center, windom.window.effect, windom.iconify.geometry.