-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathGeoTypes.pas
21612 lines (19656 loc) · 664 KB
/
GeoTypes.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
unit GeoTypes;
interface
uses Windows, Classes, SysUtils, StrUtils, Graphics, Forms, StdCtrls,
Controls, ComCtrls, ExtCtrls, WSDLIntf, Math, Dialogs, Menus,
MathLib, tbaum, Utility, Declar, GlobVars, RTF2HTMLConv,
FormatEdit, FormatText, GeoGroup, XMLIntf;
type
TDirection = (BackMove, NoMove, ForwardMove, VirtualMove);
TOutputStatus = (outNone, outScreen, outClipboard, outPreview, outPrinter, outFile, outZoom);
TGeoObjListe = class;
TGTextObj = class;
TGName = class;
TGeoObj = class(TPersistent)
protected
FGeoNum,
FStatus,
FGroups : Integer;
FMyColour : TColor;
FName : WideString;
FXMLTypeName : String;
FMyPenStyle : TPenStyle;
FMyBrushStyle : TBrushStyle;
FMyLineWidth,
FMyShape : Integer;
FShowDataInNameObj,
FShowNameInNameObj : Boolean;
Old_Data : TDataStack;
procedure SetMyColour(NewCol: TColor); virtual;
function GetName: WideString; virtual;
function GetIsVisible: Boolean; virtual;
function GetDataCanShow: Boolean;
procedure SetDataCanShow(flag: Boolean);
function GetDataValid: Boolean; virtual;
procedure SetDataValid(flag: Boolean); virtual;
function GetShowsAlways: Boolean; virtual;
procedure SetShowsAlways(vis: Boolean); virtual;
function GetShowsOnlyNow: Boolean; virtual;
procedure SetShowsOnlyNow(vis: Boolean); virtual;
function GetIsFlagged: Boolean; virtual;
procedure SetIsFlagged(flag: Boolean); virtual;
function GetIsGrouped: Boolean; virtual;
procedure SetIsGrouped(flag: Boolean); virtual;
function GetIsMarked: Boolean; virtual;
procedure SetIsMarked(flag: Boolean); virtual;
function GetIsMakMarked: Boolean; virtual;
procedure SetIsMakMarked(flag: Boolean); virtual;
function GetIsReversed: Boolean;
procedure SetIsReversed(flag: Boolean);
function GetIsBlinking: Boolean; virtual;
procedure SetIsBlinking(flag: Boolean); virtual;
function GetWinPos: TPoint; virtual;
procedure SetWinPos(newVal: TPoint); virtual;
procedure SetMyShape(newVal: Integer); virtual;
procedure SetShowNameInNameObj(newVal: Boolean); virtual;
procedure SetShowDataInNameObj(newVal: Boolean); virtual;
procedure CME_PopupClick(Sender : TObject); virtual;
procedure AdoptAllChildrenOf(OldPa: TGeoObj);
function DefaultName: WideString; virtual;
function ParentLinksAreOkay : Boolean; virtual;
function AllParentsUnFlagged: Boolean; virtual;
function AllParentsInList(NameList: TStrings): Boolean;
function HasSameDataAs(GO: TGeoObj): Boolean; virtual;
function DataEquivalent(var data): Boolean; virtual;
function GetImplicitMakStartObj(n: Integer): TGeoObj; virtual;
function IsVisibleWithoutGroups: Boolean;
procedure GetSpecialDataFrom(BluePrint: TGeoObj; MakNum: Integer); virtual;
procedure Rescale; virtual;
procedure UpdateScreenCoords; virtual; abstract;
procedure VirtualizeCoords; virtual;
procedure UpdateNameCoordsIn(TextObj: TGTextObj); virtual;
procedure SetNewNameParamsIn(TextObj: TGTextObj); virtual;
procedure AdjustGraphTools(todraw : Boolean); virtual;
procedure DrawIt; virtual; abstract;
procedure HideIt; virtual; abstract;
procedure BlinkIt;
procedure ExportIt; virtual;
procedure MarkObjAndAncestors;
procedure Register4Dragging(DragList: TObjPtrList); virtual;
procedure DragIt; virtual;
procedure Invalidate; virtual;
procedure Revalidate; virtual;
public
ObjList : TGeoObjListe;
Parent : TObjPtrList;
Children : TObjPtrList;
scrx, scry : Integer;
X, Y,
LastDist : Double;
flag : Boolean;
constructor Create(iObjList: TGeoObjListe; iis_visible : Boolean);
constructor CreateBlueprintOf(GO: TGeoObj; iGeoNum: Integer = -1); virtual;
constructor CreateFromBlueprint(iObjList: TGeoObjListe; MakNum, CmdNum: Integer); virtual;
constructor CreateFromDomData(iObjList: TGeoObjListe; DE: IXMLNode); virtual;
constructor CreateProtoTypFromDomData(iObjList: TGeoObjListe; DE: IXMLNode); virtual;
constructor Load(S: TFileStream; iObjList: TGeoObjListe);
constructor Load32(R: TReader; iObjList: TGeoObjListe); virtual;
destructor Destroy; override;
destructor FreeBluePrint; virtual;
function CreateObjNode(DOMDoc: IXMLDocument): IXMLNode; virtual;
function CreateProtoTypNode(DOMDoc: IXMLDocument): IXMLNode; virtual;
function CreateI2GElementNode(DOMDoc: IXMLDocument): IXMLNode; virtual;
function CreateI2GConstraintNode(DOMDoc: IXMLDocument; ObjNames: TStrings): IXMLNode; virtual;
procedure RebuildPointers; virtual;
procedure GetDataFromOldMappedObj(OMO: TGeoObj); virtual;
procedure AfterLoading(FromXML: Boolean = True); virtual;
procedure UpdateParams; virtual; abstract;
procedure UpdateV1xObjects; virtual;
procedure UpdateOldPrototype; virtual;
class function IsPriorTo(CompType: TClass): Boolean; virtual;
function IsDynamicLocLineControl: Boolean; virtual;
function IsCompatibleWith(ClassGroupId: Integer): Boolean; virtual;
function IsNearMouse: Boolean; virtual; abstract;
procedure BecomesChildOf(GO: TGeoObj); virtual;
procedure Stops2BeChildOf(GO: TGeoObj); virtual;
procedure SaveState; virtual;
procedure RestoreState; virtual;
procedure RegisterAsMacroStartObject; virtual;
procedure SetAsStartObject4MacroRun(MakNum, CmdNum: Integer); virtual;
procedure AddToGroup(GroupMask: Integer); virtual;
procedure RevokeFromGroup(GroupMask: Integer);
procedure SetGraphTools(LineStyleNum, PointStyleNum,
FillStyleNum: Integer; iColor: TColor); virtual;
procedure GetGraphTools(var LineStyleNum, PointStyleNum,
FillStyleNum: Integer; var iColor: TColor); virtual;
procedure Redraw; overload;
procedure Redraw(Adj: Boolean); overload;
procedure InitBlinking(OBE: Boolean);
procedure LoadContextMenuEntriesInto(menu: TPopUpMenu); virtual; abstract;
function Dist (xm, ym: Double): Double; virtual; abstract;
function HasNameObj(var NameObj: TGName): Boolean;
function GetUniqueName(s: WideString): WideString;
function GetFormattedName: String; virtual;
function GetValue(selector: Integer): Double; virtual;
function GetMatchingCursor(mpt: TPoint): TCursor; virtual;
function IsAncestorOf(GO: TGeoObj): Boolean; virtual;
procedure InsertNameOf(GO: TGeoObj; var Target: String); overload;
procedure InsertNameOf(GO: TGeoObj; var Target: WideString); overload;
procedure InsertMeasureInto(Target: TFormatEdit); virtual;
procedure PatchName(NewName: WideString);
procedure SetNewName(NewName: WideString); virtual;
procedure RebuildTermStrings; virtual;
function HasBuggyTerm: Boolean; virtual;
function GetDataStr: String; virtual;
function GetInfo: String; virtual; abstract;
property GeoNum: Integer read FGeoNum;
property XMLTypeName: String read FXMLTypeName;
property IsVisible: Boolean read GetIsVisible;
property DataCanShow: Boolean read GetDataCanShow write SetDataCanShow;
property DataValid: Boolean read GetDataValid write SetDataValid;
property Status: Integer read FStatus;
property MyColour: TColor read FMyColour write SetMyColour;
property MyPenStyle: TPenStyle read FMyPenStyle write FMyPenStyle;
property MyBrushStyle: TBrushStyle read FMyBrushStyle write FMyBrushStyle;
property MyLineWidth: Integer read FMyLineWidth write FMyLineWidth;
property MyShape: Integer read FMyShape write SetMyShape;
property Name: WideString read GetName;
property ShowsAlways: Boolean read GetShowsAlways write SetShowsAlways;
property ShowsOnlyNow: Boolean read GetShowsOnlyNow write SetShowsOnlyNow;
property IsFlagged: Boolean read GetIsFlagged write SetIsFlagged;
property IsMarked: Boolean read GetIsMarked write SetIsMarked;
property IsMakMarked: Boolean read GetIsMakMarked write SetIsMakMarked;
property IsReversed: Boolean read GetIsReversed write SetIsReversed;
property IsBlinking: Boolean read GetIsBlinking write SetIsBlinking;
property IsGrouped: Boolean read GetIsGrouped write SetIsGrouped;
property WinPos: TPoint read GetWinPos;
property ShowDataInNameObj: Boolean read FShowDataInNameObj write SetShowDataInNameObj;
property ShowNameInNameObj: Boolean read FShowNameInNameObj write SetShowNameInNameObj;
property Groups: Integer read FGroups;
end;
TGeoObjClass = class of TGeoObj;
TGParentObj = class;
TGPoint = class;
TGNumberObj = class;
TGLogSlider = class;
TGeoObjListe = class (TList)
protected
{ Felder für Properties : }
Fe1x, Fe1y, { Einheits-Vektoren in }
Fe2x, Fe2y, { Windows-Pixel-Koordinaten }
FPixDist, { Pixelrastermaß in Weltkoordinaten }
FxMin, FxMax,
FyMin, FyMax,
FxLWC, FyLWC, { "L"ogical "W"indows "C"enter }
FLWrad : Double; { "L"ogical "W"orld "rad"ius }
FTargetCanvas : TCanvas; { Ausgabe-Canvas (wg. IsDoubleBuffered)}
FAnimationSource: TGParentObj; { Steuerobjekt für Animationen }
FDoubleBuffer : TBitmap; { Interne Bitmap für Flackerfreiheit }
FWindowRect : TRect;
FNextGeoNum : Integer;
FMouseGoes : TDirection;
FIsLoading,
FDoubleBuffered : Boolean;
FWindowOrigin : TPoint;
FLastMousePos : TPoint;
FLastMouseMove : TPoint;
FOutPutStatus : TOutputStatus;
FActCanvas : TCanvas;
FLogo : TImage;
FNewLLStatus : Integer;
FValidationStr : String;
{ Weitere interne Variablen, nicht in Properties verpackt : }
LogLastMouse_X, { Letzte Mausposition }
LogLastMouse_Y, { und }
LogLastMouse_dx, { letzte Mausbewegung }
LogLastMouse_dy, { in logischen Koordinaten }
LastQJumpX, { Für das Verziehen von Flächen, die }
LastQJumpY, { "rastende" Randpunkte haben }
yAspect, { = Abs( e2y / e1x ) }
FFontScale,
FScale : Double; { Faktor ppcm_actCanvas/ppcm_scrCanvas }
LastGroupVisMask: Integer; { Letzte verarbeitete Gr-Sichtbarkeit }
NameNumList : TNameNumList; { Datenbank für Standard-Namen }
QFA : T2DimFloatArray; { Puffer für Punkt-Positions-Daten }
{ bei der Korrektheits-Überprüfung }
function GetAniCtrlObjCount: Integer;
function GetAniPossible: Boolean;
function GetCheckControl: TGeoObj;
function GetNewFontScaleFactor: Double;
function CalculateNextFreeGeoNum: Integer;
function DynaGeoJKnows(Class_TypeName: String): Boolean;
procedure RebuildAllPointers;
procedure ActualizeWindowsConstants;
procedure SetWindowRect(newRect: TRect);
procedure SetWindowOrigin(newOri: TPoint);
procedure SetLastMousePos(newPos: TPoint);
procedure SetAnimationSrc(newAS: TGParentObj);
procedure SetDoubleBuffered(db: Boolean);
procedure SetIsLoading(newVal: Boolean);
procedure SetOutputStatus(nos: TOutputStatus);
procedure SetNewLLStatus(nv: Integer);
procedure PatchLocLineParents(old, new: TGeoObj);
procedure CheckFriendlyLinksOf(Num: Integer);
procedure UpdObjAndAllDescOf(pGO : TGeoObj);
procedure FillOutputList(LVOI: Integer; OL: TList);
public
DragStrategy,
LastValidObjIndex,
OldAngleTermCount : Integer;
UpdatingLocLine : TGeoObj;
IsBlinkOn,
StoreWithBMPs,
AnimationRunning : Boolean;
dragged_by_mouse : TGeoObj; { Das aktuell gezogene Objekt }
DragList : TObjPtrList; { statt TList }
GroupList : TGeoGroupList; { statt TList }
MakroList : TList; { eigentlich: TMakroList! }
BackgroundColor : TColor;
StartFont : TFont;
HostWinHandle : HWnd;
LengthUnit,
AreaUnit,
AngleUnit,
CmdString : String; { Befehls-String für DynaGeoX }
CRNr : Integer; { Copyright-Nummer }
CRText : TStringList; { Copyright-Text }
IsDirty,
ShowingCRText : Boolean; { Flag für CR-Text-Anzeige }
CreationProg,
CreationVers,
CreationDate,
LastEditProg,
LastEditVers,
LastEditDate,
OldValidationCondition,
OldValidationVars,
OldValidationHint,
LinkForward, { Links zu anderen Zeichnungen; stets }
LinkBack : String; { als relative Pfade formulieren ! }
constructor Create(iHostWinHandle: HWnd; iDrawCanvas: TCanvas; iRect: TRect);
constructor Load(S: TFileStream; iHostWinHandle: HWnd; iDrawCanvas: TCanvas; iRect: TRect);
constructor Load32(R: TReader; iHostWinHandle: HWnd; iDrawCanvas: TCanvas; iTempEdit: TFormatEdit; iRect: TRect);
destructor Destroy; override;
procedure TakeCanvasFrom(source: TGeoObjListe);
procedure AfterLoading(FromXML : Boolean = True);
constructor CreateFromI2GData(DOMTree: IXMLNode; oldDrawing: TGeoObjListe);
constructor CreateFromGeoDomData(DOMTree: IXMLNode; oldDrawing: TGeoObjListe; var ValTabData: TValTabData);
function CreateHeaderNode(DOMDoc: IXMLDocument): IXMLNode;
function CreateWindowNode(DOMDoc: IXMLDocument;
ValTabData: TValTabData): IXMLNode;
function CreateObjListNode(DOMDoc: IXMLDocument;
Check4JExp: Boolean): IXMLNode;
function Get_XMLTypeName(Class_TypeName: String): String;
function Get_ClassName(XML_TypeName: String; var IsDeprecated: Boolean): String;
function GetDefAngleMode: AngleModeTyp;
function IsOldDegRadProblemVersion: Boolean;
procedure InitCoordSys(ixs0, iys0: Integer; iNewWinRect: TRect; iType: Integer; iis_visible: Boolean);
procedure RescaleCoordSys(ppcmX, ppcmY: Double);
procedure InitAngle1Screen;
function LinksOkay: Boolean;
function GetObj(Num : Integer): TGeoObj;
function GetValidObj(Num : Integer): TGeoObj;
function GetGeoObjByName(s: WideString): TGeoObj;
function GetGeoObjNumByName(s: WideString): Integer;
function GetLogSlider: TGLogSlider;
function GetNextGeoNum: Integer; { Datenquelle für die Eigenschaft TGeoObj.GeoNum ! }
function GetUniqueName(s: WideString): WideString;
function ExistObject(GO: TGeoObj; var FoundObj: TGeoObj): Boolean;
function GetFreePlace4NewNumber: TPoint;
function GetFixLineLength (P1num, P2num : TGeoObj): Double;
function CountWinObjsOutside(WinRect, ScrRect: TRect): Integer;
function CoSysInVisGroup: Boolean;
function CoSysVisible: Boolean;
procedure MoveWinObjsInside(TargetR: TRect);
procedure Move2UpperLeft(R: TRect);
procedure GetFreeFillPattern (var col: TColor; var FillStyle: TBrushStyle);
function HiddenObjCount: Integer;
function NameAlreadyUsed(suggest: String; obj2name: TGeoObj): Boolean;
function HasSetsquare(var SQO: TGeoObj): Boolean;
function HasEmptyBorders: Boolean;
procedure MakeHiddenObjectsTempVisible;
function HideHiddenObjects: Integer;
function MarkedObjCount: Integer;
function GroupedObjCount: Integer;
procedure EraseGroupMarks;
procedure EraseMakMarks;
procedure EraseFlags;
procedure InvalidateObject(GO: TGeoObj);
procedure RevalidateObject(GO: TGeoObj);
function InsertObject(Item: TGeoObj; var err_num: Integer; ins_pos: Integer = -1): TGeoObj;
procedure SortObjects;
procedure FreeObject(GO: TGeoObj);
procedure DeleteCorrectnessCheck;
function CollectBuggyTermObjs: String;
procedure KillBuggyTermObjs;
procedure KillLocLineDoubles;
function KillUnknownObjects : Integer;
procedure KillInvalidObjects;
procedure KillAllObjects;
procedure ConvertCoord2BasePt(GO: TGeoObj);
procedure ConvertBase2CoordPt(GO: TGeoObj);
procedure VirtualizeCoords;
procedure FillDragList(DrObj: TGeoObj);
procedure ResetDragList(Unflag: Boolean = True);
procedure ResetAllMarks;
procedure LockAllImages;
procedure SimInit;
procedure SimDrag(ShowSim: Boolean; SimMode: Integer = 0);
procedure SimClose;
function Animate(Mode: Integer): Integer;
function LogWinContains(x, y: Double): Boolean;
function LogWinKnows(x, y: Double): Integer;
function GetMaxCurveLength: Double;
procedure GetWinCoords(x, y: Double; var wx, wy: Integer);
procedure GetFWinCoords(x, y: Double; var wx, wy: Double);
procedure GetLogCoords(x, y: Integer; var lx, ly: Double);
procedure GetLogWinHorizonEq(var hc: TCoeff6);
procedure DragObjects(wx, wy: Integer; rotate: Boolean);
procedure DrawFirstObjects(Last2Draw: Integer; ClearBack: Boolean = False);
procedure DrawTempText(sl: TStringList; fsize, posx, posy: Integer);
procedure Repaint;
procedure Export_To(OutCanvas: TCanvas; ClipRect: TRect; ScaleF: Double);
procedure ExportScaled_To(OutCanvas: TCanvas; ops: TOutputStatus;
x1, y1, x2, y2, scale, aspect: Double);
procedure ExportZoomed_To(OutCanvas: TCanvas;
x1, y1, x2, y2, scale: Double);
procedure Copy2Bitmap(TargetBMP: TBitmap; UpperLeft: TPoint);
procedure AutoUpdateLocLines;
procedure UpdateAllDescendentsOf (GO: TGeoObj);
procedure UpdateAllLongLines;
procedure UpdateAllObjects;
procedure UpdateGroupVisibility;
procedure RebuildTermStrings;
procedure Slide(dxm, dym : Integer);
procedure InitScale(new_ppcmx, new_ppcmy : Double; newOri: TPoint; newRect: TRect);
procedure RescaleDrawing(k : Double);
procedure StartBaseObjBlinking(OBE: Boolean);
procedure ToggleBlinkingObjs;
procedure EndBlinkingMode;
procedure CME_PopupClick(Sender : TObject);
{
procedure InitMagnGlass(iCenterPt: TGPoint; iRatio: TGNumberObj);
procedure KillMagnGlass;
function HasMagnGlass(): Boolean;
}
function CheckSolution(TargetObj: Array of TGeoObj): Integer;
function CanExport2DynaGeoJ(var ExceptList: TList): Boolean;
property WindowRect: TRect read FWindowRect write SetWindowRect;
property WindowOrigin: TPoint read FWindowOrigin write SetWindowOrigin;
property e1x: Double read fe1x; { Einheitsvektoren in }
property e1y: Double read fe1y; { Fensterkoordinaten }
property e2x: Double read fe2x;
property e2y: Double read fe2y;
property xMin: Double read FxMin; { Fenstergrenzen in }
property xMax: Double read FxMax; { logischen Koordinaten }
property yMin: Double read FyMin;
property yMax: Double read FyMax;
property xCenter: Double read FxLWC; { Fenstermitte in }
property yCenter: Double read FyLWC; { logischen Koordinaten }
property PixelDist: Double read FPixDist; { PixelRastermaß }
property LogWinRadius: Double read FLWrad;
{ Logischer Radius des kleinsten Kreises, }
{ der das Fenster vollständig enthält }
property LastMousePos: TPoint read FLastMousePos write SetLastMousePos;
{ Letzte Mausposition in Fensterkoordinaten; }
{ beim Schreiben werden auch die logische Maus- }
{ position sowie LastMouseMove und MouseGoes }
{ aktualisiert }
property LastMouseMove: TPoint read FLastMouseMove;
property LastLogMouseX: Double read LogLastMouse_X;
property LastLogMouseY: Double read LogLastMouse_Y;
property LastLogMouseDX: Double read LogLastMouse_dx;
property LastLogMouseDY: Double read LogLastMouse_dy;
property MouseGoes: TDirection read FMouseGoes write FMouseGoes;
property DraggedObj: TGeoObj read dragged_by_mouse write dragged_by_mouse;
property AnimationPossible: Boolean read GetAniPossible;
property AnimationCtrlObjCount: Integer read GetAniCtrlObjCount;
property AnimationSource: TGParentObj read FAnimationSource write SetAnimationSrc;
property TargetCanvas: TCanvas read FTargetCanvas;
property IsDoubleBuffered: Boolean read FDoubleBuffered write SetDoubleBuffered;
property IsLoading: Boolean read FIsLoading write SetIsLoading;
property ScaleFactor: Double read FScale;
property FontScaleFactor: Double read FFontScale;
property OutputStatus: TOutputStatus read FOutPutStatus write SetOutPutStatus;
property NewLocLineStatus: Integer read FNewLLStatus write SetNewLLStatus;
property ActCanvas: TCanvas read FActCanvas;
property DoubleBuffered: Boolean read FDoubleBuffered write SetDoubleBuffered;
property DoubleBuffer: TBitmap read FDoubleBuffer;
property LogoPic: TImage read FLogo write FLogo;
property CheckControl: TGeoObj read GetCheckControl;
end;
TGLine = class;
TGStraightLine = class;
TGParentObj = class(TGeoObj)
protected
FAniStep : Double;
FBoundParam : Double; { Ort eines gebundenen Punktes auf der Trägerlinie }
function Boxed(v: Double): Double;
function GetAniMinValue: Double; virtual;
function GetAniMaxValue: Double; virtual;
function GetAniValue: Double; virtual;
procedure SetAniValue(nav: Double); virtual;
function GetWinPosNextTo(_X, _Y: Double): TPoint; virtual;
public
function IsCompatibleWith(ClassGroupId: Integer): Boolean; override;
function IsLineBound(var TL: TGLine): Boolean; virtual;
function CanControlAnimation: Boolean; virtual;
function AniCtrlObjName: String; virtual;
procedure AdoptChildrenOf(GO: TGeoObj);
procedure LoadContextMenuEntriesInto(menu: TPopUpMenu); override;
procedure ResetOLCPList(PointList : TVector3List); virtual;
function GetCoordsFromParam(param: Double; var px, py: Double): Boolean; virtual;
function GetParamFromCoords(px, py: Double; var param: Double): Boolean; virtual;
function GetRandomParam: Double; virtual;
function SetLinePosition(tv: Double): Boolean; virtual;
procedure SetAniParams(vmin, vact, vmax, vstep: Double); virtual;
procedure ChangeAniSpeed(sf: Double);
property BoundParam: Double read FBoundParam write FBoundParam;
property AniStep: Double read FAniStep;
property AniValue: Double read GetAniValue write SetAniValue;
property AniMaxValue: Double read GetAniMaxValue;
property AniMinValue: Double read GetAniMinValue;
end;
TGNumber = class(TGParentObj)
protected
NumWidth,
NumHeight : Integer;
FShowName : Boolean;
ValRect,
ObjRect : TRect;
procedure VirtualizeCoords; override;
procedure Rescale; override;
procedure SetShowName(newval : Boolean);
procedure SetMyShape(newVal: Integer); override;
procedure AdjustGraphTools(todraw : Boolean); override;
procedure ShowCentered(Canvas: TCanvas; v: Double; R: TRect; prec: Integer; Prefix: String = ''); overload;
procedure ShowCentered(Canvas: TCanvas; valStr: WideString; R: TRect); overload;
public
function IsCompatibleWith(ClassGroupId: Integer): Boolean; override;
function IsNearMouse: Boolean; override;
procedure ReDimData; virtual;
procedure SetNewName(NewName: WideString); override;
procedure LoadContextMenuEntriesInto(menu: TPopUpMenu); override;
procedure InsertMeasureInto(Target: TFormatEdit); override;
property ShowName: Boolean read FShowName write SetShowName;
end;
TGNumberObj = class(TGNumber)
protected
valpx,
valpxmin,
valpxmax,
valpy : Integer;
FValMin,
FValue,
FValMax,
FQuant : Double;
MinRect,
MaxRect,
BarRect : TRect;
function DefaultName: WideString; override;
function GetAniMinValue: Double; override;
function GetAniMaxValue: Double; override;
function GetAniValue: Double; override;
procedure SetAniValue(nav: Double); override;
procedure SetValue(newValue: Double); virtual;
procedure Invalidate; override;
procedure DrawArrowsInto(R: TRect);
procedure DrawIt; override;
procedure HideIt; override;
function HasSameDataAs(GO: TGeoObj): Boolean; override;
procedure SetPositionFromValue; virtual;
procedure UpdateScreenCoords; override;
public
constructor Create(iObjList: TGeoObjListe; iWidth: Integer; iValMin, iValue, iValMax: Double; iis_visible: Boolean);
constructor CreateBlueprintOf(GO: TGeoObj; iGeoNum: Integer = -1); override;
constructor CreateFromDomData(iObjList: TGeoObjListe; DE: IXMLNode); override;
constructor Load32(R: TReader; iObjList: TGeoObjListe); override;
function CreateObjNode(DOMDoc: IXMLDocument): IXMLNode; override;
function CreateProtoTypNode(DOMDoc: IXMLDocument): IXMLNode; override;
procedure GetSpecialDataFrom(BluePrint: TGeoObj; MakNum: Integer); override;
function GetMatchingCursor(mpt: TPoint): TCursor; override;
function Dist (xm, ym: Double): Double; override;
function GetValue(selector: Integer): Double; override;
function IsCompatibleWith(ClassGroupId: Integer): Boolean; override;
function IsDynamicLocLineControl: Boolean; override;
function IsLineBound(var TL: TGLine): Boolean; override;
function CanControlAnimation: Boolean; override;
function AdjustBorders: Boolean;
function AdjustValue: Boolean;
procedure ResetOLCPList(PointList : TVector3List); override;
procedure UpdateParams; override;
procedure SaveState; override;
procedure RestoreState; override;
function SetLinePosition(tv: Double): Boolean; override;
procedure SetAllValues(vmin, vact, vmax, vquant: Double); virtual;
procedure SetAniParams(vmin, vact, vmax, vstep: Double); override;
procedure LoadContextMenuEntriesInto(menu: TPopUpMenu); override;
function GetInfo: String; override;
property Value: Double read FValue write SetValue;
property MinValue: Double read FValMin;
property MaxValue: Double read FValMax;
end;
TGLogSlider = class(TGNumberObj)
protected
nq : Integer;
procedure SetValue(newValue: Double); override;
procedure SetPositionFromValue; override;
// procedure UpdateScreenCoords; override;
procedure ExportIt; override;
public
{
constructor Create(iObjList: TGeoObjListe; iWidth: Integer; iValMin, iValue, iValMax: Double; iis_visible: Boolean);
constructor CreateBlueprintOf(GO: TGeoObj; iGeoNum: Integer = -1); override;
constructor CreateFromDomData(iObjList: TGeoObjListe; DE: IXMLNode); override;
constructor Load32(R: TReader; iObjList: TGeoObjListe); override;
function CreateObjNode(DOMDoc: IXMLDocument): IXMLNode; override;
}
procedure SetAllValues(vmin, vact, vmax, vquant: Double); override;
function CanControlAnimation: Boolean; override;
procedure UpdateParams; override;
end;
TGTermObj = class(TGNumber)
protected
CommentRect : TRect;
MinimalWidth : Integer;
CommentOutStr,
FComment : String;
FTerm : TTBaum;
FValue : Double;
FShowTerm : Boolean;
FOutFormat : Integer; // 0: normal; 1: Gradmaß; 2: Vielfaches von Pi
function DefaultName: WideString; override;
function GetDeciDigits: Integer;
function GetIsVisible: Boolean; override;
procedure SetDeciDigits(newVal: Integer);
procedure SetComment(newCStr: String);
procedure SetShowTerm(newVal: Boolean);
procedure UpdateScreenCoords; override;
procedure DrawIt; override;
procedure HideIt; override;
procedure Invalidate; override;
procedure Revalidate; override;
function HasSameDataAs(GO: TGeoObj): Boolean; override;
public
constructor Create(iObjList: TGeoObjListe; iTermStr, iCommentStr: WideString;
iShowTerm, iis_visible: Boolean);
constructor CreateFromDomData(iObjList: TGeoObjListe; DE: IXMLNode); override;
constructor Load32(R: TReader; iObjList: TGeoObjListe); override;
destructor Destroy; override;
destructor FreeBluePrint; override;
procedure AfterLoading(FromXML: Boolean = True); override;
function CreateObjNode(DOMDoc: IXMLDocument): IXMLNode; override;
function GetMatchingCursor(mpt: TPoint): TCursor; override;
function Dist (xm, ym: Double): Double; override;
function IsEstimated: Boolean;
function GetValue(selector: Integer): Double; override;
function GetValueStr: WideString;
function GetTermString: WideString;
function GetHTMLString: String;
procedure SetNewTerm(ts: WideString);
procedure SaveState; override;
procedure RestoreState; override;
procedure UpdateParams; override;
procedure ReDimData; override;
procedure RebuildTermStrings; override;
function HasBuggyTerm: Boolean; override;
procedure LoadContextMenuEntriesInto(menu: TPopUpMenu); override;
function GetInfo: String; override;
property Value: Double read FValue;
property Comment: String read FComment write SetComment;
property DeciDigits: Integer read GetDeciDigits write SetDeciDigits;
property OutFormat: Integer read FOutFormat write FOutFormat;
property ShowTerm: Boolean read FShowTerm write SetShowTerm;
end;
TGPoint = class(TGParentObj)
protected
FQuant, { Quantisierungsschrittweite }
Last_dx, { enthält den beim letzten Drag- }
Last_dy : Double; { Vorgang zurückgelegten Weg }
function DefaultName: WideString; override;
function GetAniMinValue: Double; override;
function GetAniMaxValue: Double; override;
function GetAniValue: Double; override;
procedure SetAniValue(nav: Double); override;
function GetIsWaiting: Boolean;
procedure SetIsWaiting(flag: Boolean);
procedure SetIsFlagged(flag: Boolean); override;
function TakeOtherPoint(x1, y1, x2, y2 : Double; FP: TGPoint): Boolean;
function HasSameDataAs(GO: TGeoObj): Boolean; override;
function IsParentOfCurve: Boolean;
procedure GetSpecialDataFrom(BluePrint: TGeoObj; MakNum: Integer); override;
procedure VirtualizeCoords; override;
procedure ExportIt; override;
procedure SetQuant(newVal: Double);
procedure AdjustGraphTools(todraw: Boolean); override;
procedure DrawIt; override;
procedure HideIt; override;
procedure Register4Dragging(DragList: TObjPtrList); override;
public
friends : TObjPtrList;
constructor Create(iObjList: TGeoObjListe; iX, iY: Double; iis_visible : Boolean);
constructor CreateAsLatticePt(iObjList: TGeoObjListe; iX, iY: Double; iis_visible : Boolean);
constructor CreateBlueprintOf(GO: TGeoObj; iGeoNum: Integer = -1); override;
constructor ConvertFromCoordPt(CPt: TGPoint);
constructor CreateFromDomData(iObjList: TGeoObjListe; DE: IXMLNode); override;
constructor Load(S: TFileStream; iObjList: TGeoObjListe);
constructor Load32(R: TReader; iObjList: TGeoObjListe); override;
destructor Destroy; override;
destructor FreeBluePrint; override;
function CreateObjNode(DOMDoc: IXMLDocument): IXMLNode; override;
function CreateI2GElementNode(DOMDoc: IXMLDocument): IXMLNode; override;
function CreateI2GConstraintNode(DOMDoc: IXMLDocument; ObjNames: TStrings): IXMLNode; override;
procedure RebuildPointers; override;
procedure AfterLoading(FromXML: Boolean); override;
procedure UpdateV1xObjects; override;
procedure LoadContextMenuEntriesInto(menu: TPopUpMenu); override;
function IsDynamicLocLineControl: Boolean; override;
function IsCompatibleWith(ClassGroupId: Integer): Boolean; override;
function CanControlAnimation: Boolean; override;
function AniCtrlObjName: String; override;
function Dist (xm, ym: Double): Double; override;
function IsNearMouse: Boolean; override;
procedure BecomesChildOf(GO: TGeoObj); override;
function IsFriendOf(GO: TGeoObj): Boolean;
function IsInLoopOfCLSegments: Boolean;
function IsEndOfFixLine: Boolean;
function IsIncidentWith(line: TGLine): Boolean; virtual;
procedure StartFriendshipWith(GO: TGeoObj);
procedure EndFriendshipWith(GO: TGeoObj);
procedure CheckChildLinesCBDI;
procedure CheckFriendlyLinks;
procedure RejectTemporaryParents;
procedure SaveState; override;
procedure RestoreState; override;
procedure RestorePointParams(ppX, ppY : Double; ppStatus: Integer;
ppdx, ppdy: Double);
procedure UpdateParams; override;
procedure UpdateScreenCoords; override;
procedure SetNewCoords(x_str, y_str: WideString); virtual;
function SetLinePosition(tv: Double): Boolean; override;
function IsLineBound(var TL: TGLine): Boolean; override;
function IsAngleVertex(var ao: TGeoObj) : Boolean;
function GetMatchingCursor(mpt: TPoint): TCursor; override;
procedure DragMove(dx, dy: Double);
procedure DragRotate(delta, xm, ym: Double);
procedure SetAniParams(vmin, vact, vmax, vstep: Double); override;
procedure SetGraphTools(LineStyleNum, PointStyleNum,
FillStyleNum: Integer; iColor: TColor); override;
procedure GetGraphTools(var LineStyleNum, PointStyleNum,
FillStyleNum: Integer; var iColor: TColor); override;
function GetDataStr: String; override;
function GetInfo: String; override;
property Quant: Double read FQuant write SetQuant;
property IsWaiting: Boolean read GetIsWaiting write SetIsWaiting;
property Lastdx: Double read Last_dx;
property Lastdy: Double read Last_dy;
end;
TGCoordPt = class(TGPoint) // veraltet !!!
protected
function HasSameDataAs(GO: TGeoObj): Boolean; override;
procedure GetSpecialDataFrom(BluePrint: TGeoObj; MakNum: Integer); override;
public
constructor Create(iObjList: TGeoObjListe; iXc, iYc: Double; iis_visible : Boolean);
constructor ConvertFromBasePt(BPt: TGPoint);
constructor Load(S: TFileStream; iObjList: TGeoObjListe);
constructor Load32(R: TReader; iObjList: TGeoObjListe); override;
function IsCompatibleWith(ClassGroupId: Integer): Boolean; override;
procedure Clip2Grid;
procedure UpdateParams; override;
function GetInfo: String; override;
end;
TGXPoint = class(TGPoint)
protected
function DataEquivalent(var data):Boolean; override;
function HasSameDataAs(GO: TGeoObj): Boolean; override;
procedure GetSpecialDataFrom(BluePrint: TGeoObj; MakNum: Integer); override;
public
XTerm,
YTerm : TTBaum;
constructor Create(iObjList: TGeoObjListe; iXTerm, iYTerm: WideString; iis_visible : Boolean);
constructor CreateBlueprintOf(GO: TGeoObj; iGeoNum: Integer = -1); override;
constructor ConvertFromBasePt(BPt: TGPoint);
constructor CreateFromDomData(iObjList: TGeoObjListe; DE: IXMLNode); override;
constructor CreateProtoTypFromDomData(iObjList: TGeoObjListe; DE: IXMLNode); override;
constructor Load32(R: TReader; iObjList: TGeoObjListe); override;
destructor Destroy; override;
destructor FreeBluePrint; override;
function CreateObjNode(DOMDoc: IXMLDocument): IXMLNode; override;
function CreateProtoTypNode(DOMDoc: IXMLDocument): IXMLNode; override;
function IsCompatibleWith(ClassGroupId: Integer): Boolean; override;
function IsLineBound(var TL: TGLine): Boolean; override;
function IsIncidentWith(line: TGLine): Boolean; override;
procedure AfterLoading(FromXML: Boolean); override;
procedure UpdateOldPrototype; override;
procedure Clip2Grid;
procedure LoadContextMenuEntriesInto(menu: TPopUpMenu); override;
procedure SetNewCoords(x_str, y_str: WideString); override;
procedure UpdateParams; override;
procedure RebuildTermStrings; override;
function HasBuggyTerm: Boolean; override;
function GetInfo: String; override;
end;
TGMiddlePt = class(TGPoint)
public
constructor Create(iObjList: TGeoObjListe; iP1, iP2: TGeoObj; iis_visible : Boolean);
procedure UpdateParams; override;
function GetInfo: String; override;
end;
TGMappedPoint = class(TGPoint)
protected
function HasSameDataAs(GO: TGeoObj): Boolean; override;
public
constructor Create(iObjList: TGeoObjListe; iOriPt, iMapObj: TGeoObj; iis_visible: Boolean);
procedure GetDataFromOldMappedObj(OMO: TGeoObj); override;
procedure UpdateParams; override;
function GetInfo: String; override;
end;
TGMirrorPt = class(TGPoint)
protected
function HasSameDataAs(GO: TGeoObj): Boolean; override;
public
constructor Create(iObjList: TGeoObjListe; iP1, iSyZ: TGeoObj; iis_visible : Boolean);
procedure UpdateParams; override;
function GetInfo: String; override;
end;
TGMovedPt = class(TGPoint)
protected
function HasSameDataAs(GO: TGeoObj): Boolean; override;
public
constructor Create(iObjList: TGeoObjListe; iP1, iP2: TGeoObj; iis_visible : Boolean);
procedure UpdateParams; override;
function GetInfo: String; override;
end;
TGRotatedPt = class(TGPoint)
protected
RotAngle : Double;
function HasSameDataAs(GO: TGeoObj): Boolean; override;
public
constructor Create(iObjList: TGeoObjListe; iUBP, iMP, iAO: TGeoObj; iis_visible : Boolean);
procedure UpdateParams; override;
function GetInfo: String; override;
end;
TGStretchedPt = class(TGPoint)
protected
SFactor : Double;
function HasSameDataAs(GO: TGeoObj): Boolean; override;
public
constructor Create(iObjList: TGeoObjListe; iUBP, iZP, iSF: TGeoObj; iis_visible : Boolean);
procedure UpdateParams; override;
function GetInfo: String; override;
end;
TGDoublePt = class(TGPoint) // veraltet !!!
protected
X_2, Y_2,
tv1, tv2 : Double;
scrx_2, scry_2: Integer;
Status2 : Word;
function AllParentsUnFlagged: Boolean; override;
procedure GetSpecialDataFrom(BluePrint: TGeoObj; MakNum: Integer); override;
procedure VirtualizeCoords; override;
public
constructor Create(iObjList: TGeoObjListe; iS1, iS2: TGeoObj; iis_visible : Boolean);
constructor CreateBlueprintOf(GO: TGeoObj; iGeoNum: Integer = -1); override;
constructor Load(S: TFileStream; iObjList: TGeoObjListe);
constructor Load32(R: TReader; iObjList: TGeoObjListe); override;
function CreateObjNode(DOMDoc: IXMLDocument): IXMLNode; override;
function IsIncidentWith(line: TGLine): Boolean; override;
procedure CheckParent3;
procedure SaveState; override;
procedure RestoreState; override;
procedure UpdateParams; override;
procedure UpdateScreenCoords; override;
function GetInfo: String; override;
end;
TGSecondPt = class(TGPoint) // veraltet !!!
public
constructor Create(iObjList: TGeoObjListe; iFirstPt: TGeoObj; iis_visible : Boolean);
function CreateObjNode(DOMDoc: IXMLDocument): IXMLNode; override;
function IsIncidentWith(line: TGLine): Boolean; override;
procedure UpdateParams; override;
function GetInfo: String; override;
end;
TGIntersectPt = class(TGSecondPt)
protected
function ParentLinksAreOkay : Boolean; override;
function HasSameDataAs(GO: TGeoObj): Boolean; override;
public
PtIndex : Integer;
Age : Double;
constructor Create(iObjList: TGeoObjListe; iIntersection: TGeoObj;
iPtIndex: Integer; iis_visible : Boolean);
constructor CreateBlueprintOf(GO: TGeoObj; iGeoNum: Integer = -1); override;
constructor CreateFromBlueprint(iObjList: TGeoObjListe; MakNum, CmdNum: Integer); override;
constructor CreateFromDomData(iObjList: TGeoObjListe; DE: IXMLNode); override;
function CreateObjNode(DOMDoc: IXMLDocument): IXMLNode; override;
function IsIncidentWith(line: TGLine): Boolean; override;
function IsCompatibleWith(ClassGroupId: Integer): Boolean; override;
function GetDisplacement(Pt: TFloatPoint): Double;
procedure PatchDataFrom(OPt: TGPoint);
procedure UpdateParams; override;
procedure SetNameTo(s: String);
function GetInfo: String; override;
end;
TGLxLPt = class(TGPoint)
public
constructor Create(iObjList: TGeoObjListe; iG1, iG2: TGeoObj; iis_visible : Boolean);
function CreateI2GConstraintNode(DOMDoc: IXMLDocument; ObjNames: TStrings): IXMLNode; override;
function IsIncidentWith(line: TGLine): Boolean; override;
procedure UpdateParams; override;
function GetInfo: String; override;
end;
TGPol = class(TGPoint)
public
constructor Create(iObjList: TGeoObjListe; iSL, iC: TGeoObj; iis_visible : Boolean);
function IsIncidentWith(line: TGLine): Boolean; override;
procedure UpdateParams; override;
function GetInfo: String; override;
end;
TGVertexPt = class(TGPoint)
private
FPtIndex : Integer;
public
constructor Create(iObjList: TGeoObjListe; iPoly: TGeoObj; n : Integer; iis_visible : Boolean);
constructor CreateFromDomData(iObjList: TGeoObjListe; DE: IXMLNode); override;
function CreateObjNode(DOMDoc: IXMLDocument): IXMLNode; override;
function IsIncidentWith(line: TGLine): Boolean; override;
function HasSameDataAs(GO: TGeoObj): Boolean; override;
procedure UpdateParams; override;
procedure UpdateScreenCoords; override;
function GetInfo: String; override;
end;
TGOrigin = class (TGPoint)
protected
BackBMP : TBitmap;
BackRect : TRect;
BackX1, BackY1,
BackX2, BackY2,
dsx, dsy : Double;
FCSType, { Typ des Koord.-Systems :
< 0 : kein Koordinatensystem anzeigen
0 : Ursprung und Achsen
1 : Ursprung, Achsen und enges Gitter
2 : Ursprung, Achsen und mittleres Gitter
5 : Ursprung, Achsen und weites Gitter }
FGridType : Integer; { Art der Gitter-Darstellung :
0 : kleine Kreuzl
1 : durchgezogene Gitterlinien
2 : punktierte Gitterlinien }
function GetAxisNoNumbers: Boolean;
procedure SetAxisNoNumbers(newVal: Boolean);
procedure SetGridType(newVal: Integer);
function HasSameDataAs(GO: TGeoObj): Boolean; override;
procedure AdjustGraphTools(todraw: Boolean); override;
procedure ReAdjustGraphTools;
procedure DrawGrid;
procedure DrawIt; override;
procedure HideIt; override;
public
constructor Create (iObjList: TGeoObjListe; iX, iY: Double; iCSType: Integer; iis_visible: Boolean);
constructor CreateFromDomData(iObjList: TGeoObjListe; DE: IXMLNode); override;
constructor Load (S: TFileStream; iObjList: TGeoObjListe);
constructor Load32(R: TReader; iObjList: TGeoObjListe); override;
destructor Destroy; override;
function CreateObjNode(DOMDoc: IXMLDocument): IXMLNode; override;
procedure AfterLoading(FromXML : Boolean = True); override;
function IsCompatibleWith(ClassGroupId: Integer): Boolean; override;
function GetMatchingCursor(mpt: TPoint): TCursor; override;
function ShowAxis: Boolean;
procedure ExportBackPic2GeoList;
procedure UpdateParams; override;
procedure UpdateScreenCoords; override;
procedure RegisterAsMacroStartObject; override;
function GetInfo: String; override;
property AxisNoNumbers: Boolean read GetAxisNoNumbers write SetAxisNoNumbers;
property CSType: Integer read FCSType write FCSType;
property GridType: Integer read FGridType write SetGridType;
end;
TGaugePoint = class (TGPoint)
protected
Art : Integer; { 1 : Eichpunkt auf der x-Achse;
2 : Eichpunkt auf der y-Achse }
procedure SetIsMarked(flag: Boolean); override;
procedure DrawIt; override;
procedure HideIt; override;
public
constructor Create (iObjList: TGeoObjListe; Ori, Ax: TGeoObj; iis_visible: Boolean);
constructor CreateFromDomData(iObjList: TGeoObjListe; DE: IXMLNode); override;
constructor Load(S: TFileStream; iObjList: TGeoObjListe);
constructor Load32(R: TReader; iObjList: TGeoObjListe); override;
function CreateObjNode(DOMDoc: IXMLDocument): IXMLNode; override;
procedure UpdateParams; override;
function GetInfo: String; override;
end;
TGArea = class;
TGLine = class(TGParentObj)
protected
sx1, sy1,
sx2, sy2: Integer;
F_CCTP, // "CanCarryTangentPoints"
F_CBDI : Boolean; // "Can Be dragged indirectly"
function GetFillHandle(Ori: Boolean): HRgn; virtual;
function AllAncestorsAreFreePoints(PList: TObjPtrList = Nil): Boolean; virtual;
procedure MovePointsOff(var rP1, rP2: TFloatPoint);
procedure AdjustGraphTools(todraw : Boolean); override;
procedure VirtualizeCoords; override;
public
X1, Y1,
X2, Y2 : Double;
constructor CreateFromDomData(iObjList: TGeoObjListe; DE: IXMLNode); override;
function CreateObjNode(DOMDoc: IXMLDocument): IXMLNode; override;
function IsCompatibleWith(ClassGroupId: Integer): Boolean; override;
function IsClosedLine: Boolean; virtual;
function Includes(xp, yp: Double): Boolean; virtual;
function GetTangentIn(bx, by: Double; var tanCoeff: TVector3): Boolean; virtual;
function GetPolOf(polare: TVector3; var px, py: Double): Boolean; virtual;
function GetPolareOf(bx, by: Double; var polCoeff: TVector3): Boolean; virtual;
function GetParentPointOnSelf(nr: Integer): TGPoint; virtual;
function IsFilled(var FO: TGArea): Boolean; virtual;
function GetLinePtWithMinMouseDist(xm, ym, quant: Double; var px, py: Double): Boolean; virtual; abstract;
function GetLinePtWithDistFrom(EP: TGPoint; r: Double; var px, py: Double): Boolean; virtual; abstract;
procedure GetDataVector(var v: TVector3); virtual; abstract;
procedure SaveState; override;
procedure RestoreState; override;
procedure Set_CBDI;