Mercurial > mercurial > hgweb_mover2.cgi
diff src/myframe.cpp @ 2:e4ba3cc9b4b1
large view ok.
author | pyon@macmini |
---|---|
date | Sat, 15 Oct 2011 22:03:00 +0900 |
parents | b47bd4618c16 |
children | 870860d435a1 |
line wrap: on
line diff
--- a/src/myframe.cpp Sat Oct 15 20:07:12 2011 +0900 +++ b/src/myframe.cpp Sat Oct 15 22:03:00 2011 +0900 @@ -169,7 +169,7 @@ //EVT_BUTTON( ID_BUTTONUNDO, MyFrame::Undo ) //EVT_LIST_ITEM_MIDDLE_CLICK( ID_LISTCTRLVIEW, MyFrame::ToggleSelect ) EVT_LIST_ITEM_RIGHT_CLICK( ID_LISTCTRLVIEW, MyFrame::ToggleSelect ) - //EVT_LIST_ITEM_ACTIVATED( ID_LIST, MyFrame::OnOpenHhsDir ) + EVT_LIST_ITEM_ACTIVATED( ID_LISTCTRLVIEW, MyFrame::ViewLarge ) EVT_CLOSE( MyFrame::SaveConfig ) END_EVENT_TABLE() @@ -306,6 +306,47 @@ /* 画像を選択 */ void MyFrame::ToggleSelect(wxListEvent& event) { + SetStatusText( wxEmptyString, 1 ); + int i = event.GetIndex(); + wxListItem item; + item.SetId(i); + + //item.SetMask(wxLIST_MASK_STATE); + if ( item.GetState() & wxLIST_STATE_SELECTED ) { + wxMessageBox(wxT("a")); + item.SetState(~wxLIST_STATE_SELECTED); + } + else { + item.SetStateMask(wxLIST_STATE_SELECTED); + wxString filename = event.GetText(); + wxString workdir = m_dirPickerWork->GetPath(); + wxString imagefile = workdir + wxFILE_SEP_PATH + filename; + float b; long l; + if ( IsMarksheet( imagefile, &b, &l ) ) { + SetStatusText( wxString::Format(wxT("z = %f, l = %d"),b,l), 1 ); + } + } + m_listCtrlView->SetItem( item ); +} + +/* 画像のスクリーン表示*/ +void MyFrame::ViewLarge(wxListEvent& event) +{ + int i = event.GetIndex(); + wxListItem item; + item.SetId(i); + + wxString filename = event.GetText(); + wxString workdir = m_dirPickerWork->GetPath(); + wxString imagefile = workdir + wxFILE_SEP_PATH + filename; + + wxImage image( imagefile, wxBITMAP_TYPE_JPEG ); + wxBitmap bmp( image.Scale( 707, 1000, wxIMAGE_QUALITY_HIGH ) ); + wxSplashScreen* splash = new wxSplashScreen( bmp, + wxSPLASH_CENTRE_ON_SCREEN|wxSPLASH_TIMEOUT, + 3000, NULL, -1, wxDefaultPosition, wxDefaultSize, + wxSIMPLE_BORDER|wxSTAY_ON_TOP ); + wxYield(); } /* パラメータダイアログ */