1.9.5.4
Prysm
cohtml::INodeProxy Class Referenceabstract

Represents a DOM element in the View - i.e. a DIV, the BODY etc. More...

+ Inheritance diagram for cohtml::INodeProxy:

Public Member Functions

virtual const char * GetId () const =0
 Returns the id of the element - this is a shortcut to get the 'id' attribute. More...
 
virtual unsigned GetClassesCount () const =0
 Returns the classes count of the element - this is a shortcut to get the 'class' attribute. More...
 
virtual const char * GetClass (unsigned id) const =0
 Returns the value of the class with id number from the array. More...
 
virtual unsigned GetAttributesCount () const =0
 Returns the count of all attributes on a node. More...
 
virtual unsigned GetAttribute (unsigned id, char *buffer, unsigned bufferLength) const =0
 Gives the attribute value. More...
 
virtual unsigned GetAttribute (const char *name, char *buffer, unsigned bufferLength) const =0
 Gives the attribute value. More...
 
virtual bool HasAttribute (const char *name) const =0
 Returns if an attribute with name is set on the element. More...
 
virtual HTMLTag GetTag () const =0
 Returns the HTML tag of the element. More...
 
virtual bool HasScriptEventListeners () const =0
 Returns if the element has event listeners in JavaScript. More...
 
virtual unsigned GetValueOfElement (char *buffer, unsigned bufferLength) const =0
 Gives the Value of the Element. More...
 
virtual void GetBoundingRect (double &x, double &y, double &width, double &height) const =0
 Returns position and size of the node in view coordinates. More...
 
virtual ~INodeProxy ()
 

Detailed Description

Represents a DOM element in the View - i.e. a DIV, the BODY etc.

Constructor & Destructor Documentation

◆ ~INodeProxy()

virtual cohtml::INodeProxy::~INodeProxy ( )
inlinevirtual

Member Function Documentation

◆ GetAttribute() [1/2]

virtual unsigned cohtml::INodeProxy::GetAttribute ( unsigned  id,
char *  buffer,
unsigned  bufferLength 
) const
pure virtual

Gives the attribute value.

Parameters
idthe numbered id of the attribute - can be used to iterate over all attributes
bufferthe char buffer where to copy the value - can be nullptr, to just get the size of the value
bufferLengththe size of the buffer in bytes. If the buffer is too small to accomodate the value, only bufferLength bytes will be copied
Returns
the size of the whole value string in bytes

◆ GetAttribute() [2/2]

virtual unsigned cohtml::INodeProxy::GetAttribute ( const char *  name,
char *  buffer,
unsigned  bufferLength 
) const
pure virtual

Gives the attribute value.

Parameters
namethe name of the attribute
bufferthe char buffer where to copy the value - can be nullptr, to just get the size of the value
bufferLengththe size of the buffer in bytes. If the buffer is too small to accomodate the value, only bufferLength bytes will be copied
Returns
the size of the whole value string in bytes

◆ GetAttributesCount()

virtual unsigned cohtml::INodeProxy::GetAttributesCount ( ) const
pure virtual

Returns the count of all attributes on a node.

◆ GetBoundingRect()

virtual void cohtml::INodeProxy::GetBoundingRect ( double &  x,
double &  y,
double &  width,
double &  height 
) const
pure virtual

Returns position and size of the node in view coordinates.

Parameters
xposition of the node in pixels in the space of the view
yposition of the node in pixels in the space of the view
widthof the node in pixels in the space of the view
heightof the node in pixels in the space of the view

◆ GetClass()

virtual const char* cohtml::INodeProxy::GetClass ( unsigned  id) const
pure virtual

Returns the value of the class with id number from the array.

◆ GetClassesCount()

virtual unsigned cohtml::INodeProxy::GetClassesCount ( ) const
pure virtual

Returns the classes count of the element - this is a shortcut to get the 'class' attribute.

◆ GetId()

virtual const char* cohtml::INodeProxy::GetId ( ) const
pure virtual

Returns the id of the element - this is a shortcut to get the 'id' attribute.

◆ GetTag()

virtual HTMLTag cohtml::INodeProxy::GetTag ( ) const
pure virtual

Returns the HTML tag of the element.

◆ GetValueOfElement()

virtual unsigned cohtml::INodeProxy::GetValueOfElement ( char *  buffer,
unsigned  bufferLength 
) const
pure virtual

Gives the Value of the Element.

Parameters
bufferthe char buffer where to copy the value - can be nullptr, to just get the size of the value
bufferLengththe size of the buffer in bytes. If the buffer is too small to accomodate the value, only bufferLength bytes will be copied
Returns
the size of the whole value string in bytes

◆ HasAttribute()

virtual bool cohtml::INodeProxy::HasAttribute ( const char *  name) const
pure virtual

Returns if an attribute with name is set on the element.

◆ HasScriptEventListeners()

virtual bool cohtml::INodeProxy::HasScriptEventListeners ( ) const
pure virtual

Returns if the element has event listeners in JavaScript.