comparison src/toolbar.c @ 3025:facf3239ba30

[xemacs-hg @ 2005-10-25 11:16:19 by ben] rename new->new_, convert 'foo to `foo' EmacsFrame.c, ExternalClient.c, ExternalShell.c, chartab.c, cmdloop.c, compiler.h, console.c, database.c, device-msw.c, device-x.c, device.c, doc.c, dragdrop.c, eval.c, event-msw.c, event-stream.c, events.c, extents.c, file-coding.c, fns.c, frame-tty.c, frame.c, gpmevent.c, gutter.c, hash.c, imgproc.c, indent.c, keymap.c, lisp-union.h, macros.c, malloc.c, marker.c, menubar-x.c, menubar.c, mule-charset.c, number.c, process.c, profile.h, ralloc.c, redisplay.c, select-common.h, select.c, syntax.c, sysfile.h, sysproc.h, systime.h, syswindows.h, toolbar.c, tooltalk.c, tparam.c, unexaix.c, unexalpha.c, unexconvex.c, unexec.c, unexhp9k800.c, unexmips.c, unicode.c, window.c: new -> new_. 'foo -> `foo'. lwlib-internal.h: redo assert macros to follow lisp.h and not trigger warnings. lwlib.c, xlwtabs.c: new -> new_.
author ben
date Tue, 25 Oct 2005 11:16:49 +0000
parents 1e7cc382eb16
children d9ca850d40de 3742ea8250b5
comparison
equal deleted inserted replaced
3024:b7f26b2f78bd 3025:facf3239ba30
242 RETURN_NOT_REACHED (TOP_TOOLBAR); 242 RETURN_NOT_REACHED (TOP_TOOLBAR);
243 } 243 }
244 244
245 DEFUN ("set-default-toolbar-position", Fset_default_toolbar_position, 1, 1, 0, /* 245 DEFUN ("set-default-toolbar-position", Fset_default_toolbar_position, 1, 1, 0, /*
246 Set the position that the `default-toolbar' will be displayed at. 246 Set the position that the `default-toolbar' will be displayed at.
247 Valid positions are 'top, 'bottom, 'left and 'right. 247 Valid positions are `top', `bottom', `left' and `right'.
248 See `default-toolbar-position'. 248 See `default-toolbar-position'.
249 */ 249 */
250 (position)) 250 (position))
251 { 251 {
252 enum toolbar_pos cur = decode_toolbar_position (Vdefault_toolbar_position); 252 enum toolbar_pos cur = decode_toolbar_position (Vdefault_toolbar_position);
253 enum toolbar_pos new = decode_toolbar_position (position); 253 enum toolbar_pos new_ = decode_toolbar_position (position);
254 254
255 if (cur != new) 255 if (cur != new_)
256 { 256 {
257 /* The following calls will automatically cause the dirty 257 /* The following calls will automatically cause the dirty
258 flags to be set; we delay frame size changes to avoid 258 flags to be set; we delay frame size changes to avoid
259 lots of frame flickering. */ 259 lots of frame flickering. */
260 int depth = begin_hold_frame_size_changes (); 260 int depth = begin_hold_frame_size_changes ();
261 set_specifier_fallback (Vtoolbar[cur], list1 (Fcons (Qnil, Qnil))); 261 set_specifier_fallback (Vtoolbar[cur], list1 (Fcons (Qnil, Qnil)));
262 set_specifier_fallback (Vtoolbar[new], Vdefault_toolbar); 262 set_specifier_fallback (Vtoolbar[new_], Vdefault_toolbar);
263 set_specifier_fallback (Vtoolbar_size[cur], list1 (Fcons (Qnil, Qzero))); 263 set_specifier_fallback (Vtoolbar_size[cur], list1 (Fcons (Qnil, Qzero)));
264 set_specifier_fallback (Vtoolbar_size[new], 264 set_specifier_fallback (Vtoolbar_size[new_],
265 new == TOP_TOOLBAR || new == BOTTOM_TOOLBAR 265 new_ == TOP_TOOLBAR || new_ == BOTTOM_TOOLBAR
266 ? Vdefault_toolbar_height 266 ? Vdefault_toolbar_height
267 : Vdefault_toolbar_width); 267 : Vdefault_toolbar_width);
268 set_specifier_fallback (Vtoolbar_border_width[cur], 268 set_specifier_fallback (Vtoolbar_border_width[cur],
269 list1 (Fcons (Qnil, Qzero))); 269 list1 (Fcons (Qnil, Qzero)));
270 set_specifier_fallback (Vtoolbar_border_width[new], 270 set_specifier_fallback (Vtoolbar_border_width[new_],
271 Vdefault_toolbar_border_width); 271 Vdefault_toolbar_border_width);
272 set_specifier_fallback (Vtoolbar_visible_p[cur], 272 set_specifier_fallback (Vtoolbar_visible_p[cur],
273 list1 (Fcons (Qnil, Qt))); 273 list1 (Fcons (Qnil, Qt)));
274 set_specifier_fallback (Vtoolbar_visible_p[new], 274 set_specifier_fallback (Vtoolbar_visible_p[new_],
275 Vdefault_toolbar_visible_p); 275 Vdefault_toolbar_visible_p);
276 Vdefault_toolbar_position = position; 276 Vdefault_toolbar_position = position;
277 unbind_to (depth); 277 unbind_to (depth);
278 } 278 }
279 279
1045 or [:style 2d-or-3d :size width-or-height] */ 1045 or [:style 2d-or-3d :size width-or-height] */
1046 1046
1047 DEFUN ("check-toolbar-button-syntax", Fcheck_toolbar_button_syntax, 1, 2, 0, /* 1047 DEFUN ("check-toolbar-button-syntax", Fcheck_toolbar_button_syntax, 1, 2, 0, /*
1048 Verify the syntax of entry BUTTON in a toolbar description list. 1048 Verify the syntax of entry BUTTON in a toolbar description list.
1049 If you want to verify the syntax of a toolbar description list as a 1049 If you want to verify the syntax of a toolbar description list as a
1050 whole, use `check-valid-instantiator' with a specifier type of 'toolbar. 1050 whole, use `check-valid-instantiator' with a specifier type of `toolbar'.
1051 */ 1051 */
1052 (button, noerror)) 1052 (button, noerror))
1053 { 1053 {
1054 Lisp_Object *elt, glyphs, value; 1054 Lisp_Object *elt, glyphs, value;
1055 int len; 1055 int len;
1392 Specifier for a fallback toolbar. 1392 Specifier for a fallback toolbar.
1393 Use `set-specifier' to change this. 1393 Use `set-specifier' to change this.
1394 1394
1395 The position of this toolbar is specified in the function 1395 The position of this toolbar is specified in the function
1396 `default-toolbar-position'. If the corresponding position-specific 1396 `default-toolbar-position'. If the corresponding position-specific
1397 toolbar (e.g. `top-toolbar' if `default-toolbar-position' is 'top) 1397 toolbar (e.g. `top-toolbar' if `default-toolbar-position' is `top')
1398 does not specify a toolbar in a particular domain (usually a window), 1398 does not specify a toolbar in a particular domain (usually a window),
1399 then the value of `default-toolbar' in that domain, if any, will be 1399 then the value of `default-toolbar' in that domain, if any, will be
1400 used instead. 1400 used instead.
1401 1401
1402 Note that the toolbar at any particular position will not be 1402 Note that the toolbar at any particular position will not be
1484 string is displayed in the echo area when the mouse passes over 1484 string is displayed in the echo area when the mouse passes over
1485 the toolbar button. 1485 the toolbar button.
1486 1486
1487 For the other vector formats (specifying blank areas of the toolbar): 1487 For the other vector formats (specifying blank areas of the toolbar):
1488 1488
1489 -- 2D-OR-3D should be one of the symbols '2d or '3d, indicating 1489 -- 2D-OR-3D should be one of the symbols `2d' or `3d', indicating
1490 whether the area is displayed with shadows (giving it a raised, 1490 whether the area is displayed with shadows (giving it a raised,
1491 3-d appearance) or without shadows (giving it a flat appearance). 1491 3-d appearance) or without shadows (giving it a flat appearance).
1492 1492
1493 -- WIDTH-OR-HEIGHT specifies the length, in pixels, of the blank 1493 -- WIDTH-OR-HEIGHT specifies the length, in pixels, of the blank
1494 area. If omitted, it defaults to a device-specific value 1494 area. If omitted, it defaults to a device-specific value
1581 This is a specifier; use `set-specifier' to change it. 1581 This is a specifier; use `set-specifier' to change it.
1582 1582
1583 The position of the default toolbar is specified by the function 1583 The position of the default toolbar is specified by the function
1584 `set-default-toolbar-position'. If the corresponding position-specific 1584 `set-default-toolbar-position'. If the corresponding position-specific
1585 toolbar thickness specifier (e.g. `top-toolbar-height' if 1585 toolbar thickness specifier (e.g. `top-toolbar-height' if
1586 `default-toolbar-position' is 'top) does not specify a thickness in a 1586 `default-toolbar-position' is `top') does not specify a thickness in a
1587 particular domain (a window or a frame), then the value of 1587 particular domain (a window or a frame), then the value of
1588 `default-toolbar-height' or `default-toolbar-width' (depending on the 1588 `default-toolbar-height' or `default-toolbar-width' (depending on the
1589 toolbar orientation) in that domain, if any, will be used instead. 1589 toolbar orientation) in that domain, if any, will be used instead.
1590 1590
1591 Note that `default-toolbar-height' is only used when 1591 Note that `default-toolbar-height' is only used when
1592 `default-toolbar-position' is 'top or 'bottom, and `default-toolbar-width' 1592 `default-toolbar-position' is `top' or `bottom', and `default-toolbar-width'
1593 is only used when `default-toolbar-position' is 'left or 'right. 1593 is only used when `default-toolbar-position' is `left' or `right'.
1594 1594
1595 Note that all of the position-specific toolbar thickness specifiers 1595 Note that all of the position-specific toolbar thickness specifiers
1596 have a fallback value of zero when they do not correspond to the 1596 have a fallback value of zero when they do not correspond to the
1597 default toolbar. Therefore, you will have to set a non-zero thickness 1597 default toolbar. Therefore, you will have to set a non-zero thickness
1598 value if you want a position-specific toolbar to be displayed. 1598 value if you want a position-specific toolbar to be displayed.
1766 This is a specifier; use `set-specifier' to change it. 1766 This is a specifier; use `set-specifier' to change it.
1767 1767
1768 The position of the default toolbar is specified by the function 1768 The position of the default toolbar is specified by the function
1769 `set-default-toolbar-position'. If the corresponding position-specific 1769 `set-default-toolbar-position'. If the corresponding position-specific
1770 toolbar border width specifier (e.g. `top-toolbar-border-width' if 1770 toolbar border width specifier (e.g. `top-toolbar-border-width' if
1771 `default-toolbar-position' is 'top) does not specify a border width in a 1771 `default-toolbar-position' is `top') does not specify a border width in a
1772 particular domain (a window or a frame), then the value of 1772 particular domain (a window or a frame), then the value of
1773 `default-toolbar-border-width' in that domain, if any, will be used 1773 `default-toolbar-border-width' in that domain, if any, will be used
1774 instead. 1774 instead.
1775 1775
1776 Internally, toolbar border width specifiers are instantiated in both 1776 Internally, toolbar border width specifiers are instantiated in both
1880 This is a specifier; use `set-specifier' to change it. 1880 This is a specifier; use `set-specifier' to change it.
1881 1881
1882 The position of the default toolbar is specified by the function 1882 The position of the default toolbar is specified by the function
1883 `set-default-toolbar-position'. If the corresponding position-specific 1883 `set-default-toolbar-position'. If the corresponding position-specific
1884 toolbar visibility specifier (e.g. `top-toolbar-visible-p' if 1884 toolbar visibility specifier (e.g. `top-toolbar-visible-p' if
1885 `default-toolbar-position' is 'top) does not specify a visible-p value 1885 `default-toolbar-position' is `top') does not specify a visible-p value
1886 in a particular domain (a window or a frame), then the value of 1886 in a particular domain (a window or a frame), then the value of
1887 `default-toolbar-visible-p' in that domain, if any, will be used 1887 `default-toolbar-visible-p' in that domain, if any, will be used
1888 instead. 1888 instead.
1889 1889
1890 Both window domains and frame domains are used internally, for 1890 Both window domains and frame domains are used internally, for