1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: CMakeSetupDialog.h,v $
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_
25 #endif // _MSC_VER > 1000
28 #include "PropertyList.h"
29 #include "CMakeGenDialog.h"
31 /////////////////////////////////////////////////////////////////////////////
32 // CMakeSetupDialog dialog
34 class CMakeCommandLineInfo
;
37 class CMakeSetupDialog
: public CDialog
41 CMakeSetupDialog(const CMakeCommandLineInfo
& cmdInfo
,
42 CWnd
* pParent
= NULL
);
45 // return the cmake that is currently being used
46 cmake
*GetCMakeInstance() {
47 return m_CMakeInstance
; }
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
,
59 const char *aadefault
);
60 void ShowAdvancedValues();
61 void RemoveAdvancedValues();
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
;
70 CButton m_DeleteButton
;
72 CButton m_CancelButton
;
73 CString m_WhereSource
;
76 bool m_BuildPathChanged
;
77 CComboBox m_WhereSourceControl
;
78 CComboBox m_WhereBuildControl
;
79 CPropertyList m_CacheEntriesList
;
81 CStatic m_StatusDisplay
;
83 BOOL m_AdvancedValues
;
84 BOOL m_SuppressDevValue
;
87 // ClassWizard generated virtual function overrides
88 //{{AFX_VIRTUAL(CMakeSetupDialog)
90 virtual void DoDataExchange(CDataExchange
* pDX
); // DDX/DDV support
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
);
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
);
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
);
135 DECLARE_MESSAGE_MAP()
139 float m_deltaXRemainder
;
140 cmake
*m_CMakeInstance
;
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_)