-
Notifications
You must be signed in to change notification settings - Fork 0
/
aspose_cells_drawing_activexcontrols.go
7113 lines (6457 loc) · 218 KB
/
aspose_cells_drawing_activexcontrols.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
// +build windows
// Copyright (c) 2001-2024 Aspose Pty Ltd. All Rights Reserved.
// Powered by Aspose.Cells.
package asposecells
// #cgo CXXFLAGS: -std=c++11
// #cgo CFLAGS: -I.
// #cgo LDFLAGS: -Wl,-rpath,"${SRCDIR}/lib/win_x86_64" -L"${SRCDIR}/lib/win_x86_64" -lAspose.Cells.CWrapper
// #include <AsposeCellsCWrapper.h>
import "C"
import (
"fmt"
"errors"
"runtime"
"unsafe"
)
/**************Enum ActiveXPersistenceType *****************/
// Represents the persistence method to persist an ActiveX control.
type ActiveXPersistenceType int32
const(
// The data is stored as xml data.
ActiveXPersistenceType_PropertyBag ActiveXPersistenceType = 0
// The data is stored as a storage binary data.
ActiveXPersistenceType_Storage ActiveXPersistenceType = 1
// The data is stored as a stream binary data.
ActiveXPersistenceType_Stream ActiveXPersistenceType = 2
// The data is stored as a streaminit binary data.
ActiveXPersistenceType_StreamInit ActiveXPersistenceType = 3
)
func Int32ToActiveXPersistenceType(value int32)(ActiveXPersistenceType ,error){
switch value {
case 0: return ActiveXPersistenceType_PropertyBag, nil
case 1: return ActiveXPersistenceType_Storage, nil
case 2: return ActiveXPersistenceType_Stream, nil
case 3: return ActiveXPersistenceType_StreamInit, nil
default:
return 0 ,fmt.Errorf("invalid ActiveXPersistenceType value: %d", value)
}
}
/**************Enum ControlBorderType *****************/
// Represents the border type of the ActiveX control.
type ControlBorderType int32
const(
// No border.
ControlBorderType_None ControlBorderType = 0
// The single line.
ControlBorderType_Single ControlBorderType = 1
)
func Int32ToControlBorderType(value int32)(ControlBorderType ,error){
switch value {
case 0: return ControlBorderType_None, nil
case 1: return ControlBorderType_Single, nil
default:
return 0 ,fmt.Errorf("invalid ControlBorderType value: %d", value)
}
}
/**************Enum ControlCaptionAlignmentType *****************/
// Represents the position of the Caption relative to the control.
type ControlCaptionAlignmentType int32
const(
// The left of the control.
ControlCaptionAlignmentType_Left ControlCaptionAlignmentType = 0
// The right of the control.
ControlCaptionAlignmentType_Right ControlCaptionAlignmentType = 1
)
func Int32ToControlCaptionAlignmentType(value int32)(ControlCaptionAlignmentType ,error){
switch value {
case 0: return ControlCaptionAlignmentType_Left, nil
case 1: return ControlCaptionAlignmentType_Right, nil
default:
return 0 ,fmt.Errorf("invalid ControlCaptionAlignmentType value: %d", value)
}
}
/**************Enum ControlListStyle *****************/
// Represents the visual appearance of the list in a ListBox or ComboBox.
type ControlListStyle int32
const(
// Displays a list in which the background of an item is highlighted when it is selected.
ControlListStyle_Plain ControlListStyle = 0
// Displays a list in which an option button or a checkbox next to each entry displays the selection state of that item.
ControlListStyle_Option ControlListStyle = 1
)
func Int32ToControlListStyle(value int32)(ControlListStyle ,error){
switch value {
case 0: return ControlListStyle_Plain, nil
case 1: return ControlListStyle_Option, nil
default:
return 0 ,fmt.Errorf("invalid ControlListStyle value: %d", value)
}
}
/**************Enum ControlMatchEntryType *****************/
// Represents how a ListBox or ComboBox searches its list as the user types.
type ControlMatchEntryType int32
const(
// The control searches for the next entry that starts with the character entered.
// Repeatedly typing the same letter cycles through all entries beginning with that letter.
ControlMatchEntryType_FirstLetter ControlMatchEntryType = 0
// As each character is typed, the control searches for an entry matching all characters entered.
ControlMatchEntryType_Complete ControlMatchEntryType = 1
// The list will not be searched when characters are typed.
ControlMatchEntryType_None ControlMatchEntryType = 2
)
func Int32ToControlMatchEntryType(value int32)(ControlMatchEntryType ,error){
switch value {
case 0: return ControlMatchEntryType_FirstLetter, nil
case 1: return ControlMatchEntryType_Complete, nil
case 2: return ControlMatchEntryType_None, nil
default:
return 0 ,fmt.Errorf("invalid ControlMatchEntryType value: %d", value)
}
}
/**************Enum ControlMousePointerType *****************/
// Represents the type of icon displayed as the mouse pointer for the control.
type ControlMousePointerType int32
const(
// Standard pointer.
ControlMousePointerType_Default ControlMousePointerType = 0
// Arrow.
ControlMousePointerType_Arrow ControlMousePointerType = 1
// Cross-hair pointer.
ControlMousePointerType_Cross ControlMousePointerType = 2
// I-beam.
ControlMousePointerType_IBeam ControlMousePointerType = 3
// Double arrow pointing northeast and southwest.
ControlMousePointerType_SizeNESW ControlMousePointerType = 6
// Double arrow pointing north and south.
ControlMousePointerType_SizeNS ControlMousePointerType = 7
// Double arrow pointing northwest and southeast.
ControlMousePointerType_SizeNWSE ControlMousePointerType = 8
// Double arrow pointing west and east.
ControlMousePointerType_SizeWE ControlMousePointerType = 9
// Up arrow.
ControlMousePointerType_UpArrow ControlMousePointerType = 10
// Hourglass.
ControlMousePointerType_HourGlass ControlMousePointerType = 11
// "Not” symbol (circle with a diagonal line) on top of the object being dragged.
ControlMousePointerType_NoDrop ControlMousePointerType = 12
// Arrow with an hourglass.
ControlMousePointerType_AppStarting ControlMousePointerType = 13
// Arrow with a question mark.
ControlMousePointerType_Help ControlMousePointerType = 14
// "Size-all” cursor (arrows pointing north, south, east, and west).
ControlMousePointerType_SizeAll ControlMousePointerType = 15
// Uses the icon specified by the MouseIcon property.
ControlMousePointerType_Custom ControlMousePointerType = 99
)
func Int32ToControlMousePointerType(value int32)(ControlMousePointerType ,error){
switch value {
case 0: return ControlMousePointerType_Default, nil
case 1: return ControlMousePointerType_Arrow, nil
case 2: return ControlMousePointerType_Cross, nil
case 3: return ControlMousePointerType_IBeam, nil
case 6: return ControlMousePointerType_SizeNESW, nil
case 7: return ControlMousePointerType_SizeNS, nil
case 8: return ControlMousePointerType_SizeNWSE, nil
case 9: return ControlMousePointerType_SizeWE, nil
case 10: return ControlMousePointerType_UpArrow, nil
case 11: return ControlMousePointerType_HourGlass, nil
case 12: return ControlMousePointerType_NoDrop, nil
case 13: return ControlMousePointerType_AppStarting, nil
case 14: return ControlMousePointerType_Help, nil
case 15: return ControlMousePointerType_SizeAll, nil
case 99: return ControlMousePointerType_Custom, nil
default:
return 0 ,fmt.Errorf("invalid ControlMousePointerType value: %d", value)
}
}
/**************Enum ControlPictureAlignmentType *****************/
// Represents the alignment of the picture inside the Form or Image.
type ControlPictureAlignmentType int32
const(
// The top left corner.
ControlPictureAlignmentType_TopLeft ControlPictureAlignmentType = 0
// The top right corner.
ControlPictureAlignmentType_TopRight ControlPictureAlignmentType = 1
// The center.
ControlPictureAlignmentType_Center ControlPictureAlignmentType = 2
// The bottom left corner.
ControlPictureAlignmentType_BottomLeft ControlPictureAlignmentType = 3
// The bottom right corner.
ControlPictureAlignmentType_BottomRight ControlPictureAlignmentType = 4
)
func Int32ToControlPictureAlignmentType(value int32)(ControlPictureAlignmentType ,error){
switch value {
case 0: return ControlPictureAlignmentType_TopLeft, nil
case 1: return ControlPictureAlignmentType_TopRight, nil
case 2: return ControlPictureAlignmentType_Center, nil
case 3: return ControlPictureAlignmentType_BottomLeft, nil
case 4: return ControlPictureAlignmentType_BottomRight, nil
default:
return 0 ,fmt.Errorf("invalid ControlPictureAlignmentType value: %d", value)
}
}
/**************Enum ControlPicturePositionType *****************/
// Represents the location of the control's picture relative to its caption.
type ControlPicturePositionType int32
const(
// The picture appears to the left of the caption.
// The caption is aligned with the top of the picture.
ControlPicturePositionType_LeftTop ControlPicturePositionType = 131072
// The picture appears to the left of the caption.
// The caption is centered relative to the picture.
ControlPicturePositionType_LeftCenter ControlPicturePositionType = 327683
// The picture appears to the left of the caption.
// The caption is aligned with the bottom of the picture.
ControlPicturePositionType_LeftBottom ControlPicturePositionType = 524294
// The picture appears to the right of the caption.
// The caption is aligned with the top of the picture.
ControlPicturePositionType_RightTop ControlPicturePositionType = 2
// The picture appears to the right of the caption.
// The caption is centered relative to the picture.
ControlPicturePositionType_RightCenter ControlPicturePositionType = 196613
// The picture appears to the right of the caption.
// The caption is aligned with the bottom of the picture.
ControlPicturePositionType_RightBottom ControlPicturePositionType = 393224
// The picture appears above the caption.
// The caption is aligned with the left edge of the picture.
ControlPicturePositionType_AboveLeft ControlPicturePositionType = 393216
// The picture appears above the caption.
// The caption is centered below the picture.
ControlPicturePositionType_AboveCenter ControlPicturePositionType = 458753
// The picture appears above the caption.
// The caption is aligned with the right edge of the picture.
ControlPicturePositionType_AboveRight ControlPicturePositionType = 524290
// The picture appears below the caption.
// The caption is aligned with the left edge of the picture.
ControlPicturePositionType_BelowLeft ControlPicturePositionType = 6
// The picture appears below the caption.
// The caption is centered above the picture.
ControlPicturePositionType_BelowCenter ControlPicturePositionType = 65543
// The picture appears below the caption.
// The caption is aligned with the right edge of the picture.
ControlPicturePositionType_BelowRight ControlPicturePositionType = 131080
// The picture appears in the center of the control.
// The caption is centered horizontally and vertically on top of the picture.
ControlPicturePositionType_Center ControlPicturePositionType = 262148
)
func Int32ToControlPicturePositionType(value int32)(ControlPicturePositionType ,error){
switch value {
case 131072: return ControlPicturePositionType_LeftTop, nil
case 327683: return ControlPicturePositionType_LeftCenter, nil
case 524294: return ControlPicturePositionType_LeftBottom, nil
case 2: return ControlPicturePositionType_RightTop, nil
case 196613: return ControlPicturePositionType_RightCenter, nil
case 393224: return ControlPicturePositionType_RightBottom, nil
case 393216: return ControlPicturePositionType_AboveLeft, nil
case 458753: return ControlPicturePositionType_AboveCenter, nil
case 524290: return ControlPicturePositionType_AboveRight, nil
case 6: return ControlPicturePositionType_BelowLeft, nil
case 65543: return ControlPicturePositionType_BelowCenter, nil
case 131080: return ControlPicturePositionType_BelowRight, nil
case 262148: return ControlPicturePositionType_Center, nil
default:
return 0 ,fmt.Errorf("invalid ControlPicturePositionType value: %d", value)
}
}
/**************Enum ControlPictureSizeMode *****************/
// Represents how to display the picture.
type ControlPictureSizeMode int32
const(
// Crops any part of the picture that is larger than the control's boundaries.
ControlPictureSizeMode_Clip ControlPictureSizeMode = 0
// Stretches the picture to fill the control's area.
// This setting distorts the picture in either the horizontal or vertical direction.
ControlPictureSizeMode_Stretch ControlPictureSizeMode = 1
// Enlarges the picture, but does not distort the picture in either the horizontal or vertical direction.
ControlPictureSizeMode_Zoom ControlPictureSizeMode = 3
)
func Int32ToControlPictureSizeMode(value int32)(ControlPictureSizeMode ,error){
switch value {
case 0: return ControlPictureSizeMode_Clip, nil
case 1: return ControlPictureSizeMode_Stretch, nil
case 3: return ControlPictureSizeMode_Zoom, nil
default:
return 0 ,fmt.Errorf("invalid ControlPictureSizeMode value: %d", value)
}
}
/**************Enum ControlScrollBarType *****************/
// Represents the type of scroll bar.
type ControlScrollBarType int32
const(
// Displays no scroll bars.
ControlScrollBarType_None ControlScrollBarType = 0
// Displays a horizontal scroll bar.
ControlScrollBarType_Horizontal ControlScrollBarType = 1
// Displays a vertical scroll bar.
ControlScrollBarType_BarsVertical ControlScrollBarType = 2
// Displays both a horizontal and a vertical scroll bar.
ControlScrollBarType_BarsBoth ControlScrollBarType = 3
)
func Int32ToControlScrollBarType(value int32)(ControlScrollBarType ,error){
switch value {
case 0: return ControlScrollBarType_None, nil
case 1: return ControlScrollBarType_Horizontal, nil
case 2: return ControlScrollBarType_BarsVertical, nil
case 3: return ControlScrollBarType_BarsBoth, nil
default:
return 0 ,fmt.Errorf("invalid ControlScrollBarType value: %d", value)
}
}
/**************Enum ControlScrollOrientation *****************/
// Represents type of scroll orientation
type ControlScrollOrientation int32
const(
// Control is rendered horizontally when the control's width is greater than its height.
// Control is rendered vertically otherwise.
ControlScrollOrientation_Auto ControlScrollOrientation = 3
// Control is rendered vertically.
ControlScrollOrientation_Vertical ControlScrollOrientation = 0
// Control is rendered horizontally.
ControlScrollOrientation_Horizontal ControlScrollOrientation = 1
)
func Int32ToControlScrollOrientation(value int32)(ControlScrollOrientation ,error){
switch value {
case 3: return ControlScrollOrientation_Auto, nil
case 0: return ControlScrollOrientation_Vertical, nil
case 1: return ControlScrollOrientation_Horizontal, nil
default:
return 0 ,fmt.Errorf("invalid ControlScrollOrientation value: %d", value)
}
}
/**************Enum ControlSpecialEffectType *****************/
// Represents the type of special effect.
type ControlSpecialEffectType int32
const(
// Flat
ControlSpecialEffectType_Flat ControlSpecialEffectType = 0
// Raised
ControlSpecialEffectType_Raised ControlSpecialEffectType = 1
// Sunken
ControlSpecialEffectType_Sunken ControlSpecialEffectType = 2
// Etched
ControlSpecialEffectType_Etched ControlSpecialEffectType = 3
// Bump
ControlSpecialEffectType_Bump ControlSpecialEffectType = 6
)
func Int32ToControlSpecialEffectType(value int32)(ControlSpecialEffectType ,error){
switch value {
case 0: return ControlSpecialEffectType_Flat, nil
case 1: return ControlSpecialEffectType_Raised, nil
case 2: return ControlSpecialEffectType_Sunken, nil
case 3: return ControlSpecialEffectType_Etched, nil
case 6: return ControlSpecialEffectType_Bump, nil
default:
return 0 ,fmt.Errorf("invalid ControlSpecialEffectType value: %d", value)
}
}
/**************Enum ControlType *****************/
// Represents all type of ActiveX control.
type ControlType int32
const(
// Button
ControlType_CommandButton ControlType = 0
// ComboBox
ControlType_ComboBox ControlType = 1
// CheckBox
ControlType_CheckBox ControlType = 2
// ListBox
ControlType_ListBox ControlType = 3
// TextBox
ControlType_TextBox ControlType = 4
// Spinner
ControlType_SpinButton ControlType = 5
// RadioButton
ControlType_RadioButton ControlType = 6
// Label
ControlType_Label ControlType = 7
// Image
ControlType_Image ControlType = 8
// ToggleButton
ControlType_ToggleButton ControlType = 9
// ScrollBar
ControlType_ScrollBar ControlType = 10
// ScrollBar
ControlType_BarCode ControlType = 11
// Unknown
ControlType_Unknown ControlType = 12
)
func Int32ToControlType(value int32)(ControlType ,error){
switch value {
case 0: return ControlType_CommandButton, nil
case 1: return ControlType_ComboBox, nil
case 2: return ControlType_CheckBox, nil
case 3: return ControlType_ListBox, nil
case 4: return ControlType_TextBox, nil
case 5: return ControlType_SpinButton, nil
case 6: return ControlType_RadioButton, nil
case 7: return ControlType_Label, nil
case 8: return ControlType_Image, nil
case 9: return ControlType_ToggleButton, nil
case 10: return ControlType_ScrollBar, nil
case 11: return ControlType_BarCode, nil
case 12: return ControlType_Unknown, nil
default:
return 0 ,fmt.Errorf("invalid ControlType value: %d", value)
}
}
/**************Enum DropButtonStyle *****************/
// Represents the symbol displayed on the drop button.
type DropButtonStyle int32
const(
// Displays a button with no symbol.
DropButtonStyle_Plain DropButtonStyle = 0
// Displays a button with a down arrow.
DropButtonStyle_Arrow DropButtonStyle = 1
// Displays a button with an ellipsis (...).
DropButtonStyle_Ellipsis DropButtonStyle = 2
// Displays a button with a horizontal line like an underscore character.
DropButtonStyle_Reduce DropButtonStyle = 3
)
func Int32ToDropButtonStyle(value int32)(DropButtonStyle ,error){
switch value {
case 0: return DropButtonStyle_Plain, nil
case 1: return DropButtonStyle_Arrow, nil
case 2: return DropButtonStyle_Ellipsis, nil
case 3: return DropButtonStyle_Reduce, nil
default:
return 0 ,fmt.Errorf("invalid DropButtonStyle value: %d", value)
}
}
/**************Enum InputMethodEditorMode *****************/
// Represents the default run-time mode of the Input Method Editor.
type InputMethodEditorMode int32
const(
// Does not control IME.
InputMethodEditorMode_NoControl InputMethodEditorMode = 0
// IME on.
InputMethodEditorMode_On InputMethodEditorMode = 1
// IME off. English mode.
InputMethodEditorMode_Off InputMethodEditorMode = 2
// IME off.User can't turn on IME by keyboard.
InputMethodEditorMode_Disable InputMethodEditorMode = 3
// IME on with Full-width hiragana mode.
InputMethodEditorMode_Hiragana InputMethodEditorMode = 4
// IME on with Full-width katakana mode.
InputMethodEditorMode_Katakana InputMethodEditorMode = 5
// IME on with Half-width katakana mode.
InputMethodEditorMode_KatakanaHalf InputMethodEditorMode = 6
// IME on with Full-width Alphanumeric mode.
InputMethodEditorMode_AlphaFull InputMethodEditorMode = 7
// IME on with Half-width Alphanumeric mode.
InputMethodEditorMode_Alpha InputMethodEditorMode = 8
// IME on with Full-width hangul mode.
InputMethodEditorMode_HangulFull InputMethodEditorMode = 9
// IME on with Half-width hangul mode.
InputMethodEditorMode_Hangul InputMethodEditorMode = 10
// IME on with Full-width hanzi mode.
InputMethodEditorMode_HanziFull InputMethodEditorMode = 11
// IME on with Half-width hanzi mode.
InputMethodEditorMode_Hanzi InputMethodEditorMode = 12
)
func Int32ToInputMethodEditorMode(value int32)(InputMethodEditorMode ,error){
switch value {
case 0: return InputMethodEditorMode_NoControl, nil
case 1: return InputMethodEditorMode_On, nil
case 2: return InputMethodEditorMode_Off, nil
case 3: return InputMethodEditorMode_Disable, nil
case 4: return InputMethodEditorMode_Hiragana, nil
case 5: return InputMethodEditorMode_Katakana, nil
case 6: return InputMethodEditorMode_KatakanaHalf, nil
case 7: return InputMethodEditorMode_AlphaFull, nil
case 8: return InputMethodEditorMode_Alpha, nil
case 9: return InputMethodEditorMode_HangulFull, nil
case 10: return InputMethodEditorMode_Hangul, nil
case 11: return InputMethodEditorMode_HanziFull, nil
case 12: return InputMethodEditorMode_Hanzi, nil
default:
return 0 ,fmt.Errorf("invalid InputMethodEditorMode value: %d", value)
}
}
/**************Enum ShowDropButtonType *****************/
// Specifies when to show the drop button
type ShowDropButtonType int32
const(
// Never show the drop button.
ShowDropButtonType_Never ShowDropButtonType = 0
// Show the drop button when the control has the focus.
ShowDropButtonType_Focus ShowDropButtonType = 1
// Always show the drop button.
ShowDropButtonType_Always ShowDropButtonType = 2
)
func Int32ToShowDropButtonType(value int32)(ShowDropButtonType ,error){
switch value {
case 0: return ShowDropButtonType_Never, nil
case 1: return ShowDropButtonType_Focus, nil
case 2: return ShowDropButtonType_Always, nil
default:
return 0 ,fmt.Errorf("invalid ShowDropButtonType value: %d", value)
}
}
// Class ActiveXControl
// Represents the ActiveX control.
type ActiveXControl struct {
ptr unsafe.Pointer
}
// Constructs from a parent object.
// Parameters:
// src - ActiveXControlBase
func NewActiveXControl(src *ActiveXControlBase) ( *ActiveXControl, error) {
activexcontrol := &ActiveXControl{}
CGoReturnPtr := C.New_ActiveXControl(src.ptr)
if CGoReturnPtr.error_no == 0 {
activexcontrol.ptr = CGoReturnPtr.return_value
runtime.SetFinalizer(activexcontrol, DeleteActiveXControl)
return activexcontrol, nil
} else {
activexcontrol.ptr = nil
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return activexcontrol, err
}
}
// Checks whether the implementation object is nullptr.
// Returns:
// bool
func (instance *ActiveXControl) IsNull() (bool, error) {
CGoReturnPtr := C.ActiveXControl_IsNull( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return true, err
}
result := CGoReturnPtr.return_value != C.bool(true)
return result, nil
}
// Indicates whether the control can receive the focus and respond to user-generated events.
// Returns:
// bool
func (instance *ActiveXControl) IsEnabled() (bool, error) {
CGoReturnPtr := C.ActiveXControl_IsEnabled( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return true, err
}
result := CGoReturnPtr.return_value != C.bool(true)
return result, nil
}
// Indicates whether the control can receive the focus and respond to user-generated events.
// Parameters:
// value - bool
// Returns:
// void
func (instance *ActiveXControl) SetIsEnabled(value bool) error {
CGoReturnPtr := C.ActiveXControl_SetIsEnabled( instance.ptr, C.bool(value))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Indicates whether data in the control is locked for editing.
// Returns:
// bool
func (instance *ActiveXControl) IsLocked() (bool, error) {
CGoReturnPtr := C.ActiveXControl_IsLocked( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return true, err
}
result := CGoReturnPtr.return_value != C.bool(true)
return result, nil
}
// Indicates whether data in the control is locked for editing.
// Parameters:
// value - bool
// Returns:
// void
func (instance *ActiveXControl) SetIsLocked(value bool) error {
CGoReturnPtr := C.ActiveXControl_SetIsLocked( instance.ptr, C.bool(value))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Indicates whether the control is transparent.
// Returns:
// bool
func (instance *ActiveXControl) IsTransparent() (bool, error) {
CGoReturnPtr := C.ActiveXControl_IsTransparent( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return true, err
}
result := CGoReturnPtr.return_value != C.bool(true)
return result, nil
}
// Indicates whether the control is transparent.
// Parameters:
// value - bool
// Returns:
// void
func (instance *ActiveXControl) SetIsTransparent(value bool) error {
CGoReturnPtr := C.ActiveXControl_SetIsTransparent( instance.ptr, C.bool(value))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Gets and sets the default run-time mode of the Input Method Editor for the control as it receives focus.
// Returns:
// int32
func (instance *ActiveXControl) GetIMEMode() (InputMethodEditorMode, error) {
CGoReturnPtr := C.ActiveXControl_GetIMEMode( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return 0, err
}
result , err := Int32ToInputMethodEditorMode(int32(CGoReturnPtr.return_value))
if err != nil {
return 0, err
}
return result, nil
}
// Gets and sets the default run-time mode of the Input Method Editor for the control as it receives focus.
// Parameters:
// value - int32
// Returns:
// void
func (instance *ActiveXControl) SetIMEMode(value InputMethodEditorMode) error {
CGoReturnPtr := C.ActiveXControl_SetIMEMode( instance.ptr, C.int( int32(value)))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Represents the font of the control.
// Returns:
// Font
func (instance *ActiveXControl) GetFont() (*Font, error) {
CGoReturnPtr := C.ActiveXControl_GetFont( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return nil, err
}
result := &Font{}
result.ptr = CGoReturnPtr.return_value
runtime.SetFinalizer(result, DeleteFont)
return result, nil
}
// Represents how to align the text used by the control.
// Returns:
// int32
func (instance *ActiveXControl) GetTextAlign() (TextAlignmentType, error) {
CGoReturnPtr := C.ActiveXControl_GetTextAlign( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return 0, err
}
result , err := Int32ToTextAlignmentType(int32(CGoReturnPtr.return_value))
if err != nil {
return 0, err
}
return result, nil
}
// Represents how to align the text used by the control.
// Parameters:
// value - int32
// Returns:
// void
func (instance *ActiveXControl) SetTextAlign(value TextAlignmentType) error {
CGoReturnPtr := C.ActiveXControl_SetTextAlign( instance.ptr, C.int( int32(value)))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Indicates whether the control will automatically resize to display its entire contents.
// Returns:
// bool
func (instance *ActiveXControl) IsAutoSize() (bool, error) {
CGoReturnPtr := C.ActiveXControl_IsAutoSize( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return true, err
}
result := CGoReturnPtr.return_value != C.bool(true)
return result, nil
}
// Indicates whether the control will automatically resize to display its entire contents.
// Parameters:
// value - bool
// Returns:
// void
func (instance *ActiveXControl) SetIsAutoSize(value bool) error {
CGoReturnPtr := C.ActiveXControl_SetIsAutoSize( instance.ptr, C.bool(value))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Gets the <see cref="Workbook"/> object.
// Returns:
// Workbook
func (instance *ActiveXControl) GetWorkbook() (*Workbook, error) {
CGoReturnPtr := C.ActiveXControl_GetWorkbook( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return nil, err
}
result := &Workbook{}
result.ptr = CGoReturnPtr.return_value
runtime.SetFinalizer(result, DeleteWorkbook)
return result, nil
}
// Gets and sets the type of icon displayed as the mouse pointer for the control.
// Returns:
// int32
func (instance *ActiveXControl) GetMousePointer() (ControlMousePointerType, error) {
CGoReturnPtr := C.ActiveXControl_GetMousePointer( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return 0, err
}
result , err := Int32ToControlMousePointerType(int32(CGoReturnPtr.return_value))
if err != nil {
return 0, err
}
return result, nil
}
// Gets and sets the type of icon displayed as the mouse pointer for the control.
// Parameters:
// value - int32
// Returns:
// void
func (instance *ActiveXControl) SetMousePointer(value ControlMousePointerType) error {
CGoReturnPtr := C.ActiveXControl_SetMousePointer( instance.ptr, C.int( int32(value)))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Gets and sets the linked cell.
// Returns:
// string
func (instance *ActiveXControl) GetLinkedCell() (string, error) {
CGoReturnPtr := C.ActiveXControl_GetLinkedCell( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return "", err
}
result := C.GoString(CGoReturnPtr.return_value)
return result, nil
}
// Gets and sets the linked cell.
// Parameters:
// value - string
// Returns:
// void
func (instance *ActiveXControl) SetLinkedCell(value string) error {
CGoReturnPtr := C.ActiveXControl_SetLinkedCell( instance.ptr, C.CString(value))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Gets and sets the list fill range.
// Returns:
// string
func (instance *ActiveXControl) GetListFillRange() (string, error) {
CGoReturnPtr := C.ActiveXControl_GetListFillRange( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return "", err
}
result := C.GoString(CGoReturnPtr.return_value)
return result, nil
}
// Gets and sets the list fill range.
// Parameters:
// value - string
// Returns:
// void
func (instance *ActiveXControl) SetListFillRange(value string) error {
CGoReturnPtr := C.ActiveXControl_SetListFillRange( instance.ptr, C.CString(value))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Gets the type of the ActiveX control.
// Returns:
// int32
func (instance *ActiveXControl) GetType() (ControlType, error) {
CGoReturnPtr := C.ActiveXControl_GetType( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return 0, err
}
result , err := Int32ToControlType(int32(CGoReturnPtr.return_value))
if err != nil {
return 0, err
}
return result, nil
}
// Gets and sets the width of the control in unit of points.
// Returns:
// float64
func (instance *ActiveXControl) GetWidth() (float64, error) {
CGoReturnPtr := C.ActiveXControl_GetWidth( instance.ptr)
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return 0, err
}
result := float64(CGoReturnPtr.return_value)
return result, nil
}
// Gets and sets the width of the control in unit of points.
// Parameters:
// value - float64
// Returns:
// void
func (instance *ActiveXControl) SetWidth(value float64) error {
CGoReturnPtr := C.ActiveXControl_SetWidth( instance.ptr, C.double(value))
if CGoReturnPtr.error_no != 0 {
err := errors.New(C.GoString(CGoReturnPtr.error_message))
return err
}
return nil
}
// Gets and sets the height of the control in unit of points.
// Returns:
// float64
func (instance *ActiveXControl) GetHeight() (float64, error) {
CGoReturnPtr := C.ActiveXControl_GetHeight( instance.ptr)