This repository was archived by the owner on Jan 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathDocking_h.cs
More file actions
72 lines (63 loc) · 3.04 KB
/
Docking_h.cs
File metadata and controls
72 lines (63 loc) · 3.04 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc.
//
// This file should stay in sync with the CPP project file
// "notepad-plus-plus/PowerEditor/src/WinControls/DockingWnd/Docking.h"
// found at
// https://github.com/notepad-plus-plus/notepad-plus-plus/blob/master/PowerEditor/src/WinControls/DockingWnd/Docking.h
using System;
using System.Runtime.InteropServices;
namespace Kbg.NppPluginNET.PluginInfrastructure
{
[Flags]
public enum NppTbMsg : uint
{
// styles for containers
//CAPTION_TOP = 1,
//CAPTION_BOTTOM = 0,
// defines for docking manager
CONT_LEFT = 0,
CONT_RIGHT = 1,
CONT_TOP = 2,
CONT_BOTTOM = 3,
DOCKCONT_MAX = 4,
// mask params for plugins of internal dialogs
DWS_ICONTAB = 0x00000001, // Icon for tabs are available
DWS_ICONBAR = 0x00000002, // Icon for icon bar are available (currently not supported)
DWS_ADDINFO = 0x00000004, // Additional information are in use
DWS_USEOWNDARKMODE = 0x00000008, // Use plugin's own dark mode
DWS_PARAMSALL = (DWS_ICONTAB | DWS_ICONBAR | DWS_ADDINFO),
// default docking values for first call of plugin
DWS_DF_CONT_LEFT = (CONT_LEFT << 28), // default docking on left
DWS_DF_CONT_RIGHT = (CONT_RIGHT << 28), // default docking on right
DWS_DF_CONT_TOP = (CONT_TOP << 28), // default docking on top
DWS_DF_CONT_BOTTOM = (CONT_BOTTOM << 28), // default docking on bottom
DWS_DF_FLOATING = 0x80000000 // default state is floating
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct NppTbData
{
public IntPtr hClient; // HWND: client Window Handle
public string pszName; // TCHAR*: name of plugin (shown in window)
public int dlgID; // int: a funcItem provides the function pointer to start a dialog. Please parse here these ID
// user modifications
public NppTbMsg uMask; // UINT: mask params: look to above defines
public uint hIconTab; // HICON: icon for tabs
public string pszAddInfo; // TCHAR*: for plugin to display additional informations
// internal data, do not use !!!
public RECT rcFloat; // RECT: floating position
public int iPrevCont; // int: stores the privious container (toggling between float and dock)
public string pszModuleName; // const TCHAR*: it's the plugin file name. It's used to identify the plugin
}
[StructLayout(LayoutKind.Sequential)]
public struct RECT
{
public RECT(int left, int top, int right, int bottom)
{
Left = left; Top = top; Right = right; Bottom = bottom;
}
public int Left;
public int Top;
public int Right;
public int Bottom;
}
}