Skip to content
This repository was archived by the owner on Jan 13, 2024. It is now read-only.

Commit 35b2dcb

Browse files
committed
Merge pull request #5 from kbilsted/topic/splitfiles
Topic/splitfiles
2 parents 071844a + ca1011c commit 35b2dcb

File tree

7 files changed

+2004
-1951
lines changed

7 files changed

+2004
-1951
lines changed

Demo Plugin/NppManagedPluginDemo/NppManagedPluginDemo.VS2015.csproj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,18 @@
4848
<Compile Include="..\..\Visual Studio Project Template C#\DllExport\DllExportAttribute.cs">
4949
<Link>DllExport\DllExportAttribute.cs</Link>
5050
</Compile>
51+
<Compile Include="..\..\Visual Studio Project Template C#\Integration\Docking_h.cs">
52+
<Link>Integration\Docking_h.cs</Link>
53+
</Compile>
54+
<Compile Include="..\..\Visual Studio Project Template C#\Integration\MenuCmdID_h.cs">
55+
<Link>Integration\MenuCmdID_h.cs</Link>
56+
</Compile>
57+
<Compile Include="..\..\Visual Studio Project Template C#\Integration\Msgs_h.cs">
58+
<Link>Integration\Msgs_h.cs</Link>
59+
</Compile>
60+
<Compile Include="..\..\Visual Studio Project Template C#\Integration\Scintilla_iface.cs">
61+
<Link>Integration\Scintilla_iface.cs</Link>
62+
</Compile>
5163
<Compile Include="..\..\Visual Studio Project Template C#\NppPluginNETBase.cs">
5264
<Link>NppPluginNETBase.cs</Link>
5365
</Compile>

Visual Studio Project Template C#/$projectname$.csproj

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2+
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<PropertyGroup>
44
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
55
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
@@ -10,6 +10,12 @@
1010
<RootNamespace>$safeprojectname$</RootNamespace>
1111
<AssemblyName>$safeprojectname$</AssemblyName>
1212
<OutputPath>bin\Debug\</OutputPath>
13+
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
14+
<FileUpgradeFlags>
15+
</FileUpgradeFlags>
16+
<UpgradeBackupLocation>
17+
</UpgradeBackupLocation>
18+
<OldToolsVersion>3.5</OldToolsVersion>
1319
</PropertyGroup>
1420
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1521
<DebugSymbols>true</DebugSymbols>
@@ -44,6 +50,10 @@
4450
<Compile Include="Main.cs" />
4551
<Compile Include="NppPluginNETBase.cs" />
4652
<Compile Include="NppPluginNETHelper.cs" />
53+
<Compile Include="Integration\Docking_h.cs" />
54+
<Compile Include="Integration\MenuCmdID_h.cs" />
55+
<Compile Include="Integration\Scintilla_iface.cs" />
56+
<Compile Include="Integration\Msgs_h.cs" />
4757
<Compile Include="Properties\AssemblyInfo.cs" />
4858
<Compile Include="Properties\Resources.Designer.cs">
4959
<AutoGen>True</AutoGen>
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
// NPP plugin for .Net by Kasper Graversen
2+
//
3+
// This file should stay in sync with the CPP project file
4+
// "notepad-plus-plus/PowerEditor/src/WinControls/DockingWnd/Docking.h"
5+
// found at
6+
// https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/src/WinControls/DockingWnd/Docking.h
7+
8+
using System;
9+
using System.Runtime.InteropServices;
10+
11+
namespace Kbg.NppPluginNET
12+
{
13+
14+
[Flags]
15+
public enum NppTbMsg : uint
16+
{
17+
// styles for containers
18+
//CAPTION_TOP = 1,
19+
//CAPTION_BOTTOM = 0,
20+
21+
// defines for docking manager
22+
CONT_LEFT = 0,
23+
CONT_RIGHT = 1,
24+
CONT_TOP = 2,
25+
CONT_BOTTOM = 3,
26+
DOCKCONT_MAX = 4,
27+
28+
// mask params for plugins of internal dialogs
29+
DWS_ICONTAB = 0x00000001, // Icon for tabs are available
30+
DWS_ICONBAR = 0x00000002, // Icon for icon bar are available (currently not supported)
31+
DWS_ADDINFO = 0x00000004, // Additional information are in use
32+
DWS_PARAMSALL = (DWS_ICONTAB | DWS_ICONBAR | DWS_ADDINFO),
33+
34+
// default docking values for first call of plugin
35+
DWS_DF_CONT_LEFT = (CONT_LEFT << 28), // default docking on left
36+
DWS_DF_CONT_RIGHT = (CONT_RIGHT << 28), // default docking on right
37+
DWS_DF_CONT_TOP = (CONT_TOP << 28), // default docking on top
38+
DWS_DF_CONT_BOTTOM = (CONT_BOTTOM << 28), // default docking on bottom
39+
DWS_DF_FLOATING = 0x80000000 // default state is floating
40+
}
41+
42+
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
43+
public struct NppTbData
44+
{
45+
public IntPtr hClient; // HWND: client Window Handle
46+
public string pszName; // TCHAR*: name of plugin (shown in window)
47+
public int dlgID; // int: a funcItem provides the function pointer to start a dialog. Please parse here these ID
48+
// user modifications
49+
public NppTbMsg uMask; // UINT: mask params: look to above defines
50+
public uint hIconTab; // HICON: icon for tabs
51+
public string pszAddInfo; // TCHAR*: for plugin to display additional informations
52+
// internal data, do not use !!!
53+
public RECT rcFloat; // RECT: floating position
54+
public int iPrevCont; // int: stores the privious container (toggling between float and dock)
55+
public string pszModuleName; // const TCHAR*: it's the plugin file name. It's used to identify the plugin
56+
}
57+
58+
[StructLayout(LayoutKind.Sequential)]
59+
public struct RECT
60+
{
61+
public RECT(int left, int top, int right, int bottom)
62+
{
63+
Left = left; Top = top; Right = right; Bottom = bottom;
64+
}
65+
public int Left;
66+
public int Top;
67+
public int Right;
68+
public int Bottom;
69+
}
70+
71+
}

0 commit comments

Comments
 (0)