cohtml::INodeProxy
Represents a DOM element in the View - i.e. a DIV, the BODY etc.
#include <NodeProxy.h>
Inherited by cohtml::IInputProxy
Public Functions
Section titled “Public Functions”| Name | |
|---|---|
| virtual const char * | GetId() const =0 Returns the id of the element - this is a shortcut to get the ‘id’ attribute. |
| virtual unsigned | GetClassesCount() const =0 Returns the classes count of the element - this is a shortcut to get the ‘class’ attribute. |
| virtual const char * | GetClass(unsigned id) const =0 Returns the value of the class with id number from the array. |
| virtual unsigned | GetAttributesCount() const =0 Returns the count of all attributes on a node. |
| virtual unsigned | GetAttribute(unsigned id, char * buffer, unsigned bufferLength) const =0 Gives the attribute value. |
| virtual unsigned | GetAttribute(const char * name, char * buffer, unsigned bufferLength) const =0 Gives the attribute value. |
| virtual bool | HasAttribute(const char * name) const =0 Returns if an attribute with name is set on the element. |
| virtual HTMLTag | GetTag() const =0 Returns the HTML tag of the element. |
| virtual bool | HasScriptEventListeners() const =0 Returns if the element has event listeners in JavaScript. |
| virtual unsigned | GetValueOfElement(char * buffer, unsigned bufferLength) const =0 Gives the Value of the Element. |
| virtual void | GetBoundingRect(double & x, double & y, double & width, double & height) const =0 Returns position and size of the node in view coordinates. |
| virtual | ~INodeProxy() |
Public Functions Documentation
Section titled “Public Functions Documentation”function GetId
Section titled “function GetId”virtual const char * GetId() const =0Returns the id of the element - this is a shortcut to get the ‘id’ attribute.
function GetClassesCount
Section titled “function GetClassesCount”virtual unsigned GetClassesCount() const =0Returns the classes count of the element - this is a shortcut to get the ‘class’ attribute.
function GetClass
Section titled “function GetClass”virtual const char * GetClass( unsigned id) const =0Returns the value of the class with id number from the array.
function GetAttributesCount
Section titled “function GetAttributesCount”virtual unsigned GetAttributesCount() const =0Returns the count of all attributes on a node.
function GetAttribute
Section titled “function GetAttribute”virtual unsigned GetAttribute( unsigned id, char * buffer, unsigned bufferLength) const =0Gives the attribute value.
Parameters:
- id the numbered id of the attribute - can be used to iterate over all attributes
- buffer the char buffer where to copy the value - can be nullptr, to just get the size of the value
- bufferLength the size of the buffer in bytes. If the buffer is too small to accommodate the value, only bufferLength bytes will be copied
Return: the size of the whole value string in bytes
function GetAttribute
Section titled “function GetAttribute”virtual unsigned GetAttribute( const char * name, char * buffer, unsigned bufferLength) const =0Gives the attribute value.
Parameters:
- name the name of the attribute
- buffer the char buffer where to copy the value - can be nullptr, to just get the size of the value
- bufferLength the size of the buffer in bytes. If the buffer is too small to accommodate the value, only bufferLength bytes will be copied
Return: the size of the whole value string in bytes
function HasAttribute
Section titled “function HasAttribute”virtual bool HasAttribute( const char * name) const =0Returns if an attribute with name is set on the element.
function GetTag
Section titled “function GetTag”virtual HTMLTag GetTag() const =0Returns the HTML tag of the element.
function HasScriptEventListeners
Section titled “function HasScriptEventListeners”virtual bool HasScriptEventListeners() const =0Returns if the element has event listeners in JavaScript.
function GetValueOfElement
Section titled “function GetValueOfElement”virtual unsigned GetValueOfElement( char * buffer, unsigned bufferLength) const =0Gives the Value of the Element.
Parameters:
- buffer the char buffer where to copy the value - can be nullptr, to just get the size of the value
- bufferLength the size of the buffer in bytes. If the buffer is too small to accommodate the value, only bufferLength bytes will be copied
Return: the size of the whole value string in bytes
function GetBoundingRect
Section titled “function GetBoundingRect”virtual void GetBoundingRect( double & x, double & y, double & width, double & height) const =0Returns position and size of the node in view coordinates.
Parameters:
- x position of the node in pixels in the space of the view
- y position of the node in pixels in the space of the view
- width of the node in pixels in the space of the view
- height of the node in pixels in the space of the view
function ~INodeProxy
Section titled “function ~INodeProxy”inline virtual ~INodeProxy()© 2026 Coherent Labs. All rights reserved.