-
Notifications
You must be signed in to change notification settings - Fork 0
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
Lasse Steffen
committed
Jun 4, 2018
1 parent
40ce4f6
commit b72c92f
Showing
19 changed files
with
92 additions
and
27 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
packages/Material-Core.package/MDMenu.class/class/defaultWidth.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 @@ | ||
default properties | ||
defaultWidth | ||
|
||
^ 320 |
10 changes: 10 additions & 0 deletions
10
packages/Material-Core.package/MDMenu.class/instance/add.target.selector.arguments..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,10 @@ | ||
construction | ||
add: aString target: aTarget selector: aSymbol arguments: aArgList | ||
|
||
| item | | ||
item := MDMenuItem new | ||
text: aString; | ||
target: aTarget; | ||
actionSelector: aSymbol; | ||
arguments: aArgList. | ||
self addMorphBack: item. |
13 changes: 13 additions & 0 deletions
13
...es/Material-Core.package/MDMenu.class/instance/add.target.selector.arguments.position..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,13 @@ | ||
construction | ||
add: aString target: aTarget selector: aSymbol arguments: aArgList position: aPosition | ||
|
||
| item | | ||
item := MDMenuItem new | ||
text: aString; | ||
target: aTarget; | ||
actionSelector: aSymbol; | ||
arguments: aArgList. | ||
self addMorphBack: item. | ||
item width: self width. | ||
item bounds: (item bounds origin x @ (item bounds origin y + ((aPosition - 1) * item height)) corner: | ||
item bounds corner x @ (item bounds corner y + ((aPosition - 1) * item height))) |
4 changes: 4 additions & 0 deletions
4
packages/Material-Core.package/MDMenu.class/instance/addLine.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 @@ | ||
construction | ||
addLine | ||
|
||
self flag: #refactor |
12 changes: 3 additions & 9 deletions
12
packages/Material-Core.package/MDMenu.class/instance/addMenuItem..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,9 +1,3 @@ | ||
initialization | ||
addMenuItem: aPosition | ||
|
||
| item | | ||
item := MDMenuItem new. | ||
item width: self width. | ||
self addMorphBack: item. | ||
item bounds: (item bounds origin x @ (item bounds origin y + ((aPosition - 1) * item height)) corner: | ||
item bounds corner x @ (item bounds corner y + ((aPosition - 1) * item height))) | ||
construction | ||
addMenuItem: aMDMenuItemMorph | ||
self addMorphBack: aMDMenuItemMorph |
7 changes: 0 additions & 7 deletions
7
packages/Material-Core.package/MDMenu.class/instance/addMenuItem.st
This file was deleted.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
packages/Material-Core.package/MDMenu.class/instance/handlesMouseDown..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 @@ | ||
event handling | ||
handlesMouseDown: evt | ||
|
||
^ true |
5 changes: 5 additions & 0 deletions
5
packages/Material-Core.package/MDMenu.class/instance/hasItems.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,5 @@ | ||
accessing | ||
hasItems | ||
"Answer if the receiver has menu items" | ||
^ submorphs | ||
anySatisfy: [:each | each isKindOf: MDMenuItem] |
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
9 changes: 9 additions & 0 deletions
9
packages/Material-Core.package/MDMenu.class/instance/initializeExample.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,9 @@ | ||
initialization | ||
initializeExample | ||
|
||
1 to: 5 do: [:x | self add: 'Hey' | ||
target: 'key' | ||
selector: 'e' | ||
arguments: 'e' | ||
position: x.]. | ||
|
4 changes: 4 additions & 0 deletions
4
packages/Material-Core.package/MDMenu.class/instance/items.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 @@ | ||
accessing | ||
items | ||
|
||
^ submorphs select: [:m | m isKindOf: MDMenuItem ] |
6 changes: 6 additions & 0 deletions
6
packages/Material-Core.package/MDMenu.class/instance/lastItem.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,6 @@ | ||
accessing | ||
lastItem | ||
|
||
submorphs reverseDo: [ :each | | ||
(each isKindOf: MDMenuItem) ifTrue: [ ^each ] ]. | ||
^submorphs last |
5 changes: 5 additions & 0 deletions
5
packages/Material-Core.package/MDMenu.class/instance/mouseDown..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,5 @@ | ||
event handling | ||
mouseDown: evt | ||
|
||
(self fullContainsPoint: evt position) | ||
ifFalse: [self delete] |
4 changes: 4 additions & 0 deletions
4
packages/Material-Core.package/MDMenu.class/instance/numItems.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 @@ | ||
accessing | ||
numItems | ||
|
||
^ self items size |
2 changes: 1 addition & 1 deletion
2
packages/Material-Core.package/MDMenu.class/instance/updateBounds.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 @@ | ||
accessing | ||
updateBounds | ||
|
||
self bounds: (self bounds origin extent: (self width @ self height)) | ||
self bounds: (self bounds origin extent: (self class defaultWidth @ self height)) |
4 changes: 0 additions & 4 deletions
4
packages/Material-Core.package/MDMenu.class/instance/width.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
4 changes: 4 additions & 0 deletions
4
packages/Material-Core.package/MDMenuItem.class/class/defaultBorderRadius.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 @@ | ||
as yet unclassified | ||
defaultBorderRadius | ||
|
||
^ 0 |
1 change: 1 addition & 0 deletions
1
packages/Material-Core.package/MDMenuItem.class/methodProperties.json
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