Class SDLWindow

Inherits from

Constructors

Name Description
this

Fields

Name Type Description
lastFlags ushort
lastx short
lasty short
_drawbuf DrawBuf
_keyFlags uint
_lastRedrawEventCode uint
_platform SDLPlatform
_renderer derelict.sdl2.types.SDL_Renderer*
_texture derelict.sdl2.types.SDL_Texture*
_txh int
_txw int
_win derelict.sdl2.types.SDL_Window*
PERFORMANCE_LOGGING_THRESHOLD_MS immutable(int)
_caption dstring
_cursorMap derelict.sdl2.types.SDL_Cursor*[uint]
_flags uint
_lastCursorType uint
_lbutton ButtonDetails
_mbutton ButtonDetails
_rbutton ButtonDetails
_actionsUpdateRequested bool
_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
_onCanClose bool delegate()
_onClose void delegate()
_onFilesDropped void delegate(string[])
_popups PopupWidget[]
_timerQueue dlangui.platforms.common.platform.Window.TimerQueue
_tooltip Window.TooltipInfo

Properties

Name Type Description
windowCaption [set] dstring sets window caption
windowCaption [get] dstring returns window caption
windowIcon [set] Ref!(dlangui.graphics.drawbuf.DrawBuf) sets window icon
windowId [get] uint
actionsUpdateRequested [get] bool
backgroundColor [get] uint
backgroundColor [set] uint
focusedWidget [get] Widget returns current focused widget
height [get] int
keyboardModifiers [get] uint
mainWidget [set] Widget
mainWidget [get] Widget
onCanClose [get] bool delegate() get handler for closing of app (it must return true to allow immediate close, false to cancel close or close window later)
onCanClose [set] Window set handler for closing of app (it must return true to allow immediate close, false to cancel close or close window later)
onClose [set] Window set handler for closing of window
onClose [get] void delegate() get handler for closing of window
onFilesDropped [get] void delegate(string[]) get handler for files dropped to app window
onFilesDropped [set] Window set handler for files dropped to app window
width [get] int

Methods

Name Description
close close window
convertKeyCode
convertKeyFlags
convertMouseButton
convertMouseFlags
create
doResize
fixSize
handleTimer
invalidate request window redraw
postEvent post event to handle in UI thread (this method can be used from background thread)
processExpose
processKeyEvent
processMouseEvent
processRedrawEvent
processTextInput
redraw
scheduleAnimation after drawing, call to schedule redraw if animation is active
show show window
cancelEvent remove event from queue by unique id if not yet dispatched (this method can be used from background thread)
cancelTimer cancel previously scheduled widget timer (for timerId pass value returned from setTimer)
checkUpdateNeeded checks content widgets for necessary redraw and/or layout
createAsyncSocket Creates async socket
dispatchAction dispatch action to main widget
dispatchActionStateRequest dispatch action to main widget
dispatchCustomEvent dispatch custom event
dispatchKeyEvent dispatch keyboard event
dispatchMouseEvent dispatch mouse event to window content widgets
dispatchThemeChanged handle theme change: e.g. reload some themed resources
executeInUiThread post task to execute in UI thread (this method can be used from background thread)
handleCanClose calls onCanClose handler if set to check if system may close window
handleDroppedFiles called when user dragged file(s) to application window
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)
hideTooltip hide tooltip if shown and cancel tooltip timer if set
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
modalPopup returns last modal popup widget, or null if no modal popups opened
onDraw
onResize
removePopup remove popup
requestActionsUpdate set action update request flag, will be cleared after redraw
requestLayout requests layout for main widget and popups
scheduleTooltip schedule tooltip for widget be shown with specified delay
setFocus change focus to widget
setTimer set timer for destination widget - destination.onTimer() will be called after interval expiration; returns timer id
showInputBox
showInputBox
showMessageBox Show message box with specified title and message (title and message as UIString)
showMessageBox Show message box with specified title and message (title and message as dstring)
showPopup show new popup
showTooltip show tooltip immediately
update requests update for window (unless force is true, update will be performed only if layout, redraw or animation is required).
createContext
scheduleSystemTimer schedule timer for interval in milliseconds - call window.onTimer when finished
setCursorType sets cursor type for window
checkUpdateNeeded checks content widgets for necessary redraw and/or layout
clearMouseCapture
dispatchCancel
dispatchKeyEvent dispatch key event to widgets which have wantsKeyTracking == true
dispatchMouseEvent
dispatchWidgetUpdateActionStateRecursive calls update actions recursively
dispatchWidgetUpdateActionStateRecursive update action states
onTimer system timer interval expired - notify queue
sendAndCheckOverride
setCaptureWidget

Inner structs

Name Description
TooltipInfo

Authors

Vadim Lopatin, coolreader.org@gmail.com

Copyright

Vadim Lopatin, 2014

License

Boost License 1.0