Public Member Functions | Private Attributes

AP_Preview_Abi Class Reference

#include <ap_Preview_Abi.h>

Inheritance diagram for AP_Preview_Abi:
XAP_Preview XAP_CustomWidget

List of all members.

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_ViewgetView (void) const
PD_DocumentgetDoc (void) const
virtual void draw (const UT_Rect *clip=NULL)

Private Attributes


Constructor & Destructor Documentation

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]

Member Function Documentation

void AP_Preview_Abi::draw ( const UT_Rect clip = NULL  )  [virtual]
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().

Member Data Documentation

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