📄 viewableprintpageslist.h
字号:
/* * * viewableprintpageslist.h * Copyright (C) 2006 Michael H. Overlin This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact at poster_printer@yahoo.com */#ifndef VIEWABLEPRINTPAGESLIST_H#define VIEWABLEPRINTPAGESLIST_H#include "..\lib\listviewwindow.h"#include "..\lib\renderpages.h"#include <windows.h>class ViewablePrintPagesList : public ::ViewableList {public: ViewablePrintPagesList(IN HENHMETAFILE hMeta, IN HENHMETAFILE hMetaDraft, IN const RenderSpec& rs, IN const PageSpec &ps, IN const SourceSpec& ss); virtual ~ViewablePrintPagesList(); const POINT& GetItemPointInMosaic(IN uint uiItem) const { return m_vil[uiItem].ptInMosaic; } // ViewableList INTERFACE virtual uint GetCount(void) const ; virtual void GetBounds(OUT RECTD& rd) const ; virtual void GetItemRuledBounds(IN uint uiItem, OUT RECTD& rd) const ; virtual void GetItemBounds(IN uint uiItem, OUT RECTD& rd) const ; virtual BOOL ItemFromPt(OUT uint& uiItem, IN const POINTD& ptd) const ; virtual BOOL ItemsFromRect(OUT std::vector<uint>& vuiItem, const RECTD& rd) const ; virtual void DrawItem(OUT HDC hdcDest, IN const CoordTrans& trans, IN const RECT& rDest, IN uint uiItem, IN ViewableList::SelectionSpec sel, IN BOOL bDraft) const ; virtual void Draw(OUT HDC hdcDest, IN const CoordTrans& trans, IN const RECT& rDest, const std::vector<ViewableList::SelectionSpec> &vsel, IN BOOL bDraft) const ; virtual void Draw(OUT HDC hdcDest, IN const CoordTrans& trans, IN const RECT& rDest, IN BOOL bDraft) const ; // INTERFACE WITH DEFAULT ACTIONS // WE NEED THE PRINTABLE PAGE AREA INSTEAD OF THE RULED AREA HERE virtual void GetItemSelectableBounds(IN uint uiItem, OUT RECTD& rd) const ;private: struct LayoutSpec { double dPaperDistance_Inches; }; struct PaperSpec { SIZED szd_Inches; double dShadow_Inches; }; struct ItemLayout { POINT ptInMosaic; RECTD rdPaper_Inches; RECTD rdPaperPrintable_Inches; RECTD rdShadowBottom_Inches; RECTD rdShadowRight_Inches; RECTD rdBounds_Inches; // 6/1 RECTD rdRenderedImage_Inches; }; void CalculateLayout(void); void DrawPaper(OUT HDC hdcDest, IN const CoordTrans& trans, IN const RECT& rDest, const ItemLayout& il, IN ViewableList::SelectionSpec sel) const ; void DrawSelection(OUT HDC hdcDest, IN const CoordTrans& trans, IN const RECT& rDest, const ItemLayout& il, IN ViewableList::SelectionSpec sel) const ; HENHMETAFILE m_hMeta; RenderSpec m_rs; PageSpec m_ps; SourceSpec m_ss; LayoutSpec m_ls; PaperSpec m_paper; uint m_uiCount; RECTD m_rdBounds_Inches; std::vector<ItemLayout> m_vil; HBRUSH m_hbrPaper; HBRUSH m_hbrPaperShadow; HBRUSH m_hbrHandSel; HBRUSH m_hbrArrowSel; HBRUSH m_hbrHandArrowSel; // 7/3 HENHMETAFILE m_hMetaDraft;};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -