Skip to content
Closed
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
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ arm64/
vs.proj/.vs/
vs.proj/x64/
vs.proj/ARM64
vs.proj/Debug/
vs.proj/Release/
vs.proj/Win32/
UpgradeLog.htm
vs.proj/NppPluginConverter.vcxproj.user
vs.proj/NppPluginConverter.exp
Expand All @@ -18,4 +17,6 @@ vs.proj/NppPluginConverter.lib
*.exp
*.aps
*.bak
*.log
*.tlog
vs.proj/NppConverter.lib
40 changes: 20 additions & 20 deletions source/DockingFeature/Docking.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This file is part of Notepad++ project
// Copyright (C)2022 Don HO <don.h@free.fr>
// Copyright (C)2025 Don HO <don.h@free.fr>

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
Expand All @@ -15,8 +15,9 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.


#ifndef DOCKING_H
#define DOCKING_H
#pragma once

#include <windows.h>

// ATTENTION : It's a part of interface header, so don't include the others header here

Expand All @@ -35,6 +36,7 @@
#define DWS_ICONTAB 0x00000001 // Icon for tabs are available
#define DWS_ICONBAR 0x00000002 // Icon for icon bar are available (currently not supported)
#define DWS_ADDINFO 0x00000004 // Additional information are in use
#define DWS_USEOWNDARKMODE 0x00000008 // Use plugin's own dark mode
#define DWS_PARAMSALL (DWS_ICONTAB|DWS_ICONBAR|DWS_ADDINFO)

// default docking values for first call of plugin
Expand All @@ -45,31 +47,29 @@
#define DWS_DF_FLOATING 0x80000000 // default state is floating


typedef struct {
HWND hClient; // client Window Handle
TCHAR *pszName; // name of plugin (shown in window)
int dlgID; // a funcItem provides the function pointer to start a dialog. Please parse here these ID
struct tTbData {
HWND hClient = nullptr; // client Window Handle
const wchar_t* pszName = nullptr; // name of plugin (shown in window)
int dlgID = 0; // a funcItem provides the function pointer to start a dialog. Please parse here these ID

// user modifications
UINT uMask; // mask params: look to above defines
HICON hIconTab; // icon for tabs
TCHAR *pszAddInfo; // for plugin to display additional informations
UINT uMask = 0; // mask params: look to above defines
HICON hIconTab = nullptr; // icon for tabs
const wchar_t* pszAddInfo = nullptr; // for plugin to display additional information

// internal data, do not use !!!
RECT rcFloat; // floating position
int iPrevCont; // stores the privious container (toggling between float and dock)
const TCHAR* pszModuleName; // it's the plugin file name. It's used to identify the plugin
} tTbData;
RECT rcFloat = {}; // floating position
int iPrevCont = 0; // stores the privious container (toggling between float and dock)
const wchar_t* pszModuleName = nullptr; // it's the plugin file name. It's used to identify the plugin
};


typedef struct {
HWND hWnd; // the docking manager wnd
RECT rcRegion[DOCKCONT_MAX]; // position of docked dialogs
} tDockMgr;
struct tDockMgr {
HWND hWnd = nullptr; // the docking manager wnd
RECT rcRegion[DOCKCONT_MAX] = {{}}; // position of docked dialogs
};


#define HIT_TEST_THICKNESS 20
#define SPLITTER_WIDTH 4


#endif // DOCKING_H
60 changes: 28 additions & 32 deletions source/DockingFeature/dockingResource.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//this file is part of docking functionality for Notepad++
//Copyright (C)2006 Jens Lorenz <jens.plugin.npp@gmx.de>
//
// This file is part of Notepad++ project
// Copyright (C)2006 Jens Lorenz <jens.plugin.npp@gmx.de>

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
Expand All @@ -14,9 +14,13 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

// Contribution by Don HO <don.h@free.fr>
// Date of Contribution: 2025-05-14
// Description of Contribution: Minor change

#ifndef DOCKING_RESOURCE_H
#define DOCKING_RESOURCE_H
#pragma once

#define DM_NOFOCUSWHILECLICKINGCAPTION L"NOFOCUSWHILECLICKINGCAPTION"

#define IDD_PLUGIN_DLG 103
#define IDC_EDIT1 1000
Expand All @@ -31,33 +35,25 @@
#define IDC_BTN_CAPTION 1050

#define DMM_MSG 0x5000
#define DMM_CLOSE (DMM_MSG + 1)
#define DMM_DOCK (DMM_MSG + 2)
#define DMM_FLOAT (DMM_MSG + 3)
#define DMM_DOCKALL (DMM_MSG + 4)
#define DMM_FLOATALL (DMM_MSG + 5)
#define DMM_MOVE (DMM_MSG + 6)
#define DMM_UPDATEDISPINFO (DMM_MSG + 7)
#define DMM_GETIMAGELIST (DMM_MSG + 8)
#define DMM_GETICONPOS (DMM_MSG + 9)
#define DMM_DROPDATA (DMM_MSG + 10)
#define DMM_MOVE_SPLITTER (DMM_MSG + 11)
#define DMM_CANCEL_MOVE (DMM_MSG + 12)
#define DMM_LBUTTONUP (DMM_MSG + 13)
#define DMM_CLOSE (DMM_MSG + 1)
#define DMM_DOCK (DMM_MSG + 2)
#define DMM_FLOAT (DMM_MSG + 3)
#define DMM_DOCKALL (DMM_MSG + 4)
#define DMM_FLOATALL (DMM_MSG + 5)
#define DMM_MOVE (DMM_MSG + 6)
#define DMM_UPDATEDISPINFO (DMM_MSG + 7)
//#define DMM_GETIMAGELIST (DMM_MSG + 8)
//#define DMM_GETICONPOS (DMM_MSG + 9)
#define DMM_DROPDATA (DMM_MSG + 10)
#define DMM_MOVE_SPLITTER (DMM_MSG + 11)
#define DMM_CANCEL_MOVE (DMM_MSG + 12)
#define DMM_LBUTTONUP (DMM_MSG + 13)

#define DMN_FIRST 1050
#define DMN_CLOSE (DMN_FIRST + 1)
//nmhdr.code = DWORD(DMN_CLOSE, 0));
//nmhdr.hwndFrom = hwndNpp;
//nmhdr.idFrom = ctrlIdNpp;

#define DMN_DOCK (DMN_FIRST + 2)
#define DMN_FLOAT (DMN_FIRST + 3)
//nmhdr.code = DWORD(DMN_XXX, int newContainer);
//nmhdr.hwndFrom = hwndNpp;
//nmhdr.idFrom = ctrlIdNpp;



#endif //DOCKING_RESOURCE_H
#define DMN_CLOSE (DMN_FIRST + 1)
#define DMN_DOCK (DMN_FIRST + 2)
#define DMN_FLOAT (DMN_FIRST + 3)
#define DMN_SWITCHIN (DMN_FIRST + 4)
#define DMN_SWITCHOFF (DMN_FIRST + 5)
#define DMN_FLOATDROPPED (DMN_FIRST + 6)

Loading
Loading