Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions NppPlugin/include/DockingDlgInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#ifndef DOCKINGDLGINTERFACE_H
#define DOCKINGDLGINTERFACE_H

#include "stdafx.h"

#ifndef DOCKING_RESOURCE_H
#include "dockingResource.h"
#endif //DOCKING_RESOURCE_H
Expand Down
3 changes: 1 addition & 2 deletions NppPlugin/include/PluginInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
#ifndef PLUGININTERFACE_H
#define PLUGININTERFACE_H

#include <windows.h>
#include "Scintilla.h"
#include "Notepad_plus_msgs.h"

struct SCNotification;
const int nbChar = 64;

typedef const TCHAR * (__cdecl * PFUNCGETNAME)();
Expand Down
2 changes: 0 additions & 2 deletions NppPlugin/include/Window.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
#ifndef WINDOW_CONTROL_H
#define WINDOW_CONTROL_H

#include <windows.h>

class Window
{
public:
Expand Down
7 changes: 0 additions & 7 deletions PythonScript/include/PythonScript/NppPythonScript.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@
#define _NPPPYTHONSCRIPT_H



#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#undef WIN32_LEAN_AND_MEAN

#include <tchar.h>

#define PYSCR_START (WM_USER + 3500)

/** Execute a script in a file
Expand Down
19 changes: 9 additions & 10 deletions PythonScript/src/AboutDialog.h
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
#pragma once
#include "stdafx.h"
#ifndef _ABOUTDIALOG_H
#define _ABOUTDIALOG_H

#ifndef STATIC_DIALOG_H
#include "StaticDialog.h"
#include "PluginInterface.h"
#endif

struct NppData;

class AboutDialog : public StaticDialog
{
public:
AboutDialog(void);
~AboutDialog(void);

void init(HINSTANCE hInst, NppData nppData)
{
_nppData = nppData;
Window::init(hInst, nppData._nppHandle);
};
void init(HINSTANCE hInst, NppData& nppData);

void doDialog();
BOOL CALLBACK AboutDialog::run_dlgProc(HWND hWnd, UINT Message, WPARAM wParam, LPARAM lParam);

private:
NppData _nppData;

HBRUSH m_hbrBackground;
};

#endif // _ABOUTDIALOG_H
10 changes: 7 additions & 3 deletions PythonScript/src/AboutDialog2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
#include "AboutDialog.h"
#include "PythonScriptVersion.h"
#include "resource.h"

//using namespace std;
#include "PluginInterface.h"

AboutDialog::AboutDialog(void)
{
Expand Down Expand Up @@ -73,4 +72,9 @@ BOOL CALLBACK AboutDialog::run_dlgProc(HWND hWnd, UINT Message, WPARAM wParam, L
}
}
return FALSE;
}
}

void AboutDialog::init( HINSTANCE hInst, NppData& nppData )
{
Window::init(hInst, nppData._nppHandle);
}
2 changes: 1 addition & 1 deletion PythonScript/src/ConfigFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,4 @@ const std::string& ConfigFile::getMenuScript(int index) const
{
return m_emptyString;
}
}
}
2 changes: 0 additions & 2 deletions PythonScript/src/ConfigFile.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef _CONFIGFILE_H
#define _CONFIGFILE_H

#include "stdafx.h"

class ConfigFile
{
public:
Expand Down
7 changes: 3 additions & 4 deletions PythonScript/src/ConsoleDialog.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#include "stdafx.h"
#include "ConsoleDialog.h"
#include "Notepad_Plus_msgs.h"
#include "DockingDlgInterface.h"
#include "Scintilla.h"
#include "SciLexer.h"
#include "resource.h"
#include "PythonConsole.h"
#include "PluginInterface.h"

using namespace std;

Expand All @@ -29,7 +28,7 @@ ConsoleDialog::~ConsoleDialog()
}


void ConsoleDialog::init(HINSTANCE hInst, NppData nppData, ConsoleInterface* console)
void ConsoleDialog::init(HINSTANCE hInst, NppData& nppData, ConsoleInterface* console)
{
DockingDlgInterface::init(hInst, nppData._nppHandle);

Expand Down Expand Up @@ -993,4 +992,4 @@ void ConsoleDialog::onHotspotClick(SCNotification* notification)
}
}

}
}
8 changes: 5 additions & 3 deletions PythonScript/src/ConsoleDialog.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#ifndef _CONSOLEDIALOG_H
#define _CONSOLEDIALOG_H

#include "stdafx.h"
#ifndef DOCKINGDLGINTERFACE_H
#include "DockingDlgInterface.h"
#include "PluginInterface.h"
#endif

void export_console();

struct SCNotification;
struct NppData;
class ConsoleInterface;
struct LineDetails;

Expand All @@ -17,7 +19,7 @@ class ConsoleDialog : public DockingDlgInterface
~ConsoleDialog();


void init(HINSTANCE hInst, NppData nppData, ConsoleInterface *console);
void init(HINSTANCE hInst, NppData& nppData, ConsoleInterface *console);

void doDialog();
void hide();
Expand Down
2 changes: 0 additions & 2 deletions PythonScript/src/ConsoleInterface.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef _CONSOLEINTERFACE_H
#define _CONSOLEINTERFACE_H

#include "stdafx.h"

class ConsoleInterface
{
public:
Expand Down
3 changes: 2 additions & 1 deletion PythonScript/src/DynamicIDManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "stdafx.h"

#include "DynamicIDManager.h"
#include "IDAllocator.h"

using namespace std;

Expand Down Expand Up @@ -144,4 +145,4 @@ bool DynamicIDManager::inRange(int id)
}

return retVal;
}
}
2 changes: 1 addition & 1 deletion PythonScript/src/DynamicIDManager.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef _DYNAMICIDMANAGER_H
#define _DYNAMICIDMANAGER_H

#include "IDAllocator.h"
class IDAllocator;

class DynamicIDManager
{
Expand Down
7 changes: 5 additions & 2 deletions PythonScript/src/Enums.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
#ifndef _ENUMS_H
#define _ENUMS_H

#include "stdafx.h"
#include "Scintilla.h"
#ifndef SCILEXER_H
#include "SciLexer.h"
#endif

#ifndef _SCINTILLANOTIFICATIONS_H
#include "ScintillaNotifications.h"
#endif

void export_enums();

Expand Down
4 changes: 1 addition & 3 deletions PythonScript/src/EnumsWrapper.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#include "stdafx.h"
#include "Scintilla.h"
#include "Enums.h"


using namespace boost::python;

void export_enums()
Expand Down Expand Up @@ -1178,4 +1176,4 @@ void export_enums()
.value("SCI_DESCRIBEKEYWORDSETS", PYSCR_SCI_DESCRIBEKEYWORDSETS);

/* --Autogenerated --------------------------------------------*/
}
}
1 change: 0 additions & 1 deletion PythonScript/src/HelpController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include "HelpController.h"
#include "Scintilla.h"
#include <ShellApi.h>
#include "Notepad_plus_msgs.h"
#include "WcharMbcsConverter.h"
#include "PythonScriptVersion.h"
Expand Down
5 changes: 2 additions & 3 deletions PythonScript/src/MenuManager.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#include "stdafx.h"
#include "keys.h"
#include "MenuManager.h"
#include "Notepad_Plus_Msgs.h"
#include "WcharMbcsConverter.h"
#include "ConfigFile.h"
#include <PluginInterface.h>
#include "PluginInterface.h"
#include "StaticIDAllocator.h"
#include "NppAllocator.h"
#include "DynamicIDManager.h"
Expand Down Expand Up @@ -1074,4 +1073,4 @@ bool MenuManager::inDynamicRange(int commandID)
bool MenuManager::inFixedRange(int commandID)
{
return m_originalDynamicMenuManager->inRange(commandID);
}
}
9 changes: 7 additions & 2 deletions PythonScript/src/MenuManager.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#include "stdafx.h"
#ifndef _MENUMANAGER_H
#define _MENUMANAGER_H

