コード例 #1
0
void CUIDesignerView::OnDeleteUI()
{
	CArray<CControlUI*,CControlUI*> arrSelected;
	m_MultiTracker.GetSelected(arrSelected);
	RemoveForm(arrSelected);
	if(arrSelected.IsEmpty())
		return;

	m_UICommandHistory.Begin(arrSelected, actionDelete);
	for(int i=0; i<arrSelected.GetSize(); i++)
	{
		CControlUI* pControl = arrSelected[i];
		CControlUI* pParent=pControl->GetParent();
		HTREEITEM hDelete=(HTREEITEM)(((ExtendedAttributes*)pControl->GetTag())->hItem);
		g_pClassView->RemoveUITreeItem(hDelete);
		DeleteUI(pControl);
		if(pParent)
			pParent->NeedUpdate();
	}
	m_UICommandHistory.End();

	g_pPropertiesWnd->ShowProperty(NULL);
	m_MultiTracker.RemoveAll();
	this->GetDocument()->SetModifiedFlag();
}
コード例 #2
0
ファイル: formmgr.cpp プロジェクト: Ahmar/hostile-takeover
FormMgr::~FormMgr()
{
	if (m_fFreeDib)
		delete m_pbm;
	while (m_cfrm != 0) {
		Form *pfrm = m_apfrm[0];
		RemoveForm(pfrm);
		delete pfrm;
	}
	delete m_pupd;
}
コード例 #3
0
void CUIDesignerView::OnAlignVertical()
{
	CArray<CControlUI*,CControlUI*> arrSelected;
	m_MultiTracker.GetSelected(arrSelected);
	RemoveForm(arrSelected);
	if(arrSelected.IsEmpty())
		return;

	m_UICommandHistory.Begin(arrSelected, actionModify);
	m_LayoutManager.AlignVertical(m_MultiTracker.GetFocused(),arrSelected);
	m_UICommandHistory.End();
	this->GetDocument()->SetModifiedFlag();
}