860 |
An ITEM may also be just a string--that makes a nonselectable item. |
An ITEM may also be just a string--that makes a nonselectable item. |
861 |
An ITEM may also be nil--that means to put all preceding items |
An ITEM may also be nil--that means to put all preceding items |
862 |
on the left of the dialog box and all following items on the right. |
on the left of the dialog box and all following items on the right. |
863 |
\(By default, approximately half appear on each side.) */) |
\(By default, approximately half appear on each side.) |
864 |
(position, contents) |
|
865 |
Lisp_Object position, contents; |
If HEADER is non-nil, the frame title for the box is "Information", |
866 |
|
otherwise it is "Question". */) |
867 |
|
(position, contents, header) |
868 |
|
Lisp_Object position, contents, header; |
869 |
{ |
{ |
870 |
FRAME_PTR f = NULL; |
FRAME_PTR f = NULL; |
871 |
Lisp_Object window; |
Lisp_Object window; |
952 |
|
|
953 |
/* Display them in a dialog box. */ |
/* Display them in a dialog box. */ |
954 |
BLOCK_INPUT; |
BLOCK_INPUT; |
955 |
selection = w32_dialog_show (f, 0, title, &error_name); |
selection = w32_dialog_show (f, 0, title, header, &error_name); |
956 |
UNBLOCK_INPUT; |
UNBLOCK_INPUT; |
957 |
|
|
958 |
discard_menu_items (); |
discard_menu_items (); |
1998 |
"button6", "button7", "button8", "button9", "button10" }; |
"button6", "button7", "button8", "button9", "button10" }; |
1999 |
|
|
2000 |
static Lisp_Object |
static Lisp_Object |
2001 |
w32_dialog_show (f, keymaps, title, error) |
w32_dialog_show (f, keymaps, title, header, error) |
2002 |
FRAME_PTR f; |
FRAME_PTR f; |
2003 |
int keymaps; |
int keymaps; |
2004 |
Lisp_Object title; |
Lisp_Object title, header; |
2005 |
char **error; |
char **error; |
2006 |
{ |
{ |
2007 |
int i, nb_buttons=0; |
int i, nb_buttons=0; |
2102 |
wv->name = dialog_name; |
wv->name = dialog_name; |
2103 |
wv->help = Qnil; |
wv->help = Qnil; |
2104 |
|
|
2105 |
|
/* Frame title: 'Q' = Question, 'I' = Information. |
2106 |
|
Can also have 'E' = Error if, one day, we want |
2107 |
|
a popup for errors. */ |
2108 |
|
if (NILP(header)) |
2109 |
|
dialog_name[0] = 'Q'; |
2110 |
|
else |
2111 |
|
dialog_name[0] = 'I'; |
2112 |
|
|
2113 |
/* Dialog boxes use a really stupid name encoding |
/* Dialog boxes use a really stupid name encoding |
2114 |
which specifies how many buttons to use |
which specifies how many buttons to use |
2115 |
and how many buttons are on the right. |
and how many buttons are on the right. */ |
|
The Q means something also. */ |
|
|
dialog_name[0] = 'Q'; |
|
2116 |
dialog_name[1] = '0' + nb_buttons; |
dialog_name[1] = '0' + nb_buttons; |
2117 |
dialog_name[2] = 'B'; |
dialog_name[2] = 'B'; |
2118 |
dialog_name[3] = 'R'; |
dialog_name[3] = 'R'; |