Project members: Annotation arrow
With arrow annotations you can point to a particular project member or a member group. The arrow annotation is used often together with the legend and group annotations. As such the annotations are very useful for foreigner developers to understand the structure of your implementation. Group annotation members appear in Composer as gray pointers (arrows):
The annotations have no effect on the application itself. They exist for descriptive purpose only. Annotations can be used everywhere within your project.
Annotations and inheritance
Unlike other members, annotations are not inherited when you derive a new class from a base class containing annotations. The annotations from the base class are simply ignored.
Add new arrow annotation
★First switch to the Composer page you want to add the annotation member.
★Then, in the Gallery window, ensure that the folder Chora is opened.
★Look in the folder for the template named Annotation Arrow.
★With the mouse, select the template and drag it into the Composer.
★Drop the template within the Composer.
Adding a new annotation member.
Arrange the annotation
★First ensure, that the annotation member is selected.
★To move the entire annotation member click it with the mouse and move it.
★To move its start/end position, click with the mouse on it and move it.
★Alternatively, you can control the position of the annotation box by modifying its attributes Point1 and Point2.
Name the annotation
★First ensure, that the annotation member is selected.
★Press the key F2 or select the menu item .
★Enter the new name in the Inspector window.
The name of the annotation member has no effect on the function of your application. However, it has to be unique in its particular context.
Duplicate an existing annotation
You can create any number of copies of an already existing annotation member.
★First ensure, that the annotation member is selected.
★Press the keys CtrlC and CtrlV in succession ...
★... or hold the key Ctrl pressed while you drag and drop the selected annotation member.
★Finally rename the just duplicated annotation member.
Delete an annotation
★First ensure, that the annotation member is selected.
★Press the key DEL or select the menu item .
Attributes of an annotation arrow
The following table shows the complete list of attributes provided by the arrow annotation member:
Attribute name |
Short description |
---|---|
Determines the start position of an annotation arrow member. |
|
Determines the end position of an annotation arrow member. |
Chora syntax of an annotation arrow
This section describes the Chora syntax of how annotations are stored inside Embedded Wizard project files. The knowledge about the syntax can be helpful when you plan to process the project contents by third party tools. In particular, the general purpose Export and Import functionality introduced in version 14 requires a good understanding of how project members are represented in Chora syntax to correctly interpret the exported members and synthesize the Chora code for members to import. Please note, Embedded Wizard project files (and thus Chora code) are encoded as text in UTF-8 format.
In Chora syntax, annotation arrow definition is always introduced with the keywords note arrow, followed by the name of the annotation member and a list of initialization values for member's own attributes. The attributes are enclosed between a pair of curly braces {..}, whereby each attribute starts with the keyword attr followed by the name of the affected attribute, an assignment operator =, the assigned value and ; semicolon sign. Wherever necessary, the tokens are separated by whitespace signs. In case of the annotation arrow member, only the attributes Point1 and Point2 are supported. The following example demonstrates the described syntax:
note arrow Arrow1 { attr Point1 = <10,10>; attr Point2 = <500,100>; }
Each Chora file (or text exchanged with an external Export and/or Import tool) can be (or even should be) prefixed with $version directive. This directive determines the version number of the included Chora code. For details concerning the syntax of the version please see the chapter $version macro. Furthermore, the code can include a $scope directive followed by a path to a project member acting as the original owner of the corresponding code. That means the members described by the Chora code existed inside the member specified in $scope.