// DemoView.h : interface of the CDemoView class // ///////////////////////////////////////////////////////////////////////////// #if !defined(AFX_DEMOVIEW_H__EC308E4F_4BB3_11D2_8AFB_444553540000__INCLUDED_) #define AFX_DEMOVIEW_H__EC308E4F_4BB3_11D2_8AFB_444553540000__INCLUDED_ #if _MSC_VER >= 1000 #pragma once #endif // _MSC_VER >= 1000 // server name #define REGISTRYKEY_SERVER_NAME _T("LEAD.MainCLBDemo.Image.14") class SEGMENTDATACHILD { public: SEGMENTDATA m_Data; L_BOOL m_bSelected; L_BOOL m_bMoving; SEGMENTDATACHILD() { ZeroMemory(&m_Data,sizeof(m_Data)); m_bSelected = FALSE; m_bMoving = FALSE; } }; class LUserSegment : public LSegment { protected: L_INT MrcEnumSegmentsCallBack(const pSEGMENTDATA pSegmentData, L_INT nSegId); L_BOOL m_bStarted; public: L_INT ReEnumerateSegments(CDemoView* pView, L_BOOL bValidation = TRUE); LUserSegment(); CDemoView* m_pView; L_INT m_nSegmentsCount; SEGMENTDATACHILD* m_pSegmentData; L_INT Start(LBitmapBase * pBitmap, COLORREF clrBackground, COLORREF clrForeground); L_INT Stop(); L_BOOL IsStarted(); L_INT m_nCurrentSelection; L_INT m_nPreviousSelection; }; class CDemoView : public CView { protected: // create from serialization only DECLARE_DYNCREATE(CDemoView) private: L_BOOL m_bLBDown; // Attributes public: L_BOOL m_bImportedSegments; L_BOOL m_bCTRLKeyUp; RECT m_rcPrev; POINT m_ptPrev; L_INT m_nLineSel; POINT m_ptClickMove; L_BOOL m_bManualDraw ; CPoint m_ptStart, m_ptEnd; CDemoDoc* GetDocument(); L_UINT m_uZoomMode; L_BOOL m_bShowSegmentType; LUserSegment m_Segment; LUserBitmapWindow m_LBitmapWnd; // Operations public: L_BOOL ManualSegmentation(); void SetMouseCursor( CPoint point); // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CDemoView) public: virtual void OnDraw(CDC* pDC); // overridden to draw this view virtual BOOL PreCreateWindow(CREATESTRUCT& cs); virtual void OnInitialUpdate(); protected: virtual BOOL OnPreparePrinting(CPrintInfo* pInfo); virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo); virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo); virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView); //}}AFX_VIRTUAL afx_msg LRESULT OnHandlePalette(WPARAM wParam, LPARAM lParam); afx_msg LRESULT OnLoadFile(WPARAM wParam,LPARAM lParam); // Implementation public: CDemoView(); virtual ~CDemoView(); #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif protected: virtual L_BOOL SelectSegment(CPoint point); virtual L_VOID SelectSegment(L_INT nID); // Generated message map functions protected: //{{AFX_MSG(CDemoView) afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); afx_msg void OnSize(UINT nType, int cx, int cy); afx_msg void OnEditCopy(); afx_msg void OnUpdateEditCopy(CCmdUI* pCmdUI); afx_msg void OnViewNormal(); afx_msg void OnUpdateViewNormal(CCmdUI* pCmdUI); afx_msg void OnViewZoomin(); afx_msg void OnUpdateViewZoomin(CCmdUI* pCmdUI); afx_msg void OnViewZoomout(); afx_msg void OnUpdateViewZoomout(CCmdUI* pCmdUI); afx_msg void OnFitFitwin(); afx_msg void OnUpdateFitFitwin(CCmdUI* pCmdUI); afx_msg void OnFitHeight(); afx_msg void OnUpdateFitHeight(CCmdUI* pCmdUI); afx_msg void OnFitWidth(); afx_msg void OnUpdateFitWidth(CCmdUI* pCmdUI); afx_msg void OnFileSaveAs(); afx_msg void OnFilePrint(); afx_msg void OnViewZoomCenter(); afx_msg void OnUpdateViewZoomCenter(CCmdUI* pCmdUI); afx_msg void OnUpdateAppAbout(CCmdUI* pCmdUI); afx_msg void OnUpdateFilePrint(CCmdUI* pCmdUI); afx_msg void OnUpdateFilePrintSetup(CCmdUI* pCmdUI); afx_msg void OnUpdateWindowArrange(CCmdUI* pCmdUI); afx_msg void OnUpdateWindowCascade(CCmdUI* pCmdUI); afx_msg void OnUpdateWindowTileHorz(CCmdUI* pCmdUI); afx_msg void OnUpdateFileSaveAs(CCmdUI* pCmdUI); afx_msg void OnUpdateIndicatorFileName(CCmdUI* pCmdUI) ; afx_msg void OnUpdateIndicatorSize(CCmdUI* pCmdUI) ; afx_msg void OnUpdateIndicatorBPP(CCmdUI* pCmdUI) ; afx_msg void OnUpdateIndicatorZoomPercent(CCmdUI* pCmdUI) ; afx_msg void OnUpdateIndicatorMemSize(CCmdUI* pCmdUI); afx_msg void OnEditPasteFloater(); afx_msg void OnUpdateEditPasteFloater(CCmdUI* pCmdUI); afx_msg void OnEditCopyFloater(); afx_msg void OnUpdateEditCopyFloater(CCmdUI* pCmdUI); afx_msg void OnPreview(); afx_msg void OnUpdatePreview(CCmdUI* pCmdUI); afx_msg void OnSegmentationStartautoandclearmanualsegments(); afx_msg void OnUpdatePreferencesShowsegmentstypes(CCmdUI* pCmdUI); afx_msg void OnPreferencesShowsegmentstypes(); afx_msg void OnSegmentationClearsegments(); afx_msg void OnUpdateSegmentationClearsegments(CCmdUI* pCmdUI); afx_msg void OnEditSelectallsegments(); afx_msg void OnUpdateEditSelectallsegments(CCmdUI* pCmdUI); 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 OnSegmentationDrawDrawsegment(); afx_msg void OnSegmentationDrawStopdrawing(); afx_msg void OnUpdateSegmentationDrawDrawsegment(CCmdUI* pCmdUI); afx_msg void OnUpdateSegmentationDrawStopdrawing(CCmdUI* pCmdUI); afx_msg void OnEditDeselectallsegments(); afx_msg void OnFileExportsegments(); afx_msg void OnFileImportsegments(); afx_msg void OnEditDeleteselectedsegments(); afx_msg void OnUpdateFileExportsegments(CCmdUI* pCmdUI); afx_msg void OnUpdateEditDeselectallsegments(CCmdUI* pCmdUI); afx_msg void OnUpdateEditDeleteselectedsegments(CCmdUI* pCmdUI); afx_msg void OnSegmentationStartautoandpreservemanualsegments(); afx_msg void OnUpdateSegmentationStartautoandpreservemanualsegments(CCmdUI* pCmdUI); afx_msg void OnFileSavemultipage(); afx_msg void OnPreferencesSegmentationandcompressionoptions(); afx_msg void OnColorColorresolution(); afx_msg void OnColorViewhistogram(); afx_msg void OnColorUniquecolors(); afx_msg void OnFileSaveasleadmrc(); afx_msg void OnFileSaveasmrc(); afx_msg void OnFileSaveaspdf(); afx_msg void OnContextMenu(CWnd* pWnd, CPoint point); afx_msg void OnViewSelectedsegmentEnlargesegment(); afx_msg void OnViewSelectedsegmentUniquecolors(); afx_msg void OnViewSelectedsegmentShowhistogram(); afx_msg void OnViewSelectedsegmentShowtype(); afx_msg void OnViewSelectedsegmentShowproperties(); afx_msg void OnUpdateViewSelectedsegmentShowhistogram(CCmdUI* pCmdUI); afx_msg void OnUpdateViewSelectedsegmentShowproperties(CCmdUI* pCmdUI); afx_msg void OnUpdateViewSelectedsegmentShowtype(CCmdUI* pCmdUI); afx_msg void OnUpdateViewSelectedsegmentUniquecolors(CCmdUI* pCmdUI); afx_msg void OnViewSelectedsegmentCombinesegments(); afx_msg void OnViewSelectedsegmentShowinnewwindow(); afx_msg void OnSegmentationRefreshsegments(); afx_msg void OnUpdateViewSelectedsegmentEnlargeSegment(CCmdUI* pCmdUI); afx_msg void OnRButtonDown(UINT nFlags, CPoint point); afx_msg void OnUpdateViewSelectedsegmentCombinesegments(CCmdUI* pCmdUI); afx_msg void OnUpdateViewSelectedsegmentShowinnewwindow(CCmdUI* pCmdUI); afx_msg void OnUpdateSegmentationRefreshsegments(CCmdUI* pCmdUI); afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); afx_msg void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; #ifndef _DEBUG // debug version in DemoView.cpp inline CDemoDoc* CDemoView::GetDocument() { return (CDemoDoc*)m_pDocument; } #endif ///////////////////////////////////////////////////////////////////////////// //{{AFX_INSERT_LOCATION}} // Microsoft Developer Studio will insert additional declarations immediately before the previous line. #endif // !defined(AFX_DEMOVIEW_H__EC308E4F_4BB3_11D2_8AFB_444553540000__INCLUDED_)