Skip to content

Commit a69e339

Browse files
committed
update further files with N++ 8.4.6 files but dark mode parts removed
1 parent 33e550e commit a69e339

11 files changed

+299
-304
lines changed

include/Common.h

+8-19
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,18 @@
11
// This file is part of Notepad++ project
2-
// Copyright (C)2020 Don HO <[email protected]>
3-
//
4-
// This program is free software; you can redistribute it and/or
5-
// modify it under the terms of the GNU General Public License
6-
// as published by the Free Software Foundation; either
7-
// version 2 of the License, or (at your option) any later version.
8-
//
9-
// Note that the GPL places important restrictions on "derived works", yet
10-
// it does not provide a detailed definition of that term. To avoid
11-
// misunderstandings, we consider an application to constitute a
12-
// "derivative work" for the purpose of this license if it does any of the
13-
// following:
14-
// 1. Integrates source code from Notepad++.
15-
// 2. Integrates/includes/aggregates Notepad++ into a proprietary executable
16-
// installer, such as those produced by InstallShield.
17-
// 3. Links to a library or executes a program that does any of the above.
2+
// Copyright (C)2021 Don HO <[email protected]>
3+
4+
// This program is free software: you can redistribute it and/or modify
5+
// it under the terms of the GNU General Public License as published by
6+
// the Free Software Foundation, either version 3 of the License, or
7+
// at your option any later version.
188
//
199
// This program is distributed in the hope that it will be useful,
2010
// but WITHOUT ANY WARRANTY; without even the implied warranty of
21-
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2212
// GNU General Public License for more details.
2313
//
2414
// You should have received a copy of the GNU General Public License
25-
// along with this program; if not, write to the Free Software
26-
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
15+
// along with this program. If not, see <https://www.gnu.org/licenses/>.
2716

2817
// NOTE : Extremely cleaned out, if you need more go to: https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/src/MISC/Common/Common.h
2918

include/Docking.h

+27-37
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,18 @@
1-
// this file is part of Notepad++
2-
// Copyright (C)2005 Jens Lorenz <[email protected]>
3-
//
4-
// This program is free software; you can redistribute it and/or
5-
// modify it under the terms of the GNU General Public License
6-
// as published by the Free Software Foundation; either
7-
// version 2 of the License, or (at your option) any later version.
8-
//
9-
// // Note that the GPL places important restrictions on "derived works", yet
10-
// it does not provide a detailed definition of that term. To avoid
11-
// misunderstandings, we consider an application to constitute a
12-
// "derivative work" for the purpose of this license if it does any of the
13-
// following:
14-
// 1. Integrates source code from Notepad++.
15-
// 2. Integrates/includes/aggregates Notepad++ into a proprietary executable
16-
// installer, such as those produced by InstallShield.
17-
// 3. Links to a library or executes a program that does any of the above.
18-
//
1+
// This file is part of Notepad++ project
2+
// Copyright (C)2021 Don HO <[email protected]>
3+
4+
// This program is free software: you can redistribute it and/or modify
5+
// it under the terms of the GNU General Public License as published by
6+
// the Free Software Foundation, either version 3 of the License, or
7+
// at your option any later version.
8+
//
199
// This program is distributed in the hope that it will be useful,
2010
// but WITHOUT ANY WARRANTY; without even the implied warranty of
21-
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2212
// GNU General Public License for more details.
23-
//
13+
//
2414
// You should have received a copy of the GNU General Public License
25-
// along with this program; if not, write to the Free Software
26-
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
15+
// along with this program. If not, see <https://www.gnu.org/licenses/>.
2716

2817

2918
#pragma once
@@ -47,6 +36,7 @@
4736
#define DWS_ICONTAB 0x00000001 // Icon for tabs are available
4837
#define DWS_ICONBAR 0x00000002 // Icon for icon bar are available (currently not supported)
4938
#define DWS_ADDINFO 0x00000004 // Additional information are in use
39+
#define DWS_USEOWNDARKMODE 0x00000008 // Use plugin's own dark mode
5040
#define DWS_PARAMSALL (DWS_ICONTAB|DWS_ICONBAR|DWS_ADDINFO)
5141

5242
// default docking values for first call of plugin
@@ -57,27 +47,27 @@
5747
#define DWS_DF_FLOATING 0x80000000 // default state is floating
5848

5949

