Module: Origami::Annotation::Triggerable

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

Instance Method Summary collapse

Instance Method Details

#onBlur(action) ⇒ Object



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

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



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

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



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

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



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

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



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

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



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

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



171
172
173
174
175
176
177
178
# File 'lib/origami/annotations.rb', line 171

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



189
190
191
192
193
194
195
196
# File 'lib/origami/annotations.rb', line 189

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



162
163
164
165
166
167
168
169
# File 'lib/origami/annotations.rb', line 162

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



180
181
182
183
184
185
186
187
# File 'lib/origami/annotations.rb', line 180

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