CMakeSetupDialog.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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. ~CMakeSetupDialog();
  32. // return the cmake that is currently being used
  33. cmake *GetCMakeInstance() {
  34. return m_CMakeInstance; }
  35. protected:
  36. //! Load cache file from m_WhereBuild and display in GUI editor
  37. void LoadCacheFromDiskToGUI();
  38. //! Save GUI values to cmCacheManager and then save to disk.
  39. void SaveCacheFromGUI();
  40. void SaveToRegistry();
  41. void LoadFromRegistry();
  42. bool Browse(CString&, const char* title);
  43. void ReadRegistryValue(HKEY hKey,
  44. CString *val,
  45. const char *key,
  46. const char *aadefault);
  47. void ShowAdvancedValues();
  48. void RemoveAdvancedValues();
  49. // Dialog Data
  50. //{{AFX_DATA(CMakeSetupDialog)
  51. enum { IDD = IDD_CMakeSetupDialog_DIALOG };
  52. CButton m_AdvancedValuesControl;
  53. CStatic m_BuildForLabel;
  54. CButton m_BrowseSource;
  55. CButton m_BrowseBuild;
  56. CButton m_HelpButton;
  57. CButton m_DeleteButton;
  58. CComboBox m_GeneratorChoice;
  59. CButton m_OKButton;
  60. CButton m_CancelButton;
  61. CString m_WhereSource;
  62. CString m_WhereBuild;
  63. CButton m_ListFrame;
  64. bool m_BuildPathChanged;
  65. CComboBox m_WhereSourceControl;
  66. CComboBox m_WhereBuildControl;
  67. CPropertyList m_CacheEntriesList;
  68. CStatic m_MouseHelp;
  69. CStatic m_StatusDisplay;
  70. CButton m_Configure;
  71. CString m_GeneratorChoiceString;
  72. BOOL m_AdvancedValues;
  73. //}}AFX_DATA
  74. // ClassWizard generated virtual function overrides
  75. //{{AFX_VIRTUAL(CMakeSetupDialog)
  76. protected:
  77. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  78. //}}AFX_VIRTUAL
  79. // Implementation
  80. protected:
  81. void RunCMake(bool generateProjectFiles);
  82. // copy from the cache manager to the cache edit list box
  83. void FillCacheGUIFromCacheManager();
  84. // copy from the list box to the cache manager
  85. void FillCacheManagerFromCacheGUI();
  86. // Create a shortcut on the desktop with the current Source/Build dir.
  87. int CreateShortcut();
  88. // Set initial directories from a file path.
  89. void ChangeDirectoriesFromFile(const char* arg);
  90. HICON m_hIcon;
  91. CString m_RegistryKey;
  92. CString m_PathToExecutable;
  93. // Generated message map functions
  94. //{{AFX_MSG(CMakeSetupDialog)
  95. virtual BOOL OnInitDialog();
  96. afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
  97. afx_msg void OnCancel();
  98. afx_msg void OnPaint();
  99. afx_msg HCURSOR OnQueryDragIcon();
  100. afx_msg void OnBrowseWhereSource();
  101. virtual void OnConfigure();
  102. afx_msg void OnBrowseWhereBuild();
  103. afx_msg void OnChangeWhereBuild();
  104. afx_msg void OnSelendokWhereBuild();
  105. afx_msg void OnChangeWhereSource();
  106. afx_msg void OnSelendokWhereSource();
  107. afx_msg void OnSize(UINT nType, int cx, int cy);
  108. afx_msg void OnGetMinMaxInfo( MINMAXINFO FAR* lpMMI );
  109. afx_msg void OnOk();
  110. afx_msg void OnEditchangeGenerator();
  111. afx_msg void OnHelpButton();
  112. afx_msg void OnDeleteButton();
  113. afx_msg void OnAdvancedValues();
  114. afx_msg void OnDoubleclickedAdvancedValues();
  115. afx_msg void OnDropFiles(HDROP);
  116. afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
  117. //}}AFX_MSG
  118. DECLARE_MESSAGE_MAP()
  119. int m_oldCX;
  120. int m_oldCY;
  121. float m_deltaXRemainder;
  122. cmake *m_CMakeInstance;
  123. HCURSOR m_Cursor;
  124. bool m_RunningConfigure;
  125. };
  126. //{{AFX_INSERT_LOCATION}}
  127. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  128. #endif // !defined(AFX_CMakeSetupDialogDLG_H__AC17A6F6_4634_11D4_8F21_00A0CC33FCD3__INCLUDED_)