- activateWindow
bool activateWindow()
- adjustPositionDuringShow
void adjustPositionDuringShow()
adjust window position during show()
- adjustWindowOrContentSize
void adjustWindowOrContentSize(int minContentWidth, int minContentHeight)
Sets the minimal content size and adjust window or content should be called from window show
- applyFocus
Widget applyFocus()
Undocumented in source. Be warned that the author may not have intended to support it.
- cancelEvent
void cancelEvent(uint uniqueId)
remove event from queue by unique id if not yet dispatched (this method can be used from background thread)
- cancelTimer
void cancelTimer(ulong timerId)
cancel previously scheduled widget timer (for timerId pass value returned from setTimer)
- centerOnParentWindow
void centerOnParentWindow()
centers window on parent window, do nothing if there is no parent window
- checkUpdateNeeded
bool checkUpdateNeeded(bool needDraw, bool needLayout, bool animationActive)
checks content widgets for necessary redraw and/or layout
- checkUpdateNeeded
void checkUpdateNeeded(Widget root, bool needDraw, bool needLayout, bool animationActive)
checks content widgets for necessary redraw and/or layout
- clearMouseCapture
void clearMouseCapture()
Undocumented in source. Be warned that the author may not have intended to support it.
- close
void close()
- correctWindowPositionOnScreen
bool correctWindowPositionOnScreen(Rect rect)
check if window position inside screen bounds; try to correct if needed; returns true if position is ok.
- createAsyncSocket
AsyncSocket createAsyncSocket(AsyncSocketCallback callback)
- dispatchAction
bool dispatchAction(Action action, Widget sourceWidget)
dispatch action to main widget
- dispatchActionStateRequest
bool dispatchActionStateRequest(Action action, Widget sourceWidget)
dispatch action to main widget
- dispatchCancel
bool dispatchCancel(MouseEvent event)
Undocumented in source. Be warned that the author may not have intended to support it.
- dispatchCustomEvent
bool dispatchCustomEvent(CustomEvent event)
- dispatchKeyEvent
bool dispatchKeyEvent(Widget root, KeyEvent event)
dispatch key event to widgets which have wantsKeyTracking == true
- dispatchKeyEvent
bool dispatchKeyEvent(KeyEvent event)
- dispatchMouseEvent
bool dispatchMouseEvent(MouseEvent event)
dispatch mouse event to window content widgets
- dispatchMouseEvent
bool dispatchMouseEvent(Widget root, MouseEvent event, bool cursorIsSet)
Undocumented in source. Be warned that the author may not have intended to support it.
- dispatchThemeChanged
void dispatchThemeChanged()
handle theme change: e.g. reload some themed resources
- dispatchWidgetUpdateActionStateRecursive
void dispatchWidgetUpdateActionStateRecursive()
- dispatchWidgetUpdateActionStateRecursive
void dispatchWidgetUpdateActionStateRecursive(Widget root)
calls update actions recursively
- executeInUiThread
void executeInUiThread(void delegate() runnable)
post task to execute in UI thread (this method can be used from background thread)
- handleCanClose
bool handleCanClose()
calls onCanClose handler if set to check if system may close window
- handleDroppedFiles
void handleDroppedFiles(string[] filenames)
called when user dragged file(s) to application window
- handlePostedEvent
void handlePostedEvent(uint uniqueId)
remove event from queue by unique id if not yet dispatched and dispatch it
- handlePostedEvents
void handlePostedEvents()
handle all events from queue, if any (call from UI thread only)
- handleWindowActivityChange
void handleWindowActivityChange(bool isWindowActive)
Undocumented in source. Be warned that the author may not have intended to support it.
- handleWindowStateChange
void handleWindowStateChange(WindowState newState, Rect newWindowRect)
update and signal window state and/or size/positon changes - for using in platform inplementations
- hasModalWindowsAbove
bool hasModalWindowsAbove()
returns true if there is some modal window opened above this window, and this window should not process mouse/key input and should not allow closing
- hideTooltip
void hideTooltip()
hide tooltip if shown and cancel tooltip timer if set
- hideWindow
bool hideWindow()
restore window if maximized/minimized/hidden
- invalidate
void invalidate()
- isChild
bool isChild(Widget w)
returns true if widget is child of either main widget, one of popups or window scrollbar
- isMouseCaptured
bool isMouseCaptured()
returns true if mouse is currently captured
- layout
void layout()
Undocumented in source. Be warned that the author may not have intended to support it.
- maximizeWindow
bool maximizeWindow(bool activate)
- measure
void measure()
Undocumented in source. Be warned that the author may not have intended to support it.
- minimizeWindow
bool minimizeWindow()
- modalPopup
PopupWidget modalPopup()
returns last modal popup widget, or null if no modal popups opened
- moveAndResizeWindow
bool moveAndResizeWindow(Rect rc, bool activate)
- moveWindow
bool moveWindow(Point topLeft, bool activate)
change window position only
- onDraw
void onDraw(DrawBuf buf)
Undocumented in source. Be warned that the author may not have intended to support it.
- onResize
void onResize(int width, int height)
Undocumented in source. Be warned that the author may not have intended to support it.
- onTimer
void onTimer()
system timer interval expired - notify queue
- pollTimers
bool pollTimers()
poll expired timers; returns true if update is needed
- postEvent
void postEvent(CustomEvent event)
post event to handle in UI thread (this method can be used from background thread)
- queueWidgetDestroy
void queueWidgetDestroy(Widget widgetToDestroy)
Allows queue destroy of widget.
- removeFocus
Widget removeFocus()
Undocumented in source. Be warned that the author may not have intended to support it.
- removePopup
bool removePopup(PopupWidget popup)
- requestActionsUpdate
void requestActionsUpdate(bool immediateUpdate)
set action update request flag, will be cleared after redraw
- requestLayout
void requestLayout()
requests layout for main widget and popups
- resizeWindow
bool resizeWindow(Point sz, bool activate)
- restoreWindow
bool restoreWindow(bool activate)
restore window if maximized/minimized/hidden
- restoreWindowState
bool restoreWindowState(Setting setting)
restore window state from setting object
- saveWindowState
void saveWindowState(Setting setting)
save window state to setting object
- scheduleAnimation
void scheduleAnimation()
after drawing, call to schedule redraw if animation is active
- scheduleSystemTimer
void scheduleSystemTimer(long intervalMillis)
schedule timer for interval in milliseconds - call window.onTimer when finished
- scheduleTooltip
void scheduleTooltip(Widget ownerWidget, long delay, uint alignment, int x, int y)
schedule tooltip for widget be shown with specified delay
- sendAndCheckOverride
bool sendAndCheckOverride(Widget widget, MouseEvent event)
Undocumented in source. Be warned that the author may not have intended to support it.
- setCaptureWidget
void setCaptureWidget(Widget w, MouseEvent event)
Undocumented in source. Be warned that the author may not have intended to support it.
- setCursorType
void setCursorType(uint cursorType)
sets cursor type for window
- setFocus
Widget setFocus(Widget newFocus, FocusReason reason)
- setTimer
ulong setTimer(Widget destination, long intervalMillis)
set timer for destination widget - destination.onTimer() will be called after interval expiration; returns timer id
- setWindowState
bool setWindowState(WindowState newState, bool activate, Rect newWindowRect)
change window state, position, or size; returns true if successful, false if not supported by platform
- show
void show()
- showInputBox
void showInputBox(dstring title, dstring message, dstring initialText, void delegate(dstring result) handler)
Undocumented in source. Be warned that the author may not have intended to support it.
- showInputBox
void showInputBox(UIString title, UIString message, dstring initialText, void delegate(dstring result) handler)
Undocumented in source. Be warned that the author may not have intended to support it.
- showMessageBox
void showMessageBox(dstring title, dstring message, const(Action)[] actions, int defaultActionIndex, bool delegate(const Action result) handler)
Show message box with specified title and message (title and message as dstring)
- showMessageBox
void showMessageBox(UIString title, UIString message, const(Action)[] actions, int defaultActionIndex, bool delegate(const Action result) handler)
Show message box with specified title and message (title and message as UIString)
- showPopup
PopupWidget showPopup(Widget content, Widget anchor, uint alignment, int x, int y)
- showTooltip
PopupWidget showTooltip(Widget content, Widget anchor, uint alignment, int x, int y)
- update
void update(bool force)
requests update for window (unless force is true, update will be performed only if layout, redraw or animation is required).
- updateWindowOrContentSize
void updateWindowOrContentSize()
update current content size based on windowOrContentResizeMode flag, usually used when window is resized
- actionsUpdateRequested
bool actionsUpdateRequested [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
- backgroundColor
uint backgroundColor [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
- backgroundColor
uint backgroundColor [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
- caretRect
Rect caretRect [@property setter]
blinking caret position (empty rect if no blinking caret)
- caretRect
Rect caretRect [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
- caretReplace
bool caretReplace [@property setter]
blinking caret is in Replace mode if true, insert mode if false
- caretReplace
bool caretReplace [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
- flags
uint flags [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
- focusedWidget
Widget focusedWidget [@property getter]
returns current focused widget
- height
int height [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
- isActive
bool isActive [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
- isAnimationActive
bool isAnimationActive [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
- keyboardModifiers
uint keyboardModifiers [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
- mainWidget
inout(Widget) mainWidget [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
- mainWidget
Widget mainWidget [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
- onCanClose
bool delegate() onCanClose [@property getter]
get handler for closing of app (it must return true to allow immediate close, false to cancel close or close window later)
- onCanClose
bool delegate() onCanClose [@property setter]
set handler for closing of app (it must return true to allow immediate close, false to cancel close or close window later)
- onClose
void delegate() onClose [@property getter]
get handler for closing of window
- onClose
void delegate() onClose [@property setter]
set handler for closing of window
- onFilesDropped
void delegate(string[]) onFilesDropped [@property getter]
get handler for files dropped to app window
- onFilesDropped
void delegate(string[]) onFilesDropped [@property setter]
set handler for files dropped to app window
- overrideCursorType
CursorType overrideCursorType [@property setter]
Allow override cursor for entire window. Set to CursorType.NotSet to remove cursor type overriding.
- overrideCursorType
CursorType overrideCursorType [@property getter]
Returns current window override cursor type or NotSet if not overriding.
- parentWindow
Window parentWindow [@property getter]
- showPosition
ShowPosition showPosition [@property getter]
returns current window show position (don't care or parent center)
- showPosition
ShowPosition showPosition [@property setter]
sets window position after show (don't care or parent center)
- width
int width [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
- windowCaption
dstring windowCaption [@property getter]
- windowCaption
dstring windowCaption [@property setter]
- windowIcon
DrawBufRef windowIcon [@property setter]
- windowOrContentResizeMode
WindowOrContentResizeMode windowOrContentResizeMode [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
- windowOrContentResizeMode
WindowOrContentResizeMode windowOrContentResizeMode [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
- windowRect
Rect windowRect [@property getter]
returns window rectangle on screen (includes window frame and title)
- windowState
WindowState windowState [@property getter]
returns current window state
Window abstraction layer. Widgets can be shown only inside window.