Class: AUIAgent

Inherits:
MINT::Agent show all
Includes:
AUIControl
Defined in:
lib/MINT-core/agent/aui.rb

Instance Attribute Summary

Attributes inherited from MINT::Agent

#running_mappings

Instance Method Summary collapse

Methods included from AUIControl

find_common, find_common_aic, organize, organize2, organize_new, organize_sub, present_children, suspend_all, suspend_others

Methods included from MINT

#cache_coordinates, #cache_touched, #consume, #filter, #has_moved?, #restart_timeout, #start_one_time_tick, #start_timeout, #stop_timeout, #touch_changed?

Methods inherited from MINT::Agent

#addMapping, #run

Constructor Details

#initializeAUIAgent

Returns a new instance of AUIAgent.



7
8
9
# File 'lib/MINT-core/agent/aui.rb', line 7

def initialize
  super
end

Instance Method Details

#initial_calculation(result) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/MINT-core/agent/aui.rb', line 11

def initial_calculation(result)
 
  current_screen = Screen.first_or_create(:name => "current_screen")
  current_screen.process_event(:calculate)

  pts = InteractionTask.all(:abstract_states => /running/).map &:name
  p  "Initial Layout recalculation requested for new PTS #{pts.inspect} "   
 
  root = AUIControl.find_common(pts)

  #layer=0
  # remove all layoutements
  # Layoutelement.all.destroy
  mask = AIO.first(:name=>root)
  AUIControl.organize2(mask)
  
 #   mask=composeScreen(root,true,layer)
  mask.save
  
  current_screen.update(:root=>root) # BUG/??w thereafter no iteration in calculateMinimumSizes is possible???
  current_screen.process_event(:done)
  p "finished: AUI root>#{root}"
end