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,2024 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 FXuchar *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 FXuchar *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 FXuchar *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 FXuchar *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
static FXIconSource defaultIconSource
Default icon source provides icons and images for all types built into the FOX library at compile tim...
Definition: FXIconSource.h:57
An icon source is a class that loads an icon of any type.
Definition: FXIconSource.h:47
The Application object is the central point of a FOX user-interface.
Definition: FXApp.h:134
A stream is a way to serialize data and objects into a byte stream.
Definition: FXStream.h:81
Definition: FX4Splitter.h:28
An Icon is an image with two additional server-side resources: a shape bitmap, which is used to mask ...
Definition: FXIcon.h:42
Object is the base class for all objects in FOX; in order to receive messages from the user interface...
Definition: FXObject.h:134
An Image is a rectangular array of pixels.
Definition: FXImage.h:67
FXString provides essential string manipulation capabilities in FOX.
Definition: FXString.h:42

Copyright © 1997-2022 Jeroen van der Zijp