Mercurial > mercurial > hgweb_searcher03.cgi
diff include/preview.h @ 10:29021e6e1ebe
Implement thumbnail list in PreviewDialog.
author | pyon@macmini |
---|---|
date | Mon, 28 Apr 2014 18:14:04 +0900 |
parents | b455f2d8aac9 |
children | dfcf8c973219 |
line wrap: on
line diff
--- a/include/preview.h Thu Apr 24 18:31:39 2014 +0900 +++ b/include/preview.h Mon Apr 28 18:14:04 2014 +0900 @@ -1,24 +1,57 @@ // Filename : preview.h -// Last Change: 23-Apr-2014. +// Last Change: 28-Apr-2014. // #ifndef __PREVIEW_H__ #define __PREVIEW_H__ #include "common.h" +class PreviewDialog; +// サムネイルパネル +class PThumbnailPanel : public wxPanel +{ + private: + PreviewDialog* m_parent; + wxArrayString m_imagefiles; + wxArrayString m_cachefiles; + + protected: + wxStaticBitmap* m_bitmap0; + wxStaticBitmap* m_bitmap1; + wxStaticBitmap* m_bitmap2; + wxStaticBitmap* m_bitmap3; + wxStaticBitmap* m_bitmap4; + wxStaticBitmap* m_bitmap5; + + public: + PThumbnailPanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ); + ~PThumbnailPanel(); + + void OnClick0( wxMouseEvent& event ); + void OnClick1( wxMouseEvent& event ); + void OnClick2( wxMouseEvent& event ); + void OnClick3( wxMouseEvent& event ); + void OnClick4( wxMouseEvent& event ); + void OnClick5( wxMouseEvent& event ); + void SetFiles( wxArrayString imagefiles, wxArrayString cachefiles ); + void Preview( int n ); +}; + +// プレビューダイアログ class PreviewDialog : public wxDialog { DECLARE_EVENT_TABLE() private: - wxImageList* m_imageList; wxString m_preview; wxString m_dir; + wxArrayString m_imagefiles; + wxArrayString m_cachefiles; protected: wxScrolledWindow* m_scrolledWindow; wxStaticBitmap* m_bitmap; - wxListCtrl* m_listCtrl; + PThumbnailPanel* m_thumbPanel; wxButton* m_buttonPrint; wxButton* m_buttonClose; @@ -26,13 +59,13 @@ PreviewDialog( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ); ~PreviewDialog(); - void SetImage( wxString file ); + void SetFiles( wxArrayString imagefiles, wxArrayString cachefiles ); + void SetPreviewImage( int n ); void OnPrint( wxCommandEvent& event ); }; enum { - ID_PRINT = wxID_HIGHEST + 80, - ID_PLIST, + ID_PRINT = wxID_HIGHEST + 160, }; #endif //__PREVIEW_H__