Mercurial > mercurial > hgweb_mover2.cgi
comparison src/myframe.cpp @ 2:e4ba3cc9b4b1
large view ok.
author | pyon@macmini |
---|---|
date | Sat, 15 Oct 2011 22:03:00 +0900 |
parents | b47bd4618c16 |
children | 870860d435a1 |
comparison
equal
deleted
inserted
replaced
1:b47bd4618c16 | 2:e4ba3cc9b4b1 |
---|---|
167 EVT_BUTTON( ID_BUTTONMD, MyFrame::OnMoveAndDetect ) | 167 EVT_BUTTON( ID_BUTTONMD, MyFrame::OnMoveAndDetect ) |
168 //EVT_BUTTON( ID_BUTTONDEL, MyFrame::Delete ) | 168 //EVT_BUTTON( ID_BUTTONDEL, MyFrame::Delete ) |
169 //EVT_BUTTON( ID_BUTTONUNDO, MyFrame::Undo ) | 169 //EVT_BUTTON( ID_BUTTONUNDO, MyFrame::Undo ) |
170 //EVT_LIST_ITEM_MIDDLE_CLICK( ID_LISTCTRLVIEW, MyFrame::ToggleSelect ) | 170 //EVT_LIST_ITEM_MIDDLE_CLICK( ID_LISTCTRLVIEW, MyFrame::ToggleSelect ) |
171 EVT_LIST_ITEM_RIGHT_CLICK( ID_LISTCTRLVIEW, MyFrame::ToggleSelect ) | 171 EVT_LIST_ITEM_RIGHT_CLICK( ID_LISTCTRLVIEW, MyFrame::ToggleSelect ) |
172 //EVT_LIST_ITEM_ACTIVATED( ID_LIST, MyFrame::OnOpenHhsDir ) | 172 EVT_LIST_ITEM_ACTIVATED( ID_LISTCTRLVIEW, MyFrame::ViewLarge ) |
173 EVT_CLOSE( MyFrame::SaveConfig ) | 173 EVT_CLOSE( MyFrame::SaveConfig ) |
174 END_EVENT_TABLE() | 174 END_EVENT_TABLE() |
175 | 175 |
176 // Event Handlers | 176 // Event Handlers |
177 /* 移動先フォルダ作成 */ | 177 /* 移動先フォルダ作成 */ |
304 } | 304 } |
305 | 305 |
306 /* 画像を選択 */ | 306 /* 画像を選択 */ |
307 void MyFrame::ToggleSelect(wxListEvent& event) | 307 void MyFrame::ToggleSelect(wxListEvent& event) |
308 { | 308 { |
309 SetStatusText( wxEmptyString, 1 ); | |
310 int i = event.GetIndex(); | |
311 wxListItem item; | |
312 item.SetId(i); | |
313 | |
314 //item.SetMask(wxLIST_MASK_STATE); | |
315 if ( item.GetState() & wxLIST_STATE_SELECTED ) { | |
316 wxMessageBox(wxT("a")); | |
317 item.SetState(~wxLIST_STATE_SELECTED); | |
318 } | |
319 else { | |
320 item.SetStateMask(wxLIST_STATE_SELECTED); | |
321 wxString filename = event.GetText(); | |
322 wxString workdir = m_dirPickerWork->GetPath(); | |
323 wxString imagefile = workdir + wxFILE_SEP_PATH + filename; | |
324 float b; long l; | |
325 if ( IsMarksheet( imagefile, &b, &l ) ) { | |
326 SetStatusText( wxString::Format(wxT("z = %f, l = %d"),b,l), 1 ); | |
327 } | |
328 } | |
329 m_listCtrlView->SetItem( item ); | |
330 } | |
331 | |
332 /* 画像のスクリーン表示*/ | |
333 void MyFrame::ViewLarge(wxListEvent& event) | |
334 { | |
335 int i = event.GetIndex(); | |
336 wxListItem item; | |
337 item.SetId(i); | |
338 | |
339 wxString filename = event.GetText(); | |
340 wxString workdir = m_dirPickerWork->GetPath(); | |
341 wxString imagefile = workdir + wxFILE_SEP_PATH + filename; | |
342 | |
343 wxImage image( imagefile, wxBITMAP_TYPE_JPEG ); | |
344 wxBitmap bmp( image.Scale( 707, 1000, wxIMAGE_QUALITY_HIGH ) ); | |
345 wxSplashScreen* splash = new wxSplashScreen( bmp, | |
346 wxSPLASH_CENTRE_ON_SCREEN|wxSPLASH_TIMEOUT, | |
347 3000, NULL, -1, wxDefaultPosition, wxDefaultSize, | |
348 wxSIMPLE_BORDER|wxSTAY_ON_TOP ); | |
349 wxYield(); | |
309 } | 350 } |
310 | 351 |
311 /* パラメータダイアログ */ | 352 /* パラメータダイアログ */ |
312 void MyFrame::OnParam(wxCommandEvent& WXUNUSED(event)) | 353 void MyFrame::OnParam(wxCommandEvent& WXUNUSED(event)) |
313 { | 354 { |