LeechCraft Monocle  0.6.70-13729-g7046a9d2a7
Modular document viewer for LeechCraft
LC::Monocle::IHaveTextContent Class Referenceabstract

Interface for documents supporting querying text contents. More...

#include "ihavetextcontent.h"

Public Member Functions

virtual ~IHaveTextContent ()
 Virtual destructor. More...
 
virtual QString GetTextContent (int page, const QRect &rect)=0
 Returns the text in the given rectangle. More...
 

Detailed Description

Interface for documents supporting querying text contents.

This interface should be implemented by the documents of formats supporting obtaining the text contained in some page rectangle.

Definition at line 46 of file ihavetextcontent.h.

Constructor & Destructor Documentation

◆ ~IHaveTextContent()

virtual LC::Monocle::IHaveTextContent::~IHaveTextContent ( )
inlinevirtual

Virtual destructor.

Definition at line 51 of file ihavetextcontent.h.

Member Function Documentation

◆ GetTextContent()

virtual QString LC::Monocle::IHaveTextContent::GetTextContent ( int  page,
const QRect &  rect 
)
pure virtual

Returns the text in the given rectangle.

This function should return the text contained in the given rect at the given page, or an empty string if there is no text in this rect or the document doesn't contain any text information.

The rect is expected to be in absolute page coordinates, that is, from 0 to page width and page height correspondingly as returned by IDocument::GetPageSize().

If rect is empty or null, the text from the whole page should be returned.

Parameters
[in]pageThe index of the page to query.
[in]rectThe rectangle on the page to query.
Returns
The text in rect at page.

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