1 /////////////////////////////////////////////////////////////////////////////
2 // WinMerge: an interactive diff/merge utility
3 // Copyright (C) 1997 Dean P. Grimm
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 2 of the License, or
8 // (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 /////////////////////////////////////////////////////////////////////////////
23 * @brief Declaration of class CDirView
27 /////////////////////////////////////////////////////////////////////////////
32 #include "OptionsDiffColors.h"
33 #include "SortHeaderCtrl.h"
34 #include "UnicodeString.h"
36 class FileActionScript;
40 typedef enum { eMain, eContext } eMenuType;
41 typedef enum { SELECTIONTYPE_NORMAL, SELECTIONTYPE_LEFT1LEFT2, SELECTIONTYPE_RIGHT1RIGHT2, SELECTIONTYPE_LEFT1RIGHT2, SELECTIONTYPE_LEFT2RIGHT1} SELECTIONTYPE;
48 class DirCompProgressBar;
51 class CLoadSaveCodepageDlg;
52 class CShellContextMenu;
55 struct ViewCustomFlags
59 // We use extra bits so that no valid values are 0
60 // and each set of flags is in a different hex digit
61 // to make debugging easier
62 // These can always be packed down in the future
64 VISIBILITY = 0x3, VISIBLE = 0x1, HIDDEN = 0x2, EXPANDED = 0x4
68 typedef std::map<String, bool> DirViewTreeState;
71 * @brief Position value for special items (..) in directory compare view.
73 const uintptr_t SPECIAL_ITEM_POS = (uintptr_t) - 1L;
75 /** Default column width in directory compare */
76 const UINT DefColumnWidth = 150;
79 * @brief Directory compare results view.
81 * Directory compare view is list-view based, so it shows one result (for
82 * folder or file, commonly called as 'item') in one line. User can select
83 * visible columns, re-order columns, sort by column etc.
85 * Actual data is stored in CDiffContext in CDirDoc. Dircompare items and
86 * CDiffContext items are linked by storing POSITION of CDiffContext item
87 * as CDirView listitem key.
89 class CDirView : public CListView
91 friend struct FileCmpReport;
92 class DirItemEnumerator;
93 friend DirItemEnumerator;
95 CDirView(); // protected constructor used by dynamic creation
96 DECLARE_DYNCREATE(CDirView)
100 CDirDoc* GetDocument(); // non-debug version is inline
102 // const version, for const methods to be able to call
103 const CDirDoc * GetDocument() const { return const_cast<CDirView *>(this)->GetDocument(); }
107 CDirFrame * GetParentFrame();
109 void StartCompare(CompareStats *pCompareStats);
111 void RedisplayChildren(uintptr_t diffpos, int level, UINT &index, int &alldiffs);
112 void UpdateResources();
113 void LoadColumnHeaderItems();
114 uintptr_t GetItemKey(int idx) const;
115 int GetItemIndex(uintptr_t key);
116 // for populating list
117 void DeleteAllDisplayItems();
118 void SetColumnWidths();
119 void SetFont(const LOGFONT & lf);
121 void SortColumnsAppropriately();
123 UINT GetSelectedCount() const;
124 int GetFirstSelectedInd();
125 DIFFITEM & GetNextSelectedInd(int &ind);
126 DIFFITEM & GetItemAt(int ind);
127 void AddParentFolderItem(bool bEnable);
128 void RefreshOptions();
130 LRESULT HandleMenuMessage(UINT message, WPARAM wParam, LPARAM lParam);
132 // Implementation types
134 typedef enum { SIDE_LEFT = 1, SIDE_MIDDLE, SIDE_RIGHT } SIDE_TYPE;
136 // Implementation in DirActions.cpp
138 bool GetSelectedDirNames(String& strLeft, String& strRight) const;
139 bool GetSelectedFileNames(String& strLeft, String& strRight) const;
140 String GetSelectedFileName(SIDE_TYPE stype) const;
141 void GetItemFileNames(int sel, String& strLeft, String& strRight) const;
142 void GetItemFileNames(int sel, PathContext * paths) const;
143 void FormatEncodingDialogDisplays(CLoadSaveCodepageDlg * dlg);
144 bool IsItemLeftOnly(int code);
145 bool IsItemRightOnly(int code);
146 bool IsItemCopyableToLeft(const DIFFITEM & di) const;
147 bool IsItemCopyableToRight(const DIFFITEM & di) const;
148 bool IsItemDeletableOnLeft(const DIFFITEM & di) const;
149 bool IsItemDeletableOnRight(const DIFFITEM & di) const;
150 bool IsItemDeletableOnBoth(const DIFFITEM & di) const;
151 bool IsItemOpenable(const DIFFITEM & di) const;
152 bool AreItemsOpenable(SELECTIONTYPE selectionType, const DIFFITEM & di1, const DIFFITEM & di2) const;
153 bool AreItemsOpenable(const DIFFITEM & di1, const DIFFITEM & di2, const DIFFITEM & di3) const;
154 bool IsItemOpenableOnLeft(const DIFFITEM & di) const;
155 bool IsItemOpenableOnRight(const DIFFITEM & di) const;
156 bool IsItemOpenableOnLeftWith(const DIFFITEM & di) const;
157 bool IsItemOpenableOnRightWith(const DIFFITEM & di) const;
158 bool IsItemCopyableToOnLeft(const DIFFITEM & di) const;
159 bool IsItemCopyableToOnRight(const DIFFITEM & di) const;
160 void DoCopyLeftToRight();
161 void DoCopyRightToLeft();
167 void DoCopyRightTo();
169 void DoMoveRightTo();
170 void DoOpen(SIDE_TYPE stype);
171 void DoOpenWith(SIDE_TYPE stype);
172 void DoOpenWithEditor(SIDE_TYPE stype);
173 void ApplyPluginPrediffSetting(int newsetting);
174 void ConfirmAndPerformActions(FileActionScript & actions, int selCount);
175 bool ConfirmActionList(const FileActionScript & actions, int selCount);
176 void PerformActionList(FileActionScript & actions);
177 void UpdateAfterFileScript(FileActionScript & actionList);
178 UINT MarkSelectedForRescan();
179 void DoFileEncodingDialog();
180 void DoUpdateFileEncodingDialog(CCmdUI* pCmdUI);
181 bool DoItemRename(const String& szNewItemName);
182 void DoCopyItemsToClipboard(int nIndex);
183 bool RenameOnSameDir(const String& szOldFileName, const String& szNewFileName);
184 // End DirActions.cpp
185 void ReflectGetdispinfo(NMLVDISPINFO *);
187 // Implementation in DirViewColHandler.cpp
189 void UpdateColumnNames();
190 void SetColAlignments();
191 // class CompareState is used to pass parameters to the PFNLVCOMPARE callback function.
195 const CDirView *const pView;
196 const CDiffContext *const pCtxt;
198 const bool bSortAscending;
200 CompareState(const CDirView *, int sortCol, bool bSortAscending);
201 static int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
203 void UpdateDiffItemStatus(UINT nIdx);
206 void NameColumn(int id, int subitem);
207 int AddNewItem(int i, uintptr_t diffpos, int iImage, int iIndent);
208 bool IsDefaultSortAscending(int col) const;
209 int ColPhysToLog(int i) const { return m_invcolorder[i]; }
210 int ColLogToPhys(int i) const { return m_colorder[i]; } /**< -1 if not displayed */
211 String GetColDisplayName(int col) const;
212 String GetColDescription(int col) const;
213 int GetColLogCount() const;
214 void LoadColumnOrders();
215 void ValidateColumnOrdering();
216 void ClearColumnOrders();
217 void ResetColumnOrdering();
218 void MoveColumn(int psrc, int pdest);
219 String GetColRegValueNameBase(int col) const;
220 String ColGetTextToDisplay(const CDiffContext *pCtxt, int col, const DIFFITEM & di);
221 int ColSort(const CDiffContext *pCtxt, int col, const DIFFITEM & ldi, const DIFFITEM &rdi) const;
222 // End DirViewCols.cpp
224 // Implementation in DirViewColItems.cpp
225 int GetColDefaultOrder(int col) const;
226 const DirColInfo * DirViewColItems_GetDirColInfo(int col) const;
227 bool IsColById(int col, int id) const;
228 bool IsColName(int col) const;
229 bool IsColLmTime(int col) const;
230 bool IsColMmTime(int col) const;
231 bool IsColRmTime(int col) const;
232 bool IsColStatus(int col) const;
233 bool IsColStatusAbbr(int col) const;
234 // End DirViewColItems.cpp
239 // ClassWizard generated virtual function overrides
240 //{{AFX_VIRTUAL(CDirView)
242 virtual void OnInitialUpdate();
244 virtual BOOL PreTranslateMessage(MSG* pMsg);
245 virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
246 virtual BOOL OnChildNotify(UINT, WPARAM, LPARAM, LRESULT*);
247 virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
253 int GetFocusedItem();
254 int GetFirstDifferentItem();
255 int GetLastDifferentItem();
256 int GetColImage(const DIFFITEM & di) const;
257 int GetDefaultColImage() const;
258 int AddSpecialItems();
259 void GetCurrentColRegKeys(std::vector<String>& colKeys);
260 void WarnContentsChanged(const String & failedPath);
261 void OpenSpecialItems(uintptr_t pos1, uintptr_t pos2, uintptr_t pos3);
262 bool OpenOneItem(uintptr_t pos1, DIFFITEM *pdi[3],
263 PathContext &paths, int & sel1, bool & isDir, int nPane[3]);
264 bool OpenTwoItems(SELECTIONTYPE selectionType, uintptr_t pos1, uintptr_t pos2, DIFFITEM *pdi[3],
265 PathContext &paths, int & sel1, int & sel2, bool & isDir, int nPane[3]);
266 bool OpenThreeItems(uintptr_t pos1, uintptr_t pos2, uintptr_t pos3, DIFFITEM *pdi[3],
267 PathContext &paths, int & sel1, int & sel2, int & sel3, bool & isDir, int nPane[3]);
268 bool CreateFoldersPair(DIFFITEM & di, bool side1, String &newFolder);
270 // Implementation data
272 CString GenerateReport();
273 CSortHeaderCtrl m_ctlSortHeader;
274 CImageList m_imageList;
275 CImageList m_imageState;
279 std::vector<int> m_colorder; /**< colorder[logical#]=physical# */
280 std::vector<int> m_invcolorder; /**< invcolorder[physical]=logical# */
281 bool m_bEscCloses; /**< Cached value for option for ESC closing window */
282 bool m_bExpandSubdirs;
283 CFont m_font; /**< User-selected font */
284 UINT m_nHiddenItems; /**< Count of items we have hidden */
285 bool m_bTreeMode; /**< TRUE if tree mode is on*/
286 std::unique_ptr<DirCompProgressBar> m_pCmpProgressBar;
287 clock_t m_compareStart; /**< Starting process time of the compare */
288 bool m_bUserCancelEdit; /**< TRUE if the user cancels rename */
289 String m_lastCopyFolder; /**< Last Copy To -target folder. */
293 bool m_bNeedSearchFirstDiffItem;
294 bool m_bNeedSearchLastDiffItem;
295 COLORSETTINGS m_cachedColors; /**< Cached color settings */
297 std::unique_ptr<CShellContextMenu> m_pShellContextMenuLeft; /**< Shell context menu for group of left files */
298 std::unique_ptr<CShellContextMenu> m_pShellContextMenuMiddle; /**< Shell context menu for group of middle files */
299 std::unique_ptr<CShellContextMenu> m_pShellContextMenuRight; /**< Shell context menu for group of right files */
300 HMENU m_hCurrentMenu; /**< Current shell context menu (either left or right) */
301 std::unique_ptr<DirViewTreeState> m_pSavedTreeState;
303 // Generated message map functions
304 afx_msg void OnColumnClick(NMHDR* pNMHDR, LRESULT* pResult);
305 afx_msg void OnContextMenu(CWnd*, CPoint point);
306 //{{AFX_MSG(CDirView)
307 afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
308 afx_msg void OnDirCopyRightToLeft();
309 afx_msg void OnCtxtDirCopyRightToLeft();
310 afx_msg void OnUpdateDirCopyRightToLeft(CCmdUI* pCmdUI);
311 afx_msg void OnDirCopyLeftToRight();
312 afx_msg void OnCtxtDirCopyLeftToRight();
313 afx_msg void OnUpdateDirCopyLeftToRight(CCmdUI* pCmdUI);
314 afx_msg void OnUpdateCtxtDirCopyRightToLeft(CCmdUI* pCmdUI);
315 afx_msg void OnUpdateCtxtDirCopyLeftToRight(CCmdUI* pCmdUI);
316 afx_msg void OnCtxtDirDelLeft();
317 afx_msg void OnUpdateCtxtDirDelLeft(CCmdUI* pCmdUI);
318 afx_msg void OnCtxtDirDelRight();
319 afx_msg void OnUpdateCtxtDirDelRight(CCmdUI* pCmdUI);
320 afx_msg void OnCtxtDirDelBoth();
321 afx_msg void OnUpdateCtxtDirDelBoth(CCmdUI* pCmdUI);
322 afx_msg void OnCtxtDirOpenLeft();
323 afx_msg void OnUpdateCtxtDirOpenLeft(CCmdUI* pCmdUI);
324 afx_msg void OnCtxtDirOpenLeftWith();
325 afx_msg void OnUpdateCtxtDirOpenLeftWith(CCmdUI* pCmdUI);
326 afx_msg void OnCtxtDirOpenRight();
327 afx_msg void OnUpdateCtxtDirOpenRight(CCmdUI* pCmdUI);
328 afx_msg void OnCtxtDirOpenRightWith();
329 afx_msg void OnUpdateCtxtDirOpenRightWith(CCmdUI* pCmdUI);
330 afx_msg void OnCtxtDirOpenRightWithEditor();
331 afx_msg void OnUpdateCtxtDirOpenRightWithEditor(CCmdUI* pCmdUI);
332 afx_msg void OnCtxtDirOpenLeftWithEditor();
333 afx_msg void OnUpdateCtxtDirOpenLeftWithEditor(CCmdUI* pCmdUI);
334 afx_msg void OnCtxtDirCopyLeftTo();
335 afx_msg void OnUpdateCtxtDirCopyLeftTo(CCmdUI* pCmdUI);
336 afx_msg void OnCtxtDirCopyRightTo();
337 afx_msg void OnUpdateCtxtDirCopyRightTo(CCmdUI* pCmdUI);
338 afx_msg void OnDestroy();
339 afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
340 afx_msg void OnClick(NMHDR* pNMHDR, LRESULT* pResult);
341 afx_msg void OnFirstdiff();
342 afx_msg void OnUpdateFirstdiff(CCmdUI* pCmdUI);
343 afx_msg void OnLastdiff();
344 afx_msg void OnUpdateLastdiff(CCmdUI* pCmdUI);
345 afx_msg void OnNextdiff();
346 afx_msg void OnUpdateNextdiff(CCmdUI* pCmdUI);
347 afx_msg void OnPrevdiff();
348 afx_msg void OnUpdatePrevdiff(CCmdUI* pCmdUI);
349 afx_msg void OnCurdiff();
350 afx_msg void OnUpdateCurdiff(CCmdUI* pCmdUI);
351 afx_msg void OnUpdateSave(CCmdUI* pCmdUI);
352 afx_msg LRESULT OnUpdateUIMessage(WPARAM wParam, LPARAM lParam);
353 afx_msg void OnRefresh();
354 afx_msg void OnUpdateRefresh(CCmdUI* pCmdUI);
355 afx_msg void OnTimer(UINT_PTR nIDEvent);
356 afx_msg void OnEditColumns();
357 afx_msg void OnLeftReadOnly();
358 afx_msg void OnUpdateLeftReadOnly(CCmdUI* pCmdUI);
359 afx_msg void OnMiddleReadOnly();
360 afx_msg void OnUpdateMiddleReadOnly(CCmdUI* pCmdUI);
361 afx_msg void OnRightReadOnly();
362 afx_msg void OnUpdateRightReadOnly(CCmdUI* pCmdUI);
363 afx_msg void OnUpdateStatusLeftRO(CCmdUI* pCmdUI);
364 afx_msg void OnUpdateStatusMiddleRO(CCmdUI* pCmdUI);
365 afx_msg void OnUpdateStatusRightRO(CCmdUI* pCmdUI);
366 afx_msg void OnCustomizeColumns();
367 afx_msg void OnCtxtOpenWithUnpacker();
368 afx_msg void OnUpdateCtxtOpenWithUnpacker(CCmdUI* pCmdUI);
369 afx_msg void OnToolsGenerateReport();
370 afx_msg void OnCtxtDirZipLeft();
371 afx_msg void OnCtxtDirZipRight();
372 afx_msg void OnCtxtDirZipBoth();
373 afx_msg void OnCtxtDirZipBothDiffsOnly();
374 template<SIDE_TYPE stype>
375 afx_msg void OnCtxtDirShellContextMenu();
376 afx_msg void OnUpdateCtxtDir(CCmdUI* pCmdUI);
377 afx_msg void OnSelectAll();
378 afx_msg void OnUpdateSelectAll(CCmdUI* pCmdUI);
379 afx_msg void OnPluginPredifferMode(UINT nID);
380 afx_msg void OnUpdatePluginPredifferMode(CCmdUI* pCmdUI);
381 afx_msg void OnCopyLeftPathnames();
382 afx_msg void OnCopyRightPathnames();
383 afx_msg void OnCopyBothPathnames();
384 afx_msg void OnCopyFilenames();
385 afx_msg void OnUpdateCopyFilenames(CCmdUI* pCmdUI);
386 afx_msg void OnCopyLeftToClipboard();
387 afx_msg void OnCopyRightToClipboard();
388 afx_msg void OnCopyBothToClipboard();
389 afx_msg void OnItemRename();
390 afx_msg void OnUpdateItemRename(CCmdUI* pCmdUI);
391 afx_msg void OnHideFilenames();
392 afx_msg void OnSize(UINT nType, int cx, int cy);
393 afx_msg void OnCtxtDirMoveLeftTo();
394 afx_msg void OnUpdateCtxtDirMoveLeftTo(CCmdUI* pCmdUI);
395 afx_msg void OnCtxtDirMoveRightTo();
396 afx_msg void OnUpdateCtxtDirMoveRightTo(CCmdUI* pCmdUI);
397 afx_msg void OnUpdateHideFilenames(CCmdUI* pCmdUI);
398 afx_msg void OnDelete();
399 afx_msg void OnUpdateDelete(CCmdUI* pCmdUI);
400 afx_msg void OnMarkedRescan();
401 afx_msg void OnUpdateStatusNum(CCmdUI* pCmdUI);
402 afx_msg void OnViewShowHiddenItems();
403 afx_msg void OnUpdateViewShowHiddenItems(CCmdUI* pCmdUI);
404 afx_msg void OnViewTreeMode();
405 afx_msg void OnUpdateViewTreeMode(CCmdUI* pCmdUI);
406 afx_msg void OnViewExpandAllSubdirs();
407 afx_msg void OnUpdateViewExpandAllSubdirs(CCmdUI* pCmdUI);
408 afx_msg void OnViewCollapseAllSubdirs();
409 afx_msg void OnUpdateViewCollapseAllSubdirs(CCmdUI* pCmdUI);
410 afx_msg void OnMergeCompare();
411 afx_msg void OnMergeCompareLeft1Left2();
412 afx_msg void OnMergeCompareRight1Right2();
413 afx_msg void OnMergeCompareLeft1Right2();
414 afx_msg void OnMergeCompareLeft2Right1();
415 afx_msg void OnMergeCompareXML();
416 afx_msg void OnMergeCompareHex();
417 afx_msg void OnUpdateMergeCompare(CCmdUI *pCmdUI);
418 afx_msg void OnUpdateMergeCompareLeft1Left2(CCmdUI *pCmdUI);
419 afx_msg void OnUpdateMergeCompareRight1Right2(CCmdUI *pCmdUI);
420 afx_msg void OnUpdateMergeCompareLeft1Right2(CCmdUI *pCmdUI);
421 afx_msg void OnUpdateMergeCompareLeft2Right1(CCmdUI *pCmdUI);
422 afx_msg void OnViewCompareStatistics();
423 afx_msg void OnFileEncoding();
424 afx_msg void OnUpdateFileEncoding(CCmdUI* pCmdUI);
425 afx_msg void OnHelp();
426 afx_msg void OnEditCopy();
427 afx_msg void OnEditCut();
428 afx_msg void OnEditPaste();
429 afx_msg void OnEditUndo();
430 afx_msg void OnUpdateEditUndo(CCmdUI* pCmdUI);
431 afx_msg void OnItemChanged(NMHDR* pNMHDR, LRESULT* pResult);
432 afx_msg void OnBeginLabelEdit(NMHDR* pNMHDR, LRESULT* pResult);
433 afx_msg void OnEndLabelEdit(NMHDR* pNMHDR, LRESULT* pResult);
434 afx_msg void OnCustomDraw(NMHDR* pNMHDR, LRESULT* pResult);
435 afx_msg void OnSearch();
436 afx_msg void OnExpandFolder();
437 afx_msg void OnCollapseFolder();
438 afx_msg void OnBeginDrag(NMHDR* pNMHDR, LRESULT* pResult);
439 afx_msg void OnBnClickedComparisonStop();
441 DECLARE_MESSAGE_MAP()
442 BOOL OnHeaderBeginDrag(LPNMHEADER hdr, LRESULT* pResult);
443 BOOL OnHeaderEndDrag(LPNMHEADER hdr, LRESULT* pResult);
446 void OpenSelection(SELECTIONTYPE selectionType = SELECTIONTYPE_NORMAL, PackingInfo * infoUnpacker = NULL);
447 void OpenSelectionHex();
448 bool GetSelectedItems(int * sel1, int * sel2, int * sel3);
449 void OpenParentDirectory();
450 void DoUpdateDirCopyRightToLeft(CCmdUI* pCmdUI, eMenuType menuType);
451 void DoUpdateDirCopyLeftToRight(CCmdUI* pCmdUI, eMenuType menuType);
452 void ModifyPopup(CMenu * pPopup, int nStringResource, int nMenuId, LPCTSTR szPath);
453 void DoUpdateCtxtDirDelLeft(CCmdUI* pCmdUI);
454 void DoUpdateCtxtDirDelRight(CCmdUI* pCmdUI);
455 void DoUpdateCtxtDirDelBoth(CCmdUI* pCmdUI);
456 void DoUpdateOpen(SELECTIONTYPE selectionType, CCmdUI* pCmdUI);
457 void DoUpdateOpenLeft(CCmdUI* pCmdUI);
458 void DoUpdateOpenRight(CCmdUI* pCmdUI);
459 void DoUpdateOpenLeftWith(CCmdUI* pCmdUI);
460 void DoUpdateOpenRightWith(CCmdUI* pCmdUI);
461 void DoUpdateDelete(CCmdUI* pCmdUI);
462 void DoUpdateCopyFilenames(CCmdUI* pCmdUI);
463 void DoUpdateCtxtDirCopyLeftTo(CCmdUI* pCmdUI);
464 void DoUpdateCtxtDirCopyRightTo(CCmdUI* pCmdUI);
465 void DoUpdateCtxtDirMoveLeftTo(CCmdUI* pCmdUI);
466 void DoUpdateCtxtDirMoveRightTo(CCmdUI* pCmdUI);
467 const DIFFITEM & GetDiffItem(int sel) const;
468 DIFFITEM & GetDiffItemRef(int sel);
469 int GetSingleSelectedItem() const;
470 bool IsItemNavigableDiff(const DIFFITEM & di) const;
471 void MoveFocus(int currentInd, int i, int selCount);
472 void SaveColumnWidths();
473 void SaveColumnOrders();
474 void FixReordering();
475 void HeaderContextMenu(CPoint point, int i);
476 void ListContextMenu(CPoint point, int i);
477 bool ListShellContextMenu(SIDE_TYPE side);
478 void ShowShellContextMenu(SIDE_TYPE side);
479 CShellContextMenu* GetCorrespondingShellContextMenu(HMENU hMenu) const;
480 void ReloadColumns();
481 void ResetColumnWidths();
482 bool IsLabelEdit() const;
483 bool IsItemSelectedSpecial() const;
484 void CollapseSubdir(int sel);
485 void ExpandSubdir(int sel, bool bRecursive = false);
486 void GetColors(int nRow, int nCol, COLORREF& clrBk, COLORREF& clrText) const;
487 DirViewTreeState *SaveTreeState();
488 void RestoreTreeState(DirViewTreeState *pTreeState);
489 void PrepareDragData(String& filesForDroping);
493 #ifndef _DEBUG // debug version in DirView.cpp
494 inline CDirDoc* CDirView::GetDocument()
495 { return (CDirDoc*)m_pDocument; }
499 String NumToStr(int n);
502 /////////////////////////////////////////////////////////////////////////////
504 //{{AFX_INSERT_LOCATION}}
505 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.