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

FXTriStateButton.h
1 /********************************************************************************
2 * *
3 * T r i - S t a t e B u t t o n W i d g e t *
4 * *
5 *********************************************************************************
6 * Copyright (C) 2002,2017 by Charles Warren. 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 FXTRISTATEBUTTON_H
22 #define FXTRISTATEBUTTON_H
23 
24 #ifndef FXTOGGLEBUTTON_H
25 #include "FXToggleButton.h"
26 #endif
27 
28 namespace FX {
29 
38 class FXAPI FXTriStateButton : public FXToggleButton {
39  FXDECLARE(FXTriStateButton)
40 protected:
41  FXString maybelabel;
42  FXIcon *maybeicon;
43  FXString maybetip;
44  FXString maybehelp;
45 protected:
47 private:
49  FXTriStateButton& operator=(const FXTriStateButton&);
50 public:
51  long onPaint(FXObject*,FXSelector,void*);
52  long onUnknown(FXObject*,FXSelector,void*);
53  long onQueryHelp(FXObject*,FXSelector,void*);
54  long onQueryTip(FXObject*,FXSelector,void*);
55 public:
56 
58  FXTriStateButton(FXComposite* p,const FXString& text1,const FXString& text2,const FXString& text3,FXIcon* icon1=NULL,FXIcon* icon2=NULL,FXIcon* icon3=NULL,FXObject* tgt=NULL,FXSelector sel=0,FXuint opts=TOGGLEBUTTON_NORMAL,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=DEFAULT_PAD,FXint pr=DEFAULT_PAD,FXint pt=DEFAULT_PAD,FXint pb=DEFAULT_PAD);
59 
61  virtual void create();
62 
64  virtual void detach();
65 
67  virtual FXint getDefaultWidth();
68 
70  virtual FXint getDefaultHeight();
71 
73  void setMaybeText(const FXString& text);
74 
76  FXString getMaybeText() const { return maybelabel; }
77 
79  void setMaybeIcon(FXIcon* ic);
80 
82  FXIcon* getMaybeIcon() const { return maybeicon; }
83 
85  void setMaybeHelpText(const FXString& text);
86 
88  FXString getMaybeHelpText() const { return maybehelp; }
89 
91  void setMaybeTipText(const FXString& text);
92 
94  FXString getMaybeTipText() const { return maybetip; }
95 
97  virtual void save(FXStream& store) const;
98 
100  virtual void load(FXStream& store);
101 
103  virtual ~FXTriStateButton();
104  };
105 
106 }
107 
108 #endif

Copyright © 1997-2016 Jeroen van der Zijp