Module dlangui.core.events
This module contains dlangui
event types declarations.
Event types: MouseEvent
, KeyEvent
, ScrollEvent
.
Action
and Accelerator
.
Functions
Name | Description |
---|---|
actionIdToName
|
converts id to name for actions registered by registerActionEnum , returns null if not found
|
actionNameToId
|
converts action name id for for actions registered by registerActionEnum , returns 0 if not found
|
clearActionAcceleratorsMap
|
clear global action accelerators map |
findActionAccelerators
|
lookup accelerators override for action by name (e.g. "EditorActions.ToggleLineComment") |
findActionAccelerators
|
lookup accelerators override for action by id |
keyName
|
Converts KeyCode enum value to human readable key name
|
mouseButtonToFlag
|
converts MouseButton to MouseFlag
|
parseKeyName
|
Converts key name to KeyCode enum value
For unknown key code, returns 0
|
registerActionEnum
|
register enum items as action names and ids for lookup by actionIdToName and actionNameToId functions (names will be generated as "EnumName.EnumItemName")
|
setActionAccelerators
|
overrides accelerators for action by id
|
Interfaces
Name | Description |
---|---|
CustomEventTarget
|
Classes
Name | Description |
---|---|
Action
|
UI action |
CustomEvent
|
base class for custom events |
KeyEvent
|
Keyboard event |
MouseEvent
|
Mouse event |
RunnableEvent
|
operation to execute (usually sent from background threads to run some code in UI thread)
|
ScrollEvent
|
Slider/scrollbar event |
Structs
Name | Description |
---|---|
Accelerator
|
Keyboard accelerator (key + modifiers) |
ActionList
|
List of Actions, for looking up Action by key
|
ActionMap
|
Map of Accelerator to Action
|
ActionState
|
use to for requesting of action state (to enable/disable, hide, get check status, etc) |
ButtonDetails
|
Mouse button state details for MouseEvent
|
Enums
Name | Description |
---|---|
KeyAction
|
Keyboard actions for KeyEvent
|
KeyCode
|
Key code constants for KeyEvent
|
KeyFlag
|
Keyboard flags for KeyEvent
|
MouseAction
|
Mouse action codes for MouseEvent
|
MouseButton
|
Mouse button codes for MouseEvent
|
MouseFlag
|
Mouse flag bits (mouse buttons and keyboard modifiers) for MouseEvent
|
ScrollAction
|
Scroll bar / slider action codes for ScrollEvent .
|
Global variables
Name | Type | Description |
---|---|---|
ACTION_SEPARATOR
|
Action
|
|
ACTION_STATE_DISABLE
|
const(ActionState)
|
|
ACTION_STATE_ENABLED
|
const(ActionState)
|
|
ACTION_STATE_INVISIBLE
|
const(ActionState)
|
|
CUSTOM_RUNNABLE
|
immutable(int)
|
|
SEPARATOR_ACTION_ID
|
const(int)
|
use this ID for menu and toolbar separators |
Authors
Vadim Lopatin, coolreader.org@gmail.com
Copyright
Vadim Lopatin, 2014
License
Boost License 1.0