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

/home/jeroen/FOX/fox/fox-1.7.33/include/FXBitmapFrame.h
00001 /********************************************************************************
00002 *                                                                               *
00003 *                       B i t m a p   F r a m e   W i d g e t                   *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 2001,2012 by H. J. Daniel III. All Rights Reserved.             *
00007 *********************************************************************************
00008 * This library is free software; you can redistribute it and/or modify          *
00009 * it under the terms of the GNU Lesser General Public License as published by   *
00010 * the Free Software Foundation; either version 3 of the License, or             *
00011 * (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                 *
00016 * GNU Lesser General Public License for more details.                           *
00017 *                                                                               *
00018 * You should have received a copy of the GNU Lesser General Public License      *
00019 * along with this program.  If not, see <http://www.gnu.org/licenses/>          *
00020 ********************************************************************************/
00021 #ifndef FXBITMAPFRAME_H
00022 #define FXBITMAPFRAME_H
00023 
00024 #ifndef FXFRAME_H
00025 #include "FXFrame.h"
00026 #endif
00027 
00028 namespace FX {
00029 
00030 
00036 class FXAPI FXBitmapFrame : public FXFrame {
00037   FXDECLARE(FXBitmapFrame)
00038 protected:
00039   FXBitmap *bitmap;     // The bitmap being displayed
00040   FXColor   onColor;    // Color for on pixels
00041   FXColor   offColor;   // Color for off pixels
00042 protected:
00043   FXBitmapFrame();
00044 private:
00045   FXBitmapFrame(const FXBitmapFrame&);
00046   FXBitmapFrame &operator=(const FXBitmapFrame&);
00047 public:
00048   long onPaint(FXObject*,FXSelector,void* ptr);
00049 public:
00050 
00052   FXBitmapFrame(FXComposite* p,FXBitmap *bmp,FXuint opts=FRAME_SUNKEN|FRAME_THICK,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=0,FXint pr=0,FXint pt=0,FXint pb=0);
00053 
00055   virtual void create();
00056 
00058   virtual FXint getDefaultWidth();
00059 
00061   virtual FXint getDefaultHeight();
00062 
00064   void setBitmap(FXBitmap* bmp);
00065 
00067   FXBitmap* getBitmap() const { return bitmap; }
00068 
00070   void setOnColor(FXColor clr);
00071 
00073   FXColor getOnColor() const { return onColor; }
00074 
00076   void setOffColor(FXColor clr);
00077 
00079   FXColor getOffColor() const { return offColor; }
00080 
00082   void setJustify(FXuint mode);
00083 
00085   FXuint getJustify() const;
00086 
00088   virtual void save(FXStream& store) const;
00089 
00091   virtual void load(FXStream& store);
00092 
00094   virtual ~FXBitmapFrame();
00095   };
00096 
00097 }
00098 
00099 
00100 #endif

Copyright © 1997-2011 Jeroen van der Zijp