Source code of Windows XP (NT5)
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.

76 lines
2.2 KiB

  1. /*************************************************
  2. * osbview.h *
  3. * *
  4. * Copyright (C) 1995-1999 Microsoft Inc. *
  5. * *
  6. *************************************************/
  7. // osbview.h : interface of the COSBView class
  8. //
  9. /////////////////////////////////////////////////////////////////////////////
  10. // define the CreateDIBSection function (Build 550 version)
  11. class CBlockDoc;
  12. class COSBView : public CScrollView
  13. {
  14. protected: // create from serialization only
  15. COSBView();
  16. DECLARE_DYNCREATE(COSBView)
  17. // Attributes
  18. public:
  19. CDocument* GetDocument();
  20. CDIB* GetDIB() {return m_pDIB;}
  21. CDIBPal* GetPalette() {return m_pPal;}
  22. void Resize(BOOL bShrinkOnly);
  23. // Operations
  24. public:
  25. BOOL Create(CDIB* pDIB); // create a new buffer
  26. void Draw(CRect* pClipRect = NULL); // draw os buffer to screen
  27. virtual void Render(CRect* pClipRect = NULL) {return;UNREFERENCED_PARAMETER(pClipRect);}
  28. void AddDirtyRegion(CRect* pRect);
  29. void RenderAndDrawDirtyList();
  30. // Implementation
  31. public:
  32. virtual ~COSBView();
  33. virtual void OnDraw(CDC* pDC); // overridden to draw this view
  34. virtual void OnInitialUpdate(); // first time after construct
  35. virtual void OnUpdate(CView* pSender,
  36. LPARAM lHint,
  37. CObject* pHint);
  38. #ifdef _DEBUG
  39. virtual void AssertValid() const;
  40. virtual void Dump(CDumpContext& dc) const;
  41. #endif
  42. protected:
  43. CDIB *m_pDIB; // the DIB buffer
  44. CDIBPal *m_pPal; // Palette for drawing
  45. private:
  46. BITMAPINFO *m_pOneToOneClrTab; // ptr to 1:1 color table
  47. HBITMAP m_hbmSection; // bm from section
  48. CObList m_DirtyList; // dirty regions
  49. void EmptyDirtyList();
  50. // Generated message map functions
  51. protected:
  52. //{{AFX_MSG(COSBView)
  53. afx_msg void OnPaletteChanged(CWnd* pFocusWnd);
  54. afx_msg BOOL OnQueryNewPalette();
  55. //}}AFX_MSG
  56. DECLARE_MESSAGE_MAP()
  57. };
  58. #ifndef _DEBUG // debug version in osbview.cpp
  59. inline CDocument* COSBView::GetDocument()
  60. { return (CDocument*) m_pDocument; }
  61. #endif
  62. /////////////////////////////////////////////////////////////////////////////