#ifndef _PYTHONSCRIPT_H
#include "PythonScript.h"
#include "PluginInterface.h"
#endif

struct ShortcutKey;

// The DYNAMIC_ADD_ID is used for the CommandIDs for dynamic menu entries added between restarts
// It is added to the ID allocated to the first /real/ menu item (ie. probably "New Script")
Expand Down Expand Up @@ -196,3 +200,4 @@ class MenuManager

};

#endif _MENUMANAGER_H
7 changes: 5 additions & 2 deletions PythonScript/src/NotepadPlusBuffer.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "stdafx.h"
#ifndef _NOTEPADPLUSBUFFER_H
#define _NOTEPADPLUSBUFFER_H

enum DOCUMENTSTATUS
{
Expand Down Expand Up @@ -31,4 +32,6 @@ class NotepadPlusBuffer
int m_bufferID;
tstring m_filename;
DOCUMENTSTATUS m_status;
};
};

#endif
6 changes: 4 additions & 2 deletions PythonScript/src/NotepadPlusWrapper.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#include "stdafx.h"

#include "Scintilla.h"
#include "WcharMbcsConverter.h"
#include "NotepadPlusWrapper.h"
#include "menuCmdID.h"
#include "PromptDialog.h"
#include "MenuManager.h"
#include "PluginInterface.h"
#include "ScintillaWrapper.h"

