Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

194 lines
6.3 KiB

  1. // pbrusvw.h : interface of the CPBView class
  2. //
  3. class CPBDoc;
  4. class CImgWnd;
  5. class CThumbNailView;
  6. class CFloatThumbNailView;
  7. class CBitmapObj;
  8. class C_PrintDialogEx;
  9. /***************************************************************************/
  10. class CPBView : public CView
  11. {
  12. protected: // create from serialization only
  13. DECLARE_DYNCREATE( CPBView )
  14. CPBView();
  15. public: /* Attributes ***********************************************/
  16. enum DOCKERS
  17. {
  18. unknown,
  19. toolbox,
  20. colorbox,
  21. };
  22. CImgWnd* m_pImgWnd;
  23. CThumbNailView* m_pwndThumbNailView;
  24. CFloatThumbNailView* m_pwndThumbNailFloat;
  25. public: /* Operations ***********************************************/
  26. CPBDoc* GetDocument();
  27. void OnPaletteChanged(CWnd* pFocusWnd);
  28. BOOL OnQueryNewPalette();
  29. BOOL SetObject();
  30. int SetTools();
  31. CPoint GetDockedPos ( DOCKERS tool, CSize& sizeTool );
  32. void GetFloatPos ( DOCKERS tool, CRect& rectPos );
  33. void SetFloatPos ( DOCKERS tool, CRect& rectPos );
  34. void ShowThumbNailView( void );
  35. void HideThumbNailView( void );
  36. private: /***************************************************************/
  37. C_PrintDialogEx *m_pdexSub; // substitute in for CPrintDialog
  38. CPrintDialog *m_pdRestore; // dialog pointer to restore after printing
  39. BOOL SetView( CBitmapObj* pBitmapObj );
  40. void ToggleThumbNailVisibility( void );
  41. BOOL IsThumbNailVisible ( void );
  42. BOOL CreateThumbNailView();
  43. BOOL DestroyThumbNailView();
  44. BOOL InitPageStruct( LPPAGESETUPDLGA );
  45. static UINT APIENTRY PaintHookProc( HWND, UINT, WPARAM, LPARAM );
  46. BOOL GetPrintToInfo(CPrintInfo* pInfo);
  47. public: /* Implementation **********************************************/
  48. virtual ~CPBView();
  49. virtual BOOL PreCreateWindow( CREATESTRUCT& cs );
  50. virtual void OnInitialUpdate( void );
  51. virtual void OnActivateView ( BOOL bActivate, CView* pActivateView, CView* pDeactiveView );
  52. virtual void OnDraw ( CDC* pDC ); // overridden to draw this view
  53. virtual BOOL OnCmdMsg ( UINT, int, void*, AFX_CMDHANDLERINFO*);
  54. virtual void OnPrepareDC ( CDC* pDC, CPrintInfo* pInfo = NULL );
  55. // Printing support
  56. virtual BOOL OnPreparePrinting( CPrintInfo* pInfo );
  57. virtual void OnBeginPrinting ( CDC* pDC, CPrintInfo* pInfo );
  58. virtual void OnPrint ( CDC* pDC, CPrintInfo* pInfo );
  59. virtual void OnEndPrinting ( CDC* pDC, CPrintInfo* pInfo );
  60. BOOL CanSetWallpaper();
  61. void SetTheWallpaper( BOOL bTiled = FALSE );
  62. #ifdef _DEBUG
  63. virtual void AssertValid() const;
  64. virtual void Dump(CDumpContext& dc) const;
  65. #endif
  66. // Generated message map functions
  67. protected: /************************************************************/
  68. //{{AFX_MSG(CPBView)
  69. afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  70. afx_msg void OnSize(UINT nType, int cx, int cy);
  71. afx_msg void OnFilePrint();
  72. afx_msg void OnFilePrintPreview();
  73. afx_msg void OnEditUndo();
  74. afx_msg void OnEditRedo();
  75. afx_msg void OnEditCut();
  76. afx_msg void OnEditClear();
  77. afx_msg void OnEditCopy();
  78. afx_msg void OnEditPaste();
  79. afx_msg void OnUpdateEditUndo(CCmdUI* pCmdUI);
  80. afx_msg void OnUpdateEditRedo(CCmdUI* pCmdUI);
  81. afx_msg void OnUpdateEditPaste(CCmdUI* pCmdUI);
  82. afx_msg void OnViewGrid();
  83. afx_msg void OnViewZoom100();
  84. afx_msg void OnViewZoom400();
  85. afx_msg void OnUpdateViewZoom100(CCmdUI* pCmdUI);
  86. afx_msg void OnUpdateViewZoom400(CCmdUI* pCmdUI);
  87. afx_msg void OnUpdateViewGrid(CCmdUI* pCmdUI);
  88. afx_msg void OnImageInvertColors();
  89. afx_msg void OnUpdateImageInvertColors(CCmdUI* pCmdUI);
  90. afx_msg void OnTglopaque();
  91. afx_msg void OnUpdateTglopaque(CCmdUI* pCmdUI);
  92. afx_msg void OnImageAttributes();
  93. afx_msg void OnSel2bsh();
  94. afx_msg void OnLargerbrush();
  95. afx_msg void OnSmallerbrush();
  96. afx_msg void OnViewZoom();
  97. afx_msg void OnImageFlipRotate();
  98. afx_msg void OnUpdateImageFlipRotate(CCmdUI* pCmdUI);
  99. afx_msg void OnEditcolors();
  100. afx_msg void OnUpdateEditcolors(CCmdUI* pCmdUI);
  101. #if 0 // unused features
  102. afx_msg void OnLoadcolors();
  103. afx_msg void OnUpdateLoadcolors(CCmdUI* pCmdUI);
  104. afx_msg void OnSavecolors();
  105. afx_msg void OnUpdateSavecolors(CCmdUI* pCmdUI);
  106. #endif
  107. afx_msg void OnEditSelectAll();
  108. afx_msg void OnEditPasteFrom();
  109. afx_msg void OnEditCopyTo();
  110. afx_msg void OnUpdateEditCopyTo(CCmdUI* pCmdUI);
  111. afx_msg void OnImageStretchSkew();
  112. afx_msg void OnUpdateImageStretchSkew(CCmdUI* pCmdUI);
  113. afx_msg void OnViewViewPicture();
  114. afx_msg void OnUpdateViewViewPicture(CCmdUI* pCmdUI);
  115. afx_msg void OnViewTextToolbar();
  116. afx_msg void OnUpdateViewTextToolbar(CCmdUI* pCmdUI);
  117. afx_msg void OnFileSetaswallpaperT();
  118. afx_msg void OnUpdateFileSetaswallpaperT(CCmdUI* pCmdUI);
  119. afx_msg void OnFileSetaswallpaperC();
  120. afx_msg void OnUpdateFileSetaswallpaperC(CCmdUI* pCmdUI);
  121. afx_msg void OnViewThumbnail();
  122. afx_msg void OnUpdateViewThumbnail(CCmdUI* pCmdUI);
  123. afx_msg void OnUpdateImageAttributes(CCmdUI* pCmdUI);
  124. afx_msg void OnEscape();
  125. afx_msg void OnEscapeServer();
  126. afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
  127. afx_msg void OnUpdateEditSelection(CCmdUI* pCmdUI);
  128. afx_msg void OnUpdateEditClearSel(CCmdUI* pCmdUI);
  129. afx_msg void OnFilePageSetup();
  130. afx_msg void OnImageClearImage();
  131. afx_msg void OnUpdateImageClearImage(CCmdUI* pCmdUI);
  132. //}}AFX_MSG
  133. afx_msg void OnDestroy();
  134. afx_msg BOOL PreTranslateMessage(MSG *pMsg);
  135. #ifdef CUSTOMFLOAT
  136. afx_msg void OnUpdateViewColorBox(CCmdUI* pCmdUI);
  137. afx_msg void OnUpdateViewToolBox(CCmdUI* pCmdUI);
  138. #endif
  139. DECLARE_MESSAGE_MAP()
  140. friend class CPrintResObj;
  141. };
  142. #ifndef _DEBUG // debug version in pbrusvw.cpp
  143. inline CPBDoc* CPBView::GetDocument() { return (CPBDoc*)m_pDocument; }
  144. #endif
  145. #ifndef PD_NOCURRENTPAGE
  146. #define PD_NOCURRENTPAGE 0x00800000
  147. #endif //PD_NOCURRENTPAGE
  148. /***************************************************************************/