function TfmIDEMain.ListOpenFiles(FileList: TStrings): integer;
Var idx: Integer;
pnl: TLMDDockPanel;
PageType: TIDEPageType;
pInfo: TPageInfo;
begin
for idx := 0 to dsMain.PanelCount -1 do begin
pnl := dsMain.Panels[idx];
if pnl.ClientKind <> dkDocument then
Continue;
PageType := TIDEPageType(Pnl.Tag);
case PageType of
ptEditor: pInfo := TfmEditor(pnl.Controls[0]).PageInfo;///.FileName;
ptPDF: pInfo := TfmPDFPage(pnl.Controls[0]).PageInfo;//.FileName;
end;
if (Length(pInfo.FileName) > 0) and (Not AnsiContainsText(pInfo.Filename, 'untitled')) then
FileList.AddObject(pInfo.Filename, pointer(pInfo.Modified));
end;
Result := FileList.Count;
end;
As you can see I run through all the panels and if they are document panels save their filename.
How can I include floating panels in this list? I don't need their state because they will be reloaded as docked tabs on restarting.
Comments