3 #ifndef __VIEW_SETTINGS_H
\r
4 #define __VIEW_SETTINGS_H
\r
6 #include "Common/MyString.h"
\r
7 #include "Common/Types.h"
\r
16 inline bool operator==(const CColumnInfo &a1, const CColumnInfo &a2)
\r
18 return (a1.PropID == a2.PropID) &&
\r
19 (a1.IsVisible == a2.IsVisible) && (a1.Width == a2.Width);
\r
22 inline bool operator!=(const CColumnInfo &a1, const CColumnInfo &a2)
\r
27 struct CListViewInfo
\r
29 CObjectVector<CColumnInfo> Columns;
\r
40 int FindColumnWithID(PROPID propID) const
\r
42 for (int i = 0; i < Columns.Size(); i++)
\r
43 if (Columns[i].PropID == propID)
\r
48 bool IsEqual(const CListViewInfo &info) const
\r
50 if (Columns.Size() != info.Columns.Size() ||
\r
51 // SortIndex != info.SortIndex ||
\r
52 SortID != info.SortID ||
\r
53 Ascending != info.Ascending)
\r
55 for (int i = 0; i < Columns.Size(); i++)
\r
56 if (Columns[i] != info.Columns[i])
\r
62 void SaveListViewInfo(const UString &id, const CListViewInfo &viewInfo);
\r
63 void ReadListViewInfo(const UString &id, CListViewInfo &viewInfo);
\r
65 void SaveWindowSize(const RECT &rect, bool maximized);
\r
66 bool ReadWindowSize(RECT &rect, bool &maximized);
\r
68 void SavePanelsInfo(UInt32 numPanels, UInt32 currentPanel, UInt32 splitterPos);
\r
69 bool ReadPanelsInfo(UInt32 &numPanels, UInt32 ¤tPanel, UInt32 &splitterPos);
\r
71 void SaveToolbarsMask(UInt32 toolbarMask);
\r
72 UInt32 ReadToolbarsMask();
\r
74 void SavePanelPath(UInt32 panel, const UString &path);
\r
75 bool ReadPanelPath(UInt32 panel, UString &path);
\r
80 void Init() { Panels[0] = Panels[1] = 3; }
\r
81 CListMode() { Init(); }
\r
84 void SaveListMode(const CListMode &listMode);
\r
85 void ReadListMode(CListMode &listMode);
\r
87 void SaveFolderHistory(const UStringVector &folders);
\r
88 void ReadFolderHistory(UStringVector &folders);
\r
90 void SaveFastFolders(const UStringVector &folders);
\r
91 void ReadFastFolders(UStringVector &folders);
\r
93 void SaveCopyHistory(const UStringVector &folders);
\r
94 void ReadCopyHistory(UStringVector &folders);
\r
96 void AddUniqueStringToHeadOfList(UStringVector &list, const UString &s);
\r