Class: Moon::WrappedStateEvent Abstract

Inherits:
WrappedEvent show all
Defined in:
lib/moon/packages/std/event.rb

Overview

This class is abstract.

Base event for stateful events.

Direct Known Subclasses

MouseFocusedEvent, MouseHoverEvent

Instance Attribute Summary collapse

Attributes inherited from WrappedEvent

#original_event, #parent

Attributes inherited from Event

#id, #type

Instance Method Summary collapse

Methods inherited from Event

make_filter

Constructor Details

#initialize(event, parent, state, type) ⇒ WrappedStateEvent

Returns a new instance of WrappedStateEvent.

Parameters:


174
175
176
177
# File 'lib/moon/packages/std/event.rb', line 174

def initialize(event, parent, state, type)
  @state = state
  super event, parent, type
end

Instance Attribute Details

#stateBoolean

Returns whether its hovering, or not.

Returns:

  • (Boolean)

    whether its hovering, or not


168
169
170
# File 'lib/moon/packages/std/event.rb', line 168

def state
  @state
end