本文整理汇总了C++中CDialogBuilder::GetMarkup方法的典型用法代码示例。如果您正苦于以下问题:C++ CDialogBuilder::GetMarkup方法的具体用法?C++ CDialogBuilder::GetMarkup怎么用?C++ CDialogBuilder::GetMarkup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDialogBuilder
的用法示例。
在下文中一共展示了CDialogBuilder::GetMarkup方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: cb
CProjectInfoPage::CProjectInfoPage(DuiLib::CPaintManagerUI* ppm)
:m_pListProjs(NULL)
,m_pProjProcessor(NULL)
//,m_pAddGroupMemWnd(NULL)
,m_pBtnPrevPage(NULL)
,m_pBtnNextPage(NULL)
,m_pBtnEndPage(NULL)
,m_nCurrentPageIndex(-1)
,m_nEndPageIndex(-1)
{
m_PaintManager = ppm;
CDialogBuilder DlgBuilder;
CVerticalLayoutUI *pProjectPage = NULL;
CDialogBuilderCallbackEx cb(m_PaintManager);
if (!DlgBuilder.GetMarkup()->IsValid())
{
pProjectPage = static_cast<CVerticalLayoutUI*>(DlgBuilder.Create(_T("tab_project_page.xml"),
(UINT)0, &cb, m_PaintManager));
}
else
{
pProjectPage = static_cast<CVerticalLayoutUI*>(DlgBuilder.Create((UINT)0, m_PaintManager));
}
static_cast<CTabLayoutUI*>(ppm->FindControl("SidebarTabContainer"))->Add(pProjectPage);
m_PaintManager->AddNotifier(this);
}
示例2: IMPL_LUA_FUNC
IMPL_LUA_FUNC(LuaCDialogBuilder, GetMarkup)
{
try
{
CDialogBuilder* self;
self = static_cast<CDialogBuilder*>(LuaStatic::CheckUserData(l, 1));
CMarkup* pMarkup = self->GetMarkup();
if (pMarkup)
LuaStatic::AddObject2Lua(l, pMarkup, METATABLE_NAME(pMarkup));
else
lua_pushnil(l);
return 1;
}
catch (...)
{
DuiException(_T("LuaCDialogBuilder::GetMarkup"));
return 0;
}
}
示例3: AddListItem
void CProjectInfoPage::AddListItem(int nFromIndex, int nCount)
{
for (int i=nFromIndex; i<nCount+nFromIndex; i++)
{
CDialogBuilder DlgBuilder;
CListContainerElementUI *plstItem = NULL;
if (!DlgBuilder.GetMarkup()->IsValid())
{
plstItem = static_cast<CListContainerElementUI*>(DlgBuilder.Create(_T("project_list_item.xml"),
(UINT)0, NULL, m_PaintManager));
}
else
{
plstItem = static_cast<CListContainerElementUI*>(DlgBuilder.Create((UINT)0, m_PaintManager));
}
if (plstItem == NULL)
return ;
else
{
sProjectItem& oneProj = m_vecProjects[i];
sProjectItem* pNewData = new sProjectItem;
pNewData->strCreateTime = oneProj.strCreateTime;
pNewData->strDestOrgID = oneProj.strDestOrgID;
pNewData->strDestOrgName = oneProj.strDestOrgName;
pNewData->strProjID = oneProj.strProjID;
pNewData->strProjName = oneProj.strProjName;
pNewData->strRoomID = oneProj.strRoomID;
pNewData->vecDestParticipants = oneProj.vecDestParticipants;
CLabelUI *pLabelProjName = static_cast<CLabelUI *>(m_PaintManager->FindSubControlByName(plstItem, _T("lable_project_name")));
if (pLabelProjName != NULL)
{
pLabelProjName->SetText(oneProj.strProjName.c_str());
}
tstring strShowDest;
//判断是个人还是机构。
if (oneProj.strDestOrgID.empty()
&& oneProj.strDestOrgName.empty()
&& oneProj.vecDestParticipants.size()>0)
{
tstring strAccount = oneProj.vecDestParticipants[0];
strAccount += MMPC_ACCOUNT;
//策略修改:取消了用户的备注名
sUserVCard oneUser;
if (GetDBTaskModule()->LoadUserVCard(strAccount, oneUser))
{
strShowDest = oneUser.strUserNickname.c_str();
}
sUserVCard oneNewVCard;
if(CController::Instance()->GetUserInfoMgr()->GetUserVCard(strAccount, oneNewVCard))
{
strShowDest = oneNewVCard.strUserNickname;
}
if (strShowDest.empty())
{
strShowDest = oneProj.vecDestParticipants[0];
}
}
else
{
strShowDest = oneProj.strDestOrgName;
}
CLabelUI *pLabelOrgName = static_cast<CLabelUI *>(m_PaintManager->FindSubControlByName(plstItem, _T("label_orgnization_name")));
if (pLabelOrgName != NULL)
{
pLabelOrgName->SetText(strShowDest.c_str());
}
CLabelUI *pLabelTime = static_cast<CLabelUI *>(m_PaintManager->FindSubControlByName(plstItem, _T("label_project_time")));
if (pLabelTime != NULL)
{
pLabelTime->SetText(oneProj.strCreateTime.c_str());
}
//用roomID来标识唯一的Item
plstItem->SetTag((UINT_PTR)pNewData);
plstItem->SetFixedHeight(50);
if (!m_pListProjs->Add(plstItem))
{
delete plstItem;
}
}
}
}