news download themes documentation links










FbPixmap.hh

00001 // FbPixmap.hh for FbTk - Fluxbox ToolKit
00002 // Copyright (c) 2003 Henrik Kinnunen (fluxgen at users.sourceforge.net)
00003 //
00004 // Permission is hereby granted, free of charge, to any person obtaining a
00005 // copy of this software and associated documentation files (the "Software"),
00006 // to deal in the Software without restriction, including without limitation
00007 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
00008 // and/or sell copies of the Software, and to permit persons to whom the
00009 // Software is furnished to do so, subject to the following conditions:
00010 //
00011 // The above copyright notice and this permission notice shall be included in
00012 // all copies or substantial portions of the Software.
00013 //
00014 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00015 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00016 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
00017 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
00018 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
00019 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
00020 // DEALINGS IN THE SOFTWARE.
00021 
00022 // $Id: FbPixmap.hh,v 1.10 2004/01/11 12:48:46 fluxgen Exp $
00023 
00024 #ifndef FBTK_FBPIXMAP_HH
00025 #define FBTK_FBPIXMAP_HH
00026 
00027 #include "FbDrawable.hh"
00028 
00029 #include <X11/Xlib.h>
00030 
00031 namespace FbTk {
00032 
00034 class FbPixmap:public FbDrawable {
00035 public:    
00036     FbPixmap();
00038     explicit FbPixmap(const FbPixmap &copy);
00040     explicit FbPixmap(Pixmap pm);
00041     FbPixmap(const FbDrawable &src, 
00042              unsigned int width, unsigned int height,
00043              int depth);
00044     FbPixmap(Drawable src, 
00045              unsigned int width, unsigned int height,
00046              int depth);
00047 
00048     virtual ~FbPixmap();
00049 
00050     void copy(const FbPixmap &the_copy);
00051     void copy(Pixmap pixmap);
00053     void rotate();
00055     void scale(unsigned int width, unsigned int height);
00056     void resize(unsigned int width, unsigned int height);
00058     Pixmap release();
00059 
00060     FbPixmap &operator = (const FbPixmap &copy);
00062     FbPixmap &operator = (Pixmap pm);
00063 
00064     inline Drawable drawable() const { return m_pm; }
00065     inline unsigned int width() const { return m_width; }
00066     inline unsigned int height() const { return m_height; }
00067     inline int depth() const { return m_depth; }
00068 
00069 
00070 private:
00071     void free();
00072     void create(Drawable src,
00073                 unsigned int width, unsigned int height,
00074                 int depth);
00075     Pixmap m_pm;
00076     unsigned int m_width, m_height;
00077     int m_depth;
00078 };
00079 
00080 } // end namespace FbTk
00081 
00082 #endif // FBTK_FBPIXMAP_HH
00083 

Fluxbox CVS-Jan-2003




      



Got comments about the page? Send them to webmaster.
If you have general Fluxbox related questions ask them on our irc channel or mailing lists.

Show Source








Designed by aLEczapKA