constructor.
Associates the virtual event with the binding, so that the virtual event will trigger whenever the binding occurs. Virtual events may be any string value and binding may have any of the values allowed for the binding argument of the bind method. If the virtual event is already defined, the new binding adds to the existing bindings for the event.
Deletes each of the bindings from those associated with the virtual event. Virtual events may be any string value and binding may have any of the values allowed for the binding argument of the bind method. Any bindings not currently associated with virtual events are ignored. If no binding argument is provided, all bindings are removed for the virtual event, so that the virtual event will not trigger anymore.
Exit the application.
All element creation and layout should take place within this method. This method is called by the constructor to create the initial GUI.
Run the application.
Set the overall theme of the user interface.
This method is used to bring the application 'up to date' by entering the event loop repeatedly until all pending events (including idle callbacks) have been processed.
Get the main window of the application.
import tkd.tkdapplication; class Application : TkdApplication { private void exitCommand(CommandArgs args) { this.exit(); } override protected void initInterface() { auto frame = new Frame(2, ReliefStyle.groove) .pack(10); auto label = new Label(frame, "Hello World!") .pack(10); auto exitButton = new Button(frame, "Exit") .setCommand(&this.exitCommand) .pack(10); } } void main(string[] args) { auto app = new Application(); app.run(); }
Base class of all Tkd gui applications.