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

FXMenuRadio.h
1 /********************************************************************************
2 * *
3 * M e n u R a d i o W i d g e t *
4 * *
5 *********************************************************************************
6 * Copyright (C) 2002,2017 by Jeroen van der Zijp. All Rights Reserved. *
7 *********************************************************************************
8 * This library is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU Lesser General Public License as published by *
10 * the Free Software Foundation; either version 3 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * This library is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public License *
19 * along with this program. If not, see <http://www.gnu.org/licenses/> *
20 ********************************************************************************/
21 #ifndef FXMENURADIO_H
22 #define FXMENURADIO_H
23 
24 #ifndef FXMENUCOMMAND_H
25 #include "FXMenuCommand.h"
26 #endif
27 
28 namespace FX {
29 
30 
42 class FXAPI FXMenuRadio : public FXMenuCommand {
43  FXDECLARE(FXMenuRadio)
44 protected:
45  FXColor radioColor; // Color of the radio
46  FXuchar check; // State of menu
47 protected:
48  FXMenuRadio();
49 private:
50  FXMenuRadio(const FXMenuRadio&);
51  FXMenuRadio &operator=(const FXMenuRadio&);
52 public:
53  long onPaint(FXObject*,FXSelector,void*);
54  long onButtonPress(FXObject*,FXSelector,void*);
55  long onButtonRelease(FXObject*,FXSelector,void*);
56  long onKeyPress(FXObject*,FXSelector,void*);
57  long onKeyRelease(FXObject*,FXSelector,void*);
58  long onHotKeyPress(FXObject*,FXSelector,void*);
59  long onHotKeyRelease(FXObject*,FXSelector,void*);
60  long onCheck(FXObject*,FXSelector,void*);
61  long onUncheck(FXObject*,FXSelector,void*);
62  long onUnknown(FXObject*,FXSelector,void*);
63  long onCmdSetValue(FXObject*,FXSelector,void*);
64  long onCmdSetIntValue(FXObject*,FXSelector,void*);
65  long onCmdGetIntValue(FXObject*,FXSelector,void*);
66  long onCmdAccel(FXObject*,FXSelector,void*);
67 public:
68 
70  FXMenuRadio(FXComposite* p,const FXString& text,FXObject* tgt=NULL,FXSelector sel=0,FXuint opts=0);
71 
73  virtual FXint getDefaultWidth();
74 
76  virtual FXint getDefaultHeight();
77 
79  void setCheck(FXuchar s=true);
80 
82  FXuchar getCheck() const { return check; }
83 
85  FXColor getRadioColor() const { return radioColor; }
86 
88  void setRadioColor(FXColor clr);
89 
91  virtual void save(FXStream& store) const;
92 
94  virtual void load(FXStream& store);
95  };
96 
97 }
98 
99 #endif

Copyright © 1997-2016 Jeroen van der Zijp