Just before trying tagged nodes for exporting in testing branch.
This commit is contained in:
parent
361fb8ddcf
commit
cc867e0065
@ -87,7 +87,7 @@ GrafoscopioBrowser >> addToTagsAvailable [
|
|||||||
|
|
||||||
{ #category : #'graphical interface' }
|
{ #category : #'graphical interface' }
|
||||||
GrafoscopioBrowser >> bodyForCodeIn: constructor for: aNode [
|
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'
|
aNode tags = 'código'
|
||||||
ifFalse: [ ^self ].
|
ifFalse: [ ^self ].
|
||||||
@ -97,15 +97,6 @@ GrafoscopioBrowser >> bodyForCodeIn: constructor for: aNode [
|
|||||||
format: [aNode body];
|
format: [aNode body];
|
||||||
populate: #acceptedCode icon: GLMUIThemeExtraIcons glamorousAccept on: $s entitled: 'Accept' with: [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' }
|
{ #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' }
|
{ #category : #'graphical interface' }
|
||||||
GrafoscopioBrowser >> bodyForTransmediaOn: constructor [
|
GrafoscopioBrowser >> bodyForTransmediaOn: constructor [
|
||||||
"Shows the body of a transmedia type of node"
|
"Shows the body of a transmedia type of node"
|
||||||
@ -250,7 +251,8 @@ browser
|
|||||||
to: #nodeBody;
|
to: #nodeBody;
|
||||||
andShow: [ :a :node |
|
andShow: [ :a :node |
|
||||||
self bodyIn: a for: node.
|
self bodyIn: a for: node.
|
||||||
self bodyForCodeIn: a for: node].
|
self bodyForCodeIn: a for: node.
|
||||||
|
self bodyForTransmediaIn: a for: node ].
|
||||||
(browser transmit )
|
(browser transmit )
|
||||||
from: #tree port: #selection;
|
from: #tree port: #selection;
|
||||||
from: #nodeBody port: #text;
|
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 }
|
{ #category : #persistence }
|
||||||
GrafoscopioBrowser >> replaceContentsFromCache: aNode [
|
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"
|
"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"
|
||||||
|
Loading…
Reference in New Issue
Block a user