Mercurial > mercurial > hgweb_madnm.cgi
view include/custom.h @ 1:f40a65687079
small fix.
author | pyon@macmini |
---|---|
date | Mon, 10 Jun 2019 05:56:36 +0900 |
parents | 2f5584f0d127 |
children |
line wrap: on
line source
// Filename : custom.h // Last Change: 2019-06-09 Sun 16:57:24. // #pragma once #include <wx/wx.h> #include <wx/colour.h> #include <wx/font.h> #include <wx/bitmap.h> #include <wx/image.h> #include <wx/spinctrl.h> #include <wx/listctrl.h> #include <wx/dcclient.h> #include "util.h" class LookWindow : public wxWindow { DECLARE_EVENT_TABLE() private: int m_x0, m_y0, m_w0, m_h0; // default mask1 rect int m_x1, m_y1, m_x2, m_y2; // variable mask1 rect int m_s0, m_t0, m_u0, m_v0; // default mask2 rect int m_s1, m_t1, m_s2, m_t2; // variable mask2 rect int m_w, m_h, m_dcw, m_dch; int m_scalex, m_scaley; wxSpinCtrl *m_spnx, *m_spny, *m_spnw, *m_spnh; wxString m_file; wxBitmap m_bitmap; int m_masknum = 1; 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 OnLeftUp( wxMouseEvent& event ); void OnRightDown( wxMouseEvent& event ); void OnRightUp( wxMouseEvent& event ); void SetDefaultParams( int i, int w, int h, int dcw, int dch ); void AddMask( void ); void SetFile( wxString file ) { m_file = file; }; void AssignSpinControl( wxSpinCtrl* spnx, wxSpinCtrl* spny, wxSpinCtrl* spnw, wxSpinCtrl* spnh ); void LoadImage( void ); void ReloadImage( void ); void ResetMask1( void ); void ResetMask2( void ); void DoMask1( void ); void DoMask2( void ); wxRect GetRealMask1Rect( void ); wxRect GetRealMask2Rect( void ); }; class ListThumbnail : public wxListView { DECLARE_EVENT_TABLE() private: FileList m_filelist; wxImageList m_imageListZ1; wxImageList m_imageListZ2; wxImageList m_imageListZ3; public: ListThumbnail( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxLC_ICON ); ~ListThumbnail(); int Reload( void ); void SetDirectory( wxString dir ) { m_filelist.SetDirectory( dir ); }; //void OnDClick( wx); };