]> git.sur5r.net Git - cc65/blob - include/geos/gdlgbox.h
fixes for GEOS structures, initialized menu/icontabs finally are possible
[cc65] / include / geos / gdlgbox.h
1 /*
2   GEOS dialog box functions
3
4   ported to small C on 26.12.1999
5   by Maciej 'YTM/Alliance' Witkowiak
6   10.03.2000 - update
7 */
8
9 #ifndef _GDLGBOX_H
10 #define _GDLGBOX_H
11
12 char __fastcall__ DoDlgBox(const char *dboxstring);
13 char __fastcall__ RstrFrmDialogue(void);
14
15 /* These are custom, predefined dialog boxes, I'm sure you'll find them usable
16    Most of them show 2 lines of text                                            */
17
18 char __fastcall__ DlgBoxYesNo(const char *line1, const char *line2);
19 char __fastcall__ DlgBoxOkCancel(const char *line1, const char *line2);
20 void __fastcall__ DlgBoxOk(const char *line1, const char *line2);
21 char __fastcall__ DlgBoxGetString(char *myString, char strLength,
22                                   const char *line1, const char *line2);
23 char __fastcall__ DlgBoxFileSelect(const char *classtxt, char ftype,
24                                    char *fname);
25
26 /* Now the command string type */
27
28 typedef void dlgBoxStr;
29
30 /* and command string commands - macros */
31
32 #define DB_DEFPOS(pattern) (char)(DEF_DB_POS | (pattern))
33 #define DB_SETPOS(pattern,top,bot,left,right) \
34         (char)(SET_DB_POS | (pattern)), (char)(top), (char)(bot), \
35         (unsigned)(left), (unsigned)(right)
36 #define DB_ICON(i,x,y)  (char)(i), (char)(x), (char)(y)
37 #define DB_TXTSTR(x,y,text) (char)DBTXTSTR, (char)(x), (char)(y), (text)
38 #define DB_VARSTR(x,y,ptr) (char)DBVARSTR, (char)(x), (char)(y), (char)(ptr)
39 #define DB_GETSTR(x,y,ptr,length) (char)DBGETSTRING, (char)(x), (char)(y), (char)(ptr), (char)(length)
40 #define DB_SYSOPV(ptr) (char)DBSYSOPV, (unsigned)(ptr)
41 #define DB_GRPHSTR(ptr) (char)DBGRPHSTR, (unsigned)(ptr)
42 #define DB_GETFILES(x,y) (char)DBGETFILES, (char)(x), (char)(y)
43 #define DB_OPVEC(ptr) (char)DBOPVEC, (unsigned)(ptr)
44 #define DB_USRICON(x,y,ptr) (char)DBUSRICON, (char)(x), (char)(y), (unsigned)(ptr)
45 #define DB_USRROUT(ptr) (char)DB_USR_ROUT, (unsigned)(ptr)
46 #define DB_END (char)NULL
47
48 /*
49   part of constants below is used internally, but some are useful for macros above
50 */
51
52 /* icons for DB_ICON */
53 #define OK              1
54 #define CANCEL          2
55 #define YES             3
56 #define NO              4
57 #define OPEN            5
58 #define DISK            6
59 /* commands - internally used by command macros */
60 #define DBTXTSTR        11
61 #define DBVARSTR        12
62 #define DBGETSTRING     13
63 #define DBSYSOPV        14
64 #define DBGRPHSTR       15
65 #define DBGETFILES      16
66 #define DBOPVEC         17
67 #define DBUSRICON       18
68 #define DB_USR_ROUT     19
69 /* icons tabulation in standard window */
70 #define DBI_X_0         1
71 #define DBI_X_1         9
72 #define DBI_X_2         17
73 #define DBI_Y_0         8
74 #define DBI_Y_1         40
75 #define DBI_Y_2         72
76 /* standard window size defaults */
77 #define SET_DB_POS      0
78 #define DEF_DB_POS      0x80
79 #define DEF_DB_TOP      32
80 #define DEF_DB_BOT      127
81 #define DEF_DB_LEFT     64
82 #define DEF_DB_RIGHT    255
83 /* text tabulation in standard window */
84 #define TXT_LN_1_Y      16
85 #define TXT_LN_2_Y      32
86 #define TXT_LN_3_Y      48
87 #define TXT_LN_4_Y      64
88 #define TXT_LN_5_Y      80
89 #define TXT_LN_X        16
90 /* system icons size */
91 #define SYSDBI_HEIGHT   16
92 #define SYSDBI_WIDTH    6
93 /* dialogbox string offsets */
94 #define OFF_DB_FORM     0
95 #define OFF_DB_TOP      1
96 #define OFF_DB_BOT      2
97 #define OFF_DB_LEFT     3
98 #define OFF_DB_RIGHT    5
99 #define OFF_DB_1STCMD   7
100
101 #endif
102