Make vertical edge (column marker) usage easier
Simplify the UI to make vertical edge easy to use.
This commit is contained in:
parent
905feb8dd8
commit
c3ec0cbf6e
@ -291,10 +291,6 @@ LRESULT Notepad_plus::init(HWND hwnd)
|
||||
_mainEditView.wrap(svp1._doWrap);
|
||||
_subEditView.wrap(svp1._doWrap);
|
||||
|
||||
_mainEditView.execute(SCI_SETEDGECOLUMN, svp1._edgeNbColumn);
|
||||
_mainEditView.execute(SCI_SETEDGEMODE, svp1._edgeMode);
|
||||
_subEditView.execute(SCI_SETEDGECOLUMN, svp1._edgeNbColumn);
|
||||
_subEditView.execute(SCI_SETEDGEMODE, svp1._edgeMode);
|
||||
::SendMessage(hwnd, NPPM_INTERNAL_EDGEMULTISETSIZE, 0, 0);
|
||||
|
||||
_mainEditView.showEOL(svp1._eolShow);
|
||||
|
@ -2337,38 +2337,6 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
||||
break;
|
||||
}
|
||||
|
||||
case NPPM_INTERNAL_EDGEBACKGROUND:
|
||||
case NPPM_INTERNAL_EDGELINE:
|
||||
case NPPM_INTERNAL_EDGENONE:
|
||||
{
|
||||
int mode;
|
||||
switch (message)
|
||||
{
|
||||
case NPPM_INTERNAL_EDGELINE:
|
||||
{
|
||||
mode = EDGE_LINE;
|
||||
break;
|
||||
}
|
||||
case NPPM_INTERNAL_EDGEBACKGROUND:
|
||||
{
|
||||
mode = EDGE_BACKGROUND;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
mode = EDGE_NONE;
|
||||
}
|
||||
_mainEditView.execute(SCI_SETEDGEMODE, mode);
|
||||
_subEditView.execute(SCI_SETEDGEMODE, mode);
|
||||
}
|
||||
break;
|
||||
|
||||
case NPPM_INTERNAL_EDGEMULTILINE:
|
||||
{
|
||||
_mainEditView.execute(SCI_SETEDGEMODE, EDGE_MULTILINE);
|
||||
_subEditView.execute(SCI_SETEDGEMODE, EDGE_MULTILINE);
|
||||
}
|
||||
break;
|
||||
|
||||
case NPPM_INTERNAL_EDGEMULTISETSIZE:
|
||||
{
|
||||
_mainEditView.execute(SCI_MULTIEDGECLEARALL);
|
||||
@ -2386,6 +2354,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
||||
}
|
||||
|
||||
const size_t twoPower13 = 8192;
|
||||
size_t nbColAdded = 0;
|
||||
for (auto i : svp._edgeMultiColumnPos)
|
||||
{
|
||||
// it's absurd to set columns beyon 8000, even it's a long line.
|
||||
@ -2395,17 +2364,40 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
|
||||
|
||||
_mainEditView.execute(SCI_MULTIEDGEADDLINE, i, multiEdgeColor);
|
||||
_subEditView.execute(SCI_MULTIEDGEADDLINE, i, multiEdgeColor);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case NPPM_INTERNAL_EDGESETSIZE:
|
||||
++nbColAdded;
|
||||
}
|
||||
|
||||
int mode;
|
||||
switch (nbColAdded)
|
||||
{
|
||||
ScintillaViewParams & svp = (ScintillaViewParams &)(NppParameters::getInstance()).getSVP();
|
||||
_mainEditView.execute(SCI_SETEDGECOLUMN, svp._edgeNbColumn);
|
||||
_subEditView.execute(SCI_SETEDGECOLUMN, svp._edgeNbColumn);
|
||||
case 0:
|
||||
{
|
||||
mode = EDGE_NONE;
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
if (svp._isEdgeBgMode)
|
||||
{
|
||||
mode = EDGE_BACKGROUND;
|
||||
_mainEditView.execute(SCI_SETEDGECOLUMN, svp._edgeMultiColumnPos[0]);
|
||||
_subEditView.execute(SCI_SETEDGECOLUMN, svp._edgeMultiColumnPos[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
mode = EDGE_MULTILINE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
mode = EDGE_MULTILINE;
|
||||
}
|
||||
|
||||
_mainEditView.execute(SCI_SETEDGEMODE, mode);
|
||||
_subEditView.execute(SCI_SETEDGEMODE, mode);
|
||||
}
|
||||
break;
|
||||
|
||||
case NPPM_INTERNAL_SETTING_TAB_REPLCESPACE:
|
||||
case NPPM_INTERNAL_SETTING_TAB_SIZE:
|
||||
|
@ -5266,17 +5266,13 @@ void NppParameters::feedScintillaParam(TiXmlNode *node)
|
||||
}
|
||||
|
||||
// Do Edge
|
||||
nm = element->Attribute(TEXT("edge"));
|
||||
nm = element->Attribute(TEXT("isEdgeBgMode"));
|
||||
if (nm)
|
||||
{
|
||||
if (!lstrcmp(nm, TEXT("background")))
|
||||
_svp._edgeMode = EDGE_BACKGROUND;
|
||||
else if (!lstrcmp(nm, TEXT("line")))
|
||||
_svp._edgeMode = EDGE_LINE;
|
||||
else if (!lstrcmp(nm, TEXT("multiColumn")))
|
||||
_svp._edgeMode = EDGE_MULTILINE;
|
||||
else
|
||||
_svp._edgeMode = EDGE_NONE;
|
||||
if (!lstrcmp(nm, TEXT("yes")))
|
||||
_svp._isEdgeBgMode = true;
|
||||
else if (!lstrcmp(nm, TEXT("no")))
|
||||
_svp._isEdgeBgMode = false;
|
||||
}
|
||||
|
||||
// Do Scintilla border edge
|
||||
@ -5289,20 +5285,13 @@ void NppParameters::feedScintillaParam(TiXmlNode *node)
|
||||
_svp._showBorderEdge = false;
|
||||
}
|
||||
|
||||
int val;
|
||||
nm = element->Attribute(TEXT("edgeNbColumn"), &val);
|
||||
if (nm)
|
||||
{
|
||||
_svp._edgeNbColumn = val;
|
||||
}
|
||||
|
||||
nm = element->Attribute(TEXT("edgeMultiColumnPos"));
|
||||
if (nm)
|
||||
{
|
||||
str2numberVector(nm, _svp._edgeMultiColumnPos);
|
||||
}
|
||||
|
||||
|
||||
int val;
|
||||
nm = element->Attribute(TEXT("zoom"), &val);
|
||||
if (nm)
|
||||
{
|
||||
@ -5482,16 +5471,6 @@ bool NppParameters::writeScintillaParams()
|
||||
(scintNode->ToElement())->SetAttribute(TEXT("Wrap"), _svp._doWrap?TEXT("yes"):TEXT("no"));
|
||||
(scintNode->ToElement())->SetAttribute(TEXT("borderEdge"), _svp._showBorderEdge ? TEXT("yes") : TEXT("no"));
|
||||
|
||||
const TCHAR *edgeStr;
|
||||
if (_svp._edgeMode == EDGE_LINE)
|
||||
edgeStr = TEXT("line");
|
||||
else if (_svp._edgeMode == EDGE_BACKGROUND)
|
||||
edgeStr = TEXT("background");
|
||||
else if (_svp._edgeMode == EDGE_MULTILINE)
|
||||
edgeStr = TEXT("multiColumn");
|
||||
else
|
||||
edgeStr = TEXT("no");
|
||||
|
||||
generic_string edgeColumnPosStr;
|
||||
for (auto i : _svp._edgeMultiColumnPos)
|
||||
{
|
||||
@ -5499,8 +5478,7 @@ bool NppParameters::writeScintillaParams()
|
||||
edgeColumnPosStr += generic_string(s.begin(), s.end());
|
||||
edgeColumnPosStr += TEXT(" ");
|
||||
}
|
||||
(scintNode->ToElement())->SetAttribute(TEXT("edge"), edgeStr);
|
||||
(scintNode->ToElement())->SetAttribute(TEXT("edgeNbColumn"), _svp._edgeNbColumn);
|
||||
(scintNode->ToElement())->SetAttribute(TEXT("isEdgeBgMode"), _svp._isEdgeBgMode ? TEXT("yes") : TEXT("no"));
|
||||
(scintNode->ToElement())->SetAttribute(TEXT("edgeMultiColumnPos"), edgeColumnPosStr);
|
||||
(scintNode->ToElement())->SetAttribute(TEXT("zoom"), _svp._zoom);
|
||||
(scintNode->ToElement())->SetAttribute(TEXT("zoom2"), _svp._zoom2);
|
||||
|
@ -920,8 +920,8 @@ struct ScintillaViewParams
|
||||
bool _currentLineHilitingShow = true;
|
||||
bool _wrapSymbolShow = false;
|
||||
bool _doWrap = false;
|
||||
int _edgeMode = EDGE_NONE;
|
||||
int _edgeNbColumn = 80;
|
||||
bool _isEdgeBgMode = false;
|
||||
|
||||
std::vector<size_t> _edgeMultiColumnPos;
|
||||
int _zoom = 0;
|
||||
int _zoom2 = 0;
|
||||
|
@ -82,14 +82,10 @@ BEGIN
|
||||
CONTROL "Circle tree",IDC_RADIO_CIRCLE,"Button",BS_AUTORADIOBUTTON,55,86,62,10
|
||||
CONTROL "None",IDC_RADIO_FOLDMARGENONE,"Button",BS_AUTORADIOBUTTON,55,115,61,10
|
||||
CONTROL "Box tree",IDC_RADIO_BOX,"Button",BS_AUTORADIOBUTTON,55,100,61,10
|
||||
CONTROL "Show vertical edge",IDC_CHECK_SHOWVERTICALEDGE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,153,56,122,10
|
||||
LTEXT "0",IDC_COLONENUMBER_STATIC,238,103,18,8,WS_TABSTOP
|
||||
GROUPBOX "Vertical Edge Settings",IDC_VES_GB_STATIC,142,44,148,135,BS_CENTER
|
||||
CONTROL "Line mode",IDC_RADIO_LNMODE,"Button",BS_AUTORADIOBUTTON,156,72,91,10
|
||||
CONTROL "Background mode",IDC_RADIO_BGMODE,"Button",BS_AUTORADIOBUTTON,156,86,91,10
|
||||
CONTROL "Multi-line mode",IDC_RADIO_MULTILNMODE,"Button",BS_AUTORADIOBUTTON,156,121,122,10
|
||||
RTEXT "Number of columns :",IDC_NBCOLONE_STATIC,148,104,83,8
|
||||
EDITTEXT IDC_COLUMNPOS_EDIT,165,137,110,36,ES_MULTILINE
|
||||
CONTROL "Background mode",IDC_CHECK_EDGEBGMODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,153,161,122,10
|
||||
LTEXT "Add your column marker by indicating its position with a decimal number.\nYou can define several column markers by using white space to separate the different numbers.",IDC_STATIC_MULTILNMODE_TIP,150,59,134,55
|
||||
EDITTEXT IDC_COLUMNPOS_EDIT,152,116,125,36,ES_MULTILINE
|
||||
GROUPBOX "Caret Settings",IDC_CARETSETTING_STATIC,46,1,199,40,BS_CENTER
|
||||
LTEXT "Width :",IDC_WIDTH_STATIC,50,20,37,8,0,WS_EX_RIGHT
|
||||
COMBOBOX IDC_WIDTH_COMBO,89,18,40,30,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
@ -98,7 +94,8 @@ BEGIN
|
||||
LTEXT "S",IDC_CARETBLINKRATE_S_STATIC,225,25,12,8
|
||||
LTEXT "F",IDC_CARETBLINKRATE_F_STATIC,144,25,12,8,0,WS_EX_RIGHT
|
||||
GROUPBOX "Multi-Editing Settings",IDC_MULTISELECTION_GB_STATIC,253,1,140,40,BS_CENTER
|
||||
CONTROL "Enable (Ctrl+Mouse click/selection)",IDC_CHECK_MULTISELECTION, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,261,18,130,10
|
||||
CONTROL "Enable (Ctrl+Mouse click/selection)",IDC_CHECK_MULTISELECTION,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,261,18,130,10
|
||||
GROUPBOX "Line Wrap",IDC_LW_GB_STATIC,301,44,92,56,BS_CENTER
|
||||
CONTROL "Default",IDC_RADIO_LWDEF,"Button",BS_AUTORADIOBUTTON | WS_GROUP,311,57,59,10
|
||||
CONTROL "Aligned",IDC_RADIO_LWALIGN,"Button",BS_AUTORADIOBUTTON,311,71,60,10
|
||||
|
@ -642,11 +642,7 @@ void MarginsDlg::initScintParam()
|
||||
|
||||
::SendDlgItemMessage(_hSelf, IDC_CHECK_NOEDGE, BM_SETCHECK, !svp._showBorderEdge, 0);
|
||||
|
||||
bool isEnable = !(svp._edgeMode == EDGE_NONE);
|
||||
::SendDlgItemMessage(_hSelf, IDC_CHECK_SHOWVERTICALEDGE, BM_SETCHECK, isEnable, 0);
|
||||
::SendDlgItemMessage(_hSelf, IDC_RADIO_LNMODE, BM_SETCHECK, (svp._edgeMode == EDGE_LINE), 0);
|
||||
::SendDlgItemMessage(_hSelf, IDC_RADIO_BGMODE, BM_SETCHECK, (svp._edgeMode == EDGE_BACKGROUND), 0);
|
||||
::SendDlgItemMessage(_hSelf, IDC_RADIO_MULTILNMODE, BM_SETCHECK, (svp._edgeMode == EDGE_MULTILINE), 0);
|
||||
::SendDlgItemMessage(_hSelf, IDC_CHECK_EDGEBGMODE, BM_SETCHECK, svp._isEdgeBgMode, 0);
|
||||
|
||||
generic_string edgeColumnPosStr;
|
||||
for (auto i : svp._edgeMultiColumnPos)
|
||||
@ -657,20 +653,7 @@ void MarginsDlg::initScintParam()
|
||||
}
|
||||
::SendDlgItemMessage(_hSelf, IDC_COLUMNPOS_EDIT, WM_SETTEXT, 0, reinterpret_cast<LPARAM>(edgeColumnPosStr.c_str()));
|
||||
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDC_RADIO_LNMODE), isEnable);
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDC_RADIO_BGMODE), isEnable);
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDC_RADIO_MULTILNMODE), isEnable);
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDC_NBCOLONE_STATIC), isEnable && !isCheckedOrNot(IDC_RADIO_MULTILNMODE));
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDC_COLUMNPOS_EDIT), isEnable && isCheckedOrNot(IDC_RADIO_MULTILNMODE));
|
||||
|
||||
NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance()).getNativeLangSpeaker();
|
||||
generic_string radioboxTip = pNativeSpeaker->getLocalizedStrFromID("multi-edge-radio-tip", TEXT("Add your column marker by indicating its position with a decimal number.\nYou can define several column markers by using white space to separate the different numbers."));
|
||||
_multiEdgeTip = CreateToolTip(IDC_RADIO_MULTILNMODE, _hSelf, _hInst, const_cast<PTSTR>(radioboxTip.c_str()));
|
||||
|
||||
oldFunclstToolbarProc = reinterpret_cast<WNDPROC>(::SetWindowLongPtr(::GetDlgItem(_hSelf, IDC_COLUMNPOS_EDIT), GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(editNumSpaceProc)));
|
||||
|
||||
::SetDlgItemInt(_hSelf, IDC_COLONENUMBER_STATIC, svp._edgeNbColumn, FALSE);
|
||||
::ShowWindow(::GetDlgItem(_hSelf, IDC_COLONENUMBER_STATIC), isEnable);
|
||||
}
|
||||
|
||||
INT_PTR CALLBACK MarginsDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
@ -681,9 +664,6 @@ INT_PTR CALLBACK MarginsDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lPa
|
||||
{
|
||||
case WM_INITDIALOG :
|
||||
{
|
||||
_verticalEdgeLineNbColVal.init(_hInst, _hSelf);
|
||||
_verticalEdgeLineNbColVal.create(::GetDlgItem(_hSelf, IDC_COLONENUMBER_STATIC), IDC_COLONENUMBER_STATIC);
|
||||
|
||||
::SendDlgItemMessage(_hSelf, IDC_WIDTH_COMBO, CB_ADDSTRING, 0, reinterpret_cast<LPARAM>(TEXT("0")));
|
||||
::SendDlgItemMessage(_hSelf, IDC_WIDTH_COMBO, CB_ADDSTRING, 0, reinterpret_cast<LPARAM>(TEXT("1")));
|
||||
::SendDlgItemMessage(_hSelf, IDC_WIDTH_COMBO, CB_ADDSTRING, 0, reinterpret_cast<LPARAM>(TEXT("2")));
|
||||
@ -804,84 +784,10 @@ INT_PTR CALLBACK MarginsDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lPa
|
||||
::SendMessage(_hParent, WM_COMMAND, IDM_VIEW_FOLDERMAGIN, 0);
|
||||
return TRUE;
|
||||
|
||||
case IDC_CHECK_SHOWVERTICALEDGE:
|
||||
{
|
||||
int modeMsg = 0;
|
||||
bool isChecked = (BST_CHECKED == ::SendDlgItemMessage(_hSelf, IDC_CHECK_SHOWVERTICALEDGE, BM_GETCHECK, 0, 0));
|
||||
if (isChecked)
|
||||
{
|
||||
::SendDlgItemMessage(_hSelf, IDC_RADIO_LNMODE, BM_SETCHECK, TRUE, 0);
|
||||
svp._edgeMode = EDGE_LINE;
|
||||
modeMsg = NPPM_INTERNAL_EDGELINE;
|
||||
}
|
||||
else
|
||||
{
|
||||
::SendDlgItemMessage(_hSelf, IDC_RADIO_LNMODE, BM_SETCHECK, FALSE, 0);
|
||||
::SendDlgItemMessage(_hSelf, IDC_RADIO_BGMODE, BM_SETCHECK, FALSE, 0);
|
||||
::SendDlgItemMessage(_hSelf, IDC_RADIO_MULTILNMODE, BM_SETCHECK, FALSE, 0);
|
||||
svp._edgeMode = EDGE_NONE;
|
||||
modeMsg = NPPM_INTERNAL_EDGENONE;
|
||||
}
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDC_RADIO_LNMODE), isChecked);
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDC_RADIO_BGMODE), isChecked);
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDC_RADIO_MULTILNMODE), isChecked);
|
||||
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDC_NBCOLONE_STATIC), isChecked && !isCheckedOrNot(IDC_RADIO_MULTILNMODE));
|
||||
::ShowWindow(::GetDlgItem(_hSelf, IDC_COLONENUMBER_STATIC), isChecked && !isCheckedOrNot(IDC_RADIO_MULTILNMODE));
|
||||
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDC_COLUMNPOS_EDIT), isChecked && isCheckedOrNot(IDC_RADIO_MULTILNMODE));
|
||||
|
||||
::SendMessage(::GetParent(_hParent), modeMsg, 0, 0);
|
||||
case IDC_CHECK_EDGEBGMODE:
|
||||
svp._isEdgeBgMode = isCheckedOrNot(IDC_CHECK_EDGEBGMODE);
|
||||
::SendMessage(::GetParent(_hParent), NPPM_INTERNAL_EDGEMULTISETSIZE, 0, 0);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
case IDC_RADIO_LNMODE:
|
||||
svp._edgeMode = EDGE_LINE;
|
||||
::SendMessage(::GetParent(_hParent), NPPM_INTERNAL_EDGELINE, 0, 0);
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDC_NBCOLONE_STATIC), TRUE);
|
||||
::ShowWindow(::GetDlgItem(_hSelf, IDC_COLONENUMBER_STATIC), TRUE);
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDC_COLUMNPOS_EDIT), FALSE);
|
||||
return TRUE;
|
||||
|
||||
case IDC_RADIO_BGMODE:
|
||||
svp._edgeMode = EDGE_BACKGROUND;
|
||||
::SendMessage(::GetParent(_hParent), NPPM_INTERNAL_EDGEBACKGROUND, 0, 0);
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDC_NBCOLONE_STATIC), TRUE);
|
||||
::ShowWindow(::GetDlgItem(_hSelf, IDC_COLONENUMBER_STATIC), TRUE);
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDC_COLUMNPOS_EDIT), FALSE);
|
||||
return TRUE;
|
||||
|
||||
case IDC_RADIO_MULTILNMODE:
|
||||
svp._edgeMode = EDGE_MULTILINE;
|
||||
::SendMessage(::GetParent(_hParent), NPPM_INTERNAL_EDGEMULTILINE, 0, 0);
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDC_NBCOLONE_STATIC), FALSE);
|
||||
::ShowWindow(::GetDlgItem(_hSelf, IDC_COLONENUMBER_STATIC), FALSE);
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDC_COLUMNPOS_EDIT), TRUE);
|
||||
return TRUE;
|
||||
|
||||
case IDC_COLONENUMBER_STATIC:
|
||||
{
|
||||
NativeLangSpeaker *pNativeSpeaker = nppParam.getNativeLangSpeaker();
|
||||
generic_string strNbCol = pNativeSpeaker->getLocalizedStrFromID("edit-verticaledge-nb-col", TEXT("Nb of column:"));
|
||||
|
||||
ValueDlg nbColumnEdgeDlg;
|
||||
nbColumnEdgeDlg.init(NULL, _hSelf, svp._edgeNbColumn, strNbCol.c_str());
|
||||
nbColumnEdgeDlg.setNBNumber(3);
|
||||
|
||||
POINT p;
|
||||
::GetCursorPos(&p);
|
||||
|
||||
int val = nbColumnEdgeDlg.doDialog(p);
|
||||
if (val != -1)
|
||||
{
|
||||
svp._edgeNbColumn = val;
|
||||
::SetDlgItemInt(_hSelf, IDC_COLONENUMBER_STATIC, svp._edgeNbColumn, FALSE);
|
||||
|
||||
// Execute modified value
|
||||
::SendMessage(::GetParent(_hParent), NPPM_INTERNAL_EDGESETSIZE, 0, 0);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
case IDC_RADIO_LWDEF:
|
||||
svp._lineWrapMethod = LINEWRAP_DEFAULT;
|
||||
@ -921,6 +827,13 @@ INT_PTR CALLBACK MarginsDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lPa
|
||||
|
||||
if (str2numberVector(text, svp._edgeMultiColumnPos))
|
||||
{
|
||||
bool canBeBg = svp._edgeMultiColumnPos.size() == 1;
|
||||
if (!canBeBg)
|
||||
{
|
||||
svp._isEdgeBgMode = false;
|
||||
::SendDlgItemMessage(_hSelf, IDC_CHECK_EDGEBGMODE, BM_SETCHECK, FALSE, 0);
|
||||
}
|
||||
::EnableWindow(::GetDlgItem(_hSelf, IDC_CHECK_EDGEBGMODE), canBeBg);
|
||||
::SendMessage(::GetParent(_hParent), NPPM_INTERNAL_EDGEMULTISETSIZE, 0, 0);
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -57,13 +57,11 @@ class MarginsDlg : public StaticDialog
|
||||
public :
|
||||
MarginsDlg() = default;
|
||||
virtual void destroy() {
|
||||
_verticalEdgeLineNbColVal.destroy();
|
||||
if (_multiEdgeTip)
|
||||
::DestroyWindow(_multiEdgeTip);
|
||||
};
|
||||
|
||||
private :
|
||||
URLCtrl _verticalEdgeLineNbColVal;
|
||||
HWND _multiEdgeTip = nullptr;
|
||||
INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam);
|
||||
void initScintParam();
|
||||
|
@ -88,13 +88,13 @@
|
||||
#define IDC_CHECK_LINENUMBERMARGE (IDD_PREFERENCE_MARGEIN_BOX + 6)
|
||||
#define IDC_CHECK_BOOKMARKMARGE (IDD_PREFERENCE_MARGEIN_BOX + 7)
|
||||
|
||||
#define IDC_CHECK_SHOWVERTICALEDGE (IDD_PREFERENCE_MARGEIN_BOX + 8)
|
||||
#define IDC_NBCOLONE_STATIC (IDD_PREFERENCE_MARGEIN_BOX + 9)
|
||||
#define IDC_COLONENUMBER_STATIC (IDD_PREFERENCE_MARGEIN_BOX + 10)
|
||||
//#define IDC_CHECK_SHOWVERTICALEDGE (IDD_PREFERENCE_MARGEIN_BOX + 8)
|
||||
//#define IDC_NBCOLONE_STATIC (IDD_PREFERENCE_MARGEIN_BOX + 9)
|
||||
//#define IDC_COLONENUMBER_STATIC (IDD_PREFERENCE_MARGEIN_BOX + 10)
|
||||
|
||||
#define IDC_VES_GB_STATIC (IDD_PREFERENCE_MARGEIN_BOX + 11)
|
||||
#define IDC_RADIO_LNMODE (IDD_PREFERENCE_MARGEIN_BOX + 12)
|
||||
#define IDC_RADIO_BGMODE (IDD_PREFERENCE_MARGEIN_BOX + 13)
|
||||
//#define IDC_RADIO_LNMODE (IDD_PREFERENCE_MARGEIN_BOX + 12)
|
||||
#define IDC_CHECK_EDGEBGMODE (IDD_PREFERENCE_MARGEIN_BOX + 13)
|
||||
#define IDC_CHECK_CURRENTLINEHILITE (IDD_PREFERENCE_MARGEIN_BOX + 14)
|
||||
#define IDC_CHECK_SMOOTHFONT (IDD_PREFERENCE_MARGEIN_BOX + 15)
|
||||
|
||||
@ -123,7 +123,7 @@
|
||||
#define IDC_CHECK_NOEDGE (IDD_PREFERENCE_MARGEIN_BOX + 35)
|
||||
#define IDC_CHECK_SCROLLBEYONDLASTLINE (IDD_PREFERENCE_MARGEIN_BOX + 36)
|
||||
|
||||
#define IDC_RADIO_MULTILNMODE (IDD_PREFERENCE_MARGEIN_BOX + 37)
|
||||
#define IDC_STATIC_MULTILNMODE_TIP (IDD_PREFERENCE_MARGEIN_BOX + 37)
|
||||
#define IDC_COLUMNPOS_EDIT (IDD_PREFERENCE_MARGEIN_BOX + 38)
|
||||
|
||||
#define IDD_PREFERENCE_DELIMITERSETTINGS_BOX 6250 //(IDD_PREFERENCE_BOX + 250)
|
||||
|
@ -441,12 +441,8 @@
|
||||
#define NPPM_INTERNAL_PRNTANDQUIT (NOTEPADPLUS_USER_INTERNAL + 47)
|
||||
#define NPPM_INTERNAL_SAVEBACKUP (NOTEPADPLUS_USER_INTERNAL + 48)
|
||||
#define NPPM_INTERNAL_STOPMONITORING (NOTEPADPLUS_USER_INTERNAL + 49) // Used by Monitoring feature
|
||||
#define NPPM_INTERNAL_EDGENONE (NOTEPADPLUS_USER_INTERNAL + 50)
|
||||
#define NPPM_INTERNAL_EDGELINE (NOTEPADPLUS_USER_INTERNAL + 51)
|
||||
#define NPPM_INTERNAL_EDGEBACKGROUND (NOTEPADPLUS_USER_INTERNAL + 52)
|
||||
#define NPPM_INTERNAL_EDGEMULTILINE (NOTEPADPLUS_USER_INTERNAL + 53)
|
||||
#define NPPM_INTERNAL_EDGESETSIZE (NOTEPADPLUS_USER_INTERNAL + 54)
|
||||
#define NPPM_INTERNAL_EDGEMULTISETSIZE (NOTEPADPLUS_USER_INTERNAL + 55)
|
||||
#define NPPM_INTERNAL_EDGEBACKGROUND (NOTEPADPLUS_USER_INTERNAL + 50)
|
||||
#define NPPM_INTERNAL_EDGEMULTISETSIZE (NOTEPADPLUS_USER_INTERNAL + 51)
|
||||
//wParam: 0
|
||||
//lParam: document new index
|
||||
// See Notepad_plus_msgs.h
|
||||
|
Loading…
Reference in New Issue
Block a user