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 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489
|
<?xml version="1.0" encoding="UTF-8"?>
<fpdoc-descriptions>
<package name="LazControls">
<module name="ExtendedNotebook">
<short>
Contains an extended notebook with support for dragging and dropping tabs on the control.
</short>
<descr>
<p>
<file>ExtendedNotebook.pas</file> contains classes and types used to implement an extended notebook control. It provides support for dragging and dropping tabs on the control.
</p>
<p>
This file is part of the <file>LazControls</file> package,
</p>
</descr>
<!-- unresolved external references -->
<element name="Classes"/>
<element name="SysUtils"/>
<element name="Math"/>
<element name="LCLIntf"/>
<element name="LCLType"/>
<element name="LMessages"/>
<element name="Controls"/>
<element name="ComCtrls"/>
<element name="LCLProc"/>
<element name="TNotebookTabDragDropEvent">
<short>
Specifies an event handler signalled for a drag/drop event on a notebook tab.
</short>
<descr>
<p>
TNotebookTabDragDropEvent is the type used for the OnTabDragDropEx property in TExtendedNotebook. It is used to perform actions needed when a tab on a TExtendedNotebook control is moved to a new location using drag and drop.
</p>
<p>
An application must implement and assign an object method which uses this signature to respond to the event notification. It is signalled from the DragDrop method in TExtendedNotebook, and occurs after its OnTabDragOverEx event.
</p>
</descr>
<seealso>
<link id="TExtendedNotebook.OnTabDragDropEx"/>
<link id="TExtendedNotebook.OnTabDragOverEx"/>
<link id="TExtendedNotebook.DragDrop"/>
</seealso>
</element>
<element name="TNotebookTabDragDropEvent.Sender">
<short>Object for the notification.</short>
</element>
<element name="TNotebookTabDragDropEvent.Source">
<short>Control where the drag operation originated.</short>
</element>
<element name="TNotebookTabDragDropEvent.OldIndex">
<short>Original ordinal position for the dragged tab.</short>
</element>
<element name="TNotebookTabDragDropEvent.NewIndex">
<short>New ordinal position for the dragged tab.</short>
</element>
<element name="TNotebookTabDragDropEvent.CopyDrag">
<short>True if the Ctrl key is pressed during the drag and drop operation.</short>
</element>
<element name="TNotebookTabDragDropEvent.Done">
<short>True if the tab can be moved to the new location.</short>
</element>
<element name="TNotebookTabDragOverEvent">
<short>
Specifies an event handler signalled when a dragged tab is over a notebook control.
</short>
<descr/>
<seealso>
<link id="TExtendedNotebook.OnTabDragOverEx"/>
<link id="TExtendedNotebook.OnTabDragOver"/>
<link id="TExtendedNotebook.DragOver"/>
</seealso>
</element>
<element name="TNotebookTabDragOverEvent.Sender">
<short>Object for the notification.</short>
</element>
<element name="TNotebookTabDragOverEvent.Source">
<short>Control where the drag operation originated.</short>
</element>
<element name="TNotebookTabDragOverEvent.OldIndex">
<short>Original ordinal position for the dragged tab.</short>
</element>
<element name="TNotebookTabDragOverEvent.NewIndex">
<short>New ordinal position for the dragged tab.</short>
</element>
<element name="TNotebookTabDragOverEvent.CopyDrag">
<short>True if the Ctrl key is pressed during the drag and drop operation.</short>
</element>
<element name="TNotebookTabDragOverEvent.Accept">
<short>True if the notebook control can accept the dragged tab.</short>
</element>
<element name="TExtendedNotebook">
<short>
Implements a notebook or page control which supports drag and drop events for its tabs.
</short>
<descr>
<p>
TExtendedNotebook is a TPageControl descendant, and extends the ancestor class with properties, methods, and events which enable drag and drop operations for the tabs on the paged notebook control. It works in conjunction with the DragManager (TDragManager) instance for the LCL interface.
</p>
<p>
Overridden methods are provided initiates and completes a drag and drop operation, as well as handle mouse up, down and move messages for the control. Event handlers signalled during drag and drop are also provided. Additional properties are introduced to indicate how drop / drop operations are handled by the control and to identify the tab affected by the operation.
</p>
<p>
TExtendedNotebook is used in the implementation of TSourceWindow in the Lazarus IDE, where it provides access to the source editor for a tab, as well as its form and anchor design surfaces.
</p>
</descr>
<seealso>
<link id="#lcl.comctrls.TPageControl">TPageControl</link>
<link id="#lcl.controls.TDragManager">TDragManager</link>
<link id="#lcl.controls.DragManager">DragManager</link>
</seealso>
</element>
<!-- private -->
<element name="TExtendedNotebook.FDraggingTabIndex"/>
<element name="TExtendedNotebook.FOnTabDragDrop"/>
<element name="TExtendedNotebook.FOnTabDragOver"/>
<element name="TExtendedNotebook.FOnTabDragOverEx"/>
<element name="TExtendedNotebook.FOnTabDragDropEx"/>
<element name="TExtendedNotebook.FOnTabEndDrag"/>
<element name="TExtendedNotebook.FOnTabStartDrag"/>
<element name="TExtendedNotebook.FTabDragMode"/>
<element name="TExtendedNotebook.FTabDragAcceptMode"/>
<element name="TExtendedNotebook.FTabDragged"/>
<element name="TExtendedNotebook.FDragOverIndex"/>
<element name="TExtendedNotebook.FDragToRightSide"/>
<element name="TExtendedNotebook.FDragOverTabRect"/>
<element name="TExtendedNotebook.FDragNextToTabRect"/>
<element name="TExtendedNotebook.FMouseWaitForDrag"/>
<element name="TExtendedNotebook.FMouseDownIndex"/>
<element name="TExtendedNotebook.FMouseDownX"/>
<element name="TExtendedNotebook.FMouseDownY"/>
<element name="TExtendedNotebook.FTriggerDragX"/>
<element name="TExtendedNotebook.FTriggerDragY"/>
<element name="TExtendedNotebook.InitDrag"/>
<element name="TExtendedNotebook.InvalidateRect"/>
<element name="TExtendedNotebook.InvalidateRect.ARect"/>
<element name="TExtendedNotebook.TabIndexForDrag"/>
<element name="TExtendedNotebook.TabIndexForDrag.Result"/>
<element name="TExtendedNotebook.TabIndexForDrag.x"/>
<element name="TExtendedNotebook.TabIndexForDrag.y"/>
<element name="TExtendedNotebook.TabRectEx"/>
<element name="TExtendedNotebook.TabRectEx.Result"/>
<element name="TExtendedNotebook.TabRectEx.AIndex"/>
<element name="TExtendedNotebook.TabRectEx.X"/>
<element name="TExtendedNotebook.TabRectEx.Y"/>
<element name="TExtendedNotebook.TabRectEx.IsRightHalf"/>
<element name="TExtendedNotebook.MouseDown">
<short>Handles mouse down messages for the control.</short>
<descr>
<p>
MouseDown is an overridden method in TExtendedNotebook. It initializes members used to track drag and drop operations in the class instance, and sets the DragCursor for the control. It calls the inherited MouseDown method to handle an OnEditingDone event for the ActiveControl on the parent form. It updates DragManager for the mouse button in the notification, and signals the OnMouseDown event handler (when assigned). When DragMode is set to dmAutomatic, a left mouse button event causes the value in MouseCapture to be set to True.
</p>
<p>
MouseDown is called from methods which process LM_LBUTTONDOWN, LM_RBUTTONDOWN, LM_MBUTTONDOWN, and LM_XBUTTONDOWN window messages for the control.
</p>
</descr>
<seealso>
<link id="#lcl.controls.TControl.OnEditingDone">TControl.OnEditingDone</link>
<link id="#lcl.controls.TControl.MouseDown">TControl.MouseDown</link>
<link id="#lcl.controls.TControl.WMLButtonDown">TControl.WMLButtonDown</link>
<link id="#lcl.controls.TControl.WMRButtonDown">TControl.WMRButtonDown</link>
<link id="#lcl.controls.TControl.WMMButtonDown">TControl.WMMButtonDown</link>
<link id="#lcl.controls.TControl.WMXButtonDown">TControl.WMXButtonDown</link>
</seealso>
</element>
<element name="TExtendedNotebook.MouseDown.Button">
<short>Mouse button for the event.</short>
</element>
<element name="TExtendedNotebook.MouseDown.Shift">
<short>Shift, Ctrl, or Alt modifier for the mouse button event.</short>
</element>
<element name="TExtendedNotebook.MouseDown.X">
<short>Horizontal coordinate for the mouse pointer.</short>
</element>
<element name="TExtendedNotebook.MouseDown.Y">
<short>Vertical coordinate for the mouse pointer.</short>
</element>
<element name="TExtendedNotebook.MouseUp">
<short>Handles mouse up events for the control.</short>
<descr/>
<seealso/>
</element>
<element name="TExtendedNotebook.MouseUp.Button">
<short>Mouse button for the event.</short>
</element>
<element name="TExtendedNotebook.MouseUp.Shift">
<short>Shift, Ctrl, or Alt modifier for the mouse button event.</short>
</element>
<element name="TExtendedNotebook.MouseUp.X">
<short>Horizontal coordinate for the mouse pointer.</short>
</element>
<element name="TExtendedNotebook.MouseUp.Y">
<short>Vertical coordinate for the mouse pointer.</short>
</element>
<element name="TExtendedNotebook.MouseMove">
<short>Handles mouse move messages for the control.</short>
<descr/>
<seealso/>
</element>
<element name="TExtendedNotebook.MouseMove.Shift">
<short>Shift, Ctrl, or Alt modifier for the mouse button event.</short>
</element>
<element name="TExtendedNotebook.MouseMove.X">
<short>Horizontal coordinate for the mouse pointer.</short>
</element>
<element name="TExtendedNotebook.MouseMove.Y">
<short>Vertical coordinate for the mouse pointer.</short>
</element>
<element name="TExtendedNotebook.CNNotify">
<short>Handles control notification messages for the control.</short>
<descr/>
<seealso/>
</element>
<element name="TExtendedNotebook.CNNotify.Message">
<short>Message examined in the method.</short>
</element>
<element name="TExtendedNotebook.RemovePage">
<short>Removes the page at the specified ordinal position.</short>
<descr/>
<seealso/>
</element>
<element name="TExtendedNotebook.RemovePage.Index">
<short>Ordinal position for the page removed in the method.</short>
</element>
<element name="TExtendedNotebook.InsertPage">
<short>Inserts the specified page at the ordinal position in Index.</short>
<descr/>
<seealso/>
</element>
<element name="TExtendedNotebook.InsertPage.APage">
<short>Page instance inserted in the method.</short>
</element>
<element name="TExtendedNotebook.InsertPage.Index">
<short>Ordinal position where the page instance is inserted.</short>
</element>
<element name="TExtendedNotebook.CaptureChanged">
<short>Performs actions when the mouse capture has changed for the control.</short>
<descr/>
<seealso/>
</element>
<element name="TExtendedNotebook.DoStartDrag">
<short>Performs actions needed when a drag operation is started for the control.</short>
<descr/>
<seealso/>
</element>
<element name="TExtendedNotebook.DoStartDrag.DragObject">
<short>Object which is dragged in the operation.</short>
</element>
<element name="TExtendedNotebook.DoEndDrag">
<short>Performs actions needed when a drag operation is ended for the control.</short>
<descr/>
<seealso/>
</element>
<element name="TExtendedNotebook.DoEndDrag.Target">
<short>Target for the drag operation.</short>
</element>
<element name="TExtendedNotebook.DoEndDrag.X">
<short>Horizontal coordinate where the drag operation was ended.</short>
</element>
<element name="TExtendedNotebook.DoEndDrag.Y">
<short>Vertical coordinate where the drag operation was ended.</short>
</element>
<element name="TExtendedNotebook.DragOver">
<short>
Performs actions needed when a drag operation is over a tab on the control.
</short>
<descr/>
<seealso/>
</element>
<element name="TExtendedNotebook.DragOver.Source">
<short/>
</element>
<element name="TExtendedNotebook.DragOver.X">
<short/>
</element>
<element name="TExtendedNotebook.DragOver.Y">
<short/>
</element>
<element name="TExtendedNotebook.DragOver.State">
<short/>
</element>
<element name="TExtendedNotebook.DragOver.Accept">
<short/>
</element>
<element name="TExtendedNotebook.DragCanceled">
<short>Performs actions needed to cancel a drag operation for the control.</short>
<descr/>
<seealso/>
</element>
<element name="TExtendedNotebook.PaintWindow">
<short>Paints the window for the control to the specified device context.</short>
<descr/>
<seealso>
<link id="#lcl.controls.TWinControl.PaintWindow">TWinControl.PaintWindow</link>
<link id="#lcl.comctrls.TPageControl.TabPosition">TPageControl.TabPosition</link>
</seealso>
</element>
<element name="TExtendedNotebook.PaintWindow.DC">
<short>Device context where the window is drawn.</short>
</element>
<element name="TExtendedNotebook.Create">
<short>Constructor for the class instance.</short>
<descr>
<p>
<var>Create</var> is the overridden constructor for the class instance. It ensures that internal members used in drag and drop operations are initialized for the class instance.
</p>
</descr>
<seealso>
<link id="TExtendedNotebook.TabDragMode"/>
<link id="#lcl.comctrls.TPageControl.DragCursor">TPageControl.DragCursor</link>
</seealso>
</element>
<element name="TExtendedNotebook.Create.TheOwner">
<short>Owner of the class instance.</short>
</element>
<element name="TExtendedNotebook.DragDrop">
<short>
Performs actions needed when a dragged object is dropped onto the control.
</short>
<descr>
<p>
<var>DragDrop</var> is an overridden method in <var>TExtendedNotebook</var> used to perform actions needed when the object in <var>Source</var> is dropped on the control.
</p>
<p>
If Source is not derived from TExtendedNotebook, or not the tab being dragged in the control, the inherited method is called to signal the OnDragDrop event handler (when assigned). No additional actions are performed in the method when this situation occurs.
</p>
<p>
The OnTabDragDrop event handler is signalled (when assigned) for the TExtendedNotebook instance in Source. The OnTabDragDropEx event handler is signalled (when assigned) to allow Ctrl + Drag mouse messages to be handled for the control.
</p>
<p>
If the tab order was changed by the drag operation, the tabs (pages) are re-ordered to reflect the new position.
</p>
</descr>
<seealso/>
</element>
<element name="TExtendedNotebook.DragDrop.Source">
<short>Object dragged / dropped on to the control.</short>
</element>
<element name="TExtendedNotebook.DragDrop.X">
<short>Horizontal coordinate where the drop occurred.</short>
</element>
<element name="TExtendedNotebook.DragDrop.Y">
<short>Vertical coordinate where the drop occurred.</short>
</element>
<element name="TExtendedNotebook.BeginDragTab">
<short>Starts a drag operation for a tab on the control.</short>
<descr>
<p>
Called from the MouseMove method when a mouse down event has occurred on a tab in the control.
</p>
</descr>
<seealso/>
</element>
<element name="TExtendedNotebook.BeginDragTab.ATabIndex">
<short>Ordinal position for the tab affected in the drag operation.</short>
</element>
<element name="TExtendedNotebook.BeginDragTab.Immediate">
<short>
True if the drag operation starts immediately and the drag threshold is ignored.
</short>
</element>
<element name="TExtendedNotebook.BeginDragTab.Threshold">
<short>
Distance that the mouse must move before the drag operation starts, or -1 to use the default value from the drag manager.
</short>
</element>
<element name="TExtendedNotebook.DraggingTabIndex">
<short>Ordinal position for the tab affected by a drag operation.</short>
<descr>
<p>
DraggingTabIndex is a read-only Integer property which contains the ordinal position for the tab or page active in a drag and drop operation. Its value is assigned in methods like BeginDragTab, DoEndDrag, and DragCanceled. The value is set to -1 when drag and drop is not active for the control.
</p>
<p>
Its value is used in the DragOver and DragDrop methods, and is passed as an argument to event handlers signalled in the class instance.
</p>
</descr>
<seealso>
<link id="TExtendedNotebook.BeginDragTab"/>
<link id="TExtendedNotebook.DoEndDrag"/>
<link id="TExtendedNotebook.DragCanceled"/>
<link id="TExtendedNotebook.DragOver"/>
<link id="TExtendedNotebook.DragDrop"/>
</seealso>
</element>
<element name="TExtendedNotebook.OnTabDragOver">
<short>
Event handler signalled when the mouse hovers over a tab on the control during a drag operation.
</short>
<descr/>
<seealso/>
</element>
<element name="TExtendedNotebook.OnTabDragOverEx">
<short>
Event handler signalled when the Ctrl key is held while dragging a tab on the control.
</short>
<descr/>
<seealso/>
</element>
<element name="TExtendedNotebook.OnTabDragDrop">
<short>
Event handler signalled when an object is dropped onto a tab on the control.
</short>
<descr/>
<seealso/>
</element>
<element name="TExtendedNotebook.OnTabDragDropEx">
<short>
Event handler signalled when an object is dropped onto a tab on the control while the Ctrl key is held.
</short>
<descr/>
<seealso/>
</element>
<element name="TExtendedNotebook.OnTabEndDrag">
<short>
Event handler signalled when a drag operation is ended for a tab on the control.
</short>
<descr/>
<seealso/>
</element>
<element name="TExtendedNotebook.OnTabStartDrag">
<short>
Event handler signalled when a drag operation is started for a tab on the control.
</short>
<descr/>
<seealso/>
</element>
<element name="TExtendedNotebook.TabDragMode">
<short>
Indicates how a Drag operation is started for a tab on the control.
</short>
<descr>
<p>
The default value for the property is <var>dmManual</var>, and indicates that the operation is started in code executed by OnTabStartDrag event handler for the control. When set to <var>dmAutomatic</var>, the drag operation is initialized in the MouseDown method when the left mouse button is clicked on a tab for the notebook control.
</p>
</descr>
<seealso/>
</element>
<element name="TExtendedNotebook.TabDragAcceptMode">
<short>
Default accept mode for a drag operation for a tab.
</short>
<descr>
<p>
<var>TabDragAcceptMode</var> is a <var>TDragMode</var> property which indicates how a dragged tab is accepted on the destination control. It is used in the DragDrop method to determine whether the tab is positioned automatically, or handled in code assigned to an event handler.
</p>
<p>
The default value for the property is <var>dmManual</var>, and indicates that the tab is relocated manually in the OnTabDragDropEx event handler for the control. When set to <var>dmAutomatic</var>, the tab is automatically relocated using the Move method in the Pages collection for the control.
</p>
</descr>
<seealso/>
</element>
</module>
</package>
</fpdoc-descriptions>
|