-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added TToMouseHandler to gather all mouse related event management
- Loading branch information
Showing
29 changed files
with
502 additions
and
437 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
Trait { | ||
#name : #TToEnableableHandler, | ||
#instVars : [ | ||
'enabledHandler', | ||
'disabledHandler' | ||
], | ||
#category : #'Toplo-Core' | ||
} | ||
|
||
{ #category : #'t - enableable handler - events handling' } | ||
TToEnableableHandler >> disabledEvent: anEvent in: anElement [ | ||
] | ||
|
||
{ #category : #'t - enableable handler - events handling' } | ||
TToEnableableHandler >> enabledEvent: anEvent in: anElement [ | ||
] | ||
|
||
{ #category : #'t - enableable handler - install/uninstall hook' } | ||
TToEnableableHandler >> onInstalledEnableableHandlingIn: anElement [ | ||
|
||
enabledHandler := BlEventHandler on: ToWidgetEnabledEvent do: [ :event | self enabledEvent: event in: anElement ]. | ||
disabledHandler := BlEventHandler on: ToWidgetDisabledEvent do: [ :event | self disabledEvent: event in: anElement ]. | ||
|
||
anElement addEventHandler: enabledHandler. | ||
anElement addEventHandler: disabledHandler | ||
] | ||
|
||
{ #category : #'t - enableable handler - install/uninstall hook' } | ||
TToEnableableHandler >> onUninstalledEnableableHandlingIn: anElement [ | ||
|
||
anElement removeEventHandler: enabledHandler. | ||
anElement removeEventHandler: disabledHandler. | ||
enabledHandler := nil. | ||
disabledHandler := nil | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
Trait { | ||
#name : #TToMouseHandler, | ||
#instVars : [ | ||
'mouseEventListener' | ||
], | ||
#category : #'Toplo-Core' | ||
} | ||
|
||
{ #category : #'t - mouse handling - events handling' } | ||
TToMouseHandler >> clickEvent: anEvent in: anElement [ | ||
|
||
|
||
] | ||
|
||
{ #category : #'t - mouse handling - events handling' } | ||
TToMouseHandler >> doubleClickEvent: anEvent in: anElement [ | ||
|
||
|
||
] | ||
|
||
{ #category : #'t - mouse handling - events handling' } | ||
TToMouseHandler >> leftClickEvent: anEvent in: anElement [ | ||
|
||
] | ||
|
||
{ #category : #'t - mouse handling - events handling' } | ||
TToMouseHandler >> leftMouseDownEvent: anEvent in: anElement [ | ||
|
||
] | ||
|
||
{ #category : #'t - mouse handling - events handling' } | ||
TToMouseHandler >> leftMouseUpEvent: anEvent in: anElement [ | ||
|
||
] | ||
|
||
{ #category : #'t - mouse handling - events handling' } | ||
TToMouseHandler >> middleClickEvent: anEvent in: anElement [ | ||
|
||
|
||
] | ||
|
||
{ #category : #'t - mouse handling - events handling' } | ||
TToMouseHandler >> middleMouseDownEvent: anEvent in: anElement [ | ||
|
||
] | ||
|
||
{ #category : #'t - mouse handling - events handling' } | ||
TToMouseHandler >> middleMouseUpEvent: anEvent in: anElement [ | ||
|
||
] | ||
|
||
{ #category : #'t - mouse handling - events handling' } | ||
TToMouseHandler >> mouseDownEvent: anEvent in: anElement [ | ||
|
||
] | ||
|
||
{ #category : #'t - mouse handling - events handling' } | ||
TToMouseHandler >> mouseEnterEvent: anEvent in: anElement [ | ||
] | ||
|
||
{ #category : #'t - mouse handling - events handling' } | ||
TToMouseHandler >> mouseLeaveEvent: anEvent in: anElement [ | ||
|
||
|
||
] | ||
|
||
{ #category : #'t - mouse handling - events handling' } | ||
TToMouseHandler >> mouseUpEvent: anEvent in: anElement [ | ||
|
||
|
||
] | ||
|
||
{ #category : #'t - mouse handling - install/uninstall hook' } | ||
TToMouseHandler >> onInstalledMouseHandlingIn: anElement [ | ||
|
||
mouseEventListener := ToDresserMouseEventListener new target: anElement; dresser: self; yourself. | ||
anElement addEventHandler: mouseEventListener | ||
] | ||
|
||
{ #category : #'t - mouse handling - install/uninstall hook' } | ||
TToMouseHandler >> onUninstalledMouseHandlingIn: anElement [ | ||
|
||
anElement removeEventHandler: mouseEventListener. | ||
mouseEventListener := nil | ||
|
||
] | ||
|
||
{ #category : #'t - mouse handling - events handling' } | ||
TToMouseHandler >> otherClickEvent: anEvent in: anElement [ | ||
|
||
] | ||
|
||
{ #category : #'t - mouse handling - events handling' } | ||
TToMouseHandler >> otherMouseDownEvent: anEvent in: anElement [ | ||
|
||
] | ||
|
||
{ #category : #'t - mouse handling - events handling' } | ||
TToMouseHandler >> otherMouseUpEvent: anEvent in: anElement [ | ||
|
||
] | ||
|
||
{ #category : #'t - mouse handling - events handling' } | ||
TToMouseHandler >> rightClickEvent: anEvent in: anElement [ | ||
] | ||
|
||
{ #category : #'t - mouse handling - events handling' } | ||
TToMouseHandler >> rightMouseDownEvent: anEvent in: anElement [ | ||
|
||
] | ||
|
||
{ #category : #'t - mouse handling - events handling' } | ||
TToMouseHandler >> rightMouseUpEvent: anEvent in: anElement [ | ||
|
||
] |
12 changes: 6 additions & 6 deletions
12
src/Toplo/ToAbstractElementLook.class.st → src/Toplo/ToAbstractLook.class.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
Class { | ||
#name : #ToAbstractElementLook, | ||
#name : #ToAbstractLook, | ||
#superclass : #Object, | ||
#category : #'Toplo-Core-Theme' | ||
} | ||
|
||
{ #category : #'private event handling' } | ||
ToAbstractElementLook >> elementLookEvent: anEvent [ | ||
ToAbstractLook >> elementLookEvent: anEvent [ | ||
|
||
^ self subclassResponsibility | ||
] | ||
|
||
{ #category : #'event handling' } | ||
ToAbstractElementLook >> installLookEvent: anEvent [ | ||
ToAbstractLook >> installLookEvent: anEvent [ | ||
|
||
|
||
] | ||
|
||
{ #category : #testing } | ||
ToAbstractElementLook >> isNull [ | ||
ToAbstractLook >> isNull [ | ||
|
||
^ false | ||
] | ||
|
||
{ #category : #removing } | ||
ToAbstractElementLook >> removeLook: aLook previous: previousLook [ | ||
ToAbstractLook >> removeLook: aLook previous: previousLook [ | ||
|
||
self subclassResponsibility | ||
] | ||
|
||
{ #category : #'event handling' } | ||
ToAbstractElementLook >> uninstallLookEvent: anEvent [ | ||
ToAbstractLook >> uninstallLookEvent: anEvent [ | ||
|
||
|
||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
Class { | ||
#name : #ToDefaultElementLook, | ||
#superclass : #ToElementLook, | ||
#category : #'Toplo-Core-Theme-Looks' | ||
} | ||
|
||
{ #category : #accessing } | ||
ToDefaultElementLook class >> next: aLook [ | ||
|
||
^ self new next: aLook | ||
] | ||
|
||
{ #category : #'event handling' } | ||
ToDefaultElementLook >> clickLookEvent: anEvent [ | ||
|
||
|
||
] | ||
|
||
{ #category : #'event handling' } | ||
ToDefaultElementLook >> hoveredLookEvent: anEvent [ | ||
|
||
|
||
] | ||
|
||
{ #category : #'event handling' } | ||
ToDefaultElementLook >> initialLookEvent: anEvent [ | ||
|
||
|
||
] | ||
|
||
{ #category : #'event handling' } | ||
ToDefaultElementLook >> installLookEvent: anEvent [ | ||
|
||
super installLookEvent: anEvent | ||
] | ||
|
||
{ #category : #'event handling' } | ||
ToDefaultElementLook >> leavedLookEvent: anEvent [ | ||
|
||
|
||
] | ||
|
||
{ #category : #'event handling' } | ||
ToDefaultElementLook >> pressedLookEvent: anEvent [ | ||
|
||
|
||
] | ||
|
||
{ #category : #'event handling' } | ||
ToDefaultElementLook >> uninstallLookEvent: anEvent [ | ||
|
||
super uninstallLookEvent: anEvent | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.