CMakeSetupDialog.h 3.9 KB

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