60-
typedef struct {
61-
HWND hClient; // client Window Handle
62-
const TCHAR *pszName; // name of plugin (shown in window)
63-
int dlgID; // a funcItem provides the function pointer to start a dialog. Please parse here these ID
50+
struct tTbData {
51+
HWND hClient = nullptr; // client Window Handle
52+
const TCHAR* pszName = nullptr; // name of plugin (shown in window)
53+
int dlgID = 0; // a funcItem provides the function pointer to start a dialog. Please parse here these ID
6454

6555
// user modifications
66-
UINT uMask; // mask params: look to above defines
67-
HICON hIconTab; // icon for tabs
68-
const TCHAR *pszAddInfo; // for plugin to display additional informations
56+
UINT uMask = 0; // mask params: look to above defines
57+
HICON hIconTab = nullptr; // icon for tabs
58+
const TCHAR* pszAddInfo = nullptr; // for plugin to display additional informations
6959

7060
// internal data, do not use !!!
71-
RECT rcFloat; // floating position
72-
int iPrevCont; // stores the privious container (toggling between float and dock)
73-
const TCHAR* pszModuleName; // it's the plugin file name. It's used to identify the plugin
74-
} tTbData;
61+
RECT rcFloat = {}; // floating position
62+
int iPrevCont = 0; // stores the privious container (toggling between float and dock)
63+
const TCHAR* pszModuleName = nullptr; // it's the plugin file name. It's used to identify the plugin
64+
};
7565

7666

77-
typedef struct {
78-
HWND hWnd; // the docking manager wnd
79-
RECT rcRegion[DOCKCONT_MAX]; // position of docked dialogs
80-
} tDockMgr;
67+
struct tDockMgr {
68+
HWND hWnd = nullptr; // the docking manager wnd
69+
RECT rcRegion[DOCKCONT_MAX] = {{}}; // position of docked dialogs
70+
};
8171

8272

8373
#define HIT_TEST_THICKNESS 20

include/DockingDlgInterface.h

+14-22
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,18 @@
1-
// this file is part of Function List Plugin for Notepad++
2-
// Copyright (C)2005 Jens Lorenz <[email protected]>
3-
//
4-
// This program is free software; you can redistribute it and/or
5-
// modify it under the terms of the GNU General Public License
6-
// as published by the Free Software Foundation; either
7-
// version 2 of the License, or (at your option) any later version.
8-
//
9-
// Note that the GPL places important restrictions on "derived works", yet
10-
// it does not provide a detailed definition of that term. To avoid
11-
// misunderstandings, we consider an application to constitute a
12-
// "derivative work" for the purpose of this license if it does any of the
13-
// following:
14-
// 1. Integrates source code from Notepad++.
15-
// 2. Integrates/includes/aggregates Notepad++ into a proprietary executable
16-
// installer, such as those produced by InstallShield.
17-
// 3. Links to a library or executes a program that does any of the above.
1+
// This file is part of Notepad++ project
2+
// Copyright (C)2006 Jens Lorenz <[email protected]>
3+
4+
// This program is free software: you can redistribute it and/or modify
5+
// it under the terms of the GNU General Public License as published by
6+
// the Free Software Foundation, either version 3 of the License, or
7+
// at your option any later version.
188
//
199
// This program is distributed in the hope that it will be useful,
2010
// but WITHOUT ANY WARRANTY; without even the implied warranty of
21-
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2212
// GNU General Public License for more details.
23-
//
13+
//
2414
// You should have received a copy of the GNU General Public License
25-
// along with this program; if not, write to the Free Software
15+
// along with this program. If not, see <https://www.gnu.org/licenses/>.
2616

2717

2818
#pragma once
@@ -72,7 +62,9 @@ class DockingDlgInterface : public StaticDialog
7262
::SendMessage(_hParent, NPPM_DMMUPDATEDISPINFO, 0, reinterpret_cast<LPARAM>(_hSelf));
7363
}
7464

75-
virtual void destroy() {}
65+
virtual void destroy() {
66+
StaticDialog::destroy();
67+
}
7668

7769
virtual void setBackgroundColor(COLORREF) {}
7870
virtual void setForegroundColor(COLORREF) {}
@@ -101,7 +93,7 @@ protected :
10193
generic_string _pluginName;
10294
bool _isClosed = false;
10395

104-
virtual INT_PTR CALLBACK run_dlgProc(UINT message, WPARAM, LPARAM lParam) {
96+
virtual intptr_t CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) {
10597
switch (message)
10698
{
10799
case WM_NOTIFY:

include/Sci_Position.h

-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@
1515
typedef ptrdiff_t Sci_Position;
1616

1717
// Unsigned variant used for ILexer::Lex and ILexer::Fold
18-
// Definitions of common types
1918
typedef size_t Sci_PositionU;
2019

21-
2220
// For Sci_CharacterRange which is defined as long to be compatible with Win32 CHARRANGE
2321
typedef intptr_t Sci_PositionCR;
2422

0 commit comments

Comments
 (0)