2022-03-19 02:18:29 +01:00
|
|
|
Class {
|
|
|
|
#name : #DiyaEvent,
|
|
|
|
#superclass : #DiyaBaseObject,
|
|
|
|
#instVars : [
|
|
|
|
'enable',
|
2022-08-09 03:14:23 +02:00
|
|
|
'mapped',
|
|
|
|
'target'
|
2022-03-19 02:18:29 +01:00
|
|
|
],
|
|
|
|
#category : #'Diya-Events'
|
|
|
|
}
|
|
|
|
|
|
|
|
{ #category : #'instance creation' }
|
|
|
|
DiyaEvent class >> from: mappedEvt [
|
|
|
|
^ self new mapped: mappedEvt; yourself
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #accessing }
|
|
|
|
DiyaEvent >> enable [
|
|
|
|
^ enable
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #initialization }
|
|
|
|
DiyaEvent >> initialize [
|
|
|
|
super initialize.
|
|
|
|
enable := true.
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #accessing }
|
|
|
|
DiyaEvent >> mapped [
|
|
|
|
^ mapped
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #accessing }
|
|
|
|
DiyaEvent >> mapped: anObject [
|
|
|
|
mapped := anObject
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #initialization }
|
|
|
|
DiyaEvent >> preventDefault [
|
|
|
|
enable := false
|
|
|
|
]
|
2022-08-09 03:14:23 +02:00
|
|
|
|
|
|
|
{ #category : #accessing }
|
|
|
|
DiyaEvent >> target [
|
|
|
|
^ target
|
|
|
|
]
|
|
|
|
|
|
|
|
{ #category : #accessing }
|
|
|
|
DiyaEvent >> target: anObject [
|
|
|
|
target := anObject
|
|
|
|
]
|