Class: Gtk2HTML::WidgetInstructions
- Inherits:
-
Object
- Object
- Gtk2HTML::WidgetInstructions
- Defined in:
- lib/gtk2html.rb
Instance Attribute Summary collapse
-
#layout ⇒ Object
Returns the value of attribute layout.
Instance Method Summary collapse
- #add_inputbox(margin, coords, padding, style) ⇒ Object
-
#initialize(layout = nil) ⇒ WidgetInstructions
constructor
A new instance of WidgetInstructions.
- #render(a) ⇒ Object
Constructor Details
#initialize(layout = nil) ⇒ WidgetInstructions
Returns a new instance of WidgetInstructions.
422 423 424 425 426 |
# File 'lib/gtk2html.rb', line 422 def initialize(layout=nil) @layout = layout if layout end |
Instance Attribute Details
#layout ⇒ Object
Returns the value of attribute layout.
419 420 421 |
# File 'lib/gtk2html.rb', line 419 def layout @layout end |
Instance Method Details
#add_inputbox(margin, coords, padding, style) ⇒ Object
429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 |
# File 'lib/gtk2html.rb', line 429 def add_inputbox(margin, coords, padding, style) h2 = style.clone h2.delete :color x1, y1, x2, y2 = coords width = x2 - x1 height = y2 - y1 entry = Gtk::Entry.new entry.set_text('type something') @layout.put entry, 10,40 end |
#render(a) ⇒ Object
445 446 447 |
# File 'lib/gtk2html.rb', line 445 def render(a) add a end |