@@ -6,6 +6,117 @@ open DynamicObj
6
6
open System
7
7
open System.Runtime .InteropServices
8
8
9
+ /// <summary>Controls the style of selected markers in supported traces</summary>
10
+ type MarkerSelectionStyle () =
11
+ inherit DynamicObj()
12
+
13
+ /// <summary>
14
+ /// Returns a new MarkerSelectionStyle object with the given styles
15
+ /// </summary>
16
+ /// <param name="Opacity">Sets the opacity of the selected/unselected markers</param>
17
+ /// <param name="Color">Sets the color of the selected/unselected markers</param>
18
+ /// <param name="Size">Sets the size of the selected/unselected markers</param>
19
+ static member init
20
+ (
21
+ [<Optional; DefaultParameterValue( null ) >] ? Opacity : float ,
22
+ [<Optional; DefaultParameterValue( null ) >] ? Color : Color ,
23
+ [<Optional; DefaultParameterValue( null ) >] ? Size : int
24
+ ) =
25
+ MarkerSelectionStyle()
26
+ |> MarkerSelectionStyle.style(
27
+ ?Opacity = Opacity,
28
+ ?Color = Color,
29
+ ?Size = Size
30
+ )
31
+
32
+ /// <summary>
33
+ /// Returns a function that applies the given styles to a MarkerSelectionStyle object
34
+ /// </summary>
35
+ /// <param name="Opacity">Sets the opacity of the selected/unselected markers</param>
36
+ /// <param name="Color">Sets the color of the selected/unselected markers</param>
37
+ /// <param name="Size">Sets the size of the selected/unselected markers</param>
38
+ static member style
39
+ (
40
+ [<Optional; DefaultParameterValue( null ) >] ? Opacity : float ,
41
+ [<Optional; DefaultParameterValue( null ) >] ? Color : Color ,
42
+ [<Optional; DefaultParameterValue( null ) >] ? Size : int
43
+ ) =
44
+ ( fun ( markerSelectionStyle : MarkerSelectionStyle ) ->
45
+
46
+ Opacity |> DynObj.setValueOpt markerSelectionStyle " opacity"
47
+ Color |> DynObj.setValueOpt markerSelectionStyle " color"
48
+ Size |> DynObj.setValueOpt markerSelectionStyle " size"
49
+
50
+ markerSelectionStyle)
51
+
52
+ /// <summary>Controls the style of selected lines in supported traces</summary>
53
+ type LineSelectionStyle () =
54
+ inherit DynamicObj()
55
+
56
+ /// <summary>
57
+ /// Returns a new LineSelectionStyle object with the given styles
58
+ /// </summary>
59
+ /// <param name="Opacity">Sets the opacity of the selected/unselected lines</param>
60
+ /// <param name="Color">Sets the color of the selected/unselected lines</param>
61
+ static member init
62
+ (
63
+ [<Optional; DefaultParameterValue( null ) >] ? Opacity : float ,
64
+ [<Optional; DefaultParameterValue( null ) >] ? Color : Color
65
+ ) =
66
+ LineSelectionStyle()
67
+ |> LineSelectionStyle.style(
68
+ ?Opacity = Opacity,
69
+ ?Color = Color
70
+ )
71
+
72
+ /// <summary>
73
+ /// Returns a function that applies the given styles to a LineSelectionStyle object
74
+ /// </summary>
75
+ /// <param name="Opacity">Sets the opacity of the selected/unselected lines</param>
76
+ /// <param name="Color">Sets the color of the selected/unselected lines</param>
77
+ static member style
78
+ (
79
+ [<Optional; DefaultParameterValue( null ) >] ? Opacity : float ,
80
+ [<Optional; DefaultParameterValue( null ) >] ? Color : Color
81
+ ) =
82
+ ( fun ( lineSelectionStyle : LineSelectionStyle ) ->
83
+
84
+ Opacity |> DynObj.setValueOpt lineSelectionStyle " opacity"
85
+ Color |> DynObj.setValueOpt lineSelectionStyle " color"
86
+
87
+ lineSelectionStyle)
88
+
89
+ /// <summary>Controls the style of selected text in supported traces</summary>
90
+ type FontSelectionStyle () =
91
+ inherit DynamicObj()
92
+
93
+ /// <summary>
94
+ /// Returns a new FontSelectionStyle object with the given styles
95
+ /// </summary>
96
+ /// <param name="Color">Sets the color of the selected/unselected text</param>
97
+ static member init
98
+ (
99
+ [<Optional; DefaultParameterValue( null ) >] ? Color : Color
100
+ ) =
101
+ FontSelectionStyle()
102
+ |> FontSelectionStyle.style(
103
+ ?Color = Color
104
+ )
105
+
106
+ /// <summary>
107
+ /// Returns a function that applies the given styles to a FontSelectionStyle object
108
+ /// </summary>
109
+ /// <param name="Color">Sets the color of the selected/unselected text</param>
110
+ static member style
111
+ (
112
+ [<Optional; DefaultParameterValue( null ) >] ? Color : Color
113
+ ) =
114
+ ( fun ( fontSelectionStyle : FontSelectionStyle ) ->
115
+
116
+ Color |> DynObj.setValueOpt fontSelectionStyle " color"
117
+
118
+ fontSelectionStyle)
119
+
9
120
/// <summary>
10
121
/// Used to control selected/unselected trace item styles in supported traces.
11
122
/// </summary>
@@ -15,51 +126,38 @@ type TraceSelection() =
15
126
/// <summary>
16
127
/// Returns a new TraceSelection object with the given styles
17
128
/// </summary>
18
- /// <param name="MarkerOpacity">Sets the opacity of the selected/unselected trace items</param>
19
- /// <param name="MarkerColor">Sets the color of the selected/unselected trace items</param>
20
- /// <param name="MarkerSize">Sets the size of the selected/unselected trace items</param>
21
- /// <param name="FontColor">Sets the opfont of the selected/unselected trace items</param>
129
+ /// <param name="MarkerSelectionStyle">Sets the styles of the selected/unselected markers</param>
130
+ /// <param name="LineSelectionStyle">Sets the styles of the selected/unselected lines</param>
131
+ /// <param name="FontSelectionStyle">Sets the styles of the selected/unselected texts</param>
22
132
static member init
23
133
(
24
- [<Optional; DefaultParameterValue( null ) >] ? MarkerOpacity : float ,
25
- [<Optional; DefaultParameterValue( null ) >] ? MarkerColor : Color ,
26
- [<Optional; DefaultParameterValue( null ) >] ? MarkerSize : int ,
27
- [<Optional; DefaultParameterValue( null ) >] ? FontColor : Color
134
+ [<Optional; DefaultParameterValue( null ) >] ? MarkerSelectionStyle : MarkerSelectionStyle ,
135
+ [<Optional; DefaultParameterValue( null ) >] ? LineSelectionStyle : LineSelectionStyle ,
136
+ [<Optional; DefaultParameterValue( null ) >] ? FontSelectionStyle : FontSelectionStyle
28
137
) =
29
- TraceSelection()
30
- |> TraceSelection.style(
31
- ?MarkerOpacity = MarkerOpacity,
32
- ?MarkerColor = MarkerColor,
33
- ?MarkerSize = MarkerSize,
34
- ?FontColor = FontColor
35
- )
138
+ TraceSelection()
139
+ |> TraceSelection.style(
140
+ ?MarkerSelectionStyle = MarkerSelectionStyle,
141
+ ?LineSelectionStyle = LineSelectionStyle,
142
+ ?FontSelectionStyle = FontSelectionStyle
143
+ )
36
144
37
145
/// <summary>
38
146
/// Returns a function that applies the given styles to a TraceSelection object
39
147
/// </summary>
40
- /// <param name="MarkerOpacity">Sets the opacity of the selected/unselected trace items</param>
41
- /// <param name="MarkerColor">Sets the color of the selected/unselected trace items</param>
42
- /// <param name="MarkerSize">Sets the size of the selected/unselected trace items</param>
43
- /// <param name="FontColor">Sets the opfont of the selected/unselected trace items</param>
148
+ /// <param name="MarkerSelectionStyle">Sets the styles of the selected/unselected markers</param>
149
+ /// <param name="LineSelectionStyle">Sets the styles of the selected/unselected lines</param>
150
+ /// <param name="FontSelectionStyle">Sets the styles of the selected/unselected texts</param>
44
151
static member style
45
152
(
46
- [<Optional; DefaultParameterValue( null ) >] ? MarkerOpacity : float ,
47
- [<Optional; DefaultParameterValue( null ) >] ? MarkerColor : Color ,
48
- [<Optional; DefaultParameterValue( null ) >] ? MarkerSize : int ,
49
- [<Optional; DefaultParameterValue( null ) >] ? FontColor : Color
50
- ) =
153
+ [<Optional; DefaultParameterValue( null ) >] ? MarkerSelectionStyle : MarkerSelectionStyle ,
154
+ [<Optional; DefaultParameterValue( null ) >] ? LineSelectionStyle : LineSelectionStyle ,
155
+ [<Optional; DefaultParameterValue( null ) >] ? FontSelectionStyle : FontSelectionStyle
156
+ ) =
51
157
( fun ( traceSelection : TraceSelection ) ->
52
158
53
- let markerSelectionStyle =
54
- Marker.init(
55
- ?Opacity = MarkerOpacity,
56
- ?Color = MarkerColor,
57
- ?Size = MarkerSize
58
- )
59
-
60
- let fontSelectionStyle = Font.init( ?Color = FontColor)
61
-
62
- markerSelectionStyle |> DynObj.setValue traceSelection " marker"
63
- fontSelectionStyle |> DynObj.setValue traceSelection " textfont"
159
+ MarkerSelectionStyle |> DynObj.setValueOpt traceSelection " marker"
160
+ LineSelectionStyle |> DynObj.setValueOpt traceSelection " line"
161
+ FontSelectionStyle |> DynObj.setValueOpt traceSelection " font"
64
162
65
163
traceSelection)
0 commit comments