More encapsulation and add new class Signal for handling custom events.

This commit is contained in:
apoorv569
2021-12-13 23:42:12 +05:30
parent 7dd7f2b3c1
commit 9e0be8f55a
31 changed files with 5008 additions and 2340 deletions
+40
View File
@@ -0,0 +1,40 @@
#pragma once
#include <wx/button.h>
#include <wx/dataview.h>
#include <wx/panel.h>
#include <wx/sizer.h>
#include <wx/treebase.h>
#include <wx/treectrl.h>
#include <wx/window.h>
class cTrashPanel : public wxPanel
{
public:
cTrashPanel(wxWindow* window, wxDataViewListCtrl& listCtrl);
~cTrashPanel();
public:
wxTreeCtrl* GetTrashObject() { return m_pTrash; }
wxTreeItemId GetTrashRoot() { return m_TrashRoot; }
private:
// -------------------------------------------------------------------
// TrashPane event handlers
void OnShowTrashContextMenu(wxTreeEvent& event);
void OnClickRestoreTrashItem(wxCommandEvent& event);
void OnDragAndDropToTrash(wxDropFilesEvent& event);
private:
wxTreeItemId m_TrashRoot;
wxTreeCtrl* m_pTrash = nullptr;
wxButton* m_pRestoreTrashedItemButton = nullptr;
wxBoxSizer* m_pMainSizer = nullptr;
wxBoxSizer* m_pTrashSizer = nullptr;
wxBoxSizer* m_pButtonSizer = nullptr;
private:
wxWindow* m_pWindow = nullptr;
wxDataViewListCtrl& m_ListCtrl;
// friend class cListCtrl;
};