@@ -3341,8 +3341,28 @@
+ PopUp is an overloaded method used to display the pop-up menu. An overloaded variant is provided which includes X and Y coordinates where the pop-up menu is displayed. The parameterless version calls the overloaded variant using the current position for the mouse pointer in the X and Y arguments.
+
+ No actions are performed in the method if a value has already been assigned to the ActivePopupMenu variable. DoPopUp is called to signal the OnPopup event handler (when assigned). No additional actions are performed in the method if menu items have not been defined in the Items property.
+
+ PopUp sets the value in ActivePopupMenu to the current class instance. The InitiateActions method is called for the menu Items to ensure that the ActionLink for the component is updated. The handles for the menu and its sub-items are recreated, and the OnMenuPopupHandler event handler is signalled (when assigned).
+
+ PopUpMenu calls the corresponding method in the widgetset class prior to exiting from the method.
+
+ PopupComponent is a TComponent property which contains a reference to the component which implements the pop-up menu. It allows properties and methods in the implementor to be accessed from the menu items for the pop-up menu. Its value is must be assigned in code where the pop-up menu is created and configured. +
++ PopupPoint is a read-only TPoint property which contains the coordinates where the pop-up menu is displayed. The value in PopupPoint is updated when the PopUp method is called. +
++ Close is a method used to close the pop-up menu when it is active. When ActivePopupMenu contains the current class instance, the DoClose method is called to signal the OnClose event handler (when assigned). ActivePopupMenu is set to Nil to indicate that the pop-up menu is no longer active. +
++ No actions are performed in the method if ActivePopupMenu does not refer to the current class instance. +
++ Alignment is a TPopupAlignment property which indicates the alignment of the pop-up menu relative to the mouse coordinates in PopupPoint. The default value for the property is paLeft and causes the menu to be displayed to the left of the mouse coordinates passed to the PopUp method. +
++ AutoPopUp determines whether the pop-menu is automatically displayed when the mouse is hovered over the PopupComponent for the menu. Its value can be used in the implementing component to determine whether the PopUp method should be called. The default value for the property is True. +
++ TrackButton is a TTrackButton property which contains the mouse button which can be used to activate the pop-up menu. The default value for the property is tbRightButton. +
++ TrackButton is used in widgetset classes when they are notified of the mouse event for the menu and perform the actions needed for the platform. +
++ OnPopUp is signalled from DoPopUp when the PopUp method is executed. The Sender argument contains the TPopUpMenu instance for the notification, and occurs before the handles for menu items are recreated and the widgetset class is used to display the pop-up menu. It can be used to alter the menu items for the pop-up menu based on context. +
+
@@ -3474,7 +3540,11 @@
+ The value for the variable is updated when the PopUp or Close methods are called for a TPopUpMenu instance. It is set to the TPopUpMenu instance in the Popup method if an existing pop-up menu is not already active. It is set to Nil when the Close method is called for the pop-up menu.
+
+ OnMenuPopupHandler is a TNotifyEvent variable which contains the global routine executed when when a pop-up menu is displayed. It is signalled (when assigned) from the Popup method in a TPopUpMenu instance, or from the Click method in a TMenuItem instance. The MenuPopupHandler method in Application is assigned to the variable (by default) during application start up. It is set to Nil when an application is shut down.
+
+ NewMenu is a TMainMenu function used to create and configure a new menu instance using the values passed in the arguments to the routine. The return value is a TMainMenu instance created using the component in Owner as the owner for the class instance. The value in AName is used in the Name property for the new menu instance. +
++ NewMenu calls an implementation routine to add the menu Items to the new menu instance. It ensures that the Owner for the menu items are updated to reflect the Owner for the new menu instance, and that they are inserted into the Owner component. +
++ NewPopupMenu is a TPopUpMenu function used to create and configure a new pop-menu with the values specified in the arguments to the routine. The return value is created using the component in Owner as the owner of the class instance. The value in AName is used in the Name property for the new menu instance. AutoPopUp and Alignment are assigned to the corresponding properties in the new pop-up menu instance. +
++ NewPopupMenu calls an implementation routine to add the menu Items to the new menu instance. It ensures that the Owner for the menu items are updated to reflect the Owner for the new menu instance, and that they are inserted into the Owner component. +
++ NewSubMenu is a TMenuItem function used to create a sub-menu using the values specified in the arguments to the routine. The return value contains the TMenuItem instance created to represent the sub-menu. It uses the value in aCaption as the caption text for the menu item, and AName contains the name for the sub-menu. +
++ The menu item is created using Nil as the owner of the class instance; it must be added or inserted into the Items for the desired menu instance. Each of the menu Items is added to the class instance, and the remaining arguments are assigned to the corresponding properties for the sub-menu (menu item). +
++ NewItem is a TMenuItem function used to create and configure a new menu item instance using the values passed in the arguments to the routine. The TMenuItem instance is created with its Owner property set to Nil. Values passed in the parameters are assigned to the corresponding properties in the TMenuItem instance in the return value. +
++ Other property values for the menu item can be assigned in the calling routine. Use the Add or Insert method in the desired menu or sub menu to store the new menu item instance. +
++ Uses the value in cLineCaption as the caption text for the menu item. +
+