Class: RUI::GuiBuilder::Widget
- Includes:
- RUI::GuiBuilder
- Defined in:
- lib/rui/toolkits/qtbase/gui_builder.rb
Overview
A generic widget.
To use this tag, the factory
descriptor property must be set to the Factory to use to create the widget. The Factory class can be useful when the widget to create needs special initialization. Note that the given factory will be invoked passing only the parent widget as a parameter, so any extra parameters must be preset by the factory itself.
Instance Method Summary collapse
Methods included from RUI::GuiBuilder
build, #build, #builder, #setup_widget
Instance Method Details
#create_element(window, parent, desc) ⇒ Object
265 266 267 268 269 |
# File 'lib/rui/toolkits/qtbase/gui_builder.rb', line 265 def create_element(window, parent, desc) = factory(desc).new(window) (, window, parent, desc) end |
#factory(desc) ⇒ Object
271 272 273 |
# File 'lib/rui/toolkits/qtbase/gui_builder.rb', line 271 def factory(desc) desc.opts[:factory] end |