/************************************************************************ ** ** FILE : cellname.c ** ** ZWECK : ** ** AUTOR : Michael C. Ancutici ** Universitaet Stuttgart, Fakultaet Informatik ** ** DATUM : 14.03.93 ** *************************************************************************/ #include "cellname.h" #include "cell.h" #include "cell.H" #include "celldel.h" #include "cellein.h" #include "tra.h" #include "ste.h" #include "misc.h" #include /************************************************************************* ** FUNKTION: CellSteNDel ** ZWECK: Loescht den Namen einer Stelle ** EINGABE: Nr der Stelle und Breite des Namens in Pixel ** AUSGABE: ** RETURN: ** ANMERK: Objekt in SteStelle, auf das OrgName zeigt, wird ** hier nicht geloescht. Das geschieht beim Loeschen ** der Stelle selbst. *************************************************************************/ void CellSteNDel( SNr, width) int SNr; int width; { int mx = SteStelle[ SNr]->PosName.x; int cy = CellYKoord( SteStelle[ SNr]->PosName.y); int cx, cx2; cx = CellXKoord( mx); cx2 = CellXKoord( mx + width); for (cx, cy; cx <= cx2; cx++) CellObjDel( &(Cell[ cx][ cy]), CE_STE_NAME, SNr); } /************************************************************************* ** FUNKTION: CellSteNEin ** ZWECK: sucht Platz fuer Stellenname und traegt ihn ein *************************************************************************/ void CellSteNEin( SNr, width, mx, my) int SNr; int width; int *mx, *my; { int cx = CellXKoord( *mx); int cy = CellYKoord( *my); int cx2 = CellXKoord( *mx + width); OBJECT *O; O = SteStelle[ SNr]->OrgSteN; /**** IN CELL EINTRAGEN ***********************************************/ for (cx, cy; cx <= cx2; cx++) if ( !(Cell[ cx][ cy]) ) Cell[ cx][ cy] = O; else CellObjEin( &(Cell[ cx][ cy]), O); } /************************************************************************* ** FUNKTION: CellTraNDel ** ZWECK: Loescht den Namen einer Trans ** EINGABE: Nr der Trans und Breite des Namens in Pixel ** AUSGABE: ** RETURN: ** ANMERK: Objekt in TraTrans, auf das OrgName zeigt, wird ** hier nicht geloescht. Das geschieht beim Loeschen ** der Trans selbst. *************************************************************************/ void CellTraNDel( TNr, width) int TNr; int width; { int mx = TraTrans[ TNr]->PosName.x; int cy = CellYKoord( TraTrans[ TNr]->PosName.y); int cx, cx2; cx = CellXKoord( mx); cx2 = CellXKoord( mx + width); for (cx, cy; cx <= cx2; cx++) CellObjDel( &(Cell[ cx][ cy]), CE_TRANS_NAME, TNr); } /************************************************************************* ** FUNKTION: CellTraNEin ** ZWECK: sucht Platz fuer Transnname und traegt ihn ein *************************************************************************/ void CellTraNEin( TNr, width, mx, my) int TNr; int width; int *mx, *my; { int cx = CellXKoord( *mx); int cy = CellYKoord( *my); int cx2 = CellXKoord( *mx + width); OBJECT *O; O = TraTrans[ TNr]->OrgTraN; /**** IN CELL EINTRAGEN ***********************************************/ for (cx, cy; cx <= cx2; cx++) if ( !(Cell[ cx][ cy]) ) Cell[ cx][ cy] = O; else CellObjEin( &(Cell[ cx][ cy]), O); } /************************************************************************* ** FUNKTION: CellKaDDel ** ZWECK: ** EINGABE: ** AUSGABE: ** RETURN: ** ANMERK: *************************************************************************/ void CellKaDDel( O, Pos, width) OBJECT *O; KOORDINATE *Pos; int width; { int cy = CellYKoord( Pos->y); int cx, cx2; cx = CellXKoord( Pos->x); cx2 = CellXKoord( Pos->x + width); for (cx, cy; cx <= cx2; cx++) CellKDel( &(Cell[ cx][ cy]), O); } /************************************************************************* ** FUNKTION: CellKaDEin ** ZWECK: sucht Platz fuer Transnname und traegt ihn ein *************************************************************************/ void CellKaDEin( O, Pos, width) OBJECT *O; KOORDINATE *Pos; int width; { int cy = CellYKoord( Pos->y); int cx, cx2; cx = CellXKoord( Pos->x); cx2 = CellXKoord( Pos->x + width); /**** IN CELL EINTRAGEN ***********************************************/ for (cx, cy; cx <= cx2; cx++) if ( !(Cell[ cx][ cy]) ) CellKEin( &(Cell[ cx][ cy]), O); }