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

/home/jeroen/FOX/fox/fox-1.7.33/include/FXMenuCheck.h
00001 /********************************************************************************
00002 *                                                                               *
00003 *                          M e n u C h e c k   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 FXMENUCHECK_H
00022 #define FXMENUCHECK_H
00023 
00024 #ifndef FXMENUCOMMAND_H
00025 #include "FXMenuCommand.h"
00026 #endif
00027 
00028 namespace FX {
00029 
00030 
00039 class FXAPI FXMenuCheck : public FXMenuCommand {
00040   FXDECLARE(FXMenuCheck)
00041 protected:
00042   FXColor boxColor;     // Box color
00043   FXuchar check;        // State of menu
00044 protected:
00045   FXMenuCheck();
00046 private:
00047   FXMenuCheck(const FXMenuCheck&);
00048   FXMenuCheck &operator=(const FXMenuCheck&);
00049 public:
00050   long onPaint(FXObject*,FXSelector,void*);
00051   long onButtonPress(FXObject*,FXSelector,void*);
00052   long onButtonRelease(FXObject*,FXSelector,void*);
00053   long onKeyPress(FXObject*,FXSelector,void*);
00054   long onKeyRelease(FXObject*,FXSelector,void*);
00055   long onHotKeyPress(FXObject*,FXSelector,void*);
00056   long onHotKeyRelease(FXObject*,FXSelector,void*);
00057   long onCheck(FXObject*,FXSelector,void*);
00058   long onUncheck(FXObject*,FXSelector,void*);
00059   long onUnknown(FXObject*,FXSelector,void*);
00060   long onCmdSetValue(FXObject*,FXSelector,void*);
00061   long onCmdSetIntValue(FXObject*,FXSelector,void*);
00062   long onCmdGetIntValue(FXObject*,FXSelector,void*);
00063   long onCmdAccel(FXObject*,FXSelector,void*);
00064 public:
00065 
00067   FXMenuCheck(FXComposite* p,const FXString& text,FXObject* tgt=NULL,FXSelector sel=0,FXuint opts=0);
00068 
00070   virtual FXint getDefaultWidth();
00071 
00073   virtual FXint getDefaultHeight();
00074 
00076   void setCheck(FXuchar s=TRUE);
00077 
00079   FXuchar getCheck() const { return check; }
00080 
00082   FXColor getBoxColor() const { return boxColor; }
00083 
00085   void setBoxColor(FXColor clr);
00086 
00088   virtual void save(FXStream& store) const;
00089 
00091   virtual void load(FXStream& store);
00092   };
00093 
00094 }
00095 
00096 #endif

Copyright © 1997-2011 Jeroen van der Zijp