MouseEvent
class
class MouseEvent extends Event {
static const String CLICK = "click";
static const String DOUBLE_CLICK = "doubleClick";
static const String MOUSE_DOWN = "mouseDown";
static const String MOUSE_UP = "mouseUp";
static const String MOUSE_MOVE = "mouseMove";
static const String MOUSE_OUT = "mouseOut";
static const String MOUSE_OVER = "mouseOver";
static const String MOUSE_WHEEL = "mouseWheel";
static const String MIDDLE_CLICK = "middleClick";
static const String MIDDLE_MOUSE_DOWN = "middleMouseDown";
static const String MIDDLE_MOUSE_UP = "middleMouseUp";
static const String RIGHT_CLICK = "rightClick";
static const String RIGHT_MOUSE_DOWN = "rightMouseDown";
static const String RIGHT_MOUSE_UP = "rightMouseUp";
static const String CONTEXT_MENU = "contextMenu";
static const String ROLL_OUT = "rollOut";
static const String ROLL_OVER = "rollOver";
//-------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------
num _localX = 0.0, _localY = 0.0;
num _stageX = 0.0, _stageY = 0.0;
num _deltaX = 0.0, _deltaY = 0.0;
bool _buttonDown = false;
bool _altKey = false;
bool _controlKey = false;
bool _ctrlKey = false;
bool _shiftKey = false;
int _clickCount = 0;
MouseEvent(String type, [bool bubbles = false]) : super(type, bubbles);
//-------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------
set _localPoint(Point point) {
_localX = point.x;
_localY = point.y;
}
set _stagePoint(Point point) {
_stageX = point.x;
_stageY = point.y;
}
//-------------------------------------------------------------------------------------------------
//-------------------------------------------------------------------------------------------------
num get localX => _localX;
num get localY => _localY;
num get stageX => _stageX;
num get stageY => _stageY;
num get deltaX => _deltaX;
num get deltaY => _deltaY;
bool get buttonDown => _buttonDown;
bool get altKey => _altKey;
bool get controlKey => _controlKey;
bool get ctrlKey => _ctrlKey;
bool get shiftKey => _shiftKey;
int get clickCount => _clickCount;
}
Extends
Event > MouseEvent
Static Properties
const String CLICK #
static const String CLICK = "click"
static const String CONTEXT_MENU = "contextMenu"
const String DOUBLE_CLICK #
static const String DOUBLE_CLICK = "doubleClick"
const String MIDDLE_CLICK #
static const String MIDDLE_CLICK = "middleClick"
const String MIDDLE_MOUSE_DOWN #
static const String MIDDLE_MOUSE_DOWN = "middleMouseDown"
const String MIDDLE_MOUSE_UP #
static const String MIDDLE_MOUSE_UP = "middleMouseUp"
const String MOUSE_DOWN #
static const String MOUSE_DOWN = "mouseDown"
const String MOUSE_MOVE #
static const String MOUSE_MOVE = "mouseMove"
const String MOUSE_OUT #
static const String MOUSE_OUT = "mouseOut"
const String MOUSE_OVER #
static const String MOUSE_OVER = "mouseOver"
const String MOUSE_UP #
static const String MOUSE_UP = "mouseUp"
const String MOUSE_WHEEL #
static const String MOUSE_WHEEL = "mouseWheel"
const String RIGHT_CLICK #
static const String RIGHT_CLICK = "rightClick"
const String RIGHT_MOUSE_DOWN #
static const String RIGHT_MOUSE_DOWN = "rightMouseDown"
const String RIGHT_MOUSE_UP #
static const String RIGHT_MOUSE_UP = "rightMouseUp"
const String ROLL_OUT #
static const String ROLL_OUT = "rollOut"
const String ROLL_OVER #
static const String ROLL_OVER = "rollOver"
Constructors
new MouseEvent(String type, [bool bubbles = false]) #
Creates a new Object instance.
Object instances have no meaningful state, and are only useful
through their identity. An Object instance is equal to itself
only.
MouseEvent(String type, [bool bubbles = false]) : super(type, bubbles);
Properties
final bool altKey #
bool get altKey => _altKey;
final bool bubbles #
bool get bubbles => _bubbles;
bool get buttonDown => _buttonDown;
final bool captures #
bool get captures => true;
final int clickCount #
int get clickCount => _clickCount;
final bool controlKey #
bool get controlKey => _controlKey;
final bool ctrlKey #
bool get ctrlKey => _ctrlKey;
EventDispatcher get currentTarget => _currentTarget;
final num deltaX #
num get deltaX => _deltaX;
final num deltaY #
num get deltaY => _deltaY;
final int eventPhase #
int get eventPhase => _eventPhase;
final num localX #
num get localX => _localX;
final num localY #
num get localY => _localY;
final bool shiftKey #
bool get shiftKey => _shiftKey;
final num stageX #
num get stageX => _stageX;
final num stageY #
num get stageY => _stageY;
bool get stopsImmediatePropagation => _stopsImmediatePropagation;
final bool stopsPropagation #
bool get stopsPropagation => _stopsPropagation;
EventDispatcher get target => _target;
final String type #
String get type => _type;
Methods
void stopImmediatePropagation() {
_stopsPropagation = true;
_stopsImmediatePropagation = true;
}
void stopPropagation() #
void stopPropagation() {
_stopsPropagation = true;
}