OSDN Git Service
(root)
/
pettanr
/
pettanr.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
fix test
[pettanr/pettanr.git]
/
lib
/
editor
/
dock.rb
1
module Editor
2
module EditorModule
3
class DockBase
4
attr_accessor :parent, :tabs
5
def initialize parent
6
@parent = parent
7
@tabs = []
8
end
9
10
def root_item
11
@parent.root_item
12
end
13
14
def add_tab tab, label, body
15
@tabs << tab
16
tab.label = label
17
tab.body = body
18
tab
19
end
20
21
def root_item
22
@parent.root_item
23
end
24
25
def template_dir
26
@parent.template_dir
27
end
28
29
def template_file_name
30
raise "no template_file_name"
31
end
32
33
def template_name
34
self.template_dir + self.template_file_name
35
end
36
37
end
38
39
end
40
end