Module: Origami::Annotation::Triggerable

Included in:
Screen, Widget
Defined in:
lib/origami/annotations.rb

Instance Method Summary collapse

Instance Method Details

#onBlur(action) ⇒ Object



119
120
121
122
123
124
125
126
# File 'lib/origami/annotations.rb', line 119

def onBlur(action)        
  unless action.is_a?(Action) or action.is_a?(Reference)
    raise TypeError, "An Action object must be passed."
  end
  
  self.AA ||= AdditionalActions.new
  self.AA.Bl = action
end

#onFocus(action) ⇒ Object



110
111
112
113
114
115
116
117
# File 'lib/origami/annotations.rb', line 110

def onFocus(action)        
  unless action.is_a?(Action) or action.is_a?(Reference)
    raise TypeError, "An Action object must be passed."
  end
  
  self.AA ||= AdditionalActions.new
  self.AA.Fo = action
end

#onMouseDown(action) ⇒ Object



92
93
94
95
96
97
98
99
# File 'lib/origami/annotations.rb', line 92

def onMouseDown(action)        
  unless action.is_a?(Action) or action.is_a?(Reference)
    raise TypeError, "An Action object must be passed."
  end
  
  self.AA ||= AdditionalActions.new
  self.AA.D = action
end

#onMouseOut(action) ⇒ Object



83
84
85
86
87
88
89
90
# File 'lib/origami/annotations.rb', line 83

def onMouseOut(action)        
  unless action.is_a?(Action) or action.is_a?(Reference)
    raise TypeError, "An Action object must be passed."
  end
  
  self.AA ||= AdditionalActions.new
  self.AA.X = action
end

#onMouseOver(action) ⇒ Object



74
75
76
77
78
79
80
81
# File 'lib/origami/annotations.rb', line 74

def onMouseOver(action)        
  unless action.is_a?(Action) or action.is_a?(Reference)
    raise TypeError, "An Action object must be passed."
  end
  
  self.AA ||= AdditionalActions.new
  self.AA.E = action
end

#onMouseUp(action) ⇒ Object



101
102
103
104
105
106
107
108
# File 'lib/origami/annotations.rb', line 101

def onMouseUp(action)        
  unless action.is_a?(Action) or action.is_a?(Reference)
    raise TypeError, "An Action object must be passed."
  end
  
  self.AA ||= AdditionalActions.new
  self.AA.U = action
end

#onPageClose(action) ⇒ Object



137
138
139
140
141
142
143
144
# File 'lib/origami/annotations.rb', line 137

def onPageClose(action)        
  unless action.is_a?(Action) or action.is_a?(Reference)
    raise TypeError, "An Action object must be passed."
  end
  
  self.AA ||= AdditionalActions.new
  self.AA.PC = action
end

#onPageInvisible(action) ⇒ Object



155
156
157
158
159
160
161
162
# File 'lib/origami/annotations.rb', line 155

def onPageInvisible(action)        
  unless action.is_a?(Action) or action.is_a?(Reference)
    raise TypeError, "An Action object must be passed."
  end
  
  self.AA ||= AdditionalActions.new
  self.AA.PI = action
end

#onPageOpen(action) ⇒ Object



128
129
130
131
132
133
134
135
# File 'lib/origami/annotations.rb', line 128

def onPageOpen(action)        
  unless action.is_a?(Action) or action.is_a?(Reference)
    raise TypeError, "An Action object must be passed."
  end
  
  self.AA ||= AdditionalActions.new
  self.AA.PO = action
end

#onPageVisible(action) ⇒ Object



146
147
148
149
150
151
152
153
# File 'lib/origami/annotations.rb', line 146

def onPageVisible(action)        
  unless action.is_a?(Action) or action.is_a?(Reference)
    raise TypeError, "An Action object must be passed."
  end
  
  self.AA ||= AdditionalActions.new
  self.AA.PV = action
end