Changes on the menu
This commit is contained in:
parent
633613c3bc
commit
146d54363a
@ -18,7 +18,7 @@ GfWorldMenu class >> helpMenuOn: aBuilder [
|
||||
label: 'Manual';
|
||||
order: 1;
|
||||
parent: #GfHelpAndDocs;
|
||||
action: [ GrafoscopioNewNotebook open: GrafoscopioDocs manual ].
|
||||
action: [ GrafoscopioNotebook open: GrafoscopioDocs manual ].
|
||||
(aBuilder item: #GfManualPDF)
|
||||
label: 'Manual (PDF)';
|
||||
order: 2;
|
||||
@ -28,12 +28,12 @@ GfWorldMenu class >> helpMenuOn: aBuilder [
|
||||
label: 'Dataviz';
|
||||
order: 3;
|
||||
parent: #GfHelpAndDocs;
|
||||
action: [ GrafoscopioNewNotebook open: DatavizDocs introNotebook ].
|
||||
action: [ GrafoscopioNotebook open: DatavizDocs introNotebook ].
|
||||
(aBuilder item: #GfHelpDevNotes)
|
||||
label: 'Devs''s notes';
|
||||
order: 4;
|
||||
parent: #GfHelpAndDocs;
|
||||
action: [ GrafoscopioNewNotebook open: GrafoscopioDocs devNotes ].
|
||||
action: [ GrafoscopioNotebook open: GrafoscopioDocs devNotes ].
|
||||
(aBuilder item: #GfHelpAbout)
|
||||
label: 'About Grafoscopio';
|
||||
order: 5;
|
||||
@ -122,13 +122,13 @@ GfWorldMenu class >> mainMenuItemsOn: aBuilder [
|
||||
GfWorldMenu class >> openRecentMenu: aBuilder [
|
||||
<worldMenu>
|
||||
|
||||
GrafoscopioNewNotebook recents
|
||||
GrafoscopioNotebook recents
|
||||
do: [ :f |
|
||||
(aBuilder item: #'Open', f basename )
|
||||
label: 'Open ', f basename;
|
||||
order: 1;
|
||||
parent: #GfLaunchOpenRecent;
|
||||
action: [ GrafoscopioNewNotebook open: f ] ]
|
||||
action: [ GrafoscopioNotebook open: f ] ]
|
||||
]
|
||||
|
||||
{ #category : #'world menu' }
|
||||
|
@ -5,13 +5,15 @@ Class {
|
||||
'up',
|
||||
'down',
|
||||
'delete',
|
||||
'editionMode'
|
||||
'editionMode',
|
||||
'lastHeightUsed'
|
||||
],
|
||||
#category : 'Grafoscopio-New-UI'
|
||||
}
|
||||
|
||||
{ #category : #initialization }
|
||||
GrafoscopioNewTextModel >> createLayoutFor: aGrafoscopioNodeContent [
|
||||
lastHeightUsed := (self heightFor: aGrafoscopioNodeContent).
|
||||
^ editionMode
|
||||
ifTrue: [ self editionLayoutFor: aGrafoscopioNodeContent ]
|
||||
ifFalse: [ self normalLayoutFor: aGrafoscopioNodeContent ]
|
||||
@ -50,7 +52,7 @@ GrafoscopioNewTextModel >> initializeWidgets [
|
||||
{ #category : #initialization }
|
||||
GrafoscopioNewTextModel >> newTextComponent [
|
||||
^ self newText
|
||||
whenTextChangedDo: [ model text: body text ];
|
||||
whenTextChangedDo: [ self textChanged ];
|
||||
autoAccept: true;
|
||||
yourself
|
||||
]
|
||||
@ -62,6 +64,14 @@ GrafoscopioNewTextModel >> normalLayoutFor: aGrafoscopioNodeContent [
|
||||
height: (self heightFor: aGrafoscopioNodeContent)
|
||||
]
|
||||
|
||||
{ #category : #initialization }
|
||||
GrafoscopioNewTextModel >> textChanged [
|
||||
model text: body text.
|
||||
(lastHeightUsed - (self heightFor: model text )) abs
|
||||
> (lastHeightUsed * 0.1)
|
||||
ifTrue: [ self modelChanged ]
|
||||
]
|
||||
|
||||
{ #category : #initialization }
|
||||
GrafoscopioNewTextModel >> toogleEditionMode [
|
||||
editionMode := editionMode not.
|
||||
|
Loading…
Reference in New Issue
Block a user