-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
60a7111
commit bea8fbf
Showing
99 changed files
with
327 additions
and
313 deletions.
There are no files selected for viewing
62 changes: 27 additions & 35 deletions
62
packages/WindowAcrobatics-Core.package/PasteUpMorph.extension/instance/filterEvent.for..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,40 +1,32 @@ | ||
*WindowAcrobatics-Core-Events-override | ||
filterEvent: mouseOrKeyboardEvent for: anObject | ||
filterEvent: aKeyboardEvent for: anObject | ||
"Provide keyboard shortcuts." | ||
|
||
"1) Mouse shortcuts" | ||
mouseOrKeyboardEvent isMouse ifTrue: [ | ||
"Delegate keyboard shortcuts to my docking bars." | ||
self submorphsDo: [:ea | ea isDockingBar ifTrue: [ | ||
ea filterEvent: aKeyboardEvent for: anObject. "No support for converting events here!" | ||
aKeyboardEvent wasIgnored ifTrue: [^ aKeyboardEvent "early out"]]]. | ||
|
||
"Only accept mouse down, no up." | ||
mouseOrKeyboardEvent isMouseDown | ||
ifFalse: [^ mouseOrKeyboardEvent]. | ||
|
||
mouseOrKeyboardEvent blueButtonPressed | ||
ifTrue: [ self tryInvokeHalo: mouseOrKeyboardEvent] | ||
ifFalse: [mouseOrKeyboardEvent controlKeyPressed | ||
ifTrue: [self tryInvokeMetaMenu: mouseOrKeyboardEvent]]. | ||
|
||
^ mouseOrKeyboardEvent]. | ||
|
||
"2) Keyboard shortcuts" | ||
mouseOrKeyboardEvent isKeyboard ifTrue: [ | ||
|
||
"Delegate keyboard shortcuts to my docking bars." | ||
self submorphsDo: [:ea | ea isDockingBar ifTrue: [ | ||
ea filterEvent: mouseOrKeyboardEvent for: anObject. "No support for converting events here!" | ||
mouseOrKeyboardEvent wasIgnored ifTrue: [^ mouseOrKeyboardEvent "early out"]]]. | ||
|
||
"Only accept key strokes as shortcuts, no down/up." | ||
mouseOrKeyboardEvent isKeystroke | ||
ifFalse: [^ mouseOrKeyboardEvent]. | ||
|
||
"Window Acrobatics Key Handling" | ||
mouseOrKeyboardEvent commandKeyPressed ifTrue: [ | ||
(WAHandler handle: mouseOrKeyboardEvent) ifTrue: [^ mouseOrKeyboardEvent ignore "hit!"]. | ||
aKeyboardEvent isKeystroke | ||
ifFalse: [^ aKeyboardEvent]. | ||
|
||
aKeyboardEvent commandKeyPressed ifTrue: [ | ||
(WAHandler new handle: aKeyboardEvent) ifTrue: [^ aKeyboardEvent ignore "hit!"]. | ||
]. | ||
|
||
self tryInvokeKeyboardShortcut: mouseOrKeyboardEvent. | ||
|
||
^ mouseOrKeyboardEvent]. | ||
|
||
"Should not be necessary if this filter is correctly configured." | ||
^ mouseOrKeyboardEvent | ||
aKeyboardEvent commandKeyPressed ifTrue: [ | ||
aKeyboardEvent keyCharacter caseOf: { | ||
[$R] -> [Utilities browseRecentSubmissions. Transcript show: 'Hello']. | ||
[$L] -> [self findAFileList: aKeyboardEvent]. | ||
[$O] -> [self findAMonticelloBrowser]. | ||
[$P] -> [self findAPreferencesPanel: aKeyboardEvent]. | ||
"[$Z] -> [ChangeList browseRecentLog]." | ||
[$]] -> [Smalltalk snapshot: true andQuit: false]. | ||
[$+] -> [Preferences increaseFontSize]. | ||
[$-] -> [Preferences decreaseFontSize]. | ||
[$=] -> [Preferences restoreDefaultFonts]. | ||
} otherwise: [^ aKeyboardEvent "no hit"]. | ||
|
||
^ aKeyboardEvent ignore "hit!"]. | ||
|
||
^ aKeyboardEvent "no hit" |
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
2 changes: 1 addition & 1 deletion
2
packages/WindowAcrobatics-Core.package/WAAligner.class/instance/windowsInCurrentSpace.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,4 +1,4 @@ | ||
util | ||
windowsInCurrentSpace | ||
|
||
^ ActiveWorld submorphs select: [ :w | w isSystemWindow and: w position x >= 0 and: w position x < ActiveWorld extent x ] | ||
^ ActiveWorld submorphs select: [ :w | w isSystemWindow and: [ w position x between: 0 and: ActiveWorld extent x ]] |
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
6 changes: 4 additions & 2 deletions
6
...indowAcrobatics-Core.package/WAExpose.class/instance/addNumberToVisualization.colored..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,6 +1,8 @@ | ||
visualization | ||
addNumberToVisualization: aNumber colored: aColor | ||
|
||
self visualization addMorphBack: (StringMorph new contents: aNumber asString; | ||
self visualization addMorphBack: | ||
(StringMorph new | ||
contents: aNumber asString; | ||
color: aColor; | ||
font: (StrikeFont familyName: 'ComicSansMS' pointSize: 36 emphasized: 1)). | ||
font: self defaultFont). |
2 changes: 1 addition & 1 deletion
2
packages/WindowAcrobatics-Core.package/WAExpose.class/instance/addThumbnailsToCurrentPage.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,4 +1,4 @@ | ||
pages | ||
addThumbnailsToCurrentPage | ||
|
||
(self pageDict at: self currentPage) do: [:thmb | self addMorphBack: thmb]. | ||
(self pageDict at: self currentPage) do: [ :thmb | self addMorphBack: thmb ]. |
4 changes: 4 additions & 0 deletions
4
packages/WindowAcrobatics-Core.package/WAExpose.class/instance/changePageVisualizationTo..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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
visualization | ||
changePageVisualizationTo: aColor | ||
|
||
(self visualization submorphs at: self currentPage) color: aColor. |
4 changes: 4 additions & 0 deletions
4
packages/WindowAcrobatics-Core.package/WAExpose.class/instance/defaultFont.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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
defaults | ||
defaultFont | ||
|
||
^ StrikeFont familyName: 'ComicSansMS' pointSize: 36 emphasized: 1 |
4 changes: 4 additions & 0 deletions
4
packages/WindowAcrobatics-Core.package/WAExpose.class/instance/defaultInstructionMessage.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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
defaults | ||
defaultInstructionMessage | ||
|
||
^ 'Hit [Esc] to close. Use ArrowUp and ArrowDown to navigate between the pages' |
4 changes: 4 additions & 0 deletions
4
...indowAcrobatics-Core.package/WAExpose.class/instance/defaultInstructionMessagePosition.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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
defaults | ||
defaultInstructionMessagePosition | ||
|
||
^ 10 @ 10 |
2 changes: 1 addition & 1 deletion
2
packages/WindowAcrobatics-Core.package/WAExpose.class/instance/defaultVisualizationExtent.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,4 +1,4 @@ | ||
visualization | ||
defaultVisualizationExtent | ||
|
||
^ 45@ActiveWorld extent y. | ||
^ 45 @ ActiveWorld height |
2 changes: 1 addition & 1 deletion
2
...ges/WindowAcrobatics-Core.package/WAExpose.class/instance/defaultVisualizationPosition.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,4 +1,4 @@ | ||
visualization | ||
defaultVisualizationPosition | ||
|
||
^ ActiveWorld extent x - 45 @ 0. | ||
^ ActiveWorld width - 45 @ 0 |
2 changes: 1 addition & 1 deletion
2
...es/WindowAcrobatics-Core.package/WAExpose.class/instance/deleteThumbnailsOnCurrentPage.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,4 +1,4 @@ | ||
pages | ||
deleteThumbnailsOnCurrentPage | ||
|
||
self thumbnailsOnPage do: [:thmb|thmb delete]. | ||
self thumbnailsOnPage do: [ :thmb | thmb delete ]. |
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
4 changes: 0 additions & 4 deletions
4
packages/WindowAcrobatics-Core.package/WAExpose.class/instance/equatePageInVisualization.st
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
packages/WindowAcrobatics-Core.package/WAExpose.class/instance/firstPage.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,4 +1,4 @@ | ||
pages | ||
firstPage | ||
|
||
^ self currentPage <= 1. | ||
^ self currentPage <= 1 |
4 changes: 0 additions & 4 deletions
4
...es/WindowAcrobatics-Core.package/WAExpose.class/instance/highlightPageInVisualiszation.st
This file was deleted.
Oops, something went wrong.
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
1 change: 1 addition & 0 deletions
1
packages/WindowAcrobatics-Core.package/WAExpose.class/instance/numberOfWindowsOnPage..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,3 +1,4 @@ | ||
accessing | ||
numberOfWindowsOnPage: anObject | ||
|
||
numberOfWindowsOnPage := anObject |
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
4 changes: 4 additions & 0 deletions
4
packages/WindowAcrobatics-Core.package/WAExpose.class/instance/selectionRectancleOutset.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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
defaults | ||
selectionRectancleOutset | ||
|
||
^ 6 @ 43 corner: 6 @ 6 |
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
2 changes: 1 addition & 1 deletion
2
packages/WindowAcrobatics-Core.package/WAExpose.class/instance/thumbnailsOnPage.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,4 +1,4 @@ | ||
pages | ||
thumbnailsOnPage | ||
|
||
^ self submorphs copyWithout: selectionRectangle. | ||
^ self submorphs copyWithout: selectionRectangle |
8 changes: 4 additions & 4 deletions
8
packages/WindowAcrobatics-Core.package/WAExpose.class/instance/windowFromNextPage..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,8 +1,8 @@ | ||
pages | ||
windowFromNextPage: aNumber | ||
|
||
aNumber > self numberPages ifTrue: [(self pageDict at: aNumber - 1) isEmpty ifTrue: [self pageDict removeKey: aNumber - 1. | ||
self deletePageInVisualization: aNumber - 1]] | ||
ifFalse: [| wnd | wnd := (self pageDict at: aNumber) removeFirst. (self pageDict at: aNumber - 1) addLast: wnd. | ||
^ self windowFromNextPage: aNumber + 1 ]. | ||
aNumber > self numberPages | ||
ifTrue: [(self pageDict at: aNumber - 1) isEmpty ifTrue: [self pageDict removeKey: aNumber - 1. | ||
self deletePageInVisualization: aNumber - 1]] | ||
ifFalse: [| wnd | wnd := (self pageDict at: aNumber) removeFirst. (self pageDict at: aNumber - 1) addLast: wnd. ^ self windowFromNextPage: aNumber + 1 ]. | ||
|
2 changes: 1 addition & 1 deletion
2
packages/WindowAcrobatics-Core.package/WAExpose.class/instance/windowsInCurrentSpace.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,4 +1,4 @@ | ||
spaces | ||
windowsInCurrentSpace | ||
|
||
^ ActiveWorld submorphs select: [ :w | w isSystemWindow and: w position x >= 0 and: [w position x < ActiveWorld extent x]]. | ||
^ ActiveWorld submorphs select: [ :w | w isSystemWindow and: [ w position x between: 0 and: ActiveWorld extent x ]] |
Oops, something went wrong.