comet.CHyperlinkSource

class comet.CHyperlinkSource

Methods

CHyperlinkSource.isValid()

Determine whether this hyperlink destination is still valid and exists

Returns

Whether this hyperlink destination is still valid and exists

Return type

bool

Available

CScript

hyperlink::is_valid

CHyperlinkSource.getDocument()

Get the document this destination belongs to

Returns

The owning document

Return type

CDocument

Raises

CometError – When the source is not valid

Available

CHyperlinkSource.getType()

Determine the type of this hyperlink source

Returns

The hyperlink source type

  • 0: Frame

  • 1: Text

Return type

int

Raises

CometError – When the source is not valid

Available

CHyperlinkSource.getFrame()

Get the frame this source is attached to.

Return type

int

Raises
  • TypeError – When the source is not attached to a frame

  • CometError – When the source is not valid

Available

CHyperlinkSource.getTextModel()

Get the textmodel this source is attached to.

Returns

The textmodel

Return type

int

Raises
  • TypeError – When the source is not attached to a text

  • CometError – When the source is not valid

Available

CHyperlinkSource.getStart()

Get the text index this source starts at.

The result is the global index in the text model this source starts at.

Returns

The start text index

Return type

int

Raises
  • TypeError – When the source is not attached to a text

  • CometError – When the source is not valid

Available

CHyperlinkSource.getLength()

Get the text length of this source.

Returns

The source text length

Return type

int

Raises
  • TypeError – When the source is not attached to a text

  • CometError – When the source is not valid

Available

Get the link this source is attached to.

Returns

The link of this source

Return type

CHyperlink

Raises

CometError – When the source is not valid

Available