zhouyangbranch
Zhouyang 1 year ago
parent ff0b7d307a
commit d8d51575af

@ -13,6 +13,21 @@
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//此文件是 Notepad++ 项目的一部分
//版权所有 C2021 Don HO <don.h@free.fr>
//该程序是免费软件:您可以重新分发和 / 或修改它
//它根据 GNU 通用公共许可证的条款,由
//自由软件基金会Free Software Foundation许可证的第 3 版,或
//由您选择任何更高版本。
//
//分发该程序是希望它有用,
//但没有任何保证; 甚至没有默示保证
//适销性或特定用途的适用性。请参阅
//GNU 通用公共许可证了解更多详情。
//
//您应该已经收到了 GNU 通用公共许可证的副本
//以及这个程序。 如果没有,请参阅 < https://www.gnu.org/licenses/>。
#pragma once
@ -36,30 +51,33 @@
#ifdef _WIN64
#ifdef _M_ARM64
#define ARCH_TYPE IMAGE_FILE_MACHINE_ARM64
#define ARCH_TYPE IMAGE_FILE_MACHINE_ARM64//图像文件机常量
#else
#define ARCH_TYPE IMAGE_FILE_MACHINE_AMD64
#define ARCH_TYPE IMAGE_FILE_MACHINE_AMD64//图像文件机常量
#endif
#else
#define ARCH_TYPE IMAGE_FILE_MACHINE_I386
#define ARCH_TYPE IMAGE_FILE_MACHINE_I386//图像文件机常量
#endif
#define CMD_INTERPRETER TEXT("%COMSPEC%")
#define CMD_INTERPRETER TEXT("%COMSPEC%")//指向CMD启动
class NativeLangSpeaker;
const bool POS_VERTICAL = true;
const bool POS_HORIZOTAL = false;
const bool POS_VERTICAL = true;//垂直向量为1
const bool POS_HORIZOTAL = false;//水平向量为0
const int UDD_SHOW = 1; // 0000 0001
const int UDD_DOCKED = 2; // 0000 0010
// 0 : 0000 0000 hide & undocked
// 1 : 0000 0001 show & undocked
// 2 : 0000 0010 hide & docked
// 3 : 0000 0011 show & docked
//Docker 将应用程序与该程序的依赖,打包在一个文件里面。运行这个文件,就会生成一个虚拟容器。
// 程序在这个虚拟容器里运行,就好像在真实的物理机上运行一样。有了 Docker就不用担心环境问题。
// 0 : 0000 0000 hide & undocked 隐藏且非环境化 0
// 1 : 0000 0001 show & undocked 显示且非环境化 1
// 2 : 0000 0010 hide & docked 隐藏且环境化 2
// 3 : 0000 0011 show & docked 显示且环境化 3
const int TAB_DRAWTOPBAR = 1; //0000 0000 0001
const int TAB_DRAWINACTIVETAB = 2; //0000 0000 0010
@ -76,7 +94,7 @@ const int TAB_ALTICONS = 1024; //0100 0000 0000
const bool activeText = true;
const bool activeNumeric = false;
enum class EolType: std::uint8_t
enum class EolType: std::uint8_t//end of line 类型
{
windows,
macos,
@ -88,9 +106,9 @@ enum class EolType: std::uint8_t
};
/*!
** \brief Convert an int into a FormatType
** \param value An arbitrary int
** \param defvalue The default value to use if an invalid value is provided
** \brief Convert an int into a FormatTypeint
** \param value An arbitrary intint
** \param defvalue The default value to use if an invalid value is provided使
*/
EolType convertIntToFormatType(int value, EolType defvalue = EolType::osdefault);
@ -98,16 +116,16 @@ EolType convertIntToFormatType(int value, EolType defvalue = EolType::osdefault)
enum UniMode {uni8Bit=0, uniUTF8=1, uni16BE=2, uni16LE=3, uniCookie=4, uni7Bit=5, uni16BE_NoBOM=6, uni16LE_NoBOM=7, uniEnd};
enum ChangeDetect { cdDisabled = 0x0, cdEnabledOld = 0x01, cdEnabledNew = 0x02, cdAutoUpdate = 0x04, cdGo2end = 0x08 };
enum BackupFeature {bak_none = 0, bak_simple = 1, bak_verbose = 2};
enum OpenSaveDirSetting {dir_followCurrent = 0, dir_last = 1, dir_userDef = 2};
enum MultiInstSetting {monoInst = 0, multiInstOnSession = 1, multiInst = 2};
enum ChangeDetect { cdDisabled = 0x0, cdEnabledOld = 0x01, cdEnabledNew = 0x02, cdAutoUpdate = 0x04, cdGo2end = 0x08 };//改变监控
enum BackupFeature {bak_none = 0, bak_simple = 1, bak_verbose = 2};//备份和还原
enum OpenSaveDirSetting {dir_followCurrent = 0, dir_last = 1, dir_userDef = 2};//打开已保存设置
enum MultiInstSetting {monoInst = 0, multiInstOnSession = 1, multiInst = 2};//
enum writeTechnologyEngine {defaultTechnology = 0, directWriteTechnology = 1};
enum urlMode {urlDisable = 0, urlNoUnderLineFg, urlUnderLineFg, urlNoUnderLineBg, urlUnderLineBg,
urlMin = urlDisable,
urlMax = urlUnderLineBg};
const int LANG_INDEX_INSTR = 0;
const int LANG_INDEX_INSTR = 0;//语言索引指令
const int LANG_INDEX_INSTR2 = 1;
const int LANG_INDEX_TYPE = 2;
const int LANG_INDEX_TYPE2 = 3;
@ -117,7 +135,7 @@ const int LANG_INDEX_TYPE5 = 6;
const int LANG_INDEX_TYPE6 = 7;
const int LANG_INDEX_TYPE7 = 8;
const int COPYDATA_PARAMS = 0;
const int COPYDATA_PARAMS = 0;//数据拷贝参数
//const int COPYDATA_FILENAMESA = 1; // obsolete, no more useful
const int COPYDATA_FILENAMESW = 2;
const int COPYDATA_FULL_CMDLINE = 3;
@ -154,7 +172,7 @@ void cutStringBy(const TCHAR *str2cut, std::vector<std::wstring> & patternVect,
// style names
const wchar_t g_npcStyleName[] = L"Non-printing characters custom color";
struct Position
struct Position//位置结构体初始值全部为0
{
intptr_t _firstVisibleLine = 0;
intptr_t _startPos = 0;
@ -167,7 +185,7 @@ struct Position
};
struct MapPosition
struct MapPosition//图位
{
private:
intptr_t _maxPeekLenInKB = 512; // 512 KB
@ -187,10 +205,11 @@ public:
bool _isWrap = false;
bool isValid() const { return (_firstVisibleDisplayLine != -1); };
bool canScroll() const { return (_KByteInDoc < _maxPeekLenInKB); }; // _nbCharInDoc < _maxPeekLen : Don't scroll the document for the performance issue
//展开文件
};
struct sessionFileInfo : public Position
struct sessionFileInfo : public Position//会话文件信息结构体
{
sessionFileInfo(const wchar_t* fn, const TCHAR *ln, int encoding, bool userReadOnly, const Position& pos, const TCHAR *backupFilePath, FILETIME originalFileLastModifTimestamp, const MapPosition & mapPos) :
Position(pos), _encoding(encoding), _isUserReadOnly(userReadOnly), _originalFileLastModifTimestamp(originalFileLastModifTimestamp), _mapPos(mapPos)
@ -218,7 +237,7 @@ struct sessionFileInfo : public Position
};
struct Session
struct Session//会话结构体
{
size_t nbMainFiles() const {return _mainViewFiles.size();};
size_t nbSubFiles() const {return _subViewFiles.size();};
@ -232,7 +251,7 @@ struct Session
std::vector<std::wstring> _fileBrowserRoots;
};
//定义了两个结构体CmdLineParams和CmdLineParamsDTO分别用来保存命令行参数和通过WM_COPYDATA和Notepad_plus::loadCommandlineParams发送CmdLineParams。
struct CmdLineParams
{
bool _isNoPlugin = false;
@ -277,6 +296,11 @@ struct CmdLineParams
};
// A POD class to send CmdLineParams through WM_COPYDATA and to Notepad_plus::loadCommandlineParams
//CmdLineParams结构体定义了一系列bool、intptr_t、POINT、LangType和std::wstring类型的成员变量用于保存命令行参数的各个属性。其中isPointValid()函数用于检查_point的坐标值是否有效。
//CmdLineParamsDTO结构体是一个POD普通数据类型用于通过WM_COPYDATA和Notepad_plus::loadCommandlineParams发送CmdLineParams。它定义了与CmdLineParams相同类型的成员变量并提供了一个静态的FromCmdLineParams函数用于将CmdLineParams转换为CmdLineParamsDTO。
//在FromCmdLineParams函数中通过将CmdLineParams的成员变量赋值给CmdLineParamsDTO的对应成员变量实现了将CmdLineParams转换为CmdLineParamsDTO的功能。
//整个代码主要是为了实现CmdLineParams和CmdLineParamsDTO之间的数据传递和转换。
struct CmdLineParamsDTO
{
bool _isReadOnly = false;
@ -315,12 +339,12 @@ struct CmdLineParamsDTO
}
};
struct FloatingWindowInfo
struct FloatingWindowInfo//浮动窗口信息结构体
{
int _cont = 0;
RECT _pos = {};
FloatingWindowInfo(int cont, int x, int y, int w, int h)
FloatingWindowInfo(int cont, int x, int y, int w, int h)//浮动窗口位置参数
: _cont(cont)
{
_pos.left = x;
@ -389,6 +413,53 @@ struct DockingManagerData final
};
//这段代码定义了几个用于样式处理的数据结构和函数。
//首先是Style结构体表示一个样式。其中包括了以下成员
//_styleID: 样式的ID用于标识不同的样式。
//_styleDesc: 样式的描述。
//_fgColor和_bgColor前景色和背景色用于设置文本的颜色。
//_colorStyle颜色样式指定了是对前景色、背景色还是都设置颜色。
//_isFontEnabled是否启用了字体样式。
//_fontName字体名称。
//_fontStyle字体样式。
//_fontSize字体大小。
//_nesting嵌套样式用于处理嵌套样式的情况。
////_keywords关键字列表。
//然后是GlobalOverride结构体表示全局的样式覆盖设置。其中包括了以下成员
//isEnable()方法:判断是否启用了样式覆盖。
//enableFg、enableBg、enableFont、enableFontSize、enableBold、enableItalic、enableUnderLine每个成员都表示是否启用了相应的样式覆盖。
//接下来是StyleArray结构体用于管理多个样式。其中有以下成员函数
//begin()和end():返回迭代器,用于遍历样式数组。
//clear():清空样式数组。
//getStyler(size_t index):根据索引返回样式。
//addStyler(int styleID, TiXmlNode* styleNode)根据给定的样式ID和XML节点添加一个样式。
//addStyler(int styleID, const std::wstring& styleName)根据给定的样式ID和样式名称添加一个样式。
//findByID(int id)根据样式ID查找样式。
//findByName(const std::wstring& name):根据样式名称查找样式。
//接下来是LexerStyler结构体表示一个语法分析器的样式器。其中包括以下成员
//operator=:重载赋值运算符。
//setLexerName(const TCHAR* lexerName):设置语法分析器名称。
//setLexerDesc(const TCHAR* lexerDesc):设置语法分析器描述。
//setLexerUserExt(const TCHAR* lexerUserExt):设置语法分析器的用户扩展。
//getLexerName() const、getLexerDesc() const、getLexerUserExt() const分别返回语法分析器名称、描述和用户扩展。
//_lexerName、_lexerDesc、_lexerUserExt分别存储语法分析器的名称、描述和用户扩展。
//然后是SortLexersInAlphabeticalOrder结构体用于对LexerStyler进行按字母顺序排序。
//最后是LexerStylerArray结构体用于管理多个语法分析器的样式器。其中有以下成员函数
//getNbLexer() const返回语法分析器的数量。
//clear():清空语法分析器数组。
//getLexerFromIndex(size_t index):根据索引返回语法分析器样式器。
//getLexerNameFromIndex(size_t index) const、getLexerDescFromIndex(size_t index) const分别根据索引返回语法分析器的名称和描述。
//getLexerStylerByName(const TCHAR* lexerName):根据语法分析器名称查找语法分析器样式器。
//addLexerStyler(const TCHAR* lexerName, const TCHAR* lexerDesc, const TCHAR* lexerUserExt, TiXmlNode* lexerNode)根据语法分析器的名称、描述、用户扩展和XML节点添加一个语法分析器样式器。
//sort():对语法分析器样式器按字母顺序排序。
//这段代码的作用是定义了一些数据结构和函数,用于管理编辑器中的样式和语法分析器的样式。通过定义这些数据结构和函数,可以方便地管理和设置编辑器的样式和语法分析器的样式。
//
//
const int FONTSTYLE_NONE = 0;
const int FONTSTYLE_BOLD = 1;
@ -403,6 +474,7 @@ const int COLORSTYLE_ALL = COLORSTYLE_FOREGROUND|COLORSTYLE_BACKGROUND;
struct Style final
{
int _styleID = STYLE_NOT_USED;
@ -424,6 +496,14 @@ struct Style final
};
//
//
//
//
//
//
//
struct GlobalOverride final
{
bool isEnable() const {return (enableFg || enableBg || enableFont || enableFontSize || enableBold || enableItalic || enableUnderLine);}
@ -436,6 +516,14 @@ struct GlobalOverride final
bool enableUnderLine = false;
};
//
//
//
//
//
//
//
struct StyleArray
{
auto begin() { return _styleVect.begin(); };
@ -482,6 +570,14 @@ protected:
};
//
//
//
//
//
//
//
struct LexerStyler : public StyleArray
{
@ -522,6 +618,15 @@ private :
std::wstring _lexerUserExt;
};
//
//
//
//
//
//
//
struct SortLexersInAlphabeticalOrder {
bool operator() (LexerStyler& l, LexerStyler& r) {
if (!lstrcmp(l.getLexerDesc(), TEXT("Search result")))
@ -532,6 +637,15 @@ struct SortLexersInAlphabeticalOrder {
}
};
//
//
//
//
//
//
//
struct LexerStylerArray
{
size_t getNbLexer() const { return _lexerStylerVect.size(); }
@ -567,6 +681,23 @@ private :
};
//
//
//
//
//
//NewDocDefaultSettings包含了一些默认的文档设置包括文件格式、Unicode模式、编码方式等。
//LangMenuItem定义了一个菜单项包含了语言类型、命令ID和语言名称。
//PrintSettings定义了打印设置包括是否打印行号、打印选项、页眉页脚内容、字体样式等。
//Date定义了日期类包含年、月、日并提供了日期的比较和转换方法。
//这些结构体和类用于在某个编辑器中管理文档、语言、打印、日期等相关的设置和功能。
//
struct NewDocDefaultSettings final
{
EolType _format = EolType::osdefault;
@ -578,6 +709,15 @@ struct NewDocDefaultSettings final
};
//
//
//
//
//
//
//
struct LangMenuItem final
{
LangType _langType = L_TEXT;
@ -587,7 +727,13 @@ struct LangMenuItem final
LangMenuItem(LangType lt, int cmdID = 0, const std::wstring& langName = TEXT("")):
_langType(lt), _cmdID(cmdID), _langName(langName){};
};
//
//
//
//
//
//
//
struct PrintSettings final {
bool _printLineNumber = true;
int _printOption = SC_PRINT_COLOURONWHITE;
@ -624,7 +770,13 @@ struct PrintSettings final {
return ((_marge.left != 0) || (_marge.top != 0) || (_marge.right != 0) || (_marge.bottom != 0));
};
};
//
//
//
//
//
//
//
class Date final
{
@ -702,7 +854,25 @@ private:
unsigned long _month = 4;
unsigned long _day = 26;
};
//
//
//这段代码定义了一个名为MatchedPairConf的类该类包含了一些成员变量和成员函数。
//
//MatchedPairConf类的成员变量包括
//- _matchedPairs一个包含字符对的向量用于存储匹配的字符对。
//- _matchedPairsInit用于在初始化时使用的_matchedPairs的副本。
//- _doHtmlXmlTag、_doParentheses、_doBrackets、_doCurlyBrackets、_doQuotes、_doDoubleQuotes表示是否执行相应类型的括号匹配的布尔变量。
//
//MatchedPairConf类的成员函数包括
//- hasUserDefinedPairs() const判断是否存在用户定义的字符对。
//- hasDefaultPairs() const判断是否存在默认的字符对包括圆括号、方括号、花括号、引号等。
//- hasAnyPairsPair() const判断是否存在任何类型的字符对。
//
//该类的目的是管理匹配括号的设置,包括用户定义的字符对和默认的字符对。
//
//
//
//
class MatchedPairConf final
{
@ -721,7 +891,13 @@ public:
bool _doQuotes = false;
bool _doDoubleQuotes = false;
};
//
//
//
//
//
//
//
struct DarkModeConf final
{
bool _isEnabled = false;
@ -731,7 +907,13 @@ struct DarkModeConf final
NppDarkMode::AdvancedOptions _advOptions{};
};
//
//
//
//
//
//
//
struct LargeFileRestriction final
{
int64_t _largeFileSizeDefInByte = NPP_STYLING_FILESIZE_LIMIT_DEFAULT;
@ -746,7 +928,13 @@ struct LargeFileRestriction final
bool _suppress2GBWarning = false;
};
//
//
//
//
//
//
//
struct NppGUI final
{
toolBarStatusType _toolBarStatus = TB_STANDARD;
@ -918,7 +1106,27 @@ struct NppGUI final
LargeFileRestriction _largeFileRestriction;
};
//
//这段代码定义了三个结构体和一个类。
//
//1. 结构体ScintillaViewParams:
//-成员变量包括一系列布尔变量和枚举类型变量用于记录Scintilla编辑器的各种参数设置。
//- 成员函数包括一个计算分心模式视图的填充长度的方法。
//
//2. 结构体Lang :
// -成员变量包括语言ID、语言名称、默认文件扩展名、关键词列表、行注释符号、块注释开始符号和结束符号等。
// - 成员函数包括设置默认文件扩展名、设置行注释符号、设置块注释开始符号、设置块注释结束符号以及获取 / 设置Tab信息等。
//
// 3. 类UserLangContainer :
// -成员变量包括样式数组、语言名称、文件扩展名、是否为深色模式、UDL版本、关键词列表、是否为前缀、是否忽略大小写、是否允许折叠注释、强制纯LC、小数分隔符以及是否紧凑折叠等。
// - 成员函数包括获取名称、获取文件扩展名、获取UDL版本等。
///
// 这些结构体和类都用于记录编辑器的各种设置参数,方便进行管理和访问。
//
//
//
//
//
struct ScintillaViewParams
{
bool _lineNumberMarginShow = true;
@ -974,7 +1182,13 @@ struct ScintillaViewParams
return paddingLen;
};
};
//
//
//
//
//
//
//
const int NB_LIST = 20;
const int NB_MAX_LRF_FILE = 30;
const int NB_MAX_USER_LANG = 30;
@ -994,7 +1208,13 @@ const int MASK_ReplaceBySpc = 0x80;
const int MASK_TabSize = 0x7F;
//
//
//
//
//
//
//
struct Lang final
{
@ -1068,7 +1288,13 @@ struct Lang final
}
};
//
//
//
//
//
//
//
class UserLangContainer final
{
@ -1149,7 +1375,39 @@ private:
#define MAX_EXTERNAL_LEXER_NAME_LEN 128
//
//这段代码定义了五个结构体和两个类。
//
//1. 类ExternalLangContainer:
//-成员变量包括字符串类型的_nameLexilla::CreateLexerFn类型的fnCL以及ExternalLexerAutoIndentMode类型的_autoIndentMode。
//- 没有定义成员函数。
//
//2. 结构体FindHistory :
// -成员变量包括多个布尔变量和整型变量,用于记录查找历史记录的各种参数设置。
// - 成员函数包括获取查找历史记录的路径、获取查找历史记录的过滤器、获取查找历史记录的查找内容等。
//
// 3. 结构体ColumnEditorParam :
// -成员变量包括leadingChoice枚举类型的_leadingChoice整型变量_initialNum、_increaseNum、_repeatNum和_formatChoice字符串类型的_insertedTextContent。
// - 没有定义成员函数。
//
// 4. 类LocalizationSwitcher :
// -成员变量包括LocalizationDefinition结构体类型的_localizationList、wstring类型的_nativeLangPath和string类型的_fileName。
// - 成员函数包括从xml文件中添加语言、根据xml文件名获取语言名称、根据语言名称获取xml文件路径、切换到指定语言以及获取_localizationList大小等。
//
// 5. 类ThemeSwitcher :
// -成员变量包括std::vector类型的_themeList、std::map类型的_themeStylerSavePath、wstring类型的_themeDirPath和wstring类型的_defaultThemeLabel。
// - 成员函数包括从xml文件中添加主题、根据xml文件名获取主题名称、根据主题名称获取xml文件路径、检查主题名称是否存在、获取_themeList大小、设置主题文件夹路径、获取主题文件夹路径、获取默认主题标签以及根据路径获取保存路径等。
//
// 6. 结构体UdlXmlFileState :
// -成员变量包括TiXmlDocument指针类型的_udlXmlDoc布尔类型的_isDirty和_isInDefaultSharedContainer以及pair<unsigned char, unsigned char>类型的_indexRange。
// - 构造函数用于初始化成员变量。
//
// 这些结构体和类用于记录各种设置参数和状态信息,方便进行管理和访问。
//
//
//
//
//
class ExternalLangContainer final
{
@ -1165,6 +1423,14 @@ public:
};
//
//
//
//
//
//
//
struct FindHistory final
{
enum searchMode{normal, extended, regExpr};
@ -1208,6 +1474,14 @@ struct FindHistory final
bool _regexBackward4PowerUser = false;
};
//
//
//
//
//
//
//
struct ColumnEditorParam final
{
enum leadingChoice : UCHAR { noneLeading, zeroLeading, spaceLeading };
@ -1223,6 +1497,14 @@ struct ColumnEditorParam final
leadingChoice _leadingChoice = noneLeading;
};
//
//
//
//
//
//
//
class LocalizationSwitcher final
{
friend class NppParameters;
@ -1269,6 +1551,14 @@ private:
};
//
//
//
//
//
//
//
class ThemeSwitcher final
{
friend class NppParameters;
@ -1340,6 +1630,14 @@ private:
};
//
//
//
//
//
//
//
struct UdlXmlFileState final {
TiXmlDocument* _udlXmlDoc = nullptr;
bool _isDirty = false;
@ -1634,6 +1932,48 @@ public:
return _workSpaceFilePathes[i].c_str();
};
//
//这段代码包含了两个类和一些常量和函数的定义:
//
//常量和变量的定义:
//
// NB_LANG整型常量表示语言的数量上限。
// RECENTFILES_SHOWFULLPATH和RECENTFILES_SHOWONLYFILENAME整型常量表示在最近文件列表中显示完整路径或仅显示文件名。
// 类DynamicMenu
// 公共成员函数包括attach方法用于将菜单附加到特定位置createMenu方法用于创建菜单clearMenu方法用于清空菜单getTopLevelItemNumber方法用于获取顶级菜单项的数量push_back方法用于向菜单添加菜单项getItemFromIndex方法用于根据索引获取菜单项erase方法用于根据索引删除菜单项getPosBase方法用于获取_posBase的值getLastCmdLabel方法用于获取_lastCmdLabel的值。
// 私有成员变量包括_menuItems类型为MenuItemUnit的vector_hMenu类型为HMENU_posBase类型为unsigned int_lastCmd类型为int和_lastCmdLabel类型为wstring。
// 类NppParameters
// 私有静态函数getInstancePointer用于获取NppParameters的实例指针。
// 静态函数getInstance用于获取NppParameters的实例。
// 静态函数getLangIDFromStr用于根据语言名称获取对应的LangType。
// 静态函数getLocPathFromStr用于根据本地化代码获取本地化文件路径。
// 成员函数load用于加载NppParameters的设置参数。
// 其他成员函数用于获取和操作NppParameters中的配置参数。
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
const std::vector<std::wstring> getFileBrowserRoots() const { return _fileBrowserRoot; };
std::wstring getFileBrowserSelectedItemPath() const { return _fileBrowserSelectedItemPath; };
@ -1886,7 +2226,92 @@ private:
std::wstring _startWithLocFileName;
bool _doFunctionListExport = false;
bool _doPrintAndExit = false;
//
//这段代码继续定义了NppParameters类的一些成员函数和成员变量
//-getFileBrowserRoots方法返回_fileBrowserRoot的引用用于获取文件浏览器的根路径列表。
//- getFileBrowserSelectedItemPath方法返回_fileBrowserSelectedItemPath的值表示文件浏览器中选定的路径。
//- setWorkSpaceFilePath和getLoadedSessionFilePath方法用于设置和获取工作空间文件路径。
// - setWorkingDir方法用于设置当前工作目录。
// - setStartWithLocFileName方法用于设置启动时的本地化文件名。
// - setFunctionListExportBoolean和doFunctionListExport方法用于设置和获取是否导出函数列表。
// - setPrintAndExitBoolean和doPrintAndExit方法用于设置和获取是否打印并退出。
// - loadSession方法用于加载会话配置。
// - getFindDlgTabTitiles方法返回_findDlgTabTitiles的引用其中存储了查找对话框选项卡的标题。
// - asNotepadStyle方法用于判断是否使用类似记事本的样式。
/* - reloadPluginCmds方法用于重新加载插件命令。
- getContextMenuFromXmlTreereloadContextMenuFromXmlTreeXML
- getWinVersion_winVersionWindows
- getFindHistory_findHistory
- safeWow64EnableWow64FsRedirection64
- getLocalizationSwitcherNppParameters
- getFileBrowserRoots
- getFileBrowserSelectedItemPath
- setWorkSpaceFilePath
- setWorkingDir
- setStartWithLocFileName使
- setFunctionListExportBoolean
- setPrintAndExitBoolean退
- loadSession
- setLoadedSessionFilePath
- getLoadedSessionFilePath
- langTypeToCommandIDID
- getFindDlgTabTitiles
- asNotepadStyle
- reloadPluginCmds
- getContextMenuFromXmlTreeXML
- reloadContextMenuFromXmlTree
- getWinVersion
- getWinVersionStr
- getWinVerBitStr
- getFindHistory
- safeWow64EnableWow64FsRedirectionWOW64
- getLocalizationSwitcher
- getThemeSwitcher
- getBlackList
- isInBlackList
- importUDLFromFile
- exportUDLToFile
- getNativeLangSpeaker
- setNativeLangSpeaker
- isLocal
- isCloud
- saveConfig_xmlXML
- getUserPath
- getUserDefineLangFolderPath
- getUserDefineLangPath
- writeSettingsFilesOnCloudForThe1stTime
- setCloudChoice
- removeCloudChoice
- isCloudPathChanged
- archType
- getCurrentDefaultBgColor
- getCurrentDefaultFgColor
- setCurrentDefaultBgColor
- setCurrentDefaultFgColor
- setCmdSettingsDir
- setTitleBarAdd
- getTitleBarAdd
- _dpiManagerDPI
- getSpecialFolderLocation
- setUdlXmlDirtyFromIndexUserDefineLang XML
- setUdlXmlDirtyFromXmlDocXMLUserDefineLang XML
- removeIndexFromXmlUdlsUserDefineLang XML
- isStylerDocLoadedstylers.xml
- _columnEditParamColumnEditorParam*/
//
//
//
//
//
//
//
//
//
//
//
//
ThemeSwitcher _themeSwitcher;
std::vector<MenuItemUnit> _contextMenuItems;
@ -2024,3 +2449,29 @@ private:
winVer getWindowsVersion();
};
//这段代码继续定义了NppParameters类的一些成员函数和成员变量
//
//- _themeSwitcher主题切换器。
//- _contextMenuItems和_tabContextMenuItems用于存储自定义右键菜单的菜单项。
//- _macroMenuItems和_runMenuItems用于存储宏和运行命令的菜单项。
//- _session会话对象用于存储会话信息。
//- _shortcutsPath、_contextMenuPath、_tabContextMenuPath、_sessionPath、_nppPath、_userPath、_stylerPath、_appdataNppDir、_pluginRootDir、_pluginConfDir、_userPluginConfDir、_currentDirectory、_workSpaceFilePathes用于存储文件路径和目录路径的字符串变量。
//- _fileBrowserRoot和_fileBrowserSelectedItemPath存储文件浏览器根路径和选定项目路径的变量。
//- _pAccelerator和_pScintAccelerator加速键和Scintilla的加速键。
//- _findDlgTabTitiles查找对话框选项卡的标题。
//- _asNotepadStyle表示是否将界面样式设置为类似记事本的风格。
//- _winVersionWindows的版本。
//- _platForm平台的类型。
//- _pNativeLangSpeaker与本地化语言相关的对象。
//- _currentDefaultBgColor和_currentDefaultFgColor当前默认的背景颜色和前景颜色。
//- _initialCloudChoice初始的云端路径选择。
//- _wingupFullPath、_wingupParams、_wingupDir和_isElevationRequired与升级Wingup相关的变量。
//- _doNppLogNetworkDriveIssue和_doNppLogNulContentCorruptionIssue用于记录是否需要进行网络驱动器和NUL内容损坏问题的日志记录。
//- _isEndSessionStarted和_isEndSessionCritical用于记录会话是否已开始和是否是临界会话。
//- _isPlaceHolderEnabled和_theWarningHasBeenGiven用于记录是否启用了占位符功能和警告是否已给出。
//- getWingupFullPath、getWingupParams、getWingupDir和shouldDoUAC获取与升级Wingup相关的参数。
//- setWingupFullPath、setWingupParams、setWingupDir和setElevationRequired设置与升级Wingup相关的参数。
//- doNppLogNetworkDriveIssue、doNppLogNulContentCorruptionIssue、endSessionStart、isEndSessionStarted、makeEndSessionCritical和isEndSessionCritical获取或设置与日志记录和会话状态相关的参数。
//- setPlaceHolderEnable、isPlaceHolderEnabled、setTheWarningHasBeenGiven和theWarningHasBeenGiven获取或设置与占位符功能和警告状态相关的参数。
//
//总体来说NppParameters类是Notepad++的参数配置类包含了各种相关的配置参数和操作函数。这些参数和函数用于管理和操作Notepad++的各种配置信息,如语言设置、样式设置、快捷键、宏命令、插件命令等。
Loading…
Cancel
Save