00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
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;
00051 FXID etch;
00052 FXColor transp;
00053 FXshort thresh;
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