/*********************************************************************\ Function name : CDialogPreview::MakeVisible Description : Created at : 07.09.01, @ 16:14:42 Created by : Thomas Kunert Modified by : \*********************************************************************/ void CDialogPreview::MakeVisible(CDialogItem* pItem) { TreeViewItem* pTreeItem = pItem->m_pTreeViewItem; Int32 lLastID = pItem->m_lID; CDialogItem* pSearchItem; while (pTreeItem) { pSearchItem = (CDialogItem*)pTreeItem->GetData()->GetVoid(TREEVIEW_DATA); if (pSearchItem) { if (((pSearchItem->GetType()) == Group) && (pSearchItem != pItem)) { CDialogGroup* pGroup = (CDialogGroup*)pSearchItem; if (pGroup->m_lGroupType == GROUP_TYPE_TAB) { pGroup->m_lLastChildID = lLastID; m_wndSubDlg.SetInt32(pGroup->m_lID, lLastID); } } lLastID = pSearchItem->m_lID; } pTreeItem = pTreeItem->GetParent(); }; }
/*********************************************************************\ Function name : CPreviewSub::Command Description : Created at : 11.08.01, @ 21:30:06 Created by : Thomas Kunert Modified by : \*********************************************************************/ Bool CPreviewSub::Command(Int32 lId, const BaseContainer &msg) { CDialogDoc* pDoc = m_pDialog->m_pDocument; CDialogItem* pItem = pDoc->SearchItem(pDoc->m_pTreeDlg->GetTreeView()->GetRootItem(), lId); if (pItem) { if (pItem->GetType() != Group) pDoc->SelChanged(pItem); if (pItem->GetType() == CustomElement) { CDialogCustomElement* pCustom = (CDialogCustomElement*)pItem; Int32 l = pCustom->GetElementPluginID(); if (l >= 0) { _BaseCustomGui* pGUI = (_BaseCustomGui*)FindCustomGui(lId, l); if (pGUI) { if (pCustom->m_lElement >= 0 && pCustom->m_lElement < g_pCustomElements->Entries() && pCustom->m_pData) { pCustom->m_pData[pCustom->m_lElement] = pGUI->GetData(l); } } } } } return false; }
virtual Int32 AcceptDragObject(void *root,void *userdata,void *obj,Int32 dragtype,void *dragobject, Bool &bAllowCopy) { TreeView* pTree = (TreeView*)userdata; if (dragtype == DRAGTYPE_FILES) { return INSERT_BEFORE | INSERT_AFTER | INSERT_UNDER; } if (pTree->m_lFlags & TREE_VIEW_HAS_DRAG_DROP) { if (dragtype == pTree->m_lElementType) { Int32 lRet = INSERT_BEFORE | INSERT_AFTER; TreeViewItem* pDragDest = (TreeViewItem*)obj; CDialogItem* pDlgItem = (CDialogItem*)pDragDest->GetData()->GetVoid(TREEVIEW_DATA); if (pDlgItem->GetType() == Group || pDlgItem->GetType() == Dialog) lRet |= INSERT_UNDER; if (pDlgItem->GetType() == Dialog) bAllowCopy = false; else bAllowCopy = true; return lRet; } } return false; }