/////////////////////////////////////////////////////////////////////////////
// Name:        No names yet.
// Purpose:     Contrib. demo
// Author:      Aleksandras Gluchovas
// Modified by:
// Created:     2000/02/08
// RCS-ID:      $Id: pm_sample.h,v 1.3 2001/03/14 13:48:11 aleksandras Exp $
// Copyright:   (c) Aleksandras Gluchovas
// Licence:   	GPL (version 2.0 or later)
/////////////////////////////////////////////////////////////////////////////

#ifndef __PM_SAMPLE_G__
#define __PM_SAMPLE_G__

#include "wx/pmf/pm_doc.h"

#include "wx/listctrl.h"
#include "wx/imaglist.h"

class wxPlainTextDocument : public wxPMDocument
{
public:
	wxPlainTextDocument();
	~wxPlainTextDocument();

	// overriden methods of wxPMDocument
	virtual bool SavePMDocument( wxOutputStream& s );
	virtual bool LoadPMDocument( wxInputStream& s );

	// accessed by views

	virtual wxString& GetFullText();
	virtual void SetFullText( const wxString& txt );

	DECLARE_DYNAMIC_CLASS( wxPlainTextDocument )
protected:
	wxString m_FullTextStr;
};

class wxPlainTextView : public wxPMView
{
public:
	wxPlainTextView();
	~wxPlainTextView();

	virtual wxPMMergableMenuChain* GetMergableMenuChain();

	// overriden method of wxDocument
	virtual void OnUpdate(wxView* sender, wxObject* hint);

	// overriden method wxView and wxPMView
	virtual bool OnCreate(wxDocument* doc, long flags);

	void OnText( wxCommandEvent& event );

	DECLARE_DYNAMIC_CLASS( wxPlainTextView )
	DECLARE_EVENT_TABLE()

protected:
	wxTextCtrl* m_pTextCtrl;
};

class wxPlainTextInfoPane : public wxPMPane 
{
public:
	wxPlainTextInfoPane();
	~wxPlainTextInfoPane();

	virtual bool Start();
	virtual bool Stop();

	virtual void Serialize( wxConfigBase& cfg, const wxString& key, bool isLoading );

	DECLARE_DYNAMIC_CLASS( wxPlainTextInfoPane )
};


class wxHtmlWindow;

class wxHtmlView : public wxPMView
{
public:
	wxHtmlView();
	~wxHtmlView();

	// overriden method wxView and wxPMView
	virtual bool OnCreate(wxDocument* doc, long flags);

	virtual wxPMMergableMenuChain* GetMergableMenuChain();

	// overriden method of wxDocument
	virtual void OnUpdate(wxView* sender, wxObject* hint);

	DECLARE_DYNAMIC_CLASS( wxHtmlView )

protected:
	wxHtmlWindow* m_pHtmlWnd;
};


class wxPMSimpleWorkplace : public wxPMWorkplace
{
public:
	wxPMSimpleWorkplace();

	// overriden method of wxPMDocument
	virtual bool SerializePMDocument( wxPMSerializer& ser );

	DECLARE_DYNAMIC_CLASS( wxPMSimpleWorkplace )

protected:
	wxString m_MyStringData;
};

class wxPMTestPane : public wxPMPane
{
public:
	wxPMTestPane();

	virtual bool Start();

	virtual void CreatePaneWindow( wxWindow* pParent );
	virtual wxWindow* GetPaneWindow();

	DECLARE_DYNAMIC_CLASS( wxPMTestPane )

protected:
	wxImageList m_SmallList;
	wxListCtrl* m_pWnd;
};

#endif // __PM_SAMPLE_G__