2899
2899
DrGDevelopment class
2900
2900
instanceVariableNames: ''!
2902
!classDefinition: #DrGTablet category: 'DrGeo-System'!
2903
DrGPlatform subclass: #DrGTablet
2904
instanceVariableNames: 'wheelHeight'
2905
classVariableNames: ''
2906
poolDictionaries: ''
2907
category: 'DrGeo-System'!
2908
!classDefinition: 'DrGTablet class' category: 'DrGeo-System'!
2910
instanceVariableNames: ''!
2912
!classDefinition: #DrGAndroid category: 'DrGeo-System'!
2913
DrGTablet subclass: #DrGAndroid
2914
instanceVariableNames: ''
2915
classVariableNames: ''
2916
poolDictionaries: ''
2917
category: 'DrGeo-System'!
2918
!classDefinition: 'DrGAndroid class' category: 'DrGeo-System'!
2920
instanceVariableNames: ''!
2922
!classDefinition: #DrGiPad category: 'DrGeo-System'!
2923
DrGTablet subclass: #DrGiPad
2924
instanceVariableNames: ''
2925
classVariableNames: ''
2926
poolDictionaries: ''
2927
category: 'DrGeo-System'!
2928
!classDefinition: 'DrGiPad class' category: 'DrGeo-System'!
2930
instanceVariableNames: ''!
2932
2902
!classDefinition: #DrGWorkstation category: 'DrGeo-System'!
2933
2903
DrGPlatform subclass: #DrGWorkstation
2934
2904
instanceVariableNames: ''
21957
21918
toolbarIconSize _ nil.
21958
21919
preferences _ nil! !
21960
!DrGPlatform methodsFor: 'initialize-release' stamp: 'hlsf 4/21/2020 21:32:20'!
21921
!DrGPlatform methodsFor: 'initialize-release' stamp: 'hlsf 8/16/2022 12:30:47'!
21962
| splash copy background position splashMorph |
21963
canWeDisplaySpinner _ false.
21964
UIManager default defer: [
21965
splash _ ImageReadWriter formFromFileNamed: (self rootPath / 'splash.bmp') pathString.
21923
| splash copy background position |
21924
splash _ ImageReadWriter formFromFileEntry: (DrGeoSystem iconsPath // 'splash.bmp').
21966
21925
position _ Display center - (splash extent // 2).
21967
21926
background _ Form fromDisplay: (position extent: splash extent).
21968
21927
0.0 to: 1.0 by: 0.2 do: [:t |
21969
copy _ background deepCopy.
21928
copy _ background copy.
21970
21929
copy copyBits: splash at: 0@0 translucent: t.
21971
21930
copy displayAt: position.
21972
21931
(Delay forMilliseconds: 100) wait].
21973
splashMorph _ splash asMorph.
21975
position: position;
21977
21932
(Delay forSeconds: 2) wait.
21978
splashMorph delete.
21979
canWeDisplaySpinner _ true]! !
21933
background displayAt: position! !
21981
21935
!DrGPlatform methodsFor: 'initialize-release' stamp: 'hlsf 3/12/2022 16:28:17'!
21984
21938
self setFontPreferences.
21985
21939
self checkForPaths! !
21987
!DrGPlatform methodsFor: 'path'!
21941
!DrGPlatform methodsFor: 'path' stamp: 'hlsf 8/16/2022 11:34:33'!
21989
^ self rootPath / 'examples'! !
21943
^ self resourcesPath / 'examples'! !
21991
!DrGPlatform methodsFor: 'path' stamp: 'hlsf 6/8/2021 19:45:18'!
21945
!DrGPlatform methodsFor: 'path' stamp: 'hlsf 8/16/2022 11:34:26'!
21993
^ DirectoryEntry smalltalkImageDirectory! !
21947
^ self resourcesPath / 'fonts'! !
21995
!DrGPlatform methodsFor: 'path' stamp: 'hlsf 12/4/2021 19:40:46'!
21949
!DrGPlatform methodsFor: 'path' stamp: 'hlsf 8/16/2022 11:34:14'!
21997
^ self rootPath / 'resources' / 'icons'! !
21951
^ self resourcesPath / 'icons'! !
21999
!DrGPlatform methodsFor: 'path'!
21953
!DrGPlatform methodsFor: 'path' stamp: 'hlsf 8/16/2022 11:50:42'!
22000
21954
myExportsPath
22001
^ self shouldNotImplement! !
21955
^ self resourcesPath / 'MyExports'! !
22003
!DrGPlatform methodsFor: 'path'!
21957
!DrGPlatform methodsFor: 'path' stamp: 'hlsf 8/16/2022 11:34:52'!
22004
21958
mySketchesPath
22005
^self rootPath / 'MySketches'! !
21959
^self resourcesPath / 'MySketches'! !
22007
!DrGPlatform methodsFor: 'path' stamp: 'hlsf 4/8/2022 11:39:13'!
21961
!DrGPlatform methodsFor: 'path' stamp: 'hlsf 8/16/2022 11:36:00'!
22008
21962
mySmalltalkSketchesPath
22009
^self rootPath / 'MySmalltalkSketches'! !
21963
^self resourcesPath / 'MySmalltalkSketches'! !
21965
!DrGPlatform methodsFor: 'path' stamp: 'hlsf 8/16/2022 11:33:07'!
21967
"When are located folders for icons, fonts, sketches, scripts, documentation, images, user created resources"
21968
^ self rootPath / 'Resources'! !
22011
21970
!DrGPlatform methodsFor: 'path' stamp: 'hlsf 6/8/2021 19:42:01'!
22013
21972
"When deployed, the DrGeo/ directory"
22014
21973
^ DirectoryEntry smalltalkImageDirectory parent parent! !
22016
!DrGPlatform methodsFor: 'path' stamp: 'hlsf 4/8/2022 11:33:39'!
21975
!DrGPlatform methodsFor: 'path' stamp: 'hlsf 8/16/2022 11:36:11'!
22017
21976
smalltalkSketchesPath
22018
^self rootPath / 'SmalltalkSketches'! !
21977
^self resourcesPath / 'SmalltalkSketches'! !
22020
21979
!DrGPlatform methodsFor: 'user interface'!
22021
21980
showVirtualKeyboard: boolean
22107
22066
"I hold the Dr. Geo development environment preferences"
22110
!DrGDevelopment methodsFor: 'path'!
22112
^ self repoPath / 'build' / 'examples'! !
22114
!DrGDevelopment methodsFor: 'path' stamp: 'hlsf 3/12/2022 16:31:19'!
22116
^ self repoPath / 'build' / 'fonts'! !
22118
!DrGDevelopment methodsFor: 'path' stamp: 'hlsf 8/15/2022 17:13:30'!
22069
!DrGDevelopment methodsFor: 'path' stamp: 'hlsf 8/16/2022 11:46:11'!
22120
^ self repoPath / 'resources' / 'graphics' / 'iconsSVG'! !
22122
!DrGDevelopment methodsFor: 'path'!
22124
^self repoPath / 'MyExports'! !
22126
!DrGDevelopment methodsFor: 'path'!
22128
^self repoPath / 'MySketches'! !
22130
!DrGDevelopment methodsFor: 'path' stamp: 'hlsf 4/8/2022 11:42:08'!
22131
mySmalltalkSketchesPath
22132
^self repoPath / 'MySmalltalkSketches'! !
22134
!DrGDevelopment methodsFor: 'path'!
22136
"The path to the Dr. Geo source code local repository"
22137
^ self rootPath / 'drgeo'! !
22139
!DrGDevelopment methodsFor: 'path' stamp: 'hlsf 3/12/2022 16:20:41'!
22071
^ self resourcePath / 'graphics' / 'iconsSVG'! !
22073
!DrGDevelopment methodsFor: 'path' stamp: 'hlsf 8/16/2022 11:44:36'!
22075
" The resources are in the Dr. Geo source code local repository "
22076
^ self rootPath / 'drgeo' / 'resources'! !
22078
!DrGDevelopment methodsFor: 'path' stamp: 'hlsf 8/16/2022 11:40:41'!
22080
" Regarding the development environement, we consider the root path to be
22081
Cuis-Smalltalk-Dev from where is taking place the DrGeo development "
22141
22083
^ DirectoryEntry smalltalkImageDirectory! !
22143
!DrGDevelopment methodsFor: 'path' stamp: 'hlsf 4/8/2022 12:04:06'!
22144
smalltalkSketchesPath
22145
^self repoPath / 'build' / 'SmalltalkSketches'! !
22147
22085
!DrGDevelopment methodsFor: 'font' stamp: 'hlsf 3/24/2022 11:23:01'!
22149
22087
"Does nothing in development mode"! !
22157
22095
setMenuFontTo: (DrGeoSystem fontOfSize: 11);
22158
22096
setWindowTitleFontTo: (DrGeoSystem fontOfSize: 11)."! !
22160
!DrGTablet methodsFor: 'initialize-release'!
22163
wheelHeight _ nil! !
22165
!DrGTablet methodsFor: 'initialize-release' stamp: 'hlsf 4/10/2022 15:04:23'!
22169
(WorldMorph submorphs anySatisfy: [:morph | morph class == DrGeoView]) ifFalse:
22170
[DrGeo newFullscreen]! !
22172
!DrGTablet methodsFor: 'user interface'!
22174
^ wheelHeight ifNil: [ |maxWheelHeight|
22175
maxWheelHeight _ (Display height - (3.4 * self toolbarIconSize) - 32 - self wheelWidth) // 2.
22176
wheelHeight _ 180 min: maxWheelHeight]! !
22178
!DrGTablet methodsFor: 'user interface'!
22182
!DrGTablet methodsFor: 'font'!
22186
!DrGTablet methodsFor: 'font'!
22188
StandardFonts codeFont: (LogicalFont familyName: DrGeoSystem fontName pointSize: 12).
22189
StandardFonts listFont: (LogicalFont familyName: DrGeoSystem fontName pointSize: 14).
22190
StandardFonts menuFont: (LogicalFont familyName: DrGeoSystem fontName pointSize: 14).
22191
StandardFonts windowTitleFont: (LogicalFont familyName: DrGeoSystem fontName pointSize: 14).
22192
StandardFonts balloonFont: (LogicalFont familyName: DrGeoSystem fontName pointSize: 12).
22193
StandardFonts haloFont: (LogicalFont familyName: DrGeoSystem fontName pointSize: 12).
22194
StandardFonts buttonFont: (LogicalFont familyName: DrGeoSystem fontName pointSize: 16).
22195
StandardFonts defaultFont: (LogicalFont familyName: DrGeoSystem fontName pointSize: 14).
22198
!DrGAndroid methodsFor: 'initialize-release' stamp: 'hlsf 4/21/2020 21:32:20'!
22200
canWeDisplaySpinner _ true.
22201
WorldState desktopMenuTitle: 'Dr. Geo'.
22202
WorldState desktopMenuPragmaKeyword: 'drgeoMenu'.
22203
PolymorphSystemSettings uiThemeClass: DrGeoTheme.
22204
UITheme currentSettings fastDragging: true.
22205
UITheme currentSettings fadedBackgroundWindows: false.
22206
SystemWindow fullscreenMargin: 0.
22207
UITheme currentSettings preferRoundCorner: false.
22209
TaskbarMorph showTaskbar: false.
22210
World color: Color white.! !
22212
!DrGAndroid methodsFor: 'initialize-release'!
22215
(Smalltalk at: #Android) setVMTimerInterval: 100! !
22217
!DrGAndroid methodsFor: 'user interface'!
22218
showVirtualKeyboard: boolean
22219
(Smalltalk at: #Android) onScreenKbd: (boolean ifTrue: [1] ifFalse: [0])! !
22221
!DrGAndroid methodsFor: 'user interface'!
22224
ifNil: [ toolbarIconSize _ (Display height - 110) / 12 truncateTo: 4.
22225
toolbarIconSize _ toolbarIconSize min: 48 max: 12].
22226
^ toolbarIconSize! !
22228
!DrGAndroid methodsFor: 'path'!
22230
^ ((Smalltalk at: #Android) getSDCardRoot), '/MySketches'.! !
22232
!DrGAndroid methodsFor: 'path' stamp: 'hlsf 6/8/2021 19:43:02'!
22234
^ DirectoryEntry smalltalkImageDirectory! !
22236
!DrGAndroid methodsFor: 'testing'!
22240
!DrGiPad methodsFor: 'initialize-release' stamp: 'hlsf 4/21/2020 21:32:20'!
22242
canWeDisplaySpinner _ true.
22243
WorldState desktopMenuTitle: 'Dr. Geo'.
22244
WorldState desktopMenuPragmaKeyword: 'drgeoMenu'.
22246
PolymorphSystemSettings uiThemeClass: DrGeoTheme.
22247
UITheme currentSettings fastDragging: true.
22248
UITheme currentSettings fadedBackgroundWindows: false.
22249
SystemWindow fullscreenMargin: 0.
22250
UITheme currentSettings preferRoundCorner: false.
22252
TaskbarMorph showTaskbar: false.
22253
World color: Color white.
22254
" HostWindowProxy basicNew primitiveWindowSize: 1 x: 1024 y: 768. " "does not work when building from Linux"
22255
" World doOneCycleNow.
22256
DrGeo new view extent: 1024@768; position: 0@0."! !
22258
!DrGiPad methodsFor: 'initialize-release'!
22260
GetTextTranslator userDefaultLocaleDirs add: self localePath.
22261
NaturalLanguageTranslator privateStartUp.
22265
!DrGiPad methodsFor: 'as yet unclassified'!
22267
| sharedApp nsUrl |
22268
sharedApp _ ((Smalltalk at: #ObjectiveCBridge) classObjectForName: #UIApplication) sharedApplication.
22269
nsUrl _ (Smalltalk at: #ObjectiveCBridge) classObjectForName: #NSURL.
22270
sharedApp openURL: (nsUrl URLWithString: aString asNSStringUTF8).
22272
"(ObjectiveCBridge classObjectForName: #UIApplication) sharedApplication
22273
openURL: ((ObjectiveCBridge classObjectForName: #NSURL) URLWithString: 'http://www.drgeo.eu' asNSStringUTF8)"! !
22275
!DrGiPad methodsFor: 'testing'!
22279
!DrGiPad methodsFor: 'path'!
22281
^ self rootPath / 'locale'! !
22283
!DrGiPad methodsFor: 'path'!
22286
path _ self sandboxPath asFileReference / 'MySketches'.
22290
!DrGiPad methodsFor: 'path' stamp: 'hlsf 6/8/2021 19:43:33'!
22292
^ DirectoryEntry smalltalkImageDirectory! !
22294
!DrGiPad methodsFor: 'path'!
22297
path _ self rootPath parent / 'Documents'.
22298
path ensureDirectory.
22301
!DrGiPad methodsFor: 'user interface'!
22302
showVirtualKeyboard: boolean
22303
(Smalltalk at: #IPhonePlatform) showKeyboard: boolean! !
22305
!DrGiPad methodsFor: 'user interface'!
22309
22098
!DrGWorkstation methodsFor: 'initialize-release'!
22310
22099
checkForPaths
22311
22100
super checkForPaths.
22312
22101
self myExportsPath ensureCreateDirectory! !
22314
!DrGWorkstation methodsFor: 'initialize-release' stamp: 'hlsf 8/4/2022 18:06:27'!
22103
!DrGWorkstation methodsFor: 'initialize-release' stamp: 'hlsf 8/16/2022 21:41:43'!
22316
22105
canWeDisplaySpinner _ true.
22317
22106
self flag: #drgeoTodo.
22318
Preferences at: #worldMenu put: DrGeo.
22320
" TaskbarMorph showTaskbar: true.
22321
SystemWindow fullscreenMargin: 0."! !
22108
at: #worldMenu put: DrGeo;
22109
at: #fullScreenLeavesDeskMargins put: false;
22110
at: #guiElementsSize put: #smallFonts.
22111
UISupervisor ui taskbar scale: 1/2.! !
22323
22113
!DrGWorkstation methodsFor: 'initialize-release' stamp: 'hlsf 3/12/2022 16:28:46'!