CMakeSetupDialog.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. /*=========================================================================
  2. Program: Insight Segmentation & Registration Toolkit
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Insight Consortium. All rights reserved.
  8. See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm 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_HelpButton;
  52. CComboBox m_GeneratorChoice;
  53. CButton m_OKButton;
  54. CButton m_CancelButton;
  55. CString m_WhereSource;
  56. CString m_WhereBuild;
  57. CButton m_ListFrame;
  58. bool m_BuildPathChanged;
  59. CComboBox m_WhereSourceControl;
  60. CComboBox m_WhereBuildControl;
  61. CPropertyList m_CacheEntriesList;
  62. CStatic m_MouseHelp;
  63. CStatic m_VersionDisplay;
  64. CButton m_Configure;
  65. CString m_GeneratorChoiceString;
  66. BOOL m_AdvancedValues;
  67. //}}AFX_DATA
  68. // ClassWizard generated virtual function overrides
  69. //{{AFX_VIRTUAL(CMakeSetupDialog)
  70. protected:
  71. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  72. //}}AFX_VIRTUAL
  73. // Implementation
  74. protected:
  75. void RunCMake(bool generateProjectFiles);
  76. // copy from the cache manager to the cache edit list box
  77. void FillCacheGUIFromCacheManager();
  78. // copy from the list box to the cache manager
  79. void FillCacheManagerFromCacheGUI();
  80. // Create a shortcut on the desktop with the current Source/Build dir.
  81. int CreateShortcut();
  82. // Handle param or single dropped file.
  83. void ChangeDirectoriesFromFile(const char *file);
  84. HICON m_hIcon;
  85. CString m_RegistryKey;
  86. CString m_PathToExecutable;
  87. // Generated message map functions
  88. //{{AFX_MSG(CMakeSetupDialog)
  89. virtual BOOL OnInitDialog();
  90. afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
  91. afx_msg void OnCancel();
  92. afx_msg void OnPaint();
  93. afx_msg HCURSOR OnQueryDragIcon();
  94. afx_msg void OnBrowseWhereSource();
  95. virtual void OnConfigure();
  96. afx_msg void OnBrowseWhereBuild();
  97. afx_msg void OnChangeWhereBuild();
  98. afx_msg void OnSelendokWhereBuild();
  99. afx_msg void OnChangeWhereSource();
  100. afx_msg void OnSelendokWhereSource();
  101. afx_msg void OnSize(UINT nType, int cx, int cy);
  102. afx_msg void OnGetMinMaxInfo( MINMAXINFO FAR* lpMMI );
  103. afx_msg void OnOk();
  104. afx_msg void OnEditchangeGenerator();
  105. afx_msg void OnHelpButton();
  106. afx_msg void OnAdvancedValues();
  107. afx_msg void OnDoubleclickedAdvancedValues();
  108. afx_msg void OnDropFiles(HDROP);
  109. //}}AFX_MSG
  110. DECLARE_MESSAGE_MAP()
  111. int m_oldCX;
  112. int m_oldCY;
  113. float m_deltaXRemainder;
  114. cmake *m_CMakeInstance;
  115. };
  116. //{{AFX_INSERT_LOCATION}}
  117. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  118. #endif // !defined(AFX_CMakeSetupDialogDLG_H__AC17A6F6_4634_11D4_8F21_00A0CC33FCD3__INCLUDED_)