aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeoff Voelker1996-05-03 18:26:22 +0000
committerGeoff Voelker1996-05-03 18:26:22 +0000
commitaf99aa461dd15a85b3fad832fd43e46cf9776d02 (patch)
tree8400b3fc78d9d428c77b13f61af307235b5f1202
parent4e0cd0df0ded9fb4b20ec429ec606d20fba5b7f3 (diff)
downloademacs-af99aa461dd15a85b3fad832fd43e46cf9776d02.tar.gz
emacs-af99aa461dd15a85b3fad832fd43e46cf9776d02.zip
(win32-handle-scroll-bar-event): New function.
-rw-r--r--lisp/term/w32-win.el34
1 files changed, 32 insertions, 2 deletions
diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el
index b2c6b923a27..305c4ec9265 100644
--- a/lisp/term/w32-win.el
+++ b/lisp/term/w32-win.el
@@ -77,8 +77,38 @@
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