wxMaxima
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Data Fields
wxPdfTaggingState Class Reference

State of the tagging machinery of one document (internal) More...

#include <private_structure.h>

Collaboration diagram for wxPdfTaggingState:
[legend]

Public Types

enum  MarkedContent { MC_NONE , MC_CONTENT , MC_ARTIFACT , MC_SUSPENDED }
 Kind of the marked-content sequence currently open on the page. More...
 

Public Member Functions

int GetDepth () const
 Number of open structure elements (excluding the implicit Document root)
 
int NewMcid (int page)
 Register a new marked-content sequence for the current element on a page; returns its MCID.
 

Data Fields

wxPdfStructElement * m_root
 implicit Document element
 
wxPdfStructElement * m_current
 innermost open element
 
MarkedContent m_open
 currently open marked-content sequence
 
int m_artifactDepth
 nesting depth of BeginArtifact()
 
int m_paginationDepth
 

‍0 while page header or footer is written


 
std::map< int, std::vector< wxPdfStructElement * > > m_parentTree
 For each page (1-based) the structure element of each MCID (index = MCID)
 

Detailed Description

State of the tagging machinery of one document (internal)

Marked content is managed as a small state machine. Page content is always written inside exactly one marked-content sequence created by this class: either the content of the innermost open structure element (/P <</MCID n>> BDC ... EMC) or an artifact (/Artifact BMC ... EMC) for content that the application did not tag, explicit artifacts and page headers/footers.

Sequences are opened lazily, i.e. only when page content is actually written (see wxPdfDocument::Out()), so that no empty sequences are created. They are closed at every structural boundary: BeginTag(), EndTag(), BeginArtifact(), EndArtifact(), EnterLayer(), LeaveLayer() and at the end of each page. Closing at every boundary guarantees that our sequences nest properly with other marked-content operators (optional content layers) and that a structure element spanning several pages gets one sequence per page.

Member Enumeration Documentation

◆ MarkedContent

Kind of the marked-content sequence currently open on the page.

Enumerator
MC_NONE 

nothing open; the next content opens a sequence

MC_CONTENT 

content of a structure element

MC_ARTIFACT 

artifact

MC_SUSPENDED 

no sequence open, and none must be opened (end of page)


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