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

FXIconSource.h
1 /********************************************************************************
2 * *
3 * I c o n S o u r c e *
4 * *
5 *********************************************************************************
6 * Copyright (C) 2005,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 FXICONSOURCE_H
22 #define FXICONSOURCE_H
23 
24 #ifndef FXOBJECT_H
25 #include "FXObject.h"
26 #endif
27 
28 namespace FX {
29 
30 class FXApp;
31 class FXIcon;
32 class FXImage;
33 
47 class FXAPI FXIconSource : public FXObject {
48  FXDECLARE(FXIconSource)
49 private:
50  FXImage *scaleToSize(FXImage *image,FXint size,FXint qual) const;
51 public:
52 
58 
63  virtual FXIcon *iconFromType(FXApp* app,const FXString& type) const;
64 
69  virtual FXIcon *iconFromStream(FXApp* app,FXStream& store) const;
70 
79  virtual FXIcon *loadIconFile(FXApp* app,const FXString& filename,const FXString& type=FXString::null) const;
80 
88  virtual FXIcon *loadIconData(FXApp* app,const void *pixels,const FXString& type=FXString::null) const;
89 
97  virtual FXIcon *loadIconStream(FXApp* app,FXStream& store,const FXString& type=FXString::null) const;
98 
99 
104  virtual FXImage *imageFromType(FXApp* app,const FXString& type) const;
105 
110  virtual FXImage *imageFromStream(FXApp* app,FXStream& store) const;
111 
120  virtual FXImage *loadImageFile(FXApp* app,const FXString& filename,const FXString& type=FXString::null) const;
121 
129  virtual FXImage *loadImageData(FXApp* app,const void *pixels,const FXString& type=FXString::null) const;
130 
138  virtual FXImage *loadImageStream(FXApp* app,FXStream& store,const FXString& type=FXString::null) const;
139 
140 
145  virtual FXIcon *loadScaledIconFile(FXApp* app,const FXString& filename,FXint size=32,FXint qual=0,const FXString& type=FXString::null) const;
146 
150  virtual FXIcon *loadScaledIconData(FXApp* app,const void *pixels,FXint size=32,FXint qual=0,const FXString& type=FXString::null) const;
151 
155  virtual FXIcon *loadScaledIconStream(FXApp* app,FXStream& store,FXint size=32,FXint qual=0,const FXString& type=FXString::null) const;
156 
161  virtual FXImage *loadScaledImageFile(FXApp* app,const FXString& filename,FXint size=32,FXint qual=0,const FXString& type=FXString::null) const;
162 
166  virtual FXImage *loadScaledImageData(FXApp* app,const void *pixels,FXint size=32,FXint qual=0,const FXString& type=FXString::null) const;
167 
171  virtual FXImage *loadScaledImageStream(FXApp* app,FXStream& store,FXint size=32,FXint qual=0,const FXString& type=FXString::null) const;
172  };
173 
174 
175 }
176 
177 #endif

Copyright © 1997-2016 Jeroen van der Zijp