Mercurial > mercurial > hgweb_golang.cgi
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/kaigo/horori/merger/include/lookwin.h Thu Apr 16 20:59:35 2020 +0900 @@ -0,0 +1,50 @@ +// Filename : lookwin.h +// Last Change: 2020-03-18 17:58:16. +// +#pragma once + +#include <wx/wx.h> + +#include <wx/wx.h> +#include <wx/colour.h> +#include <wx/font.h> +#include <wx/bitmap.h> +#include <wx/image.h> +#include <wx/dcclient.h> + +class LookWindow : public wxWindow +{ + DECLARE_EVENT_TABLE() + private: + int m_x1, m_y1, m_s1, m_t1; // mask1 + int m_x2, m_y2, m_s2, m_t2; // mask2 + + int m_w, m_h, m_dcw, m_dch; + float m_scalex, m_scaley; + + wxString m_file; + wxBitmap m_bitmap; + int m_masknum; + + public: + LookWindow(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL); + ~LookWindow(); + + void OnPaint(wxPaintEvent& event); + void OnMotion(wxMouseEvent& event); + void OnLeftDown(wxMouseEvent& event); + void OnRightDown(wxMouseEvent& event); + void OnLeftUp(wxMouseEvent& event); + void OnRightUp(wxMouseEvent& event); + + void SetDefaultFile(wxString file){m_file = file;}; + void SetDefaultParams(wxRect r, int n); + + void LoadImage(wxString file); + void ReloadImage(); + void SetMaskLoc(wxRect loc1, wxRect loc2); + void GetMaskLoc(int n, wxString* x, wxString* y, wxString* w, wxString* h); + void DoMask1(); + void DoMask2(); +}; +