Construct the widget.
Construct the widget.
Add an item to the menu that when selected adds a checked icon.
Add an item to the menu with an image that when selected adds a checked icon.
Add an item to the menu.
Add an item to the menu with an image.
Add a cascade menu to this menu.
Add an item to the menu that acts as a radio button.
Add an item to the menu with an image that acts as a radio button.
Add a separator to the menu.
Disable a menu item. The item indexes start at zero for the top-most entry and increase as you go down. Index refers to all menu items including separators.
Enable a menu item. The item indexes start at zero for the top-most entry and increase as you go down. Index refers to all menu items including separators.
Get the value of the selected radio button entry. This value will be the same as the entry's label. This method will return an empty string if no radio button entry exists or none are selected.
Invoke a menu item by its index. The item indexes start at zero for the top-most entry and increase as you go down. Index refers to all menu items including separators.
Get if the check box entry at the passed index is checked or not. The index only applies to check box entries in the menu not any other type of entry. If there are no check box entries in the menu this method returns false.
Show the menu.
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 menu = new Menu() .addEntry("Entry 1", delegate(CommandArgs args){ ... }) .addEntry("Entry 2", delegate(CommandArgs args){ ... }) .addSeparator() .addEntry("Entry 3", delegate(CommandArgs args){ ... });
Additional events that can also be bound to using the bind method.
<<MenuSelect>>, <<PrevWindow>>, <Alt-Key>, <Button>, <ButtonRelease>, <Enter> <Key-Down>, <Key-Escape>, <Key-F10>, <Key-Left>, <Key-Return>, <Key-Right>, <Key-Tab>, <Key-Up>, <Key-space>, <Key>, <Leave>, <Motion>,
The cascading menu that items are selected from.