860
870
DrGeoScriptTestResource class
861
871
instanceVariableNames: ''!
863
!classDefinition: #DrGTypeArrow category: #'DrGeo-Styles'!
873
!classDefinition: #DrGTypeArrow category: #'DrGeo-Model-Style'!
864
874
PreferenceType subclass: #DrGTypeArrow
865
875
instanceVariableNames: ''
866
876
classVariableNames: ''
867
877
poolDictionaries: ''
868
category: 'DrGeo-Styles'!
869
!classDefinition: 'DrGTypeArrow class' category: #'DrGeo-Styles'!
878
category: 'DrGeo-Model-Style'!
879
!classDefinition: 'DrGTypeArrow class' category: #'DrGeo-Model-Style'!
870
880
DrGTypeArrow class
871
881
instanceVariableNames: ''!
873
!classDefinition: #DrGTypeColor category: #'DrGeo-Styles'!
883
!classDefinition: #DrGTypeColor category: #'DrGeo-Model-Style'!
874
884
PreferenceType subclass: #DrGTypeColor
875
885
instanceVariableNames: ''
876
886
classVariableNames: ''
877
887
poolDictionaries: ''
878
category: 'DrGeo-Styles'!
879
!classDefinition: 'DrGTypeColor class' category: #'DrGeo-Styles'!
888
category: 'DrGeo-Model-Style'!
889
!classDefinition: 'DrGTypeColor class' category: #'DrGeo-Model-Style'!
880
890
DrGTypeColor class
881
891
instanceVariableNames: ''!
883
!classDefinition: #DrGTypeMark category: #'DrGeo-Styles'!
893
!classDefinition: #DrGTypeMark category: #'DrGeo-Model-Style'!
884
894
PreferenceType subclass: #DrGTypeMark
885
895
instanceVariableNames: ''
886
896
classVariableNames: ''
887
897
poolDictionaries: ''
888
category: 'DrGeo-Styles'!
889
!classDefinition: 'DrGTypeMark class' category: #'DrGeo-Styles'!
898
category: 'DrGeo-Model-Style'!
899
!classDefinition: 'DrGTypeMark class' category: #'DrGeo-Model-Style'!
890
900
DrGTypeMark class
891
901
instanceVariableNames: ''!
893
!classDefinition: #DrGTypePointShape category: #'DrGeo-Styles'!
903
!classDefinition: #DrGTypePointShape category: #'DrGeo-Model-Style'!
894
904
PreferenceType subclass: #DrGTypePointShape
895
905
instanceVariableNames: ''
896
906
classVariableNames: ''
897
907
poolDictionaries: ''
898
category: 'DrGeo-Styles'!
899
!classDefinition: 'DrGTypePointShape class' category: #'DrGeo-Styles'!
908
category: 'DrGeo-Model-Style'!
909
!classDefinition: 'DrGTypePointShape class' category: #'DrGeo-Model-Style'!
900
910
DrGTypePointShape class
901
911
instanceVariableNames: ''!
903
!classDefinition: #DrGTypePointSize category: #'DrGeo-Styles'!
913
!classDefinition: #DrGTypePointSize category: #'DrGeo-Model-Style'!
904
914
PreferenceType subclass: #DrGTypePointSize
905
915
instanceVariableNames: ''
906
916
classVariableNames: ''
907
917
poolDictionaries: ''
908
category: 'DrGeo-Styles'!
909
!classDefinition: 'DrGTypePointSize class' category: #'DrGeo-Styles'!
918
category: 'DrGeo-Model-Style'!
919
!classDefinition: 'DrGTypePointSize class' category: #'DrGeo-Model-Style'!
910
920
DrGTypePointSize class
911
921
instanceVariableNames: ''!
913
!classDefinition: #DrGTypeStyle category: #'DrGeo-Styles'!
923
!classDefinition: #DrGTypeStyle category: #'DrGeo-Model-Style'!
914
924
PreferenceType subclass: #DrGTypeStyle
915
925
instanceVariableNames: ''
916
926
classVariableNames: ''
917
927
poolDictionaries: ''
918
category: 'DrGeo-Styles'!
919
!classDefinition: 'DrGTypeStyle class' category: #'DrGeo-Styles'!
928
category: 'DrGeo-Model-Style'!
929
!classDefinition: 'DrGTypeStyle class' category: #'DrGeo-Model-Style'!
920
930
DrGTypeStyle class
921
931
instanceVariableNames: ''!
923
!classDefinition: #DrGTypeThickness category: #'DrGeo-Styles'!
933
!classDefinition: #DrGTypeThickness category: #'DrGeo-Model-Style'!
924
934
PreferenceType subclass: #DrGTypeThickness
925
935
instanceVariableNames: ''
926
936
classVariableNames: ''
927
937
poolDictionaries: ''
928
category: 'DrGeo-Styles'!
929
!classDefinition: 'DrGTypeThickness class' category: #'DrGeo-Styles'!
938
category: 'DrGeo-Model-Style'!
939
!classDefinition: 'DrGTypeThickness class' category: #'DrGeo-Model-Style'!
930
940
DrGTypeThickness class
931
941
instanceVariableNames: ''!
1650
1670
DrGPointCoordinateItem class
1651
1671
instanceVariableNames: ''!
1653
!classDefinition: #DrGPointBlockItem category: #'DrGeo-Model-Item'!
1654
DrGPointCoordinateItem subclass: #DrGPointBlockItem
1655
instanceVariableNames: 'pointBlock'
1656
classVariableNames: ''
1657
poolDictionaries: ''
1658
category: 'DrGeo-Model-Item'!
1659
!classDefinition: 'DrGPointBlockItem class' category: #'DrGeo-Model-Item'!
1660
DrGPointBlockItem class
1661
instanceVariableNames: ''!
1663
!classDefinition: #DrGPointScriptItem category: #'DrGeo-Model-Item'!
1664
DrGPointCoordinateItem subclass: #DrGPointScriptItem
1665
instanceVariableNames: ''
1666
classVariableNames: ''
1667
poolDictionaries: ''
1668
category: 'DrGeo-Model-Item'!
1669
!classDefinition: 'DrGPointScriptItem class' category: #'DrGeo-Model-Item'!
1670
DrGPointScriptItem class
1671
instanceVariableNames: ''!
1673
1673
!classDefinition: #DrGPointFreeItem category: #'DrGeo-Model-Item'!
1674
1674
DrGPointItem subclass: #DrGPointFreeItem
1675
1675
instanceVariableNames: 'locked'
2090
2110
DrGValueValueItem class
2091
2111
instanceVariableNames: ''!
2113
!classDefinition: #DrGStyle category: #'DrGeo-Model-Style'!
2114
Object subclass: #DrGStyle
2115
instanceVariableNames: 'morph color hidden feedback'
2116
classVariableNames: ''
2117
poolDictionaries: ''
2118
category: 'DrGeo-Model-Style'!
2119
!classDefinition: 'DrGStyle class' category: #'DrGeo-Model-Style'!
2121
instanceVariableNames: ''!
2123
!classDefinition: #DrGCurveStyle category: #'DrGeo-Model-Style'!
2124
DrGStyle subclass: #DrGCurveStyle
2125
instanceVariableNames: 'thickness lineStyle'
2126
classVariableNames: ''
2127
poolDictionaries: ''
2128
category: 'DrGeo-Model-Style'!
2129
!classDefinition: 'DrGCurveStyle class' category: #'DrGeo-Model-Style'!
2131
instanceVariableNames: ''!
2133
!classDefinition: #DrGFinitCurveStyle category: #'DrGeo-Model-Style'!
2134
DrGCurveStyle subclass: #DrGFinitCurveStyle
2135
instanceVariableNames: 'arrow'
2136
classVariableNames: ''
2137
poolDictionaries: ''
2138
category: 'DrGeo-Model-Style'!
2139
!classDefinition: 'DrGFinitCurveStyle class' category: #'DrGeo-Model-Style'!
2140
DrGFinitCurveStyle class
2141
instanceVariableNames: ''!
2143
!classDefinition: #DrGCompositeStyle category: #'DrGeo-Model-Style'!
2144
DrGFinitCurveStyle subclass: #DrGCompositeStyle
2145
instanceVariableNames: 'shape'
2146
classVariableNames: ''
2147
poolDictionaries: ''
2148
category: 'DrGeo-Model-Style'!
2149
!classDefinition: 'DrGCompositeStyle class' category: #'DrGeo-Model-Style'!
2150
DrGCompositeStyle class
2151
instanceVariableNames: ''!
2153
!classDefinition: #DrGFilledStyle category: #'DrGeo-Model-Style'!
2154
DrGFinitCurveStyle subclass: #DrGFilledStyle
2155
instanceVariableNames: 'fill translucent'
2156
classVariableNames: ''
2157
poolDictionaries: ''
2158
category: 'DrGeo-Model-Style'!
2159
!classDefinition: 'DrGFilledStyle class' category: #'DrGeo-Model-Style'!
2160
DrGFilledStyle class
2161
instanceVariableNames: ''!
2163
!classDefinition: #DrGArcStyle category: #'DrGeo-Model-Style'!
2164
DrGFilledStyle subclass: #DrGArcStyle
2165
instanceVariableNames: ''
2166
classVariableNames: ''
2167
poolDictionaries: ''
2168
category: 'DrGeo-Model-Style'!
2169
!classDefinition: 'DrGArcStyle class' category: #'DrGeo-Model-Style'!
2171
instanceVariableNames: ''!
2173
!classDefinition: #DrGCircleStyle category: #'DrGeo-Model-Style'!
2174
DrGFilledStyle subclass: #DrGCircleStyle
2175
instanceVariableNames: ''
2176
classVariableNames: ''
2177
poolDictionaries: ''
2178
category: 'DrGeo-Model-Style'!
2179
!classDefinition: 'DrGCircleStyle class' category: #'DrGeo-Model-Style'!
2180
DrGCircleStyle class
2181
instanceVariableNames: ''!
2183
!classDefinition: #DrGPolygonStyle category: #'DrGeo-Model-Style'!
2184
DrGFilledStyle subclass: #DrGPolygonStyle
2185
instanceVariableNames: ''
2186
classVariableNames: ''
2187
poolDictionaries: ''
2188
category: 'DrGeo-Model-Style'!
2189
!classDefinition: 'DrGPolygonStyle class' category: #'DrGeo-Model-Style'!
2190
DrGPolygonStyle class
2191
instanceVariableNames: ''!
2193
!classDefinition: #DrGSegmentStyle category: #'DrGeo-Model-Style'!
2194
DrGFinitCurveStyle subclass: #DrGSegmentStyle
2195
instanceVariableNames: 'mark'
2196
classVariableNames: ''
2197
poolDictionaries: ''
2198
category: 'DrGeo-Model-Style'!
2199
!classDefinition: 'DrGSegmentStyle class' category: #'DrGeo-Model-Style'!
2200
DrGSegmentStyle class
2201
instanceVariableNames: ''!
2203
!classDefinition: #DrGLineStyle category: #'DrGeo-Model-Style'!
2204
DrGCurveStyle subclass: #DrGLineStyle
2205
instanceVariableNames: ''
2206
classVariableNames: ''
2207
poolDictionaries: ''
2208
category: 'DrGeo-Model-Style'!
2209
!classDefinition: 'DrGLineStyle class' category: #'DrGeo-Model-Style'!
2211
instanceVariableNames: ''!
2213
!classDefinition: #DrGLocusStyle category: #'DrGeo-Model-Style'!
2214
DrGCurveStyle subclass: #DrGLocusStyle
2215
instanceVariableNames: ''
2216
classVariableNames: ''
2217
poolDictionaries: ''
2218
category: 'DrGeo-Model-Style'!
2219
!classDefinition: 'DrGLocusStyle class' category: #'DrGeo-Model-Style'!
2221
instanceVariableNames: ''!
2223
!classDefinition: #DrGRayStyle category: #'DrGeo-Model-Style'!
2224
DrGCurveStyle subclass: #DrGRayStyle
2225
instanceVariableNames: ''
2226
classVariableNames: ''
2227
poolDictionaries: ''
2228
category: 'DrGeo-Model-Style'!
2229
!classDefinition: 'DrGRayStyle class' category: #'DrGeo-Model-Style'!
2231
instanceVariableNames: ''!
2233
!classDefinition: #DrGVectorStyle category: #'DrGeo-Model-Style'!
2234
DrGCurveStyle subclass: #DrGVectorStyle
2235
instanceVariableNames: ''
2236
classVariableNames: ''
2237
poolDictionaries: ''
2238
category: 'DrGeo-Model-Style'!
2239
!classDefinition: 'DrGVectorStyle class' category: #'DrGeo-Model-Style'!
2240
DrGVectorStyle class
2241
instanceVariableNames: ''!
2243
!classDefinition: #DrGPointStyle category: #'DrGeo-Model-Style'!
2244
DrGStyle subclass: #DrGPointStyle
2245
instanceVariableNames: 'shape pointSize extent'
2246
classVariableNames: ''
2247
poolDictionaries: ''
2248
category: 'DrGeo-Model-Style'!
2249
!classDefinition: 'DrGPointStyle class' category: #'DrGeo-Model-Style'!
2251
instanceVariableNames: ''!
2253
!classDefinition: #DrGTextStyle category: #'DrGeo-Model-Style'!
2254
DrGStyle subclass: #DrGTextStyle
2255
instanceVariableNames: 'backgroundColor borderColor fontSize'
2256
classVariableNames: ''
2257
poolDictionaries: ''
2258
category: 'DrGeo-Model-Style'!
2259
!classDefinition: 'DrGTextStyle class' category: #'DrGeo-Model-Style'!
2261
instanceVariableNames: ''!
2263
!classDefinition: #DrGValueStyle category: #'DrGeo-Model-Style'!
2264
DrGTextStyle subclass: #DrGValueStyle
2265
instanceVariableNames: ''
2266
classVariableNames: ''
2267
poolDictionaries: ''
2268
category: 'DrGeo-Model-Style'!
2269
!classDefinition: 'DrGValueStyle class' category: #'DrGeo-Model-Style'!
2271
instanceVariableNames: ''!
2093
2273
!classDefinition: #DrGMacro category: #'DrGeo-Model-Macro'!
2094
2274
Object subclass: #DrGMacro
2095
2275
instanceVariableNames: 'nodes title description saved'
2721
2901
instanceVariableNames: ''!
2723
!classDefinition: #DrGStyle category: #'DrGeo-Styles'!
2724
Object subclass: #DrGStyle
2725
instanceVariableNames: 'morph color hidden feedback'
2726
classVariableNames: ''
2727
poolDictionaries: ''
2728
category: 'DrGeo-Styles'!
2729
!classDefinition: 'DrGStyle class' category: #'DrGeo-Styles'!
2731
instanceVariableNames: ''!
2733
!classDefinition: #DrGCurveStyle category: #'DrGeo-Styles'!
2734
DrGStyle subclass: #DrGCurveStyle
2735
instanceVariableNames: 'thickness lineStyle'
2736
classVariableNames: ''
2737
poolDictionaries: ''
2738
category: 'DrGeo-Styles'!
2739
!classDefinition: 'DrGCurveStyle class' category: #'DrGeo-Styles'!
2741
instanceVariableNames: ''!
2743
!classDefinition: #DrGFinitCurveStyle category: #'DrGeo-Styles'!
2744
DrGCurveStyle subclass: #DrGFinitCurveStyle
2745
instanceVariableNames: 'arrow'
2746
classVariableNames: ''
2747
poolDictionaries: ''
2748
category: 'DrGeo-Styles'!
2749
!classDefinition: 'DrGFinitCurveStyle class' category: #'DrGeo-Styles'!
2750
DrGFinitCurveStyle class
2751
instanceVariableNames: ''!
2753
!classDefinition: #DrGCompositeStyle category: #'DrGeo-Styles'!
2754
DrGFinitCurveStyle subclass: #DrGCompositeStyle
2755
instanceVariableNames: 'shape'
2756
classVariableNames: ''
2757
poolDictionaries: ''
2758
category: 'DrGeo-Styles'!
2759
!classDefinition: 'DrGCompositeStyle class' category: #'DrGeo-Styles'!
2760
DrGCompositeStyle class
2761
instanceVariableNames: ''!
2763
!classDefinition: #DrGFilledStyle category: #'DrGeo-Styles'!
2764
DrGFinitCurveStyle subclass: #DrGFilledStyle
2765
instanceVariableNames: 'fill translucent'
2766
classVariableNames: ''
2767
poolDictionaries: ''
2768
category: 'DrGeo-Styles'!
2769
!classDefinition: 'DrGFilledStyle class' category: #'DrGeo-Styles'!
2770
DrGFilledStyle class
2771
instanceVariableNames: ''!
2773
!classDefinition: #DrGArcStyle category: #'DrGeo-Styles'!
2774
DrGFilledStyle subclass: #DrGArcStyle
2775
instanceVariableNames: ''
2776
classVariableNames: ''
2777
poolDictionaries: ''
2778
category: 'DrGeo-Styles'!
2779
!classDefinition: 'DrGArcStyle class' category: #'DrGeo-Styles'!
2781
instanceVariableNames: ''!
2783
!classDefinition: #DrGCircleStyle category: #'DrGeo-Styles'!
2784
DrGFilledStyle subclass: #DrGCircleStyle
2785
instanceVariableNames: ''
2786
classVariableNames: ''
2787
poolDictionaries: ''
2788
category: 'DrGeo-Styles'!
2789
!classDefinition: 'DrGCircleStyle class' category: #'DrGeo-Styles'!
2790
DrGCircleStyle class
2791
instanceVariableNames: ''!
2793
!classDefinition: #DrGPolygonStyle category: #'DrGeo-Styles'!
2794
DrGFilledStyle subclass: #DrGPolygonStyle
2795
instanceVariableNames: ''
2796
classVariableNames: ''
2797
poolDictionaries: ''
2798
category: 'DrGeo-Styles'!
2799
!classDefinition: 'DrGPolygonStyle class' category: #'DrGeo-Styles'!
2800
DrGPolygonStyle class
2801
instanceVariableNames: ''!
2803
!classDefinition: #DrGSegmentStyle category: #'DrGeo-Styles'!
2804
DrGFinitCurveStyle subclass: #DrGSegmentStyle
2805
instanceVariableNames: 'mark'
2806
classVariableNames: ''
2807
poolDictionaries: ''
2808
category: 'DrGeo-Styles'!
2809
!classDefinition: 'DrGSegmentStyle class' category: #'DrGeo-Styles'!
2810
DrGSegmentStyle class
2811
instanceVariableNames: ''!
2813
!classDefinition: #DrGLineStyle category: #'DrGeo-Styles'!
2814
DrGCurveStyle subclass: #DrGLineStyle
2815
instanceVariableNames: ''
2816
classVariableNames: ''
2817
poolDictionaries: ''
2818
category: 'DrGeo-Styles'!
2819
!classDefinition: 'DrGLineStyle class' category: #'DrGeo-Styles'!
2821
instanceVariableNames: ''!
2823
!classDefinition: #DrGLocusStyle category: #'DrGeo-Styles'!
2824
DrGCurveStyle subclass: #DrGLocusStyle
2825
instanceVariableNames: ''
2826
classVariableNames: ''
2827
poolDictionaries: ''
2828
category: 'DrGeo-Styles'!
2829
!classDefinition: 'DrGLocusStyle class' category: #'DrGeo-Styles'!
2831
instanceVariableNames: ''!
2833
!classDefinition: #DrGRayStyle category: #'DrGeo-Styles'!
2834
DrGCurveStyle subclass: #DrGRayStyle
2835
instanceVariableNames: ''
2836
classVariableNames: ''
2837
poolDictionaries: ''
2838
category: 'DrGeo-Styles'!
2839
!classDefinition: 'DrGRayStyle class' category: #'DrGeo-Styles'!
2841
instanceVariableNames: ''!
2843
!classDefinition: #DrGVectorStyle category: #'DrGeo-Styles'!
2844
DrGCurveStyle subclass: #DrGVectorStyle
2845
instanceVariableNames: ''
2846
classVariableNames: ''
2847
poolDictionaries: ''
2848
category: 'DrGeo-Styles'!
2849
!classDefinition: 'DrGVectorStyle class' category: #'DrGeo-Styles'!
2850
DrGVectorStyle class
2851
instanceVariableNames: ''!
2853
!classDefinition: #DrGPointStyle category: #'DrGeo-Styles'!
2854
DrGStyle subclass: #DrGPointStyle
2855
instanceVariableNames: 'shape pointSize'
2856
classVariableNames: ''
2857
poolDictionaries: ''
2858
category: 'DrGeo-Styles'!
2859
!classDefinition: 'DrGPointStyle class' category: #'DrGeo-Styles'!
2861
instanceVariableNames: ''!
2863
!classDefinition: #DrGTextStyle category: #'DrGeo-Styles'!
2864
DrGStyle subclass: #DrGTextStyle
2865
instanceVariableNames: 'backgroundColor borderColor fontSize'
2866
classVariableNames: ''
2867
poolDictionaries: ''
2868
category: 'DrGeo-Styles'!
2869
!classDefinition: 'DrGTextStyle class' category: #'DrGeo-Styles'!
2871
instanceVariableNames: ''!
2873
!classDefinition: #DrGValueStyle category: #'DrGeo-Styles'!
2874
DrGTextStyle subclass: #DrGValueStyle
2875
instanceVariableNames: ''
2876
classVariableNames: ''
2877
poolDictionaries: ''
2878
category: 'DrGeo-Styles'!
2879
!classDefinition: 'DrGValueStyle class' category: #'DrGeo-Styles'!
2881
instanceVariableNames: ''!
2883
2903
!classDefinition: #DrGPlatform category: #'DrGeo-System'!
2884
2904
Object subclass: #DrGPlatform
2885
instanceVariableNames: 'toolbarIconSize canWeDisplaySpinner preferences'
2905
instanceVariableNames: 'toolbarIconSize canWeDisplaySpinner preferences fontManager'
2886
2906
classVariableNames: ''
2887
2907
poolDictionaries: ''
2888
2908
category: 'DrGeo-System'!
3478
3527
I map settings/preferences to the underneath hardware/os plateform
3479
3528
Pattern: strategy!
3530
!LanguageFont commentStamp: 'hlsf 11/17/2023 22:53:20' prior: 0!
3531
Associate several LocaleIDs (fr_FR, zh_TW, zh_CN, ko) (with or without country code) with an appropriate font.
3532
- locales : a collection of LocaleID
3533
- family : a String, font family name
3534
- file : a String, file name of the font!
3481
3536
!DrGeoDomain methodsFor: 'initialize-release' stamp: 'hlsf 3/9/2023 17:26:59'!
3483
3538
super initialize.
3484
factory _ DrGMathItemFactory new.
3485
cmdManager _ DrGCommandManager new domain: self.
3486
pointNameIndex _ 0! !
3539
factory := DrGMathItemFactory new.
3540
cmdManager := DrGCommandManager new domain: self.
3541
pointNameIndex := 0! !
3488
!DrGeoDomain methodsFor: 'initialize-release' stamp: 'hlsf 4/24/2020 12:56:07'!
3543
!DrGeoDomain methodsFor: 'initialize-release' stamp: 'hlsf 4/12/2024 15:18:43'!
3491
cmdManager release.! !
3545
factory := cmdManager := nil
3547
cmdManager release."! !
3493
3549
!DrGeoDomain methodsFor: 'building'!
3494
3550
createCompositeItem: aMathItemSelection
4385
4435
!DrGLocusBuilder methodsFor: 'updating' stamp: 'hlsf 6/20/2021 11:20:58'!
4388
freePoint _ constrainedPoint _ nil! !
4438
freePoint := constrainedPoint := nil! !
4390
4440
!DrGLocusBuilder methodsFor: 'private'!
4391
4441
addItem: aMathItemCollection at: aPoint
4392
4442
super addItem: aMathItemCollection at: aPoint.
4393
4443
aMathItemCollection first isPointItemOnCurve
4394
4444
ifTrue: [freePoint
4395
ifNil: [freePoint _ aMathItemCollection first.
4445
ifNil: [freePoint := aMathItemCollection first.
4397
4447
constrainedPoint
4398
ifNil: [constrainedPoint _ aMathItemCollection first]]
4448
ifNil: [constrainedPoint := aMathItemCollection first]]
4399
4449
ifFalse: [constrainedPoint
4400
ifNil: [constrainedPoint _ aMathItemCollection first.
4450
ifNil: [constrainedPoint := aMathItemCollection first.
4403
ifNil: [freePoint _ aMathItemCollection first]]! !
4453
ifNil: [freePoint := aMathItemCollection first]]! !
4405
4455
!DrGLocusBuilder methodsFor: 'constant'!
6068
6127
"Instantiate, but not used on the GUI"
6069
6128
self receiverInspectorText.
6071
bottomMorph _ LayoutMorph newRow.
6130
bottomMorph := LayoutMorph newRow.
6073
6132
addAdjusterAndMorph: self contextVariableInspector proportionalWidth: 0.30;
6074
6133
addAdjusterAndMorph: self contextVariableInspectorText proportionalWidth: 0.70.
6076
6135
self layoutMorph
6077
addAdjusterAndMorph: self buildLowerPanes proportionalHeight: 0.7;
6136
addMorph: self stackList proportionalHeight: 0.1;
6137
addAdjusterAndMorph: self buildLowerPanes proportionalHeight: 0.6;
6078
6138
addAdjusterAndMorph: bottomMorph proportionalHeight: 0.3.! !
6080
!DrGDebuggerWindow methodsFor: 'GUI building' stamp: 'hlsf 10/13/2022 12:08:52'!
6140
!DrGDebuggerWindow methodsFor: 'GUI building' stamp: 'hlsf 4/10/2024 16:46:52'!
6081
6141
customButtonSpecs
6082
6142
"Answer an array of elements of the form wording, selector, help-message, that characterize the custom button row of a debugger."
6085
{'Restart' translated . # restart . 'Restart the step by step execution from its start.' translated } .
6086
{'Step' translated . # doStep . 'Execute the current message and go to the next message.' translated } .
6145
{'Restart' translated . #restart . 'Restart the step by step execution from its start.' translated } .
6146
{'Step' translated . #doStep . 'Execute the current message and go to the next message.' translated } .
6087
6147
{'Step into' translated . #stepIntoBlock . 'Step into a block.' translated } .
6088
{'Run to Cursor' translated . # runToCursor . 'Execute the code up to the cursor position.' translated }
6148
{'Run to Cursor' translated . #runToCursor . 'Execute the code up to the cursor position.' translated }
6091
6151
!DrGDebuggerWindow methodsFor: 'GUI building' stamp: 'hlsf 10/13/2022 15:20:08'!
6386
6452
!DrGWizardScript methodsFor: 'pages' stamp: 'hlsf 4/7/2022 15:42:08'!
6388
6454
| list argumentList page textMorph |
6389
list _ PluggableListMorph
6455
list := PluggableListMorph
6390
6456
model: self listGetter: #scriptsName indexGetter: #selectedScript indexSetter: #selectedScript:.
6391
argumentList _ PluggableListMorph
6392
model: self listGetter: #argumentsName indexGetter: nil indexSetter: nil ::
6457
argumentList := (PluggableListMorph
6458
model: self listGetter: #argumentsName indexGetter: nil indexSetter: nil)
6393
6459
setBalloonText: 'The arguments accepted by this script.' translated;
6395
textMorph _ TextModelMorph textProvider: model textGetter: #description textSetter: #description: ::
6461
textMorph := (TextModelMorph textProvider: model textGetter: #description textSetter: #description:)
6396
6462
askBeforeDiscardingEdits: false;
6398
page _ LabelGroup with: {
6464
page := LabelGroup with: {
6399
6465
'Script name' translated -> list.
6400
6466
'Description' translated -> textMorph.
6401
6467
'Arguments' translated -> argumentList}.
6403
^ WizardPage applyPage: 'Select a script then items in the sketch' translated on: self ::
6469
^ (WizardPage applyPage: 'Select a script then items in the sketch' translated on: self)
6404
6470
contents: page! !
6406
6472
!DrGWizardScript methodsFor: 'open/close' stamp: 'hlsf 4/7/2022 12:34:54'!
6411
6477
!DrGWizardScript methodsFor: 'navigation' stamp: 'hlsf 4/7/2022 15:54:58'!
6412
6478
goPage: integer
6709
6783
!DrGScriptDesignerDialog methodsFor: 'initialization' stamp: 'hlsf 4/5/2022 21:02:25'!
6711
6785
super initialize.
6787
description := ''! !
6715
!DrGScriptDesignerDialog methodsFor: 'action' stamp: 'hlsf 5/27/2023 12:12:17'!
6789
!DrGScriptDesignerDialog methodsFor: 'action' stamp: 'hlsf 4/9/2024 10:38:38'!
6717
6791
| newArgument |
6718
newArgument := LayoutMorph newRow ::
6792
newArgument := LayoutMorph newRow
6719
6793
adoptWidgetsColor: widgetsColor;
6720
6794
borderWidth: 1;
6722
newArgument addMorph: (PluggableButtonMorph model: self action: #removeArgument: ::
6796
newArgument addMorph: ((PluggableButtonMorph model: self action: #removeArgument:)
6723
6797
icon: Theme current deleteIcon;
6724
6798
actionArgument: newArgument;
6725
6799
borderWidth: 0;
6726
6800
color: Color transparent;
6727
6801
setBalloonText: 'Remove this script argument.' translated;
6729
addMorph: (DropDownListMorph
6803
addMorph: ((DropDownListMorph
6730
6804
model: (ListModel with: self class labels)
6731
6805
listGetter: #list
6732
6806
indexGetter: #listIndex
6733
indexSetter: #listIndex: ::
6734
adoptWidgetsColor: widgetsColor ).
6807
indexSetter: #listIndex:)
6808
adoptWidgetsColor: widgetsColor).
6735
6809
argumentsMorph addMorph: newArgument.
6736
6810
self morphExtent: self minimumExtent ! !
7072
7156
shoutMustKeepContentsSize
7075
!DrGSmalltalkSketchBrowser methodsFor: 'submorphs-add/remove' stamp: 'hlsf 5/25/2023 15:33:56'!
7159
!DrGSmalltalkSketchBrowser methodsFor: 'submorphs-add/remove' stamp: 'hlsf 4/12/2024 17:54:59'!
7078
self releaseMiniView ! !
7162
self releaseMiniView! !
7080
7164
!DrGSmalltalkSketchBrowser methodsFor: 'submorphs-add/remove' stamp: 'hlsf 8/4/2023 12:58:33'!
7081
7165
releaseMiniView
7082
7166
(drgeoView respondsTo: #presenter)
7083
7167
ifTrue: [drgeoView presenter ifNotNil: [:pres | pres release] ]! !
7085
!DrGSmalltalkSketchEditor methodsFor: 'GUI building' stamp: 'hlsf 10/30/2022 20:53:10'!
7169
!DrGSmalltalkSketchEditor methodsFor: 'GUI building' stamp: 'hlsf 12/25/2023 19:28:31'!
7086
7170
buildMorphicWindow
7087
7171
super buildMorphicWindow.
7088
7172
titleMorph showButtonsNamed: #(close collapse expand).
7174
self activeHand newKeyboardFocus: codeView scroller! !
7091
!DrGSmalltalkSketchEditor methodsFor: 'GUI building' stamp: 'hlsf 4/14/2022 16:36:45'!
7176
!DrGSmalltalkSketchEditor methodsFor: 'GUI building' stamp: 'hlsf 3/30/2024 08:48:53'!
7092
7177
button: iconSymbol action: actionSelector help: helpString
7093
^ ButtonMorph model: self action: actionSelector ::
7178
^ (ButtonMorph model: self action: actionSelector)
7094
7179
icon: (DrGIcons for: iconSymbol );
7095
7180
setBalloonText: helpString ;
7096
color: DrGUIControlsManager buttonColor;
7097
selectedColor: DrGUIControlsManager buttonSelectedColor;
7098
borderColor: DrGUIControlsManager buttonColor muchDarker;
7181
color: Theme current drgeoButtonColor;
7182
selectedColor: Theme current drgeoButtonSelectedColor;
7183
borderColor: Theme current drgeoButtonColor muchDarker;
7099
7184
borderWidth: 2;
7100
morphExtent: (DrGeoSystem toolbarIconSize + 4) asPoint;
7185
morphExtent: (Theme current toolbarIconSize + 4) asPoint;
7103
!DrGSmalltalkSketchEditor methodsFor: 'GUI building' stamp: 'hlsf 10/28/2022 11:13:31'!
7188
!DrGSmalltalkSketchEditor methodsFor: 'GUI building' stamp: 'hlsf 3/30/2024 08:49:06'!
7104
7189
button: iconSymbol action: actionSelector state: getStateSel help: helpString
7105
^ ButtonMorph model: self stateGetter: getStateSel action: actionSelector ::
7190
^ (ButtonMorph model: self stateGetter: getStateSel action: actionSelector)
7106
7191
icon: (DrGIcons for: iconSymbol );
7107
7192
setBalloonText: helpString ;
7108
color: DrGUIControlsManager buttonColor;
7109
selectedColor: DrGUIControlsManager buttonSelectedColor;
7110
borderColor: DrGUIControlsManager buttonColor muchDarker;
7193
color: Theme current drgeoButtonColor;
7194
selectedColor: Theme current drgeoButtonSelectedColor;
7195
borderColor: Theme current drgeoButtonColor muchDarker;
7111
7196
borderWidth: 2;
7112
morphExtent: (DrGeoSystem toolbarIconSize + 4) asPoint;
7197
morphExtent: (Theme current toolbarIconSize + 4) asPoint;
7115
7200
!DrGSmalltalkSketchEditor methodsFor: 'GUI building' stamp: 'hlsf 4/14/2022 16:43:31'!
7117
buttonArea _ LayoutMorph newRow ::
7202
buttonArea := LayoutMorph newRow
7118
7203
axisEdgeWeight: #rowRight;
7119
7204
addMorph: (PluggableButtonMorph
7146
7231
!DrGSmalltalkSketchEditor methodsFor: 'GUI building' stamp: 'hlsf 10/28/2022 11:15:20'!
7148
^ LayoutMorph newRow ::
7233
^ LayoutMorph newRow
7149
7234
separation: 5@0 ;
7150
7235
addMorph: (self button: #open action: #browseSketches help: 'Edit a Smalltalk sketch.' translated);
7151
7236
addMorph: (self button: #keep action: #keepSketch help: 'Save this Smalltalk sketch.' translated);
7152
addMorph: (playButton _ self button: #play action: #executeSketch help: 'Play the Smalltalk sketch.' translated);
7237
addMorph: (playButton := self button: #play action: #executeSketch help: 'Play the Smalltalk sketch.' translated);
7153
7238
addMorph: (self button: #debug action: #debugSketch help: 'Debug the Smalltalk sketch.' translated);
7154
7239
addMorph: (self button: #stop action: #stopSketch help: 'Stop the execution of the Smalltalk sketch.' translated);
7155
7240
addMorph: self transparentMorph layoutSpec: (LayoutSpec proportionalWidth: 1.0);
7156
7241
addMorph: (self button: #doc action: #toggleHelp state: #isDocVisible help: 'Dr. Geo tutorial' translated)
7244
!DrGSmalltalkSketchEditor methodsFor: 'GUI building' stamp: 'hlsf 5/1/2024 11:08:16'!
7246
" Install the debugger window at the place of the code viewer "
7247
debugger layoutMorph borderWidth: 1.
7248
codeAndViewPanel replaceSubmorph: codeView by: debugger layoutMorph.
7249
debugger model when: #closeViews send: #stopDebbuger to: self.! !
7251
!DrGSmalltalkSketchEditor methodsFor: 'GUI building' stamp: 'hlsf 4/28/2024 15:56:59'!
7252
plugDebugger: aDebugger
7253
debugger := aDebugger.
7254
self plugDebugger ! !
7159
7256
!DrGSmalltalkSketchEditor methodsFor: 'GUI building' stamp: 'hlsf 10/6/2022 12:44:50'!
7160
7257
switchToPauseButton
7196
7293
color: Color transparent;
7199
!DrGSmalltalkSketchEditor methodsFor: 'initialization' stamp: 'hlsf 2/22/2023 11:29:52'!
7296
!DrGSmalltalkSketchEditor methodsFor: 'initialization' stamp: 'hlsf 3/30/2024 16:46:58'!
7298
^ self windowColor ! !
7300
!DrGSmalltalkSketchEditor methodsFor: 'initialization' stamp: 'drgeo 3/17/2024 17:18:31'!
7202
7303
super initialize.
7203
book _ EruditeBookReaderMorph new.
7304
book := EruditeBookReaderMorph new.
7205
7306
model: DrGeoTutorial new;
7206
7307
buildMorphicWindow;
7208
7309
book when: #askToCopyCode send: #sourceCode: to: self.
7210
codeView _ TextModelMorph textProvider: self textGetter: #sourceCode textSetter: #sourceCode: ::
7311
codeView := (TextModelMorph textProvider: self textGetter: #sourceCode textSetter: #sourceCode:)
7211
7312
askBeforeDiscardingEdits: false;
7213
drgeoView _ LayoutMorph new ::
7314
drgeoView := LayoutMorph new
7214
7315
color: self color;
7215
7316
borderWidth: 1;
7216
7317
layoutSpec: LayoutSpec useAll! !
7319
!DrGSmalltalkSketchEditor methodsFor: 'initialization' stamp: 'hlsf 3/30/2024 16:50:10'!
7321
^ Theme current workspace ! !
7218
7323
!DrGSmalltalkSketchEditor methodsFor: 'accessing' stamp: 'hlsf 10/30/2022 20:39:21'!
7220
7325
^ docView visible! !
7318
7424
afterCompiling: model
7319
7425
do: [ :compiler :method :receiver :context |
7320
7426
(method notNil and: [method isQuick not]) ifTrue: [
7427
debugger := Debugger
7322
7428
openMinimalDebugging: [
7324
7430
valueWithReceiver: receiver
7325
7431
arguments: (context ifNil: [ #() ] ifNotNil: [ { context } ])]
7327
debugger layoutMorph borderWidth: 1.
7328
codeAndViewPanel replaceSubmorph: codeView by: debugger layoutMorph.
7329
debugger model when: #closeViews send: #stopDebbuger to: self.
7330
debugger contextVariableInspector selectionIndex: 3.]
7334
!DrGSmalltalkSketchEditor methodsFor: 'actions' stamp: 'hlsf 10/19/2022 21:21:13'!
7337
codeView scroller acceptContents.
7339
afterCompiling: model
7340
do: [ :compiler :method :receiver :context | method ifNotNil: [ | window |
7342
openMinimalDebugging: [
7344
valueWithReceiver: receiver
7345
arguments: (context ifNil: [ #() ] ifNotNil: [ { context } ])]
7347
label: 'Execute step by step' translated.
7348
window contextVariableInspector selectionIndex: 3.]
7352
!DrGSmalltalkSketchEditor methodsFor: 'actions' stamp: 'hlsf 2/22/2023 11:55:13'!
7433
self plugDebugger ] ]
7436
!DrGSmalltalkSketchEditor methodsFor: 'actions' stamp: 'hlsf 5/1/2024 11:36:43'!
7354
7438
self stopSketch.
7355
7439
codeView scroller acceptContents.
7356
7440
self switchToPauseButton.
7357
7441
DrGeoSketch when: #newSmalltalkSketch send: #compiledSketch: to: self.
7358
sketchProcess _ [ | t |
7359
t _ DateAndTime now.
7360
Compiler evaluate: model.
7442
sketchProcess := [ | t |
7443
t := DateAndTime now.
7444
(DrGeoSystem preferences at: #advancedDebugger)
7445
ifTrue: [Compiler evaluate: model]
7447
[Compiler evaluate: model]
7450
self setLabel: ex description.
7453
debuggingProcess: sketchProcess
7454
context: ex signalerContext ] ].
7361
7455
" When we get there, sketch has been entirely executed, switch back to play button "
7362
7456
self switchToPlayButton.
7363
7457
Transcript show: DateAndTime now - t ;cr] newProcess.
7365
priority: Processor userSchedulingPriority ;
7459
priority: Processor userSchedulingPriority - 1;
7366
7460
name: '[DrGeo] Smalltalk Sketch execution';
7466
7560
drgeoView firstSubmorph ifNotNil: [:miniView|
7467
7561
miniView presenter ifNotNil: [:p | p release] ]]! !
7469
!DrGStylePanel methodsFor: 'GUI building' stamp: 'hlsf 2/14/2022 11:39:14'!
7563
!DrGSmalltalkSketchEditor methodsFor: 'label' stamp: 'hlsf 5/1/2024 11:36:19'!
7566
defaultLabel := self sketchName ifEmpty: ['Edit Smalltalk Sketch' translated].
7567
self label == defaultLabel ifFalse: [self setLabel: defaultLabel]! !
7569
!DrGStylePanel methodsFor: 'GUI building' stamp: 'hlsf 4/1/2024 17:01:29'!
7470
7570
buildMorphicWindow
7471
7571
| labelWidth widgets |
7472
7572
titleMorph showButtonsNamed: #(#close).
7473
self layoutMorph separation: 4 ;
7573
self layoutMorph separation: (Theme current scale: 4) ;
7474
7574
axisEdgeWeight: #columnTop.
7475
widgets _ model styleWidget.
7476
labelWidth _ widgets max: [:rowOfMorph | (self searchLabelIn: rowOfMorph) morphWidth].
7575
widgets := model styleWidget.
7576
labelWidth := widgets max: [:rowOfMorph | (self searchLabelIn: rowOfMorph) morphWidth].
7477
7577
widgets do: [:rowOfMorph |
7478
7578
(self searchLabelIn: rowOfMorph) morphWidth: labelWidth.
7479
7579
self addMorph: rowOfMorph].
7497
!DrGDrawableMenu methodsFor: 'events' stamp: 'hlsf 5/3/2020 23:43:15'!
7597
!DrGStylePanel methodsFor: 'as yet unclassified' stamp: 'hlsf 4/1/2024 16:57:51'!
7599
^ self windowColor ! !
7601
!DrGStylePanel methodsFor: 'as yet unclassified' stamp: 'hlsf 4/1/2024 16:57:46'!
7603
^ Theme current transcript ! !
7605
!DrGDrawableMenu methodsFor: 'events' stamp: 'hlsf 3/30/2024 09:21:21'!
7499
7607
super initialize.
7500
self color: (self color alpha: 0.7).
7608
self color: (self color alpha: 0.8).
7501
7609
self borderColor: (self borderColor alpha: 0.7).
7504
!DrGDrawableMenu methodsFor: 'events' stamp: 'hlsf 9/23/2021 12:04:49'!
7612
!DrGDrawableMenu methodsFor: 'events' stamp: 'hlsf 4/12/2024 12:22:33'!
7505
7613
mouseButton1Down: aMouseButtonEvent localPosition: localEventPosition
7506
7614
"click outside => step blinking the selected item "
7507
7615
(stayUp or: [(self coversLocalPoint:localEventPosition) or: [selectedItem isNil]])
7509
selectedItem arguments first first stopBlinking.
7617
selectedItem arguments first first stopStepping. " blinking"
7511
7619
super mouseButton1Down: aMouseButtonEvent localPosition: localEventPosition ! !
7513
!DrGDrawableMenu methodsFor: 'control' stamp: 'hlsf 8/3/2021 13:00:14'!
7621
!DrGDrawableMenu methodsFor: 'control' stamp: 'hlsf 4/12/2024 12:23:15'!
7514
7622
selectItem: aMenuItem
7515
7623
selectedItem ifNotNil:[
7516
selectedItem arguments first first stopBlinking].
7624
selectedItem arguments first first stopStepping " blinking"].
7517
7625
aMenuItem ifNotNil:[
7518
aMenuItem arguments first first startBlinking].
7626
aMenuItem arguments first first startStepping " blinking"].
7519
7627
^ super selectItem: aMenuItem ! !
7521
7629
!DrGDrawableMenu methodsFor: 'accessing' stamp: 'hlsf 5/6/2020 14:17:28'!
7522
7630
tool: aDrGeoTool
7523
tool _ aDrGeoTool ! !
7631
tool := aDrGeoTool ! !
7525
7633
!DrGDrawable methodsFor: 'accessing' stamp: 'hlsf 8/4/2023 17:42:50'!
7848
7956
!DrGDrawable methodsFor: 'drawing axes & grid' stamp: 'hlsf 11/1/2022 20:30:25'!
7849
7957
drawGridOn: aCanvas
7850
7958
| worldBound end start length step |
7851
worldBound _ self worldBound.
7852
step _ self worldToPixel: gridScale.
7959
worldBound := self worldBound.
7960
step := self worldToPixel: gridScale.
7853
7961
"horizontal lines"
7855
start _ self worldOrdinateToMorph: (worldBound corner y roundTo: gridScale).
7856
start < 0 ifTrue: [start _ start + step].
7963
start := self worldOrdinateToMorph: (worldBound corner y roundTo: gridScale).
7964
start < 0 ifTrue: [start := start + step].
7858
7966
start to: end by: step do: [:y |
7859
7967
aCanvas line: 0 @ y to: length @ y width: 0.4 color: Color lightGray].
7861
7969
"vertical lines"
7863
start _ self worldAbscissaToMorph: (worldBound origin x roundTo: gridScale).
7864
start < 0 ifTrue: [start _ start + step].
7971
start := self worldAbscissaToMorph: (worldBound origin x roundTo: gridScale).
7972
start < 0 ifTrue: [start := start + step].
7866
7974
start to: end by: step do: [:x |
7867
7975
aCanvas line: x @ 0 to: x @ length width: 0.4 color: Color lightGray]! !
7979
8087
ifFalse: [self mouseMoveOxy: localEventPosition]
7981
8089
self updateUnderMouseMorphPosition.
7982
prevMousePos _ localEventPosition.
8090
prevMousePos := localEventPosition.
7985
8093
!DrGDrawable methodsFor: 'events' stamp: 'hlsf 4/28/2020 12:21:19'!
7986
8094
mouseMoveOxy: newPosition
7987
8095
"move the whole sketch in the Oxy plane"
7989
delta _ newPosition - prevMousePos.
8097
delta := newPosition - prevMousePos.
7990
8098
delta r < 100 ifTrue: "we need to check because in tablet mode, previous mouse position can be far away"
7991
8099
[self moveOxy: (self pixelVectorToWorldVector: delta)]! !
7993
8101
!DrGDrawable methodsFor: 'events' stamp: 'hlsf 8/5/2021 12:51:36'!
7994
8102
mouseScroll: evt localPosition: localEventPosition
7995
8103
| increment orginalWorldCursorPoint |
7996
orginalWorldCursorPoint _ self morphToWorld: localEventPosition.
8104
orginalWorldCursorPoint := self morphToWorld: localEventPosition.
7997
8105
" WAIT for proper wheel event with modifier keys always on
7998
increment _ evt shiftPressed ifTrue: [10] ifFalse: [2]."
8106
increment := evt shiftPressed ifTrue: [10] ifFalse: [2]."
8000
8108
evt direction == #down
8001
8109
ifTrue: [ self scaleNoRedraw: increment ].
8002
8110
evt direction == #up