/***********************************************************************************************

 Author:		Muhammad Zulfiqar		JPC36
 School;		John Abbott College, Montreal, Canada.
 File:			slide_show.h
 Date:			August 08, 2000.

 ************************************************************************************************/


#ifndef __SLIDESHOW_H__
#define __SLIDESHOW_H__

#include "wx/wxprec.h"

#ifdef __BORLANDC__
#pragma hdrstop
#endif

#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif

#include "wx/file.h"
#include "wx/filedlg.h"
#include "wx/dirdlg.h"
#include "wx/string.h"
#include "wx/timer.h"

#include <vector>
using namespace std;

class Canvas;


/**************************************************************************************************

class MySlideShow

void on_slide_show()	:				Called from main program
void on_interval()	:					User inputs interval in seconds from main program
void on_timer(wxTimerEvent&):			Receives timer events
void start_slide_show():				User starts slide show from main program
void send_to_display_image():			Controlled by timer, it sends one file of image at a time
										to be displayed on canvas using 'canvas.h'
										
										
vector <wxString> image_list:			stores a list of files including their paths in an array
wxString: path, filename, imagename:	used to extract one file name with path from array,	one file name
										excluding path, and just file (image name) without extension, respectively.

wxTimer 		* slide_show_timer;		timer will be used for slide show
long 			user_interval;			the user enters interval interval in seconds, using 'wxGetNumberFromUser'
										which returns a long.
wxBitmap 		*bm;					bitmap image will be used to convert images of other types to bitmap
wxStaticText 	*text;                  Static text will be used to display the name of the image.
										
																				
***************************************************************************************************/


class Slide_show :public wxFrame
{
public:

    Slide_show (Canvas * canvas_pointer);
    ~Slide_show()
    {}

//    void on_slide_show();
    void on_timer(wxTimerEvent& event);
    void start_slide_show(long user_interval, vector <wxString> & list);
    void send_to_display_image();

private:
    vector <wxString> image_list;
	
	wxString path, filename, imagename;
	
    wxTimer 		* slide_show_timer;
    long 			user_interval;
	wxBitmap 		*bm;
	wxStaticText 	*text;	
	Canvas * m_canvas;
	
	DECLARE_EVENT_TABLE()
};

enum
{
    ID_Slide_Show_Timer = 100,
    ID_text,
};

#endif
