#ifndef WFILELIST_H
#define WFILELIST_H
#include <wx/wx.h>
#include <wx/dnd.h>
#include <wx/listctrl.h>
class WFileListDropTarget : public wxFileDropTarget
{
private:
class WCryptoTE* wmain;
public:
WFileListDropTarget(class WCryptoTE* wmain);
virtual bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString& filenames);
};
class WFileList : public wxListCtrl
{
public:
WFileList(class WCryptoTE* wmain);
enum ids {
myID_FIRST = wxID_HIGHEST + 1000,
myID_LISTCTRL,
};
protected:
class WCryptoTE* wmain;
WFileListDropTarget* droptarget;
int displaymode;
struct MetaSettingsv00000001
{
int show_filename;
int show_size;
int show_compressed;
int show_compression;
int show_encryption;
int show_mtime;
int show_ctime;
int show_author;
int show_subject;
}
__attribute__((packed));
struct MetaSettingsv00000001 metasettings;
public:
void BuildImageList();
void ResetItems();
void UpdateItemColumns(unsigned int sfid);
void UpdateItem(unsigned int sfid);
void UpdateDisplayMode(int newmode);
void SaveProperties();
void LoadProperties();
void OnContextMenu(wxContextMenuEvent& event);
void OnItemActivated(wxListEvent& event);
void OnColumnEndDrag(wxListEvent& event);
void OnColumnRightClick(wxListEvent& event);
void OnBeginLabelEdit(wxListEvent& event);
void OnEndLabelEdit(wxListEvent& event);
void OnMenuFileOpen(wxCommandEvent& event);
void OnMenuFileExport(wxCommandEvent& event);
void OnMenuFileDelete(wxCommandEvent& event);
void OnMenuFileRename(wxCommandEvent& event);
void OnMenuFileProperties(wxCommandEvent& event);
void OnMenuView(wxCommandEvent& event);
void OnMenuShowColumn(wxCommandEvent& event);
private:
DECLARE_EVENT_TABLE()
};
#endif