using namespace std;
using namespace boost::python;
Expand Down Expand Up @@ -855,4 +857,4 @@ object NotepadPlusWrapper::allocateMarker(int quantity)
{
return object();
}
}
}
17 changes: 11 additions & 6 deletions PythonScript/src/NotepadPlusWrapper.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
#ifndef _NOTEPADPLUSWRAPPER_H
#define _NOTEPADPLUSWRAPPER_H

#include "stdafx.h"
#ifndef NOTEPAD_PLUS_MSGS_H
#include "Notepad_plus_msgs.h"
#endif

#ifndef MENUCMDID_H
#include "menuCmdID.h"
#include "PluginInterface.h"
#include "ScintillaWrapper.h"
#endif

struct SCNotification;
class ScintillaWrapper;

enum FormatType
{
Expand Down Expand Up @@ -460,9 +465,9 @@ class NotepadPlusWrapper

void loadSession(boost::python::str filename);

void activateFileString(str filename);
void activateFileString(boost::python::str filename);

void reloadFile(str filename, bool withAlert);
void reloadFile(boost::python::str filename, bool withAlert);

void saveAllFiles();

Expand Down Expand Up @@ -529,7 +534,7 @@ class NotepadPlusWrapper

boost::python::object prompt(boost::python::object promptObj, boost::python::object title, boost::python::object initial);
boost::python::object promptDefault(boost::python::object promptObj, boost::python::object title)
{ return prompt(promptObj, title, object()); };
{ return prompt(promptObj, title, boost::python::object()); };

boost::python::str getBufferFilename(int bufferID);
boost::python::str getCurrentFilename();
Expand Down
4 changes: 2 additions & 2 deletions PythonScript/src/NotepadPython.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

#include "stdafx.h"
#include "NotepadPython.h"
#include "Notepad_Plus_msgs.h"
#include "NotepadPlusWrapper.h"
#include "ScintillaWrapper.h"

#include "ProcessExecute.h"
using namespace boost::python;

Expand Down
4 changes: 1 addition & 3 deletions PythonScript/src/NotepadPython.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#ifndef _NOTEPADPYTHON_H
#define _NOTEPADPYTHON_H

#include "stdafx.h"
#include "NotepadPlusWrapper.h"
class NotepadPlusWrapper;

void export_notepad();


void importNotepad(NotepadPlusWrapper* instance);


Expand Down
Loading