source: filezilla/trunk/fuentes/src/interface/LocalTreeView.h @ 130

Last change on this file since 130 was 130, checked in by jrpelegrina, 4 years ago

First release to xenial

File size: 2.7 KB
RevLine 
[130]1#ifndef __LOCALTREEVIEW_H__
2#define __LOCALTREEVIEW_H__
3
4#include <option_change_event_handler.h>
5#include "systemimagelist.h"
6#include "state.h"
7#include "treectrlex.h"
8
9class CQueueView;
10
11#ifdef __WXMSW__
12class CVolumeDescriptionEnumeratorThread;
13#endif
14
15class CLocalTreeView : public wxTreeCtrlEx, CSystemImageList, CStateEventHandler, COptionChangeEventHandler
16{
17        DECLARE_CLASS(CLocalTreeView)
18
19        friend class CLocalTreeViewDropTarget;
20
21public:
22        CLocalTreeView(wxWindow* parent, wxWindowID id, CState *pState, CQueueView *pQueueView);
23        virtual ~CLocalTreeView();
24
25#ifdef __WXMSW__
26        // React to changed drive letters
27        void OnDevicechange(WPARAM wParam, LPARAM lParam);
28#endif
29
30protected:
31        virtual void OnStateChange(CState* pState, enum t_statechange_notifications notification, const wxString& data, const void* data2);
32
33        void SetDir(wxString localDir);
34        void RefreshListing();
35
36#ifdef __WXMSW__
37        bool CreateRoot();
38        bool DisplayDrives(wxTreeItemId parent);
39        wxString GetSpecialFolder(int folder, int &iconIndex, int &openIconIndex);
40
41        wxTreeItemId m_desktop;
42        wxTreeItemId m_drives;
43        wxTreeItemId m_documents;
44#endif
45
46        void UpdateSortMode();
47
48        virtual void OnOptionsChanged(changed_options_t const& options);
49
50        wxTreeItemId GetNearestParent(wxString& localDir);
51        wxTreeItemId GetSubdir(wxTreeItemId parent, const wxString& subDir);
52        void DisplayDir(wxTreeItemId parent, const wxString& dirname, const wxString& knownSubdir = _T(""));
53        wxString HasSubdir(const wxString& dirname);
54        wxTreeItemId MakeSubdirs(wxTreeItemId parent, wxString dirname, wxString subDir);
55        wxString m_currentDir;
56
57        bool CheckSubdirStatus(wxTreeItemId& item, const wxString& path);
58
59        wxString MenuMkdir();
60
61        DECLARE_EVENT_TABLE()
62        void OnItemExpanding(wxTreeEvent& event);
63#ifdef __WXMSW__
64        void OnSelectionChanging(wxTreeEvent& event);
65#endif
66        void OnSelectionChanged(wxTreeEvent& event);
67        void OnBeginDrag(wxTreeEvent& event);
68#ifdef __WXMSW__
69        void OnVolumesEnumerated(wxCommandEvent& event);
70        CVolumeDescriptionEnumeratorThread* m_pVolumeEnumeratorThread;
71#endif
72        void OnContextMenu(wxTreeEvent& event);
73        void OnMenuUpload(wxCommandEvent& event);
74        void OnMenuMkdir(wxCommandEvent& event);
75        void OnMenuMkdirChgDir(wxCommandEvent& event);
76        void OnMenuRename(wxCommandEvent& event);
77        void OnMenuDelete(wxCommandEvent& event);
78        void OnBeginLabelEdit(wxTreeEvent& event);
79        void OnEndLabelEdit(wxTreeEvent& event);
80        void OnChar(wxKeyEvent& event);
81        void OnMenuOpen(wxCommandEvent&);
82
83#ifdef __WXMSW__
84        // React to changed drive letters
85        wxTreeItemId AddDrive(wxChar letter);
86        void RemoveDrive(wxChar letter);
87#endif
88
89        wxString GetDirFromItem(wxTreeItemId item);
90
91        CQueueView* m_pQueueView;
92
93        wxTreeItemId m_contextMenuItem;
94        wxTreeItemId m_dropHighlight;
95};
96
97#endif
Note: See TracBrowser for help on using the repository browser.