2006-06-15 04:19:30 +00:00
|
|
|
#ifndef _FUNCTIONSVIEW_H_
|
|
|
|
#define _FUNCTIONSVIEW_H_
|
|
|
|
|
2012-03-11 20:52:32 +00:00
|
|
|
#include <boost/signals2.hpp>
|
2008-11-30 02:30:05 +00:00
|
|
|
#include <functional>
|
2006-06-15 04:19:30 +00:00
|
|
|
#include "win32/MDIChild.h"
|
|
|
|
#include "win32/ListView.h"
|
|
|
|
#include "win32/Button.h"
|
2008-04-05 03:38:53 +00:00
|
|
|
#include "layout/VerticalLayout.h"
|
2008-12-03 03:17:13 +00:00
|
|
|
#include "../MIPS.h"
|
|
|
|
#include "../MIPSModule.h"
|
|
|
|
#include "../ELF.h"
|
2008-12-02 23:57:34 +00:00
|
|
|
|
|
|
|
class CFunctionsView :
|
|
|
|
#ifdef FUNCTIONSVIEW_STANDALONE
|
|
|
|
public Framework::Win32::CWindow,
|
|
|
|
#else
|
|
|
|
public Framework::Win32::CMDIChild,
|
|
|
|
#endif
|
2012-03-12 05:24:43 +00:00
|
|
|
public boost::signals2::trackable
|
2006-06-15 04:19:30 +00:00
|
|
|
{
|
|
|
|
public:
|
2012-03-11 20:52:32 +00:00
|
|
|
typedef std::list<MIPSMODULE> ModuleList;
|
|
|
|
typedef std::function<ModuleList ()> ModuleListProvider;
|
2008-11-30 02:30:05 +00:00
|
|
|
|
|
|
|
|
2012-03-11 20:52:32 +00:00
|
|
|
CFunctionsView(HWND);
|
|
|
|
virtual ~CFunctionsView();
|
2008-11-30 02:30:05 +00:00
|
|
|
|
2012-03-11 20:52:32 +00:00
|
|
|
void SetContext(CMIPS*, const ModuleListProvider&);
|
|
|
|
void Refresh();
|
2006-06-15 04:19:30 +00:00
|
|
|
|
2012-03-11 20:52:32 +00:00
|
|
|
boost::signals2::signal<void (uint32)> OnFunctionDblClick;
|
|
|
|
boost::signals2::signal<void (void)> OnFunctionsStateChange;
|
2006-06-15 04:19:30 +00:00
|
|
|
|
|
|
|
protected:
|
2012-03-11 20:52:32 +00:00
|
|
|
long OnSize(unsigned int, unsigned int, unsigned int);
|
|
|
|
long OnCommand(unsigned short, unsigned short, HWND);
|
|
|
|
long OnNotify(WPARAM, NMHDR*);
|
|
|
|
long OnSysCommand(unsigned int, LPARAM);
|
2006-06-15 04:19:30 +00:00
|
|
|
|
|
|
|
private:
|
2012-03-11 20:52:32 +00:00
|
|
|
void CreateListColumns();
|
|
|
|
void ResizeListColumns();
|
|
|
|
void RefreshLayout();
|
|
|
|
void RefreshList();
|
|
|
|
void InitializeModuleGrouper();
|
|
|
|
uint32 GetFunctionGroupId(uint32);
|
2007-01-11 02:44:56 +00:00
|
|
|
|
2012-03-11 20:52:32 +00:00
|
|
|
void OnListDblClick();
|
|
|
|
void OnNewClick();
|
|
|
|
void OnRenameClick();
|
|
|
|
void OnDeleteClick();
|
|
|
|
void OnImportClick();
|
2007-01-11 02:44:56 +00:00
|
|
|
|
2012-03-11 20:52:32 +00:00
|
|
|
Framework::Win32::CListView* m_pList;
|
|
|
|
Framework::Win32::CButton* m_pNew;
|
|
|
|
Framework::Win32::CButton* m_pRename;
|
|
|
|
Framework::Win32::CButton* m_pDelete;
|
|
|
|
Framework::Win32::CButton* m_pImport;
|
2007-01-11 02:44:56 +00:00
|
|
|
|
2012-03-11 20:52:32 +00:00
|
|
|
Framework::FlatLayoutPtr m_pLayout;
|
2008-11-30 02:30:05 +00:00
|
|
|
|
2012-03-11 20:52:32 +00:00
|
|
|
boost::signals2::connection m_functionTagsChangeConnection;
|
2008-11-30 02:30:05 +00:00
|
|
|
|
2012-03-11 20:52:32 +00:00
|
|
|
CMIPS* m_pCtx;
|
|
|
|
ModuleList m_modules;
|
|
|
|
ModuleListProvider m_moduleListProvider;
|
2006-06-15 04:19:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|