00001 /* 00002 File : actionbutton_t.h 00003 Date : 19-Sep-02 00004 Description : Class to represent an action button field toolbox gadget 00005 template. 00006 00007 Copyright © 1995-2002 Alexander Thoukydides 00008 00009 This program is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU General Public License 00011 as published by the Free Software Foundation; either version 2 00012 of the License, or (at your option) any later version. 00013 00014 This program is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU General Public License for more details. 00018 00019 You should have received a copy of the GNU General Public License 00020 along with this program; if not, write to the Free Software 00021 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 00022 */ 00023 00024 // Only include header file once 00025 #ifndef actionbutton_t_h 00026 #define actionbutton_t_h 00027 00028 // Include alexlib header files 00029 #ifndef actionbutton_b_h 00030 #include "actionbutton_b.h" 00031 #endif 00032 #ifndef gadget_t_h 00033 #include "gadget_t.h" 00034 #endif 00035 #ifndef gadget_w_show_t_h 00036 #include "gadget_w_show_t.h" 00037 #endif 00038 00039 // A class to represent an action button gadget template 00040 class actionbutton_t : public virtual gadget_b, 00041 public gadget_t, 00042 public actionbutton_b, 00043 public gadget_w_show_t 00044 { 00045 public: 00046 00047 /* 00048 Parameters : void 00049 Returns : - 00050 Description : Constructor function. 00051 */ 00052 actionbutton_t(); 00053 00054 protected: 00055 00056 /* 00057 Parameters : event - The toolbox event code. 00058 Returns : void 00059 Description : Gadget specific function to set the toolbox event code 00060 which will be raised for this gadget. 00061 */ 00062 virtual void _set_event(bits event); 00063 00064 /* 00065 Parameters : void 00066 Returns : bits - The toolbox event code. 00067 Description : Gadget specific function to get the toolbox event code 00068 which will be raised for this gadget. 00069 */ 00070 virtual bits _get_event() const; 00071 00072 /* 00073 Parameters : text - The text string to set. 00074 Returns : void 00075 Description : Gadget specific function to set the text. 00076 */ 00077 virtual void _set_text(const char *text); 00078 00079 /* 00080 Parameters : text - Pointer to buffer to hold the text, or NULL 00081 to read the size of buffer required. 00082 size - The size of the buffer. 00083 Returns : size_t - Number of bytes written to the buffer, or 00084 the buffer size required if NULL passed. 00085 Description : Gadget specific function to get the text or the buffer 00086 size required. 00087 */ 00088 virtual size_t _get_text(char *text, size_t size) const; 00089 00090 /* 00091 Parameters : object - The name of the object to show. 00092 Returns : void 00093 Description : Gadget specific function to set the object to show. 00094 */ 00095 virtual void _set_show(const char *object); 00096 00097 /* 00098 Parameters : object - Pointer to buffer to hold the object name, 00099 or NULL to read the size of buffer required. 00100 size - The size of the buffer. 00101 Returns : size_t - Number of bytes written to the buffer, or 00102 the buffer size required if NULL passed. 00103 Description : Gadget specific function to get the object to show or 00104 the buffer size required. 00105 */ 00106 virtual size_t _get_show(char *object, size_t size) const; 00107 }; 00108 00109 #endif
1.3.3