NVDA Helper
In-process and lite high-speed utilities for NVDA
|
#include <node.h>
Public Member Functions | |
void | reportLiveText (std::wstring &text, std::wstring &politeness) |
void | reportLiveAddition () |
void | preProcessLiveRegion (const MshtmlVBufStorage_controlFieldNode_t *parent, const std::map< std::wstring, std::wstring > &attribsMap) |
void | postProcessLiveRegion (VBufStorage_controlFieldNode_t *oldNode, std::set< VBufStorage_controlFieldNode_t * > &atomicNodes) |
virtual void | generateAttributesForMarkupOpeningTag (std::wstring &text, int startOffset, int endOffset) |
Generates the attributes within a markup opening tag. | |
MshtmlVBufStorage_controlFieldNode_t (int docHandle, int ID, bool isBlock, MshtmlVBufBackend_t *backend, bool isRootNode, IHTMLDOMNode *pHTMLDOMNode, const std::wstring &lang) | |
MshtmlVBufStorage_controlFieldNode_t ()=delete | |
![]() | |
bool | getIdentifier (int *docHandle, int *ID) |
retreaves the node's doc handle and ID. | |
virtual std::wstring | getDebugInfo () const |
![]() | |
bool | matchAttributes (const std::vector< std::wstring > &attribs, const std::wregex ®exp) |
work out if the attributes in the given string exist on this node. | |
VBufStorage_controlFieldNode_t * | getParent () |
points to this node's parent control field node. | |
VBufStorage_fieldNode_t * | getPrevious () |
points to the node directly before this node that shares the same parent as this node. | |
VBufStorage_fieldNode_t * | getNext () |
points to the node directly after this node that shares the same parent as this node. | |
VBufStorage_fieldNode_t * | getFirstChild () |
points to this node's first child. | |
VBufStorage_fieldNode_t * | getLastChild () |
points to this node's last child. | |
bool | addAttribute (const std::wstring &name, const std::wstring &value) |
Adds an attribute to this field. | |
std::optional< std::wstring > | getAttribute (const std::wstring &name) |
Gets an attribute value for this field. | |
std::wstring | getAttributesString () const |
virtual void | getTextInRange (int startOffset, int endOffset, std::wstring &text, bool useMarkup=false, bool(*filter)(VBufStorage_fieldNode_t *)=NULL) |
fetches the text between given offsets in this node and its descendants, with optional markup. | |
int | getLength () |
Retreave the length of this node. | |
Public Attributes | |
MshtmlVBufBackend_t * | backend = nullptr |
IHTMLDOMNode * | pHTMLDOMNode = nullptr |
IDispatch * | propChangeSink = nullptr |
IDispatch * | loadSink = nullptr |
IMarkupContainer2 * | pMarkupContainer2 = nullptr |
IHTMLChangeSink * | pHTMLChangeSink = nullptr |
DWORD | HTMLChangeSinkCookey = 0 |
std::wstring | language |
MshtmlVBufStorage_controlFieldNode_t * | ariaLiveNode = nullptr |
std::wstring | ariaLivePoliteness |
unsigned int | formatState = 0 |
bool | ariaLiveIsTextRelevant = false |
bool | ariaLiveIsAdditionsRelevant = false |
bool | ariaLiveIsBusy = false |
VBufStorage_controlFieldNode_t * | ariaLiveAtomicNode = nullptr |
bool | isRootNode = false |
![]() | |
const VBufStorage_controlFieldNodeIdentifier_t | identifier |
uniquely identifies this control in its buffer. | |
bool | requiresParentUpdate {false} |
If true, When this node is invalidated in a backend, its parent will be invalidated instead. | |
bool | allowReuseInAncestorUpdate {true} |
If true, this node is allowing itself to be reused within a subtree that is being re-rendered. | |
bool | denyReuseIfPreviousSiblingsChanged {false} |
If True, this node cannot be moved and reused within a subtree being re-rendered, if its previous siblings have changed in anyway. | |
bool | alwaysRerenderChildren {false} |
If true, this node's children will always be re-rendered along with this node when being re-rendered. | |
bool | alwaysRerenderDescendants {false} |
If true, all this node's descendants will always be re-rendered along with this node when being re-rendered. | |
![]() | |
bool | isBlock |
true if this field should cause a line break at its start and end when a buffer is calculating lines. | |
bool | isHidden |
True if this node his hidden - searches will not locate this node. | |
Protected Member Functions | |
virtual | ~MshtmlVBufStorage_controlFieldNode_t () |
![]() | |
virtual void | generateMarkupTagName (std::wstring &text) |
generates this field's markup tag name | |
virtual void | disassociateFromBuffer (VBufStorage_buffer_t *buffer) |
Disassociates this node from its buffer. | |
VBufStorage_controlFieldNode_t (int docHandle, int ID, bool isBlock) | |
constructor. | |
![]() | |
VBufStorage_fieldNode_t * | nextNodeInTree (int direction, VBufStorage_fieldNode_t *limitNode, int *relativeStartOffset) |
moves to the next node, in depth-first order. | |
int | calculateOffsetInTree () const |
Calculates the offset for this node relative to the surrounding tree. | |
virtual VBufStorage_textFieldNode_t * | locateTextFieldNodeAtOffset (int offset, int *relativeOffset) |
Locates the descendant textFieldNode that is positioned at the given offset in this node. | |
void | generateMarkupOpeningTag (std::wstring &text, int startOffset, int endOffset) |
generates a markup opening tag for this field. | |
void | generateMarkupClosingTag (std::wstring &text) |
generates a markup closing tag for this field. | |
VBufStorage_fieldNode_t (int length, bool isBlock) | |
constructor. | |
virtual | ~VBufStorage_fieldNode_t () |
destructor | |
Additional Inherited Members | |
![]() | |
VBufStorage_controlFieldNode_t * | parent |
points to this node's parent control field node. | |
VBufStorage_fieldNode_t * | previous |
points to the node directly before this node that shares the same parent as this node. | |
VBufStorage_fieldNode_t * | next |
points to the node directly after this node that shares the same parent as this node. | |
VBufStorage_fieldNode_t * | firstChild |
points to this node's first child. | |
VBufStorage_fieldNode_t * | lastChild |
points to this node's last child. | |
int | length |
The length of this node in characters. | |
VBufStorage_attributeMap_t | attributes |
a map to hold attributes for this field. | |
MshtmlVBufStorage_controlFieldNode_t::MshtmlVBufStorage_controlFieldNode_t | ( | int | docHandle, |
int | ID, | ||
bool | isBlock, | ||
MshtmlVBufBackend_t * | backend, | ||
bool | isRootNode, | ||
IHTMLDOMNode * | pHTMLDOMNode, | ||
const std::wstring & | lang ) |
References backend, LOG_DEBUG, nhAssert, pHTMLChangeSink, pHTMLDOMNode, pMarkupContainer2, and propChangeSink.
|
delete |
|
protectedvirtual |
void MshtmlVBufStorage_controlFieldNode_t::reportLiveText | ( | std::wstring & | text, |
std::wstring & | politeness ) |
References nvdaControllerInternal_reportLiveRegion().
Referenced by postProcessLiveRegion(), and reportLiveAddition().
void MshtmlVBufStorage_controlFieldNode_t::reportLiveAddition | ( | ) |
References ariaLivePoliteness, VBufStorage_fieldNode_t::getLength(), VBufStorage_fieldNode_t::getTextInRange(), isNodeInLiveRegion(), and reportLiveText().
Referenced by postProcessLiveRegion().
void MshtmlVBufStorage_controlFieldNode_t::preProcessLiveRegion | ( | const MshtmlVBufStorage_controlFieldNode_t * | parent, |
const std::map< std::wstring, std::wstring > & | attribsMap ) |
void MshtmlVBufStorage_controlFieldNode_t::postProcessLiveRegion | ( | VBufStorage_controlFieldNode_t * | oldNode, |
std::set< VBufStorage_controlFieldNode_t * > & | atomicNodes ) |
References ariaLiveAtomicNode, ariaLiveIsAdditionsRelevant, ariaLiveIsBusy, ariaLiveIsTextRelevant, ariaLiveNode, ariaLivePoliteness, VBufStorage_fieldNode_t::getFirstChild(), VBufStorage_fieldNode_t::getLastChild(), VBufStorage_fieldNode_t::getLength(), VBufStorage_fieldNode_t::getNext(), VBufStorage_fieldNode_t::getPrevious(), VBufStorage_fieldNode_t::getTextInRange(), LOG_DEBUG, reportLiveAddition(), and reportLiveText().
|
virtual |
Generates the attributes within a markup opening tag.
text | where to place the generated text |
the | offset within the node where text is being requested from |
the | offset within the node the text is being requested to. |
Reimplemented from VBufStorage_controlFieldNode_t.
References appendCharToXML(), VBufStorage_controlFieldNode_t::generateAttributesForMarkupOpeningTag(), and language.
MshtmlVBufBackend_t* MshtmlVBufStorage_controlFieldNode_t::backend = nullptr |
IHTMLDOMNode* MshtmlVBufStorage_controlFieldNode_t::pHTMLDOMNode = nullptr |
Referenced by MshtmlVBufStorage_controlFieldNode_t(), and ~MshtmlVBufStorage_controlFieldNode_t().
IDispatch* MshtmlVBufStorage_controlFieldNode_t::propChangeSink = nullptr |
Referenced by MshtmlVBufStorage_controlFieldNode_t(), and ~MshtmlVBufStorage_controlFieldNode_t().
IDispatch* MshtmlVBufStorage_controlFieldNode_t::loadSink = nullptr |
IMarkupContainer2* MshtmlVBufStorage_controlFieldNode_t::pMarkupContainer2 = nullptr |
IHTMLChangeSink* MshtmlVBufStorage_controlFieldNode_t::pHTMLChangeSink = nullptr |
Referenced by MshtmlVBufStorage_controlFieldNode_t(), and ~MshtmlVBufStorage_controlFieldNode_t().
DWORD MshtmlVBufStorage_controlFieldNode_t::HTMLChangeSinkCookey = 0 |
Referenced by CHTMLChangeSink::IHTMLChangeSink::Notify().
std::wstring MshtmlVBufStorage_controlFieldNode_t::language |
Referenced by fillTextFormatting_helper(), and generateAttributesForMarkupOpeningTag().
MshtmlVBufStorage_controlFieldNode_t* MshtmlVBufStorage_controlFieldNode_t::ariaLiveNode = nullptr |
std::wstring MshtmlVBufStorage_controlFieldNode_t::ariaLivePoliteness |
Referenced by postProcessLiveRegion(), preProcessLiveRegion(), and reportLiveAddition().
unsigned int MshtmlVBufStorage_controlFieldNode_t::formatState = 0 |
Referenced by fillTextFormatting_helper().
bool MshtmlVBufStorage_controlFieldNode_t::ariaLiveIsTextRelevant = false |
Referenced by CHTMLChangeSink::IHTMLChangeSink::Notify(), postProcessLiveRegion(), and preProcessLiveRegion().
bool MshtmlVBufStorage_controlFieldNode_t::ariaLiveIsAdditionsRelevant = false |
Referenced by CHTMLChangeSink::IHTMLChangeSink::Notify(), postProcessLiveRegion(), and preProcessLiveRegion().
bool MshtmlVBufStorage_controlFieldNode_t::ariaLiveIsBusy = false |
VBufStorage_controlFieldNode_t* MshtmlVBufStorage_controlFieldNode_t::ariaLiveAtomicNode = nullptr |
Referenced by postProcessLiveRegion(), and preProcessLiveRegion().
bool MshtmlVBufStorage_controlFieldNode_t::isRootNode = false |