Aspose::Words::Layout Namespace Reference

Detailed Description

The Aspose.Words.Layout namespace provides classes that allow to access information such as on what page and where on a page particular document elements are positioned, when the document is formatted into pages.

Classes

interface  IPageLayoutCallback
 Implement this interface if you want to have your own custom method called during build and rendering of page layout model.
See also
Aspose::Words::Layout::LayoutOptions::get_Callback
More...
 
class  LayoutCollector
 This class allows to compute page numbers of document nodes. More...
 
class  LayoutEnumerator
 Enumerates page layout entities of a document. More...
 
class  LayoutOptions
 Holds the options that allow controlling the document layout process. More...
 
class  PageLayoutCallbackArgs
 An argument passed into Aspose::Words::Layout::IPageLayoutCallback::Notify(System::SharedPtr<Aspose::Words::Layout::PageLayoutCallbackArgs>) More...
 
class  RevisionOptions
 Allows to control how document revisions are handled during layout process. More...
 

Enumerations

enum  PageLayoutEvent {
  PageLayoutEvent::None, PageLayoutEvent::WatchDog, PageLayoutEvent::BuildStarted, PageLayoutEvent::BuildFinished,
  PageLayoutEvent::ConversionStarted, PageLayoutEvent::ConversionFinished, PageLayoutEvent::ReflowStarted, PageLayoutEvent::ReflowFinished,
  PageLayoutEvent::PartReflowStarted, PageLayoutEvent::PartReflowFinished, PageLayoutEvent::PartRenderingStarted, PageLayoutEvent::PartRenderingFinished
}
 A code of event raised during page layout model build and rendering. More...
 
enum  LayoutEntityType {
  LayoutEntityType::None = static_cast<int32_t>(Aspose::Words::Layout::Core::PartType::None), LayoutEntityType::Page = static_cast<int32_t>(Aspose::Words::Layout::Core::PartType::Page), LayoutEntityType::Column = static_cast<int32_t>(Aspose::Words::Layout::Core::PartType::Column), LayoutEntityType::Row = static_cast<int32_t>(Aspose::Words::Layout::Core::PartType::Row),
  LayoutEntityType::Cell = static_cast<int32_t>(Aspose::Words::Layout::Core::PartType::Cell), LayoutEntityType::Line = static_cast<int32_t>(Aspose::Words::Layout::Core::PartType::Line), LayoutEntityType::Span = static_cast<int32_t>(Aspose::Words::Layout::Core::PartType::Span), LayoutEntityType::Footnote = static_cast<int32_t>(Aspose::Words::Layout::Core::PartType::Footnote),
  LayoutEntityType::Endnote = static_cast<int32_t>(Aspose::Words::Layout::Core::PartType::Endnote), LayoutEntityType::HeaderFooter = static_cast<int32_t>(Aspose::Words::Layout::Core::PartType::HeaderFooter), LayoutEntityType::TextBox = static_cast<int32_t>(Aspose::Words::Layout::Core::PartType::TextBox), LayoutEntityType::Comment = static_cast<int32_t>(Aspose::Words::Layout::Core::PartType::Comment),
  LayoutEntityType::NoteSeparator = static_cast<int32_t>(Aspose::Words::Layout::Core::PartType::NoteSeparator)
}
 Types of the layout entities. More...
 
enum  RevisionColor {
  RevisionColor::Auto, RevisionColor::Black, RevisionColor::Blue, RevisionColor::BrightGreen,
  RevisionColor::DarkBlue, RevisionColor::DarkRed, RevisionColor::DarkYellow, RevisionColor::Gray25,
  RevisionColor::Gray50, RevisionColor::Green, RevisionColor::Pink, RevisionColor::Red,
  RevisionColor::Teal, RevisionColor::Turquoise, RevisionColor::Violet, RevisionColor::White,
  RevisionColor::Yellow, RevisionColor::NoHighlight, RevisionColor::ByAuthor
}
 Allows to specify color of document revisions. More...
 
