-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBasicDrawPane.h
executable file
·50 lines (37 loc) · 1.07 KB
/
BasicDrawPane.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
//
// Created by rostam on 15.10.19.
//
#ifndef CGTEA_BASICDRAWPANE_H
#define CGTEA_BASICDRAWPANE_H
#include <wx/wxprec.h>
#ifndef WX_PRECOMP
#include <wx/wx.h>
#include <wx/sizer.h>
#include "datatypes.h"
#include <string>
#endif
#include <exception>
#include <wx/graphics.h>
#include <map>
class BasicDrawPane : public wxPanel
{
public:
std::map<int, wxColour> distinctColors;
BasicDrawPane(wxWindow* parent);
void paintEvent(wxPaintEvent & evt);
void paintNow();
void render(wxPaintDC& dc);
void drawEdges(const Graph &g, wxGraphicsContext* gc);
void drawVertices(const Graph &g, wxGraphicsContext* gc);
// some useful events
void mouseMoved(wxMouseEvent& event);
void mouseDown(wxMouseEvent& event);
void mouseWheelMoved(wxMouseEvent& event);
void mouseReleased(wxMouseEvent& event);
void rightClick(wxMouseEvent& event);
void mouseLeftWindow(wxMouseEvent& event);
void keyPressed(wxKeyEvent& event);
void keyReleased(wxKeyEvent& event);
DECLARE_EVENT_TABLE()
};
#endif //CGTEA_BASICDRAWPANE_H