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

displayfield_b.h

Go to the documentation of this file.
00001 /*
00002     File        : displayfield_b.h
00003     Date        : 19-Sep-02
00004     Description : Base class to represent a display field toolbox gadget.
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 displayfield_b_h
00025 #define displayfield_b_h
00026 
00027 // Include oslib header files
00028 #include "oslib/displayfield.h"
00029 
00030 // Include alexlib header files
00031 #ifndef gadget_b_h
00032 #include "gadget_b.h"
00033 #endif
00034 #ifndef gadget_w_justification_h
00035 #include "gadget_w_justification.h"
00036 #endif
00037 #ifndef gadget_w_string_h
00038 #include "gadget_w_string.h"
00039 #endif
00040 
00041 // A base class to represent a display field gadget
00042 class displayfield_b : public virtual gadget_b,
00043                        public gadget_w_justification,
00044                        public gadget_w_string
00045 {
00046 public:
00047 
00048     /*
00049         Parameters  : value             - The text string to set.
00050         Returns     : displayfield_b    - This object.
00051         Description : Set the value of this gadget. To reduce flicker the value
00052                       is not updated unless it has changed.
00053     */
00054     displayfield_b &operator=(const char *value);
00055 
00056     /*
00057         Parameters  : value             - The text string to set.
00058         Returns     : displayfield_b    - This object.
00059         Description : Set the value of this gadget. To reduce flicker the value
00060                       is not updated unless it has changed.
00061     */
00062     displayfield_b &operator=(const string &value);
00063 
00064 protected:
00065 
00066     /*
00067         Parameters  : position  - The field justification.
00068         Returns     : void
00069         Description : Gadget specific function to set the justification.
00070     */
00071     virtual void _set_justification(justification position);
00072 
00073     /*
00074         Parameters  : void
00075         Returns     : bool  - The field justification.
00076         Description : Gadget specific function to Get the justification.
00077     */
00078     virtual justification _get_justification() const;
00079 };
00080 
00081 #endif

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