本文整理汇总了C++中FV_View::getCellProperty方法的典型用法代码示例。如果您正苦于以下问题:C++ FV_View::getCellProperty方法的具体用法?C++ FV_View::getCellProperty怎么用?C++ FV_View::getCellProperty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FV_View
的用法示例。
在下文中一共展示了FV_View::getCellProperty方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setCurCellProps
void AP_Dialog_FormatTable::setCurCellProps(void)
{
XAP_Frame *frame = XAP_App::getApp()->getLastFocussedFrame();
if (frame) {
FV_View * pView = static_cast<FV_View *>(frame->getCurrentView());
if (m_bSettingsChanged ||
m_iOldPos == pView->getPoint()) // comparing the actual cell pos would be even better; but who cares :)
return;
m_iOldPos = pView->getPoint();
/*
* update the border colors
*/
gchar * color = NULL;
if (pView->getCellProperty("left-color", color))
m_vecProps.addOrReplaceProp("left-color", color);
else
m_vecProps.removeProp("left-color");
if (pView->getCellProperty("right-color", color))
m_vecProps.addOrReplaceProp("right-color", color);
else
m_vecProps.removeProp("right-color");
if (pView->getCellProperty("top-color", color))
m_vecProps.addOrReplaceProp("top-color", color);
else
m_vecProps.removeProp("top-color");
if (pView->getCellProperty("bot-color", color))
m_vecProps.addOrReplaceProp("bot-color", color);
else
m_vecProps.removeProp("bot-color");
/*
* update the background color
*/
UT_RGBColor clr;
gchar * bgColor = NULL;
if (pView->getCellProperty("background-color", bgColor))
{
m_vecProps.addOrReplaceProp("background-color", bgColor);
clr.setColor(bgColor);
setBackgroundColorInGUI(clr);
}
else
{
m_vecProps.removeProp("background-color");
setBackgroundColorInGUI(UT_RGBColor(255,255,255)); // No color == white for now - MARCM
}
if(pView->isImageAtStrux(m_iOldPos,PTX_SectionCell))
{
if(pView->isInTable())
{
fl_BlockLayout * pBL = pView->getCurrentBlock();
fl_CellLayout * pCell = static_cast<fl_CellLayout *>(pBL->myContainingLayout());
if(pCell->getContainerType() != FL_CONTAINER_CELL)
{
UT_ASSERT_HARMLESS(UT_SHOULD_NOT_HAPPEN);
DELETEP(m_pGraphic);
DELETEP(m_pImage);
m_sImagePath.clear();
}
else
{
FG_Graphic * pFG = FG_GraphicRaster::createFromStrux(pCell);
if(pFG)
{
DELETEP(m_pGraphic);
DELETEP(m_pImage);
m_sImagePath.clear();
m_pGraphic = pFG;
m_sImagePath = pFG->getDataId();
GR_Graphics * pG = m_pFormatTablePreview->getGraphics();
const UT_ByteBuf * pBB = pFG->getBuffer();
if(m_pGraphic->getType() == FGT_Raster)
{
m_pImage = static_cast<GR_Image *>(
pG->createNewImage( m_sImagePath.c_str(),
pBB, pFG->getMimeType(),
pFG->getWidth(),
pFG->getHeight(),
GR_Image::GRT_Raster));
}
else
{
m_pImage = static_cast<GR_Image *>(
pG->createNewImage( m_sImagePath.c_str(),
pBB, pFG->getMimeType(),
m_pFormatTablePreview->getWindowWidth()-2,
m_pFormatTablePreview->getWindowHeight()-2,
GR_Image::GRT_Vector));
}
//.........这里部分代码省略.........