//============================================================================== STDMETHODIMP CVMain::ShowGroup(long iGroupID, long iLogID){ int iObj, nObjects; CVObject *pObj; nObjects = g_ptObjectList.GetN_Pointers(); for( iObj = 0; iObj<nObjects; iObj++){ g_ptObjectList.GetPointer( iObj, (void **) &pObj); if(iGroupID) pObj->Show( iGroupID ); else pObj->Show(); } g_RequestUpdate(iLogID); return S_OK; }
//============================================================================== STDMETHODIMP CVMain::MoveGroup(long iGroupID, SAFEARRAY * psaXY, long iLogID){ double * pdData; int iObj, nObjects; CVObject *pObj; // We expect 2-long array of doubles if( g_CheckSafeArray( 2, psaXY, &pdData )) { return g_ErrorToHresult( 1 ); } nObjects = g_ptObjectList.GetN_Pointers(); for( iObj = 0; iObj<nObjects; iObj++){ g_ptObjectList.GetPointer( iObj, (void **) &pObj); if(iGroupID) pObj->Move( pdData[0], pdData[1], iGroupID ); else pObj->Move( pdData[0], pdData[1]); } SafeArrayUnaccessData( psaXY ); g_RequestUpdate(iLogID); return S_OK; }
//============================================================================== void CVObject::m_RequestUpdate( long iLogID ){ if(m_IsVisible) g_RequestUpdate(iLogID); }
//============================================================================== HRESULT CVObject::vHide( long iLogID ){ Hide(); g_RequestUpdate(iLogID); return S_OK; }
//============================================================================== HRESULT CVObject::vShow( long iLogID ){ Show(); g_RequestUpdate(iLogID); return S_OK; }
//============================================================================== HRESULT CVObject::vSetShowFlag( long iShowFlag, long iLogID){ m_IsVisible = iShowFlag; g_RequestUpdate(iLogID); return S_OK; }