Ejemplo n.º 1
0
void YPlayListItemUI::InitVar()
{
	_bReName = false;
	_spListName = static_cast<CLabelUI*>(FindSubControl(_T("list-name")));
	_spRenameEdit = static_cast<CEditUI*>(FindSubControl(_T("rename")));
	_spPlayIco = FindSubControl(_T("list_ico"));
	ASSERT(_spListName);
	ASSERT(_spRenameEdit);
	ASSERT(_spPlayIco);
	_spListName->SetTag((UINT_PTR)this);
	_spRenameEdit->SetTag((UINT_PTR)this);
	_spPlayIco->SetTag((UINT_PTR)this);
}
Ejemplo n.º 2
0
CScalableLayout::CScalableLayout(HWND hParentWnd)
	:m_pContainer(0),m_pProgress(0),m_pStatusBar(0),
	m_hParentWnd(hParentWnd)
{
	CDialogBuilder builder;
	CContainerUI *pUI = static_cast<CContainerUI*>(builder.Create(
		_T("scalablelayout.xml")));

	this->Add(pUI);

	m_pStatusBar = static_cast<CHorizontalLayoutUI*>(FindSubControl(_T("statusbar")));
	m_pProgress = static_cast<CProgressUI*>(FindSubControl(_T("scaleprogress")));
	m_pZoomout = static_cast<CButtonUI*>(FindSubControl(_T("zoomout")));
	m_pContainer = static_cast<CContainerUI*>(FindSubControl(_T("container")));

}
Ejemplo n.º 3
0
void CustomMsgBubble::InitControl(const nim::IMMessage &msg)
{
	GlobalManager::FillBoxWithCache(this, L"main/custom_msg.xml");

	text_ = (RichEdit*)FindSubControl(L"text");
	time_ = (Label*)FindSubControl(L"msg_time");
	name_ = (Label*)FindSubControl(L"sender_name");
	head_ = (Button*)FindSubControl(L"msg_header_button");

	ITextServices* text_services = text_->GetTextServices();
	IRichEditOleCallbackEx* richedit_cb = new IRichEditOleCallbackEx(text_services, std::function<void()>());
	text_services->Release();
	text_->SetOleCallback(richedit_cb);

	InitInfo(msg);
}
Ejemplo n.º 4
0
void CSysSkinLayoutUI::Init()
{
	for (int i=0;i<SysRowNum;++i)
	{
		_pImage[i] = NULL;
		CDuiString sImage;
		sImage.Format(_T("image_%d"),i+1);
		_pImage[i] = static_cast<CAlbumButtonUI*>(FindSubControl(sImage));
		ASSERT(_pImage[i]);
		CDuiString sBkHotImage;
		sBkHotImage = _T("file='YTing/hotmask.png'  corner='5,5,5,5'");
		_pImage[i]->SetHotBkImage(sBkHotImage);
	}
// 	_pImage1 = _pImage2 = _pImage3 = NULL;
// 	_pImage1 = static_cast<CAlbumButtonUI*>(FindSubControl(_T("image_1")));
// 	_pImage2 = static_cast<CAlbumButtonUI*>(FindSubControl(_T("image_2")));
// 	_pImage3 = static_cast<CAlbumButtonUI*>(FindSubControl(_T("image_3")));
//	ASSERT(_pImage3&&_pImage2&&_pImage1);
// 	CDuiString sBkHotImage;
// 	sBkHotImage = _T("file='YTing/hotmask.png'  corner='5,5,5,5'");
// 	_pImage1->SetHotBkImage(sBkHotImage);
// 	_pImage2->SetHotBkImage(sBkHotImage);
// 	_pImage3->SetHotBkImage(sBkHotImage);
}
Ejemplo n.º 5
0
bool TabBox::SelectItem(const std::wstring& pControlName)
{
	Control* pControl = FindSubControl(pControlName);
	ASSERT(pControl);
	return SelectItem(pControl);
}
Ejemplo n.º 6
0
void YSongListItemUI::InitVar()
{
	_pNorLabelIndex = static_cast<CLabelUI*>(FindSubControl(SongListItemName::kNorLabelIndex));
	_pNorLabelName = static_cast<CLabelUI*>(FindSubControl(SongListItemName::kNorLabelName));
	_pNorLabelAritst = static_cast<CLabelUI*>(FindSubControl(SongListItemName::kNorLabelArtist));
	_pNormalLayout = static_cast<CHorizontalLayoutUI*>(FindSubControl(SongListItemName::kNorLayout));
	_pNorButtonMenu = static_cast<CButtonUI*>(FindSubControl(SongListItemName::kNorBtnMenu));
	ASSERT(_pNorLabelIndex);
	ASSERT(_pNorLabelName);
	ASSERT(_pNorLabelAritst);
	ASSERT(_pNormalLayout);
	ASSERT(_pNorButtonMenu);
	_pNorLabelIndex->SetTag((UINT_PTR)this);
	_pNorLabelName->SetTag((UINT_PTR)this);
	_pNorLabelAritst->SetTag((UINT_PTR)this);
	_pNormalLayout->SetTag((UINT_PTR)this);
	_pNorButtonMenu->SetTag((UINT_PTR)this);
	_pNorButtonMenu->OnEvent += MakeDelegate(&OnNorMenuButtonEvent);

	_pItemIco = FindSubControl(SongListItemName::kItemIcon);
	_pPushLabelIndex = static_cast<CLabelUI*>(FindSubControl(SongListItemName::kPushLabelIndex));
	_pPushLabelName = static_cast<CLabelUI*>(FindSubControl(SongListItemName::kPushLabelName));
	_pPushLabelAritst = static_cast<CLabelUI*>(FindSubControl(SongListItemName::kPushLabelArtist));
	_pPushLabelAlbum = static_cast<CLabelUI*>(FindSubControl(SongListItemName::kPushLabelAlbum));
	_pPushDownLoad = static_cast<CButtonUI*>(FindSubControl(SongListItemName::kPushBtnDown));
	_pPushCollect = static_cast<CCheckBoxUI*>(FindSubControl(SongListItemName::kPushCheckCollect));
	_pPushShare = static_cast<CButtonUI*>(FindSubControl(SongListItemName::kPushBtnShare));
	_pPushRemove = static_cast<CButtonUI*>(FindSubControl(SongListItemName::kPushBtnRemove));
	_pPushLayout = static_cast<CHorizontalLayoutUI*>(FindSubControl(SongListItemName::kPushLayout));
	ASSERT(_pItemIco);
	ASSERT(_pPushLabelIndex);
	ASSERT(_pPushLabelName);
	ASSERT(_pPushLabelAritst);
	ASSERT(_pPushLabelAlbum);
	ASSERT(_pPushDownLoad);
	ASSERT(_pPushCollect);
	ASSERT(_pPushShare);
	ASSERT(_pPushRemove);
	ASSERT(_pPushLayout);

	_pItemIco->SetTag((UINT_PTR)this);
	_pPushLabelIndex->SetTag((UINT_PTR)this);
	_pPushLabelName->SetTag((UINT_PTR)this);
	_pPushLabelAritst->SetTag((UINT_PTR)this);
	_pPushLabelAlbum->SetTag((UINT_PTR)this);
	_pPushDownLoad->SetTag((UINT_PTR)this);
	_pPushCollect->SetTag((UINT_PTR)this);
	_pPushShare->SetTag((UINT_PTR)this);
	_pPushRemove->SetTag((UINT_PTR)this);
	_pPushLayout->SetTag((UINT_PTR)this);

	_pPushLayout->SetVisible(false);

	_pPushRemove->OnNotify += MakeDelegate(this,&YSongListItemUI::DoNotify);
	_pPushCollect->OnNotify += MakeDelegate(this,&YSongListItemUI::DoNotify);
	_pPushShare->OnNotify += MakeDelegate(this,&YSongListItemUI::DoNotify);
	_pPushDownLoad->OnNotify += MakeDelegate(this,&YSongListItemUI::DoNotify);
}