FXIconSource.h

Go to the documentation of this file.
00001 /********************************************************************************
00002 *                                                                               *
00003 *                            I c o n   S o u r c e                              *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 2005,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: FXIconSource.h,v 1.13 2006/02/03 00:44:32 fox Exp $                      *
00023 ********************************************************************************/
00024 #ifndef FXICONSOURCE_H
00025 #define FXICONSOURCE_H
00026 
00027 #ifndef FXOBJECT_H
00028 #include "FXObject.h"
00029 #endif
00030 
00031 namespace FX {
00032 
00033 class FXApp;
00034 class FXIcon;
00035 class FXImage;
00036 
00049 class FXAPI FXIconSource : public FXObject {
00050   FXDECLARE(FXIconSource)
00051 protected:
00052   FXApp *app;
00053 protected:
00054   FXIconSource():app(NULL){}
00055 private:
00056   FXIconSource(const FXIconSource&);
00057   FXIconSource &operator=(const FXIconSource&);
00058   FXImage *scaleToSize(FXImage *image,FXint size,FXint qual) const;
00059 public:
00060 
00062   FXIconSource(FXApp* a);
00063 
00072   virtual FXIcon *loadIconFile(const FXString& filename,const FXString& type=FXString::null) const;
00073 
00081   virtual FXIcon *loadIconData(const void *pixels,const FXString& type=FXString::null) const;
00082 
00090   virtual FXIcon *loadIconStream(FXStream& store,const FXString& type=FXString::null) const;
00091 
00100   virtual FXImage *loadImageFile(const FXString& filename,const FXString& type=FXString::null) const;
00101 
00109   virtual FXImage *loadImageData(const void *pixels,const FXString& type=FXString::null) const;
00110 
00118   virtual FXImage *loadImageStream(FXStream& store,const FXString& type=FXString::null) const;
00119 
00120 
00122   virtual FXIcon *loadScaledIconFile(const FXString& filename,FXint size=32,FXint qual=0,const FXString& type=FXString::null) const;
00123 
00125   virtual FXIcon *loadScaledIconData(const void *pixels,FXint size=32,FXint qual=0,const FXString& type=FXString::null) const;
00126 
00128   virtual FXIcon *loadScaledIconStream(FXStream& store,FXint size=32,FXint qual=0,const FXString& type=FXString::null) const;
00129 
00131   virtual FXImage *loadScaledImageFile(const FXString& filename,FXint size=32,FXint qual=0,const FXString& type=FXString::null) const;
00132 
00134   virtual FXImage *loadScaledImageData(const void *pixels,FXint size=32,FXint qual=0,const FXString& type=FXString::null) const;
00135 
00137   virtual FXImage *loadScaledImageStream(FXStream& store,FXint size=32,FXint qual=0,const FXString& type=FXString::null) const;
00138 
00139 
00141   virtual void save(FXStream& store) const;
00142 
00144   virtual void load(FXStream& store);
00145 
00147   virtual ~FXIconSource();
00148   };
00149 
00150 
00151 }
00152 
00153 #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