NVDA Helper
In-process and lite high-speed utilities for NVDA
AdobeAcrobatVBufBackend_t Class Reference

#include <adobeAcrobat.h>

Inheritance diagram for AdobeAcrobatVBufBackend_t:
VBufBackend_t VBufStorage_buffer_t

Public Member Functions

 AdobeAcrobatVBufBackend_t (int docHandle, int ID)
 
- Public Member Functions inherited from VBufBackend_t
 VBufBackend_t (int docHandle, int ID)
 constructor
 
virtual void initialize ()
 Initializes the state of the backend and performs an initial rendering of content.
 
virtual bool invalidateSubtree (VBufStorage_controlFieldNode_t *)
 marks a particular node as invalid, so that its content is re-rendered on next update.
 
virtual void forceUpdate ()
 Forces any invalidated nodes to be updated right now.
 
virtual void terminate ()
 Clears the content of the backend and terminates any code used for rendering.
 
virtual void destroy ()
 Destructs and deletes the backend.
 
VBufStorage_controlFieldNode_treuseExistingNodeInRender (VBufStorage_controlFieldNode_t *parent, VBufStorage_fieldNode_t *previous, int docHandle, int ID)
 Fetches an existing node from this backend, so that it can be added to a temporary buffer as a reference node during a partial render.
 
- Public Member Functions inherited from VBufStorage_buffer_t
 VBufStorage_buffer_t ()
 
 ~VBufStorage_buffer_t ()
 Destructor.
 
VBufStorage_controlFieldNode_taddControlFieldNode (VBufStorage_controlFieldNode_t *parent, VBufStorage_fieldNode_t *previous, int docHandle, int ID, bool isBlock)
 Adds a control field in to the buffer.
 
VBufStorage_controlFieldNode_taddControlFieldNode (VBufStorage_controlFieldNode_t *parent, VBufStorage_fieldNode_t *previous, VBufStorage_controlFieldNode_t *node)
 
VBufStorage_textFieldNode_taddTextFieldNode (VBufStorage_controlFieldNode_t *parent, VBufStorage_fieldNode_t *previous, const std::wstring &text)
 Adds a text field in to the buffer.
 
VBufStorage_textFieldNode_taddTextFieldNode (VBufStorage_controlFieldNode_t *parent, VBufStorage_fieldNode_t *previous, VBufStorage_textFieldNode_t *node)
 
virtual bool isNodeInBuffer (VBufStorage_fieldNode_t *node)
 finds out if the given node exists in this buffer.
 
bool replaceSubtrees (std::map< VBufStorage_fieldNode_t *, VBufStorage_buffer_t * > &m)
 Removes the given nodes from the buffer and then merges the content of the new buffers in the removed node's position.
 
bool removeFieldNode (VBufStorage_fieldNode_t *node, bool removeDescendants=true)
 disassociates from this buffer, and deletes, the given field and its descendants.
 
void clearBuffer ()
 
virtual bool getFieldNodeOffsets (VBufStorage_fieldNode_t *node, int *startOffset, int *endOffset)
 Calculates the start and end character offsets of the given node in the buffer.
 
virtual bool isFieldNodeAtOffset (VBufStorage_fieldNode_t *node, int offset)
 finds out if a given field is positioned at a given character offset in this buffer.
 
virtual VBufStorage_textFieldNode_tlocateTextFieldNodeAtOffset (int offset, int *nodeStartOffset, int *nodeEndOffset)
 locates the text field node at the given offset
 
virtual VBufStorage_controlFieldNode_tlocateControlFieldNodeAtOffset (int offset, int *startOffset, int *endOffset, int *docHandle, int *ID)
 locates the deepest control field node at the given offset
 
virtual VBufStorage_controlFieldNode_tgetControlFieldNodeWithIdentifier (int docHandle, int ID)
 locates the controlFieldNode with the given identifier
 
virtual bool getIdentifierFromControlFieldNode (VBufStorage_controlFieldNode_t *node, int *docHandle, int *ID)
 Retreaves the identifier for the given controlFieldNode.
 
virtual VBufStorage_fieldNode_tfindNodeByAttributes (int offset, VBufStorage_findDirection_t direction, const std::wstring &attribs, const std::wstring &regexp, int *startOffset, int *endOffset)
 Finds a field node that contains particular attributes.
 
virtual bool getSelectionOffsets (int *startOffset, int *endOffset) const
 Retreaves the current selection offsets for the buffer.
 
virtual bool setSelectionOffsets (int startOffset, int endOffset)
 sets the selection offsets for the buffer.
 
virtual int getTextLength () const
 retreaves the length of all the text in the buffer.
 
virtual bool getTextInRange (int startOffset, int endOffset, std::wstring &text, bool useMarkup=false)
 Retreaves the text in the buffer between given offsets, optionally containing markup.
 
virtual bool getLineOffsets (int offset, int maxLineLength, bool useScreenLayout, int *startOffset, int *endOffset)
 Expands the given offset to the start and end offsets of the containing line.
 
virtual bool hasContent ()
 Does this buffer have content? true if there is content, false otherwise.
 
virtual bool isDescendantNode (VBufStorage_fieldNode_t *parent, VBufStorage_fieldNode_t *descendant)
 Is one node a descendant of another.
 
VBufStorage_referenceNode_taddReferenceNodeToBuffer (VBufStorage_controlFieldNode_t *parent, VBufStorage_fieldNode_t *previous, VBufStorage_controlFieldNode_t *node)
 Adds a reference node to the buffer at the location given by parent and previous, pointing to the given existing node in another buffer.
 
virtual std::wstring getDebugInfo () const
 

Protected Member Functions

virtual void renderThread_initialize ()
 Sets up any code in the render thread.
 
