FXDrawable.h

Go to the documentation of this file.
00001 /********************************************************************************
00002 *                                                                               *
00003 *                           D r a w a b l e   A r e a                           *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 1997,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: FXDrawable.h,v 1.25 2006/01/22 17:58:01 fox Exp $                        *
00023 ********************************************************************************/
00024 #ifndef FXDRAWABLE_H
00025 #define FXDRAWABLE_H
00026 
00027 #ifndef FXID_H
00028 #include "FXId.h"
00029 #endif
00030 
00031 namespace FX {
00032 
00033 
00034 class FXVisual;
00035 
00036 
00041 class FXAPI FXDrawable : public FXId {
00042   FXDECLARE_ABSTRACT(FXDrawable)
00043   friend class FXDC;
00044   friend class FXDCWindow;
00045 protected:
00046   FXVisual     *visual;                 // Visual for this window
00047   FXint         width;                  // Width
00048   FXint         height;                 // Height
00049 protected:
00050   FXDrawable();
00051   FXDrawable(FXApp* a,FXint w,FXint h);
00052 private:
00053   FXDrawable(const FXDrawable&);
00054   FXDrawable &operator=(const FXDrawable&);
00055 #ifdef WIN32
00056   virtual FXID GetDC() const { return NULL; }
00057   virtual int ReleaseDC(FXID) const { return 0; }
00058 #endif
00059 public:
00060 
00062   FXint getWidth() const { return width; }
00063 
00065   FXint getHeight() const { return height; }
00066 
00068   FXVisual* getVisual() const { return visual; }
00069 
00071   void setVisual(FXVisual* vis);
00072 
00074   virtual void resize(FXint w,FXint h);
00075 
00077   virtual void save(FXStream& store) const;
00078 
00080   virtual void load(FXStream& store);
00081 
00083   virtual ~FXDrawable();
00084   };
00085 
00086 }
00087 
00088 #endif

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