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

FXIcon.h
1 /********************************************************************************
2 * *
3 * I c o n - O b j e c t *
4 * *
5 *********************************************************************************
6 * Copyright (C) 1997,2017 by Jeroen van der Zijp. All Rights Reserved. *
7 *********************************************************************************
8 * This library is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU Lesser General Public License as published by *
10 * the Free Software Foundation; either version 3 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * This library is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public License *
19 * along with this program. If not, see <http://www.gnu.org/licenses/> *
20 ********************************************************************************/
21 #ifndef FXICON_H
22 #define FXICON_H
23 
24 #ifndef FXIMAGE_H
25 #include "FXImage.h"
26 #endif
27 
28 namespace FX {
29 
30 class FXDC;
31 class FXDCWindow;
32 class FXDrawable;
33 class FXTopWindow;
34 
35 
42 class FXAPI FXIcon : public FXImage {
43  FXDECLARE(FXIcon)
44  friend class FXDC;
45  friend class FXWindow;
46  friend class FXDCWindow;
47  friend class FXDrawable;
48  friend class FXTopWindow;
49 protected:
50  FXID shape; // Shape pixmap
51  FXID etch; // Etch pixmap
52  FXColor transp; // Transparency color
53  FXshort thresh; // Treshold for etch mask
54 protected:
55  FXIcon();
56  FXColor guesstransp() const;
57  FXshort guessthresh() const;
58 private:
59  FXIcon(const FXIcon&);
60  FXIcon &operator=(const FXIcon&);
61 public:
62 
76  FXIcon(FXApp* a,const FXColor *pix=NULL,FXColor clr=0,FXuint opts=0,FXint w=1,FXint h=1);
77 
86  virtual void create();
87 
92  virtual void detach();
93 
98  virtual void destroy();
99 
104  virtual void render();
105 
111  virtual void resize(FXint w,FXint h);
112 
114  FXColor getTransparentColor() const { return transp; }
115 
117  void setTransparentColor(FXColor color){ transp=color; }
118 
120  FXshort getThresholdValue() const { return thresh; }
121 
123  void setThresholdValue(FXshort value){ thresh=value; }
124 
126  virtual ~FXIcon();
127  };
128 
129 }
130 
131 #endif

Copyright © 1997-2016 Jeroen van der Zijp