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

FracWnd.h

Go to the documentation of this file.
00001 #if !defined(AFX_FRACWND_H__AA4A322A_6E3B_4BFB_9D90_968EAB3E75AE__INCLUDED_)
00002 #define AFX_FRACWND_H__AA4A322A_6E3B_4BFB_9D90_968EAB3E75AE__INCLUDED_
00003 /*########################################################################
00004         FracWnd.h
00005 
00006         Copyright 2002 Mark Williams, all rights reserved.
00007         Contact: mark@extrabit.com
00008         http://www.extrabit.com
00009 
00010         This program is free software; you can redistribute it and/or
00011         modify it under the terms of the GNU General Public License
00012         as published by the Free Software Foundation; either version 2
00013         of the License, or (at your option) any later version.
00014 
00015         This program is distributed in the hope that it will be useful,
00016         but WITHOUT ANY WARRANTY; without even the implied warranty of
00017         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018         GNU General Public License for more details.
00019 
00020 ########################################################################*/
00021 
00022 #if _MSC_VER > 1000
00023 #pragma once
00024 #endif // _MSC_VER > 1000
00025 
00027 // CFracWnd window
00028 
00029 class FractalImage ;
00030 class Palette ;
00031 
00032 
00037 class CFracWnd : public CWnd
00038 {
00039 // Construction
00040 public:
00041         CFracWnd();
00042 
00043 // Attributes
00044 public:
00045         void set_image (FractalImage*) ;
00046 
00047 // Operations
00048 public:
00049 
00050 // Overrides
00051         // ClassWizard generated virtual function overrides
00052         //{{AFX_VIRTUAL(CFracWnd)
00053         //}}AFX_VIRTUAL
00054 
00055 // Implementation
00056 public:
00057         virtual ~CFracWnd();
00058 
00059         // Generated message map functions
00060 protected:
00061         //{{AFX_MSG(CFracWnd)
00062         afx_msg void OnPaint();
00063         afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
00064         afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
00065         afx_msg void OnMouseMove(UINT nFlags, CPoint point);
00066         afx_msg void OnSize(UINT nType, int cx, int cy);
00067         //}}AFX_MSG
00068         DECLARE_MESSAGE_MAP()
00069 
00070 private:
00071         void update_bitmap (void) ;
00072         void construct (CDC* p_dc, int width, int height) ;
00073         void draw_cbitmap (CDC* p_dc,
00074                                                 const CRect& image_rect_v,
00075                                                 HBITMAP bitmap, DWORD rasterop) ;
00076         void zoom_in (const CRect&) ;
00077 
00078 private:
00080         FractalImage* m_image ;
00081 
00083         HBITMAP m_rgb_bitmap ;
00084 
00085         // Zooming in interaction.
00086         CPoint m_mouse_down ;
00087         CPoint m_mouse_curr ;
00088         bool m_in_drag ;
00089 };
00090 
00092 
00093 //{{AFX_INSERT_LOCATION}}
00094 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
00095 
00096 #endif // !defined(AFX_FRACWND_H__AA4A322A_6E3B_4BFB_9D90_968EAB3E75AE__INCLUDED_)

Generated on Sun Jul 21 11:52:14 2002 for FractalViewer by doxygen1.2.16