Class: PacNotebookAgent

Inherits:
PacAgent show all
Defined in:
lib/wx-pac/notebook.rb

Instance Attribute Summary

Attributes inherited from PacAgent

#panel, #parent

Instance Method Summary collapse

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