-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDials.pas
13721 lines (11573 loc) · 339 KB
/
Dials.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
{ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ ³²²
³ Malte Genesis/Module des Dialogues ³²²
³ ³²²
³ dition Chantal & AdŠle pour Mode R‚el/IV - Version 1.0 ³²²
³ 1995/02/02 … 2001/04/19 ³²²
³ ³²²
³ Tous droits r‚serv‚s par les Chevaliers de Malte (C) ³²²
³ ³²²
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ²²
²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²²
Nom du programmeur
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
Sylvain Maltais
Description
ÍÍÍÍÍÍÍÍÍÍÍ
Cette unit‚ contient tous les m‚canismes de base pour la construction d'un
environnement de style ®Elvis¯. Il permet ainsi des possibilit‚s de multi-
fenˆtrage, dialogue, journal de bord, historique, visualisation rapide de
fichier ASCII, presse-papier (clipboard), gestion des menus d‚roulant,
s‚lection de liste, gestion des Icons et des boutons dans un environnement
aussi bien texte que graphique avec une souris utilisable.
Remarques
ÍÍÍÍÍÍÍÍÍ
þ Il support les descriptions de 4DOS/NDOS si la variable ®DescrInFile¯est
positionn‚ (est … True).
þ Si vous souhaŒtez avoir plusieurs menu principal s‚par‚, vous devez
d‚finir la directive de compilation ®$DEFINE MultiMenu¯. Vous devrez
donc d‚finir votre propre variable … chaque fois tel un objet.
}
Unit Dials;
{ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ}
INTERFACE
{ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ}
{$I DEF.INC}
Uses Adele,
{$IFDEF __Windows__}
Graphics,
{$ENDIF}
Dostex,Systex,Dialex,Isatex;
Procedure AppInit(Const Title:String;Color,Mtx:Byte);
Procedure BMIcon(Var Q:BlockButton);
Procedure BMLoadAll(Var Q:ButtonMnu;Name:String;X,Y:Byte);
Procedure BMLoadAllVert(Var Q:ButtonMnu;Name:String;X,Y,PerLine:Byte);
Function BMUseXTexts(Var Q:ButtonMnu):Byte;
Function BMUseYTexts(Var Q:ButtonMnu):Byte;
Function BMGetBut(Var Q:ButtonMnu;X,Y:Byte):Word;
Procedure BPInit(Var Q:BarProgress;X,Y:Byte;Var W:Window);
Procedure BPProgress(Var Q:BarProgress;Pour:Byte);
Procedure ConMacro(Const S:String);
Procedure DialogMsgOk(Const Msg:String);
Function ErrMsg(Const Msg:String;Key:Word):Word;
Procedure ErrMsgOk(Const Msg:String);
Procedure ErrNoMsgOk(Error:Word);
Function GetAbsClipBoard(P:LongInt;Size:Word;Var X):Word;
Function GetClipBoardTxt:String;
Function GetErrMsg(X:Word):String;
Function GetStrTimeInPrg:String;
Function HYChoice(Var Q:History;X,Y:Byte):String;
Function HYClear(Var Q:History):String;
Procedure HYClearQueue(Var Q:History);
Procedure HYDone(Var Q:History);
Function HYGetSizeBuffer(Var Q:History):Word;
Procedure HYInit(Var Q:History;Size:Word);
Procedure HYInitTo(Var Q:History;Size:Word;Buffer:Pointer);
Function HYNext(Var Q:History):String;
Function HYPrev(Var Q:History):String;
Procedure HYQueue(Var Q:History;Const S:String);
Procedure HYSetSizeBuffer(Var Q:History;Size:Word);
Function InBarHole(X,Y,L:Byte):Boolean;
Function InBoxHole(X,Y,L,H:Byte):Boolean;
Procedure InitDials;
Procedure InitEnv;
Function Input(X1,Y,X2:Byte;MaxLen:Word;PassWord:Boolean;Var Str:PChr):Word;
Function InputMsg(Const Title,Msg:String;Key:Word;Flags:Byte;Const Palette:MtxInputColors):Word;
{$IFNDEF __Windows__}
Procedure Int05h(Flags,CS,IP,AX,BX,CX,DX,SI,DI,DS,ES,BP:Word);Interrupt;
{$ENDIF}
Function IsBanderolle:Boolean;
{$IFDEF Joystick}
Function JoyX(Joy:Byte):ShortInt;
Function JoyY(Joy:Byte):ShortInt;
{$ENDIF}
Function KeyCode2Str(Code:Word):String;
Procedure LMInit(Var Q:LstMnu;X1,Y1,X2,Y2:Byte;Const Title:String;Const Palette:MtxColors);
Procedure LMInitKrDials(Var Q:LstMnu;X1,Y1,X2,Y2:Byte;Const Title:String);
Procedure _LMQInit(Var Q:LstMnu;X1,Y1,X2,Y2:Byte;Title:String;Const Palette:MtxColors);
Procedure LMInitCenter(Var Q:LstMnu;L,H:Byte;Title:String;Const Palette:MtxColors);
Procedure LMQInit(Var Q:LstMnu;X1,Y1,X2,Y2:Byte);
Procedure LMGotoPos(Var Q:LstMnu;Code:Word);
Procedure LMSetEndBar(Var Q:LstMnu;Attr:Byte);
Procedure LMPutEndBar(Var Q:LstMnu;X:Byte;Const Msg:String;Attr:Byte);
Procedure LMPutSmallShade(Var Q:LstMnu);
Procedure LMPutBarMouseRight(Var Q:LstMnu);
Procedure LMRefresh(Var Q:LstMnu);
Procedure LMSelBar(Var Q:LstMnu);
Procedure LMSelBarInactive(Var Q:LstMnu);
Procedure LMUnSelBar(Var Q:LstMnu);
Procedure LMPutDataHome(Var Q:LstMnu);
Procedure LMkUp(Var Q:LstMnu);
Procedure LMkDn(Var Q:LstMnu);
Function LMGetVal(Var Q:LstMnu):LongInt;
Function LMRun(Var Q:LstMnu):Word;
Function LMRunKbd(Var Q:LstMnu):Word;
Procedure LMDone(Var Q:LstMnu);
Procedure LoadWallPaper(Refresh:Boolean);
Procedure LTInit(Var Q:ListTitle;X1,Y,X2:Byte;Const Title:String);
Procedure LTInitWithWins(Var Q:ListTitle;X1,Y,X2:Byte;Const Title:String;Var W:Window);
Procedure LTSetColumnSize(Var Q:ListTitle;Pos,NewSize:Byte);
Procedure LTRefresh(Var Q:ListTitle);
Procedure MakeClipBoard(Size:LongInt);
Function MessageByLanguage(Const Raw:String):String;
Procedure PMInit{$IFDEF MultiMenu}(Var MainMenu:PullMnu){$ENDIF};
Procedure PMAddBarItem{$IFDEF MultiMenu}(Var MainMenu:PullMnu){$ENDIF};
Procedure PMAddFullItem({$IFDEF MultiMenu}Var MainMenu:PullMnu;{$ENDIF}Option:PChar;
KeyFunc,RtnCode:Word;SubMenu:Pointer{$IFDEF LuxeExtra};PChr:PChar{$ENDIF});
Procedure PMAddItem({$IFDEF MultiMenu}Var MainMenu:PullMnu;{$ENDIF}Option:PChar;
RtnCode:Word{$IFDEF LuxeExtra};PChr:PChar{$ENDIF});
Procedure PMAddItemKey({$IFDEF MultiMenu}Var MainMenu:PullMnu;{$ENDIF}Option:PChar;
KeyFunc,RtnCode:Word{$IFDEF LuxeExtra};PChr:PChar{$ENDIF});
Procedure PMAddItemSwitch({$IFDEF MultiMenu}Var MainMenu:PullMnu;{$ENDIF}
Option:PChar;Var Value;Switch:PullSwitchPtr;RtnCode:Word);
Procedure PMAddMnu({$IFDEF MultiMenu}Var MainMenu:PullMnu;{$ENDIF}Mnu:PChar);
Function PMExecMnu({$IFDEF MultiMenu}Var MainMenu:PullMnu;{$ENDIF}
X,Y:Byte;List:PullMnuPtr;Var P:Byte):Word;
Procedure PMGetMnuBar({$IFDEF MultiMenu}Var MainMenu:PullMnu;{$ENDIF}X,Y:Byte);
Function PMMnuPtr({$IFDEF MultiMenu}Var MainMenu:PullMnu;{$ENDIF}Mnu:PChr):PullMnuPtr;
Procedure PMPutMnuBar{$IFDEF MultiMenu}(Var MainMenu:PullMnu){$ENDIF};
Procedure PMSetWinBar({$IFDEF MultiMenu}Var MainMenu:PullMnu;{$ENDIF}X1,Y,X2:Byte);
Function PMWaitForMnuAction{$IFDEF MultiMenu}(Var MainMenu:PullMnu){$ENDIF}:Word;
Procedure PMDone{$IFDEF MultiMenu}(Var MainMenu:PullMnu){$ENDIF};
Procedure PopScr(Var M:ImgRec);
{Procedure PopWins(Var Q:Wins);}
Procedure PushClipboardTxt(Const S:String);
Procedure PushScr(Var M:ImgRec);
{Procedure PushWins(Var Q:Wins);}
Procedure PutClipBoardTxt(Const S:String);
Procedure PutGrfIcon(Const Path:String;X,Y:Byte;P:Word);
Procedure PutLastBar(X:Byte;Const Msg:String);
Function PutImage(X1,Y1,X2,Y2:Integer;Var Q:ImgRec):Boolean;
Function RestoreImage(X1,Y1,X2,Y2:Integer;Var Q:ImgRec):Boolean;
Function ReadKeyTypeWriter:Word;
Function SaveImage(X1,Y1,X2,Y2:Integer;Var Q:ImgRec):Boolean;
Procedure SEInit(Var Q:SectionRec;L:Byte;Const Title:String);
Procedure SEAssociateImageRes(Var Q:SectionRec;Const Name:String;Start:Word;ImageLen:Byte);
Procedure SEAdd(Var Q:SectionRec;Const k:String);
Procedure SEPutWn(Var Q:SectionRec);
Procedure SEBar(Var Q:SectionRec);
Function SERun(Var Q:SectionRec):Word;
Procedure SEDone(Var Q:SectionRec);
Function SelectField(Const Table:String;Value:Word;Field:Byte):String;
Function SelectStrictField(Const Table:String;Value:Word;Field:Byte):String;
Procedure SetAbsClipBoard(P:LongInt;Size:Word;Const X);
Procedure SetPosDate(X,Y:Byte);
Procedure SetPosTime(X,Y:Byte);
Procedure SetPosTimeAfterEndOfDay(X,Y:Byte);
Procedure SetPosTimeInPrg(X,Y:Byte);
Procedure SetPosTimeMod(X,Y:Byte);
Procedure SetPosTimeOnLine(X,Y:Byte);
Procedure SetTimerMod;
Procedure SetTimerModOff;
Procedure SetTimerOnLine;
Procedure SetTimerOnLineOff;
Procedure SMInit(Var Q:PullSubMnu);
Procedure SMAddFullItem(Var Q:PullSubMnu;Option:PChar;KeyFunc,RtnCode:Word;SubMenu:Pointer
{$IFDEF LuxeExtra};PC:PChar{$ENDIF});
Procedure SMAddItemSwitch(Var Q:PullSubMnu;Option:PChar;Var Value;Switch:PullSwitchPtr;RtnCode:Word);
Procedure SMAddBarItem(Var Q:PullSubMnu);
Procedure SMDone(Var Q:PullSubMnu);
Function TimeToStr(Time:LongInt):String;
Function WarningMsg(Const Msg:String;Key:Byte):Word;
Procedure WarningMsgOk(Const Msg:String);
Function WarningMsgYesNo(Const Msg:String):Word;
Procedure WEAniCur(Var Q:Window);
Procedure WEBackground(Var Q:Window;Attr:Byte);
Function WEBackReadk(Var Q:Window):Word;
Procedure WEBar(Var Q:Window);
Procedure WEBarSelHor(Var Q:Window;X1,Y,X2:Byte);
Procedure WEBarSpcHor(Var Q:Window;X1,Y,X2:Byte);
Procedure WEBarSpcHorBanderolle(Var Q:Window;Y:Byte;P:Word);
Procedure WEBarSpcHorShade(Var Q:Window;X1,Y,X2:Byte);
Procedure WEBarSpcHorRelief(Var Q:Window;X1,Y,X2:Byte);
Procedure WEBarTxtHor(Var Q:Window;X1,Y,X2:Byte;Chr:Char);
Procedure WECloseCur(Var Q:Window);
Procedure WECloseIcon(Var Q:Window);
Procedure WEClrScr(Var Q:Window);
Procedure WEClrEol(Var Q:Window);
Procedure WEClrLnHor(Var Q:Window;X,Y:Integer;Len,Color:Word);
Procedure WEClrWn(Var Q:Window;X1,Y1,X2,Y2,Attr:Byte);
Procedure WEClrWnBorder(Var Q:Window;X1,Y1,X2,Y2:Byte);
Procedure WEConMacro(Var Q:Window;Const S:String);
Procedure WEDone(Var Q:Window);
Procedure WEDn(Var Q:Window;N:Byte);
Procedure WEForeground(Var Q:Window;Attr:Byte);
Function WEFreeAll(Var Q:Window):Boolean;
Function WEGetCompatPosition(Var Q:Window;NumElement:LongInt):LongInt;
Function WEGetkHor(Var Q:Window;X,Y,JK:Byte;Const kStr:String):Byte;
Function WEGetkHorDn(Var Q:Window;Const k:String):Word;
Function WEGetkHorO(Var Q:Window;Y:Byte;Const k:String):Word;
Function WEGetRealY(Var Q:Window):Byte;
Function WEGetRealX(Var Q:Window):Byte;
Function WEGetRX1(Var Q:Window):Byte;
Function WEGetRY1(Var Q:Window):Byte;
Function WEGetStr(Var Q:Window;X,Y:Byte):String;
Function WEInCloseIcon(Var Q:Window;X,Y:Byte):Boolean;
Function WEInZoomIcon(Var Q:Window;X,Y:Byte):Boolean;
Procedure WEInitO(Var Q:Window;L,H:Byte);
Procedure WEInit(Var Q:Window;X1,Y1,X2,Y2:Byte);
{$IFDEF __Windows__}
Procedure WEInitWindows(Var Q:Window;Const Canvas:TCanvas);
{$ENDIF}
Function WEInp(Var Q:Window;Var Str:PChr;MaxLen:Word;PassWord:Boolean):Word;
Function WEInRightBarMs(Var Q:Window;X,Y:Byte):Word;
Function WEInTitle(Var Q:Window;X,Y:Byte):Boolean;
Function WEInWindow(Var Q:Window;X,Y:Byte):Boolean;
Function WEInZonePtrMouse(Var Q:Window;X,Y,L,H:Byte):Boolean;
Procedure WELeft(Var Q:Window;N:Byte);
Procedure WELn(Var Q:Window);
Function WEMouseInZone(Var Q:Window;X,Y,L,H:Byte):Boolean;
Function WEOk(Var Q:Window):Boolean;
Function WEOnWindow(Var Q:Window;X,Y:Byte):Boolean;
Procedure WEPopCur(Var Q:Window);
Function WEPopWn(Var Q:Window):Boolean;
Procedure WEPushCur(Var Q:Window);
Procedure WEPushEndBar(Var Q:Window);
Function WEPushWn(Var Q:Window):Boolean;
Procedure WEPutBarMsRight(Var Q:Window);
Procedure WEPutChrGAttr(Var Q:Window;Chr:Char;GAttr:Byte);
Procedure WEPutCube(Var Q:Window;Chr:Char);
Procedure WEPutFillBox(Var Q:Window;X1,Y1,X2,Y2,Color:Word);
Procedure WEPutkHor(Var Q:Window;X,Y,JK:Byte;Const kStr:String);
Procedure WEPutkHorDn(Var Q:Window;Const Key:String);
Procedure WEPutkHorO(Var Q:Window;Y:Byte;Const k:String);
Procedure WEPutLastBar(Const k:String);
Procedure WEPutLine(Var Q:Window;X1,Y1,X2,Y2,Color:Word);
Procedure WEPutLnHor(Var Q:Window;X1,Y,X2,Color:Word);
Procedure WEPutMsg(Var Q:Window;Const Msg:String);
Procedure WEPutOTxt(Var Q:Window;Const Msg:String);
Procedure WEPutOTxtU(Var Q:Window;Const Msg:String);
Procedure WEPutPTxt(Var Q:Window;Msg:PChr);
Procedure WEPutPTxtLn(Var Q:Window;Msg:PChr);
Procedure WEPutPTxtXY(Var Q:Window;X,Y:Byte;Msg:PChr);
Procedure WEPutPTxtXY2(Var Q:Window;X,Y:Byte;S:Word;Msg:PChr);
Procedure WEPutPTxtXYAtChr(Var Q:Window;X,Y:Byte;Chr:Char;Msg:PChr);
Procedure WEPutRect(Var Q:Window;X1,Y1,X2,Y2,Color:Word);
Procedure WEPutSmallBorder(Var Q:Window);
Procedure WEPutSmlTxtLn(Var Q:Window;Const Msg:String);
Procedure WEPutSmlTxtXY(Var Q:Window;X,Y:Byte;Msg:String);
Procedure WEPutTxt(Var Q:Window;Msg:String);
Procedure WEPutTxtT(Var Q:Window;Msg:String);
Procedure WEPutTxtTLn(Var Q:Window;Const Msg:String);
Procedure WEPutTxtLn(Var Q:Window;Const Msg:String);
Procedure WEPutTxtXY(Var Q:Window;X,Y:Byte;Msg:String);
Procedure WEPutTxtXYT(Var Q:Window;X,Y:Byte;Msg:String);
Procedure WEPutTxtXYU(Var Q:Window;X,Y:Byte;Msg:String);
Procedure WEPutTyping(Var Q:Window;Const Msg:String);
Procedure WEPutTypingLn(Var Q:Window;Const Msg:String);
Procedure WEPutWn(Var Q:Window;Const Title:String;Const Palette:MtxColors);
Procedure WEPutWnKrDials(Var Q:Window;Const Title:String);
Function WEReadk(Var Q:Window):Word;
Procedure WEReInit(Var Q:Window;X1,Y1,X2,Y2:Byte);
Procedure WERight(Var Q:Window;N:Byte);
Function WERunItem(Var W:Window;X,Y:Byte;Var P:Byte;Min,Nm:Byte;Var TB:Array of Boolean):Word;
Procedure WEScrollLeft(Var Q:Window;X1,Y1,X2,Y2,N:Byte);
Procedure WEScrollRight(Var Q:Window;X1,Y1,X2,Y2,N:Byte);
Procedure WEScrollDn(Var Q:Window;X1,Y1,X2,Y2:Byte);
Procedure WEScrollUp(Var Q:Window;X1,Y1,X2,Y2:Byte);
Procedure WESelRightBarPos(Var Q:Window;P,Max:Word);
Procedure WESetAttr(Var Q:Window;X,Y,Attr:Byte);
Procedure WESetChr(Var Q:Window;X,Y:Byte;Chr:Char);
Procedure WESetCube(Var Q:Window;X,Y:Byte;Chr:Char);
Procedure WESetCurPos(Var Q:Window;X,Y:Byte);
Procedure WESetEndBar(Var Q:Window;Attr:Byte);
Procedure WESetEndBarCTitle(Var Q:Window);
Procedure WESetEndBarTxtX(Var Q:Window;X:Byte;Str:String;Attr:Byte);
Procedure WESetHomeLine(Var Q:Window;Y:Byte);
Procedure WESetKr(Var Q:Window;Color:Byte);
Procedure WESetKrBorder(Var Q:Window);
Procedure WESetKrBorderF(Var Q:Window;F:Byte);
Procedure WESetKrHigh(Var Q:Window);
Procedure WESetKrSel(Var Q:Window);
Procedure WESetKrSelF(Var Q:Window;F:Byte);
Procedure WESetInpColors(Var Q:Window;Normal,Select:Byte);
Procedure WESetPos(Var Q:Window;X,Y:Byte);
Procedure WESetPosHome(Var Q:Window);
Procedure WESetSubWn(Var Q:Window;Const Title:String;Var W:Window);
Procedure WESetTitle(Var Q:Window;Title:String;Color:Byte);
Procedure WESetXBool(Var W:Window;X,Y:Byte;B:Boolean);
Procedure WESetY(Var Q:Window;Y:Byte);
Procedure WESimpleCur(Var Q:Window);
Procedure WESubList(Var Q:Window;X1,Y1,X2,Y2:Byte;Const Title:String;Var L:LstMnu);
Procedure WESubWins(Var Q:Window;X1,Y1,X2,Y2:Byte;Var W:Window);
Procedure WEUp(Var Q:Window;N:Byte);
Function WEXIsOut(Var Q:Window):Boolean;
Function WEYIsOut(Var Q:Window):Boolean;
Procedure WEZoomIcon(Var Q:Window);
Function WinInp(L:Byte;Const Title,Msg:String;Const Palette:MtxColors;PassWord:Boolean;Var Output:String):Word;
Function WinInpH(L:Byte;Const Title,Msg:String;Const Palette:MtxColors;
PassWord:Boolean;Var Output:String;Var Q:History;
PrevNext:Boolean):Word;
Procedure WriteLog(Const S:String);
Procedure _InitAbsEnv(Palette:Byte);
Procedure _InitEnv(Default:Byte);
Function _InputMsg(Const Title,Msg,Key:String;Flags:Byte;Const Kr:MtxInputColors):Word;
Function _PMWaitForMnuAction({$IFDEF MultiMenu}Var MainMenu:PullMnu;{$ENDIF}K:Word):Word;
Procedure _SetRecClipBoard(Size:Word;Const X);
Procedure _WEDn(Var Q:Window);
Procedure _WEHL(Var Q:Window); { SetHomeLine }
Function _WEInput(Var Q:Window;X1,Y,X2:Byte;Len:Word;Var PChr:PChr):Word;
Procedure _WELeft(Var Q:Window);
Procedure _WELL(Var Q:Window); { SetLastLine }
Procedure _WELn(Var Q:Window);
Procedure _WEPutWn(Var Q:Window;Const Title:String);
Procedure _WERight(Var Q:Window);
Procedure _WESetCube(Var Q:Window;X,Y:Byte;Chr:Char;Attr:Byte);
Procedure _WESetCubeCSel(Var Q:Window;X,Y:Byte;Chr:Char);
Procedure _WESetCubeCSelF(Var Q:Window;X,Y:Byte;Chr:Char;F:Byte);
Procedure _WESetTitle(Var Q:Window;Const Title:String);
Procedure _WESetTitleF(Var Q:Window;Const Title:String;F:Byte);
Procedure _WEScrollDn(Var Q:Window);
Procedure _WEScrollUp(Var Q:Window);
Procedure _WEUp(Var Q:Window);
Function _WinInp(L:Byte;Const Title,Msg:String;PassWord:Boolean;Var Output:String):Word;
{ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ}
IMPLEMENTATION
{ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ}
Uses Memories,Time,Systems,pritex,Mouse,Arcade,Video,Volume,DialPlus,
{$IFDEF __Windows__}
Controls,Dialogs,
{$ENDIF}
ResServI,ResLoadI,ResTex,ResServD,
Tools,Sound,CommBase,Math;
Procedure AsmWEGetR;Near;Forward;
Procedure AsmWEGetReal;Near;Forward;
Procedure BackTimer;Far;Forward;
Procedure InitKbd;Forward;
Function Key2Str(Key:Word;Var Str:String):Byte;Near;Forward;
Procedure LIInit(Var Q:LineImage);Near;Forward;
Function LIPush(Var Q:LineImage;X1,Y,X2:Byte):Boolean;Near;Forward;
Procedure LIReSave(Var Q:LineImage;X1,Y,X2:Byte);Near;Forward;
Procedure LIBarSel(Var Q:LineImage);Near;Forward;
Procedure LIPop(Var Q:LineImage);Near;Forward;
Procedure LICopy(Var Q:LineImage);Near;Forward;
Procedure LIPut(Var Q:LineImage);Near;Forward;
Procedure PMAlloc({$IFDEF MultiMenu}Var Q:PullMnu;{$ENDIF}BPull:PullMnuItem);Forward;
Function _SaveImage(X1,Y1,X2,Y2:Integer;Var Q:ImgRec;Resource:Byte):Bool;Near;Forward;
Procedure SMAlloc(Var Q:PullSubMnu;BPull:PullMnuItem);Forward;
Procedure WEAlignEnd(Var Inf:Window;Var X,Y:Byte);Near;Forward;
Function WEAlignEndX(Var Inf:Window;X:Byte):Byte;Near;Forward;
Function WEAlignEndY(Var Inf:Window;Y:Byte):Byte;Near;Forward;
Function WEGetR(Var Q:Window;Var Y:Byte):Byte;Near;Forward;
Function WEMaxXTxts(Var Q:Window):Byte;Near;Forward;
Function WEMaxYTxts(Var Q:Window):Byte;Near;Forward;
Function __WEPutkHor(Var Inf:Window;X,Y,JK:Byte;Const kStr:String;Var XTab:XTabType;High:Bool):Byte;Near;Forward;
{ R o u t i n e a u t o n o m e ...}
Function MessageByLanguage(Const Raw:String):String;
Var
P:Byte;
S:String;
Begin
P:=Pos('³',Raw);
If P=0Then MessageByLanguage:=Raw
Else
Begin
If DefaultLanguage=0Then MessageByLanguage:=Left(Raw,P-1)
Else Begin
S:=Copy(Raw,P+1,255);
P:=Pos('³',S);
If P=0Then MessageByLanguage:=S
Else
Begin
If DefaultLanguage=2Then MessageByLanguage:=Copy(S,P+1,255)
Else MessageByLanguage:=Left(S,P-1);
End;
End;
End;
End;
Function SelectField(Const Table:String;Value:Word;Field:Byte):String;
Var
S:String;
Begin
S:=SelectStrictField(Table,Value,Field);
If S=''Then S:={$IFDEF ENGLISH}'Unknown'{$ELSE}'Inconnu(e)'{$ENDIF};
SelectField:=S;
End;
Function SelectStrictField(Const Table:String;Value:Word;Field:Byte):String;
Var
PBuffer:Pointer;
PString:^String Absolute PBuffer;
Buffer:Array[0..1023]of Byte;
Begin
DBOpenServerName(ChantalServer,Table);
If DBLocateAbs(ChantalServer,0,Value,[])Then Begin
DBReadRec(ChantalServer,Buffer);
PBuffer:=@Buffer;
DBGotoColumnAbs(ChantalServer,Field,PBuffer);
SelectStrictField:=PString^;
End
Else
SelectStrictField:='';
End;
{ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ·}
{³ Z o n e P r i v ‚ º}
{ÔÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ}
{$IFNDEF GraphicOS}
Procedure BarSpcHorHole(X1,Y,X2,Attr:Byte);Near;
Var
I:Byte;
B:Word;
Begin
If(HoleMode)and(Hole<>NIL)Then Begin
B:=X1+Y*NmXTxts;
For I:=X1 to(X2)do Begin
If Not Hole^[B]Then SetCube(I,Y,' ',Attr);
Inc(B);
End;
End
Else
BarSpcHor(X1,Y,X2,Attr);
End;
Procedure ClrWnHole(X1,Y1,X2,Y2,Attr:Byte);Near;
Var
J:Byte;
Begin
If(HoleMode)and(Hole<>NIL)Then Begin
For J:=Y1 to(Y2)do BarSpcHorHole(X1,J,X2,Attr)
End
Else
ClrWn(X1,Y1,X2,Y2,Attr);
End;
Procedure PutTxtXYHole(X,Y:Byte;Const S:String;Attr:Byte);Near;
Var
I:Byte;
B:Word;
Begin
If(HoleMode)and(Hole<>NIL)Then Begin
B:=X+Y*NmXTxts;
For I:=1to Length(S)do Begin
If Not Hole^[B]Then SetCube(X,Y,S[I],Attr);
Inc(B);Inc(X);
End;
End
Else
PutTxtXY(X,Y,S,Attr);
End;
Procedure PutTxtXYTHole(X,Y:Byte;Const S:String;Attr:Byte);Near;
Var
I:Byte;
B,X1:Word;
Begin
If(HoleMode)and(Hole<>NIL)Then Begin
B:=X+Y*NmXTxts;X1:=X shl 3;
For I:=1to Length(S)do Begin
If Not Hole^[B]Then SetGCubeT(X1,GetRawY(Y),S[I],Attr);
Inc(B);Inc(X1,8);
End;
End
Else
PutTxtXYT(X,Y,S,Attr);
End;
Procedure _LnHorHole(X1,Y,X2:Word);Near;Begin
If Not(HoleMode)Then _LnHor(X1,Y,X2)Else
If Not InBarHole(X1 shr 3,Y div HeightChr,((X2 shr 3)-(X1 shr 3))+2)Then _LnHor(X1,Y,X2);
End;
{$ENDIF}
{ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÜ
³ Fonction GetStrTimeInPrg Û
ÀÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÛ
Portabilit‚: Local
Description
ÍÍÍÍÍÍÍÍÍÍÍ
Cette fonction permet d'afficher une chaŒne de caractŠres repr‚sentant
le temps depuis lequel l'application en marche.
}
Function GetStrTimeInPrg:String;
Var
Hour,Min,Sec:Word;
Time:LongInt;
Begin
Time:=GetRawTimer-TimeIn;
If Time<>0Then Begin
Hour:=Time div 360;
Min:=Word(Time div 60)mod 60;
Sec:=Time mod 60;
End
Else
Begin
Hour:=0;
Min:=0;
Sec:=0;
End;
GetStrTimeInPrg:=CStrTimeDos(Hour,Min,Sec)
End;
{ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÜ
³ Proc‚dure PutIcn Û
ÀÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÛ
Portabilit‚: Local
Description
ÍÍÍÍÍÍÍÍÍÍÍ
Cette proc‚dure permet d'afficher un Icon de format Malte Genesis III/
Isabel … l'‚cran.
}
Procedure PutIcn(X,Y:Word;Var Buf);Near;
Var
J:Word;
Begin
For J:=0to 31do Begin
ClrLnHorImg(X,Y+J,32,8,Buf);
ASM ADD Word Ptr Buf,32;END;
End;
End;
Function WEMouseInZone(Var Q:Window;X,Y,L,H:Byte):Boolean;
Var
R:TextCharRec;
Begin
ASM
LES DI,Q
CALL AsmWEGetR
MOV BL,X
MOV BH,Y
ADD AX,BX
MOV R,AX
END;
WEMouseInZone:=(LastMouseY>=R.Y)and(LastMouseY<R.Y+H)and(LastMouseX>=R.X)and(LastMouseX<R.X+L);
End;
{Function WEInZonePtrMouse(Var Q:Wins;X,Y,L,H:Byte):Bool;Near;Var XT,YT,RX1,RY1:Byte;BT:Word;Begin
If(IsShowMouse)Then Begin
__GetMouseTextSwitch(XT,YT,BT);
RX1:=WEGetRX1(Q)+X;RY1:=WEGetRY1(Q)+Y;
WEInZonePtrMouse:=(YT>=RY1-1)and(YT<=RY1+H-1)and
(XT+1>=RX1)and(XT<=RX1+L);
End
Else
WEInZonePtrMouse:=No;
End;}
Function WEInZonePtrMouse(Var Q:Window;X,Y,L,H:Byte):Boolean;
Var
T,R:TextCharRec;
BT:Word;
Begin
If(IsShowMouse)Then Begin
__GetMouseTextSwitchZ(T,BT);
ASM
LES DI,Q
CALL AsmWEGetR
MOV BL,X
MOV BH,Y
ADD AX,BX
MOV R,AX
END;
WEInZonePtrMouse:=(T.Y>=R.Y-1)and(T.Y<=R.Y+H-1)and(T.X+1>=R.X)and(T.X<=R.X+L);
End
Else
WEInZonePtrMouse:=False;
End;
{ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÜ
³ Proc‚dure PutTapis Û
ÀÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÛ
Portabilit‚: Local
Description
ÍÍÍÍÍÍÍÍÍÍÍ
Cette proc‚dure affiche une tapiserie de fond en mode texte pour permettre
de ne pas voir directement le fond de l'‚cran. Il s'adapte en fonction des
polices de caractŠres supporter par les cartes vid‚o ou non.
}
{$IFNDEF __Windows__}
{$I \Source\Chantal\Library\System\Malte\Presenta.tio\PutTapis.Inc}
{$ENDIF}
{ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ·}
{³ Z o n e P u b l i q u e º}
{ÔÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ}
{ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÜ
³ Proc‚dure AppInit Û
ÀÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÛ
Portabilit‚: Global
Description
ÍÍÍÍÍÍÍÍÍÍÍ
Cette proc‚dure affiche l'interface de d‚veloppement utilisateur classique
d'une application de traitement de donn‚e tel le ®MonsterBook¯ ou le ®Basic
Pro¯.
}
Procedure AppInit{Const Title:String;Kr,Mtx:Byte};Begin
_InitEnv(Mtx);
InitDials;
CurrKrs.Desktop.Tapiserie:=Color;
{$IFNDEF __Windows__}
If(IsGrf)Then LoadWallPaper(True)
Else PutTapis(0,MaxYTxts,Color);
BarSpcHor(0,0,MaxXTxts,CurrKrs.LastBar.Normal);
PutCloseIcon(0,0,$F);
ConMacro('TO'#0+Chr(CurrKrs.LastBar.Normal)+Title+'$');
BarSpcHor(0,MaxYTxts,MaxXTxts,CurrKrs.Menu.Normal);
{$ENDIF}
PMPutMnuBar;
End;
Procedure BPInit(Var Q:BarProgress;X,Y:Byte;Var W:Window);Begin
FillClr(Q,SizeOf(Q));
Q.W:=@W;
Q.X:=X;Q.Y:=Y;
W.CurrColor:=$1F;
WEBarSpcHorShade(W,X,Y,wnMax);
WESetKrBorder(W);
End;
Procedure BPProgress(Var Q:BarProgress;Pour:Byte);Begin
WESetPos(Q.W^,Q.X,Q.Y);
Q.W^.CurrColor:=$F0;
WEBarSelHor(Q.W^,Q.X,Q.Y,(Pour*(Q.W^.MaxX-1))div 100);
WEPutOTxtU(Q.W^,WordToStr(Pour)+'%');
WESetKrBorder(Q.W^);
End;
{ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÜ
³ Proc‚dure ConMacro Û
ÀÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÛ
Portabilit‚: Global
Description
ÍÍÍÍÍÍÍÍÍÍÍ
Cette proc‚dure permet d'afficher des donn‚es en utilisant le protocole
de la console de format ®Malte¯.
}
Procedure ConMacro{Const S:String};
Var
W:Window;
Begin
WEInit(W,0,0,wnMax,wnMax);{ Initialise pour l'utilisation de l'‚cran au complet...}
WEConMacro(W,S) { Utilise celle existant d‚ja pour les fenˆtres de dialogues!}
End;
{ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÜ
³ Fonction DialogMsgOk Û
ÀÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÛ
Portabilit‚: Global
Description
ÍÍÍÍÍÍÍÍÍÍÍ
Cette fonction affiche le message sp‚cifi‚ avec une fenˆtre d'environnement
ordinaire et retourne la d‚cision de l'utilisateur en fonction des touches
sp‚cifi‚es ou de la souris.
Voir ‚galement
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ Fonction ³ Courte description ³
ÆÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͵
³ ErrMsg ³ BoŒte de dialogue d'erreur ³
³ ErrMsgOk ³ BoŒte de dialogue d'erreur avec bouton ®Correcte¯ ³
³ WarningMsg ³ BoŒte de dailogue d'attention ³
³ WarningMsgOk ³ BoŒte de dialogue d'attention avec bouton ®Correcte¯ ³
³ WarningMsgYesNo ³ BoŒte de dailogue d'attention avec bouton ®Oui¯ & ®Non¯³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
}
Procedure DialogMsgOk{Const Msg:String};Begin
_LoadSound(StrPas(SoundPlay[sndInfo]));
_PlayWave;
InputMsg('Remarque',Msg,KeyOk,0,CurrKrs.RemWin)
End;
{ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÜ
³ Fonction ErrMsg Û
ÀÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÛ
Portabilit‚: Global
Description
ÍÍÍÍÍÍÍÍÍÍÍ
Cette fonction affiche le message sp‚cifi‚ avec une fenˆtre d'environnement
d'erreur et retourne la d‚cision de l'utilisateur en fonction des touches
sp‚cifi‚es ou de la souris.
Voir ‚galement
ÍÍÍÍÍÍÍÍÍÍÍÍÍÍ
ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ Fonction ³ Courte description ³
ÆÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍØÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ͵
³ DialogMsgOk ³ BoŒte de dialogue ordinaire avec bouton ®Correcte¯ ³
³ ErrMsgOk ³ BoŒte de dialogue d'erreur avec bouton ®Correcte¯ ³
³ WarningMsg ³ BoŒte de dailogue d'attention ³
³ WarningMsgOk ³ BoŒte de dialogue d'attention avec bouton ®Correcte¯ ³
³ WarningMsgYesNo ³ BoŒte de dailogue d'attention avec bouton ®Oui¯ & ®Non¯³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
}
Function ErrMsg{Const Msg:String;Key:Word):Word};Begin
_LoadWave(StrPas(SoundPlay[sndError]));
_PlayWave;
ErrMsg:=InputMsg('Erreur',Msg,Key,wfSquare+wiDead,CurrKrs.ErrorWin.Window)
End;
{ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÜ
³ Proc‚dure ErrMsgOk Û
ÀÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÛ
Portabilit‚: Global
Description
ÍÍÍÍÍÍÍÍÍÍÍ
Cette proc‚dure affiche le message sp‚cifi‚ avec une fenˆtre d'environnement
d'erreur avec une touche 'Correcte' en bas de la fenˆtre.
}
Procedure ErrMsgOk{Const Msg:String};Begin
ErrMsg(Msg,KeyOk)
End;
{ Cette proc‚dure retourne le message d'erreur correspondant au code
de la base de donn‚es dans une boŒte de dialogue avec un bouton
'Correcte'.
}
Procedure ErrNoMsgOk{Error:Word};Begin
ErrMsgOk(GetErrMsg(Error));
End;
{ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÜ
³ Fonction GetDosErrMsg Û
ÀÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÛ
Portabilit‚: Global
Description
ÍÍÍÍÍÍÍÍÍÍÍ
Cette fonction retourne une chaŒne de caractŠres correspondant au code
d'erreur envoyer en paramŠtre.
}
Function GetErrMsg{X:Word):String};Begin
GetErrMsg:=SelectField('CHANTAL:/Systeme/Erreur.Dat',X,1);
End;
{ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÜ
³ Proc‚dure InitDials Û
ÀÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÛ
Portabilit‚: Global
Description
ÍÍÍÍÍÍÍÍÍÍÍ
Cette proc‚dure initialise les services d'horlogerie et d'application
externe (si autoris‚ par le directive condition ®Int8Dh¯).
Remarque
ÍÍÍÍÍÍÍÍ
þ L'interruption 8Dh est interruption de service s'occupant de la gestion
des autres applications … celle-ci en cours...
}
Procedure InitDials;Begin
_InitKbd:=InitKbd;
TimeIn:=DivLong(GetRawTimer*10,182);
Old:=GetRawTimerB;
OldBackKbd:=_BackKbd;
_BackKbd:=BackTimer;
End;
{ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÜ
³ Proc‚dure InitEnv Û
ÀÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÛ
Portabilit‚: Global
Description
ÍÍÍÍÍÍÍÍÍÍÍ
Cette proc‚dure permet de charger une palette de couleur d'application
de style ®Bleuet¯.
}
Procedure InitEnv;Begin
_InitEnv(MtxBleuet)
End;
{ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÜ
³ Proc‚dure PutGrfIcon Û
ÀÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÛ
Portabilit‚: Global
Description
ÍÍÍÍÍÍÍÍÍÍÍ
Cette proc‚dure permet l'affichage d'un Icon … partir d'un fichier
d‚j… existant sur le disque.
}
Procedure PutGrfIcon{Const Path:String;X,Y:Byte;P:Word};
Var
Q:BlockButton;
Begin
If(IsGraf)Then Begin
GetFile(Path,P,SizeOf(Q),Q);
PutIcn(X shl 3,GetRawY(Y),Q.Data)
End
End;
{ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÜ
³ Proc‚dure SetPosDate Û
ÀÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÛ
Portabilit‚: Global
Description
ÍÍÍÍÍÍÍÍÍÍÍ
Cette proc‚dure fixe la position d'affichage en texte (X,Y) du pointeur de
date … l'‚cran. Elle est profite pour initialiser les donn‚es la con‡ernant
pour ‚viter d'‚crire 15 proc‚dures frisant la redondance...
}
Procedure SetPosDate{X,Y:Byte};Assembler;ASM
MOV AL,X
MOV AH,Y
MOV DateX.Word,AX
XOR AX,AX
MOV OldYear,AX
{$IFDEF DosUnit}
MOV OldMonth,AX
MOV OldDay,AX
MOV OldDayOfWeek,AX
{$ELSE}
MOV OldMonth,AL
MOV OldDay,AL
MOV OldDayOfWeek,AL
{$ENDIF}
END;
{ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÜ
³ Proc‚dure SetPosTime Û
ÀÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÛ
Portabilit‚: Global
Description
ÍÍÍÍÍÍÍÍÍÍÍ
Cette proc‚dure fixe la position du pointeur de l'heure sous le format
texte (X,Y). Il ne provoque pas son affichage imm‚diat, c'est la proc‚dure
d'arriŠre plan enclanch‚ par ®InitDials¯ s'occupant de cela.
}
Procedure SetPosTime{X,Y:Byte};Assembler;ASM
MOV AL,X
MOV AH,Y
MOV Word Ptr TimeX,AX
END;
{ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÜ
³ Proc‚dure SetPosTimeAfterEndOfDay Û
ÀÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÛ
Portabilit‚: Global
Description
ÍÍÍÍÍÍÍÍÍÍÍ
Cette proc‚dure fixe la position du pointeur de l'heure restant avant
minuit sous le format texte (X,Y). Il ne provoque pas son affichage
imm‚diat, c'est la proc‚dure d'arriŠre plan enclanch‚ par ®InitDials¯
s'occupant de cela.
}
Procedure SetPosTimeAfterEndOfDay{X,Y:Byte};Assembler;ASM
MOV AL,X
MOV AH,Y
MOV Word Ptr TimeXA,AX
END;
{ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÜ
³ Proc‚dure SetPosTimeInPrg Û
ÀÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÛ
Portabilit‚: Global
Description
ÍÍÍÍÍÍÍÍÍÍÍ
Cette proc‚dure fixe la position du pointeur de l'heure depuis laquel
l'application tourne sous le format texte (X,Y). Il ne provoque pas
son affichage imm‚diat, c'est la proc‚dure d'arriŠre plan enclanch‚ par
®InitDials¯ s'occupant de cela.
}
Procedure SetPosTimeInPrg{X,Y:Byte};Assembler;ASM
MOV AL,X
MOV AH,Y
MOV Word Ptr TimeXIn,AX
END;
{ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÜ
³ Proc‚dure SetPosTimeMod Û
ÀÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÛ
Portabilit‚: Global
Description
ÍÍÍÍÍÍÍÍÍÍÍ