- Timestamp:
- Dec 9, 2010, 2:15:54 PM (14 years ago)
- Location:
- Docking/CoolDocking
- Files:
-
- 2 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
Docking/CoolDocking/CoolDocking.lpk
r96 r97 25 25 <Description Value="Set of components for docking of windows."/> 26 26 <Version Minor="1"/> 27 <Files Count=" 8">27 <Files Count="10"> 28 28 <Item1> 29 29 <Filename Value="UCoolDocking.pas"/> … … 59 59 <UnitName Value="UCoolDockStylePopupRegions"/> 60 60 </Item8> 61 <Item9> 62 <Filename Value="UCoolDockStyle.pas"/> 63 <UnitName Value="UCoolDockStyle"/> 64 </Item9> 65 <Item10> 66 <Filename Value="UCoolDockClientPanel.pas"/> 67 <UnitName Value="UCoolDockClientPanel"/> 68 </Item10> 61 69 </Files> 62 70 <i18n> -
Docking/CoolDocking/CoolDocking.pas
r89 r97 10 10 UCoolDocking, UCoolDockCustomize, UCoolDockWindowList, UCoolDockStyleTabs, 11 11 UCoolDockStyleRegions, UCoolDockStylePopupTabs, UCoolDockStylePopupRegions, 12 LazarusPackageIntf;12 UCoolDockStyle, UCoolDockClientPanel, LazarusPackageIntf; 13 13 14 14 implementation -
Docking/CoolDocking/Demo/Demo.lpi
r96 r97 38 38 </Item2> 39 39 </RequiredPackages> 40 <Units Count="5 7">40 <Units Count="54"> 41 41 <Unit0> 42 42 <Filename Value="Demo.lpr"/> … … 45 45 <WindowIndex Value="0"/> 46 46 <TopLine Value="1"/> 47 <CursorPos X=" 6" Y="10"/>48 <UsageCount Value="1 28"/>47 <CursorPos X="11" Y="14"/> 48 <UsageCount Value="183"/> 49 49 <DefaultSyntaxHighlighter Value="Delphi"/> 50 50 </Unit0> … … 55 55 <ResourceBaseClass Value="Form"/> 56 56 <UnitName Value="UMainForm"/> 57 <EditorIndex Value=" 10"/>58 <WindowIndex Value="0"/> 59 <TopLine Value=" 65"/>60 <CursorPos X=" 47" Y="78"/>61 <UsageCount Value="1 28"/>57 <EditorIndex Value="5"/> 58 <WindowIndex Value="0"/> 59 <TopLine Value="58"/> 60 <CursorPos X="5" Y="73"/> 61 <UsageCount Value="183"/> 62 62 <Loaded Value="True"/> 63 63 <LoadedDesigner Value="True"/> … … 67 67 <Filename Value="E:\Programy\Lazarus\lcl\controls.pp"/> 68 68 <UnitName Value="Controls"/> 69 <EditorIndex Value="5"/> 70 <WindowIndex Value="0"/> 71 <TopLine Value="1916"/> 72 <CursorPos X="14" Y="1929"/> 73 <UsageCount Value="63"/> 74 <Loaded Value="True"/> 69 <WindowIndex Value="0"/> 70 <TopLine Value="1359"/> 71 <CursorPos X="14" Y="1399"/> 72 <UsageCount Value="58"/> 75 73 </Unit2> 76 74 <Unit3> … … 80 78 <TopLine Value="98"/> 81 79 <CursorPos X="27" Y="110"/> 82 <UsageCount Value="1 6"/>80 <UsageCount Value="10"/> 83 81 <DefaultSyntaxHighlighter Value="Delphi"/> 84 82 </Unit3> 85 83 <Unit4> 86 84 <Filename Value="E:\Programy\Lazarus\lcl\include\control.inc"/> 87 <EditorIndex Value="7"/>88 85 <WindowIndex Value="0"/> 89 86 <TopLine Value="4767"/> 90 <CursorPos X="1" Y="4794"/> 91 <UsageCount Value="56"/> 92 <Loaded Value="True"/> 87 <CursorPos X="59" Y="4774"/> 88 <UsageCount Value="51"/> 93 89 </Unit4> 94 90 <Unit5> 95 91 <Filename Value="E:\Programy\Lazarus\lcl\include\wincontrol.inc"/> 96 <EditorIndex Value="14"/>97 92 <WindowIndex Value="0"/> 98 93 <TopLine Value="3429"/> 99 94 <CursorPos X="1" Y="3442"/> 100 <UsageCount Value="61"/> 101 <Loaded Value="True"/> 95 <UsageCount Value="56"/> 102 96 </Unit5> 103 97 <Unit6> 104 <Filename Value="E:\Programy\Lazarus\lcl\lclclasses.pp"/> 105 <UnitName Value="LCLClasses"/> 106 <WindowIndex Value="0"/> 107 <TopLine Value="28"/> 108 <CursorPos X="54" Y="32"/> 109 <UsageCount Value="3"/> 98 <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\objpas\classes\classesh.inc"/> 99 <WindowIndex Value="0"/> 100 <TopLine Value="490"/> 101 <CursorPos X="3" Y="497"/> 102 <UsageCount Value="23"/> 110 103 </Unit6> 111 104 <Unit7> 112 <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\ objpas\classes\classesh.inc"/>113 <WindowIndex Value="0"/> 114 <TopLine Value=" 490"/>115 <CursorPos X=" 3" Y="497"/>116 <UsageCount Value=" 29"/>105 <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\inc\objpash.inc"/> 106 <WindowIndex Value="0"/> 107 <TopLine Value="206"/> 108 <CursorPos X="8" Y="219"/> 109 <UsageCount Value="0"/> 117 110 </Unit7> 118 111 <Unit8> 119 <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\inc\objpash.inc"/> 120 <WindowIndex Value="0"/> 121 <TopLine Value="206"/> 122 <CursorPos X="8" Y="219"/> 123 <UsageCount Value="6"/> 112 <Filename Value="E:\Programy\Lazarus\lcl\lclproc.pas"/> 113 <UnitName Value="LCLProc"/> 114 <WindowIndex Value="0"/> 115 <TopLine Value="2412"/> 116 <CursorPos X="38" Y="2417"/> 117 <UsageCount Value="21"/> 124 118 </Unit8> 125 119 <Unit9> 126 <Filename Value="E:\Programy\Lazarus\lcl\lcltype.pp"/>127 <UnitName Value="LCLType"/>128 <WindowIndex Value="0"/>129 <TopLine Value="114"/>130 <CursorPos X="3" Y="127"/>131 <UsageCount Value="1"/>132 </Unit9>133 <Unit10>134 <Filename Value="E:\Programy\Lazarus\lcl\lclproc.pas"/>135 <UnitName Value="LCLProc"/>136 <EditorIndex Value="12"/>137 <WindowIndex Value="0"/>138 <TopLine Value="2412"/>139 <CursorPos X="38" Y="2417"/>140 <UsageCount Value="26"/>141 <Loaded Value="True"/>142 </Unit10>143 <Unit11>144 <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\objpas\classes\streams.inc"/>145 <WindowIndex Value="0"/>146 <TopLine Value="417"/>147 <CursorPos X="60" Y="434"/>148 <UsageCount Value="1"/>149 </Unit11>150 <Unit12>151 <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\objpas\sysutils\filutilh.inc"/>152 <WindowIndex Value="0"/>153 <TopLine Value="67"/>154 <CursorPos X="10" Y="80"/>155 <UsageCount Value="1"/>156 </Unit12>157 <Unit13>158 <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\win\sysutils.pp"/>159 <UnitName Value="sysutils"/>160 <WindowIndex Value="0"/>161 <TopLine Value="280"/>162 <CursorPos X="3" Y="282"/>163 <UsageCount Value="3"/>164 </Unit13>165 <Unit14>166 <Filename Value="E:\Programy\Lazarus\lcl\include\docktree.inc"/>167 <WindowIndex Value="0"/>168 <TopLine Value="200"/>169 <CursorPos X="3" Y="218"/>170 <UsageCount Value="3"/>171 </Unit14>172 <Unit15>173 120 <Filename Value="UDockForm.pas"/> 174 121 <IsPartOfProject Value="True"/> … … 180 127 <TopLine Value="7"/> 181 128 <CursorPos X="33" Y="21"/> 182 <UsageCount Value="127"/> 183 <DefaultSyntaxHighlighter Value="Delphi"/> 129 <UsageCount Value="182"/> 130 <DefaultSyntaxHighlighter Value="Delphi"/> 131 </Unit9> 132 <Unit10> 133 <Filename Value="E:\Programy\Lazarus\lcl\graphics.pp"/> 134 <UnitName Value="Graphics"/> 135 <WindowIndex Value="0"/> 136 <TopLine Value="971"/> 137 <CursorPos X="3" Y="984"/> 138 <UsageCount Value="10"/> 139 </Unit10> 140 <Unit11> 141 <Filename Value="E:\Programy\Lazarus\lcl\stdctrls.pp"/> 142 <UnitName Value="StdCtrls"/> 143 <WindowIndex Value="0"/> 144 <TopLine Value="819"/> 145 <CursorPos X="28" Y="826"/> 146 <UsageCount Value="24"/> 147 </Unit11> 148 <Unit12> 149 <Filename Value="E:\Projekty jine\Lazarus\examples\anchordocking\anchordocking.pas"/> 150 <UnitName Value="AnchorDocking"/> 151 <WindowIndex Value="0"/> 152 <TopLine Value="4756"/> 153 <CursorPos X="5" Y="4763"/> 154 <UsageCount Value="5"/> 155 <DefaultSyntaxHighlighter Value="Delphi"/> 156 </Unit12> 157 <Unit13> 158 <Filename Value="..\UCoolDockManager.pas"/> 159 <UnitName Value="UCoolDockManager"/> 160 <WindowIndex Value="0"/> 161 <TopLine Value="702"/> 162 <CursorPos X="10" Y="719"/> 163 <UsageCount Value="19"/> 164 <DefaultSyntaxHighlighter Value="Delphi"/> 165 </Unit13> 166 <Unit14> 167 <Filename Value="E:\Programy\Lazarus\lcl\extctrls.pp"/> 168 <UnitName Value="ExtCtrls"/> 169 <WindowIndex Value="0"/> 170 <TopLine Value="1215"/> 171 <CursorPos X="3" Y="1228"/> 172 <UsageCount Value="54"/> 173 </Unit14> 174 <Unit15> 175 <Filename Value="E:\Programy\Lazarus\lcl\interfaces\win32\win32wsbuttons.pp"/> 176 <UnitName Value="Win32WSButtons"/> 177 <WindowIndex Value="0"/> 178 <TopLine Value="480"/> 179 <CursorPos X="37" Y="496"/> 180 <UsageCount Value="5"/> 184 181 </Unit15> 185 182 <Unit16> 186 <Filename Value="E:\Programy\Lazarus\lcl\graphics.pp"/> 187 <UnitName Value="Graphics"/> 188 <WindowIndex Value="0"/> 189 <TopLine Value="1089"/> 190 <CursorPos X="15" Y="1096"/> 191 <UsageCount Value="12"/> 183 <Filename Value="E:\Programy\Lazarus\lcl\include\dragmanager.inc"/> 184 <WindowIndex Value="0"/> 185 <TopLine Value="52"/> 186 <CursorPos X="30" Y="65"/> 187 <UsageCount Value="5"/> 192 188 </Unit16> 193 189 <Unit17> 194 <Filename Value="E:\Programy\Lazarus\lcl\stdctrls.pp"/> 195 <UnitName Value="StdCtrls"/> 196 <WindowIndex Value="0"/> 197 <TopLine Value="819"/> 198 <CursorPos X="28" Y="826"/> 199 <UsageCount Value="30"/> 190 <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/> 191 <WindowIndex Value="0"/> 192 <TopLine Value="2573"/> 193 <CursorPos X="36" Y="2586"/> 194 <UsageCount Value="6"/> 200 195 </Unit17> 201 196 <Unit18> 202 <Filename Value="E:\Projekty jine\Lazarus\examples\anchordocking\anchordocking.pas"/> 203 <UnitName Value="AnchorDocking"/> 204 <WindowIndex Value="0"/> 205 <TopLine Value="4756"/> 206 <CursorPos X="5" Y="4763"/> 207 <UsageCount Value="11"/> 208 <DefaultSyntaxHighlighter Value="Delphi"/> 197 <Filename Value="E:\Programy\Lazarus\lcl\widgetset\wscontrols.pp"/> 198 <UnitName Value="WSControls"/> 199 <WindowIndex Value="0"/> 200 <TopLine Value="267"/> 201 <CursorPos X="1" Y="269"/> 202 <UsageCount Value="2"/> 209 203 </Unit18> 210 204 <Unit19> 211 <Filename Value="E:\Programy\Lazarus\lcl\ buttons.pp"/>212 <UnitName Value=" Buttons"/>213 <WindowIndex Value="0"/> 214 <TopLine Value=" 362"/>215 <CursorPos X=" 21" Y="369"/>216 <UsageCount Value=" 2"/>205 <Filename Value="E:\Programy\Lazarus\lcl\comctrls.pp"/> 206 <UnitName Value="ComCtrls"/> 207 <WindowIndex Value="0"/> 208 <TopLine Value="553"/> 209 <CursorPos X="44" Y="560"/> 210 <UsageCount Value="7"/> 217 211 </Unit19> 218 212 <Unit20> 219 <Filename Value="..\UCoolDockManager.pas"/> 220 <UnitName Value="UCoolDockManager"/> 221 <WindowIndex Value="0"/> 222 <TopLine Value="702"/> 223 <CursorPos X="10" Y="719"/> 224 <UsageCount Value="25"/> 225 <DefaultSyntaxHighlighter Value="Delphi"/> 213 <Filename Value="E:\Programy\Lazarus\lcl\forms.pp"/> 214 <UnitName Value="Forms"/> 215 <WindowIndex Value="0"/> 216 <TopLine Value="492"/> 217 <CursorPos X="14" Y="505"/> 218 <UsageCount Value="30"/> 226 219 </Unit20> 227 220 <Unit21> 228 <Filename Value="E:\Programy\Lazarus\lcl\extctrls.pp"/> 229 <UnitName Value="ExtCtrls"/> 230 <EditorIndex Value="4"/> 231 <WindowIndex Value="0"/> 232 <TopLine Value="263"/> 233 <CursorPos X="3" Y="273"/> 234 <UsageCount Value="28"/> 235 <Loaded Value="True"/> 221 <Filename Value="E:\Programy\Lazarus\lcl\themes.pas"/> 222 <UnitName Value="Themes"/> 223 <WindowIndex Value="0"/> 224 <TopLine Value="2148"/> 225 <CursorPos X="21" Y="2148"/> 226 <UsageCount Value="26"/> 236 227 </Unit21> 237 228 <Unit22> 238 <Filename Value=" E:\Programy\Lazarus\lcl\interfaces\win32\win32wsbuttons.pp"/>239 <UnitName Value=" Win32WSButtons"/>240 <EditorIndex Value=" 15"/>241 <WindowIndex Value="0"/> 242 <TopLine Value=" 480"/>243 <CursorPos X=" 37" Y="496"/>244 <UsageCount Value=" 10"/>229 <Filename Value="..\UCoolDocking.pas"/> 230 <UnitName Value="UCoolDocking"/> 231 <EditorIndex Value="0"/> 232 <WindowIndex Value="0"/> 233 <TopLine Value="618"/> 234 <CursorPos X="29" Y="632"/> 235 <UsageCount Value="82"/> 245 236 <Loaded Value="True"/> 237 <DefaultSyntaxHighlighter Value="Delphi"/> 246 238 </Unit22> 247 239 <Unit23> 248 <Filename Value="E:\Programy\Lazarus\lcl\include\dragmanager.inc"/> 249 <WindowIndex Value="0"/> 250 <TopLine Value="52"/> 251 <CursorPos X="30" Y="65"/> 252 <UsageCount Value="11"/> 240 <Filename Value="..\ReadMe.txt"/> 241 <WindowIndex Value="0"/> 242 <TopLine Value="1"/> 243 <CursorPos X="18" Y="11"/> 244 <UsageCount Value="19"/> 245 <DefaultSyntaxHighlighter Value="None"/> 253 246 </Unit23> 254 247 <Unit24> 255 <Filename Value="E:\Programy\Lazarus\lcl\include\customform.inc"/> 256 <EditorIndex Value="11"/> 257 <WindowIndex Value="0"/> 258 <TopLine Value="2573"/> 259 <CursorPos X="36" Y="2586"/> 260 <UsageCount Value="11"/> 261 <Loaded Value="True"/> 248 <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\objpas\classes\lists.inc"/> 249 <WindowIndex Value="0"/> 250 <TopLine Value="619"/> 251 <CursorPos X="22" Y="621"/> 252 <UsageCount Value="19"/> 262 253 </Unit24> 263 254 <Unit25> 264 <Filename Value="E:\Programy\Lazarus\lcl\widgetset\wscontrols.pp"/> 265 <UnitName Value="WSControls"/> 266 <WindowIndex Value="0"/> 267 <TopLine Value="267"/> 268 <CursorPos X="1" Y="269"/> 269 <UsageCount Value="8"/> 255 <Filename Value="E:\Programy\Lazarus\lcl\include\custompanel.inc"/> 256 <WindowIndex Value="0"/> 257 <TopLine Value="27"/> 258 <CursorPos X="3" Y="32"/> 259 <UsageCount Value="19"/> 270 260 </Unit25> 271 261 <Unit26> 272 <Filename Value="E:\Programy\Lazarus\lcl\comctrls.pp"/> 273 <UnitName Value="ComCtrls"/> 274 <EditorIndex Value="2"/> 275 <WindowIndex Value="0"/> 276 <TopLine Value="553"/> 277 <CursorPos X="29" Y="560"/> 278 <UsageCount Value="12"/> 279 <Loaded Value="True"/> 262 <Filename Value="E:\Programy\Lazarus\lcl\include\customcontrol.inc"/> 263 <WindowIndex Value="0"/> 264 <TopLine Value="50"/> 265 <CursorPos X="18" Y="61"/> 266 <UsageCount Value="19"/> 280 267 </Unit26> 281 268 <Unit27> 282 <Filename Value="E:\Programy\Lazarus\lcl\forms.pp"/> 283 <UnitName Value="Forms"/> 284 <EditorIndex Value="13"/> 285 <WindowIndex Value="0"/> 286 <TopLine Value="492"/> 287 <CursorPos X="14" Y="505"/> 288 <UsageCount Value="35"/> 289 <Loaded Value="True"/> 269 <Filename Value="E:\Programy\Lazarus\lcl\include\controlsproc.inc"/> 270 <WindowIndex Value="0"/> 271 <TopLine Value="84"/> 272 <CursorPos X="45" Y="90"/> 273 <UsageCount Value="19"/> 290 274 </Unit27> 291 275 <Unit28> 292 <Filename Value="E:\Programy\Lazarus\lcl\themes.pas"/>293 <UnitName Value="Themes"/>294 <EditorIndex Value="0"/>295 <WindowIndex Value="0"/>296 <TopLine Value="2148"/>297 <CursorPos X="21" Y="2148"/>298 <UsageCount Value="31"/>299 <Loaded Value="True"/>300 </Unit28>301 <Unit29>302 <Filename Value="E:\Programy\Lazarus\lcl\menus.pp"/>303 <UnitName Value="Menus"/>304 <WindowIndex Value="0"/>305 <TopLine Value="374"/>306 <CursorPos X="3" Y="387"/>307 <UsageCount Value="2"/>308 </Unit29>309 <Unit30>310 <Filename Value="..\..\..\ExceptionLogger\UExceptionLogger.pas"/>311 <UnitName Value="UExceptionLogger"/>312 <WindowIndex Value="0"/>313 <TopLine Value="49"/>314 <CursorPos X="1" Y="56"/>315 <UsageCount Value="4"/>316 <DefaultSyntaxHighlighter Value="Delphi"/>317 </Unit30>318 <Unit31>319 <Filename Value="E:\Programy\Lazarus\lcl\customtimer.pas"/>320 <UnitName Value="CustomTimer"/>321 <WindowIndex Value="0"/>322 <TopLine Value="68"/>323 <CursorPos X="3" Y="77"/>324 <UsageCount Value="2"/>325 </Unit31>326 <Unit32>327 <Filename Value="E:\Programy\Lazarus\lcl\interfaces\win32\win32wsforms.pp"/>328 <UnitName Value="Win32WSForms"/>329 <WindowIndex Value="0"/>330 <TopLine Value="341"/>331 <CursorPos X="1" Y="354"/>332 <UsageCount Value="2"/>333 </Unit32>334 <Unit33>335 <Filename Value="..\UCoolDocking.pas"/>336 <UnitName Value="UCoolDocking"/>337 <IsVisibleTab Value="True"/>338 <EditorIndex Value="1"/>339 <WindowIndex Value="0"/>340 <TopLine Value="819"/>341 <CursorPos X="78" Y="826"/>342 <UsageCount Value="54"/>343 <Loaded Value="True"/>344 <DefaultSyntaxHighlighter Value="Delphi"/>345 </Unit33>346 <Unit34>347 <Filename Value="..\ReadMe.txt"/>348 <WindowIndex Value="0"/>349 <TopLine Value="1"/>350 <CursorPos X="18" Y="11"/>351 <UsageCount Value="25"/>352 <DefaultSyntaxHighlighter Value="None"/>353 </Unit34>354 <Unit35>355 <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\objpas\classes\lists.inc"/>356 <WindowIndex Value="0"/>357 <TopLine Value="619"/>358 <CursorPos X="22" Y="621"/>359 <UsageCount Value="25"/>360 </Unit35>361 <Unit36>362 <Filename Value="E:\Programy\Lazarus\lcl\include\custompanel.inc"/>363 <WindowIndex Value="0"/>364 <TopLine Value="27"/>365 <CursorPos X="3" Y="32"/>366 <UsageCount Value="25"/>367 </Unit36>368 <Unit37>369 <Filename Value="E:\Programy\Lazarus\lcl\include\customcontrol.inc"/>370 <WindowIndex Value="0"/>371 <TopLine Value="50"/>372 <CursorPos X="18" Y="61"/>373 <UsageCount Value="25"/>374 </Unit37>375 <Unit38>376 <Filename Value="E:\Programy\Lazarus\lcl\include\controlsproc.inc"/>377 <WindowIndex Value="0"/>378 <TopLine Value="84"/>379 <CursorPos X="45" Y="90"/>380 <UsageCount Value="25"/>381 </Unit38>382 <Unit39>383 276 <Filename Value="..\UCoolDockCustomize.pas"/> 384 277 <ComponentName Value="CoolDockCustomizeForm"/> … … 389 282 <TopLine Value="9"/> 390 283 <CursorPos X="19" Y="17"/> 391 <UsageCount Value=" 52"/>392 <DefaultSyntaxHighlighter Value="Delphi"/> 393 </Unit 39>394 <Unit 40>284 <UsageCount Value="46"/> 285 <DefaultSyntaxHighlighter Value="Delphi"/> 286 </Unit28> 287 <Unit29> 395 288 <Filename Value="..\UCoolDockWindowList.pas"/> 396 289 <ComponentName Value="CoolDockWindowListForm"/> … … 401 294 <TopLine Value="59"/> 402 295 <CursorPos X="44" Y="61"/> 403 <UsageCount Value=" 7"/>404 <DefaultSyntaxHighlighter Value="Delphi"/> 405 </Unit 40>406 <Unit 41>296 <UsageCount Value="1"/> 297 <DefaultSyntaxHighlighter Value="Delphi"/> 298 </Unit29> 299 <Unit30> 407 300 <Filename Value="SampleDockableForm.pas"/> 408 301 <IsPartOfProject Value="True"/> … … 413 306 <TopLine Value="1"/> 414 307 <CursorPos X="53" Y="2"/> 415 <UsageCount Value="70"/> 416 <DefaultSyntaxHighlighter Value="Delphi"/> 308 <UsageCount Value="125"/> 309 <DefaultSyntaxHighlighter Value="Delphi"/> 310 </Unit30> 311 <Unit31> 312 <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\objpas\classes\compon.inc"/> 313 <WindowIndex Value="0"/> 314 <TopLine Value="223"/> 315 <CursorPos X="3" Y="226"/> 316 <UsageCount Value="3"/> 317 </Unit31> 318 <Unit32> 319 <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\objpas\sysutils\sysutilh.inc"/> 320 <WindowIndex Value="0"/> 321 <TopLine Value="59"/> 322 <CursorPos X="4" Y="66"/> 323 <UsageCount Value="3"/> 324 </Unit32> 325 <Unit33> 326 <Filename Value="E:\Programy\Lazarus\lcl\lresources.pp"/> 327 <UnitName Value="LResources"/> 328 <WindowIndex Value="0"/> 329 <TopLine Value="3034"/> 330 <CursorPos X="1" Y="3047"/> 331 <UsageCount Value="0"/> 332 </Unit33> 333 <Unit34> 334 <Filename Value="E:\Programy\Lazarus\lcl\include\tabcontrol.inc"/> 335 <WindowIndex Value="0"/> 336 <TopLine Value="233"/> 337 <CursorPos X="45" Y="239"/> 338 <UsageCount Value="7"/> 339 </Unit34> 340 <Unit35> 341 <Filename Value="E:\Programy\Lazarus\lcl\include\pagecontrol.inc"/> 342 <WindowIndex Value="0"/> 343 <TopLine Value="98"/> 344 <CursorPos X="3" Y="103"/> 345 <UsageCount Value="6"/> 346 </Unit35> 347 <Unit36> 348 <Filename Value="E:\Programy\Lazarus\lcl\include\customnotebook.inc"/> 349 <WindowIndex Value="0"/> 350 <TopLine Value="885"/> 351 <CursorPos X="3" Y="853"/> 352 <UsageCount Value="6"/> 353 </Unit36> 354 <Unit37> 355 <Filename Value="E:\Programy\Lazarus\lcl\include\canvas.inc"/> 356 <WindowIndex Value="0"/> 357 <TopLine Value="1555"/> 358 <CursorPos X="1" Y="1568"/> 359 <UsageCount Value="6"/> 360 </Unit37> 361 <Unit38> 362 <Filename Value="E:\Programy\Lazarus\lcl\include\lclintfh.inc"/> 363 <WindowIndex Value="0"/> 364 <TopLine Value="33"/> 365 <CursorPos X="10" Y="40"/> 366 <UsageCount Value="6"/> 367 </Unit38> 368 <Unit39> 369 <Filename Value="E:\Programy\Lazarus\lcl\include\intfbaselcl.inc"/> 370 <WindowIndex Value="0"/> 371 <TopLine Value="29"/> 372 <CursorPos X="3" Y="32"/> 373 <UsageCount Value="6"/> 374 </Unit39> 375 <Unit40> 376 <Filename Value="E:\Programy\Lazarus\lcl\include\winapih.inc"/> 377 <WindowIndex Value="0"/> 378 <TopLine Value="312"/> 379 <CursorPos X="10" Y="319"/> 380 <UsageCount Value="6"/> 381 </Unit40> 382 <Unit41> 383 <Filename Value="E:\Programy\Lazarus\lcl\include\controlcanvas.inc"/> 384 <WindowIndex Value="0"/> 385 <TopLine Value="85"/> 386 <CursorPos X="1" Y="92"/> 387 <UsageCount Value="5"/> 417 388 </Unit41> 418 389 <Unit42> 419 <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\objpas\ classes\compon.inc"/>420 <WindowIndex Value="0"/> 421 <TopLine Value=" 223"/>422 <CursorPos X=" 3" Y="226"/>423 <UsageCount Value=" 9"/>390 <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\objpas\sysutils\datih.inc"/> 391 <WindowIndex Value="0"/> 392 <TopLine Value="126"/> 393 <CursorPos X="89" Y="147"/> 394 <UsageCount Value="5"/> 424 395 </Unit42> 425 396 <Unit43> 426 <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\objpas\sysutils\sysutilh.inc"/>427 <WindowIndex Value="0"/>428 <TopLine Value="59"/>429 <CursorPos X="4" Y="66"/>430 <UsageCount Value="9"/>431 </Unit43>432 <Unit44>433 <Filename Value="E:\Programy\Lazarus\lcl\lresources.pp"/>434 <UnitName Value="LResources"/>435 <WindowIndex Value="0"/>436 <TopLine Value="3034"/>437 <CursorPos X="1" Y="3047"/>438 <UsageCount Value="6"/>439 </Unit44>440 <Unit45>441 <Filename Value="E:\Programy\Lazarus\lcl\include\tabcontrol.inc"/>442 <EditorIndex Value="3"/>443 <WindowIndex Value="0"/>444 <TopLine Value="233"/>445 <CursorPos X="45" Y="239"/>446 <UsageCount Value="12"/>447 <Loaded Value="True"/>448 </Unit45>449 <Unit46>450 <Filename Value="E:\Programy\Lazarus\lcl\include\pagecontrol.inc"/>451 <WindowIndex Value="0"/>452 <TopLine Value="98"/>453 <CursorPos X="3" Y="103"/>454 <UsageCount Value="12"/>455 </Unit46>456 <Unit47>457 <Filename Value="E:\Programy\Lazarus\lcl\include\customnotebook.inc"/>458 <WindowIndex Value="0"/>459 <TopLine Value="885"/>460 <CursorPos X="3" Y="853"/>461 <UsageCount Value="12"/>462 </Unit47>463 <Unit48>464 <Filename Value="E:\Programy\Lazarus\lcl\include\canvas.inc"/>465 <WindowIndex Value="0"/>466 <TopLine Value="1555"/>467 <CursorPos X="1" Y="1568"/>468 <UsageCount Value="12"/>469 </Unit48>470 <Unit49>471 <Filename Value="E:\Programy\Lazarus\lcl\include\lclintfh.inc"/>472 <WindowIndex Value="0"/>473 <TopLine Value="33"/>474 <CursorPos X="10" Y="40"/>475 <UsageCount Value="12"/>476 </Unit49>477 <Unit50>478 <Filename Value="E:\Programy\Lazarus\lcl\include\intfbaselcl.inc"/>479 <WindowIndex Value="0"/>480 <TopLine Value="29"/>481 <CursorPos X="3" Y="32"/>482 <UsageCount Value="12"/>483 </Unit50>484 <Unit51>485 <Filename Value="E:\Programy\Lazarus\lcl\include\winapih.inc"/>486 <WindowIndex Value="0"/>487 <TopLine Value="312"/>488 <CursorPos X="10" Y="319"/>489 <UsageCount Value="12"/>490 </Unit51>491 <Unit52>492 <Filename Value="E:\Programy\Lazarus\lcl\include\controlcanvas.inc"/>493 <WindowIndex Value="0"/>494 <TopLine Value="85"/>495 <CursorPos X="1" Y="92"/>496 <UsageCount Value="11"/>497 </Unit52>498 <Unit53>499 <Filename Value="E:\Programy\Lazarus\fpc\2.4.0\source\rtl\objpas\sysutils\datih.inc"/>500 <WindowIndex Value="0"/>501 <TopLine Value="126"/>502 <CursorPos X="89" Y="147"/>503 <UsageCount Value="11"/>504 </Unit53>505 <Unit54>506 397 <Filename Value="UComponentTree.pas"/> 507 398 <IsPartOfProject Value="True"/> … … 509 400 <ResourceBaseClass Value="Form"/> 510 401 <UnitName Value="UComponentTree"/> 511 <EditorIndex Value="8"/>512 402 <WindowIndex Value="0"/> 513 403 <TopLine Value="37"/> 514 <CursorPos X="33" Y="52"/> 515 <UsageCount Value="22"/> 516 <Loaded Value="True"/> 517 <LoadedDesigner Value="True"/> 518 <DefaultSyntaxHighlighter Value="Delphi"/> 519 </Unit54> 520 <Unit55> 404 <CursorPos X="18" Y="39"/> 405 <UsageCount Value="77"/> 406 <DefaultSyntaxHighlighter Value="Delphi"/> 407 </Unit43> 408 <Unit44> 521 409 <Filename Value="E:\Programy\Lazarus\lcl\include\treeview.inc"/> 522 <EditorIndex Value="9"/>523 410 <WindowIndex Value="0"/> 524 411 <TopLine Value="311"/> 525 412 <CursorPos X="3" Y="332"/> 526 <UsageCount Value="11"/> 527 <Loaded Value="True"/> 528 </Unit55> 529 <Unit56> 413 <UsageCount Value="6"/> 414 </Unit44> 415 <Unit45> 530 416 <Filename Value="E:\Programy\Lazarus\fpc\2.4.3\source\rtl\objpas\classes\classesh.inc"/> 531 <EditorIndex Value="6"/>532 417 <WindowIndex Value="0"/> 533 418 <TopLine Value="1659"/> 534 419 <CursorPos X="17" Y="1675"/> 535 <UsageCount Value="11"/> 420 <UsageCount Value="6"/> 421 </Unit45> 422 <Unit46> 423 <Filename Value="..\UCoolDockCustomize.lrs"/> 424 <WindowIndex Value="0"/> 425 <TopLine Value="1"/> 426 <CursorPos X="1" Y="4"/> 427 <UsageCount Value="5"/> 428 <DefaultSyntaxHighlighter Value="Delphi"/> 429 </Unit46> 430 <Unit47> 431 <Filename Value="..\UCoolDockStyleTabs.pas"/> 432 <UnitName Value="UCoolDockStyleTabs"/> 433 <EditorIndex Value="4"/> 434 <WindowIndex Value="0"/> 435 <TopLine Value="23"/> 436 <CursorPos X="15" Y="36"/> 437 <UsageCount Value="38"/> 536 438 <Loaded Value="True"/> 537 </Unit56> 439 <DefaultSyntaxHighlighter Value="Delphi"/> 440 </Unit47> 441 <Unit48> 442 <Filename Value="..\UCoolDockStylePopupTabs.pas"/> 443 <UnitName Value="UCoolDockStylePopupTabs"/> 444 <WindowIndex Value="0"/> 445 <TopLine Value="185"/> 446 <CursorPos X="41" Y="190"/> 447 <UsageCount Value="5"/> 448 <DefaultSyntaxHighlighter Value="Delphi"/> 449 </Unit48> 450 <Unit49> 451 <Filename Value="..\UCoolDockStyle.pas"/> 452 <UnitName Value="UCoolDockStyle"/> 453 <EditorIndex Value="3"/> 454 <WindowIndex Value="0"/> 455 <TopLine Value="1"/> 456 <CursorPos X="3" Y="14"/> 457 <UsageCount Value="37"/> 458 <Loaded Value="True"/> 459 <DefaultSyntaxHighlighter Value="Delphi"/> 460 </Unit49> 461 <Unit50> 462 <Filename Value="..\UCoolDockStyleRegions.pas"/> 463 <UnitName Value="UCoolDockStyleRegions"/> 464 <EditorIndex Value="2"/> 465 <WindowIndex Value="0"/> 466 <TopLine Value="51"/> 467 <CursorPos X="1" Y="74"/> 468 <UsageCount Value="37"/> 469 <Loaded Value="True"/> 470 <DefaultSyntaxHighlighter Value="Delphi"/> 471 </Unit50> 472 <Unit51> 473 <Filename Value="..\UCoolDockStylePopupRegions.pas"/> 474 <UnitName Value="UCoolDockStylePopupRegions"/> 475 <WindowIndex Value="0"/> 476 <TopLine Value="1"/> 477 <CursorPos X="16" Y="19"/> 478 <UsageCount Value="5"/> 479 <DefaultSyntaxHighlighter Value="Delphi"/> 480 </Unit51> 481 <Unit52> 482 <Filename Value="E:\Programy\Lazarus\fpc\2.4.3\source\rtl\inc\objpash.inc"/> 483 <WindowIndex Value="0"/> 484 <TopLine Value="172"/> 485 <CursorPos X="23" Y="185"/> 486 <UsageCount Value="5"/> 487 </Unit52> 488 <Unit53> 489 <Filename Value="..\UCoolDockClientPanel.pas"/> 490 <UnitName Value="UCoolDockClientPanel"/> 491 <IsVisibleTab Value="True"/> 492 <EditorIndex Value="1"/> 493 <WindowIndex Value="0"/> 494 <TopLine Value="32"/> 495 <CursorPos X="1" Y="52"/> 496 <UsageCount Value="37"/> 497 <Loaded Value="True"/> 498 <DefaultSyntaxHighlighter Value="Delphi"/> 499 </Unit53> 538 500 </Units> 539 <JumpHistory Count="30" HistoryIndex="2 8">501 <JumpHistory Count="30" HistoryIndex="29"> 540 502 <Position1> 541 <Filename Value=" E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>542 <Caret Line=" 4520" Column="1" TopLine="4507"/>503 <Filename Value="..\UCoolDockClientPanel.pas"/> 504 <Caret Line="9" Column="10" TopLine="1"/> 543 505 </Position1> 544 506 <Position2> 545 <Filename Value=" E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>546 <Caret Line=" 4525" Column="1" TopLine="4507"/>507 <Filename Value="..\UCoolDockClientPanel.pas"/> 508 <Caret Line="17" Column="32" TopLine="12"/> 547 509 </Position2> 548 510 <Position3> 549 <Filename Value=" E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>550 <Caret Line="4 520" Column="1" TopLine="4507"/>511 <Filename Value="..\UCoolDocking.pas"/> 512 <Caret Line="469" Column="10" TopLine="435"/> 551 513 </Position3> 552 514 <Position4> 553 <Filename Value=" E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>554 <Caret Line="4 521" Column="1" TopLine="4507"/>515 <Filename Value="..\UCoolDocking.pas"/> 516 <Caret Line="474" Column="38" TopLine="461"/> 555 517 </Position4> 556 518 <Position5> 557 <Filename Value=" E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>558 <Caret Line="4 523" Column="1" TopLine="4507"/>519 <Filename Value="..\UCoolDocking.pas"/> 520 <Caret Line="477" Column="57" TopLine="464"/> 559 521 </Position5> 560 522 <Position6> 561 <Filename Value=" E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>562 <Caret Line=" 4525" Column="1" TopLine="4507"/>523 <Filename Value="..\UCoolDocking.pas"/> 524 <Caret Line="646" Column="1" TopLine="633"/> 563 525 </Position6> 564 526 <Position7> 565 <Filename Value=" E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>566 <Caret Line=" 4411" Column="23" TopLine="4401"/>527 <Filename Value="..\UCoolDockStyleTabs.pas"/> 528 <Caret Line="231" Column="1" TopLine="212"/> 567 529 </Position7> 568 530 <Position8> 569 <Filename Value=" E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>570 <Caret Line=" 4410" Column="1" TopLine="4401"/>531 <Filename Value="..\UCoolDockStyleTabs.pas"/> 532 <Caret Line="253" Column="23" TopLine="245"/> 571 533 </Position8> 572 534 <Position9> 573 <Filename Value=" E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>574 <Caret Line=" 4457" Column="1" TopLine="4436"/>535 <Filename Value="..\UCoolDockStyleTabs.pas"/> 536 <Caret Line="15" Column="34" TopLine="2"/> 575 537 </Position9> 576 538 <Position10> 577 <Filename Value=" E:\Programy\Lazarus\lcl\include\customform.inc"/>578 <Caret Line=" 799" Column="1" TopLine="786"/>539 <Filename Value="..\UCoolDockStyleTabs.pas"/> 540 <Caret Line="258" Column="1" TopLine="246"/> 579 541 </Position10> 580 542 <Position11> 581 <Filename Value=" E:\Programy\Lazarus\lcl\include\customform.inc"/>582 <Caret Line=" 800" Column="1" TopLine="786"/>543 <Filename Value="..\UCoolDockStyleTabs.pas"/> 544 <Caret Line="259" Column="17" TopLine="246"/> 583 545 </Position11> 584 546 <Position12> 585 <Filename Value=" E:\Programy\Lazarus\lcl\include\customform.inc"/>586 <Caret Line=" 1727" Column="1" TopLine="1714"/>547 <Filename Value="..\UCoolDockStyleTabs.pas"/> 548 <Caret Line="261" Column="67" TopLine="247"/> 587 549 </Position12> 588 550 <Position13> 589 <Filename Value=" E:\Programy\Lazarus\lcl\include\customform.inc"/>590 <Caret Line=" 1728" Column="1" TopLine="1714"/>551 <Filename Value="..\UCoolDockStyleTabs.pas"/> 552 <Caret Line="266" Column="29" TopLine="253"/> 591 553 </Position13> 592 554 <Position14> 593 <Filename Value=" E:\Programy\Lazarus\lcl\include\customform.inc"/>594 <Caret Line=" 1729" Column="1" TopLine="1714"/>555 <Filename Value="UMainForm.pas"/> 556 <Caret Line="78" Column="47" TopLine="65"/> 595 557 </Position14> 596 558 <Position15> 597 <Filename Value=" E:\Programy\Lazarus\lcl\include\customform.inc"/>598 <Caret Line=" 1733" Column="20" TopLine="1714"/>559 <Filename Value="UMainForm.pas"/> 560 <Caret Line="73" Column="5" TopLine="58"/> 599 561 </Position15> 600 562 <Position16> 601 <Filename Value=" E:\Programy\Lazarus\lcl\include\customform.inc"/>602 <Caret Line=" 1734" Column="1" TopLine="1714"/>563 <Filename Value="..\UCoolDocking.pas"/> 564 <Caret Line="639" Column="52" TopLine="625"/> 603 565 </Position16> 604 566 <Position17> 605 <Filename Value=" E:\Programy\Lazarus\lcl\include\customform.inc"/>606 <Caret Line=" 1737" Column="22" TopLine="1725"/>567 <Filename Value="..\UCoolDocking.pas"/> 568 <Caret Line="660" Column="15" TopLine="647"/> 607 569 </Position17> 608 570 <Position18> 609 <Filename Value=" E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>610 <Caret Line=" 3442" Column="1" TopLine="3429"/>571 <Filename Value="..\UCoolDocking.pas"/> 572 <Caret Line="43" Column="5" TopLine="30"/> 611 573 </Position18> 612 574 <Position19> 613 <Filename Value=" E:\Programy\Lazarus\lcl\include\customform.inc"/>614 <Caret Line=" 1737" Column="1" TopLine="1725"/>575 <Filename Value="..\UCoolDocking.pas"/> 576 <Caret Line="633" Column="21" TopLine="616"/> 615 577 </Position19> 616 578 <Position20> 617 <Filename Value=" E:\Programy\Lazarus\lcl\include\wincontrol.inc"/>618 <Caret Line=" 3442" Column="1" TopLine="3429"/>579 <Filename Value="..\UCoolDocking.pas"/> 580 <Caret Line="629" Column="13" TopLine="620"/> 619 581 </Position20> 620 582 <Position21> 621 <Filename Value=" E:\Programy\Lazarus\lcl\include\customform.inc"/>622 <Caret Line=" 2586" Column="1" TopLine="2573"/>583 <Filename Value="..\UCoolDocking.pas"/> 584 <Caret Line="45" Column="22" TopLine="32"/> 623 585 </Position21> 624 586 <Position22> 625 <Filename Value=" E:\Programy\Lazarus\lcl\include\customform.inc"/>626 <Caret Line=" 1737" Column="1" TopLine="1724"/>587 <Filename Value="..\UCoolDocking.pas"/> 588 <Caret Line="261" Column="23" TopLine="247"/> 627 589 </Position22> 628 590 <Position23> 629 <Filename Value=" E:\Programy\Lazarus\lcl\include\customform.inc"/>630 <Caret Line=" 2587" Column="32" TopLine="2570"/>591 <Filename Value="..\UCoolDocking.pas"/> 592 <Caret Line="631" Column="1" TopLine="618"/> 631 593 </Position23> 632 594 <Position24> 633 <Filename Value=" E:\Programy\Lazarus\lcl\include\customform.inc"/>634 <Caret Line=" 2586" Column="1" TopLine="2570"/>595 <Filename Value="..\UCoolDocking.pas"/> 596 <Caret Line="632" Column="1" TopLine="618"/> 635 597 </Position24> 636 598 <Position25> 637 <Filename Value=" E:\Programy\Lazarus\lcl\include\customform.inc"/>638 <Caret Line=" 2588" Column="1" TopLine="2570"/>599 <Filename Value="..\UCoolDocking.pas"/> 600 <Caret Line="633" Column="1" TopLine="618"/> 639 601 </Position25> 640 602 <Position26> 641 <Filename Value=" E:\Programy\Lazarus\lcl\include\customform.inc"/>642 <Caret Line=" 1744" Column="1" TopLine="1731"/>603 <Filename Value="..\UCoolDocking.pas"/> 604 <Caret Line="634" Column="1" TopLine="618"/> 643 605 </Position26> 644 606 <Position27> 645 <Filename Value=" E:\Programy\Lazarus\lcl\include\customform.inc"/>646 <Caret Line=" 2587" Column="34" TopLine="2573"/>607 <Filename Value="..\UCoolDocking.pas"/> 608 <Caret Line="637" Column="1" TopLine="618"/> 647 609 </Position27> 648 610 <Position28> 649 <Filename Value=" E:\Programy\Lazarus\lcl\include\customform.inc"/>650 <Caret Line=" 1744" Column="1" TopLine="1731"/>611 <Filename Value="..\UCoolDocking.pas"/> 612 <Caret Line="638" Column="1" TopLine="618"/> 651 613 </Position28> 652 614 <Position29> 653 615 <Filename Value="..\UCoolDocking.pas"/> 654 <Caret Line=" 826" Column="47" TopLine="819"/>616 <Caret Line="647" Column="1" TopLine="634"/> 655 617 </Position29> 656 618 <Position30> 657 619 <Filename Value="..\UCoolDocking.pas"/> 658 <Caret Line="6 9" Column="5" TopLine="56"/>620 <Caret Line="648" Column="1" TopLine="634"/> 659 621 </Position30> 660 622 </JumpHistory> … … 683 645 <StackChecks Value="True"/> 684 646 </Checks> 685 <VerifyObjMethodCallValidity Value="True"/>686 647 </CodeGeneration> 687 648 <Linking> -
Docking/CoolDocking/Demo/UMainForm.lfm
r96 r97 1 1 object MainForm: TMainForm 2 Left = 3 412 Left = 322 3 3 Height = 435 4 Top = 15 84 Top = 150 5 5 Width = 576 6 6 Caption = 'MainForm' -
Docking/CoolDocking/Demo/UMainForm.pas
r96 r97 69 69 ConjoinedDockForm1 := TCoolDockManager(Panel1.DockManager).CreateContainer(alRight); 70 70 ConjoinedDockForm1.Name := 'Model';; 71 TCoolDockManager(ConjoinedDockForm1.Panel.DockManager).TabsPos := hpLeft;71 //TCoolDockManager(ConjoinedDockForm1.Panel.DockManager).TabsPos := hpLeft; 72 72 ConjoinedDockForm1.ManualDock(Panel1); 73 TCoolDockManager(ConjoinedDockForm1.Panel.DockManager).DockStyle := dsTabs;73 //TCoolDockManager(ConjoinedDockForm1.Panel.DockManager).DockStyle := dsTabs; 74 74 NewDockForm.ManualDock(ConjoinedDockForm1.Panel); 75 75 NewDockForm.ManualDock(ConjoinedDockForm1.Panel); -
Docking/CoolDocking/UCoolDockCustomize.lrs
r96 r97 2 2 3 3 LazarusResources.Add('TCoolDockCustomizeForm','FORMDATA',[ 4 'TPF0'#22'TCoolDockCustomizeForm'#21'CoolDockCustomizeForm'#4'Left'#3'R'#1#65 +'Height'#3'C'#1#3'Top'#2'`'#5'Width'#3#151#1#7'Caption'#6#17'Customize docki'6 +'ng'#12'ClientHeight'#3'C'#1#11'ClientWidth'#3#151#1#10'LCLVersion'#6#6'0.9.'7 +'29'#0#12'TPageControl'#12'PageControl1'#4'Left'#2#8#6'Height'#3#22#1#3'Top'8 +#2#8#5'Width'#3#137#1#10'ActivePage'#7#15'TabSheetSetting'#7'Anchors'#11#5'a'9 +'kTop'#6'akLeft'#7'akRight'#8'akBottom'#0#8'TabIndex'#2#0#8'TabOrder'#2#0#0#910 +'TTabSheet'#15'TabSheetSetting'#7'Caption'#6#7'Options'#12'ClientHeight'#311 +#252#0#11'ClientWidth'#3#129#1#0#6'TLabel'#6'Label1'#4'Left'#2#7#6'Height'#212 +#14#3'Top'#2#13#5'Width'#2'h'#7'Caption'#6#22'Default tabs position:'#11'Par'13 +'entColor'#8#0#0#9'TComboBox'#9'ComboBox1'#4'Left'#3#132#0#6'Height'#2#21#314 +'Top'#2#10#5'Width'#2'd'#10'ItemHeight'#2#13#8'TabOrder'#2#0#4'Text'#6#9'Com'15 +'boBox1'#0#0#6'TLabel'#6'Label2'#4'Left'#2#7#6'Height'#2#14#3'Top'#2')'#5'Wi'16 +'dth'#2'u'#7'Caption'#6#24'Default header position:'#11'ParentColor'#8#0#0#917 +'TComboBox'#9'ComboBox2'#4'Left'#3#132#0#6'Height'#2#21#3'Top'#2'&'#5'Width'18 +#2'd'#10'ItemHeight'#2#13#8'TabOrder'#2#1#4'Text'#6#9'ComboBox1'#0#0#0#9'TTa'19 +'bSheet'#15'TabSheetLayouts'#7'Caption'#6#7'Layouts'#12'ClientHeight'#3#252#020 +#11'ClientWidth'#3#129#1#0#8'TListBox'#8'ListBox1'#4'Left'#2#10#6'Height'#321 +#231#0#3'Top'#2#11#5'Width'#3#180#0#7'Anchors'#11#5'akTop'#6'akLeft'#8'akBot'22 +'tom'#0#10'ItemHeight'#2#0#8'TabOrder'#2#0#0#0#0#0#7'TButton'#11'ButtonClose'23 +#4'Left'#3'D'#1#6'Height'#2#22#3'Top'#3'&'#1#5'Width'#2'K'#7'Anchors'#11#7'a'24 +'kRight'#8'akBottom'#0#7'Caption'#6#5'Close'#7'OnClick'#7#16'ButtonCloseClic'25 +'k'#8'TabOrder'#2#1#0#0#026 4 'TPF0'#22'TCoolDockCustomizeForm'#21'CoolDockCustomizeForm'#4'Left'#3#175#1#6 27 5 +'Height'#3'C'#1#3'Top'#3#139#0#5'Width'#3#151#1#7'Caption'#6#17'Customize do' -
Docking/CoolDocking/UCoolDockCustomize.pas
r89 r97 1 1 unit UCoolDockCustomize; 2 2 3 {$mode objfpc}{$H+}3 {$mode Delphi}{$H+} 4 4 5 5 interface -
Docking/CoolDocking/UCoolDockStylePopupRegions.pas
r89 r97 1 unit UCoolDockStylePopupRegions; 1 unit UCoolDockStylePopupRegions; 2 2 3 {$mode objfpc}{$H+}3 {$mode Delphi}{$H+} 4 4 5 5 interface 6 6 7 7 uses 8 Classes, SysUtils; 8 Classes, SysUtils, UCoolDockStyleRegions, UCoolDockStyle; 9 10 type 11 TCoolDockStylePopupRegions = class(TCoolDockStyleRegions) 12 13 end; 14 9 15 10 16 implementation 11 17 18 uses 19 UCoolDocking; 20 12 21 end. 13 22 -
Docking/CoolDocking/UCoolDockStylePopupTabs.pas
r89 r97 1 unit UCoolDockStylePopupTabs; 2 3 {$mode objfpc}{$H+}1 unit UCoolDockStylePopupTabs; 2 3 {$mode Delphi}{$H+} 4 4 5 5 interface 6 6 7 7 uses 8 Classes, SysUtils; 8 Classes, Controls, SysUtils, ComCtrls, ExtCtrls, 9 UCoolDockStyleTabs, UCoolDockStyle; 10 11 type 12 { TCoolDockAutoHide } 13 14 TCoolDockAutoHide = class 15 private 16 FDuration: Real; 17 FStepCount: Integer; 18 StartBounds: TRect; 19 procedure SetDuration(const AValue: Real); 20 procedure SetStepCount(const AValue: Integer); 21 procedure UpdateBounds; 22 procedure UpdateTimerInterval; 23 public 24 Position: Real; 25 Direction: Integer; 26 TabPosition: TTabPosition; 27 Enable: Boolean; 28 Timer: TTimer; 29 Control: TControl; 30 ControlVisible: Boolean; 31 procedure Hide; 32 procedure Show; 33 constructor Create; 34 destructor Destroy; override; 35 procedure TimerExecute(Sender: TObject); 36 property Duration: Real read FDuration write SetDuration; 37 property StepCount: Integer read FStepCount write SetStepCount; 38 end; 39 40 { TCoolDockStylePopupTabs } 41 42 TCoolDockStylePopupTabs = class(TCoolDockStyleTabs) 43 TabControl: TTabControl; 44 TabImageList: TImageList; 45 AutoHide: TCoolDockAutoHide; 46 procedure TabControlMouseLeave(Sender: TObject); 47 procedure TabControlChange(Sender: TObject); 48 procedure TabControlMouseDown(Sender: TObject; Button: TMouseButton; 49 Shift: TShiftState; X, Y: Integer); 50 procedure TabControlMouseUp(Sender: TObject; Button: TMouseButton; 51 Shift: TShiftState; X, Y: Integer); 52 constructor Create(AManager: TObject); 53 destructor Destroy; override; 54 end; 55 9 56 10 57 implementation 11 58 59 uses 60 UCoolDocking; 61 62 { TCoolDockAutoHide } 63 64 procedure TCoolDockAutoHide.UpdateBounds; 65 begin 66 case TabPosition of 67 tpBottom: begin 68 Control.Height := Round((StartBounds.Bottom - StartBounds.Top) * Position); 69 Control.Top := StartBounds.Bottom - Control.Height; 70 end; 71 tpTop: begin 72 Control.Height := Round((StartBounds.Bottom - StartBounds.Top) * Position); 73 end; 74 tpRight: begin 75 Control.Width := Round((StartBounds.Right - StartBounds.Left) * Position); 76 end; 77 tpLeft: begin 78 Control.Width := Round((StartBounds.Right - StartBounds.Left) * Position); 79 Control.Left := StartBounds.Right - Control.Width; 80 end; 81 end; 82 end; 83 84 procedure TCoolDockAutoHide.UpdateTimerInterval; 85 begin 86 Timer.Interval := Round(FDuration * 1000 / FStepCount); 87 end; 88 89 procedure TCoolDockAutoHide.SetDuration(const AValue: Real); 90 begin 91 if FDuration = AValue then Exit; 92 FDuration := AValue; 93 UpdateTimerInterval; 94 end; 95 96 procedure TCoolDockAutoHide.SetStepCount(const AValue: Integer); 97 begin 98 if FStepCount = AValue then Exit; 99 FStepCount := AValue; 100 UpdateTimerInterval; 101 end; 102 103 procedure TCoolDockAutoHide.Hide; 104 begin 105 StartBounds := Control.BoundsRect; 106 Direction := -1; 107 Position := 1; 108 Timer.Enabled := True; 109 UpdateBounds; 110 end; 111 112 procedure TCoolDockAutoHide.Show; 113 begin 114 StartBounds := Control.BoundsRect; 115 Control.Align := alCustom; 116 Direction := 1; 117 Position := 0; 118 Timer.Enabled := True; 119 UpdateBounds; 120 end; 121 122 constructor TCoolDockAutoHide.Create; 123 begin 124 Timer := TTimer.Create(nil); 125 Timer.Enabled := False; 126 Timer.OnTimer := TimerExecute; 127 StepCount := 10; 128 Duration := 0.5; 129 end; 130 131 destructor TCoolDockAutoHide.Destroy; 132 begin 133 Timer.Free; 134 inherited Destroy; 135 end; 136 137 procedure TCoolDockAutoHide.TimerExecute(Sender: TObject); 138 begin 139 if Direction = 1 then begin 140 Position := Position + 1 / StepCount; 141 if Position > 1 then begin 142 Position := 1; 143 Timer.Enabled := False; 144 ControlVisible := True; 145 end; 146 end else 147 if Direction = -1 then begin 148 Position := Position - 1 / StepCount; 149 if Position < 1 then begin 150 Position := 0; 151 Timer.Enabled := False; 152 ControlVisible := False; 153 end; 154 end; 155 UpdateBounds; 156 end; 157 158 { TCoolDockStylePopupTabs } 159 160 procedure TCoolDockStylePopupTabs.TabControlMouseLeave(Sender: TObject); 161 begin 162 163 end; 164 165 procedure TCoolDockStylePopupTabs.TabControlChange(Sender: TObject); 166 begin 167 168 end; 169 170 procedure TCoolDockStylePopupTabs.TabControlMouseDown(Sender: TObject; 171 Button: TMouseButton; Shift: TShiftState; X, Y: Integer); 172 begin 173 174 end; 175 176 procedure TCoolDockStylePopupTabs.TabControlMouseUp(Sender: TObject; 177 Button: TMouseButton; Shift: TShiftState; X, Y: Integer); 178 begin 179 180 end; 181 182 constructor TCoolDockStylePopupTabs.Create(AManager: TObject); 183 begin 184 AutoHide := TCoolDockAutoHide.Create; 185 TabImageList := TImageList.Create(TCoolDockManager(AManager).DockSite); 186 with TabImageList do begin 187 end; 188 TabControl := TTabControl.Create(TCoolDockManager(AManager).DockSite); 189 with TabControl do begin 190 Parent := TCoolDockManager(AManager).DockSite; 191 Visible := False; 192 Align := alTop; 193 Height := 24; 194 OnChange := TabControlChange; 195 PopupMenu := PopupMenuTabs; 196 TTabControlNoteBookStrings(Tabs).NoteBook.OnMouseLeave := TabControlMouseLeave; 197 TTabControlNoteBookStrings(Tabs).NoteBook.OnMouseDown := TabControlMouseDown; 198 TTabControlNoteBookStrings(Tabs).NoteBook.OnMouseUp := TabControlMouseUp; 199 OnMouseUp := TabControlMouseUp; 200 Images := TabImageList; 201 end; 202 end; 203 204 destructor TCoolDockStylePopupTabs.Destroy; 205 begin 206 AutoHide.Free; 207 inherited Destroy; 208 end; 209 12 210 end. 13 211 -
Docking/CoolDocking/UCoolDockStyleRegions.pas
r89 r97 1 unit UCoolDockStyleRegions; 1 unit UCoolDockStyleRegions; 2 2 3 {$mode objfpc}{$H+}3 {$mode Delphi}{$H+} 4 4 5 5 interface 6 6 7 7 uses 8 Classes, SysUtils; 8 Classes, SysUtils, Controls, ExtCtrls, StdCtrls, UCoolDockStyle, 9 Graphics, Contnrs, Buttons, UCoolDockClientPanel; 10 11 type 12 TCoolDockStyleRegionsPanel = class(TPanel) 13 14 end; 15 16 { TCoolDockStyleRegions } 17 18 TCoolDockStyleRegions = class(TCoolDockStyle) 19 Header: TCoolDockHeader; 20 Panels: TObjectList; // TObjectList<TCoolDockStyleRegionsPanel> 21 constructor Create(AManager: TObject); 22 destructor Destroy; override; 23 procedure UpdateClientSize; override; 24 end; 9 25 10 26 implementation 11 27 28 uses 29 UCoolDocking; 30 31 32 { TCoolDockStyleRegions } 33 34 constructor TCoolDockStyleRegions.Create(AManager: TObject); 35 var 36 I: Integer; 37 begin 38 inherited; 39 Panels := TObjectList.Create; 40 41 with TCoolDockManager(AManager) do 42 for I := 0 to DockPanels.Count - 1 do begin 43 if Assigned(TCoolDockClientPanel(DockPanels[I]).Splitter) then 44 TCoolDockClientPanel(DockPanels[I]).Splitter.Visible := True; 45 TCoolDockClientPanel(DockPanels[I]).Visible := True; 46 TCoolDockClientPanel(DockPanels[I]).ClientAreaPanel.Parent := TCoolDockClientPanel(DockPanels[I]); 47 TCoolDockClientPanel(DockPanels[I]).ClientAreaPanel.Visible := True; 48 TCoolDockClientPanel(DockPanels[I]).Control.Visible := True; 49 end; 50 end; 51 52 destructor TCoolDockStyleRegions.Destroy; 53 begin 54 Panels.Free; 55 inherited Destroy; 56 end; 57 58 procedure TCoolDockStyleRegions.UpdateClientSize; 59 var 60 I: Integer; 61 begin 62 inherited UpdateClientSize; 63 with TCoolDockManager(Manager) do 64 for I := 0 to DockPanels.Count - 1 do begin 65 TCoolDockClientPanel(DockPanels[I]).Height := DockSite.Height div 66 DockSite.DockClientCount; 67 TCoolDockClientPanel(DockPanels[I]).Width := DockSite.Width div 68 DockSite.DockClientCount; 69 //TCoolDockClientPanel(FDockPanels[I]).DockPanelPaint(Self); 70 TCoolDockClientPanel(DockPanels[I]).DockPanelPaint(Self); 71 end; 72 end; 73 74 75 12 76 end. 13 77 -
Docking/CoolDocking/UCoolDockStyleTabs.pas
r89 r97 1 1 unit UCoolDockStyleTabs; 2 2 3 {$mode objfpc}{$H+}3 {$mode Delphi}{$H+} 4 4 5 5 interface 6 6 7 7 uses 8 Classes, SysUtils, UCoolDocking; 8 Classes, Controls, ExtCtrls, ComCtrls, SysUtils, 9 Menus, UCoolDockStyle, Forms, UCoolDockClientPanel; 9 10 10 11 type 12 13 { TCoolDockStyleTabs } 14 11 15 TCoolDockStyleTabs = class(TCoolDockStyle) 12 16 MouseDown: Boolean; 17 MouseButton: TMouseButton; 18 MouseDownSkip: Boolean; 19 TabControl: TTabControl; 20 TabImageList: TImageList; 21 PopupMenuTabs: TPopupMenu; 22 procedure TabControlMouseLeave(Sender: TObject); 23 procedure TabControlChange(Sender: TObject); 24 procedure TabControlMouseDown(Sender: TObject; Button: TMouseButton; 25 Shift: TShiftState; X, Y: Integer); 26 procedure TabControlMouseUp(Sender: TObject; Button: TMouseButton; 27 Shift: TShiftState; X, Y: Integer); 28 constructor Create(AManager: TObject); 29 destructor Destroy; override; 30 procedure InsertControl(NewPanel: TCoolDockClientPanel; 31 AControl: TControl; InsertAt: TAlign); override; 32 procedure UpdateClientSize; override; 33 private 34 FTabsPos: THeaderPos; 35 public 36 procedure SetTabsPos(const AValue: THeaderPos); 37 procedure PopupMenuTabCloseClick(Sender: TObject); 38 property TabsPos: THeaderPos read FTabsPos write SetTabsPos; 13 39 end; 14 40 15 41 implementation 16 42 43 uses 44 UCoolDocking; 45 46 { TCoolDockStyleTabs } 47 48 procedure TCoolDockStyleTabs.PopupMenuTabCloseClick(Sender: TObject); 49 begin 50 if TabControl.TabIndex <> -1 then 51 TCoolDockClientPanel(TCoolDockManager(Manager).DockPanels[TabControl.TabIndex]).Control.Hide; 52 end; 53 54 procedure TCoolDockStyleTabs.TabControlMouseLeave(Sender: TObject); 55 begin 56 (* if MouseDown then 57 if (TabControl.TabIndex <> -1) then begin 58 TCoolDockClientPanel(FDockPanels[TabControl.TabIndex]).ClientAreaPanel.DockSite := False; 59 DragManager.DragStart(TCoolDockClientPanel(FDockPanels[TabControl.TabIndex]).Control, False, 1); 60 end; 61 MouseDown := False; 62 *) 63 end; 64 65 procedure TCoolDockStyleTabs.TabControlChange(Sender: TObject); 66 var 67 I: Integer; 68 begin 69 // Hide all clients 70 with TCoolDockManager(Manager) do 71 for I := 0 to DockPanels.Count - 1 do begin 72 TCoolDockClientPanel(DockPanels[I]).ClientAreaPanel.Visible := False; 73 TCoolDockClientPanel(DockPanels[I]).ClientAreaPanel.Parent := DockSite; 74 TCoolDockClientPanel(DockPanels[I]).Control.Align := alClient; 75 TCoolDockClientPanel(DockPanels[I]).Control.Visible := False; 76 77 // Workaround for "Cannot focus" error 78 TForm(TCoolDockClientPanel(DockPanels[I]).Control).ActiveControl := nil; 79 end; 80 with TCoolDockManager(Manager) do 81 if (TabControl.TabIndex <> -1) and (DockPanels.Count > TabControl.TabIndex) then begin 82 with TCoolDockClientPanel(DockPanels[TabControl.TabIndex]), ClientAreaPanel do begin 83 Control.Show; 84 (*AutoHide.Enable := True; 85 if AutoHide.Enable then begin 86 //Parent := nil; 87 Visible := True; 88 if AutoHide.ControlVisible then begin 89 AutoHide.Hide; 90 end; 91 AutoHide.Control := Control; 92 AutoHide.Show; 93 end else begin 94 *) 95 //Parent := DockSite; 96 Visible := True; 97 UpdateClientSize; 98 // end; 99 end; 100 //TCoolDockClientPanel(FDockPanels[TabControl.TabIndex]).Visible := True; 101 end; 102 MouseDownSkip := True; 103 end; 104 105 procedure TCoolDockStyleTabs.TabControlMouseDown(Sender: TObject; 106 Button: TMouseButton; Shift: TShiftState; X, Y: Integer); 107 begin 108 if not MouseDownSkip then begin 109 MouseDown := True; 110 MouseButton := Button; 111 end; 112 MouseDownSkip := False; 113 end; 114 115 procedure TCoolDockStyleTabs.TabControlMouseUp(Sender: TObject; 116 Button: TMouseButton; Shift: TShiftState; X, Y: Integer); 117 begin 118 MouseDown := False; 119 end; 120 121 constructor TCoolDockStyleTabs.Create(AManager: TObject); 122 var 123 NewMenuItem: TMenuItem; 124 NewMenuItem2: TMenuItem; 125 I: Integer; 126 begin 127 inherited; 128 129 (*// Tabs popup 130 131 PopupMenuTabs := TPopupMenu.Create(Manager.DockSite); 132 133 NewMenuItem := TMenuItem.Create(PopupMenuTabs); 134 NewMenuItem.Caption := SDockStyle; 135 PopupMenuTabs.Items.Add(NewMenuItem); 136 137 NewMenuItem2 := TMenuItem.Create(NewMenuItem); 138 NewMenuItem2.Caption := SDockList; 139 NewMenuItem2.OnClick := PopupMenuListClick; 140 NewMenuItem.Add(NewMenuItem2); 141 142 NewMenuItem2 := TMenuItem.Create(NewMenuItem); 143 NewMenuItem2.Caption := SDockTabs; 144 NewMenuItem2.OnClick := PopupMenuTabsClick; 145 NewMenuItem.Add(NewMenuItem2); 146 147 NewMenuItem := TMenuItem.Create(PopupMenuTabs); 148 NewMenuItem.Caption := SPosition; 149 PopupMenuTabs.Items.Add(NewMenuItem); 150 151 NewMenuItem2 := TMenuItem.Create(NewMenuItem); 152 NewMenuItem2.Caption := SPositionAuto; 153 NewMenuItem2.OnClick := PopupMenuPositionAutoClick; 154 NewMenuItem.Add(NewMenuItem2); 155 156 NewMenuItem2 := TMenuItem.Create(NewMenuItem); 157 NewMenuItem2.Caption := SPositionTop; 158 NewMenuItem2.OnClick := PopupMenuPositionTopClick; 159 NewMenuItem.Add(NewMenuItem2); 160 161 NewMenuItem2 := TMenuItem.Create(NewMenuItem); 162 NewMenuItem2.Caption := SPositionLeft; 163 NewMenuItem2.OnClick := PopupMenuPositionLeftClick; 164 NewMenuItem.Add(NewMenuItem2); 165 166 NewMenuItem2 := TMenuItem.Create(NewMenuItem); 167 NewMenuItem2.Caption := SPositionBottom; 168 NewMenuItem2.OnClick := PopupMenuPositionBottomClick; 169 NewMenuItem.Add(NewMenuItem2); 170 171 NewMenuItem2 := TMenuItem.Create(NewMenuItem); 172 NewMenuItem2.Caption := SPositionRight; 173 NewMenuItem2.OnClick := PopupMenuPositionRightClick; 174 NewMenuItem.Add(NewMenuItem2); 175 176 NewMenuItem := TMenuItem.Create(PopupMenuTabs); 177 NewMenuItem.Caption := SCloseForm; 178 NewMenuItem.OnClick := PopupMenuCloseClick; 179 PopupMenuTabs.Items.Add(NewMenuItem); 180 181 NewMenuItem := TMenuItem.Create(PopupMenuTabs); 182 NewMenuItem.Caption := SRenameForm; 183 NewMenuItem.OnClick := PopupMenuRenameClick; 184 PopupMenuTabs.Items.Add(NewMenuItem); 185 186 NewMenuItem := TMenuItem.Create(PopupMenuTabs); 187 NewMenuItem.Caption := SUndock; 188 NewMenuItem.OnClick := PopupMenuUndockClick; 189 PopupMenuTabs.Items.Add(NewMenuItem); 190 191 NewMenuItem := TMenuItem.Create(PopupMenuTabs); 192 NewMenuItem.Caption := SCustomize; 193 NewMenuItem.OnClick := PopupMenuCustomizeClick; 194 PopupMenuTabs.Items.Add(NewMenuItem); *) 195 196 TabImageList := TImageList.Create(TCoolDockManager(AManager).DockSite); //FDockSite); 197 with TabImageList do begin 198 Name := TCoolDockManager(Manager).DockSite.Name + '_' + 'ImageList'; 199 end; 200 TabControl := TTabControl.Create(TCoolDockManager(AManager).DockSite); //FDockSite); 201 with TabControl do begin 202 Parent := TCoolDockManager(Manager).DockSite; 203 Name := TCoolDockManager(Manager).DockSite.Name + '_' + 'TabControl'; 204 Visible := False; 205 Align := alTop; 206 Height := 24; 207 OnChange := TabControlChange; 208 PopupMenu := PopupMenuTabs; 209 TTabControlNoteBookStrings(Tabs).NoteBook.OnMouseLeave := TabControlMouseLeave; 210 TTabControlNoteBookStrings(Tabs).NoteBook.OnMouseDown := TabControlMouseDown; 211 TTabControlNoteBookStrings(Tabs).NoteBook.OnMouseUp := TabControlMouseUp; 212 OnMouseUp := TabControlMouseUp; 213 Images := TabImageList; 214 end; 215 //TabsPos := hpTop; 216 //MoveDuration := 1000; // ms 217 218 TabControl.Visible := True; 219 TabControl.Tabs.Clear; 220 TabImageList.Clear; 221 with TCoolDockManager(Manager) do 222 for I := 0 to DockPanels.Count - 1 do begin 223 TabControl.Tabs.Add(TCoolDockClientPanel(DockPanels[I]).Control.Caption); 224 TabImageList.Add(TCoolDockClientPanel(DockPanels[I]).Header.Icon.Picture.Bitmap, nil); 225 if Assigned(TCoolDockClientPanel(DockPanels[I]).Splitter) then 226 TCoolDockClientPanel(DockPanels[I]).Splitter.Visible := False; 227 TCoolDockClientPanel(DockPanels[I]).ClientAreaPanel.Visible := False; 228 TCoolDockClientPanel(DockPanels[I]).Visible := False; 229 end; 230 TabControlChange(Self); 231 end; 232 233 destructor TCoolDockStyleTabs.Destroy; 234 begin 235 TabControl.Visible := False; 236 TabControl.Tabs.Clear; 237 inherited Destroy; 238 end; 239 240 procedure TCoolDockStyleTabs.InsertControl(NewPanel: TCoolDockClientPanel; 241 AControl: TControl; InsertAt: TAlign); 242 begin 243 inherited; 244 TabControl.Tabs.Add(AControl.Caption); 245 TabImageList.Add(NewPanel.Header.Icon.Picture.Bitmap, nil); 246 if Assigned(NewPanel.Splitter) then 247 NewPanel.Splitter.Visible := False; 248 NewPanel.ClientAreaPanel.Visible := False; 249 NewPanel.Visible := False; 250 TabControlChange(Self); 251 end; 252 253 procedure TCoolDockStyleTabs.UpdateClientSize; 254 var 255 I: Integer; 256 begin 257 inherited UpdateClientSize; 258 with TCoolDockManager(Manager) do 259 for I := 0 to DockPanels.Count - 1 do begin 260 TCoolDockClientPanel(DockPanels[I]).ClientAreaPanel.Width := DockSite.Width; 261 TCoolDockClientPanel(DockPanels[I]).ClientAreaPanel.Height := DockSite.Height - TabControl.Height; 262 //TCoolDockClientPanel(FDockPanels[I]).DockPanelPaint(Self); 263 end; 264 end; 265 266 procedure TCoolDockStyleTabs.SetTabsPos(const AValue: THeaderPos); 267 begin 268 (*if FTabsPos = AValue then Exit; 269 FTabsPos := AValue; 270 with TabControl do 271 case AValue of 272 hpAuto, hpTop: begin 273 Align := alTop; 274 TabPosition := tpTop; 275 Height := GrabberSize; 276 end; 277 hpLeft: begin 278 Align := alLeft; 279 TabPosition := tpLeft; 280 Width := GrabberSize; 281 end; 282 hpRight: begin 283 Align := alRight; 284 TabPosition := tpRight; 285 Width := GrabberSize; 286 end; 287 hpBottom: begin 288 Align := alBottom; 289 TabPosition := tpBottom; 290 Height := GrabberSize; 291 end; 292 end; *) 293 end; 294 295 17 296 end. 18 297 -
Docking/CoolDocking/UCoolDocking.pas
r96 r97 11 11 Buttons, ExtCtrls, Contnrs, Forms, ComCtrls, Dialogs, Menus, FileUtil, 12 12 UCoolDockCustomize, DOM, XMLWrite, XMLRead, UCoolDockWindowList, 13 DateUtils; 13 DateUtils, UCoolDockStyleTabs, UCoolDockStyleRegions, UCoolDockStylePopupTabs, 14 UCoolDockStylePopupRegions, UCoolDockStyle, UCoolDockClientPanel; 14 15 15 16 const 16 17 GrabberSize = 22; 17 AutoHideStepCount = 20;18 18 19 19 type 20 20 TDockDirection = (ddNone, ddHorizontal, ddVertical); 21 THeaderPos = (hpAuto, hpLeft, hpTop, hpRight, hpBottom);22 21 23 22 TCoolDockManager = class; 24 TCoolDockClientPanel = class;25 23 TCoolDockCustomize = class; 26 24 TCoolDockClient = class; … … 36 34 end; 37 35 38 TDockStyle = (dsList, dsTabs); 39 40 { TCoolDockHeader } 41 42 TCoolDockHeader = class(TPanel) 43 private 44 procedure CloseButtonClick(Sender: TObject); 45 procedure DrawGrabber(Canvas: TCanvas; AControl: TControl); 46 public 47 CloseButton: TSpeedButton; 48 Title: TLabel; 49 Icon: TImage; 50 ParentClientPanel: TCoolDockClientPanel; 51 Shape: TShape; 52 constructor Create(TheOwner: TComponent); override; 53 destructor Destroy; override; 54 end; 55 56 TCoolDockStyle = class 57 end; 58 59 { TCoolDockClientPanel } 60 61 TCoolDockClientPanel = class(TPanel) 62 private 63 FAutoHide: Boolean; 64 FHeaderPos: THeaderPos; 65 FShowHeader: Boolean; 66 function GetAutoHideEnabled: Boolean; 67 procedure SetAutoHide(const AValue: Boolean); 68 procedure SetAutoHideEnabled(const AValue: Boolean); 69 procedure SetHeaderPos(const AValue: THeaderPos); 70 procedure SetShowHeader(const AValue: Boolean); 71 procedure VisibleChange(Sender: TObject); 72 public 73 Header: TCoolDockHeader; 74 OwnerDockManager: TCoolDockManager; 75 Control: TControl; 76 Splitter: TSplitter; 77 ClientAreaPanel: TPanel; 78 constructor Create(TheOwner: TComponent); override; 79 destructor Destroy; override; 80 procedure DockPanelPaint(Sender: TObject); 81 procedure DockPanelMouseDown(Sender: TObject; Button: TMouseButton; 82 Shift: TShiftState; X, Y: Integer); 83 procedure ResizeExecute(Sender: TObject); 84 property ShowHeader: Boolean read FShowHeader write SetShowHeader; 85 property AutoHideEnabled: Boolean read GetAutoHideEnabled 86 write SetAutoHideEnabled; 87 property HeaderPos: THeaderPos read FHeaderPos write SetHeaderPos; 88 end; 89 90 { TCoolDockAutoHide } 91 92 TCoolDockAutoHide = class 93 private 94 FDuration: Real; 95 FStepCount: Integer; 96 StartBounds: TRect; 97 procedure SetDuration(const AValue: Real); 98 procedure SetStepCount(const AValue: Integer); 99 procedure UpdateBounds; 100 procedure UpdateTimerInterval; 101 public 102 Position: Real; 103 Direction: Integer; 104 TabPosition: TTabPosition; 105 Enable: Boolean; 106 Timer: TTimer; 107 Control: TControl; 108 ControlVisible: Boolean; 109 procedure Hide; 110 procedure Show; 111 constructor Create; 112 destructor Destroy; override; 113 procedure TimerExecute(Sender: TObject); 114 property Duration: Real read FDuration write SetDuration; 115 property StepCount: Integer read FStepCount write SetStepCount; 116 end; 36 TDockStyle = (dsList, dsTabs, dsPopupTabs, dsPopupList); 117 37 118 38 { TCoolDockManager } … … 120 40 TCoolDockManager = class(TDockManager) 121 41 private 122 MouseDown: Boolean;123 MouseButton: TMouseButton;124 MouseDownSkip: Boolean;125 42 FMaster: TCoolDockMaster; 126 FTabsPos: THeaderPos; 127 PopupMenuTabs: TPopupMenu; 43 DockStyleHandler: TCoolDockStyle; 128 44 PopupMenuHeader: TPopupMenu; 129 45 FDockStyle: TDockStyle; 130 TabControl: TTabControl;131 TabImageList: TImageList;132 46 FDockDirection: TDockDirection; 133 47 FDockSite: TWinControl; 134 48 FDockPanels: TObjectList; // TObjectList<TCoolDockClientPanel> 135 AutoHide: TCoolDockAutoHide;136 49 function FindControlInPanels(Control: TControl): TCoolDockClientPanel; 137 50 function GetDockSite: TWinControl; … … 139 52 procedure InsertControlPanel(Control: TControl; InsertAt: TAlign; 140 53 DropCtl: TControl); 141 procedure PopupMenuTabCloseClick(Sender: TObject);142 54 procedure SetDockStyle(const AValue: TDockStyle); 143 55 procedure SetMaster(const AValue: TCoolDockMaster); 144 56 procedure SetMoveDuration(const AValue: Integer); 145 procedure SetTabsPos(const AValue: THeaderPos);146 procedure TabControlMouseLeave(Sender: TObject);147 procedure TabControlChange(Sender: TObject);148 procedure TabControlMouseDown(Sender: TObject; Button: TMouseButton;149 Shift: TShiftState; X, Y: Integer);150 procedure TabControlMouseUp(Sender: TObject; Button: TMouseButton;151 Shift: TShiftState; X, Y: Integer);152 57 procedure UpdateClientSize; 153 58 procedure PopupMenuListClick(Sender: TObject); … … 188 93 189 94 function CreateContainer(InsertAt: TAlign): TCoolDockConjoinForm; 95 property DockPanels: TObjectList read FDockPanels write FDockPanels; 190 96 property DockStyle: TDockStyle read FDockStyle write SetDockStyle; 191 97 property MoveDuration: Integer read GetMoveDuration write SetMoveDuration; 192 property TabsPos: THeaderPos read FTabsPos write SetTabsPos;193 98 property Master: TCoolDockMaster read FMaster write SetMaster; 194 99 property DockSite: TWinControl read GetDockSite; … … 286 191 procedure Register; 287 192 288 implementation289 290 uses291 UCoolDockStyleTabs;292 293 193 resourcestring 294 194 SDockStyle = 'Style'; … … 309 209 SRenameWindow = 'Rename window'; 310 210 211 212 implementation 213 311 214 procedure Register; 312 215 begin … … 342 245 end; 343 246 344 procedure TCoolDockManager.TabControlMouseLeave(Sender: TObject);345 begin346 if MouseDown then347 if (TabControl.TabIndex <> -1) then begin348 TCoolDockClientPanel(FDockPanels[TabControl.TabIndex]).ClientAreaPanel.DockSite := False;349 DragManager.DragStart(TCoolDockClientPanel(FDockPanels[TabControl.TabIndex]).Control, False, 1);350 end;351 MouseDown := False;352 end;353 354 247 constructor TCoolDockManager.Create(ADockSite: TWinControl); 355 248 var … … 361 254 FDockPanels := TObjectList.Create; 362 255 363 AutoHide := TCoolDockAutoHide.Create; 364 365 // Tabs popup 256 FDockStyle := dsTabs; // To initialize style value have to be different 257 DockStyle := dsList; 258 259 (* // Tabs popup 366 260 367 261 PopupMenuTabs := TPopupMenu.Create(FDockSite); … … 498 392 NewMenuItem.OnClick := PopupMenuCustomizeClick; 499 393 PopupMenuHeader.Items.Add(NewMenuItem); 500 501 TabImageList := TImageList.Create(FDockSite); 502 with TabImageList do begin 503 Name := ADockSite.Name + '_' + 'ImageList'; 504 end; 505 TabControl := TTabControl.Create(FDockSite); 506 with TabControl do begin 507 Parent := FDockSite; 508 Name := ADockSite.Name + '_' + 'TabControl'; 509 Visible := False; 510 Align := alTop; 511 Height := 24; 512 OnChange := TabControlChange; 513 PopupMenu := PopupMenuTabs; 514 TTabControlNoteBookStrings(Tabs).NoteBook.OnMouseLeave := TabControlMouseLeave; 515 TTabControlNoteBookStrings(Tabs).NoteBook.OnMouseDown := TabControlMouseDown; 516 TTabControlNoteBookStrings(Tabs).NoteBook.OnMouseUp := TabControlMouseUp; 517 OnMouseUp := TabControlMouseUp; 518 Images := TabImageList; 519 end; 520 TabsPos := hpTop; 521 MoveDuration := 1000; // ms 394 *) 522 395 end; 523 396 … … 601 474 NewPanel.Header.Icon.Picture.Assign((Control as TForm).Icon); 602 475 603 if DockStyle = dsTabs then begin 604 TabControl.Tabs.Add(Control.Caption); 605 TabImageList.Add(NewPanel.Header.Icon.Picture.Bitmap, nil); 606 if Assigned(NewPanel.Splitter) then 607 NewPanel.Splitter.Visible := False; 608 NewPanel.ClientAreaPanel.Visible := False; 609 NewPanel.Visible := False; 610 TabControlChange(Self); 611 end; 476 DockStyleHandler.InsertControl(NewPanel, Control, InsertAt); 477 612 478 NewPanel.Control := Control; 613 479 Control.AddHandlerOnVisibleChanged(NewPanel.VisibleChange); … … 765 631 if FDockStyle <> AValue then begin 766 632 FDockStyle := AValue; 633 DockStyleHandler.Free; 767 634 if AValue = dsTabs then begin 768 TabControl.Visible := True; 769 TabControl.Tabs.Clear; 770 TabImageList.Clear; 771 for I := 0 to FDockPanels.Count - 1 do begin 772 TabControl.Tabs.Add(TCoolDockClientPanel(FDockPanels[I]).Control.Caption); 773 TabImageList.Add(TCoolDockClientPanel(FDockPanels[I]).Header.Icon.Picture.Bitmap, nil); 774 if Assigned(TCoolDockClientPanel(FDockPanels[I]).Splitter) then 775 TCoolDockClientPanel(FDockPanels[I]).Splitter.Visible := False; 776 TCoolDockClientPanel(FDockPanels[I]).ClientAreaPanel.Visible := False; 777 TCoolDockClientPanel(FDockPanels[I]).Visible := False; 778 end; 779 TabControlChange(Self); 635 DockStyleHandler := TCoolDockStyleTabs.Create(Self); 780 636 end else 781 637 if AValue = dsList then begin 782 TabControl.Visible := False; 783 TabControl.Tabs.Clear; 784 for I := 0 to FDockPanels.Count - 1 do begin 785 if Assigned(TCoolDockClientPanel(FDockPanels[I]).Splitter) then 786 TCoolDockClientPanel(FDockPanels[I]).Splitter.Visible := True; 787 TCoolDockClientPanel(FDockPanels[I]).Visible := True; 788 TCoolDockClientPanel(FDockPanels[I]).ClientAreaPanel.Parent := TCoolDockClientPanel(FDockPanels[I]); 789 TCoolDockClientPanel(FDockPanels[I]).ClientAreaPanel.Visible := True; 790 TCoolDockClientPanel(FDockPanels[I]).Control.Visible := True; 791 end; 638 DockStyleHandler := TCoolDockStyleRegions.Create(Self); 639 end else 640 if AValue = dsPopupList then begin 641 DockStyleHandler := TCoolDockStylePopupRegions.Create(Self); 642 end else 643 if AValue = dsPopupTabs then begin 644 DockStyleHandler := TCoolDockStylePopupTabs.Create(Self); 792 645 end; 793 646 end; … … 799 652 if FMaster = AValue then Exit; 800 653 FMaster := AValue; 801 TabsPos := AValue.DefaultTabsPos;802 654 end; 803 655 … … 806 658 end; 807 659 808 procedure TCoolDockManager.SetTabsPos(const AValue: THeaderPos);809 begin810 if FTabsPos = AValue then Exit;811 FTabsPos := AValue;812 with TabControl do813 case AValue of814 hpAuto, hpTop: begin815 Align := alTop;816 TabPosition := tpTop;817 Height := GrabberSize;818 end;819 hpLeft: begin820 Align := alLeft;821 TabPosition := tpLeft;822 Width := GrabberSize;823 end;824 hpRight: begin825 Align := alRight;826 TabPosition := tpRight;827 Width := GrabberSize;828 end;829 hpBottom: begin830 Align := alBottom;831 TabPosition := tpBottom;832 Height := GrabberSize;833 end;834 end;835 end;836 837 660 procedure TCoolDockManager.UpdateClientSize; 838 var 839 I: Integer; 840 begin 841 if DockStyle = dsList then begin 842 for I := 0 to FDockPanels.Count - 1 do begin 843 TCoolDockClientPanel(FDockPanels[I]).Height := FDockSite.Height div 844 FDockSite.DockClientCount; 845 TCoolDockClientPanel(FDockPanels[I]).Width := FDockSite.Width div 846 FDockSite.DockClientCount; 847 //TCoolDockClientPanel(FDockPanels[I]).DockPanelPaint(Self); 848 TCoolDockClientPanel(FDockPanels[I]).DockPanelPaint(Self); 849 end; 850 end else 851 if DockStyle = dsTabs then begin 852 for I := 0 to FDockPanels.Count - 1 do begin 853 TCoolDockClientPanel(FDockPanels[I]).ClientAreaPanel.Width := FDockSite.Width; 854 TCoolDockClientPanel(FDockPanels[I]).ClientAreaPanel.Height := FDockSite.Height - TabControl.Height; 855 //TCoolDockClientPanel(FDockPanels[I]).DockPanelPaint(Self); 856 end; 857 end; 858 end; 859 860 procedure TCoolDockManager.TabControlChange(Sender: TObject); 861 var 862 I: Integer; 863 begin 864 // Hide all clients 865 for I := 0 to FDockPanels.Count - 1 do begin 866 TCoolDockClientPanel(FDockPanels[I]).ClientAreaPanel.Visible := False; 867 TCoolDockClientPanel(FDockPanels[I]).ClientAreaPanel.Parent := FDockSite; 868 TCoolDockClientPanel(FDockPanels[I]).Control.Align := alClient; 869 TCoolDockClientPanel(FDockPanels[I]).Control.Visible := False; 870 871 // Workaround for "Cannot focus" error 872 TForm(TCoolDockClientPanel(FDockPanels[I]).Control).ActiveControl := nil; 873 end; 874 if (TabControl.TabIndex <> -1) and (FDockPanels.Count > TabControl.TabIndex) then begin 875 with TCoolDockClientPanel(FDockPanels[TabControl.TabIndex]), ClientAreaPanel do begin 876 Control.Show; 877 AutoHide.Enable := True; 878 if AutoHide.Enable then begin 879 //Parent := nil; 880 Visible := True; 881 if AutoHide.ControlVisible then begin 882 AutoHide.Hide; 883 end; 884 AutoHide.Control := Control; 885 AutoHide.Show; 886 end else begin 887 Parent := FDockSite; 888 Visible := True; 889 UpdateClientSize; 890 end; 891 end; 892 //TCoolDockClientPanel(FDockPanels[TabControl.TabIndex]).Visible := True; 893 end; 894 MouseDownSkip := True; 661 begin 662 DockStyleHandler.UpdateClientSize; 895 663 end; 896 664 … … 910 678 end; 911 679 912 procedure TCoolDockManager.PopupMenuTabCloseClick(Sender: TObject);913 begin914 if TabControl.TabIndex <> -1 then915 TCoolDockClientPanel(FDockPanels[TabControl.TabIndex]).Control.Hide;916 end;917 918 680 procedure TCoolDockManager.PopupMenuRenameClick(Sender: TObject); 919 681 var … … 927 689 procedure TCoolDockManager.PopupMenuPositionAutoClick(Sender: TObject); 928 690 begin 929 TabsPos := hpAuto;691 //TabsPos := hpAuto; 930 692 end; 931 693 932 694 procedure TCoolDockManager.PopupMenuPositionLeftClick(Sender: TObject); 933 695 begin 934 TabsPos := hpLeft;696 //TabsPos := hpLeft; 935 697 end; 936 698 937 699 procedure TCoolDockManager.PopupMenuPositionRightClick(Sender: TObject); 938 700 begin 939 TabsPos := hpRight;701 //TabsPos := hpRight; 940 702 end; 941 703 942 704 procedure TCoolDockManager.PopupMenuPositionTopClick(Sender: TObject); 943 705 begin 944 TabsPos := hpTop;706 //TabsPos := hpTop; 945 707 end; 946 708 947 709 procedure TCoolDockManager.PopupMenuPositionBottomClick(Sender: TObject); 948 710 begin 949 TabsPos := hpBottom;711 //TabsPos := hpBottom; 950 712 end; 951 713 … … 965 727 end; 966 728 967 procedure TCoolDockManager.TabControlMouseDown(Sender: TObject; Button: TMouseButton;968 Shift: TShiftState; X, Y: Integer);969 begin970 if not MouseDownSkip then begin971 MouseDown := True;972 MouseButton := Button;973 end;974 MouseDownSkip := False;975 end;976 977 procedure TCoolDockManager.TabControlMouseUp(Sender: TObject;978 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);979 begin980 MouseDown := False;981 end;982 983 729 procedure TCoolDockManager.PopupMenuListClick(Sender: TObject); 984 730 begin … … 986 732 end; 987 733 988 { TCoolDockClientPanel }989 990 procedure TCoolDockClientPanel.SetShowHeader(const AValue: Boolean);991 begin992 if FShowHeader = AValue then Exit;993 FShowHeader := AValue;994 DockPanelPaint(Self);995 end;996 997 procedure TCoolDockClientPanel.VisibleChange(Sender: TObject);998 var999 Visible: Boolean;1000 begin1001 (*if Assigned(Control) then begin1002 Visible := Control.Visible;1003 if Assigned(ClientAreaPanel) then1004 ClientAreaPanel.Visible := Visible;1005 if Assigned(Splitter) then1006 Splitter.Visible := Visible;1007 OwnerDockManager.UpdateClientSize;1008 end;*)1009 end;1010 1011 procedure TCoolDockClientPanel.SetAutoHide(const AValue: Boolean);1012 begin1013 if FAutoHide = AValue then Exit;1014 FAutoHide := AValue;1015 end;1016 1017 function TCoolDockClientPanel.GetAutoHideEnabled: Boolean;1018 begin1019 end;1020 1021 procedure TCoolDockClientPanel.SetAutoHideEnabled(const AValue: Boolean);1022 begin1023 1024 end;1025 1026 procedure TCoolDockClientPanel.SetHeaderPos(const AValue: THeaderPos);1027 begin1028 if FHeaderPos=AValue then exit;1029 FHeaderPos:=AValue;1030 end;1031 1032 constructor TCoolDockClientPanel.Create(TheOwner: TComponent);1033 begin1034 inherited;1035 ShowHeader := True;1036 Header := TCoolDockHeader.Create(Self);1037 with Header do begin1038 Parent := Self;1039 Visible := ShowHeader;1040 Align := alTop;1041 Height := GrabberSize;1042 ParentClientPanel := Self;1043 end;1044 ClientAreaPanel := TPanel.Create(Self);1045 with ClientAreaPanel do begin1046 Parent := Self;1047 Visible := True;1048 DockSite := True;1049 UseDockManager := True;1050 Align := alClient;1051 BevelInner := bvNone;1052 BevelOuter := bvNone;1053 //Color := clGreen;1054 end;1055 Splitter := TSplitter.Create(Self);1056 with Splitter do begin1057 //Color := clRed;1058 end;1059 OnPaint := DockPanelPaint;1060 Header.Shape.OnMouseDown := DockPanelMouseDown;1061 OnResize := ResizeExecute;1062 BevelInner := bvNone;1063 BevelOuter := bvNone;1064 AutoHideEnabled := True;1065 HeaderPos := hpTop;1066 end;1067 1068 destructor TCoolDockClientPanel.Destroy;1069 begin1070 inherited Destroy;1071 end;1072 1073 procedure TCoolDockClientPanel.ResizeExecute(Sender: TObject);1074 begin1075 Control.Top := GrabberSize;1076 Control.Left := 0;1077 Control.Width := Width;1078 Control.Height := Height - GrabberSize;1079 //Control.SetBounds(0, GrabberSize, Width - Control.Left,1080 // Height - Control.Top);1081 end;1082 1083 procedure TCoolDockClientPanel.DockPanelPaint(Sender: TObject);1084 var1085 I: Integer;1086 R: TRect;1087 begin1088 if not (csDesigning in ComponentState) then1089 if Assigned(Control) then begin1090 R := Control.ClientRect;1091 Canvas.FillRect(R);1092 Header.Visible := ShowHeader;1093 if ShowHeader then begin1094 if ClientAreaPanel.DockClientCount = 0 then1095 Header.DrawGrabber(Canvas, Control) else1096 Header.DrawGrabber(Canvas, ClientAreaPanel);1097 end;1098 end;1099 end;1100 1101 procedure TCoolDockClientPanel.DockPanelMouseDown(Sender: TObject;1102 Button: TMouseButton; Shift: TShiftState; X, Y: Integer);1103 begin1104 if Control is TForm then begin1105 //TForm(Control).SetFocus;1106 DockPanelPaint(Self);1107 end;1108 if (Button = mbLeft) then begin1109 //(Control as TWinControl).DockSite := False;1110 ClientAreaPanel.DockSite := False;1111 (Control as TWinControl).BeginDrag(False, 10);1112 //DragManager.DragStart(Control, False, 1);1113 end;1114 end;1115 734 1116 735 { TCoolDockConjoinForm } … … 1314 933 FClients.Remove(Client); 1315 934 end; 1316 end;1317 1318 { TCoolDockHeader }1319 1320 constructor TCoolDockHeader.Create(TheOwner: TComponent);1321 begin1322 inherited Create(TheOwner);1323 Shape := TShape.Create(Self);1324 with Shape do begin1325 Parent := Self;1326 Anchors := [akRight, akBottom, akLeft, akTop];1327 Left := 1;1328 Top := 1;1329 Width := Self.Width - 2;1330 Height := Self.Height - 2;1331 Brush.Style := bsClear;1332 end;1333 CloseButton := TSpeedButton.Create(Self);1334 with CloseButton do begin1335 Parent := Self;1336 Caption := 'X';1337 Font.Size := 6;1338 Width := GrabberSize - 8;1339 Height := GrabberSize - 8;1340 Anchors := [akRight, akTop];1341 Left := Self.Width - Width - 4;1342 Top := 4;1343 Visible := True;1344 OnClick := CloseButtonClick;1345 end;1346 Title := TLabel.Create(Self);1347 with Title do begin1348 Parent := Self;1349 Visible := True;1350 Top := 4;1351 Left := 6;1352 BevelInner := bvNone;1353 BevelOuter := bvNone;1354 end;1355 Icon := TImage.Create(Self);1356 with Icon do begin1357 Parent := Self;1358 Left := 4;1359 Top := 2;1360 Visible := True;1361 end;1362 end;1363 1364 destructor TCoolDockHeader.Destroy;1365 begin1366 inherited Destroy;1367 end;1368 1369 procedure TCoolDockHeader.DrawGrabber(Canvas: TCanvas; AControl: TControl);1370 begin1371 with Canvas do begin1372 Brush.Color := clBtnFace;1373 Pen.Color := clBlack;1374 //FillRect(0, 0, AControl.Width, GrabberSize);1375 1376 if (AControl as TWinControl).Focused then1377 Title.Font.Style := Font.Style + [fsBold]1378 else Title.Font.Style := Font.Style - [fsBold];1379 Rectangle(1, 1, AControl.Width - 1, GrabberSize - 1);1380 if Icon.Picture.Width > 0 then Title.Left := 8 + Icon.Picture.Width1381 else Title.Left := 6;1382 Title.Caption := AControl.Caption;1383 end;1384 end;1385 1386 procedure TCoolDockHeader.CloseButtonClick(Sender: TObject);1387 begin1388 ParentClientPanel.Control.Hide;1389 935 end; 1390 936 … … 1539 1085 end; 1540 1086 1541 { TCoolDockAutoHide }1542 1543 procedure TCoolDockAutoHide.UpdateBounds;1544 begin1545 case TabPosition of1546 tpBottom: begin1547 Control.Height := Round((StartBounds.Bottom - StartBounds.Top) * Position);1548 Control.Top := StartBounds.Bottom - Control.Height;1549 end;1550 tpTop: begin1551 Control.Height := Round((StartBounds.Bottom - StartBounds.Top) * Position);1552 end;1553 tpRight: begin1554 Control.Width := Round((StartBounds.Right - StartBounds.Left) * Position);1555 end;1556 tpLeft: begin1557 Control.Width := Round((StartBounds.Right - StartBounds.Left) * Position);1558 Control.Left := StartBounds.Right - Control.Width;1559 end;1560 end;1561 end;1562 1563 procedure TCoolDockAutoHide.UpdateTimerInterval;1564 begin1565 Timer.Interval := Round(FDuration * 1000 / FStepCount);1566 end;1567 1568 procedure TCoolDockAutoHide.SetDuration(const AValue: Real);1569 begin1570 if FDuration = AValue then Exit;1571 FDuration := AValue;1572 UpdateTimerInterval;1573 end;1574 1575 procedure TCoolDockAutoHide.SetStepCount(const AValue: Integer);1576 begin1577 if FStepCount = AValue then Exit;1578 FStepCount := AValue;1579 UpdateTimerInterval;1580 end;1581 1582 procedure TCoolDockAutoHide.Hide;1583 begin1584 StartBounds := Control.BoundsRect;1585 Direction := -1;1586 Position := 1;1587 Timer.Enabled := True;1588 UpdateBounds;1589 end;1590 1591 procedure TCoolDockAutoHide.Show;1592 begin1593 StartBounds := Control.BoundsRect;1594 Control.Align := alCustom;1595 Direction := 1;1596 Position := 0;1597 Timer.Enabled := True;1598 UpdateBounds;1599 end;1600 1601 constructor TCoolDockAutoHide.Create;1602 begin1603 Timer := TTimer.Create(nil);1604 Timer.Enabled := False;1605 Timer.OnTimer := TimerExecute;1606 StepCount := AutoHideStepCount;1607 Duration := 0.5;1608 end;1609 1610 destructor TCoolDockAutoHide.Destroy;1611 begin1612 Timer.Free;1613 inherited Destroy;1614 end;1615 1616 procedure TCoolDockAutoHide.TimerExecute(Sender: TObject);1617 begin1618 if Direction = 1 then begin1619 Position := Position + 1 / StepCount;1620 if Position > 1 then begin1621 Position := 1;1622 Timer.Enabled := False;1623 ControlVisible := True;1624 end;1625 end else1626 if Direction = -1 then begin1627 Position := Position - 1 / StepCount;1628 if Position < 1 then begin1629 Position := 0;1630 Timer.Enabled := False;1631 ControlVisible := False;1632 end;1633 end;1634 UpdateBounds;1635 end;1636 1087 1637 1088 end.
Note:
See TracChangeset
for help on using the changeset viewer.