source: filezilla/trunk/fuentes/src/interface/RemoteTreeView.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.3 KB
Line 
1#ifndef __REMOTETREEVIEW_H__
2#define __REMOTETREEVIEW_H__
3
4#include <option_change_event_handler.h>
5#include "systemimagelist.h"
6#include "state.h"
7#include "filter.h"
8#include "treectrlex.h"
9
10class CQueueView;
11class CRemoteTreeView : public wxTreeCtrlEx, CSystemImageList, CStateEventHandler, COptionChangeEventHandler
12{
13        DECLARE_CLASS(CRemoteTreeView)
14
15        friend class CRemoteTreeViewDropTarget;
16
17public:
18        CRemoteTreeView(wxWindow* parent, wxWindowID id, CState* pState, CQueueView* pQueue);
19        virtual ~CRemoteTreeView();
20
21protected:
22        wxTreeItemId MakeParent(CServerPath path, bool select);
23        void SetDirectoryListing(std::shared_ptr<CDirectoryListing> const& pListing, bool modified);
24        virtual void OnStateChange(CState* pState, enum t_statechange_notifications notification, const wxString&, const void*);
25
26        void DisplayItem(wxTreeItemId parent, const CDirectoryListing& listing);
27        void RefreshItem(wxTreeItemId parent, const CDirectoryListing& listing, bool will_select_parent);
28
29        void SetItemImages(wxTreeItemId item, bool unknown);
30
31        bool HasSubdirs(const CDirectoryListing& listing, const CFilterManager& filter);
32
33        CServerPath GetPathFromItem(const wxTreeItemId& item) const;
34
35        bool ListExpand(wxTreeItemId item);
36
37        void ApplyFilters(bool resort);
38
39        CQueueView* m_pQueue;
40
41        void CreateImageList();
42        wxBitmap CreateIcon(int index, const wxString& overlay = _T(""));
43        wxImageList* m_pImageList;
44
45        // Set to true in SetDirectoryListing.
46        // Used to suspends event processing in OnItemExpanding for example
47        bool m_busy;
48
49        wxTreeItemId m_ExpandAfterList;
50
51        wxTreeItemId m_dropHighlight;
52
53        CServerPath MenuMkdir();
54
55        void UpdateSortMode();
56
57        virtual void OnOptionsChanged(changed_options_t const& options);
58
59        DECLARE_EVENT_TABLE()
60        void OnItemExpanding(wxTreeEvent& event);
61        void OnSelectionChanged(wxTreeEvent& event);
62        void OnItemActivated(wxTreeEvent& event);
63        void OnBeginDrag(wxTreeEvent& event);
64        void OnContextMenu(wxTreeEvent& event);
65        void OnMenuChmod(wxCommandEvent&);
66        void OnMenuDownload(wxCommandEvent& event);
67        void OnMenuDelete(wxCommandEvent&);
68        void OnMenuRename(wxCommandEvent&);
69        void OnBeginLabelEdit(wxTreeEvent& event);
70        void OnEndLabelEdit(wxTreeEvent& event);
71        void OnMkdir(wxCommandEvent&);
72        void OnMenuMkdirChgDir(wxCommandEvent&);
73        void OnChar(wxKeyEvent& event);
74        void OnMenuGeturl(wxCommandEvent&);
75
76        wxTreeItemId m_contextMenuItem;
77};
78
79#endif
Note: See TracBrowser for help on using the repository browser.