CMakeSetupDialog.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. // CMakeSetupDialogDlg.h : header file
  2. //
  3. #if !defined(AFX_CMakeSetupDialogDLG_H__AC17A6F6_4634_11D4_8F21_00A0CC33FCD3__INCLUDED_)
  4. #define AFX_CMakeSetupDialogDLG_H__AC17A6F6_4634_11D4_8F21_00A0CC33FCD3__INCLUDED_
  5. #if _MSC_VER > 1000
  6. #pragma once
  7. #endif // _MSC_VER > 1000
  8. #include "PropertyList.h"
  9. /////////////////////////////////////////////////////////////////////////////
  10. // CMakeSetupDialog dialog
  11. class CMakeCommandLineInfo;
  12. class CMakeSetupDialog : public CDialog
  13. {
  14. // Construction
  15. public:
  16. CMakeSetupDialog(const CMakeCommandLineInfo& cmdInfo,
  17. CWnd* pParent = NULL);
  18. protected:
  19. //! Load cache file from m_WhereBuild and display in GUI editor
  20. void LoadCacheFromDiskToGUI();
  21. //! Save GUI values to cmCacheManager and then save to disk.
  22. void SaveCacheFromGUI();
  23. void SaveToRegistry();
  24. void LoadFromRegistry();
  25. bool Browse(CString&, const char* title);
  26. void ReadRegistryValue(HKEY hKey,
  27. CString *val,
  28. const char *key,
  29. const char *aadefault);
  30. // Dialog Data
  31. //{{AFX_DATA(CMakeSetupDialog)
  32. enum { IDD = IDD_CMakeSetupDialog_DIALOG };
  33. CButton m_HelpButton;
  34. CComboBox m_GeneratorChoice;
  35. CButton m_OKButton;
  36. CButton m_CancelButton;
  37. CString m_WhereSource;
  38. CString m_WhereBuild;
  39. CButton m_ListFrame;
  40. bool m_BuildPathChanged;
  41. CComboBox m_WhereSourceControl;
  42. CComboBox m_WhereBuildControl;
  43. CPropertyList m_CacheEntriesList;
  44. CStatic m_MouseHelp;
  45. CStatic m_VersionDisplay;
  46. CButton m_Configure;
  47. CString m_GeneratorChoiceString;
  48. //}}AFX_DATA
  49. // ClassWizard generated virtual function overrides
  50. //{{AFX_VIRTUAL(CMakeSetupDialog)
  51. protected:
  52. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  53. //}}AFX_VIRTUAL
  54. // Implementation
  55. protected:
  56. void RunCMake(bool generateProjectFiles);
  57. // copy from the cache manager to the cache edit list box
  58. void FillCacheGUIFromCacheManager();
  59. // copy from the list box to the cache manager
  60. void FillCacheManagerFromCacheGUI();
  61. // Create a shortcut on the desktop with the current Source/Build dir.
  62. int CreateShortcut();
  63. HICON m_hIcon;
  64. CString m_RegistryKey;
  65. CString m_PathToExecutable;
  66. // Generated message map functions
  67. //{{AFX_MSG(CMakeSetupDialog)
  68. virtual BOOL OnInitDialog();
  69. afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
  70. afx_msg void OnCancel();
  71. afx_msg void OnPaint();
  72. afx_msg HCURSOR OnQueryDragIcon();
  73. afx_msg void OnBrowseWhereSource();
  74. virtual void OnConfigure();
  75. afx_msg void OnBrowseWhereBuild();
  76. afx_msg void OnChangeWhereBuild();
  77. afx_msg void OnSelendokWhereBuild();
  78. afx_msg void OnChangeWhereSource();
  79. afx_msg void OnSelendokWhereSource();
  80. afx_msg void OnSize(UINT nType, int cx, int cy);
  81. afx_msg void OnGetMinMaxInfo( MINMAXINFO FAR* lpMMI );
  82. afx_msg void OnOk();
  83. afx_msg void OnEditchangeGenerator();
  84. afx_msg void OnHelpButton();
  85. //}}AFX_MSG
  86. DECLARE_MESSAGE_MAP()
  87. int m_oldCX;
  88. int m_oldCY;
  89. float m_deltaXRemainder;
  90. };
  91. //{{AFX_INSERT_LOCATION}}
  92. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  93. #endif // !defined(AFX_CMakeSetupDialogDLG_H__AC17A6F6_4634_11D4_8F21_00A0CC33FCD3__INCLUDED_)