aboutsummaryrefslogtreecommitdiffstats
path: root/src/xmenu.c
Commit message (Collapse)AuthorAgeFilesLines
* (xmenu_show, xdialog_show):Richard M. Stallman1994-04-271-0/+4
| | | | If we unread some events, set interrupt_input_pending.
* (xmenu_show): Fix typo in last change.Richard M. Stallman1994-04-171-1/+1
|
* (xmenu_show): Don't cons on subprefix_stck[j] if nil.Richard M. Stallman1994-04-161-1/+2
|
* (last_menu_bar_item_end): New variable.Richard M. Stallman1994-04-141-21/+76
| | | | | | | | | | | | | | (xmenu_show): Set that var. (other_menu_bar_item_p): Return 0 if mouse is not in any menu bar item. (xmenu_show, xdialog_show): Add casts in assignments to widget_value fields from string contents. (dispatch_dummy_expose): Cast arg to XtDispatchEvent. [!USE_X_TOOLKIT] (xmenu_show): Right-justify char equivalents. Use alloca for concatenated strings, if alloca is fast. [USE_X_TOOLKIT] (xmenu_show): Use XtTranslateCoords.
* (Fx_popup_menu): Use line_height field.Richard M. Stallman1994-04-091-1/+1
|
* (Fx_popup_dialog): Doc fix.Richard M. Stallman1994-04-081-3/+52
| | | | | | | (list_of_items): Handle nil in item list as left/right boundary. (push_left_right_boundary): Record the boundary. (xmenu_show): Disregard a boundary if any. (xdialog_show): Really obey a boundary.
* (Fx_popup_dialog): If POSITION is t, use selected frame.Richard M. Stallman1994-04-031-5/+1
|
* (Fx_popup_dialog): If POSITION is t, use selected frame.Richard M. Stallman1994-04-031-0/+9
|
* (xmenu_show): Undo part of March 11 change:Richard M. Stallman1994-04-011-2/+3
| | | | Do call lw_destroy_all_widgets at the end.
* (set_frame_menubar): New arg, first_time.Fred Pierresteguy1994-03-311-3/+6
| | | | | Don't update the menubar the first time it is created via x_window. (initialize_frame_menubar): Pass 1 to set_frame_menubar.
* (xmenu_show): Enable asynchronous events.Karl Heuer1994-03-251-1/+2
|
* (update_frame_menubar): Function renamed from update_one_frame_psheets.Fred Pierresteguy1994-03-231-3/+14
| | | | | (initialize_frame_menubar): New function. (set_frame_menubar): Call menu_bar_items when items is NIL.
* (xdialog_show): Delete args x, y.Richard M. Stallman1994-03-201-141/+77
| | | | | | | (Fx_popup_dialog): Don't pass those args; don't compute them. Second arg is now just one pane. Lots of simplification. Always start by decoding POSITION arg to get a frame. [! USE_X_TOOLKIT]: Put the menu in middle of that frame.
* (Fx_popup_dialog): Don't fail to set X, Y from POSITION.Richard M. Stallman1994-03-191-5/+64
| | | | | | (xdialog_show): Call lw_modify_all_widgets properly. Generate dialog's name at run time to specify number of buttons. Report error if too many buttons to handle or if multiple panes.
* (Fx_popup_dialog, Fx_popup_menu): Require 2 args.Richard M. Stallman1994-03-191-2/+2
|
* (list_of_items): Arg to push_menu_item was missing.Richard M. Stallman1994-03-181-1/+1
|
* (Fx_popup_dialog, Fx_popup_menu): Handle case whereRichard M. Stallman1994-03-181-6/+19
| | | | mouse_position_hook doesn't store anything.
* Undo previous change. Instead:Richard M. Stallman1994-03-141-5/+4
| | | | (Fx_popup_dialog) [! USE_X_TOOLKIT]: Call Fx_popup_menu.
* (Fx_popup_dialog): Define only if USE_X_TOOLKIT.Richard M. Stallman1994-03-141-0/+5
|
* (xdialog_show): New function to handle the display of dialog boxes.Fred Pierresteguy1994-03-111-0/+337
| | | | | | | (Fx_popup_dialog): New function. (dialog_selection_callback): New function. (xmenu_show) [USE_X_TOOLKIT]: Don't call lw_destroy_all_widgets at the end. Do the work of construct_mouse_click in the ButtonRelease case.
* (Fx_popup_menu): If POSITION is nil,Richard M. Stallman1994-03-101-46/+164
| | | | | | | | | | | | | | | | | | | | | don't require an open X connection. (single_keymap_panes, keymap_panes, menu_item_enabled_p): New arg NOTREAL. (Fx_popup_menu): Pass new arg (1 if POSITION is nil). (menu_item_enabled_p): If NOTREAL, always return t. (single_keymap_panes) [!USE_X_TOOLKIT]: Append > to item_string if submenu. [USE_X_TOOLKIT]: Display submenus in Xt style. (menu_items): Record where submenus start and end. (menu_items_submenu_depth): New variable. (init_menu_items): Init it. (push_submenu_start, push_submenu_end): New functions. (grow_menu_items): New function. (push_menu_pane, push_menu_item): Use it. (push_menu_pane): Increment menu_items_n_panes only if depth is 0. (single_keymap_panes) [USE_X_TOOLKIT]: Record submenus in menu_items. (xmenu_show) [USE_X_TOOLKIT]: Give submenus to toolkit.
* (update_one_frame_psheets): Call EmacsFrameSetCharSize toFred Pierresteguy1994-03-041-1/+17
| | | | | | force the paned widget to resize to the right value. (xmenu_show): No need to check a second time whether the mouse has moved to another menu bar item. This slows down execution.
* [USE_X_TOOLKIT] (xmenu_show): Pass display to XtWindowToWidget.Roland McGrath1994-03-041-2/+3
|
* (map_event_to_object, set_frame_menubar):Richard M. Stallman1994-03-031-7/+24
| | | | Use FRAME_MENU_BAR_LINES as vector.
* (xmenu_show): Test XtWindowToWidget before inserting into the event_queue.Fred Pierresteguy1994-02-281-6/+9
|
* (Fx_popup_menu): Allow t as position, meaning use mouse pos.Richard M. Stallman1994-02-241-1091/+1058
| | | | | | | | | | | | | | | | | | | | | | | Allow nil as position, meaning just precompute equiv-key data. Mouse events have coords in pixel units. (menu_item_equiv_key): Cached equiv-key data is a sublist. Most of file rewritten. (menu_items, menu_items_*): New variables. (MENU_ITEMS_*): New macros. (init_menu_items, discard_menu_items, push_menu_pane, push_menu_item) (finish_menu_items): New functions. (menu_item_enabled_p): New function. (keymap_panes, single_keymap_panes): Major rewrite; most args changed. (list_of_panes, list_of_items): Major rewrite; most args changed. (Fx_popup_menu): Major rewrite. Now independent of display mechanism. No more conditionals here. (set_menu_items, free_menu_items): Functions deleted. (xmenu_show): Both versions rewritten to work from menu_items and to do all the conditionalized things that were in Fx_popup_menu. (unread_menu_bar_button, other_menu_bar_item_p): New functions. (check_mouse_other_menu_bar): New function.
* (single_keymap_panes): Properly skip help-string if any.Richard M. Stallman1994-02-211-34/+46
| | | | | | Rename item2 to item_string. GCPRO some things. (menu_item_equiv_key): Use either VECTORP or STRINGP, not both.
* Find and display keyboard equivalents of menu items.Richard M. Stallman1994-02-191-8/+128
| | | | | (menu_item_equiv_key): New function. (single_keymap_panes): Call it.
* (popup_selection_callback): Clean up code. Remove code in #if 0 directive.Fred Pierresteguy1994-02-181-14/+0
| | | | (popup_down_callback): Likewise.
* (Fx_popup_menu): Likewise.Karl Heuer1994-02-141-0/+1
|
* (free_frame_menubar) [USE_X_TOOLKIT]. New function to destroy the X WidgetFred Pierresteguy1994-02-111-0/+18
| | | | instance of the menubar.
* (xmenu_show) [USE_X_TOOLKIT]: return Qnil when val is null.Fred Pierresteguy1994-02-111-0/+2
|
* (xmenu_show) [USE_X_TOOLKIT]: Test event.xmotion.x_root in the MotionNotifyFred Pierresteguy1994-02-101-8/+15
| | | | case.
* (xmenu_show ) [USE_X_TOOLKIT]: Implement a Motif behavior for the menubar. Now,Fred Pierresteguy1994-02-091-1/+42
| | | | | | | | if you move the pointer on another menubar item while displaying the contents of a selected menubar item, the current pulldown menu is closed and the new one corresponding to the new pointed item is displayed. Clean up code. Handle the MotionNotify events in the XEvent loop.
* (single_keymap_panes): Use internal_condition_case_1.Richard M. Stallman1994-02-071-3/+20
| | | | (single_keymap_panes_1): New function.
* (xmenu_show) [USE_X_TOOLKIT]: Remove the #if 0 directives and reverse one toFred Pierresteguy1994-02-041-15/+1
| | | | avoid the flickering of the menubar.
* Find lwlib.h and xlwmenuP.h in ../lwlib.Richard M. Stallman1994-01-261-11/+656
| | | | | | | | | | | | | | | | | Reshuffle functions; put new ones in #ifdef USE_X_TOOLKIT. (Fx_popup_menu): Add USE_X_TOOLKIT conditional around new decls. (string_width): New function. (event_is_in_menu_item, map_event_to_object): Likewise. (set_menu_items, free_menu_items, popup_selection_callback): Likewise. (popup_down_callback, free_menubar_widget_value_tree): Likewise. (update_one_frame_psheets, set_frame_menubar): Likewise. (Fx_popup_menu, xmenu_show): Handle USE_X_TOOLKIT. (dispatch_dummy_expose): New function. (XMenu_xpos, XMenu_ypos): Change the values of the constant assignment. (xmenu_show): Change the way to make the menubar to redraw itself by generating a dummy expose event.
* Comment change.Paul Reilly1994-01-151-1/+1
|
* Include <config.h> instead of "config.h".Roland McGrath1993-09-101-1/+1
|
* (Fx_popup_menu): Adjust coords so they are relative to the inner window.Richard M. Stallman1993-08-141-0/+28
|
* (xmenu_show): Store 0 in *ERROR at the beginning.Richard M. Stallman1993-06-151-1/+2
| | | | (Fx_popup_menu): Call keymap_panes right in one-keymap case.
* (Fx_popup_menu): Error if we don't get a window or a frame somehow.Richard M. Stallman1993-06-051-0/+4
|
* * sysdep.c (sys_siglist): Comment out #endif trailer.Jim Blandy1993-05-291-1/+1
| | | | | * xmenu.c (TRUE, FALSE): Same. * xterm.c (dumprectangle): Same.
* Updated copyright years.Jim Blandy1993-05-221-1/+1
|
* (Fx_popup_menu): Add a vector of prefix keys for the panes.Richard M. Stallman1993-05-121-14/+40
| | | | | | (keymap_panes): Allocate that vector. (single_keymap_panes): Fill in that vector. (xmenu_show): Return a list of events, not just one event.
* Since Qmenu_enable is used by non-X-specific code, it shouldn't beJim Blandy1993-04-101-4/+1
| | | | | | | | defined in an X-only source file. * xmenu.c (Qmenu_enable): Definition moved... (syms_of_xmenu): ... along with initialization ... * keyboard.c (Qmenu_enable): ... to here ... (syms_of_keyboard): ... and here.
* Put interrupt input blocking in a separate file from xterm.h.Jim Blandy1993-03-311-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This isn't specific to X, and it allows us to avoid #including xterm.h in files that don't really have anything to do with X. * blockinput.h: New file. * xterm.h (BLOCK_INPUT, UNBLOCK_INPUT, TOTALLY_UNBLOCK_INPUT, UNBLOCK_INPUT_RESIGNAL): These are now in blockinput.h. (x_input_blocked, x_pending_input): Deleted; there are analogs in blockinput.h called interrupt_input_blocked and interrupt_input_pending. * keyboard.c (interrupt_input_blocked, interrupt_input_pending): New variables, used by the macros in blockinput.h. * xterm.c: #include blockinput.h. (x_input_blocked, x_pending_input): Deleted. (XTread_socket): Test and set interrupt_input_blocked and interrupt_input_pending instead of the old variables. * alloc.c, xfaces.c, xfns.c, xmenu.c, xselect.c, keymap.c: #include blockinput.h. * eval.c: #include blockinput.h instead of xterm.h. * keyboard.c: #include blockinput.h. (input_poll_signal): Just test interrupt_input_blocked, instead of testing HAVE_X_WINDOWS and x_input_blocked. Block the processing of interrupt input while we're manipulating the malloc heap. * alloc.c: (xfree): New function, to make it easy to free things safely. (xmalloc, xrealloc): Block X input while doing the deed. (VALIDATE_LISP_STORAGE, gc_sweep, compact_strings): Use xfree instead of free. (uninterrupt_malloc): New function, to install input-blocking hooks into the GNU malloc routines. * emacs.c [not SYSTEM_MALLOC] (main): Call uninterrupt_malloc on startup. * alloc.c: (make_interval, make_float, Fcons, Fmake_vector, Fmake_symbol, Fmake_marker, make_uninit_string, Fgarbage_collect): Use xmalloc instead of malloc; don't bother to check if out of memory here. (Fgarbage_collect): Call xrealloc instead of realloc. * buffer.c: Use xmalloc and xfree instead of malloc and free; don't bother to check if out of memory here. (Fget_buffer_create): Put BLOCK_INPUT/UNBLOCK_INPUT pair around calls to ralloc routines. * insdel.c: Same. * lisp.h (xfree): New extern declaration. * xfaces.c (xfree): Don't #define this to be free; use the definition in alloc.c. * dispnew.c, doc.c, doprnt.c, fileio.c, lread.c, term.c, xfns.c, xmenu.c, xterm.c: Use xfree instead of free. * hftctl.c: Use xfree and xmalloc instead of free and malloc. * keymap.c (current_minor_maps): BLOCK_INPUT while calling realloc and malloc. * search.c: Since the regexp routines can malloc, BLOCK_INPUT while runing them. #include blockinput.h. * sysdep.c: #include blockinput.h. Call xfree and xmalloc instead of free and malloc. BLOCK_INPUT around routines which we know will call malloc. ymakefile (keyboard.o, keymap.o, search.o, sysdep.o, xfaces.o, xfns.o, xmenu.o, xterm.o, xselect.o, alloc.o, eval.o): Note that these depend on blockinput.h.
* (xmenu_show): Do BLOCK_INPUT; unblock just before returning.Richard M. Stallman1993-03-161-0/+5
|
* (list_of_items): Allow strings among the alist items;Richard M. Stallman1993-03-151-21/+22
| | | | | | they make nonselectable lines. (single_keymap_panes): When storing in ENABLES, check def before enabled.
* (xmenu_show): New arg enable_list.Richard M. Stallman1993-03-121-24/+48
| | | | | | | | (keymap_panes): New arg enables (single_keymap_panes): New arg enables. Fill in its contents. (list_of_panes, list_of_items): New arg enables. Fill in contents. (Fx_popup_menu): Pass enable and enable_list args. (single_keymap_panes): Set enable flag to -1 if cmd definition is nil.