Lugaru's Epsilon
Programmer's
Editor 14.04

Context:
Epsilon User's Manual and Reference
   Primitives and EEL Subroutines
      . . .
      Control Primitives
         Control Flow
         Character Types
         Examining Strings
         . . .
         Help Subroutines
      Input Primitives
         Keys
         The Mouse
         Window Events
         Completion Subroutines
         Other Input Functions
         . . .
      Defining Language Modes
         Language-specific Subroutines

Previous   Up    Next
Mouse Panning  Primitives and EEL Subroutines   Completion Subroutines


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

Window Events

When an EEL function calls getkey( ) to retrieve the next key, it sometimes receives a key code that doesn't correspond to any actual key, but represents some other kind of input event. Mouse keys (see The Mouse) are one example of this. This section describes the other key codes Epsilon uses for input events. These keys only occur in the Windows version.

The WIN_MENU_SELECT key indicates that the user selected an item from a menu or the tool bar. Epsilon sets the variable menu_command to the name of the selected command whenever it returns this key.

The WIN_DRAG_DROP key indicates that the user has just dropped a file on one of Epsilon's windows, or that Epsilon has received a DDE message from another program. See the description of the drag_drop_result( ) primitive in Window System Primitives.

The WIN_EXIT key indicates that the user has tried to close Epsilon, by clicking on the close box, for example.

The WIN_HELP_REQUEST key indicates that the user has just pushed a button in Epsilon's help file to set a particular variable or run a command. Epsilon fills the menu_command variable with the message from the help system.

The GETFOCUS and LOSEFOCUS keys indicate that a particular screen has gained or lost the focus. These set mouse_screen just like mouse keys. (See The Mouse.)

The WIN_RESIZE key indicates that Epsilon has resized a screen. Sometimes Epsilon will resize the screen without returning this key.

The WIN_VERT_SCROLL key indicates that Epsilon has scrolled a window. Epsilon doesn't normally return keys for these events. Instead, Epsilon calls the EEL subroutine scrollbar_handler( ) from within the wait_for_key( ) function, passing it information on which scroll bar was clicked, which part of the scroll bar was selected, and so forth.

Epsilon only recognizes user attempts to scroll by clicking on the scroll bar, or to resize the window, when it waits for a key in a recursive edit level. When an EEL command requests a key, Epsilon normally ignores attempts to scroll, and postpones acting on resize attempts.

An EEL command can set the permit_window_keys variable to allow these things to happen immediately, and possibly redraw the screen. Bits in the variable control these activities: set the PERMIT_SCROLL_KEY bit to permit immediate scrolling, and set PERMIT_RESIZE_KEY to permit resizing. Setting PERMIT_SCROLL_KEY also makes Epsilon return the WIN_VERT_SCROLL key shortly after scrolling. Setting the PERMIT_WHEEL_KEY bit tells Epsilon to generate a WIN_WHEEL_KEY key event after scrolling due to a wheel roll on a Microsoft IntelliMouse.

The WIN_BUTTON key indicates that the user has clicked on a button in a dialog box, or selected the button via the keyboard. By default, Epsilon translates many buttons to standard keys like Ctrl-m. An EEL program can set the variable return_raw_buttons before displaying a dialog to disable this translation and instead receive WIN_BUTTON keys for each button pressed. For other buttons, and for check boxes and certain other dialog events, Epsilon always enqueues a WIN_BUTTON key. For each of these input events, it sets the key_is_button variable to a distinct value.

Epsilon supports up to three buttons on a mouse directly, with distinct key codes like MOUSE_CENTER_DN (plus wheel events). If Epsilon for X11 receives messages about additional buttons, it returns them using the WIN_BUTTON key code, with key_is_button set to a unique value for that button.



Previous   Up    Next
Mouse Panning  Primitives and EEL Subroutines   Completion Subroutines


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