comparison lisp/term/w32-win.el @ 15136:6a1b4fcbb216

(win32-handle-scroll-bar-event): New function.
author Geoff Voelker <voelker@cs.washington.edu>
date Fri, 03 May 1996 18:26:22 +0000
parents 1f316fa0e840
children f7cdb1d402cc
comparison
equal deleted inserted replaced
15135:72a1f82a6748 15136:6a1b4fcbb216
75 (require 'scroll-bar) 75 (require 'scroll-bar)
76 (require 'faces) 76 (require 'faces)
77 (require 'select) 77 (require 'select)
78 (require 'menu-bar) 78 (require 'menu-bar)
79 79
80 ;; Disable until scrollbars are fully functional 80 ;; Because Windows scrollbars look and act quite differently compared
81 (scroll-bar-mode nil) 81 ;; with the standard X scroll-bars, we don't try to use the normal
82 ;; scroll bar routines.
83
84 (defun win32-handle-scroll-bar-event (event)
85 "Handle Win32 scroll bar events to do normal Window style scrolling."
86 (interactive "e")
87 (let* ((position (event-start event))
88 (window (nth 0 position))
89 (portion-whole (nth 2 position))
90 (bar-part (nth 4 position)))
91 (save-excursion
92 (select-window window)
93 (cond
94 ((eq bar-part 'up-arrow)
95 (scroll-down 1))
96 ((eq bar-part 'above-handle)
97 (scroll-down))
98 ((eq bar-part 'handle)
99 (scroll-bar-drag-1 event))
100 ((eq bar-part 'below-handle)
101 (scroll-up))
102 ((eq bar-part 'down-arrow)
103 (scroll-up 1))
104 ))))
105
106 ;; The following definition is used for debugging.
107 ;(defun win32-handle-scroll-bar-event (event) (interactive "e") (princ event))
108
109 (global-set-key [vertical-scroll-bar mouse-1] 'win32-handle-scroll-bar-event)
110
111 ;; (scroll-bar-mode nil)
82 112
83 (defvar x-invocation-args) 113 (defvar x-invocation-args)
84 114
85 (defvar x-command-line-resources nil) 115 (defvar x-command-line-resources nil)
86 116