hook_<libraryPrefix>_fillPopUpMenu()

This function is used to change the context menu of a symbol or an elementary symbol.

Synopsis

dyn_anytypehook_<libraryPrefix>_stdlib_fillPopUpMenu(anytypeaParams) ;

Parameters

Parameter Description
aParams Context menu's entries and their functions.

Default

dyn_anytype hook_stdlib_fillPopUpMenu(anytypeaParams)
{
  string dp = aParams[1];
  dyn_string dsMenueEntry = aParams[2];
  dyn_string dsFunction = aParams[3];
  // dynAppend(dsMenueEntry,"PUSH_BUTTON");
  // dynAppend(dsMenueEntry,"add-On"+","+6+", " + TRUE);
  // dynAppend(dsFunction,"OpenDpMonitor(\""+dp+"\");");
  aParams[2]=dsMenueEntry;
  aParams[3]=dsFunction;
  return aParams;
}

By using the dynAppend() function, a new entry that opens a pop-up window can be added to the context menu.

dynAppend(dsMenueEntry,"PUSH_BUTTON");

Adds a new entry to the context menu via a button.

dynAppend(dsMenueEntry,"add-On"+","+6+", " + TRUE);

"add-On" -> Text for the entry

6 -> Index for the called pop-up window (see hook_projectFillPopUpMenu()).

TRUE -> Entry activated

dynAppend(dsFunction,"OpenDpMonitor(\""+dp+"\");");

Specifies the function of this entry.

Return Value

Returns the entries and functions of the context menu.