Class: Hokusai::MouseOutEvent

Inherits:
MouseEvent show all
Defined in:
ui/src/hokusai/events/mouse.rb

Instance Attribute Summary

Attributes inherited from MouseEvent

#input, #state

Attributes inherited from Event

#bubbles, #captures, #stopped

Instance Method Summary collapse

Methods inherited from MouseEvent

#delta, #initialize, #left, #middle, #mouse, #pos, #right, #scroll, #scroll_delta, #to_json

Methods inherited from Event

#bubble, #matches, name, #name, #stop, #to_json

Constructor Details

This class inherits a constructor from Hokusai::MouseEvent

Instance Method Details

#capture(block, canvas) ⇒ Object



168
169
170
171
172
173
174
# File 'ui/src/hokusai/events/mouse.rb', line 168

def capture(block, canvas)
  captures << block if matches(block)

  if left[:clicked] && !clicked(canvas)
    block.node.meta.blur
  end
end

#clicked(canvas) ⇒ Object



176
177
178
# File 'ui/src/hokusai/events/mouse.rb', line 176

def clicked(canvas)
  LibHokusai.hoku_input_is_clicked(input.raw, canvas.to_hoku_rect)
end