00001 /* 00002 File : labelledbox_t.h 00003 Date : 19-Sep-02 00004 Description : Class to represent a labelled box toolbox gadget template. 00005 00006 Copyright © 1995-2002 Alexander Thoukydides 00007 00008 This program is free software; you can redistribute it and/or 00009 modify it under the terms of the GNU General Public License 00010 as published by the Free Software Foundation; either version 2 00011 of the License, or (at your option) any later version. 00012 00013 This program is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 GNU General Public License for more details. 00017 00018 You should have received a copy of the GNU General Public License 00019 along with this program; if not, write to the Free Software 00020 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA 00021 */ 00022 00023 // Only include header file once 00024 #ifndef labelledbox_t_h 00025 #define labelledbox_t_h 00026 00027 // Include alexlib header files 00028 #ifndef gadget_t_h 00029 #include "gadget_t.h" 00030 #endif 00031 #ifndef gadget_w_text_h 00032 #include "gadget_w_text.h" 00033 #endif 00034 #ifndef labelledbox_b_h 00035 #include "labelledbox_b.h" 00036 #endif 00037 00038 // A class to represent a label gadget 00039 class labelledbox_t : virtual public gadget_b, 00040 public gadget_t, 00041 public labelledbox_b, 00042 public gadget_w_text 00043 { 00044 public: 00045 00046 /* 00047 Parameters : void 00048 Returns : - 00049 Description : Constructor function. 00050 */ 00051 labelledbox_t(); 00052 00053 protected: 00054 00055 /* 00056 Parameters : void 00057 Returns : - 00058 Description : Dummy pure virtual function for an abstract base class. 00059 */ 00060 virtual void _abstract() const; 00061 00062 /* 00063 Parameters : text - The text string to set. 00064 Returns : void 00065 Description : Gadget specific function to set the text. 00066 */ 00067 virtual void _set_text(const char *text); 00068 00069 /* 00070 Parameters : text - Pointer to buffer to hold the text, or NULL 00071 to read the size of buffer required. 00072 size - The size of the buffer. 00073 Returns : size_t - Number of bytes written to the buffer, or 00074 the buffer size required if NULL passed. 00075 Description : Gadget specific function to get the text or the buffer 00076 size required. 00077 */ 00078 virtual size_t _get_text(char *text, size_t size) const; 00079 }; 00080 00081 #endif
1.3.3