Class: PacNotebookAgent
Instance Attribute Summary
Attributes inherited from PacAgent
Instance Method Summary collapse
- #add_page_for_agent(name) ⇒ Object
-
#initialize(panel, parent = nil) ⇒ PacNotebookAgent
constructor
A new instance of PacNotebookAgent.
Methods inherited from PacAgent
#split_horizontally, #split_vertically
Constructor Details
#initialize(panel, parent = nil) ⇒ PacNotebookAgent
Returns a new instance of PacNotebookAgent.
2 3 4 5 |
# File 'lib/wx-pac/notebook.rb', line 2 def initialize(panel, parent=nil) @agents = [] super end |
Instance Method Details
#add_page_for_agent(name) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/wx-pac/notebook.rb', line 7 def add_page_for_agent(name) tab = @notebook.add(Panel) {|p| p.arrange_vertically(:padding => 5) @agents << (yield p) } @notebook.add_page(tab, name) end |