Mercurial > mercurial > hgweb_golang.cgi
comparison src/kaigo/horori/merger/include/lookwin.h @ 45:20b42e2deae1
add alloc, (new)mover, merger & (new)searcher.
author | pyon@macmini |
---|---|
date | Thu, 16 Apr 2020 20:59:35 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
44:b50f2a581cf8 | 45:20b42e2deae1 |
---|---|
1 // Filename : lookwin.h | |
2 // Last Change: 2020-03-18 17:58:16. | |
3 // | |
4 #pragma once | |
5 | |
6 #include <wx/wx.h> | |
7 | |
8 #include <wx/wx.h> | |
9 #include <wx/colour.h> | |
10 #include <wx/font.h> | |
11 #include <wx/bitmap.h> | |
12 #include <wx/image.h> | |
13 #include <wx/dcclient.h> | |
14 | |
15 class LookWindow : public wxWindow | |
16 { | |
17 DECLARE_EVENT_TABLE() | |
18 private: | |
19 int m_x1, m_y1, m_s1, m_t1; // mask1 | |
20 int m_x2, m_y2, m_s2, m_t2; // mask2 | |
21 | |
22 int m_w, m_h, m_dcw, m_dch; | |
23 float m_scalex, m_scaley; | |
24 | |
25 wxString m_file; | |
26 wxBitmap m_bitmap; | |
27 int m_masknum; | |
28 | |
29 public: | |
30 LookWindow(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL); | |
31 ~LookWindow(); | |
32 | |
33 void OnPaint(wxPaintEvent& event); | |
34 void OnMotion(wxMouseEvent& event); | |
35 void OnLeftDown(wxMouseEvent& event); | |
36 void OnRightDown(wxMouseEvent& event); | |
37 void OnLeftUp(wxMouseEvent& event); | |
38 void OnRightUp(wxMouseEvent& event); | |
39 | |
40 void SetDefaultFile(wxString file){m_file = file;}; | |
41 void SetDefaultParams(wxRect r, int n); | |
42 | |
43 void LoadImage(wxString file); | |
44 void ReloadImage(); | |
45 void SetMaskLoc(wxRect loc1, wxRect loc2); | |
46 void GetMaskLoc(int n, wxString* x, wxString* y, wxString* w, wxString* h); | |
47 void DoMask1(); | |
48 void DoMask2(); | |
49 }; | |
50 |