view include/preview.h @ 11:dfcf8c973219

Implement Cache maker.
author pyon@macmini
date Wed, 07 May 2014 20:38:57 +0900
parents 29021e6e1ebe
children 52958cd4a073
line wrap: on
line source

// Filename   : preview.h
// Last Change: 01-May-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:
        wxString          m_preview;
        wxArrayString     m_imagefiles;
        wxArrayString     m_cachefiles;
	
	protected:
        wxScrolledWindow* m_scrolledWindow;
		wxStaticBitmap*   m_bitmap;
        PThumbnailPanel*  m_thumbPanel;
		wxButton*         m_buttonPrint;
		wxButton*         m_buttonClose;
	
	public:
		PreviewDialog( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ); 
		~PreviewDialog();
	
        void SetFiles( wxArrayString imagefiles, wxArrayString cachefiles );
        void SetPreviewSize( void );
        void SetPreviewImage( int n );
        void OnPrint( wxCommandEvent& event );
};

enum {
    ID_PRINT = wxID_HIGHEST + 160,
};

#endif //__PREVIEW_H__