enum  RevisionTextEffect {
  RevisionTextEffect::None, RevisionTextEffect::Color, RevisionTextEffect::Bold, RevisionTextEffect::Italic,
  RevisionTextEffect::Underline, RevisionTextEffect::DoubleUnderline, RevisionTextEffect::StrikeThrough, RevisionTextEffect::DoubleStrikeThrough,
  RevisionTextEffect::Hidden
}
 Allows to specify decoration effect for revisions of document text. More...
 
enum  ShowInBalloons { ShowInBalloons::None, ShowInBalloons::Format, ShowInBalloons::FormatAndDelete }
 Specifies which revisions are rendered in balloons. More...
 

Enumeration Type Documentation

◆ LayoutEntityType

Types of the layout entities.

Enumerator
None 

Default value.

Page 

Represents page of a document.

Page may have Aspose::Words::Layout::LayoutEntityType::Column, Aspose::Words::Layout::LayoutEntityType::HeaderFooter and Aspose::Words::Layout::LayoutEntityType::Comment child entities.

Column 

Represents a column of text on a page.

Column may have the same child entities as Aspose::Words::Layout::LayoutEntityType::Cell, plus Aspose::Words::Layout::LayoutEntityType::Footnote, Aspose::Words::Layout::LayoutEntityType::Endnote and Aspose::Words::Layout::LayoutEntityType::NoteSeparator entities.

Row 

Represents a table row.

Row may have Aspose::Words::Layout::LayoutEntityType::Cell as child entities.

Cell 

Represents a table cell.

Cell may have Aspose::Words::Layout::LayoutEntityType::Line and Aspose::Words::Layout::LayoutEntityType::Row child entities.

Line 

Represents line of characters of text and inline objects.

Line may have Aspose::Words::Layout::LayoutEntityType::Span child entities.

Span 

Represents one or more characters in a line. This include special characters like field start/end markers, bookmarks and comments.

Span may not have child entities.

Footnote 

Represents placeholder for footnote content.

Footnote may have Aspose::Words::Layout::LayoutEntityType::Line and Aspose::Words::Layout::LayoutEntityType::Row child entities.

Endnote 

Represents placeholder for endnote content.

Endnote may have Aspose::Words::Layout::LayoutEntityType::Line and Aspose::Words::Layout::LayoutEntityType::Row child entities.

HeaderFooter 

Represents placeholder for header/footer content on a page.

HeaderFooter may have Aspose::Words::Layout::LayoutEntityType::Line and Aspose::Words::Layout::LayoutEntityType::Row child entities.

TextBox 

Represents text area inside of a shape.

Textbox may have Aspose::Words::Layout::LayoutEntityType::Line and Aspose::Words::Layout::LayoutEntityType::Row child entities.

Comment 

Represents placeholder for comment content.

Comment may have Aspose::Words::Layout::LayoutEntityType::Line and Aspose::Words::Layout::LayoutEntityType::Row child entities.

NoteSeparator 

Represents footnote/endnote separator.

NoteSeparator may have Aspose::Words::Layout::LayoutEntityType::Line and Aspose::Words::Layout::LayoutEntityType::Row child entities.

◆ PageLayoutEvent

A code of event raised during page layout model build and rendering.

Page layout model is built in two steps. First, "conversion step", this is when page layout pulls document content and creates object graph. Second, "reflow step", this is when structures are split, merged and arranged into pages.

Depending of the operation which triggered build, page layout model may or may not be further rendered into fixed page format. For example, computing number of pages in the document or updating fields does not require rendering, whereas export to Pdf does.

Enumerator
None 

Default value

WatchDog 

Corresponds to a checkpoint in code which is often visited and which is suitable to abort process.

