0
|
1 // Filename : myframe.h
|
4
|
2 // Last Change: 2018-06-05 Tue 21:56:57.
|
0
|
3 //
|
|
4 #ifndef __MYFRAME_H__
|
|
5 #define __MYFRAME_H__
|
|
6
|
|
7 #include <wx/artprov.h>
|
|
8 #include <wx/xrc/xmlres.h>
|
|
9 #include <wx/string.h>
|
|
10 #include <wx/stattext.h>
|
|
11 #include <wx/gdicmn.h>
|
|
12 #include <wx/font.h>
|
|
13 #include <wx/colour.h>
|
|
14 #include <wx/settings.h>
|
|
15 #include <wx/textctrl.h>
|
|
16 #include <wx/sizer.h>
|
|
17 #include <wx/combobox.h>
|
|
18 #include <wx/filepicker.h>
|
|
19 #include <wx/button.h>
|
|
20 #include <wx/statusbr.h>
|
|
21 #include <wx/frame.h>
|
|
22
|
|
23 ///////////////////////////////////////////////////////////////////////////
|
|
24
|
|
25 ///////////////////////////////////////////////////////////////////////////////
|
|
26 /// Class MainFrame
|
|
27 ///////////////////////////////////////////////////////////////////////////////
|
|
28 class MyFrame : public wxFrame
|
|
29 {
|
|
30 DECLARE_EVENT_TABLE()
|
|
31 private:
|
4
|
32 long w, h, s;
|
0
|
33 int choice_type;
|
|
34 wxString out_dir;
|
|
35
|
|
36 protected:
|
|
37 wxStaticText* m_staticTextSource;
|
|
38 wxTextCtrl* m_textCtrlSource;
|
|
39 wxStaticText* m_staticTextConfig;
|
|
40 wxStaticText* m_staticTextType;
|
|
41 wxComboBox* m_comboBoxType;
|
|
42 wxStaticText* m_staticTextSize;
|
|
43 wxStaticText* m_staticTextWidth;
|
|
44 wxTextCtrl* m_textCtrlWidth;
|
|
45 wxStaticText* m_staticTextHeight;
|
|
46 wxTextCtrl* m_textCtrlHeight;
|
4
|
47 wxStaticText* m_staticTextPercent;
|
|
48 wxTextCtrl* m_textCtrlPercent;
|
0
|
49 wxStaticText* m_staticTextOutput;
|
|
50 wxDirPickerCtrl* m_dirPicker;
|
|
51 wxButton* m_buttonExec;
|
|
52 wxButton* m_buttonExit;
|
|
53
|
|
54 public:
|
|
55 MyFrame( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style );
|
|
56 ~MyFrame();
|
|
57 void OnExec( wxCommandEvent& WXUNUSED(event) );
|
|
58 void OnExit( wxCommandEvent& WXUNUSED(event) );
|
|
59 void WarnMessage( wxString msg );
|
|
60 bool ConvertAFile( wxString file );
|
|
61 bool ConvertFiles( wxString dir );
|
|
62 };
|
|
63
|
|
64 enum
|
|
65 {
|
|
66 ID_EXEC = wxID_HIGHEST + 1,
|
|
67 ID_EXIT,
|
|
68 };
|
|
69
|
|
70 #endif //__MYFRAME_H__
|
|
71
|