CMakeSetupDialog.h 4.5 KB

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