| Intro | Overview | Window | Widgets | Layout | Events |
require 'wise/wise' Wise::Label.new(nil, :text=>"Hello, world!") Wise::main_thread()I am wondering whether I should put 'parent' in the hashtable, together with all other fields for a widget-initializer. This nil in the example looks pretty awkward.
Serialize is a general construction that uses the select call to wait for input, in this case only from the X-connection. The same call can be used to wait for input from e.g. stdin. Whenever Wise needs an X connection, it subscribes itself to the serialize-mechanism, but stdin is not automatically subscribed.
To be able to extend the toolkit or a widget means that the inheritance needs to be clear, or should not matter. It also means no particular construct should be disabled for any widget. Wise implements this by a native window (rectangular area on the screen) that is bound to a ruby window. All widgets are subclasses of this ruby window. If you wish to draw a purple diagonal on a Button, go right ahead.
So, by explaining the Window widget, most would be said about Wise. Since this would be confusing, instead, this guide will explain the relevant parts for the appropriate widgets. It will also show the inheritance of all the widgets, so you can find that the text for a Button is actually set by the Label class.
| Intro | Overview | Window | Widgets | Layout | Events |