Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members

draggable_t.h

Go to the documentation of this file.
00001 /*
00002     File        : draggable_t.h
00003     Date        : 19-Sep-02
00004     Description : Class to represent a draggable 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 draggable_t_h
00025 #define draggable_t_h
00026 
00027 // Include alexlib header files
00028 #ifndef draggable_b_h
00029 #include "draggable_b.h"
00030 #endif
00031 #ifndef gadget_t_h
00032 #include "gadget_t.h"
00033 #endif
00034 
00035 // A class to represent a button gadget template
00036 class draggable_t : public virtual gadget_b,
00037                     public gadget_t,
00038                     public draggable_b
00039 {
00040 public:
00041 
00042     /*
00043         Parameters  : void
00044         Returns     : -
00045         Description : Constructor function.
00046     */
00047     draggable_t();
00048 
00049 protected:
00050 
00051     /*
00052         Parameters  : text  - The text string to set.
00053         Returns     : void
00054         Description : Gadget specific function to set the text.
00055     */
00056     virtual void _set_text(const char *text);
00057 
00058     /*
00059         Parameters  : text      - Pointer to buffer to hold the text, or NULL
00060                                   to read the size of buffer required.
00061                       size      - The size of the buffer.
00062         Returns     : size_t    - Number of bytes written to the buffer, or
00063                                   the buffer size required if NULL passed.
00064         Description : Gadget specific function to get the text or the buffer
00065                       size required.
00066     */
00067     virtual size_t _get_text(char *text, size_t size) const;
00068 
00069     /*
00070         Parameters  : sprite    - The sprite name.
00071         Returns     : void
00072         Description : Representation specific function to set the sprite name.
00073     */
00074     virtual void _set_sprite(const char *sprite);
00075 
00076     /*
00077         Parameters  : sprite    - Pointer to buffer to hold the sprite name,
00078                                   or NULL to read the size of buffer required.
00079                       size      - The size of the buffer.
00080         Returns     : size_t    - Number of bytes written to the buffer, or
00081                                   the buffer size required if NULL passed.
00082         Description : Representation specific function to get the sprite name
00083                       or the buffer size required.
00084     */
00085     virtual size_t _get_sprite(char *sprite, size_t size) const;
00086 };
00087 
00088 #endif

Generated on Sun Jan 26 10:18:43 2025 for NBLib by doxygen 1.3.3