Добавил:
Studfiles2
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:Лабораторная работа 32 / part31 / part31View
.h// part31View.h : interface of the CPart31View class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_PART31VIEW_H__B19AEE7F_F104_4DCB_BFA6_2E1300957EE1__INCLUDED_)
#define AFX_PART31VIEW_H__B19AEE7F_F104_4DCB_BFA6_2E1300957EE1__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CPart31CntrItem;
class CPart31View : public CScrollView
{
protected: // create from serialization only
CPart31View();
DECLARE_DYNCREATE(CPart31View)
// Attributes
public:
CPart31Doc* GetDocument();
// m_pSelection holds the selection to the current CPart31CntrItem.
// For many applications, such a member variable isn't adequate to
// represent a selection, such as a multiple selection or a selection
// of objects that are not CPart31CntrItem objects. This selection
// mechanism is provided just to help you get started.
// TODO: replace this selection mechanism with one appropriate to your app.
CPart31CntrItem* m_pSelection;
// Operations
public:
protected:
CPoint m_FirstPoint; // First point recorded for an element
CPoint m_SecondPoint; // Second point recorded for an element
CPoint m_MoveLastPoint;
CString StringData;
Shape* m_pTempElement; // Pointer to temporary element
Shape* m_pSelected;
int SelectedIndex;
bool CaretCreated;
bool doMove; //Флаг, true если будем двигать
int m_Scale;
bool doLine; //Флаг, true если рисуем связь
Shape* first;
Shape* second; //Первый и второй элементы при проведении связи
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CPart31View)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual void OnInitialUpdate(); // called first time after construct
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual BOOL IsSelected(const CObject* pDocItem) const;// Container support
virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
//}}AFX_VIRTUAL
// Implementation
public:
CPart31CntrItem* OleClickTest(CPoint point);
virtual ~CPart31View();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
Shape* CreateElement(); //Создает указатель на фигуру в зависимости от тек. состояния
Shape* SelectElement(CPoint aPoint); //возвращает элемент из контейнера на которы йнаведен курсор
void ShowCursor(CDC* pDC); //рисование каретки для ввода текста
void ResetScrollSizes(); //пересчитываем размер раб. области для ползунков
void printLine(CPoint First,CPoint Second);
// Generated message map functions
protected:
//{{AFX_MSG(CPart31View)
afx_msg void OnDestroy();
afx_msg void OnSetFocus(CWnd* pOldWnd);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnInsertObject();
afx_msg void OnCancelEditCntr();
afx_msg void OnCancelEditSrvr();
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
afx_msg void OnFigureDeleteelement();
afx_msg void OnElementsLine();
afx_msg void OnUpdateElementsLine(CCmdUI* pCmdUI);
afx_msg void OnFigureDeleteline();
afx_msg void OnConteinerGraphview();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in part31View.cpp
inline CPart31Doc* CPart31View::GetDocument()
{ return (CPart31Doc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_PART31VIEW_H__B19AEE7F_F104_4DCB_BFA6_2E1300957EE1__INCLUDED_)
Соседние файлы в папке part31