forked from mapic91/MpcAsfTool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAdjustPositionDialog.h
110 lines (96 loc) · 3.13 KB
/
AdjustPositionDialog.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#ifndef ADJUSTPOSITIONDIALOG_H
#define ADJUSTPOSITIONDIALOG_H
#include "wx/image.h"
//(*Headers(AdjustPositionDialog)
#include <wx/sizer.h>
#include <wx/stattext.h>
#include <wx/checkbox.h>
#include <wx/spinctrl.h>
#include <wx/radiobut.h>
#include <wx/panel.h>
#include <wx/button.h>
#include <wx/dialog.h>
//*)
class AdjustPositionDialog: public wxDialog
{
public:
AdjustPositionDialog(wxWindow* parent,wxWindowID id=wxID_ANY,const wxPoint& pos=wxDefaultPosition,const wxSize& size=wxDefaultSize);
virtual ~AdjustPositionDialog();
private:
//(*Declarations(AdjustPositionDialog)
wxButton* Button_Ok;
wxRadioButton* RadioButton_yyxj;
wxSpinCtrl* SpinCtrl_PicY;
wxStaticText* StaticText2;
wxSpinCtrl* SpinCtrl_OffX;
wxRadioButton* RadioButton_j2;
wxSpinCtrl* SpinCtrl_PicX;
wxButton* Button_Cancle;
wxStaticText* StaticText1;
wxStaticText* StaticText3;
wxPanel* Panel_Show;
wxCheckBox* CheckBox_LockCurrentFrame;
wxSpinCtrl* SpinCtrl_OffY;
wxStaticText* StaticText4;
//*)
void RedrawShow(){Panel_Show->Refresh();Panel_Show->Update();}
protected:
//(*Identifiers(AdjustPositionDialog)
static const long ID_PANEL1;
static const long ID_RADIOBUTTON1;
static const long ID_RADIOBUTTON2;
static const long ID_STATICTEXT2;
static const long ID_SPINCTRL2;
static const long ID_STATICTEXT1;
static const long ID_SPINCTRL1;
static const long ID_STATICTEXT3;
static const long ID_SPINCTRL3;
static const long ID_STATICTEXT4;
static const long ID_SPINCTRL4;
static const long ID_CHECKBOX1;
static const long ID_BUTTON1;
static const long ID_BUTTON2;
//*)
public:
//(*Handlers(AdjustPositionDialog)
void OnRadioButton_yyxjSelect(wxCommandEvent& event);
void OnRadioButton_j2Select(wxCommandEvent& event);
void OnSpinCtrl_OffXChange(wxSpinEvent& event);
void OnSpinCtrl_OffYChange(wxSpinEvent& event);
void OnButton_OkClick(wxCommandEvent& event);
void OnButton_CancleClick(wxCommandEvent& event);
void OnSpinCtrl_PicXChange(wxSpinEvent& event);
void OnSpinCtrl_PicYChange(wxSpinEvent& event);
//*)
void OnDraw(wxPaintEvent& event);
void OnSize(wxSizeEvent& event)
{
if(Panel_Show != NULL && this->IsShown())
{
Panel_Show->Refresh();
Panel_Show->Update();
}
event.Skip();
}
void AssignValue(int offx, int offy, int picx, int picy, bool ispicoffsetlocked)
{
SpinCtrl_OffX->SetValue(offx);
SpinCtrl_OffY->SetValue(offy);
SpinCtrl_PicX->SetValue(picx);
SpinCtrl_PicY->SetValue(picy);
m_PicX = picx;
m_PicY = picy;
CheckBox_LockCurrentFrame->SetValue(ispicoffsetlocked);
}
void SetShowImage(wxImage img) {m_img = img;}
int GetOffX() const {return SpinCtrl_OffX->GetValue();}
int GetOffY() const {return SpinCtrl_OffY->GetValue();}
int GetPicX() const {return SpinCtrl_PicX->GetValue();}
int GetPicY() const {return SpinCtrl_PicY->GetValue();}
bool IsLockCurrentFrame() {return CheckBox_LockCurrentFrame->GetValue();}
private:
wxImage m_img;
int m_PicX, m_PicY; // m_img is alread moved
DECLARE_EVENT_TABLE()
};
#endif