Class: Scarpe::GlimmerLibUIDocumentRoot
- Inherits:
-
GlimmerLibUIWidget
- Object
- Shoes::Linkable
- GlimmerLibUIWidget
- Scarpe::GlimmerLibUIDocumentRoot
- Includes:
- GlimmerLibUIBackground
- Defined in:
- lib/scarpe/glibui/document_root.rb
Instance Attribute Summary collapse
-
#debug ⇒ Object
readonly
Returns the value of attribute debug.
Attributes inherited from GlimmerLibUIWidget
Attributes inherited from Shoes::Linkable
Instance Method Summary collapse
-
#bind(name, &block) ⇒ Object
Bind a Scarpe callback name; see Scarpe::Widget for how the naming is set up.
- #display(properties = {}) ⇒ Object
- #element(&blck) ⇒ Object
-
#initialize(properties) ⇒ GlimmerLibUIDocumentRoot
constructor
A new instance of GlimmerLibUIDocumentRoot.
Methods included from GlimmerLibUIBackground
Methods inherited from GlimmerLibUIWidget
#add_child, display_class_for, #remove_child, #set_parent
Methods inherited from Shoes::Linkable
#bind_shoes_event, #send_self_event, #send_shoes_event, #unsub_shoes_event
Constructor Details
#initialize(properties) ⇒ GlimmerLibUIDocumentRoot
Returns a new instance of GlimmerLibUIDocumentRoot.
9 10 11 12 |
# File 'lib/scarpe/glibui/document_root.rb', line 9 def initialize(properties) @callbacks = {} super end |
Instance Attribute Details
#debug ⇒ Object (readonly)
Returns the value of attribute debug.
7 8 9 |
# File 'lib/scarpe/glibui/document_root.rb', line 7 def debug @debug end |
Instance Method Details
#bind(name, &block) ⇒ Object
Bind a Scarpe callback name; see Scarpe::Widget for how the naming is set up
29 30 31 |
# File 'lib/scarpe/glibui/document_root.rb', line 29 def bind(name, &block) @callbacks[name] = block end |
#display(properties = {}) ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/scarpe/glibui/document_root.rb', line 14 def display(properties = {}) <<~GTEXT window("#{properties["title"] || "Scarpe with GlimmerLibUI"}", #{properties["width"] || 640}, #{properties["height"] || 480}) { horizontal_box { #{@children.map(&:display).join} } }.show GTEXT end |
#element(&blck) ⇒ Object
24 25 26 |
# File 'lib/scarpe/glibui/document_root.rb', line 24 def element(&blck) window(&blck).show end |