00001 /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/ 00002 /* _______ ______ ______ __ */ 00003 /* ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ / ____(_)___ / ___ /) / ____/___ ____/ /__ */ 00004 /* [fsSurfCl] / /_ / / __ \\__ \|/ / / / __ \/ __ / _ \ */ 00005 /* rev. 4 / __/ / / /_/ /__/ / / /___/ /_/ / /_/ / __/ */ 00006 /* 12th Feb 2007 /_/ /_/ ,___/____/ \____/\____/\__,_/\___/ */ 00007 /* [ ] stable /_/ (c) 2006-7 Filip STOKLAS (FipS) */ 00008 /* ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ http://HOLE.4FipS.com/fips_code.php */ 00009 /* */ 00010 /* This code is free for personal and commercial use. You may redistribute */ 00011 /* it by any means. If you use the code for your own projects please give */ 00012 /* me credit. Please send a bug report. Don't alter or remove this header! */ 00013 /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/ 00014 #ifndef FS_RAP_FSSURFCL_H 00015 #define FS_RAP_FSSURFCL_H 00016 //--------------------------------------------------------------------------- 00017 #if defined(FS_INCLUDE_USERDEFS) // inject user definition file on request 00018 # include <fs/fsUserDefs.h> 00019 #endif 00020 00021 #include "fsWinApp.h" // WinApp_t::Event_t 00022 //--------------------------------------------------------------------------- 00023 namespace fs { namespace rap { 00024 //--------------------------------------------------------------------------- 00026 00034 class SurfCl_t : public WinApp_t::EvRcvr_i 00035 { 00036 public: 00037 00039 struct PxFmt8888_t { unsigned char r, g, b, x_; }; 00040 00042 explicit SurfCl_t(bool bFitCl = false, int nSurfW = 512, 00043 int nSurfH = 512); 00045 virtual ~SurfCl_t(); 00046 00048 void Clear(const PxFmt8888_t &Clr); 00050 int GetW() const; 00052 int GetH() const; 00054 PxFmt8888_t * GetData(); 00055 00056 virtual void OnEvent(const WinApp_t::SizeEv_t &, WinApp_t &); 00057 virtual void OnEvent(const WinApp_t::DrawEv_t &, WinApp_t &); 00058 00059 private: 00060 00061 SurfCl_t(const SurfCl_t &); 00062 SurfCl_t & operator = (const SurfCl_t &); 00063 00064 void *m_pImpl; 00065 }; 00066 //--------------------------------------------------------------------------- 00067 }} // namespace fs::rap 00068 //--------------------------------------------------------------------------- 00069 #endif // FS_RAP_FSSURFCL_H