[NEW_FEATURE] Add Caret block mode.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@245 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
donho 2008-06-20 22:41:34 +00:00
parent bae3eb5bda
commit 4e3dd33f9c
5 changed files with 23 additions and 18 deletions

View File

@ -5684,10 +5684,7 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
_mainEditView.showIndentGuideLine(svp1._indentGuideLineShow);
_subEditView.showIndentGuideLine(svp2._indentGuideLineShow);
_mainEditView.execute(SCI_SETCARETWIDTH, nppGUI._caretWidth);
_subEditView.execute(SCI_SETCARETWIDTH, nppGUI._caretWidth);
_mainEditView.execute(SCI_SETCARETPERIOD, nppGUI._caretBlinkRate);
_subEditView.execute(SCI_SETCARETPERIOD, nppGUI._caretBlinkRate);
::SendMessage(hwnd, NPPM_INTERNAL_SETCARETWIDTH, 0, 0);
_configStyleDlg.init(_hInst, _hSelf);
_preference.init(_hInst, _hSelf);
@ -6895,15 +6892,26 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
return TRUE;
}
case NPPM_INTERNAL_SETCARETWIDTH ://NPPM_INTERNAL_SCINTILLAKEYMODIFIED :
case NPPM_INTERNAL_SETCARETWIDTH :
{
NppGUI & nppGUI = (NppGUI &)pNppParam->getNppGUI();
if (nppGUI._caretWidth < 4)
{
_mainEditView.execute(SCI_SETCARETSTYLE, CARETSTYLE_LINE);
_subEditView.execute(SCI_SETCARETSTYLE, CARETSTYLE_LINE);
_mainEditView.execute(SCI_SETCARETWIDTH, nppGUI._caretWidth);
_subEditView.execute(SCI_SETCARETWIDTH, nppGUI._caretWidth);
}
else
{
_mainEditView.execute(SCI_SETCARETSTYLE, CARETSTYLE_BLOCK);
_subEditView.execute(SCI_SETCARETSTYLE, CARETSTYLE_BLOCK);
}
return TRUE;
}
case NPPM_INTERNAL_SETCARETBLINKRATE ://NPPM_INTERNAL_PLUGINCMDLIST_MODIFIED :
case NPPM_INTERNAL_SETCARETBLINKRATE :
{
NppGUI & nppGUI = (NppGUI &)pNppParam->getNppGUI();
_mainEditView.execute(SCI_SETCARETPERIOD, nppGUI._caretBlinkRate);

View File

@ -691,8 +691,7 @@ private:
bool getIntegralDockingData(tTbData & dockData, int & iCont, bool & isVisible);
int getLangFromMenuName(const char * langName)
{
int getLangFromMenuName(const char * langName) {
int id = 0;
char menuLangName[ 16 ];
@ -716,10 +715,9 @@ private:
}
return id;
}
};
string getLangFromMenu(const Buffer * buf)
{
string getLangFromMenu(const Buffer * buf) {
int id;
const char * userLangName;
char menuLangName[32];
@ -736,7 +734,7 @@ private:
userLangName = buf->getUserDefineLangName();
}
return userLangName;
}
};
void setFileOpenSaveDlgFilters(FileDialog & fDlg);
void markSelectedText();

View File

@ -1101,9 +1101,6 @@ bool NppParameters::getContextMenuFromXmlTree(HMENU mainMenuHadle)
}
}
}
/*
*/
}
}
}

View File

@ -358,7 +358,7 @@ public:
void addStyler(int styleID, TiXmlNode *styleNode);
void addStyler(int styleID, char *styleName) {
ZeroMemory(&_styleArray[_nbStyler], sizeof(Style));;
//ZeroMemory(&_styleArray[_nbStyler], sizeof(Style));;
_styleArray[_nbStyler]._styleID = styleID;
_styleArray[_nbStyler]._styleDesc = styleName;
_styleArray[_nbStyler]._fgColor = black;

View File

@ -316,6 +316,8 @@ BOOL CALLBACK MarginsDlg::run_dlgProc(UINT Message, WPARAM wParam, LPARAM lParam
::SendDlgItemMessage(_hSelf, IDC_WIDTH_COMBO, CB_ADDSTRING, 0, (LPARAM)"1");
::SendDlgItemMessage(_hSelf, IDC_WIDTH_COMBO, CB_ADDSTRING, 0, (LPARAM)"2");
::SendDlgItemMessage(_hSelf, IDC_WIDTH_COMBO, CB_ADDSTRING, 0, (LPARAM)"3");
::SendDlgItemMessage(_hSelf, IDC_WIDTH_COMBO, CB_ADDSTRING, 0, (LPARAM)"Block");
::SendMessage(::GetDlgItem(_hSelf, IDC_WIDTH_COMBO), CB_SETCURSEL, nppGUI._caretWidth, 0);