From 71dc7b718bd1d3baf9215348f25b82314ff235c1 Mon Sep 17 00:00:00 2001 From: dsiders Date: Tue, 20 Jun 2023 01:24:02 +0100 Subject: [PATCH] Docs: LCL/imglist. Adds or updates TCustomImageList topics for changes in 79f7f1bb. * Adds: MarkAsChanged, DoAfterUpdateStarted, DoBeforeUpdateEnded * Updates: BeginUpdate, EndUpdate --- docs/xml/lcl/imglist.xml | 162 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 152 insertions(+), 10 deletions(-) diff --git a/docs/xml/lcl/imglist.xml b/docs/xml/lcl/imglist.xml index 99aeafb7b1..99918d4e9b 100644 --- a/docs/xml/lcl/imglist.xml +++ b/docs/xml/lcl/imglist.xml @@ -1843,7 +1843,7 @@ resolution is not found using the specified image width.

Index is an output parameter used to store the ordinal position of the image resolution that uses the specified image width. Index contains the -closest (but larger) resolution when the return value is False. +closest (but larger) resolution when the return value is False.

@@ -3295,6 +3295,121 @@ ClearOverlays is used in the implementation of the Clear and + + +Sets the value in the internal Changed flag to True. + + +

+MarkAsChanged allows an application to set the value for the +internal member which tracks whether the image list has been modified. When +enabled, the Change method performs change notifications for subscribers and +signals the OnChange event handler (when assigned) when the EndUpdate method +is called. +

+

+MarkAsChanged sets the value for the internal member to True. This +update normally occurs in methods like Clear, Delete, Move, ReadData, +ReadAdvData, and when the value in BkColor is changed. MarkAsChanged allows +descendent classes to set the flag value from any methods added to the class +or from application code. +

+
+ +Added in LCL version 2.4.0. + + + + + + + + + + + + + + + +
+ + + +Performs actions needed after the BeginUpdate method is started. + + +

+DoAfterUpdateStarted is a virtual method in +TCustomImageList called from the BeginUpdate method after the +internal update counter has been incremented. It is called when the first +update becomes active for the image list (the update counter is 1). Subsequent +calls to BeginUpdate do not call the DoAfterUpdateStarted method until the +update count returns to 1. +

+

+DoAfterUpdateStarted has an empty implementation in TCustomImageList, but can +be overridden in descendent classes to perform any actions needed in the +derived class. +

+

+Use DoBeforeUpdateEnded to perform actions needed in the EndUpdate method +prior to decrementing the update counter and calling the Change method. +

+

+Use MarkAsChanged to set the internal flag which tracks modifications to the +image list. +

+
+ +Added in LCL version 2.4.0. + + + + + + + +
+ + + +Performs actions needed before the EndUpdate method is completed. + + +

+DoBeforeUpdateEnded is a virtual method in +TCustomImageList called from the EndUpdate method. It is called +when the first update for the image list is completed (the update counter is +1). Subsequent calls to BeginUpdate do not call the DoAfterUpdateStarted +method until the update count returns to 1. It occurs immediately before the +update counter is decremented and the Change method is called. +

+

+DoBeforeUpdateEnded has an empty implementation in TCustomImageList, but can +be overridden in descendent classes to perform any actions needed in the +derived class. +

+

+Use DoAfterUpdateStarted to perform actions needed in the BeginUpdate method +after the update counter has been incremented. +

+

+Use MarkAsChanged to set the internal flag which tracks modifications to the +image list. +

+
+ +Added in LCL version 2.4.0. + + + + + + + +
+ Constructor for the class instance. @@ -3824,30 +3939,44 @@ identical content. -Starts an update to the image list, and blocks execution of the OnChange +Starts an update to the image list, and controls execution of the OnChange event.

-Use BeginUpdate when an update to the image list is started to -block execution of the OnChange event handler. +Call BeginUpdate when an update to the image list is started to +control execution of the OnChange event handler in Change.

BeginUpdate is used, along with EndUpdate, to speed up -the insertion of images in an image list. Every call to BeginUpdate must be -matched by a call to EndUpdate; i. e. update operations can be nested. +the insertion or modification of images in an image list. Every call to +BeginUpdate must be matched by a call to EndUpdate; i. e. update operations +can be nested.

BeginUpdate increments an internal counter in the class instance each time -the method is called. EndUpdate decrements the internal counter when called. -When the counter contains a positive non-zero value, the OnChange event -handler is not executed when the image list is changed. +the method is called. The DoAfterUpdateStarted method is called to perform any +actions needed in the image list when an update is started. It is called when +the internal counter is set to 1; subsequent calls to BeginUpdate do not call +DoAfterUpdateStarted until the update count has returned to 1. +

+

+EndUpdate is used to perform action needed when an update is completed and to +decrement the internal update counter. When the counter contains a positive +non-zero value, the OnChange event handler is not executed when the image list +is changed.

+ +Modified in LCL version 2.4.0 to call the DoAfterUpdateStarted method. + + + +
@@ -3864,7 +3993,7 @@ updates by blocking execution of the OnChange event handler.

BeginUpdate increments an internal counter in the class instance each time the method is called. EndUpdate decrements the internal counter when called. -When the counter contains a positive non-zero value, the OnChange event +If the modified counter contains a positive non-zero value, the OnChange event handler is not executed when the image list is changed. When the counter reaches zero (0), the Change method is called to perform OnChange notifications. @@ -3875,11 +4004,24 @@ method would cause the internal counter to contain a negative value, the RaiseGDBException method is called to raise an exception for the condition.

+

+EndUpdate calls the DoBeforeUpdateEnded method to perform any actions needed +when the internal update counter is set to 1. The value in the internal +counter is decremented, and the Change method is called prior to exit. Change +notifications and the OnChange event handler occur when there are no other +nested BeginUpdate calls active. +

+ +Modified in LCL version 2.4.0 to call the DoBeforeUpdateEnded method. + + + +