#include <ap_Preview_Abi.h>
Public Member Functions | |
AP_Preview_Abi (GR_Graphics *gc, UT_uint32 iWidth, UT_uint32 iHeight, XAP_Frame *pFrame, PreViewMode previewMode, PD_Document *pDoc=NULL) | |
virtual | ~AP_Preview_Abi (void) |
FV_View * | getView (void) const |
PD_Document * | getDoc (void) const |
virtual void | draw (const UT_Rect *clip=NULL) |
Private Attributes | |
XAP_Frame * | m_pFrame |
FV_View * | m_pView |
FL_DocLayout * | m_pDocLayout |
PD_Document * | m_pDocument |
AP_Preview_Abi::AP_Preview_Abi | ( | GR_Graphics * | gc, | |
UT_uint32 | iWidth, | |||
UT_uint32 | iHeight, | |||
XAP_Frame * | pFrame, | |||
PreViewMode | previewMode, | |||
PD_Document * | pDoc = NULL | |||
) |
This class gives the full power of the abi formatter to any Graphics Context It creates a new blank document and view set to preview mode. You can access these via the getDoc() and getView() methods to load text and manipulate via props, attributes and style changes. It will faithfully layout text into any graphics context you give it.
gc | the graphics context to draw into | |
iWidth | the width of the gc in pixels | |
iHeight | the height of the gc in pixels | |
pFrame | a pointer to the Frame that was ultimately responsible for creating this class |
References DIM_IN, FL_DocLayout::fillLayouts(), XAP_App::getApp(), GR_Graphics::getResolution(), fp_PageSize::Height(), PD_Document::m_docPageSize, m_pDocLayout, m_pDocument, m_pFrame, m_pView, PD_Document::newDocument(), PREVIEW_ADJUSTED_PAGE, PREVIEW_ADJUSTED_PAGE_SCROLL, PREVIEW_CLIPPED, PREVIEW_CLIPPED_SCROLL, PREVIEW_ZOOMED, PREVIEW_ZOOMED_SCROLL, fp_PageSize::Set(), FV_View::setPreviewMode(), FV_View::setViewMode(), AV_View::setWindowSize(), XAP_Preview::setWindowSize(), GR_Graphics::setZoomPercentage(), GR_Graphics::tlu(), UT_ASSERT_HARMLESS, UT_SHOULD_NOT_HAPPEN, VIEW_PREVIEW, and fp_PageSize::Width().
AP_Preview_Abi::~AP_Preview_Abi | ( | void | ) | [virtual] |
References DELETEP, m_pDocLayout, m_pDocument, m_pView, and UNREFP.
void AP_Preview_Abi::draw | ( | const UT_Rect * | clip = NULL |
) | [virtual] |
Implements XAP_CustomWidget.
References getView(), FV_View::updateScreen(), and UT_UNUSED.
Referenced by AP_Dialog_Styles::drawLocal().
PD_Document * AP_Preview_Abi::getDoc | ( | void | ) | const |
References m_pDocument.
Referenced by AP_Dialog_Styles::getLDoc().
FV_View * AP_Preview_Abi::getView | ( | void | ) | const |
Do all the manipulations you like via this view pointer
References m_pView.
Referenced by draw(), AP_Dialog_Styles::getLView(), and AP_UnixApp::makePngPreview().
FL_DocLayout* AP_Preview_Abi::m_pDocLayout [private] |
Referenced by AP_Preview_Abi(), and ~AP_Preview_Abi().
PD_Document* AP_Preview_Abi::m_pDocument [private] |
Referenced by AP_Preview_Abi(), getDoc(), and ~AP_Preview_Abi().
XAP_Frame* AP_Preview_Abi::m_pFrame [private] |
Referenced by AP_Preview_Abi().
FV_View* AP_Preview_Abi::m_pView [private] |
Referenced by AP_Preview_Abi(), getView(), and ~AP_Preview_Abi().