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: 'Recent notebooks...' target: self selector: #openFromRecentlyUsed;
|
||||
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: '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 }
|
||||
GrafoscopioGUI >> initializeWidgets [
|
||||
|
||||
|
@ -48,9 +48,10 @@ GrafoscopioNotebook class >> defaultSpec [
|
||||
|
||||
{ #category : #operation }
|
||||
GrafoscopioNotebook >> addNode [
|
||||
| newSelectedNode |
|
||||
|
||||
tree needRebuild: true.
|
||||
newSelectedNode := tree selectedItem content addNodeAfterMe.
|
||||
tree selectedItem content addNodeAfterMe.
|
||||
self selectNextItem.
|
||||
tree roots: tree roots.
|
||||
self buildWithSpecLayout: self class defaultSpec.
|
||||
|
||||
@ -71,8 +72,7 @@ GrafoscopioNotebook >> body: anObject [
|
||||
GrafoscopioNotebook >> changeBody: aNode [
|
||||
self needRebuild: false.
|
||||
tree needRebuild: false.
|
||||
body needRebuild: true.
|
||||
|
||||
body needRebuild: true.
|
||||
body := self instantiate: aNode specModelClass new.
|
||||
body content: aNode content.
|
||||
body body class = TextModel
|
||||
@ -88,7 +88,6 @@ GrafoscopioNotebook >> changeBody: aNode [
|
||||
]
|
||||
].
|
||||
header text: aNode header.
|
||||
body needRebuild: true.
|
||||
self buildWithSpecLayout: self class defaultSpec.
|
||||
|
||||
]
|
||||
@ -145,17 +144,16 @@ GrafoscopioNotebook >> initializePresenter [
|
||||
|
||||
{ #category : #initialization }
|
||||
GrafoscopioNotebook >> initializeWidgets [
|
||||
|
||||
windowMainMenu := self newWindowMainMenu.
|
||||
tree := TreeModel new.
|
||||
header := self newTextInput.
|
||||
body := self newText.
|
||||
body disable.
|
||||
body text: '<- Select a node'.
|
||||
tree := TreeModel new.
|
||||
tree
|
||||
childrenBlock: [:node | node children];
|
||||
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
|
||||
add: tree;
|
||||
add: header;
|
||||
@ -292,7 +290,14 @@ GrafoscopioNotebook >> notebook: anObject [
|
||||
{ #category : #api }
|
||||
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 }
|
||||
GrafoscopioNotebook >> tree [
|
||||
^ tree
|
||||
|
Loading…
Reference in New Issue
Block a user