Modal Interfaces > Transmediaton: Starting to test an alternative approach to building a custom browser for this experience based on the three inter-dependant panes, to see if I can understand ports better.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2014-11-27 11:11:04 +00:00
parent 20435782fb
commit 931a4d2a3e

View File

@ -73,14 +73,8 @@ GrafoscopioBrowser >> addFileToRepository [
{ #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"
"(constructor text) constructor custom: self panelBrowserForTransmediaton.
title: 'Cuerpo | Body ';
format:[:eachNode |
(eachNode body) isNil
ifTrue: [ '' ]
ifFalse: [ eachNode body]]."
constructor custom: self panelBrowserForTransmedia.
] ]
{ #category : #'graphical interface' } { #category : #'graphical interface' }
@ -138,6 +132,106 @@ browser
transformed: [:node :text | node header: text asString] transformed: [:node :text | node header: text asString]
] ]
{ #category : #'graphical interface' }
GrafoscopioBrowser >> buildBrowserForTransmediaton [
"Main method for building the interface for trees and its nodes"
browser := GLMTabulator new
title: 'Transmediaton | Grafoscopio'.
"browser
column: [:c |
c row: #tree;
row: #nodeHeader] span: 2;
column: [ :c |
c row: #nodeBody span: 2] span: 4."
browser
updateOn: GLMItemAdded from: #yourself;
updateOn: GLMItemRemoved from: #yourself.
browser
column: #one;
column: #two;
column: #three.
(browser transmit)
to: #one;
andShow: [ :a | a tree display: [ :x | 1 to: x ] ].
(browser transmit)
to: #two;
from: #one;
andShow: [ :a | a tree display: [ :x | 1 to: x * 2 ] ].
(browser transmit)
to: #three;
from: #two;
andShow: [ :a |
(a text)
display: [ :x | 1 to: x * 3 ];
populate: #focus
on: $f
entitled: 'Focus'
with: [ :list | list selection ] ].
(browser transmit)
toOutsidePort: #focus;
from: #three port: #focus.
(browser transmit)
to: #one port: #selection;
fromOutsidePort: #focus.
(browser transmit)
to: #two port: #selection;
fromOutsidePort: #focus.
browser openOn: 4
]
{ #category : #'graphical interface' }
GrafoscopioBrowser >> buildBrowserForTransmediaton: aTree [
"Main method for building the interface for trees and its nodes"
browser := GLMTabulator new
title: 'Transmediaton | Grafoscopio'.
"browser
column: [:c |
c row: #tree;
row: #nodeHeader] span: 2;
column: [ :c |
c row: #nodeBody span: 2] span: 4."
browser
updateOn: GLMItemAdded from: #yourself;
updateOn: GLMItemRemoved from: #yourself.
browser
column: #one;
column: #two;
column: #three.
(browser transmit)
to: #one;
andShow: [ :a | a tree display: [ :x | 1 to: x ] ].
(browser transmit)
to: #two;
from: #one;
andShow: [ :a | a tree display: [ :x | 1 to: x * 2 ] ].
(browser transmit)
to: #three;
from: #two;
andShow: [ :a |
(a text)
display: [ :x | 1 to: x * 3 ];
populate: #focus
on: $f
entitled: 'Focus'
with: [ :list | list selection ] ].
(browser transmit)
toOutsidePort: #focus;
from: #three port: #focus.
(browser transmit)
to: #one port: #selection;
fromOutsidePort: #focus.
(browser transmit)
to: #two port: #selection;
fromOutsidePort: #focus.
browser openOn: aTree
]
{ #category : #'graphical interface' } { #category : #'graphical interface' }
GrafoscopioBrowser >> buildBrowserLandscape [ GrafoscopioBrowser >> buildBrowserLandscape [
@ -173,7 +267,9 @@ browser
(browser transmit) (browser transmit)
to: #tree; to: #tree;
andShow: [:a | self treeForTransmediatonOn: a]. andShow: [:a | self treeForTransmediatonOn: a].
"Creating a self updatable body pane" "Creating a self updatable body pane"
(browser transmit) (browser transmit)
to: #nodeBody; to: #nodeBody;
from: #tree; from: #tree;
@ -511,7 +607,7 @@ GrafoscopioBrowser >> openWorking [
] ]
{ #category : #'graphical interface' } { #category : #'graphical interface' }
GrafoscopioBrowser >> panelBrowserForTransmedia [ GrafoscopioBrowser >> panelBrowserForTransmediaton [
"**Experimental feature.** "**Experimental feature.**
Opens grafoscopio in several 'modes'. Each mode corresponds to a operation way, with an specific interface. 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. We will start with a 'transmediaton' mode to let the people create some transmedia content.
@ -529,7 +625,10 @@ GrafoscopioBrowser >> panelBrowserForTransmedia [
format:[:eachNode | format:[:eachNode |
(eachNode body) isNil (eachNode body) isNil
ifTrue: [ '' ] ifTrue: [ '' ]
ifFalse: [ eachNode body]]. ]. ifFalse: [ eachNode body]]].
(browser transmit)
from: #original;
toOutsidePort: #text.
(browser transmit) (browser transmit)
to: #transmediado; to: #transmediado;
andShow: [ :a | andShow: [ :a |
@ -632,14 +731,14 @@ GrafoscopioBrowser >> treeForTransmediatonOn: constructor [
(eachNode header) isNil (eachNode header) isNil
ifTrue: [ '' ] ifTrue: [ '' ]
ifFalse: [ eachNode header ]]; ifFalse: [ eachNode header ]];
"Adding nodes" "Adding/Removing nodes"
act: [:treePresentation | act: [:treePresentation |
(treePresentation selection) isNotNil (treePresentation selection) isNotNil
ifTrue: [treePresentation selection addNodeAfter]. ifTrue: [treePresentation selection addNodeAfter].
treePresentation update] treePresentation update]
icon: GLMUIThemeExtraIcons glamorousZoomIn icon: GLMUIThemeExtraIcons glamorousZoomIn
entitled: 'Add node'; entitled: 'Add node';
"Removing nodes"
act: [:treePresentation | act: [:treePresentation |
(treePresentation selection isNotNil) (treePresentation selection isNotNil)
ifTrue: [(treePresentation selection parent) ifTrue: [(treePresentation selection parent)