Data Structures | |
struct | W_GRAFPORT |
This structure groups informations related to graphic window VDI workstation. More... | |
struct | W_MENU |
This structure groups variables related to handle a menu into a window. More... | |
struct | W_FORM |
This structure groups variables related to handle a formular into a window. More... | |
struct | W_ICON |
Structure grouping information related to iconified window. More... | |
struct | _window |
Window descriptor structure. More... | |
struct | WINvar |
window global variable More... | |
struct | W_GRAFPORT |
This structure groups informations related to graphic window VDI workstation. More... | |
struct | W_MENU |
This structure groups variables related to handle a menu into a window. More... | |
struct | W_FORM |
This structure groups variables related to handle a formular into a window. More... | |
struct | W_ICON |
Structure grouping information related to iconified window. More... | |
struct | _window |
Window descriptor structure. More... | |
struct | WINDOW |
WINDOW is an alias of struct _window. More... | |
struct | WINvar |
window global variable More... | |
Defines | |
#define | mt_WindGetGrect(app, win, mode, grect) mt_WindGet( app, win, mode, &((grect)->g_x), &((grect)->g_y), &((grect)->g_w), &((grect)->g_h) ) |
#define | mt_WindXGetGrect(app, win, mode, clip, grect) mt_WindXGet( app, win, mode, clip, &((grect)->g_x), &((grect)->g_y), &((grect)->g_w), &((grect)->g_h) ) |
#define | mt_WindSetGrect(app, win, mode, grect) mt_WindSet( app, win, mode, (grect)->g_x, (grect)->g_y, (grect)->g_w, (grect)->g_h ) |
#define | mt_WindCalcGrect(app, mode, win, inrect, outrect) |
#define | WindSetGrect(win, mode, grect) WindSet( win, mode, (grect)->g_x, (grect)->g_y, (grect)->g_w, (grect)->g_h ) |
#define | WindGetGrect(win, mode, grect) WindGet( win, mode, &((grect)->g_x), &((grect)->g_y), &((grect)->g_w), &((grect)->g_h) ) |
#define | WindXGetGrect(app, win, mode, clip, grect) WindXGet( win, mode, clip, &((grect)->g_x), &((grect)->g_y), &((grect)->g_w), &((grect)->g_h) ) |
#define | WindCalcGrect(mode, win, inrect, outrect) |
Typedefs | |
typedef _window | WINDOW |
Functions | |
WINDOW * | mt_WindCreate (APPvar *app, int GemAttrib, int x, int y, int w, int h) |
Create a window. | |
int | mt_WindOpen (APPvar *app, WINDOW *win, int x, int y, int w, int h) |
Open a window at screen. | |
int | mt_WindClose (APPvar *app, WINDOW *win) |
Close a window opened by mt_WindOpen(). | |
int | mt_WindDelete (APPvar *app, WINDOW *win) |
Delete a window descriptor created by mt_WindCreate(). | |
WINDOW * | mt_WindHandle (APPvar *app, int handle) |
Find a window descriptor by its AES handle. | |
int | mt_WindGet (APPvar *app, WINDOW *win, int mode, INT16 *par1, INT16 *par2, INT16 *par3, INT16 *par4) |
Get window attributes. | |
int | mt_WindXGet (APPvar *app, WINDOW *win, int mode, GRECT *clip, INT16 *par1, INT16 *par2, INT16 *par3, INT16 *par4) |
Get window attributes. | |
void * | mt_WindGetPtr (APPvar *app, WINDOW *win, int mode) |
Get window pointer attribute. | |
int | mt_WindSet (APPvar *app, WINDOW *win, int mode, int par1, int par2, int par3, int par4) |
set/change window attributes. | |
int | mt_WindSetStr (APPvar *app, WINDOW *win, int mode, char *str) |
set/change window string attributes | |
int | mt_WindSetPtr (APPvar *app, WINDOW *win, int mode, void *par1, void *par2) |
set/change window pointer attributes | |
int | mt_WindCalc (APPvar *app, int type, WINDOW *wind, int xin, int yin, int win, int hin, INT16 *xout, INT16 *yout, INT16 *wout, INT16 *hout) |
convert window workarea in real area and inversly | |
void | mt_WindSlider (APPvar *app, WINDOW *win, int mode) |
Adjust window sliders according to the internal WinDom slider system. | |
WINDOW * | mt_WindAttach (APPvar *app, int handle) |
insert an alien window in the WinDom list of windows. | |
WINDOW * | mt_WindFind (APPvar *app, int mode,...) |
Find a window. | |
void | mt_WindTop (APPvar *app, WINDOW *win) |
Put a window in foreground. | |
void | mt_WindNew (APPvar *app) |
replacement of wind_new() for all AESes | |
void | mt_WindClear (APPvar *app, WINDOW *win) |
clear a window workarea. | |
void __CDECL | mt_stdWindClear (WINDOW *win, short buff[8], APPvar *app) |
callback function to clear the window content | |
void __CDECL | stdWindClear (WINDOW *win, short buff[8]) |
See mt_stdWindClear(). | |
WINDOW * | WindFind (int mode,...) |
see mt_WindFind() |
|
Value: mt_WindCalc( app, mode, win, \ (inrect)->g_x, (inrect)->g_y, (inrect)->g_w, (inrect)->g_h, \ &(outrect)->g_x, &(outrect)->g_y, &(outrect)->g_w, &(outrect)->g_h ) |
|
|
|
|
|
|
|
Value: WindCalc( mode, win, \ (inrect)->g_x, (inrect)->g_y, (inrect)->g_w, (inrect)->g_h, \ &(outrect)->g_x, &(outrect)->g_y, &(outrect)->g_w, &(outrect)->g_h ) |
|
|
|
|
|
|
|
|
|
callback function to clear the window content
By default, mt_WindCreate() binds mt_stdWindClear() to WM_REDRAW event. |
|
insert an alien window in the WinDom list of windows.
The window descriptor returned by mt_WindAttach() set the bit WS_FOREIGN to 1 in win->status field. To remove this window from WinDom environmment, mt_WindClose() then mt_WindDelete() should be called.
|
|
convert window workarea in real area and inversly
|
|
clear a window workarea.
This is the function invoked by the callback function mt_stdWindClear(). |
|
Close a window opened by mt_WindOpen().
For similar raisons explained in the mt_WindOpen() manual, the wind_close() should never be used except in some special case. It is important to remove the window from the internal WinDom opened windows list with the remove_windowlist() function.
|
|
Create a window.
This last point is very important: when a window is created by mt_WindCreate(), this window is ready to live in the WinDom environnement because standard functions handle most of GEM events. Of course, these standard functions are very common and basic and the developper should need to change or remove some of them (for that purpose, see the Event Library). A useless window should be deleted by calling mt_WindDelete(). However, you probably never use directly this function because standard event function make for you this work. Event mesages handled by default
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.
|
|
Delete a window descriptor created by mt_WindCreate().
|
|
Find a window.
|
|
Get window attributes.
|
|
Get window pointer attribute.
|
|
Find a window descriptor by its AES handle.
|
|
replacement of wind_new() for all AESes
|
|
Open a window at screen.
An opened window has the WS_OPEN(!b) bit set to 1 in win->status. If the status WS_GROW(!b) bit is set to 1, a graphic effect should be used (via graf_growbox() function). A window can have minimum and maximal size : just sets the following variables : win->min_w, win->min_h, win->max_w, win->max_h(!i).
|
|
set/change window attributes.
|
|
set/change window pointer attributes
|
|
set/change window string attributes
|
|
Adjust window sliders according to the internal WinDom slider system.
Unlike WinDom, AES slider positions are between 0 and 1000. With WinDom, values are between 0 and Example Let's give a typical example. We want display an ASCII text in a window. In this context, the variable win->ypos is exactly the index of the first line displayed in the window and the variable win->xpos is the first column displayed in the window (we suppose we use a non proportional font to display the text). So the variable win->ypos_max represents the number of lines of the text and the variable win->xpos_max should be the size of the largest line or a fixed number like 255, to have it easier. The variable win->h_u represents the height of a character cell and the variable win->w_u is the width of a character cell. When the window is opened, variables win->xpos and win->ypos should be zero. The following figure pictures this situation : (0,0) xpos_max ----------------Text------------------ | | <- Top of the text. | ======= Window ======= | |Hello g|uy. Nice to meet you|<-ypos | | | _ | | | | |c| <- h_u | | | | ^---- w_h | | | | | | | ---------------------- | | xpos---^ | | | .->| | <- Botton of the text | -------------------------------------- ypos_max These variables are set then the window created. Then, the function mt_WindSlider() sets the size and position of the sliders according to the variables previously described. Usually, the function mt_WindSlider() is used when you change the value of a slider variable. In other cases, event standard functions update slider position and call mt_WindSlider().
|
|
Put a window in foreground.
|
|
Get window attributes.
|
|
See mt_stdWindClear().
|
|
see mt_WindFind()
|