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

/home/jeroen/FOX/fox/fox-1.7.33/include/FXIcon.h
00001 /********************************************************************************
00002 *                                                                               *
00003 *                               I c o n - O b j e c t                           *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 1997,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 FXICON_H
00022 #define FXICON_H
00023 
00024 #ifndef FXIMAGE_H
00025 #include "FXImage.h"
00026 #endif
00027 
00028 namespace FX {
00029 
00030 class FXDC;
00031 class FXDCWindow;
00032 class FXDrawable;
00033 class FXTopWindow;
00034 
00035 
00042 class FXAPI FXIcon : public FXImage {
00043   FXDECLARE(FXIcon)
00044   friend class FXDC;
00045   friend class FXWindow;
00046   friend class FXDCWindow;
00047   friend class FXDrawable;
00048   friend class FXTopWindow;
00049 protected:
00050   FXID     shape;             // Shape pixmap
00051   FXID     etch;              // Etch pixmap
00052   FXColor  transp;            // Transparency color
00053   FXshort  thresh;            // Treshold for etch mask
00054 protected:
00055   FXIcon();
00056   FXColor guesstransp() const;
00057   FXshort guessthresh() const;
00058 private:
00059   FXIcon(const FXIcon&);
00060   FXIcon &operator=(const FXIcon&);
00061 public:
00062 
00076   FXIcon(FXApp* a,const FXColor *pix=NULL,FXColor clr=0,FXuint opts=0,FXint w=1,FXint h=1);
00077 
00086   virtual void create();
00087 
00092   virtual void detach();
00093 
00098   virtual void destroy();
00099 
00104   virtual void render();
00105 
00111   virtual void resize(FXint w,FXint h);
00112 
00114   FXColor getTransparentColor() const { return transp; }
00115 
00117   void setTransparentColor(FXColor color){ transp=color; }
00118 
00120   FXshort getThresholdValue() const { return thresh; }
00121 
00123   void setThresholdValue(FXshort value){ thresh=value; }
00124 
00126   virtual ~FXIcon();
00127   };
00128 
00129 }
00130 
00131 #endif

Copyright © 1997-2011 Jeroen van der Zijp