OSDN Git Service

Shell Extension for Windows 11 or later (5)
[winmerge-jp/winmerge-jp.git] / Src / MergeApp.h
1 #pragma once\r
2 \r
3 #include "UnicodeString.h"\r
4 \r
5 #define _(x) tr(x)\r
6 #define N_(x) (x)\r
7 #define NC_(c, x) (x)\r
8 \r
9 class COptionsMgr;\r
10 class FileFilterHelper;\r
11 \r
12 struct AboutInfo\r
13 {\r
14         AboutInfo();\r
15         String copyright;\r
16         String version;\r
17         String private_build;\r
18         String website;\r
19 };\r
20 \r
21 /** @brief Retrieve error description from Windows; uses FormatMessage */\r
22 String GetSysError(int nerr = -1);\r
23 \r
24 COptionsMgr * GetOptionsMgr();\r
25 void LogErrorString(const String& sz);\r
26 void LogErrorStringUTF8(const std::string& sz);\r
27 void AppErrorMessageBox(const String& msg);\r
28 \r
29 namespace AppMsgBox\r
30 {\r
31         enum\r
32         {\r
33                 YES = 1,\r
34                 OK = 2,\r
35                 NO = 4,\r
36                 CANCEL = 8,\r
37                 YES_TO_ALL = 16,\r
38                 DONT_DISPLAY_AGAIN = 32,\r
39         };\r
40         int error(const String& msg, int type = OK);\r
41         int warning(const String& msg, int type = OK);\r
42         int information(const String& msg, int type = OK);\r
43 };\r
44 \r
45 /** @brief Load string from string resources; shortcut for String::LoadString */\r
46 String LoadResString(unsigned id);\r
47 \r
48 String tr(const std::string &str);\r
49 String tr(const char *msgctxt, const std::string &str);