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.

70 lines
1.9 KiB
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#pragma once
//#include "languagesupport.h"
//#include "cursor.h"
#include "PrintPageSetup.h"
class CPublicParam
{
public:
CPublicParam(void);
~CPublicParam(void);
static CPublicParam& GetParam(); //获得对象
void Initial(); //初始化,仅需要初始化一次的在此进行
//CCursor& GetCursor() { return m_cursor; }
CPrintPageSetup* GetPageSetup(void) { return m_pPageSetup; }
CDocType* GetDocType() { return m_pDocType; }
CString GetSaveDefaultExt(void); //获得保存的缺省扩展名
void refAll(); //对以下需要引用的所有参数进行一次引用操作
void unrefAll();
void refCursor();
void unrefCursor();
void refPageSetup(void);
void unrefPageSetup(void);
void refDocType();
void unrefDocType();
void refUndoManager();
void unrefUndoManager();
void PrintPageSetup(CWnd* pMainWnd);
///< 参数scale为 1毫米代表的实际长度
BOOL DoScaleSetDialog(CSize8& scale, CSize &unit, bool bSameXY = true, CWnd* pParentWnd = NULL);
// < 参数scale一个实际单位的毫米长度
BOOL DoScaleViewDialog(CSize8& scale, CSize &unit, CWnd* pParentWnd = NULL);
BOOL DoPromptFileNameEx( CString& fileName, UINT nIDSTitle, DWORD lFlags,
BOOL bOpenFileDialog, int* pDocType=NULL);
BOOL DoOpenFileDialog( CString strTitle, CStringList& fileNameList,
DWORD lFlags=OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
int* pDocTypeID=NULL, BOOL bAppendAllFileType=TRUE,
CWnd* pParentWnd=NULL, BOOL bVistaStyle=FALSE);
void SetDefaultPrintOrientation(UINT nOrientation); //设置缺省打印纸方向
///< 获得模板存储的路径
CString GetTemplatePath();
CString GetTemplatePathPlane();
CString GetTemplatePathColumn();
CString GetTemplatePathCorrelation();
protected:
//CCursor m_cursor; //所有鼠标指针形状
int m_nRefCursorCounter;
CPrintPageSetup* m_pPageSetup; //CPrintPageSetup对象
int m_nRefPageSetupCounter;
CDocType* m_pDocType; //CDocType对象
int m_nRefDocTypeCounter;
int m_nRefUndoManager;
};
#define PARAM() CPublicParam::GetParam()