Mercurial > mercurial > hgweb_rsearcher.cgi
diff src/batchprint.cpp @ 16:b651aa41b9d4 default tip
hhsinfo method (server)
author | pyon@macmini |
---|---|
date | Mon, 15 Jul 2019 07:03:05 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/batchprint.cpp Mon Jul 15 07:03:05 2019 +0900 @@ -0,0 +1,91 @@ +// Filename : batchprint.h +// Last Change: 2019-07-09 ‰Î 08:16:04. +// + +#include "id.h" +#include "batchprint.h" + +BatchPrintFrame::BatchPrintFrame( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) + : wxFrame( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + this->SetBackgroundColour( wxColour( 0, 0, 0 ) ); + + wxBoxSizer* bSizerTop = new wxBoxSizer( wxHORIZONTAL ); + + wxGridBagSizer* gbSizer; + gbSizer = new wxGridBagSizer( 0, 0 ); + gbSizer->SetFlexibleDirection( wxBOTH ); + gbSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + // Head + m_staticText = new wxStaticText( this, wxID_ANY, wxT("Excel File"), wxDefaultPosition, wxDefaultSize, 0 ); + gbSizer->Add( m_staticText, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); + + 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 ); + gbSizer->Add( m_filePicker, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_buttonLoad = new wxButton( this, ID_LOAD, wxT("Load"), wxDefaultPosition, wxDefaultSize, 0 ); + gbSizer->Add( m_buttonLoad, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + // Left + m_dataViewListCtrl = new wxDataViewListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); + m_dataViewListColumnCheck = m_dataViewListCtrl->AppendToggleColumn( wxT("Check"), wxDATAVIEW_CELL_INERT, -1, static_cast<wxAlignment>(wxALIGN_CENTER), wxDATAVIEW_COL_RESIZABLE ); + m_dataViewListColumnNo = m_dataViewListCtrl->AppendTextColumn( wxT("No"), wxDATAVIEW_CELL_INERT, 60, static_cast<wxAlignment>(wxALIGN_RIGHT), wxDATAVIEW_COL_RESIZABLE ); + m_dataViewListColumnHno = m_dataViewListCtrl->AppendTextColumn( wxT("Hno"), wxDATAVIEW_CELL_INERT, 100, static_cast<wxAlignment>(wxALIGN_CENTER), wxDATAVIEW_COL_RESIZABLE ); + m_dataViewListColumnName = m_dataViewListCtrl->AppendTextColumn( wxT("Name"), wxDATAVIEW_CELL_INERT, 200, static_cast<wxAlignment>(wxALIGN_LEFT), wxDATAVIEW_COL_RESIZABLE ); + m_dataViewListColumnKana = m_dataViewListCtrl->AppendTextColumn( wxT("Kana"), wxDATAVIEW_CELL_INERT, 200, static_cast<wxAlignment>(wxALIGN_LEFT), wxDATAVIEW_COL_RESIZABLE ); + m_dataViewListColumnStatus = m_dataViewListCtrl->AppendProgressColumn( wxT("Status"), wxDATAVIEW_CELL_INERT, -1, static_cast<wxAlignment>(wxALIGN_LEFT), wxDATAVIEW_COL_RESIZABLE ); + gbSizer->Add( m_dataViewListCtrl, wxGBPosition( 1, 0 ), wxGBSpan( 1, 3 ), wxALL|wxEXPAND, 5 ); + + bSizerTop->Add( gbSizer, 1, wxEXPAND, 5 ); + + // Right + wxBoxSizer* bSizerButton = new wxBoxSizer( wxVERTICAL ); + + m_buttonMaskPrint = new wxButton( this, ID_MANDP, wxT("Mask & Print"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizerButton->Add( m_buttonMaskPrint, 0, wxALL, 5 ); + + m_buttonPrint = new wxButton( this, wxID_PRINT, wxT("Print"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizerButton->Add( m_buttonPrint, 0, wxALL, 5 ); + + bSizerButton->Add( 0, 30, 0, 0, 5 ); + + m_buttonUnCheckAll = new wxButton( this, ID_UNCHECKALL, wxT("UnCheck All"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizerButton->Add( m_buttonUnCheckAll, 0, wxALL, 5 ); + + m_buttonCheckAll = new wxButton( this, ID_CHECKALL, wxT("Check All"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizerButton->Add( m_buttonCheckAll, 0, wxALL, 5 ); + + bSizerButton->Add( 0, 50, 1, wxEXPAND, 5 ); + + m_buttonClear = new wxButton( this, ID_CLEAR, wxT("Clear"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizerButton->Add( m_buttonClear, 0, wxALL, 5 ); + + m_buttonDel = new wxButton( this, ID_DELETE, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizerButton->Add( m_buttonDel, 0, wxALL, 5 ); + + bSizerButton->Add( 0, 0, 1, wxEXPAND, 5 ); + + m_buttonClose = new wxButton( this, wxID_CLOSE, wxT("Close"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizerButton->Add( m_buttonClose, 0, wxALL, 5 ); + + + bSizerTop->Add( bSizerButton, 0, wxEXPAND, 5 ); + + + this->SetSizer( bSizerTop ); + this->Layout(); + + this->Centre( wxBOTH ); +} + +BatchPrintFrame::~BatchPrintFrame() +{ +} + +// Event Table +BEGIN_EVENT_TABLE( BatchPrintFrame, wxFrame ) +END_EVENT_TABLE() + +// Event Handlers & Functions