annotate src/bprint.cpp @ 0:615a15029602 default tip

first commit.
author pyon@macmini
date Sun, 10 Nov 2019 08:39:41 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
1 /* Filename : bprint.cpp
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
2 Last Change: 2019-11-08 金 14:22:36.
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
3 by Takayuki Mutoh
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
4 */
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
5 #include "bprint.h"
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
6
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
7 BPrintFrame::BPrintFrame(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style)
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
8 : wxFrame(parent, id, title, pos, size, style)
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
9 {
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
10 this->SetSizeHints(wxDefaultSize, wxDefaultSize);
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
11 this->SetBackgroundColour(wxColour(245, 195, 240));
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
12
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
13 wxGridBagSizer* gbSizer;
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
14 gbSizer = new wxGridBagSizer(0, 0);
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
15 gbSizer->SetFlexibleDirection(wxBOTH);
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
16 gbSizer->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
17
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
18 m_dataViewListCtrl = new wxDataViewListCtrl(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0);
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
19 m_dataViewListColumnNo = m_dataViewListCtrl->AppendTextColumn(wxT("No "), wxDATAVIEW_CELL_INERT, 40, static_cast<wxAlignment>(wxALIGN_RIGHT), wxDATAVIEW_COL_RESIZABLE);
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
20 m_dataViewListColumnHhs = m_dataViewListCtrl->AppendTextColumn(wxT("被保番"), wxDATAVIEW_CELL_INERT, 80, static_cast<wxAlignment>(wxALIGN_CENTER), wxDATAVIEW_COL_RESIZABLE);
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
21 m_dataViewListColumnName = m_dataViewListCtrl->AppendTextColumn(wxT(" 氏名"), wxDATAVIEW_CELL_INERT, 120, static_cast<wxAlignment>(wxALIGN_LEFT), wxDATAVIEW_COL_RESIZABLE);
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
22 m_dataViewListColumnDir = m_dataViewListCtrl->AppendTextColumn(wxT(" 場所"), wxDATAVIEW_CELL_INERT, 200, static_cast<wxAlignment>(wxALIGN_LEFT), wxDATAVIEW_COL_RESIZABLE);
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
23 m_dataViewListColumnSet = m_dataViewListCtrl->AppendTextColumn(wxT("設定"), wxDATAVIEW_CELL_INERT, 20, static_cast<wxAlignment>(wxALIGN_CENTER), wxDATAVIEW_COL_RESIZABLE);
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
24 m_dataViewListColumnMask = m_dataViewListCtrl->AppendToggleColumn(wxT("マスク"), wxDATAVIEW_CELL_INERT, 20, static_cast<wxAlignment>(wxALIGN_CENTER), wxDATAVIEW_COL_RESIZABLE);
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
25 m_dataViewListColumnStat = m_dataViewListCtrl->AppendProgressColumn(wxT("状態"), wxDATAVIEW_CELL_INERT, 80, static_cast<wxAlignment>(wxALIGN_LEFT), wxDATAVIEW_COL_RESIZABLE);
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
26 gbSizer->Add(m_dataViewListCtrl, wxGBPosition(0, 0), wxGBSpan(3, 1), wxALL|wxEXPAND, 5);
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
27
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
28 m_buttonAdd = new wxButton(this, ID_BP_ADD, wxT("追加"), wxDefaultPosition, wxDefaultSize, 0);
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
29 gbSizer->Add(m_buttonAdd, wxGBPosition(0, 1), wxGBSpan(1, 1), wxALL|wxALIGN_CENTER_VERTICAL, 5);
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
30
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
31 m_buttonDel = new wxButton(this, ID_BP_DEL, wxT("削除"), wxDefaultPosition, wxDefaultSize, 0);
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
32 gbSizer->Add(m_buttonDel, wxGBPosition(1, 1), wxGBSpan(1, 1), wxALL|wxALIGN_CENTER_VERTICAL, 5);
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
33
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
34 m_buttonPrint = new wxButton(this, ID_BP_PRINT, wxT("印刷"), wxDefaultPosition, wxDefaultSize, 0);
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
35 gbSizer->Add(m_buttonPrint, wxGBPosition(2, 1), wxGBSpan(1, 1), wxALL|wxALIGN_CENTER_VERTICAL, 5);
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
36
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
37
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
38 gbSizer->AddGrowableCol(0);
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
39 gbSizer->AddGrowableRow(2);
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
40
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
41 this->SetSizer(gbSizer);
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
42 this->Layout();
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
43
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
44 this->Centre(wxBOTH);
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
45
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
46 // Connect Events
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
47 m_buttonAdd->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(BPrintFrame::OnAdd), NULL, this);
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
48 m_buttonDel->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(BPrintFrame::OnDelete), NULL, this);
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
49 m_buttonPrint->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(BPrintFrame::OnPrint), NULL, this);
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
50 }
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
51
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
52 BPrintFrame::~BPrintFrame()
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
53 {
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
54 // Disconnect Events
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
55 m_buttonAdd->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(BPrintFrame::OnAdd), NULL, this);
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
56 m_buttonDel->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(BPrintFrame::OnDelete), NULL, this);
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
57 m_buttonPrint->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(BPrintFrame::OnPrint), NULL, this);
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
58
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
59 }
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
60
615a15029602 first commit.
pyon@macmini
parents:
diff changeset
61