本文整理汇总了C++中FL_DocLayout::getView方法的典型用法代码示例。如果您正苦于以下问题:C++ FL_DocLayout::getView方法的具体用法?C++ FL_DocLayout::getView怎么用?C++ FL_DocLayout::getView使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FL_DocLayout
的用法示例。
在下文中一共展示了FL_DocLayout::getView方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getSpanAP
void fl_ContainerLayout::getSpanAP(UT_uint32 blockPos, bool bLeft, const PP_AttrProp * &pSpanAP) const
{
//first we need to ascertain if this revision is visible
FL_DocLayout* pDL = getDocLayout();
UT_return_if_fail(pDL);
FV_View* pView = pDL->getView();
UT_return_if_fail(pView);
UT_uint32 iId = pView->getRevisionLevel();
bool bShow = pView->isShowRevisions();
bool bHiddenRevision = false;
getSpanAttrProp(blockPos, bLeft, &pSpanAP,NULL,bShow,iId,bHiddenRevision);
}
示例2: getAP
/*!
retrieves AP associated with this layout, corretly processing any
revision information;
/return return value indicates whether the layout is hidden due to
current revision settings or not
*/
FPVisibility fl_ContainerLayout::getAP(const PP_AttrProp *& pAP)const
{
FL_DocLayout* pDL = getDocLayout();
UT_return_val_if_fail(pDL,FP_VISIBLE);
FV_View* pView = pDL->getView();
UT_return_val_if_fail(pView,FP_VISIBLE);
UT_uint32 iId = pView->getRevisionLevel();
bool bShow = pView->isShowRevisions();
bool bHiddenRevision = false;
getAttrProp(&pAP,NULL,bShow,iId,bHiddenRevision);
if(bHiddenRevision)
{
return FP_HIDDEN_REVISION;
}
else
{
return FP_VISIBLE;
}
}
示例3: GetDesktopWindow
bool AP_Win32App::_pasteFormatFromClipboard(PD_DocumentRange * pDocRange, const char * szFormat,
const char * szType, bool bWide)
{
HANDLE hData;
bool bSuccess = false;
if (!(hData = m_pClipboard->getHandleInFormat(szFormat)))
return bSuccess;
// It's a bitmap
if (g_ascii_strcasecmp(szFormat, AP_CLIPBOARD_BMP)==0)
{
HBITMAP hBitmap;
PBITMAPINFO bi;
HWND hWnd;
HDC hdc;
IE_ImpGraphic* pIEG = NULL;
FG_Graphic* pFG = NULL;
UT_Error errorCode;
UT_ByteBuf byteBuf;
IEGraphicFileType iegft = IEGFT_BMP;
XAP_Frame* pFrame;
AP_FrameData* pFrameData;
FL_DocLayout* pDocLy;
FV_View* pView;
UT_ByteBuf* bBufBMP = new UT_ByteBuf;
hBitmap = (HBITMAP)hData;
hWnd = GetDesktopWindow();
hdc = GetDC(hWnd);
// Create a BMP file from a BITMAP
bi = CreateBitmapInfoStruct(hBitmap);
CreateBMP(hWnd, *bBufBMP, bi, hBitmap,hdc);
// Since we are providing the file type, there is not need to pass the bytebuff filled up
errorCode = IE_ImpGraphic::constructImporter(*bBufBMP, iegft, &pIEG);
if(errorCode != UT_OK)
return false;
errorCode = pIEG->importGraphic(bBufBMP, &pFG);
if(errorCode != UT_OK || !pFG)
{
DELETEP(bBufBMP);
DELETEP(pIEG);
return false;
}
// sunk in importGraphic
bBufBMP = NULL;
// Insert graphic in the view
pFrame = getLastFocussedFrame();
pFrameData = (AP_FrameData*) pFrame->getFrameData();
pDocLy = pFrameData->m_pDocLayout;
pView = pDocLy->getView();
errorCode = pView->cmdInsertGraphic(pFG);
DELETEP(pIEG);
//DELETEP(pFG);
bSuccess = true;
}
else
{
unsigned char * pData = static_cast<unsigned char *>(GlobalLock(hData));
UT_DEBUGMSG(("Paste: [fmt %s %s][hdata 0x%08lx][pData 0x%08lx]\n",
szFormat, szType, hData, pData));
UT_uint32 iSize = GlobalSize(hData);
UT_uint32 iStrLen = bWide
? wcslen(reinterpret_cast<const wchar_t *>(pData)) * 2
: strlen(reinterpret_cast<const char *>(pData));
UT_uint32 iLen = UT_MIN(iSize,iStrLen);
IE_Imp * pImp = 0;
IE_Imp::constructImporter(pDocRange->m_pDoc, IE_Imp::fileTypeForSuffix(szType), &pImp, 0);
if (pImp)
{
const char * szEncoding = 0;
if (bWide)
szEncoding = XAP_EncodingManager::get_instance()->getUCS2LEName();
else
; // TODO Get code page using CF_LOCALE
pImp->pasteFromBuffer(pDocRange,pData,iLen,szEncoding);
delete pImp;
}
GlobalUnlock(hData);
bSuccess = true;
}
return bSuccess;
}