OEAddSVGClickEventΒΆ

Attention

PRELIMINARY-IMAGE This is a preliminary API until 2018.Feb and may be improved based on user feedback. It is currently available in C++ and Python.

bool OEAddSVGClickEvent(OE2DMolDisplay&, const OE2DAtomDisplay*,
                        const std::string& message);

bool OEAddSVGClickEvent(OE2DMolDisplay&, const OE2DBondDisplay*,
                        const std::string& message);

Creates and interactive .svg image in which atom / bond displays will be associated with and SVG event. When clicking at the position defined by the given atom / bond display the event is triggered with the given message.

Note

This functionality is only available for .svg image format.

See also

disp
The OE2DMolDisplay object that holds the data necessary to depict the molecule with which it is initialized.
adisp
The OE2DAtomDisplay object that defines the mouse click position.
bdisp
The OE2DBondDisplay object that defines the mouse click position
message
The text that will be emitted when an event is triggered on mouse click.

Example for adding event for atom displays

Warning

This example is not available in C#.

Example for adding event for bond displays

Warning

This example is not available in C#.

See also