-
Notifications
You must be signed in to change notification settings - Fork 227
/
enums.go
2333 lines (1891 loc) · 34.4 KB
/
enums.go
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
//----------------------------------------
//
// Copyright © ying32. All Rights Reserved.
//
// Licensed under Apache License 2.0
//
//----------------------------------------
package types
/*
注意:Free Pascal中所有集合这里全部使用TSet(uint32)表示,也就是说最多32个元素
*/
//ENUM:
type TAlign int32
const (
AlNone = iota + 0
AlTop
AlBottom
AlLeft
AlRight
AlClient
AlCustom
)
//SET:TAlign
type TAlignSet = TSet
//ENUM:
type TBorderStyle int32
const (
BsNone = iota + 0
BsSingle
BsSizeable
BsDialog
BsToolWindow
BsSizeToolWin
)
type TFormBorderStyle TBorderStyle
//ENUM:
type TFormStyle int32
const (
FsNormal = iota + 0
FsMDIChild
FsMDIForm
FsStayOnTop
FsSplash
FsSystemStayOnTop
)
//ENUM:
type TPosition int32
const (
PoDesigned = iota + 0 // use bounds from the designer (read from stream)
PoDefault // LCL decision (normally window manager decides)
PoDefaultPosOnly // designed size and LCL position
PoDefaultSizeOnly // designed position and LCL size
PoScreenCenter // center form on screen (depends on DefaultMonitor)
PoDesktopCenter // center form on desktop (total of all screens)
PoMainFormCenter // center form on main form (depends on DefaultMonitor)
PoOwnerFormCenter // center form on owner form (depends on DefaultMonitor)
PoWorkAreaCenter // center form on working area (depends on DefaultMonitor)
)
// 相关常量见 vcl/types/cussors.go
// TCursor = -32768..32767;
type TCursor int16
//ENUM:
type TSeekOrigin int32
const (
SoBeginning = iota + 0
SoCurrent
SoEnd
)
//ENUM:
type TPixelFormat int32
const (
PfDevice = iota + 0
Pf1bit
Pf4bit
Pf8bit
Pf15bit
Pf16bit
Pf24bit
Pf32bit
PfCustom
)
//ENUM:
type TAlignment int32
const (
TaLeftJustify = iota + 0
TaRightJustify
TaCenter
)
// TLeftRight = TAlignment.taLeftJustify..TAlignment.taRightJustify;
type TLeftRight int32
//ENUM:
type TBiDiMode int32
const (
BdLeftToRight = iota + 0
BdRightToLeft
BdRightToLeftNoAlign
BdRightToLeftReadingOnly
)
//ENUM:
type TVerticalAlignment int32
const (
TaAlignTop = iota + 0
TaAlignBottom
TaVerticalCenter
)
//ENUM:
type TComboBoxStyle int32
const (
CsDropDown = iota + 0 // like an TEdit plus a button to drop down the list, default
CsSimple // like an TEdit plus a TListBox
CsDropDownList // like TLabel plus a button to drop down the list
CsOwnerDrawFixed // like csDropDownList, but custom drawn
CsOwnerDrawVariable // like csDropDownList, but custom drawn and with each item can have another height
CsOwnerDrawEditableFixed // like csOwnerDrawFixed, but with TEdit
CsOwnerDrawEditableVariable // like csOwnerDrawVariable, but with TEdit
)
type TColorBoxStyle = TComboBoxStyle
//ENUM:
type TWindowState int32
const (
WsNormal = iota + 0
WsMinimized
WsMaximized
WsFullScreen
)
//ENUM:
type TTextLayout int32
const (
TlTop = iota + 0
TlCenter
TlBottom
)
//ENUM:
type TEllipsisPosition int32
const (
EpNone = iota + 0
EpPathEllipsis
EpEndEllipsis
EpWordEllipsis
)
type TLinkAlignment TAlignment
//ENUM:
type TListBoxStyle int32
const (
LbStandard = iota + 0
LbOwnerDrawFixed
LbOwnerDrawVariable
LbVirtual
//LbVirtualOwnerDraw
)
//ENUM:
type TPopupAlignment int32
const (
PaLeft = iota + 0
PaRight
PaCenter
)
//ENUM:
type TTrackButton int32
const (
TbRightButton = iota + 0
TbLeftButton
)
//ENUM:
type TProgressBarOrientation int32
const (
PbHorizontal = iota + 0
PbVertical
PbRightToLeft
PbTopDown
)
//ENUM:
type TProgressBarStyle int32
const (
PbstNormal = iota + 0
PbstMarquee
)
//ENUM:
type TProgressBarState int32
const (
PbsNormal = iota + 0
PbsError
PbsPaused
)
//ENUM:
type TButtonLayout int32
const (
BlGlyphLeft = iota + 0
BlGlyphRight
BlGlyphTop
BlGlyphBottom
)
//ENUM:
type TButtonState int32
const (
BsUp = iota + 0 // button is up
BsDisabled // button disabled (grayed)
BsDown // button is down
BsExclusive // button is the only down in his group
BsHot // button is under mouse
)
//ENUM:
type TButtonStyle int32
const (
BsAutoDetect = iota + 0
BsWin31
BsNew
)
// TNumGlyphs = 1..4;
type TNumGlyphs int32
//ENUM:
type TStaticBorderStyle int32
const (
SbsNone = iota + 0
SbsSingle
SbsSunken
)
//ENUM:
type TFontStyle int32
const (
FsBold = iota + 0
FsItalic
FsUnderline
FsStrikeOut
)
//SET:TFontStyle
type TFontStyles = TSet
//ENUM:
type TScrollStyle int32
const (
SsNone = iota + 0
SsHorizontal
SsVertical
SsBoth
SsAutoHorizontal
SsAutoVertical
SsAutoBoth
)
//ENUM:
type TSortType int32
const (
StNone = iota + 0
StData
StText
StBoth
)
//ENUM:
type TListArrangement int32
const (
ArAlignBottom = iota + 0
ArAlignLeft
ArAlignRight
ArAlignTop
ArDefault
ArSnapToGrid
)
//ENUM:
type TViewStyle int32
const (
VsIcon = iota + 0
VsSmallIcon
VsList
VsReport
)
//ENUM:
type TItemState int32
const (
IsNone = iota + 0
IsCut
IsDropHilited
IsFocused
IsSelected
IsActivating
)
//SET:TItemState
type TItemStates = TSet
//ENUM:
type TItemChange int32
const (
CtText = iota + 0
CtImage
CtState
)
//ENUM:
type TItemFind int32
const (
IfData = iota + 0
IfPartialString
IfExactString
IfNearest
)
//ENUM:
type TSearchDirection int32
const (
SdLeft = iota + 0
SdRight
SdAbove
SdBelow
SdAll
)
//ENUM:
type TListHotTrackStyle int32
const (
HtHandPoint = iota + 0
HtUnderlineCold
HtUnderlineHot
)
//SET:TListHotTrackStyle
type TListHotTrackStyles = TSet
//ENUM:
type TItemRequests int32
const (
IrText = iota + 0
IrImage
IrParam
IrState
IrIndent
)
//ENUM:
type TBrushStyle int32
const (
BsSolid = iota + 0
BsClear
BsHorizontal
BsVertical
BsFDiagonal
BsBDiagonal
BsCross
BsDiagCross
BsImage
BsPattern
)
//ENUM:
type TPenStyle int32
const (
PsSolid = iota + 0
PsDash
PsDot
PsDashDot
PsDashDotDot
PsinsideFrame
PsPattern
PsClear
)
//ENUM:
type TUDBtnType int32
const (
BtNext = iota + 0
BtPrev
)
//ENUM:
type TTabPosition int32
const (
TpTop = iota + 0
TpBottom
TpLeft
TpRight
)
//ENUM:
type TTabStyle int32
const (
TsTabs = iota + 0
TsButtons
TsFlatButtons
)
//ENUM:
type TFontPitch int32
const (
FpDefault = iota + 0
FpVariable
FpFixed
)
//ENUM:
type TPenMode int32
const (
PmBlack = iota + 0
PmWhite
PmNop
PmNot
PmCopy
PmNotCopy
PmMergePenNot
PmMaskPenNot
PmMergeNotPen
PmMaskNotPen
PmMerge
PmNotMerge
PmMask
PmNotMask
PmXor
PmNotXor
)
//ENUM:
type TTrackBarOrientation int32
const (
TrHorizontal = iota + 0
TrVertical
)
//ENUM:
type TUDOrientation int32
const (
UdHorizontal = iota + 0
UdVertical
)
//ENUM:
type TFontQuality int32
const (
FqDefault = iota + 0
FqDraft
FqProof
FqNonAntialiased
FqAntialiased
FqClearType
FqClearTypeNatural
)
//ENUM:
type TCloseAction int32
const (
CaNone = iota + 0
CaHide
CaFree
CaMinimize
)
//ENUM:
type TBalloonFlags int32
const (
BfNone = iota + 0
BfInfo
BfWarning
BfError
)
//ENUM:
type TMsgDlgType int32
const (
MtWarning = iota + 0
MtError
MtInformation
MtConfirmation
MtCustom
)
//ENUM:
type TMsgDlgBtn int32
const (
MbYes = iota + 0
MbNo
MbOK
MbCancel
MbAbort
MbRetry
MbIgnore
MbAll
MbNoToAll
MbYesToAll
MbHelp
MbClose
)
//SET:TMsgDlgBtn
type TMsgDlgButtons = TSet
//ENUM:
type TSysLinkType int32
const (
SltURL = iota + 0
SltID
)
//ENUM:
type TStatusPanelStyle int32
const (
PsText = iota + 0
PsOwnerDraw
)
//ENUM:
type TJPEGPerformance int32
const (
JpBestQuality = iota + 0
JpBestSpeed
)
type TJPEGPixelFormat = TPixelFormat
//const (
// Jf24Bit = iota + 0
// Jf8Bit
//)
type TShortCut uint16
//ENUM:
type TNodeState int32
const (
NsCut = iota + 0 // = Node.Cut
NsDropHilite // = Node.DropTarget
NsFocused // = Node.Focused
NsSelected // = Node.Selected
NsMultiSelected // = Node.MultiSelected
NsExpanded // = Node.Expanded
NsHasChildren // = Node.HasChildren
NsDeleting // = Node.Deleting, set on Destroy
NsVisible // = Node.Visible
NsBound // bound to a tree, e.g. has Parent or is top lvl node
)
//ENUM:
type TNodeAttachMode int32
const (
NaAdd = iota + 0 // add as last sibling of Destination
NaAddFirst // add as first sibling of Destination
NaAddChild // add as last child of Destination
NaAddChildFirst // add as first child of Destination
NaInsert // insert in front of Destination
NaInsertBehind // insert behind Destination
)
//ENUM:
type TAddMode int32
const (
TaAddFirst = iota + 0
TaAdd
TaInsert
)
//ENUM:
type TMultiSelectStyles int32
const (
MsControlSelect = iota + 0
MsShiftSelect
MsVisibleOnly
MsSiblingOnly
)
//SET:TMultiSelectStyles
type TMultiSelectStyle = TSet
//ENUM:
type TActionListState int32
const (
AsNormal = iota + 0
AsSuspended
AsSuspendedEnabled
)
//ENUM:
type TGradientDirection int32
const (
GdHorizontal = iota + 0
GdVertical
)
//ENUM:
type TDrawingStyle int32
const (
DSFocus = iota + 0
DSSelected
DSNormal
DSTransparent
)
//ENUM:
type TImageType int32
const (
ItImage = iota + 0
ItMask
)
//ENUM:
type TResType int32
const (
RtBitmap = iota + 0
RtCursor
RtIcon
)
//ENUM:
type TLoadResource int32
const (
LrDefaultColor = iota + 0
LrDefaultSize
LrFromFile
LrMap3DColors
LrTransparent
LrMonoChrome
)
//SET:TLoadResource
type TLoadResources = TSet
//ENUM:
type TColorDepth int32
const (
CdDefault = iota + 0
CdDeviceDependent
Cd4Bit
Cd8Bit
Cd16Bit
Cd24Bit
Cd32Bit
)
//ENUM:
type TCheckBoxState int32
const (
CbUnchecked = iota + 0
CbChecked
CbGrayed
)
//ENUM:
type TToolButtonStyle int32
const (
TbsButton = iota + 0 // button (can be clicked)
TbsCheck // check item (click to toggle state, can be grouped)
TbsDropDown // button with dropdown button to show a popup menu
TbsSeparator // space holder
TbsDivider // space holder with line
TbsButtonDrop // button with arrow (not separated from each other)
)
//ENUM:
type TTBGradientDrawingOption int32
const (
GdoHotTrack = iota + 0
GdoGradient
)
//SET:TTBGradientDrawingOption
type TTBGradientDrawingOptions = TSet
//ENUM:
type TColorDialogOption int32
const (
CdFullOpen = iota + 0
CdPreventFullOpen
CdShowHelp
CdSolidColor
CdAnyColor
)
//SET:TColorDialogOption
type TColorDialogOptions = TSet
//ENUM:
type TBorderIcon int32
const (
BiSystemMenu = iota + 0
BiMinimize
BiMaximize
BiHelp
)
//SET:TBorderIcon
type TBorderIcons = TSet
//ENUM:
type TFontDialogOption int32
const (
FdAnsiOnly = iota + 0
FdTrueTypeOnly
FdEffects
FdFixedPitchOnly
FdForceFontExist
FdNoFaceSel
FdNoOEMFonts
FdNoSimulations
FdNoSizeSel
FdNoStyleSel
FdNoVectorFonts
FdShowHelp
FdWysiwyg
FdLimitSize
FdScalableOnly
FdApplyButton
)
//SET:TFontDialogOption
type TFontDialogOptions = TSet
//ENUM:
type TOpenOption int32
const (
OfReadOnly = iota + 0
OfOverwritePrompt // if selected file exists shows a message, that file
// will be overwritten
OfHideReadOnly // hide read only file
OfNoChangeDir // do not change current directory
OfShowHelp // show a help button
OfNoValidate
OfAllowMultiSelect // allow multiselection
OfExtensionDifferent
OfPathMustExist // shows an error message if selected path does not exist
OfFileMustExist // shows an error message if selected file does not exist
OfCreatePrompt
OfShareAware
OfNoReadOnlyReturn // do not return filenames that are readonly
OfNoTestFileCreate
OfNoNetworkButton
OfNoLongNames
OfOldStyleDialog
OfNoDereferenceLinks // do not resolve links while dialog is shown (only on Windows, see OFN_NODEREFERENCELINKS)
OfNoResolveLinks // do not resolve links after Execute
OfEnableIncludeNotify
OfEnableSizing // dialog can be resized, e.g. via the mouse
OfDontAddToRecent // do not add the path to the history list
OfForceShowHidden // show hidden files
OfViewDetail // details are OS and interface dependent
OfAutoPreview // details are OS and interface dependent
)
//SET:TOpenOption
type TOpenOptions = TSet
//ENUM:
type TOpenOptionEx int32
const (
OfExNoPlacesBar = iota + 0
)
//SET:TOpenOptionEx
type TOpenOptionsEx = TSet
//ENUM:
type TPrintRange int32
const (
PrAllPages = iota + 0
PrSelection
PrPageNums
PrCurrentPage
)
//ENUM:
type TPrintDialogOption int32
const (
PoPrintToFile = iota + 0
PoPageNums
PoSelection
PoWarning
PoHelp
PoDisablePrintToFile
PoBeforeBeginDoc
)
//SET:TPrintDialogOption
type TPrintDialogOptions = TSet
//ENUM:
type TPageSetupDialogOption int32
const (
PsoDefaultMinMargins = iota + 0
PsoDisableMargins
PsoDisableOrientation
PsoDisablePagePainting
PsoDisablePaper
PsoDisablePrinter
PsoMargins
PsoMinMargins
PsoShowHelp
PsoWarning
PsoNoNetworkButton
)
//SET:TPageSetupDialogOption
type TPageSetupDialogOptions = TSet
//ENUM:
type TPrinterKind int32
const (
PkDotMatrix = iota + 0
PkHPPCL
)
//ENUM:
type TPageType int32
const (
PtEnvelope = iota + 0
PtPaper
)
//ENUM:
type TPageMeasureUnits int32
const (
PmDefault = iota + 0
PmMillimeters
PmInches
)
//ENUM:
type TStringsOption int32
const (
SoStrictDelimiter = iota + 0
SoWriteBOM
SoTrailingLineBreak
SoUseLocale
)
//SET:TStringsOption
type TStringsOptions = TSet
//ENUM:
type TShiftStateEnum int32
const (
SsShift = iota + 0
SsAlt
SsCtrl
SsLeft
SsRight
SsMiddle
SsDouble
// Extra additions
SsMeta
SsSuper
SsHyper
SsAltGr
SsCaps
SsNum
SsScroll
SsTriple
SsQuad
SsExtra1
SsExtra2
)
//SET:TShiftStateEnum
type TShiftState = TSet
//ENUM:
type TMouseButton int32
const (
MbLeft = iota + 0
MbRight
MbMiddle
MbExtra1
MbExtra2
)
//ENUM:
type TFillStyle int32
const (
FsSurface = iota + 0
FsBorder
)
//ENUM:
type TFillMode int32
const (
FmAlternate = iota + 0
FmWinding
)
//ENUM:
type TCanvasStates int32
const (
CsHandleValid = iota + 0
CsFontValid
CsPenValid
CsBrushValid