-
Notifications
You must be signed in to change notification settings - Fork 15
/
HexView.h
47 lines (34 loc) · 845 Bytes
/
HexView.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
#ifndef HexView__INCLUDED
#define HexView__INCLUDED
#include <wx/control.h>
#include <wx/stream.h>
class HexRowView;
class wxPanel;
class HexView: public wxControl
{
public:
HexView(wxWindow *parent,
wxWindowID winid = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize)
{
Create(parent, winid, pos, size);
}
~HexView();
bool Create(wxWindow *parent,
wxWindowID winid = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize);
void Clear();
bool Load(const void* data, size_t dataSize);
bool Load(wxInputStream& iStr);
private:
wxPanel* m_header;
HexRowView* m_rowView;
unsigned char* m_data;
size_t m_dataSize;
int m_rowsize;
void OnPaintHeader(wxPaintEvent& evt);
friend class HexRowView;
};
#endif // HexView__INCLUDED