// XTrans.h : main header file for the XTRANS application
//
#if !defined(AFX_XTRANS_H__34C713ED_45F6_4A42_B41F_B45F5C186DDD__INCLUDED_)
#define AFX_XTRANS_H__34C713ED_45F6_4A42_B41F_B45F5C186DDD__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#include "resource.h" // main symbols
#define COM_CHECK( com_method ) if( FAILED( hr = com_method ) ) throw hr;
/////////////////////////////////////////////////////////////////////////////
// CXTransApp:
// See XTrans.cpp for the implementation of this class
//
class CXTransDoc;
class CXTransApp : public CWinApp
{
CMultiDocTemplate *m_ptDefaultTemplate;
CMultiDocTemplate *pDocXSLTemplate;
LOGFONT m_lf;
COLORREF tagname_color, tagbody_color, extra_color, string_color, attrib_color, comment_color;
CStringArray insets;
CStringArray insets_descr;
int msxml_version;
bool use_processor;
CString parameters;
void InitFont();
void StoreFont();
void RestoreFont();
void LoadInsets();
void RegisterDDE();
public:
CXTransApp();
CXTransDoc *CreateNewDocument( bool xml = true );
LOGFONT &GetFont();
bool GetColor( int nColorIndex, COLORREF &color );
bool GetUseProcessor( CStringArray ¶meters_ );
int GetMSXMLVersion() { return msxml_version; }
CStringArray &GetInsets();
CStringArray &GetInsetsDescr();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CXTransApp)
public:
virtual BOOL InitInstance();
virtual BOOL SaveAllModified();
virtual int ExitInstance();
//}}AFX_VIRTUAL
// Implementation
//{{AFX_MSG(CXTransApp)
afx_msg void OnColorDialog();
afx_msg void OnAppAbout();
afx_msg void OnFileNew();
afx_msg void OnW3ref();
afx_msg void OnFileOpenXSL();
afx_msg void OnFileRegister();
afx_msg void OnOptionsDialog();
afx_msg void OnFilesOpenThenTransform();
afx_msg void OnOpenInsets();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#define DOMverNum 6
enum DOMVersionIndex {
DOMDocument60,
DOMDocument40,
DOMDocument30,
DOMDocument26,
DOMDocument,
MicrosoftXMLDOM,
};
// Utility functions
void DisplayCOMError(LPCTSTR pMessage, HRESULT hr);
CXTransDoc *GetDocument( HWND child_wnd );
bool GetDOMDocument( HWND child_wnd, IXMLDOMDocument2 **, bool free_threaded = false );
bool GetDOMClsId( DOMVersionIndex idx, bool free_threaded, CLSID &clsid );
bool CreateDocInstance( DOMVersionIndex idx, bool free_threaded, IXMLDOMDocument2 **doc_ );
bool CreateDocInstance( IXMLDOMDocument2 **doc_, bool free_threaded = false, int idx = -1 );
CPoint ParseError( IXMLDOMDocument2 *doc, CString &err_str );
void SetStatusMessage( const char *msg = NULL );
void MergeMenu( CMenu* pMenuDestination, CMenu* pMenuAdd, bool bTopLevel = false );
CMenu *GetInsertMenu();
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_XTRANS_H__34C713ED_45F6_4A42_B41F_B45F5C186DDD__INCLUDED_)