dlangui.core.events

DLANGUI library.

This module contains dlangui event types declarations.



Synopsis:
import dlangui.core.events;



License:
Boost License 1.0

Authors:
Vadim Lopatin, coolreader.org@gmail.com

class Action;
UI action

this(int id, uint keyCode, uint keyFlags = 0);
action with accelerator, w/o label

this(int id, dstring label, string iconResourceId = null, uint keyCode = 0, uint keyFlags = 0);
action with label, icon, and accelerator

@property Accelerator[] accelerators();
returs array of accelerators

@property dstring acceleratorText();
returns text description for first accelerator of action; null if no accelerators

bool checkAccelerator(uint keyCode, uint keyFlags);
returns true if accelerator matches provided key code and flags

struct ButtonDetails;
mouse button state details

long _downTs;
Clock.currStdTime() for down event of this button (0 if button is up).

long _upTs;
Clock.currStdTime() for up event of this button (0 if button is still down).

short _downX;
x coordinates of down event

short _downY;
y coordinates of down event

ushort _downFlags;
mouse button flags when down event occured

void down(short x, short y, ushort flags);
update for button down

void up(short x, short y, ushort flags);
update for button up

@property int downDuration();
returns button down state duration in hnsecs (1/10000 of second).

class KeyEvent;
keyboard event

@property KeyAction action();
key action (KeyDown, KeyUp, Text, Repeat)

@property uint keyCode();
key code

@property uint flags();
flags (shift, ctrl, alt...)

@property dstring text();
entered text, for Text action

this(KeyAction action, uint keyCode, uint flags, dstring text = null);
create key event

class ScrollEvent;
slider/scrollbar event

@property void position(int newPosition);
change position in event handler to update slider position

int defaultUpdatePosition();
default update position for actions like PageUp/PageDown, LineUp/LineDown


Page generated by Ddoc. Vadim Lopatin, 2014