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

gadget_w_show_c.h

Go to the documentation of this file.
00001 /*
00002     File        : gadget_w_show_c.h
00003     Date        : 19-Sep-02
00004     Description : Class to represent a toolbox gadget that allows another
00005                   object to be shown.
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 gadget_w_show_c_h
00026 #define gadget_w_show_c_h
00027 
00028 // Include oslib header files
00029 #include "oslib/gadget.h"
00030 
00031 // A class to represent a gadget with a selectable event
00032 class gadget_w_show_c
00033 {
00034 public:
00035 
00036     /*
00037         Parameters  : object    - The object to show.
00038         Returns     : void
00039         Description : Set the object to show.
00040     */
00041     void set_show(toolbox_o object = toolbox_NULL_OBJECT);
00042 
00043     /*
00044         Parameters  : void
00045         Returns     : toolbox_o - The object to show.
00046         Description : Get the object to show.
00047     */
00048     toolbox_o get_show() const;
00049 
00050 protected:
00051 
00052     /*
00053         Parameters  : object    - The object to show.
00054         Returns     : void
00055         Description : Gadget specific function to set the object to show.
00056     */
00057     virtual void _set_show(toolbox_o object) = 0;
00058 
00059     /*
00060         Parameters  : void
00061         Returns     : toolbox_o - The object to show.
00062         Description : Gadget specific function to get the object to show.
00063     */
00064     virtual toolbox_o _get_show() const = 0;
00065 };
00066 
00067 /*
00068     Parameters  : object    - The object to show.
00069     Returns     : void
00070     Description : Set the object to show.
00071 */
00072 inline void gadget_w_show_c::set_show(toolbox_o object)
00073 {
00074     _set_show(object);
00075 }
00076 
00077 /*
00078     Parameters  : void
00079     Returns     : toolbox_o - The object to show.
00080     Description : Get the object to show.
00081 */
00082 inline toolbox_o gadget_w_show_c::get_show() const
00083 {
00084     return _get_show();
00085 }
00086 
00087 #endif

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