You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

193 lines
5.1 KiB
C++

#pragma once
#include "../CPlusCallBack.h"
#include "../../SigmaView.h"
class CMultiWellSectionView : public CSigmaView
{
public:
CMultiWellSectionView(); // 动态创建所使用的受保护的构造函数
virtual ~CMultiWellSectionView();
CMultiWellSectionView(CXy* pXy);
void Initialize();
public:
//int m_xMode;
//int m_yMode;
//COleDropTarget m_dropTarget; // for drop target functionality
//DROPEFFECT m_prevDropEffect;
//static CLIPFORMAT m_clipboardDraw; // custom clipboard format
//static CLIPFORMAT m_cfObjectDescriptor;
//BOOL m_bActive; // is the view active?
//public:
// virtual void OnDraw(CDC* pDC); // 重写以绘制该视图
//
//public:
// virtual void OnInitialUpdate();
virtual void SetLastRightButtonPoint(const CPoint& point);
public:
CMultiWellSectionDoc* GetDocument() const;
public:
void OnSize(UINT nType, int cx, int cy);
virtual void OnLButtonDownOther(int mouseX, int mouseY, HDC hdc, int vk);
virtual void OnMouseWheelOther(UINT nFlags, short zDelta, CPoint pt);
virtual void OnLButtonDown(int mouseX, int mouseY, HDC hdc, int vk);
virtual int OnMouseMove(HDC hMemDC, int mouseX, int mouseY, int buttonStatus);
afx_msg void OnAddWellTrack();
afx_msg void OnEditDelete();
afx_msg void OnTrackLeftGroup();
afx_msg void OnTrackRightGroup();
////在选中的道后面添加图道
afx_msg void OnAddTrackAfterSelected();
afx_msg void OnViewTrackData();
virtual void OnViewExtend();
afx_msg void OnViewExtendCenter();
afx_msg void OnViewExtendHeight();
afx_msg void OnViewExtendWidth();
afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
afx_msg void OnViewPan();
afx_msg void OnViewEnlarge();
afx_msg void OnViewReduce();
afx_msg void OnMouseLeave();
BOOL OnBreakLeftBend();
BOOL OnBreakRightBend();
BOOL OnNameConnectLeft();
BOOL OnNameConnectRight();
BOOL OnNameConnectAll();
BOOL OnSetBendSmooth();
afx_msg void OnAddFault();
afx_msg void OnLayerFlatten();
afx_msg void OnLayerFlatten1();
afx_msg void OnLayerFlatten2();
afx_msg void OnLayerFlatten3();
afx_msg void OnLayerFlatten4();
afx_msg void OnLayerFlatten5();
afx_msg void OnWellStyleComplete();
afx_msg void OnWellStyleDividline();
afx_msg void OnWellStyleSimple();
afx_msg void OnBendLinkAll();
afx_msg void OnBendBreakAll();
afx_msg void OnLinkStyleOut();
afx_msg void OnLinkStyleCurveIn();
afx_msg void OnLinkStyleResultBound();
afx_msg void OnLinkStyleStratumBound();
afx_msg void OnLinkStyleCenter();
BOOL OnAddRuler();
afx_msg void OnBendExtendLevelLeft();
afx_msg void OnBendExtendTrendLeft();
afx_msg void OnBendExtendLevelRight();
afx_msg void OnBendExtendTrendRight();
BOOL OnAddBendLayerPoint();
BOOL OnDeleteLayerPoint();
BOOL OnAddFaultPoint();
BOOL OnDeleteFaultPoint();
virtual void SetClient(int l, int t, int r, int b); //用来代替 OnSize()函数
virtual void Scroll(int orientation, double offset);
BOOL IsViewState();
BOOL OnWellsMap(CString sybmlPath);
public:
void OnDrawAllAfter(CXyDC& dc);
CMenu* ExtendPopupMenu(CItem* pItem, CMenu* pMenu);
CPositionList* GetSelection(void);
int FindMenuItem(CMenu* Menu, LPCTSTR MenuString);
int FindMenuItem(CMenu* Menu, UINT nID);
void ExtendViewForNewWell(CWellPole* pWell);
virtual void SetScrollBarRange(void);
BOOL MouseWheelH(UINT nFlags, short zDelta, CPoint pt);
BOOL MouseWheelV(UINT nFlags, short zDelta, CPoint pt);
virtual BOOL MouseWheel(UINT nFlags, short zDelta, CPoint pt);
CItemView* GetItemView() { return m_pItemView.get(); }
protected:
CBitmap m_SelectBmp, *m_pSelectBmp;
BOOL m_bSelectCreateDC;
int m_ViewSelW;
int m_ViewSelH;
CDC m_SelectDC; //用于当有井对象被选中时绘制各种选中状态
void InitSelectBmpDC();
void CreateSelectBmpDC(int ww, int hh);
void DeleteSelectBmpDC();
BOOL m_bFirstSize;
BOOL m_bTracking;//监测鼠标是否离开本窗体
public:
void BeginSelectBmpDC();
void EndSelectBmpDC(CDC *pDC);
CDC& GetSelectDC() { return m_SelectDC; }
virtual void EndItemSelectBmpDC(CDC *pDC = NULL); //最后将在井类别item中绘制的内容贴到最终dc上
virtual void DrawCrossLine(CDC* pDC, CPoint point);
void DrawOneCrossLine(CPoint currentPoint); //绘制一次
InvalidateWndCallback m_pWndCallBack;
CPoint m_PrevPointXY;
std::unique_ptr<CItemView> m_pItemView;
public:
int ViewSetItemForSelectedElement(int mouseX, int mouseY);
BOOL GetSelectWellSectionObject(int& type, int& ttype, ULONGLONG& objHandle);
BOOL GetSelectedWell(ULONGLONG& objHandle);
int GetCurrentDrawItemType();
BOOL DeleteSelectedWellObject();
BOOL AddTrackAfterSelectedWellObject(int trackType[], int trackNum, ULONGLONG*& pTrackHandle, int*& pTrackType, int& newTrackNum);
BOOL SaveWellPoleTemplateFile(LPCTSTR filePathName);
//BOOL ApplyingWellPoleTemplateFile(LPCTSTR filePathName);
BOOL CombineLeftTrack();
BOOL CombineRightTrack();
void SaveUndoRedoAction();
BOOL ApplyingTemplateFileForWell(LPCSTR filePath, ULONGLONG wellHandle = 0);
BOOL ApplyingTemplateFileForSection( LPCSTR filePath);
BOOL ApplyingWellTemplateForSection(ULONGLONG wellHandle);
void ReSetWell(CWellPole* pWell);
};