1 // this file is part of Notepad++ 2 // Copyright (C)2005 Jens Lorenz <jens.plugin.npp@gmx.de> 3 // 4 // This program is free software; you can redistribute it and/or 5 // modify it under the terms of the GNU General Public License 6 // as published by the Free Software Foundation; either 7 // version 2 of the License, or (at your option) any later version. 8 // 9 // // Note that the GPL places important restrictions on "derived works", yet 10 // it does not provide a detailed definition of that term. To avoid 11 // misunderstandings, we consider an application to constitute a 12 // "derivative work" for the purpose of this license if it does any of the 13 // following: 14 // 1. Integrates source code from Notepad++. 15 // 2. Integrates/includes/aggregates Notepad++ into a proprietary executable 16 // installer, such as those produced by InstallShield. 17 // 3. Links to a library or executes a program that does any of the above. 18 // 19 // This program is distributed in the hope that it will be useful, 20 // but WITHOUT ANY WARRANTY; without even the implied warranty of 21 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 // GNU General Public License for more details. 23 // 24 // You should have received a copy of the GNU General Public License 25 // along with this program; if not, write to the Free Software 26 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 27 /** 28 * 29 * 30 * License: GPL-2.0 or later 31 */ 32 module npp_api.PowerEditor.WinControls.DockingWnd.Docking; 33 34 35 version (Windows): 36 37 private static import core.sys.windows.windef; 38 private static import core.sys.windows.winnt; 39 40 // ATTENTION : It's a part of interface header, so don't include the others header here 41 42 // styles for containers 43 enum CAPTION_TOP = core.sys.windows.windef.TRUE; 44 enum CAPTION_BOTTOM = core.sys.windows.windef.FALSE; 45 46 // defines for docking manager 47 enum CONT_LEFT = 0; 48 enum CONT_RIGHT = 1; 49 enum CONT_TOP = 2; 50 enum CONT_BOTTOM = 3; 51 enum DOCKCONT_MAX = 4; 52 53 // mask params for plugins of internal dialogs 54 55 /** 56 * Icon for tabs are available 57 */ 58 enum DWS_ICONTAB = 0x00000001; 59 60 /** 61 * Icon for icon bar are available (currently not supported) 62 */ 63 enum DWS_ICONBAR = 0x00000002; 64 65 /** 66 * Additional information are in use 67 */ 68 enum DWS_ADDINFO = 0x00000004; 69 70 enum DWS_PARAMSALL = .DWS_ICONTAB | .DWS_ICONBAR | .DWS_ADDINFO; 71 72 // default docking values for first call of plugin 73 74 /** 75 * default docking on left 76 */ 77 enum DWS_DF_CONT_LEFT = .CONT_LEFT << 28; 78 79 /** 80 * default docking on right 81 */ 82 enum DWS_DF_CONT_RIGHT = .CONT_RIGHT << 28; 83 84 /** 85 * default docking on top 86 */ 87 enum DWS_DF_CONT_TOP = .CONT_TOP << 28; 88 89 /** 90 * default docking on bottom 91 */ 92 enum DWS_DF_CONT_BOTTOM = .CONT_BOTTOM << 28; 93 94 /** 95 * default state is floating 96 */ 97 enum DWS_DF_FLOATING = 0x80000000; 98 99 extern (C) 100 struct tTbData 101 { 102 /** 103 * client Window Handle 104 */ 105 core.sys.windows.windef.HWND hClient; 106 107 /** 108 * name of plugin (shown in window) 109 */ 110 const (core.sys.windows.winnt.WCHAR)* pszName; 111 112 /** 113 * a funcItem provides the function pointer to start a dialog. Please parse here these ID 114 */ 115 int dlgID; 116 117 // user modifications 118 119 /** 120 * mask params: look to above defines 121 */ 122 core.sys.windows.windef.UINT uMask; 123 124 /** 125 * icon for tabs 126 */ 127 core.sys.windows.windef.HICON hIconTab; 128 129 /** 130 * for plugin to display additional informations 131 */ 132 const (core.sys.windows.winnt.WCHAR)* pszAddInfo; 133 134 private: 135 /** 136 * floating position 137 */ 138 core.sys.windows.windef.RECT rcFloat; 139 140 /** 141 * stores the privious container (toggling between float and dock) 142 */ 143 int iPrevCont; 144 145 public: 146 /** 147 * it's the plugin file name. It's used to identify the plugin 148 */ 149 const (core.sys.windows.winnt.WCHAR)* pszModuleName; 150 } 151 152 struct tDockMgr 153 { 154 /** 155 * the docking manager wnd 156 */ 157 core.sys.windows.windef.HWND hWnd; 158 159 /** 160 * position of docked dialogs 161 */ 162 core.sys.windows.windef.RECT[.DOCKCONT_MAX] rcRegion; 163 } 164 165 enum HIT_TEST_THICKNESS = 20; 166 enum SPLITTER_WIDTH = 4;