/**** * * Implementation of quitbutton.h. * */ #include "quit-button.h" #include #ifdef OLD_EXCEPTION_HANDLING exception QuitButtonPressed; #endif QuitButton::QuitButton() : PushButton("Quit", new ButtonState(), true) {} QuitButton::QuitButton(char* label) : PushButton(label, new ButtonState(), true) {} QuitButton::QuitButton(Font* font, char* label = "Quit") : PushButton(label, new ButtonState(), true) { output = new Painter(); output->SetFont(font); } void QuitButton::Press() { #ifndef OLD_EXCEPTION_HANDLING throw QuitButtonPressed(); #else throw(QuitButtonPressed, null); #endif }