lazarus/docs/xml/lcl/menus.xml

3815 lines
159 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<fpdoc-descriptions>
<package name="lcl">
<!--
====================================================================
Menus
====================================================================
-->
<module name="Menus">
<short>Implements menus used in forms created with the Lazarus IDE.</short>
<descr>
<p>
<file>menus.pp</file> contains classes, types, and routines used to implement menus used on TForm instances in the Lazarus Component Library (<b>LCL</b>).
</p>
<p>
Authors: Shane Miller and Marc Weustink
</p>
<p>
The following components are added to the Lazarus IDE component palette:
</p>
<p>
<b>Standard</b> Tab
</p>
<ul>
<li>TMainMenu</li>
<li>TPopupMenu</li>
</ul>
<p>
<b>Registered</b> but not displayed:
</p>
<ul>
<li>TMenuItem</li>
</ul>
</descr>
<!-- unresolved references -->
<element name="Types"/>
<element name="Classes"/>
<element name="SysUtils"/>
<element name="LCLStrConsts"/>
<element name="LCLType"/>
<element name="LCLProc"/>
<element name="LCLIntf"/>
<element name="LCLClasses"/>
<element name="LResources"/>
<element name="LMessages"/>
<element name="ActnList"/>
<element name="Graphics"/>
<element name="ImgList"/>
<element name="Themes"/>
<element name="LazMethodList"/>
<element name="LazLoggerBase"/>
<element name="EMenuError">
<short>
Exception raised when an error occurs while accessing a menu item.
</short>
<descr/>
<seealso>
<link id="TMenuItem.Items"/>
<link id="TMenuItem.Delete"/>
<link id="TMenuItem.Remove"/>
</seealso>
</element>
<element name="TGlyphShowMode">
<short>
<var>TGlyphShowMode</var> indicates if the glyph image of a menu or button should shown or not and in which circumstances.
</short>
<descr/>
<seealso>
<link id="#lcl.forms.TApplication.ShowMenuGlyphs">TApplication.ShowMenuGlyphs</link>
<link id="#lcl.forms.TApplicationShowGlyphs">TApplicationShowGlyphs</link>
<link id="#lcl.buttons.TCustomBitBtn.GlyphShowMode">TCustomBitBtn.GlyphShowMode</link>
</seealso>
</element>
<element name="TGlyphShowMode.gsmAlways">
<short>Always show the glyph image.</short>
</element>
<element name="TGlyphShowMode.gsmNever">
<short>Never show the glyph image.</short>
</element>
<element name="TGlyphShowMode.gsmApplication">
<short>
Uses the setting in the Application.ShowMenuGlyphs property.
</short>
</element>
<element name="TGlyphShowMode.gsmSystem">
<short>Uses the theme element setting in ThemeServices.</short>
</element>
<element name="TMenuChangeEvent">
<short>
Specifies an event handler signalled when a menu or menu item is changed.
</short>
<descr>
<p>
<var>TMenuChangeEvent</var> defines an event handler signalled when a menu or a menu item has been changed.
</p>
<p>
TMenuChangeEvent is the type used for the <var>OnChange</var> property in both <var>TMenu</var> and <var>TMenuItem</var>, and implemented in the <var>TMenu.MenuChanged</var> method.
</p>
</descr>
<seealso>
<link id="TMenu.OnChange"/>
<link id="TMenu.MenuChanged"/>
<link id="TMenuItem.MenuChanged"/>
</seealso>
</element>
<element name="TMenuChangeEvent.Sender">
<short>Object for the event notification.</short>
</element>
<element name="TMenuChangeEvent.Source">
<short>Menu or menu item where the change occurred.</short>
</element>
<element name="TMenuChangeEvent.Rebuild">
<short>True to rebuild the menu item hierarchy.</short>
</element>
<element name="TMenuActionLink">
<short>
<var>TMenuActionLink</var>: defines the link between a selected menu item and its corresponding action.
</short>
<descr>
<p>
<var>TMenuActionLink</var> defines the link between a selected menu item and its corresponding action. Properties are protected and not readily accessible by application programmers.</p>
</descr>
</element>
<element name="TMenuActionLink.FClient">
<short>Stored a reference to the menu item for the link.</short>
</element>
<element name="TMenuActionLink.AssignClient" link="#rtl.classes.TBasicActionLink.AssignClient">
<short/>
<descr>
<p>
Overridden in <var>TMenuActionLink</var> to ensure that the value in <var>AClient</var> is cast to the <var>TMenuItem</var> type used for the internal client.
</p>
</descr>
<seealso/>
</element>
<element name="TMenuActionLink.AssignClient.AClient" link="#rtl.classes.TBasicActionLink.AssignClient"/>
<element name="TMenuActionLink.IsAutoCheckLinked">
<short>
Determines if the menu item and action have the same value in their AutoCheck properties.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenuActionLink.IsAutoCheckLinked.Result">
<short>True when AutoCheck is the same in the menu item and the action.</short>
</element>
<element name="TMenuActionLink.IsCaptionLinked" link="#lcl.actnlist.TActionLink.IsCaptionLinked">
<short/>
<descr/>
<seealso/>
</element>
<element name="TMenuActionLink.IsCaptionLinked.Result">
<short/>
</element>
<element name="TMenuActionLink.IsCheckedLinked" link="#lcl.actnlist.TActionLink.IsCheckedLinked">
<short/>
<descr/>
<seealso/>
</element>
<element name="TMenuActionLink.IsCheckedLinked.Result">
<short/>
</element>
<element name="TMenuActionLink.IsEnabledLinked" link="#lcl.actnlist.TActionLink.IsEnabledLinked">
<short/>
<descr/>
<seealso/>
</element>
<element name="TMenuActionLink.IsEnabledLinked.Result">
<short/>
</element>
<element name="TMenuActionLink.IsHelpContextLinked" link="#lcl.actnlist.TActionLink.IsHelpContextLinked">
<short/>
<descr/>
<seealso/>
</element>
<element name="TMenuActionLink.IsHelpContextLinked.Result">
<short/>
</element>
<element name="TMenuActionLink.IsHintLinked" link="#lcl.actnlist.TActionLink.IsHintLinked">
<short/>
<descr/>
<seealso/>
</element>
<element name="TMenuActionLink.IsHintLinked.Result">
<short/>
</element>
<element name="TMenuActionLink.IsGroupIndexLinked" link="#lcl.actnlist.TActionLink.IsGroupIndexLinked">
<short/>
<descr/>
<seealso/>
</element>
<element name="TMenuActionLink.IsGroupIndexLinked.Result">
<short/>
</element>
<element name="TMenuActionLink.IsImageIndexLinked" link="#lcl.actnlist.TActionLink.IsImageIndexLinked">
<short/>
<descr/>
<seealso/>
</element>
<element name="TMenuActionLink.IsImageIndexLinked.Result">
<short/>
</element>
<element name="TMenuActionLink.IsShortCutLinked" link="#lcl.actnlist.TActionLink.IsShortCutLinked">
<short/>
<descr/>
<seealso/>
</element>
<element name="TMenuActionLink.IsShortCutLinked.Result">
<short/>
</element>
<element name="TMenuActionLink.IsVisibleLinked" link="#lcl.actnlist.TActionLink.IsVisibleLinked">
<short/>
<descr/>
<seealso/>
</element>
<element name="TMenuActionLink.IsVisibleLinked.Result">
<short/>
</element>
<element name="TMenuActionLink.IsOnExecuteLinked">
<short>
Indicates if the OnExecute event handler in the action is linked to a menu item.
</short>
<descr>
<p>
<var>IsOnExecuteLinked</var> always returns true in <var>TBasicActionLink</var>. Descendent classes can override this method to provide a different result.
</p>
</descr>
<seealso>
<link id="#rtl.classes.TBasicActionLink">TBasicActionLink</link>
</seealso>
</element>
<element name="TMenuActionLink.IsOnExecuteLinked.Result">
<short/>
</element>
<element name="TMenuActionLink.SetAutoCheck">
<short>
<var>SetAutoCheck</var> - specifies whether AutoCheck is to apply.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenuActionLink.SetAutoCheck.Value">
<short/>
</element>
<element name="TMenuActionLink.SetCaption">
<short>
<var>SetCaption</var> - specifies the caption for the linked <var>MenuItem</var>.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenuActionLink.SetCaption.Value">
<short/>
</element>
<element name="TMenuActionLink.SetChecked">
<short>
<var>SetChecked</var> - specifies whether the Item is checked.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenuActionLink.SetChecked.Value">
<short/>
</element>
<element name="TMenuActionLink.SetEnabled">
<short>
<var>SetEnabled</var> - specifies whether the action is enabled.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenuActionLink.SetEnabled.Value">
<short/>
</element>
<element name="TMenuActionLink.SetHelpContext">
<short>
<var>SetHelpContext</var> - specifies the Help context.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenuActionLink.SetHelpContext.Value">
<short/>
</element>
<element name="TMenuActionLink.SetHint">
<short>Sets the Hint text for the linked menu action.</short>
<descr/>
<seealso/>
</element>
<element name="TMenuActionLink.SetHint.Value">
<short/>
</element>
<element name="TMenuActionLink.SetImageIndex">
<short>Sets the index for the image associated with the linked menu action.</short>
<descr/>
<seealso/>
</element>
<element name="TMenuActionLink.SetImageIndex.Value">
<short/>
</element>
<element name="TMenuActionLink.SetShortCut">
<short>Sets the ShortCut or accelerator key for the linked menu action.</short>
<descr/>
<seealso/>
</element>
<element name="TMenuActionLink.SetShortCut.Value">
<short/>
</element>
<element name="TMenuActionLink.SetVisible">
<short>
Sets the value in Visible for the menu item when the client and the action are linked.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenuActionLink.SetVisible.Value">
<short>New value for the Visible property in the menu item.</short>
</element>
<element name="TMenuActionLink.SetOnExecute">
<short>Not used in the current LCL implementation.</short>
<descr>
<p>
In previous LCL versions, this method changed the OnClick event handler. That action is not needed because TMenuItem.Click executes the Action. The current version has an empty implementation.
</p>
</descr>
<seealso/>
</element>
<element name="TMenuActionLink.SetOnExecute.Value">
<short/>
</element>
<element name="TMenuActionLinkClass">
<short>
<var>TMenuActionLinkClass</var> - class of <var>TMenuActionLink</var>.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenuItemEnumerator">
<short>
Implements an enumerator for child menu items in the specified TMenuItem instance.
</short>
<descr>
<p>
<var>TMenuItemEnumerator</var> is a class which implements an enumerator for child menu items for a specified <var>TMenuItem</var> instance. The menu item examined is passed as an argument to the constructor, and the reference is stored in an internal member variable.
</p>
<p>
TMenuItemEnumerator provides the <var>MoveNext</var> method used to advance the position for the enumerator, and the <var>Current</var> property which returns the TMenuItem instance in the child menu <var>Items</var> at the current enumerator position.
</p>
<p>
TMenuItemEnumerator is the type returned from the <var>TMenuItem.GetEnumerator</var> method.
</p>
</descr>
<seealso>
<link id="TMenuItem.GetEnumerator"/>
</seealso>
</element>
<!-- private -->
<element name="TMenuItemEnumerator.FMenuItem"/>
<element name="TMenuItemEnumerator.FPosition"/>
<element name="TMenuItemEnumerator.GetCurrent"/>
<element name="TMenuItemEnumerator.GetCurrent.Result"/>
<!-- public -->
<element name="TMenuItemEnumerator.Create">
<short>Constructor for the class instance.</short>
<descr>
<p>
<var>Create</var> is the constructor for the class instance. Create stores the menu item in the <var>AMenuItem</var> argument to an internal member, and sets the internal position for the enumerator to <b>-1</b>.
</p>
<p>
Use <var>MoveNext</var> to advance to the first and subsequent child menu items for the enumerator. Use <var>Current</var> to retrieve the TMenuItem instance at the current position for the enumerator.
</p>
</descr>
<seealso>
<link id="TMenuItemEnumerator.MoveNext"/>
<link id="TMenuItemEnumerator.Current"/>
<link id="TMenuItem.Items"/>
</seealso>
</element>
<element name="TMenuItemEnumerator.Create.AMenuItem">
<short>Menu item with the child menu items accessed in the class instance.</short>
</element>
<element name="TMenuItemEnumerator.MoveNext">
<short>Moves to the next position for the enumerator.</short>
<descr/>
<seealso>
<link id="TMenuItemEnumerator.Current"/>
<link id="TMenuItem.Items"/>
<link id="TMenuItem.Count"/>
</seealso>
</element>
<element name="TMenuItemEnumerator.MoveNext.Result">
<short>True if another value is available for the enumerator.</short>
</element>
<element name="TMenuItemEnumerator.Current">
<short>Returns the TMenuItem instance at the current position for the enumerator.</short>
<descr/>
<seealso>
<link id="TMenuItemEnumerator.MoveNext"/>
<link id="TMenuItem.Items"/>
</seealso>
</element>
<element name="TMenuItemHandlerType">
<short>
<var>TMenuItemHandlerType</var> - enumerated type for menu item handlers.
</short>
<descr>
Currently has only one member - <var>mihtDestroy</var>
</descr>
</element>
<element name="TMenuItemHandlerType.mihtDestroy">
<short/>
</element>
<element name="TMenuDrawItemEvent">
<short>Specifies an event handler signalled to draw a menu item to a canvas.</short>
<descr/>
<seealso/>
</element>
<element name="TMenuDrawItemEvent.Sender">
<short>Object for the event notification.</short>
</element>
<element name="TMenuDrawItemEvent.ACanvas">
<short>Canvas used to render the menu item.</short>
</element>
<element name="TMenuDrawItemEvent.ARect">
<short>Display rectangle for the menu item.</short>
</element>
<element name="TMenuDrawItemEvent.AState">
<short>Owner-drawn state for the menu item.</short>
</element>
<element name="TMenuMeasureItemEvent">
<short>
Specifies an event handler signalled to get the width and height for a menu item.
</short>
<descr>
<p>
<var>TMenuMeasureItemEvent</var> is an object procedure type which specifies an event handler signalled to get the width and height for a menu item.
</p>
<p>
Cast the value in <var>Sender</var> (when assigned) to a <var>TMenuItem</var> type to access properties and methods for the menu item.
</p>
<p>
Use <var>ACanvas</var> to access values for the <var>TCanvas</var> instance where the menu item is drawn.
</p>
<p>
<var>AWidth</var> and <var>AHeight</var> are variable arguments updated in the event handler with the dimensions for the menu item.
</p>
<p>
TMenuMeasureItemEvent is the type used to implement the <var>OnMeasureItem</var> property in <var>TMenu</var> and <var>TMenuItem</var>.
</p>
</descr>
<seealso>
<link id="TMenu.OnMeasureItem"/>
<link id="TMenuItem.OnMeasureItem"/>
</seealso>
</element>
<element name="TMenuMeasureItemEvent.Sender">
<short>Object (TMenuItem) for the event notification.</short>
</element>
<element name="TMenuMeasureItemEvent.ACanvas">
<short>Canvas where the menu item is drawn.</short>
</element>
<element name="TMenuMeasureItemEvent.AWidth">
<short>Width needed for the menu item.</short>
</element>
<element name="TMenuMeasureItemEvent.AHeight">
<short>Height needed for the menu item.</short>
</element>
<element name="TMergedMenuItems">
<short>
Implements a container for menu items merged into a parent menu or menu item.
</short>
<descr>
<p>
<var>TMergedMenuItems</var> provides an internal array for visible and hidden menu items stored in the container. The array has two (2) elements; one for visible menu items, the other for hidden menu items. Each element is a <var>TList</var> instance where the corresponding <var>TMenuItem</var> instances are stored.
</p>
<p>
Use the indexed <var>VisibleItems</var> and <var>InvisibleItems</var> properties to access values stored in the container.
</p>
<p>
TMergedMenuItems is the type used for the MergedItems property in TMenuItem.
</p>
</descr>
<seealso>
<link id="TMenuItem.MergedItems"/>
<link id="TMainMenu.Merge"/>
</seealso>
</element>
<!-- private -->
<element name="TMergedMenuItems.FList"/>
<element name="TMergedMenuItems.GetInvisibleCount"/>
<element name="TMergedMenuItems.GetInvisibleCount.Result"/>
<element name="TMergedMenuItems.GetInvisibleItem"/>
<element name="TMergedMenuItems.GetInvisibleItem.Result"/>
<element name="TMergedMenuItems.GetInvisibleItem.Index"/>
<element name="TMergedMenuItems.GetVisibleCount"/>
<element name="TMergedMenuItems.GetVisibleCount.Result"/>
<element name="TMergedMenuItems.GetInvisibleItem"/>
<element name="TMergedMenuItems.GetInvisibleItem.Result"/>
<element name="TMergedMenuItems.GetInvisibleItem.Index"/>
<!-- public -->
<element name="TMergedMenuItems.Create">
<short>Constructor for the class instance.</short>
<descr>
<p>
<var>Create</var> is the constructor for the class instance, and calls the inherited method on entry. Create allocates resources needed for the internal storage in the container.
</p>
<p>
<var>AParent</var> is the <var>TMenuItem</var> instance that is the parent for the merged menu items. Values in its <var>Merged</var> property are added or updated in the visible or hidden sections for the container based on the <var>Visible</var> property for the menu items.
</p>
</descr>
<seealso/>
</element>
<element name="TMergedMenuItems.Create.aParent">
<short>Menu item with the merged menu items for the container.</short>
</element>
<element name="TMergedMenuItems.Destroy">
<short>Destructor for the class instance.</short>
<descr>
<p>
<var>Destroy</var> is the overridden destructor for the class instance. Destroy ensures that menu items in the internal storage are freed. It calls the inherited destructor prior to exiting from the method.
</p>
</descr>
<seealso/>
</element>
<element name="TMergedMenuItems.DefaultSort">
<short>Implements the default sort routine for merged menu items.</short>
<descr/>
<seealso/>
</element>
<element name="TMergedMenuItems.DefaultSort.Result">
<short/>
</element>
<element name="TMergedMenuItems.DefaultSort.aItem1">
<short>Pointer to the first menu item for the sort comparison.</short>
</element>
<element name="TMergedMenuItems.DefaultSort.aItem2">
<short>Pointer to the second menu item for the sort comparison.</short>
</element>
<element name="TMergedMenuItems.DefaultSort.aParentItem">
<short>Pointer to the Parent menu item for the compared values.</short>
</element>
<element name="TMergedMenuItems.VisibleCount">
<short>Number of visible menu items in the storage for the container.</short>
<descr/>
<seealso/>
</element>
<element name="TMergedMenuItems.VisibleItems">
<short>
Provides indexed access to the visible menu items in the list of merged menu items.
</short>
<descr/>
<seealso>
<link id="TMergedMenuItems.InvisibleItems"/>
</seealso>
</element>
<element name="TMergedMenuItems.VisibleItems.Index">
<short>Ordinal position for a visible menu item in the container.</short>
</element>
<element name="TMergedMenuItems.InvisibleCount">
<short>Number of invisible (hidden) menu items in the storage for the container.</short>
<descr/>
<seealso/>
</element>
<element name="TMergedMenuItems.InvisibleItems">
<short>
Provides indexed access to the invisible (hidden) menu items in the list of merged menu items.
</short>
<descr/>
<seealso/>
</element>
<element name="TMergedMenuItems.InvisibleItems.Index">
<short>Ordinal position for an invisible (hidden) menu item in the container.</short>
</element>
<element name="TMenuItems">
<short>Implements a list used to store TMenuItem instances with a given parent.</short>
<descr/>
<seealso/>
</element>
<!-- private -->
<element name="TMenuItems.FMenuItem"/>
<!-- protected -->
<element name="TMenuItems.Notify">
<short>
Notifies the parent and the merged menu item that a child menu item has been added, extracted, or deleted.
</short>
<descr>
<p>
The parent menu item calls its <var>InvalidateMergedItems</var> method to free the merged items. If the parent has an assigned <var>MergeWith</var> menu item, its <var>InvalidateMergedItems</var> is called as well. The <var>CheckChildHandles</var> method in the MergeWith menu item is called to free or re-create handles for the child menu items as needed.
</p>
</descr>
<seealso/>
</element>
<element name="TMenuItems.Notify.Ptr">
<short>Not used in the current implementation.</short>
</element>
<element name="TMenuItems.Notify.Action">
<short>Not used in the current implementation.</short>
</element>
<!-- public -->
<element name="TMenuItems.Create">
<short>Constructor for the class instance.</short>
<descr>
<p>
<var>Create</var> is the constructor for the class instance, and calls the inherited method on entry. Create stores the value in <var>AMenuItem</var> to the member variable used for the parent menu item.
</p>
</descr>
<seealso/>
</element>
<element name="TMenuItems.Create.AMenuItem ">
<short>Menu item that is the parent for the menu items in the list.</short>
</element>
<element name="TMenuItem">
<short>Represents a menu item displayed in a menu.</short>
<descr>
<p>
<var>TMenuItem</var> is a <var>TLCLComponent</var> descendant which represent a menu item displayed on a <var>TMenu</var> instance, or one of its derived classes like <link id="TMainMenu">TMainMenu</link> and <link id="TPopUpMenu">TPopUpMenu</link>.
</p>
<p>
TMenuItem has properties which define the display attributes for the menu item, and allows accelerator keys to be defined in the <var>Caption</var> for the item. Event handlers are also provided which perform actions needed when the menu item is measured, drawn, or clicked.
</p>
<p>
TMenuItem is the type added and maintained in the <var>TMenu.Items</var> property.
</p>
</descr>
<seealso>
<link id="TMenu.Items"/>
</seealso>
</element>
<!-- private -->
<element name="TMenuItem.FActionLink"/>
<element name="TMenuItem.FCaption"/>
<element name="TMenuItem.FBitmap"/>
<element name="TMenuItem.FGlyphShowMode"/>
<element name="TMenuItem.FHandle"/>
<element name="TMenuItem.FHelpContext"/>
<element name="TMenuItem.FHint"/>
<element name="TMenuItem.FImageChangeLink"/>
<element name="TMenuItem.FImageIndex"/>
<element name="TMenuItem.FItems"/>
<element name="TMenuItem.FMenu"/>
<element name="TMenuItem.FOnChange"/>
<element name="TMenuItem.FOnClick"/>
<element name="TMenuItem.FOnDrawItem"/>
<element name="TMenuItem.FOnMeasureItem"/>
<element name="TMenuItem.FParent"/>
<element name="TMenuItem.FMerged"/>
<element name="TMenuItem.FMergedWith"/>
<element name="TMenuItem.FMergedItems"/>
<element name="TMenuItem.FMenuItemHandlers"/>
<element name="TMenuItem.FSubMenuImages"/>
<element name="TMenuItem.FSubMenuImagesWidth"/>
<element name="TMenuItem.FShortCut"/>
<element name="TMenuItem.FShortCutKey2"/>
<element name="TMenuItem.FGroupIndex"/>
<element name="TMenuItem.FRadioItem"/>
<element name="TMenuItem.FRightJustify"/>
<element name="TMenuItem.FShowAlwaysCheckable"/>
<element name="TMenuItem.FVisible"/>
<element name="TMenuItem.FBitmapIsValid"/>
<element name="TMenuItem.FAutoCheck"/>
<element name="TMenuItem.FChecked"/>
<element name="TMenuItem.FDefault"/>
<element name="TMenuItem.FEnabled"/>
<element name="TMenuItem.GetBitmap"/>
<element name="TMenuItem.GetBitmap.Result"/>
<element name="TMenuItem.GetCount"/>
<element name="TMenuItem.GetCount.Result"/>
<element name="TMenuItem.GetItem"/>
<element name="TMenuItem.GetItem.Result"/>
<element name="TMenuItem.GetItem.Index"/>
<element name="TMenuItem.GetMenuIndex"/>
<element name="TMenuItem.GetMenuIndex.Result"/>
<element name="TMenuItem.GetMergedItems"/>
<element name="TMenuItem.GetMergedItems.Result"/>
<element name="TMenuItem.GetMergedParent"/>
<element name="TMenuItem.GetMergedParent.Result"/>
<element name="TMenuItem.GetParent"/>
<element name="TMenuItem.GetParent.Result"/>
<element name="TMenuItem.IsBitmapStored"/>
<element name="TMenuItem.IsBitmapStored.Result"/>
<element name="TMenuItem.IsCaptionStored"/>
<element name="TMenuItem.IsCaptionStored.Result"/>
<element name="TMenuItem.IsCheckedStored"/>
<element name="TMenuItem.IsCheckedStored.Result"/>
<element name="TMenuItem.IsEnabledStored"/>
<element name="TMenuItem.IsEnabledStored.Result"/>
<element name="TMenuItem.IsHelpContextStored"/>
<element name="TMenuItem.IsHelpContextStored.Result"/>
<element name="TMenuItem.IsHintStored"/>
<element name="TMenuItem.IsHintStored.Result"/>
<element name="TMenuItem.IsImageIndexStored"/>
<element name="TMenuItem.IsImageIndexStored.Result"/>
<element name="TMenuItem.IsShortCutStored"/>
<element name="TMenuItem.IsShortCutStored.Result"/>
<element name="TMenuItem.IsVisibleStored"/>
<element name="TMenuItem.IsVisibleStored.Result"/>
<element name="TMenuItem.MergeWith"/>
<element name="TMenuItem.MergeWith.aMenu"/>
<element name="TMenuItem.SetAutoCheck"/>
<element name="TMenuItem.SetAutoCheck.AValue"/>
<element name="TMenuItem.SetCaption"/>
<element name="TMenuItem.SetCaption.AValue"/>
<element name="TMenuItem.SetChecked"/>
<element name="TMenuItem.SetChecked.AValue"/>
<element name="TMenuItem.SetDefault"/>
<element name="TMenuItem.SetDefault.AValue"/>
<element name="TMenuItem.SetEnabled"/>
<element name="TMenuItem.SetEnabled.AValue"/>
<element name="TMenuItem.SetBitmap"/>
<element name="TMenuItem.SetBitmap.AValue"/>
<element name="TMenuItem.SetGlyphShowMode"/>
<element name="TMenuItem.SetGlyphShowMode.AValue"/>
<element name="TMenuItem.SetMenuIndex"/>
<element name="TMenuItem.SetMenuIndex.AValue"/>
<element name="TMenuItem.SetName"/>
<element name="TMenuItem.SetName.Value"/>
<element name="TMenuItem.SetRadioItem"/>
<element name="TMenuItem.SetRadioItem.AValue"/>
<element name="TMenuItem.SetRightJustify"/>
<element name="TMenuItem.SetRightJustify.AValue"/>
<element name="TMenuItem.SetShowAlwaysCheckable"/>
<element name="TMenuItem.SetShowAlwaysCheckable.AValue"/>
<element name="TMenuItem.SetSubMenuImages"/>
<element name="TMenuItem.SetSubMenuImages.AValue"/>
<element name="TMenuItem.SetSubMenuImagesWidth"/>
<element name="TMenuItem.SetSubMenuImagesWidth.aSubMenuImagesWidth"/>
<element name="TMenuItem.ShortcutChanged"/>
<element name="TMenuItem.SubItemChanged"/>
<element name="TMenuItem.SubItemChanged.Sender"/>
<element name="TMenuItem.SubItemChanged.Source"/>
<element name="TMenuItem.SubItemChanged.Rebuild"/>
<element name="TMenuItem.TurnSiblingsOff"/>
<element name="TMenuItem.DoActionChange"/>
<element name="TMenuItem.DoActionChange.Sender"/>
<!-- protected -->
<element name="TMenuItem.FCommand">
<short>Stores the numeric command in the widgetset class for the menu item.</short>
</element>
<element name="TMenuItem.WSRegisterClass" link="#lcl.lclclasses.TLCLComponent.WSRegisterClass"/>
<element name="TMenuItem.ActionChange">
<short>
Changes the action for the menu item using the value specified in Sender.
</short>
<descr>
<p>
<var>ActionChange</var>- changes the action associated with this menu item to a new action, provided <var>Sender</var> is of type <var>TCustomAction</var>. No actions are performed in the method when Sender is not derived from TCustomAction.
</p>
<p>
ActionChange updates property values in the current class instance to reflect the values in Sender when <var>CheckDefaults</var> has not been enabled. The following properties are updated from the values in the action:
</p>
<ul>
<li>AutoCheck</li>
<li>Caption</li>
<li>Checked</li>
<li>Enabled</li>
<li>HelpContext</li>
<li>Hint</li>
<li>GroupIndex</li>
<li>ImageIndex</li>
<li>ShortCut</li>
<li>Visible</li>
</ul>
<p>
ActionChange is called when a new value is assigned to the Action property for the menu item or when changes occur in the linked menu action.
</p>
</descr>
<seealso/>
</element>
<element name="TMenuItem.ActionChange.Sender">
<short>TCustomAction examined and applied to the menu item.</short>
</element>
<element name="TMenuItem.AssignTo">
<short>
Copies property values from the current class instance to the specified destination.
</short>
<descr>
<p>
<var>AssignTo</var> is an overridden method in <var>TMenuItem</var> used to copy property values from the current class instance to the destination specified in <var>Dest</var>. Dest can be either a <var>TCustomAction</var> instance or a <var>TMenuItem</var> instance.
</p>
<p>
When Dest is a TCustomAction descendant, the following properties are copied into the destination:
</p>
<ul>
<li>Caption</li>
<li>Enabled</li>
<li>HelpContext</li>
<li>Hint</li>
<li>ImageIndex</li>
<li>Visible</li>
</ul>
<p>
When Dest is a TMenuItem descendant, an implementation routine is called to transfer values between the TMenuItem instances.
</p>
<p>
If Dest is not a TMenuItem or a TCustomAction instance, the inherited AssignTo method is called.
</p>
</descr>
<seealso>
<link id="#rtl.classes.TPersistent.Assign">TPersistent.Assign</link>
</seealso>
</element>
<element name="TMenuItem.AssignTo.Dest">
<short>Action or menu item where values are stored in the method.</short>
</element>
<element name="TMenuItem.BitmapChange">
<short>Updates the image associated with the menu item when it has been changed.</short>
<descr>
<p>
<var>BitmapChange</var> is a method used to updates the image associated with the menu item when it has been changed. BitmapChange calls the <var>UpdateImage</var> method retrieve the <var>Images</var> or <var>SubMenuImages</var> for the item, its ancestor items, or the parent menu.
</p>
<p>
If an image is already assigned to the <var>Bitmap</var> property, it is freed. The value in <var>ImageIndex</var> is used to access the relevant bitmap in the image list. -1 indicates that a bitmap image has not been assigned for the menu item.
</p>
<p>
If the <var>Handle</var> for the control has been allocated, the widget set class is notified of the change to the property value.
</p>
<p>
BitmapChange is used as the <var>OnChange</var> event handler for the Bitmap property.
</p>
</descr>
<seealso/>
</element>
<element name="TMenuItem.DoDrawItem">
<short>Performs actions needed to draw the menu item to the specified Canvas.</short>
<descr>
<p>
<var>DoDrawItem</var> is a <var>Boolean</var> function which performs actions needed to draw the menu item to the specified canvas with the given owner-drawn state.
</p>
<p>
DoDrawItem signals the <var>OnDrawItem</var> event handler (when assigned) to render the menu item to the canvas specified in <var>ACanvas</var> using the arguments passed to the method. The return value is set to <b>True</b> when the drawing operation is completed.
</p>
<p>
If OnDrawItem has not been assigned in the menu item, the <var>GetParentMenu</var> method is called to get the <var>TMenu</var> instance where the menu item is located. Its OnDrawItem event handler is signalled (when assigned) to render the menu item to the canvas specified in ACanvas using the arguments passed to the method. The return value is set to <b>True</b> when the drawing operation is completed.
</p>
<p>
If neither OnDrawItem event handler has been assigned, no actions are performed in the method and the return value is set to <b>False</b>.
</p>
</descr>
<seealso/>
</element>
<element name="TMenuItem.DoDrawItem.Result">
<short>True if the menu item was rendered using an OnDrawItem event handler.</short>
</element>
<element name="TMenuItem.DoDrawItem.ACanvas">
<short>Canvas where the menu item is drawn.</short>
</element>
<element name="TMenuItem.DoDrawItem.ARect">
<short>Display rectangle for the menu item.</short>
</element>
<element name="TMenuItem.DoDrawItem.AState">
<short>Owner-draw state for the menu item.</short>
</element>
<element name="TMenuItem.DoMeasureItem">
<short>Performs actions needed to get the width and height for the menu item.</short>
<descr>
<p>
<var>DoMeasureItem</var> is a method used to perform actions needed to get the width and height for the menu item. DoMeasureItem signals the <var>OnMeasureItem</var> event handler (when assigned) to calculate the values in AWidth and AHeight. The TCanvas instance in ACanvas is used to get the text metrics for the Caption.
</p>
<p>
If the OnMeasureItem event handler has not been for the menu item, the OnMeasureItem event handler in the <var>Parent</var> menu is used.
</p>
<p>
The return value is set to <b>True</b> after the selected event handler is successfully executed.
</p>
<p>
DoMeasureItem is called from the <var>MeasureItem</var> method in the <var>TMenuItemHelper</var> class helper. This class helper is implemented for the Windows platform only.
</p>
</descr>
<seealso/>
</element>
<element name="TMenuItem.DoMeasureItem.Result">
<short>True if the size was calculated using an OnMeasureItem event handler.</short>
</element>
<element name="TMenuItem.DoMeasureItem.ACanvas">
<short>Canvas used to get size information for the menu item.</short>
</element>
<element name="TMenuItem.DoMeasureItem.AWidth">
<short>Calculated width for the menu item.</short>
</element>
<element name="TMenuItem.DoMeasureItem.AHeight">
<short>Calculated height for the menu item.</short>
</element>
<element name="TMenuItem.GetAction">
<short>Gets the value for the Action property.</short>
<descr>
<p>
The value for the property is read from the <var>ActionLink</var> property (when assigned). The property value is <b>Nil</b> when a <var>TMenuActionLink</var> instance has not been assigned to ActionLink.
</p>
</descr>
<seealso>
<link id="TMenuItem.Action"/>
<link id="TMenuItem.ActionLink"/>
<link id="TMenuActionLink"/>
</seealso>
</element>
<element name="TMenuItem.GetAction.Result">
<short>Value for the property.</short>
</element>
<element name="TMenuItem.GetActionLinkClass">
<short>Gets the class reference used to create an action link for the class.</short>
<descr/>
<seealso/>
</element>
<element name="TMenuItem.GetActionLinkClass.Result">
<short>Returns TMenuActionLink in TMenuItem.</short>
</element>
<element name="TMenuItem.GetHandle">
<short>Gets the value for the Handle property.</short>
<descr>
<p>
<var>GetHandle</var> calls <var>HandleNeeded</var> to ensure that a valid handle is available for the menu item. If the handle has not already been allocated, <var>CreateHandle</var> is called to create the handle in the widgetset class.
</p>
</descr>
<seealso>
<link id="TMenuItem.Handle"/>
</seealso>
</element>
<element name="TMenuItem.GetHandle.Result">
<short>Value for the property.</short>
</element>
<element name="TMenuItem.DoClicked">
<short>
<var>DoClicked</var>- process the system message signifying that a click has occurred over this menu item.
</short>
<descr>
<p>
At run-time, <var>DoClicked</var> calls InitiateAction to update the actions for each of the <var>Items</var> in the class instance, and calls <var>Click</var> to execute the menu item.
</p>
<p>
At design-time, the <var>Click</var> event is intercepted by the design surface for the IDE.
</p>
</descr>
<seealso/>
</element>
<element name="TMenuItem.DoClicked.msg">
<short>Message handled in the method.</short>
</element>
<element name="TMenuItem.CheckChildrenHandles">
<short>Verifies the handles for child menu items on the menu.</short>
<descr>
<p>
CheckChildrenHandles recursively checks menu items to ensure that handles for merged menu items are freed when they are hidden, or not owned by a menu item on the menu. No actions are performed in the method when Items has not been assigned.
</p>
</descr>
<seealso/>
</element>
<element name="TMenuItem.CreateHandle">
<short>Creates the Handle for the menu item.</short>
<descr>
<p>
<var>CreateHandle</var> is a method used to create the <var>Handle</var> for the control using the widgetset class instance. CreateHandle calls CheckChildrenHandles to ensure that handles for hidden menu Items are freed, and handles for MergedItems are re-created.
</p>
<p>
CreateHandle raises a catchable exception if the method is called when the menu item is not Visible.
</p>
</descr>
<seealso/>
</element>
<element name="TMenuItem.DestroyHandle">
<short>Frees the Handle for the control and any handles allocated for its Items.</short>
<descr>
<p>
Handles for menu items in <var>Merged</var> are also freed. Calls the corresponding method in the widgetset class to destroy the handle, and sets the <var>Handle</var> property to <b>0</b> to indicate that it is unassigned.
</p>
</descr>
<seealso/>
</element>
<element name="TMenuItem.Loaded">
<short>
Performs actions needed after the component is loaded using LCL streaming.
</short>
<descr>
<p>
Loaded is overridden in TMenuItem, and calls the inherited method on entry. It calls the <var>ActionChange</var> method if <var>Action</var> has been assigned for the class instance.
</p>
</descr>
<seealso>
<link id="TMenuItem.Action"/>
<link id="TMenuItem.ActionChange"/>
<link id="#rtl.classes.TComponent">TComponent</link>
</seealso>
</element>
<element name="TMenuItem.Notification">
<short>Performs a notification when the menu item is added or removed.</short>
<descr>
<p>
<var>Notification</var> is an overridden method in <var>TMenuItem</var>, and calls the inherited method on entry. Notification ensures that the class instances in <var>Action</var> and <var>SubMenuImages</var> are set to <b>Nil</b> when the remove <var>Operation</var> is received for either member.
</p>
</descr>
<seealso>
<link id="#rtl.classes.TComponent.Notification">TComponent.Notification</link>
</seealso>
</element>
<element name="TMenuItem.Notification.AComponent">
<short>Component for the notification.</short>
</element>
<element name="TMenuItem.Notification.Operation">
<short>Operation for the notification.</short>
</element>
<element name="TMenuItem.GetChildren">
<short>Performs an operation for a component instance and its Items.</short>
<descr>
<p>
<var>GetChildren</var> is an overridden method in <var>TMenuItem</var>, and implements the dynamic method defined in the ancestor class. It does not call the inherited method.
</p>
<p>
GetChildren calls the object procedure in <var>Proc</var> for the component instance in <var>Root</var> and each of the component instances in its <var>Items</var> property.
</p>
<p>
No actions are performed in the method when Items has not been assigned (contains Nil).
</p>
</descr>
<seealso>
<link id="#rtl.classes.TComponent">TComponent</link>
</seealso>
</element>
<element name="TMenuItem.GetChildren.Proc">
<short>Object procedure called for the component.</short>
</element>
<element name="TMenuItem.GetChildren.Root">
<short>Component examined in the object procedure.</short>
</element>
<element name="TMenuItem.InitiateActions">
<short>Updates Actions in child menu items.</short>
<descr>
<p>
<var>InitiateActions</var> is a method used to update the actions for child menu items in the Items property. InitiateActions visits each of the <var>TMenuItem</var> instances in <var>Items</var> and calls its <var>InitiateAction</var> method. This allows the <var>ActionLink</var> in the menu item to call its <var>Update</var> method for the associated <var>TBasicAction</var> instance.
</p>
<p>
InitiateActions is called from the <var>DoClicked</var> method prior to executing the <var>Click</var> method for the menu item. It is called from the <var>TMenu</var> class when shortcut (accelerator) keys are handled for the menu. It is also called from the <var>TPopupMenu.PopUp</var> method when the menu is displayed.
</p>
</descr>
<seealso/>
</element>
<element name="TMenuItem.MenuChanged">
<short>
Signals the OnChange event handler (when assigned) and optionally rebuilds child menu items.
</short>
<descr>
<p>
<var>MenuChanged</var> is a method used to perform actions needed when values in a menu item have been changed.
</p>
<p>
MenuChanged signals the <var>OnChange</var> event handler (when assigned) and optionally rebuilds the child menu items list. Arguments passed to the event handler identify the menu item for the notification, the menu item that owns the changed item or <b>Nil</b> when it is a <var>TMenu</var> instance, and the value in the <var>Rebuild</var> parameter.
</p>
<p>
MenuChanged is called from methods which modify property values like: <var>Enabled</var>, <var>Bitmap</var>, and <var>ImageIndex</var>. It is also called from methods that modify the values in in the <var>Items</var> property, including: <var>Insert</var> and <var>Delete</var>.
</p>
</descr>
<seealso/>
</element>
<element name="TMenuItem.MenuChanged.Rebuild">
<short>True to rebuild the child menu items.</short>
</element>
<element name="TMenuItem.SetAction">
<short>Sets the value for the Action property.</short>
<descr>
<p>
Maintains the ActionLink for the class instance.
</p>
</descr>
<seealso>
<link id="TMenuItem.Action"/>
</seealso>
</element>
<element name="TMenuItem.SetAction.NewAction">
<short>New value for the property.</short>
</element>
<element name="TMenuItem.SetChildOrder">
<short>Moves a menu item to the specified position in a menu.</short>
<descr>
<p>
Stores the value in the Order parameter to the MenuIndex property in the Child menu item.
</p>
</descr>
<seealso>
<link id="#rtl.classes.TComponent">TComponent</link>
</seealso>
</element>
<element name="TMenuItem.SetChildOrder.Child">
<short>Menu item affected in the method.</short>
</element>
<element name="TMenuItem.SetChildOrder.Order">
<short>Value assigned to the MenuIndex for the menu item.</short>
</element>
<element name="TMenuItem.SetGroupIndex">
<short>Sets the value for the GroupIndex property.</short>
<descr/>
<seealso>
<link id="TMenuItem.GroupIndex"/>
</seealso>
</element>
<element name="TMenuItem.SetGroupIndex.AValue">
<short>New value for the property.</short>
</element>
<element name="TMenuItem.SetImageIndex">
<short>Sets the value for the ImageIndex property.</short>
<descr>
<p>
Calls GetImageList to get the Images for the TMenu instance that owns the menu item, or the SubImages from the Parent menu item. AValue indicates the position in the image list used as the property value.
</p>
<p>
If an image list could not be located, no additional actions are performed in the method. Otherwise, an existing value in Bitmap is freed and the UpdateWSIcon method is called to notify the widgetset class of the change to the property value. MenuChanged is called to signal the OnChange event handler (when assigned). The menu item hierarchy is not rebuilt.
</p>
</descr>
<seealso>
<link id="TMenuItem.ImageIndex"/>
</seealso>
</element>
<element name="TMenuItem.SetImageIndex.AValue">
<short>New value for the property.</short>
</element>
<element name="TMenuItem.SetParentComponent">
<short>
Ensures that the menu item is parented by the specified menu or menu item.
</short>
<descr>
<p>
<var>SetParentComponent</var> is an overridden method used to ensure that the menu item is parented by the menu or menu item specified in <var>AValue</var>. SetParentComponent re-implements the method introduced in the ancestor class, and does not call the inherited method.
</p>
<p>
When <var>Parent</var> has been assigned, its <var>Remove</var> method is called to delete the current class instance from its <var>Items</var>.
</p>
<p>
When <var>AValue</var> has been assigned, the value is examined to determine if the new parent is a <var>TMenu</var> or a <var>TMenuItem</var> instance. If it is a TMenu instance, the current class instance is added to its Items property. If it is a TMenuItem instance, its <var>Add</var> method is called to append the current class instance to its Items property.
</p>
<p>
An <var>Exception</var> is raised if AValue is derived from any class type other than TMenu or TMenuItem. The current class instance is not re-parented when AValue contains <b>Nil</b>.
</p>
</descr>
<seealso>
<link id="#rtl.classes.TComponent">TComponent</link>
</seealso>
</element>
<element name="TMenuItem.SetParentComponent.AValue">
<short>Menu or menu item used as the parent for the current class instance.</short>
</element>
<element name="TMenuItem.SetShortCut">
<short>Sets the value for the ShortCut property.</short>
<descr/>
<seealso>
<link id="TMenuItem.ShortCut"/>
</seealso>
</element>
<element name="TMenuItem.SetShortCut.AValue">
<short>New value for the property.</short>
</element>
<element name="TMenuItem.SetShortCutKey2">
<short>Sets the value for the SetShortCutKey2 property.</short>
<descr/>
<seealso>
<link id="TMenuItem.ShortCutKey2"/>
</seealso>
</element>
<element name="TMenuItem.SetShortCutKey2.AValue">
<short>New value for the property.</short>
</element>
<element name="TMenuItem.SetVisible">
<short>Sets the value for the Visible property.</short>
<descr>
<p>
When the new property value is <b>True</b>, a valid <var>Handle</var> is needed for both the menu item and its <var>Parent</var> (when assigned). <var>HandleNeeded</var> is called to allocate a handle if it does not already exist.
</p>
<p>
The widgetset class is notified of a change to the property value.
</p>
<p>
When the new property value is <b>False</b>, the Handle is freed by calling the <var>DestroyHandle</var> method.
</p>
<p>
When <var>MergedParent</var> has been assigned, its <var>InvalidateMergedItems</var> method is called to free the <var>MergedItems</var> for the menu item.
</p>
</descr>
<seealso>
<link id="TMenuItem.Visible"/>
</seealso>
</element>
<element name="TMenuItem.SetVisible.AValue">
<short>New value for the property.</short>
</element>
<element name="TMenuItem.UpdateWSIcon">
<short>Updates the widgetset class with the values in HasIcon and Bitmap.</short>
<descr>
<p>
<var>UpdateWSIcon</var> is a method used to update the widgetset class to reflect the values from <var>HasIcon</var> and the <var>Bitmap</var> property. HasIcon returns <b>True</b> when a bitmap is available and in use for the menu item. Bitmap contains the image displayed for the menu item, and may be <b>Nil</b> when HasIcon returns <b>False</b>.
</p>
<p>
UpdateWSIcon requires a valid <var>Handle</var> for the menu item. No actions are performed in the method when Handle has not been allocated for the menu item.
</p>
<p>
UpdateWSIcon is called when a value is assigned to the Bitmap or <var>ImageIndex</var> property, and from the <var>UpdateImage</var> method.
</p>
</descr>
<seealso/>
</element>
<element name="TMenuItem.ImageListChange">
<short>
<var>ImageListChange</var> - change the image list if commanded by the Sender.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenuItem.ImageListChange.Sender">
<short>Object for the event notification.</short>
</element>
<element name="TMenuItem.ActionLink">
<short>Maintains a link to the action for the menu item.</short>
<descr/>
<seealso/>
</element>
<element name="TMenuItem.FCompStyle">
<short>Member used to store style flags for the component.</short>
<descr/>
<seealso/>
</element>
<element name="TMenuItem.Create">
<short>Constructor for the class instance.</short>
<descr>
<p>
<var>Create</var> is the overridden constructor for <var>TMenuItem</var>, and calls the inherited method on entry. Create sets the default values for properties, and allocates resources needed for the internal <var>TChangeLink</var> instance used in the class instance.
</p>
</descr>
<seealso>
<link id="#rtl.Classes.TComponent.Create">TComponent.Create</link>
</seealso>
</element>
<element name="TMenuItem.Create.TheOwner">
<short>Owner of the class instance.</short>
</element>
<element name="TMenuItem.Destroy">
<short>Destructor for the class instance.</short>
<descr>
<p>
<var>Destroy</var> is the overridden destructor for the class instance. Destroy ensures that resources allocated for the class instance are freed. This includes freeing the Bitmap, Handle, and any Items or Merged items for the menu item. It also removes itself from the Items for the Parent menu or menu item. Destroy calls the inherited destructor prior to exit.
</p>
</descr>
<seealso>
<link id="#rtl.Classes.TComponent.Destroy">TComponent.Destroy</link>
</seealso>
</element>
<element name="TMenuItem.Find">
<short>
<var>Find</var> the identity given menu item (named in <var>ACaption</var>).
</short>
<descr>
<p>
<var>Find</var> is a <var>TMenuItem</var> function used to locate the menu item in <var>Items</var> with the caption specified in the <var>ACaption</var> argument. Find calls <var>IndexOfCaption</var> to get the ordinal position in Items for the specified menu item. If a menu item with the given caption is not found, the return value is Nil.
</p>
</descr>
<seealso/>
</element>
<element name="TMenuItem.Find.ACaption">
<short>Caption for the menu item to locate in the method.</short>
</element>
<element name="TMenuItem.GetEnumerator">
<short>Gets an enumerator for the child menu Items in the class instance.</short>
<descr/>
<seealso>
<link id="TMenuItem.Items"/>
<link id="TMenuItemEnumerator"/>
</seealso>
</element>
<element name="TMenuItem.GetEnumerator.Result">
<short>TMenuItemEnumerator instance for the Items in the class.</short>
</element>
<element name="TMenuItem.GetImageList">
<short>Gets an image list with the available bitmaps for the menu item.</short>
<descr>
<p>
<var>GetImageList</var> is an overloaded method used to get the list of available images for the menu item. The images are retrieved from an ancestor menu item or the menu which contains the menu item.
</p>
<p>
<var>AImages</var> is an output variable with the <var>TCustomImageList</var> which contains the available images.
</p>
<p>
<var>AImagesWidth</var> is an output variable with the width for the bitmaps in the AImages argument.
</p>
<p>
When <var>Parent</var> has been assigned, the <var>SubMenuImages</var> property in an ancestor menu item is copied into the image list. The Width in the image list is used in the aImagesWidth argument.
</p>
<p>
When Parent has not been assigned, <var>GetParentMenu</var> is called to get the menu which contains the menu item. Its <var>Images</var> property is copied into the image list. The Width in the image list is used in the aImagesWidth argument.
</p>
<p>
The TCustomImageList instance is <b>Nil</b> (unassigned) if neither SubMenuImages nor Images can be retrieved for the menu item.
</p>
<p>
Use the <var>ImageIndex</var> property to specify which image is used for the menu item. Use <var>Bitmap</var> to access the image displayed for the menu item.
</p>
<p>
GetImageList is called when the value for the Bitmap property is read. The image list provides an image resolution with the image for the Bitmap property. It is also called from the <var>HasIcon</var> and <var>GetIconSize</var> methods.
</p>
</descr>
<seealso/>
</element>
<element name="TMenuItem.GetImageList.Result">
<short>TCustomImageList with the bitmaps available for the menu item.</short>
</element>
<element name="TMenuItem.GetImageList.aImages">
<short>Output variable with the images available for the menu item.</short>
</element>
<element name="TMenuItem.GetImageList.aImagesWidth">
<short>Output variable with the width for the images in AImages.</short>
</element>
<element name="TMenuItem.GetParentComponent">
<short>Gets the menu for the Parent component when available.</short>
<descr>
<p>
Overridden to ensure that the <var>TMenu</var> instance for the <var>Parent</var> menu item is used (when assigned). If not assigned, the value in Parent is returned. GetParentComponent does not call the inherited method.
</p>
</descr>
<seealso>
<link id="#rtl.classes.TComponent.GetParentComponent">TComponent.GetParentComponent</link>
</seealso>
</element>
<element name="TMenuItem.GetParentComponent.Result">
<short>Parent menu item or menu for the current class instance.</short>
</element>
<element name="TMenuItem.GetParentMenu">
<short>Gets the parent menu to which this menu item belongs.</short>
<descr>
<p>
<var>GetParentMenu</var> is a <var>TMenu</var> function used to get the menu where the menu item or its Parent menu item is located. GetParentMenu visits each of the Parent menu items. When an item is located without an assigned Parent, its Menu property is used as the return value for the method. The return value is Nil if all menu items in the hierarchy have a Parent menu item.
</p>
<p>
GetParentMenu is used in methods like <var>GetIsRightToLeft</var>, <var>GetImageList</var>, <var>DoDrawItem</var>, and <var>DoMeasureItem</var>.
</p>
</descr>
<seealso>
<link id="TMenuItem.GetIsRightToLeft"/>
<link id="TMenuItem.GetImageList"/>
<link id="TMenuItem.DoDrawItem"/>
<link id="TMenuItem.DoMeasureItem"/>
</seealso>
</element>
<element name="TMenuItem.GetParentMenu.Result">
<short/>
</element>
<element name="TMenuItem.GetMergedParentMenu">
<short>
Gets the parent menu to which this menu item belongs taking a merged menu into account.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenuItem.GetMergedParentMenu.Result">
<short/>
</element>
<element name="TMenuItem.GetIsRightToLeft">
<short>
Determines whether right-to-left display is enabled for the menu item.
</short>
<descr>
<p>
Calls <var>GetParentMenu</var> to get the menu which contains the menu item. The return value is <b>False</b> if a parent menu is not found for the menu item, or the <var>BiDiMode</var> in the menu is set to <var>bdLeftToRight</var>.
</p>
</descr>
<seealso/>
</element>
<element name="TMenuItem.GetIsRightToLeft.Result">
<short>
True when the menu item has a parent menu with a BiDiMode other than bdLeftToRight.
</short>
</element>
<element name="TMenuItem.HandleAllocated">
<short>
Indicates whether a Handle has been allocated for the menu item.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenuItem.HandleAllocated.Result">
<short>True when Handle has a non-zero value.</short>
</element>
<element name="TMenuItem.HasIcon">
<short>
True when a bitmap is configured and available for the menu item.
</short>
<descr>
<p>
<var>HasIcon</var> is a <var>Boolean</var> function which indicates if a <var>Bitmap</var> is configured and available for the menu item. The menu item is configured to display a bitmap using the <var>GlyphShowMode</var> and <var>ImageIndex</var> properties, or by assigning a <var>TBitmap</var> value to the Bitmap property.
</p>
<p>
The return value is False for the following conditions:
</p>
<ul>
<li>GlyphShowMode is set to gsmNever.</li>
<li>
GlyphShowMode is set to gsmApplication and TApplication.ShowMenuGlyphs is set to sbgNever.
</li>
<li>GlyphShowMode is set to gsmSystem and SystemShowGlyphMenus returns False.</li>
<li>An image list is not available or ImageIndex contains an invalid index.</li>
<li>Bitmap has an empty image.</li>
</ul>
</descr>
<seealso>
<link id="TMenuItem.Bitmap"/>
<link id="TMenuItem.GlyphShowMode"/>
<link id="TMenuItem.GetImageList"/>
<link id="TMenuItem.ImageIndex"/>
<link id="TMenuItem.GetIconSize"/>
<link id="TMenuItem.UpdateWSIcon"/>
<link id="#lcl.forms.TApplication.ShowMenuGlyphs">TApplication.ShowMenuGlyphs</link>
</seealso>
</element>
<element name="TMenuItem.HasIcon.Result">
<short>
True when a bitmap is configured and available for the menu item.
</short>
</element>
<element name="TMenuItem.HasParent">
<short>Indicates if the menu item has a parent menu item.</short>
<descr>
<p>
Returns True if the menu item has a parent responsible for streaming. Overridden to check for an assigned value in the Parent property. Does not call the inherited method.
</p>
</descr>
<seealso>
<link id="#rtl.classes.TComponent.HasParent">TComponent.HasParent</link>
</seealso>
</element>
<element name="TMenuItem.HasParent.Result">
<short>True when a Parent menu item has been assigned for the menu item.</short>
</element>
<element name="TMenuItem.InitiateAction">
<short>
Updates the Action in the ActionLink for the menu item.
</short>
<descr>
<p>
Calls the Update method in ActionLink (when assigned).
</p>
</descr>
<seealso>
<link id="TMenuItem.ActionLink"/>
<link id="#rtl.classes.TBasicAction.Update">TBasicAction.Update</link>
</seealso>
</element>
<element name="TMenuItem.IntfDoSelect">
<short>
<var>IntfDoSelect</var> - perform the selection using the interface.
</short>
<descr>
<p>
Forces the Application to display the Hint for the menu item.
</p>
</descr>
</element>
<element name="TMenuItem.IndexOf">
<short>
Gets the ordinal position in Items for the specified menu item.
</short>
<descr>
<p>
Calls the <var>IndexOf</var> method in <var>Items</var> to locate the menu item specified in <var>Item</var>. The return value is <b>-1</b> if Items has not been assigned in the class instance.
</p>
</descr>
<seealso>
<link id="TMenuItem.Items"/>
</seealso>
</element>
<element name="TMenuItem.IndexOf.Result">
<short>Ordinal position for the specified menu item, or -1 when not found.</short>
</element>
<element name="TMenuItem.IndexOf.Item">
<short>Menu item to locate in the Items property.</short>
</element>
<element name="TMenuItem.IndexOfCaption">
<short>
Gets the ordinal position in Items for the menu item with the specified Caption.
</short>
<descr>
<p>
<var>IndexOfCaption</var> visits the <var>TMenuItem</var> instances in the <var>Items</var> property to locate the menu item with the <var>Caption</var> specified in <var>ACaption</var>. Case is significant when comparing the value in ACaption to the menu item(s).
</p>
<p>
The return value contains the ordinal position in Items for the menu item with the specified caption, or <b>-1</b> when a menu item is not found.
</p>
</descr>
<seealso>
<link id="TMenuItem.Items"/>
<link id="TMenuItem.Caption"/>
</seealso>
</element>
<element name="TMenuItem.IndexOfCaption.Result">
<short>
Ordinal position for the menu item with the given caption, or -1 when not found.
</short>
</element>
<element name="TMenuItem.IndexOfCaption.ACaption">
<short>Caption text to locate in the child Items for the menu item.</short>
</element>
<element name="TMenuItem.InvalidateMergedItems">
<short>Frees the MergedItems property for the menu item.</short>
<descr/>
<seealso>
<link id="TMenuItem.MergedItems"/>
<link id="TMenuItem.Visible"/>
</seealso>
</element>
<element name="TMenuItem.VisibleIndexOf">
<short>
Gets the ordinal position for the specified menu item in the list of visible menu items.
</short>
<descr>
<p>
<var>VisibleIndexOf</var> is an <var>Integer</var> function used to get the ordinal position for the specified menu item in the list of visible menu items.
</p>
<p>
<var>Item</var> contains the <var>TMenuItem</var> instance to locate in the <var>MergedItems</var> property. No actions are performed in the method if the <var>Visible</var> property in Item is set to <b>False</b>, and the return value is set to <b>-1</b>.
</p>
<p>
VisibleIndexOf visits each of the visible items in MergedItems to locate the value specified in Item. The return value is set to the position in VisibleItems where the menu item was found. The return value is -1 if Item is not found in the VisibleItems for the MergedItems property.
</p>
</descr>
<seealso/>
</element>
<element name="TMenuItem.VisibleIndexOf.Result">
<short>Ordinal position in the visible Mergeditems for the specified menu item.</short>
</element>
<element name="TMenuItem.VisibleIndexOf.Item">
<short>Menu item to locate in the visible MergedItems.</short>
</element>
<element name="TMenuItem.Add">
<short>Adds item(s) to the menu item.</short>
<descr>
<p>
<var>Add</var> is an overloaded method used to add one or more items to the menu. Variants are provided that allow a single TMenuItem instance to be added, or an array of TMenuItem instances.
</p>
<p>
The single menu item variant calls Insert to store the value in Item at the position in the Count property. Insert will increment the value in Count.
</p>
<p>
The array variant iterates over each of the elements in the array, and calls Add to store the menu instances in Items.
</p>
<p>
Be aware that adding an child menu item that is a Separator may crash the application on non-Windows platforms. Use the AddSeparator method instead.
</p>
</descr>
<notes>
<note>
Does this admonition still apply today? By non-Windows do we actually mean Mac OS Carbon?
</note>
</notes>
<seealso/>
</element>
<element name="TMenuItem.Add.Item">
<short>Menu item added to the child Items.</short>
</element>
<element name="TMenuItem.Add.AItems">
<short>Array of menu items added to the child Items.</short>
</element>
<element name="TMenuItem.AddSeparator">
<short>Adds a separator line to the child menu items.</short>
<descr>
<p>
<var>AddSeparator</var> is a method used to add a separator line to the child menu <var>Items</var>. AddSeparator creates a new <var>TMenuItem</var> instance, and sets its <var>Caption</var> to the value in the <var>cLineCaption</var> constant. The <var>Add</var> method is called to append the menu item to the Items property.
</p>
</descr>
<seealso>
<link id="TMenuItem.Caption"/>
<link id="TMenuItem.Items"/>
<link id="TMenuItem.Add"/>
<link id="TMenuItem.Insert"/>
<link id="cLineCaption"/>
</seealso>
</element>
<element name="TMenuItem.Click">
<short>Performs actions needed when the menu item is clicked.</short>
<descr>
<p>
<var>Click</var> is method used to perform actions needed when the menu item is clicked, or when the <var>DoClick</var> method is called. No actions are performed in the method if the menu item is not <var>Enabled</var>.
</p>
<p>
Click signals the <var>OnMenuPopupHandler</var> event handler variable (when assigned).
</p>
<p>
Properties in the <var>TMenuItem</var> instance are examined to determine whether an <var>Action</var> is used to execute the menu item, or if its <var>OnClick</var> event handler is signalled for the purpose. An action is used when the <var>ActionLink</var> property has been assigned for the class instance. The action is not executed if the menu item is clicked at design-time.
</p>
<p>
Otherwise, the OnClick event handler is used. When <var>AutoCheck</var> is enabled, the value for the <var>Checked</var> property is toggled when the menu item has not been configured as a <var>RadioItem</var>. AutoCheck is not performed at design-time. The OnClick event handler is signalled to perform the menu item.
</p>
</descr>
<seealso/>
</element>
<element name="TMenuItem.Delete">
<short>Deletes the child menu item at the specified position in Items.</short>
<descr>
<p>
<var>Delete</var> is a method used to delete the menu item in <var>Items</var> at the position specified in <var>Index</var>. Index must be in the range <b>0..<var>Count</var>-1</b>. An <var>EMenuError</var> exception is raised when Index is not in the required range, when Items has not been assigned for the class instance, or when the menu item has already been freed.
</p>
<p>
Delete calls the <var>DestroyHandle</var> method for the TMenuItem instance to free the <var>Handle</var> for the menu item, and sets its <var>Parent</var> property to <b>Nil</b>. The Delete method in Items is called to free the menu item. The <var>MenuChanged</var> method is called to signal the <var>OnChange</var> event handler (when assigned) and to optionally rebuild the child menu items.
</p>
</descr>
<seealso/>
</element>
<element name="TMenuItem.Delete.Index">
<short>Ordinal position for the menu item removed in the method.</short>
</element>
<element name="TMenuItem.HandleNeeded">
<short>Ensures that a valid Handle exists for the menu item.</short>
<descr>
<p>
Checks the value in <var>Handle</var> to ensure that a handle has been allocated for the menu item. Calls <var>CreateHandle</var> when Handle is set to <b>0</b> (unassigned).
</p>
</descr>
<seealso>
<link id="TMenuItem.Handle"/>
<link id="TMenuItem.HandleAllocated"/>
<link id="TMenuItem.GetHandle"/>
<link id="TMenuItem.CreateHandle"/>
</seealso>
</element>
<element name="TMenuItem.Insert">
<short>
<var>Insert</var> a new item at the location marked by <var>Index</var>.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenuItem.Insert.Index">
<short>Ordinal position in Items where the menu item is inserted.</short>
</element>
<element name="TMenuItem.Insert.Item">
<short>Menu item inserted in Items.</short>
</element>
<element name="TMenuItem.RecreateHandle">
<short>Re-creates the Handle for the menu item.</short>
<descr>
<p>
RecreateHandle is a method used to destroy and re-create the <var>Handle</var> for the menu item. It is called when the type or the context for a <var>TMenuItem</var> instance is changed.
</p>
</descr>
<seealso>
<link id="TMenuItem.Handle"/>
<link id="TMenuItem.HandleAllocated"/>
<link id="TMenuItem.HandleNeeded"/>
<link id="TMenuItem.AutoCheck"/>
<link id="TMenuItem.ShowAlwaysCheckable"/>
</seealso>
</element>
<element name="TMenuItem.Remove">
<short>Removes the specified menu item from its Parent.</short>
<descr>
<p>
<var>Remove</var> is a method used to locate and delete the menu item specified in <var>Item</var>. Remove call <var>IndexOf</var> to get the position in <var>Items</var> where the menu item is stored. An <var>EMenuError</var> exception is raised if the menu item in Item is not found in the Items property.
</p>
<p>
Remove calls the <var>Delete</var> method to free the handle and the menu item instance at the required position.
</p>
</descr>
<seealso/>
</element>
<element name="TMenuItem.Remove.Item">
<short>Menu item removed in the method.</short>
</element>
<element name="TMenuItem.UpdateImage">
<short>
Updates the image associated with the menu item, particularly if it has changed.
</short>
<descr>
</descr>
<seealso/>
</element>
<element name="TMenuItem.UpdateImages">
<short>
Update the images for the menu item and its child items.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenuItem.IsCheckItem">
<short>
Indicates if the menu item is configured as a check box or a radio button item.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenuItem.IsCheckItem.Result">
<short/>
</element>
<element name="TMenuItem.IsLine">
<short>
True if the menu item is configured as a separator line.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenuItem.IsInMenuBar">
<short>
True if the menu item has a main menu bar as its parent.
</short>
<descr/>
<seealso>
<link id="TMenuItem.MergedParent"/>
<link id="TMenuItem.Menu"/>
<link id="TMainMenu"/>
</seealso>
</element>
<element name="TMenuItem.IsInMenuBar.Result">
<short>
True if the menu item has a main menu bar as its parent.
</short>
</element>
<element name="TMenuItem.Clear">
<short>
Removes all child menu Items in the class instance.
</short>
<descr>
<p>
<var>Clear</var> visits each of the <var>TMenuItem</var> instances in <var>Items</var> (in reverse order) and calls their <var>Free</var> method. Clear does not change other property values in the class instance.
</p>
</descr>
<seealso>
<link id="TMenuItem.Items"/>
</seealso>
</element>
<element name="TMenuItem.HasBitmap">
<short>
Indicates whether a TBitmap instance has been assigned to the Bitmap property.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenuItem.HasBitmap.Result">
<short>
True if a TBitmap instance has been assigned to the Bitmap property.
</short>
</element>
<element name="TMenuItem.GetIconSize">
<short>
Gets the size for the icon (glyph) used on the menu item.
</short>
<descr>
<p>
The return value is a <var>TPoint</var> instance with the Width and Height for the glyph displayed on the menu item.
</p>
<p>
Calls <var>HasIcon</var> to determine if <var>GlyphShowMode</var> allows (or requires) a glyph to be displayed for the menu item, and whether image(s) are available. When HasIcon returns <b>True</b>, the images available for the menu item are retrieved to get the Width and Height required for the device context in <var>ADC</var>. If an image list is not available, the Width and Height in <var>Bitmap</var> are used in the return value.
</p>
</descr>
<seealso/>
</element>
<element name="TMenuItem.GetIconSize.Result">
<short>
TPoint instance with the width and height for the glyph displayed on the menu item.
</short>
</element>
<element name="TMenuItem.GetIconSize.ADC">
<short>
Device context used to get the display density (PPI) for the glyph images.
</short>
</element>
<element name="TMenuItem.RemoveAllHandlersOfObject" link="#lcl.lclclasses.TLCLComponent.RemoveAllHandlersOfObject">
<short/>
<descr/>
<seealso/>
</element>
<element name="TMenuItem.RemoveAllHandlersOfObject.AnObject">
<short/>
</element>
<element name="TMenuItem.AddHandlerOnDestroy">
<short>
Adds an OnDestroy event handler to the handlers for the menu item.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenuItem.AddHandlerOnDestroy.OnDestroyEvent">
<short>Routine added to the handlers for the menu item.</short>
</element>
<element name="TMenuItem.AddHandlerOnDestroy.AsFirst">
<short>True if the handler is the first in the list of OnDestroy handlers.</short>
</element>
<element name="TMenuItem.RemoveHandlerOnDestroy">
<short>
Removes the specified OnDestroy event handler from the list of handlers for the menu item.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenuItem.RemoveHandlerOnDestroy.OnDestroyEvent">
<short>Routine removed from the list of handlers in the menu item.</short>
</element>
<element name="TMenuItem.AddHandler">
<short>
Adds an event handler routine of the specified type to the menu item.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenuItem.AddHandler.HandlerType">
<short>Identifies the type of handler added in the method.</short>
</element>
<element name="TMenuItem.AddHandler.AMethod">
<short>Event handler routine added to the list of handlers.</short>
</element>
<element name="TMenuItem.AddHandler.AsFirst">
<short>True if the handler is the first for the given type.</short>
</element>
<element name="TMenuItem.RemoveHandler">
<short>
Removes the event handler routine from the specified handler type.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenuItem.RemoveHandler.HandlerType">
<short/>
</element>
<element name="TMenuItem.RemoveHandler.AMethod">
<short/>
</element>
<element name="TMenuItem.Merged">
<short>Contains a menu item and its children merged into the current class instance.</short>
<descr>
<p>
<var>Merged</var> is a read-only <var>TMenuItem</var> property with the menu item merged into the Items for the current class instance.
</p>
</descr>
<seealso/>
</element>
<element name="TMenuItem.MergedWith">
<short>Menu item where the current class instance was merged.</short>
<descr>
<p>
<var>MergedWith</var> is a read-only <var>TMenuItem</var> property with the menu item where the current class instance was merged.
</p>
</descr>
<seealso/>
</element>
<element name="TMenuItem.Count">
<short>
Number of child menu items stored in the Items property.
</short>
<descr>
<p>
<var>Count</var> is a read-only <var>Integer</var> property with the number of child menu items stored in the <var>Items</var> property. The property value is redirected to the Count property in Items. The property value is <b>0</b> when Items has not been assigned (contains <b>Nil</b>).
</p>
</descr>
<seealso>
<link id="TMenuItem.Items"/>
<link id="#rtl.classes.TList.Count">TList.Count</link>
</seealso>
</element>
<element name="TMenuItem.Handle">
<short>Handle for the menu item allocated in the widgetset class.</short>
<descr>
<p>
<var>Handle</var> is a <var>HMenu</var> property with the handle for the menu item. Reading the value for the property causes the <var>HandleNeeded</var> method to be called to ensure that a valid handle exists for the menu item. The Handle value is assigned when the <var>CreateHandle</var> method in the widgetset class is called. Handle is set <b>0</b> when it has not been allocated using the widgetset class.
</p>
</descr>
<seealso>
<link id="TMenuItem.GetHandle"/>
<link id="TMenuItem.HandleNeeded"/>
<link id="TMenuItem.CreateHandle"/>
<link id="TMenuItem.RecreateHandle"/>
</seealso>
</element>
<element name="TMenuItem.Items">
<short>
Provides indexed access to the child menu items for the current class instance.
</short>
<descr>
<p>
<var>Items</var> is a read-only <var>TMenuItem</var> property which provides indexed access to the child menu items for the current class instance. An internal <var>TList</var> member is used to store the TMenuItem property values.
</p>
<p>
<var>Index</var> contains the ordinal position in the list for the TMenuItem instance returned as the property value.
</p>
<p>
An <var>EMenuError</var> is raised when accessing a value in the property and the Items list has not been assigned. The exception message reports an "Index Out of Bounds" condition.
</p>
<p>
TMenuItem instances are added and removed from the internal list using the <var>Add</var>, <var>AddSeparator</var>, <var>Delete</var>, <var>Clear</var>, and <var>Remove</var> methods.
</p>
<p>
Use the <var>IndexOf</var>, <var>IndexOfCaption</var>, and <var>Find</var> methods to locate a particular menu item in the Items property.
</p>
</descr>
<seealso/>
</element>
<element name="TMenuItem.Items.Index">
<short>Ordinal position in the list for the property value.</short>
</element>
<element name="TMenuItem.MergedItems">
<short>
Returns the visible and invisible child items taking the merged menu into account.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenuItem.MenuIndex">
<short>
Ordinal position for the menu item in its Parent.
</short>
<descr>
<p>
<var>MenuIndex</var> is an <var>Integer</var> property with the ordinal position for the menu item in its <var>Parent</var>.
</p>
<p>
The property value is retrieved by calling the <var>IndexOf</var> method in Parent using the current class instance as an argument. The property value is <b>-1</b> if Parent has not been assigned. Changing the value for the property causes the menu item to be relocated in Parent to the position indicated in the new property value.
</p>
</descr>
<seealso/>
</element>
<element name="TMenuItem.Menu">
<short>
Menu where the menu item is displayed.
</short>
<descr>
<p>
<var>Menu</var> is a read-only <var>TMenu</var> property with the menu which owns the menu item or its ancestors.
</p>
</descr>
<seealso>
<link id="TMenuItem.GetParentMenu"/>
<link id="TMenu.Create"/>
</seealso>
</element>
<element name="TMenuItem.Parent">
<short>The parent menu item for the class instance.</short>
<descr/>
<seealso/>
</element>
<element name="TMenuItem.MergedParent">
<short>
The parent menu item for the class instance taking the merged menu into account.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenuItem.Command">
<short>
Numeric command for the menu item as assigned in the widgetset class.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenuItem.MenuVisibleIndex">
<short>
<var>MenuVisibleIndex</var> - the index value of the visible menu.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenuItem.MenuVisibleIndex.Result">
<short/>
</element>
<element name="TMenuItem.WriteDebugReport">
<short>
Generates information about the menu item and its child Items for use in the debugger.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenuItem.Action">
<short>
<var>Action</var> - the default action associated with this Menu Item.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenuItem.AutoCheck">
<short>
Indicates whether a check mark is automatically drawn when the menu item is selected.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenuItem.Caption">
<short>
The caption text displayed for the menu item.
</short>
<descr>
<p>
Caption is a TTranslateString property which contains the text displayed for the menu item. Caption can include a prefixed character which is used as the accelerator key for the menu item. Use the value in cHotkeyPrefix to identify the character used as the ShortCut key for the menu item.
</p>
<p>
Changing the value in the property causes the widgetset class to be notified when the Handle has been allocated and the Parent property is assigned.
</p>
</descr>
<seealso/>
</element>
<element name="TMenuItem.Checked">
<short>
Indicates whether a check mark is displayed beside the menu item.
</short>
<descr/>
<seealso>
<link id="TMenuItem.AutoCheck"/>
<link id="TMenuItem.IsCheckItem"/>
<link id="TMenuItem.Click"/>
</seealso>
</element>
<element name="TMenuItem.Default">
<short>
Indicates if the menu item is the default selection.
</short>
<descr>
When <var>Default</var> is set to <b>True</b>, the menu item is normally displayed in boldface and can be executed by pressing the <b>Enter</b> key.
</descr>
<seealso/>
</element>
<element name="TMenuItem.Enabled">
<short>
Indicates if the menu item can be selected and executed.
</short>
<descr>
When Enabled is set to False, the menu item is normally displayed using a "greyed" style.
</descr>
<seealso/>
</element>
<element name="TMenuItem.Bitmap">
<short>
Bitmap image (glyph) displayed for the menu item.
</short>
<descr>
<p>
<var>Bitmap</var> is a <var>TBitmap</var> property which contains the bitmap image displayed as a glyph for the menu item.
</p>
<p>
The value in Bitmap can be set by assigning a TBitmap instance to the property. It may also be retrieved from images in the parent menu (or an Action list) using the ImageIndex property. The assignment mechanisms are not used at the same time. A value assigned directly to the Bitmap property overrides the setting in ImageIndex.
</p>
<p>
Changing the value in Bitmap causes the UpdateWSIcon method to be called to post the change to the widgetset class. The MenuChanged method is called to signal the OnChange event handler (when assigned).
</p>
<p>
Use GlyphShowMode to control use the visibility of the glyph image for the menu item.
</p>
</descr>
<seealso/>
</element>
<element name="TMenuItem.GroupIndex">
<short>
<var>GroupIndex</var>: the sequence number in a group of mutually exclusive RadioItem choices.
</short>
<descr>
<p>
<var>GroupIndex</var> is a <var>Byte</var> property which indicates a group for related menu items. GroupIndex is used in menu items displayed as radio buttons. The menu items with their <var>RadioItem</var> property set and the same value in GroupIndex are in the same mutually exclusive radio button display; only one radio button item can be <var>Checked</var> at any given time.
</p>
<p>
Changing the value for the property causes other radio button menu items with the same GroupIndex to be un-checked when the current item is Checked. If the <var>Handle</var> has been allocated for the menu item, the <var>RegroupMenuItem</var> routine in the LCL interface is called.
</p>
<p>
The default value for the property is <b>0</b>, and indicates that a group index value has not been assigned.
</p>
</descr>
<seealso/>
</element>
<element name="TMenuItem.GlyphShowMode">
<short>
Indicates the display behavior for the glyph (or Bitmap) on the menu item.
</short>
<descr>
<p>
GlyphShowMode is a TGlyphShowMode property which indicates the display behavior for the glyph (or Bitmap) on the menu item. The default value for the property is gsmApplication, and causes the value in Application.ShowMenuGlyphs to be used to determine the visibility for a glyph on the menu item.
</p>
<p>
See TGlyphShowMode for more information about values for the property and their meanings.
</p>
</descr>
<seealso>
<link id="TGlyphShowMode"/>
</seealso>
</element>
<element name="TMenuItem.HelpContext">
<short>
Index to the context-sensitive help string used for the menu item (context ID).
</short>
<descr/>
<seealso/>
</element>
<element name="TMenuItem.Hint">
<short>
<var>Hint</var>: shown in a statusbar if the main window has one and if the statusbar has AutoHint = True.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenuItem.ImageIndex">
<short>
Ordinal position in the list of images for the glyph displayed on the menu item.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenuItem.RadioItem">
<short>
Indicates if the menu item is displayed as a radio button.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenuItem.RightJustify">
<short>
Indicates if the menu item caption is displayed with right-justification.
</short>
<descr>
<p>
The default value for the property is False, and causes the menu item caption to use left-justification.
</p>
</descr>
<seealso/>
</element>
<element name="TMenuItem.ShortCut">
<short>
Accelerator key sequence to be used in selecting this menu item.
</short>
<descr>
<p>
<var>ShortCut</var> - the quick key sequence to be used in selecting this menu item
</p>
<p>
If you select this property in the Object Inspector, a list-box will appear with choices for various key-combinations to be used. The chosen key-sequence will be displayed, at run-time, on the menu drop-down next to the caption for the menu item.
</p>
</descr>
<seealso/>
</element>
<element name="TMenuItem.ShortCutKey2">
<short>Secondary shortcut (accelerator) key for the menu item.</short>
<descr/>
<seealso/>
</element>
<element name="TMenuItem.ShowAlwaysCheckable">
<short>
<var>ShowAlwaysCheckable</var> - if True, Item is always shown as checkable.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenuItem.SubMenuImages">
<short>
<var>SubMenuImages</var> - will images be shown for sub-menu items as well as the main item?
</short>
</element>
<element name="TMenuItem.SubMenuImagesWidth">
<short>Width for the bitmaps in the SubMenuImages property.</short>
<descr>
<p>
SubMenuImagesWidth is an Integer property with the width for the bitmaps in the SubMenuImages property. The default value for the property is 0 (zero), and indicates that an explicit value has not been assigned for the property. This causes the width from the SubMenuImages image list to be used.
</p>
</descr>
<seealso/>
</element>
<element name="TMenuItem.Visible">
<short>
Indicates whether the menu item is visible (or hidden).
</short>
<descr/>
<seealso/>
</element>
<element name="TMenuItem.OnClick">
<short>
Event handler signalled to perform the actions needed when the menu item is selected.
</short>
<descr/>
<seealso>
<link id="TMenuItem.Action"/>
<link id="TMenuItem.ActionLink"/>
<link id="#rtl.classes.TBasicAction">TBasicAction</link>
</seealso>
</element>
<element name="TMenuItem.OnDrawItem">
<short>
Event handler signalled to draw the menu item.
</short>
<descr>
<p>
<var>OnDrawItem</var> is a <var>TMenuDrawItemEvent</var> property with the event handler signalled to draw the menu item.
</p>
</descr>
<seealso/>
</element>
<element name="TMenuItem.OnMeasureItem">
<short>
Event handler signalled to get the Width and Height for the menu item.
</short>
<descr>
<p>
OnMeasureItem is a TMenuMeasureItemEvent property with the event handler signalled to calculate the width and height for the menu item on the specified Canvas.
</p>
</descr>
<seealso/>
<notes>
<note>Does the rectangle argument encompass the entire menu item or just its caption?</note>
</notes>
</element>
<element name="TMenuItemClass">
<short>
<var>TMenuItemClass</var> - class of <var>TMenuItem</var>.
</short>
<descr/>
<seealso/>
</element>
<element name="TFindItemKind">
<short>
<var>TFindItemKind</var> - enumerated type for kind of item in search operation: a command, a handle or a shortcut.
</short>
<descr>
<p>
<var>TFindItemKind</var> is an enumeration type with values that indicate the property examined to find a menu item with a specified value. A value from the enumeration is passed as an argument to the <var>TMenu.FindItem</var> method.
</p>
</descr>
<seealso>
<link id="TMenu.FindItem"/>
</seealso>
</element>
<element name="TFindItemKind.fkCommand">
<short>Checks the Command property in a menu item.</short>
</element>
<element name="TFindItemKind.fkHandle">
<short>Checks the Handle property in a menu item.</short>
</element>
<element name="TFindItemKind.fkShortCut">
<short>Checks the ShortCut property in a menu item.</short>
</element>
<element name="TMenu">
<short>
<var>TMenu</var> - a menu appearing in a form. Base class for <var>TMainMenu</var> or <var>TPopupMenu</var>.
</short>
<descr>
<p>
<var>TMenu</var> is the base class for all menus.
</p>
<p>
The class definition contains very few public or published properties or methods accessible to the application programmer, but contains the entry Items which points to the Menu Items that appear in the menu displays.
</p>
</descr>
<seealso>
<link id="HowToUseMenus">How To Use Menus</link>
<link id="TMainMenu"/>
<link id="TPopupMenu"/>
<link id="TMenuItem"/>
</seealso>
</element>
<!-- private -->
<element name="TMenu.FBiDiMode"/>
<element name="TMenu.FImageChangeLink"/>
<element name="TMenu.FImages"/>
<element name="TMenu.FImagesWidth"/>
<element name="TMenu.FItems"/>
<element name="TMenu.FOnDrawItem"/>
<element name="TMenu.FOnChange"/>
<element name="TMenu.FOnMeasureItem"/>
<element name="TMenu.FOwnerDraw"/>
<element name="TMenu.FParent"/>
<element name="TMenu.FParentBiDiMode"/>
<element name="TMenu.FShortcutHandled"/>
<!-- private methods -->
<element name="TMenu.CMParentBiDiModeChanged">
<short>
Handles the CM_PARENTBIDIMODECHANGED control message.
</short>
<descr>
<p>
See <var>TCustomForm.CMBiDiModeChanged</var> for more information.
</p>
</descr>
<seealso/>
</element>
<element name="TMenu.CMParentBiDiModeChanged.Message">
<short>Control message examined in the method.</short>
</element>
<element name="TMenu.CMAppShowMenuGlyphChanged">
<short>
Handles the CM_APPSHOWMENUGLYPHCHANGED message for the menu.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenu.CMAppShowMenuGlyphChanged.Message">
<short>Control message examined in the method.</short>
</element>
<element name="TMenu.IsBiDiModeStored">
<short>Implements the storage specifier for the BiDiMode property.</short>
<descr/>
<seealso/>
</element>
<element name="TMenu.IsBiDiModeStored.Result">
<short>True when BiDiMode contains a value other than the default.</short>
</element>
<element name="TMenu.ImageListChange">
<short>Implements the OnChange event handler used in the Images property.</short>
<descr/>
<seealso/>
</element>
<element name="TMenu.ImageListChange.Sender">
<short>Object for the event notification.</short>
</element>
<element name="TMenu.SetBiDiMode">
<short>Sets the value for the BiDiMode property.</short>
<descr/>
<seealso>
<link id="TMenu.BiDiMode"/>
</seealso>
</element>
<element name="TMenu.SetBiDiMode.AValue">
<short>New value for the property.</short>
</element>
<element name="TMenu.SetImages">
<short>Sets the value for the Images property.</short>
<descr/>
<seealso>
<link id="TMenu.Images"/>
</seealso>
</element>
<element name="TMenu.SetImages.AValue">
<short>New value for the property.</short>
</element>
<element name="TMenu.SetImagesWidth">
<short>Sets the value for the ImagesWidth property.</short>
<descr/>
<seealso>
<link id="TMenu.ImagesWidth"/>
</seealso>
</element>
<element name="TMenu.SetImagesWidth.aImagesWidth">
<short>New value for the property.</short>
</element>
<element name="TMenu.SetParent">
<short>Sets the value for the Parent property.</short>
<descr/>
<seealso>
<link id="TMenu.Parent"/>
</seealso>
</element>
<element name="TMenu.SetParent.AValue">
<short>New value for the property.</short>
</element>
<element name="TMenu.SetParentBiDiMode">
<short>Sets the value for the Parent BiDiMode property.</short>
<descr/>
<seealso>
<link id="TMenu.ParentBiDiMode"/>
</seealso>
</element>
<element name="TMenu.SetParentBiDiMode.AValue">
<short>New value for the property.</short>
</element>
<element name="TMenu.WSRegisterClass" link="#lcl.lclclasses.TLCLComponent.WSRegisterClass"/>
<element name="TMenu.BidiModeChanged">
<short>
Performs actions needed when the value in BiDiMode has been changed.
</short>
<descr>
<p>
<var>BidiModeChanged</var> is a method used to performs actions needed when the value in the <var>BiDiMode</var> property has been changed. If the <var>Handle</var> has been allocated for the menu, the widgetset class is notified of the new property values.
</p>
</descr>
<seealso>
<link id="TMenu.BiDiMode"/>
<link id="TMenu.Handle"/>
</seealso>
</element>
<element name="TMenu.CreateHandle">
<short>Creates the Handle for the menu.</short>
<descr>
<p>
<var>CreateHandle</var> calls the corresponding method in the widgetset class. It also calls <var>CheckChildHandles</var> to validate and update handles for merged menu Items. CreateHandle is used in the implementation of the <var>HandleNeeded</var> method.
</p>
</descr>
<seealso/>
</element>
<element name="TMenu.DoChange">
<short>
Performs actions needed when the specified menu item has been changed.
</short>
<descr>
<p>
<var>DoChange</var> is a method used to perform actions need when the menu item in <var>Source</var> has been changed. The <var>Rebuild</var> parameter indicates that the hierarchy of child menu items in Source should be reconstructed.
</p>
<p>
DoChange signals the <var>OnChange</var> event handler (when assigned) using the menu instance, Source, and Rebuild as arguments.
</p>
<p>
DoChange is called from the <var>MenuChanged</var> method.
</p>
</descr>
<seealso>
<link id="TMenu.OnChange"/>
<link id="TMenu.MenuChanged"/>
<link id="TMenuItem"/>
</seealso>
</element>
<element name="TMenu.DoChange.Source">
<short>Menu item where the change occurred.</short>
</element>
<element name="TMenu.DoChange.Rebuild">
<short>True to rebuild the child menu items.</short>
</element>
<element name="TMenu.GetHandle">
<short>Gets the value for the Handle property.</short>
<descr>
<p>
Calls <var>HandleNeeded</var> to create the handle if it has not been allocated in the widgetset class.
</p>
</descr>
<seealso>
<link id="TMenu.Handle"/>
<link id="TMenu.HandleNeeded"/>
</seealso>
</element>
<element name="TMenu.GetHandle.Result">
<short>Value for the property.</short>
</element>
<element name="TMenu.GetChildren">
<short>Calls the specified process for the Items in the menu control.</short>
<descr>
<p>
Calls the processing routine in Proc for each of the Items in the control. This is a helper function used during LCL component streaming.
</p>
</descr>
<seealso>
<link id="#rtl.classes.TComponent">TComponent</link>
</seealso>
</element>
<element name="TMenu.GetChildren.Proc" link="#rtl.classes.TComponent.GetChildren.Proc">
<short>Process called for the child items.</short>
</element>
<element name="TMenu.GetChildren.Root" link="#rtl.classes.TComponent.GetChildren.Root">
<short>Not used in the method.</short>
</element>
<element name="TMenu.MenuChanged">
<short>
Implements the OnChange event handler assigned to menu items in the menu.
</short>
<descr>
<p>
Calls the <var>DoChange</var> method using <var>Source</var> and <var>Rebuild</var> as arguments. No actions are performed in the method during LCL component streaming, or when the component is being freed.
</p>
</descr>
<seealso>
<link id="TMenu.DoChange"/>
<link id="TMenuChangeEvent"/>
</seealso>
</element>
<element name="TMenu.MenuChanged.Sender">
<short>Object for the event notification.</short>
</element>
<element name="TMenu.MenuChanged.Source">
<short>Menu item for the change notification.</short>
</element>
<element name="TMenu.MenuChanged.Rebuild">
<short>True to rebuild the visible child menu items in Source.</short>
</element>
<element name="TMenu.AssignTo">
<short>
Copies property values from the class instance to the specified persistent object.
</short>
<descr>
<p>
<var>AssignTo</var> is an overridden method in <var>TMenu</var> which re-implements the method from the ancestor class. AssignTo copies property values from the current class instance to the persistent object in the <var>Dest</var> argument.
</p>
<p>
When Dest is a TMenu instance, an implementation routine is called to copy the property value. If Dest is not derived from TMenu (or Nil), the inherited method (which raises an <var>EConvertError</var> exception) is called.
</p>
</descr>
<seealso>
<link id="#rtl.classes.TPersistent.Assign">TPersistent.Assign</link>
</seealso>
</element>
<element name="TMenu.AssignTo.Dest">
<short>Persistent object where the property values are stored.</short>
</element>
<element name="TMenu.Notification">
<short>
Handles a notification when a component is added to or removed from the control.
</short>
<descr>
<p>
Notification is an overridden method in TMenu. It calls the inherited method on entry, and sets the member for the Images property to Nil when it is removed from the control. An exception is raised if the Items property is removed from the control.
</p>
</descr>
<seealso>
<link id="#rtl.classes.TComponent.Notification">TComponent.Notification</link>
</seealso>
</element>
<element name="TMenu.ParentBidiModeChanged">
<short>Performs action when ParentBiDiMode has been changed.</short>
<descr>
<p>
Performs actions needed when the value in <var>ParentBiDiMode</var> has been changed. When Parent BiDiMode is set to <b>True</b>, ParentBidiModeChanged ensures the <var>BiDiMode</var> from the <var>TCustomForm</var> instance in <var>AOwner</var> is used in the menu.
</p>
<p>
ParentBidiModeChanged is called from the <var>Create</var> constructor, and when a new value is assigned to the <var>ParentBiDiMode</var> property.
</p>
</descr>
<seealso/>
</element>
<element name="TMenu.ParentBidiModeChanged.AOwner">
<short>Owner of the menu instance with the BiDiMode value applied to the menu.</short>
</element>
<element name="TMenu.SetChildOrder">
<short>Sets the order for the menu item specified in Child.</short>
<descr>
<p>
SetChildOrder is an overridden method used to set the order for the specified child in the menu instance. It ensures that the value in Child is cast to a TMenuItem instance before assigning the value in Order to its MenuIndex property.
</p>
</descr>
<seealso>
<link id="TMenu.Items"/>
<link id="TMenuItem.MenuIndex"/>
<link id="#rtl.classes.TComponent">TComponent</link>
</seealso>
</element>
<element name="TMenu.UpdateItems">
<short>
UpdateItems has an empty implementation in the current LCL version.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenu.OnChange">
<short>
Event handler signalled when a menu item in Items has been changed.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenu.FCompStyle">
<short>Stores component style flags.</short>
<descr/>
<seealso/>
</element>
<element name="TMenu.Create">
<short>Constructor for the class instance.</short>
<descr>
<p>
<var>Create</var> is the constructor for <var>TMenu</var>, and creates menu items and links, sets some defaults then calls inherited <var>Create</var>.
</p>
</descr>
<seealso>
<link id="#rtl.Classes.TComponent.Create">TComponent.Create</link>
</seealso>
</element>
<element name="TMenu.Create.AOwner">
<short>Owner of the class instance.</short>
</element>
<element name="TMenu.Destroy">
<short>Destructor for the class instance.</short>
<descr>
<p>
<var>Destroy</var> is the destructor for <var>TMenu</var>, and frees items and links, then calls inherited <var>Destroy</var>.
</p>
</descr>
<seealso>
<link id="#rtl.Classes.TComponent.Destroy">TComponent.Destroy</link>
</seealso>
</element>
<element name="TMenu.DestroyHandle">
<short>Frees the Handles for the items on the menu.</short>
<descr>
<p>
<var>DestroyHandle</var> calls the DestroyHandle method in <var>Items</var> to free all of the handles for the menu items.
</p>
</descr>
<seealso>
<link id="TMenu.Items"/>
<link id="TMenuItem.DestroyHandle"/>
</seealso>
</element>
<element name="TMenu.FindItem">
<short>
Gets the menu item with the specified value in a given property.
</short>
<descr>
<p>
<var>FindItem</var> is a <var>TMenuItem</var> function used to locate a menu item which has the value specified in <var>AValue</var> in a given property. The property examined for the value is specified in the <var>Kind</var> argument.
</p>
<p>
FindItem searches the menu items stored in the Items property to locate the specified value. The return value is <b>Nil</b> when a menu item is not found with the required value, or a Nil value is found in <var>Items</var>.
</p>
<p>
FindItem is used to implement methods like <var>GetHelpContext</var>, <var>IsShortcut</var>, and <var>DispatchCommand</var>.
</p>
</descr>
<seealso>
<link id="TMenu.Items"/>
<link id="TMenuItem.Command"/>
<link id="TMenuItem.Handle"/>
<link id="TMenuItem.Shortcut"/>
<link id="TFindItemKind"/>
</seealso>
</element>
<element name="TMenu.FindItem.Result">
<short>Menu item which matches the find criteria, or Nil when not found.</short>
</element>
<element name="TMenu.FindItem.AValue">
<short>Value to locate in the property indicated by Kind.</short>
</element>
<element name="TMenu.FindItem.Kind">
<short>Identifies the property examined for the specified value.</short>
</element>
<element name="TMenu.GetHelpContext">
<short>
Gets the numeric help context for the menu item with the specified handle or command.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenu.GetHelpContext.Result">
<short>Menu item with the specified value, or Nil when not found.</short>
</element>
<element name="TMenu.GetHelpContext.AValue">
<short>Command or Handle to locate in the menu items for the menu.</short>
</element>
<element name="TMenu.GetHelpContext.ByCommand">
<short>True to search Command values, False to search Handle values.</short>
</element>
<element name="TMenu.IsShortcut">
<short>
Indicates if the specified control message contains a shortcut (accelerator) key used in the menu.
</short>
<descr>
<p>
Is Shortcut is a Boolean function used to determine if the control message in Message contains a shortcut (accelerator) key used in the menu. It converts the CharCode and KeyData in Message to a shortcut value by calling the ShortCut routine.
</p>
<p>
The FindItem method is called to locate the menu item with the value in its Shortcut property. The ShortCutHandled property is updated to indicate whether the shortcut value exists in Items.
</p>
<p>
IsShortCut checks the Parent for the menu item to determine if the shortcut key is handled in the parent menu item. The InitiateAction and Click methods for the menu item are called if the parent handles the shortcut value.
</p>
</descr>
<seealso/>
</element>
<element name="TMenu.IsShortcut.Result">
<short>True when the message matches a menu item shortcut in Items.</short>
</element>
<element name="TMenu.IsShortcut.Message">
<short>Control message examined in the method.</short>
</element>
<element name="TMenu.HandleAllocated">
<short>
Returns True if a Handle has been allocated for the menu.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenu.HandleAllocated.Result">
<short>True if a Handle has been allocated for the menu.</short>
</element>
<element name="TMenu.IsRightToLeft">
<short>
Indicates if Right-to-Left text display is used in the menu.
</short>
<descr>
<p>
<var>IsRightToLeft</var> is a <var>Boolean</var> function which indicates if Right-to-Left text display is used in the menu. The return value is <b>True</b> when the <var>BiDiMode</var> property contains a value other than <var>bdLeftToRight</var>.
</p>
</descr>
<seealso/>
</element>
<element name="TMenu.IsRightToLeft.Result">
<short/>
</element>
<element name="TMenu.UseRightToLeftAlignment">
<short>
<var>UseRightToLeftAlignment</var> - returns True if Right-Left alignment is being used.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenu.UseRightToLeftAlignment.Result">
<short/>
</element>
<element name="TMenu.UseRightToLeftReading">
<short>
Indicates if right-to-left reading is used for the menu.
</short>
<descr>
<p>
<var>UseRightToLeftReading</var> is a <var>Boolean</var> function which indicates if the menu uses Right-to-Left reading for its values. UseRightToLeftReading is used in the widgetset class to enable bi-directional text display for languages like Arabic and Hebrew.
</p>
<p>
The return value is <b>True</b> when the <var>BiDiMode</var> property is set to a value other than <var>bdLeftToRight</var>.
</p>
<p>
Use the UseRightToLeftAlignment property to set the alignment for text values in the menu.
</p>
</descr>
<seealso>
<link id="TMenu.UseRightToLeftAlignment"/>
<link id="TMenu.BiDiMode"/>
<link id="#rtl.classes.TBiDiMode">TBiDiMode</link>
</seealso>
</element>
<element name="TMenu.UseRightToLeftReading.Result">
<short/>
</element>
<element name="TMenu.HandleNeeded">
<short>
Ensures that a Handle has been allocated for the menu.
</short>
<descr>
<p>
Calls CreateHandle if the Handle has not been allocated for the menu.
</p>
</descr>
<seealso>
<link id="TMenu.Handle"/>
<link id="TMenu.HandleAllocated"/>
<link id="TMenu.CreateHandle"/>
<link id="TMenu.DestroyHandle"/>
<link id="TMenu.GetHandle"/>
</seealso>
</element>
<element name="TMenu.DispatchCommand">
<short>
Executes the menu item with the specified numeric Command value.
</short>
<descr/>
<seealso>
<link id="TMenu.FindItem"/>
<link id="TMenuItem.Command"/>
<link id="TMenuItem.Click"/>
</seealso>
</element>
<element name="TMenu.DispatchCommand.Result">
<short>True if a menu item with the specified command was found and executed.</short>
</element>
<element name="TMenu.DispatchCommand.ACommand">
<short>Numeric command value to locate in the menu items for the menu.</short>
</element>
<element name="TMenu.Handle">
<short>
Handle for the menu allocated in the widgetset class.
</short>
<descr>
<p>
<var>Handle</var> is a read-only <var>HMenu</var> property with the handle for the menu. The Handle value is allocated by the widgetset class when the <var>CreateHandle</var> method is called. Use <var>DestroyHandle</var> to free the Handle for the menu.
</p>
</descr>
<seealso>
<link id="TMenu.HandleNeeded"/>
<link id="TMenu.CreateHandle"/>
<link id="TMenu.DestroyHandle"/>
</seealso>
</element>
<element name="TMenu.Parent">
<short>Parent component for the menu.</short>
<descr>
<p>
<var>Parent</var> is a <var>TComponent</var> property with the component associated with the menu instance. Setting Parent to <b>Nil</b> when a handle has been assigned for <var>Items</var> in the menu causes the <var>DestroyHandle</var> method to be called.
</p>
</descr>
<seealso>
<link id="TMenu.DestroyHandle"/>
<link id="TMenuItem.Items"/>
<link id="TMenuItem.Handle"/>
</seealso>
</element>
<element name="TMenu.ShortcutHandled">
<short>
Indicates whether the shortcut key for a menu item is used in the menu.
</short>
<descr/>
<seealso>
<link id="TMenu.IsShortcut"/>
<link id="TMenuItem.Enabled"/>
<link id="TMenuItem.Click"/>
</seealso>
</element>
<element name="TMenu.BidiMode">
<short>
Indicates whether Bi-directional text mode is implemented allowing use with languages like Arabic or Hebrew.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenu.ParentBidiMode">
<short>
The BiDiMode value for the parent component.
</short>
<descr/>
<seealso/>
</element>
<element name="TMenu.Items">
<short>Contains the menu items displayed on the menu.</short>
<descr>
<p>
<var>Items</var> is a read-only <var>TMenuItem</var> property with the menu items included in the menu. Values in Items can be maintained at design-time using the menu editor in the Lazarus IDE, or created and configured at run-time.
</p>
</descr>
<seealso>
<link id="TMenuItems"/>
<link id="TMenuItem.Items"/>
<link id="TMenuItem.Bitmap"/>
<link id="TMenuItem.Caption"/>
<link id="TMenuItem.Command"/>
<link id="TMenuItem.Enabled"/>
<link id="TMenuItem.Default"/>
<link id="TMenuItem.ShortCut"/>
<link id="TMenuItem.ShortCutKey2"/>
<link id="TMenuItem.Visible"/>
<link id="TMenuItem.Action"/>
<link id="TMenuItem.OnClick"/>
</seealso>
</element>
<element name="TMenu.Images">
<short>The image list with bitmaps used as glyphs for the menu items.</short>
<descr>
<p>
<var>Images</var> is a <var>TCustomImageList</var> property which contains the bitmap images displayed as glyphs for the <var>Items</var> on the menu. Populate an image list and assign it to the property prior to setting the <var>ImageIndex</var> and <var>GlyphShowMode</var> for the individual <var>TMenuItem</var> instances on the menu. As an alternative, glyphs can assigned directly to the <var>Bitmap</var> property in each TMenuItem instance.
</p>
<p>
Setting a new value for the property causes the image change link and free notification to be removed and/or added as needed. The UpdateImages method in Items is called to validate the image(s) and to notify the widgetset class of change(s) to the property value(s).
</p>
</descr>
<seealso>
<link id="TMenuItem.Bitmap"/>
<link id="TMenuItem.ImageIndex"/>
<link id="TMenuItem.GlyphShowMode"/>
<link id="TMenuItem.UpdateImages"/>
<link id="#lcl.imglist.TCustomImageList">TCustomImageList</link>
</seealso>
</element>
<element name="TMenu.ImagesWidth">
<short>Width for the bitmaps in the Images property.</short>
<descr>
<p>
<var>ImagesWidth</var> is an <var>Integer</var> property with the width needed for bitmaps in the <var>Images</var> property. The default value for the property is <b>0</b> (<b>zero</b>), and indicates that the width in the Images property is used.
</p>
<p>
Setting a new value for the property causes the <var>UpdateImages</var> method in <var>Items</var> to be called.
</p>
</descr>
<seealso>
<link id="TMenu.Images"/>
<link id="TMenuItem.UpdateImages"/>
<link id="TMenuItem.ImageIndex"/>
<link id="TMenuItem.Bitmap"/>
</seealso>
</element>
<element name="TMenu.OwnerDraw">
<short>Indicates if the menu items are drawn using the OnDrawItem event handler.</short>
<descr>
<p>
<var>OwnerDraw</var> is a <var>Boolean</var> property which indicates if the menu items are drawn using the <var>OnDrawItem</var> event handler. The default value for the property is <b>False</b>.
</p>
<p>
OwnerDraw is used when the widgetset class renders the menu. If OwnerDraw is <b>False</b>, the default drawing routines for the platform are used to draw the menu control. Otherwise, the <var>OnMeasureItem</var> and <var>OnDrawItem</var> event handlers are signalled for the purpose.
</p>
</descr>
<seealso>
<link id="TMenu.OnDrawItem"/>
<link id="TMenu.OnMeasureItem"/>
<link id="TMenuItem.OnDrawItem"/>
<link id="TMenuItem.OnMeasureItem"/>
</seealso>
</element>
<element name="TMenu.OnDrawItem">
<short>Event handler signalled to draw a menu item on the menu.</short>
<descr/>
<seealso>
<link id="TMenu.OwnerDraw"/>
<link id="TMenu.OnMeasureItem"/>
</seealso>
</element>
<element name="TMenu.OnMeasureItem">
<short>
Event handler signalled to get the width and height for a menu item on the menu.
</short>
<descr/>
<seealso>
<link id="TMenu.OwnerDraw"/>
<link id="TMenu.OnDrawItem"/>
</seealso>
</element>
<element name="TMainMenu">
<short>
<var>TMainMenu</var> - the Main Menu that appears at the top of most windows.
</short>
<descr>
<p>
<var>TMainMenu</var> - the Main Menu that appears at the top of most windows; form designers can customize by choosing various menu items.
</p>
<p>
Main Menu is a non-visible component : that is, if the icon is selected from the Component Palette and placed on the Form, it will not appear at Run-time. Instead, a Menu bar with a structure defined by the Menu Editor will appear.
</p>
<p>
To see the Menu Editor, right-click on the Main Menu icon on your Form.
</p>
</descr>
<seealso>
<link id="HowToUseMenus">How To Use Menus</link>
<link id="TMenuItem"/>
<link id="TMenu"/>
<link id="TMenuActionLink"/>
</seealso>
</element>
<!-- private -->
<element name="TMainMenu.FWindowHandle"/>
<element name="TMainMenu.GetHeight"/>
<element name="TMainMenu.GetHeight.Result"/>
<element name="TMainMenu.SetWindowHandle"/>
<element name="TMainMenu.SetWindowHandle.AValue"/>
<!-- protected -->
<element name="TMainMenu.ItemChanged">
<short>
Performs actions needed when a menu item has been changed.
</short>
<descr>
<p>
Calls MenuChanged when a menu item has been changed in the widgetset class.
</p>
</descr>
<seealso/>
</element>
<element name="TMainMenu.WSRegisterClass" link="#lcl.lclclasses.TLCLComponent.WSRegisterClass"/>
<element name="TMainMenu.MenuChanged">
<short>
Implements the OnChange event handler used for menu items in the class instance.
</short>
<descr>
<p>
<var>MenuChanged</var> is an overridden method in <var>TMainMenu</var>. It ensures that the <b>CM_MENUCHANGED</b> control message is forwarded to the <var>WindowHandle</var> (when assigned) where the menu is displayed. MenuChanged calls the inherited method prior to exit to signal the <var>OnChange</var> event handler (when assigned).
</p>
</descr>
<seealso>
<link id="TMainMenu.WindowHandle"/>
<link id="TMainMenu.OnChange"/>
</seealso>
</element>
<element name="TMainMenu.MenuChanged.Sender">
<short>Object of the change notification.</short>
</element>
<element name="TMainMenu.MenuChanged.Source">
<short>Menu item for the change notification.</short>
</element>
<element name="TMainMenu.MenuChanged.Rebuild">
<short>True to rebuild the child menu items for the menu.</short>
</element>
<element name="TMainMenu.Create">
<short>Constructor for the class instance.</short>
<descr>
<p>
<var>Create</var> is the overridden constructor in <var>TMainMenu</var>.
</p>
<p>
Create ensures that the internal component style flags are set for the main menu instance. It also sets the <var>WindowHandle</var> to <b>0</b> (<b>zero</b>) to indicate that the display window has not been assigned for the menu instance.
</p>
<p>
Create calls the inherited constructor prior to exiting from the method.
</p>
</descr>
<seealso>
<link id="TMainMenu.WindowHandle"/>
<link id="#lcl.menus.TMenu.Create">TMenu.Create</link>
</seealso>
</element>
<element name="TMainMenu.Create.AOwner">
<short/>
</element>
<element name="TMainMenu.Merge">
<short>Merges menu items from the specified main menu instance.</short>
<descr>
<p>
<var>Merge</var> is a method used to merge the menu items from the specified <var>Menu</var> into the Items for the current class instance. When Menu contains a non-<b>Nil</b> value, the <var>MergeWith</var> method in <var>Items</var> is called using the Items in the current class instance as the target. When Menu has not been assigned, the MergeWith method in Items is called using <b>Nil</b> as the target.
</p>
<p>
Use <var>Unmerge</var> to remove merge menu items from a specified menu instance.
</p>
</descr>
<seealso>
<link id="TMainMenu.Unmerge"/>
<link id="TMenu.Items"/>
<link id="TMenuItem.MergedItems"/>
<link id="TMenuItem.Merged"/>
</seealso>
</element>
<element name="TMainMenu.Merge.Menu">
<short>Main menu merged into the current class instance.</short>
</element>
<element name="TMainMenu.Unmerge">
<short>Removes merged menu items for the specified menu.</short>
<descr/>
<seealso/>
</element>
<element name="TMainMenu.Unmerge.Menu">
<short>Menu instance with the merged items removed in the method.</short>
</element>
<element name="TMainMenu.Height">
<short>Height for the menu.</short>
<descr/>
<seealso/>
</element>
<element name="TMainMenu.WindowHandle">
<short>Handle for the window where the menu is displayed.</short>
<descr/>
<seealso/>
</element>
<element name="TMainMenu.OnChange">
<short>Event handler signalled when a menu item has been changed.</short>
<descr/>
<seealso>
<link id="TMainMenu.ItemChanged"/>
<link id="TMainMenu.MenuChanged"/>
<link id="TMenu.MenuChanged"/>
</seealso>
</element>
<element name="TPopupAlignment">
<short>
<var>TPopupAlignment</var> - enumerated type to describe the position of pop-up menu relative to the pop-up coordinates.
</short>
<descr>
<dl>
<dt>paLeft</dt>
<dd>Positions the pop-up menu so its left corner is at the pop-up coordinate</dd>
<dt>paRight</dt>
<dd>Positions the pop-up menu menu so its right corner is at the pop-up coordinate</dd>
<dt>paCenter</dt>
<dd>Centers the pop-up menu around the pop-up coordinate</dd>
</dl>
</descr>
</element>
<element name="TTrackButton">
<short>
<var>TTrackButton</var> - enumerated type described which mouse buttons can be used to activate (click) menu items.
</short>
<descr>
<dl>
<dt>tbRightButton</dt>
<dd>Both left and right buttons are used to activate a menu item</dd>
<dt>tbLeftButton</dt>
<dd>Only the left button is used to activate a menu item</dd>
</dl>
</descr>
</element>
<element name="TPopupMenu">
<short>
<var>TPopupMenu</var> - a menu panel that pops up on the desktop when the right mouse button is clicked.
</short>
<descr>
<p>
<var>TPopupMenu</var> : a menu panel that pops up on the desktop when the right mouse button is clicked.
</p>
<p>
Inherits all the properties of <var>TMenu</var> (including the properties of <var>TMenuItem</var>), but has some new properties (procedure <var>PopUp</var> and procedure <var>Close</var>) that define its behavior when actually invoked.
</p>
<p>
PopupPoint defines the position of the pop-up menu, usually at the current cursor position.
</p>
<p>
To use a pop-up menu, first create it with the MenuEditor. Then with the Object Inspector for the control that needs to use the Pop-up, select the property named PopupMenu, and a list box will appear with the names of the available Menus - choose the Pop-up name you want.
</p>
</descr>
<seealso>
<link id="HowToUseMenus">How To Use Menus</link>
<link id="TMainMenu"/>
<link id="TMenuItem"/>
<link id="TMenu"/>
<link id="TMenuActionLink"/>
</seealso>
</element>
<!-- private -->
<element name="TPopupMenu.FAlignment"/>
<element name="TPopupMenu.FAutoPopup"/>
<element name="TPopupMenu.FOnClose"/>
<element name="TPopupMenu.FOnPopup"/>
<element name="TPopupMenu.FPopupComponent"/>
<element name="TPopupMenu.FPopupPoint"/>
<element name="TPopupMenu.FTrackButton"/>
<element name="TPopupMenu.GetHelpContext"/>
<element name="TPopupMenu.GetHelpContext.Result"/>
<element name="TPopupMenu.SetHelpContext"/>
<element name="TPopupMenu.SetHelpContext.AValue"/>
<!-- protected -->
<element name="TPopupMenu.WSRegisterClass" link="#lcl.lclclasses.TLCLComponent.WSRegisterClass"/>
<element name="TPopupMenu.DoPopup">
<short>Performs actions needed to display the pop-up menu.</short>
<descr/>
<seealso/>
</element>
<element name="TPopupMenu.DoPopup.Sender">
<short>Object for the event notification.</short>
</element>
<element name="TPopupMenu.DoClose">
<short>Performs actions needed when the pop-up menu is closed.</short>
<descr/>
<seealso/>
</element>
<element name="TPopupMenu.Create">
<short>Constructor for the class instance.</short>
<descr>
<p>
<var>Create</var> is the constructor for <var>TPopupMenu</var>, and calls the inherited <var>Create</var>, sets style to <var>PopupMenu</var>, sets <var>AutoPopup</var> to True.
</p>
</descr>
<seealso>
<link id="#lcl.menus.TMenu.Create">TMenu.Create</link>
</seealso>
</element>
<element name="TPopupMenu.Create.AOwner">
<short>Owner of the class instance.</short>
</element>
<element name="TPopupMenu.Destroy">
<short>Destructor for the class instance.</short>
<descr>
<p>
<var>Destroy</var> is the destructor for <var>TPopupMenu</var>. It closes the display window for the pop-up menu and calls the inherited <var>Destroy</var> method.
</p>
</descr>
<seealso>
<link id="#lcl.menus.TMenu.Destroy">TMenu.Destroy</link>
</seealso>
</element>
<element name="TPopupMenu.PopUp">
<short>
Displays the pop-up menu.
</short>
<descr>
<p>
<var>PopUp</var> is an overloaded method used to display the pop-up menu. An overloaded variant is provided which includes <var>X</var> and <var>Y</var> 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.
</p>
<p>
No actions are performed in the method if a value has already been assigned to the <var>ActivePopupMenu</var> variable. <var>DoPopUp</var> is called to signal the <var>OnPopup</var> event handler (when assigned). No additional actions are performed in the method if menu items have not been defined in the Items property.
</p>
<p>
PopUp sets the value in ActivePopupMenu to the current class instance. The <var>InitiateActions</var> method is called for the menu <var>Items</var> to ensure that the <var>ActionLink</var> for the component is updated. The handles for the menu and its sub-items are recreated, and the <var>OnMenuPopupHandler</var> event handler is signalled (when assigned).
</p>
<p>
PopUpMenu calls the corresponding method in the widgetset class prior to exiting from the method.
</p>
</descr>
<seealso>
<link id="TPopUpMenu.DoPopUp"/>
<link id="TPopUpMenu.OnPopup"/>
<link id="TMenu.Items"/>
<link id="TMenuItem.InitiateActions"/>
<link id="TMenuItem.ActionLink"/>
<link id="OnMenuPopupHandler"/>
</seealso>
</element>
<element name="TPopupMenu.PopUp.X">
<short>Horizontal coordinate where the pop-up menu is displayed.</short>
</element>
<element name="TPopupMenu.PopUp.Y">
<short>Vertical coordinate where the pop-up menu is displayed.</short>
</element>
<element name="TPopupMenu.PopupComponent">
<short>Component to which the pop-up menu is attached.</short>
<descr>
<p>
<var>PopupComponent</var> is a <var>TComponent</var> 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.
</p>
</descr>
<seealso/>
</element>
<element name="TPopupMenu.PopupPoint">
<short>
TPoint instance with the coordinates where the pop-up menu is displayed.
</short>
<descr>
<p>
<var>PopupPoint</var> is a read-only <var>TPoint</var> property which contains the coordinates where the pop-up menu is displayed. The value in PopupPoint is updated when the PopUp method is called.
</p>
</descr>
<seealso>
<link id="TPopupMenu.PopUp"/>
</seealso>
</element>
<element name="TPopupMenu.Close">
<short>
Closes the pop-up menu when it is active.
</short>
<descr>
<p>
<var>Close</var> is a method used to close the pop-up menu when it is active. When <var>ActivePopupMenu</var> contains the current class instance, the <var>DoClose</var> method is called to signal the <var>OnClose</var> event handler (when assigned). ActivePopupMenu is set to <b>Nil</b> to indicate that the pop-up menu is no longer active.
</p>
<p>
No actions are performed in the method if ActivePopupMenu does not refer to the current class instance.
</p>
</descr>
<seealso>
<link id="TPopUpMenu.DoClose"/>
<link id="TPopUpMenu.OnClose"/>
<link id="ActivePopupMenu"/>
</seealso>
</element>
<element name="TPopupMenu.Alignment">
<short>
Determines the position of pop-up menu relative to the pop-up coordinate.
</short>
<descr>
<p>
<var>Alignment</var> is a <var>TPopupAlignment</var> property which indicates the alignment of the pop-up menu relative to the mouse coordinates in <var>PopupPoint</var>. The default value for the property is <var>paLeft</var> and causes the menu to be displayed to the left of the mouse coordinates passed to the <var>PopUp</var> method.
</p>
</descr>
<seealso>
<link id="TPopUpMenu.PopUp"/>
<link id="TPopUpMenu.PopupPoint"/>
<link id="TPopupAlignment"/>
</seealso>
</element>
<element name="TPopupMenu.AutoPopup">
<short>
Indicates if the pop-up is displayed when the mouse hovers over the component for the pop-up menu.
</short>
<descr>
<p>
<var>AutoPopUp</var> determines whether the pop-menu is automatically displayed when the mouse is hovered over the <var>PopupComponent</var> for the menu. Its value can be used in the implementing component to determine whether the <var>PopUp</var> method should be called. The default value for the property is <b>True</b>.
</p>
</descr>
<seealso>
<link id="TPopUpMenu.PopupComponent"/>
<link id="TPopUpMenu.PopUp"/>
<link id="ActivePopupMenu"/>
</seealso>
</element>
<element name="TPopupMenu.HelpContext">
<short>Help context for the pop-up menu.</short>
<descr/>
<seealso/>
</element>
<element name="TPopupMenu.TrackButton">
<short>
Identifies the mouse button which activated the pop-up menu.
</short>
<descr>
<p>
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.
</p>
<p>
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.
</p>
</descr>
<seealso/>
</element>
<element name="TPopupMenu.OnPopup">
<short>
Event handler signalled to display the pop-up menu.
</short>
<descr>
<p>
<var>OnPopUp</var> is signalled from <var>DoPopUp</var> when the <var>PopUp</var> method is executed. The <var>Sender</var> argument contains the <var>TPopUpMenu</var> 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.
</p>
</descr>
<seealso>
<link id="TPopUpMenu.PopUp"/>
<link id="TPopUpMenu.DoPopUp"/>
</seealso>
</element>
<element name="TPopupMenu.OnClose">
<short>
Event handler signalled when the pop-up menu is closed.
</short>
<descr>
<p>
You can delete menu items here. But if you delete the clicked menu item on OnClose the OnClick will not follow under Windows.
</p>
</descr>
<seealso/>
</element>
<element name="ShortCut">
<short>Converts a virtual key code and modifier to a shortcut value.</short>
<descr>
<p>
Calls the KeyToShortCut routine in <file>LCLType</file> get the return value for the function.
</p>
</descr>
<seealso>
<link id="#lcl.lcltype.KeyToShortCut">KeyToShortCut</link>
</seealso>
</element>
<element name="ShortCut.Result">
<short>TShortCut type with the value for the key and modifier.</short>
</element>
<element name="ShortCut.Key">
<short>Virtual key code for the shortcut value.</short>
</element>
<element name="ShortCut.Shift">
<short>Shift, Alt, or Ctrl modifier for the shortcut value.</short>
</element>
<element name="ShortCutToKey">
<short>Converts a shortcut value to a virtual key code and modifier.</short>
<descr/>
<seealso/>
</element>
<element name="ShortCutToKey.ShortCut">
<short>Shortcut value converted to a Key code and Shift modifier.</short>
</element>
<element name="ShortCutToKey.Key">
<short>Virtual key code for the shortcut value.</short>
</element>
<element name="ShortCutToKey.Shift">
<short>Shift, Ctrl or Alt modifier for the shortcut value.</short>
</element>
<element name="DesignerMenuItemClick">
<short>
Unit global variable with the event handler signalled when a menu item is clicked at design-time.
</short>
<descr/>
<seealso/>
</element>
<element name="ActivePopupMenu">
<short>Unit global variable which represents the active pop-up menu.</short>
<descr>
<p>
The value for the variable is updated when the <var>PopUp</var> or <var>Close</var> methods are called for a <var>TPopUpMenu</var> 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 <b>Nil</b> when the Close method is called for the pop-up menu.
</p>
</descr>
<seealso/>
</element>
<element name="OnMenuPopupHandler">
<short>
Unit global variable with the event handler signalled when a pop-up menu is displayed.
</short>
<descr>
<p>
<var>OnMenuPopupHandler</var> is a <var>TNotifyEvent</var> variable which contains the global routine executed when when a pop-up menu is displayed. It is signalled (when assigned) from the <var>Popup</var> method in a <var>TPopUpMenu</var> instance, or from the <var>Click</var> method in a <var>TMenuItem</var> instance. The <var>MenuPopupHandler</var> method in <var>Application</var> is assigned to the variable (by default) during application start up. It is set to <b>Nil</b> when an application is shut down.
</p>
</descr>
<seealso>
<link id="#lcl.forms.TApplication.MenuPopupHandler">TApplication.MenuPopupHandler</link>
</seealso>
</element>
<element name="NewMenu">
<short>Creates and configures a new menu instance with the specified menu items.</short>
<descr>
<p>
<var>NewMenu</var> is a <var>TMainMenu</var> 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 <var>Owner</var> as the owner for the class instance. The value in <var>AName</var> is used in the <var>Name</var> property for the new menu instance.
</p>
<p>
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.
</p>
</descr>
<seealso/>
</element>
<element name="NewMenu.Result">
<short>TMainMenu instance created in the routine.</short>
</element>
<element name="NewMenu.Owner">
<short>Component which owns the new menu instance.</short>
</element>
<element name="NewMenu.AName">
<short>Name for the new menu instance.</short>
</element>
<element name="NewMenu.Items">
<short>Array with the menu items for the new menu instance.</short>
</element>
<element name="NewPopupMenu">
<short>Creates and configures a new pop-up menu with the specified menu items.</short>
<descr>
<p>
<var>NewPopupMenu</var> is a <var>TPopUpMenu</var> 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 <var>AName</var> is used in the <var>Name</var> property for the new menu instance. <var>AutoPopUp</var> and <var>Alignment</var> are assigned to the corresponding properties in the new pop-up menu instance.
</p>
<p>
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.
</p>
</descr>
<seealso/>
</element>
<element name="NewPopupMenu.Result">
<short>TPopUpMenu instance created in the routine.</short>
</element>
<element name="NewPopupMenu.Owner">
<short>Component which owns the new pop-up menu instance.</short>
</element>
<element name="NewPopupMenu.AName">
<short>Name for the new pop-up menu instance.</short>
</element>
<element name="NewPopupMenu.Alignment">
<short>Alignment relative to the mouse pointer for the pop-up menu instance.</short>
</element>
<element name="NewPopupMenu.AutoPopup">
<short>
True if the pop-up menu is automatically displayed when the mouse is hovered over the component.
</short>
</element>
<element name="NewPopupMenu.Items">
<short>Array with the menu items for the new pop-up menu instance.</short>
</element>
<element name="NewSubMenu">
<short>
Creates and configures a new sub-menu with the specified child menu items.
</short>
<descr>
<p>
<var>NewSubMenu</var> is a <var>TMenuItem</var> 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 <var>aCaption</var> as the caption text for the menu item, and <var>AName</var> contains the name for the sub-menu.
</p>
<p>
The menu item is created using <b>Nil</b> 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).
</p>
</descr>
<seealso/>
</element>
<element name="NewSubMenu.Result">
<short>TMenuItem with the sub-menu created in the routine.</short>
</element>
<element name="NewSubMenu.ACaption">
<short>Caption text displayed for the sub-menu.</short>
</element>
<element name="NewSubMenu.hCtx">
<short>Help context for the sub-menu.</short>
</element>
<element name="NewSubMenu.AName">
<short>Name for the menu item representing the sub-menu.</short>
</element>
<element name="NewSubMenu.Items">
<short>Array of menu items for the new sub-menu.</short>
</element>
<element name="NewSubMenu.TheEnabled">
<short>True if the menu item for the sub-menu is enabled.</short>
</element>
<element name="NewItem">
<short>Creates and configures a new menu item instance.</short>
<descr>
<p>
<var>NewItem</var> is a <var>TMenuItem</var> 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 <var>Owner</var> property set to <b>Nil</b>. Values passed in the parameters are assigned to the corresponding properties in the TMenuItem instance in the return value.
</p>
<p>
Other property values for the menu item can be assigned in the calling routine. Use the <var>Add</var> or <var>Insert</var> method in the desired menu or sub menu to store the new menu item instance.
</p>
</descr>
<seealso>
<link id="TMenu.Items"/>
<link id="TMenuItem"/>
<link id="TMenuItem.Items"/>
<link id="TMenuItem.Add"/>
<link id="TMenuItem.Insert"/>
</seealso>
</element>
<element name="NewItem.Result">
<short>Menu item instance created in the routine.</short>
</element>
<element name="NewItem.ACaption">
<short>Caption text for the new menu item.</short>
</element>
<element name="NewItem.AShortCut">
<short>Short cut for the new menu item.</short>
</element>
<element name="NewItem.AChecked">
<short>True if the new menu item is checked.</short>
</element>
<element name="NewItem.TheEnabled">
<short>True if the new menu item is enabled.</short>
</element>
<element name="NewItem.TheOnClick">
<short>OnClick handler for the new menu item.</short>
</element>
<element name="NewItem.hCtx">
<short>Help context for the new menu item.</short>
</element>
<element name="NewItem.AName">
<short>Name assigned for the new menu item.</short>
</element>
<element name="NewLine">
<short>Creates and configures a menu item displayed as a separator line.</short>
<descr>
<p>
Uses the value in cLineCaption as the caption text for the menu item.
</p>
</descr>
<seealso/>
</element>
<element name="NewLine.Result">
<short>TMenuItem instance created in the routine.</short>
</element>
<element name="StripHotkey">
<short>Removes the hot key (accelerator) prefix from the specified text.</short>
<descr/>
<seealso/>
</element>
<element name="StripHotkey.Result">
<short>Text value after removing the hotkey prefix.</short>
</element>
<element name="StripHotkey.Text">
<short>Text examined and updated in the routine.</short>
</element>
<element name="Register">
<short>Registers components for use in the Lazarus IDE.</short>
<descr>
<p>
The following components are added to the Lazarus IDE component palette:
</p>
<p>
<b>Standard</b> Tab
</p>
<ul>
<li>TMainMenu</li>
<li>TPopupMenu</li>
</ul>
<p>
<b>Registered</b> but not displayed:
</p>
<ul>
<li>TMenuItem</li>
</ul>
</descr>
</element>
<element name="cHotkeyPrefix">
<short>Prefix used in a menu item caption to identify a hot key (accelerator).</short>
<descr/>
<seealso/>
</element>
<element name="cLineCaption">
<short>Caption used for a menu item displayed as a separator line.</short>
<descr/>
<seealso/>
</element>
<element name="cDialogSuffix">
<short>Not used in the current LCL implementation.</short>
<descr/>
<seealso/>
</element>
<element name="ValidMenuHotkeys">
<short>
Contains characters that can be used as accelerator keys in menus and menu items.
</short>
<descr>
<p>
Not used in the current LCL implementation.
</p>
</descr>
<seealso/>
</element>
<topic name="HowToUseMenus">
<short>
<var>HowToUseMenus</var> - hints for creating Menus for your Forms.
</short>
<descr>
<p>
<var>TMainMenu</var> is the Main Menu that appears at the top of most forms; form designers can customize by choosing various menu items. <var>TPopupMenu</var> is a menu window that pops up with pertinent, usually context-sensitive, details and choices when the right mouse button is clicked near a control.
</p>
<p>
Main Menu is a non-visible component : that is, if the icon is selected from the Component Palette and placed on the Form, it will not appear at Run-time. Instead, a Menu bar with a structure defined by the Menu Editor will appear. Pop-up menus, placed on the form by selecting the icon from the Component Palette, do not appear at all unless the right mouse button is clicked on a control that owns such a menu.
</p>
<p>
To see the Menu Editor, right-click on the Main Menu or Pop-up Menu icon on your Form. A pop-up box appears, that invites you to enter items into the Menu bar.
</p>
<p>
An Edit box is displayed, containing a Button labeled New Item1. If you right-click on that box, a pop-up menu is displayed that allows you to add a new item before or after (along the same level) or create a sub-menu with the opportunity to add further items below (or above) the new item in a downward column.
</p>
<p>
Any or all of the <link id="TMenuItem">MenuItems</link> that you add can be configured using the Object Inspector.
</p>
<p>
At the least you should give each item a <var>Caption</var> which will appear on the Menu Bar (you may also wish to give it a more meaningful <var>Name</var>). The caption should indicate the activity to be selected, such as "File Open" or "Close", "Run" or "Quit"
</p>
<p>
If you want a particular letter in the Caption to be associated with a shortcut key, that letter should be preceded by an ampersand. The Menu item at run-time will appear with the shortcut letter underlined, and hitting that letter key will have the same effect as selecting the menu item. Alternatively you can choose a shortcut key sequence (such as Ctrl-C for Copy or Ctrl-V for Paste - the standard Keyboard shortcuts) with the <var>ShortCut</var> property of the MenuItem.
</p>
<p>
It is often helpful to use the Menu controls in conjunction with an <link id="#lcl.ActnList.TActionList">ActionList</link> which contains a series of standard or customized <link id="#lcl.ActnList.TAction">Actions</link>. Menu Items can be linked in the Object Inspector to Actions on the list, and the same actions can be linked to <link id="#lcl.StdCtrls.TButton">Buttons</link>, <link id="#lcl.ComCtrls.TToolButton">ToolBar Buttons</link>, <link id="#lcl.Buttons.TSpeedButton">SpeedButtons</link> etc. It is obviously economic of effort to re-use the same code to respond to the various events, rather than writing separate <var>OnClick</var> event handlers for each individual control.
</p>
<p>
By default a number of standard actions are pre-loaded from <link id="#lcl.StdActns">StdActns</link> or, if DataAware controls are being used, from <link id="#lcl.DBActns">DBActns</link>, and these can be chosen using the ActionList editor which appears when you right-click on the ActionList icon on the Form Designer.
</p>
</descr>
</topic>
</module>
<!-- Menus -->
</package>
</fpdoc-descriptions>