#ifndef _MYTEXTFRAME_H
#define _MYTEXTFRAME_H

enum {TF_GENERATE=520,
      TF_REVERT,
      TF_LOAD,
      TF_TEXT};

#include <wx/dialog.h>
#include <wx/textctrl.h>
#include <wx/layout.h>

/* Define a frame for displaying the LSystem algorithm */

class MyTextFrame: public wxDialog
{
public:
  MyTextFrame(wxWindow *parent, const wxString& title, 
	      const wxPoint& pos, const wxSize& size);
  void SetChanged(bool changed);
  void generate();
  void revert();
  void load();
  void PutText(wxString TheString);
  wxString GetText();

  void OnGenerate(wxCommandEvent &event);
  void OnRevert(wxCommandEvent &event);
  void OnLoad(wxCommandEvent &event);
  void OnTextChange(wxCommandEvent &event);
 private:
  wxTextCtrl *TheTextBox;
  wxButton   *RevertButton, *LoadButton, *GenerateButton;
  wxString   ThePreviousString;
  bool       changed;
 public:
  DECLARE_EVENT_TABLE()
};


#endif













