-
Notifications
You must be signed in to change notification settings - Fork 0
/
ImageViewer.h
50 lines (37 loc) · 1.17 KB
/
ImageViewer.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
48
49
50
#ifndef IMAGEVIEWER_H
#define IMAGEVIEWER_H
#include <wx/wx.h>
#include <wx/dcclient.h>
#include <wx/dcmemory.h>
#include <wx/dcbuffer.h>
#include "LoadAssetsPanel.h"
#include "Canvas.h"
class ImageViewer : public wxFrame
{
private:
wxBitmap* bitMap = nullptr;
wxPoint m_mousePos;
wxPoint m_mouseDownPos;
wxPoint m_mouseUpPos;
wxRect m_selectedTiles;
bool m_mouseDown = false;
bool m_selected = false;
bool m_activate = false;
int m_tileSize = 0;
void OnPaint(wxPaintEvent& evt);
void OnMouseMove(wxMouseEvent& evt);
void OnMouseClick(wxMouseEvent& evt);
void OnMouseRelease(wxMouseEvent& evt);
void OnActiveWindow(wxActivateEvent& evt);
void DrawMouse(wxDC& dc, int x, int y);
void DrawLines(wxDC& dc, int x, int y);
void DrawMousePosition(wxDC& dc, int x, int y);
void DrawSelection(wxDC& dc, int x, int y);
void DrawSelected(wxDC& dc, int x, int y);
void SetCanvasBitmap();
wxDECLARE_EVENT_TABLE();
public:
ImageViewer(wxString filePath, wxWindow* parent );
~ImageViewer();
};
#endif