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

/home/jeroen/FOX/fox/fox-1.7.33/include/FXMenuRadio.h
00001 /********************************************************************************
00002 *                                                                               *
00003 *                         M e n u R a d i o   W i d g e t                       *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 2002,2012 by Jeroen van der Zijp.   All Rights Reserved.        *
00007 *********************************************************************************
00008 * This library is free software; you can redistribute it and/or modify          *
00009 * it under the terms of the GNU Lesser General Public License as published by   *
00010 * the Free Software Foundation; either version 3 of the License, or             *
00011 * (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                 *
00016 * GNU Lesser General Public License for more details.                           *
00017 *                                                                               *
00018 * You should have received a copy of the GNU Lesser General Public License      *
00019 * along with this program.  If not, see <http://www.gnu.org/licenses/>          *
00020 ********************************************************************************/
00021 #ifndef FXMENURADIO_H
00022 #define FXMENURADIO_H
00023 
00024 #ifndef FXMENUCOMMAND_H
00025 #include "FXMenuCommand.h"
00026 #endif
00027 
00028 namespace FX {
00029 
00030 
00042 class FXAPI FXMenuRadio : public FXMenuCommand {
00043   FXDECLARE(FXMenuRadio)
00044 protected:
00045   FXColor radioColor;   // Color of the radio
00046   FXuchar check;        // State of menu
00047 protected:
00048   FXMenuRadio();
00049 private:
00050   FXMenuRadio(const FXMenuRadio&);
00051   FXMenuRadio &operator=(const FXMenuRadio&);
00052 public:
00053   long onPaint(FXObject*,FXSelector,void*);
00054   long onButtonPress(FXObject*,FXSelector,void*);
00055   long onButtonRelease(FXObject*,FXSelector,void*);
00056   long onKeyPress(FXObject*,FXSelector,void*);
00057   long onKeyRelease(FXObject*,FXSelector,void*);
00058   long onHotKeyPress(FXObject*,FXSelector,void*);
00059   long onHotKeyRelease(FXObject*,FXSelector,void*);
00060   long onCheck(FXObject*,FXSelector,void*);
00061   long onUncheck(FXObject*,FXSelector,void*);
00062   long onUnknown(FXObject*,FXSelector,void*);
00063   long onCmdSetValue(FXObject*,FXSelector,void*);
00064   long onCmdSetIntValue(FXObject*,FXSelector,void*);
00065   long onCmdGetIntValue(FXObject*,FXSelector,void*);
00066   long onCmdAccel(FXObject*,FXSelector,void*);
00067 public:
00068 
00070   FXMenuRadio(FXComposite* p,const FXString& text,FXObject* tgt=NULL,FXSelector sel=0,FXuint opts=0);
00071 
00073   virtual FXint getDefaultWidth();
00074 
00076   virtual FXint getDefaultHeight();
00077 
00079   void setCheck(FXuchar s=TRUE);
00080 
00082   FXuchar getCheck() const { return check; }
00083 
00085   FXColor getRadioColor() const { return radioColor; }
00086 
00088   void setRadioColor(FXColor clr);
00089 
00091   virtual void save(FXStream& store) const;
00092 
00094   virtual void load(FXStream& store);
00095   };
00096 
00097 }
00098 
00099 #endif

Copyright © 1997-2011 Jeroen van der Zijp