# HG changeset patch # User pyon@macmini # Date 1318683780 -32400 # Node ID e4ba3cc9b4b1bb585233928bc9bf6eb4bad19ca3 # Parent b47bd4618c16a412582d02b8a26073819194d2b1 large view ok. diff -r b47bd4618c16 -r e4ba3cc9b4b1 include/common.h --- a/include/common.h Sat Oct 15 20:07:12 2011 +0900 +++ b/include/common.h Sat Oct 15 22:03:00 2011 +0900 @@ -7,8 +7,9 @@ #include "wx/wxprec.h" #ifndef WX_PRECOMP - #include "wx/wx.h" + #include #include + #include #include #include #include diff -r b47bd4618c16 -r e4ba3cc9b4b1 include/myframe.h --- a/include/myframe.h Sat Oct 15 20:07:12 2011 +0900 +++ b/include/myframe.h Sat Oct 15 22:03:00 2011 +0900 @@ -52,6 +52,7 @@ void OnParam(wxCommandEvent& event); void MakeDir(wxCommandEvent& event); void ToggleSelect(wxListEvent& event); + void ViewLarge(wxListEvent& event); void OnDetect(wxCommandEvent& event); void OnMove(wxCommandEvent& event); void OnMoveAndDetect(wxCommandEvent& event); diff -r b47bd4618c16 -r e4ba3cc9b4b1 src/myframe.cpp --- 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(); } /* パラメータダイアログ */