diff --git a/repository/Grafoscopio/FileUtils.class.st b/repository/Grafoscopio/FileUtils.class.st index 411aa0d..f32a7b8 100644 --- a/repository/Grafoscopio/FileUtils.class.st +++ b/repository/Grafoscopio/FileUtils.class.st @@ -4,7 +4,7 @@ I provide some convenience functionality to work with files. Class { #name : #FileUtils, #superclass : #Object, - #category : #'Grafoscopio-Model' + #category : 'Grafoscopio-Model' } { #category : #utilities } diff --git a/repository/Grafoscopio/FontAwesomeIcons.class.st b/repository/Grafoscopio/FontAwesomeIcons.class.st index b8d6107..089875f 100644 --- a/repository/Grafoscopio/FontAwesomeIcons.class.st +++ b/repository/Grafoscopio/FontAwesomeIcons.class.st @@ -32,7 +32,7 @@ Class { #classVars : [ 'Current' ], - #category : #'Grafoscopio-UI' + #category : 'Grafoscopio-UI' } { #category : #'accessing - icons' } diff --git a/repository/Grafoscopio/GfUIHelpers.class.st b/repository/Grafoscopio/GfUIHelpers.class.st index 58355d6..d87d1ed 100644 --- a/repository/Grafoscopio/GfUIHelpers.class.st +++ b/repository/Grafoscopio/GfUIHelpers.class.st @@ -24,7 +24,7 @@ Class { 'recentNotebooks', 'helpMenu' ], - #category : #'Grafoscopio-UI' + #category : 'Grafoscopio-UI' } { #category : #adding } diff --git a/repository/Grafoscopio/GfWorldMenu.class.st b/repository/Grafoscopio/GfWorldMenu.class.st index 9cd2c07..b475fff 100644 --- a/repository/Grafoscopio/GfWorldMenu.class.st +++ b/repository/Grafoscopio/GfWorldMenu.class.st @@ -7,7 +7,7 @@ Class { #classInstVars : [ 'recentNotebooks' ], - #category : #'Grafoscopio-UI' + #category : 'Grafoscopio-UI' } { #category : #'world menu' } @@ -69,6 +69,7 @@ GfWorldMenu class >> launchCompatibilityMenuOn: aBuilder [ { #category : #'world menu' } GfWorldMenu class >> launchMenuOn: aBuilder [ + (aBuilder item: #'New notebook') label: 'New notebook'; order: 1; diff --git a/repository/Grafoscopio/GlamourPresentationModel.class.st b/repository/Grafoscopio/GlamourPresentationModel.class.st index d5d959b..d77d96b 100644 --- a/repository/Grafoscopio/GlamourPresentationModel.class.st +++ b/repository/Grafoscopio/GlamourPresentationModel.class.st @@ -25,7 +25,7 @@ Class { 'presentation', 'glmPres' ], - #category : #'Grafoscopio-UI' + #category : 'Grafoscopio-UI' } { #category : #specs } diff --git a/repository/Grafoscopio/GrafoscopioAbstractNode.class.st b/repository/Grafoscopio/GrafoscopioAbstractNode.class.st index 160451a..bf61245 100644 --- a/repository/Grafoscopio/GrafoscopioAbstractNode.class.st +++ b/repository/Grafoscopio/GrafoscopioAbstractNode.class.st @@ -9,7 +9,7 @@ Class { 'parent', 'tags' ], - #category : #'Grafoscopio-Model' + #category : 'Grafoscopio-Model' } { #category : #'add/remove nodes' } @@ -37,7 +37,7 @@ GrafoscopioAbstractNode >> addTag: aTag [ { #category : #exporting } GrafoscopioAbstractNode >> asTreeNodePresenter [ | node | - node := TreeNodePresenter new. + node := SpTreeNodePresenter new. node hasChildren: [ false ]; children: [ {} ]; diff --git a/repository/Grafoscopio/GrafoscopioButtonModel.class.st b/repository/Grafoscopio/GrafoscopioButtonModel.class.st index 2e0db13..62ee023 100644 --- a/repository/Grafoscopio/GrafoscopioButtonModel.class.st +++ b/repository/Grafoscopio/GrafoscopioButtonModel.class.st @@ -10,7 +10,7 @@ Class { #instVars : [ 'button' ], - #category : #'Grafoscopio-UI' + #category : 'Grafoscopio-UI' } { #category : #specs } diff --git a/repository/Grafoscopio/GrafoscopioCodeModel.class.st b/repository/Grafoscopio/GrafoscopioCodeModel.class.st index 6b6bd87..9b59645 100644 --- a/repository/Grafoscopio/GrafoscopioCodeModel.class.st +++ b/repository/Grafoscopio/GrafoscopioCodeModel.class.st @@ -4,17 +4,18 @@ embedded interactive Playground. " Class { #name : #GrafoscopioCodeModel, - #superclass : #ComposablePresenter, + #superclass : #SpPresenter, #instVars : [ 'body' ], - #category : #'Grafoscopio-UI' + #category : 'Grafoscopio-UI' } { #category : #specs } GrafoscopioCodeModel class >> defaultSpec [ - - ^ SpecLayout composed add: #body + ^ SpBoxLayout newVertical + add: #body; + yourself ] { #category : #accessing } diff --git a/repository/Grafoscopio/GrafoscopioCodeNode.class.st b/repository/Grafoscopio/GrafoscopioCodeNode.class.st index dcecc81..f323f7e 100644 --- a/repository/Grafoscopio/GrafoscopioCodeNode.class.st +++ b/repository/Grafoscopio/GrafoscopioCodeNode.class.st @@ -5,7 +5,7 @@ Class { 'icon', 'body' ], - #category : #'Grafoscopio-Model' + #category : 'Grafoscopio-Model' } { #category : #adding } diff --git a/repository/Grafoscopio/GrafoscopioDocs.class.st b/repository/Grafoscopio/GrafoscopioDocs.class.st index 05d8797..c5c0d5d 100644 --- a/repository/Grafoscopio/GrafoscopioDocs.class.st +++ b/repository/Grafoscopio/GrafoscopioDocs.class.st @@ -4,7 +4,7 @@ I define the documentation for the Grafoscopio package. Class { #name : #GrafoscopioDocs, #superclass : #GrafoscopioDocumentation, - #category : #Grafoscopio + #category : 'Grafoscopio' } { #category : #operation } diff --git a/repository/Grafoscopio/GrafoscopioLinksList.class.st b/repository/Grafoscopio/GrafoscopioLinksList.class.st index dbb3019..2f540e9 100644 --- a/repository/Grafoscopio/GrafoscopioLinksList.class.st +++ b/repository/Grafoscopio/GrafoscopioLinksList.class.st @@ -9,12 +9,12 @@ Class { #instVars : [ 'links' ], - #category : #'Grafoscopio-UI' + #category : 'Grafoscopio-UI' } { #category : #specs } GrafoscopioLinksList class >> defaultSpec [ - ^ SpecLayout composed + ^ SpLayout composed add: #links; yourself ] diff --git a/repository/Grafoscopio/GrafoscopioNewNotebook.class.st b/repository/Grafoscopio/GrafoscopioNewNotebook.class.st index 3bf2e27..88ec2b0 100644 --- a/repository/Grafoscopio/GrafoscopioNewNotebook.class.st +++ b/repository/Grafoscopio/GrafoscopioNewNotebook.class.st @@ -10,7 +10,7 @@ nb openWithSpec " Class { #name : #GrafoscopioNewNotebook, - #superclass : #ComposablePresenter, + #superclass : #SpPresenter, #instVars : [ 'tree', 'header', @@ -26,7 +26,7 @@ Class { #classInstVars : [ 'recents' ], - #category : #'Grafoscopio-UI' + #category : 'Grafoscopio-UI' } { #category : #utility } @@ -39,22 +39,21 @@ GrafoscopioNewNotebook class >> SHA1For: aFile is: aSHA1String [ { #category : #specs } GrafoscopioNewNotebook class >> defaultSpec [ - - ^ SpecLayout composed - newColumn: [:tcol| - tcol newRow: [ :wrow | wrow add: #windowMainMenu ] height: (self toolbarHeight); - newRow: [:row | - row newColumn: [ :tc | - tc add: #tree - ] width: 300. - row newColumn: [ :bc | - bc newRow: [ :bcr | bcr add: #header ] height: self toolbarHeight. - bc add: #body; add: #links height: self toolbarHeight ]]] -] - -{ #category : #'instance creation' } -GrafoscopioNewNotebook class >> initialize [ - recents := Set new. + ^ SpBoxLayout newVertical + add: #windowMainMenu + withConstraints: [ :constraints | constraints height: self toolbarHeight ]; + add: + (SpPanedLayout newHorizontal + position: 250; + add: #tree; + add: + (SpBoxLayout newVertical + add: #header height: self toolbarHeight; + add: #body; + add: #links height: self toolbarHeight; + yourself); + yourself); + yourself ] { #category : #'instance creation' } @@ -74,7 +73,7 @@ GrafoscopioNewNotebook class >> open: aFileReference [ { #category : #'instance creation' } GrafoscopioNewNotebook class >> recents [ - ^ recents + ^ recents ifNil: [ recents := Set new. ] ] { #category : #'instance creation' } @@ -117,25 +116,24 @@ GrafoscopioNewNotebook >> askToSaveBeforeClosing [ GrafoscopioNewNotebook >> autoSaveBodyOf: aNode [ | playground bodyContents | bodyContents := aNode content. - self body class = GrafoscopioTextModel - ifTrue: [ self body body whenTextChanged: [ :arg | - aNode content: arg. - "self body body whenTextIsAccepted: [:bodyText | + self body class = GrafoscopioTextModel + ifTrue: [ self body body + whenTextChangedDo: [ :arg | + aNode content: arg. + "self body body whenTextIsAccepted: [:bodyText | self inform: bodyText. aNode updateEditionTimestamp ]." - bodyContents = arg ifFalse: [ - "self inform: arg." - "aNode updateEditionTimestamp" ]]]. + bodyContents = arg + ifFalse: [ "self inform: arg.""aNode updateEditionTimestamp" ] ] ]. self body body class = GlamourPresentationModel ifFalse: [ ^ self ]. playground := self body body glmPres. playground onChangeOfPort: #text act: [ :x | - aNode content: (x pane port: #entity) value content. + aNode content: (x pane port: #entity) value content "aNode updateEditionTimestamp." "self inform: aNode edited" ] - ] { #category : #accessing } @@ -178,8 +176,8 @@ GrafoscopioNewNotebook >> content [ { #category : #'editing nodes' } GrafoscopioNewNotebook >> copyNodeToClipboard [ - tree highlightedItem content copyToClipboard. - self notebookContent: notebook. + tree selectedItem copyToClipboard. + self notebookContent: notebook ] { #category : #persistence } @@ -200,11 +198,10 @@ GrafoscopioNewNotebook >> createNewExample [ { #category : #operation } GrafoscopioNewNotebook >> currentNode [ - ^ tree highlightedItem + ^ tree selectedItem ifNil: [ notebook children ifEmpty: [ notebook root ] ifNotEmpty: [ notebook children first ] ] - ifNotNil: [ :v | v content ] ] { #category : #operation } @@ -251,7 +248,7 @@ GrafoscopioNewNotebook >> defineDebugMessageUI [ { #category : #'editing nodes' } GrafoscopioNewNotebook >> demoteNode [ | editedNode | - editedNode := tree highlightedItem content. + editedNode := tree selectedItem. editedNode demote. self notebookContent: notebook. ] @@ -265,13 +262,22 @@ GrafoscopioNewNotebook >> downloadImages [ locations." | parentFolder | - parentFolder := self workingFile parent. - self. - ^ self imagesList do: [ :each | | relativePathString link | - link := each contents asUrl. - relativePathString := link directory. - relativePathString ifNotEmpty: [ - GrafoscopioUtils ensureCreateDirectory: relativePathString into: parentFolder ]] + parentFolder := UIManager default + chooseDirectory: 'Please, choose a destination for the images' + from: + (self workingFile + ifNil: [ FileLocator home ] + ifNotNil: [ self workingFile parent ]). + parentFolder + ifNotNil: [ ^ self imagesList + do: [ :each | + | relativePathString link | + link := each contents asUrl. + relativePathString := link directory. + relativePathString + ifNotEmpty: [ GrafoscopioUtils + ensureCreateDirectory: relativePathString + into: parentFolder ] ] ] ] { #category : #persistence } @@ -432,7 +438,7 @@ GrafoscopioNewNotebook >> extent [ { #category : #'as yet unclassified' } GrafoscopioNewNotebook >> findAndReplace [ | currentNode replaceGUI findString replaceString | - currentNode := tree highlightedItem content. + currentNode := tree selectedItem. replaceGUI := GrafoscopioReplace new. replaceGUI openWithSpec. replaceGUI ok @@ -500,12 +506,12 @@ GrafoscopioNewNotebook >> importImages [ GrafoscopioNewNotebook >> importLinkContent [ "I see if a node link is an url located at 'http://ws.stfx.eu', wich means that is a shared workspace, and convert the node body to an interactive playground" - | currentNode nodeContent | - currentNode := tree highlightedItem. + + | currentNode | + currentNode := tree selectedItem. currentNode ifNil: [ ^ self ]. - nodeContent := currentNode content. - nodeContent importPlaygroundLink. - nodeContent importHtmlLink. + currentNode importPlaygroundLink. + currentNode importHtmlLink. self updateBodyFor: currentNode ] @@ -522,21 +528,19 @@ GrafoscopioNewNotebook >> initialize [ { #category : #initialization } GrafoscopioNewNotebook >> initializePresenter [ tree - whenHighlightedItemChanged: - [ :item | tree highlightedItem ifNotNil: [ self updateBodyFor: item content ] ]. - tree - whenTreeUpdated: [ :item | item ifNotNil: [ self updateBodyFor: item ] ]. + whenActivatedDo: + [ :selection | selection ifNotNil: [ self updateBodyFor: selection selectedItem ] ]. header - whenTextChanged: [ :arg | - tree highlightedItem content header = arg - ifFalse: [ tree highlightedItem content header: arg. - tree highlightedItem content updateEditionTimestamp. + whenTextChangedDo: [ :arg | + tree selectedItem header = arg + ifFalse: [ tree selectedItem header: arg. + tree selectedItem updateEditionTimestamp. tree roots: tree roots ] ]. links - whenTextChanged: [ :arg | - (tree highlightedItem content respondsTo: #link:) - ifTrue: [ tree highlightedItem content link: arg. - tree highlightedItem content updateEditionTimestamp ] ] + whenTextChangedDo: [ :arg | + (tree respondsTo: #link:) + ifTrue: [ tree selectedItem link: arg. + tree selectedItem updateEditionTimestamp ] ] ] { #category : #initialization } @@ -545,21 +549,22 @@ GrafoscopioNewNotebook >> initializeWidgets [ header := self newTextInput. header autoAccept: true. body := self newText. - body class logCr. + body class traceCr. body disable. body text: '<- Select a node'. body autoAccept: true. links := self newTextInput. - tree := self newTree. - tree - childrenBlock: [:node | node children]; - displayBlock: [:node | node title ]. - self focusOrder + tree := self newTreeTable. + tree addColumn: (SpStringTableColumn evaluated: #title). + " tree + childrenBlock: [ :node | node children value ]; + displayBlock: [ :node | node title value ]." + self focusOrder add: tree; add: header; add: body; add: links. - self askOkToClose: true. + self askOkToClose: true ] { #category : #persistence } @@ -596,7 +601,7 @@ GrafoscopioNewNotebook >> links: anObject [ { #category : #'as yet unclassified' } GrafoscopioNewNotebook >> linksList [ | currentNode | - currentNode := tree highlightedItem content. + currentNode := tree selectedItem. GrafoscopioLinksList new content: currentNode; openWithSpec @@ -652,16 +657,16 @@ GrafoscopioNewNotebook >> metadata [ { #category : #'editing nodes' } GrafoscopioNewNotebook >> moveSelectedNodeDown [ | editedNode | - editedNode := tree selectedItem content. + editedNode := tree selectedItem. editedNode moveDown. self notebookContent: notebook. - tree needRebuild: true. + tree needRebuild: true ] { #category : #'editing nodes' } GrafoscopioNewNotebook >> moveSelectedNodeUp [ | editedNode | - editedNode := tree highlightedItem content. + editedNode := tree selectedItem. editedNode moveUp. self notebookContent: notebook ] @@ -702,13 +707,12 @@ GrafoscopioNewNotebook >> notebook: anObject [ { #category : #api } GrafoscopioNewNotebook >> notebookContent: aTree [ - tree - roots: (aTree children collect: [ :gfcNode | gfcNode asTreeNodePresenter ]) + tree roots: aTree children ] { #category : #initialization } GrafoscopioNewNotebook >> notebookSubMenu [ - ^ MenuPresenter new + ^ SpMenuBarPresenter new addGroup: [ :group | group addItem: [ :item | @@ -875,7 +879,7 @@ GrafoscopioNewNotebook >> pandocOptionsComputed [ { #category : #'editing nodes' } GrafoscopioNewNotebook >> pasteNodeFromClipboard [ - tree highlightedItem content pasteFromClipboard. + tree selectedItem pasteFromClipboard. self notebookContent: notebook. ] @@ -933,24 +937,26 @@ GrafoscopioNewNotebook >> projectSubMenu [ { #category : #'editing nodes' } GrafoscopioNewNotebook >> promoteNode [ | editedNote | - editedNote := tree selectedItem content. + editedNote := tree selectedItem. editedNote promote. self notebookContent: notebook ] { #category : #'editing nodes' } GrafoscopioNewNotebook >> removeNode [ - | contentToDelete parentContent newSelectedContent children | + | contentToDelete parentContent newSelectedContent children path | tree selectedItem ifNil: [ ^ self inform: 'No node available or properly selected ' ]. - contentToDelete := tree selectedItem content. + + path := tree selection selectedPath. + contentToDelete := tree selectedItem. contentToDelete shouldAskBeforeRemove ifTrue: [ (UIManager default questionWithoutCancel: 'The selected node has children and / or content. This change so far cannot be undone. Are you sure you want to proceed? ' title: 'Remove node') ifFalse: [ ^ self ] ]. - parentContent := contentToDelete parent. + parentContent := tree selectedItem parent. children := parentContent children. children size > 1 ifTrue: [ children last = contentToDelete @@ -958,7 +964,7 @@ GrafoscopioNewNotebook >> removeNode [ ifFalse: [ newSelectedContent := parentContent ]. contentToDelete parent removeNode: contentToDelete. self notebookContent: notebook. - self resetSelectedItem + self resetSelectedItemTo: path. ] { #category : #'editing nodes' } @@ -968,6 +974,12 @@ GrafoscopioNewNotebook >> resetSelectedItem [ tree updatePresenter. ] +{ #category : #'editing nodes' } +GrafoscopioNewNotebook >> resetSelectedItemTo: aPath [ + tree selectPath: {(aPath first min: notebook children size)}. + tree updatePresenter +] + { #category : #persistence } GrafoscopioNewNotebook >> saveToFile: aFileReference [ "I save the current tree/document to a file and update storage timestamp." @@ -1022,14 +1034,13 @@ GrafoscopioNewNotebook >> seePdf [ { #category : #'editing nodes' } GrafoscopioNewNotebook >> selectedItem: anItem [ - tree selectedItem: (tree roots detect: [ : p | p content = anItem ]). - tree highlightedItem: tree selectedItem. + tree selectItem: (tree roots detect: [ : p | p = anItem ]). ] { #category : #persistence } GrafoscopioNewNotebook >> subtreeAsMarkdown [ | currentNode | - currentNode := tree highlightedItem content. + currentNode := tree selectedItem. self inform: ('Exported as: ', String cr, (self subtreeAsMarkdownFileFor: currentNode) fullName ) ] @@ -1046,14 +1057,14 @@ GrafoscopioNewNotebook >> subtreeAsMarkdownFileFor: aNode [ { #category : #'editing nodes' } GrafoscopioNewNotebook >> toggleCodeNode [ | currentNode | - currentNode := tree highlightedItem. - currentNode content toggleCodeText. - self updateBodyFor: currentNode. + currentNode := tree selectedItem. + currentNode toggleCodeText. + self updateBodyFor: currentNode ] { #category : #initialization } GrafoscopioNewNotebook >> topBar [ - ^ MenuPresenter new + ^ SpMenuBarPresenter new addGroup: [ :group | group addItem: [ :item | @@ -1071,42 +1082,42 @@ GrafoscopioNewNotebook >> topBar [ group addItem: [ :item | item - name: nil; + name: ''; description: 'Save notebook'; icon: (self iconNamed: #glamorousSave); action: [ self saveWorkingNotebook ] ]. group addItem: [ :item | item - name: nil; + name: ''; description: 'Export all Markdown subtrees'; icon: (self iconNamed: #glamorousMore); action: [ self exportAllSubtreesAsMarkup ] ]. group addItem: [ :item | item - name: nil; + name: ''; description: 'Cut'; icon: (self iconNamed: #smallCut); action: [ self cutNodeToClipboard ] ]. group addItem: [ :item | item - name: nil; + name: ''; description: 'Copy'; icon: (self iconNamed: #smallCopy); action: [ self copyNodeToClipboard ] ]. group addItem: [ :item | item - name: nil; + name: ''; description: 'Paste'; icon: (self iconNamed: #smallPaste); action: [ self pasteNodeFromClipboard ] ]. group addItem: [ :item | item - name: nil; + name: ''; description: 'Find & Replace'; icon: (self iconNamed: #smallFind); action: [ self findAndReplace ] ] ]; @@ -1114,42 +1125,42 @@ GrafoscopioNewNotebook >> topBar [ group addItem: [ :item | item - name: nil; + name: ''; description: 'Add node'; icon: MendaIcons new plusIcon; action: [ self addNode ] ]. group addItem: [ :item | item - name: nil; + name: ''; description: 'Delete node'; icon: MendaIcons new minusIcon; action: [ self removeNode ] ]. group addItem: [ :item | item - name: nil; + name: ''; description: 'Move node up'; icon: MendaIcons new arrowUpIcon; action: [ self moveSelectedNodeUp ] ]. group addItem: [ :item | item - name: nil; + name: ''; description: 'Move node down'; icon: MendaIcons new arrowDownIcon; action: [ self moveSelectedNodeDown ] ]. group addItem: [ :item | item - name: nil; + name: ''; description: 'Move node left'; icon: MendaIcons new arrowLeftIcon; action: [ self promoteNode ] ]. group addItem: [ :item | item - name: nil; + name: ''; description: 'Move node right'; icon: MendaIcons new arrowRightIcon; action: [ self demoteNode ] ] ]; @@ -1157,70 +1168,70 @@ GrafoscopioNewNotebook >> topBar [ group addItem: [ :item | item - name: nil; + name: ''; description: 'Toggle: code <--> text'; icon: MendaIcons new smalltalkCodeIcon; action: [ self toggleCodeNode ] ]. group addItem: [ :item | item - name: nil; + name: ''; description: 'List node links'; icon: (self iconNamed: #tinyMenu); action: [ self linksList ] ]. group addItem: [ :item | item - name: nil; + name: ''; description: 'Visit link'; icon: (self iconNamed: #glamorousRight); action: [ self visitNodeLink ] ]. group addItem: [ :item | item - name: nil; + name: ''; description: 'Import link content'; icon: (self iconNamed: #glamorousOpenFromUrl); action: [ self importLinkContent ] ]. group addItem: [ :item | item - name: nil; + name: ''; description: 'Export link content'; icon: (self iconNamed: #glamorousSaveToUrl); action: [ self exportLinkContent ] ]. group addItem: [ :item | item - name: nil; + name: ''; description: 'HTML to Markdown'; icon: (self iconNamed: #smallProfile); action: [ self htmlToMarkdown ] ]. group addItem: [ :item | item - name: nil; + name: ''; description: 'HTML to Markdown subtree'; icon: (self iconNamed: #hierarchy); action: [ self htmlToMarkdownSubtree ] ]. group addItem: [ :item | item - name: nil; + name: ''; description: 'Tag as...'; icon: MendaIcons new tagAddIcon; action: [ self inform: 'To be implemented...' ] ]. group addItem: [ :item | item - name: nil; + name: ''; description: 'Untag ....'; icon: MendaIcons new tagMinusIcon; action: [ self inform: 'To be implemented...' ] ]. group addItem: [ :item | item - name: nil; + name: ''; description: 'Edit tags...'; icon: FontAwesomeIcons new tagsIcon; action: [ self inform: 'To be implemented...' ] ] ]; @@ -1228,7 +1239,7 @@ GrafoscopioNewNotebook >> topBar [ debug addItem: [ :item | item - name: nil; + name: ''; description: 'Debug'; icon: (self iconNamed: #glamorousBug); @@ -1251,13 +1262,12 @@ GrafoscopioNewNotebook >> updateBodyFor: aNode [ tree needRebuild: false. body needRebuild: true. aNode openIn: self. - self buildWithSpecLayout: self class defaultSpec + self buildWithSpec ] { #category : #operation } GrafoscopioNewNotebook >> visitNodeLink [ - - tree highlightedItem content visitLastLink. + tree selectedItem visitLastLink ] { #category : #accessing } diff --git a/repository/Grafoscopio/GrafoscopioNode.class.st b/repository/Grafoscopio/GrafoscopioNode.class.st index 9cfe8d7..5841ac4 100644 --- a/repository/Grafoscopio/GrafoscopioNode.class.st +++ b/repository/Grafoscopio/GrafoscopioNode.class.st @@ -32,7 +32,7 @@ Class { #classInstVars : [ 'clipboard' ], - #category : #'Grafoscopio-Model' + #category : 'Grafoscopio-Model' } { #category : #utility } diff --git a/repository/Grafoscopio/GrafoscopioNodeTest.class.st b/repository/Grafoscopio/GrafoscopioNodeTest.class.st index 06a9b22..26ec319 100644 --- a/repository/Grafoscopio/GrafoscopioNodeTest.class.st +++ b/repository/Grafoscopio/GrafoscopioNodeTest.class.st @@ -4,7 +4,7 @@ I test the main functionality of the GrafoscopioNode class. Class { #name : #GrafoscopioNodeTest, #superclass : #TestCase, - #category : #'Grafoscopio-Model' + #category : 'Grafoscopio-Model' } { #category : #tests } diff --git a/repository/Grafoscopio/GrafoscopioNotebook.class.st b/repository/Grafoscopio/GrafoscopioNotebook.class.st index 56836ed..d81d4c9 100644 --- a/repository/Grafoscopio/GrafoscopioNotebook.class.st +++ b/repository/Grafoscopio/GrafoscopioNotebook.class.st @@ -26,7 +26,7 @@ Class { #classInstVars : [ 'recents' ], - #category : #'Grafoscopio-UI' + #category : 'Grafoscopio-UI' } { #category : #utility } diff --git a/repository/Grafoscopio/GrafoscopioNotebookTest.class.st b/repository/Grafoscopio/GrafoscopioNotebookTest.class.st index 3ddee46..3a42310 100644 --- a/repository/Grafoscopio/GrafoscopioNotebookTest.class.st +++ b/repository/Grafoscopio/GrafoscopioNotebookTest.class.st @@ -4,5 +4,5 @@ I test the main functionality of the GrafoscopioNode class. Class { #name : #GrafoscopioNotebookTest, #superclass : #TestCase, - #category : #'Grafoscopio-UI' + #category : 'Grafoscopio-UI' } diff --git a/repository/Grafoscopio/GrafoscopioReplace.class.st b/repository/Grafoscopio/GrafoscopioReplace.class.st index c266ef2..605aec3 100644 --- a/repository/Grafoscopio/GrafoscopioReplace.class.st +++ b/repository/Grafoscopio/GrafoscopioReplace.class.st @@ -11,7 +11,7 @@ Class { 'ok', 'cancel' ], - #category : #'Grafoscopio-UI' + #category : 'Grafoscopio-UI' } { #category : #specs } diff --git a/repository/Grafoscopio/GrafoscopioTextModel.class.st b/repository/Grafoscopio/GrafoscopioTextModel.class.st index 6bcd3f8..098fe77 100644 --- a/repository/Grafoscopio/GrafoscopioTextModel.class.st +++ b/repository/Grafoscopio/GrafoscopioTextModel.class.st @@ -4,17 +4,18 @@ Usually my content is markdown text. " Class { #name : #GrafoscopioTextModel, - #superclass : #ComposablePresenter, + #superclass : #SpPresenter, #instVars : [ 'body' ], - #category : #'Grafoscopio-UI' + #category : 'Grafoscopio-UI' } { #category : #specs } GrafoscopioTextModel class >> defaultSpec [ - - ^ SpecLayout composed add: #body + ^ SpBoxLayout newVertical + add: #body; + yourself ] { #category : #accessing } @@ -36,6 +37,5 @@ GrafoscopioTextModel >> content: aGrafoscopioNodeContent [ GrafoscopioTextModel >> initializeWidgets [ body := self newText. - body beForText. body autoAccept: true. ] diff --git a/repository/Grafoscopio/GrafoscopioTextNode.class.st b/repository/Grafoscopio/GrafoscopioTextNode.class.st index 849357c..9cc3641 100644 --- a/repository/Grafoscopio/GrafoscopioTextNode.class.st +++ b/repository/Grafoscopio/GrafoscopioTextNode.class.st @@ -21,7 +21,7 @@ Class { #classInstVars : [ 'clipboard' ], - #category : #'Grafoscopio-Model' + #category : 'Grafoscopio-Model' } { #category : #utility } @@ -182,7 +182,7 @@ GrafoscopioTextNode >> asStonFromRoot [ { #category : #accessing } GrafoscopioTextNode >> asTreeNodePresenter [ | node | - node := TreeNodePresenter new. + node := SpTreeNodePresenter new. node hasChildren: [ self children isNotEmpty ]; children: [ self children collect: [ :subNode | subNode asTreeNodePresenter ] ]; diff --git a/repository/Grafoscopio/GrafoscopioUrlCachedNode.class.st b/repository/Grafoscopio/GrafoscopioUrlCachedNode.class.st index 913050d..c27a009 100644 --- a/repository/Grafoscopio/GrafoscopioUrlCachedNode.class.st +++ b/repository/Grafoscopio/GrafoscopioUrlCachedNode.class.st @@ -4,7 +4,7 @@ Class { #instVars : [ 'content' ], - #category : #'Grafoscopio-Model' + #category : 'Grafoscopio-Model' } { #category : #accessing } diff --git a/repository/Grafoscopio/GrafoscopioUrlNode.class.st b/repository/Grafoscopio/GrafoscopioUrlNode.class.st index 0dd1a73..cf3fa11 100644 --- a/repository/Grafoscopio/GrafoscopioUrlNode.class.st +++ b/repository/Grafoscopio/GrafoscopioUrlNode.class.st @@ -4,7 +4,7 @@ Class { #instVars : [ 'link' ], - #category : #'Grafoscopio-Model' + #category : 'Grafoscopio-Model' } { #category : #'as yet unclassified' } @@ -42,7 +42,7 @@ GrafoscopioUrlNode >> link: aZnUrl [ { #category : #'as yet unclassified' } GrafoscopioUrlNode >> openIn: aNotebook [ super openIn: aNotebook. - aNotebook links text: (link ifNil: 'Invalid url') + aNotebook links text: (link ifNil: 'Invalid url') asString ] { #category : #'as yet unclassified' } diff --git a/repository/Grafoscopio/ManifestGrafoscopio.class.st b/repository/Grafoscopio/ManifestGrafoscopio.class.st index 9207d50..dc16e39 100644 --- a/repository/Grafoscopio/ManifestGrafoscopio.class.st +++ b/repository/Grafoscopio/ManifestGrafoscopio.class.st @@ -4,7 +4,7 @@ I store metadata for this package. These meta data are used by other tools such Class { #name : #ManifestGrafoscopio, #superclass : #PackageManifest, - #category : #Grafoscopio + #category : 'Grafoscopio' } { #category : #'code-critics' } diff --git a/repository/Grafoscopio/MendaIcons.class.st b/repository/Grafoscopio/MendaIcons.class.st index d5b11a2..8b45bf4 100644 --- a/repository/Grafoscopio/MendaIcons.class.st +++ b/repository/Grafoscopio/MendaIcons.class.st @@ -29,7 +29,7 @@ Class { #classVars : [ 'Current' ], - #category : #'Grafoscopio-UI' + #category : 'Grafoscopio-UI' } { #category : #'instance creation' } diff --git a/repository/Grafoscopio/MindMap.class.st b/repository/Grafoscopio/MindMap.class.st index e37f9e0..74e9c78 100644 --- a/repository/Grafoscopio/MindMap.class.st +++ b/repository/Grafoscopio/MindMap.class.st @@ -6,7 +6,7 @@ to javascript enabled web presentations. Class { #name : #MindMap, #superclass : #Object, - #category : #'Grafoscopio-Model' + #category : 'Grafoscopio-Model' } { #category : #'as yet unclassified' }