static BOOL CurrItemDestroy( OBJPTR _ci, void *first, void *p2 ) /**************************************************************/ { /* destroy the CURRITEM - the object was destroyed while it was current */ CURRITEM *ci = _ci; OBJPTR obj; p2 = p2; /* ref'd to avoid warning */ obj = ci->obj; DeleteCurrObject( ci ); Destroy( obj, *(BOOL *)first ); return( TRUE ); }
void AddCurrObject( OBJPTR obj ) /******************************/ { /* add obj to the list of current objects */ bool reset; OBJPTR currobj; OBJPTR main_currobj; reset = false; currobj = GetCurrObj(); OBJ_DISPATCHER( currobj )( ADD_OBJECT, currobj, obj, &reset ); /* if the main object is in the list, remove it */ /* so the main object can't be part of a multiple selection */ main_currobj = GetCurrObjptr( GetMainObject() ); if( main_currobj != NULL ) { DeleteCurrObject( main_currobj ); } }
void FMEDITAPI ResetCurrObject( bool draw ) /*****************************************/ { /* reset the current object */ OBJPTR currobj; OBJPTR nextobj; for( currobj = GetEditCurrObject(); currobj != NULL; currobj = nextobj ) { nextobj = GetNextEditCurrObject( currobj ); if( draw ) { if( GetObjptr( currobj ) != GetMainObject() ) { ObjMark( currobj ); } } DeleteCurrObject( currobj ); } if( draw ) { UpdateWindow( GetAppWnd() ); } }