Mercurial > hg > xemacs-beta
comparison src/dialog.c @ 404:2f8bb876ab1d r21-2-32
Import from CVS: tag r21-2-32
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:16:07 +0200 |
parents | 57709be46d1b |
children | 697ef44129c6 |
comparison
equal
deleted
inserted
replaced
403:9f011ab08d48 | 404:2f8bb876ab1d |
---|---|
18 along with XEmacs; see the file COPYING. If not, write to | 18 along with XEmacs; see the file COPYING. If not, write to |
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
20 Boston, MA 02111-1307, USA. */ | 20 Boston, MA 02111-1307, USA. */ |
21 | 21 |
22 /* Synched up with: Not in FSF. */ | 22 /* Synched up with: Not in FSF. */ |
23 | |
24 /* #### There ain't nothin' here because dialog boxes have not been | |
25 properly abstracted yet. */ | |
26 | 23 |
27 #include <config.h> | 24 #include <config.h> |
28 #include "lisp.h" | 25 #include "lisp.h" |
29 #include "frame.h" | 26 #include "frame.h" |
30 #include "device.h" | 27 #include "device.h" |
46 | 43 |
47 The name is the string to display on the button; it is filtered through the | 44 The name is the string to display on the button; it is filtered through the |
48 resource database, so it is possible for resources to override what string | 45 resource database, so it is possible for resources to override what string |
49 is actually displayed. | 46 is actually displayed. |
50 | 47 |
48 Accelerators can be indicated in the string by putting the sequence | |
49 "%_" before the character corresponding to the key that will invoke | |
50 the button. Uppercase and lowercase accelerators are equivalent. The | |
51 sequence "%%" is also special, and is translated into a single %. | |
52 | |
51 If the `callback' of a button is a symbol, then it must name a command. | 53 If the `callback' of a button is a symbol, then it must name a command. |
52 It will be invoked with `call-interactively'. If it is a list, then it is | 54 It will be invoked with `call-interactively'. If it is a list, then it is |
53 evaluated with `eval'. | 55 evaluated with `eval'. |
54 | 56 |
55 One (and only one) of the buttons may be `nil'. This marker means that all | 57 One (and only one) of the buttons may be `nil'. This marker means that all |
56 following buttons should be flushright instead of flushleft. | 58 following buttons should be flushright instead of flushleft. |
57 | 59 |
58 Though the keyword/value syntax is supported for dialog boxes just as in | 60 Though the keyword/value syntax is supported for dialog boxes just as in |
59 popup menus, the only keyword which is both meaningful and fully implemented | 61 popup menus, the only keyword which is both meaningful and fully implemented |
60 for dialog box buttons is `:active'. | 62 for dialog box buttons is `:active'. */ |
61 */ | |
62 (dbox_desc)) | 63 (dbox_desc)) |
63 { | 64 { |
64 struct frame *f = selected_frame (); | 65 struct frame *f = selected_frame (); |
65 struct device *d = XDEVICE (f->device); | 66 struct device *d = XDEVICE (f->device); |
66 | 67 |
70 if (SYMBOLP (dbox_desc)) | 71 if (SYMBOLP (dbox_desc)) |
71 dbox_desc = Fsymbol_value (dbox_desc); | 72 dbox_desc = Fsymbol_value (dbox_desc); |
72 CHECK_CONS (dbox_desc); | 73 CHECK_CONS (dbox_desc); |
73 CHECK_STRING (XCAR (dbox_desc)); | 74 CHECK_STRING (XCAR (dbox_desc)); |
74 if (!CONSP (XCDR (dbox_desc))) | 75 if (!CONSP (XCDR (dbox_desc))) |
75 signal_simple_error ("Dialog descriptor must supply at least one button", dbox_desc); | 76 signal_simple_error ("Dialog descriptor must supply at least one button", |
77 dbox_desc); | |
76 | 78 |
77 DEVMETH (d, popup_dialog_box, (f, dbox_desc)); | 79 DEVMETH (d, popup_dialog_box, (f, dbox_desc)); |
78 | 80 |
79 return Qnil; | 81 return Qnil; |
80 } | 82 } |