|
| 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