$window-mode-line - Window mode line position
$window-scroll-bar - Window scroll bar (or separator) position
1 <= integer <= $frame-depth - 2
0 <= integer <= $frame-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 $frame-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
Copyright (c) 1998-2006 JASSPA
Last Modified: 2002/10/16
Generated On: 2006/10/07