00001 #ifndef BUTTON_CLASS 00002 #define BUTTON_CLASS 00003 00004 /*****************************************************************************\ 00005 * * 00006 * Name : button * 00007 * Author : Chris Koeritz * 00008 * * 00009 * Purpose: * 00010 * * 00011 * Creates a push button object on a manager object. * 00012 * * 00013 ******************************************************************************* 00014 * Copyright (c) 1991-$now By Author. This program is free software; you can * 00015 * redistribute it and/or modify it under the terms of the GNU General Public * 00016 * License as published by the Free Software Foundation; either version 2 of * 00017 * the License or (at your option) any later version. This is online at: * 00018 * http://www.fsf.org/copyleft/gpl.html * 00019 * Please send any updates to: fred@gruntose.com * 00020 \*****************************************************************************/ 00021 00022 #include "dll_wp_active.h" 00023 00024 #include <wp_passive/worker.h> 00025 00026 class WP_ACTIVE_CLASS_STYLE button : public worker 00027 { 00028 public: 00029 button(manager &parent, const c_point &origin, const char *message, 00030 const color &foreground = colors::WHITE, const color &background = colors::BLACK); 00031 ~button(); 00032 00033 IMPLEMENT_CLASS_NAME("button"); 00034 00035 virtual void button_event(); 00036 // this event function is invoked when the user presses (and then releases) 00037 // the button. 00038 00039 private: 00040 window_handle create_button_handle(manager &root, 00041 const istring &message, const c_point &origin); 00042 }; 00043 00044 #endif
1.5.1