While inside Aspose::Words::Layout::IPageLayoutCallback::Notify(System::SharedPtr<Aspose::Words::Layout::PageLayoutCallbackArgs>) throw custom exception to abort process.
You can throw when handling any callback event to abort process.
Note that if process is aborted the page layout model remains in undefined state. If process is aborted upon reflow of a complete page, however, it should be possible to use layout model up to the end of that page.
BuildStarted 

Build of the page layout has started. Fired once. This is the first event which occurs when Aspose::Words::Document::UpdatePageLayout is called.

BuildFinished 

Build of the page layout has finished. Fired once. This is the last event which occurs when Aspose::Words::Document::UpdatePageLayout is called.

ConversionStarted 

Conversion of document model to page layout has started. Fired once. This occurs when layout model starts pulling document content.

ConversionFinished 

Conversion of document model to page layout has finished. Fired once. This occurs when layout model stops pulling document content.

ReflowStarted 

Reflow of the page layout has started. Fired once. This occurs when layout model starts reflowing document content.

ReflowFinished 

Reflow of the page layout has finished. Fired once. This occurs when layout model stops reflowing document content.

PartReflowStarted 

Reflow of the page has started. Note that page may reflow multiple times and that reflow may restart before it is finished.

See also
Aspose::Words::Layout::PageLayoutCallbackArgs::get_PageIndex
PartReflowFinished 

Reflow of the page has finished. Note that page may reflow multiple times and that reflow may restart before it is finished.

See also
Aspose::Words::Layout::PageLayoutCallbackArgs::get_PageIndex
PartRenderingStarted 

Rendering of page has started. This is fired once per page.

PartRenderingFinished 

Rendering of page has finished. This is fired once per page.

◆ RevisionColor

Allows to specify color of document revisions.

Enumerator
Auto 

Default.

Black 

Represents 000000 color.

Blue 

Represents 2e97d3 color.

BrightGreen 

Represents 84a35b color.

DarkBlue 

Represents 376e96 color.

DarkRed 

Represents 881824 color.

DarkYellow 

Represents e09a2b color.

Gray25 

Represents a0a3a9 color.

Gray50 

Represents 50565e color.

Green 

Represents 2c6234 color.

Pink 

Represents ce338f color.

Red 

Represents b5082e color.

Teal 

Represents 1b9cab color.

Turquoise 

Represents 3eafc2 color.

Violet 

Represents 633277 color.

White 

Represents ffffff color.

Yellow 

Represents fad272 color.

NoHighlight 

No color is used to highlight revision changes.

ByAuthor 

Revisions of each author receive their own color for highlighting from a predfined set of hi-contrast colors.

◆ RevisionTextEffect

Allows to specify decoration effect for revisions of document text.

Enumerator
None 

Revised content has no special effects applied. This corresponds to Aspose::Words::Layout::RevisionColor::NoHighlight.

Color 

Revised content is highlighted with color only.

Bold 

Revised content is made bold and colored.

Italic 

Revised content is made italic and colored.

Underline 

Revised content is underlined and colored.

DoubleUnderline 

Revised content is double underlined and colored.

StrikeThrough 

Revised content is stroked through and colored.

DoubleStrikeThrough 

Revised content is double stroked through and colored.

Only works for Aspose::Words::RevisionType::Deletion, Aspose::Words::RevisionType::FormatChange and Aspose::Words::RevisionType::Moving ('move from' type).

Hidden 

Revised content is hidden.

Only works for Aspose::Words::RevisionType::Deletion and Aspose::Words::RevisionType::Moving ('move from' type).

◆ ShowInBalloons

Specifies which revisions are rendered in balloons.

Note that these values do not affect rendering of comments, which are controlled by Aspose::Words::Layout::LayoutOptions::get_ShowComments.

Enumerator
None 

Renders insert, delete and format revisions inline.

Format 

Renders insert and delete revisions inline, format revisions in balloons.

FormatAndDelete 

Renders insert revisions inline, delete and format revisions in balloons.