diff options
author | Igor Pavlov <ipavlov@users.sourceforge.net> | 2008-08-13 04:00:00 +0400 |
---|---|---|
committer | Kornel LesiĆski <kornel@geekhood.net> | 2016-05-28 02:15:56 +0300 |
commit | 173c07e166fdf6fcd20f18ea73008f1b628945df (patch) | |
tree | 13ebea85cdc4c16ae93714ff0627ee9f91ad7e08 /CPP/7zip/UI/FileManager/App.h | |
parent | 3901bf0ab88106a5b031cba7bc18d60cdebf7eef (diff) |
4.59 beta
Diffstat (limited to 'CPP/7zip/UI/FileManager/App.h')
-rwxr-xr-x | CPP/7zip/UI/FileManager/App.h | 68 |
1 files changed, 32 insertions, 36 deletions
diff --git a/CPP/7zip/UI/FileManager/App.h b/CPP/7zip/UI/FileManager/App.h index 2479d81e..d30e1151 100755 --- a/CPP/7zip/UI/FileManager/App.h +++ b/CPP/7zip/UI/FileManager/App.h @@ -16,7 +16,7 @@ const int kNumPanelsMax = 2; extern void MoveSubWindows(HWND hWnd); -enum +enum { kAddCommand = kToolbarStartID, kExtractCommand, @@ -28,10 +28,10 @@ class CPanelCallbackImp: public CPanelCallback CApp *_app; int _index; public: - void Init(CApp *app, int index) - { + void Init(CApp *app, int index) + { _app = app; - _index = index; + _index = index; } virtual void OnTab(); virtual void SetFocusToPath(int index); @@ -42,11 +42,11 @@ public: virtual void DragBegin(); virtual void DragEnd(); virtual void RefreshTitle(bool always); -}; +}; class CApp; -class CDropTarget: +class CDropTarget: public IDropTarget, public CMyUnknownImp { @@ -54,7 +54,7 @@ class CDropTarget: UStringVector m_SourcePaths; int m_SelectionIndex; bool m_DropIsAllowed; // = true, if data contain fillist - bool m_PanelDropIsAllowed; // = false, if current target_panel is source_panel. + bool m_PanelDropIsAllowed; // = false, if current target_panel is source_panel. // check it only if m_DropIsAllowed == true int m_SubFolderIndex; UString m_SubFolderName; @@ -77,22 +77,22 @@ class CDropTarget: public: MY_UNKNOWN_IMP1_MT(IDropTarget) - STDMETHOD(DragEnter)(IDataObject * dataObject, DWORD keyState, + STDMETHOD(DragEnter)(IDataObject * dataObject, DWORD keyState, POINTL pt, DWORD *effect); STDMETHOD(DragOver)(DWORD keyState, POINTL pt, DWORD * effect); STDMETHOD(DragLeave)(); - STDMETHOD(Drop)(IDataObject * dataObject, DWORD keyState, + STDMETHOD(Drop)(IDataObject * dataObject, DWORD keyState, POINTL pt, DWORD *effect); - CDropTarget(): - TargetPanelIndex(-1), - SrcPanelIndex(-1), - m_IsAppTarget(false), - m_Panel(0), - App(0), - m_PanelDropIsAllowed(false), - m_DropIsAllowed(false), - m_SelectionIndex(-1), + CDropTarget(): + TargetPanelIndex(-1), + SrcPanelIndex(-1), + m_IsAppTarget(false), + m_Panel(0), + App(0), + m_PanelDropIsAllowed(false), + m_DropIsAllowed(false), + m_SelectionIndex(-1), m_SubFolderIndex(-1), m_SetPathIsOK(false) {} @@ -138,18 +138,18 @@ public: void SetFocusedPanel(int index) { - LastFocusedPanel = index; + LastFocusedPanel = index; _dropTargetSpec->TargetPanelIndex = LastFocusedPanel; } void DragBegin(int panelIndex) - { + { _dropTargetSpec->TargetPanelIndex = (NumPanels > 1) ? 1 - panelIndex : panelIndex; _dropTargetSpec->SrcPanelIndex = panelIndex; } void DragEnd() - { + { _dropTargetSpec->TargetPanelIndex = LastFocusedPanel; _dropTargetSpec->SrcPanelIndex = -1; } @@ -159,8 +159,8 @@ public: void OnSetSameFolder(int srcPanelIndex); void OnSetSubFolder(int srcPanelIndex); - void CreateOnePanel(int panelIndex, const UString &mainPath, bool &archiveIsOpened, bool &encrypted); - void Create(HWND hwnd, const UString &mainPath, int xSizes[2], bool &archiveIsOpened, bool &encrypted); + HRESULT CreateOnePanel(int panelIndex, const UString &mainPath, bool &archiveIsOpened, bool &encrypted); + HRESULT Create(HWND hwnd, const UString &mainPath, int xSizes[2], bool &archiveIsOpened, bool &encrypted); void Read(); void Save(); void Release(); @@ -253,7 +253,7 @@ public: void RefreshView() { GetFocusedPanel().OnReload(); } void RefreshAllPanels() - { + { for (int i = 0; i < NumPanels; i++) { int index = i; @@ -264,7 +264,7 @@ public: } void SetListSettings(); void SetShowSystemMenu(); - void SwitchOnOffOnePanel(); + HRESULT SwitchOnOffOnePanel(); bool GetFlatMode() { return Panels[LastFocusedPanel].GetFlatMode(); } void ChangeFlatMode() { Panels[LastFocusedPanel].ChangeFlatMode(); } @@ -293,41 +293,37 @@ public: SaveToolbarsMask(mask); } void SwitchStandardToolbar() - { + { ShowStandardToolbar = !ShowStandardToolbar; SaveToolbar(); ReloadRebar(g_HWND); MoveSubWindows(_window); } void SwitchArchiveToolbar() - { + { ShowArchiveToolbar = !ShowArchiveToolbar; SaveToolbar(); ReloadRebar(g_HWND); MoveSubWindows(_window); } void SwitchButtonsLables() - { + { ShowButtonsLables = !ShowButtonsLables; SaveToolbar(); ReloadRebar(g_HWND); MoveSubWindows(_window); } void SwitchLargeButtons() - { + { LargeButtons = !LargeButtons; SaveToolbar(); ReloadRebar(g_HWND); MoveSubWindows(_window); } - - void AddToArchive() - { GetFocusedPanel().AddToArchive(); } - void ExtractArchives() - { GetFocusedPanel().ExtractArchives(); } - void TestArchives() - { GetFocusedPanel().TestArchives(); } + void AddToArchive() { GetFocusedPanel().AddToArchive(); } + void ExtractArchives() { GetFocusedPanel().ExtractArchives(); } + void TestArchives() { GetFocusedPanel().TestArchives(); } void OnNotify(int ctrlID, LPNMHDR pnmh); |