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.
35 lines
1.0 KiB
C++
35 lines
1.0 KiB
C++
#pragma once
|
|
#include "GlobalDefine.h"
|
|
#include "FontType.h"
|
|
#include "SmartPtr.h"
|
|
|
|
typedef pair<CString,CString> NamePath;//字体文件名和路径
|
|
|
|
class CFontTypeMgr
|
|
{
|
|
public:
|
|
~CFontTypeMgr(void);
|
|
static CFontTypeMgr &Instance();//单例模式
|
|
|
|
void Initialize();
|
|
void UpdateFontNameComb(CComboBox &Comb);
|
|
void FontTypeNameInsertToComb(CComboBox &Comb);
|
|
CString GetFontPath(CString FontName);
|
|
void SetCurFontType(int idx);
|
|
void GetCurFontName(int idx);
|
|
void CreatCharVec(char *pChar,vector<PointType> &m_PonitVec);
|
|
CString GetCurFontTypeName();
|
|
CString GetCurFontName();
|
|
void SetCurFontByName(CString FontTypeName,CString FontName);
|
|
int GetCurFontTypeIdx();
|
|
private:
|
|
CFontTypeMgr(void);
|
|
|
|
void AddFontType(CFontType *);
|
|
bool CheckIdx(int idx);
|
|
private:
|
|
static CFontTypeMgr m_Instance;//单例模式
|
|
int m_CurFontTypeIdx;//当前选择的字库类型
|
|
vector<Sptr<CFontType>> m_FontTypeVec;//字体容器
|
|
};
|