Skip to content

HOTSPOT ​

Daws an invisible rectangular area for interaction with an attribute.

Syntax ​

leo-grammar
HOTSPOT strValue [ x:measureValue ] [ y:measureValue ] [ w:measureValue ] [ h:measureValue ]
    [ text:strValue ] [ row:intValue col:strValue ] .

Parameters ​

  • <main-parameter> (strValue) - The name of the attribute.
  • x (measureValue, optional) - The x-coordinate for the top-left corner of the area. The default is 0cm.
  • y (measureValue, optional) - The y-coordinate for the top-left corner of the area. The default is 0cm.
  • w (measureValue, optional) - The width of the area. The default is 0cm.
  • h (measureValue, optional) - The height of the area. The default is 0cm.
  • text (strValue, optional) - The tool tip text to show when hovering with the mouse over the area.
  • row (intValue, optional) - Used for record type attributes to use a specific cell. This defines in which row the cell is located, with row numbering starting at 1.
  • col (strValue, optional) - Used for record type attributes to use a specific cell. This defines the name of the column where the cell is located.

Details ​

This command is not influenced by any style commands.

The name of the attribute is specified through the <main-parameter> as a literal. The top-let corner of rectangular area where the user can interact with the attribute is specified through x and y. The parameters w and h set the width and height of the area.

The text parameter allows to specify a text to fade in when the user's mouse hovers over the area.

Attribute Interaction ​

For most types of attributes clicking on the displayed value will open an input dialog to edit the value. For Inter-model references when one value is specified in the attribute, then a hyperlink which follows the reference is provided. If none or more than one reference is specified in the attribute then a dialog to modify the attribute is opened instead. For program calls selecting the value will execute the program call.

Record Attributes ​

With row and col a specific cell in an attribute of type record can be accessed. For row the number of the row has to be specified, with the numbering of rows starting at 1. For col the name of the column has to be provided.

Connector Rotation ​

Rotation of a gradient rectangle is not possible. This has an influence on the drawing of relations where a rectangle's shape will change with different rotations.

See Also ​

Examples ​

Draw a green rectangle with the text "€" inside of it. The entire rectangle should cause an interaction with the "Referenced cost department" Inter-model reference attribute.
A green rectangle with € inside of it showing the mouse cursor and the default fade in text

leo
GRAPHREP
SHADOW off

FILL color:"darkseagreen"
RECTANGLE x:-0.5cm y:-0.3cm w:1cm h:0.6cm
FONT h:14pt style:"bold"
TEXT "€" w:c h:c
HOTSPOT "Referenced cost department" x:-0.5cm y:-0.3cm w:1cm h:0.6cm

A blue rectangle. When an application is specified in the "Start application" attribute, then a green arrow pointing to the right should be drawn on the right side of the rectangle. The area of the arrow should cause in interaction with the "Start application" program call attribute and a custom fade in text.
A blue rectangle with a green-ish arrow on the right pointing to the right and showing the mouse cursor over the arrow and the custom fade in text

leo
GRAPHREP
# Note: SHADOW is on by default.

PEN w:0.05cm
FILL color:"dodgerblue"
RECTANGLE x:-1.4cm y:-.7cm w:2.8cm h:1.4cm
AVAL sApp:"Start application"
IF (LEN sApp) {
  FILL color:"$cafe69"
  POLYGON 7
      x1:1.2cm y1:-0.4cm
      x2:1.6cm y2:-0.4cm
      x3:1.6cm y3:-0.5cm
      x4:2.0cm y4:-0.3cm
      x5:1.6cm y5:-0.1cm
      x6:1.6cm y6:-0.2cm
      x7:1.2cm y7:-0.2cm
  HOTSPOT "Start application" x:1.2cm y:-0.5cm w:0.8cm h:0.4cm text:("Execute: " + copy(sApp, 0, search(sApp, "@", 0)))
}

Versions and Changes ​

Available since ADOxx 1.3