//---------------------------------------------------------------------------- // EgalTech 2014-2014 //---------------------------------------------------------------------------- // File : API_GdbObjects.cpp Data : 02.09.14 Versione : 1.5i1 // Contenuto : Funzioni iterazione di DB geometrico per API. // // // // Modifiche : 02.09.14 DS Creazione modulo. // // //---------------------------------------------------------------------------- //--------------------------- Include ---------------------------------------- #include "stdafx.h" #include "API.h" #include "API_Macro.h" #include "/EgtDev/Include/EInAPI.h" #include "/EgtDev/Include/EGkStringUtils3d.h" #include "/EgtDev/Include/EGnStringConverter.h" #include "/EgtDev/Include/EgtPointerOwner.h" using namespace std ; //----------------------------------------------------------------------------- BOOL __stdcall EgtSelectObj( int nId) { IGeomDB* pGeomDB = GetCurrGeomDB() ; VERIFY_GEOMDB( pGeomDB, FALSE) // seleziono l'oggetto return ( pGeomDB->SelectObj( nId) ? TRUE : FALSE) ; } //----------------------------------------------------------------------------- BOOL __stdcall EgtDeselectObj( int nId) { IGeomDB* pGeomDB = GetCurrGeomDB() ; VERIFY_GEOMDB( pGeomDB, FALSE) // deseleziono l'oggetto return ( pGeomDB->DeselectObj( nId) ? TRUE : FALSE) ; } //----------------------------------------------------------------------------- BOOL __stdcall EgtDeselectAll( void) { IGeomDB* pGeomDB = GetCurrGeomDB() ; VERIFY_GEOMDB( pGeomDB, FALSE) // deseleziono tutto return ( pGeomDB->ClearSelection() ? TRUE : FALSE) ; } //----------------------------------------------------------------------------- BOOL __stdcall EgtIsSelectedObj( int nId) { IGeomDB* pGeomDB = GetCurrGeomDB() ; VERIFY_GEOMDB( pGeomDB, FALSE) // verifico se l'oggetto è selezionato return ( pGeomDB->IsSelectedObj( nId) ? TRUE : FALSE) ; } //----------------------------------------------------------------------------- int __stdcall EgtGetFirstSelectedObj( void) { IGeomDB* pGeomDB = GetCurrGeomDB() ; VERIFY_GEOMDB( pGeomDB, FALSE) // recupero il primo oggetto selezionato return pGeomDB->GetFirstSelectedObj() ; } //----------------------------------------------------------------------------- int __stdcall EgtGetNextSelectedObj( void) { IGeomDB* pGeomDB = GetCurrGeomDB() ; VERIFY_GEOMDB( pGeomDB, FALSE) // recupero il successivo oggetto selezionato return pGeomDB->GetNextSelectedObj() ; }