Class: MINT::AIContainer
- Inherits:
-
AIOUT
show all
- Defined in:
- lib/MINT-core/model/aui/AIContainer.rb
Constant Summary
Constants inherited
from Interactor
Interactor::PUBLISH_ATTRIBUTES
Instance Method Summary
collapse
Methods inherited from AIO
#exists_next, #exists_parent, #exists_prev, #focus_next, #focus_parent, #focus_previous, getModel, #inform_parent_presenting, #next, #next2str, #parent, #parent2str, #parent=, #previous, #previous2str
Methods inherited from Interactor
class_from_channel_name, #create_attribute_channel_name, create_channel_name, #create_channel_w_name, get, getModel, get_dm, #init_statemachine, #is_in?, #new_states, notify, #process_event, #process_event!, #process_event_vars, #publish_update, #states, #states=, #sync_event, #sync_states, #to_dot, wait
#restart_timeout, #start_timeout, #stop_timeout
Instance Method Details
#child_to_presenting(child) ⇒ Object
hook that is called from a child if it enters presenting state
67
68
69
|
# File 'lib/MINT-core/model/aui/AIContainer.rb', line 67
def child_to_presenting(child)
true
end
|
#children ⇒ Object
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/MINT-core/model/aui/AIContainer.rb', line 7
def children
p = super
result = nil
if p
result=[]
c = p.split("|")
c.each do |name|
result << AIO.get(name)
end
return result
else
[]
end
[]
end
|
#children=(children) ⇒ Object
23
24
25
26
27
28
29
30
31
|
# File 'lib/MINT-core/model/aui/AIContainer.rb', line 23
def children= children
if children.is_a? Array
a= children.map { |c| c.name if not c.is_a? String}
super(a.join("|"))
else
super(children)
end
end
|
#focus_child ⇒ Object
57
58
59
60
61
62
63
|
# File 'lib/MINT-core/model/aui/AIContainer.rb', line 57
def focus_child
if (self.children && self.children.first)
self.children.first.process_event("focus")
else
return nil end
end
|
#getSCXML ⇒ Object
33
34
35
|
# File 'lib/MINT-core/model/aui/AIContainer.rb', line 33
def getSCXML
"#{File.dirname(__FILE__)}/aicontainer.scxml"
end
|
#present_children ⇒ Object
47
48
49
50
51
52
53
54
|
# File 'lib/MINT-core/model/aui/AIContainer.rb', line 47
def present_children
if (self.children)
self.children.each do |c|
c.process_event("present")
end
end
end
|
#suspend_children ⇒ Object
37
38
39
40
41
42
43
44
45
|
# File 'lib/MINT-core/model/aui/AIContainer.rb', line 37
def suspend_children
cs = self.children
if (cs)
cs.each do |c|
c.process_event("suspend")
end
end
end
|