[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Menus' (#lcl)

TMenu

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TMenu : The base class for all menus

Declaration

Source position: menus.pp line 303

type TMenu = class(TLCLComponent)

  class procedure WSRegisterClass; override;

  

WSRegisterClass - Register this Class for the current Widget Set

protected

  procedure BidiModeChanged; virtual;

  

BidiModeChanged - method for dealing with changed Bi-directional mode

  procedure CreateHandle; virtual;

  

CreateHandle - method for creating handle

  procedure DoChange(); virtual;

  

DoChange - perform the OnChange event, completely rebuilding the Source menuitem if Rebuild is true

  function GetHandle; virtual;

  

GetHandle - returns the handle for this Menu

  procedure GetChildren(); override;

  

  procedure MenuChanged(); virtual;

  

MenuChanged - method to signal that a menu has been changed

  procedure Notification(); override;

  procedure ParentBidiModeChanged();

  

ParentBidiModeChanged - procedure to deal with a change in the Parent Bi-directional mode

  procedure SetChildOrder(); override;

  procedure UpdateItems;

  

UpdateItems - implement all pending changes to Items

  property OnChange: TMenuChangeEvent; [rw]

  

OnChange - event handler for a change to the menu

public

  FCompStyle: LongInt;

  

FCompStyle - local variable holding value of CompStyle

  constructor Create(); override;

  

Create - constructor for TMenu: creates menuitems and links, sets some defaults then calls inherited Create

  destructor Destroy; override;

  

Destroy - destructor for TMenu: frees items and links, then calls inherited Destroy

  procedure DestroyHandle; virtual;

  

DestroyHandle - method for destroying handle

  function FindItem();

  

FindItem - returns the menuitem corresponding to the supplied value or kind

  function GetHelpContext();

  function IsShortcut();

  

IsShortcut - returns True if the specified message key represents a shortcut

  function HandleAllocated;

  

HandleAllocated - returns True if a handle has been allocated

  function IsRightToLeft; virtual;

  

IsRightToLeft - returns True if Right to Left mode is being used (eg for Hebrew or Arabic languages)

  function UseRightToLeftAlignment; virtual;

  

UseRightToLeftAlignment - returns True if Right-Left alignment is being used

  function UseRightToLeftReading; virtual;

  

UseRightToLeftReading - returns True if reading from Right to Left

  procedure HandleNeeded;

  

HandleNeeded - method to signal that a handle is required

  function DispatchCommand();

  

DispatchCommand - returns True if the supplied command is a dispatch command

  property Handle: HMENU; [r]

  

Handle - the Operating System Handle for this Menu

  property Parent: TComponent; [rw]

  

The Parent component for this Menu

  property ShortcutHandled: Boolean; [rw]

  

ShortcutHandled - if True, the shortcut for the menu is properly handled

published

  property BidiMode: TBidiMode; [rws]

  

BidiMode - whether Bi-directional mode is implemented, allowing use with languages like Arabic or Hebrew

  property ParentBidiMode: Boolean; [rw]

  

ParentBidiMode - the BidiMode of the parent

  property Items: TMenuItem; [r]

  

Items - a list of Menu Items to be included in the menu display

  property Images: TCustomImageList; [rw]

  

Images - a list of images from which entries can be selected to illustrate menu choices

end;

Inheritance

TMenu

  

TMenu : The base class for all menus

|

TLCLComponent

  

TLCLComponent - base class for LCL components

|

TComponent,IUnknown,IInterfaceComponentReference

|

TPersistent

|

TObject

Description

TMenu : The base class for all menus

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

See also

HowToUseMenus

  

HowToUseMenus - hints for creating Menus for your Forms

TMainMenu

  

TMainMenu - the Main Menu that appears at the top of most windows

TPopupMenu

  

TPopupMenu - a menu panel that pops up on the desktop when the right mouse button is clicked

TMenuItem

  

TMenuItem - The base structure of each item in a Menu.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.