diff --git a/common/common.h b/common/common.h
index b625ac5e..9d0aed75 100644
--- a/common/common.h
+++ b/common/common.h
@@ -61,7 +61,8 @@ extern LPCWSTR fnuserbak; //ユーザー辞書バックアッププレフィッ
extern LPCWSTR fnskkdic; //取込SKK辞書
extern LPCWSTR fninitlua; //init.lua
-#define DISPLAY_COLOR_NUM 8
+#define DISPLAY_LIST_COLOR_NUM 8
+#define DISPLAY_MODE_COLOR_NUM 8
#define DISPLAYATTRIBUTE_INFO_NUM 7
extern const TF_DISPLAYATTRIBUTE c_daDisplayAttributeInputMark;
diff --git a/common/configxml.cpp b/common/configxml.cpp
index 99b566b5..a595a550 100644
--- a/common/configxml.cpp
+++ b/common/configxml.cpp
@@ -109,11 +109,20 @@ LPCWSTR ValueDispCandNo = L"dispcandno";
LPCWSTR ValueVerticalCand = L"verticalcand";
LPCWSTR ValueAnnotation = L"annotation";
LPCWSTR ValueAnnotatLst = L"annotatlst";
-LPCWSTR ValueShowModeInl = L"showmodeinl";
-LPCWSTR ValueShowModeSec = L"showmodesec";
LPCWSTR ValueShowModeMark = L"showmodemark";
LPCWSTR ValueShowRoman = L"showroman";
+LPCWSTR ValueShowModeInl = L"showmodeinl";
+LPCWSTR ValueShowModeSec = L"showmodesec";
+LPCWSTR ValueColorMC = L"colormc";
+LPCWSTR ValueColorMF = L"colormf";
+LPCWSTR ValueColorHR = L"colorhr";
+LPCWSTR ValueColorKT = L"colorkt";
+LPCWSTR ValueColorKA = L"colorka";
+LPCWSTR ValueColorJL = L"colorjl";
+LPCWSTR ValueColorAC = L"colorac";
+LPCWSTR ValueColorDR = L"colordr";
+
//displayattr section
LPCWSTR SectionDisplayAttr = L"displayattr";
diff --git a/common/configxml.h b/common/configxml.h
index 9e562a89..a9c51d5a 100644
--- a/common/configxml.h
+++ b/common/configxml.h
@@ -137,11 +137,20 @@ extern LPCWSTR ValueDispCandNo;
extern LPCWSTR ValueVerticalCand;
extern LPCWSTR ValueAnnotation;
extern LPCWSTR ValueAnnotatLst;
-extern LPCWSTR ValueShowModeInl;
-extern LPCWSTR ValueShowModeSec;
extern LPCWSTR ValueShowModeMark;
extern LPCWSTR ValueShowRoman;
+extern LPCWSTR ValueShowModeInl;
+extern LPCWSTR ValueShowModeSec;
+extern LPCWSTR ValueColorMC;
+extern LPCWSTR ValueColorMF;
+extern LPCWSTR ValueColorHR;
+extern LPCWSTR ValueColorKT;
+extern LPCWSTR ValueColorKA;
+extern LPCWSTR ValueColorJL;
+extern LPCWSTR ValueColorAC;
+extern LPCWSTR ValueColorDR;
+
//displayattr section
extern LPCWSTR SectionDisplayAttr;
diff --git a/imcrvcnf/DlgProcDisplay.cpp b/imcrvcnf/DlgProcDisplay1.cpp
similarity index 80%
rename from imcrvcnf/DlgProcDisplay.cpp
rename to imcrvcnf/DlgProcDisplay1.cpp
index 90553709..cf79b4fd 100644
--- a/imcrvcnf/DlgProcDisplay.cpp
+++ b/imcrvcnf/DlgProcDisplay1.cpp
@@ -9,26 +9,26 @@ static struct {
int id;
LPCWSTR value;
COLORREF color;
-} displayColor[DISPLAY_COLOR_NUM] =
+} displayListColor[DISPLAY_LIST_COLOR_NUM] =
{
- {IDC_COL_BG, ValueColorBG, RGB(0xFF,0xFF,0xFF)},
- {IDC_COL_FR, ValueColorFR, RGB(0x00,0x00,0x00)},
- {IDC_COL_SE, ValueColorSE, RGB(0x00,0x00,0xFF)},
- {IDC_COL_CO, ValueColorCO, RGB(0x80,0x80,0x80)},
- {IDC_COL_CA, ValueColorCA, RGB(0x00,0x00,0x00)},
- {IDC_COL_SC, ValueColorSC, RGB(0x80,0x80,0x80)},
- {IDC_COL_AN, ValueColorAN, RGB(0x80,0x80,0x80)},
- {IDC_COL_NO, ValueColorNO, RGB(0x00,0x00,0x00)}
+ {IDC_COL_BG, ValueColorBG, RGB(0xFF, 0xFF, 0xFF)},
+ {IDC_COL_FR, ValueColorFR, RGB(0x00, 0x00, 0x00)},
+ {IDC_COL_SE, ValueColorSE, RGB(0x00, 0x00, 0xFF)},
+ {IDC_COL_CO, ValueColorCO, RGB(0x80, 0x80, 0x80)},
+ {IDC_COL_CA, ValueColorCA, RGB(0x00, 0x00, 0x00)},
+ {IDC_COL_SC, ValueColorSC, RGB(0x80, 0x80, 0x80)},
+ {IDC_COL_AN, ValueColorAN, RGB(0x80, 0x80, 0x80)},
+ {IDC_COL_NO, ValueColorNO, RGB(0x00, 0x00, 0x00)}
};
-INT_PTR CALLBACK DlgProcDisplay(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+INT_PTR CALLBACK DlgProcDisplay1(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
HWND hwnd;
HDC hdc;
PAINTSTRUCT ps;
WCHAR num[16];
WCHAR fontname[LF_FACESIZE];
- INT fontpoint, fontweight, x, y, count;
+ INT fontpoint, fontweight, count;
BOOL fontitalic;
CHOOSEFONTW cf;
LOGFONTW lf;
@@ -93,12 +93,12 @@ INT_PTR CALLBACK DlgProcDisplay(HWND hDlg, UINT message, WPARAM wParam, LPARAM l
customColor[i] = RGB(0xFF, 0xFF, 0xFF);
}
- for(int i = 0; i < _countof(displayColor); i++)
+ for(int i = 0; i < _countof(displayListColor); i++)
{
- ReadValue(pathconfigxml, SectionDisplay, displayColor[i].value, strxmlval);
+ ReadValue(pathconfigxml, SectionDisplay, displayListColor[i].value, strxmlval);
if(!strxmlval.empty())
{
- displayColor[i].color = wcstoul(strxmlval.c_str(), nullptr, 0);
+ displayListColor[i].color = wcstoul(strxmlval.c_str(), nullptr, 0);
}
}
@@ -248,12 +248,12 @@ INT_PTR CALLBACK DlgProcDisplay(HWND hDlg, UINT message, WPARAM wParam, LPARAM l
break;
case WM_LBUTTONDOWN:
- for(int i = 0; i < _countof(displayColor); i++)
+ for(int i = 0; i < _countof(displayListColor); i++)
{
- hwnd = GetDlgItem(hDlg, displayColor[i].id);
+ hwnd = GetDlgItem(hDlg, displayListColor[i].id);
GetWindowRect(hwnd, &rect);
- pt.x = x = GET_X_LPARAM(lParam);
- pt.y = y = GET_Y_LPARAM(lParam);
+ pt.x = GET_X_LPARAM(lParam);
+ pt.y = GET_Y_LPARAM(lParam);
ClientToScreen(hDlg, &pt);
if(rect.left <= pt.x && pt.x <= rect.right &&
@@ -262,16 +262,16 @@ INT_PTR CALLBACK DlgProcDisplay(HWND hDlg, UINT message, WPARAM wParam, LPARAM l
cc.lStructSize = sizeof(cc);
cc.hwndOwner = hDlg;
cc.hInstance = nullptr;
- cc.rgbResult = displayColor[i].color;
+ cc.rgbResult = displayListColor[i].color;
cc.lpCustColors = customColor;
- cc.Flags = CC_FULLOPEN | CC_RGBINIT;
+ cc.Flags = CC_FULLOPEN | CC_RGBINIT | CC_ENABLEHOOK;
cc.lCustData = 0;
cc.lpfnHook = nullptr;
cc.lpTemplateName = nullptr;
if(ChooseColorW(&cc))
{
- DrawSelectColor(hDlg, displayColor[i].id, cc.rgbResult);
- displayColor[i].color = cc.rgbResult;
+ DrawSelectColor(hDlg, displayListColor[i].id, cc.rgbResult);
+ displayListColor[i].color = cc.rgbResult;
PropSheet_Changed(GetParent(hDlg), hDlg);
return TRUE;
}
@@ -282,9 +282,9 @@ INT_PTR CALLBACK DlgProcDisplay(HWND hDlg, UINT message, WPARAM wParam, LPARAM l
case WM_PAINT:
hdc = BeginPaint(hDlg, &ps);
- for(int i = 0; i < _countof(displayColor); i++)
+ for(int i = 0; i < _countof(displayListColor); i++)
{
- DrawSelectColor(hDlg, displayColor[i].id, displayColor[i].color);
+ DrawSelectColor(hDlg, displayListColor[i].id, displayListColor[i].color);
}
EndPaint(hDlg, &ps);
@@ -322,10 +322,10 @@ INT_PTR CALLBACK DlgProcDisplay(HWND hDlg, UINT message, WPARAM wParam, LPARAM l
SetDlgItemTextW(hDlg, IDC_EDIT_MAXWIDTH, num);
WriterKey(pXmlWriter, ValueMaxWidth, num);
- for(int i = 0; i < _countof(displayColor); i++)
+ for(int i = 0; i < _countof(displayListColor); i++)
{
- _snwprintf_s(num, _TRUNCATE, L"0x%06X", displayColor[i].color);
- WriterKey(pXmlWriter, displayColor[i].value, num);
+ _snwprintf_s(num, _TRUNCATE, L"0x%06X", displayListColor[i].color);
+ WriterKey(pXmlWriter, displayListColor[i].value, num);
}
SaveCheckButton(hDlg, IDC_RADIO_API_D2D, ValueDrawAPI);
@@ -346,21 +346,11 @@ INT_PTR CALLBACK DlgProcDisplay(HWND hDlg, UINT message, WPARAM wParam, LPARAM l
SaveCheckButton(hDlg, IDC_CHECKBOX_ANNOTATION, ValueAnnotation);
SaveCheckButton(hDlg, IDC_RADIO_ANNOTATLST, ValueAnnotatLst);
- SaveCheckButton(hDlg, IDC_CHECKBOX_SHOWMODEINL, ValueShowModeInl);
- GetDlgItemTextW(hDlg, IDC_EDIT_SHOWMODESEC, num, _countof(num));
- count = _wtoi(num);
- if(count <= 0 || count > 60)
- {
- count = 3;
- }
- _snwprintf_s(num, _TRUNCATE, L"%d", count);
- SetDlgItemTextW(hDlg, IDC_EDIT_SHOWMODESEC, num);
- WriterKey(pXmlWriter, ValueShowModeSec, num);
-
SaveCheckButton(hDlg, IDC_CHECKBOX_SHOWMODEMARK, ValueShowModeMark);
SaveCheckButton(hDlg, IDC_CHECKBOX_SHOWROMAN, ValueShowRoman);
- WriterEndSection(pXmlWriter); //End of SectionDisplay
+ //at DlgProcDisplay2
+ //WriterEndSection(pXmlWriter); //End of SectionDisplay
return TRUE;
diff --git a/imcrvcnf/DlgProcDisplay2.cpp b/imcrvcnf/DlgProcDisplay2.cpp
new file mode 100644
index 00000000..8e9bae47
--- /dev/null
+++ b/imcrvcnf/DlgProcDisplay2.cpp
@@ -0,0 +1,169 @@
+
+#include "configxml.h"
+#include "imcrvcnf.h"
+#include "resource.h"
+
+static struct {
+ int id;
+ LPCWSTR value;
+ COLORREF color;
+} displayModeColor[DISPLAY_MODE_COLOR_NUM] =
+{
+ {IDC_COL_MODE_MC, ValueColorMC, RGB(0xFF, 0xFF, 0xFF)},
+ {IDC_COL_MODE_MF, ValueColorMF, RGB(0x00, 0x00, 0x00)},
+ {IDC_COL_MODE_HR, ValueColorHR, RGB(0xC0, 0x00, 0x00)},
+ {IDC_COL_MODE_KT, ValueColorKT, RGB(0x00, 0xC0, 0x00)},
+ {IDC_COL_MODE_KA, ValueColorKA, RGB(0x00, 0xC0, 0x80)},
+ {IDC_COL_MODE_JL, ValueColorJL, RGB(0x00, 0x00, 0xC0)},
+ {IDC_COL_MODE_AC, ValueColorAC, RGB(0x00, 0x80, 0xC0)},
+ {IDC_COL_MODE_DR, ValueColorDR, RGB(0x80, 0x80, 0x80)}
+};
+
+INT_PTR CALLBACK DlgProcDisplay2(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ HWND hwnd;
+ HDC hdc;
+ PAINTSTRUCT ps;
+ WCHAR num[16];
+ INT count;
+ RECT rect;
+ POINT pt;
+ std::wstring strxmlval;
+ CHOOSECOLORW cc;
+ static COLORREF customColor[16];
+
+ switch(message)
+ {
+ case WM_INITDIALOG:
+ LoadCheckButton(hDlg, IDC_CHECKBOX_SHOWMODEINL, SectionDisplay, ValueShowModeInl, L"1");
+ ReadValue(pathconfigxml, SectionDisplay, ValueShowModeSec, strxmlval);
+ count = strxmlval.empty() ? -1 : _wtoi(strxmlval.c_str());
+ if(count > 60 || count <= 0)
+ {
+ count = 3;
+ }
+ _snwprintf_s(num, _TRUNCATE, L"%d", count);
+ SetDlgItemTextW(hDlg, IDC_EDIT_SHOWMODESEC, num);
+
+ for(int i = 0; i < _countof(customColor); i++)
+ {
+ customColor[i] = RGB(0xFF, 0xFF, 0xFF);
+ }
+
+ for(int i = 0; i < _countof(displayModeColor); i++)
+ {
+ ReadValue(pathconfigxml, SectionDisplay, displayModeColor[i].value, strxmlval);
+ if(!strxmlval.empty())
+ {
+ displayModeColor[i].color = wcstoul(strxmlval.c_str(), nullptr, 0);
+ }
+ }
+
+ return TRUE;
+
+ case WM_DPICHANGED_AFTERPARENT:
+
+ return TRUE;
+
+ case WM_COMMAND:
+ switch(LOWORD(wParam))
+ {
+ case IDC_EDIT_SHOWMODESEC:
+ switch(HIWORD(wParam))
+ {
+ case EN_CHANGE:
+ PropSheet_Changed(GetParent(hDlg), hDlg);
+ return TRUE;
+ default:
+ break;
+ }
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ case WM_LBUTTONDOWN:
+ for(int i = 0; i < _countof(displayModeColor); i++)
+ {
+ hwnd = GetDlgItem(hDlg, displayModeColor[i].id);
+ GetWindowRect(hwnd, &rect);
+ pt.x = GET_X_LPARAM(lParam);
+ pt.y = GET_Y_LPARAM(lParam);
+ ClientToScreen(hDlg, &pt);
+
+ if(rect.left <= pt.x && pt.x <= rect.right &&
+ rect.top <= pt.y && pt.y <= rect.bottom)
+ {
+ cc.lStructSize = sizeof(cc);
+ cc.hwndOwner = hDlg;
+ cc.hInstance = nullptr;
+ cc.rgbResult = displayModeColor[i].color;
+ cc.lpCustColors = customColor;
+ cc.Flags = CC_FULLOPEN | CC_RGBINIT;
+ cc.lCustData = 0;
+ cc.lpfnHook = nullptr;
+ cc.lpTemplateName = nullptr;
+ if(ChooseColorW(&cc))
+ {
+ DrawSelectColor(hDlg, displayModeColor[i].id, cc.rgbResult);
+ displayModeColor[i].color = cc.rgbResult;
+ PropSheet_Changed(GetParent(hDlg), hDlg);
+ return TRUE;
+ }
+ break;
+ }
+ }
+ break;
+
+ case WM_PAINT:
+ hdc = BeginPaint(hDlg, &ps);
+ for(int i = 0; i < _countof(displayModeColor); i++)
+ {
+ DrawSelectColor(hDlg, displayModeColor[i].id, displayModeColor[i].color);
+ }
+ EndPaint(hDlg, &ps);
+
+ return TRUE;
+
+ case WM_NOTIFY:
+ switch(((LPNMHDR)lParam)->code)
+ {
+ case PSN_APPLY:
+ SaveCheckButton(hDlg, IDC_CHECKBOX_SHOWMODEINL, ValueShowModeInl);
+ GetDlgItemTextW(hDlg, IDC_EDIT_SHOWMODESEC, num, _countof(num));
+ count = _wtoi(num);
+ if(count <= 0 || count > 60)
+ {
+ count = 3;
+ }
+ _snwprintf_s(num, _TRUNCATE, L"%d", count);
+ SetDlgItemTextW(hDlg, IDC_EDIT_SHOWMODESEC, num);
+ WriterKey(pXmlWriter, ValueShowModeSec, num);
+
+ for(int i = 0; i < _countof(displayModeColor); i++)
+ {
+ _snwprintf_s(num, _TRUNCATE, L"0x%06X", displayModeColor[i].color);
+ WriterKey(pXmlWriter, displayModeColor[i].value, num);
+ }
+
+ WriterEndSection(pXmlWriter); //End of SectionDisplay
+
+ return TRUE;
+
+ default:
+ break;
+ }
+ break;
+
+ case WM_DESTROY:
+ PostQuitMessage(0);
+ return TRUE;
+
+ default:
+ break;
+ }
+
+ return FALSE;
+}
diff --git a/imcrvcnf/imcrvcnf.cpp b/imcrvcnf/imcrvcnf.cpp
index e78424fe..48327d99 100644
--- a/imcrvcnf/imcrvcnf.cpp
+++ b/imcrvcnf/imcrvcnf.cpp
@@ -44,7 +44,8 @@ void CreateProperty()
{IDD_DIALOG_DICTIONARY, DlgProcDictionary},
{IDD_DIALOG_BEHAVIOR1, DlgProcBehavior1},
{IDD_DIALOG_BEHAVIOR2, DlgProcBehavior2},
- {IDD_DIALOG_DISPLAY, DlgProcDisplay},
+ {IDD_DIALOG_DISPLAY1, DlgProcDisplay1},
+ {IDD_DIALOG_DISPLAY2, DlgProcDisplay2},
{IDD_DIALOG_DISPLAYATTR1, DlgProcDisplayAttrInput},
{IDD_DIALOG_DISPLAYATTR2, DlgProcDisplayAttrConv},
{IDD_DIALOG_SELKEY, DlgProcSelKey},
diff --git a/imcrvcnf/imcrvcnf.h b/imcrvcnf/imcrvcnf.h
index 5a80b1be..e0ed3e52 100644
--- a/imcrvcnf/imcrvcnf.h
+++ b/imcrvcnf/imcrvcnf.h
@@ -42,7 +42,8 @@ void SaveKanaTxt(HWND hwnd, LPCWSTR path);
INT_PTR CALLBACK DlgProcDictionary(HWND, UINT, WPARAM, LPARAM);
INT_PTR CALLBACK DlgProcBehavior1(HWND, UINT, WPARAM, LPARAM);
INT_PTR CALLBACK DlgProcBehavior2(HWND, UINT, WPARAM, LPARAM);
-INT_PTR CALLBACK DlgProcDisplay(HWND, UINT, WPARAM, LPARAM);
+INT_PTR CALLBACK DlgProcDisplay1(HWND, UINT, WPARAM, LPARAM);
+INT_PTR CALLBACK DlgProcDisplay2(HWND, UINT, WPARAM, LPARAM);
INT_PTR CALLBACK DlgProcDisplayAttrInput(HWND, UINT, WPARAM, LPARAM);
INT_PTR CALLBACK DlgProcDisplayAttrConv(HWND, UINT, WPARAM, LPARAM);
INT_PTR CALLBACK DlgProcSelKey(HWND, UINT, WPARAM, LPARAM);
diff --git a/imcrvcnf/imcrvcnf.rc b/imcrvcnf/imcrvcnf.rc
index cd1e2557..b3fda80f 100644
--- a/imcrvcnf/imcrvcnf.rc
+++ b/imcrvcnf/imcrvcnf.rc
@@ -119,9 +119,9 @@ FONT 10, "MS Gothic"
AUTOCHECKBOX "前方一致と後方一致で補完する", IDC_CHECKBOX_COMPINCBACK, 24, 95, 220, 8
}
-IDD_DIALOG_DISPLAY DIALOG 0, 0, 268, 244
+IDD_DIALOG_DISPLAY1 DIALOG 0, 0, 268, 244
STYLE DS_CONTROL | DS_CENTER | DS_SETFONT | WS_VISIBLE | WS_CHILD
-CAPTION "表示"
+CAPTION "表示1"
FONT 10, "MS Gothic"
{
GROUPBOX "表示", IDC_STATIC, 4, 4, 258, 236
@@ -159,11 +159,36 @@ FONT 10, "MS Gothic"
AUTOCHECKBOX "注釈を表示する", IDC_CHECKBOX_ANNOTATION, 24, 140, 100, 8, WS_GROUP
AUTORADIOBUTTON "全て", IDC_RADIO_ANNOTATALL, 128, 140, 32, 8, WS_TABSTOP | WS_GROUP
AUTORADIOBUTTON "候補一覧", IDC_RADIO_ANNOTATLST, 168, 140, 48, 8, WS_TABSTOP
- AUTOCHECKBOX "入力モードを表示する", IDC_CHECKBOX_SHOWMODEINL, 24, 155, 100, 8, WS_GROUP
- EDITTEXT IDC_EDIT_SHOWMODESEC, 220, 153, 16, 12, ES_AUTOHSCROLL
- LTEXT "秒", IDC_STATIC, 240, 155, 10, 8, SS_LEFT
- AUTOCHECKBOX "▽▼*マークを表示する", IDC_CHECKBOX_SHOWMODEMARK, 24, 170, 220, 8, WS_GROUP
- AUTOCHECKBOX "ローマ字を表示する", IDC_CHECKBOX_SHOWROMAN, 24, 185, 220, 8, WS_GROUP
+ AUTOCHECKBOX "▽▼*マークを表示する", IDC_CHECKBOX_SHOWMODEMARK, 24, 155, 220, 8, WS_GROUP
+ AUTOCHECKBOX "ローマ字を表示する", IDC_CHECKBOX_SHOWROMAN, 24, 170, 220, 8, WS_GROUP
+}
+
+IDD_DIALOG_DISPLAY2 DIALOG 0, 0, 268, 244
+STYLE DS_CONTROL | DS_CENTER | DS_SETFONT | WS_VISIBLE | WS_CHILD
+CAPTION "表示2"
+FONT 10, "MS Gothic"
+{
+ GROUPBOX "表示", IDC_STATIC, 4, 4, 258, 236
+ AUTOCHECKBOX "入力モードを表示する", IDC_CHECKBOX_SHOWMODEINL, 24, 20, 100, 8, WS_GROUP
+ EDITTEXT IDC_EDIT_SHOWMODESEC, 220, 18, 16, 12, ES_AUTOHSCROLL
+ LTEXT "秒", IDC_STATIC, 240, 20, 10, 8, SS_LEFT
+ LTEXT "入力モードの色", IDC_STATIC, 24, 35, 60, 8, SS_LEFT
+ LTEXT "文字", IDC_STATIC, 90, 35, 18, 8, SS_LEFT
+ CONTROL "", IDC_COL_MODE_MC, WC_STATIC, SS_BLACKFRAME, 110, 33, 12, 12
+ LTEXT "枠", IDC_STATIC, 130, 35, 18, 8, SS_LEFT
+ CONTROL "", IDC_COL_MODE_MF, WC_STATIC, SS_BLACKFRAME, 150, 33, 12, 12
+ LTEXT "かな", IDC_STATIC, 175, 35, 18, 8, SS_LEFT
+ CONTROL "", IDC_COL_MODE_HR, WC_STATIC, SS_BLACKFRAME, 195, 33, 12, 12
+ LTEXT "カナ", IDC_STATIC, 215, 35, 18, 8, SS_LEFT
+ CONTROL "", IDC_COL_MODE_KT, WC_STATIC, SS_BLACKFRAME, 235, 33, 12, 12
+ LTEXT "-カナ", IDC_STATIC, 90, 50, 18, 8, SS_LEFT
+ CONTROL "", IDC_COL_MODE_KA, WC_STATIC, SS_BLACKFRAME, 110, 48, 12, 12
+ LTEXT "全英", IDC_STATIC, 130, 50, 18, 8, SS_LEFT
+ CONTROL "", IDC_COL_MODE_JL, WC_STATIC, SS_BLACKFRAME, 150, 48, 12, 12
+ LTEXT "ASCII", IDC_STATIC, 175, 50, 18, 8, SS_LEFT
+ CONTROL "", IDC_COL_MODE_AC, WC_STATIC, SS_BLACKFRAME, 195, 48, 12, 12
+ LTEXT "直接", IDC_STATIC, 215, 50, 18, 8, SS_LEFT
+ CONTROL "", IDC_COL_MODE_DR, WC_STATIC, SS_BLACKFRAME, 235, 48, 12, 12
}
IDD_DIALOG_DISPLAYATTR1 DIALOG 0, 0, 268, 244
diff --git a/imcrvcnf/imcrvcnf.vcxproj b/imcrvcnf/imcrvcnf.vcxproj
index f5d7ca4a..a8a2f297 100644
--- a/imcrvcnf/imcrvcnf.vcxproj
+++ b/imcrvcnf/imcrvcnf.vcxproj
@@ -213,8 +213,9 @@
-
+
+
diff --git a/imcrvcnf/imcrvcnf.vcxproj.filters b/imcrvcnf/imcrvcnf.vcxproj.filters
index 60abf8f0..22451077 100644
--- a/imcrvcnf/imcrvcnf.vcxproj.filters
+++ b/imcrvcnf/imcrvcnf.vcxproj.filters
@@ -53,9 +53,6 @@
Source Files
-
- Source Files
-
Source Files
@@ -80,6 +77,12 @@
Source Files
+
+ Source Files
+
+
+ Source Files
+
diff --git a/imcrvcnf/resource.h b/imcrvcnf/resource.h
index 7a78f5d0..42fb8955 100644
--- a/imcrvcnf/resource.h
+++ b/imcrvcnf/resource.h
@@ -10,9 +10,10 @@
#define IDD_DIALOG_SKK_DIC_ADD_URL 111
#define IDD_DIALOG_BEHAVIOR1 112
#define IDD_DIALOG_BEHAVIOR2 113
-#define IDD_DIALOG_DISPLAY 120
-#define IDD_DIALOG_DISPLAYATTR1 121
-#define IDD_DIALOG_DISPLAYATTR2 122
+#define IDD_DIALOG_DISPLAY1 120
+#define IDD_DIALOG_DISPLAY2 121
+#define IDD_DIALOG_DISPLAYATTR1 122
+#define IDD_DIALOG_DISPLAYATTR2 123
#define IDD_DIALOG_SELKEY 131
#define IDD_DIALOG_PRSRVKEY 132
#define IDD_DIALOG_KEYMAP1 133
@@ -80,63 +81,72 @@
#define IDC_CHECKBOX_ANNOTATION 2034
#define IDC_RADIO_ANNOTATALL 2035
#define IDC_RADIO_ANNOTATLST 2036
-#define IDC_CHECKBOX_SHOWMODEINL 2037
-#define IDC_EDIT_SHOWMODESEC 2038
-#define IDC_CHECKBOX_SHOWMODEMARK 2039
-#define IDC_CHECKBOX_SHOWROMAN 2040
-
-#define IDC_CHECKBOX_SERIES_MARK 2101
-#define IDC_CHECKBOX_SERIES_TEXT 2102
-#define IDC_CHECKBOX_SERIES_OKURI 2103
-#define IDC_CHECKBOX_SERIES_ANNOT 2104
-#define IDC_RADIO_FG_STD_MARK 2106
-#define IDC_RADIO_FG_STD_TEXT 2107
-#define IDC_RADIO_FG_STD_OKURI 2108
-#define IDC_RADIO_FG_STD_ANNOT 2109
-#define IDC_RADIO_FG_SEL_MARK 2111
-#define IDC_RADIO_FG_SEL_TEXT 2112
-#define IDC_RADIO_FG_SEL_OKURI 2113
-#define IDC_RADIO_FG_SEL_ANNOT 2114
-#define IDC_COL_FG_MARK 2116
-#define IDC_COL_FG_TEXT 2117
-#define IDC_COL_FG_OKURI 2118
-#define IDC_COL_FG_ANNOT 2119
-#define IDC_RADIO_BG_STD_MARK 2121
-#define IDC_RADIO_BG_STD_TEXT 2122
-#define IDC_RADIO_BG_STD_OKURI 2123
-#define IDC_RADIO_BG_STD_ANNOT 2124
-#define IDC_RADIO_BG_SEL_MARK 2126
-#define IDC_RADIO_BG_SEL_TEXT 2127
-#define IDC_RADIO_BG_SEL_OKURI 2128
-#define IDC_RADIO_BG_SEL_ANNOT 2129
-#define IDC_COL_BG_MARK 2131
-#define IDC_COL_BG_TEXT 2132
-#define IDC_COL_BG_OKURI 2133
-#define IDC_COL_BG_ANNOT 2134
-#define IDC_COMBO_UL_ATTR_MARK 2136
-#define IDC_COMBO_UL_ATTR_TEXT 2137
-#define IDC_COMBO_UL_ATTR_OKURI 2138
-#define IDC_COMBO_UL_ATTR_ANNOT 2139
-#define IDC_CHECKBOX_UL_BOLD_MARK 2141
-#define IDC_CHECKBOX_UL_BOLD_TEXT 2142
-#define IDC_CHECKBOX_UL_BOLD_OKURI 2143
-#define IDC_CHECKBOX_UL_BOLD_ANNOT 2144
-#define IDC_RADIO_UL_STD_MARK 2146
-#define IDC_RADIO_UL_STD_TEXT 2147
-#define IDC_RADIO_UL_STD_OKURI 2148
-#define IDC_RADIO_UL_STD_ANNOT 2149
-#define IDC_RADIO_UL_SEL_MARK 2151
-#define IDC_RADIO_UL_SEL_TEXT 2152
-#define IDC_RADIO_UL_SEL_OKURI 2153
-#define IDC_RADIO_UL_SEL_ANNOT 2154
-#define IDC_COL_UL_MARK 2156
-#define IDC_COL_UL_TEXT 2157
-#define IDC_COL_UL_OKURI 2158
-#define IDC_COL_UL_ANNOT 2159
-#define IDC_COMBO_ATTR_MARK 2161
-#define IDC_COMBO_ATTR_TEXT 2162
-#define IDC_COMBO_ATTR_OKURI 2163
-#define IDC_COMBO_ATTR_ANNOT 2164
+#define IDC_CHECKBOX_SHOWMODEMARK 2037
+#define IDC_CHECKBOX_SHOWROMAN 2038
+
+#define IDC_CHECKBOX_SHOWMODEINL 2101
+#define IDC_EDIT_SHOWMODESEC 2102
+#define IDC_COL_MODE_MC 2103
+#define IDC_COL_MODE_MF 2104
+#define IDC_COL_MODE_HR 2105
+#define IDC_COL_MODE_KT 2106
+#define IDC_COL_MODE_KA 2107
+#define IDC_COL_MODE_JL 2108
+#define IDC_COL_MODE_AC 2109
+#define IDC_COL_MODE_DR 2110
+
+#define IDC_CHECKBOX_SERIES_MARK 2201
+#define IDC_CHECKBOX_SERIES_TEXT 2202
+#define IDC_CHECKBOX_SERIES_OKURI 2203
+#define IDC_CHECKBOX_SERIES_ANNOT 2204
+#define IDC_RADIO_FG_STD_MARK 2206
+#define IDC_RADIO_FG_STD_TEXT 2207
+#define IDC_RADIO_FG_STD_OKURI 2208
+#define IDC_RADIO_FG_STD_ANNOT 2209
+#define IDC_RADIO_FG_SEL_MARK 2211
+#define IDC_RADIO_FG_SEL_TEXT 2212
+#define IDC_RADIO_FG_SEL_OKURI 2213
+#define IDC_RADIO_FG_SEL_ANNOT 2214
+#define IDC_COL_FG_MARK 2216
+#define IDC_COL_FG_TEXT 2217
+#define IDC_COL_FG_OKURI 2218
+#define IDC_COL_FG_ANNOT 2219
+#define IDC_RADIO_BG_STD_MARK 2221
+#define IDC_RADIO_BG_STD_TEXT 2222
+#define IDC_RADIO_BG_STD_OKURI 2223
+#define IDC_RADIO_BG_STD_ANNOT 2224
+#define IDC_RADIO_BG_SEL_MARK 2226
+#define IDC_RADIO_BG_SEL_TEXT 2227
+#define IDC_RADIO_BG_SEL_OKURI 2228
+#define IDC_RADIO_BG_SEL_ANNOT 2229
+#define IDC_COL_BG_MARK 2231
+#define IDC_COL_BG_TEXT 2232
+#define IDC_COL_BG_OKURI 2233
+#define IDC_COL_BG_ANNOT 2234
+#define IDC_COMBO_UL_ATTR_MARK 2236
+#define IDC_COMBO_UL_ATTR_TEXT 2237
+#define IDC_COMBO_UL_ATTR_OKURI 2238
+#define IDC_COMBO_UL_ATTR_ANNOT 2239
+#define IDC_CHECKBOX_UL_BOLD_MARK 2241
+#define IDC_CHECKBOX_UL_BOLD_TEXT 2242
+#define IDC_CHECKBOX_UL_BOLD_OKURI 2243
+#define IDC_CHECKBOX_UL_BOLD_ANNOT 2244
+#define IDC_RADIO_UL_STD_MARK 2246
+#define IDC_RADIO_UL_STD_TEXT 2247
+#define IDC_RADIO_UL_STD_OKURI 2248
+#define IDC_RADIO_UL_STD_ANNOT 2249
+#define IDC_RADIO_UL_SEL_MARK 2251
+#define IDC_RADIO_UL_SEL_TEXT 2252
+#define IDC_RADIO_UL_SEL_OKURI 2253
+#define IDC_RADIO_UL_SEL_ANNOT 2254
+#define IDC_COL_UL_MARK 2256
+#define IDC_COL_UL_TEXT 2257
+#define IDC_COL_UL_OKURI 2258
+#define IDC_COL_UL_ANNOT 2259
+#define IDC_COMBO_ATTR_MARK 2261
+#define IDC_COMBO_ATTR_TEXT 2262
+#define IDC_COMBO_ATTR_OKURI 2263
+#define IDC_COMBO_ATTR_ANNOT 2264
#define IDC_LIST_SELKEY 3101
#define IDC_EDIT_SELKEY_DISP 3102
diff --git a/imcrvtip/CandidatePaint.cpp b/imcrvtip/CandidatePaint.cpp
index 3c7acd09..50515e12 100644
--- a/imcrvtip/CandidatePaint.cpp
+++ b/imcrvtip/CandidatePaint.cpp
@@ -7,7 +7,7 @@
#define MARGIN_X 2
#define MARGIN_Y 4
-const int colors_compback[DISPLAY_COLOR_NUM] =
+const int colors_compback[DISPLAY_LIST_COLOR_NUM] =
{
CL_COLOR_BG, CL_COLOR_FR, CL_COLOR_CA, CL_COLOR_CO,
CL_COLOR_SE, CL_COLOR_SC, CL_COLOR_AN, CL_COLOR_NO
@@ -44,7 +44,7 @@ void CCandidateWindow::_WindowProcPaint(HWND hWnd, UINT uMsg, WPARAM wParam, LPA
_pD2DDCRT->BindDC(hdc, &r);
_pD2DDCRT->BeginDraw();
_pD2DDCRT->SetTransform(D2D1::Matrix3x2F::Identity());
- _pD2DDCRT->Clear(D2D1::ColorF(SWAPRGB(_pTextService->cx_colors[CL_COLOR_BG])));
+ _pD2DDCRT->Clear(D2D1::ColorF(SWAPRGB(_pTextService->cx_list_colors[CL_COLOR_BG])));
rd2d = D2D1::RectF(0.5F, 0.5F, ((FLOAT)cx) - 0.5F, ((FLOAT)cy) - 0.5F);
_pD2DDCRT->DrawRectangle(rd2d, _pD2DBrush[CL_COLOR_FR]);
@@ -59,9 +59,9 @@ void CCandidateWindow::_WindowProcPaint(HWND hWnd, UINT uMsg, WPARAM wParam, LPA
hmembmp = CreateCompatibleBitmap(hdc, cx, cy);
bmp = SelectObject(hmemdc, hmembmp);
- npen = CreatePen(PS_SOLID, 1, _pTextService->cx_colors[CL_COLOR_FR]);
+ npen = CreatePen(PS_SOLID, 1, _pTextService->cx_list_colors[CL_COLOR_FR]);
pen = SelectObject(hmemdc, npen);
- nbrush = CreateSolidBrush(_pTextService->cx_colors[CL_COLOR_BG]);
+ nbrush = CreateSolidBrush(_pTextService->cx_list_colors[CL_COLOR_BG]);
brush = SelectObject(hmemdc, nbrush);
Rectangle(hmemdc, 0, 0, cx, cy);
@@ -103,7 +103,7 @@ void CCandidateWindow::_WindowProcPaint(HWND hWnd, UINT uMsg, WPARAM wParam, LPA
for(i = 0; i < _CandCount[page]; i++)
{
s.clear();
- for(int cycle = 0; cycle < DISPLAY_COLOR_NUM; cycle++)
+ for(int cycle = 0; cycle < DISPLAY_LIST_COLOR_NUM; cycle++)
{
s += _MakeCandidateString(page, count, i, cycle);
}
@@ -209,7 +209,7 @@ void CCandidateWindow::_WindowProcPaint(HWND hWnd, UINT uMsg, WPARAM wParam, LPA
}
else
{
- SetTextColor(hmemdc, _pTextService->cx_colors[CL_COLOR_NO]);
+ SetTextColor(hmemdc, _pTextService->cx_list_colors[CL_COLOR_NO]);
SetBkMode(hdc, TRANSPARENT);
DrawTextW(hmemdc, strPage, -1, &rc,
@@ -310,7 +310,7 @@ void CCandidateWindow::_PaintWord(HDC hdc, LPRECT lpr)
}
else
{
- SetTextColor(hdc, _pTextService->cx_colors[CL_COLOR_CA]);
+ SetTextColor(hdc, _pTextService->cx_list_colors[CL_COLOR_CA]);
SetBkMode(hdc, TRANSPARENT);
DrawTextW(hdc, s.c_str(), -1, lpr,
@@ -445,7 +445,7 @@ void CCandidateWindow::_PaintCandidate(HDC hdc, LPRECT lpr, UINT page, UINT coun
std::wstring ca = candidates[count + _uShowedCount + idx].first.first;
- for(int cycle = 0; cycle < DISPLAY_COLOR_NUM; cycle++)
+ for(int cycle = 0; cycle < DISPLAY_LIST_COLOR_NUM; cycle++)
{
s = _MakeCandidateString(page, count, idx, cycle);
@@ -500,13 +500,13 @@ void CCandidateWindow::_PaintCandidate(HDC hdc, LPRECT lpr, UINT page, UINT coun
(count + _uShowedCount + idx == candidx) &&
(color_cycle == CL_COLOR_SE || color_cycle == CL_COLOR_CA))
{
- SetTextColor(hdc, _pTextService->cx_colors[CL_COLOR_BG]);
- SetBkColor(hdc, _pTextService->cx_colors[CL_COLOR_SE]);
+ SetTextColor(hdc, _pTextService->cx_list_colors[CL_COLOR_BG]);
+ SetBkColor(hdc, _pTextService->cx_list_colors[CL_COLOR_SE]);
SetBkMode(hdc, OPAQUE);
}
else
{
- SetTextColor(hdc, _pTextService->cx_colors[color_cycle]);
+ SetTextColor(hdc, _pTextService->cx_list_colors[color_cycle]);
SetBkMode(hdc, TRANSPARENT);
}
@@ -603,7 +603,7 @@ void CCandidateWindow::_CalcWindowRect()
for(i = 0; i < _CandCount[page]; i++)
{
s.clear();
- for(int cycle = 0; cycle < DISPLAY_COLOR_NUM; cycle++)
+ for(int cycle = 0; cycle < DISPLAY_LIST_COLOR_NUM; cycle++)
{
s += _MakeCandidateString(page, count, i, cycle);
}
@@ -661,7 +661,7 @@ void CCandidateWindow::_CalcWindowRect()
for(i = 0; i < _CandCount[page]; i++)
{
s.clear();
- for(int cycle = 0; cycle < DISPLAY_COLOR_NUM; cycle++)
+ for(int cycle = 0; cycle < DISPLAY_LIST_COLOR_NUM; cycle++)
{
s += _MakeCandidateString(page, count, i, cycle);
}
@@ -842,7 +842,7 @@ void CCandidateWindow::_WindowProcDpiChanged(HWND hWnd, UINT uMsg, WPARAM wParam
{
SafeRelease(&_pDWTF);
SafeRelease(&_pDWFactory);
- for(int i = 0; i < DISPLAY_COLOR_NUM; i++)
+ for(int i = 0; i < DISPLAY_LIST_COLOR_NUM; i++)
{
SafeRelease(&_pD2DBrush[i]);
}
@@ -862,7 +862,7 @@ void CCandidateWindow::_WindowProcDpiChanged(HWND hWnd, UINT uMsg, WPARAM wParam
_pD2DFactory->AddRef();
_pD2DDCRT = _pTextService->_pD2DDCRT;
_pD2DDCRT->AddRef();
- for(int i = 0; i < DISPLAY_COLOR_NUM; i++)
+ for(int i = 0; i < DISPLAY_LIST_COLOR_NUM; i++)
{
_pD2DBrush[i] = _pTextService->_pD2DBrush[i];
_pD2DBrush[i]->AddRef();
diff --git a/imcrvtip/CandidateUIElement.cpp b/imcrvtip/CandidateUIElement.cpp
index cc49fd67..f6f60915 100644
--- a/imcrvtip/CandidateUIElement.cpp
+++ b/imcrvtip/CandidateUIElement.cpp
@@ -43,7 +43,7 @@ CCandidateWindow::CCandidateWindow(CTextService *pTextService, CCandidateList *p
_pD2DFactory = nullptr;
_pD2DDCRT = nullptr;
- for(int i = 0; i < DISPLAY_COLOR_NUM; i++)
+ for(int i = 0; i < DISPLAY_LIST_COLOR_NUM; i++)
{
_pD2DBrush[i] = nullptr;
}
diff --git a/imcrvtip/CandidateWindow.cpp b/imcrvtip/CandidateWindow.cpp
index f35a33cc..ea67bb3a 100644
--- a/imcrvtip/CandidateWindow.cpp
+++ b/imcrvtip/CandidateWindow.cpp
@@ -35,7 +35,7 @@ BOOL CCandidateWindow::_Create(HWND hwndParent, CCandidateWindow *pCandidateWind
_pD2DFactory->AddRef();
_pD2DDCRT = _pTextService->_pD2DDCRT;
_pD2DDCRT->AddRef();
- for(int i = 0; i < DISPLAY_COLOR_NUM; i++)
+ for(int i = 0; i < DISPLAY_LIST_COLOR_NUM; i++)
{
_pD2DBrush[i] = _pTextService->_pD2DBrush[i];
_pD2DBrush[i]->AddRef();
@@ -183,7 +183,7 @@ void CCandidateWindow::_Destroy()
SafeRelease(&_pDWTF);
SafeRelease(&_pDWFactory);
- for(int i = 0; i < DISPLAY_COLOR_NUM; i++)
+ for(int i = 0; i < DISPLAY_LIST_COLOR_NUM; i++)
{
SafeRelease(&_pD2DBrush[i]);
}
@@ -805,7 +805,7 @@ void CCandidateWindow::_RestoreStatusReg()
void CCandidateWindow::_ClearStatusReg()
{
- inputmode_bak = im_default;
+ inputmode_bak = im_direct;
abbrevmode_bak = FALSE;
kana_bak.clear();
okuriidx_bak = 0;
diff --git a/imcrvtip/CandidateWindow.h b/imcrvtip/CandidateWindow.h
index 6882bb5b..32cd9b3c 100644
--- a/imcrvtip/CandidateWindow.h
+++ b/imcrvtip/CandidateWindow.h
@@ -124,7 +124,7 @@ class CCandidateWindow : public ITfCandidateListUIElementBehavior
//Direct2D/DirectWrite
ID2D1Factory *_pD2DFactory;
ID2D1DCRenderTarget *_pD2DDCRT;
- ID2D1SolidColorBrush *_pD2DBrush[DISPLAY_COLOR_NUM];
+ ID2D1SolidColorBrush *_pD2DBrush[DISPLAY_LIST_COLOR_NUM];
D2D1_DRAW_TEXT_OPTIONS _drawtext_option;
IDWriteFactory *_pDWFactory;
IDWriteTextFormat *_pDWTF;
diff --git a/imcrvtip/FnConfig.cpp b/imcrvtip/FnConfig.cpp
index 857725cd..1e1ece6b 100644
--- a/imcrvtip/FnConfig.cpp
+++ b/imcrvtip/FnConfig.cpp
@@ -48,16 +48,31 @@ static const TF_PRESERVEDKEY configpreservedkey[] =
static const struct {
LPCWSTR value;
COLORREF color;
-} colorsxmlvalue[DISPLAY_COLOR_NUM] =
+} listcolorsxmlvalue[DISPLAY_LIST_COLOR_NUM] =
{
- {ValueColorBG, RGB(0xFF,0xFF,0xFF)},
- {ValueColorFR, RGB(0x00,0x00,0x00)},
- {ValueColorSE, RGB(0x00,0x00,0xFF)},
- {ValueColorCO, RGB(0x80,0x80,0x80)},
- {ValueColorCA, RGB(0x00,0x00,0x00)},
- {ValueColorSC, RGB(0x80,0x80,0x80)},
- {ValueColorAN, RGB(0x80,0x80,0x80)},
- {ValueColorNO, RGB(0x00,0x00,0x00)}
+ {ValueColorBG, RGB(0xFF, 0xFF, 0xFF)},
+ {ValueColorFR, RGB(0x00, 0x00, 0x00)},
+ {ValueColorSE, RGB(0x00, 0x00, 0xFF)},
+ {ValueColorCO, RGB(0x80, 0x80, 0x80)},
+ {ValueColorCA, RGB(0x00, 0x00, 0x00)},
+ {ValueColorSC, RGB(0x80, 0x80, 0x80)},
+ {ValueColorAN, RGB(0x80, 0x80, 0x80)},
+ {ValueColorNO, RGB(0x00, 0x00, 0x00)}
+};
+
+static const struct {
+ LPCWSTR value;
+ COLORREF color;
+} modecolorsxmlvalue[DISPLAY_MODE_COLOR_NUM] =
+{
+ {ValueColorMC, RGB(0xFF, 0xFF, 0xFF)},
+ {ValueColorMF, RGB(0x00, 0x00, 0x00)},
+ {ValueColorHR, RGB(0xC0, 0x00, 0x00)},
+ {ValueColorKT, RGB(0x00, 0xC0, 0x00)},
+ {ValueColorKA, RGB(0x00, 0xC0, 0x80)},
+ {ValueColorJL, RGB(0x00, 0x00, 0xC0)},
+ {ValueColorAC, RGB(0x00, 0x80, 0xC0)},
+ {ValueColorDR, RGB(0x80, 0x80, 0x80)}
};
LPCWSTR sectionpreservedkeyonoff[PRESERVEDKEY_NUM] = {SectionPreservedKeyON, SectionPreservedKeyOFF};
@@ -190,13 +205,13 @@ void CTextService::_LoadBehavior()
cx_maxwidth = MAX_WIDTH_DEFAULT;
}
- for(int i = 0; i < _countof(cx_colors); i++)
+ for(int i = 0; i < _countof(cx_list_colors); i++)
{
- cx_colors[i] = colorsxmlvalue[i].color;
- ReadValue(pathconfigxml, SectionDisplay, colorsxmlvalue[i].value, strxmlval);
+ cx_list_colors[i] = listcolorsxmlvalue[i].color;
+ ReadValue(pathconfigxml, SectionDisplay, listcolorsxmlvalue[i].value, strxmlval);
if(!strxmlval.empty())
{
- cx_colors[i] = wcstoul(strxmlval.c_str(), nullptr, 0);
+ cx_list_colors[i] = wcstoul(strxmlval.c_str(), nullptr, 0);
}
}
@@ -215,6 +230,9 @@ void CTextService::_LoadBehavior()
_ReadBoolValue(SectionDisplay, ValueAnnotation, cx_annotation, TRUE);
_ReadBoolValue(SectionDisplay, ValueAnnotatLst, cx_annotatlst, FALSE);
+ _ReadBoolValue(SectionDisplay, ValueShowModeMark, cx_showmodemark, TRUE);
+ _ReadBoolValue(SectionDisplay, ValueShowRoman, cx_showroman, TRUE);
+
_ReadBoolValue(SectionDisplay, ValueShowModeInl, cx_showmodeinl, TRUE);
ReadValue(pathconfigxml, SectionDisplay, ValueShowModeSec, strxmlval);
cx_showmodesec = _wtoi(strxmlval.c_str());
@@ -223,8 +241,15 @@ void CTextService::_LoadBehavior()
cx_showmodesec = 3;
}
- _ReadBoolValue(SectionDisplay, ValueShowModeMark, cx_showmodemark, TRUE);
- _ReadBoolValue(SectionDisplay, ValueShowRoman, cx_showroman, TRUE);
+ for(int i = 0; i < _countof(cx_mode_colors); i++)
+ {
+ cx_mode_colors[i] = modecolorsxmlvalue[i].color;
+ ReadValue(pathconfigxml, SectionDisplay, modecolorsxmlvalue[i].value, strxmlval);
+ if(!strxmlval.empty())
+ {
+ cx_mode_colors[i] = wcstoul(strxmlval.c_str(), nullptr, 0);
+ }
+ }
}
void CTextService::_LoadDisplayAttr()
@@ -979,9 +1004,9 @@ void CTextService::_InitFont(int dpi)
if(SUCCEEDED(hr))
{
- for(int i = 0; i < DISPLAY_COLOR_NUM; i++)
+ for(int i = 0; i < DISPLAY_LIST_COLOR_NUM; i++)
{
- hr = _pD2DDCRT->CreateSolidColorBrush(D2D1::ColorF(SWAPRGB(cx_colors[i])), &_pD2DBrush[i]);
+ hr = _pD2DDCRT->CreateSolidColorBrush(D2D1::ColorF(SWAPRGB(cx_list_colors[i])), &_pD2DBrush[i]);
if(FAILED(hr))
{
break;
@@ -1033,7 +1058,7 @@ void CTextService::_UninitFont()
SafeRelease(&_pDWTF);
SafeRelease(&_pDWFactory);
- for(int i = 0; i < DISPLAY_COLOR_NUM; i++)
+ for(int i = 0; i < DISPLAY_LIST_COLOR_NUM; i++)
{
SafeRelease(&_pD2DBrush[i]);
}
diff --git a/imcrvtip/InputModeWindow.cpp b/imcrvtip/InputModeWindow.cpp
index 21eacb1b..c26a514c 100644
--- a/imcrvtip/InputModeWindow.cpp
+++ b/imcrvtip/InputModeWindow.cpp
@@ -362,13 +362,13 @@ LRESULT CALLBACK CInputModeWindow::_WindowProc(HWND hWnd, UINT uMsg, WPARAM wPar
{
PAINTSTRUCT ps;
HDC hdc;
- HDC hmemdc;
- HBITMAP hmembmp;
- HPEN npen;
- HBRUSH nbrush;
- HGDIOBJ bmp, pen, brush;
+ HDC hmemdc, hmemdcR;
+ HBITMAP hmembmp, bmp, hmembmpR, bmpR;
+ HPEN pen, npen, penR, npenR;
+ HBRUSH brush, nbrush, brushR, nbrushR;
HICON hIcon;
RECT r;
+ COLORREF color;
switch(uMsg)
{
@@ -398,17 +398,39 @@ LRESULT CALLBACK CInputModeWindow::_WindowProc(HWND hWnd, UINT uMsg, WPARAM wPar
hmemdc = CreateCompatibleDC(hdc);
hmembmp = CreateCompatibleBitmap(hdc, r.right, r.bottom);
- bmp = SelectObject(hmemdc, hmembmp);
+ bmp = (HBITMAP)SelectObject(hmemdc, hmembmp);
- npen = CreatePen(PS_SOLID, 1, RGB(0x00, 0x00, 0x00));
- pen = SelectObject(hmemdc, npen);
- nbrush = CreateSolidBrush(RGB(0xFF, 0xFF, 0xFF));
- brush = SelectObject(hmemdc, nbrush);
+ npen = CreatePen(PS_SOLID, 1, _pTextService->cx_mode_colors[CL_COLOR_MF]);
+ pen = (HPEN)SelectObject(hmemdc, npen);
- Rectangle(hmemdc, 0, 0, r.right, r.bottom);
+ color = RGB(0xFF, 0xFF, 0xFF);
+ switch(_pTextService->inputmode)
+ {
+ case im_direct:
+ color = _pTextService->cx_mode_colors[CL_COLOR_DR];
+ break;
+ case im_hiragana:
+ color = _pTextService->cx_mode_colors[CL_COLOR_HR];
+ break;
+ case im_katakana:
+ color = _pTextService->cx_mode_colors[CL_COLOR_KT];
+ break;
+ case im_katakana_ank:
+ color = _pTextService->cx_mode_colors[CL_COLOR_KA];
+ break;
+ case im_jlatin:
+ color = _pTextService->cx_mode_colors[CL_COLOR_JL];
+ break;
+ case im_ascii:
+ color = _pTextService->cx_mode_colors[CL_COLOR_AC];
+ break;
+ default:
+ break;
+ }
+ nbrush = CreateSolidBrush(color);
+ brush = (HBRUSH)SelectObject(hmemdc, nbrush);
- _pTextService->_GetIcon(&hIcon, MulDiv(16, _dpi, 96));
- DrawIconEx(hmemdc, IM_MARGIN_X, IM_MARGIN_Y, hIcon, _size, _size, 0, nbrush, DI_NORMAL);
+ Rectangle(hmemdc, 0, 0, r.right, r.bottom);
SelectObject(hmemdc, pen);
SelectObject(hmemdc, brush);
@@ -416,6 +438,44 @@ LRESULT CALLBACK CInputModeWindow::_WindowProc(HWND hWnd, UINT uMsg, WPARAM wPar
DeleteObject(npen);
DeleteObject(nbrush);
+ hmemdcR = CreateCompatibleDC(hdc);
+ hmembmpR = CreateCompatibleBitmap(hdc, r.right, r.bottom);
+ bmpR = (HBITMAP)SelectObject(hmemdcR, hmembmpR);
+
+ penR = (HPEN)SelectObject(hmemdcR, GetStockObject(WHITE_PEN));
+ brushR = (HBRUSH)SelectObject(hmemdcR, GetStockObject(WHITE_BRUSH));
+
+ Rectangle(hmemdcR, 0, 0, r.right, r.bottom);
+
+ _pTextService->_GetIcon(&hIcon, MulDiv(16, _dpi, 96));
+ DrawIconEx(hmemdcR, IM_MARGIN_X, IM_MARGIN_Y, hIcon, _size, _size, 0, (HBRUSH)GetStockObject(WHITE_BRUSH), DI_NORMAL);
+
+ SelectObject(hmemdcR, penR);
+ SelectObject(hmemdcR, brushR);
+
+ npenR = CreatePen(PS_SOLID, 1, _pTextService->cx_mode_colors[CL_COLOR_MC]);
+ penR = (HPEN)SelectObject(hmemdcR, npenR);
+ nbrushR = CreateSolidBrush(_pTextService->cx_mode_colors[CL_COLOR_MC]);
+ brushR = (HBRUSH)SelectObject(hmemdcR, nbrushR);
+
+ SetROP2(hmemdcR, R2_XORPEN);
+
+ Rectangle(hmemdcR, 0, 0, r.right, r.bottom);
+
+ SelectObject(hmemdcR, penR);
+ SelectObject(hmemdcR, brushR);
+
+ DeleteObject(npenR);
+ DeleteObject(nbrushR);
+
+ GdiTransparentBlt(hmemdc, 0, 0, r.right, r.bottom, hmemdcR, 0, 0, r.right, r.bottom,
+ (_pTextService->cx_mode_colors[CL_COLOR_MC] ^ RGB(0xFF, 0xFF, 0xFF)));
+
+ SelectObject(hmemdcR, bmpR);
+
+ DeleteObject(hmembmpR);
+ DeleteObject(hmemdcR);
+
BitBlt(hdc, 0, 0, r.right, r.bottom, hmemdc, 0, 0, SRCCOPY);
SelectObject(hmemdc, bmp);
@@ -541,7 +601,7 @@ void CTextService::_StartInputModeWindow()
{
switch(inputmode)
{
- case im_default:
+ case im_direct:
case im_hiragana:
case im_katakana:
case im_katakana_ank:
diff --git a/imcrvtip/KeyHandler.cpp b/imcrvtip/KeyHandler.cpp
index 260eb1ea..bc631960 100644
--- a/imcrvtip/KeyHandler.cpp
+++ b/imcrvtip/KeyHandler.cpp
@@ -374,7 +374,7 @@ void CTextService::_KeyboardOpenCloseChanged(BOOL showinputmode)
}
else
{
- inputmode = im_default;
+ inputmode = im_direct;
_SaveUserDic();
diff --git a/imcrvtip/LanguageBar.cpp b/imcrvtip/LanguageBar.cpp
index 7e2d9a72..8badaef7 100644
--- a/imcrvtip/LanguageBar.cpp
+++ b/imcrvtip/LanguageBar.cpp
@@ -22,7 +22,7 @@ static const struct {
{im_katakana_ank, IDM_KATAKANA_ANK, 0, L"[-カナ]"},
{im_jlatin, IDM_JLATIN, 0, L"[全英]"},
{im_ascii, IDM_ASCII, 0, L"[SKK]"},
- {im_default, IDM_DEFAULT, 0, L"[--]"},
+ {im_direct, IDM_DIRECT, 0, L"[--]"},
{im_disable, IDM_NONE, TF_LBMENUF_SEPARATOR, L""},
{im_disable, IDM_CONFIG, 0, L"設定"},
{im_disable, IDM_NONE, TF_LBMENUF_SEPARATOR, L""},
@@ -189,7 +189,7 @@ STDAPI CLangBarItemButton::OnClick(TfLBIClick click, POINT pt, const RECT *prcAr
HMENU hMenu = LoadMenuW(g_hInst, MAKEINTRESOURCEW(IDR_SYSTRAY_MENU));
if(hMenu)
{
- UINT check = IDM_DEFAULT;
+ UINT check = IDM_DIRECT;
for(int i = 0; i < _countof(menuItems); i++)
{
if(_pTextService->inputmode == menuItems[i].inputmode)
@@ -198,7 +198,7 @@ STDAPI CLangBarItemButton::OnClick(TfLBIClick click, POINT pt, const RECT *prcAr
break;
}
}
- CheckMenuRadioItem(hMenu, IDM_HIRAGANA, IDM_DEFAULT, check, MF_BYCOMMAND);
+ CheckMenuRadioItem(hMenu, IDM_HIRAGANA, IDM_DIRECT, check, MF_BYCOMMAND);
HMENU hSubMenu = GetSubMenu(hMenu, 0);
if(hSubMenu)
{
@@ -292,12 +292,12 @@ STDAPI CLangBarItemButton::OnMenuSelect(UINT wID)
}
}
break;
- case IDM_DEFAULT:
+ case IDM_DIRECT:
if(_pTextService->_IsKeyboardOpen())
{
_pTextService->_ClearComposition();
- _pTextService->inputmode = im_default;
+ _pTextService->inputmode = im_direct;
_pTextService->_SetKeyboardOpen(FALSE);
}
break;
diff --git a/imcrvtip/TextService.cpp b/imcrvtip/TextService.cpp
index e0189517..35bad533 100644
--- a/imcrvtip/TextService.cpp
+++ b/imcrvtip/TextService.cpp
@@ -26,7 +26,7 @@ CTextService::CTextService()
hFont = nullptr;
_pD2DFactory = nullptr;
_pD2DDCRT = nullptr;
- for(int i = 0; i < DISPLAY_COLOR_NUM; i++)
+ for(int i = 0; i < DISPLAY_LIST_COLOR_NUM; i++)
{
_pD2DBrush[i] = nullptr;
}
@@ -41,7 +41,7 @@ CTextService::CTextService()
hPipe = INVALID_HANDLE_VALUE;
- inputmode = im_default;
+ inputmode = im_direct;
_ResetStatus();
diff --git a/imcrvtip/TextService.h b/imcrvtip/TextService.h
index bf07e45d..2acf9469 100644
--- a/imcrvtip/TextService.h
+++ b/imcrvtip/TextService.h
@@ -309,7 +309,7 @@ class CTextService :
public:
ID2D1Factory *_pD2DFactory;
ID2D1DCRenderTarget *_pD2DDCRT;
- ID2D1SolidColorBrush *_pD2DBrush[DISPLAY_COLOR_NUM];
+ ID2D1SolidColorBrush *_pD2DBrush[DISPLAY_LIST_COLOR_NUM];
D2D1_DRAW_TEXT_OPTIONS _drawtext_option;
IDWriteFactory *_pDWFactory;
IDWriteTextFormat *_pDWTF;
@@ -339,7 +339,7 @@ class CTextService :
BOOL cx_fontitalic; //候補一覧のフォント設定(イタリック)
LONG cx_maxwidth; //候補一覧の最大幅
- COLORREF cx_colors[DISPLAY_COLOR_NUM]; //候補一覧の色
+ COLORREF cx_list_colors[DISPLAY_LIST_COLOR_NUM]; //候補一覧の色
BOOL cx_drawapi; //候補一覧の描画API(FALSE:GDI/TRUE:Direct2D)
BOOL cx_colorfont; //候補一覧の描画API 彩色(Direct2Dのときカラーフォントにする)
UINT cx_untilcandlist; //候補一覧表示に要する変換回数(0:表示なし/1:1回目...)
@@ -347,11 +347,13 @@ class CTextService :
BOOL cx_dispcandnum; //候補一覧表示なしのとき候補数を表示する
BOOL cx_annotation; //注釈を表示する
BOOL cx_annotatlst; //注釈を表示する(FALSE:全て/TRUE:候補一覧のみ)
- BOOL cx_showmodeinl; //入力モードを表示する
- UINT cx_showmodesec; //入力モードの表示秒数
BOOL cx_showmodemark; //▽▼*マークを表示する
BOOL cx_showroman; //ローマ字を表示する
+ BOOL cx_showmodeinl; //入力モードを表示する
+ UINT cx_showmodesec; //入力モードの表示秒数
+ COLORREF cx_mode_colors[DISPLAY_MODE_COLOR_NUM]; //入力モードの色
+
BOOL cx_begincvokuri; //送り仮名が決定したとき変換を開始する
BOOL cx_shiftnnokuri; //送り仮名で撥音を送り出す
BOOL cx_srchallokuri; //送りあり変換で送りなし候補も検索する
diff --git a/imcrvtip/imcrvtip.h b/imcrvtip/imcrvtip.h
index c93a323c..d26accbd 100644
--- a/imcrvtip/imcrvtip.h
+++ b/imcrvtip/imcrvtip.h
@@ -11,7 +11,7 @@
enum InputMode
{
im_disable = -1, //無効
- im_default, //デフォルト
+ im_direct, //直接
im_hiragana, //ひらがな
im_katakana, //カタカナ
im_katakana_ank, //半角カタカナ
@@ -97,6 +97,16 @@ typedef struct ROMAN_KANA_NODE {
#define CL_COLOR_AN 6 //注釈
#define CL_COLOR_NO 7 //番号
+//入力モードの色 cx_mode_colors のインデックス
+#define CL_COLOR_MC 0 //文字
+#define CL_COLOR_MF 1 //枠
+#define CL_COLOR_HR 2 //かな
+#define CL_COLOR_KT 3 //カナ
+#define CL_COLOR_KA 4 //-カナ
+#define CL_COLOR_JL 5 //全英
+#define CL_COLOR_AC 6 //ASCII
+#define CL_COLOR_DR 7 //直接
+
//候補ウィンドウモード
enum WindowMode {
wm_none = 0, //なし
diff --git a/imcrvtip/imcrvtip.rc b/imcrvtip/imcrvtip.rc
index cae05183..f2a6b310 100644
--- a/imcrvtip/imcrvtip.rc
+++ b/imcrvtip/imcrvtip.rc
@@ -63,7 +63,7 @@ IDR_SYSTRAY_MENU MENU
MENUITEM "[-カナ]", IDM_KATAKANA_ANK
MENUITEM "[全英]", IDM_JLATIN
MENUITEM "[SKK]", IDM_ASCII
- MENUITEM "[--]", IDM_DEFAULT
+ MENUITEM "[--]", IDM_DIRECT
MENUITEM SEPARATOR
MENUITEM "設定", IDM_CONFIG
}
diff --git a/imcrvtip/resource.h b/imcrvtip/resource.h
index e55ca08a..9d581de5 100644
--- a/imcrvtip/resource.h
+++ b/imcrvtip/resource.h
@@ -25,7 +25,7 @@
#define IDM_KATAKANA_ANK 1013
#define IDM_JLATIN 1014
#define IDM_ASCII 1015
-#define IDM_DEFAULT 1020
+#define IDM_DIRECT 1020
#define IDM_CONFIG 1021
#endif //RESOURCE_H
diff --git a/installer/config-sample/config - act.xml b/installer/config-sample/config - act.xml
index 56df1274..8794725a 100644
--- a/installer/config-sample/config - act.xml
+++ b/installer/config-sample/config - act.xml
@@ -58,10 +58,18 @@
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/installer/config-sample/config - azik-jpkbd.xml b/installer/config-sample/config - azik-jpkbd.xml
index c0842e11..db5608c4 100644
--- a/installer/config-sample/config - azik-jpkbd.xml
+++ b/installer/config-sample/config - azik-jpkbd.xml
@@ -58,10 +58,18 @@
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/installer/config-sample/config - azik-uskbd.xml b/installer/config-sample/config - azik-uskbd.xml
index f9858531..1ace612b 100644
--- a/installer/config-sample/config - azik-uskbd.xml
+++ b/installer/config-sample/config - azik-uskbd.xml
@@ -58,10 +58,18 @@
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/installer/config-sample/config - gact10.xml b/installer/config-sample/config - gact10.xml
index c3dba2fe..b9286e9b 100644
--- a/installer/config-sample/config - gact10.xml
+++ b/installer/config-sample/config - gact10.xml
@@ -93,10 +93,18 @@
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/installer/config-sample/config - kana.xml b/installer/config-sample/config - kana.xml
index 5f7da227..349a33c3 100644
--- a/installer/config-sample/config - kana.xml
+++ b/installer/config-sample/config - kana.xml
@@ -71,10 +71,18 @@
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/installer/config-sample/config - roman.xml b/installer/config-sample/config - roman.xml
index 9ee3e150..cad68130 100644
--- a/installer/config-sample/config - roman.xml
+++ b/installer/config-sample/config - roman.xml
@@ -58,10 +58,18 @@
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/installer/config-share/config.xml b/installer/config-share/config.xml
index 298ed9d2..1823aff6 100644
--- a/installer/config-share/config.xml
+++ b/installer/config-share/config.xml
@@ -51,10 +51,18 @@
-
-
+
+
+
+
+
+
+
+
+
+