root/trunk/SettingsDlg.h

Revision 5, 7.0 kB (checked in by qbert, 6 years ago)

Initial ( and last :( ) commit

Line 
1 #if !defined(AFX_SETTINGSDLG_H__9C0EA5A0_B794_476C_B29D_971283FC54E0__INCLUDED_)
2 #define AFX_SETTINGSDLG_H__9C0EA5A0_B794_476C_B29D_971283FC54E0__INCLUDED_
3
4 #if _MSC_VER > 1000
5 #pragma once
6 #endif // _MSC_VER > 1000
7 // SettingsDlg.h : header file
8 //
9
10 #include "DebugSettingPage.h"
11 #include "ReleaseSettingsPage.h"
12 #include "LinkerSettingsPage.h"
13 #include "ProjectScriptsPage.h"
14 #include "ImportPathPage.h"
15 #include "TagSetsPage.h"
16 #include "AbbSettingsPage.h"
17 #include "NewCompilerSettingsPage.h"
18 #include "BehaviorPage.h"
19 #include "FileExtensionsPage.h"
20 #include "EditorSettingsPage.h"
21 #include "KeywordColorsPage.h"
22 #include "FormatSettingsPage.h"
23 #include "AngelScriptPage.h"
24 #include "GUIComponents/GenericChildDialog.h"
25 #include "EventsPage.h"
26 #include "ProjectFileFormationPage.h"
27 #include "AppearancePage.h"
28 #include "ConstantsDlg.h"
29 #include "BuildOptionsDlg.h"
30 #include "BuildExeOptions.h"
31 #include "ConfigurationsDlg.h"
32 #include "DefsPage.h"
33 #include "PreviewPage.h"
34 #include "ProjectLibsPage.h"
35 #include "AcceleratorsDlg.h"
36 #include "themespage.h"
37 #include "FileBuildPage.h"
38 #include "FileDMDPage.h"
39 /////////////////////////////////////////////////////////////////////////////
40 // CSettingsDlg dialog
41
42 class CSettingsDlg : public CDialog
43 {
44 // Construction
45 public:
46     CSettingsDlg(CWnd* parent = NULL , bool selProject = false);   // standard constructor
47
48 // Dialog Data
49     //{{AFX_DATA(CSettingsDlg)
50     enum { IDD = IDD_SETTINGSDIALOG };
51     CXTButton   m_close;
52     CXTButton   m_save;
53     CTreeCtrl   m_options;
54     //}}AFX_DATA
55
56     CImageList m_imageList;
57     CBitmap m_bitmap;
58
59     bool selectProject;
60     void SaveProjectPages();
61     void UpdateProjectPages();
62     void InitTree ()
63     {
64         HTREEITEM elSettings = m_options.InsertItem("Elephant Settings",0,0,NULL);
65        
66
67         HTREEITEM elephant = m_options.InsertItem("General Settings",3,3,elSettings);
68         HTREEITEM imp = m_options.InsertItem("import paths",100,2,elephant);
69         //m_options.InsertItem("tag sets",-1,-1,elephant);
70         m_options.InsertItem("abbreviations",100,2,elephant);
71         m_options.InsertItem("compiler settings",100,2,elephant);
72         m_options.InsertItem("behavior",100,2,elephant);
73         m_options.InsertItem("appearance",100,2,elephant);
74         //m_options.InsertItem("visual templates",100,2,elephant);
75     //  m_options.InsertItem("file extensions",-1,-1,elephant);
76    
77         m_options.InsertItem("constants",100,2,elephant);
78         //m_options.InsertItem("accelerators",100,2,data);
79
80         HTREEITEM editor = m_options.InsertItem("Editor Settings",3,3,elSettings);
81         m_options.InsertItem("editor",100,2,editor);       
82         m_options.InsertItem("keywords & colors",100,2,editor);     
83         //m_options.InsertItem("format settings",-1,-1,editor);     
84
85         HTREEITEM fileComp = m_options.InsertItem("File Compilation Settings",3,3,elSettings);
86         m_options.InsertItem("build file settings",100,2,fileComp);     
87         m_options.InsertItem("dmd file settings",100,2,fileComp);       
88        
89         HTREEITEM script = m_options.InsertItem("Script Settings",3,3,elSettings);
90
91         m_options.InsertItem("angel script",100,2,script);     
92         //HTREEITEM events = m_options.InsertItem("elephant events",-1,-1,script);     
93 //      m_options.InsertItem("on begin",-1,-1,events);
94 //      m_options.InsertItem("on end",-1,-1,events);
95 //      m_options.InsertItem("on file open",-1,-1,events);
96 //      m_options.InsertItem("on file close",-1,-1,events);
97 //      m_options.InsertItem("on double click",-1,-1,events);
98
99         HTREEITEM project = m_options.InsertItem("Project Settings",1,1,NULL);
100 //      HTREEITEM rel = m_options.InsertItem("release",-1,-1,project);
101 //      m_options.InsertItem("debug",-1,-1,project);
102 //      m_options.InsertItem("linker",-1,-1,project);
103 //      m_options.InsertItem("file formation",-1,-1,project);
104 //      //m_options.InsertItem("scripts",-1,-1,project);
105        
106         HTREEITEM rel = m_options.InsertItem("configurations",100,2,project);
107         //m_options.InsertItem("libraries",100,2,project);
108         m_options.InsertItem("build options",100,2,project);       
109         m_options.InsertItem("definitions",100,2,project);
110         m_options.InsertItem("preview",100,2,project);
111         m_options.InsertItem("build scripts",100,2,project);
112
113        
114
115
116         m_options.SelectItem(selectProject ? rel : imp);
117
118     }
119
120     void HideAll ()
121     {
122
123 //      m_debugPage.ShowWindow(SW_HIDE);
124 //      m_releasePage.ShowWindow(SW_HIDE);
125 //      m_linkerPage.ShowWindow(SW_HIDE);
126         m_scriptsPage.ShowWindow(SW_HIDE);
127         m_importPage.ShowWindow(SW_HIDE);
128         m_tagsPage.ShowWindow(SW_HIDE);
129         m_abbsPage.ShowWindow(SW_HIDE);
130         m_compilerPage.ShowWindow(SW_HIDE);
131         m_behaviorPage.ShowWindow(SW_HIDE);
132         m_fileExtPage.ShowWindow(SW_HIDE);
133         m_editorPage.ShowWindow(SW_HIDE);
134         m_keywordColorPage.ShowWindow(SW_HIDE);
135         m_formatPage.ShowWindow(SW_HIDE);
136         m_angelPage.ShowWindow(SW_HIDE);
137         m_eventsPage.ShowWindow(SW_HIDE);
138         m_appearancePage.ShowWindow(SW_HIDE);
139 //      m_fileFormationPage.ShowWindow(SW_HIDE);
140         m_constantsDlg.ShowWindow(SW_HIDE);
141         m_makefileDlg.ShowWindow(SW_HIDE);
142         m_buildOptions.ShowWindow(SW_HIDE);
143         m_configDlg.ShowWindow(SW_HIDE);
144         m_defsPage.ShowWindow(SW_HIDE);
145         m_previewPage.ShowWindow(SW_HIDE);
146         m_fileBuildPage.ShowWindow(SW_HIDE);
147         m_fileDMDPage.ShowWindow(SW_HIDE);
148         //      m_themesPage.ShowWindow(SW_HIDE);
149     //  m_libsPage.ShowWindow(SW_HIDE);
150         //m_accelsPage.ShowWindow(SW_HIDE);
151
152     }
153
154     void HideAndShow(CWnd* w)
155     {
156         HideAll();
157         w->ShowWindow(SW_SHOW);
158     }
159    
160     // Settings pages
161     CDebugSettingPage m_debugPage;
162     CReleaseSettingsPage m_releasePage;
163     CLinkerSettingsPage m_linkerPage;
164     CProjectScriptsPage m_scriptsPage;
165     CImportPathPage m_importPage;
166     CTagSetsPage m_tagsPage;
167     CAbbSettingsPage m_abbsPage;
168     CNewCompilerSettingsPage m_compilerPage;
169     CBehaviorPage m_behaviorPage;
170     CFileExtensionsPage m_fileExtPage;
171     CEditorSettingsPage m_editorPage;
172     CKeywordColorsPage m_keywordColorPage;
173     CFormatSettingsPage m_formatPage;
174     CAngelScriptPage m_angelPage;
175     CEventsPage m_eventsPage;
176     CAppearancePage m_appearancePage;
177     CProjectFileFormationPage m_fileFormationPage;
178     CConstantsDlg m_constantsDlg;
179     CBuildOptionsDlg  m_makefileDlg;
180     CBuildExeOptions m_buildOptions;
181     CConfigurationsDlg m_configDlg;
182     CDefsPage m_defsPage;
183     CPreviewPage m_previewPage;
184     CProjectLibsPage m_libsPage;
185   CThemesPage m_themesPage;
186   CFileBuildPage m_fileBuildPage;
187   CFileDMDPage m_fileDMDPage;
188     //CAcceleratorsDlg m_accelsPage;
189     // Overrides
190     // ClassWizard generated virtual function overrides
191     //{{AFX_VIRTUAL(CSettingsDlg)
192     protected:
193     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
194     //}}AFX_VIRTUAL
195
196 // Implementation
197 protected:
198
199     // Generated message map functions
200     //{{AFX_MSG(CSettingsDlg)
201     virtual BOOL OnInitDialog();
202     afx_msg void OnSelchangedTree1(NMHDR* pNMHDR, LRESULT* pResult);
203     afx_msg void OnClickTree1(NMHDR* pNMHDR, LRESULT* pResult);
204     afx_msg void OnClose();
205     afx_msg void OnSave();
206     //}}AFX_MSG
207     DECLARE_MESSAGE_MAP()
208 };
209
210 //{{AFX_INSERT_LOCATION}}
211 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
212
213 #endif // !defined(AFX_SETTINGSDLG_H__9C0EA5A0_B794_476C_B29D_971283FC54E0__INCLUDED_)
Note: See TracBrowser for help on using the browser.