cohtml.Net.INodeProxy

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

Inherits from SystemIDisposable

Inherited by cohtml.Net.IInputProxy

Public Functions

Name
virtual voidDispose()
virtual stringGetAttribute(string name)
Get attribute’s value whit given name.
virtual stringGetAttribute(uint id)
Get attribute’s value whit given Id.
virtual stringGetValueOfElement()
Gives the value of the Element.
virtual stringGetId()
Returns the id of the element - this is a shortcut to get the ‘id’ attribute.
virtual uintGetClassesCount()
Returns the classes count of the element - this is a shortcut to get the ‘class’ attribute.
virtual stringGetClass(uint id)
Returns the value of the class with id number from the array.
virtual uintGetAttributesCount()
Returns the count of all attributes on a node.
virtual boolHasAttribute(string name)
Returns if an attribute with name is set on the element.
virtual HTMLTagGetTag()
Returns the HTML tag of the element.
virtual boolHasScriptEventListeners()
Returns if the element has event listeners in JavaScript.
virtual voidGetBoundingRect(out double x, out double y, out double width, out double height)
Returns position and size of the node in view coordinates.
uintGetAttribute(string name, global.System.IntPtr buffer, uint bufferLength)
Gives the attribute value.
uintGetAttribute(uint id, global.System.IntPtr buffer, uint bufferLength)
Gives the attribute value.
uintGetValueOfElement(global.System.IntPtr buffer, uint bufferLength)
Gives the Value of the Element.

Protected Attributes

Name
boolswigCMemOwn

Public Functions Documentation

function Dispose

virtual void Dispose()

Reimplemented by: cohtml.Net.IInputProxy.Dispose

function GetAttribute

virtual string GetAttribute(
    string name
)

Get attribute’s value whit given name.

Parameters:

  • name The name of the attribute.

Return: The value of the attribute.

function GetAttribute

virtual string GetAttribute(
    uint id
)

Get attribute’s value whit given Id.

Parameters:

  • id the numbered id of the attribute - can be used to iterate over all attributes.

Return: The value of the attribute.

function GetValueOfElement

virtual string GetValueOfElement()

Gives the value of the Element.

Return: The value of the element.

function GetId

virtual string GetId()

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

function GetClassesCount

virtual uint GetClassesCount()

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

function GetClass

virtual string GetClass(
    uint id
)

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

function GetAttributesCount

virtual uint GetAttributesCount()

Returns the count of all attributes on a node.

function HasAttribute

virtual bool HasAttribute(
    string name
)

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

function GetTag

virtual HTMLTag GetTag()

Returns the HTML tag of the element.

function HasScriptEventListeners

virtual bool HasScriptEventListeners()

Returns if the element has event listeners in JavaScript.

function GetBoundingRect

virtual void GetBoundingRect(
    out double x,
    out double y,
    out double width,
    out double height
)

Returns 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 GetAttribute

uint GetAttribute(
    string name,
    global.System.IntPtr buffer,
    uint bufferLength
)

Gives the attribute value.

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 accomodate the value, only bufferLength bytes will be copied

Return: the size of the whole value string in bytes

function GetAttribute

uint GetAttribute(
    uint id,
    global.System.IntPtr buffer,
    uint bufferLength
)

Gives 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 accomodate the value, only bufferLength bytes will be copied

Return: the size of the whole value string in bytes

function GetValueOfElement

uint GetValueOfElement(
    global.System.IntPtr buffer,
    uint bufferLength
)

Gives 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 accomodate the value, only bufferLength bytes will be copied

Return: the size of the whole value string in bytes

Protected Attributes Documentation

variable swigCMemOwn

bool swigCMemOwn;