Chemical Data Processing Library Python API - Version 1.2.0
Public Member Functions | Static Public Attributes | Properties | List of all members
CDPL.Vis.StructureGridView2D.Cell Class Reference

Data structure storing the contents of a grid cell. More...

+ Inheritance diagram for CDPL.Vis.StructureGridView2D.Cell:

Public Member Functions

None setStructure (Chem.MolecularGraph molgraph)
 Specifies the molecular structure that shall be displayed in this cell. More...
 
Chem.MolecularGraph getStructure ()
 Returns the stored data of the currently displayed molecular structure (if any). More...
 
None clearStructure ()
 Hides the dcurrently displayed molecular structure (if any) and clears the stored data.
 
bool hashStructure ()
 
object getText (int pos=11)
 Returns the text displayed at the specified position. More...
 
None clearText (int pos=11)
 Clears the text displayed at the specified position. More...
 
None clearAllText ()
 Clears all text blocks.
 
bool hasAnyText ()
 Tells whether this cell displays any text. More...
 
bool hasText (int pos)
 Tells whether any text is displayed at the specified position. More...
 
Cell assign (Cell cell)
 Performs a copy assignment of the specified Cell instance. More...
 

Static Public Attributes

int DEF_TEXT_POSITION = 11
 The default position of text blocks.
 

Properties

 structure = property(getStructure, setStructure)
 

Detailed Description

Data structure storing the contents of a grid cell.

Member Function Documentation

◆ setStructure()

None CDPL.Vis.StructureGridView2D.Cell.setStructure ( Chem.MolecularGraph  molgraph)

Specifies the molecular structure that shall be displayed in this cell.

The cell will store a deep copy of the specified Chem.MolecularGraph instance which can then be safely modified or destroyed after the method call.

Parameters
molgraphA Chem.MolecularGraph instance specifying the molecular structure to display.

◆ getStructure()

Chem.MolecularGraph CDPL.Vis.StructureGridView2D.Cell.getStructure ( )

Returns the stored data of the currently displayed molecular structure (if any).

Parameters
Areference to the stored Chem.MolecularGraph instance.

◆ hashStructure()

bool CDPL.Vis.StructureGridView2D.Cell.hashStructure ( )
Returns

◆ getText()

object CDPL.Vis.StructureGridView2D.Cell.getText ( int   pos = 11)

Returns the text displayed at the specified position.

Parameters
posThe position of the text block (see setText()).
Returns
A reference to the string storing the displayed text.

◆ clearText()

None CDPL.Vis.StructureGridView2D.Cell.clearText ( int   pos = 11)

Clears the text displayed at the specified position.

Parameters
posThe position of the text block (see setText()).

◆ hasAnyText()

bool CDPL.Vis.StructureGridView2D.Cell.hasAnyText ( )

Tells whether this cell displays any text.

Returns
True if any text is shown and False otherwise.

◆ hasText()

bool CDPL.Vis.StructureGridView2D.Cell.hasText ( int  pos)

Tells whether any text is displayed at the specified position.

Parameters
posThe position of the text block (see setText()).

◆ assign()

Cell CDPL.Vis.StructureGridView2D.Cell.assign ( Cell  cell)

Performs a copy assignment of the specified Cell instance.

Parameters
cellThe Cell instance to copy.
Returns
A reference to itslef.