Starting recent documents functionality.
This commit is contained in:
parent
6740d526fe
commit
9920c8a1a1
@ -28,7 +28,8 @@ Class {
|
||||
'DefaultUbakyeBrowser',
|
||||
'dockingBar',
|
||||
'fossil',
|
||||
'pandoc'
|
||||
'pandoc',
|
||||
'recentTrees'
|
||||
],
|
||||
#category : #'Grafoscopio-UI'
|
||||
}
|
||||
@ -118,6 +119,23 @@ GrafoscopioBrowser class >> open [
|
||||
^ self new open
|
||||
]
|
||||
|
||||
{ #category : #'as yet unclassified' }
|
||||
GrafoscopioBrowser class >> openFromRecentlyUsed [
|
||||
"Tags the node passed as argument with a value from the collection of tags available"
|
||||
| selection |
|
||||
|
||||
recentTrees isNil
|
||||
ifFalse: [
|
||||
selection := UIManager default chooseFrom: recentTrees title: 'Elija una documento'.
|
||||
"aNode tagAs: (tagsAvailable at: selection)"
|
||||
]
|
||||
ifTrue: [self messageNoTagsAvailable].
|
||||
"browser update".
|
||||
|
||||
|
||||
|
||||
]
|
||||
|
||||
{ #category : #'as yet unclassified' }
|
||||
GrafoscopioBrowser class >> openHelpInHtml [
|
||||
"Launches the help manual in PDF format in an external viewer."
|
||||
@ -169,29 +187,29 @@ GrafoscopioBrowser class >> startDockingBar [
|
||||
|
||||
launchMenu := MenuMorph new.
|
||||
launchMenu
|
||||
add: 'Documento interactivo nuevo' target: GrafoscopioBrowser action: #open;
|
||||
add: 'Documentos interactivos recientes' target: GrafoscopioBrowser action: #messageNotImplementedYet;
|
||||
add: 'Documentos interactivos de ejemplo' target: GrafoscopioBrowser action: #messageNotImplementedYet;
|
||||
add: 'Ejemplos de visualizaciones en Roassal' target: (RTExampleBrowserGT new) action: #open;
|
||||
add: 'Playground' target: (Smalltalk tools) action: #openWorkspace.
|
||||
add: 'Documento interactivo nuevo' target: GrafoscopioBrowser selector: #open;
|
||||
add: 'Documentos interactivos recientes' target: GrafoscopioBrowser selector: #openFromRecentlyUsed;
|
||||
add: 'Documentos interactivos de ejemplo' target: GrafoscopioBrowser selector: #messageNotImplementedYet;
|
||||
add: 'Ejemplos de visualizaciones en Roassal' target: (RTExampleBrowser new) selector: #open;
|
||||
add: 'Playground' target: (Smalltalk tools) selector: #openWorkspace.
|
||||
|
||||
updateMenu := MenuMorph new.
|
||||
updateMenu
|
||||
add: 'Documentación' target: GrafoscopioBrowser action: #updateDocumentation;
|
||||
add: 'Grafoscopio' target: GrafoscopioBrowser action: #updateGrafoscopio;
|
||||
add: 'Prerrequisitos' target: GrafoscopioBrowser action: #updatePrerrequisites;
|
||||
add: 'Herramientas externas' target: GrafoscopioBrowser action: #messageNotImplementedYet;
|
||||
add: 'Ruta a pandoc' target: GrafoscopioBrowser action: #configurePandoc;
|
||||
add: 'Ruta a fossil' target: GrafoscopioBrowser action: #configureFossil;
|
||||
add: 'Todo el sistema' target: GrafoscopioBrowser action: #updateSystem.
|
||||
add: 'Documentación' target: GrafoscopioBrowser selector: #updateDocumentation;
|
||||
add: 'Grafoscopio' target: GrafoscopioBrowser selector: #updateGrafoscopio;
|
||||
add: 'Prerrequisitos' target: GrafoscopioBrowser selector: #updatePrerrequisites;
|
||||
add: 'Herramientas externas' target: GrafoscopioBrowser selector: #messageNotImplementedYet;
|
||||
add: 'Ruta a pandoc' target: GrafoscopioBrowser selector: #configurePandoc;
|
||||
add: 'Ruta a fossil' target: GrafoscopioBrowser selector: #configureFossil;
|
||||
add: 'Todo el sistema' target: GrafoscopioBrowser selector: #updateSystem.
|
||||
|
||||
helpMenu := MenuMorph new.
|
||||
helpMenu
|
||||
add: 'Manual en PDF' target: GrafoscopioBrowser action: #openHelpInPdf;
|
||||
add: 'Manual en HTML' target: GrafoscopioBrowser action: #openHelpInHtml;
|
||||
add: 'Manual en grafoscopio' target: (GrafoscopioBrowser new) action: #openHelpInGrafoscopio;
|
||||
add: 'Ir a la documentación en línea' target: GrafoscopioBrowser action: #messageNotImplementedYet;
|
||||
add: 'Acerca de Grafoscopio' target: GrafoscopioBrowser action: #messageAbout.
|
||||
add: 'Manual en PDF' target: GrafoscopioBrowser selector: #openHelpInPdf;
|
||||
add: 'Manual en HTML' target: GrafoscopioBrowser selector: #openHelpInHtml;
|
||||
add: 'Manual en grafoscopio' target: (GrafoscopioBrowser new) selector: #openHelpInGrafoscopio;
|
||||
add: 'Ir a la documentación en línea' target: GrafoscopioBrowser selector: #messageNotImplementedYet;
|
||||
add: 'Acerca de Grafoscopio' target: GrafoscopioBrowser selector: #messageAbout.
|
||||
|
||||
dockingBar := DockingBarMorph new.
|
||||
dockingBar
|
||||
@ -338,8 +356,8 @@ GrafoscopioBrowser >> addToTagsAvailable [
|
||||
|
||||
{ #category : #'graphical interface' }
|
||||
GrafoscopioBrowser >> bodyForCodeIn: constructor for: aNode [
|
||||
"Shows the body in a constructor for selected node, if node is not tagged. If it is tagged it will return itself, so it can be rendered
|
||||
properly for other messages"
|
||||
"Shows the body of a node as an interactive playground. If node is not tagged it will return itself,
|
||||
so it can be rendered properly for other messages"
|
||||
|
||||
| innerBrowser |
|
||||
|
||||
@ -374,7 +392,7 @@ GrafoscopioBrowser >> bodyIn: constructor [
|
||||
"Shows the body of a selected node"
|
||||
|
||||
(constructor text)
|
||||
title: 'Texto ';
|
||||
title: 'Texto';
|
||||
format:[:eachNode |
|
||||
(eachNode body) isNil
|
||||
ifTrue: [ '' ]
|
||||
@ -791,6 +809,9 @@ GrafoscopioBrowser >> openFromFile: aFileName [
|
||||
header: 'Arbol principal';
|
||||
level: 0.
|
||||
mainTree children: currentChildren.
|
||||
recentTrees isNil
|
||||
ifTrue:[recentTrees := OrderedCollection new].
|
||||
recentTrees add: workingFile.
|
||||
browser openOn: mainTree children.
|
||||
]
|
||||
|
||||
|
@ -486,6 +486,13 @@ GrafoscopioNode >> returnConfig [
|
||||
^configDict
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
GrafoscopioNode >> saveContent: anObject [
|
||||
"Sets the receivers body to the given object"
|
||||
|
||||
body := anObject
|
||||
]
|
||||
|
||||
{ #category : #accessing }
|
||||
GrafoscopioNode >> tagAs: aTag [
|
||||
"Tags the recipient node with aTag. For the moment we will have only one tag. In the future we will have several and there will be rules to
|
||||
|
Loading…
Reference in New Issue
Block a user