diff options
Diffstat (limited to 'src/WixToolset.Core/Compiler_UI.cs')
-rw-r--r-- | src/WixToolset.Core/Compiler_UI.cs | 170 |
1 files changed, 85 insertions, 85 deletions
diff --git a/src/WixToolset.Core/Compiler_UI.cs b/src/WixToolset.Core/Compiler_UI.cs index 9038f727..1ecf4f64 100644 --- a/src/WixToolset.Core/Compiler_UI.cs +++ b/src/WixToolset.Core/Compiler_UI.cs | |||
@@ -6,7 +6,7 @@ namespace WixToolset.Core | |||
6 | using System.Collections; | 6 | using System.Collections; |
7 | using System.Xml.Linq; | 7 | using System.Xml.Linq; |
8 | using WixToolset.Data; | 8 | using WixToolset.Data; |
9 | using WixToolset.Data.Tuples; | 9 | using WixToolset.Data.Symbols; |
10 | using WixToolset.Data.WindowsInstaller; | 10 | using WixToolset.Data.WindowsInstaller; |
11 | using WixToolset.Extensibility; | 11 | using WixToolset.Extensibility; |
12 | 12 | ||
@@ -70,13 +70,13 @@ namespace WixToolset.Core | |||
70 | this.ParseBillboardActionElement(child); | 70 | this.ParseBillboardActionElement(child); |
71 | break; | 71 | break; |
72 | case "ComboBox": | 72 | case "ComboBox": |
73 | this.ParseControlGroupElement(child, TupleDefinitionType.ComboBox, "ListItem"); | 73 | this.ParseControlGroupElement(child, SymbolDefinitionType.ComboBox, "ListItem"); |
74 | break; | 74 | break; |
75 | case "Dialog": | 75 | case "Dialog": |
76 | this.ParseDialogElement(child); | 76 | this.ParseDialogElement(child); |
77 | break; | 77 | break; |
78 | case "DialogRef": | 78 | case "DialogRef": |
79 | this.ParseSimpleRefElement(child, TupleDefinitions.Dialog); | 79 | this.ParseSimpleRefElement(child, SymbolDefinitions.Dialog); |
80 | break; | 80 | break; |
81 | case "EmbeddedUI": | 81 | case "EmbeddedUI": |
82 | if (0 < embeddedUICount) // there can be only one embedded UI | 82 | if (0 < embeddedUICount) // there can be only one embedded UI |
@@ -91,10 +91,10 @@ namespace WixToolset.Core | |||
91 | this.ParseErrorElement(child); | 91 | this.ParseErrorElement(child); |
92 | break; | 92 | break; |
93 | case "ListBox": | 93 | case "ListBox": |
94 | this.ParseControlGroupElement(child, TupleDefinitionType.ListBox, "ListItem"); | 94 | this.ParseControlGroupElement(child, SymbolDefinitionType.ListBox, "ListItem"); |
95 | break; | 95 | break; |
96 | case "ListView": | 96 | case "ListView": |
97 | this.ParseControlGroupElement(child, TupleDefinitionType.ListView, "ListItem"); | 97 | this.ParseControlGroupElement(child, SymbolDefinitionType.ListView, "ListItem"); |
98 | break; | 98 | break; |
99 | case "ProgressText": | 99 | case "ProgressText": |
100 | this.ParseActionTextElement(child); | 100 | this.ParseActionTextElement(child); |
@@ -132,10 +132,10 @@ namespace WixToolset.Core | |||
132 | this.ParsePropertyElement(child); | 132 | this.ParsePropertyElement(child); |
133 | break; | 133 | break; |
134 | case "PropertyRef": | 134 | case "PropertyRef": |
135 | this.ParseSimpleRefElement(child, TupleDefinitions.Property); | 135 | this.ParseSimpleRefElement(child, SymbolDefinitions.Property); |
136 | break; | 136 | break; |
137 | case "UIRef": | 137 | case "UIRef": |
138 | this.ParseSimpleRefElement(child, TupleDefinitions.WixUI); | 138 | this.ParseSimpleRefElement(child, SymbolDefinitions.WixUI); |
139 | break; | 139 | break; |
140 | 140 | ||
141 | default: | 141 | default: |
@@ -151,7 +151,7 @@ namespace WixToolset.Core | |||
151 | 151 | ||
152 | if (null != id && !this.Core.EncounteredError) | 152 | if (null != id && !this.Core.EncounteredError) |
153 | { | 153 | { |
154 | this.Core.AddTuple(new WixUITuple(sourceLineNumbers, id)); | 154 | this.Core.AddSymbol(new WixUISymbol(sourceLineNumbers, id)); |
155 | } | 155 | } |
156 | } | 156 | } |
157 | 157 | ||
@@ -159,10 +159,10 @@ namespace WixToolset.Core | |||
159 | /// Parses a list item element. | 159 | /// Parses a list item element. |
160 | /// </summary> | 160 | /// </summary> |
161 | /// <param name="node">Element to parse.</param> | 161 | /// <param name="node">Element to parse.</param> |
162 | /// <param name="tupleType">Type of tuple to create.</param> | 162 | /// <param name="symbolType">Type of symbol to create.</param> |
163 | /// <param name="property">Identifier of property referred to by list item.</param> | 163 | /// <param name="property">Identifier of property referred to by list item.</param> |
164 | /// <param name="order">Relative order of list items.</param> | 164 | /// <param name="order">Relative order of list items.</param> |
165 | private void ParseListItemElement(XElement node, TupleDefinitionType tupleType, string property, ref int order) | 165 | private void ParseListItemElement(XElement node, SymbolDefinitionType symbolType, string property, ref int order) |
166 | { | 166 | { |
167 | var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); | 167 | var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); |
168 | string icon = null; | 168 | string icon = null; |
@@ -176,10 +176,10 @@ namespace WixToolset.Core | |||
176 | switch (attrib.Name.LocalName) | 176 | switch (attrib.Name.LocalName) |
177 | { | 177 | { |
178 | case "Icon": | 178 | case "Icon": |
179 | if (TupleDefinitionType.ListView == tupleType) | 179 | if (SymbolDefinitionType.ListView == symbolType) |
180 | { | 180 | { |
181 | icon = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | 181 | icon = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); |
182 | this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Binary, icon); | 182 | this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Binary, icon); |
183 | } | 183 | } |
184 | else | 184 | else |
185 | { | 185 | { |
@@ -212,10 +212,10 @@ namespace WixToolset.Core | |||
212 | 212 | ||
213 | if (!this.Core.EncounteredError) | 213 | if (!this.Core.EncounteredError) |
214 | { | 214 | { |
215 | switch (tupleType) | 215 | switch (symbolType) |
216 | { | 216 | { |
217 | case TupleDefinitionType.ComboBox: | 217 | case SymbolDefinitionType.ComboBox: |
218 | this.Core.AddTuple(new ComboBoxTuple(sourceLineNumbers) | 218 | this.Core.AddSymbol(new ComboBoxSymbol(sourceLineNumbers) |
219 | { | 219 | { |
220 | Property = property, | 220 | Property = property, |
221 | Order = ++order, | 221 | Order = ++order, |
@@ -223,8 +223,8 @@ namespace WixToolset.Core | |||
223 | Text = text, | 223 | Text = text, |
224 | }); | 224 | }); |
225 | break; | 225 | break; |
226 | case TupleDefinitionType.ListBox: | 226 | case SymbolDefinitionType.ListBox: |
227 | this.Core.AddTuple(new ListBoxTuple(sourceLineNumbers) | 227 | this.Core.AddSymbol(new ListBoxSymbol(sourceLineNumbers) |
228 | { | 228 | { |
229 | Property = property, | 229 | Property = property, |
230 | Order = ++order, | 230 | Order = ++order, |
@@ -232,8 +232,8 @@ namespace WixToolset.Core | |||
232 | Text = text, | 232 | Text = text, |
233 | }); | 233 | }); |
234 | break; | 234 | break; |
235 | case TupleDefinitionType.ListView: | 235 | case SymbolDefinitionType.ListView: |
236 | var tuple = this.Core.AddTuple(new ListViewTuple(sourceLineNumbers) | 236 | var symbol = this.Core.AddSymbol(new ListViewSymbol(sourceLineNumbers) |
237 | { | 237 | { |
238 | Property = property, | 238 | Property = property, |
239 | Order = ++order, | 239 | Order = ++order, |
@@ -243,11 +243,11 @@ namespace WixToolset.Core | |||
243 | 243 | ||
244 | if (null != icon) | 244 | if (null != icon) |
245 | { | 245 | { |
246 | tuple.BinaryRef = icon; | 246 | symbol.BinaryRef = icon; |
247 | } | 247 | } |
248 | break; | 248 | break; |
249 | default: | 249 | default: |
250 | throw new ArgumentOutOfRangeException(nameof(tupleType)); | 250 | throw new ArgumentOutOfRangeException(nameof(symbolType)); |
251 | } | 251 | } |
252 | } | 252 | } |
253 | } | 253 | } |
@@ -284,7 +284,7 @@ namespace WixToolset.Core | |||
284 | this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttributes(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "Icon", "Text")); | 284 | this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttributes(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "Icon", "Text")); |
285 | } | 285 | } |
286 | text = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | 286 | text = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); |
287 | this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Binary, text); | 287 | this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Binary, text); |
288 | type = RadioButtonType.Bitmap; | 288 | type = RadioButtonType.Bitmap; |
289 | break; | 289 | break; |
290 | case "Height": | 290 | case "Height": |
@@ -299,7 +299,7 @@ namespace WixToolset.Core | |||
299 | this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttributes(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "Bitmap", "Text")); | 299 | this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttributes(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "Bitmap", "Text")); |
300 | } | 300 | } |
301 | text = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | 301 | text = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); |
302 | this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Binary, text); | 302 | this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Binary, text); |
303 | type = RadioButtonType.Icon; | 303 | type = RadioButtonType.Icon; |
304 | break; | 304 | break; |
305 | case "Text": | 305 | case "Text": |
@@ -365,7 +365,7 @@ namespace WixToolset.Core | |||
365 | 365 | ||
366 | if (!this.Core.EncounteredError) | 366 | if (!this.Core.EncounteredError) |
367 | { | 367 | { |
368 | var tuple = this.Core.AddTuple(new RadioButtonTuple(sourceLineNumbers) | 368 | var symbol = this.Core.AddSymbol(new RadioButtonSymbol(sourceLineNumbers) |
369 | { | 369 | { |
370 | Property = property, | 370 | Property = property, |
371 | Order = ++order, | 371 | Order = ++order, |
@@ -374,10 +374,10 @@ namespace WixToolset.Core | |||
374 | Help = (null != tooltip || null != help) ? String.Concat(tooltip, "|", help) : null | 374 | Help = (null != tooltip || null != help) ? String.Concat(tooltip, "|", help) : null |
375 | }); | 375 | }); |
376 | 376 | ||
377 | tuple.Set((int)RadioButtonTupleFields.X, x); | 377 | symbol.Set((int)RadioButtonSymbolFields.X, x); |
378 | tuple.Set((int)RadioButtonTupleFields.Y, y); | 378 | symbol.Set((int)RadioButtonSymbolFields.Y, y); |
379 | tuple.Set((int)RadioButtonTupleFields.Width, width); | 379 | symbol.Set((int)RadioButtonSymbolFields.Width, width); |
380 | tuple.Set((int)RadioButtonTupleFields.Height, height); | 380 | symbol.Set((int)RadioButtonSymbolFields.Height, height); |
381 | } | 381 | } |
382 | 382 | ||
383 | return type; | 383 | return type; |
@@ -401,7 +401,7 @@ namespace WixToolset.Core | |||
401 | { | 401 | { |
402 | case "Id": | 402 | case "Id": |
403 | action = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | 403 | action = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); |
404 | this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.WixAction, "InstallExecuteSequence", action); | 404 | this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.WixAction, "InstallExecuteSequence", action); |
405 | break; | 405 | break; |
406 | default: | 406 | default: |
407 | this.Core.UnexpectedAttribute(node, attrib); | 407 | this.Core.UnexpectedAttribute(node, attrib); |
@@ -464,7 +464,7 @@ namespace WixToolset.Core | |||
464 | break; | 464 | break; |
465 | case "Feature": | 465 | case "Feature": |
466 | feature = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | 466 | feature = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); |
467 | this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Feature, feature); | 467 | this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Feature, feature); |
468 | break; | 468 | break; |
469 | default: | 469 | default: |
470 | this.Core.UnexpectedAttribute(node, attrib); | 470 | this.Core.UnexpectedAttribute(node, attrib); |
@@ -490,12 +490,12 @@ namespace WixToolset.Core | |||
490 | { | 490 | { |
491 | case "Control": | 491 | case "Control": |
492 | // These are all thrown away. | 492 | // These are all thrown away. |
493 | ControlTuple lastTabTuple = null; | 493 | ControlSymbol lastTabSymbol = null; |
494 | string firstControl = null; | 494 | string firstControl = null; |
495 | string defaultControl = null; | 495 | string defaultControl = null; |
496 | string cancelControl = null; | 496 | string cancelControl = null; |
497 | 497 | ||
498 | this.ParseControlElement(child, id.Id, TupleDefinitionType.BBControl, ref lastTabTuple, ref firstControl, ref defaultControl, ref cancelControl); | 498 | this.ParseControlElement(child, id.Id, SymbolDefinitionType.BBControl, ref lastTabSymbol, ref firstControl, ref defaultControl, ref cancelControl); |
499 | break; | 499 | break; |
500 | default: | 500 | default: |
501 | this.Core.UnexpectedElement(node, child); | 501 | this.Core.UnexpectedElement(node, child); |
@@ -511,7 +511,7 @@ namespace WixToolset.Core | |||
511 | 511 | ||
512 | if (!this.Core.EncounteredError) | 512 | if (!this.Core.EncounteredError) |
513 | { | 513 | { |
514 | this.Core.AddTuple(new BillboardTuple(sourceLineNumbers, id) | 514 | this.Core.AddSymbol(new BillboardSymbol(sourceLineNumbers, id) |
515 | { | 515 | { |
516 | FeatureRef = feature, | 516 | FeatureRef = feature, |
517 | Action = action, | 517 | Action = action, |
@@ -524,9 +524,9 @@ namespace WixToolset.Core | |||
524 | /// Parses a control group element. | 524 | /// Parses a control group element. |
525 | /// </summary> | 525 | /// </summary> |
526 | /// <param name="node">Element to parse.</param> | 526 | /// <param name="node">Element to parse.</param> |
527 | /// <param name="tupleType">Tuple type referred to by control group.</param> | 527 | /// <param name="symbolType">Symbol type referred to by control group.</param> |
528 | /// <param name="childTag">Expected child elements.</param> | 528 | /// <param name="childTag">Expected child elements.</param> |
529 | private void ParseControlGroupElement(XElement node, TupleDefinitionType tupleType, string childTag) | 529 | private void ParseControlGroupElement(XElement node, SymbolDefinitionType symbolType, string childTag) |
530 | { | 530 | { |
531 | var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); | 531 | var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); |
532 | var order = 0; | 532 | var order = 0; |
@@ -569,7 +569,7 @@ namespace WixToolset.Core | |||
569 | switch (child.Name.LocalName) | 569 | switch (child.Name.LocalName) |
570 | { | 570 | { |
571 | case "ListItem": | 571 | case "ListItem": |
572 | this.ParseListItemElement(child, tupleType, property, ref order); | 572 | this.ParseListItemElement(child, symbolType, property, ref order); |
573 | break; | 573 | break; |
574 | case "Property": | 574 | case "Property": |
575 | this.ParsePropertyElement(child); | 575 | this.ParsePropertyElement(child); |
@@ -607,7 +607,7 @@ namespace WixToolset.Core | |||
607 | { | 607 | { |
608 | case "Property": | 608 | case "Property": |
609 | property = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | 609 | property = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); |
610 | this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Property, property); | 610 | this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Property, property); |
611 | break; | 611 | break; |
612 | default: | 612 | default: |
613 | this.Core.UnexpectedAttribute(node, attrib); | 613 | this.Core.UnexpectedAttribute(node, attrib); |
@@ -704,7 +704,7 @@ namespace WixToolset.Core | |||
704 | 704 | ||
705 | if (!this.Core.EncounteredError) | 705 | if (!this.Core.EncounteredError) |
706 | { | 706 | { |
707 | this.Core.AddTuple(new ActionTextTuple(sourceLineNumbers) | 707 | this.Core.AddSymbol(new ActionTextSymbol(sourceLineNumbers) |
708 | { | 708 | { |
709 | Action = action, | 709 | Action = action, |
710 | Description = message, | 710 | Description = message, |
@@ -755,7 +755,7 @@ namespace WixToolset.Core | |||
755 | 755 | ||
756 | if (!this.Core.EncounteredError) | 756 | if (!this.Core.EncounteredError) |
757 | { | 757 | { |
758 | this.Core.AddTuple(new UITextTuple(sourceLineNumbers, id) | 758 | this.Core.AddSymbol(new UITextSymbol(sourceLineNumbers, id) |
759 | { | 759 | { |
760 | Text = text, | 760 | Text = text, |
761 | }); | 761 | }); |
@@ -860,7 +860,7 @@ namespace WixToolset.Core | |||
860 | 860 | ||
861 | if (!this.Core.EncounteredError) | 861 | if (!this.Core.EncounteredError) |
862 | { | 862 | { |
863 | var tuple = this.Core.AddTuple(new TextStyleTuple(sourceLineNumbers, id) | 863 | var symbol = this.Core.AddSymbol(new TextStyleSymbol(sourceLineNumbers, id) |
864 | { | 864 | { |
865 | FaceName = faceName, | 865 | FaceName = faceName, |
866 | Red = red, | 866 | Red = red, |
@@ -872,7 +872,7 @@ namespace WixToolset.Core | |||
872 | Underline = underline, | 872 | Underline = underline, |
873 | }); | 873 | }); |
874 | 874 | ||
875 | tuple.Set((int)TextStyleTupleFields.Size, size); | 875 | symbol.Set((int)TextStyleSymbolFields.Size, size); |
876 | } | 876 | } |
877 | } | 877 | } |
878 | 878 | ||
@@ -976,7 +976,7 @@ namespace WixToolset.Core | |||
976 | id = Identifier.Invalid; | 976 | id = Identifier.Invalid; |
977 | } | 977 | } |
978 | 978 | ||
979 | ControlTuple lastTabTuple = null; | 979 | ControlSymbol lastTabSymbol = null; |
980 | string cancelControl = null; | 980 | string cancelControl = null; |
981 | string defaultControl = null; | 981 | string defaultControl = null; |
982 | string firstControl = null; | 982 | string firstControl = null; |
@@ -988,7 +988,7 @@ namespace WixToolset.Core | |||
988 | switch (child.Name.LocalName) | 988 | switch (child.Name.LocalName) |
989 | { | 989 | { |
990 | case "Control": | 990 | case "Control": |
991 | this.ParseControlElement(child, id.Id, TupleDefinitionType.Control, ref lastTabTuple, ref firstControl, ref defaultControl, ref cancelControl); | 991 | this.ParseControlElement(child, id.Id, SymbolDefinitionType.Control, ref lastTabSymbol, ref firstControl, ref defaultControl, ref cancelControl); |
992 | break; | 992 | break; |
993 | default: | 993 | default: |
994 | this.Core.UnexpectedElement(node, child); | 994 | this.Core.UnexpectedElement(node, child); |
@@ -1001,11 +1001,11 @@ namespace WixToolset.Core | |||
1001 | } | 1001 | } |
1002 | } | 1002 | } |
1003 | 1003 | ||
1004 | if (null != lastTabTuple && null != lastTabTuple.Control) | 1004 | if (null != lastTabSymbol && null != lastTabSymbol.Control) |
1005 | { | 1005 | { |
1006 | if (firstControl != lastTabTuple.Control) | 1006 | if (firstControl != lastTabSymbol.Control) |
1007 | { | 1007 | { |
1008 | lastTabTuple.NextControlRef = firstControl; | 1008 | lastTabSymbol.NextControlRef = firstControl; |
1009 | } | 1009 | } |
1010 | } | 1010 | } |
1011 | 1011 | ||
@@ -1016,7 +1016,7 @@ namespace WixToolset.Core | |||
1016 | 1016 | ||
1017 | if (!this.Core.EncounteredError) | 1017 | if (!this.Core.EncounteredError) |
1018 | { | 1018 | { |
1019 | this.Core.AddTuple(new DialogTuple(sourceLineNumbers, id) | 1019 | this.Core.AddSymbol(new DialogSymbol(sourceLineNumbers, id) |
1020 | { | 1020 | { |
1021 | HCentering = x, | 1021 | HCentering = x, |
1022 | VCentering = y, | 1022 | VCentering = y, |
@@ -1047,12 +1047,12 @@ namespace WixToolset.Core | |||
1047 | /// <param name="node">Element to parse.</param> | 1047 | /// <param name="node">Element to parse.</param> |
1048 | /// <param name="dialog">Identifier for parent dialog.</param> | 1048 | /// <param name="dialog">Identifier for parent dialog.</param> |
1049 | /// <param name="table">Table control belongs in.</param> | 1049 | /// <param name="table">Table control belongs in.</param> |
1050 | /// <param name="lastTabTuple">Last control in the tab order.</param> | 1050 | /// <param name="lastTabSymbol">Last control in the tab order.</param> |
1051 | /// <param name="firstControl">Name of the first control in the tab order.</param> | 1051 | /// <param name="firstControl">Name of the first control in the tab order.</param> |
1052 | /// <param name="defaultControl">Name of the default control.</param> | 1052 | /// <param name="defaultControl">Name of the default control.</param> |
1053 | /// <param name="cancelControl">Name of the candle control.</param> | 1053 | /// <param name="cancelControl">Name of the candle control.</param> |
1054 | /// <param name="trackDiskSpace">True if the containing dialog tracks disk space.</param> | 1054 | /// <param name="trackDiskSpace">True if the containing dialog tracks disk space.</param> |
1055 | private void ParseControlElement(XElement node, string dialog, TupleDefinitionType tupleType, ref ControlTuple lastTabTuple, ref string firstControl, ref string defaultControl, ref string cancelControl) | 1055 | private void ParseControlElement(XElement node, string dialog, SymbolDefinitionType symbolType, ref ControlSymbol lastTabSymbol, ref string firstControl, ref string defaultControl, ref string cancelControl) |
1056 | { | 1056 | { |
1057 | var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); | 1057 | var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); |
1058 | Identifier controlId = null; | 1058 | Identifier controlId = null; |
@@ -1379,13 +1379,13 @@ namespace WixToolset.Core | |||
1379 | this.ParseBinaryElement(child); | 1379 | this.ParseBinaryElement(child); |
1380 | break; | 1380 | break; |
1381 | case "ComboBox": | 1381 | case "ComboBox": |
1382 | this.ParseControlGroupElement(child, TupleDefinitionType.ComboBox, "ListItem"); | 1382 | this.ParseControlGroupElement(child, SymbolDefinitionType.ComboBox, "ListItem"); |
1383 | break; | 1383 | break; |
1384 | case "ListBox": | 1384 | case "ListBox": |
1385 | this.ParseControlGroupElement(child, TupleDefinitionType.ListBox, "ListItem"); | 1385 | this.ParseControlGroupElement(child, SymbolDefinitionType.ListBox, "ListItem"); |
1386 | break; | 1386 | break; |
1387 | case "ListView": | 1387 | case "ListView": |
1388 | this.ParseControlGroupElement(child, TupleDefinitionType.ListView, "ListItem"); | 1388 | this.ParseControlGroupElement(child, SymbolDefinitionType.ListView, "ListItem"); |
1389 | break; | 1389 | break; |
1390 | case "Property": | 1390 | case "Property": |
1391 | this.ParsePropertyElement(child); | 1391 | this.ParsePropertyElement(child); |
@@ -1454,7 +1454,7 @@ namespace WixToolset.Core | |||
1454 | } | 1454 | } |
1455 | 1455 | ||
1456 | // the logic for creating control rows is a little tricky because of the way tabable controls are set | 1456 | // the logic for creating control rows is a little tricky because of the way tabable controls are set |
1457 | IntermediateTuple tuple = null; | 1457 | IntermediateSymbol symbol = null; |
1458 | if (!this.Core.EncounteredError) | 1458 | if (!this.Core.EncounteredError) |
1459 | { | 1459 | { |
1460 | if ("CheckBox" == controlType) | 1460 | if ("CheckBox" == controlType) |
@@ -1469,7 +1469,7 @@ namespace WixToolset.Core | |||
1469 | } | 1469 | } |
1470 | else if (!String.IsNullOrEmpty(property)) | 1470 | else if (!String.IsNullOrEmpty(property)) |
1471 | { | 1471 | { |
1472 | this.Core.AddTuple(new CheckBoxTuple(sourceLineNumbers) | 1472 | this.Core.AddSymbol(new CheckBoxSymbol(sourceLineNumbers) |
1473 | { | 1473 | { |
1474 | Property = property, | 1474 | Property = property, |
1475 | Value = checkboxValue, | 1475 | Value = checkboxValue, |
@@ -1477,15 +1477,15 @@ namespace WixToolset.Core | |||
1477 | } | 1477 | } |
1478 | else | 1478 | else |
1479 | { | 1479 | { |
1480 | this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.CheckBox, checkBoxPropertyRef); | 1480 | this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.CheckBox, checkBoxPropertyRef); |
1481 | } | 1481 | } |
1482 | } | 1482 | } |
1483 | 1483 | ||
1484 | var id = new Identifier(controlId.Access, dialog, controlId.Id); | 1484 | var id = new Identifier(controlId.Access, dialog, controlId.Id); |
1485 | 1485 | ||
1486 | if (TupleDefinitionType.BBControl == tupleType) | 1486 | if (SymbolDefinitionType.BBControl == symbolType) |
1487 | { | 1487 | { |
1488 | var bbTuple = this.Core.AddTuple(new BBControlTuple(sourceLineNumbers, id) | 1488 | var bbSymbol = this.Core.AddSymbol(new BBControlSymbol(sourceLineNumbers, id) |
1489 | { | 1489 | { |
1490 | BillboardRef = dialog, | 1490 | BillboardRef = dialog, |
1491 | BBControl = controlId.Id, | 1491 | BBControl = controlId.Id, |
@@ -1503,16 +1503,16 @@ namespace WixToolset.Core | |||
1503 | SourceFile = String.IsNullOrEmpty(sourceFile) ? null : new IntermediateFieldPathValue { Path = sourceFile } | 1503 | SourceFile = String.IsNullOrEmpty(sourceFile) ? null : new IntermediateFieldPathValue { Path = sourceFile } |
1504 | }); | 1504 | }); |
1505 | 1505 | ||
1506 | bbTuple.Set((int)BBControlTupleFields.X, x); | 1506 | bbSymbol.Set((int)BBControlSymbolFields.X, x); |
1507 | bbTuple.Set((int)BBControlTupleFields.Y, y); | 1507 | bbSymbol.Set((int)BBControlSymbolFields.Y, y); |
1508 | bbTuple.Set((int)BBControlTupleFields.Width, width); | 1508 | bbSymbol.Set((int)BBControlSymbolFields.Width, width); |
1509 | bbTuple.Set((int)BBControlTupleFields.Height, height); | 1509 | bbSymbol.Set((int)BBControlSymbolFields.Height, height); |
1510 | 1510 | ||
1511 | tuple = bbTuple; | 1511 | symbol = bbSymbol; |
1512 | } | 1512 | } |
1513 | else | 1513 | else |
1514 | { | 1514 | { |
1515 | var controlTuple = this.Core.AddTuple(new ControlTuple(sourceLineNumbers, id) | 1515 | var controlSymbol = this.Core.AddSymbol(new ControlSymbol(sourceLineNumbers, id) |
1516 | { | 1516 | { |
1517 | DialogRef = dialog, | 1517 | DialogRef = dialog, |
1518 | Control = controlId.Id, | 1518 | Control = controlId.Id, |
@@ -1532,17 +1532,17 @@ namespace WixToolset.Core | |||
1532 | SourceFile = String.IsNullOrEmpty(sourceFile) ? null : new IntermediateFieldPathValue { Path = sourceFile } | 1532 | SourceFile = String.IsNullOrEmpty(sourceFile) ? null : new IntermediateFieldPathValue { Path = sourceFile } |
1533 | }); | 1533 | }); |
1534 | 1534 | ||
1535 | controlTuple.Set((int)BBControlTupleFields.X, x); | 1535 | controlSymbol.Set((int)BBControlSymbolFields.X, x); |
1536 | controlTuple.Set((int)BBControlTupleFields.Y, y); | 1536 | controlSymbol.Set((int)BBControlSymbolFields.Y, y); |
1537 | controlTuple.Set((int)BBControlTupleFields.Width, width); | 1537 | controlSymbol.Set((int)BBControlSymbolFields.Width, width); |
1538 | controlTuple.Set((int)BBControlTupleFields.Height, height); | 1538 | controlSymbol.Set((int)BBControlSymbolFields.Height, height); |
1539 | 1539 | ||
1540 | tuple = controlTuple; | 1540 | symbol = controlSymbol; |
1541 | } | 1541 | } |
1542 | 1542 | ||
1543 | if (!String.IsNullOrEmpty(defaultCondition)) | 1543 | if (!String.IsNullOrEmpty(defaultCondition)) |
1544 | { | 1544 | { |
1545 | this.Core.AddTuple(new ControlConditionTuple(sourceLineNumbers) | 1545 | this.Core.AddSymbol(new ControlConditionSymbol(sourceLineNumbers) |
1546 | { | 1546 | { |
1547 | DialogRef = dialog, | 1547 | DialogRef = dialog, |
1548 | ControlRef = controlId.Id, | 1548 | ControlRef = controlId.Id, |
@@ -1553,7 +1553,7 @@ namespace WixToolset.Core | |||
1553 | 1553 | ||
1554 | if (!String.IsNullOrEmpty(enableCondition)) | 1554 | if (!String.IsNullOrEmpty(enableCondition)) |
1555 | { | 1555 | { |
1556 | this.Core.AddTuple(new ControlConditionTuple(sourceLineNumbers) | 1556 | this.Core.AddSymbol(new ControlConditionSymbol(sourceLineNumbers) |
1557 | { | 1557 | { |
1558 | DialogRef = dialog, | 1558 | DialogRef = dialog, |
1559 | ControlRef = controlId.Id, | 1559 | ControlRef = controlId.Id, |
@@ -1564,7 +1564,7 @@ namespace WixToolset.Core | |||
1564 | 1564 | ||
1565 | if (!String.IsNullOrEmpty(disableCondition)) | 1565 | if (!String.IsNullOrEmpty(disableCondition)) |
1566 | { | 1566 | { |
1567 | this.Core.AddTuple(new ControlConditionTuple(sourceLineNumbers) | 1567 | this.Core.AddSymbol(new ControlConditionSymbol(sourceLineNumbers) |
1568 | { | 1568 | { |
1569 | DialogRef = dialog, | 1569 | DialogRef = dialog, |
1570 | ControlRef = controlId.Id, | 1570 | ControlRef = controlId.Id, |
@@ -1575,7 +1575,7 @@ namespace WixToolset.Core | |||
1575 | 1575 | ||
1576 | if (!String.IsNullOrEmpty(hideCondition)) | 1576 | if (!String.IsNullOrEmpty(hideCondition)) |
1577 | { | 1577 | { |
1578 | this.Core.AddTuple(new ControlConditionTuple(sourceLineNumbers) | 1578 | this.Core.AddSymbol(new ControlConditionSymbol(sourceLineNumbers) |
1579 | { | 1579 | { |
1580 | DialogRef = dialog, | 1580 | DialogRef = dialog, |
1581 | ControlRef = controlId.Id, | 1581 | ControlRef = controlId.Id, |
@@ -1586,7 +1586,7 @@ namespace WixToolset.Core | |||
1586 | 1586 | ||
1587 | if (!String.IsNullOrEmpty(showCondition)) | 1587 | if (!String.IsNullOrEmpty(showCondition)) |
1588 | { | 1588 | { |
1589 | this.Core.AddTuple(new ControlConditionTuple(sourceLineNumbers) | 1589 | this.Core.AddSymbol(new ControlConditionSymbol(sourceLineNumbers) |
1590 | { | 1590 | { |
1591 | DialogRef = dialog, | 1591 | DialogRef = dialog, |
1592 | ControlRef = controlId.Id, | 1592 | ControlRef = controlId.Id, |
@@ -1598,15 +1598,15 @@ namespace WixToolset.Core | |||
1598 | 1598 | ||
1599 | if (!notTabbable) | 1599 | if (!notTabbable) |
1600 | { | 1600 | { |
1601 | if (tuple is ControlTuple controlTuple) | 1601 | if (symbol is ControlSymbol controlSymbol) |
1602 | { | 1602 | { |
1603 | if (null != lastTabTuple) | 1603 | if (null != lastTabSymbol) |
1604 | { | 1604 | { |
1605 | lastTabTuple.NextControlRef = controlTuple.Control; | 1605 | lastTabSymbol.NextControlRef = controlSymbol.Control; |
1606 | } | 1606 | } |
1607 | lastTabTuple = controlTuple; | 1607 | lastTabSymbol = controlSymbol; |
1608 | } | 1608 | } |
1609 | else if (tuple != null) | 1609 | else if (symbol != null) |
1610 | { | 1610 | { |
1611 | this.Core.Write(ErrorMessages.TabbableControlNotAllowedInBillboard(sourceLineNumbers, node.Name.LocalName, controlType)); | 1611 | this.Core.Write(ErrorMessages.TabbableControlNotAllowedInBillboard(sourceLineNumbers, node.Name.LocalName, controlType)); |
1612 | } | 1612 | } |
@@ -1621,7 +1621,7 @@ namespace WixToolset.Core | |||
1621 | // add a reference if the identifier of the binary entry is known during compilation | 1621 | // add a reference if the identifier of the binary entry is known during compilation |
1622 | if (("Bitmap" == controlType || "Icon" == controlType) && Common.IsIdentifier(text)) | 1622 | if (("Bitmap" == controlType || "Icon" == controlType) && Common.IsIdentifier(text)) |
1623 | { | 1623 | { |
1624 | this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Binary, text); | 1624 | this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Binary, text); |
1625 | } | 1625 | } |
1626 | } | 1626 | } |
1627 | 1627 | ||
@@ -1665,7 +1665,7 @@ namespace WixToolset.Core | |||
1665 | this.Core.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); | 1665 | this.Core.Write(ErrorMessages.IllegalAttributeWhenNested(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, node.Parent.Name.LocalName)); |
1666 | } | 1666 | } |
1667 | dialog = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | 1667 | dialog = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); |
1668 | this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Dialog, dialog); | 1668 | this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Dialog, dialog); |
1669 | break; | 1669 | break; |
1670 | case "Event": | 1670 | case "Event": |
1671 | controlEvent = Compiler.UppercaseFirstChar(this.Core.GetAttributeValue(sourceLineNumbers, attrib)); | 1671 | controlEvent = Compiler.UppercaseFirstChar(this.Core.GetAttributeValue(sourceLineNumbers, attrib)); |
@@ -1726,7 +1726,7 @@ namespace WixToolset.Core | |||
1726 | 1726 | ||
1727 | if (!this.Core.EncounteredError) | 1727 | if (!this.Core.EncounteredError) |
1728 | { | 1728 | { |
1729 | this.Core.AddTuple(new ControlEventTuple(sourceLineNumbers) | 1729 | this.Core.AddSymbol(new ControlEventSymbol(sourceLineNumbers) |
1730 | { | 1730 | { |
1731 | DialogRef = dialog, | 1731 | DialogRef = dialog, |
1732 | ControlRef = control, | 1732 | ControlRef = control, |
@@ -1739,18 +1739,18 @@ namespace WixToolset.Core | |||
1739 | 1739 | ||
1740 | if ("DoAction" == controlEvent && null != argument) | 1740 | if ("DoAction" == controlEvent && null != argument) |
1741 | { | 1741 | { |
1742 | // if we're not looking at a standard action or a formatted string then create a reference | 1742 | // if we're not looking at a standard action or a formatted string then create a reference |
1743 | // to the custom action. | 1743 | // to the custom action. |
1744 | if (!WindowsInstallerStandard.IsStandardAction(argument) && !Common.ContainsProperty(argument)) | 1744 | if (!WindowsInstallerStandard.IsStandardAction(argument) && !Common.ContainsProperty(argument)) |
1745 | { | 1745 | { |
1746 | this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.CustomAction, argument); | 1746 | this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.CustomAction, argument); |
1747 | } | 1747 | } |
1748 | } | 1748 | } |
1749 | 1749 | ||
1750 | // if we're referring to a dialog but not through a property, add it to the references | 1750 | // if we're referring to a dialog but not through a property, add it to the references |
1751 | if (("NewDialog" == controlEvent || "SpawnDialog" == controlEvent || "SpawnWaitDialog" == controlEvent || "SelectionBrowse" == controlEvent) && Common.IsIdentifier(argument)) | 1751 | if (("NewDialog" == controlEvent || "SpawnDialog" == controlEvent || "SpawnWaitDialog" == controlEvent || "SelectionBrowse" == controlEvent) && Common.IsIdentifier(argument)) |
1752 | { | 1752 | { |
1753 | this.Core.CreateSimpleReference(sourceLineNumbers, TupleDefinitions.Dialog, argument); | 1753 | this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.Dialog, argument); |
1754 | } | 1754 | } |
1755 | } | 1755 | } |
1756 | 1756 | ||
@@ -1793,7 +1793,7 @@ namespace WixToolset.Core | |||
1793 | 1793 | ||
1794 | if (!this.Core.EncounteredError) | 1794 | if (!this.Core.EncounteredError) |
1795 | { | 1795 | { |
1796 | this.Core.AddTuple(new EventMappingTuple(sourceLineNumbers) | 1796 | this.Core.AddSymbol(new EventMappingSymbol(sourceLineNumbers) |
1797 | { | 1797 | { |
1798 | DialogRef = dialog, | 1798 | DialogRef = dialog, |
1799 | ControlRef = control, | 1799 | ControlRef = control, |