Class Win32Window
Inherits from
-
(base class)Window
Constructors
Name | Description |
---|---|
this
|
Fields
Name | Type | Description |
---|---|---|
useOpengl
|
bool |
|
_caption
|
dstring |
|
_cursorCache
|
void*[ushort] |
|
_cursorType
|
uint |
|
_drawbuf
|
Win32ColorDrawBuf |
|
_flags
|
uint |
|
_hwnd
|
void* |
|
_icon
|
void* |
|
_platform
|
Win32Platform |
|
PERFORMANCE_LOGGING_THRESHOLD_MS
|
immutable(int) |
|
_keyFlags
|
uint |
|
_lbutton
|
ButtonDetails |
|
_mbutton
|
ButtonDetails |
|
_rbutton
|
ButtonDetails |
|
_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 |
---|---|---|
windowCaption
[get]
|
dstring |
returns window caption |
windowCaption
[set]
|
dstring |
sets window caption
|
windowIcon
[set]
|
Ref!(dlangui.graphics.drawbuf.DrawBuf) |
sets window icon |
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 |
Methods
Name | Description |
---|---|
close
|
close window
|
getDrawBuf
|
|
invalidate
|
request window redraw |
loadCursor
|
|
onCreate
|
|
onDestroy
|
|
onKey
|
|
onPaint
|
|
onSetCursorType
|
|
postEvent
|
post event to handle in UI thread (this method can be used from background thread)
|
scheduleAnimation
|
after drawing, call to schedule redraw if animation is active |
show
|
|
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
|
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) |
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
|
|
removePopup
|
remove popup
|
requestLayout
|
requests layout for main widget and popups
|
setFocus
|
change focus to widget |
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).
|
setCursorType
|
sets cursor type for window |
updateKeyFlags
|
|
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
|
Authors
Vadim Lopatin, coolreader.org@gmail.com
Copyright
Vadim Lopatin, 2014
License
Boost License 1.0