diff --git a/src/PowerEditor/src/Parameters.h b/src/PowerEditor/src/Parameters.h
index 67a1e1c..f287925 100644
--- a/src/PowerEditor/src/Parameters.h
+++ b/src/PowerEditor/src/Parameters.h
@@ -13,6 +13,21 @@
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see .
+//此文件是 Notepad++ 项目的一部分
+//版权所有 (C)2021 Don HO
+
+//该程序是免费软件:您可以重新分发和 / 或修改它
+//它根据 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 FormatType简单地将int转换为格式类型
+** \param value An arbitrary int参数值任意int
+** \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 & 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();};
@@ -315,12 +334,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;