Class: Hokusai::HoverEvent
- Inherits:
-
MouseEvent
- Object
- Event
- MouseEvent
- Hokusai::HoverEvent
- Defined in:
- ui/src/hokusai/events/mouse.rb
Instance Attribute Summary
Attributes inherited from MouseEvent
Attributes inherited from Event
Instance Method Summary collapse
Methods inherited from MouseEvent
#delta, #initialize, #left, #middle, #mouse, #pos, #right, #scroll, #scroll_delta, #to_json
Methods inherited from Event
#matches, name, #name, #stop, #to_json
Constructor Details
This class inherits a constructor from Hokusai::MouseEvent
Instance Method Details
#bubble ⇒ Object
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
# File 'ui/src/hokusai/events/mouse.rb', line 141 def bubble while block = captures.pop block.emit(name, self) cursor = block.node..get_prop(:cursor)&.to_sym if !state.set && cursor == :manual state.set = true end if !state.set && cursor && cursor != :manual Hokusai.set_mouse_cursor(cursor) state.set = true end break if stopped end if !state.nil? && !state.set Hokusai.set_mouse_cursor(:default) end end |
#capture(block, _) ⇒ Object
137 138 139 |
# File 'ui/src/hokusai/events/mouse.rb', line 137 def capture(block, _) captures << block end |