2.2.1.7.1.1 FieldInfo Structure

The FieldInfo structure contains details about a text field on the business card. The following diagram specifies the buffer format of the FieldInfo structure.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

TextPropertyID

TextFormat

LabelFormat

FontSize

Reserved

LabelOffset

ValueFontColor

LabelFontColor

TextPropertyID (2 bytes):  A 16-bit value that specifies the property to be used for the text field. The value of the TextPropertyID field MUST be either 0x0000, representing an empty text field, or the property ID of one of the properties specified in section 2.2.1.7.1.1.1.

TextFormat (1 byte):  An 8-bit value that specifies the alignment and formatting for the text field. The following diagram shows the bits and their meanings. If none of the bits are set, the text field is displayed as a single line, left-aligned. The Right align and Center align bits MUST be mutually exclusive.

TextFormat byte table. Bits 0 and 1 must be 0. Bit 2 is center align. Bit 3 is right align. Bit 4 is underline. Bit 5 is italic. Bit 6 is bold. Bit 7 is multiline.

Figure 1: TextFormat byte table

LabelFormat (1 byte):  An 8-bit value that specifies the alignment of a user-provided label that is associated with the text field. The following diagram shows the bits and their meanings. If none of the bits are set, the text field has no label. The Label to the right and Label to the left bits MUST be mutually exclusive.

LabelFormat byte table. Bits 0, 1, 2, 3, and 4 must be 0. Bit 5 is Use right to left reading order. Bit 6 is Label to the left. Bit 7 is Label to the right.

Figure 2: LabelFormat byte table

FontSize (1 byte):  An integer that specifies the font size, in points, of the text field. The font size MUST be between 3 and 32. The font size MUST zero if the text field is displayed as an empty line.

Reserved (1 byte):  This field MUST be set to zero when sent and MUST be ignored when received.

LabelOffset (2 bytes):  An integer that specifies the byte offset into the ExtraInfo field of the PidLidBusinessCardDisplayDefinition property (section 2.2.1.7.1). The offset points to the start of the label string in the ExtraInfo field. The offset MUST be less than the value of the ExtraInfoSize field, which specifies the total size of the ExtraInfo field. If the text field does not have a label, the value of the LabelOffset field MUST be 0xFFFE.

ValueFontColor (4 bytes):  An integer that specifies the color of the text field. The value of the ValueFontColor field has the format 0x00BBGGRR, where the high byte is 0x00, the next highest byte identifies the blue intensity, the next highest byte identifies the green intensity, and the lowest byte identifies the red intensity.

LabelFontColor (4 bytes):  An integer that specifies the color of the label. The value of the LabelFontColor field has the format 0x00BBGGRR, where the high byte is 0x00, the next highest byte identifies the blue intensity, the next highest byte identifies the green intensity, and the lowest byte identifies the red intensity.