/* flshow.cpp Файловая панель - вывод на экран */ /* Copyright (c) 1996 Eugene Roshal Copyright (c) 2000 Far Group All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The name of the authors may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "headers.hpp" #pragma hdrstop #include "filelist.hpp" #include "colors.hpp" #include "lang.hpp" #include "filefilter.hpp" #include "cmdline.hpp" #include "filepanels.hpp" #include "ctrlobj.hpp" #include "syslog.hpp" #include "interf.hpp" #include "config.hpp" #include "datetime.hpp" #include "pathmix.hpp" #include "strmix.hpp" #include "flink.hpp" extern PanelViewSettings ViewSettingsArray[]; extern int ColumnTypeWidth[]; static wchar_t OutCharacter[8]={0,0,0,0,0,0,0,0}; static int __FormatEndSelectedPhrase(int Count) { int M_Fmt=MListFileSize; if (Count != 1) { char StrItems[32]; _itoa(Count,StrItems,10); int LenItems=(int)strlen(StrItems); if (StrItems[LenItems-1] == '1' && Count != 11) M_Fmt=MListFilesSize1; else M_Fmt=MListFilesSize2; } return M_Fmt; } void FileList::DisplayObject() { Height=Y2-Y1-4+!Opt.ShowColumnTitles+(Opt.ShowPanelStatus ? 0:2); _OT(SysLog(L"[%p] FileList::DisplayObject()",this)); if (UpdateRequired) { UpdateRequired=FALSE; Update(UpdateRequiredMode); } ProcessPluginCommand(); ShowFileList(FALSE); } void FileList::ShowFileList(int Fast) { if (Locked()) { CorrectPosition(); return; } string strTitle; string strInfoCurDir; int Length; OpenPluginInfo Info; if (PanelMode==PLUGIN_PANEL) { if (ProcessPluginEvent(FE_REDRAW,NULL)) return; CtrlObject->Plugins.GetOpenPluginInfo(hPlugin,&Info); strInfoCurDir=Info.CurDir; } int CurFullScreen=IsFullScreen(); PrepareViewSettings(ViewMode,&Info); CorrectPosition(); if (CurFullScreen!=IsFullScreen()) { CtrlObject->Cp()->SetScreenPosition(); CtrlObject->Cp()->GetAnotherPanel(this)->Update(UPDATE_KEEP_SELECTION|UPDATE_SECONDARY); } SetScreen(X1+1,Y1+1,X2-1,Y2-1,L' ',COL_PANELTEXT); Box(X1,Y1,X2,Y2,COL_PANELBOX,DOUBLE_BOX); if (Opt.ShowColumnTitles) { // SetScreen(X1+1,Y1+1,X2-1,Y1+1,' ',COL_PANELTEXT); SetColor(COL_PANELTEXT); //??? //GotoXY(X1+1,Y1+1); //FS<=ViewSettings.ColumnCount-1) break; if (ViewSettings.ColumnWidth[I+1]<0) continue; SetColor(COL_PANELBOX); ColumnPos+=ViewSettings.ColumnWidth[I]; GotoXY(ColumnPos,Y1); BoxText(BoxSymbols[BS_T_H2V1]); if (Opt.ShowColumnTitles) { GotoXY(ColumnPos,Y1+1); BoxText(BoxSymbols[BS_V1]); } if (!Opt.ShowPanelStatus) { GotoXY(ColumnPos,Y2); BoxText(BoxSymbols[BS_B_H2V1]); } ColumnPos++; } int NextX1=X1+1; if (Opt.ShowSortMode) { static int SortModes[]={UNSORTED,BY_NAME,BY_EXT,BY_MTIME,BY_CTIME, BY_ATIME,BY_SIZE,BY_DIZ,BY_OWNER, BY_COMPRESSEDSIZE,BY_NUMLINKS, BY_NUMSTREAMS,BY_STREAMSSIZE }; static int SortStrings[]={MMenuUnsorted,MMenuSortByName, MMenuSortByExt,MMenuSortByModification,MMenuSortByCreation, MMenuSortByAccess,MMenuSortBySize,MMenuSortByDiz,MMenuSortByOwner, MMenuSortByCompressedSize,MMenuSortByNumLinks,MMenuSortByNumStreams,MMenuSortByStreamsSize }; for (size_t I=0; IIsEnabledOnPanel()) { OutCharacter[0]=L'*'; Text(OutCharacter); NextX1++; } } break; } } } /* <режимы сортировки> */ if (GetNumericSort() || GetSortGroups() || GetSelectedFirstMode()) { if (Opt.ShowColumnTitles) GotoXY(NextX1,Y1+1); else GotoXY(NextX1,Y1); SetColor(COL_PANELCOLUMNTITLE); wchar_t *PtrOutCharacter=OutCharacter; *PtrOutCharacter=0; if (GetSelectedFirstMode()) *PtrOutCharacter++=L'^'; /* if(GetNumericSort()) *PtrOutCharacter++=L'#'; if(GetSortGroups()) *PtrOutCharacter++=L'@'; */ *PtrOutCharacter=0; Text(OutCharacter); PtrOutCharacter[1]=0; } /* */ if (!Fast && GetFocus()) { if (PanelMode==PLUGIN_PANEL) CtrlObject->CmdLine->SetCurDir(Info.CurDir); else CtrlObject->CmdLine->SetCurDir(strCurDir); CtrlObject->CmdLine->Show(); } int TitleX2=Opt.Clock && !Opt.ShowMenuBar ? Min(ScrX-4,X2):X2; int TruncSize=TitleX2-X1-3; if (!Opt.ShowColumnTitles && Opt.ShowSortMode && Filter!=NULL && Filter->IsEnabledOnPanel()) TruncSize-=2; GetTitle(strTitle,TruncSize,2);//,(PanelMode==PLUGIN_PANEL?0:2)); Length=(int)strTitle.GetLength(); int ClockCorrection=FALSE; if ((Opt.Clock && !Opt.ShowMenuBar) && TitleX2==ScrX-4) { ClockCorrection=TRUE; TitleX2+=4; } int TitleX=X1+(TitleX2-X1+1-Length)/2; if (ClockCorrection) { int Overlap=TitleX+Length-TitleX2+5; if (Overlap>0) TitleX-=Overlap; } SetColor(Focus ? COL_PANELSELECTEDTITLE:COL_PANELTITLE); GotoXY(TitleX,Y1); Text(strTitle); if (FileCount==0) { SetScreen(X1+1,Y2-1,X2-1,Y2-1,L' ',COL_PANELTEXT); SetColor(COL_PANELTEXT); //??? //GotoXY(X1+1,Y2-1); //FS<0 && (Info.Flags & OPIF_REALNAMES)) { if (!strInfoCurDir.IsEmpty()) { strCurDir = strInfoCurDir; } else { if (!TestParentFolderName(ListData[CurFile]->strName)) { strCurDir=ListData[CurFile]->strName; size_t pos; if (FindLastSlash(pos,strCurDir)) { if (pos) { if (strCurDir.At(pos-1)!=L':') strCurDir.SetLength(pos); else strCurDir.SetLength(pos+1); } } } else { strCurDir = strOriginalCurDir; } } if (GetFocus()) { CtrlObject->CmdLine->SetCurDir(strCurDir); CtrlObject->CmdLine->Show(); } } if ((Opt.ShowPanelTotals || Opt.ShowPanelFree) && (Opt.ShowPanelStatus || SelFileCount==0)) { ShowTotalSize(Info); } ShowList(FALSE,0); ShowSelectedSize(); if (Opt.ShowPanelScrollbar) { SetColor(COL_PANELSCROLLBAR); ScrollBarEx(X2,Y1+1+Opt.ShowColumnTitles,Height,Round(CurTopFile,Columns),Round(FileCount,Columns)); } ShowScreensCount(); if (!ProcessingPluginCommand && LastCurFile!=CurFile) { LastCurFile=CurFile; UpdateViewPanel(); } if (PanelMode==PLUGIN_PANEL) CtrlObject->Cp()->RedrawKeyBar(); } int FileList::GetShowColor(int Position, int ColorType) { DWORD ColorAttr=COL_PANELTEXT; const DWORD FarColor[] = {COL_PANELTEXT,COL_PANELSELECTEDTEXT,COL_PANELCURSOR,COL_PANELSELECTEDCURSOR}; if (ListData && Position < FileCount) { int Pos = HIGHLIGHTCOLOR_NORMAL; if (CurFile==Position && Focus && FileCount > 0) { Pos=ListData[Position]->Selected?HIGHLIGHTCOLOR_SELECTEDUNDERCURSOR:HIGHLIGHTCOLOR_UNDERCURSOR; } else if (ListData[Position]->Selected) Pos = HIGHLIGHTCOLOR_SELECTED; ColorAttr=ListData[Position]->Colors.Color[ColorType][Pos]; if (!ColorAttr || !Opt.Highlight) ColorAttr=FarColor[Pos]; } return ColorAttr; } void FileList::SetShowColor(int Position, int ColorType) { SetColor(GetShowColor(Position,ColorType)); } void FileList::ShowSelectedSize() { int Length; string strSelStr, strFormStr; if (Opt.ShowPanelStatus) { SetColor(COL_PANELBOX); DrawSeparator(Y2-2); for (int I=0,ColumnPos=X1+1; I X2-X1-1) { InsertCommas(FreeDiskSize>>20,strFreeSize); InsertCommas(TotalFileSize>>20,strFormSize); strTotalStr.Format(L" %s %s (%d) %s %s %s ",(const wchar_t*)strFormSize,MSG(MListMb),TotalFileCount,DHLine,(const wchar_t*)strFreeSize,MSG(MListMb)); } } } else strTotalStr.Format(MSG(MListFreeSize), !strFreeSize.IsEmpty() ? (const wchar_t*)strFreeSize:L"???"); SetColor(COL_PANELTOTALINFO); /* $ 01.08.2001 VVM + Обрезаем строчку справа, а не слева */ TruncStrFromEnd(strTotalStr, X2-X1-1); Length=(int)strTotalStr.GetLength(); GotoXY(X1+(X2-X1+1-Length)/2,Y2); const wchar_t *FirstBox=wcschr(strTotalStr,BoxSymbols[BS_H2]); int BoxPos=(FirstBox==NULL) ? -1:(int)(FirstBox-(const wchar_t*)strTotalStr); int BoxLength=0; if (BoxPos!=-1) for (int I=0; strTotalStr.At(BoxPos+I)==BoxSymbols[BS_H2]; I++) BoxLength++; if (BoxPos==-1 || BoxLength==0) Text(strTotalStr); else { FS<MaxLength) { wmemcpy(lpwszDest,SrcName+SrcLength-MaxLength,MaxLength); strDest.ReleaseBuffer(MaxLength); return(TRUE); } const wchar_t *DotPtr; if (!ShowStatus && ((!(FileAttr&FILE_ATTRIBUTE_DIRECTORY) && ViewSettings.AlignExtensions) || ((FileAttr&FILE_ATTRIBUTE_DIRECTORY) && ViewSettings.FolderAlignExtensions)) && SrcLength<=MaxLength && (DotPtr=wcsrchr(SrcName,L'.'))!=NULL && DotPtr!=SrcName && (SrcName[0]!=L'.' || SrcName[2]!=0) && wcschr(DotPtr+1,L' ')==NULL) { int DotLength=StrLength(DotPtr+1); int NameLength=DotLength?(int)(DotPtr-SrcName):SrcLength; int DotPos=MaxLength-Max(DotLength,3); if (DotPos<=NameLength) DotPos=NameLength+1; if (DotPos>0 && NameLength>0 && SrcName[NameLength-1]==L' ') lpwszDest[NameLength]=L'.'; wmemcpy(lpwszDest,SrcName,NameLength); wmemcpy(lpwszDest+DotPos,DotPtr+1,DotLength); } else { wmemcpy(lpwszDest,SrcName,Min(SrcLength, MaxLength)); } strDest.ReleaseBuffer(MaxLength); return(SrcLength>MaxLength); } void FileList::PrepareViewSettings(int ViewMode,OpenPluginInfo *PlugInfo) { OpenPluginInfo Info={0}; if (PanelMode==PLUGIN_PANEL) { if (PlugInfo==NULL) CtrlObject->Plugins.GetOpenPluginInfo(hPlugin,&Info); else Info=*PlugInfo; } ViewSettings=ViewSettingsArray[ViewMode]; if (PanelMode==PLUGIN_PANEL) { if (Info.PanelModesArray!=NULL && ViewModeStatusColumnType,PanelView->StatusColumnWidth,PanelView->StatusColumnWidthType, PanelView->StatusColumnCount,PanelView->FullScreen); return(PrepareColumnWidths(PanelView->ColumnType,PanelView->ColumnWidth,PanelView->ColumnWidthType, PanelView->ColumnCount,PanelView->FullScreen)); } int FileList::PrepareColumnWidths(unsigned int *ColumnTypes,int *ColumnWidths, int *ColumnWidthsTypes,int &ColumnCount,int FullScreen) { int TotalWidth,TotalPercentWidth,TotalPercentCount,ZeroLengthCount,EmptyColumns,I; ZeroLengthCount=EmptyColumns=0; TotalWidth=ColumnCount-1; TotalPercentCount=TotalPercentWidth=0; for (I=0; I0) { int ExtraPercentWidth=(TotalPercentWidth>100 || ZeroLengthCount==0)?ExtraWidth:ExtraWidth*TotalPercentWidth/100; int TempWidth=0; for (I=0; I0; I++) if (ColumnWidthsTypes[I]==PERCENT_WIDTH) { int PercentWidth = (TotalPercentCount>1)?(ExtraPercentWidth*ColumnWidths[I]/TotalPercentWidth):(ExtraPercentWidth-TempWidth); if (PercentWidth<1) PercentWidth=1; TempWidth+=PercentWidth; ColumnWidths[I]=PercentWidth; ColumnWidthsTypes[I] = COUNT_WIDTH; TotalPercentCount--; } ExtraWidth-=TempWidth; } for (I=0; I0; I++) if (ColumnWidths[I]==0) { int AutoWidth=ExtraWidth/ZeroLengthCount; if (AutoWidth<1) AutoWidth=1; ColumnWidths[I]=AutoWidth; ExtraWidth-=AutoWidth; ZeroLengthCount--; } while (1) { int LastColumn=ColumnCount-1; TotalWidth=LastColumn-EmptyColumns; for (I=0; I0) TotalWidth+=ColumnWidths[I]; if (TotalWidth<=PanelTextWidth) break; if (ColumnCount<=1) { ColumnWidths[0]=PanelTextWidth; break; } else if (PanelTextWidth>=TotalWidth-ColumnWidths[LastColumn]) { ColumnWidths[LastColumn]=PanelTextWidth-(TotalWidth-ColumnWidths[LastColumn]); break; } else ColumnCount--; } ColumnsInGlobal = 1; int GlobalColumns=0; bool UnEqual; int Remainder; for (int i = 0; i < ViewSettings.ColumnCount; i++) { UnEqual = false; Remainder = ViewSettings.ColumnCount%ColumnsInGlobal; GlobalColumns = ViewSettings.ColumnCount/ColumnsInGlobal; if (!Remainder) { for (int k = 0; k < GlobalColumns-1; k++) { for (int j = 0; j < ColumnsInGlobal; j++) { if ((ViewSettings.ColumnType[k*ColumnsInGlobal+j] & 0xFF) != (ViewSettings.ColumnType[(k+1)*ColumnsInGlobal+j] & 0xFF)) UnEqual = true; } } if (!UnEqual) break; } ColumnsInGlobal++; } return(GlobalColumns); } extern void GetColor(int PaletteIndex); void FileList::ShowList(int ShowStatus,int StartColumn) { string strDateStr, strTimeStr; int StatusShown=FALSE; int MaxLeftPos=0,MinLeftPos=FALSE; int ColumnCount=ShowStatus ? ViewSettings.StatusColumnCount:ViewSettings.ColumnCount; for (int I=Y1+1+Opt.ShowColumnTitles,J=CurTopFile; I=CUSTOM_COLUMN0 && ColumnType<=CUSTOM_COLUMN9) { int ColumnNumber=ColumnType-CUSTOM_COLUMN0; const wchar_t *ColumnData=NULL; if (ColumnNumberCustomColumnNumber) ColumnData=ListData[ListPos]->CustomColumnData[ColumnNumber]; if (ColumnData==NULL) ColumnData=L""; int CurLeftPos=0; if (!ShowStatus && LeftPos>0) { int Length=StrLength(ColumnData); if (Length>ColumnWidth) { CurLeftPos=LeftPos; if (CurLeftPos>Length-ColumnWidth) CurLeftPos=Length-ColumnWidth; if (CurLeftPos>MaxLeftPos) MaxLeftPos=CurLeftPos; } } FS<2) { Text(ListData[ListPos]->Selected?L"\x221A ":L" "); Width-=2; } if (ListData[ListPos]->Colors.MarkChar && Opt.Highlight && Width>1) { Width--; OutCharacter[0]=(wchar_t)ListData[ListPos]->Colors.MarkChar; int OldColor=GetColor(); if (!ShowStatus) SetShowColor(ListPos,HIGHLIGHTCOLORTYPE_MARKCHAR); Text(OutCharacter); SetColor(OldColor); } const wchar_t *NamePtr = ShowShortNames && !ListData[ListPos]->strShortName.IsEmpty() && !ShowStatus ? ListData[ListPos]->strShortName:ListData[ListPos]->strName; const wchar_t *NameCopy = NamePtr; if (ViewFlags & COLUMN_NAMEONLY) { //BUGBUG!!! // !!! НЕ УВЕРЕН, но то, что отображается пустое // пространство вместо названия - бага NamePtr=PointToFolderNameIfFolder(NamePtr); } int CurLeftPos=0; int RightAlign=(ViewFlags & COLUMN_RIGHTALIGN); int LeftBracket=FALSE,RightBracket=FALSE; if (!ShowStatus && LeftPos!=0) { int Length = (int)wcslen(NamePtr); if (Length>Width) { if (LeftPos>0) { if (!RightAlign) { CurLeftPos=LeftPos; if (Length-CurLeftPosMaxLeftPos) MaxLeftPos=CurLeftPos; } } else if (RightAlign) { int CurRightPos=LeftPos; if (Length+CurRightPosFileAttr); if (CurLeftPos!=0) LeftBracket=TRUE; if (TooLong) { if (RightAlign) LeftBracket=TRUE; if (!RightAlign && StrLength(NamePtr)>Width) RightBracket=TRUE; } if (!ShowStatus) { if (!ShowShortNames && ViewSettings.FileUpperToLowerCase) if (!(ListData[ListPos]->FileAttr & FILE_ATTRIBUTE_DIRECTORY) && !IsCaseMixed(NameCopy)) strName.Lower(); if ((ShowShortNames || ViewSettings.FolderUpperCase) && (ListData[ListPos]->FileAttr & FILE_ATTRIBUTE_DIRECTORY)) strName.Upper(); if ((ShowShortNames || ViewSettings.FileLowerCase) && (ListData[ListPos]->FileAttr & FILE_ATTRIBUTE_DIRECTORY)==0) strName.Lower(); } Text(strName); int NameX=WhereX(); if (!ShowStatus) { if (LeftBracket) { GotoXY(CurX-1,CurY); if (Level == 1) SetColor(COL_PANELBOX); Text(openBracket); SetShowColor(J); } if (RightBracket) { if (Level == ColumnsInGlobal) SetColor(COL_PANELBOX); GotoXY(NameX,CurY); Text(closeBracket); ShowDivider=FALSE; if (Level == ColumnsInGlobal) SetColor(COL_PANELTEXT); else SetShowColor(J); } } } break; case SIZE_COLUMN: case PACKED_COLUMN: case STREAMSSIZE_COLUMN: { bool Packed=(ColumnType==PACKED_COLUMN); bool Streams=(ColumnType==STREAMSSIZE_COLUMN); string strStr; int Width=ColumnWidth; if (ListData[ListPos]->ShowFolderSize==2) { Width--; Text(L"~"); } if (!Streams && !Packed && (ListData[ListPos]->FileAttr & (FILE_ATTRIBUTE_DIRECTORY|FILE_ATTRIBUTE_REPARSE_POINT)) && !ListData[ListPos]->ShowFolderSize) { const wchar_t *PtrName=MSG(MListFolder); if (TestParentFolderName(ListData[ListPos]->strName)) PtrName=MSG(MListUp); else { if (ListData[ListPos]->FileAttr&FILE_ATTRIBUTE_REPARSE_POINT) { switch (ListData[ListPos]->ReparseTag) { case IO_REPARSE_TAG_SYMLINK: PtrName=MSG(MListSymLink); break; case IO_REPARSE_TAG_MOUNT_POINT: PtrName=MSG(ListData[ListPos]->VolMount?MListVolMount:MListJunction); break; } } } if (StrLength(PtrName) <= Width-2) strStr.Format(L"<%s>", PtrName); else strStr = PtrName; FS<PackSize:Streams?ListData[ListPos]->StreamsSize:ListData[ListPos]->UnpSize, Width,ColumnTypes[K]).CPtr()); } } break; case DATE_COLUMN: { string strOutStr; ConvertDate(ListData[ListPos]->WriteTime,strDateStr,strTimeStr,0,FALSE,FALSE,ColumnWidth>9); FS<WriteTime,strDateStr,strTimeStr,ColumnWidth); FS<CreationTime; break; case ADATE_COLUMN: FileTime=&ListData[ListPos]->AccessTime; break; default: //case MDATE_COLUMN: FileTime=&ListData[ListPos]->WriteTime; } int TextMonth=(ColumnTypes[K] & COLUMN_MONTH)!=0; int Brief=ColumnTypes[K] & COLUMN_BRIEF; int FullYear=FALSE; if (!Brief) { int CmpWidth=ColumnWidth-TextMonth; if (CmpWidth==15 || CmpWidth==16 || CmpWidth==18 || CmpWidth==19 || CmpWidth>21) FullYear=TRUE; } string strDateStr, strTimeStr; ConvertDate(*FileTime,strDateStr,strTimeStr,ColumnWidth-9,Brief,TextMonth,FullYear); string strOutStr=strDateStr+L" "+strTimeStr; FS<FileAttr & FILE_ATTRIBUTE_READONLY)?L'R':L' ', (ListData[ListPos]->FileAttr & FILE_ATTRIBUTE_SYSTEM)?L'S':L' ', (ListData[ListPos]->FileAttr & FILE_ATTRIBUTE_HIDDEN)?L'H':L' ', (ListData[ListPos]->FileAttr & FILE_ATTRIBUTE_ARCHIVE)?L'A':L' ', (ListData[ListPos]->FileAttr & FILE_ATTRIBUTE_REPARSE_POINT)?L'L':((ListData[ListPos]->FileAttr&FILE_ATTRIBUTE_SPARSE_FILE)?L'$':L' '), // $ 20.10.2000 SVS - Encrypted NTFS - Поток может быть либо COMPRESSED (С) либо ENCRYPTED (E) (ListData[ListPos]->FileAttr & FILE_ATTRIBUTE_COMPRESSED)?L'C':((ListData[ListPos]->FileAttr&FILE_ATTRIBUTE_ENCRYPTED)?L'E':L' '), (ListData[ListPos]->FileAttr & FILE_ATTRIBUTE_TEMPORARY)?L'T':L' ', (ListData[ListPos]->FileAttr & FILE_ATTRIBUTE_NOT_CONTENT_INDEXED)?L'I':L' ', (ListData[ListPos]->FileAttr & FILE_ATTRIBUTE_OFFLINE)?L'O':L' ', (ListData[ListPos]->FileAttr & FILE_ATTRIBUTE_VIRTUAL)?L'V':L' ', L'\0', }; FS<0) { int Length=ListData[ListPos]->DizText ? StrLength(ListData[ListPos]->DizText):0; if (Length>ColumnWidth) { CurLeftPos=LeftPos; if (CurLeftPos>Length-ColumnWidth) CurLeftPos=Length-ColumnWidth; if (CurLeftPos>MaxLeftPos) MaxLeftPos=CurLeftPos; } } string strDizText=ListData[ListPos]->DizText ? ListData[ListPos]->DizText+CurLeftPos:L""; size_t pos; if (strDizText.Pos(pos,L'\4')) strDizText.SetLength(pos); FS<strOwner; if (Owner && !(ColumnTypes[K]&COLUMN_FULLOWNER) && PanelMode!=PLUGIN_PANEL) { const wchar_t* SlashPos=FirstSlash(Owner); if (SlashPos) Owner=SlashPos+1; } else if(IsSlash(*Owner)) { Owner++; } int CurLeftPos=0; if (!ShowStatus && LeftPos>0) { int Length=StrLength(Owner); if (Length>ColumnWidth) { CurLeftPos=LeftPos; if (CurLeftPos>Length-ColumnWidth) CurLeftPos=Length-ColumnWidth; if (CurLeftPos>MaxLeftPos) MaxLeftPos=CurLeftPos; } } FS<NumberOfLinks; } break; case NUMSTREAMS_COLUMN: { FS<NumberOfStreams; } break; } } } else { FS<0) LeftPos=MaxLeftPos; } } int FileList::IsFullScreen() { return this->ViewSettings.FullScreen; } int FileList::IsModeFullScreen(int Mode) { return(ViewSettingsArray[Mode].FullScreen); } int FileList::IsDizDisplayed() { return(IsColumnDisplayed(DIZ_COLUMN)); } int FileList::IsColumnDisplayed(int Type) { for (int i=0; i