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

/home/jeroen/FOX/fox/fox-1.7.33/include/FXTriStateButton.h
00001 /********************************************************************************
00002 *                                                                               *
00003 *               T r i - S t a t e    B u t t o n    W i d g e t                 *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 2002,2012 by Charles Warren.   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 FXTRISTATEBUTTON_H
00022 #define FXTRISTATEBUTTON_H
00023 
00024 #ifndef FXTOGGLEBUTTON_H
00025 #include "FXToggleButton.h"
00026 #endif
00027 
00028 
00029 namespace FX {
00030 
00039 class FXAPI FXTriStateButton : public FXToggleButton {
00040   FXDECLARE(FXTriStateButton)
00041 protected:
00042   FXString  maybelabel;
00043   FXIcon   *maybeicon;
00044   FXString  maybetip;
00045   FXString  maybehelp;
00046 protected:
00047   FXTriStateButton();
00048 private:
00049   FXTriStateButton(const FXTriStateButton&);
00050   FXTriStateButton& operator=(const FXTriStateButton&);
00051 public:
00052   long onPaint(FXObject*,FXSelector,void*);
00053   long onUnknown(FXObject*,FXSelector,void*);
00054   long onQueryHelp(FXObject*,FXSelector,void*);
00055   long onQueryTip(FXObject*,FXSelector,void*);
00056 public:
00057 
00059   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);
00060 
00062   virtual void create();
00063 
00065   virtual void detach();
00066 
00068   virtual FXint getDefaultWidth();
00069 
00071   virtual FXint getDefaultHeight();
00072 
00074   void setMaybeText(const FXString& text);
00075 
00077   FXString getMaybeText() const { return maybelabel; }
00078 
00080   void setMaybeIcon(FXIcon* ic);
00081 
00083   FXIcon* getMaybeIcon() const { return maybeicon; }
00084 
00086   void setMaybeHelpText(const FXString& text);
00087 
00089   FXString getMaybeHelpText() const { return maybehelp; }
00090 
00092   void setMaybeTipText(const FXString& text);
00093 
00095   FXString getMaybeTipText() const { return maybetip; }
00096 
00098   virtual void save(FXStream& store) const;
00099 
00101   virtual void load(FXStream& store);
00102 
00104   virtual ~FXTriStateButton();
00105   };
00106 
00107 }
00108 
00109 #endif

Copyright © 1997-2011 Jeroen van der Zijp