Temporal disabling of Roassal Examples from main menu, to a easier install while debuging GUI selection.
This commit is contained in:
parent
ae35d258c5
commit
bf1b960ad1
@ -519,7 +519,7 @@ GrafoscopioGUI class >> startDockingBar [
|
|||||||
add: 'Notebook from Internet...' target: (GrafoscopioNotebook new) selector: #openFromUrlUI;
|
add: 'Notebook from Internet...' target: (GrafoscopioNotebook new) selector: #openFromUrlUI;
|
||||||
add: 'Recent notebooks...' target: self selector: #openFromRecentlyUsed;
|
add: 'Recent notebooks...' target: self selector: #openFromRecentlyUsed;
|
||||||
add: 'Example notebooks...' target: self selector: #messageNotImplementedYet;
|
add: 'Example notebooks...' target: self selector: #messageNotImplementedYet;
|
||||||
add: 'Roassal visualizations gallery' target: (RTExampleBrowser new) selector: #open;
|
"add: 'Roassal visualizations gallery' target: (RTExampleBrowser new) selector: #open;"
|
||||||
add: 'Playground' target: (Smalltalk tools) selector: #openWorkspace;
|
add: 'Playground' target: (Smalltalk tools) selector: #openWorkspace;
|
||||||
add: 'Transcript' target: (Smalltalk tools) selector: #openTranscript.
|
add: 'Transcript' target: (Smalltalk tools) selector: #openTranscript.
|
||||||
|
|
||||||
@ -757,23 +757,6 @@ GrafoscopioGUI >> initializePresenter [
|
|||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #initialization }
|
|
||||||
GrafoscopioGUI >> initializePresenter2 [
|
|
||||||
tree whenSelectedItemChanged: [:node |
|
|
||||||
node tag = 'código'
|
|
||||||
ifTrue: [ ]
|
|
||||||
ifFalse: [ ]
|
|
||||||
|
|
||||||
].
|
|
||||||
nodeHeader acceptBlock: [ :text|
|
|
||||||
tree selectedItem
|
|
||||||
ifNotNil: [:x |
|
|
||||||
x content: text.
|
|
||||||
self updateTree
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #initialization }
|
{ #category : #initialization }
|
||||||
GrafoscopioGUI >> initializeWidgets [
|
GrafoscopioGUI >> initializeWidgets [
|
||||||
|
|
||||||
|
@ -48,9 +48,10 @@ GrafoscopioNotebook class >> defaultSpec [
|
|||||||
|
|
||||||
{ #category : #operation }
|
{ #category : #operation }
|
||||||
GrafoscopioNotebook >> addNode [
|
GrafoscopioNotebook >> addNode [
|
||||||
| newSelectedNode |
|
|
||||||
tree needRebuild: true.
|
tree needRebuild: true.
|
||||||
newSelectedNode := tree selectedItem content addNodeAfterMe.
|
tree selectedItem content addNodeAfterMe.
|
||||||
|
self selectNextItem.
|
||||||
tree roots: tree roots.
|
tree roots: tree roots.
|
||||||
self buildWithSpecLayout: self class defaultSpec.
|
self buildWithSpecLayout: self class defaultSpec.
|
||||||
|
|
||||||
@ -72,7 +73,6 @@ GrafoscopioNotebook >> changeBody: aNode [
|
|||||||
self needRebuild: false.
|
self needRebuild: false.
|
||||||
tree needRebuild: false.
|
tree needRebuild: false.
|
||||||
body needRebuild: true.
|
body needRebuild: true.
|
||||||
|
|
||||||
body := self instantiate: aNode specModelClass new.
|
body := self instantiate: aNode specModelClass new.
|
||||||
body content: aNode content.
|
body content: aNode content.
|
||||||
body body class = TextModel
|
body body class = TextModel
|
||||||
@ -88,7 +88,6 @@ GrafoscopioNotebook >> changeBody: aNode [
|
|||||||
]
|
]
|
||||||
].
|
].
|
||||||
header text: aNode header.
|
header text: aNode header.
|
||||||
body needRebuild: true.
|
|
||||||
self buildWithSpecLayout: self class defaultSpec.
|
self buildWithSpecLayout: self class defaultSpec.
|
||||||
|
|
||||||
]
|
]
|
||||||
@ -145,17 +144,16 @@ GrafoscopioNotebook >> initializePresenter [
|
|||||||
|
|
||||||
{ #category : #initialization }
|
{ #category : #initialization }
|
||||||
GrafoscopioNotebook >> initializeWidgets [
|
GrafoscopioNotebook >> initializeWidgets [
|
||||||
|
|
||||||
windowMainMenu := self newWindowMainMenu.
|
windowMainMenu := self newWindowMainMenu.
|
||||||
tree := TreeModel new.
|
|
||||||
header := self newTextInput.
|
header := self newTextInput.
|
||||||
body := self newText.
|
body := self newText.
|
||||||
body disable.
|
body disable.
|
||||||
body text: '<- Select a node'.
|
body text: '<- Select a node'.
|
||||||
|
tree := TreeModel new.
|
||||||
tree
|
tree
|
||||||
childrenBlock: [:node | node children];
|
childrenBlock: [:node | node children];
|
||||||
displayBlock: [:node | node title ].
|
displayBlock: [:node | node title ].
|
||||||
tree whenBuiltDo: [ tree selectedItem: (tree roots first)"; takeHighlight; yourself" ].
|
tree whenBuiltDo: [ tree selectedItem: (tree roots first selected: true; takeHighlight; yourself)].
|
||||||
self focusOrder
|
self focusOrder
|
||||||
add: tree;
|
add: tree;
|
||||||
add: header;
|
add: header;
|
||||||
@ -292,7 +290,14 @@ GrafoscopioNotebook >> notebook: anObject [
|
|||||||
{ #category : #api }
|
{ #category : #api }
|
||||||
GrafoscopioNotebook >> notebookContent: aTree [
|
GrafoscopioNotebook >> notebookContent: aTree [
|
||||||
|
|
||||||
tree roots: aTree children
|
| nodeBlock |
|
||||||
|
nodeBlock:= [:gfcNode | |node|
|
||||||
|
node := TreeNodeModel new.
|
||||||
|
node
|
||||||
|
hasChildren: [ gfcNode children isNotEmpty ];
|
||||||
|
children: [ gfcNode children collect: [:subNode | nodeBlock value: subNode ]];
|
||||||
|
content: gfcNode].
|
||||||
|
tree roots: (aTree children collect:[ :gfcNode | nodeBlock value: gfcNode])
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -509,6 +514,21 @@ GrafoscopioNotebook >> saveWorkingNotebook [
|
|||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #operation }
|
||||||
|
GrafoscopioNotebook >> selectNextItem [
|
||||||
|
| currentItem |
|
||||||
|
currentItem := self tree selectedItem.
|
||||||
|
currentItem ifNotNil: [ | allItems index|
|
||||||
|
allItems := currentItem container roots.
|
||||||
|
index := allItems indexOf: currentItem.
|
||||||
|
(index < allItems size) ifTrue: [
|
||||||
|
currentItem selected: false.
|
||||||
|
currentItem container selectedItem: ((allItems at:(index+1)) selected:true;takeHighlight;yourself).
|
||||||
|
tree selectedItem inspect.
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
GrafoscopioNotebook >> tree [
|
GrafoscopioNotebook >> tree [
|
||||||
^ tree
|
^ tree
|
||||||
|
Loading…
Reference in New Issue
Block a user