/************************************************************************ ** ** FILE : hasteio.c ** ** ZWECK : ** ** AUTOR : Michael C. Ancutici ** Universitaet Stuttgart, Fakultaet Informatik ** ** DATUM : 14.03.93 ** *************************************************************************/ #include "hasteio.h" #include "hastemarke.h" #include "hastename.h" #include "haka.H" #include "cellste.h" #include "harefreshx.h" #include "steio.h" #include "ste.h" #include "haste.h" #include "stetype.h" #include #include "misc.h" /************************************************************************* ** FUNKTION: HaSteInsertX ** ZWECK: ** EINGABE: ** AUSGABE: ** RETURN: ** ANMERK: *************************************************************************/ void HaSteInsertX( SNr, s) int SNr; STELLE *s; { STRING Name; strcpy( Name, s->Name); s->Name[ 0] = EOL; SteInsert( SNr, s); HaSteDrawX( SNr, SteGC); CellSteEin( SNr, s->PosStelle.x, s->PosStelle.y); HaSteMDrawX( SNr, MarkeGC); HaSteNReplX( SNr, Name); } /************************************************************************* ** FUNKTION: HaSteSingleRemoveX ** ZWECK: entfernt Stelle ** EINGABE: ** AUSGABE: ** RETURN: ** ANMERK: *************************************************************************/ void HaSteSingleRemoveX( SNr) int SNr; { HaSteNReplX( SNr, ""); XSetForeground( MyDisplay, MarkeGC, HaBackColor); HaSteMDrawX( SNr, MarkeGC); XSetForeground( MyDisplay, MarkeGC, HaMarkeColor); HaSteDrawX( SNr, ClearGC); CellSteRemove( SNr); HaRefreshXFromRL(); SteRemove( SNr); } /************************************************************************* ** FUNKTION: HaSteRemoveX ** ZWECK: entfernt Stelle einschliesslich aller abhaengiger ** Kanten. ** EINGABE: ** AUSGABE: ** RETURN: ** ANMERK: *************************************************************************/ void HaSteRemoveX( SNr) int SNr; { HaKaRemoveAllToSteX( SNr); HaSteSingleRemoveX( SNr); } /************************************************************************* ** FUNKTION: HaSteRemove ** ZWECK: entfernt Stelle einschliesslich aller abhaengiger ** Kanten. ** EINGABE: ** AUSGABE: ** RETURN: ** ANMERK: *************************************************************************/ void HaSteRemove( SNr) int SNr; { HaKaRemoveAllToSteX( SNr); HaSteSingleRemoveX( SNr); HaKaRedraw(); } /************************************************************************* ** FUNKTION: HaSteChangeSinglePlace ** ZWECK: ** EINGABE: ** AUSGABE: ** RETURN: ** ANMERK: *************************************************************************/ void HaSteChangeSinglePlace( SNr, x, y) int SNr, x, y; { STRING Name; strcpy( Name, SteStelle[ SNr]->Name); HaSteNReplX( SNr, ""); XSetForeground( MyDisplay, MarkeGC, HaBackColor); HaSteMDrawX( SNr, MarkeGC); XSetForeground( MyDisplay, MarkeGC, HaMarkeColor); HaSteDrawX( SNr, ClearGC); CellSteRemove( SNr); SteChangePlace( SNr, x, y); HaSteDrawX( SNr, SteGC); CellSteEin( SNr, x, y); HaSteMDrawX( SNr, MarkeGC); HaSteNReplX( SNr, Name); } /************************************************************************* ** FUNKTION: HaSteChangePlace ** ZWECK: ** EINGABE: ** AUSGABE: ** RETURN: ** ANMERK: *************************************************************************/ void HaSteChangePlace( SNr, x, y) int SNr, x, y; { HaKaDeInstallAllToSteX( SNr); HaSteChangeSinglePlace( SNr, x, y); HaKaInstallAllToSteX( SNr); HaKaRedraw(); }