FXTriStateButton.h

Go to the documentation of this file.
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,2006 by Charles Warren.   All Rights Reserved.             *
00007 *********************************************************************************
00008 * This library is free software; you can redistribute it and/or                 *
00009 * modify it under the terms of the GNU Lesser General Public                    *
00010 * License as published by the Free Software Foundation; either                  *
00011 * version 2.1 of the License, or (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 GNU             *
00016 * Lesser General Public License for more details.                               *
00017 *                                                                               *
00018 * You should have received a copy of the GNU Lesser General Public              *
00019 * License along with this library; if not, write to the Free Software           *
00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.    *
00021 *********************************************************************************
00022 * $Id: FXTriStateButton.h,v 1.6 2006/01/22 17:58:11 fox Exp $                   *
00023 ********************************************************************************/
00024 #ifndef FXTRISTATEBUTTON_H
00025 #define FXTRISTATEBUTTON_H
00026 
00027 #ifndef FXTOGGLEBUTTON_H
00028 #include "FXToggleButton.h"
00029 #endif
00030 
00031 
00032 namespace FX {
00033 
00042 class FXAPI FXTriStateButton : public FXToggleButton {
00043   FXDECLARE(FXTriStateButton)
00044 protected:
00045   FXString  maybelabel;
00046   FXIcon   *maybeicon;
00047   FXString  maybetip;
00048   FXString  maybehelp;
00049 protected:
00050   FXTriStateButton();
00051 private:
00052   FXTriStateButton(const FXTriStateButton&);
00053   FXTriStateButton& operator=(const FXTriStateButton&);
00054 public:
00055   long onPaint(FXObject*,FXSelector,void*);
00056   long onUnknown(FXObject*,FXSelector,void*);
00057   long onQueryHelp(FXObject*,FXSelector,void*);
00058   long onQueryTip(FXObject*,FXSelector,void*);
00059 public:
00060 
00062   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);
00063 
00065   virtual void create();
00066 
00068   virtual void detach();
00069 
00071   virtual FXint getDefaultWidth();
00072 
00074   virtual FXint getDefaultHeight();
00075 
00077   void setMaybeText(const FXString& text);
00078 
00080   FXString getMaybeText() const { return maybelabel; }
00081 
00083   void setMaybeIcon(FXIcon* ic);
00084 
00086   FXIcon* getMaybeIcon() const { return maybeicon; }
00087 
00089   void setMaybeHelpText(const FXString& text);
00090 
00092   FXString getMaybeHelpText() const { return maybehelp; }
00093 
00095   void setMaybeTipText(const FXString& text);
00096 
00098   FXString getMaybeTipText() const { return maybetip; }
00099 
00101   virtual void save(FXStream& store) const;
00102 
00104   virtual void load(FXStream& store);
00105 
00107   virtual ~FXTriStateButton();
00108   };
00109 
00110 }
00111 
00112 #endif

(C) 2002-2009 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Nov 20 18:31:25 2009 for TnFOX by doxygen v1.4.7