00001 #ifndef THERMOMETER_CLASS 00002 #define THERMOMETER_CLASS 00003 00004 /*****************************************************************************\ 00005 * * 00006 * Name : thermometer * 00007 * Author : Chris Koeritz * 00008 * * 00009 * Purpose: * 00010 * * 00011 * Provides a window object that looks like a thermometer; some portion of * 00012 * it is filled and some is not, and the mouse can be used to change the * 00013 * amount that is filled? * 00014 * * 00015 ******************************************************************************* 00016 * Copyright (c) 1991-$now By Author. This program is free software; you can * 00017 * redistribute it and/or modify it under the terms of the GNU General Public * 00018 * License as published by the Free Software Foundation; either version 2 of * 00019 * the License or (at your option) any later version. This is online at: * 00020 * http://www.fsf.org/copyleft/gpl.html * 00021 * Please send any updates to: fred@gruntose.com * 00022 \*****************************************************************************/ 00023 00024 #include "button.h" 00025 #include "dll_wp_active.h" 00026 00027 #include <wp_passive/box.h> 00028 #include <wp_passive/canvas.h> 00029 00030 class WP_ACTIVE_CLASS_STYLE thermometer : public canvas 00031 { 00032 public: 00033 thermometer(manager &parent, const c_rectangle &dimensions, 00034 const color &foreground = colors::WHITE, const color &background = colors::BLACK); 00035 00036 ~thermometer(); 00037 00038 virtual void movement_event(); 00039 virtual void distance_set_event(); 00040 00041 private: 00042 box tube; 00043 box mercury; 00044 button doneWidget; 00045 button cancelWidget; 00046 00047 friend void cursorMove(window_handle w, caddr_t clientData, XEvent *event); 00048 friend void doneSetDistance 00049 (window_handle w, caddr_t clientData, XmAnyCallbackStruct *callData); 00050 friend void cancelSetDistance 00051 (window_handle w, caddr_t clientData, XmAnyCallbackStruct *callData); 00052 }; 00053 00054 #endif 00055
1.5.1