16
|
1 // Filename : batchprint.h
|
|
2 // Last Change: 2019-07-09 ‰Î 08:16:04.
|
|
3 //
|
|
4
|
|
5 #include "id.h"
|
|
6 #include "batchprint.h"
|
|
7
|
|
8 BatchPrintFrame::BatchPrintFrame( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style )
|
|
9 : wxFrame( parent, id, title, pos, size, style )
|
|
10 {
|
|
11 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
|
12 this->SetBackgroundColour( wxColour( 0, 0, 0 ) );
|
|
13
|
|
14 wxBoxSizer* bSizerTop = new wxBoxSizer( wxHORIZONTAL );
|
|
15
|
|
16 wxGridBagSizer* gbSizer;
|
|
17 gbSizer = new wxGridBagSizer( 0, 0 );
|
|
18 gbSizer->SetFlexibleDirection( wxBOTH );
|
|
19 gbSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
|
20
|
|
21 // Head
|
|
22 m_staticText = new wxStaticText( this, wxID_ANY, wxT("Excel File"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
23 gbSizer->Add( m_staticText, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
|
|
24
|
|
25 m_filePicker = new wxFilePickerCtrl( this, wxID_ANY, wxEmptyString, wxT("Select a file"), wxT("*.xlsx"), wxDefaultPosition, wxDefaultSize, wxFLP_CHANGE_DIR|wxFLP_FILE_MUST_EXIST|wxFLP_OPEN|wxFLP_SMALL|wxFLP_USE_TEXTCTRL );
|
|
26 gbSizer->Add( m_filePicker, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
|
27
|
|
28 m_buttonLoad = new wxButton( this, ID_LOAD, wxT("Load"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
29 gbSizer->Add( m_buttonLoad, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
|
30
|
|
31 // Left
|
|
32 m_dataViewListCtrl = new wxDataViewListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
|
33 m_dataViewListColumnCheck = m_dataViewListCtrl->AppendToggleColumn( wxT("Check"), wxDATAVIEW_CELL_INERT, -1, static_cast<wxAlignment>(wxALIGN_CENTER), wxDATAVIEW_COL_RESIZABLE );
|
|
34 m_dataViewListColumnNo = m_dataViewListCtrl->AppendTextColumn( wxT("No"), wxDATAVIEW_CELL_INERT, 60, static_cast<wxAlignment>(wxALIGN_RIGHT), wxDATAVIEW_COL_RESIZABLE );
|
|
35 m_dataViewListColumnHno = m_dataViewListCtrl->AppendTextColumn( wxT("Hno"), wxDATAVIEW_CELL_INERT, 100, static_cast<wxAlignment>(wxALIGN_CENTER), wxDATAVIEW_COL_RESIZABLE );
|
|
36 m_dataViewListColumnName = m_dataViewListCtrl->AppendTextColumn( wxT("Name"), wxDATAVIEW_CELL_INERT, 200, static_cast<wxAlignment>(wxALIGN_LEFT), wxDATAVIEW_COL_RESIZABLE );
|
|
37 m_dataViewListColumnKana = m_dataViewListCtrl->AppendTextColumn( wxT("Kana"), wxDATAVIEW_CELL_INERT, 200, static_cast<wxAlignment>(wxALIGN_LEFT), wxDATAVIEW_COL_RESIZABLE );
|
|
38 m_dataViewListColumnStatus = m_dataViewListCtrl->AppendProgressColumn( wxT("Status"), wxDATAVIEW_CELL_INERT, -1, static_cast<wxAlignment>(wxALIGN_LEFT), wxDATAVIEW_COL_RESIZABLE );
|
|
39 gbSizer->Add( m_dataViewListCtrl, wxGBPosition( 1, 0 ), wxGBSpan( 1, 3 ), wxALL|wxEXPAND, 5 );
|
|
40
|
|
41 bSizerTop->Add( gbSizer, 1, wxEXPAND, 5 );
|
|
42
|
|
43 // Right
|
|
44 wxBoxSizer* bSizerButton = new wxBoxSizer( wxVERTICAL );
|
|
45
|
|
46 m_buttonMaskPrint = new wxButton( this, ID_MANDP, wxT("Mask & Print"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
47 bSizerButton->Add( m_buttonMaskPrint, 0, wxALL, 5 );
|
|
48
|
|
49 m_buttonPrint = new wxButton( this, wxID_PRINT, wxT("Print"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
50 bSizerButton->Add( m_buttonPrint, 0, wxALL, 5 );
|
|
51
|
|
52 bSizerButton->Add( 0, 30, 0, 0, 5 );
|
|
53
|
|
54 m_buttonUnCheckAll = new wxButton( this, ID_UNCHECKALL, wxT("UnCheck All"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
55 bSizerButton->Add( m_buttonUnCheckAll, 0, wxALL, 5 );
|
|
56
|
|
57 m_buttonCheckAll = new wxButton( this, ID_CHECKALL, wxT("Check All"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
58 bSizerButton->Add( m_buttonCheckAll, 0, wxALL, 5 );
|
|
59
|
|
60 bSizerButton->Add( 0, 50, 1, wxEXPAND, 5 );
|
|
61
|
|
62 m_buttonClear = new wxButton( this, ID_CLEAR, wxT("Clear"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
63 bSizerButton->Add( m_buttonClear, 0, wxALL, 5 );
|
|
64
|
|
65 m_buttonDel = new wxButton( this, ID_DELETE, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
66 bSizerButton->Add( m_buttonDel, 0, wxALL, 5 );
|
|
67
|
|
68 bSizerButton->Add( 0, 0, 1, wxEXPAND, 5 );
|
|
69
|
|
70 m_buttonClose = new wxButton( this, wxID_CLOSE, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
71 bSizerButton->Add( m_buttonClose, 0, wxALL, 5 );
|
|
72
|
|
73
|
|
74 bSizerTop->Add( bSizerButton, 0, wxEXPAND, 5 );
|
|
75
|
|
76
|
|
77 this->SetSizer( bSizerTop );
|
|
78 this->Layout();
|
|
79
|
|
80 this->Centre( wxBOTH );
|
|
81 }
|
|
82
|
|
83 BatchPrintFrame::~BatchPrintFrame()
|
|
84 {
|
|
85 }
|
|
86
|
|
87 // Event Table
|
|
88 BEGIN_EVENT_TABLE( BatchPrintFrame, wxFrame )
|
|
89 END_EVENT_TABLE()
|
|
90
|
|
91 // Event Handlers & Functions
|