Defines | |
#define | BubbleConf(a) |
Functions | |
int | mt_BubbleCall (APPvar *app, char *help, int x, int y) |
Display a bubble help. | |
int | mt_BubbleModal (APPvar *app, char *help, int x, int y) |
Display a bubble help in a classic formular. | |
int | mt_BubbleDo (APPvar *app, OBJECT *tree, int __index) |
alternative FormDo() function for BubbleGEM | |
int | mt_BubbleAttach (APPvar *app, OBJECT *tree, int __index, char *help) |
Link a bubble help to an object. | |
void | mt_BubbleFree (APPvar *app) |
release memory reverved by BubbleAttach(). | |
int | mt_BubbleFind (APPvar *app, OBJECT *tree, int __index, char **help) |
Find a bubble linked to an object. | |
int | mt_BubbleEvnt (APPvar *app) |
display the bubble help defined by BubbleAttach(). | |
int | mt_BubbleGet (APPvar *app) |
load the BubbleGEM daemon in memory |
#define BubbleConf | ( | a | ) |
int mt_BubbleAttach | ( | APPvar * | app, | |
OBJECT * | tree, | |||
int | index, | |||
char * | help | |||
) |
Link a bubble help to an object.
app | application descriptor, | |
tree | address of an objects tree, | |
index | object index, | |
help | address of string to display in the bubble (the string is not duplicated) |
int mt_BubbleCall | ( | APPvar * | app, | |
char * | help, | |||
int | x, | |||
int | y | |||
) |
Display a bubble help.
app | application descriptor, | |
help | pointeur to the string to display in a bubble | |
x,y | coordinates of the bubble (use the mouse position) |
The AES should not be stopped, that is the case with classic formulars which make use of wind_update() function, when the mt_BubbleCall() function is invoked. However, it is possible to call BubbleGEM from a classic formular with the mt_BubbleModal() function.
int mt_BubbleDo | ( | APPvar * | app, | |
OBJECT * | tree, | |||
int | edit | |||
) |
alternative FormDo() function for BubbleGEM
app,tree,edit | see mt_FormDo(). |
int mt_BubbleEvnt | ( | APPvar * | app | ) |
display the bubble help defined by BubbleAttach().
app | application descriptor |
0 | if bubble is not found | |
WS_FORM | if bubble is found in a dialog box | |
MW_TOOLBAR | if bubble is found in a toolbar |
#include <windom.h> void RightButton( void) { if( evnt.mbut & 0x2) BubbleEvnt(); } int main(void) { OBJECT *tree; ApplInit(); RsrcLoad( "TEST.RSC"); rsrc_gaddr( 0, FORM1, &tree); // Link the bubble help to objects ... BubbleAttach( tree, 0, "Formular background"); BubbleAttach( tree, OK, "An exit button"); // Create form FormCreate( tree, MOVER|NAME, NULL, "test", NULL, 1, 0); // Handle globally the MU_BUTTON event EvntAttach( NULL, WM_XBUTTON, RightButton); do EvntWindom( MU_MESAG|MU_BUTTON); while( wglb.first); BubbleFree(); // release the bubbles RsrcFree(); ApplExit(); return 0; }
int mt_BubbleFind | ( | APPvar * | app, | |
OBJECT * | tree, | |||
int | index, | |||
char ** | help | |||
) |
Find a bubble linked to an object.
app | application descriptor, | |
tree | address of an objects tree, | |
index | object index, | |
help | will be filled-in with the address of the string to display in the bubble |
void mt_BubbleFree | ( | APPvar * | app | ) |
release memory reverved by BubbleAttach().
app | application descriptor, |
int mt_BubbleGet | ( | APPvar * | app | ) |
load the BubbleGEM daemon in memory
app | application descriptor, |
int mt_BubbleModal | ( | APPvar * | app, | |
char * | hlp, | |||
int | mx, | |||
int | my | |||
) |
Display a bubble help in a classic formular.
app | application descriptor, | |
hlp | pointeur to the string to display in a bubble | |
mx,my | coordinates of the bubble (use the mouse position) |
If BUBBLE.APP is not present in memory, mt_BubbleModal() is not able to load it (because AES is stopped). So the BubbleGEM daemon can be launched prevously with the BubbletGet() function.
Because the form_do() function can not handle the right mouse button event, WinDom offers an alternative function to display systematically bubbles with mt_BubbleAttach() and mt_BubbleEvnt() functions : it is the mt_BubbleDo() function. This function is not universal, for custom usage, write your own mt_BubbleDo() function (looking at the mt_BubbleDo() source code. This function is simple, it uses the functions of the AES form library.
A complet example is given is the folder EXAMPLES/BUBBLE of the WDK package.