int main(int argc, char *argv[]) { Window* win = new IconWindow(new XWindowImp()); win->DrawContents(); delete win; win = new TransientWindow(new PMWindowImp()); win->DrawContents(); delete win; return 0; }
int main(int argc, char *argv[]) { Window* pAppWindow = new ApplicationWindow; WindowImp* pXImp = new XWindowImp; pAppWindow->SetWindowImp(pXImp); pAppWindow->DrawContents(); WindowImp* pPmImp = new PmWindowImp; pAppWindow->SetWindowImp(pPmImp); pAppWindow->DrawContents(); return 0; }