1 //####COPYRIGHTBEGIN####
3 // ----------------------------------------------------------------------------
4 // Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
6 // This program is part of the eCos host tools.
8 // This program is free software; you can redistribute it and/or modify it
9 // under the terms of the GNU General Public License as published by the Free
10 // Software Foundation; either version 2 of the License, or (at your option)
13 // This program is distributed in the hope that it will be useful, but WITHOUT
14 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
18 // You should have received a copy of the GNU General Public License along with
19 // this program; if not, write to the Free Software Foundation, Inc.,
20 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 // ----------------------------------------------------------------------------
24 //####COPYRIGHTEND####
27 //===========================================================================
28 //#####DESCRIPTIONBEGIN####
35 // Description: main header file for the ConfigTool application
42 //####DESCRIPTIONEND####
44 //===========================================================================
46 #if !defined(AFX_ConfigTool_H__A4845240_05EE_11D2_80BE_00A0C949ADAC__INCLUDED_)
47 #define AFX_ConfigTool_H__A4845240_05EE_11D2_80BE_00A0C949ADAC__INCLUDED_
51 #endif // _MSC_VER >= 1000
54 #error include 'stdafx.h' before including this file for PCH
57 #include "stdafx.h" // main symbols
59 #include "FindDialog.h"
61 /////////////////////////////////////////////////////////////////////////////
63 // See ConfigTool.cpp for the implementation of this class
72 class CPropertiesView;
78 static void DismissSplash();
79 static void SetDocument(CConfigToolDoc *pDoc);
80 static void SetMain(CMainFrame * pMain);
81 static void SetControlView(CControlView *pControlView);
82 static void SetOutputView(COutputView *pOutputView);
83 static void SetCellView(CCellView *pCellView);
84 static void SetDescView(CDescView *pDescView);
85 static void SetMLTView(CMLTView *pMLTView);
86 static void SetPropertiesView(CPropertiesView *pPropertiesView);
87 static void SetRulesView(CRulesView *pRulesView);
89 static CConfigToolDoc * GetConfigToolDoc() { return m_pConfigToolDoc; }
91 static CControlView * GetControlView();
92 static CCellView * GetCellView();
93 static CDescView * GetDescView();
94 static COutputView * GetOutputView();
95 static CPropertiesView * GetPropertiesView();
96 static CRulesView * GetRulesView();
97 static CMLTView * GetMLTView();
98 static CMainFrame * GetMain();
100 static int Log(LPCTSTR,...);
101 static void CALLBACK OutputWindowTextCB(LPCTSTR pszMsg);
103 static CString strHelpFile;
106 static CEditView *m_pEditView;
107 static COutputView *m_pOutputView;
108 static CControlView *m_pControlView;
109 static CCellView *m_pCellView;
110 static CDescView *m_pDescView;
111 static CPropertiesView *m_pPropertiesView;
112 static CMLTView *m_pMLTView;
113 static CRulesView *m_pRulesView;
114 static CConfigToolDoc *m_pConfigToolDoc;
115 static CMainFrame *m_pMain;
118 class CConfigToolApp : public CWinApp
121 CString m_strOriginalPath;
123 CFileName m_strUserToolsDir;
124 void SaveWindowPlacement(CWnd *pWnd, const CString &strKey);
125 void SaveFont (const CString &strKey,const LOGFONT &lf);
126 void LoadFont (const CString &strKey,LOGFONT &lf);
127 BOOL RestoreWindowPlacement(CWnd *pWwnd, const CString &strKey,const CRect &rcDefault);
128 CStringArray m_arstrUserToolPaths;
129 CString m_strMakeOptions;
130 OSVERSIONINFO m_VersionInfo;
131 bool Launch (const CString &strFileName,const CString &strViewer=_T(""));
133 virtual BOOL PreTranslateMessage(MSG* pMsg);
136 CString m_strBufferedLogMessages;
137 int GetRepositoryRegistryClues (CStringArray &arstrRepository,LPCTSTR pszPrefix);
138 CMapStringToString m_arstrBinDirs;
139 CString GetInstallVersionKey ();
142 // ClassWizard generated virtual function overrides
143 //{{AFX_VIRTUAL(CConfigToolApp)
145 virtual BOOL InitInstance();
146 virtual int ExitInstance();
147 virtual BOOL OnIdle(LONG lCount);
148 // virtual void AddToRecentFileList(LPCTSTR lpszPathName);
153 //{{AFX_MSG(CConfigToolApp)
154 afx_msg void OnAppAbout();
156 DECLARE_MESSAGE_MAP()
158 void LoadStdProfileSettings();
160 static LPCTSTR s_profileRect;
161 static LPCTSTR s_profileIcon;
162 static LPCTSTR s_profileMax;
163 static LPCTSTR s_profileTool;
164 static LPCTSTR s_profileStatus;
169 /////////////////////////////////////////////////////////////////////////////
171 //{{AFX_INSERT_LOCATION}}
172 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
174 #endif // !defined(AFX_ConfigTool_H__A4845240_05EE_11D2_80BE_00A0C949ADAC__INCLUDED_)