/[emacs]/emacs/lisp/term/w32-win.el
ViewVC logotype

Diff of /emacs/lisp/term/w32-win.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.45 by rms, Mon Dec 24 04:52:30 2001 UTC revision 1.46 by jasonr, Sat Jan 5 00:23:42 2002 UTC
# Line 76  Line 76 
76  (require 'faces)  (require 'faces)
77  (require 'select)  (require 'select)
78  (require 'menu-bar)  (require 'menu-bar)
79  (if (fboundp 'new-fontset)  (require 'fontset)
     (require 'fontset))  
80    
81  ;; Because Windows scrollbars look and act quite differently compared  ;; The following definition is used for debugging scroll bar events.
 ;; with the standard X scroll-bars, we don't try to use the normal  
 ;; scroll bar routines.  
   
 (defun w32-handle-scroll-bar-event (event)  
   "Handle W32 scroll bar EVENT to do normal Window style scrolling."  
   (interactive "e")  
   (let ((old-window (selected-window)))  
     (unwind-protect  
         (let* ((position (event-start event))  
                (window (nth 0 position))  
                (portion-whole (nth 2 position))  
                (bar-part (nth 4 position)))  
           (save-excursion  
             (select-window window)  
             (cond  
              ((eq bar-part 'up)  
               (goto-char (window-start window))  
               (scroll-down 1))  
              ((eq bar-part 'above-handle)  
               (scroll-down))  
              ((eq bar-part 'handle)  
               (scroll-bar-maybe-set-window-start event))  
              ((eq bar-part 'below-handle)  
               (scroll-up))  
              ((eq bar-part 'down)  
               (goto-char (window-start window))  
               (scroll-up 1))  
              )))  
       (select-window old-window))))  
   
 ;; The following definition is used for debugging.  
82  ;(defun w32-handle-scroll-bar-event (event) (interactive "e") (princ event))  ;(defun w32-handle-scroll-bar-event (event) (interactive "e") (princ event))
83    
 (global-set-key [vertical-scroll-bar mouse-1] 'w32-handle-scroll-bar-event)  
   
 ;; (scroll-bar-mode nil)  
   
84  (defvar mouse-wheel-scroll-amount 4  (defvar mouse-wheel-scroll-amount 4
85    "*Number of lines to scroll per click of the mouse wheel.")    "*Number of lines to scroll per click of the mouse wheel.")
86    

Legend:
Removed from v.1.45  
changed lines
  Added in v.1.46

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26