mirror of https://gitlab.com/basile.b/dexed.git
windows menu sorted
This commit is contained in:
parent
a151020a41
commit
875a41d01f
|
@ -447,6 +447,7 @@ begin
|
|||
fWidgList.addWidget(@fTodolWidg);
|
||||
fWidgList.addWidget(@fOptEdWidg);
|
||||
fWidgList.addWidget(@fSymlWidg);
|
||||
fWidgList.sort(@CompareWidgCaption);
|
||||
|
||||
{$IFDEF WIN32}
|
||||
fWidgList.addWidget(@fCdbWidg);
|
||||
|
|
|
@ -100,6 +100,8 @@ type
|
|||
property widget[index: integer]: TCEWidget read getWidget;
|
||||
end;
|
||||
|
||||
|
||||
|
||||
TWidgetEnumerator = class
|
||||
fList: TCEWidgetList;
|
||||
fIndex: Integer;
|
||||
|
@ -110,6 +112,8 @@ type
|
|||
|
||||
operator enumerator(aWidgetList: TCEWidgetList): TWidgetEnumerator;
|
||||
|
||||
function CompareWidgCaption(Item1, Item2: Pointer): Integer;
|
||||
|
||||
implementation
|
||||
{$R *.lfm}
|
||||
|
||||
|
@ -304,6 +308,13 @@ end;
|
|||
{$ENDREGION}
|
||||
|
||||
{$REGION TCEWidgetList----------------------------------------------------------}
|
||||
function CompareWidgCaption(Item1, Item2: Pointer): Integer;
|
||||
type
|
||||
PWidg = ^TCEWidget;
|
||||
begin
|
||||
result := AnsiCompareStr(PWidg(Item1)^.Caption, PWidg(Item2)^.Caption);
|
||||
end;
|
||||
|
||||
function TCEWidgetList.getWidget(index: integer): TCEWidget;
|
||||
begin
|
||||
result := PTCEWidget(Items[index])^;
|
||||
|
|
Loading…
Reference in New Issue