1/* 2 * Copyright 2005, Ingo Weinhold, bonefish@users.sf.net. 3 * Distributed under the terms of the MIT License. 4 */ 5 6#include <Alert.h> 7#include <Application.h> 8 9class TestApp : public BApplication { 10public: 11 TestApp() 12 : BApplication("application/x-vnd.haiku.user-shutdown-reply") 13 { 14 } 15 16 virtual bool QuitRequested() 17 { 18 BAlert *alert = new BAlert("Quit App?", 19 "Quit application user_shutdown_reply?", 20 "Quit", "Cancel", NULL, B_WIDTH_AS_USUAL, B_WARNING_ALERT); 21 int32 result = alert->Go(); 22 23 return (result == 0); 24 } 25}; 26 27int 28main() 29{ 30 TestApp app; 31 app.Run(); 32 33 return 0; 34} 35