mirror of
https://github.com/lxsang/Diya-API.git
synced 2024-12-28 04:18:21 +01:00
41 lines
636 B
Smalltalk
41 lines
636 B
Smalltalk
|
Class {
|
||
|
#name : #DiyaEvent,
|
||
|
#superclass : #DiyaBaseObject,
|
||
|
#instVars : [
|
||
|
'enable',
|
||
|
'mapped'
|
||
|
],
|
||
|
#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
|
||
|
]
|