Mercurial > mercurial > hgweb_kaigo.hg.cgi
comparison horori/searcher/include/searcher.h @ 0:aaaa401818a1 draft
first commit.
author | pyon <pyon@macmini> |
---|---|
date | Mon, 24 May 2021 21:32:58 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:aaaa401818a1 |
---|---|
1 // Filename : searcher.h | |
2 // Last Change: 2021-05-11 火 12:42:07. | |
3 // | |
4 #pragma once | |
5 | |
6 #include <wx/artprov.h> | |
7 #include <wx/xrc/xmlres.h> | |
8 #include <wx/string.h> | |
9 #include <wx/stattext.h> | |
10 #include <wx/gdicmn.h> | |
11 #include <wx/font.h> | |
12 #include <wx/colour.h> | |
13 #include <wx/settings.h> | |
14 #include <wx/listctrl.h> | |
15 #include <wx/bitmap.h> | |
16 #include <wx/image.h> | |
17 #include <wx/icon.h> | |
18 #include <wx/button.h> | |
19 #include <wx/sizer.h> | |
20 #include <wx/frame.h> | |
21 #include <wx/dataview.h> | |
22 #include <wx/statbmp.h> | |
23 #include <wx/textctrl.h> | |
24 #include <wx/dateevt.h> | |
25 #include <wx/notebook.h> | |
26 #include <wx/srchctrl.h> | |
27 #include <wx/statline.h> | |
28 #include <wx/datectrl.h> | |
29 #include <wx/filepicker.h> | |
30 #include <wx/spinctrl.h> | |
31 #include <wx/choice.h> | |
32 #include <wx/listbox.h> | |
33 #include <wx/checkbox.h> | |
34 #include <wx/gauge.h> | |
35 #include <wx/scrolwin.h> | |
36 #include <wx/gbsizer.h> | |
37 | |
38 class SearchFrame; | |
39 | |
40 class MyStaticBitmap : public wxStaticBitmap | |
41 { | |
42 private: | |
43 int m_dragx, m_dragy; // for image drag | |
44 int cx, cy; // for mouse-gesture | |
45 //bool with_stl = false; | |
46 wxScrolledWindow* m_parent; | |
47 wxNotebook* m_parent1; | |
48 SearchFrame* m_parent2; | |
49 | |
50 public: | |
51 int zoom = 0; | |
52 | |
53 public: | |
54 MyStaticBitmap(wxScrolledWindow *parent, wxWindowID id, const wxBitmap &label, const wxPoint &pos, const wxSize &size, long style, const wxString &name); | |
55 ~MyStaticBitmap(); | |
56 | |
57 void OnLeftDown(wxMouseEvent& event); | |
58 void OnLeftUp(wxMouseEvent& event); | |
59 void OnLeftDClick(wxMouseEvent& event); | |
60 void OnRightDClick(wxMouseEvent& event); | |
61 void OnStartRGesture(wxMouseEvent& event); | |
62 void OnEndRGesture(wxMouseEvent& event); | |
63 void OnMotion(wxMouseEvent& event); | |
64 void OnWheel(wxMouseEvent& event); | |
65 | |
66 void ChangeBook(int i); | |
67 void SetParentWidows(SearchFrame *sf, wxNotebook *nb) {m_parent2 = sf; m_parent1 = nb;}; | |
68 void ParentWinGetSize(int *ww, int *wh) {m_parent->GetSize(ww, wh);}; | |
69 void ParentWinScroll(int x, int y) {m_parent->Scroll(x, y);}; | |
70 void ParentWinSetScrollbars(int x, int y, int s, int t) {m_parent->SetScrollbars(x, y, s, t);}; | |
71 }; | |
72 | |
73 class SearchFrame : public wxFrame | |
74 { | |
75 private: | |
76 wxString m_workdir; | |
77 wxString m_hhscsv; | |
78 wxString m_addr, m_port; | |
79 wxRect m_mask1, m_mask2, m_mask3, m_mask4; | |
80 int m_searchmode; | |
81 wxList m_hist; | |
82 wxString m_user, m_usergroup; | |
83 | |
84 MyStaticBitmap* m_staticBitmap1; | |
85 MyStaticBitmap* m_staticBitmap2; | |
86 MyStaticBitmap* m_staticBitmap3; | |
87 MyStaticBitmap* m_staticBitmap4; | |
88 MyStaticBitmap* m_staticBitmap5; | |
89 | |
90 protected: | |
91 wxNotebook* m_notebook; | |
92 | |
93 wxScrolledWindow* m_scrolledWindow1; | |
94 wxScrolledWindow* m_scrolledWindow2; | |
95 wxScrolledWindow* m_scrolledWindow3; | |
96 wxScrolledWindow* m_scrolledWindow4; | |
97 wxScrolledWindow* m_scrolledWindow5; | |
98 wxPanel* m_panelBatch; | |
99 wxPanel* m_panelMainte; | |
100 | |
101 // Batch-Print | |
102 wxFilePickerCtrl* m_filePicker; | |
103 wxButton* m_buttonRead; | |
104 wxDataViewListCtrl* m_dataViewListCtrlBatch; | |
105 wxDataViewColumn* m_dataViewListColumnBPNo; | |
106 wxDataViewColumn* m_dataViewListColumnBPHno; | |
107 wxDataViewColumn* m_dataViewListColumnBPName; | |
108 wxDataViewColumn* m_dataViewListColumnBPDate; | |
109 wxDataViewColumn* m_dataViewListColumnOnlyIk; | |
110 wxDataViewColumn* m_dataViewListColumnProgress; | |
111 wxDataViewColumn* m_dataViewListColumnDummy; | |
112 | |
113 // Mainte(Index) | |
114 wxStaticText* m_staticTextIndex; | |
115 wxStaticText* m_staticTextDrive; | |
116 wxStaticText* m_staticTextYear; | |
117 wxStaticText* m_staticTextDate; | |
118 wxStaticText* m_staticTextCcn; | |
119 wxStaticText* m_staticTextData; | |
120 | |
121 wxStaticText* m_staticTextDB; | |
122 wxChoice* m_choiceIdxYear; | |
123 wxDataViewListCtrl* m_dataViewListCtrlIdxDate; | |
124 wxDataViewColumn* m_dataViewListColumnIdxDateNo; | |
125 wxDataViewColumn* m_dataViewListColumnIdxDate; | |
126 wxStaticText* m_staticTextIdxCcn; | |
127 wxDataViewListCtrl* m_dataViewListCtrlIdx; | |
128 wxDataViewColumn* m_dataViewListColumnIdxNo; | |
129 wxDataViewColumn* m_dataViewListColumnIdxHno; | |
130 wxDataViewColumn* m_dataViewListColumnIdxName; | |
131 // - | |
132 wxChoice* m_choiceDrv; | |
133 wxChoice* m_choiceDrvYear; | |
134 wxDataViewListCtrl* m_dataViewListCtrlDrvDate; | |
135 wxDataViewColumn* m_dataViewListColumnDrvDateNo; | |
136 wxDataViewColumn* m_dataViewListColumnDrvDate; | |
137 wxDataViewListCtrl* m_dataViewListCtrlDrvCcn; | |
138 wxDataViewColumn* m_dataViewListColumnDrvCcnNo; | |
139 wxDataViewColumn* m_dataViewListColumnDrvCcn; | |
140 wxDataViewListCtrl* m_dataViewListCtrlDrv; | |
141 wxDataViewColumn* m_dataViewListColumnDrvNo; | |
142 wxDataViewColumn* m_dataViewListColumnDrvHno; | |
143 wxDataViewColumn* m_dataViewListColumnDrvName; | |
144 | |
145 wxStaticLine* m_staticline1; | |
146 | |
147 wxStaticText* m_staticTextDBmainte; | |
148 wxStaticText* m_staticTextHhsDB; | |
149 wxFilePickerCtrl* m_filePickerHhsDB; | |
150 wxButton* m_buttonRegHhs; | |
151 wxTextCtrl* m_textCtrlLastHhsDB; | |
152 | |
153 wxStaticText* m_staticTextRegImg; | |
154 wxDatePickerCtrl* m_datePicker; | |
155 wxButton* m_buttonRegImg; | |
156 wxTextCtrl* m_textCtrlLastIndex; | |
157 | |
158 wxStaticText* m_staticTextCSV; | |
159 wxFilePickerCtrl* m_filePickerCSV; | |
160 wxButton* m_buttonCSV; | |
161 | |
162 wxStaticLine* m_staticline2; | |
163 | |
164 wxStaticText* m_staticTextVersion; | |
165 wxTextCtrl* m_textCtrlVersion; | |
166 | |
167 // Setup | |
168 wxPanel* m_panelSetup; | |
169 wxDataViewListCtrl* m_dataViewListCtrlPw; | |
170 wxDataViewColumn* m_dataViewListColumnUId; | |
171 wxDataViewColumn* m_dataViewListColumnUName; | |
172 wxDataViewColumn* m_dataViewListColumnUGroup; | |
173 wxDataViewColumn* m_dataViewListColumnUPw; | |
174 wxTextCtrl* m_textCtrlUPassword; | |
175 wxButton* m_buttonPw; | |
176 | |
177 // Right-Pane | |
178 wxSearchCtrl* m_searchCtrl; | |
179 wxButton* m_buttonPaste; | |
180 wxTextCtrl* m_textCtrlName; | |
181 wxTextCtrl* m_textCtrlAddr; | |
182 wxDataViewListCtrl* m_dataViewListCtrlAny; | |
183 wxDataViewColumn* m_dataViewListColumnAnyNo; | |
184 wxDataViewColumn* m_dataViewListColumnAny1; // ymd, hno, kana | |
185 wxDataViewColumn* m_dataViewListColumnAny2; // -, name, name | |
186 wxDataViewColumn* m_dataViewListColumnAny3; // -, -, addr | |
187 wxDataViewColumn* m_dataViewListColumnAny4; // -, -, hno | |
188 wxCheckBox* m_checkBoxMask; | |
189 wxCheckBox* m_checkBoxBoth; | |
190 wxButton* m_buttonPrint; | |
191 wxSpinCtrl* m_spinCtrl; | |
192 wxGauge* m_gauge; | |
193 wxTextCtrl* m_textCtrlPasswd; | |
194 | |
195 // Virtual event handlers, overide them in your derived class | |
196 virtual void OnPageChanged(wxNotebookEvent& event); | |
197 | |
198 virtual void OnFile(wxFileDirPickerEvent& event); | |
199 virtual void OnRead(wxCommandEvent& event); | |
200 | |
201 virtual void OnSelectBatchListCtrlA(wxKeyEvent& event); | |
202 virtual void OnSelectBatchDClicked(wxDataViewEvent& event); | |
203 | |
204 virtual void OnIdxYearChoice(wxCommandEvent& event); | |
205 virtual void OnIdxDateSelected(wxDataViewEvent& event); | |
206 virtual void OnIdxDClicked(wxDataViewEvent& event); | |
207 | |
208 virtual void OnDrvYearChoice(wxCommandEvent& event); | |
209 virtual void OnDrvDateSelected(wxDataViewEvent& event); | |
210 virtual void OnDrvDateDClicked(wxDataViewEvent& event); | |
211 virtual void OnDrvCcnSelected(wxDataViewEvent& event); | |
212 virtual void OnDrvCcnDClicked(wxDataViewEvent& event); | |
213 virtual void OnDrvDClicked(wxDataViewEvent& event); | |
214 | |
215 virtual void OnUploadHhsDB(wxCommandEvent& event); | |
216 virtual void OnUploadImage(wxCommandEvent& event); | |
217 virtual void OnDB2CSV(wxCommandEvent& event); | |
218 | |
219 virtual void OnUPassword(wxCommandEvent& event); | |
220 virtual void OnSavePw(wxCommandEvent& event); | |
221 | |
222 virtual void OnChar(wxKeyEvent& event); | |
223 virtual void OnPaste(wxCommandEvent& event); | |
224 virtual void OnSelectAnyListItem(wxDataViewEvent& event); | |
225 virtual void OnPrint(wxCommandEvent& event); | |
226 virtual void OnPassword(wxCommandEvent& event); | |
227 | |
228 virtual void OnClose(wxCloseEvent& event); | |
229 | |
230 void CreateControls(); | |
231 void InitializeControlsValue(); | |
232 void SearchByHno(wxString hno); | |
233 void SetHhsInfo(wxString h); | |
234 void SetListAnyHeader(int mode); | |
235 void SetImages(); | |
236 void LoadBookImage(MyStaticBitmap& mysb, wxString file); | |
237 void LoadBookImages(); | |
238 void ReadCSV(); | |
239 void LoadPasswd(bool show); | |
240 void SavePasswd(); | |
241 void RemoveTemp(); | |
242 void MaskImage(); | |
243 void SetVersionInfo(); | |
244 | |
245 public: | |
246 SearchFrame(wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 800,697 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL); | |
247 ~SearchFrame(); | |
248 }; | |
249 |