XCBWindow

Undocumented in source.

Constructors

this
this(string caption, Window parent)
Undocumented in source.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

convertKeyCode
uint convertKeyCode(uint keyCode)
Undocumented in source. Be warned that the author may not have intended to support it.
convertKeyFlags
uint convertKeyFlags(uint flags)
Undocumented in source. Be warned that the author may not have intended to support it.
create
bool create()
Undocumented in source. Be warned that the author may not have intended to support it.
createImage
void createImage()
Undocumented in source. Be warned that the author may not have intended to support it.
draw
void draw(ColorDrawBuf buf)
Undocumented in source. Be warned that the author may not have intended to support it.
invalidate
void invalidate()

request window redraw

processExpose
void processExpose(xcb_expose_event_t* event)
Undocumented in source. Be warned that the author may not have intended to support it.
processKeyEvent
bool processKeyEvent(KeyAction action, uint keyCode, uint flags)
Undocumented in source. Be warned that the author may not have intended to support it.
processMouseEvent
void processMouseEvent(MouseAction action, ubyte detail, ushort state, short x, short y)
Undocumented in source. Be warned that the author may not have intended to support it.
redraw
void redraw()
Undocumented in source. Be warned that the author may not have intended to support it.
show
void show()
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

windowCaption
string windowCaption [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
windowCaption
string windowCaption [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
windowId
xcb_window_t windowId [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_caption
string _caption;
Undocumented in source.
_derelictgl3Reloaded
bool _derelictgl3Reloaded;
Undocumented in source.
_drawbuf
ColorDrawBuf _drawbuf;
Undocumented in source.
_exposeSent
bool _exposeSent;
Undocumented in source.
_g
xcb_gcontext_t _g;
Undocumented in source.
_image
xcb_image_t* _image;
Undocumented in source.
_lbutton
ButtonDetails _lbutton;
Undocumented in source.
_mbutton
ButtonDetails _mbutton;
Undocumented in source.
_rbutton
ButtonDetails _rbutton;
Undocumented in source.
_w
xcb_window_t _w;
Undocumented in source.
shminfo
xcb_shm_segment_info_t shminfo;
Undocumented in source.

Inherited Members

From Window

_dx
int _dx;
Undocumented in source.
_dy
int _dy;
Undocumented in source.
_keyboardModifiers
uint _keyboardModifiers;
Undocumented in source.
_backgroundColor
uint _backgroundColor;
Undocumented in source.
_mainWidget
Widget _mainWidget;
Undocumented in source.
_eventList
EventList _eventList;
Undocumented in source.
_flags
uint _flags;
Undocumented in source.
_minContentWidth
int _minContentWidth;

minimal good looking content width

_minContentHeight
int _minContentHeight;

minimal good looking content height

_currentContentWidth
int _currentContentWidth;
Undocumented in source.
_currentContentHeight
int _currentContentHeight;
Undocumented in source.
flags
uint flags [@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.
width
int width [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
height
int height [@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.
saveWindowState
void saveWindowState(Setting setting)

save window state to setting object

restoreWindowState
bool restoreWindowState(Setting setting)

restore window state from setting object

correctWindowPositionOnScreen
bool correctWindowPositionOnScreen(Rect rect)

check if window position inside screen bounds; try to correct if needed; returns true if position is ok.

_caretRect
Rect _caretRect;
Undocumented in source.
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;
Undocumented in source.
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.
_windowOrContentResizeMode
WindowOrContentResizeMode _windowOrContentResizeMode;
Undocumented in source.
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.
_showPosition
ShowPosition _showPosition;
Undocumented in source.
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)

show
void show()

show window

windowCaption
dstring windowCaption [@property getter]

returns window caption

windowCaption
dstring windowCaption [@property setter]

sets window caption

windowIcon
DrawBufRef windowIcon [@property setter]

sets window icon

invalidate
void invalidate()

request window redraw

close
void close()

close window

parentWindow
Window parentWindow [@property getter]

returns parent window

_windowState
WindowState _windowState;
Undocumented in source.
windowState
WindowState windowState [@property getter]

returns current window state

_windowRect
Rect _windowRect;
Undocumented in source.
windowRect
Rect windowRect [@property getter]

returns window rectangle on screen (includes window frame and title)

windowStateChanged
Signal!OnWindowStateHandler windowStateChanged;

window state change signal

handleWindowStateChange
void handleWindowStateChange(WindowState newState, Rect newWindowRect)

update and signal window state and/or size/positon changes - for using in platform inplementations

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

maximizeWindow
bool maximizeWindow(bool activate)

maximize window

minimizeWindow
bool minimizeWindow()

minimize window

restoreWindow
bool restoreWindow(bool activate)

restore window if maximized/minimized/hidden

hideWindow
bool hideWindow()

restore window if maximized/minimized/hidden

activateWindow
bool activateWindow()

just activate window

moveWindow
bool moveWindow(Point topLeft, bool activate)

change window position only

resizeWindow
bool resizeWindow(Point sz, bool activate)

change window size only

moveAndResizeWindow
bool moveAndResizeWindow(Rect rc, bool activate)

set window rectangle

centerOnParentWindow
void centerOnParentWindow()

centers window on parent window, do nothing if there is no parent window

adjustPositionDuringShow
void adjustPositionDuringShow()

adjust window position during show()

_vScrollBar
ScrollBar _vScrollBar;

vertical scrollbar control

_hScrollBar
ScrollBar _hScrollBar;

horizontal scrollbar control

adjustWindowOrContentSize
void adjustWindowOrContentSize(int minContentWidth, int minContentHeight)

Sets the minimal content size and adjust window or content should be called from window show

updateWindowOrContentSize
void updateWindowOrContentSize()

update current content size based on windowOrContentResizeMode flag, usually used when window is resized

requestLayout
void requestLayout()

requests layout for main widget and popups

measure
void measure()
Undocumented in source. Be warned that the author may not have intended to support it.
layout
void layout()
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.
_popups
PopupWidget[] _popups;
Undocumented in source.
TooltipInfo
struct TooltipInfo
Undocumented in source.
_tooltip
TooltipInfo _tooltip;
Undocumented in source.
scheduleTooltip
void scheduleTooltip(Widget ownerWidget, long delay, uint alignment, int x, int y)

schedule tooltip for widget be shown with specified delay

handleDroppedFiles
void handleDroppedFiles(string[] filenames)

called when user dragged file(s) to application window

_onFilesDropped
void delegate(string[]) _onFilesDropped;
Undocumented in source.
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

_onCanClose
bool delegate() _onCanClose;
Undocumented in source.
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;
Undocumented in source.
onClose
void delegate() onClose [@property getter]

get handler for closing of window

onClose
void delegate() onClose [@property setter]

set handler for closing of window

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

handleCanClose
bool handleCanClose()

calls onCanClose handler if set to check if system may close window

hideTooltip
void hideTooltip()

hide tooltip if shown and cancel tooltip timer if set

showTooltip
PopupWidget showTooltip(Widget content, Widget anchor, uint alignment, int x, int y)

show tooltip immediately

showPopup
PopupWidget showPopup(Widget content, Widget anchor, uint alignment, int x, int y)

show new popup

removePopup
bool removePopup(PopupWidget popup)

remove popup

modalPopup
PopupWidget modalPopup()

returns last modal popup widget, or null if no modal popups opened

isChild
bool isChild(Widget w)

returns true if widget is child of either main widget, one of popups or window scrollbar

~this
~this()
Undocumented in source.
queueWidgetDestroy
void queueWidgetDestroy(Widget widgetToDestroy)

Allows queue destroy of widget.

PERFORMANCE_LOGGING_THRESHOLD_MS
int PERFORMANCE_LOGGING_THRESHOLD_MS;
Undocumented in source.
_firstDrawCalled
bool _firstDrawCalled;

set when first draw is called: don't handle mouse/key input until draw (layout) is called

onDraw
void onDraw(DrawBuf buf)
Undocumented in source. Be warned that the author may not have intended to support it.
scheduleAnimation
void scheduleAnimation()

after drawing, call to schedule redraw if animation is active

setCaptureWidget
void setCaptureWidget(Widget w, MouseEvent event)
Undocumented in source. Be warned that the author may not have intended to support it.
_focusedWidget
Widget _focusedWidget;
Undocumented in source.
_focusStateToApply
auto _focusStateToApply;
Undocumented in source.
focusedWidget
Widget focusedWidget [@property getter]

returns current focused widget

setFocus
Widget setFocus(Widget newFocus, FocusReason reason)

change focus to widget

removeFocus
Widget removeFocus()
Undocumented in source. Be warned that the author may not have intended to support it.
applyFocus
Widget applyFocus()
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.
windowActivityChanged
Signal!OnWindowActivityHandler windowActivityChanged;

window state change signal

handleWindowActivityChange
void handleWindowActivityChange(bool isWindowActive)
Undocumented in source. Be warned that the author may not have intended to support it.
dispatchKeyEvent
bool dispatchKeyEvent(Widget root, KeyEvent event)

dispatch key event to widgets which have wantsKeyTracking == true

dispatchKeyEvent
bool dispatchKeyEvent(KeyEvent event)

dispatch keyboard event

_overrideCursorType
CursorType _overrideCursorType;

Keep overrided cursor type or NotSet to get cursor from widget

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.

dispatchMouseEvent
bool dispatchMouseEvent(Widget root, MouseEvent event, bool cursorIsSet)
Undocumented in source. Be warned that the author may not have intended to support it.
_mouseTrackingWidgets
Widget[] _mouseTrackingWidgets;

widget which tracks Move events

_mouseCaptureWidget
Widget _mouseCaptureWidget;

widget which tracks all events after processed ButtonDown

_mouseCaptureButtons
ushort _mouseCaptureButtons;
Undocumented in source.
_mouseCaptureFocusedOut
bool _mouseCaptureFocusedOut;
Undocumented in source.
_mouseCaptureFocusedOutTrackMovements
bool _mouseCaptureFocusedOutTrackMovements;

does current capture widget want to receive move events even if pointer left it

clearMouseCapture
void clearMouseCapture()
Undocumented in source. Be warned that the author may not have intended to support it.
dispatchCancel
bool dispatchCancel(MouseEvent event)
Undocumented in source. Be warned that the author may not have intended to support it.
sendAndCheckOverride
bool sendAndCheckOverride(Widget widget, MouseEvent event)
Undocumented in source. Be warned that the author may not have intended to support it.
isMouseCaptured
bool isMouseCaptured()

returns true if mouse is currently captured

dispatchAction
bool dispatchAction(Action action, Widget sourceWidget)

dispatch action to main widget

dispatchActionStateRequest
bool dispatchActionStateRequest(Action action, Widget sourceWidget)

dispatch action to main widget

dispatchThemeChanged
void dispatchThemeChanged()

handle theme change: e.g. reload some themed resources

postEvent
void postEvent(CustomEvent event)

post event to handle in UI thread (this method can be used from background thread)

executeInUiThread
void executeInUiThread(void delegate() runnable)

post task to execute in UI thread (this method can be used from background thread)

createAsyncSocket
AsyncSocket createAsyncSocket(AsyncSocketCallback callback)

Creates async socket

cancelEvent
void cancelEvent(uint uniqueId)

remove event from queue by unique id if not yet dispatched (this method can be used from background thread)

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)

dispatchCustomEvent
bool dispatchCustomEvent(CustomEvent event)

dispatch custom event

dispatchMouseEvent
bool dispatchMouseEvent(MouseEvent event)

dispatch mouse event to window content widgets

dispatchWidgetUpdateActionStateRecursive
void dispatchWidgetUpdateActionStateRecursive(Widget root)

calls update actions recursively

checkUpdateNeeded
void checkUpdateNeeded(Widget root, bool needDraw, bool needLayout, bool animationActive)

checks content widgets for necessary redraw and/or layout

setCursorType
void setCursorType(uint cursorType)

sets cursor type for window

dispatchWidgetUpdateActionStateRecursive
void dispatchWidgetUpdateActionStateRecursive()

update action states

checkUpdateNeeded
bool checkUpdateNeeded(bool needDraw, bool needLayout, bool animationActive)

checks content widgets for necessary redraw and/or layout

_animationActive
bool _animationActive;
Undocumented in source.
isAnimationActive
bool isAnimationActive [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
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).

_actionsUpdateRequested
bool _actionsUpdateRequested;
Undocumented in source.
requestActionsUpdate
void requestActionsUpdate(bool immediateUpdate)

set action update request flag, will be cleared after redraw

actionsUpdateRequested
bool actionsUpdateRequested [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
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)

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)

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.
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.
_timerQueue
TimerQueue _timerQueue;
Undocumented in source.
scheduleSystemTimer
void scheduleSystemTimer(long intervalMillis)

schedule timer for interval in milliseconds - call window.onTimer when finished

pollTimers
bool pollTimers()

poll expired timers; returns true if update is needed

onTimer
void onTimer()

system timer interval expired - notify queue

setTimer
ulong setTimer(Widget destination, long intervalMillis)

set timer for destination widget - destination.onTimer() will be called after interval expiration; returns timer id

cancelTimer
void cancelTimer(ulong timerId)

cancel previously scheduled widget timer (for timerId pass value returned from setTimer)

Meta