virtual void renderThread_terminate ()
 Terminates any code in the render thread.
 
virtual void render (VBufStorage_buffer_t *buffer, int docHandle, int ID, VBufStorage_controlFieldNode_t *oldNode)
 Renders content starting from the given doc handle and ID, in to the given buffer.
 
virtual ~AdobeAcrobatVBufBackend_t ()
 
- Protected Member Functions inherited from VBufBackend_t
void requestUpdate ()
 Requests that the backend should update any invalid nodes when it can in the next little while.
 
void cancelPendingUpdate ()
 Cancels any pending request to update invalid nodes.
 
void update ()
 Updates the content of the buffer.
 
virtual ~VBufBackend_t ()
 Destructor, (protected as you must use the destroy method).
 
- Protected Member Functions inherited from VBufStorage_buffer_t
bool unlinkFieldNode (VBufStorage_fieldNode_t *node, bool removeDescendants=true)
 Unlinks this node from its parent and siblings.
 
void forgetControlFieldNode (VBufStorage_controlFieldNode_t *node)
 removes the controlFieldNode from the buffer's controlFieldNodesByIdentifier set.
 
bool insertNode (VBufStorage_controlFieldNode_t *parent, VBufStorage_fieldNode_t *previous, VBufStorage_fieldNode_t *node)
 Inserts the given fieldNode in to the buffer's tree of nodes.
 
void deleteSubtree (VBufStorage_fieldNode_t *node)
 disassociates the given node and its descendants from this buffer and deletes the node and its descendants.
 
void deleteNode (VBufStorage_fieldNode_t *node)
 disassociates the given node from this buffer and deletes the node.
 

Static Protected Member Functions

static void CALLBACK renderThread_winEventProcHook (HWINEVENTHOOK hookID, DWORD eventID, HWND hwnd, long objectID, long childID, DWORD threadID, DWORD time)
 

Additional Inherited Members

- Public Attributes inherited from VBufBackend_t
const int rootDocHandle
 identifies the window or document where the backend starts rendering from
 
const int rootID
 Represents the ID in the window or document where the backend starts rendering.
 
LockableObject lock
 Useful for cerializing access to the buffer.
 
- Protected Attributes inherited from VBufBackend_t
VBufStorage_controlFieldNodeList_t pendingInvalidSubtreesList
 the list of control field nodes that should be re-rendered the next time the backend is updated.
 
VBufStorage_controlFieldNodeList_t workingInvalidSubtreesList
 The list of invalid subtrees currently being re-rendered by update.
 
const int renderThreadID
 The thread ID of the rendering thread.
 
- Protected Attributes inherited from VBufStorage_buffer_t
std::list< VBufStorage_referenceNode_t * > referenceNodes
 Holds all the reference nodes for this buffer.
 
VBufStorage_fieldNode_trootNode
 points to the first node in the tree of nodes.
 
std::set< VBufStorage_fieldNode_t * > nodes
 Holds pointers to all nodes in the buffer.
 
std::map< VBufStorage_controlFieldNodeIdentifier_t, VBufStorage_controlFieldNode_t * > controlFieldNodesByIdentifier
 holds pointers to all control field nodes in this buffer, searchable by the control's unique identifier.
 
int selectionStart
 the offset at where the current selection starts.
 
int selectionLength
 The length of the selection.
 
- Static Protected Attributes inherited from VBufBackend_t
static VBufBackendSet_t runningBackends
 The set of currently running backends.
 

Detailed Description

Constructor & Destructor Documentation

◆ ~AdobeAcrobatVBufBackend_t()

AdobeAcrobatVBufBackend_t::~AdobeAcrobatVBufBackend_t ( )
protectedvirtual

References LOG_DEBUG.

◆ AdobeAcrobatVBufBackend_t()

AdobeAcrobatVBufBackend_t::AdobeAcrobatVBufBackend_t ( int docHandle,
int ID )

Member Function Documentation

◆ renderThread_winEventProcHook()

void CALLBACK AdobeAcrobatVBufBackend_t::renderThread_winEventProcHook ( HWINEVENTHOOK hookID,
DWORD eventID,
HWND hwnd,
long objectID,
long childID,
DWORD threadID,
DWORD time )
staticprotected

◆ renderThread_initialize()

void AdobeAcrobatVBufBackend_t::renderThread_initialize ( )
protectedvirtual

Sets up any code in the render thread.

Reimplemented from VBufBackend_t.

References LOG_DEBUG, registerWinEventHook(), VBufBackend_t::renderThread_initialize(), and renderThread_winEventProcHook().

◆ renderThread_terminate()

void AdobeAcrobatVBufBackend_t::renderThread_terminate ( )
protectedvirtual

Terminates any code in the render thread.

Reimplemented from VBufBackend_t.

References LOG_DEBUG, VBufBackend_t::renderThread_terminate(), renderThread_winEventProcHook(), and unregisterWinEventHook().

◆ render()

void AdobeAcrobatVBufBackend_t::render ( VBufStorage_buffer_t * buffer,
int docHandle,
int ID,
VBufStorage_controlFieldNode_t * oldNode )
protectedvirtual

Renders content starting from the given doc handle and ID, in to the given buffer.

The buffer will always start off empty as even for subtree re-rendering, a temp buffer is provided.

Parameters
bufferthe buffer to render content in.
docHandlethe doc handle to start from
IDthe ID to start from.
oldNodean optional node that will be replaced by the rendered content (useful for retreaving cached data)

Implements VBufBackend_t.

References checkIsXFA(), getDocPagination(), IAccessibleFromIdentifier(), LOG_DEBUG, and nhAssert.


The documentation for this class was generated from the following files: