00001 #ifndef QUIT_BUTTON_CLASS 00002 #define QUIT_BUTTON_CLASS 00003 00004 /*****************************************************************************\ 00005 * * 00006 * Name : quit_button * 00007 * Author : Chris Koeritz * 00008 * * 00009 * Purpose: * 00010 * * 00011 * Provides a method for shutting down the system that is tied to a button. * 00012 * When the user selects the quit button, the system asks the user if the * 00013 * program should really terminate. If the user selects yes, the main * 00014 * program exits after shutting down the window system. * 00015 * * 00016 ******************************************************************************* 00017 * Copyright (c) 1991-$now By Author. This program is free software; you can * 00018 * redistribute it and/or modify it under the terms of the GNU General Public * 00019 * License as published by the Free Software Foundation; either version 2 of * 00020 * the License or (at your option) any later version. This is online at: * 00021 * http://www.fsf.org/copyleft/gpl.html * 00022 * Please send any updates to: fred@gruntose.com * 00023 \*****************************************************************************/ 00024 00025 #include "button.h" 00026 #include "message_box.h" 00027 00028 class WP_ACTIVE_CLASS_STYLE quit_button : public button 00029 { 00030 public: 00031 quit_button(manager &root, const c_point &origin, 00032 const color &foreground = colors::BLACK, const color &background = colors::WHITE); 00033 virtual ~quit_button(); 00034 00035 virtual void quit_button_event(); 00036 // This event function is invoked when the user has selected quit. The 00037 // event occurs prior to shutting down the system so that a shutdown 00038 // procedure can be followed before system exit. 00039 00040 private: 00041 int really_quit; 00042 message_box *really; 00043 00044 virtual void button_event(); 00045 }; 00046 00047 #endif
1.5.1