[NEW] Change the bookmarks' numbers.

Modify showMargin function.
[CLEAN_UP] remove constant.h.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@426 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
donho 2009-02-11 01:14:02 +00:00
parent 2948c18e3e
commit e1c1a64b1f
7 changed files with 23 additions and 19 deletions

View File

@ -36,7 +36,7 @@
#include "GoToLineDlg.h" #include "GoToLineDlg.h"
#include "columnEditor.h" #include "columnEditor.h"
#include "WordStyleDlg.h" #include "WordStyleDlg.h"
#include "constant.h" //#include "constant.h"
#include "trayIconControler.h" #include "trayIconControler.h"
#include "ContextMenu.h" #include "ContextMenu.h"
#include "PluginsManager.h" #include "PluginsManager.h"

View File

@ -18,7 +18,7 @@
#include "FindReplaceDlg.h" #include "FindReplaceDlg.h"
#include "ScintillaEditView.h" #include "ScintillaEditView.h"
#include "Notepad_plus_msgs.h" #include "Notepad_plus_msgs.h"
#include "constant.h" //#include "constant.h"
#include "UniConversion.h" #include "UniConversion.h"
int Searching::convertExtendedToString(const TCHAR * query, TCHAR * result, int length) { //query may equal to result, since it always gets smaller int Searching::convertExtendedToString(const TCHAR * query, TCHAR * result, int length) { //query may equal to result, since it always gets smaller

View File

@ -20,7 +20,7 @@
#include <ShellAPI.h> #include <ShellAPI.h>
#include "ScintillaEditView.h" #include "ScintillaEditView.h"
#include "Parameters.h" #include "Parameters.h"
#include "constant.h" //#include "constant.h"
// initialize the static variable // initialize the static variable
@ -153,6 +153,9 @@ void ScintillaEditView::init(HINSTANCE hInst, HWND hPere)
execute(SCI_SETMARGINMASKN, _SC_MARGE_FOLDER, SC_MASK_FOLDERS); execute(SCI_SETMARGINMASKN, _SC_MARGE_FOLDER, SC_MASK_FOLDERS);
showMargin(_SC_MARGE_FOLDER, true); showMargin(_SC_MARGE_FOLDER, true);
//showMargin(3, true);
//showMargin(4, true);
execute(SCI_SETMARGINSENSITIVEN, _SC_MARGE_FOLDER, true); execute(SCI_SETMARGINSENSITIVEN, _SC_MARGE_FOLDER, true);
execute(SCI_SETMARGINSENSITIVEN, _SC_MARGE_SYBOLE, true); execute(SCI_SETMARGINSENSITIVEN, _SC_MARGE_SYBOLE, true);

View File

@ -97,6 +97,14 @@ const UCHAR BASE_16 = 0x01; // Hex
const UCHAR BASE_08 = 0x02; // Oct const UCHAR BASE_08 = 0x02; // Oct
const UCHAR BASE_02 = 0x03; // Bin const UCHAR BASE_02 = 0x03; // Bin
const int MARK_BOOKMARK = 24;
const int MARK_HIDELINESBEGIN = 23;
const int MARK_HIDELINESEND = 22;
// 24 - 16 reserved for Notepad++ internal used
// 15 - 0 are free to use for plugins
static int getNbChiffre(int aNum, int base) static int getNbChiffre(int aNum, int base)
{ {
int nbChiffre = 1; int nbChiffre = 1;
@ -236,11 +244,16 @@ public:
static const int _MARGE_LINENUMBER_NB_CHIFFRE; static const int _MARGE_LINENUMBER_NB_CHIFFRE;
void showMargin(int witchMarge, bool willBeShowed = true) { void showMargin(int whichMarge, bool willBeShowed = true) {
if (witchMarge == _SC_MARGE_LINENUMBER) if (whichMarge == _SC_MARGE_LINENUMBER)
setLineNumberWidth(willBeShowed); setLineNumberWidth(willBeShowed);
else else
execute(SCI_SETMARGINWIDTHN, witchMarge, willBeShowed?14:0); {
int width = 4;
if (whichMarge == _SC_MARGE_SYBOLE || whichMarge == _SC_MARGE_FOLDER)
width = 14;
execute(SCI_SETMARGINWIDTHN, whichMarge, willBeShowed?width:0);
}
}; };
bool hasMarginShowed(int witchMarge) { bool hasMarginShowed(int witchMarge) {

View File

@ -20,7 +20,7 @@
#include "RunMacroDlg.h" #include "RunMacroDlg.h"
#include "ScintillaEditView.h" #include "ScintillaEditView.h"
#include "Notepad_plus_msgs.h" #include "Notepad_plus_msgs.h"
#include "constant.h" //#include "constant.h"
BOOL CALLBACK RunMacroDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) BOOL CALLBACK RunMacroDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam)

View File

@ -1,8 +0,0 @@
#ifndef CONSTANT_H
#define CONSTANT_H
const int MARK_BOOKMARK = 1;
const int MARK_HIDELINESBEGIN = 2;
const int MARK_HIDELINESEND = 3;
#endif //CONSTANT_H

View File

@ -507,10 +507,6 @@
RelativePath="..\src\MISC\Common\Common.h" RelativePath="..\src\MISC\Common\Common.h"
> >
</File> </File>
<File
RelativePath="..\src\constant.h"
>
</File>
<File <File
RelativePath="..\src\WinControls\ContextMenu\ContextMenu.h" RelativePath="..\src\WinControls\ContextMenu\ContextMenu.h"
> >