-
Notifications
You must be signed in to change notification settings - Fork 15
/
NppPlugin.h
38 lines (30 loc) · 912 Bytes
/
NppPlugin.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#pragma once
#include "NppMessager.h"
class CNppPlugin
{
protected:
CNppMessager m_nppMsgr;
HMODULE m_hDllModule;
public:
CNppPlugin();
virtual ~CNppPlugin();
// called from DllMain
void OnDllProcessAttach( HINSTANCE hDLLInstance );
void OnDllProcessDetach() const;
// standard n++ plugin functions
virtual void nppBeNotified( SCNotification* pscn ) = 0;
virtual FuncItem* nppGetFuncsArray( int* pnbFuncItems ) = 0;
virtual const TCHAR* nppGetName() = 0;
virtual LRESULT nppMessageProc( UINT /*uMessage*/, WPARAM /*wParam*/, LPARAM /*lParam*/ ) {
return 1;
}
void nppSetInfo( const NppData& nppd );
// common n++ notification
virtual void OnNppSetInfo( const NppData& /*nppd*/ ) { }
HMODULE getDllModule() const {
return m_hDllModule;
}
HWND getNppWnd() const {
return m_nppMsgr.getNppWnd();
}
};