mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-10 23:28:41 +02:00
lcl: cleanup + formatting
git-svn-id: trunk@24178 -
This commit is contained in:
parent
6c66216a8c
commit
c24efa3adf
@ -147,15 +147,9 @@ end;
|
||||
Creates the handle ( = object).
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TMenu.CreateHandle;
|
||||
var
|
||||
i: integer;
|
||||
begin
|
||||
FItems.Handle := TWSMenuClass(WidgetSetClass).CreateHandle(Self);
|
||||
// initiate creation of subitems
|
||||
// Note: FItems is a TMenuItem. Using HandleNeeded will create all subitems.
|
||||
for i := 0 to Items.Count - 1 do
|
||||
if Items[i].Visible then
|
||||
Items[i].HandleNeeded;
|
||||
FItems.CheckChildrenHandles;
|
||||
end;
|
||||
|
||||
procedure TMenu.DestroyHandle;
|
||||
|
@ -50,8 +50,8 @@ uses
|
||||
|
||||
type
|
||||
TMenu = class;
|
||||
EMenuError = class(Exception);
|
||||
TMenuItem = class;
|
||||
EMenuError = class(Exception);
|
||||
|
||||
TGlyphShowMode = (
|
||||
gsmAlways, // always show
|
||||
@ -228,8 +228,6 @@ type
|
||||
function IndexOf(Item: TMenuItem): Integer;
|
||||
function IndexOfCaption(const ACaption: string): Integer; virtual;
|
||||
function VisibleIndexOf(Item: TMenuItem): Integer;
|
||||
function IsCheckItem: boolean; virtual;
|
||||
function IsLine: Boolean;
|
||||
procedure Add(Item: TMenuItem);
|
||||
procedure AddSeparator;
|
||||
procedure Click; virtual;
|
||||
@ -238,6 +236,8 @@ type
|
||||
procedure Insert(Index: Integer; Item: TMenuItem);
|
||||
procedure RecreateHandle; virtual;
|
||||
procedure Remove(Item: TMenuItem);
|
||||
function IsCheckItem: boolean; virtual;
|
||||
function IsLine: Boolean;
|
||||
function IsInMenuBar: boolean; virtual;
|
||||
procedure Clear;
|
||||
function HasBitmap: boolean;
|
||||
|
Loading…
Reference in New Issue
Block a user