Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Source / MFCDialog / CMakeSetupDialog.h
blob65a53d6c54c1e5e0279b5a2a8ede60bd9f9ea1c6
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: CMakeSetupDialog.h,v $
5 Language: C++
6 Date: $Date: 2008-03-12 02:51:56 $
7 Version: $Revision: 1.31 $
9 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
17 // CMakeSetupDialogDlg.h : header file
20 #if !defined(AFX_CMakeSetupDialogDLG_H__AC17A6F6_4634_11D4_8F21_00A0CC33FCD3__INCLUDED_)
21 #define AFX_CMakeSetupDialogDLG_H__AC17A6F6_4634_11D4_8F21_00A0CC33FCD3__INCLUDED_
23 #if _MSC_VER > 1000
24 #pragma once
25 #endif // _MSC_VER > 1000
28 #include "PropertyList.h"
29 #include "CMakeGenDialog.h"
31 /////////////////////////////////////////////////////////////////////////////
32 // CMakeSetupDialog dialog
34 class CMakeCommandLineInfo;
35 class cmake;
37 class CMakeSetupDialog : public CDialog
39 // Construction
40 public:
41 CMakeSetupDialog(const CMakeCommandLineInfo& cmdInfo,
42 CWnd* pParent = NULL);
44 ~CMakeSetupDialog();
45 // return the cmake that is currently being used
46 cmake *GetCMakeInstance() {
47 return m_CMakeInstance; }
48 protected:
49 //! Load cache file from m_WhereBuild and display in GUI editor
50 void LoadCacheFromDiskToGUI();
51 //! Save GUI values to cmCacheManager and then save to disk.
52 void SaveCacheFromGUI();
53 void SaveToRegistry();
54 void LoadFromRegistry();
55 bool Browse(CString&, const char* title);
56 void ReadRegistryValue(HKEY hKey,
57 CString *val,
58 const char *key,
59 const char *aadefault);
60 void ShowAdvancedValues();
61 void RemoveAdvancedValues();
62 // Dialog Data
63 //{{AFX_DATA(CMakeSetupDialog)
64 enum { IDD = IDD_CMakeSetupDialog_DIALOG };
65 CButton m_AdvancedValuesControl;
66 CButton m_SuppressDevWarningsControl;
67 CButton m_BrowseSource;
68 CButton m_BrowseBuild;
69 CButton m_HelpButton;
70 CButton m_DeleteButton;
71 CButton m_OKButton;
72 CButton m_CancelButton;
73 CString m_WhereSource;
74 CString m_WhereBuild;
75 CButton m_ListFrame;
76 bool m_BuildPathChanged;
77 CComboBox m_WhereSourceControl;
78 CComboBox m_WhereBuildControl;
79 CPropertyList m_CacheEntriesList;
80 CStatic m_MouseHelp;
81 CStatic m_StatusDisplay;
82 CButton m_Configure;
83 BOOL m_AdvancedValues;
84 BOOL m_SuppressDevValue;
85 //}}AFX_DATA
87 // ClassWizard generated virtual function overrides
88 //{{AFX_VIRTUAL(CMakeSetupDialog)
89 protected:
90 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
91 //}}AFX_VIRTUAL
93 // Implementation
94 protected:
95 void RunCMake(bool generateProjectFiles);
96 // copy from the cache manager to the cache edit list box
97 void FillCacheGUIFromCacheManager();
98 // copy from the list box to the cache manager
99 void FillCacheManagerFromCacheGUI();
100 // Create a shortcut on the desktop with the current Source/Build dir.
101 int CreateShortcut();
103 // Set initial directories from a file path.
104 void ChangeDirectoriesFromFile(const char* arg);
106 HICON m_hIcon;
107 CString m_RegistryKey;
108 CString m_PathToExecutable;
109 // Generated message map functions
110 //{{AFX_MSG(CMakeSetupDialog)
111 virtual BOOL OnInitDialog();
112 afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
113 afx_msg void OnCancel();
114 afx_msg void OnPaint();
115 afx_msg HCURSOR OnQueryDragIcon();
116 afx_msg void OnBrowseWhereSource();
117 virtual void OnConfigure();
118 afx_msg void OnBrowseWhereBuild();
119 afx_msg void OnChangeWhereBuild();
120 afx_msg void OnSelendokWhereBuild();
121 afx_msg void OnChangeWhereSource();
122 afx_msg void OnSelendokWhereSource();
123 afx_msg void OnSize(UINT nType, int cx, int cy);
124 afx_msg void OnGetMinMaxInfo( MINMAXINFO FAR* lpMMI );
125 afx_msg void OnOk();
126 afx_msg void OnHelpButton();
127 afx_msg void OnDeleteButton();
128 afx_msg void OnAdvancedValues();
129 afx_msg void OnDoubleclickedAdvancedValues();
130 afx_msg void OnSuppressDevValue();
131 afx_msg void OnDoubleclickedSuppressDevValue();
132 afx_msg void OnDropFiles(HDROP);
133 afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
134 //}}AFX_MSG
135 DECLARE_MESSAGE_MAP()
137 int m_oldCX;
138 int m_oldCY;
139 float m_deltaXRemainder;
140 cmake *m_CMakeInstance;
141 HCURSOR m_Cursor;
142 bool m_RunningConfigure;
143 bool m_GeneratorPicked;
145 CCMakeGenDialog m_GeneratorDialog;
149 //{{AFX_INSERT_LOCATION}}
150 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
152 #endif // !defined(AFX_CMakeSetupDialogDLG_H__AC17A6F6_4634_11D4_8F21_00A0CC33FCD3__INCLUDED_)