// twabout.c // // This file handles the About window. // // by John D. de Boer #include "twist.h" #include "twindow.h" window *AboutWind; // "About window" menus static void SetUpAboutMenus(void) { SetUpFileMenu(); SetUpWindowMenu(); } static void AdjustAboutMenus(window *W) { if (!W) return; AdjustFileMenu(W); allowitem(NULL,'abou',0); } // Drawing picture AboutPict=NULL; static void DrawAbout(window *W) { rect R,Native; point Centre,PC; if (!W) return; R=W->page; Centre=middle(R); fillindex(W,black); fillrect(W,R); penindex(W,darkgrey); framerect(W,R); penindex(W,black); if (AboutPict) { Native=picturerect(AboutPict); PC=Centre; PC.y+= 105 / 2; PC.x+=12; centrerect(&Native,PC); drawpicture(W,AboutPict,Native); } textfont(W,"Apple Chancery",16.0); fillindex(W,paleyellow); textcentre(W,Centre.x,95,"Twistory"); textfont(W,"Geneva",11.0); textcentre(W,Centre.x,80,"Unravel the Strands of History"); textcentre(W,Centre.x,55,"Twistory is a freeware \"history browser.\" "); drawtext(W,15,30,"Thank-you to all those who supported Twistory"); drawtext(W,15,15,"as shareware during its early development."); textleft(W,370,30,"John D. de Boer"); textleft(W,370,15,"deboer@king.igs.net"); } // Initialisation void InitAboutWindow(void) { AboutWind=customwindow("About Twistory",385,245,0); installmenus(AboutWind,NULL,&SetUpAboutMenus,&AdjustAboutMenus,&FileCommand); installpaint(AboutWind,&DrawAbout); installclick(AboutWind,NULL,&concealwindow,NULL); AboutPict=getpicture("about"); }