This repository has been archived by the owner on Nov 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 358
/
coreplot.cs
3024 lines (2188 loc) · 88.7 KB
/
coreplot.cs
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
//
// ApiDefinition.cs: API binding to the CorePlot library
//
// Authors:
// Miguel de Icaza
// Alex Soto
//
using System;
using System.Drawing;
using MonoMac;
using MonoMac.Foundation;
using MonoMac.CoreGraphics;
using MonoMac.ObjCRuntime;
using MonoMac.CoreAnimation;
#if MONOTOUCH
using MonoTouch.UIKit;
using CPTNativeImage = MonoTouch.UIKit.UIImage;
using CPTNativeEvent = MonoTouch.UIKit.UIEvent;
#else
using MonoMac.AppKit;
using CPTNativeImage = MonoMac.AppKit.NSImage;
using CPTNativeEvent = MonoMac.AppKit.NSEvent;
#endif
namespace CorePlot
{
interface ICPTAnimationDelegate { }
[BaseType (typeof (NSObject))]
[Model]
[Protocol]
interface CPTAnimationDelegate
{
[Export ("animationDidStart:")]
void AnimationDidStart (CPTAnimationOperation operation);
[Export ("animationDidFinish:")]
void AnimationDidFinish (CPTAnimationOperation operation);
[Export ("animationCancelled:")]
void AnimationCancelled (CPTAnimationOperation operation);
[Export ("animationWillUpdate:")]
void AnimationWillUpdate (CPTAnimationOperation operation);
[Export ("animationDidUpdate:")]
void AnimationDidUpdate (CPTAnimationOperation operation);
}
[BaseType (typeof (NSObject))]
interface CPTAnimation
{
[Export ("timeOffset", ArgumentSemantic.Assign)]
float TimeOffset { get; }
[Export ("defaultAnimationCurve", ArgumentSemantic.Assign)]
CPTAnimationCurve DefaultAnimationCurve { get; set; }
[Static]
[Export ("sharedInstance")]
CPTAnimation GetSharedInstance { get; }
[Static]
[Export ("animate:property:period:animationCurve:delegate:")]
CPTAnimationOperation Animate (NSObject obj, string property, CPTAnimationPeriod period, CPTAnimationCurve animationCurve, ICPTAnimationDelegate animationDelegate);
[Export ("addAnimationOperation:")]
CPTAnimationOperation AddAnimationOperation (CPTAnimationOperation animationOperation);
[Export ("removeAnimationOperation:")]
void RemoveAnimationOperation (CPTAnimationOperation animationOperation);
[Export ("removeAllAnimationOperations")]
void RemoveAllAnimationOperations ();
}
[BaseType (typeof (NSObject))]
interface CPTAnimationOperation
{
[Export ("period", ArgumentSemantic.Retain)]
CPTAnimationPeriod Period { get; set; }
[Export ("animationCurve", ArgumentSemantic.Assign)]
CPTAnimationCurve AnimationCurve { get; set; }
[Export ("boundObject", ArgumentSemantic.Retain)]
NSObject BoundObject { get; set; }
[Export ("boundGetter")]
Selector BoundGetter { get; }
[Export ("boundSetter")]
Selector BoundSetter { get; }
[Wrap ("WeakDelegate")]
CPTAnimationDelegate Delegate { get; set; }
[Export ("delegate", ArgumentSemantic.Assign)][NullAllowed]
NSObject WeakDelegate { get; set; }
}
[BaseType (typeof (NSObject))]
interface CPTAnimationPeriod
{
[Export ("startValue", ArgumentSemantic.Copy)]
NSValue StartValue { get; set; }
[Export ("endValue", ArgumentSemantic.Copy)]
NSValue EndValue { get; set; }
[Export ("duration")]
float Duration { get; set; }
[Export ("delay")]
float Delay { get; set; }
[Export ("startOffset")]
float StartOffset { get; }
[Static]
[Export ("periodWithStart:end:duration:withDelay:")]
CPTAnimationPeriod FromStart (float start, float end, float duration, float delay);
[Static]
[Export ("periodWithStartPoint:endPoint:duration:withDelay:")]
CPTAnimationPeriod FromStartPoint (PointF startPoint, PointF endPoint, float duration, float delay);
[Static]
[Export ("periodWithStartSize:endSize:duration:withDelay:")]
CPTAnimationPeriod FromStartSize (SizeF startSize, SizeF endSize, float duration, float delay);
[Static]
[Export ("periodWithStartRect:endRect:duration:withDelay:")]
CPTAnimationPeriod FromStartSize (RectangleF startRect, RectangleF endRect, float duration, float delay);
[Static]
[Export ("periodWithStartDecimal:endDecimal:duration:withDelay:")]
CPTAnimationPeriod FromStartDecimal (NSDecimal startDecimal, NSDecimal endDecimal, float duration, float delay);
[Static]
[Export ("periodWithStartPlotRange:endPlotRange:duration:withDelay:")]
CPTAnimationPeriod FromStartPlotRange (CPTPlotRange startPlotRangle, CPTPlotRange endPlotRangle, float duration, float delay);
[Export ("initWithStart:end:duration:withDelay:")]
IntPtr Constructor (float start, float end, float duration, float delay);
[Export ("initWithStartPoint:endPoint:duration:withDelay:")]
IntPtr Constructor (PointF startPoint, PointF endPoint, float duration, float delay);
[Export ("initWithStartSize:endSize:duration:withDelay:")]
IntPtr Constructor (SizeF startSize, SizeF endSize, float duration, float delay);
[Export ("initWithStartRect:endRect:duration:withDelay:")]
IntPtr Constructor (RectangleF startRect, RectangleF endRect, float duration, float delay);
[Export ("initWithStartDecimal:endDecimal:duration:withDelay:")]
IntPtr Constructor (NSDecimal startDecimal, NSDecimal endDecimal, float duration, float delay);
[Export ("initWithStartPlotRange:endPlotRange:duration:withDelay:")]
IntPtr Constructor (CPTPlotRange startPlotRangle, CPTPlotRange endPlotRangle, float duration, float delay);
[Export ("tweenedValueForProgress:")]
NSValue TweenedValue (float progress);
[Static]
[Export ("animate:property:from:to:duration:withDelay:animationCurve:delegate:")]
CPTAnimationOperation Animate (NSObject obj, string property, float from, float to, float duration, float delay, CPTAnimationCurve animationCurve, ICPTAnimationDelegate animationDelegate);
[Static]
[Export ("animate:property:from:to:duration:animationCurve:delegate:")]
CPTAnimationOperation Animate (NSObject obj, string property, float from, float to, float duration, CPTAnimationCurve animationCurve, ICPTAnimationDelegate animationDelegate);
[Static]
[Export ("animate:property:from:to:duration:")]
CPTAnimationOperation Animate (NSObject obj, string property, float from, float to, float duration);
[Static]
[Export ("animate:property:fromPoint:toPoint:duration:withDelay:animationCurve:delegate:")]
CPTAnimationOperation Animate (NSObject obj, string property, PointF fromPoint, PointF toPoint, float duration, float delay, CPTAnimationCurve animationCurve, ICPTAnimationDelegate animationDelegate);
[Static]
[Export ("animate:property:fromPoint:toPoint:duration:animationCurve:delegate:")]
CPTAnimationOperation Animate (NSObject obj, string property, PointF fromPoint, PointF toPoint, float duration, CPTAnimationCurve animationCurve, ICPTAnimationDelegate animationDelegate);
[Static]
[Export ("animate:property:fromPoint:toPoint:duration:")]
CPTAnimationOperation Animate (NSObject obj, string property, PointF fromPoint, PointF toPoint, float duration);
[Static]
[Export ("animate:property:fromSize:toSize:duration:withDelay:animationCurve:delegate:")]
CPTAnimationOperation Animate (NSObject obj, string property, SizeF fromSize, SizeF toSize, float duration, float delay, CPTAnimationCurve animationCurve, ICPTAnimationDelegate animationDelegate);
[Static]
[Export ("animate:property:fromSize:toSize:duration:animationCurve:delegate:")]
CPTAnimationOperation Animate (NSObject obj, string property, SizeF fromSize, SizeF toSize, float duration, CPTAnimationCurve animationCurve, ICPTAnimationDelegate animationDelegate);
[Static]
[Export ("animate:property:fromSize:toSize:duration:")]
CPTAnimationOperation Animate (NSObject obj, string property, SizeF fromSize, SizeF toSize, float duration);
[Static]
[Export ("animate:property:fromRect:toRect:duration:withDelay:animationCurve:delegate:")]
CPTAnimationOperation Animate (NSObject obj, string property, RectangleF fromRect, RectangleF toRect, float duration, float delay, CPTAnimationCurve animationCurve, ICPTAnimationDelegate animationDelegate);
[Static]
[Export ("animate:property:fromRect:toRect:duration:animationCurve:delegate:")]
CPTAnimationOperation Animate (NSObject obj, string property, RectangleF fromRect, RectangleF toRect, float duration, CPTAnimationCurve animationCurve, ICPTAnimationDelegate animationDelegate);
[Static]
[Export ("animate:property:fromRect:toRect:duration:")]
CPTAnimationOperation Animate (NSObject obj, string property, RectangleF fromRect, RectangleF toRect, float duration);
[Static]
[Export ("animate:property:fromDecimal:toDecimal:duration:withDelay:animationCurve:delegate:")]
CPTAnimationOperation Animate (NSObject obj, string property, NSDecimal fromDecimal, NSDecimal toDecimal, float duration, float delay, CPTAnimationCurve animationCurve, ICPTAnimationDelegate animationDelegate);
[Static]
[Export ("animate:property:fromDecimal:toDecimal:duration:animationCurve:delegate:")]
CPTAnimationOperation Animate (NSObject obj, string property, NSDecimal fromDecimal, NSDecimal toDecimal, float duration, CPTAnimationCurve animationCurve, ICPTAnimationDelegate animationDelegate);
[Static]
[Export ("animate:property:fromDecimal:toDecimal:duration:")]
CPTAnimationOperation Animate (NSObject obj, string property, NSDecimal fromDecimal, NSDecimal toDecimal, float duration);
[Static]
[Export ("animate:property:fromPlotRange:toPlotRange:duration:withDelay:animationCurve:delegate:")]
CPTAnimationOperation Animate (NSObject obj, string property, CPTPlotRange fromPlotRange, CPTPlotRange toPlotRange, float duration, float delay, CPTAnimationCurve animationCurve, ICPTAnimationDelegate animationDelegate);
[Static]
[Export ("animate:property:fromPlotRange:toPlotRange:duration:animationCurve:delegate:")]
CPTAnimationOperation Animate (NSObject obj, string property, CPTPlotRange fromPlotRange, CPTPlotRange toPlotRange, float duration, CPTAnimationCurve animationCurve, ICPTAnimationDelegate animationDelegate);
[Static]
[Export ("animate:property:fromPlotRange:toPlotRange:duration:")]
CPTAnimationOperation Animate (NSObject obj, string property, CPTPlotRange fromPlotRange, CPTPlotRange toPlotRange, float duration);
}
[BaseType (typeof (NSObject))]
interface CPTAnnotation
{
[Export ("contentLayer", ArgumentSemantic.Retain)]
CPTLayer ContentLayer { get; set; }
[Export ("annotationHostLayer", ArgumentSemantic.Assign)]
CPTAnnotationHostLayer AnnotationHostLayer { get; set; }
[Export ("contentAnchorPoint", ArgumentSemantic.Assign)]
PointF ContentAnchorPoint { get; set; }
[Export ("displacement", ArgumentSemantic.Assign)]
PointF Displacement { get; set; }
[Export ("rotation", ArgumentSemantic.Assign)]
PointF Rotation { get; set; }
// CPTAnnotation (AbstractMethods) Category
[Export ("positionContentLayer")]
void PositionContentLayer ();
}
[BaseType (typeof (CPTLayer))]
interface CPTAnnotationHostLayer
{
[Export ("annotations", ArgumentSemantic.Retain)]
CPTAnnotation [] Annotations { get; }
[Export ("addAnnotation:")] [PostGet ("Annotations")]
void Add (CPTAnnotation annotation);
[Export ("removeAnnotation:")] [PostGet ("Annotations")]
void Remove (CPTAnnotation annotation);
[Export ("removeAllAnnotations")]
void RemoveAll ();
}
interface ICPTAxisDelegate { }
[BaseType (typeof (NSObject))]
[Model]
[Protocol]
interface CPTAxisDelegate
{
[Export ("axisShouldRelabel:")]
bool ShouldRelabel (CPTAxis axis);
[Export ("axisDidRelabel:")]
void DidRelabel (CPTAxis axis);
[Export ("axis:shouldUpdateAxisLabelsAtLocations:")]
bool ShouldUpdateAxisLabelsAtLocations (CPTAxis axis, NSSet locations);
[Export ("axis:shouldUpdateMinorAxisLabelsAtLocations:")]
bool ShouldUpdateMinorAxisLabelsAtLocations (CPTAxis axis, NSSet locations);
[Export ("axis:labelWasSelected:")]
void LabelWasSelected (CPTAxis axis, CPTAxisLabel label);
[Export ("axis:labelWasSelected:withEvent:")]
void LabelWasSelected (CPTAxis axis, CPTAxisLabel label, CPTNativeEvent nativeEvent);
[Export ("axis:minorTickLabelWasSelected:")]
void MinorTickLabelWasSelected (CPTAxis axis, CPTAxisLabel label);
[Export ("axis:minorTickLabelWasSelected:withEvent:")]
void MinorTickLabelWasSelected (CPTAxis axis, CPTAxisLabel label, CPTNativeEvent nativeEvent);
}
[BaseType (typeof (CPTLayer))]
interface CPTAxis
{
[Wrap ("WeakDelegate")] [New]
CPTAxisDelegate Delegate { get; set; }
// Axis
[Export ("axisLineStyle", ArgumentSemantic.Copy)]
CPTLineStyle AxisLineStyle { get; set; }
[Export ("coordinate", ArgumentSemantic.Assign)]
CPTCoordinate Coordinate { get; set; }
[Export ("labelingOrigin", ArgumentSemantic.Assign)]
NSDecimal LabelingOrigin { get; set; }
[Export ("tickDirection", ArgumentSemantic.Assign)]
CPTSign TickDirection { get; set; }
[Export ("visibleRange", ArgumentSemantic.Copy)]
CPTPlotRange VisibleRange { get; set; }
[Export ("visibleAxisRange", ArgumentSemantic.Copy)]
CPTPlotRange VisibleAxisRange { get; set; }
[Export ("axisLineCapMin", ArgumentSemantic.Copy)]
CPTLineCap AxisLineCapMin { get; set; }
[Export ("axisLineCapMax", ArgumentSemantic.Copy)]
CPTLineCap AxisLineCapMax { get; set; }
// Title
[Export ("titleTextStyle", ArgumentSemantic.Copy)]
CPTTextStyle TitleTextStyle { get; set; }
[Export ("axisTitle", ArgumentSemantic.Retain)]
CPTAxisTitle AxisTitle { get; set; }
[Export ("titleOffset", ArgumentSemantic.Assign)]
float TitleOffset { get; set; }
[Export ("title", ArgumentSemantic.Copy)]
string Title { get; set; }
[Export ("attributedTitle", ArgumentSemantic.Copy)]
NSAttributedString AttributedTitle { get; set; }
[Export ("titleRotation", ArgumentSemantic.Assign)]
float TitleRotation { get; set; }
[Export ("titleLocation", ArgumentSemantic.Assign)]
NSDecimal TitleLocation { get; set; }
[Export ("defaultTitleLocation", ArgumentSemantic.Assign)]
NSDecimal DefaultTitleLocation { get; set; }
// Labels
[Export ("labelingPolicy", ArgumentSemantic.Assign)]
CPTAxisLabelingPolicy LabelingPolicy { get; set; }
[Export ("labelOffset", ArgumentSemantic.Assign)]
float LabelOffset { get; set; }
[Export ("minorTickLabelOffset", ArgumentSemantic.Assign)]
float MinorTickLabelOffset { get; set; }
[Export ("labelRotation", ArgumentSemantic.Assign)]
float LabelRotation { get; set; }
[Export ("minorTickLabelRotation", ArgumentSemantic.Assign)]
float MinorTickLabelRotation { get; set; }
[Export ("labelAlignment", ArgumentSemantic.Assign)]
CPTAlignment LabelAlignment { get; set; }
[Export ("minorTickLabelAlignment", ArgumentSemantic.Assign)]
CPTAlignment MinorTickLabelAlignment { get; set; }
[Export ("labelTextStyle", ArgumentSemantic.Copy)]
CPTTextStyle LabelTextStyle { get; set; }
[Export ("minorTickLabelTextStyle", ArgumentSemantic.Copy)]
CPTTextStyle MinorTickLabelTextStyle { get; set; }
[Export ("tickLabelDirection", ArgumentSemantic.Assign)]
CPTSign TickLabelDirection { get; set; }
[Export ("minorTickLabelDirection", ArgumentSemantic.Assign)]
CPTSign MinorTickLabelDirection { get; set; }
[Export ("labelFormatter", ArgumentSemantic.Retain)]
NSFormatter LabelFormatter { get; set; }
[Export ("minorTickLabelFormatter", ArgumentSemantic.Retain)]
NSFormatter MinorTickLabelFormatter { get; set; }
[Export ("axisLabels", ArgumentSemantic.Retain)]
NSSet AxisLabels { get; set; }
[Export ("minorTickAxisLabels", ArgumentSemantic.Retain)]
NSSet MinorTickAxisLabels { get; set; }
[Export ("needsRelabel", ArgumentSemantic.Assign)]
bool NeedsRelabel { get; set; }
[Export ("labelExclusionRanges", ArgumentSemantic.Retain)]
NSObject [] LabelExclusionRanges { get; set; }
[Export ("labelShadow", ArgumentSemantic.Retain)]
CPTShadow LabelShadow { get; set; }
[Export ("minorTickLabelShadow", ArgumentSemantic.Retain)]
CPTShadow MinorTickLabelShadow { get; set; }
// Major Ticks
[Export ("majorIntervalLength", ArgumentSemantic.Assign)]
NSDecimal MajorIntervalLength { get; set; }
[Export ("majorTickLength", ArgumentSemantic.Assign)]
float MajorTickLength { get; set; }
[Export ("majorTickLineStyle", ArgumentSemantic.Copy)]
CPTLineStyle MajorTickLineStyle { get; set; }
[Export ("majorTickLocations", ArgumentSemantic.Retain)]
NSSet MajorTickLocations { get; set; }
[Export ("preferredNumberOfMajorTicks", ArgumentSemantic.Assign)]
uint PreferredNumberOfMajorTicks { get; set; }
// Minor Ticks
[Export ("minorTicksPerInterval", ArgumentSemantic.Assign)]
uint MinorTicksPerInterval { get; set; }
[Export ("minorTickLength", ArgumentSemantic.Assign)]
float MinorTickLength { get; set; }
[Export ("minorTickLineStyle", ArgumentSemantic.Copy)]
CPTLineStyle MinorTickLineStyle { get; set; }
[Export ("minorTickLocations", ArgumentSemantic.Retain)]
NSSet MinorTickLocations { get; set; }
// Grid Lines
[Export ("majorGridLineStyle", ArgumentSemantic.Copy)]
CPTLineStyle MajorGridLineStyle { get; set; }
[Export ("minorGridLineStyle", ArgumentSemantic.Copy)]
CPTLineStyle MinorGridLineStyle { get; set; }
[Export ("gridLinesRange", ArgumentSemantic.Copy)]
CPTPlotRange GridLinesRange { get; set; }
// Background Bands
[Export ("alternatingBandFills", ArgumentSemantic.Copy)]
NSObject [] AlternatingBandFills { get; set; }
[Export ("backgroundLimitBands", ArgumentSemantic.Retain)]
NSObject [] BackgroundLimitBands { get; set; }
// Plot Space
[Export ("plotSpace", ArgumentSemantic.Retain)]
CPTPlotSpace PlotSpace { get; set; }
// Name Layers
[Export ("separateLayers", ArgumentSemantic.Assign)]
bool SeparateLayers { get; set; }
[Export ("plotArea", ArgumentSemantic.Assign)]
CPTPlotArea PlotArea { get; set; }
[Export ("minorGridLines", ArgumentSemantic.Assign)]
CPTGridLines MinorGridLines { get; }
[Export ("majorGridLines", ArgumentSemantic.Assign)]
CPTGridLines MajorGridLines { get; }
[Export ("axisSet", ArgumentSemantic.Retain)]
CPTAxisSet AxisSet { get; }
// Title
[Export ("updateAxisTitle")]
void UpdateAxisTitle ();
// Labels
[Export ("relabel")]
void Relabel ();
[Export ("setNeedsRelabel")]
void SetNeedsRelabel ();
[Export ("updateMajorTickLabels")]
void UpdateMajorTickLabels ();
[Export ("updateMinorTickLabels")]
void UpdateMinorTickLabels ();
// Ticks
[Export ("filteredMajorTickLocations:")]
NSSet FilteredMajorTickLocations (NSSet allLocations);
[Export ("filteredMinorTickLocations:")]
NSSet FilteredMinorTickLocations (NSSet allLocations);
// Background Bands
[Export ("addBackgroundLimitBand:")]
void AddBackgroundLimitBand (CPTLimitBand limitBand);
[Export ("removeBackgroundLimitBand:")]
void RemoveBackgroundLimitBand (CPTLimitBand limitBand);
// CPTAxis(AbstractMethods) Category
[Export ("viewPointForCoordinateDecimalNumber:")]
PointF ViewPointForCoordinateDecimalNumber (NSDecimal coordinateDecimalNumber);
[Export ("drawGridLinesInContext:isMajor:")]
void DrawGridLinesInContext (CGContext context, bool isMajor);
[Export ("drawBackgroundBandsInContext:")]
void DrawBackgroundBandsInContext (CGContext context);
[Export ("drawBackgroundLimitsInContext:")]
void DrawBackgroundLimitsInContext (CGContext context);
}
[BaseType (typeof (NSObject))]
interface CPTAxisLabel
{
[Export ("contentLayer", ArgumentSemantic.Retain)]
CPTLayer ContentLayer { get; set; }
[Export ("offset", ArgumentSemantic.Assign)]
float Offset { get; set; }
[Export ("rotation", ArgumentSemantic.Assign)]
float Rotation { get; set; }
[Export ("alignment", ArgumentSemantic.Assign)]
CPTAlignment Alignment { get; set; }
[Export ("tickLocation", ArgumentSemantic.Assign)]
NSDecimal TickLocation { get; set; }
[Export ("initWithText:textStyle:")]
IntPtr Constructor (string newText, CPTTextStyle style);
[Export ("initWithContentLayer:")]
IntPtr Constructor (CPTLayer layer);
[Export ("positionRelativeToViewPoint:forCoordinate:inDirection:")]
void PositionRelativeToViewPoint (PointF viewPoint, CPTCoordinate coordinate, CPTSign direction);
[Export ("positionBetweenViewPoint:andViewPoint:forCoordinate:inDirection:")]
void PositionBetweenViewPoint (PointF firstPoint, PointF secondPoint, CPTCoordinate coordinate, CPTSign direction);
}
[BaseType (typeof (CPTLayer))]
interface CPTAxisSet
{
[Export ("axes", ArgumentSemantic.Retain)]
CPTAxis [] Axes { get; set; }
[Export ("borderLineStyle", ArgumentSemantic.Copy)]
CPTLineStyle BorderLineStyle { get; set; }
[Export ("relabelAxes")]
void RelabelAxes ();
[Export ("axisForCoordinate:atIndex:")]
CPTAxis AxisForCoordinate (CPTCoordinate coordinate, uint index);
}
[BaseType (typeof (CPTAxisLabel))]
interface CPTAxisTitle
{
}
interface ICPTBarPlotDataSource { }
[BaseType (typeof (NSObject))]
[Model]
[Protocol]
interface CPTBarPlotDataSource : CPTPlotDataSource
{
[Export ("barFillsForBarPlot:recordIndexRange:")]
CPTFill [] GetBarFills (CPTBarPlot barPlot, NSRange recordIndexRange);
[Export ("barFillForBarPlot:recordIndex:")]
CPTFill GetBarFill (CPTBarPlot barPlot, uint recordIndex);
[Export ("barLineStylesForBarPlot:recordIndexRange:")]
CPTLineStyle [] GetBarLineStyles (CPTBarPlot barPlot, NSRange recordIndexRange);
[Export ("barLineStyleForBarPlot:recordIndex:")]
CPTLineStyle GetBarLineStyle (CPTBarPlot barPlot, uint recordIndex);
[Export ("legendTitleForBarPlot:recordIndex:")]
string GetLegendTitle (CPTBarPlot barPlot, uint recordIndex);
[Export ("attributedLegendTitleForBarPlot:recordIndex:")]
NSAttributedString GetAttributedLegendTitle (CPTBarPlot barPlot, uint recordIndex);
}
interface ICPTBarPlotDelegate { }
[BaseType (typeof (NSObject))]
[Model]
[Protocol]
interface CPTBarPlotDelegate : CPTPlotDelegate
{
[Export ("barPlot:barWasSelectedAtRecordIndex:")]
void BarSelected (CPTBarPlot barPlot, uint recordIndex);
[Export ("barPlot:barWasSelectedAtRecordIndex:withEvent:")]
void BarSelected (CPTBarPlot barPlot, uint recordIndex, CPTNativeEvent nativeEvent);
}
[BaseType (typeof (CPTPlot))]
interface CPTBarPlot
{
[Wrap ("WeakDataSource")][New]
CPTBarPlotDataSource DataSource { get; set; }
[Wrap ("WeakDelegate")] [New]
CPTBarPlotDelegate Delegate { get; set; }
[Export ("barWidthsAreInViewCoordinates", ArgumentSemantic.Assign)]
bool BarWidthsAreInViewCoordinates { get; set; }
[Export ("barWidth", ArgumentSemantic.Assign)]
NSDecimal BarWidth { get; set; }
[Export ("barWidthScale", ArgumentSemantic.Assign)]
float BarWidthScale { get; set; }
[Export ("barOffset", ArgumentSemantic.Assign)]
NSDecimal BarOffset { get; set; }
[Export ("barOffsetScale", ArgumentSemantic.Assign)]
float BarOffsetScale { get; set; }
[Export ("barCornerRadius", ArgumentSemantic.Assign)]
float BarCornerRadius { get; set; }
[Export ("barBaseCornerRadius", ArgumentSemantic.Assign)]
float BarBaseCornerRadius { get; set; }
[Export ("barsAreHorizontal", ArgumentSemantic.Assign)]
bool BarsAreHorizontal { get; set; }
[Export ("baseValue", ArgumentSemantic.Assign)]
NSDecimal BaseValue { get; set; }
[Export ("barBasesVary", ArgumentSemantic.Assign)]
bool BarBasesVary { get; set; }
[Export ("plotRange", ArgumentSemantic.Copy)]
CPTPlotRange PlotRange { get; set; }
[Export ("lineStyle", ArgumentSemantic.Copy)]
CPTLineStyle LineStyle { get; set; }
[Export ("fill", ArgumentSemantic.Copy)]
CPTFill Fill { get; set; }
[Static]
[Export ("tubularBarPlotWithColor:horizontalBars:")]
CPTBarPlot CreateTubularBarPlot (CPTColor color, bool horizontal);
[Export ("plotRangeEnclosingBars")]
CPTPlotRange PlotRangeEnclosingBars ();
}
[BaseType (typeof (CPTAnnotationHostLayer))]
interface CPTBorderedLayer
{
[Export ("borderLineStyle", ArgumentSemantic.Copy)]
CPTLineStyle BorderLineStyle { get; set; }
[Export ("fill", ArgumentSemantic.Copy)]
CPTFill Fill { get; set; }
[Export ("inLayout")]
bool InLayout { get; set; }
[Export ("renderBorderedLayerAsVectorInContext:")]
void RenderBorderedLayerAsVectorInContext (CGContext context);
}
[BaseType (typeof (NSNumberFormatter))]
interface CPTCalendarFormatter
{
[Export ("dateFormatter", ArgumentSemantic.Retain)]
NSDateFormatter DateFormatter { get; set; }
[Export ("referenceDate", ArgumentSemantic.Copy)]
NSDate ReferenceDate { get; set; }
[Export ("referenceCalendar", ArgumentSemantic.Copy)]
NSCalendar ReferenceCalendar { get; set; }
[Export ("referenceCalendarUnit", ArgumentSemantic.Assign)]
NSCalendarUnit ReferenceCalendarUnit { get; set; }
[Export ("initWithDateFormatter:")]
IntPtr Constructor (NSDateFormatter aDateFormatter);
}
[BaseType (typeof (NSObject))]
interface CPTColor
{
[Export ("cgColor", ArgumentSemantic.Assign)]
CGColor Color { get; }
[Export ("opaque", ArgumentSemantic.Assign)]
bool Opaque { [Bind ("isOpaque")] get; }
[Static]
[Export ("clearColor")]
CPTColor ClearColor { get; }
[Static]
[Export ("whiteColor")]
CPTColor WhiteColor { get; }
[Static]
[Export ("lightGrayColor")]
CPTColor LightGrayColor { get; }
[Static]
[Export ("grayColor")]
CPTColor GrayColor { get; }
[Static]
[Export ("darkGrayColor")]
CPTColor DarkGrayColor { get; }
[Static]
[Export ("blackColor")]
CPTColor BlackColor { get; }
[Static]
[Export ("redColor")]
CPTColor RedColor { get; }
[Static]
[Export ("greenColor")]
CPTColor GreenColor { get; }
[Static]
[Export ("blueColor")]
CPTColor BlueColor { get; }
[Static]
[Export ("cyanColor")]
CPTColor CyanColor { get; }
[Static]
[Export ("yellowColor")]
CPTColor YellowColor { get; }
[Static]
[Export ("magentaColor")]
CPTColor MagentaColor { get; }
[Static]
[Export ("orangeColor")]
CPTColor OrangeColor { get; }
[Static]
[Export ("purpleColor")]
CPTColor PurpleColor { get; }
[Static]
[Export ("brownColor")]
CPTColor BrownColor { get; }
[Static]
[Export ("colorWithCGColor:")]
CPTColor FromCGColor (CGColor newCGColor);
[Static]
[Export ("colorWithComponentRed:green:blue:alpha:")]
CPTColor FromRgba (float red, float green, float blue, float alpha);
[Static]
[Export ("colorWithGenericGray:")]
CPTColor FromGenericGray (float gray);
[Export ("initWithCGColor:")]
IntPtr Constructor (CGColor cgColor);
[Export ("initWithComponentRed:green:blue:alpha:")]
IntPtr Constructor (float red, float green, float blue, float alpha);
[Export ("colorWithAlphaComponent:")]
CPTColor ColorWithAlphaComponent (float alpha);
}
[BaseType (typeof (NSObject))]
interface CPTColorSpace
{
[Export ("cgColorSpace")]
CGColorSpace ColorSpace { get; }
[Static]
[Export ("genericRGBSpace")]
CPTColorSpace GenericRGBSpace { get; }
[Export ("initWithCGColorSpace:")]
IntPtr Constructor (CGColorSpace colorSpace);
}
[BaseType (typeof (NSObject))]
interface CPTConstraints
{
[Static]
[Export ("constraintWithLowerOffset:")]
CPTConstraints FromLowerOffset (float newOffset);
[Static]
[Export ("constraintWithUpperOffset:")]
CPTConstraints FromUpperOffset (float newOffset);
[Static]
[Export ("constraintWithRelativeOffset:")]
CPTConstraints FromRelativeOffset (float newOffset);
[Export ("isEqualToConstraint:")]
bool IsEqualToConstraint (CPTConstraints otherConstraint);
[Export ("positionForLowerBound:upperBound:")]
float PositionForLowerBound (float lowerBound, float upperBound);
}
[BaseType (typeof (NSObject))]
interface CPTFill
{
[Static]
[Export ("fillWithColor:")]
CPTFill FromColor (CPTColor aColor);
[Static]
[Export ("fillWithGradient:")]
CPTFill FromGradient (CPTGradient aGradient);
[Static]
[Export ("fillWithImage:")]
CPTFill FromImage (CPTImage anImage);
[Export ("initWithColor:")]
IntPtr Constructor (CPTColor aColor);
[Export ("initWithGradient:")]
IntPtr Constructor (CPTGradient aGradient);
[Export ("initWithImage:")]
IntPtr Constructor (CPTImage anImage);
[Export ("opaque", ArgumentSemantic.Assign)]
bool Opaque { [Bind ("isOpaque")] get; }
[Export ("fillRect:inContext:")]
void FillRect (RectangleF theRect, CGContext inContext);
[Export ("fillPathInContext:")]
void FillPath (CGContext inContext);
}
delegate double CPTDataSourceFunction (double param);
[BaseType (typeof (NSObject))]
interface CPTFunctionDataSource
{
[Export ("dataPlot", ArgumentSemantic.Assign)]
CPTPlot DataPlot { get; }
[Export ("resolution")]
float Resolution { get; set; }
[Export ("dataRange", ArgumentSemantic.Retain)]
CPTPlotRange DataRange { get; }
#if MONOTOUCH
[Static]
[Export ("dataSourceForPlot:withFunction:")]
CPTFunctionDataSource FromPlot (CPTPlot plot, [CCallback] CPTDataSourceFunction handler);
[Export ("initForPlot:withFunction:")]
IntPtr Constructor (CPTPlot plot, [CCallback] CPTDataSourceFunction handler);
#else
// TODO: [CCallback] is not implemented yet on Mac, remove compiler if when it is available
#endif
}
[BaseType (typeof (NSObject))]
interface CPTGradient
{
[Export ("opaque", ArgumentSemantic.Assign)]
bool Opaque { [Bind ("isOpaque")] get; }
[Export ("blendingMode", ArgumentSemantic.Assign)]
CPTGradientBlendingMode BlendingMode { get; }
[Export ("gradientType", ArgumentSemantic.Assign)]
CPTGradientType GradientType { get; set; }
[Export ("angle", ArgumentSemantic.Assign)]
float Angle { get; set; }
[Export ("startAnchor", ArgumentSemantic.Assign)]
PointF StartAnchor { get; set; }
[Export ("endAnchor", ArgumentSemantic.Assign)]
PointF EndAnchor { get; set; }
[Static]
[Export ("gradientWithBeginningColor:endingColor:")]
CPTGradient Create (CPTColor beginningColor, CPTColor endingColor);
[Static]
[Export ("gradientWithBeginningColor:endingColor:beginningPosition:endingPosition:")]
CPTGradient Create (CPTColor beginningColor, CPTColor endingColor, float beginningPosition, float endingPosition);
[Static]
[Export ("aquaSelectedGradient")]
CPTGradient AquaSelectedGradient { get; }
[Static]
[Export ("aquaNormalGradient")]
CPTGradient AquaNormalGradient { get; }
[Static]
[Export ("aquaPressedGradient")]
CPTGradient AquaPressedGradient { get; }
[Static]
[Export ("unifiedSelectedGradient")]
CPTGradient UnifiedSelectedGradient { get; }
[Static]
[Export ("unifiedNormalGradient")]
CPTGradient UnifiedNormalGradient { get; }
[Static]
[Export ("unifiedPressedGradient")]
CPTGradient UnifiedPressedGradient { get; }
[Static]
[Export ("unifiedDarkGradient")]
CPTGradient UnifiedDarkGradient { get; }
[Static]
[Export ("sourceListSelectedGradient")]
CPTGradient SourceListSelectedGradient { get; }
[Static]
[Export ("sourceListUnselectedGradient")]
CPTGradient SourceListUnselectedGradient { get; }
[Static]
[Export ("rainbowGradient")]
CPTGradient RainbowGradient { get; }
[Static]
[Export ("hydrogenSpectrumGradient")]
CPTGradient HydrogenSpectrumGradient { get; }
[Export ("gradientWithAlphaComponent:")]
CPTGradient GradientWithAlphaComponent (float alpha);
[Export ("gradientWithBlendingMode:")]
CPTGradient GradientWithBlendingMode (CPTGradientBlendingMode mode);