1
'From Cuis 6.0 [latest update: #5448] on 16 August 2022 at 12:00:54 pm'!
3
!provides: 'DrGeoTablet' 1 1!
4
!requires: 'DrGeo' 1 430 nil!
5
SystemOrganization addCategory: 'DrGeoTablet'!
8
!classDefinition: #DrGTablet category: 'DrGeoTablet'!
9
DrGPlatform subclass: #DrGTablet
10
instanceVariableNames: 'wheelHeight'
11
classVariableNames: ''
13
category: 'DrGeoTablet'!
14
!classDefinition: 'DrGTablet class' category: 'DrGeoTablet'!
16
instanceVariableNames: ''!
18
!classDefinition: #DrGAndroid category: 'DrGeoTablet'!
19
DrGTablet subclass: #DrGAndroid
20
instanceVariableNames: ''
21
classVariableNames: ''
23
category: 'DrGeoTablet'!
24
!classDefinition: 'DrGAndroid class' category: 'DrGeoTablet'!
26
instanceVariableNames: ''!
28
!classDefinition: #DrGiPad category: 'DrGeoTablet'!
29
DrGTablet subclass: #DrGiPad
30
instanceVariableNames: ''
31
classVariableNames: ''
33
category: 'DrGeoTablet'!
34
!classDefinition: 'DrGiPad class' category: 'DrGeoTablet'!
36
instanceVariableNames: ''!
39
!DrGTablet commentStamp: '' prior: 0!
40
Preferences common to tablets!
42
!DrGAndroid commentStamp: '' prior: 0!
43
Preferences for Android tablet!
45
!DrGiPad commentStamp: '' prior: 0!
46
Preferences for iPad tablet!
48
!DrGTablet methodsFor: 'initialize-release'!
53
!DrGTablet methodsFor: 'initialize-release' stamp: 'hlsf 4/10/2022 15:04:23'!
57
(WorldMorph submorphs anySatisfy: [:morph | morph class == DrGeoView]) ifFalse:
58
[DrGeo newFullscreen]! !
60
!DrGTablet methodsFor: 'user interface'!
62
^ wheelHeight ifNil: [ |maxWheelHeight|
63
maxWheelHeight _ (Display height - (3.4 * self toolbarIconSize) - 32 - self wheelWidth) // 2.
64
wheelHeight _ 180 min: maxWheelHeight]! !
66
!DrGTablet methodsFor: 'user interface'!
70
!DrGTablet methodsFor: 'font'!
74
!DrGTablet methodsFor: 'font'!
76
StandardFonts codeFont: (LogicalFont familyName: DrGeoSystem fontName pointSize: 12).
77
StandardFonts listFont: (LogicalFont familyName: DrGeoSystem fontName pointSize: 14).
78
StandardFonts menuFont: (LogicalFont familyName: DrGeoSystem fontName pointSize: 14).
79
StandardFonts windowTitleFont: (LogicalFont familyName: DrGeoSystem fontName pointSize: 14).
80
StandardFonts balloonFont: (LogicalFont familyName: DrGeoSystem fontName pointSize: 12).
81
StandardFonts haloFont: (LogicalFont familyName: DrGeoSystem fontName pointSize: 12).
82
StandardFonts buttonFont: (LogicalFont familyName: DrGeoSystem fontName pointSize: 16).
83
StandardFonts defaultFont: (LogicalFont familyName: DrGeoSystem fontName pointSize: 14).
86
!DrGAndroid methodsFor: 'initialize-release' stamp: 'hlsf 4/21/2020 21:32:20'!
88
canWeDisplaySpinner _ true.
89
WorldState desktopMenuTitle: 'Dr. Geo'.
90
WorldState desktopMenuPragmaKeyword: 'drgeoMenu'.
91
PolymorphSystemSettings uiThemeClass: DrGeoTheme.
92
UITheme currentSettings fastDragging: true.
93
UITheme currentSettings fadedBackgroundWindows: false.
94
SystemWindow fullscreenMargin: 0.
95
UITheme currentSettings preferRoundCorner: false.
97
TaskbarMorph showTaskbar: false.
98
World color: Color white.! !
100
!DrGAndroid methodsFor: 'initialize-release'!
103
(Smalltalk at: #Android) setVMTimerInterval: 100! !
105
!DrGAndroid methodsFor: 'user interface'!
106
showVirtualKeyboard: boolean
107
(Smalltalk at: #Android) onScreenKbd: (boolean ifTrue: [1] ifFalse: [0])! !
109
!DrGAndroid methodsFor: 'user interface'!
112
ifNil: [ toolbarIconSize _ (Display height - 110) / 12 truncateTo: 4.
113
toolbarIconSize _ toolbarIconSize min: 48 max: 12].
116
!DrGAndroid methodsFor: 'path'!
118
^ ((Smalltalk at: #Android) getSDCardRoot), '/MySketches'.! !
120
!DrGAndroid methodsFor: 'path' stamp: 'hlsf 6/8/2021 19:43:02'!
122
^ DirectoryEntry smalltalkImageDirectory! !
124
!DrGAndroid methodsFor: 'testing'!
128
!DrGiPad methodsFor: 'initialize-release' stamp: 'hlsf 4/21/2020 21:32:20'!
130
canWeDisplaySpinner _ true.
131
WorldState desktopMenuTitle: 'Dr. Geo'.
132
WorldState desktopMenuPragmaKeyword: 'drgeoMenu'.
134
PolymorphSystemSettings uiThemeClass: DrGeoTheme.
135
UITheme currentSettings fastDragging: true.
136
UITheme currentSettings fadedBackgroundWindows: false.
137
SystemWindow fullscreenMargin: 0.
138
UITheme currentSettings preferRoundCorner: false.
140
TaskbarMorph showTaskbar: false.
141
World color: Color white.
142
" HostWindowProxy basicNew primitiveWindowSize: 1 x: 1024 y: 768. " "does not work when building from Linux"
143
" World doOneCycleNow.
144
DrGeo new view extent: 1024@768; position: 0@0."! !
146
!DrGiPad methodsFor: 'initialize-release'!
148
GetTextTranslator userDefaultLocaleDirs add: self localePath.
149
NaturalLanguageTranslator privateStartUp.
153
!DrGiPad methodsFor: 'as yet unclassified'!
156
sharedApp _ ((Smalltalk at: #ObjectiveCBridge) classObjectForName: #UIApplication) sharedApplication.
157
nsUrl _ (Smalltalk at: #ObjectiveCBridge) classObjectForName: #NSURL.
158
sharedApp openURL: (nsUrl URLWithString: aString asNSStringUTF8).
160
"(ObjectiveCBridge classObjectForName: #UIApplication) sharedApplication
161
openURL: ((ObjectiveCBridge classObjectForName: #NSURL) URLWithString: 'http://www.drgeo.eu' asNSStringUTF8)"! !
163
!DrGiPad methodsFor: 'testing'!
167
!DrGiPad methodsFor: 'path'!
169
^ self rootPath / 'locale'! !
171
!DrGiPad methodsFor: 'path'!
174
path _ self sandboxPath asFileReference / 'MySketches'.
178
!DrGiPad methodsFor: 'path' stamp: 'hlsf 6/8/2021 19:43:33'!
180
^ DirectoryEntry smalltalkImageDirectory! !
182
!DrGiPad methodsFor: 'path'!
185
path _ self rootPath parent / 'Documents'.
186
path ensureDirectory.
189
!DrGiPad methodsFor: 'user interface'!
190
showVirtualKeyboard: boolean
191
(Smalltalk at: #IPhonePlatform) showKeyboard: boolean! !
193
!DrGiPad methodsFor: 'user interface'!
197
!DrGeoSystem class methodsFor: '*DrGeoTablet'!
200
platform _ DrGAndroid new.
203
!DrGeoSystem class methodsFor: '*DrGeoTablet'!
206
platform _ DrGiPad new.