This commit is contained in:
Igor Pavlov
2005-05-30 00:00:00 +00:00
committed by Kornel Lesiński
parent 8c1b5c7b7e
commit 3c510ba80b
926 changed files with 40559 additions and 23519 deletions

View File

@@ -1,7 +1,5 @@
// Panel.h
#pragma once
#ifndef __PANEL_H
#define __PANEL_H
@@ -54,7 +52,7 @@ struct CItemProperty
VARTYPE Type;
int Order;
bool IsVisible;
UINT32 Width;
UInt32 Width;
};
inline bool operator<(const CItemProperty &a1, const CItemProperty &a2)
@@ -133,6 +131,14 @@ public:
LRESULT OnMessage(UINT message, WPARAM wParam, LPARAM lParam);
};
struct CSelectedState
{
int FocusedItem;
UString FocusedName;
UStringVector SelectedNames;
CSelectedState(): FocusedItem(-1) {}
};
class CPanel:public NWindows::NControl::CWindow2
{
HWND _mainWindow;
@@ -170,6 +176,8 @@ public:
void CreateFolder();
void CreateFile();
// void Split();
private:
void ChangeWindowSize(int xSize, int ySize);
@@ -194,7 +202,7 @@ public:
void InvertSelection();
private:
CSysString GetFileType(UINT32 index);
CSysString GetFileType(UInt32 index);
LRESULT SetItemText(LVITEM &item);
// CRecordVector<PROPID> m_ColumnsPropIDs;
@@ -210,13 +218,14 @@ public:
bool _lastFocusedIsList;
// NWindows::NControl::CStatusBar _statusBar2;
DWORD _exStyle;
bool _showDots;
bool _showRealFileIcons;
// bool _virtualMode;
CBoolVector _selectedStatusVector;
CUIntVector _realIndices;
UINT32 GetRealIndex(const LVITEM &item) const
UInt32 GetRealIndex(const LVITEM &item) const
{
/*
if (_virtualMode)
@@ -236,7 +245,9 @@ public:
return param;
}
UINT32 _ListViewMode;
UInt32 _ListViewMode;
int _xSize;
UString _currentFolderPrefix;
@@ -248,11 +259,13 @@ public:
UStringVector _fastFolders;
void GetSelectedNames(UStringVector &selectedNames);
void SaveSelectedState(CSelectedState &s);
void RefreshListCtrl(const CSelectedState &s);
void RefreshListCtrlSaveFocused();
UString GetItemName(int itemIndex) const;
bool IsItemFolder(int itemIndex) const;
UINT64 GetItemSize(int itemIndex) const;
UInt64 GetItemSize(int itemIndex) const;
////////////////////////
// PanelFolderChange.cpp
@@ -274,7 +287,7 @@ public:
LRESULT Create(HWND mainWindow, HWND parentWindow,
UINT id, int xPos,
UINT id,
const UString &currentFolderPrefix,
CPanelCallback *panelCallback,
CAppState *appState);
@@ -287,13 +300,25 @@ public:
CPanel() :
// _virtualMode(flase),
_exStyle(0),
_showDots(false),
_showRealFileIcons(false),
_needSaveInfo(false),
_startGroupSelect(0),
_selectionIsDefined(false)
_selectionIsDefined(false),
_ListViewMode(3),
_xSize(300)
{}
void SetExtendedStyle()
{
// DWORD extendedStyle = _listView.GetExtendedListViewStyle();
if (_listView != 0)
_listView.SetExtendedListViewStyle(_exStyle);
// extendedStyle |= _exStyle;
}
bool _needSaveInfo;
CSysString _typeIDString;
CListViewInfo _listViewInfo;
@@ -316,13 +341,13 @@ public:
CMyComPtr<IContextMenu> _sevenZipContextMenu;
CMyComPtr<IContextMenu> _systemContextMenu;
void CreateShellContextMenu(
const CRecordVector<UINT32> &operatedIndices,
const CRecordVector<UInt32> &operatedIndices,
CMyComPtr<IContextMenu> &systemContextMenu);
void CreateSystemMenu(HMENU menu,
const CRecordVector<UINT32> &operatedIndices,
const CRecordVector<UInt32> &operatedIndices,
CMyComPtr<IContextMenu> &systemContextMenu);
void CreateSevenZipMenu(HMENU menu,
const CRecordVector<UINT32> &operatedIndices,
const CRecordVector<UInt32> &operatedIndices,
CMyComPtr<IContextMenu> &sevenZipContextMenu);
void CreateFileMenu(HMENU menu,
CMyComPtr<IContextMenu> &sevenZipContextMenu,
@@ -348,8 +373,8 @@ public:
// void SortItems(int index);
void SortItemsWithPropID(PROPID propID);
void GetSelectedItemsIndices(CRecordVector<UINT32> &indices) const;
void GetOperatedItemIndices(CRecordVector<UINT32> &indices) const;
void GetSelectedItemsIndices(CRecordVector<UInt32> &indices) const;
void GetOperatedItemIndices(CRecordVector<UInt32> &indices) const;
void KillSelection();
UString GetFolderTypeID() const;
@@ -422,8 +447,8 @@ public:
void RenameFile();
void ChangeComment();
void SetListViewMode(UINT32 index);
UINT32 GetListViewMode() { return _ListViewMode; };
void SetListViewMode(UInt32 index);
UInt32 GetListViewMode() const { return _ListViewMode; };
void RefreshStatusBar();
void OnRefreshStatusBar();
@@ -431,8 +456,8 @@ public:
void CompressDropFiles(HDROP dr);
void AddToArchive();
void ExtractArchive();
void TestArchive();
void ExtractArchives();
void TestArchives();
};
#endif