MCPcopy Create free account
hub / github.com/NetHack/NetHack / itemizeThermo

Function itemizeThermo

outdated/sys/mac/mrecover.c:875–914  ·  view source on GitHub ↗

manage progress thermometer dialog */

Source from the content-addressed store, hash-verified

873
874/* manage progress thermometer dialog */
875static void
876itemizeThermo(short itemMode)
877{
878 short iTyp, iTmp;
879 Handle iHnd;
880 Rect iRct;
881
882 GetDItem(DLGTHM, uitmThermo, &iTyp, &iHnd, &iRct);
883
884 switch (itemMode) {
885 case initItem:
886 SetDItem(DLGTHM, uitmThermo, iTyp, (Handle) drawThermoUPP, &iRct);
887 break;
888
889 case invalItem: {
890 GrafPtr oldPort;
891
892 GetPort(&oldPort);
893 SetPort(GRFTHM);
894
895 InsetRect(&iRct, 1, 1);
896 InvalRect(&iRct);
897
898 SetPort(oldPort);
899 } break;
900
901 case drawItem:
902 FrameRect(&iRct);
903 InsetRect(&iRct, 1, 1);
904
905 iTmp = iRct.right;
906 iRct.right = iRct.left + in.Recover;
907 PaintRect(&iRct);
908
909 iRct.left = iRct.right;
910 iRct.right = iTmp;
911 EraseRect(&iRct);
912 break;
913 }
914}
915
916/* show only <pid-plname>.0 files in get file dialog */
917pascal Boolean

Callers 3

drawThermoFunction · 0.85
beginRecoverFunction · 0.85
continueRecoverFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected