$window-mode-line - Window mode line position
$window-scroll-bar - Window scroll bar (or separator) position
$window-mode-line integer
1 <= integer <= $screen-depth - 2
$window-scroll-bar integer
0 <= integer <= $screen-width - 1
$window-mode-line stores the screen line of the current windows mode-line, where screen lines are counted from 0 at the top of the screen. Often used in conjunction with set-cursor-to-mouse(2) and $mouse-y(5) to add more complex mouse functionality.
$window-scroll-bar stores the screen position of the right-hand horizontal window separator line or scroll-bar (see split-window-horizontally(2) and $scroll-bar(5)). A value of greater than $screen-width(5) indicates that there is no right-hand separator column or scroll bar present. Often used in conjunction with $mouse-x(5).
In the following example the position of the mouse is checked to see if it is on the mode line of the window, if so then a different action is taken.
set-cursor-to-mouse ; If we are on the mode line then interpret position of ; the cursor on line to control the screen. !if &equal $window-mode-line $mouse-y !if &less $mouse-x "2" menu-main ; Inform buffer to pop up menu. !elif &equal $mouse-x "2" delete-window !elif &equal $mouse-x "3" delete-other-windows !elif &equal $mouse-x "4" backward-page !elif &equal $mouse-x "5" forward-page !elif &equal $mouse-x "6" recenter !elif &equal $mouse-x "7" undo !endif !else ..... !endif
$mode-line(5), $mouse-x(5), $mouse-y(5), $scroll-bar(5), $mouse-pos(5), set-cursor-to-mouse(2), split-window-horizontally(2).
(c) Copyright JASSPA 1999
Last Modified: 1998/07/28
Generated On: 1999/12/01