/[emacs]/emacs/src/w32menu.c
ViewVC logotype

Diff of /emacs/src/w32menu.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.42 by pj, Fri Nov 2 20:35:06 2001 UTC revision 1.43 by jasonr, Mon Nov 12 23:52:03 2001 UTC
# Line 584  list_of_items (pane) Line 584  list_of_items (pane)
584  }  }
585    
586  DEFUN ("x-popup-menu", Fx_popup_menu, Sx_popup_menu, 2, 2, 0,  DEFUN ("x-popup-menu", Fx_popup_menu, Sx_popup_menu, 2, 2, 0,
587    "Pop up a deck-of-cards menu and return user's selection.\n\         doc: /* Pop up a deck-of-cards menu and return user's selection.
588  POSITION is a position specification.  This is either a mouse button event\n\  POSITION is a position specification.  This is either a mouse button
589  or a list ((XOFFSET YOFFSET) WINDOW)\n\  event or a list ((XOFFSET YOFFSET) WINDOW) where XOFFSET and YOFFSET
590  where XOFFSET and YOFFSET are positions in pixels from the top left\n\  are positions in pixels from the top left corner of WINDOW's frame
591  corner of WINDOW's frame.  (WINDOW may be a frame object instead of a window.)\n\  \(WINDOW may be a frame object instead of a window).  This controls the
592  This controls the position of the center of the first line\n\  position of the center of the first line in the first pane of the
593  in the first pane of the menu, not the top left of the menu as a whole.\n\  menu, not the top left of the menu as a whole.  If POSITION is t, it
594  If POSITION is t, it means to use the current mouse position.\n\  means to use the current mouse position.
595  \n\  
596  MENU is a specifier for a menu.  For the simplest case, MENU is a keymap.\n\  MENU is a specifier for a menu.  For the simplest case, MENU is a keymap.
597  The menu items come from key bindings that have a menu string as well as\n\  The menu items come from key bindings that have a menu string as well as
598  a definition; actually, the \"definition\" in such a key binding looks like\n\  a definition; actually, the \"definition\" in such a key binding looks like
599  \(STRING . REAL-DEFINITION).  To give the menu a title, put a string into\n\  \(STRING . REAL-DEFINITION).  To give the menu a title, put a string into
600  the keymap as a top-level element.\n\n\  the keymap as a top-level element.
601  If REAL-DEFINITION is nil, that puts a nonselectable string in the menu.\n\  
602  Otherwise, REAL-DEFINITION should be a valid key binding definition.\n\  If REAL-DEFINITION is nil, that puts a nonselectable string in the menu.
603  \n\  Otherwise, REAL-DEFINITION should be a valid key binding definition.
604  You can also use a list of keymaps as MENU.\n\  
605    Then each keymap makes a separate pane.\n\  You can also use a list of keymaps as MENU.  Then each keymap makes a
606  When MENU is a keymap or a list of keymaps, the return value\n\  separate pane.  When MENU is a keymap or a list of keymaps, the return
607  is a list of events.\n\n\  value is a list of events.
608  \n\  
609  Alternatively, you can specify a menu of multiple panes\n\  Alternatively, you can specify a menu of multiple panes with a list of
610    with a list of the form (TITLE PANE1 PANE2...),\n\  the form (TITLE PANE1 PANE2...), where each pane is a list of
611  where each pane is a list of form (TITLE ITEM1 ITEM2...).\n\  form (TITLE ITEM1 ITEM2...).
612  Each ITEM is normally a cons cell (STRING . VALUE);\n\  Each ITEM is normally a cons cell (STRING . VALUE); but a string can
613  but a string can appear as an item--that makes a nonselectable line\n\  appear as an item--that makes a nonselectable line in the menu.
614  in the menu.\n\  With this form of menu, the return value is VALUE from the chosen item.
615  With this form of menu, the return value is VALUE from the chosen item.\n\  
616  \n\  If POSITION is nil, don't display the menu at all, just precalculate the
617  If POSITION is nil, don't display the menu at all, just precalculate the\n\  cached information about equivalent key sequences.  */)
 cached information about equivalent key sequences.")  
618    (position, menu)    (position, menu)
619       Lisp_Object position, menu;       Lisp_Object position, menu;
620  {  {
# Line 808  cached information about equivalent key Line 807  cached information about equivalent key
807  #ifdef HAVE_MENUS  #ifdef HAVE_MENUS
808    
809  DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 2, 0,  DEFUN ("x-popup-dialog", Fx_popup_dialog, Sx_popup_dialog, 2, 2, 0,
810    "Pop up a dialog box and return user's selection.\n\         doc: /* Pop up a dialog box and return user's selection.
811  POSITION specifies which frame to use.\n\  POSITION specifies which frame to use.
812  This is normally a mouse button event or a window or frame.\n\  This is normally a mouse button event or a window or frame.
813  If POSITION is t, it means to use the frame the mouse is on.\n\  If POSITION is t, it means to use the frame the mouse is on.
814  The dialog box appears in the middle of the specified frame.\n\  The dialog box appears in the middle of the specified frame.
815  \n\  
816  CONTENTS specifies the alternatives to display in the dialog box.\n\  CONTENTS specifies the alternatives to display in the dialog box.
817  It is a list of the form (TITLE ITEM1 ITEM2...).\n\  It is a list of the form (TITLE ITEM1 ITEM2...).
818  Each ITEM is a cons cell (STRING . VALUE).\n\  Each ITEM is a cons cell (STRING . VALUE).
819  The return value is VALUE from the chosen item.\n\n\  The return value is VALUE from the chosen item.
820  An ITEM may also be just a string--that makes a nonselectable item.\n\  
821  An ITEM may also be nil--that means to put all preceding items\n\  An ITEM may also be just a string--that makes a nonselectable item.
822  on the left of the dialog box and all following items on the right.\n\  An ITEM may also be nil--that means to put all preceding items
823  \(By default, approximately half appear on each side.)")  on the left of the dialog box and all following items on the right.
824    \(By default, approximately half appear on each side.)  */)
825    (position, contents)    (position, contents)
826       Lisp_Object position, contents;       Lisp_Object position, contents;
827  {  {
# Line 2229  syms_of_w32menu () Line 2229  syms_of_w32menu ()
2229    staticpro (&Qdebug_on_next_call);    staticpro (&Qdebug_on_next_call);
2230    
2231    DEFVAR_LISP ("menu-updating-frame", &Vmenu_updating_frame,    DEFVAR_LISP ("menu-updating-frame", &Vmenu_updating_frame,
2232      "Frame for which we are updating a menu.\n\                 doc: /* Frame for which we are updating a menu.
2233  The enable predicate for a menu command should check this variable.");  The enable predicate for a menu command should check this variable.  */);
2234    Vmenu_updating_frame = Qnil;    Vmenu_updating_frame = Qnil;
2235    
2236    defsubr (&Sx_popup_menu);    defsubr (&Sx_popup_menu);

Legend:
Removed from v.1.42  
changed lines
  Added in v.1.43

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26