-
Notifications
You must be signed in to change notification settings - Fork 1
/
GUI-FilesWidget.h
85 lines (66 loc) · 1.77 KB
/
GUI-FilesWidget.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#ifndef _RAIN_GUI_FILESWIDGET_H
#define _RAIN_GUI_FILESWIDGET_H
#include <wx/wx.h>
#include <wx/treectrl.h>
#include <wx/listctrl.h>
#include <wx/splitter.h>
#include <wx/mimetype.h>
#include <wx/imaglist.h>
#include <wx/tokenzr.h>
#include <wx/bitmap.h>
#include <vector>
enum
{
ID_FW_DIRTREE,
ID_FW_FILELIST
};
namespace RAIN
{
class SandboxApp;
class ManifestEntry;
namespace GUI
{
class FilesWidget : public wxPanel
{
public:
FilesWidget(wxWindow *parent, wxWindowID id, RAIN::SandboxApp *app);
~FilesWidget();
void Update();
void UpdateIconType();
void ImportManifests();
void FillTree(const wxTreeItemId& root);
wxTreeItemId GetNodesChild(const wxTreeItemId& node, const wxString& name);
void FillList(const wxString& path);
int ListImagesGetExtension(const wxString& extension);
void FillInfo(RAIN::ManifestEntry *entry, const wxString &path);
void OnTreeSelect(wxTreeEvent &e);
void OnFileClick(wxListEvent &e);
void OnFileDoubleClick(wxListEvent &e);
wxString GetPath(const wxTreeItemId& node);
DECLARE_EVENT_TABLE();
private:
void set_properties();
void do_layout();
int iconSize;
bool useSmallIcons;
RAIN::SandboxApp *app;
std::vector<ManifestEntry *> entries;
int tree_rooticon, tree_foldericon, list_foldericon;
wxTreeCtrl *tree;
wxPanel *right;
wxListCtrl *list;
wxPanel *info;
wxStaticText* SizeLabel;
wxStaticText* SizeText;
wxStaticText* TotalLabel;
wxStaticText* TotalText;
wxStaticText* MimeLabel;
wxStaticText* MimeText;
wxStaticText* NeededLabel;
wxStaticText* NeededText;
wxImageList *listimages;
wxSplitterWindow *split;
};
}
}
#endif//_RAIN_GUI_FILESWIDGET_H