Docking_h.cs 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. // NPP plugin platform for .Net v0.94.00 by Kasper B. Graversen etc.
  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. using System;
  8. using System.Runtime.InteropServices;
  9. namespace Kbg.NppPluginNET.PluginInfrastructure
  10. {
  11. [Flags]
  12. public enum NppTbMsg : uint
  13. {
  14. // styles for containers
  15. //CAPTION_TOP = 1,
  16. //CAPTION_BOTTOM = 0,
  17. // defines for docking manager
  18. CONT_LEFT = 0,
  19. CONT_RIGHT = 1,
  20. CONT_TOP = 2,
  21. CONT_BOTTOM = 3,
  22. DOCKCONT_MAX = 4,
  23. // mask params for plugins of internal dialogs
  24. DWS_ICONTAB = 0x00000001, // Icon for tabs are available
  25. DWS_ICONBAR = 0x00000002, // Icon for icon bar are available (currently not supported)
  26. DWS_ADDINFO = 0x00000004, // Additional information are in use
  27. DWS_PARAMSALL = (DWS_ICONTAB | DWS_ICONBAR | DWS_ADDINFO),
  28. // default docking values for first call of plugin
  29. DWS_DF_CONT_LEFT = (CONT_LEFT << 28), // default docking on left
  30. DWS_DF_CONT_RIGHT = (CONT_RIGHT << 28), // default docking on right
  31. DWS_DF_CONT_TOP = (CONT_TOP << 28), // default docking on top
  32. DWS_DF_CONT_BOTTOM = (CONT_BOTTOM << 28), // default docking on bottom
  33. DWS_DF_FLOATING = 0x80000000 // default state is floating
  34. }
  35. [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
  36. public struct NppTbData
  37. {
  38. public IntPtr hClient; // HWND: client Window Handle
  39. public string pszName; // TCHAR*: name of plugin (shown in window)
  40. public int dlgID; // int: a funcItem provides the function pointer to start a dialog. Please parse here these ID
  41. // user modifications
  42. public NppTbMsg uMask; // UINT: mask params: look to above defines
  43. public uint hIconTab; // HICON: icon for tabs
  44. public string pszAddInfo; // TCHAR*: for plugin to display additional informations
  45. // internal data, do not use !!!
  46. public RECT rcFloat; // RECT: floating position
  47. public int iPrevCont; // int: stores the privious container (toggling between float and dock)
  48. public string pszModuleName; // const TCHAR*: it's the plugin file name. It's used to identify the plugin
  49. }
  50. [StructLayout(LayoutKind.Sequential)]
  51. public struct RECT
  52. {
  53. public RECT(int left, int top, int right, int bottom)
  54. {
  55. Left = left; Top = top; Right = right; Bottom = bottom;
  56. }
  57. public int Left;
  58. public int Top;
  59. public int Right;
  60. public int Bottom;
  61. }
  62. }