-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit with date and time out of DISK_055 backup
- Loading branch information
Showing
1 changed file
with
153 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
// drawvw.cpp : implementation of the CInhaltView class | ||
// | ||
// This is a part of the Microsoft Foundation Classes C++ library. | ||
// Copyright (C) 1992-1993 Microsoft Corporation | ||
// All rights reserved. | ||
// | ||
// This source code is only intended as a supplement to the | ||
// Microsoft Foundation Classes Reference and Microsoft | ||
// QuickHelp and/or WinHelp documentation provided with the library. | ||
// See these sources for detailed information regarding the | ||
// Microsoft Foundation Classes product. | ||
|
||
|
||
#include "stdafx.h" | ||
#include <afxpriv.h> | ||
|
||
#include "train.h" | ||
#include "pageserv.h" | ||
#include "drawdoc.h" | ||
#include "drawobj.h" | ||
#include "cntritem.h" | ||
#include "basevw.h" | ||
#include "pagevw.h" | ||
#include "inhaltvw.h" | ||
|
||
#include "drawtool.h" | ||
#include "persist.h" | ||
#include "mainfrm.h" | ||
|
||
#ifdef _DEBUG | ||
#undef THIS_FILE | ||
static char BASED_CODE THIS_FILE[] = __FILE__; | ||
#endif | ||
|
||
// private clipboard format (list of Draw objects) | ||
///////////////////////////////////////////////////////////////////////////// | ||
// CInhaltView | ||
|
||
IMPLEMENT_DYNCREATE(CInhaltView, CPageView) | ||
|
||
BEGIN_MESSAGE_MAP(CInhaltView, CPageView) | ||
|
||
END_MESSAGE_MAP() | ||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
// CInhaltView construction/destruction | ||
|
||
CInhaltView::CInhaltView() | ||
{ | ||
m_bGrid = TRUE; | ||
m_gridColor = RGB(0, 0, 0); | ||
m_bActive = FALSE; | ||
} | ||
|
||
CInhaltView::~CInhaltView() | ||
{ | ||
} | ||
|
||
BOOL CInhaltView::PreCreateWindow(CREATESTRUCT& cs) | ||
{ | ||
return CBaseView::PreCreateWindow(cs); | ||
} | ||
|
||
void CInhaltView::OnActivateView(BOOL bActivate, CView* pActiveView, | ||
CView* pDeactiveView) | ||
{ | ||
if (m_bActive != bActivate) | ||
{ | ||
CMainFrame* V = (CMainFrame*) AfxGetMainWnd(); | ||
|
||
if (V != NULL) V->OnViewBar(IDW_BENDEF); | ||
} | ||
|
||
CBaseView::OnActivateView(bActivate, pActiveView, pDeactiveView); | ||
} | ||
///////////////////////////////////////////////////////////////////////////// | ||
// CInhaltView drawing | ||
|
||
|
||
CObList* CInhaltView::GetDocObjects() | ||
{ | ||
return GetPage(); | ||
} | ||
|
||
|
||
void CInhaltView::OnPrepareDC(CDC* pDC, CPrintInfo* pInfo) | ||
{ | ||
CBaseView::OnPrepareDC(pDC, pInfo); | ||
} | ||
|
||
void CInhaltView::OnInitialUpdate() | ||
{ | ||
SetupPageServer("Inhaltsverzeichnis"); | ||
CBaseView::OnInitialUpdate(); | ||
} | ||
|
||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
// CInhaltView printing | ||
|
||
BOOL CInhaltView::OnPreparePrinting(CPrintInfo* pInfo) | ||
{ | ||
// default preparation | ||
return DoPreparePrinting(pInfo); | ||
} | ||
|
||
void CInhaltView::OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo) | ||
{ | ||
CScrollView::OnBeginPrinting(pDC,pInfo); | ||
|
||
// check page size -- user could have gone into print setup | ||
// from print dialog and changed paper or orientation | ||
GetDocument()->ComputePageSize(); | ||
} | ||
|
||
void CInhaltView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/) | ||
{ | ||
// TODO: add cleanup after printing | ||
} | ||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
// OLE Client support and commands | ||
|
||
BOOL CInhaltView::IsSelected(const CObject* pDocItem) const | ||
{ | ||
CDrawObj* pDrawObj = (CDrawObj*)pDocItem; | ||
if (pDocItem->IsKindOf(RUNTIME_CLASS(CDrawItem))) | ||
pDrawObj = ((CDrawItem*)pDocItem)->m_pDrawObj; | ||
return m_selection.Find(pDrawObj) != NULL; | ||
} | ||
|
||
|
||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
// CInhaltView message handlers | ||
|
||
|
||
///////////////////////////////////////////////////////////////////////////// | ||
// CInhaltView diagnostics | ||
|
||
#ifdef _DEBUG | ||
void CInhaltView::AssertValid() const | ||
{ | ||
CScrollView::AssertValid(); | ||
} | ||
|
||
void CInhaltView::Dump(CDumpContext& dc) const | ||
{ | ||
CScrollView::Dump(dc); | ||
} | ||
#endif //_DEBUG | ||
|
||
///////////////////////////////////////////////////////////////////////////// |