view include/cache.h @ 21:a2ad87cad48b

Enhanced the convenience of Cache dialog.
author pyon@macmini
date Wed, 17 Dec 2014 00:52:43 +0900
parents dfcf8c973219
children
line wrap: on
line source

// Filename   : cache.h
// Last Change: 12-Dec-2014.
//

#ifndef __CACHE_H__
#define __CACHE_H__

#include "common.h"

//
class CacheGetDialog : public wxDialog 
{
    DECLARE_EVENT_TABLE()
	private:
        wxArrayString    m_nocache;
	
	protected:
		wxDirPickerCtrl* m_dirPicker;
		wxButton*        m_buttonGet;
		wxButton*        m_buttonCancel;
	
	public:
		CacheGetDialog( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style );
		~CacheGetDialog();
        void OnGetCache( wxCommandEvent& WXUNUSED(event) );	
        void SetSyncDates( wxArrayString );	
};

//
class CacheDialog : public wxDialog 
{
    DECLARE_EVENT_TABLE()
	private:
        wxString      m_rootdir;
        wxArrayString nocache;
        int           m_width, m_height;
	
	protected:
		wxStaticText*     m_staticText;
		wxListCtrl*       m_listCtrl;
		wxStaticText*     m_staticTextRange;
		wxStaticText*     m_staticTextBetween;
		wxDatePickerCtrl* m_datePickerBgn;
		wxDatePickerCtrl* m_datePickerEnd;
		wxButton*         m_buttonCache;
		wxButton*         m_buttonGet;
		wxButton*         m_buttonClose;
	
	public:
		CacheDialog( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ); 
		~CacheDialog();
        void Setting( wxString rootdir, int w, int h );
        void Listup( void );
        void OnDateChange( wxDateEvent& WXUNUSED(event) );
        void OnGetCache( wxCommandEvent& WXUNUSED(event) );
        void OnMakeCache( wxCommandEvent& WXUNUSED(event) );
};

enum
{
    ID_RGBGN = wxID_HIGHEST + 660,
    ID_RGEND,
    ID_MKCACHE,
    ID_GET,
    ID_GETCACHE,
};

#endif //__CACHE_H__