Mercurial > hg > xemacs-beta
comparison src/dialog.c @ 284:558f606b08ae r21-0b40
Import from CVS: tag r21-0b40
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:34:13 +0200 |
parents | 376386a54a3c |
children | 57709be46d1b |
comparison
equal
deleted
inserted
replaced
283:fa3d41851a08 | 284:558f606b08ae |
---|---|
24 /* #### There ain't nothin' here because dialog boxes have not been | 24 /* #### There ain't nothin' here because dialog boxes have not been |
25 properly abstracted yet. */ | 25 properly abstracted yet. */ |
26 | 26 |
27 #include <config.h> | 27 #include <config.h> |
28 #include "lisp.h" | 28 #include "lisp.h" |
29 #include "frame.h" | |
30 #include "device.h" | |
31 | |
32 DEFUN ("popup-dialog-box", Fpopup_dialog_box, 1, 1, 0, /* | |
33 Pop up a dialog box. | |
34 A dialog box description is a list. | |
35 | |
36 The first element of a dialog box must be a string, which is the title or | |
37 question. | |
38 | |
39 The rest of the elements are descriptions of the dialog box's buttons. | |
40 Each of these is a vector, the syntax of which is essentially the same as | |
41 that of popup menu items. They may have any of the following forms: | |
42 | |
43 [ "name" callback <active-p> ] | |
44 [ "name" callback <active-p> "suffix" ] | |
45 [ "name" callback :<keyword> <value> :<keyword> <value> ... ] | |
46 | |
47 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 | |
49 is actually displayed. | |
50 | |
51 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 | |
53 evaluated with `eval'. | |
54 | |
55 One (and only one) of the buttons may be `nil'. This marker means that all | |
56 following buttons should be flushright instead of flushleft. | |
57 | |
58 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 | |
60 for dialog box buttons is `:active'. | |
61 */ | |
62 (dbox_desc)) | |
63 { | |
64 struct frame *f = selected_frame (); | |
65 struct device *d = XDEVICE (f->device); | |
66 | |
67 MAYBE_DEVMETH (d, popup_dialog_box, (f, dbox_desc)); | |
68 | |
69 return Qnil; | |
70 } | |
29 | 71 |
30 void | 72 void |
31 syms_of_dialog (void) | 73 syms_of_dialog (void) |
32 { | 74 { |
75 DEFSUBR (Fpopup_dialog_box); | |
33 } | 76 } |
34 | 77 |
35 void | 78 void |
36 vars_of_dialog (void) | 79 vars_of_dialog (void) |
37 { | 80 { |