;ELC ;;; compiled by kwzh@hal.gnu.ai.mit.edu on Wed May 31 17:46:33 1995 ;;; from file /gd/gnu/emacs/19.0/lisp/scroll-bar.el ;;; emacs version 19.28.93.1. ;;; bytecomp version FSF 2.10 ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19.28.90"))) (error "`scroll-bar.el' was compiled for Emacs 19.29 or later")) (require (quote mouse)) #@259 Given a scroll bar event EVENT, return the scroll bar position as a ratio. The value is a cons cell (PORTION . WHOLE) containing two integers whose ratio gives the event's vertical position in the scroll bar, with 0 referring to the top and 1 to the bottom. (defalias 'scroll-bar-event-ratio #[(event) "À 8‡" [2 event] 2 (#$ . 507)]) #@372 Given a pair (NUM . DENOM) and WHOLE, return (/ (* NUM WHOLE) DENOM). This is handy for scaling a position on a scroll bar into real units, like buffer positions. If SCROLL-BAR-POS is the (PORTION . WHOLE) pair from a scroll bar event, then (scroll-bar-scale SCROLL-BAR-POS (buffer-size)) is the position in the current buffer corresponding to that scroll bar position. (defalias 'scroll-bar-scale #[(num-denom whole) "ÀÁ\n@! _\nA¥!‡" [truncate float num-denom whole] 3 (#$ . 848)]) #@249 Toggle display of vertical scroll bars on each frame. This command applies to all frames that exist and frames to be created in the future. With a numeric argument, if the argument is negative, turn off scroll bars; otherwise, turn on scroll bars. (defalias 'scroll-bar-mode #[(flag) "ƒÁ! ž‰ƒ\fA‚Å)„#?‚,§?†,ÇYÈÉÊ\"ˆË ‰\f…TÍ\f@ÂBÎBD\"ˆ\fA‰\f„;Ï*‡" [flag prefix-numeric-value vertical-scroll-bars default-frame-alist assq t scroll-bar-mode 0 mapcar #[(param-name) " ž‰:ƒ\n ¡‚ B B‰)‡" [param-name default-frame-alist parameter scroll-bar-mode] 3] (vertical-scroll-bars horizontal-scroll-bars) frame-list frames modify-frame-parameters horizontal-scroll-bars nil] 6 (#$ . 1339) "P"]) #@118 Set the window start according to where the scroll bar is dragged. EVENT should be a scroll bar click or drag event. (defalias 'scroll-bar-set-window-start #[(event) "Á8:ƒ Á‚Â8)‰@Á 8ŠÆ\f!qˆŠeÇ deZ\"\\bˆÈyˆÉ\f`\"-‡" [event 2 1 end-position window portion-whole window-buffer scroll-bar-scale 0 set-window-start] 6 (#$ . 2067) "e"]) (defalias 'scroll-bar-drag-1 #[(event) "‰A@)‰@à 8ŠÅ\n!qˆeÆ\fdeZ\"\\bˆÇyˆÈ\n`\",‡" [event start-position window 2 portion-whole window-buffer scroll-bar-scale 0 set-window-start] 6]) #@133 Scroll the window by dragging the scroll bar slider. If you click outside the slider, the window scrolls to bring the slider there. (defalias 'scroll-bar-drag #[(event) "ÀÂ\f„\n`ÀÅ!ˆÇ ˆÈÂ!+‡" [nil done 0 echo-keystrokes point-before-scroll scroll-bar-drag-1 event (lambda nil (track-mouse (byte-code "?…&Á ‰¢Ã=ƒÁ \n¢Ä=ƒ Å\n!ˆ‚Ɖ‚‡" [done read-event event mouse-movement scroll-bar-movement scroll-bar-drag-1 t] 3))) sit-for] 2 (#$ . 2602) "e"]) #@112 Scroll the window's top line down to the location of the scroll bar click. EVENT should be a scroll bar click. (defalias 'scroll-bar-scroll-down #[(event) "À ÂŽ Ä 8:ƒÄ‚Å 8)‰@Ä8É\nË!ˆ)\n„3`\nÉ\nÌÍÎ S\"!.‡" [selected-window old-selected-window ((select-window old-selected-window)) event 2 1 end-position window portion-whole nil point-before-scroll select-window scroll-down scroll-bar-scale window-height] 5 (#$ . 3073) "e"]) #@108 Scroll the line next to the scroll bar click to the top of the window. EVENT should be a scroll bar click. (defalias 'scroll-bar-scroll-up #[(event) "À ÂŽ Ä 8:ƒÄ‚Å 8)‰@Ä8É\nË!ˆ)\n„3`\nÉ\nÌÍÎ S\"!.‡" [selected-window old-selected-window ((select-window old-selected-window)) event 2 1 end-position window portion-whole nil point-before-scroll select-window scroll-up scroll-bar-scale window-height] 5 (#$ . 3530) "e"]) (byte-code "ÀÁÂ\"ˆÀÃÂ\"ˆÀÄÅ\"ˆÀÆÇ\"ˆÀÈÇ\"ˆÉÊ!‡" [global-set-key [vertical-scroll-bar mouse-1] scroll-bar-scroll-up [vertical-scroll-bar drag-mouse-1] [vertical-scroll-bar down-mouse-2] scroll-bar-drag [vertical-scroll-bar mouse-3] scroll-bar-scroll-down [vertical-scroll-bar drag-mouse-3] provide scroll-bar] 3)