]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - tools/src/tools/configtool/standalone/win32/Configtool.h
Initial revision
[karo-tx-redboot.git] / tools / src / tools / configtool / standalone / win32 / Configtool.h
1 //####COPYRIGHTBEGIN####
2 //                                                                          
3 // ----------------------------------------------------------------------------
4 // Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
5 //
6 // This program is part of the eCos host tools.
7 //
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) 
11 // any later version.
12 // 
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 
16 // more details.
17 // 
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.
21 //
22 // ----------------------------------------------------------------------------
23 //                                                                          
24 //####COPYRIGHTEND####
25 // ConfigTool.h : 
26 //
27 //===========================================================================
28 //#####DESCRIPTIONBEGIN####
29 //
30 // Author(s):   sdf
31 // Contact(s):  sdf
32 // Date:                1998/08/11
33 // Version:             0.01
34 // Purpose:     
35 // Description: main header file for the ConfigTool application
36 // Requires:    
37 // Provides:    
38 // See also:    
39 // Known bugs:  
40 // Usage:       
41 //
42 //####DESCRIPTIONEND####
43 //
44 //===========================================================================
45
46 #if !defined(AFX_ConfigTool_H__A4845240_05EE_11D2_80BE_00A0C949ADAC__INCLUDED_)
47 #define AFX_ConfigTool_H__A4845240_05EE_11D2_80BE_00A0C949ADAC__INCLUDED_
48
49 #if _MSC_VER >= 1000
50 #pragma once
51 #endif // _MSC_VER >= 1000
52
53 #ifndef __AFXWIN_H__
54 #error include 'stdafx.h' before including this file for PCH
55 #endif
56
57 #include "stdafx.h"       // main symbols
58 #include "FileName.h"
59 #include "FindDialog.h"
60
61 /////////////////////////////////////////////////////////////////////////////
62 // CConfigToolApp:
63 // See ConfigTool.cpp for the implementation of this class
64 //
65
66 class CConfigToolDoc;
67 class COutputView;
68 class CControlView;
69 class CCellView;
70 class CDescView;
71 class CMLTView;
72 class CPropertiesView;
73 class CRulesView;
74 class CMainFrame;
75
76 class CConfigTool {
77 public:
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);
88   
89   static CConfigToolDoc  * GetConfigToolDoc() { return m_pConfigToolDoc; }
90   
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();
99   
100   static int Log(LPCTSTR,...);
101   static void CALLBACK OutputWindowTextCB(LPCTSTR pszMsg);
102
103   static CString strHelpFile;
104
105 protected:
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;
116 };
117
118 class CConfigToolApp : public CWinApp
119 {
120 public:
121         CString m_strOriginalPath;
122   
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(""));
132   CPen m_GrayPen;
133   virtual BOOL PreTranslateMessage(MSG* pMsg);
134   
135   CConfigToolApp();
136   CString m_strBufferedLogMessages;
137   int GetRepositoryRegistryClues (CStringArray &arstrRepository,LPCTSTR pszPrefix);
138   CMapStringToString m_arstrBinDirs;
139   CString GetInstallVersionKey ();
140   
141   // Overrides
142   // ClassWizard generated virtual function overrides
143   //{{AFX_VIRTUAL(CConfigToolApp)
144 public:
145   virtual BOOL InitInstance();
146   virtual int ExitInstance();
147   virtual BOOL OnIdle(LONG lCount);
148   //    virtual void AddToRecentFileList(LPCTSTR lpszPathName);
149   //}}AFX_VIRTUAL
150   
151   // Implementation
152   
153   //{{AFX_MSG(CConfigToolApp)
154   afx_msg void OnAppAbout();
155   //}}AFX_MSG
156   DECLARE_MESSAGE_MAP()
157 protected:
158   void LoadStdProfileSettings();
159 private:
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;
165   
166 };
167
168
169 /////////////////////////////////////////////////////////////////////////////
170
171 //{{AFX_INSERT_LOCATION}}
172 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
173
174 #endif // !defined(AFX_ConfigTool_H__A4845240_05EE_11D2_80BE_00A0C949ADAC__INCLUDED_)