[go: up one dir, main page]

Menu

[r9]: / XTrans.h  Maximize  Restore  History

Download this file

109 lines (88 with data), 3.6 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
// 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 &parameters_ );
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_)