Présentation
Documentation
L'équipe
Sérialisation
 
Programmes
Objets
Libs Utilitaires
Libs Internes
   
 
Editeur
Syntaxes
Windows
Versions
   

SCR/AL1 - TOME III. Les librairies utilitaires

23. Le groupe s_wddlg

23.1 WDDlgCreate (file s_wddlg.c:646)

Syntax

WDDLG *WDDlgCreate(int x, int y, int cx, int cy, U_ch *title)

Description

Crée une structure de définition d'une boîte de dialogue dynamique.

Exemple

TestDialog()
{
char *WDDlgCreate(), *wddlg, **tmp, buf[30], *sel;
int rc, pos = 5;

tmp = SCR_vtom("Option 1\tSuite,\t1\t2\t3\t4\t5\t6,
Option 2\tSuite,Option 3,Truc,Brol,
x\tSuite\tSuite,x\tSuite\t\tSuite,
y\tSuite\tSuite,dfsdfsdf", ',');
sel = SCR_malloc(SCR_tbl_size(tmp));

wddlg = WDDlgCreate(5, 5, 100, 220, 0L);
WDDlgAddButton(wddlg, 5, 5, 30, 10, "SelectAll", TestButton, 2);
WDDlgAddButton(wddlg, 40, 5, 50, 10, "Bouton 2", TestButton, 0);
sel[0] = sel[3] = 1;
WDDlgAddListbox(wddlg, 5, 20, 85, 50, tmp, sel, TestButton, 1);
WDDlgAddStatic(wddlg, 5, 95, 50, 12, testtext, 0);
strcpy(testtext, "Test test");
WDDlgAddEdit(wddlg, 5, 115, 50, 14, testtext, 20, TestButton, 0);
WDDlgAddIcon(wddlg, 5, 135, 26002, 0L);
WDDlgAddHSlide(wddlg, 5, 160, 80, 20, &pos, 0, 10, 0);
WDDlgAddBmp(wddlg, 5, 190, 26003, 0L);
WDDlgEdit(wddlg);
WDDlgFree(wddlg);
SCR_free(tmp);
SCR_free(sel);
}

Valeur retournée

pointeur vers la structure allouée

Voir également

WDDlgFree(), WDDlgAdd*(), WDDlgEdit(), WDDlgSelect()

23.1.1 File s_wddlg.c

WDDlgAddBmp(WDDLG *wddlg, int x, int y, int res, int (*fn)(WDDLG *, int, char *, int))
WDDlgAddButton(WDDLG *wddlg, int x, int y, int cx, int cy, U_ch *text, int (*fn)(WDDLG *, int, char *, int), int attr)
WDDlgAddEdit(WDDLG *wddlg, int x, int y, int cx, int cy, U_ch *text, int maxlen, int (*fn)(WDDLG *, int, char *, int), int attr)
WDDlgAddGroupbox(WDDLG *wddlg, int x, int y, int cx, int cy, U_ch *title)
WDDlgAddHSlider(WDDLG *wddlg, int x, int y, int cx, int cy, int *pos, int nMin, int nMax)
WDDlgAddIcon(WDDLG *wddlg, int x, int y, int res, int (*fn)(WDDLG *, int, char *, int))
WDDlgAddListbox(WDDLG *wddlg, int x, int y, int cx, int cy, U_ch **opts, char *sel, int (*fn)(WDDLG *, int, char *, int), int attr)
WDDlgAddListview(WDDLG *wddlg, int x, int y, int cx, int cy, U_ch **opts, char *sel, int (*fn)(WDDLG *, int, char *, int), int attr)
WDDlgAddProgress(WDDLG *wddlg, int x, int y, int cx, int cy, int *pos, int nMin, int nMax)
WDDlgAddStatic(WDDLG *wddlg, int x, int y, int cx, int cy, U_ch *text)
WDDlgAsk(U_ch *title, U_ch *qu, U_ch *rep, int lg)
WDDLG *WDDlgCreate(int x, int y, int cx, int cy, U_ch *title)
WDDLG *WDDlgCreateInfoBox(U_ch *title, U_ch *msg)
WDDlgDisplay(WDDLG *wddlg)
WDDlgDisplayField(WDDLG *wddlg, int fld_nb)
WDDlgDisplayFlds(WDDLG *wddlg)
WDDlgEdit(WDDLG *wddlg)
WDDlgFree(WDDLG *wddlg)
WDDlgGetCurSel(WDDLG *wddlg, int fld_nb)
WDDlgHideField(WDDLG *wddlg, int fld_nb)
WDDlgLBChangeText(WDDLG *wddlg, int fld_nb, int opt_nb, U_ch * txt)
WDDlgLVSelect(U_ch *title, U_ch **opts, char *sels, int x, int y, int cx, int cy)
WDDlgMsgBox(U_ch *title, U_ch *qu, U_ch **buts)
WDDlgSelect(U_ch *title, U_ch **opts, char *sels, int x, int y, int cx, int cy, int ntabs, int *tabs)
WDDlgSetBeginFn(WDDLG *wddlg, int (*fn)(WDDLG *, int, char *, int))
WDDlgSetCurSel(WDDLG *wddlg, int fld_nb, int opt_nb)
WDDlgSetEndFn(WDDLG *wddlg, int (*fn)(WDDLG *, int, char *, int))
WDDlgSetEscFn(WDDLG *wddlg, int (*fn)(WDDLG *, int, char *, int))
WDDlgSetFocus(WDDLG *wddlg, int fld_nb)
WDDlgSetFont(WDDLG *wddlg, int fld_nb, int font)
WDDlgSetIo(WDDLG *wddlg, int fld_nb, int io)
WDDlgSetLVTabs(WDDLG *wddlg, int fld_nb, int ntabs, int *tabs)
WDDlgSetOkFn(WDDLG *wddlg, int (*fn)(WDDLG *, int, char *, int))
WDDlgSetTabs(WDDLG *wddlg, int i, int ntabs, int *tabs)
WDDlgShowField(WDDLG *wddlg, int fld_nb)
WDDlgUnDisplay(WDDLG *wddlg)
WscrMenuLV(MENU *mn, char sep, int istitle, PAGE *pg, int fld_nb)

WDDlgCreateInfoBox (file s_wddlg.c:2369)

Syntax

WDDLG *WDDlgCreateInfoBox(U_ch *title, U_ch *msg)

Description

Crée une boîte de dialogue modeless avec un texte variable dans msg.

Valeur retournée

pointeur vers une structure WDDLG

Voir également

WDDlgDisplay(), WDDlgUndisplay, WDDlgFree()

WDDlgDisplay (file s_wddlg.c:1283)

Syntax

WDDlgDisplay(WDDLG *wddlg)

Description

Affiche une boîte de dialogue dynamique construite à l'aide de WDDlgCreate() et WDDlgAdd*().

Valeur retournée

0 si la fenêtre est créée, -1 sinon

Exemple

    WDDLG   *wddlg;
int pos, rc;

wddlg = WDDlgCreate(5, 5, 100, 220, 0L);
WDDlgAddHSlider(wddlg, 5, 160, 80, 20, &pos, 0, 10);
...
rc = WDDlgDisplay(wddlg);
...
WDDlgUnDisplay(wddlg);
WDDlgFree(wddlg);
return(rc);

Voir également

WDDlgFree(), WDDlgAdd*(), WDDlgEdit(), WDDlgSelect()

WDDlgUnDisplay (file s_wddlg.c:1320)

Syntax

WDDlgUnDisplay(WDDLG *wddlg)

Description

Ferme une boîte de dialogue dynamique construite à l'aide de WDDlgCreate() et WDDlgAdd*() et affichée par WDDlgDisplay().

Valeur retournée

-1 si la fenêtre n'existe pas

Exemple

    WDDLG   *wddlg;
int pos, rc;

wddlg = WDDlgCreate(5, 5, 100, 220, 0L);
WDDlgAddHSlider(wddlg, 5, 160, 80, 20, &pos, 0, 10);
...
rc = WDDlgDisplay(wddlg);
...
WDDlgUnDisplay(wddlg);
WDDlgFree(wddlg);
return(rc);

Voir également

WDDlgFree(), WDDlgAdd*(), WDDlgEdit(), WDDlgSelect()

Copyright © 1998-2015 Jean-Marc Paul and Bernard PAUL - Envoyez vos remarques ou commentaires à bernard@xon.be