FXBitmapFrame.h

Go to the documentation of this file.
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,2006 by H. J. Daniel III. 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: FXBitmapFrame.h,v 1.6 2006/01/22 17:57:59 fox Exp $                      *
00023 ********************************************************************************/
00024 #ifndef FXBITMAPFRAME_H
00025 #define FXBITMAPFRAME_H
00026 
00027 #ifndef FXFRAME_H
00028 #include "FXFrame.h"
00029 #endif
00030 
00031 namespace FX {
00032 
00033 
00039 class FXAPI FXBitmapFrame : public FXFrame {
00040   FXDECLARE(FXBitmapFrame)
00041 protected:
00042   FXBitmap *bitmap;     // The bitmap being displayed
00043   FXColor   onColor;    // Color for on pixels
00044   FXColor   offColor;   // Color for off pixels
00045 protected:
00046   FXBitmapFrame();
00047 private:
00048   FXBitmapFrame(const FXBitmapFrame&);
00049   FXBitmapFrame &operator=(const FXBitmapFrame&);
00050 public:
00051   long onPaint(FXObject*,FXSelector,void* ptr);
00052 public:
00053 
00055   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);
00056 
00058   virtual void create();
00059 
00061   virtual FXint getDefaultWidth();
00062 
00064   virtual FXint getDefaultHeight();
00065 
00067   void setBitmap(FXBitmap* bmp);
00068 
00070   FXBitmap* getBitmap() const { return bitmap; }
00071 
00073   void setOnColor(FXColor clr);
00074 
00076   FXColor getOnColor() const { return onColor; }
00077 
00079   void setOffColor(FXColor clr);
00080 
00082   FXColor getOffColor() const { return offColor; }
00083 
00085   void setJustify(FXuint mode);
00086 
00088   FXuint getJustify() const;
00089 
00091   virtual void save(FXStream& store) const;
00092 
00094   virtual void load(FXStream& store);
00095 
00097   virtual ~FXBitmapFrame();
00098   };
00099 
00100 }
00101 
00102 
00103 #endif

(C) 2002-2009 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Nov 20 18:31:19 2009 for TnFOX by doxygen v1.4.7