[UPDATE] Refactor Notepad_plus.cpp (in progress).

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@606 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2010-01-29 23:52:47 +00:00
parent 691849d1d9
commit 639c336587
6 changed files with 2008 additions and 1983 deletions

View File

@ -18,6 +18,9 @@
#ifndef M30_IDE_COMMUN_H #ifndef M30_IDE_COMMUN_H
#define M30_IDE_COMMUN_H #define M30_IDE_COMMUN_H
const bool dirUp = true;
const bool dirDown = false;
#define NPP_CP_WIN_1252 1252 #define NPP_CP_WIN_1252 1252
#define NPP_CP_DOS_437 437 #define NPP_CP_DOS_437 437
#define NPP_CP_BIG5 950 #define NPP_CP_BIG5 950

File diff suppressed because it is too large Load Diff

View File

@ -135,8 +135,8 @@ enum Views {
}; };
*/ */
struct TaskListInfo; struct TaskListInfo;
static TiXmlNodeA * searchDlgNode(TiXmlNodeA *node, const char *dlgTagName);
struct iconLocator { struct iconLocator {
int listIndex; int listIndex;
@ -201,9 +201,18 @@ public:
void doClose(BufferID, int whichOne); void doClose(BufferID, int whichOne);
//bool doDelete(const TCHAR *fileName) const {return ::DeleteFile(fileName) != 0;}; //bool doDelete(const TCHAR *fileName) const {return ::DeleteFile(fileName) != 0;};
inline void fileNew();
void fileOpen(); void fileOpen();
inline bool fileReload(); void fileNew() {
BufferID newBufID = MainFileManager->newEmptyDocument();
loadBufferIntoView(newBufID, currentView(), true); //true, because we want multiple new files if possible
activateBuffer(newBufID, currentView());
};
bool fileReload() {
BufferID buf = _pEditView->getCurrentBufferID();
return doReload(buf, buf->isDirty());
};
bool fileClose(BufferID id = BUFFER_INVALID, int curView = -1); //use curView to override view to close from bool fileClose(BufferID id = BUFFER_INVALID, int curView = -1); //use curView to override view to close from
bool fileCloseAll(); bool fileCloseAll();
bool fileCloseAllButCurrent(); bool fileCloseAllButCurrent();
@ -235,6 +244,7 @@ public:
const TCHAR * fileSaveSession(size_t nbFile, TCHAR ** fileNames, const TCHAR *sessionFile2save); const TCHAR * fileSaveSession(size_t nbFile, TCHAR ** fileNames, const TCHAR *sessionFile2save);
const TCHAR * fileSaveSession(size_t nbFile = 0, TCHAR ** fileNames = NULL); const TCHAR * fileSaveSession(size_t nbFile = 0, TCHAR ** fileNames = NULL);
TiXmlNodeA * searchDlgNode(TiXmlNodeA *node, const char *dlgTagName);
bool changeDlgLang(HWND hDlg, const char *dlgTagName, char *title = NULL); bool changeDlgLang(HWND hDlg, const char *dlgTagName, char *title = NULL);
void changeFindReplaceDlgLang(); void changeFindReplaceDlgLang();
void changeConfigLang(); void changeConfigLang();
@ -251,7 +261,7 @@ public:
bool doBlockComment(comment_mode currCommentMode); bool doBlockComment(comment_mode currCommentMode);
bool doStreamComment(); bool doStreamComment();
inline void doTrimTrailing(); void doTrimTrailing();
inline HACCEL getAccTable() const{ inline HACCEL getAccTable() const{
return _accelerator.getAccTable(); return _accelerator.getAccTable();

File diff suppressed because it is too large Load Diff

View File

@ -34,9 +34,6 @@
#include "Notepad_plus_msgs.h" #include "Notepad_plus_msgs.h"
#endif //NOTEPAD_PLUS_MSGS_H #endif //NOTEPAD_PLUS_MSGS_H
const bool dirUp = true;
const bool dirDown = false;
#define TASKLIST_USER (WM_USER + 8000) #define TASKLIST_USER (WM_USER + 8000)
#define WM_GETTASKLISTINFO (TASKLIST_USER + 01) #define WM_GETTASKLISTINFO (TASKLIST_USER + 01)

View File

@ -498,6 +498,10 @@
RelativePath="..\src\Notepad_plus.cpp" RelativePath="..\src\Notepad_plus.cpp"
> >
</File> </File>
<File
RelativePath="..\src\NppCommands.cpp"
>
</File>
<File <File
RelativePath="..\src\Parameters.cpp" RelativePath="..\src\Parameters.cpp"
> >