Skip to content

Commit

Permalink
Merge pull request #41 from hpi-swa-teaching/feature/menu-bar
Browse files Browse the repository at this point in the history
Add menu-bar
  • Loading branch information
martin-schilling committed May 18, 2020
2 parents 6052bd1 + eae0b1b commit f56673a
Show file tree
Hide file tree
Showing 13 changed files with 72 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest ]
smalltalk: [ Squeak64-5.3, Squeak64-5.2, Squeak64-5.1 ]
smalltalk: [ Squeak64-5.3, Squeak64-5.2 ]
experimental: [false]
include:
- smalltalk: Squeak64-trunk
Expand Down
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ os:
smalltalk:
- Squeak-trunk
- Squeak-5.2
- Squeak-5.1

matrix:
allow_failures:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
building
buildWith: aBuilder

| windowSpec |
windowSpec := aBuilder pluggableWindowSpec new
model: self;
children: {self buildEditorTextMorphWith: aBuilder};
label: 'Markdown Editor';
yourself.
^ aBuilder build: windowSpec

windowSpec := self buildWindowWith: aBuilder specs: {
(LayoutFrame fractions: (0 @ 0 corner: 1 @ 0) offsets: (0 @ 0 corner: 0 @ (MarkdownEditorMenuBar height))) -> [MarkdownEditorMenuBar buildWith: aBuilder].
(LayoutFrame fractions: (0 @ 0 corner: 1 @ 1) offsets: (0 @ (MarkdownEditorMenuBar height) corner: 0 @ 0)) -> [self buildEditorTextMorphWith: aBuilder]}.

^ aBuilder build: windowSpec
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
windowTitle

^ 'Markdown Editor'
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"open" : "kgr 4/29/2019 13:18" },
"instance" : {
"buildEditorTextMorphWith:" : "jko 6/25/2019 20:37",
"buildWith:" : "lpf 6/13/2019 15:28",
"buildWith:" : "MK 5/11/2020 14:33",
"markdownText" : "lpf 6/13/2019 15:26",
"markdownText:" : "lpf 6/13/2019 15:27" } }
"markdownText:" : "lpf 6/13/2019 15:27",
"windowTitle" : "MK 5/11/2020 19:00" } }
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
as yet unclassified
buildWith: aBuilder

^ aBuilder pluggablePanelSpec new
layout: #horizontal;
children: {
aBuilder pluggableButtonSpec new
label: 'new';
model: self;
enabled: true;
action: 'MarkdownEditor new' asSymbol;
yourself.
aBuilder pluggableButtonSpec new
label: 'Save';
model: self;
enabled: false;
action: #showNextTip;
yourself.
aBuilder pluggableButtonSpec new
label: 'Options';
model: self;
action: #close;
enabled: false;
yourself };
yourself
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
as yet unclassified
height

^ 2 * Preferences standardButtonFont height
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
as yet unclassified
height

^ Preferences standardButtonFont height * 2
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"class" : {
"buildWith:" : "MK 5/11/2020 14:36",
"height" : "MK 5/11/2020 14:36" },
"instance" : {
"height" : "MK 5/11/2020 14:29" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"category" : "MarkdownEditor-Core",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "",
"instvars" : [
],
"name" : "MarkdownEditorMenuBar",
"pools" : [
],
"super" : "Object",
"type" : "normal" }
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tests - window
testMenuBarExists

self assert: (window submorphs select: [:each | each class = PluggablePanelMorph]) size > 0
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"testApplyingThemeDoesNotThrowErrorForInlineStyling" : "7/1/2019 15:19:29",
"testBuildingEditorReturnsWindow" : "lpf 6/13/2019 15:24",
"testBuildingEditorTextMorphReturnsSpec" : "lpf 6/13/2019 15:29",
"testMenuBarExists" : "MK 5/14/2020 13:04",
"testMenuOpenCommand" : "jst 5/11/2019 19:56",
"testTextPersistenceForBlockStyling" : "jst 6/29/2019 14:39",
"testTextPersistenceForInlineStyling" : "jst 6/29/2019 14:37",
Expand Down

0 comments on commit f56673a

Please sign in to comment.