Mercurial > mercurial > hgweb_searcher03.cgi
comparison src/preview.cpp @ 11:dfcf8c973219
Implement Cache maker.
| author | pyon@macmini |
|---|---|
| date | Wed, 07 May 2014 20:38:57 +0900 |
| parents | 29021e6e1ebe |
| children | 52958cd4a073 |
comparison
equal
deleted
inserted
replaced
| 10:29021e6e1ebe | 11:dfcf8c973219 |
|---|---|
| 1 // Filename : preview.cpp | 1 // Filename : preview.cpp |
| 2 // Last Change: 28-Apr-2014. | 2 // Last Change: 01-May-2014. |
| 3 // | 3 // |
| 4 | 4 |
| 5 #include "preview.h" | 5 #include "preview.h" |
| 6 #define THUMB_W 60 | 6 #define THUMB_W 60 |
| 7 #define THUMB_H 75 | 7 #define THUMB_H 75 |
| 100 m_thumbPanel = new PThumbnailPanel( this, wxID_ANY, wxDefaultPosition, wxSize( 100, -1 ), wxSUNKEN_BORDER ); | 100 m_thumbPanel = new PThumbnailPanel( this, wxID_ANY, wxDefaultPosition, wxSize( 100, -1 ), wxSUNKEN_BORDER ); |
| 101 bSizerMenu->Add( m_thumbPanel, 0, wxALL|wxEXPAND, 5 ); | 101 bSizerMenu->Add( m_thumbPanel, 0, wxALL|wxEXPAND, 5 ); |
| 102 | 102 |
| 103 m_buttonPrint = new wxButton( this, ID_PRINT, wxT("印刷"), wxDefaultPosition, wxDefaultSize, 0 ); | 103 m_buttonPrint = new wxButton( this, ID_PRINT, wxT("印刷"), wxDefaultPosition, wxDefaultSize, 0 ); |
| 104 bSizerMenu->Add( m_buttonPrint, 0, wxALL, 5 ); | 104 bSizerMenu->Add( m_buttonPrint, 0, wxALL, 5 ); |
| 105 bSizerMenu->Add( 0, 0, 1, 0, 5 ); | 105 bSizerMenu->Add( 0, 0, 0, 0, 5 ); |
| 106 | 106 |
| 107 m_buttonClose = new wxButton( this, wxID_CANCEL, wxT("閉じる"), wxDefaultPosition, wxDefaultSize, 0 ); | 107 m_buttonClose = new wxButton( this, wxID_CANCEL, wxT("閉じる"), wxDefaultPosition, wxDefaultSize, 0 ); |
| 108 m_buttonClose->SetDefault(); | 108 m_buttonClose->SetDefault(); |
| 109 bSizerMenu->Add( m_buttonClose, 0, wxALL, 5 ); | 109 bSizerMenu->Add( m_buttonClose, 0, wxALL, 5 ); |
| 110 | 110 |
| 134 wxImage img; | 134 wxImage img; |
| 135 img.LoadFile( m_imagefiles[n], wxBITMAP_TYPE_JPEG ); | 135 img.LoadFile( m_imagefiles[n], wxBITMAP_TYPE_JPEG ); |
| 136 wxBitmap bmp( img.Scale( w, h, wxIMAGE_QUALITY_HIGH ) ); | 136 wxBitmap bmp( img.Scale( w, h, wxIMAGE_QUALITY_HIGH ) ); |
| 137 m_bitmap->SetBitmap( bmp ); | 137 m_bitmap->SetBitmap( bmp ); |
| 138 | 138 |
| 139 m_scrolledWindow->Scroll( 0, 0 ); | |
| 139 m_scrolledWindow->SetScrollbars( 10, 10, 0, h/10 ); | 140 m_scrolledWindow->SetScrollbars( 10, 10, 0, h/10 ); |
| 140 m_preview = m_imagefiles[n]; | 141 m_preview = m_imagefiles[n]; |
| 141 } | 142 } |
| 142 | 143 |
| 143 void PreviewDialog::SetFiles( wxArrayString imagefiles, wxArrayString cachefiles ) | 144 void PreviewDialog::SetFiles( wxArrayString imagefiles, wxArrayString cachefiles ) |
