FXMenuRadio.h

Go to the documentation of this file.
00001 /********************************************************************************
00002 *                                                                               *
00003 *                         M e n u R a d i o   W i d g e t                       *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 2002,2006 by Jeroen van der Zijp.   All Rights Reserved.        *
00007 *********************************************************************************
00008 * This library is free software; you can redistribute it and/or                 *
00009 * modify it under the terms of the GNU Lesser General Public                    *
00010 * License as published by the Free Software Foundation; either                  *
00011 * version 2.1 of the License, or (at your option) any later version.            *
00012 *                                                                               *
00013 * This library 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 GNU             *
00016 * Lesser General Public License for more details.                               *
00017 *                                                                               *
00018 * You should have received a copy of the GNU Lesser General Public              *
00019 * License along with this library; if not, write to the Free Software           *
00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.    *
00021 *********************************************************************************
00022 * $Id: FXMenuRadio.h,v 1.13 2006/01/22 17:58:06 fox Exp $                       *
00023 ********************************************************************************/
00024 #ifndef FX_DISABLEMENUS
00025 
00026 #ifndef FXMENURADIO_H
00027 #define FXMENURADIO_H
00028 
00029 #ifndef FXMENUCOMMAND_H
00030 #include "FXMenuCommand.h"
00031 #endif
00032 
00033 namespace FX {
00034 
00035 
00047 class FXAPI FXMenuRadio : public FXMenuCommand {
00048   FXDECLARE(FXMenuRadio)
00049 protected:
00050   FXuchar check;        // State of menu
00051   FXColor radioColor;   // Color of the radio
00052 protected:
00053   FXMenuRadio();
00054 private:
00055   FXMenuRadio(const FXMenuRadio&);
00056   FXMenuRadio &operator=(const FXMenuRadio&);
00057 public:
00058   long onPaint(FXObject*,FXSelector,void*);
00059   long onButtonPress(FXObject*,FXSelector,void*);
00060   long onButtonRelease(FXObject*,FXSelector,void*);
00061   long onKeyPress(FXObject*,FXSelector,void*);
00062   long onKeyRelease(FXObject*,FXSelector,void*);
00063   long onHotKeyPress(FXObject*,FXSelector,void*);
00064   long onHotKeyRelease(FXObject*,FXSelector,void*);
00065   long onCheck(FXObject*,FXSelector,void*);
00066   long onUncheck(FXObject*,FXSelector,void*);
00067   long onUnknown(FXObject*,FXSelector,void*);
00068   long onCmdSetValue(FXObject*,FXSelector,void*);
00069   long onCmdSetIntValue(FXObject*,FXSelector,void*);
00070   long onCmdGetIntValue(FXObject*,FXSelector,void*);
00071   long onCmdAccel(FXObject*,FXSelector,void*);
00072 public:
00073 
00075   FXMenuRadio(FXComposite* p,const FXString& text,FXObject* tgt=NULL,FXSelector sel=0,FXuint opts=0);
00076 
00078   virtual FXint getDefaultWidth();
00079 
00081   virtual FXint getDefaultHeight();
00082 
00084   void setCheck(FXbool s=TRUE);
00085 
00087   FXbool getCheck() const { return check; }
00088 
00090   FXColor getRadioColor() const { return radioColor; }
00091 
00093   void setRadioColor(FXColor clr);
00094 
00096   virtual void save(FXStream& store) const;
00097 
00099   virtual void load(FXStream& store);
00100   };
00101 
00102 }
00103 
00104 #endif
00105 #endif

(C) 2002-2009 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Nov 20 18:31:23 2009 for TnFOX by doxygen v1.4.7