diff --git a/docs/xml/lcl/menus.xml b/docs/xml/lcl/menus.xml
index 0127c7410e..efc04dfb67 100644
--- a/docs/xml/lcl/menus.xml
+++ b/docs/xml/lcl/menus.xml
@@ -90,10 +90,14 @@
TMenuActionLink: defines the link between a selected menu item and its corresponding action. Properties are protected and not readily accessible by application programmers.
+ TMenuActionLink
+: defines the link between a selected menu item and its corresponding action. Properties are protected and not readily accessible by application programmers. TMenuItem - The base structure of each item in a Menu.
+ TMenuItem
+ - The base structure of each item in a Menu. This Component does the hard work of processing the Items found in the various types of menus. It defines a lot of the properties and methods used in the various sorts of menu, including TMainMenu, TMenu and TPopUpMenu ShortCut - the quick key sequence to be used in selecting this menu item
+ ShortCut
+ - the quick key sequence to be used in selecting this menu item 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. TMenu: The base class for all menus
+ 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 TMainMenu - the Main Menu that appears at the top of most windows; form designers can
+
+ TMainMenu
+ - the Main Menu that appears at the top of most windows; form designers can
customise by choosing various menu items. Main Menu is a non-visible component : that is, if the icon is selected from the Component Pallete 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. To see the Menu Editor, right-click on the Main Menu icon on your Form.
TPopupMenu: a menu panel that pops up on the desktop when the right mouse button is clicked.
++ TPopupMenu +: a menu panel that pops up on the desktop when the right mouse button is clicked.
Inherits all the properties of TMenu (including the properties of TMenuItem), but has some new properties (procedure PopUp and procedure Close) that define its behaviour when actually invoked.
PopupPoint defines the position of the Popup menu, usually at the current cursor position.
To use a Popup menu, first create it with the MenuEditor. Then with the Object Inspector for the control that needs to use the Popup, select the property named PopupMenu, and a listbox will appear with the names of the available Menus - choose the Popup name you want
@@ -1653,7 +1969,9 @@ customise by choosing various menu items.HowToUseMenus - hints for creating Menus for your Forms
-TMainMenu is the Main Menu that appears at the top of most forms; form designers can +
+ HowToUseMenus + - hints for creating Menus for your Forms
++ TMainMenu + is the Main Menu that appears at the top of most forms; form designers can customise by choosing various menu items. TPopupMenu 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
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. Popup 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.
To see the Menu Editor, right-click on the Main Menu or Popup Menu icon on your Form. A pop-up box appears, that invites you to enter items into the Menu bar.
diff --git a/ide/fpdoceditwindow.pas b/ide/fpdoceditwindow.pas index 1b20993bea..4db87c87fa 100644 --- a/ide/fpdoceditwindow.pas +++ b/ide/fpdoceditwindow.pas @@ -47,15 +47,15 @@ uses IDEProcs, LazarusIDEStrConsts, FPDocSelectInherited, CodeHelp; type - TLazDocFormFlag = ( - ldffWriting, - ldffChainNeedsUpdate, - ldffCaptionNeedsUpdate, - ldffValueControlsNeedsUpdate, - ldffInheritedControlsNeedsUpdate, - ldffLinkIDComboNeedsUpdate + TFPDocEditorFlag = ( + fpdefWriting, + fpdefChainNeedsUpdate, + fpdefCaptionNeedsUpdate, + fpdefValueControlsNeedsUpdate, + fpdefInheritedControlsNeedsUpdate, + fpdefLinkIDComboNeedsUpdate ); - TLazDocFormFlags = set of TLazDocFormFlag; + TFPDocEditorFlags = set of TFPDocEditorFlag; { TFPDocEditor } @@ -109,7 +109,7 @@ type private FCaretXY: TPoint; FModified: Boolean; - FFlags: TLazDocFormFlags; + FFlags: TFPDocEditorFlags; fUpdateLock: Integer; fSourceFilename: string; fChain: TCodeHelpElementChain; @@ -140,7 +140,7 @@ type public procedure Reset; procedure InvalidateChain; - procedure UpdateLazDoc(const SrcFilename: string; const Caret: TPoint); + procedure UpdateFPDocEditor(const SrcFilename: string; const Caret: TPoint); procedure BeginUpdate; procedure EndUpdate; procedure ClearEntry(DoSave: Boolean); @@ -187,10 +187,10 @@ var sl: TStringList; begin if fUpdateLock>0 then begin - Include(FFLags,ldffLinkIDComboNeedsUpdate); + Include(FFLags,fpdefLinkIDComboNeedsUpdate); exit; end; - Exclude(FFLags,ldffLinkIDComboNeedsUpdate); + Exclude(FFLags,fpdefLinkIDComboNeedsUpdate); {$IFDEF VerboseCodeHelp} DebugLn(['TFPDocEditForm.UpdateLinkIdComboBox START']); @@ -341,15 +341,15 @@ end; procedure TFPDocEditor.ApplicationIdle(Sender: TObject; var Done: Boolean); begin Done:=false; - if ldffChainNeedsUpdate in FFlags then + if fpdefChainNeedsUpdate in FFlags then UpdateChain - else if ldffCaptionNeedsUpdate in FFlags then + else if fpdefCaptionNeedsUpdate in FFlags then UpdateCaption - else if ldffValueControlsNeedsUpdate in FFlags then + else if fpdefValueControlsNeedsUpdate in FFlags then UpdateValueControls - else if ldffInheritedControlsNeedsUpdate in FFlags then + else if fpdefInheritedControlsNeedsUpdate in FFlags then UpdateInheritedControls - else if ldffLinkIDComboNeedsUpdate in FFlags then + else if fpdefLinkIDComboNeedsUpdate in FFlags then UpdateLinkIdComboBox else Done:=true; @@ -457,10 +457,10 @@ var strCaption: String; begin if fUpdateLock>0 then begin - Include(FFlags,ldffCaptionNeedsUpdate); + Include(FFlags,fpdefCaptionNeedsUpdate); exit; end; - Exclude(FFlags,ldffCaptionNeedsUpdate); + Exclude(FFlags,fpdefCaptionNeedsUpdate); {$IFDEF VerboseCodeHelp} DebugLn(['TFPDocEditForm.UpdateCaption START']); @@ -486,10 +486,10 @@ var Element: TCodeHelpElement; begin if fUpdateLock>0 then begin - Include(FFLags,ldffValueControlsNeedsUpdate); + Include(FFLags,fpdefValueControlsNeedsUpdate); exit; end; - Exclude(FFLags,ldffValueControlsNeedsUpdate); + Exclude(FFLags,fpdefValueControlsNeedsUpdate); {$IFDEF VerboseCodeHelp} DebugLn(['TFPDocEditForm.UpdateValueControls START']); @@ -508,10 +508,10 @@ var ShortDescr: String; begin if fUpdateLock>0 then begin - Include(FFLags,ldffInheritedControlsNeedsUpdate); + Include(FFLags,fpdefInheritedControlsNeedsUpdate); exit; end; - Exclude(FFLags,ldffInheritedControlsNeedsUpdate); + Exclude(FFLags,fpdefInheritedControlsNeedsUpdate); {$IFDEF VerboseCodeHelp} DebugLn(['TFPDocEditForm.UpdateInheritedControls START']); @@ -544,10 +544,10 @@ var begin FreeAndNil(fChain); if fUpdateLock>0 then begin - Include(FFLags,ldffChainNeedsUpdate); + Include(FFLags,fpdefChainNeedsUpdate); exit; end; - Exclude(FFLags,ldffChainNeedsUpdate); + Exclude(FFLags,fpdefChainNeedsUpdate); if (fSourceFilename='') or (CaretXY.X<1) or (CaretXY.Y<1) then exit; @@ -569,7 +569,7 @@ begin case LDResult of chprParsing: begin - Include(FFLags,ldffChainNeedsUpdate); + Include(FFLags,fpdefChainNeedsUpdate); DebugLn(['TFPDocEditForm.UpdateChain ToDo: still parsing LazDocBoss.GetElementChain for ',fSourceFilename,' ',dbgs(CaretXY)]); exit; end; @@ -590,7 +590,7 @@ end; procedure TFPDocEditor.OnLazDocChanging(Sender: TObject; LazDocFPFile: TLazFPDocFile); begin - if ldffWriting in FFlags then exit; + if fpdefWriting in FFlags then exit; if (fChain<>nil) and (fChain.IndexOfFile(LazDocFPFile)>=0) then InvalidateChain; end; @@ -598,7 +598,7 @@ end; procedure TFPDocEditor.OnLazDocChanged(Sender: TObject; LazDocFPFile: TLazFPDocFile); begin - if ldffWriting in FFlags then exit; + if fpdefWriting in FFlags then exit; end; @@ -666,12 +666,12 @@ begin DebugLn(['TFPDocEditForm.CreateElement ']); if (Element=nil) or (Element.ElementName='') then exit(false); NewElement:=nil; - Include(FFlags,ldffWriting); + Include(FFlags,fpdefWriting); try Result:=CodeHelpBoss.CreateElement(Element.CodeXYPos.Code, Element.CodeXYPos.X,Element.CodeXYPos.Y,NewElement); finally - Exclude(FFlags,ldffWriting); + Exclude(FFlags,fpdefWriting); NewElement.Free; end; Reset; @@ -698,12 +698,12 @@ end; procedure TFPDocEditor.InvalidateChain; begin FreeAndNil(fChain); - FFlags:=FFlags+[ldffChainNeedsUpdate,ldffCaptionNeedsUpdate, - ldffValueControlsNeedsUpdate,ldffInheritedControlsNeedsUpdate, - ldffLinkIDComboNeedsUpdate]; + FFlags:=FFlags+[fpdefChainNeedsUpdate,fpdefCaptionNeedsUpdate, + fpdefValueControlsNeedsUpdate,fpdefInheritedControlsNeedsUpdate, + fpdefLinkIDComboNeedsUpdate]; end; -procedure TFPDocEditor.UpdateLazDoc(const SrcFilename: string; +procedure TFPDocEditor.UpdateFPDocEditor(const SrcFilename: string; const Caret: TPoint); var NewSrcFilename: String; @@ -735,7 +735,7 @@ begin dec(fUpdateLock); if fUpdateLock<0 then RaiseGDBException(''); if fUpdateLock=0 then begin - if ldffCaptionNeedsUpdate in FFlags then UpdateCaption; + if fpdefCaptionNeedsUpdate in FFlags then UpdateCaption; end; end; @@ -883,7 +883,7 @@ var begin Result:=false; - if ldffWriting in FFlags then begin + if fpdefWriting in FFlags then begin DebugLn(['TFPDocEditForm.WriteNode inconsistency detected: recursive write']); exit; end; @@ -907,7 +907,7 @@ begin Exit; end; - Include(FFlags,ldffWriting); + Include(FFlags,fpdefWriting); try CurDocFile.BeginUpdate; @@ -920,7 +920,7 @@ begin finally CurDocFile.EndUpdate; fChain.MakeValid; - Exclude(FFlags,ldffWriting); + Exclude(FFlags,fpdefWriting); end; if CodeHelpBoss.SaveFPDocFile(CurDocFile)<>mrOk then begin diff --git a/ide/uniteditor.pp b/ide/uniteditor.pp index fb4c1a800d..e5cc87786b 100644 --- a/ide/uniteditor.pp +++ b/ide/uniteditor.pp @@ -3113,7 +3113,7 @@ begin SrcEdit:=GetActiveSE; if SrcEdit=nil then exit; CaretPos := SrcEdit.EditorComponent.CaretXY; - FPDocEditor.UpdateLazDoc(SrcEdit.Filename,CaretPos); + FPDocEditor.UpdateFPDocEditor(SrcEdit.Filename,CaretPos); end; function TSourceNotebook.OnSynCompletionPaintItem(const AKey: string;