-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add icon(s) to indicate how to move up the hierarchy
- Loading branch information
1 parent
23f60ed
commit 3c276b3
Showing
23 changed files
with
109 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
An ALGBreadcrumbs is a GUI component that is responsible for displaying the current hierarchy. | ||
|
||
Instance Variables | ||
controller: ALGController reference to ALGController | ||
controller: ALGController reference to ALGController | ||
defaultCrumb: TextMorph default breadcrumb shown on start | ||
navigateBackIconMorph: Morph contains two icons: shift and tab |
4 changes: 4 additions & 0 deletions
4
packages/Algernon.package/ALGBreadcrumbs.class/class/iconInsideSpacing.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 @@ | ||
constants | ||
iconInsideSpacing | ||
|
||
^ 2 |
4 changes: 4 additions & 0 deletions
4
packages/Algernon.package/ALGBreadcrumbs.class/class/iconSpacing.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 @@ | ||
constants | ||
iconSpacing | ||
|
||
^ 8 |
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
13 changes: 13 additions & 0 deletions
13
packages/Algernon.package/ALGBreadcrumbs.class/instance/createNavigateBackIconMorph.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 @@ | ||
initialization | ||
createNavigateBackIconMorph | ||
| shiftIconMorph tabIconMorph | | ||
|
||
shiftIconMorph := self createNavigationIcon: #NavigateBack. | ||
tabIconMorph := self createNavigationIcon: #HasChildren. | ||
shiftIconMorph | ||
position: (self position x + self class crumbSpacing) @ shiftIconMorph position y. | ||
tabIconMorph | ||
position: (shiftIconMorph position x + | ||
shiftIconMorph width + | ||
self class iconInsideSpacing) @ tabIconMorph position y. | ||
^ self packIconsIntoMorph: { shiftIconMorph . tabIconMorph }. |
6 changes: 6 additions & 0 deletions
6
packages/Algernon.package/ALGBreadcrumbs.class/instance/createNavigationIcon..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 @@ | ||
initialization | ||
createNavigationIcon: aSymbol | ||
|
||
^ (ALGIconFactory getInstance loadIconFor: aSymbol) asMorph | ||
height: self height; | ||
center: self center. |
3 changes: 3 additions & 0 deletions
3
packages/Algernon.package/ALGBreadcrumbs.class/instance/defaultCrumb..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,3 @@ | ||
accessing | ||
defaultCrumb: anObject | ||
defaultCrumb := anObject |
3 changes: 3 additions & 0 deletions
3
packages/Algernon.package/ALGBreadcrumbs.class/instance/defaultCrumb.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,3 @@ | ||
accessing | ||
defaultCrumb | ||
^ defaultCrumb |
6 changes: 6 additions & 0 deletions
6
packages/Algernon.package/ALGBreadcrumbs.class/instance/hideNavigateBackIcon.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 @@ | ||
updating | ||
hideNavigateBackIcon | ||
|
||
self navigateBackIconMorph hide. | ||
self defaultCrumb | ||
position: (self position x + self class crumbSpacing) @ self defaultCrumb position y. |
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
10 changes: 5 additions & 5 deletions
10
packages/Algernon.package/ALGBreadcrumbs.class/instance/initializeDefaultCrumb.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 @@ | ||
initialization | ||
initializeDefaultCrumb | ||
|
||
| crumb | | ||
crumb := self createCrumb: ALGCore title. | ||
crumb center: self center. | ||
crumb position: (self position x + self class crumbSpacing) @ crumb position y. | ||
self addMorphBack: crumb; updateWidth | ||
self defaultCrumb: (self createCrumb: ALGCore title). | ||
self defaultCrumb center: self center. | ||
self defaultCrumb | ||
position: (self position x + self class crumbSpacing) @ self defaultCrumb position y. | ||
self addMorphBack: self defaultCrumb; updateWidth |
5 changes: 5 additions & 0 deletions
5
packages/Algernon.package/ALGBreadcrumbs.class/instance/initializeNavigateBackIcon.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 @@ | ||
initialization | ||
initializeNavigateBackIcon | ||
|
||
self navigateBackIconMorph: self createNavigateBackIconMorph. | ||
self addMorphBack: self navigateBackIconMorph. |
3 changes: 3 additions & 0 deletions
3
packages/Algernon.package/ALGBreadcrumbs.class/instance/navigateBackIconMorph..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,3 @@ | ||
accessing | ||
navigateBackIconMorph: anObject | ||
navigateBackIconMorph := anObject |
3 changes: 3 additions & 0 deletions
3
packages/Algernon.package/ALGBreadcrumbs.class/instance/navigateBackIconMorph.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,3 @@ | ||
accessing | ||
navigateBackIconMorph | ||
^ navigateBackIconMorph |
7 changes: 7 additions & 0 deletions
7
packages/Algernon.package/ALGBreadcrumbs.class/instance/packIconsIntoMorph..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,7 @@ | ||
initialization | ||
packIconsIntoMorph: aMorphCollection | ||
|
||
^ Morph new | ||
color: Color transparent; | ||
addAllMorphsBack: aMorphCollection; | ||
hide. |
10 changes: 10 additions & 0 deletions
10
packages/Algernon.package/ALGBreadcrumbs.class/instance/showNavigateBackIcon.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 @@ | ||
updating | ||
showNavigateBackIcon | ||
|
||
self navigateBackIconMorph show. | ||
self defaultCrumb | ||
position: ( | ||
self position x + | ||
self class crumbSpacing + | ||
self class iconSpacing + | ||
self navigateBackIconMorph width) @ self defaultCrumb position y |
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
1 change: 1 addition & 0 deletions
1
packages/Algernon.package/ALGCore.class/instance/showChildList.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
1 change: 1 addition & 0 deletions
1
packages/Algernon.package/ALGCore.class/instance/showParentList.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
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