Lugaru's Epsilon
Editor 14.00

Epsilon User's Manual and Reference
   Primitives and EEL Subroutines
      Input Primitives
         The Mouse
            Mouse Cursors
            Mouse Subroutines
            The Scroll Bar
            Mouse Panning
         Window Events
         . . .

Previous   Up    Next
Mouse Subroutines  Primitives and EEL Subroutines   Mouse Panning

Epsilon User's Manual and Reference > Primitives and EEL Subroutines > Input Primitives > The Mouse >

The Scroll Bar

user window int display_scroll_bar;
int scroll_bar_line()

The built-in variable display_scroll_bar controls whether or not the current window's right border contains a scroll bar. Set it to zero to turn off the scroll bar, or to any positive number to display the bar. If a window has no right border, or has room for fewer than two lines of text, Epsilon won't display a scroll bar. Although the EEL functions that come with Epsilon don't support clicking on a scroll bar on the left border of a window, Epsilon will display one if display_scroll_bar is negative. Any positive value produces the usual right-border scroll bar. (This variable, and the following primitive, have no effect in Epsilon for Windows, which handles scrolling internally.)

The scroll_bar_line( ) primitive returns the position of the scroll box diamond on the scroll bar. A value of one indicates the line just below the arrow at the top of the scroll bar. Epsilon always positions this arrow adjacent to the first line of text in the window, so a return value of n indicates the scroll box lies adjacent to text line n in the window (numbered from zero).

scroll_by_wheel(int clicks, int per_click)

When you use a wheeled mouse like the Microsoft IntelliMouse, Epsilon calls the scroll_by_wheel( ) subroutine whenever you roll its wheel. (See the next section for information on what happens when you click the wheel, not roll it.) Epsilon provides the number of clicks of the wheel since the last time this function was called (which may be positive or negative) and the control panel setting that indicates the number of lines Epsilon should scroll on each click.

After calling this subroutine, Epsilon can then optionally generate a WIN_WHEEL_KEY key event. See Window Events.

Previous   Up    Next
Mouse Subroutines  Primitives and EEL Subroutines   Mouse Panning

Lugaru Epsilon Programmer's Editor 14.00 manual. Copyright (C) 1984, 2020 by Lugaru Software Ltd. All rights reserved.