2 GEOS dialog box functions
4 by Maciej 'YTM/Elysium' Witkowiak
5 26.12.1999, 10.03.2000, 17.8.2003
11 char __fastcall__ DoDlgBox(const char *dboxstring);
12 char __fastcall__ RstrFrmDialogue(void);
14 /* These are custom, predefined dialog boxes, I'm sure you'll find them usable
15 Most of them show 2 lines of text */
17 char __fastcall__ DlgBoxYesNo(const char *line1, const char *line2);
18 char __fastcall__ DlgBoxOkCancel(const char *line1, const char *line2);
19 void __fastcall__ DlgBoxOk(const char *line1, const char *line2);
20 char __fastcall__ DlgBoxGetString(char *myString, char strLength,
21 const char *line1, const char *line2);
22 char __fastcall__ DlgBoxFileSelect(const char *classtxt, char ftype,
25 /* This is a more general dialog box, works like printf in a window */
26 char MessageBox(char mode, const char *format, ...);
28 /* mode argument for MessageBox() */
36 /* Now the command string type */
38 typedef void dlgBoxStr;
40 /* and command string commands - macros */
42 #define DB_DEFPOS(pattern) (char)(DEF_DB_POS | (pattern))
43 #define DB_SETPOS(pattern,top,bot,left,right) \
44 (char)(SET_DB_POS | (pattern)), (char)(top), (char)(bot), \
45 (unsigned)(left), (unsigned)(right)
46 #define DB_ICON(i,x,y) (char)(i), (char)(x), (char)(y)
47 #define DB_TXTSTR(x,y,text) (char)DBTXTSTR, (char)(x), (char)(y), (text)
48 #define DB_VARSTR(x,y,ptr) (char)DBVARSTR, (char)(x), (char)(y), (char)(ptr)
49 #define DB_GETSTR(x,y,ptr,length) (char)DBGETSTRING, (char)(x), (char)(y), (char)(ptr), (char)(length)
50 #define DB_SYSOPV(ptr) (char)DBSYSOPV, (unsigned)(ptr)
51 #define DB_GRPHSTR(ptr) (char)DBGRPHSTR, (unsigned)(ptr)
52 #define DB_GETFILES(x,y) (char)DBGETFILES, (char)(x), (char)(y)
53 #define DB_OPVEC(ptr) (char)DBOPVEC, (unsigned)(ptr)
54 #define DB_USRICON(x,y,ptr) (char)DBUSRICON, (char)(x), (char)(y), (unsigned)(ptr)
55 #define DB_USRROUT(ptr) (char)DB_USR_ROUT, (unsigned)(ptr)
56 #define DB_END (char)NULL
59 part of constants below is used internally, but some are useful for macros above
62 /* icons for DB_ICON */
69 /* commands - internally used by command macros */
72 #define DBGETSTRING 13
78 #define DB_USR_ROUT 19
79 /* icons tabulation in standard window */
86 /* standard window size defaults */
88 #define DEF_DB_POS 0x80
90 #define DEF_DB_BOT 127
91 #define DEF_DB_LEFT 64
92 #define DEF_DB_RIGHT 255
93 /* text tabulation in standard window */
100 /* system icons size */
101 #define SYSDBI_HEIGHT 16
102 #define SYSDBI_WIDTH 6
103 /* dialogbox string offsets */
104 #define OFF_DB_FORM 0
107 #define OFF_DB_LEFT 3
108 #define OFF_DB_RIGHT 5
109 #define OFF_DB_1STCMD 7