[GME-commit]
GMESRC/GME/Gme PannWinDlg.h,NONE,1.1 PannWinDlg.cpp,NONE,1.1
PanningWindow.h,NONE,1.1 PanningWindow.cpp,NONE,1.1
PannButton.h,NONE,1.1
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Thu Mar 25 14:06:47 CST 2004
Update of /var/lib/gme/GMESRC/GME/Gme
In directory braindrain:/tmp/cvs-serv11239
Added Files:
PannWinDlg.h PannWinDlg.cpp PanningWindow.h PanningWindow.cpp
PannButton.h
Log Message:
Panning Window embedded
CVS User: bogyom
--- NEW FILE: PannWinDlg.h ---
#if !defined(AFX_PANNWINDLG_H__46175EAB_0B12_425C_A821_20631E25B5D6__INCLUDED_)
#define AFX_PANNWINDLG_H__46175EAB_0B12_425C_A821_20631E25B5D6__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// PannWinDlg.h : header file
//
#include "resource.h"
#include "PannButton.h"
/////////////////////////////////////////////////////////////////////////////
// CPannWinDlg dialog
class CPannWinDlg : public CDialog
{
// Construction
public:
CPannWinDlg(CWnd* pParent = NULL); // standard constructor
void SetBitmapDC(CDC *bdc, CRect &ori, CRect &rect);
void SetViewRect(CRect &vrect);
// Dialog Data
//{{AFX_DATA(CPannWinDlg)
enum { IDD = IDD_PANNWINDLG };
CPannButton m_pvbutton;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CPannWinDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CPannWinDlg)
afx_msg void OnSize(UINT nType, int cx, int cy);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_PANNWINDLG_H__46175EAB_0B12_425C_A821_20631E25B5D6__INCLUDED_)
--- NEW FILE: PannWinDlg.cpp ---
// PannWinDlg.cpp : implementation file
//
#include "stdafx.h"
#include "gme.h"
#include "PannWinDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CPannWinDlg dialog
CPannWinDlg::CPannWinDlg(CWnd* pParent /*=NULL*/)
: CDialog(CPannWinDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CPannWinDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
void CPannWinDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CPannWinDlg)
DDX_Control(pDX, IDC_PREVIEW, m_pvbutton);
//}}AFX_DATA_MAP
}
void CPannWinDlg::SetBitmapDC(CDC *bdc, CRect &ori, CRect &rect)
{
m_pvbutton.SetBitmapDC(bdc, ori, rect);
}
void CPannWinDlg::SetViewRect(CRect &vrect)
{
m_pvbutton.SetViewRect(vrect);
}
BEGIN_MESSAGE_MAP(CPannWinDlg, CDialog)
//{{AFX_MSG_MAP(CPannWinDlg)
ON_WM_SIZE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CPannWinDlg message handlers
void CPannWinDlg::OnSize(UINT nType, int cx, int cy)
{
CDialog::OnSize(nType, cx, cy);
CRect rc;
GetClientRect(rc);
if (m_pvbutton.m_hWnd)
m_pvbutton.MoveWindow(rc);
}
--- NEW FILE: PanningWindow.h ---
// PanningWindow.h: interface for the CPanningWindow class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_PANNINGWINDOW_H__D410C8C0_306D_4058_A9EB_BEC596B9C8CD__INCLUDED_)
#define AFX_PANNINGWINDOW_H__D410C8C0_306D_4058_A9EB_BEC596B9C8CD__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "sizecbar.h"
#include "pannwindlg.h"
class CPanningWindow : public CSizingControlBar
{
public:
CPanningWindow();
virtual ~CPanningWindow();
void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
void SetBitmapDC(CDC *bdc, CRect &ori, CRect &rect);
void SetViewRect(CRect vrect);
// Generated message map functions
protected:
CPannWinDlg m_pannWinDlg;
//{{AFX_MSG(CPartBrowser)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnClose();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#endif // !defined(AFX_PANNINGWINDOW_H__D410C8C0_306D_4058_A9EB_BEC596B9C8CD__INCLUDED_)
--- NEW FILE: PanningWindow.cpp ---
// PanningWindow.cpp: implementation of the CPanningWindow class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "gme.h"
#include "PanningWindow.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CPanningWindow::CPanningWindow()
{
}
CPanningWindow::~CPanningWindow()
{
}
BEGIN_MESSAGE_MAP(CPanningWindow, CSizingControlBar)
//{{AFX_MSG_MAP(CPanningWindow)
ON_WM_CREATE()
ON_WM_SIZE()
ON_WM_CLOSE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
int CPanningWindow::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
m_szMin = CSize(120,120);
m_szFloat = CSize(250,250);
m_szHorz = CSize(170,170);
m_szVert = CSize(170,170);
lpCreateStruct->cx = lpCreateStruct->cy = 150;
if (CSizingControlBar::OnCreate(lpCreateStruct) == -1)
return -1;
if(!m_pannWinDlg.Create(IDD_PANNWINDLG,this))
return -1;
return 0;
}
void CPanningWindow::OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler)
{
CSizingControlBar::OnUpdateCmdUI(pTarget, bDisableIfNoHndler);
UpdateDialogControls(pTarget, bDisableIfNoHndler);
}
void CPanningWindow::OnSize(UINT nType, int cx, int cy)
{
cx = cy = 100;
CSizingControlBar::OnSize(nType, cx, cy);
// TODO: Add your message handler code here
CRect rc;
GetClientRect(rc);
m_pannWinDlg.MoveWindow(rc);
// m_pannWinDlg.Resize();
}
void CPanningWindow::OnClose()
{
}
void CPanningWindow::SetBitmapDC(CDC *bdc, CRect &ori, CRect &rect)
{
m_pannWinDlg.SetBitmapDC(bdc, ori, rect);
}
void CPanningWindow::SetViewRect(CRect vrect)
{
m_pannWinDlg.SetViewRect(vrect);
}
--- NEW FILE: PannButton.h ---
#if !defined(AFX_PANNBUTTON_H__485AF085_9CC6_4BC9_91D3_CC39DB91F36F__INCLUDED_)
#define AFX_PANNBUTTON_H__485AF085_9CC6_4BC9_91D3_CC39DB91F36F__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// PannButton.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CPannButton window
class CPannButton : public CButton
{
// Construction
public:
CPannButton();
void SetBitmapDC(CDC *bdc, CRect &ori, CRect &rect);
void SetViewRect(CRect &vrect);
void DrawItem( LPDRAWITEMSTRUCT lpDrawItemStruct );
private:
CDC* m_bitmapDC;
CRect m_bitmapS;
CRect m_bitmapO;
CRect m_viewRect;
// Attributes
public:
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CPannButton)
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CPannButton();
// Generated message map functions
protected:
//{{AFX_MSG(CPannButton)
// NOTE - the ClassWizard will add and remove member functions here.
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_PANNBUTTON_H__485AF085_9CC6_4BC9_91D3_CC39DB91F36F__INCLUDED_)
More information about the GME-commit
mailing list