annotate include/custom.h @ 0:2f5584f0d127

first commit.
author pyon@macmini
date Sat, 08 Jun 2019 16:21:40 +0900
parents
children f40a65687079
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
1 // Filename : custom.h
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
2 // Last Change: 2019-06-07 ‹à 16:39:35.
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
3 //
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
4 #pragma once
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
5
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
6 #include <wx/wx.h>
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
7 #include <wx/colour.h>
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
8 #include <wx/font.h>
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
9 #include <wx/bitmap.h>
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
10 #include <wx/image.h>
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
11 #include <wx/spinctrl.h>
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
12 #include "wx/dcclient.h"
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
13
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
14 class LookWindow : public wxWindow
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
15 {
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
16 DECLARE_EVENT_TABLE()
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
17 private:
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
18 int m_x0, m_y0, m_w0, m_h0; // default mask1 rect
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
19 int m_x1, m_y1, m_x2, m_y2; // variable mask1 rect
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
20
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
21 int m_s0, m_t0, m_u0, m_v0; // default mask2 rect
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
22 int m_s1, m_t1, m_s2, m_t2; // variable mask2 rect
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
23
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
24 int m_w, m_h, m_dcw, m_dch;
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
25 int m_scalex, m_scaley;
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
26
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
27 wxSpinCtrl *m_spnx, *m_spny, *m_spnw, *m_spnh;
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
28
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
29 wxString m_file;
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
30 wxBitmap m_bitmap;
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
31 int m_masknum = 1;
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
32
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
33 public:
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
34 LookWindow( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxTAB_TRAVERSAL );
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
35 ~LookWindow();
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
36
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
37 void OnPaint( wxPaintEvent& event );
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
38 void OnMotion( wxMouseEvent& event );
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
39 void OnLeftDown( wxMouseEvent& event );
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
40 void OnLeftUp( wxMouseEvent& event );
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
41 void OnRightDown( wxMouseEvent& event );
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
42 void OnRightUp( wxMouseEvent& event );
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
43
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
44 void SetDefaultParams( int i, int w, int h, int dcw, int dch );
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
45 void AddMask( void );
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
46 void SetFile( wxString file ) { m_file = file; };
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
47 void AssignSpinControl( wxSpinCtrl* spnx, wxSpinCtrl* spny, wxSpinCtrl* spnw, wxSpinCtrl* spnh );
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
48
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
49 void LoadImage( void );
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
50 void ReloadImage( void );
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
51 void ResetMask1( void );
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
52 void ResetMask2( void );
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
53 void DoMask1( void );
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
54 void DoMask2( void );
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
55 wxRect GetRealMask1Rect( void );
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
56 wxRect GetRealMask2Rect( void );
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
57 };
2f5584f0d127 first commit.
pyon@macmini
parents:
diff changeset
58