// StrawberryDoc.h : interface of the CStrawberryDoc class
//


#pragma once

class CProjectInfo  
{
public:
	DWORD m_Settings, m_Break_point; // saved in registry
    DWORD  STACK_start, STACK_max;
    DWORD  BUDA_start, BUDA_max;
    DWORD  BUDA_S_start, BUDA_S_max;
    DWORD  m_Colors;
    CString m_ExeFileName;
    CString m_Comments;
    BYTE  m_Icon[744];
    CStringArray m_FilesList;
    CString m_AddFile;
    CString m_DefFile;
    CString m_GetMethod;
    CString m_PostMethod;
    CString m_ProgArg;
    LOGFONT m_lf;
    CProjectInfo();
	~CProjectInfo();
};

class CStrawberrySrvrItem;

class CStrawberryDoc : public CRichEditDoc
{
protected: // create from serialization only
	CStrawberryDoc();
	DECLARE_DYNCREATE(CStrawberryDoc)

// Attributes
public:
	CStrawberrySrvrItem* GetEmbeddedItem()
		{ return reinterpret_cast<CStrawberrySrvrItem*>(CRichEditDoc::GetEmbeddedItem()); }

// Operations
public:
// Overrides
public:
	virtual BOOL OnNewDocument();
	virtual void Serialize(CArchive& ar);
protected:
	virtual BOOL SaveModified();
	virtual COleServerItem* OnGetEmbeddedItem();
	virtual CRichEditCntrItem* CreateClientItem(REOBJECT* preo) const;

// Implementation
public:
	int m_Star; // 0 don't do anything: Output or no syntax coloring,
	            // 1 Activ Star* 
              // 2 No Star, 3 Modified but saved
              // 4 Cap^  5 Put a cap   6 New
	DWORD m_FileType; // 1 spj // 2 rtf    // 3 pro
                      // 4 exe // 5 Output // 6 Add // 7 spex 
	DWORD m_Head;
	DWORD m_CharSet;  // 63 - char set // 64 - default_char
	                  // 128 - synt. color in on // 256 - modifyed soon // 512 ready for syntax coloring
  CProjectInfo *m_pInfo;
	virtual ~CStrawberryDoc();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:
	virtual CDocObjectServer* GetDocObjectServer(LPOLEDOCUMENTSITE pDocSite);

// Generated message map functions
protected:
	DECLARE_MESSAGE_MAP()

	// Generated OLE dispatch map functions

	//DECLARE_DISPATCH_MAP()
	//DECLARE_INTERFACE_MAP()

	friend class CStrawberrySvr;
	CString m_program;
	ULONG compile_method(void);
	CString m_predicate;
	CString m_arguments;
	ULONG call_method(void);
	VARIANT m_result;
};


