Represents a textual or a symbol label.
typedef struct { union { API_Elem_Head head; API_TextType text; API_ObjectType symbol; } u; API_LblClassID labelClass; Int32 filler_1; API_DirID textWay; Int32 filler_2[5]; bool filler_3[2]; short font; unsigned short faceBits; bool flipEnabled; bool nonBreaking; double textSize; bool filler_4; bool useBgFill; short fillBgPen; Int32 effectsBits; short pen; short filler_5; API_AttributeIndex ltypeInd; double contourOffset; bool framed; bool hasLeaderLine; char filler_6[6]; API_ArrowData arrowData; API_LblAnchorID anchorPoint; API_LeaderLineShapeID leaderShape; double squareRootAngle; Int32 filler_7[4]; API_ElemType parentType; bool filler_8[4]; API_Guid parent; API_Coord begC; API_Coord midC; API_Coord endC; bool createAtDefaultPosition; char filler_9[23]; } API_LabelType;
Members
- u::head
- General element header.
- u::text
- Describes the details of the textual label. The
typeID
field of thehead
should be set to API_LabelID (!). - u::symbol
- Describes the details of the symbol label. The
typeID
field of thehead
should be set to API_LabelID (!). - labelClass
- Type (class) of the label (see API_LblClassID).
- textWay
- Direction of text for textual labels (see API_DirID and the picture under Remarks). For labels only
APIDir_Parallel
,APIDir_Horizontal
,APIDir_Vertical
, andAPIDir_General
can be used. - font
- Font attribute index (for symbol labels only).
- faceBits
- Style (face) of text (for symbol labels only):
-
APIFace_Plain
Plain text
APIFace_Bold
Bold
APIFace_Italic
Italic
APIFace_Underline
Underline
APIFace_Outline
Outlined (Macintosh only)
APIFace_Shadow
Shadow (Macintosh only)
- flipEnabled
- True, if the Label is set to be “Always Readable”.
- nonBreaking
- True, if “Wrap Text” is turned off for this Label.
- textSize
- Size of the text in mm (for symbol labels only).
- useBgFill
- Switches opaque background for symbol labels.
- fillBgPen
- Defines the background pen for symbol labels; effective only if
useBgFill
istrue
. - effectsBits
- Text effects to be applied for symbol labels:
-
APIEffect_StrikeOut
Strikethrough text APIEffect_SuperScript
Superscript APIEffect_SubScript
Subscript APIEffect_Fractional
Fractional text (not used) APIEffect_Protected
Protected text (autotext reference) - pen
- Pen attribute index of the leader line.
- ltypeInd
- Line type attribute index of the leader line.
- framed
- Put a frame around the content? (For both Symbol and Text Labels.)
- contourOffset
- The padding of the Label’s frame (i.e. the distance between the frame and the text).
- hasLeaderLine
- Add a Leader Line (i.e. pointer line) to the Label? (For both Symbol and Text Labels.)
- arrowData
- The arrow type.
- anchorPoint
- Anchor point the label pointer line is connected to. See API_LblAnchorID.
- leaderShape
- Leader line shape. For the list of available shapes see API_LeaderLineShapeID.
- squareRootAngle
- Used only if
leaderShape == API_SquareRoot
. Valid range: 1ð <=squareRootAngle
<= 179ÃÂð, in radians. For the meaning of the angle see the picture under Remarks. - parentType
- The type of the parent element is returned in it, or
API_ZombieElemID
if the Label is independent. At Label creation it is ignored.
When getting the Label defaults the labelable element type can be given in it. ACAPI_Element_GetDefaults will return the Label default for the given element type. - parent
- When creating new Labels,
- set this to
APINULLGuid
to create an independent Label; or - set this to the GUID of the owner element (a labelable element) to create an associative Label.
APINULLGuid
, if the Label is independent. It is not allowed to make an existing associative Label independent, or make an existing independent Label associative. - set this to
- begC
- Beginning coordinate of the leader line.
- midC
- Middle coordinate of the leader line.
- endC
- End coordinate of the leader line.
- createAtDefaultPosition
- When creating associative Labels,
- if set to
true
, the Label will be created at its default position (begC
,midC
,endC
is ignored); - if set to
false
, the Label will be created atbegC
,midC
,endC
.
- if set to
Remarks
For label related memo data (e.g. content, additional parameters) see the ACAPI_Element_GetMemo function.
The interpretation of the textWay
field is:
The squareRootAngle
is marked with ? on the following picture:
The titleTyp
field has been removed in API 21.
From version 26 the type of the parentType member was changed into API_ElemType.
Requirements
- Version: API 2.1 or later
- Header: APIdefs_Elements.h
See Also
API_AttributeIndex, API_Elem_Head, API_LblClassID, API_TextType, API_ObjectType,
API_DirID, API_ArrowData, API_ElemType, API_Coord, API_Element,
API_ElementMemo,
Element Manager, API Types