FXIcon.h

Go to the documentation of this file.
00001 /********************************************************************************
00002 *                                                                               *
00003 *                               I c o n - O b j e c t                           *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 1997,2006 by Jeroen van der Zijp.   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: FXIcon.h,v 1.29 2006/01/22 17:58:04 fox Exp $                            *
00023 ********************************************************************************/
00024 #ifndef FXICON_H
00025 #define FXICON_H
00026 
00027 #ifndef FXIMAGE_H
00028 #include "FXImage.h"
00029 #endif
00030 
00031 namespace FX {
00032 
00033 class FXDC;
00034 class FXDCWindow;
00035 class FXDrawable;
00036 class FXTopWindow;
00037 
00038 
00045 class FXAPI FXIcon : public FXImage {
00046   FXDECLARE(FXIcon)
00047   friend class FXDC;
00048   friend class FXWindow;
00049   friend class FXDCWindow;
00050   friend class FXDrawable;
00051   friend class FXTopWindow;
00052 protected:
00053   FXID     shape;             // Shape pixmap
00054   FXID     etch;              // Etch pixmap
00055   FXColor  transp;            // Transparency color
00056 protected:
00057   FXIcon(){}
00058   FXColor guesstransp();
00059 private:
00060   FXIcon(const FXIcon&);
00061   FXIcon &operator=(const FXIcon&);
00062 public:
00063 
00077   FXIcon(FXApp* a,const FXColor *pix=NULL,FXColor clr=0,FXuint opts=0,FXint w=1,FXint h=1);
00078 
00087   virtual void create();
00088 
00093   virtual void detach();
00094 
00099   virtual void destroy();
00100 
00105   virtual void render();
00106 
00112   virtual void resize(FXint w,FXint h);
00113 
00115   FXColor getTransparentColor() const { return transp; }
00116 
00118   void setTransparentColor(FXColor color){ transp=color; }
00119 
00121   virtual ~FXIcon();
00122   };
00123 
00124 }
00125 
00126 #endif

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