First commit from Pharo 7 as dev environment. :-)
Co-authored-by: none <not@mail.given>
This commit is contained in:
parent
2fcf5f52da
commit
cca6be97ef
@ -121,7 +121,7 @@ q+QiFQYxIAepMEzFbUhWnEKK4iayxe6XOOu8ARtNbaMQ63x5AAAAAElFTkSuQmCC'
|
|||||||
{ #category : #'accessing - icons' }
|
{ #category : #'accessing - icons' }
|
||||||
FontAwesomeIcons >> tagsIcon [
|
FontAwesomeIcons >> tagsIcon [
|
||||||
"Private - Generated method"
|
"Private - Generated method"
|
||||||
^Form fromBinaryStream: (Base64MimeConverter mimeDecodeToBytes: self tagsIconContents readStream)
|
^Form fromBinaryStream: (self tagsIconContents base64Decoded readStream)
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #'private - contents' }
|
{ #category : #'private - contents' }
|
||||||
|
312
repository/Grafoscopio/GfUIHelpers.class.st
Normal file
312
repository/Grafoscopio/GfUIHelpers.class.st
Normal file
@ -0,0 +1,312 @@
|
|||||||
|
"
|
||||||
|
I'm the Graphical User Interface for Grafoscopio environment.
|
||||||
|
|
||||||
|
My main responsability is to provide grafoscopio with a docking bar
|
||||||
|
with menu options for open, browse notebooks, update the system
|
||||||
|
and its components and the help menu.
|
||||||
|
|
||||||
|
"
|
||||||
|
Class {
|
||||||
|
#name : #GfUIHelpers,
|
||||||
|
#superclass : #DynamicComposablePresenter,
|
||||||
|
#instVars : [
|
||||||
|
'windowMainMenu',
|
||||||
|
'tree',
|
||||||
|
'nodeHeader',
|
||||||
|
'nodeBody'
|
||||||
|
],
|
||||||
|
#classVars : [
|
||||||
|
'dockingBar',
|
||||||
|
'recentNotebooks'
|
||||||
|
],
|
||||||
|
#classInstVars : [
|
||||||
|
'dockingBar',
|
||||||
|
'recentNotebooks',
|
||||||
|
'helpMenu'
|
||||||
|
],
|
||||||
|
#category : #'Grafoscopio-UI'
|
||||||
|
}
|
||||||
|
|
||||||
|
{ #category : #adding }
|
||||||
|
GfUIHelpers class >> addToHelpMenu: aGrafoscopioNotebook [
|
||||||
|
| metadata nbFile |
|
||||||
|
metadata := aGrafoscopioNotebook metadata.
|
||||||
|
nbFile := aGrafoscopioNotebook workingFile.
|
||||||
|
(metadata at: 'showOnHelp' ifAbsent: [ ^ self ])
|
||||||
|
ifTrue: [
|
||||||
|
self helpMenu submorphs
|
||||||
|
detect: [ :s | s contents = (metadata at: 'shortTitle') ]
|
||||||
|
ifFound: [
|
||||||
|
self inform:
|
||||||
|
'The notebook: ', String cr,
|
||||||
|
nbFile fullName, String cr,
|
||||||
|
' needs another shortTitle to be added to the docking bar Help Menu.' ]
|
||||||
|
ifNone: [
|
||||||
|
self helpMenu
|
||||||
|
add: (metadata at: 'shortTitle')
|
||||||
|
target: [ GrafoscopioNotebook open: nbFile ]
|
||||||
|
selector: #value ] ].
|
||||||
|
self updateUI
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #'graphical interface' }
|
||||||
|
GfUIHelpers class >> messageAbout [
|
||||||
|
"I show the author(s), license, sponsors and main contributors to the project
|
||||||
|
and point to further documentation on the web"
|
||||||
|
LongMessageDialogWindow new
|
||||||
|
entryText:
|
||||||
|
'_.:| Grafoscopio |:._',
|
||||||
|
(String with: Character cr),
|
||||||
|
'(c) Copyright 2014-2017 by Offray Vladimir Luna Cárdenas',
|
||||||
|
(String with: Character cr),
|
||||||
|
'Covered under MIT license.',
|
||||||
|
(String with: Character cr),
|
||||||
|
(String with: Character cr),
|
||||||
|
'[ Sponsors ]',
|
||||||
|
(String with: Character cr),
|
||||||
|
'mutabiT | www.mutabit.com ',
|
||||||
|
(String with: Character cr),
|
||||||
|
'HiTec Lab, Fundación Universitaria Los Libertadores | www.ulibertadores.edu.co ',
|
||||||
|
(String with: Character cr),
|
||||||
|
(String with: Character cr),
|
||||||
|
'[ Thanks to ]',
|
||||||
|
(String with: Character cr),
|
||||||
|
'HackBo, Hackerspace Bogota | http://hackbo.co',
|
||||||
|
(String with: Character cr),
|
||||||
|
'// Regular workshops attendees \\
|
||||||
|
Rafael Medida, Iván Pulido, Camilo Hurtado',
|
||||||
|
(String with: Character cr),
|
||||||
|
'// Coffe talk (mostly about grafoscopio) \\
|
||||||
|
Yanneth Gil, Andrés Calderón, Luis Alejandro Bernal',
|
||||||
|
(String with: Character cr),
|
||||||
|
'// Pharo, Moose and Agile Visualization communities \\
|
||||||
|
Tudor Girba, Alexandre Bergel, Nicolai Hess, Peter Uhnák, Milton Mamani ',
|
||||||
|
(String with: Character cr),
|
||||||
|
'// Family support while writing, coding & travelling (among others!) \\
|
||||||
|
Divian Luna, Hilda Cárdenas',
|
||||||
|
(String with: Character cr),
|
||||||
|
(String with: Character cr),
|
||||||
|
'For further details and versions go to:',
|
||||||
|
(String with: Character cr),
|
||||||
|
(String with: Character cr),
|
||||||
|
'http://mutabit.com/grafoscopio';
|
||||||
|
title: 'About Grafoscopio';
|
||||||
|
open.
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #'graphical interface' }
|
||||||
|
GfUIHelpers class >> messageNoRecentDocuments [
|
||||||
|
"Shows that a feature is not implemeted and point to further documentation on the web"
|
||||||
|
|
||||||
|
UIManager default abort:
|
||||||
|
'Recent documents list is emtpy.',
|
||||||
|
(String with: Character cr),
|
||||||
|
'To fill it, open a document using the Grafoscopio menu option at the top bar:',
|
||||||
|
(String with: Character cr),
|
||||||
|
(String with: Character cr),
|
||||||
|
'"Launch > Notebook from file..."',
|
||||||
|
(String with: Character cr),
|
||||||
|
(String with: Character cr)
|
||||||
|
title: 'No recent documents'.
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #'graphical interface' }
|
||||||
|
GfUIHelpers class >> messageNotImplementedYet [
|
||||||
|
"Shows that a feature is not implemeted and point to further documentation on the web"
|
||||||
|
|
||||||
|
UIManager default abort:
|
||||||
|
'This functionality is not implemented yet!',
|
||||||
|
(String with: Character cr),
|
||||||
|
'For more information about future releases, please visit: ',
|
||||||
|
(String with: Character cr),
|
||||||
|
(String with: Character cr),
|
||||||
|
'http://mutabit.com/grafoscopio',
|
||||||
|
(String with: Character cr),
|
||||||
|
(String with: Character cr)
|
||||||
|
title: 'To be implemented'.
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #'graphical interface' }
|
||||||
|
GfUIHelpers class >> openFromRecentlyUsed [
|
||||||
|
"Opens a recent notebooks list"
|
||||||
|
| selection |
|
||||||
|
|
||||||
|
self recentNotebooks
|
||||||
|
ifNotEmpty: [
|
||||||
|
selection := UIManager default chooseFrom: recentNotebooks reversed title: 'Choose a notebook'.
|
||||||
|
selection > 0
|
||||||
|
ifTrue: [ GrafoscopioNotebook new openFromFile: (recentNotebooks at: selection)]
|
||||||
|
ifFalse: [ self inform: 'No notebook selected!' ]
|
||||||
|
]
|
||||||
|
ifEmpty: [self messageNoRecentDocuments]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #accessing }
|
||||||
|
GfUIHelpers class >> recentNotebooks [
|
||||||
|
^ recentNotebooks ifNil: [recentNotebooks := OrderedCollection new ]
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #updating }
|
||||||
|
GfUIHelpers class >> updateDataviz [
|
||||||
|
"I update the Dataviz package with new versions of itself take from the source code
|
||||||
|
repository.
|
||||||
|
DataViz contains Data visualization helpers"
|
||||||
|
Gofer it
|
||||||
|
smalltalkhubUser: 'Offray' project: 'Dataviz';
|
||||||
|
configurationOf: 'Dataviz';
|
||||||
|
load.
|
||||||
|
self inform: 'Dataviz package update finished.'
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #updating }
|
||||||
|
GfUIHelpers class >> updateDatavizUI [
|
||||||
|
"I'm the User Interface for updating the Dataviz package with new versions of itself
|
||||||
|
take from the source code repository"
|
||||||
|
| update |
|
||||||
|
update := (UIManager default
|
||||||
|
confirm:
|
||||||
|
'Dataviz is data visualization package, with several', String cr,
|
||||||
|
'Domain Specific Examples, like Panama Papers, Twitter Data Selfies.',
|
||||||
|
String cr, 'Do you want to update it?'
|
||||||
|
label: 'Update Dataviz package').
|
||||||
|
update ifFalse: [ ^ self ].
|
||||||
|
self updateDataviz
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #updating }
|
||||||
|
GfUIHelpers class >> updateGrafoscopio [
|
||||||
|
"Updates Grafoscopio with new versions of itself take from the source code repository and
|
||||||
|
reloads the User Interface"
|
||||||
|
Gofer new
|
||||||
|
smalltalkhubUser: 'Offray' project: 'Grafoscopio';
|
||||||
|
package: 'Grafoscopio';
|
||||||
|
load.
|
||||||
|
GrafoscopioUtils update.
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #updating }
|
||||||
|
GfUIHelpers class >> updateGrafoscopioUI [
|
||||||
|
"Updates Grafoscopio with new versions of itself take from the source code repository and
|
||||||
|
the User Interface"
|
||||||
|
| update |
|
||||||
|
|
||||||
|
update := (UIManager default
|
||||||
|
confirm: 'Do you wish to update Grafoscopio?'
|
||||||
|
label: 'Grafoscopio update').
|
||||||
|
update ifFalse: [ ^ self ].
|
||||||
|
self updateGrafoscopio.
|
||||||
|
GrafoscopioUtils update.
|
||||||
|
self updateUI.
|
||||||
|
self inform: 'Grafoscopio update finished'
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #updating }
|
||||||
|
GfUIHelpers class >> updatePrerrequisitesScript [
|
||||||
|
"Updates the system prerequisites with new versions of itself take from the source code repository"
|
||||||
|
|
||||||
|
"Visualization library (which also makes main menu loadable)"
|
||||||
|
Gofer it
|
||||||
|
smalltalkhubUser: 'ObjectProfile' project: 'Roassal2';
|
||||||
|
configurationOf: 'Roassal2';
|
||||||
|
loadStable.
|
||||||
|
|
||||||
|
"Support for the STON format used in file persistance for grafoscopio notebooks"
|
||||||
|
Gofer new
|
||||||
|
smalltalkhubUser: 'SvenVanCaekenberghe' project: 'STON';
|
||||||
|
configurationOf: 'Ston';
|
||||||
|
loadBleedingEdge.
|
||||||
|
|
||||||
|
"Moose and Roassal integration"
|
||||||
|
Gofer new
|
||||||
|
smalltalkhubUser: 'Moose' project: 'Glamour';
|
||||||
|
package: 'Glamour-Tools';
|
||||||
|
package: 'Glamour-Roassal2-Presentations';
|
||||||
|
load.
|
||||||
|
|
||||||
|
Gofer new
|
||||||
|
smalltalkhubUser: 'Moose' project: 'GToolkit';
|
||||||
|
package: 'GT-InspectorExtensions-CoreRoassal';
|
||||||
|
load.
|
||||||
|
|
||||||
|
"Fast Table support"
|
||||||
|
Gofer it
|
||||||
|
smalltalkhubUser: 'estebanlm' project: 'FastTable';
|
||||||
|
package: 'FastTable';
|
||||||
|
load.
|
||||||
|
|
||||||
|
"Integration with external tools"
|
||||||
|
Gofer new
|
||||||
|
smalltalkhubUser: 'Offray' project: 'Grafoscopio';
|
||||||
|
package: 'Grafoscopio-ExternalTools';
|
||||||
|
load.
|
||||||
|
|
||||||
|
"HTML scrapping"
|
||||||
|
Gofer new
|
||||||
|
smalltalkhubUser: 'PharoExtras' project: 'Soup';
|
||||||
|
configurationOf: 'Soup';
|
||||||
|
loadStable.
|
||||||
|
|
||||||
|
"SQLite support"
|
||||||
|
Gofer new
|
||||||
|
url: 'http://smalltalkhub.com/mc/PharoExtras/NBSQLite3/main';
|
||||||
|
package: 'NBSQLite3';
|
||||||
|
load.
|
||||||
|
|
||||||
|
Gofer new
|
||||||
|
url: 'http://smalltalkhub.com/mc/PharoExtras/NBSQLite3/main';
|
||||||
|
package: 'NBSQLite3-Examples';
|
||||||
|
load.
|
||||||
|
|
||||||
|
"Support for Operative System integration"
|
||||||
|
Gofer new
|
||||||
|
squeaksource: 'OSProcess';
|
||||||
|
package: 'OSProcess';
|
||||||
|
load.
|
||||||
|
|
||||||
|
Gofer new
|
||||||
|
squeaksource: 'CommandShell';
|
||||||
|
package: 'CommandShell-Piping';
|
||||||
|
load.
|
||||||
|
|
||||||
|
"Bibliographic support"
|
||||||
|
Gofer new
|
||||||
|
squeaksource: 'Citezen';
|
||||||
|
package: 'ConfigurationOfCitezen';
|
||||||
|
load.
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #updating }
|
||||||
|
GfUIHelpers class >> updateRecentNotebooksWith: aFileReference [
|
||||||
|
(self recentNotebooks includes: aFileReference)
|
||||||
|
ifFalse: [self recentNotebooks add: aFileReference].
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #updating }
|
||||||
|
GfUIHelpers class >> updateSystem [
|
||||||
|
| tmp1 |
|
||||||
|
tmp1 := UIManager default
|
||||||
|
question: 'Do you wish to update all Grafoscopio and its co-dependencies ?'
|
||||||
|
title: 'Grafoscopio update'.
|
||||||
|
tmp1
|
||||||
|
ifNotNil: [ tmp1
|
||||||
|
ifTrue: [
|
||||||
|
self
|
||||||
|
updateGrafoscopio;
|
||||||
|
updateDataviz.
|
||||||
|
GrafoscopioDocumentation updateAll.
|
||||||
|
self inform: 'System update finished.' ]]
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #updating }
|
||||||
|
GfUIHelpers class >> updateUI [
|
||||||
|
"I update the User Interface (UI) with new versions of the docking bar or logos where available.
|
||||||
|
I'm helpful while testing new functionality that should be expossed to the user via the UI"
|
||||||
|
self start.
|
||||||
|
(World submorphs select: [ :each | each class = DockingBarMorph ])
|
||||||
|
allButFirstDo: [ :bar | bar delete ].
|
||||||
|
|
||||||
|
]
|
114
repository/Grafoscopio/GfWorldMenu.class.st
Normal file
114
repository/Grafoscopio/GfWorldMenu.class.st
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
"
|
||||||
|
I define the Grafoscopio main menu presented in the Pharo World.
|
||||||
|
"
|
||||||
|
Class {
|
||||||
|
#name : #GfWorldMenu,
|
||||||
|
#superclass : #Object,
|
||||||
|
#classInstVars : [
|
||||||
|
'recentNotebooks'
|
||||||
|
],
|
||||||
|
#category : #'Grafoscopio-UI'
|
||||||
|
}
|
||||||
|
|
||||||
|
{ #category : #'world menu' }
|
||||||
|
GfWorldMenu class >> helpMenuOn: aBuilder [
|
||||||
|
<worldMenu>
|
||||||
|
|
||||||
|
(aBuilder item: #GfManual)
|
||||||
|
label: 'Manual';
|
||||||
|
order: 1;
|
||||||
|
parent: #GfHelpAndDocs;
|
||||||
|
action: [ GrafoscopioNotebook open: GrafoscopioDocs manual ].
|
||||||
|
(aBuilder item: #GfManualPDF)
|
||||||
|
label: 'Manual (PDF)';
|
||||||
|
order: 2;
|
||||||
|
parent: #GfHelpAndDocs;
|
||||||
|
action: [ GrafoscopioDocs openPDFManual ].
|
||||||
|
(aBuilder item: #GfHelpDataviz)
|
||||||
|
label: 'Dataviz';
|
||||||
|
order: 3;
|
||||||
|
parent: #GfHelpAndDocs;
|
||||||
|
action: [ GrafoscopioNotebook open: DatavizDocs introNotebook ].
|
||||||
|
(aBuilder item: #GfHelpDevNotes)
|
||||||
|
label: 'Devs''s notes';
|
||||||
|
order: 4;
|
||||||
|
parent: #GfHelpAndDocs;
|
||||||
|
action: [ GrafoscopioNotebook open: GrafoscopioDocs devNotes ].
|
||||||
|
(aBuilder item: #GfHelpAbout)
|
||||||
|
label: 'About Grafoscopio';
|
||||||
|
order: 5;
|
||||||
|
parent: #GfHelpAndDocs;
|
||||||
|
action: [ GfUIHelpers messageAbout ].
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #'world menu' }
|
||||||
|
GfWorldMenu class >> launchMenuOn: aBuilder [
|
||||||
|
<worldMenu>
|
||||||
|
|
||||||
|
(aBuilder item: #'New notebook')
|
||||||
|
label: 'New notebook';
|
||||||
|
order: 1;
|
||||||
|
parent: #GfLaunch;
|
||||||
|
action: [ GrafoscopioNotebook new openDefault ].
|
||||||
|
(aBuilder item: #'Notebook from file...')
|
||||||
|
label: 'Notebook from file...';
|
||||||
|
order: 2;
|
||||||
|
parent: #GfLaunch;
|
||||||
|
action: [ GrafoscopioNotebook new openFromFileSelector ].
|
||||||
|
(aBuilder item: #'Notebook from the Internet...')
|
||||||
|
label: 'Notebook from the Internet...';
|
||||||
|
order: 3;
|
||||||
|
parent: #GfLaunch;
|
||||||
|
action: [ GrafoscopioNotebook new openFromUrlUI ].
|
||||||
|
(aBuilder item: #recentNotebooks)
|
||||||
|
label: 'Recent notebooks...';
|
||||||
|
order: 4;
|
||||||
|
parent: #GfLaunch;
|
||||||
|
action: [ GfUIHelpers openFromRecentlyUsed ].
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #'world menu' }
|
||||||
|
GfWorldMenu class >> mainMenuItemsOn: aBuilder [
|
||||||
|
"I add the main Grafoscopio menu to the Pharo World."
|
||||||
|
<worldMenu>
|
||||||
|
|
||||||
|
(aBuilder item: #Grafoscopio)
|
||||||
|
label: 'Grafoscopio';
|
||||||
|
order: 1;
|
||||||
|
with: [
|
||||||
|
(aBuilder item: #GfLaunch; label: 'Launch') target: self.
|
||||||
|
(aBuilder item: #GfUpdate; label: 'Update') target: self.
|
||||||
|
(aBuilder item: #GfHelpAndDocs; label: 'Help & Docs') target: self. ]
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #'world menu' }
|
||||||
|
GfWorldMenu class >> updateMenuOn: aBuilder [
|
||||||
|
<worldMenu>
|
||||||
|
|
||||||
|
(aBuilder item: #GfUpdateGrafoscopio)
|
||||||
|
label: 'Grafoscopio';
|
||||||
|
order: 1;
|
||||||
|
parent: #GfUpdate;
|
||||||
|
action: [ GfUIHelpers updateGrafoscopioUI ].
|
||||||
|
(aBuilder item: #GfUpdateDocs)
|
||||||
|
label: 'Documentation';
|
||||||
|
order: 2;
|
||||||
|
parent: #GfUpdate;
|
||||||
|
action: [ GrafoscopioDocumentation updateAllUI ].
|
||||||
|
(aBuilder item: #GfUpdateDataviz)
|
||||||
|
label: 'DataViz package';
|
||||||
|
order: 3;
|
||||||
|
parent: #GfUpdate;
|
||||||
|
action: [ GfUIHelpers updateDatavizUI ].
|
||||||
|
(aBuilder item: #GfUpdateAll)
|
||||||
|
label: 'All the system';
|
||||||
|
order: 4;
|
||||||
|
parent: #GfUpdate;
|
||||||
|
action: [ GfUIHelpers updateSystem ].
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #updating }
|
||||||
|
GfWorldMenu class >> updateRecentNotebooksWith: aFileReference [
|
||||||
|
(self recentNotebooks includes: aFileReference)
|
||||||
|
ifFalse: [self recentNotebooks add: aFileReference].
|
||||||
|
]
|
@ -1,643 +0,0 @@
|
|||||||
"
|
|
||||||
I'm the Graphical User Interface for Grafoscopio environment.
|
|
||||||
|
|
||||||
My main responsability is to provide grafoscopio with a docking bar
|
|
||||||
with menu options for open, browse notebooks, update the system
|
|
||||||
and its components and the help menu.
|
|
||||||
|
|
||||||
"
|
|
||||||
Class {
|
|
||||||
#name : #GrafoscopioDockingBar,
|
|
||||||
#superclass : #DynamicComposableModel,
|
|
||||||
#instVars : [
|
|
||||||
'windowMainMenu',
|
|
||||||
'tree',
|
|
||||||
'nodeHeader',
|
|
||||||
'nodeBody'
|
|
||||||
],
|
|
||||||
#classVars : [
|
|
||||||
'dockingBar',
|
|
||||||
'recentNotebooks'
|
|
||||||
],
|
|
||||||
#classInstVars : [
|
|
||||||
'dockingBar',
|
|
||||||
'recentNotebooks',
|
|
||||||
'helpMenu'
|
|
||||||
],
|
|
||||||
#category : #'Grafoscopio-UI'
|
|
||||||
}
|
|
||||||
|
|
||||||
{ #category : #adding }
|
|
||||||
GrafoscopioDockingBar class >> addToHelpMenu: aGrafoscopioNotebook [
|
|
||||||
| metadata nbFile |
|
|
||||||
metadata := aGrafoscopioNotebook metadata.
|
|
||||||
nbFile := aGrafoscopioNotebook workingFile.
|
|
||||||
(metadata at: 'showOnHelp' ifAbsent: [ ^ self ])
|
|
||||||
ifTrue: [
|
|
||||||
self helpMenu submorphs
|
|
||||||
detect: [ :s | s contents = (metadata at: 'shortTitle') ]
|
|
||||||
ifFound: [
|
|
||||||
self inform:
|
|
||||||
'The notebook: ', String cr,
|
|
||||||
nbFile fullName, String cr,
|
|
||||||
' needs another shortTitle to be added to the docking bar Help Menu.' ]
|
|
||||||
ifNone: [
|
|
||||||
self helpMenu
|
|
||||||
add: (metadata at: 'shortTitle')
|
|
||||||
target: [ GrafoscopioNotebook open: nbFile ]
|
|
||||||
selector: #value ] ].
|
|
||||||
self updateUI
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #accessing }
|
|
||||||
GrafoscopioDockingBar class >> defaultHelpMenu [
|
|
||||||
| defaultHelpMenu |
|
|
||||||
defaultHelpMenu := MenuMorph new.
|
|
||||||
defaultHelpMenu
|
|
||||||
add: 'Manual'
|
|
||||||
target: [ GrafoscopioNotebook open: GrafoscopioDocs manual ]
|
|
||||||
selector: #value;
|
|
||||||
add: 'Manual (PDF)'
|
|
||||||
target: GrafoscopioDocs
|
|
||||||
selector: #openPDFManual;
|
|
||||||
add: 'Dataviz'
|
|
||||||
target: [ GrafoscopioNotebook open: DatavizDocs introNotebook ]
|
|
||||||
selector: #value;
|
|
||||||
add: 'Dev''s notes'
|
|
||||||
target: [ GrafoscopioNotebook open: GrafoscopioDocs devNotes ]
|
|
||||||
selector: #value;
|
|
||||||
add: 'About Grafoscopio' target: self selector: #messageAbout.
|
|
||||||
^ defaultHelpMenu
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #specs }
|
|
||||||
GrafoscopioDockingBar class >> defaultSpec [
|
|
||||||
<spec: #default>
|
|
||||||
|
|
||||||
^ SpecLayout composed
|
|
||||||
newColumn: [ :mainWindow |
|
|
||||||
mainWindow
|
|
||||||
newRow: [:menu |
|
|
||||||
menu add: #windowMainMenu
|
|
||||||
] height: 35;
|
|
||||||
newRow: [:outlineView |
|
|
||||||
outlineView
|
|
||||||
newColumn: [ :treePart |
|
|
||||||
treePart
|
|
||||||
newRow: [:tree | tree add: #tree];
|
|
||||||
addSplitter;
|
|
||||||
newRow: [:nodeHeader | nodeHeader add: #nodeHeader] height: 30
|
|
||||||
] right: 0.7;
|
|
||||||
addSplitter;
|
|
||||||
newColumn: [ :nodePart |
|
|
||||||
nodePart add: #nodeBody] left: 0.3.
|
|
||||||
].
|
|
||||||
];
|
|
||||||
yourself
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #accessing }
|
|
||||||
GrafoscopioDockingBar class >> dockingBar [
|
|
||||||
^ dockingBar
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #accessing }
|
|
||||||
GrafoscopioDockingBar class >> dockingBar: anObject [
|
|
||||||
dockingBar := anObject
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #examples }
|
|
||||||
GrafoscopioDockingBar class >> exampleBootstrapDynamicUI1 [
|
|
||||||
"Starting from an example UI from the Spec-Glamour, to customize towards the grafoscopio
|
|
||||||
UI and get some ideas"
|
|
||||||
|
|
||||||
|notebook leftUpperPanel leftPanel treeBrowser |
|
|
||||||
|
|
||||||
"Creating a notebook-tree with dummy data"
|
|
||||||
notebook := GrafoscopioNode new becomeDefaultTestTree.
|
|
||||||
|
|
||||||
"Defining the tree roots part"
|
|
||||||
leftUpperPanel := DynamicComposableModel new.
|
|
||||||
leftUpperPanel instantiateModels: #(tree TreeModel).
|
|
||||||
leftUpperPanel tree
|
|
||||||
roots: notebook children;
|
|
||||||
childrenBlock: [:node | node children ];
|
|
||||||
displayBlock: [:node | node title ].
|
|
||||||
leftUpperPanel layout: (SpecLayout composed
|
|
||||||
add: #tree;
|
|
||||||
yourself).
|
|
||||||
"to debug upto here uncomment the next line, and comment all other 'openWithSpec' ones"
|
|
||||||
"leftUpperPanel openWithSpec."
|
|
||||||
|
|
||||||
"Integrating the previous tree with the node header and creating the body according to
|
|
||||||
the tags on the node"
|
|
||||||
leftPanel := DynamicComposableModel new.
|
|
||||||
leftPanel assign: leftUpperPanel to: #roots.
|
|
||||||
leftPanel instantiateModels: #(header TextInputFieldModel).
|
|
||||||
treeBrowser := DynamicComposableModel new.
|
|
||||||
leftUpperPanel tree
|
|
||||||
whenSelectedItemChanged: [:node |
|
|
||||||
node
|
|
||||||
ifNil:[
|
|
||||||
leftPanel header text: ''.
|
|
||||||
treeBrowser instantiateModels: #(body TextModel).
|
|
||||||
Transcript show: 'Nada que mostrar', String cr]
|
|
||||||
ifNotNil: [
|
|
||||||
leftPanel header text: (leftUpperPanel tree selectedItem content header).
|
|
||||||
leftUpperPanel tree selectedItem content tags = 'código'
|
|
||||||
ifTrue: [
|
|
||||||
treeBrowser instantiateModels: #(body GlamourPresentationModel).
|
|
||||||
Transcript show: 'I am code', String cr.
|
|
||||||
Transcript show: treeBrowser body asString, String cr.
|
|
||||||
]
|
|
||||||
ifFalse: [
|
|
||||||
treeBrowser instantiateModels: #(body TextModel).
|
|
||||||
treeBrowser body text: (leftUpperPanel tree selectedItem content body).
|
|
||||||
Transcript show: 'I am NOT code', String cr.
|
|
||||||
Transcript show: treeBrowser body asString, String cr.
|
|
||||||
]
|
|
||||||
]
|
|
||||||
].
|
|
||||||
leftPanel layout:
|
|
||||||
(SpecLayout composed
|
|
||||||
newColumn: [:column |
|
|
||||||
column
|
|
||||||
add: #roots;
|
|
||||||
add: #header height: 35];
|
|
||||||
yourself).
|
|
||||||
|
|
||||||
"Integrating the previous tree with node body content"
|
|
||||||
treeBrowser assign: leftPanel to: #leftTree.
|
|
||||||
treeBrowser layout:
|
|
||||||
(SpecLayout composed
|
|
||||||
newRow: [:r | r add: #leftTree; add: #body ];
|
|
||||||
yourself
|
|
||||||
).
|
|
||||||
treeBrowser openWithSpec.
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #examples }
|
|
||||||
GrafoscopioDockingBar class >> exampleBootstrapDynamicUI2 [
|
|
||||||
"Starting from an example UI from the Spec-Glamour, to customize towards the grafoscopio
|
|
||||||
UI and get some ideas"
|
|
||||||
|
|
||||||
|notebook leftUpperPanel leftPanel treeBrowser |
|
|
||||||
|
|
||||||
"Creating a notebook-tree with dummy data"
|
|
||||||
notebook := GrafoscopioNode new becomeDefaultTestTree.
|
|
||||||
|
|
||||||
"Defining the tree roots part"
|
|
||||||
leftUpperPanel := DynamicComposableModel new.
|
|
||||||
leftUpperPanel instantiateModels: #(tree TreeModel).
|
|
||||||
leftUpperPanel tree
|
|
||||||
roots: notebook children;
|
|
||||||
childrenBlock: [:node | node children ];
|
|
||||||
displayBlock: [:node | node title ].
|
|
||||||
leftUpperPanel layout: (SpecLayout composed
|
|
||||||
add: #tree;
|
|
||||||
yourself).
|
|
||||||
"to debug upto here uncomment the next line, and comment all other 'openWithSpec' ones"
|
|
||||||
"leftUpperPanel openWithSpec."
|
|
||||||
|
|
||||||
"Integrating the previous tree with the node header and creating the body according to
|
|
||||||
the tags on the node"
|
|
||||||
leftPanel := DynamicComposableModel new.
|
|
||||||
leftPanel assign: leftUpperPanel to: #roots.
|
|
||||||
leftPanel instantiateModels: #(header TextInputFieldModel).
|
|
||||||
treeBrowser := DynamicComposableModel new.
|
|
||||||
leftUpperPanel tree
|
|
||||||
whenSelectedItemChanged: [:node |
|
|
||||||
node
|
|
||||||
ifNil:[
|
|
||||||
leftPanel header text: ''.
|
|
||||||
treeBrowser instantiateModels: #(body TextModel).
|
|
||||||
Transcript show: 'Nada que mostrar', String cr]
|
|
||||||
ifNotNil: [
|
|
||||||
leftPanel header text: (leftUpperPanel tree selectedItem content header).
|
|
||||||
leftUpperPanel tree selectedItem content tags = 'código'
|
|
||||||
ifTrue: [
|
|
||||||
treeBrowser instantiateModels: #(body GlamourPresentationModel).
|
|
||||||
treeBrowser assign: leftPanel to: #leftTree.
|
|
||||||
treeBrowser layout:
|
|
||||||
(SpecLayout composed
|
|
||||||
newRow: [:r | r add: #leftTree; add: #body ];
|
|
||||||
yourself
|
|
||||||
).
|
|
||||||
Transcript show: 'I am code', String cr.
|
|
||||||
Transcript show: treeBrowser body asString, String cr.
|
|
||||||
]
|
|
||||||
ifFalse: [
|
|
||||||
treeBrowser instantiateModels: #(body TextModel).
|
|
||||||
treeBrowser body text: (leftUpperPanel tree selectedItem content body).
|
|
||||||
treeBrowser assign: leftPanel to: #leftTree.
|
|
||||||
treeBrowser layout:
|
|
||||||
(SpecLayout composed
|
|
||||||
newRow: [:r | r add: #leftTree; add: #body ];
|
|
||||||
yourself
|
|
||||||
).
|
|
||||||
Transcript show: 'I am NOT code', String cr.
|
|
||||||
Transcript show: treeBrowser body asString, String cr.
|
|
||||||
]
|
|
||||||
]
|
|
||||||
].
|
|
||||||
leftPanel layout:
|
|
||||||
(SpecLayout composed
|
|
||||||
newColumn: [:column |
|
|
||||||
column
|
|
||||||
add: #roots;
|
|
||||||
add: #header height: 35];
|
|
||||||
yourself).
|
|
||||||
|
|
||||||
"Integrating the previous tree with node body content"
|
|
||||||
treeBrowser openWithSpec.
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #examples }
|
|
||||||
GrafoscopioDockingBar class >> exampleBootstrapUI [
|
|
||||||
"Starting from an example UI from the Spec-Glamour, to customize towards the grafoscopio
|
|
||||||
UI and get some ideas"
|
|
||||||
|
|
||||||
|ui lay notebook |
|
|
||||||
|
|
||||||
ui := DynamicComposableModel new.
|
|
||||||
ui title: 'new | Grafoscopio'.
|
|
||||||
ui instantiateModels: #(
|
|
||||||
tree TreeModel
|
|
||||||
header TextInputFieldModel
|
|
||||||
bodyWhenMarkup TextModel
|
|
||||||
bodyWhenCode GlamourPresentationModel).
|
|
||||||
notebook := GrafoscopioNode new becomeDefaultTestTree.
|
|
||||||
ui tree
|
|
||||||
roots: notebook children;
|
|
||||||
childrenBlock: [:node | node children];
|
|
||||||
displayBlock: [:node | node title ].
|
|
||||||
|
|
||||||
lay := SpecLayout composed
|
|
||||||
newRow: [:row |
|
|
||||||
row
|
|
||||||
newColumn: [:column |
|
|
||||||
column
|
|
||||||
newRow: #tree top: 0.2;
|
|
||||||
addHSplitter;
|
|
||||||
newRow: #header bottom: 0.8] right: 0.7;
|
|
||||||
addVSplitter;
|
|
||||||
newColumn: #bodyWhenCode];
|
|
||||||
yourself.
|
|
||||||
|
|
||||||
ui openWithSpecLayout: lay.
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #accessing }
|
|
||||||
GrafoscopioDockingBar class >> helpMenu [
|
|
||||||
^ helpMenu ifNil: [ helpMenu := self defaultHelpMenu ]
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #accessing }
|
|
||||||
GrafoscopioDockingBar class >> helpMenu: anObject [
|
|
||||||
helpMenu := anObject
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #'class initialization' }
|
|
||||||
GrafoscopioDockingBar class >> initialize [
|
|
||||||
self start.
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #accessing }
|
|
||||||
GrafoscopioDockingBar class >> launchMenu [
|
|
||||||
| launchMenu |
|
|
||||||
launchMenu := MenuMorph new.
|
|
||||||
launchMenu
|
|
||||||
add: 'New notebook'
|
|
||||||
target: GrafoscopioNotebook new
|
|
||||||
selector: #openDefault;
|
|
||||||
add: 'Notebook from file...'
|
|
||||||
target: GrafoscopioNotebook new
|
|
||||||
selector: #openFromFileSelector;
|
|
||||||
add: 'Notebook from the 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: 'Playground' target: Smalltalk tools selector: #openWorkspace;
|
|
||||||
add: 'Transcript' target: Smalltalk tools selector: #openTranscript.
|
|
||||||
^ launchMenu
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #'graphical interface' }
|
|
||||||
GrafoscopioDockingBar class >> messageAbout [
|
|
||||||
"I show the author(s), license, sponsors and main contributors to the project
|
|
||||||
and point to further documentation on the web"
|
|
||||||
LongMessageDialogWindow new
|
|
||||||
entryText:
|
|
||||||
'_.:| Grafoscopio |:._',
|
|
||||||
(String with: Character cr),
|
|
||||||
'(c) Copyright 2014-2017 by Offray Vladimir Luna Cárdenas',
|
|
||||||
(String with: Character cr),
|
|
||||||
'Covered under MIT license.',
|
|
||||||
(String with: Character cr),
|
|
||||||
(String with: Character cr),
|
|
||||||
'[ Sponsors ]',
|
|
||||||
(String with: Character cr),
|
|
||||||
'mutabiT | www.mutabit.com ',
|
|
||||||
(String with: Character cr),
|
|
||||||
'HiTec Lab, Fundación Universitaria Los Libertadores | www.ulibertadores.edu.co ',
|
|
||||||
(String with: Character cr),
|
|
||||||
(String with: Character cr),
|
|
||||||
'[ Thanks to ]',
|
|
||||||
(String with: Character cr),
|
|
||||||
'HackBo, Hackerspace Bogota | http://hackbo.co',
|
|
||||||
(String with: Character cr),
|
|
||||||
'// Regular workshops attendees \\
|
|
||||||
Rafael Medida, Iván Pulido, Camilo Hurtado',
|
|
||||||
(String with: Character cr),
|
|
||||||
'// Coffe talk (mostly about grafoscopio) \\
|
|
||||||
Yanneth Gil, Andrés Calderón, Luis Alejandro Bernal',
|
|
||||||
(String with: Character cr),
|
|
||||||
'// Pharo, Moose and Agile Visualization communities \\
|
|
||||||
Tudor Girba, Alexandre Bergel, Nicolai Hess, Peter Uhnák, Milton Mamani ',
|
|
||||||
(String with: Character cr),
|
|
||||||
'// Family support while writing, coding & travelling (among others!) \\
|
|
||||||
Divian Luna, Hilda Cárdenas',
|
|
||||||
(String with: Character cr),
|
|
||||||
(String with: Character cr),
|
|
||||||
'For further details and versions go to:',
|
|
||||||
(String with: Character cr),
|
|
||||||
(String with: Character cr),
|
|
||||||
'http://mutabit.com/grafoscopio';
|
|
||||||
title: 'About Grafoscopio';
|
|
||||||
open.
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #'graphical interface' }
|
|
||||||
GrafoscopioDockingBar class >> messageNoRecentDocuments [
|
|
||||||
"Shows that a feature is not implemeted and point to further documentation on the web"
|
|
||||||
|
|
||||||
UIManager default abort:
|
|
||||||
'Recent documents list is emtpy.',
|
|
||||||
(String with: Character cr),
|
|
||||||
'To fill it, open a document using the top bar menu option:',
|
|
||||||
(String with: Character cr),
|
|
||||||
(String with: Character cr),
|
|
||||||
'"Launch > Notebook from file"',
|
|
||||||
(String with: Character cr),
|
|
||||||
(String with: Character cr)
|
|
||||||
title: 'No recent documents'.
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #'graphical interface' }
|
|
||||||
GrafoscopioDockingBar class >> messageNotImplementedYet [
|
|
||||||
"Shows that a feature is not implemeted and point to further documentation on the web"
|
|
||||||
|
|
||||||
UIManager default abort:
|
|
||||||
'This functionality is not implemented yet!',
|
|
||||||
(String with: Character cr),
|
|
||||||
'For more information about future releases, please visit: ',
|
|
||||||
(String with: Character cr),
|
|
||||||
(String with: Character cr),
|
|
||||||
'http://mutabit.com/grafoscopio',
|
|
||||||
(String with: Character cr),
|
|
||||||
(String with: Character cr)
|
|
||||||
title: 'To be implemented'.
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #'graphical interface' }
|
|
||||||
GrafoscopioDockingBar class >> open [
|
|
||||||
^ self new open
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #'graphical interface' }
|
|
||||||
GrafoscopioDockingBar class >> openFromRecentlyUsed [
|
|
||||||
"Opens a recent notebooks list"
|
|
||||||
| selection |
|
|
||||||
|
|
||||||
self recentNotebooks
|
|
||||||
ifNotEmpty: [
|
|
||||||
selection := UIManager default chooseFrom: recentNotebooks reversed title: 'Choose a notebook'.
|
|
||||||
selection > 0
|
|
||||||
ifTrue: [ GrafoscopioNotebook new openFromFile: (recentNotebooks at: selection)]
|
|
||||||
ifFalse: [ self inform: 'No notebook selected!' ]
|
|
||||||
]
|
|
||||||
ifEmpty: [self messageNoRecentDocuments]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #accessing }
|
|
||||||
GrafoscopioDockingBar class >> recentNotebooks [
|
|
||||||
^ recentNotebooks ifNil: [recentNotebooks := OrderedCollection new ]
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #accessing }
|
|
||||||
GrafoscopioDockingBar class >> recentNotebooks: anOrderedCollection [
|
|
||||||
recentNotebooks := anOrderedCollection
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #configuration }
|
|
||||||
GrafoscopioDockingBar class >> showSettings [
|
|
||||||
"Shows the settings in a Transcript. This should return a dictionary for better management of the settings. For the moment
|
|
||||||
is a quick a dirty hack"
|
|
||||||
|
|
||||||
Transcript show: fossil; cr.
|
|
||||||
Transcript show: pandoc
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #accessing }
|
|
||||||
GrafoscopioDockingBar class >> start [
|
|
||||||
"Creates a custom docking bar for grafoscopio on top, for shorcuts to the most used actions,
|
|
||||||
and as a fixed place for asking for help, external tools and grafoscopio updates and about"
|
|
||||||
dockingBar := DockingBarMorph new.
|
|
||||||
dockingBar
|
|
||||||
add: 'Launch' subMenu: self launchMenu;
|
|
||||||
add: 'Update' subMenu: self updateMenu;
|
|
||||||
add: 'Help' subMenu: self helpMenu.
|
|
||||||
dockingBar
|
|
||||||
adhereToTop;
|
|
||||||
openInWorld
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #updating }
|
|
||||||
GrafoscopioDockingBar class >> updateDataviz [
|
|
||||||
"I update the Dataviz package with new versions of itself take from the source code
|
|
||||||
repository.
|
|
||||||
DataViz contains Data visualization helpers"
|
|
||||||
Gofer it
|
|
||||||
smalltalkhubUser: 'Offray' project: 'Dataviz';
|
|
||||||
configurationOf: 'Dataviz';
|
|
||||||
load.
|
|
||||||
self inform: 'Dataviz package update finished.'
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #updating }
|
|
||||||
GrafoscopioDockingBar class >> updateDatavizUI [
|
|
||||||
"I'm the User Interface for updating the Dataviz package with new versions of itself
|
|
||||||
take from the source code repository"
|
|
||||||
| update |
|
|
||||||
update := (UIManager default
|
|
||||||
confirm:
|
|
||||||
'Dataviz is data visualization package, with several', String cr,
|
|
||||||
'Domain Specific Examples, like Panama Papers, Twitter Data Selfies.',
|
|
||||||
String cr, 'Do you want to update it?'
|
|
||||||
label: 'Update Dataviz package').
|
|
||||||
update ifFalse: [ ^ self ].
|
|
||||||
self updateDataviz
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #updating }
|
|
||||||
GrafoscopioDockingBar class >> updateGrafoscopio [
|
|
||||||
"Updates Grafoscopio with new versions of itself take from the source code repository and
|
|
||||||
reloads the User Interface"
|
|
||||||
Gofer new
|
|
||||||
smalltalkhubUser: 'Offray' project: 'Grafoscopio';
|
|
||||||
package: 'Grafoscopio';
|
|
||||||
load.
|
|
||||||
GrafoscopioUtils update.
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #updating }
|
|
||||||
GrafoscopioDockingBar class >> updateGrafoscopioUI [
|
|
||||||
"Updates Grafoscopio with new versions of itself take from the source code repository and
|
|
||||||
the User Interface"
|
|
||||||
| update |
|
|
||||||
|
|
||||||
update := (UIManager default
|
|
||||||
confirm: 'Do you wish to update Grafoscopio?'
|
|
||||||
label: 'Grafoscopio update').
|
|
||||||
update ifFalse: [ ^ self ].
|
|
||||||
self updateGrafoscopio.
|
|
||||||
GrafoscopioUtils update.
|
|
||||||
self updateUI.
|
|
||||||
self inform: 'Grafoscopio update finished'
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #accessing }
|
|
||||||
GrafoscopioDockingBar class >> updateMenu [
|
|
||||||
| updateMenu |
|
|
||||||
updateMenu := MenuMorph new.
|
|
||||||
updateMenu
|
|
||||||
add: 'Grafoscopio' target: self selector: #updateGrafoscopioUI;
|
|
||||||
add: 'Documentation'
|
|
||||||
target: GrafoscopioDocumentation
|
|
||||||
selector: #updateAllUI;
|
|
||||||
add: 'DataViz package' target: self selector: #updateDatavizUI;
|
|
||||||
add: 'Notebooks places'
|
|
||||||
target: GrafoscopioDocumentation
|
|
||||||
selector: #updateDocsPlaceUI;
|
|
||||||
add: 'All the system' target: self selector: #updateSystem.
|
|
||||||
^ updateMenu
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #updating }
|
|
||||||
GrafoscopioDockingBar class >> updatePrerrequisitesScript [
|
|
||||||
"Updates the system prerequisites with new versions of itself take from the source code repository"
|
|
||||||
|
|
||||||
"Visualization library (which also makes main menu loadable)"
|
|
||||||
Gofer it
|
|
||||||
smalltalkhubUser: 'ObjectProfile' project: 'Roassal2';
|
|
||||||
configurationOf: 'Roassal2';
|
|
||||||
loadStable.
|
|
||||||
|
|
||||||
"Support for the STON format used in file persistance for grafoscopio notebooks"
|
|
||||||
Gofer new
|
|
||||||
smalltalkhubUser: 'SvenVanCaekenberghe' project: 'STON';
|
|
||||||
configurationOf: 'Ston';
|
|
||||||
loadBleedingEdge.
|
|
||||||
|
|
||||||
"Moose and Roassal integration"
|
|
||||||
Gofer new
|
|
||||||
smalltalkhubUser: 'Moose' project: 'Glamour';
|
|
||||||
package: 'Glamour-Tools';
|
|
||||||
package: 'Glamour-Roassal2-Presentations';
|
|
||||||
load.
|
|
||||||
|
|
||||||
Gofer new
|
|
||||||
smalltalkhubUser: 'Moose' project: 'GToolkit';
|
|
||||||
package: 'GT-InspectorExtensions-CoreRoassal';
|
|
||||||
load.
|
|
||||||
|
|
||||||
"Fast Table support"
|
|
||||||
Gofer it
|
|
||||||
smalltalkhubUser: 'estebanlm' project: 'FastTable';
|
|
||||||
package: 'FastTable';
|
|
||||||
load.
|
|
||||||
|
|
||||||
"Integration with external tools"
|
|
||||||
Gofer new
|
|
||||||
smalltalkhubUser: 'Offray' project: 'Grafoscopio';
|
|
||||||
package: 'Grafoscopio-ExternalTools';
|
|
||||||
load.
|
|
||||||
|
|
||||||
"HTML scrapping"
|
|
||||||
Gofer new
|
|
||||||
smalltalkhubUser: 'PharoExtras' project: 'Soup';
|
|
||||||
configurationOf: 'Soup';
|
|
||||||
loadStable.
|
|
||||||
|
|
||||||
"SQLite support"
|
|
||||||
Gofer new
|
|
||||||
url: 'http://smalltalkhub.com/mc/PharoExtras/NBSQLite3/main';
|
|
||||||
package: 'NBSQLite3';
|
|
||||||
load.
|
|
||||||
|
|
||||||
Gofer new
|
|
||||||
url: 'http://smalltalkhub.com/mc/PharoExtras/NBSQLite3/main';
|
|
||||||
package: 'NBSQLite3-Examples';
|
|
||||||
load.
|
|
||||||
|
|
||||||
"Support for Operative System integration"
|
|
||||||
Gofer new
|
|
||||||
squeaksource: 'OSProcess';
|
|
||||||
package: 'OSProcess';
|
|
||||||
load.
|
|
||||||
|
|
||||||
Gofer new
|
|
||||||
squeaksource: 'CommandShell';
|
|
||||||
package: 'CommandShell-Piping';
|
|
||||||
load.
|
|
||||||
|
|
||||||
"Bibliographic support"
|
|
||||||
Gofer new
|
|
||||||
squeaksource: 'Citezen';
|
|
||||||
package: 'ConfigurationOfCitezen';
|
|
||||||
load.
|
|
||||||
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #updating }
|
|
||||||
GrafoscopioDockingBar class >> updateRecentNotebooksWith: aFileReference [
|
|
||||||
(self recentNotebooks includes: aFileReference)
|
|
||||||
ifFalse: [self recentNotebooks add: aFileReference].
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #updating }
|
|
||||||
GrafoscopioDockingBar class >> updateSystem [
|
|
||||||
| tmp1 |
|
|
||||||
tmp1 := UIManager default
|
|
||||||
question: 'Do you wish to update all Grafoscopio and its co-dependencies ?'
|
|
||||||
title: 'Grafoscopio update'.
|
|
||||||
tmp1
|
|
||||||
ifNotNil: [ tmp1
|
|
||||||
ifTrue: [
|
|
||||||
self
|
|
||||||
updateGrafoscopio;
|
|
||||||
updateDataviz.
|
|
||||||
GrafoscopioDocumentation updateAll.
|
|
||||||
self inform: 'System update finished.' ]]
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #updating }
|
|
||||||
GrafoscopioDockingBar class >> updateUI [
|
|
||||||
"I update the User Interface (UI) with new versions of the docking bar or logos where available.
|
|
||||||
I'm helpful while testing new functionality that should be expossed to the user via the UI"
|
|
||||||
self start.
|
|
||||||
(World submorphs select: [ :each | each class = DockingBarMorph ])
|
|
||||||
allButFirstDo: [ :bar | bar delete ].
|
|
||||||
|
|
||||||
]
|
|
@ -580,7 +580,7 @@ GrafoscopioNotebook >> notebookSubMenu [
|
|||||||
item
|
item
|
||||||
name: 'Download images';
|
name: 'Download images';
|
||||||
icon: (Smalltalk ui icons iconNamed: #processBrowser);
|
icon: (Smalltalk ui icons iconNamed: #processBrowser);
|
||||||
action: [ self downloadImages ] ].
|
action: [ self downloadImages ] ].
|
||||||
group
|
group
|
||||||
addItem: [ :item |
|
addItem: [ :item |
|
||||||
item
|
item
|
||||||
@ -609,7 +609,8 @@ GrafoscopioNotebook >> notebookSubMenu [
|
|||||||
addItem: [ :item |
|
addItem: [ :item |
|
||||||
item
|
item
|
||||||
name: 'See html';
|
name: 'See html';
|
||||||
icon: #smallInspectIt asIcon;
|
icon:
|
||||||
|
(self iconNamed: #smallInspectIt);
|
||||||
action: [ self inform: 'To be implemented...' ] ].
|
action: [ self inform: 'To be implemented...' ] ].
|
||||||
group
|
group
|
||||||
addItem: [ :item |
|
addItem: [ :item |
|
||||||
@ -647,17 +648,18 @@ GrafoscopioNotebook >> openFromFile: aFileReference [
|
|||||||
{ #category : #persistence }
|
{ #category : #persistence }
|
||||||
GrafoscopioNotebook >> openFromFileSelector [
|
GrafoscopioNotebook >> openFromFileSelector [
|
||||||
|
|
||||||
| fileStream nb |
|
| file nb |
|
||||||
fileStream := UIManager default
|
file := UIManager default
|
||||||
fileOpen: 'Choose a file'
|
chooseExistingFileReference:'Choose a file'
|
||||||
extensions: #('ston').
|
extensions: #('ston')
|
||||||
fileStream ifNil: [
|
path: FileLocator documents.
|
||||||
|
file ifNil: [
|
||||||
self inform: 'No file selected'.
|
self inform: 'No file selected'.
|
||||||
^ self ].
|
^ self ].
|
||||||
self workingFile: fileStream name asFileReference.
|
self workingFile: file fullPath.
|
||||||
nb := self class new.
|
nb := self class new.
|
||||||
nb openFromFile: self workingFile.
|
nb openFromFile: self workingFile.
|
||||||
GrafoscopioDockingBar updateRecentNotebooksWith: workingFile
|
GfUIHelpers updateRecentNotebooksWith: workingFile
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #persistence }
|
{ #category : #persistence }
|
||||||
@ -798,7 +800,7 @@ GrafoscopioNotebook >> saveToFile: aFileReference [
|
|||||||
self exportAsSton: self notebook on: stream ].
|
self exportAsSton: self notebook on: stream ].
|
||||||
self title: self workingFile basenameWithIndicator, ' | Grafoscopio notebook'.
|
self title: self workingFile basenameWithIndicator, ' | Grafoscopio notebook'.
|
||||||
self inform: ('File saved at: ', String cr, self workingFile fullName).
|
self inform: ('File saved at: ', String cr, self workingFile fullName).
|
||||||
GrafoscopioDockingBar updateRecentNotebooksWith: aFileReference.
|
GfUIHelpers updateRecentNotebooksWith: aFileReference.
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #persistence }
|
{ #category : #persistence }
|
||||||
@ -821,7 +823,7 @@ GrafoscopioNotebook >> saveWorkingNotebook [
|
|||||||
self workingFile
|
self workingFile
|
||||||
ifNil: [ self saveToFileUI ]
|
ifNil: [ self saveToFileUI ]
|
||||||
ifNotNil: [ self saveToFile: workingFile ].
|
ifNotNil: [ self saveToFile: workingFile ].
|
||||||
GrafoscopioDockingBar updateRecentNotebooksWith: workingFile
|
GfUIHelpers updateRecentNotebooksWith: workingFile
|
||||||
|
|
||||||
|
|
||||||
]
|
]
|
||||||
@ -859,13 +861,13 @@ GrafoscopioNotebook >> topBar [
|
|||||||
addItem: [ :item |
|
addItem: [ :item |
|
||||||
item
|
item
|
||||||
name: 'Notebook';
|
name: 'Notebook';
|
||||||
icon: #smallObjects asIcon;
|
icon: (self iconNamed: #smallObjects);
|
||||||
subMenu: self notebookSubMenu ].
|
subMenu: self notebookSubMenu ].
|
||||||
group
|
group
|
||||||
addItem: [ :item |
|
addItem: [ :item |
|
||||||
item
|
item
|
||||||
name: 'Project';
|
name: 'Project';
|
||||||
icon: #catalog asIcon;
|
icon: (self iconNamed: #catalog);
|
||||||
subMenu: self projectSubMenu ] ];
|
subMenu: self projectSubMenu ] ];
|
||||||
addGroup: [ :group |
|
addGroup: [ :group |
|
||||||
group
|
group
|
||||||
@ -873,42 +875,42 @@ GrafoscopioNotebook >> topBar [
|
|||||||
item
|
item
|
||||||
name: nil;
|
name: nil;
|
||||||
description: 'Save notebook';
|
description: 'Save notebook';
|
||||||
icon: #glamorousSave asIcon;
|
icon: (self iconNamed: #glamorousSave);
|
||||||
action: [ self saveWorkingNotebook ] ].
|
action: [ self saveWorkingNotebook ] ].
|
||||||
group
|
group
|
||||||
addItem: [ :item |
|
addItem: [ :item |
|
||||||
item
|
item
|
||||||
name: nil;
|
name: nil;
|
||||||
description: 'Export all markdown subtrees';
|
description: 'Export all markdown subtrees';
|
||||||
icon: #glamorousMore asIcon;
|
icon: (self iconNamed: #glamorousMore);
|
||||||
action: [ self exportAllSubtreesAsMarkdow ] ].
|
action: [ self exportAllSubtreesAsMarkdow ] ].
|
||||||
group
|
group
|
||||||
addItem: [ :item |
|
addItem: [ :item |
|
||||||
item
|
item
|
||||||
name: nil;
|
name: nil;
|
||||||
description: 'Cut';
|
description: 'Cut';
|
||||||
icon: #smallCut asIcon;
|
icon: (self iconNamed: #smallCut);
|
||||||
action: [ self cutNodeToClipboard ] ].
|
action: [ self cutNodeToClipboard ] ].
|
||||||
group
|
group
|
||||||
addItem: [ :item |
|
addItem: [ :item |
|
||||||
item
|
item
|
||||||
name: nil;
|
name: nil;
|
||||||
description: 'Copy';
|
description: 'Copy';
|
||||||
icon: #smallCopy asIcon;
|
icon: (self iconNamed: #smallCopy);
|
||||||
action: [ self copyNodeToClipboard ] ].
|
action: [ self copyNodeToClipboard ] ].
|
||||||
group
|
group
|
||||||
addItem: [ :item |
|
addItem: [ :item |
|
||||||
item
|
item
|
||||||
name: nil;
|
name: nil;
|
||||||
description: 'Paste';
|
description: 'Paste';
|
||||||
icon: #smallPaste asIcon;
|
icon: (self iconNamed: #smallPaste);
|
||||||
action: [ self pasteNodeFromClipboard ] ].
|
action: [ self pasteNodeFromClipboard ] ].
|
||||||
group
|
group
|
||||||
addItem: [ :item |
|
addItem: [ :item |
|
||||||
item
|
item
|
||||||
name: nil;
|
name: nil;
|
||||||
description: 'Find & Replace';
|
description: 'Find & Replace';
|
||||||
icon: #smallFind asIcon;
|
icon: (self iconNamed: #smallFind);
|
||||||
action: [ self findAndReplace ] ] ];
|
action: [ self findAndReplace ] ] ];
|
||||||
addGroup: [ :group |
|
addGroup: [ :group |
|
||||||
group
|
group
|
||||||
@ -966,35 +968,35 @@ GrafoscopioNotebook >> topBar [
|
|||||||
item
|
item
|
||||||
name: nil;
|
name: nil;
|
||||||
description: 'List node links';
|
description: 'List node links';
|
||||||
icon: #tinyMenu asIcon;
|
icon: (self iconNamed: #tinyMenu);
|
||||||
action: [ self linksList ] ].
|
action: [ self linksList ] ].
|
||||||
group
|
group
|
||||||
addItem: [ :item |
|
addItem: [ :item |
|
||||||
item
|
item
|
||||||
name: nil;
|
name: nil;
|
||||||
description: 'Visit link';
|
description: 'Visit link';
|
||||||
icon: #glamorousRight asIcon;
|
icon: (self iconNamed: #glamorousRight);
|
||||||
action: [ self visitNodeLink ] ].
|
action: [ self visitNodeLink ] ].
|
||||||
group
|
group
|
||||||
addItem: [ :item |
|
addItem: [ :item |
|
||||||
item
|
item
|
||||||
name: nil;
|
name: nil;
|
||||||
description: 'Import link content';
|
description: 'Import link content';
|
||||||
icon: #glamorousRefresh asIcon;
|
icon: (self iconNamed: #glamorousRefresh);
|
||||||
action: [ self importLinkContent ] ].
|
action: [ self importLinkContent ] ].
|
||||||
group
|
group
|
||||||
addItem: [ :item |
|
addItem: [ :item |
|
||||||
item
|
item
|
||||||
name: nil;
|
name: nil;
|
||||||
description: 'HTML to Markdown';
|
description: 'HTML to Markdown';
|
||||||
icon: #smallProfile asIcon;
|
icon: (self iconNamed: #smallProfile);
|
||||||
action: [ self htmlToMarkdown ] ].
|
action: [ self htmlToMarkdown ] ].
|
||||||
group
|
group
|
||||||
addItem: [ :item |
|
addItem: [ :item |
|
||||||
item
|
item
|
||||||
name: nil;
|
name: nil;
|
||||||
description: 'HTML to Markdown subtree';
|
description: 'HTML to Markdown subtree';
|
||||||
icon: #hierarchy asIcon;
|
icon: (self iconNamed: #hierarchy);
|
||||||
action: [ self htmlToMarkdownSubtree ] ].
|
action: [ self htmlToMarkdownSubtree ] ].
|
||||||
group
|
group
|
||||||
addItem: [ :item |
|
addItem: [ :item |
|
||||||
@ -1023,7 +1025,8 @@ GrafoscopioNotebook >> topBar [
|
|||||||
item
|
item
|
||||||
name: nil;
|
name: nil;
|
||||||
description: 'Debug';
|
description: 'Debug';
|
||||||
icon: #glamorousBug asIcon;
|
icon:
|
||||||
|
(self iconNamed: #glamorousBug);
|
||||||
action: [ self debugWithSelector: self debugMessage ] ] ]
|
action: [ self debugWithSelector: self debugMessage ] ] ]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ ManifestGrafoscopio class >> ruleRBLongMethodsRuleV1FalsePositive [
|
|||||||
|
|
||||||
{ #category : #'code-critics' }
|
{ #category : #'code-critics' }
|
||||||
ManifestGrafoscopio class >> ruleRBSentNotImplementedRuleV1FalsePositive [
|
ManifestGrafoscopio class >> ruleRBSentNotImplementedRuleV1FalsePositive [
|
||||||
^ #(#(#(#RGMetaclassDefinition #(#'GrafoscopioGUI class' #GrafoscopioDockingBar)) #'2015-12-23T10:38:16.706667-05:00') #(#(#RGClassDefinition #(#GrafoscopioDockingBar)) #'2016-01-06T18:53:45.844051-05:00') #(#(#RGMethodDefinition #(#GrafoscopioNotebook #topBar #false)) #'2016-12-17T18:51:40.617924-05:00') )
|
^ #(#(#(#RGMetaclassDefinition #(#'GrafoscopioGUI class' #GfUIHelpers)) #'2015-12-23T10:38:16.706667-05:00') #(#(#RGClassDefinition #(#GfUIHelpers)) #'2016-01-06T18:53:45.844051-05:00') #(#(#RGMethodDefinition #(#GrafoscopioNotebook #topBar #false)) #'2016-12-17T18:51:40.617924-05:00') )
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #'code-critics' }
|
{ #category : #'code-critics' }
|
||||||
|
@ -40,7 +40,7 @@ MendaIcons class >> current [
|
|||||||
{ #category : #'accessing - icons' }
|
{ #category : #'accessing - icons' }
|
||||||
MendaIcons >> arrowDownIcon [
|
MendaIcons >> arrowDownIcon [
|
||||||
"Private - Generated method"
|
"Private - Generated method"
|
||||||
^Form fromBinaryStream: (Base64MimeConverter mimeDecodeToBytes: self arrowDownIconContents readStream)
|
^Form fromBinaryStream: (self arrowDownIconContents base64Decoded readStream)
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #'private - contents' }
|
{ #category : #'private - contents' }
|
||||||
@ -57,7 +57,7 @@ YII='
|
|||||||
{ #category : #'accessing - icons' }
|
{ #category : #'accessing - icons' }
|
||||||
MendaIcons >> arrowLeftIcon [
|
MendaIcons >> arrowLeftIcon [
|
||||||
"Private - Generated method"
|
"Private - Generated method"
|
||||||
^Form fromBinaryStream: (Base64MimeConverter mimeDecodeToBytes: self arrowLeftIconContents readStream)
|
^Form fromBinaryStream: (self arrowLeftIconContents base64Decoded readStream)
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #'private - contents' }
|
{ #category : #'private - contents' }
|
||||||
@ -73,7 +73,7 @@ CTw22bbtVtKX7Z+IWN8VNbr02vf95umjbFNKebPNDbaypHslWRyiAAAAAElFTkSuQmCC'
|
|||||||
{ #category : #'accessing - icons' }
|
{ #category : #'accessing - icons' }
|
||||||
MendaIcons >> arrowRightIcon [
|
MendaIcons >> arrowRightIcon [
|
||||||
"Private - Generated method"
|
"Private - Generated method"
|
||||||
^Form fromBinaryStream: (Base64MimeConverter mimeDecodeToBytes: self arrowRightIconContents readStream)
|
^Form fromBinaryStream: (self arrowRightIconContents base64Decoded readStream)
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #'private - contents' }
|
{ #category : #'private - contents' }
|
||||||
@ -90,7 +90,7 @@ APv6mfGc3+HbAAAAAElFTkSuQmCC'
|
|||||||
{ #category : #'accessing - icons' }
|
{ #category : #'accessing - icons' }
|
||||||
MendaIcons >> arrowUpIcon [
|
MendaIcons >> arrowUpIcon [
|
||||||
"Private - Generated method"
|
"Private - Generated method"
|
||||||
^Form fromBinaryStream: (Base64MimeConverter mimeDecodeToBytes: self arrowUpIconContents readStream)
|
^Form fromBinaryStream: (self arrowUpIconContents base64Decoded readStream)
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #'private - contents' }
|
{ #category : #'private - contents' }
|
||||||
@ -137,7 +137,7 @@ MendaIcons >> initializeIcons [
|
|||||||
{ #category : #'accessing - icons' }
|
{ #category : #'accessing - icons' }
|
||||||
MendaIcons >> minusIcon [
|
MendaIcons >> minusIcon [
|
||||||
"Private - Generated method"
|
"Private - Generated method"
|
||||||
^Form fromBinaryStream: (Base64MimeConverter mimeDecodeToBytes: self minusIconContents readStream)
|
^Form fromBinaryStream: (self minusIconContents base64Decoded readStream)
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #'private - contents' }
|
{ #category : #'private - contents' }
|
||||||
@ -151,7 +151,7 @@ SFlzAAAOxAAADsQBlSsOGwAAADhJREFUCJlj7O7uDmNgYEhjIAEwMTFNZ2FkZJRjYGBwJkXj
|
|||||||
{ #category : #'accessing - icons' }
|
{ #category : #'accessing - icons' }
|
||||||
MendaIcons >> plusIcon [
|
MendaIcons >> plusIcon [
|
||||||
"Private - Generated method"
|
"Private - Generated method"
|
||||||
^Form fromBinaryStream: (Base64MimeConverter mimeDecodeToBytes: self plusIconContents readStream)
|
^Form fromBinaryStream: (self plusIconContents base64Decoded readStream)
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #'private - contents' }
|
{ #category : #'private - contents' }
|
||||||
@ -167,7 +167,7 @@ R+AyGQ9lWV5jzR/949qtDkAPryBSmhE5/jJyCd+z1gAAAABJRU5ErkJggg=='
|
|||||||
{ #category : #'accessing - icons' }
|
{ #category : #'accessing - icons' }
|
||||||
MendaIcons >> smalltalkCodeIcon [
|
MendaIcons >> smalltalkCodeIcon [
|
||||||
"Private - Generated method"
|
"Private - Generated method"
|
||||||
^Form fromBinaryStream: (Base64MimeConverter mimeDecodeToBytes: self smalltalkCodeIconContents readStream)
|
^Form fromBinaryStream: (self smalltalkCodeIconContents base64Decoded readStream)
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #'private - contents' }
|
{ #category : #'private - contents' }
|
||||||
@ -185,7 +185,7 @@ PAHoY/0qaR2vW0hqvwBnzXKb8TsomwAAAABJRU5ErkJggg=='
|
|||||||
{ #category : #'accessing - icons' }
|
{ #category : #'accessing - icons' }
|
||||||
MendaIcons >> tagAddIcon [
|
MendaIcons >> tagAddIcon [
|
||||||
"Private - Generated method"
|
"Private - Generated method"
|
||||||
^Form fromBinaryStream: (Base64MimeConverter mimeDecodeToBytes: self tagAddIconContents readStream)
|
^Form fromBinaryStream: (self tagAddIconContents base64Decoded readStream)
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #'private - contents' }
|
{ #category : #'private - contents' }
|
||||||
@ -204,7 +204,7 @@ X92gun92K18+AAAAAElFTkSuQmCC'
|
|||||||
{ #category : #'accessing - icons' }
|
{ #category : #'accessing - icons' }
|
||||||
MendaIcons >> tagMinusIcon [
|
MendaIcons >> tagMinusIcon [
|
||||||
"Private - Generated method"
|
"Private - Generated method"
|
||||||
^Form fromBinaryStream: (Base64MimeConverter mimeDecodeToBytes: self tagMinusIconContents readStream)
|
^Form fromBinaryStream: (self tagMinusIconContents base64Decoded readStream)
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #'private - contents' }
|
{ #category : #'private - contents' }
|
||||||
|
Loading…
Reference in New Issue
Block a user