Just before trying tagged nodes for exporting in testing branch.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2015-01-21 18:19:35 +00:00
parent 361fb8ddcf
commit cc867e0065

View File

@ -87,25 +87,16 @@ GrafoscopioBrowser >> addToTagsAvailable [
{ #category : #'graphical interface' }
GrafoscopioBrowser >> bodyForCodeIn: constructor for: aNode [
"Shows the body of a selected node"
"Shows the body of a selected node as executable code."
aNode tags = 'código'
ifFalse: [ ^self ].
(constructor smalltalkCode)
title: 'Código en Smalltalk';
format: [aNode body];
populate: #acceptedCode icon: GLMUIThemeExtraIcons glamorousAccept on: $s entitled: 'Accept' with: [aNode body]
"
constructor tags = 'código'
ifFalse: [^self ]
ifTrue: [
^(constructor smalltalkCode)
title: 'Código de Smalltalk';
populate: #acceptedCode icon: GLMUIThemeExtraIcons glamorousAccept on: $s entitled: 'Accept' with: [:text | text text ]
]"
]
{ #category : #'graphical interface' }
@ -127,6 +118,16 @@ GrafoscopioBrowser >> bodyForCodeOn: constructor [
]"
]
{ #category : #'graphical interface' }
GrafoscopioBrowser >> bodyForTransmediaIn: constructor for: aNode [
"Shows the body of a transmedia type of nodes, which are tagged as 'original' and 'transmediado'"
aNode tags = 'original'
ifFalse: [^self ]
ifTrue: [constructor custom: (self panelTransmediaFor: aNode)]
]
{ #category : #'graphical interface' }
GrafoscopioBrowser >> bodyForTransmediaOn: constructor [
"Shows the body of a transmedia type of node"
@ -250,7 +251,8 @@ browser
to: #nodeBody;
andShow: [ :a :node |
self bodyIn: a for: node.
self bodyForCodeIn: a for: node].
self bodyForCodeIn: a for: node.
self bodyForTransmediaIn: a for: node ].
(browser transmit )
from: #tree port: #selection;
from: #nodeBody port: #text;
@ -715,6 +717,58 @@ 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.
browser
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 ] ].
(browser transmit)
to: #original;
andShow: [ :a |
a text
title: 'Original';
format:[ aNode body isNil
ifTrue: [ '' ]
ifFalse: [ aNode body ]
]].
(browser transmit)
from: #original;
toOutsidePort: #text.
(browser transmit)
to: #transmediado;
andShow: [ :a |
a text
title: 'Transmediado';
format:[transmediaNode isNotNil
ifFalse: [ '' ]
ifTrue: [transmediaNode body]
]
].
" (browser transmit)
to: #buttons;
andShow: [ :a |
a actionList
act: [:entity | entity inspect ] entitled: 'Subir';
act: [:entity | entity explore ] entitled: 'Previsualizar';
act: [:entity | entity explore ] entitled: 'Publicar'].
"
^ browser.
]
{ #category : #persistence }
GrafoscopioBrowser >> replaceContentsFromCache: aNode [
"Replaces the contents of aNode from the ones in cacheNode. It doesn't work recursively yet, so it doen't copy the children of the nodes"