/********************************
Title : filecanvas.h
Authors : David Boys, Mike MacIntyre
Class Definition for  FileCanvas
Last updated : August 9, 2000
*********************************/

#ifndef __FILECANVAS_H__
#define __FILECANVAS_H__

#include "wx/wxprec.h"
#ifdef __BORLANDC__
#pragma hdrstop
#endif

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

#include "imagepanel.h"
#include "wx/dir.h"
#include "wx/panel.h"
#include "wx/scrolwin.h"
#include "wx/scrolbar.h"
#include "wx/event.h"

#include <vector>
using namespace std;

/*  Begin Members table

               Member                        |          Purpose

    vector<ImagePanel * >   found_files      /   a vector of ImagePanel pointers
    int                     config_icon_size /   a system configured icon size
	PreviewPanel          * preview;         /   a pointer pointing to PreviewPanel class
	vector <wxString>     & temp_selections; /   a temp vector to store the selections made
	
    End  Members Table  */


class PreviewPanel;

enum
{
	ID_panel = 1,
};

class FileCanvas : public wxScrolledWindow
{
public:
    FileCanvas( wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
    			int icon_size, vector <wxString> & temp, PreviewPanel * preview);
    ~FileCanvas();
	void setscrllbar(int x);
	void clear_panels();
	int panel_width(int subscript) const ;
	void add_panel(const wxString & path, const wxImage * img,  int horizontal_pos, int vertical_pos);
	
	void set_previous(ImagePanel * ptr)
	{
	    previous = ptr;
	}
	
	ImagePanel * get_previous()
	{
	    return previous;
	}

   	bool panels_exist() const
   	{
		return found_files.size() > 0;
	}
		
private:
    PreviewPanel * preview;
    vector<ImagePanel * > found_files;
    vector <wxString> & temp_selections;
    int config_icon_size;
    ImagePanel * previous;
};

#endif
