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 "GUI/InfoBar.hpp"
#include "GUI/ListCtrl.hpp"
#include "GUI/SearchBar.hpp"
#include <wx/dataview.h>
#include <wx/panel.h>
#include <wx/sizer.h>
#include <wx/treectrl.h>
#include <wx/window.h>
class cLibrary : public wxPanel
{
public:
cLibrary(wxWindow* window, wxDataViewItem favHive, wxDataViewTreeCtrl& hives,
wxTreeItemId trashRoot, wxTreeCtrl& trash);
~cLibrary();
public:
wxSearchCtrl* GetSearchCtrlObject() const { return m_pSearchBar; }
wxInfoBar* GetInfoBarObject() const { return m_pInfoBar; }
wxDataViewListCtrl* GetListCtrlObject() const { return m_pListCtrl; }
// void SetHivesObject(wxDataViewTreeCtrl& hives) { m_pHives = &hives;}
// void SetFavoritesHive(wxDataViewItem favHive) { m_FavoritesHive = favHive;}
// void SetTrashObject(wxTreeCtrl& trash) { m_pTrash = &trash;}
// void SetTrashRoot(wxTreeItemId trashRoot) { m_TrashRoot = trashRoot;}
private:
cSearchBar* m_pSearchBar = nullptr;
cInfoBar* m_pInfoBar = nullptr;
cListCtrl* m_pListCtrl = nullptr;
wxBoxSizer* m_pSizer = nullptr;
wxDataViewItem m_FavoritesHive;
wxDataViewTreeCtrl& m_pHives;
wxTreeCtrl& m_pTrash;
wxTreeItemId m_TrashRoot;
};