Constructor.
Constructor.
Restore the window's state to before it was minimised or withdrawn.
Minimise the window.
Determine if this window is above another.
Determine if this window is below another.
Remove a previously set protocol command.
Set the default icon for this window. This is applied to all future child windows as well.
Handle disabling the window. Windows only.
Handle setting the window to fullscreen.
Set the size and postition of the window.
Set the icon for this window, this overrides the default icon.
Set a callback to be executed after a delay and after processing all other events. The callback is executed only once and discarded. This is useful for refreshing the GUI at regular intervals when monitoring something or to schedule a future action.
Set the maximum size of the window.
Set the minimum size of the window.
Set the modified state of the window. Mac OSX only.
Set the notify state of the window. On Mac OS it usually bounces the dock icon. Mac OSX only.
Set the opacity of the window.
This command is used to manage window manager protocols such as WM_DELETE_WINDOW. Protocol is the name of an atom corresponding to a window manager protocol, such as WM_DELETE_WINDOW or WM_SAVE_YOURSELF or WM_TAKE_FOCUS.
Set if the width and height can be resized.
Set the title of the window.
Handle changing the window to a tool window. Windows only.
Handle setting the window to be the top-most. This makes the window not able to be lowered behind any others.
Wait until this window has been destroyed.
Withdraw a window from being displayed/mapped by the window manager.
Mixin common commands.
Get the main window of the application. This is just a convenience method and shouldn't really be used. Instead use the mainWindow property of the TkdApplication class.
Set the foreground color of the widget.
Set the background color of the widget.
Set the insert cursor color of the widget.
Get the widget's class.
Set the widget's cursor.
Get the widget's cursor.
Bind a callback to a particular event triggered by this element.
Unbind a previous event binding.
Destroy this element and remove it from the GUI.
Get the string id's of the immediate children elements.
Get the width of the element.
Get the height of the element.
Get the platform specific window id. This is equal to the hwnd on Windows or the x11 window id on Linux.
Get the position of the cursor over the element. The cursor position returned is relative to the screen. It is only returned if the cursor is over the element.
Get the horizontal position of the cursor over the element. The cursor position returned is relative to the screen. It is only returned if the cursor is over the element.
Get the vertical position of the cursor over the element. The cursor position returned is relative to the screen. It is only returned if the cursor is over the element.
Get the width of the screen this element is displayed on.
Get the height of the screen this element is displayed on.
Get the horizontal position of the element. The number returned is calculated using the top, left-most pixel of the element including border if one exists.
Get the vertical position of the element. The number returned is calculated using the top, left-most pixel of the element including border if one exists.
Set if the element should change it size when requested to do so by a geometry manager.
Used by the grid geometry manager. Sets options for grid columns that contain child widgets.
Used by the grid geometry manager. Sets options for grid rows that contain child widgets.
Provides a simple means to block keyboard, button, and pointer events from elements, while overriding the cursor with a configurable busy cursor.
Gets if the element is busy or not.
Generates an event and arranges for it to be processed just as if it had come from the operating system. Event provides a basic description of the event, such as <Shift-Button-2> or <<Paste>>. The event argument may have any of the forms allowed for the binding argument of the bind method except that it must consist of a single event pattern only. Certain events, such as key events, require that the window has focus to receive the event properly.
Set the element to take focus so any key press or key release events for the application are sent to that element. It is also possible to force the operating system to apply focus to the element immediately.
This command implements simple pointer and keyboard grabs. When a grab is set for a particular element, it restricts all pointer events to the grab window and its descendants. Whenever the pointer is within the grab element, the pointer will behave exactly the same as if there had been no grab at all and all events will be reported in the normal fashion. When the pointer is outside the element, button presses, releases and mouse motion events are reported to the element, and element entry and exit events are ignored. The grab 'owns' the pointer: elements outside the grab will be visible on the screen but they will be insensitive until the grab is released. The tree of elements underneath the grab element can include windows, in which case all windows and their descendants will continue to receive mouse events during the grab.
Gets if the element is currently grabbing all events or not.
Lower a window's position in the stacking order.
Raise a window's position in the stacking order.
auto window = new Window("New window") .setGeometry(640, 480, 10, 10) .setDefaultIcon(new Png!("icon.png")) .setMaxSize(1024, 768) .setProtocolCommand(WindowProtocol.deleteWindow, delegate(CommandArgs args){ ... });
These are injected common commands that can also be used with this widget.
Additional events that can also be bound to using the bind method.
<<PrevWindow>>, <Alt-Key>, <Key-Tab>, <Key-F10>,
The Window class creates a new toplevel window.
A window is similar to a frame except that it is created as a top-level widget. The primary purpose of a toplevel is to serve as a container for dialog boxes and other collections of widgets.