Class Window
Window
abstraction layer. Widgets can be shown only inside window.
Inherits from
-
(base class)Object
Constructors
Name | Description |
---|---|
this
|
Fields
Name | Type | Description |
---|---|---|
PERFORMANCE_LOGGING_THRESHOLD_MS
|
immutable(int) |
|
_backgroundColor
|
uint |
|
_dx
|
int |
|
_dy
|
int |
|
_eventList
|
EventList |
|
_focusedWidget
|
Widget |
|
_keyboardModifiers
|
uint |
|
_mainWidget
|
Widget |
|
_mouseCaptureButtons
|
ushort |
|
_mouseCaptureFocusedOut
|
bool |
|
_mouseCaptureFocusedOutTrackMovements
|
bool |
does current capture widget want to receive move events even if pointer left it |
_mouseCaptureWidget
|
Widget |
widget which tracks all events after processed ButtonDown |
_mouseTrackingWidgets
|
Widget[] |
widget which tracks Move events |
_popups
|
PopupWidget[] |
Properties
Name | Type | Description |
---|---|---|
backgroundColor
[get]
|
uint |
|
backgroundColor
[set]
|
uint |
|
focusedWidget
[get]
|
Widget |
returns current focused widget |
height
[get]
|
int |
|
keyboardModifiers
[get]
|
uint |
|
mainWidget
[get]
|
Widget |
|
mainWidget
[set]
|
Widget |
|
width
[get]
|
int |
|
windowCaption
[set]
|
dstring |
sets window caption
|
windowCaption
[get]
|
dstring |
returns window caption |
windowIcon
[set]
|
Ref!(dlangui.graphics.drawbuf.DrawBuf) |
sets window icon
|
Methods
Name | Description |
---|---|
cancelEvent
|
remove event from queue by unique id if not yet dispatched (this method can be used from background thread) |
checkUpdateNeeded
|
checks content widgets for necessary redraw and/or layout
|
close
|
close window
|
dispatchAction
|
dispatch action to main widget
|
dispatchCustomEvent
|
dispatch custom event
|
dispatchKeyEvent
|
dispatch keyboard event
|
dispatchMouseEvent
|
dispatch mouse event to window content widgets
|
executeInUiThread
|
post task to execute in UI thread (this method can be used from background thread) |
handlePostedEvent
|
remove event from queue by unique id if not yet dispatched and dispatch it |
handlePostedEvents
|
handle all events from queue, if any (call from UI thread only) |
invalidate
|
request window redraw |
isChild
|
returns true if widget is child of either main widget or one of popups |
isMouseCaptured
|
returns true if mouse is currently captured |
layout
|
|
measure
|
|
onDraw
|
|
onResize
|
|
postEvent
|
post event to handle in UI thread (this method can be used from background thread)
|
removePopup
|
remove popup
|
requestLayout
|
requests layout for main widget and popups
|
scheduleAnimation
|
after drawing, call to schedule redraw if animation is active |
setFocus
|
change focus to widget |
show
|
|
showMessageBox
|
Show message box with specified title and message
|
showPopup
|
show new popup
|
update
|
requests update for window (unless force is true, update will be performed only if layout , redraw or animation is required).
|
checkUpdateNeeded
|
checks content widgets for necessary redraw and/or layout
|
clearMouseCapture
|
|
dispatchCancel
|
|
dispatchKeyEvent
|
dispatch key event to widgets which have wantsKeyTracking == true
|
dispatchMouseEvent
|
|
sendAndCheckOverride
|
|
setCaptureWidget
|
|
setCursorType
|
sets cursor type for window |
Authors
Vadim Lopatin, coolreader.org@gmail.com
Copyright
Vadim Lopatin, 2014
License
Boost License 1.0