mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 22:59:56 +02:00
win32: formatting
git-svn-id: trunk@14514 -
This commit is contained in:
parent
ca471418bc
commit
5cbad91fbf
@ -588,7 +588,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TriggerFormUpdate(const AMenuItem: TMenuItem);
|
procedure TriggerFormUpdate(const AMenuItem: TMenuItem);
|
||||||
var
|
var
|
||||||
lMenu: TMenu;
|
lMenu: TMenu;
|
||||||
@ -678,13 +677,18 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
with MenuInfo do begin
|
with MenuInfo do
|
||||||
|
begin
|
||||||
cbsize := menuiteminfosize;
|
cbsize := menuiteminfosize;
|
||||||
if AMenuItem.Enabled then fState:=MFS_ENABLED else fstate:=MFS_GRAYED;
|
if AMenuItem.Enabled then
|
||||||
if AMenuItem.Checked then fState:=fState or MFS_CHECKED;
|
fState := MFS_ENABLED
|
||||||
fMask:=MIIM_ID or MIIM_DATA or MIIM_STATE or MIIM_TYPE;
|
else
|
||||||
wID:=AMenuItem.Command; {value may only be 16 bit wide!}
|
fstate := MFS_GRAYED;
|
||||||
dwItemData:=PtrInt(AMenuItem);
|
if AMenuItem.Checked then
|
||||||
|
fState := fState or MFS_CHECKED;
|
||||||
|
fMask := MIIM_ID or MIIM_DATA or MIIM_STATE or MIIM_TYPE;
|
||||||
|
wID := AMenuItem.Command; {value may only be 16 bit wide!}
|
||||||
|
dwItemData := PtrInt(AMenuItem);
|
||||||
if (AMenuItem.Count > 0) then
|
if (AMenuItem.Count > 0) then
|
||||||
begin
|
begin
|
||||||
fMask := fMask or MIIM_SUBMENU;
|
fMask := fMask or MIIM_SUBMENU;
|
||||||
@ -699,14 +703,17 @@ begin
|
|||||||
fState:=fState or MFS_DISABLED;
|
fState:=fState or MFS_DISABLED;
|
||||||
end;
|
end;
|
||||||
dwTypeData := PChar(AMenuItem);
|
dwTypeData := PChar(AMenuItem);
|
||||||
if AMenuItem.RadioItem then fType := fType or MFT_RADIOCHECK;
|
if AMenuItem.RadioItem then
|
||||||
|
fType := fType or MFT_RADIOCHECK;
|
||||||
if (AMenuItem.GetIsRightToLeft) then
|
if (AMenuItem.GetIsRightToLeft) then
|
||||||
begin
|
begin
|
||||||
fType := fType or MFT_RIGHTORDER;
|
fType := fType or MFT_RIGHTORDER;
|
||||||
//Reverse the RIGHTJUSTIFY to be left
|
//Reverse the RIGHTJUSTIFY to be left
|
||||||
if not AMenuItem.RightJustify then fType := fType or MFT_RIGHTJUSTIFY;
|
if not AMenuItem.RightJustify then fType := fType or MFT_RIGHTJUSTIFY;
|
||||||
end
|
end
|
||||||
else if AMenuItem.RightJustify then fType := fType or MFT_RIGHTJUSTIFY;
|
else
|
||||||
|
if AMenuItem.RightJustify then
|
||||||
|
fType := fType or MFT_RIGHTJUSTIFY;
|
||||||
end;
|
end;
|
||||||
if dword(InsertMenuItem(ParentMenuHandle,
|
if dword(InsertMenuItem(ParentMenuHandle,
|
||||||
AMenuItem.Parent.VisibleIndexOf(AMenuItem), true, @MenuInfo)) = 0 then
|
AMenuItem.Parent.VisibleIndexOf(AMenuItem), true, @MenuInfo)) = 0 then
|
||||||
@ -806,7 +813,7 @@ begin
|
|||||||
AppHandle := TWin32WidgetSet(WidgetSet).AppHandle;
|
AppHandle := TWin32WidgetSet(WidgetSet).AppHandle;
|
||||||
GetWindowInfo(AppHandle)^.PopupMenu := APopupMenu;
|
GetWindowInfo(AppHandle)^.PopupMenu := APopupMenu;
|
||||||
TrackPopupMenuEx(MenuHandle, lAlign[APopupMenu.IsRightToLeft] or TPM_LEFTBUTTON or TPM_RIGHTBUTTON,
|
TrackPopupMenuEx(MenuHandle, lAlign[APopupMenu.IsRightToLeft] or TPM_LEFTBUTTON or TPM_RIGHTBUTTON,
|
||||||
X, Y, AppHandle, Nil);
|
X, Y, AppHandle, nil);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
|
Loading…
Reference in New Issue
Block a user