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' }
GrafoscopioBrowser >> bodyForTransmediaOn: constructor [
"Shows the body of a transmedia type of node"
"(constructor text)
title: 'Cuerpo | Body ';
format:[:eachNode |
(eachNode body) isNil
ifTrue: [ '' ]
ifFalse: [ eachNode body]]."
constructor custom: self panelBrowserForTransmedia.
constructor custom: self panelBrowserForTransmediaton.
]
{ #category : #'graphical interface' }
@ -138,6 +132,106 @@ browser
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' }
GrafoscopioBrowser >> buildBrowserLandscape [
@ -173,7 +267,9 @@ browser
(browser transmit)
to: #tree;
andShow: [:a | self treeForTransmediatonOn: a].
"Creating a self updatable body pane"
(browser transmit)
to: #nodeBody;
from: #tree;
@ -511,7 +607,7 @@ GrafoscopioBrowser >> openWorking [
]
{ #category : #'graphical interface' }
GrafoscopioBrowser >> panelBrowserForTransmedia [
GrafoscopioBrowser >> panelBrowserForTransmediaton [
"**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.
@ -529,7 +625,10 @@ GrafoscopioBrowser >> panelBrowserForTransmedia [
format:[:eachNode |
(eachNode body) isNil
ifTrue: [ '' ]
ifFalse: [ eachNode body]]. ].
ifFalse: [ eachNode body]]].
(browser transmit)
from: #original;
toOutsidePort: #text.
(browser transmit)
to: #transmediado;
andShow: [ :a |
@ -632,14 +731,14 @@ GrafoscopioBrowser >> treeForTransmediatonOn: constructor [
(eachNode header) isNil
ifTrue: [ '' ]
ifFalse: [ eachNode header ]];
"Adding nodes"
"Adding/Removing nodes"
act: [:treePresentation |
(treePresentation selection) isNotNil
ifTrue: [treePresentation selection addNodeAfter].
treePresentation update]
icon: GLMUIThemeExtraIcons glamorousZoomIn
entitled: 'Add node';
"Removing nodes"
act: [:treePresentation |
(treePresentation selection isNotNil)
ifTrue: [(treePresentation selection parent)