From bc3cc05b787ac3f6efbb200297aeaf7455973d37 Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Sat, 28 Mar 2015 18:35:01 +0000 Subject: [PATCH] Minimal changes for demo. --- .../Grafoscopio/GrafoscopioBrowser.class.st | 41 +++++++++++++++---- 1 file changed, 34 insertions(+), 7 deletions(-) diff --git a/repository/Grafoscopio/GrafoscopioBrowser.class.st b/repository/Grafoscopio/GrafoscopioBrowser.class.st index d5727bd..8384c66 100644 --- a/repository/Grafoscopio/GrafoscopioBrowser.class.st +++ b/repository/Grafoscopio/GrafoscopioBrowser.class.st @@ -371,6 +371,29 @@ GrafoscopioBrowser >> addToTagsAvailable [ ] +{ #category : #'graphical interface' } +GrafoscopioBrowser >> body2ForTransmediaIn: constructor for: aNode [ + "Shows the body of a transmedia type of nodes, which are tagged as 'original' and 'transmediado'" + | innerBrowser originalNode transmediaNode | + + aNode tags = 'original' + ifFalse: [^self ] + ifTrue: [ + innerBrowser := GLMTabulator new. + GLMTabulator new. + innerBrowser + column: [ :c | + c row: [ :r | r column: #original; column: #transmediado] span: 7"; + row: #buttons; span: 1"]. + originalNode := aNode. + originalNode children isNotNil + ifTrue: [transmediaNode := originalNode children detect: [:node | node tags = 'transmediado'] + ifNone: [ transmediaNode := nil ] ]. + constructor custom: innerBrowser] + + +] + { #category : #'graphical interface' } GrafoscopioBrowser >> bodyForCodeIn: constructor for: aNode [ "Shows the body of a node as an interactive playground. If node is not tagged it will return itself, @@ -988,10 +1011,8 @@ GrafoscopioBrowser >> panelBrowserForTransmediaton [ { #category : #'graphical interface' } GrafoscopioBrowser >> panelTransmediaFor: aNode [ - "**Experimental feature.** - Opens grafoscopio in several 'modes'. Each mode corresponds to a operation way, with an specific interface. - We will start with a 'transmediaton' mode to let the people create some transmedia content. - After that we will enable other modes" + "" + | transmediaNode originalNode | browser := GLMTabulator new. @@ -1002,7 +1023,9 @@ GrafoscopioBrowser >> panelTransmediaFor: aNode [ originalNode := aNode. originalNode children isNotNil - ifTrue: [transmediaNode := originalNode children detect: [:node | node tags = 'transmediado'] ifNone: [ transmediaNode := nil ] ]. + ifTrue: [transmediaNode := originalNode children + detect: [:node | node tags = 'transmediado'] + ifNone: [ transmediaNode := nil ] ]. (browser transmit) to: #original; @@ -1026,6 +1049,7 @@ GrafoscopioBrowser >> panelTransmediaFor: aNode [ ifTrue: [transmediaNode body] ] ]. + " (browser transmit) to: #buttons; andShow: [ :a | @@ -1090,6 +1114,11 @@ GrafoscopioBrowser >> saveToFile [ [ self exportAsSton: mainTree on: writeStream. self exportAsMarkdown: mainTree on: markdownFile ] ensure: [ writeStream ifNotNil: #close ]. + + recentTrees isNil + ifTrue:[recentTrees := OrderedCollection new]. + recentTrees add: workingFile. + browser update. ] @@ -1197,8 +1226,6 @@ GrafoscopioBrowser >> treeOn: constructor [ =============" "For trees" - act: [GrafoscopioBrowser open] entitled: 'Nuevo ...' categorized: 'Arbol'; - act: [GrafoscopioBrowser new openFromFileSelector] entitled: 'Abrir/Cargar ...' categorized: 'Arbol'; act: [self saveToFile] entitled: 'Guardar como ...' categorized: 'Arbol'; act: [self saveWorkingTree; exportAsHtml] entitled: 'Exportar como HTML' categorized: 'Arbol'; act: [self saveWorkingTree; exportAsPdf] entitled: 'Exportar como PDF (requiere LaTeX)' categorized: 'Arbol';