17146
17127
dialog position: 25 @ 25! !
17148
17129
!DrGeo class methodsFor: 'user interface'!
17149
communityMenuOn: aBuilder
17151
(aBuilder item: #'Dr. Geo web' translated)
17152
parent: #'Community' translated;
17153
action: [WebBrowser openOn: 'http://www.drgeo.eu'].
17154
(aBuilder item: #'Documentation' translated)
17155
parent: #'Community' translated;
17156
action: [WebBrowser openOn: 'http://www.drgeo.eu/help'].
17157
(aBuilder item: #'User guide (local)' translated)
17158
parent: #'Community' translated;
17159
action: [DrGeoSystem userGuide].
17160
(aBuilder item: #'Translate' translated)
17161
parent: #'Community' translated;
17162
action: [WebBrowser openOn: 'http://translate.drgeo.eu'].
17164
(aBuilder item: #'Discussion forum' translated)
17165
parent: #'Community' translated;
17166
action: [WebBrowser openOn: 'http://forum.drgeo.eu'].
17167
(aBuilder item: #'Report a bug' translated)
17168
parent: #'Community' translated;
17169
action: [WebBrowser openOn: 'http://bug.drgeo.eu'].! !
17171
!DrGeo class methodsFor: 'user interface'!
17172
17130
drgeoCopyright
17173
17131
^ 'Copyright 1996-2019 Hilaire Fernandes'! !
21040
20946
^ platform wizardExtent! !
21042
!DrGeoSystem class methodsFor: 'help'!
21045
#('Introduction' 'Introduction.txt')
21046
#('Fonctions de base' 'Fonctions-de-base.txt'
21047
#('Points' 'Points.txt')
21048
#('Lignes' 'Lignes.txt')
21049
#('Transformations' 'Transformations.txt')
21050
#('Numériques et texte' 'Numeriques-et-texte.txt')
21051
#('Script' 'Script.txt')
21052
#('Macro-constructions' 'Macro-constructions.txt')
21053
#('Outils du développeur' 'Outils-du-developpeur.txt')
21055
#('Préférences' 'Preferences.txt')
21056
#('Fichiers et documents' 'Fichiers-et-documents.txt')
21057
#('Fonctionnalités avancées' 'Fonctionnalites-avancees.txt'
21058
#('Macro-construction' 'Macro-construction.txt'
21059
#('Créer une macro-construction' 'Creer-une-macro-construction.txt')
21060
#('Jouér une macro-construction' 'Jouer-une-macro-construction.txt'))
21061
#('Script Pharo' 'Script-Pharo.txt'
21062
#('Script sans paramètre' 'Script-sans-parametre.txt')
21063
#('Script avec un paramètre' 'Script-avec-un-parametre.txt')
21064
#('Script avec deux paramètres' 'Script-avec-deux-parametres.txt')
21065
#('Exemple détaillé' 'Exemple-detaille-de-figure-avec-plusieurs-scripts.txt')
21066
#('Editer un script comme un pro' 'Editer-un-script-comme-un-pro.txt')
21067
#('Disséquer un script' 'Dissequer-un-script.txt')
21068
#('Méthodes de référence' 'Methodes-de-reference.txt')
21069
#('Aspect des objets' 'Aspect-des-objets.txt') )
21070
#('Figure Pharo' 'Figure-Pharo.txt'
21071
#('Exemples pour démarrer' 'Exemples-de-figure-Pharo.txt')
21072
#('Méthodes de référence' 'Interface-de-programmation.txt'
21073
#('Commandes générales' 'Commandes-generales.txt')
21074
#('Point' 'Point.txt')
21075
#('Droite' 'Droite.txt')
21076
#('Demi-droite' 'Demi_002ddroite.txt')
21077
#('Segment' 'Segment.txt')
21078
#('Cercle' 'Cercle.txt')
21079
#('Arc de cercle' 'Arc-de-cercle.txt')
21080
#('Polygone' 'Polygone.txt')
21081
#('Transformations géométriques' 'Transformations-geometriques.txt')
21082
#('Lieu de point' 'Lieu-de-point.txt')
21083
#('Vecteur' 'Vecteur.txt')
21084
#('Valeur numérique' 'Valeur-numerique.txt')
21085
#('Angle' 'Angle.txt')
21086
#('Equation' 'Equation.txt')
21087
#('Texte' 'Texte.txt')
21088
#('Style et attribut' 'Style-et-attribut.txt')
21089
#('Autres méthodes' 'Autres-methodes.txt')
21091
#('Autres exemples' 'Exemples-supplementaires-de-figures-Pharo.txt')))
21092
#('Exemples didactiques' 'Exemples-didactiques.txt')
21093
#('Outils-du-developeur' 'Outils-du-developpeur.txt'
21094
#('Espace de travail' 'Espace-de-travail.txt')
21095
#('Profileur' 'Profileur.txt')
21096
#('Débogueur' 'Debogueur.txt')
21097
#('Inspecteur' 'Inspecteur.txt')
21098
#('Chercheur' 'Chercheur.txt')
21099
#('Spotter' 'Spotter.txt')
21103
!DrGeoSystem class methodsFor: 'help'!
21105
"array, with 2 or more elements.
21106
1: element: topic title
21107
2: filename, its content is the topic content
21108
3: an array, subtopic (as this one)
21113
contents: (DrGeoSystem myDocPath / array second) contents.
21114
(array allButFirst: 2) do: [:anArray | topic addSubtopic: (self topicFrom: anArray)].
21117
!DrGeoSystem class methodsFor: 'help'!
21119
"Open a help browser on the DrGeo user guide"
21121
doc _ HelpTopic title: 'Guide utilisateur' contents: (DrGeoSystem myDocPath / 'drgeo.txt') contents.
21122
self tableOfContents do: [ :aTopic |
21123
doc addSubtopic: (self topicFrom: aTopic)].
21124
HelpBrowser openOn: doc.! !
21126
20948
!DrGeoSystem class methodsFor: 'font' stamp: 'hlsf 7/2/2020 11:13:05'!
21128
20950
self flag: #drgeoTodo.
21216
21022
mySketchResources
21217
21023
^ DrGDirectoryLocal new location: DrGeoSystem mySketchesPath pathString.! !
21219
!DrGeoSystem class methodsFor: 'resources' stamp: 'hlsf 4/21/2020 21:37:35'!
21220
networkOpenShareOn: resource with: parentMorph
21221
(resource location: self networkShare) ifTrue: [^ resource].
21222
(self networkShare = 'SandBox') ifTrue:
21223
[DrGeoSystem stopSpinner.
21224
parentMorph abort: 'I can''t connect to network.' translated.
21227
DrGeoSystem stopSpinner.
21228
parentMorph abort: ('I can''t open the share {1}.
21229
Switch back to ''SandBox'' share.' translated format: {self networkShare}).
21230
self networkShare: 'SandBox'.
21231
parentMorph changed: #networkShare.
21233
^ self networkResources: parentMorph.! !
21235
!DrGeoSystem class methodsFor: 'resources'!
21236
networkResources: parentMorph
21237
"Open a network resource on the selected share"
21239
^ (resource _ self connectToNetwork: parentMorph)
21241
ifNotNil: [self networkOpenShareOn: resource with: parentMorph]
21244
!DrGeoSystem class methodsFor: 'resources' stamp: 'hlsf 4/21/2020 21:37:52'!
21245
networkResourcesCreateShare
21246
"Check the share exsists, if not create it"
21248
(resource _ self connectToNetwork: UIManager default) ifNil: [DrGeoSystem stopSpinner.. ^nil].
21249
(resource shareExists: self networkShare) ifFalse: [
21250
[resource makeDirectory: self networkShare]
21251
on: TelnetProtocolError
21252
do: [UIManager default abort: ('I can''t create the share {1}.' translated format: {self networkShare}).
21254
^self networkOpenShareOn: resource with: UIManager default! !
21256
!DrGeoSystem class methodsFor: 'settings'!
21257
drgeoSettingsOn: aBuilder
21259
(aBuilder group: #drgeoNet)
21261
description: 'Dr. Geo network settings' translated;
21264
(aBuilder setting: #useNetwork)
21265
label: 'Use network resources' translated;
21267
description: 'If checked you can set a server name, user and password to load and to save sketches.' translated;
21269
(aBuilder pickOne: #networkType)
21270
label: 'Server type' translated;
21271
description: 'The server type, FTP or WebDav';
21273
domainValues: #(#ftp #http).
21274
(aBuilder setting: #host)
21275
label: 'Host' translated;
21276
description: 'The server (i.e. ftp.drgeo.eu)' translated .
21277
(aBuilder setting: #networkUser)
21278
label: 'User name' translated;
21279
description: 'The server user name' translated.
21280
(aBuilder setting: #networkPassword)
21282
label: 'Password' translated;
21283
description: 'The user password' translated.
21284
(aBuilder setting: #networkShare)
21285
label: 'Share' translated;
21286
description: 'The server resources directory (i.e. private/drgeo)' translated ]]! !
21288
!DrGeoSystem class methodsFor: 'settings'!
21290
^ Host ifNil: [Host _ '']! !
21292
!DrGeoSystem class methodsFor: 'settings'!
21296
!DrGeoSystem class methodsFor: 'settings'!
21298
^ LanShare ifNil: [ LanShare _ false ]! !
21300
!DrGeoSystem class methodsFor: 'settings'!
21302
LanShare _ aBoolean.
21304
ifTrue: [ DrGeoLanServer current start ]
21305
ifFalse: [ DrGeoLanServer current stop; reset ]! !
21307
!DrGeoSystem class methodsFor: 'settings'!
21308
lanShareSetting: aBuilder
21310
(aBuilder setting: #lanShare)
21311
label: 'Local Network Share' translated;
21312
description: 'If checked I share on the local area network the sketch files in my DrGeo.app/MyShares folder.' translated;
21316
!DrGeoSystem class methodsFor: 'settings'!
21318
^ NetworkPassword ifNil: [NetworkPassword _ '']! !
21320
!DrGeoSystem class methodsFor: 'settings'!
21321
networkPassword: string
21322
NetworkPassword _ string ! !
21324
!DrGeoSystem class methodsFor: 'settings'!
21326
^ NetworkDirectory ifNil: [NetworkDirectory _ '']! !
21328
!DrGeoSystem class methodsFor: 'settings'!
21329
networkShare: string
21330
NetworkDirectory _ string ! !
21332
!DrGeoSystem class methodsFor: 'settings'!
21334
^ NetworkType ifNil: [NetworkType = #ftp]! !
21336
!DrGeoSystem class methodsFor: 'settings'!
21337
networkType: symbol
21338
NetworkType _ symbol! !
21340
!DrGeoSystem class methodsFor: 'settings'!
21342
^ NetworkUser ifNil: [NetworkUser _ '']! !
21344
!DrGeoSystem class methodsFor: 'settings'!
21345
networkUser: string
21346
NetworkUser _ string ! !
21348
!DrGeoSystem class methodsFor: 'settings'!
21350
platform release: boolean ! !
21352
!DrGeoSystem class methodsFor: 'settings'!
21354
^ UseNetwork ifNil: [UseNetwork _ false]! !
21356
!DrGeoSystem class methodsFor: 'settings'!
21357
useNetwork: aBoolean
21358
UseNetwork _ aBoolean! !
21360
!DrGeoSystem class methodsFor: 'as yet unclassified'!
21362
platform openURI: string! !
21364
21025
!DrGeoSystem class methodsFor: 'as yet unclassified'!
21365
21026
viewXml: filename
21366
21027
DrGeo serviceViewXml: (self examplesPath / filename) pathString! !
31470
!DrGIcons class methodsFor: 'helpers' stamp: 'hlsf 10/2/2021 11:23:13'!
31126
!DrGIcons class methodsFor: 'helpers' stamp: 'hlsf 12/4/2021 19:53:50'!
31471
31127
scaled: symbol to: integer
31472
31128
| formSymbol |
31473
31129
forms ifNil: [forms _ Dictionary new].
31474
formSymbol _ symbol, integer asString.
31130
formSymbol _ (symbol, integer asString) asSymbol.
31476
31132
at: formSymbol
31479
ifTrue: [[self perform: symbol] on: MessageNotUnderstood do: [Theme current debugIcon]]
31480
ifFalse: [([self perform: symbol] on: MessageNotUnderstood do: [Theme current debugIcon]) magnifyTo: integer asPoint]]! !
31133
ifAbsentPut: [ |svg |
31134
svg _ [SVGMainMorph fromFileNamed: (DrGeoSystem iconsPath / (symbol, '.svg')) pathName]
31136
do: [:warning | warning resume].
31137
svg imageForm: integer asPoint depth: 32]! !
31482
!DrGIcons class methodsFor: 'as yet unclassified'!
31139
!DrGIcons class methodsFor: 'initialize-release'!
31484
31141
forms _ nil! !