Functions | |
void | mt_FrameInit (APPvar *app) |
Initialization of the frame environment. | |
void | mt_FrameExit (APPvar *app) |
release the frame environment | |
WINDOW * | mt_FrameCreate (APPvar *app, int attrib) |
Create a frame window. | |
void | mt_FrameAttach (APPvar *app, WINDOW *win, WINDOW *src, int line, int col, int w, int h, int mode) |
attach a framed window in a window | |
WINDOW * | mt_FrameRemove (APPvar *app, WINDOW *win, WINDOW *child, int line, int col) |
Remove a framed window from a root window. | |
void | mt_FrameSet (APPvar *app, WINDOW *win, int mode,...) |
Frame settings. | |
void | mt_FrameGet (APPvar *app, WINDOW *win, int mode,...) |
get frame related informations | |
WINDOW * | mt_FrameFind (APPvar *app, WINDOW *win, int x, int y) |
find a framed window | |
WINDOW * | mt_FrameSearch (APPvar *app, WINDOW *win, int line, int col) |
Find a frame by cell reference. | |
int | mt_FrameCalc (APPvar *app, WINDOW *win, int mode, INT16 *x, INT16 *y, INT16 *w, INT16 *h) |
get the framed window work area | |
void | FrameSet (WINDOW *win, int mode,...) |
see mt_FrameSet() | |
void | FrameGet (WINDOW *win, int mode,...) |
see mt_FrameGet() |
void FrameGet | ( | WINDOW * | win, | |
int | mode, | |||
... | ||||
) |
see mt_FrameGet()
void FrameSet | ( | WINDOW * | win, | |
int | mode, | |||
... | ||||
) |
see mt_FrameSet()
void mt_FrameAttach | ( | APPvar * | app, | |
WINDOW * | win, | |||
WINDOW * | src, | |||
int | line, | |||
int | col, | |||
int | w, | |||
int | h, | |||
int | flags | |||
) |
attach a framed window in a window
app | application descriptor | |
win | window descriptor of the root window | |
src | window descriptor of the window to attach | |
line,col | cell which will contain the frame | |
w,h | size of the frame | |
flags | bit field of special frame features (see mt_FramSet()). |
Frames inside a window are organized by line of cells. Each line can contain variable cells. The line and col parameters defines the order of the frame in the window. The real coordinates of a frame inside the work area of the root window depend on the frame sizes. And these sizes can be eventually changed by the user. The w and h parameters define the initial size of the frame.
The flags parameter defines special feature of the frame. See mt_FrameSet() for a complet description of this parameter.
The frame uses the GEM widget of the window. Possible attributs for a frame are INFO, SIZER, HSLIDE, VSLIDE, UPARROW, DNARROW, LFARROW and RTARROW. Other widgets are ignored.
int mt_FrameCalc | ( | APPvar * | app, | |
WINDOW * | win, | |||
int | mode, | |||
INT16 * | _x, | |||
INT16 * | _y, | |||
INT16 * | _w, | |||
INT16 * | _h | |||
) |
get the framed window work area
app | application descriptor | |
win | framed window descriptor | |
mode | global area (1) or work area (0) | |
_x,_y,_w,_h | position and size of the work area, |
There is an important remark to do here. When you use mt_WindSet() and mt_WindGet() with the mode WF_WORKXYWH on a framed window descriptor, these function compute the frame work area size and not the window area size. Thus, mt_WindGet( ..., WF_WORKXYWH, ...) is identical to mt_FrameCalc(). This feature allows us to use directly event function initially written for window. So, prefined window, such as dialog box, can be framed.
Create a frame window.
app | application descriptor | |
attrib | GEM widget of the window (frame) |
The window created by mt_FrameCreate() has the WS_FRAME_ROOT bit of status window descriptor field set to 1. A FRAME structure is attached as data to the window with a WD_WFRA reserved magic number.
The method used to handle frame window is very simple. A frame window is seen like a set of framed windows. A framed window is not a real GEM window but is identified by a window descriptor. The frame window, i.e. the root window holding the list of framed window, and the standard event functions of the frame window use the standard event function of the framed window. Some events are applied to the active frame, such as a button event. The active frame may be defined by mt_FrameSet().
void mt_FrameExit | ( | APPvar * | app | ) |
release the frame environment
app | application descriptor |
find a framed window
app | application descriptor | |
win | root frame window descriptor | |
x,y | coordinates in desktop |
get frame related informations
app | application descriptor | |
win | window descriptor (of a root frame window of a framed window), | |
mode | parameter to get | |
... | new values depending on mode |
Mode | Type window | Description/Parameters |
---|---|---|
FRAME_CELL | framed window | returns cellule reference:
|
void mt_FrameInit | ( | APPvar * | app | ) |
Initialization of the frame environment.
app | application descriptor |
Remove a framed window from a root window.
app | application descriptor | |
win | root window descriptor | |
child | framed window descriptor or NULL | |
line,col | cell coordinate of the framed window |
Find a frame by cell reference.
app | application descriptor | |
win | frame root window descriptor | |
line,col | framed window cell coordinates |
Frame settings.
app | application descriptor | |
win | window descriptor (of a root frame window of a framed window), | |
mode | parameter to set | |
... | new values depending on mode |
Mode | Type window | "..." Parameters |
---|---|---|
FRAME_BORDER | root window | border size of frames (int value). Values in pixel unit |
FRAME_COLOR | root window | color of border of frames (int value). Color is the VDI color index |
FRAME_KEYBD | root window | dispatching of keyboard event. may be one of the following (int) values:
|
FRAME_ACTIVE | root window | the frame (WINDOW* value) to set as the new active frame |
FRAME_TOPPED_ACTIV | root window | TRUE (int value) if topped frame should become active, or FALSE otherwise. |
FRAME_SIZE | framed window | width and height (int values) of the new framed window size. These values depends on FRAME_FLAGS values |
FRAME_FLAGS | framed window | type of flag (int value) and value TRUE/FALSE of the flag (int value). Here is the list of the flags:
|