summaryrefslogtreecommitdiffstats
path: root/Source/MFCDialog
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2008-03-12 02:51:56 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2008-03-12 02:51:56 (GMT)
commit420725077cc9326d5b8c610f2770994a177eed15 (patch)
tree955bf582c6b9d25475b1c98a98a0ba49b587f2d9 /Source/MFCDialog
parentfc26c1459caa61c79b9076e3ca85905e45bbcbc9 (diff)
downloadCMake-420725077cc9326d5b8c610f2770994a177eed15.zip
CMake-420725077cc9326d5b8c610f2770994a177eed15.tar.gz
CMake-420725077cc9326d5b8c610f2770994a177eed15.tar.bz2
ENH: add ability to suppress dev warnings to gui code
Diffstat (limited to 'Source/MFCDialog')
-rw-r--r--Source/MFCDialog/CMakeSetup.rc36
-rw-r--r--Source/MFCDialog/CMakeSetupDialog.cpp21
-rw-r--r--Source/MFCDialog/CMakeSetupDialog.h4
-rw-r--r--Source/MFCDialog/resource.h4
4 files changed, 41 insertions, 24 deletions
diff --git a/Source/MFCDialog/CMakeSetup.rc b/Source/MFCDialog/CMakeSetup.rc
index 37f25aa..3e144e4 100644
--- a/Source/MFCDialog/CMakeSetup.rc
+++ b/Source/MFCDialog/CMakeSetup.rc
@@ -83,34 +83,28 @@ BEGIN
END
IDD_CMakeSetupDialog_DIALOG DIALOGEX 0, 0, 447, 255
-STYLE WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE |
- WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
+STYLE DS_SETFONT | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
EXSTYLE WS_EX_APPWINDOW
CAPTION "CMakeSetupDialog"
+FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN
RTEXT "Where is the source code:",IDC_STATIC,6,7,86,9
- COMBOBOX IDC_WhereSource,96,6,169,12,CBS_SIMPLE | CBS_AUTOHSCROLL |
- WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_WhereSource,96,6,169,12,CBS_SIMPLE | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Browse...",IDC_BROWSE_SOURCE,267,6,34,13
RTEXT "Where to build the binaries:",IDC_STATIC,5,27,90,9
- COMBOBOX IDC_WhereBuild,96,26,169,68,CBS_DROPDOWN |
- CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
+ COMBOBOX IDC_WhereBuild,96,26,169,68,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Browse...",IDC_BROWSE_BUILD,267,25,34,13
- CONTROL "Show Advanced Values",IDC_AdvancedValues,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,321,18,98,9
+ CONTROL "Show Advanced Values",IDC_AdvancedValues,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,321,9,98,9
DEFPUSHBUTTON "Configure",IDC_BuildProjects,84,221,51,15
PUSHBUTTON "OK",IDC_OK,141,221,51,15
PUSHBUTTON "Cancel",IDCANCEL,198,221,51,15
PUSHBUTTON "Help",IDC_HELP_BUTTON,312,221,51,15
- LISTBOX IDC_LIST2,15,53,419,126,LBS_SORT | LBS_OWNERDRAWVARIABLE |
- LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL |
- WS_HSCROLL
+ LISTBOX IDC_LIST2,15,53,419,126,LBS_SORT | LBS_OWNERDRAWVARIABLE | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL
GROUPBOX "Cache Values",IDC_FRAME,10,44,432,140
- CTEXT "Right click on a cache value for additional options (delete, ignore, and help).\nPress Configure to update and display new values in red.\nPress OK to generate selected build files and exit.",
- IDC_MouseHelpCaption,0,191,442,27
- LTEXT "Static",IDC_PROGRESS,2,240,442,12,SS_CENTERIMAGE |
- SS_SUNKEN
+ CTEXT "Right click on a cache value for additional options (delete, ignore, and help).\nPress Configure to update and display new values in red.\nPress OK to generate selected build files and exit.",IDC_MouseHelpCaption,0,191,442,27
+ LTEXT "Static",IDC_PROGRESS,2,240,442,12,SS_CENTERIMAGE | SS_SUNKEN
PUSHBUTTON "Delete Cache",IDC_DELETE_BUTTON,255,221,51,15
+ CONTROL "Suppress dev Warnings",IDC_SUPPRESS_DEV_WARNINGS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,321,28,108,10
END
IDD_CMAKE_HELP_DIALOG DIALOG 0, 0, 365, 183
@@ -118,22 +112,18 @@ STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "CMake Help"
BEGIN
DEFPUSHBUTTON "OK",IDOK,155,159,50,14
- EDITTEXT IDC_EDIT1,7,7,351,152,ES_MULTILINE | ES_READONLY | NOT
- WS_BORDER
+ EDITTEXT IDC_EDIT1,7,7,351,152,ES_MULTILINE | ES_READONLY | NOT WS_BORDER
END
IDD_GEN_DIALOG DIALOGEX 0, 0, 263, 86
-STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
- WS_SYSMENU
+STYLE DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Select Generator"
BEGIN
DEFPUSHBUTTON "OK",IDOK,70,65,50,14
PUSHBUTTON "Cancel",IDCANCEL,143,65,50,14
RTEXT "Build For:",IDC_BuildForLabel,7,45,34,11,SS_CENTERIMAGE
- COMBOBOX IDC_Generator,52,45,204,117,CBS_DROPDOWN | CBS_SORT |
- WS_VSCROLL | WS_TABSTOP
- CTEXT "Please select what build system you want CMake to generate files for.\nYou should select the tool that you will use to build the project.\nPress OK once you have made your selection.",
- IDC_MouseHelpCaption,7,7,245,36
+ COMBOBOX IDC_Generator,52,45,204,117,CBS_DROPDOWN | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+ CTEXT "Please select what build system you want CMake to generate files for.\nYou should select the tool that you will use to build the project.\nPress OK once you have made your selection.",IDC_MouseHelpCaption,7,7,245,36
END
diff --git a/Source/MFCDialog/CMakeSetupDialog.cpp b/Source/MFCDialog/CMakeSetupDialog.cpp
index ba74c93..ad967c6 100644
--- a/Source/MFCDialog/CMakeSetupDialog.cpp
+++ b/Source/MFCDialog/CMakeSetupDialog.cpp
@@ -224,6 +224,8 @@ void CMakeSetupDialog::DoDataExchange(CDataExchange* pDX)
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CMakeSetupDialog)
DDX_Control(pDX, IDC_AdvancedValues, m_AdvancedValuesControl);
+ DDX_Control(pDX, IDC_SUPPRESS_DEV_WARNINGS, m_SuppressDevWarningsControl);
+ DDX_Check(pDX, IDC_SUPPRESS_DEV_WARNINGS, m_SuppressDevValue);
DDX_Control(pDX, IDC_BROWSE_SOURCE, m_BrowseSource);
DDX_Control(pDX, IDC_BROWSE_BUILD, m_BrowseBuild);
DDX_Control(pDX, IDC_DELETE_BUTTON, m_DeleteButton);
@@ -261,6 +263,8 @@ BEGIN_MESSAGE_MAP(CMakeSetupDialog, CDialog)
ON_BN_CLICKED(IDC_DELETE_BUTTON, OnDeleteButton)
ON_BN_CLICKED(IDC_HELP_BUTTON, OnHelpButton)
ON_BN_CLICKED(IDC_AdvancedValues, OnAdvancedValues)
+ ON_BN_CLICKED(IDC_SUPPRESS_DEV_WARNINGS, OnSuppressDevValue)
+ ON_BN_DOUBLECLICKED(IDC_SUPPRESS_DEV_WARNINGS, OnDoubleclickedSuppressDevValue)
ON_BN_DOUBLECLICKED(IDC_AdvancedValues, OnDoubleclickedAdvancedValues)
ON_WM_DROPFILES()
ON_BN_CLICKED(IDCANCEL, OnCancel)
@@ -671,6 +675,7 @@ void CMakeSetupDialog::RunCMake(bool generateProjectFiles)
m_CMakeInstance->CreateGlobalGenerator(m_GeneratorDialog.m_GeneratorChoiceString));
m_CMakeInstance->SetCMakeCommand(m_PathToExecutable);
m_CMakeInstance->LoadCache();
+ m_CMakeInstance->SetSuppressDevWarnings(m_SuppressDevValue);
if(m_CMakeInstance->Configure() != 0)
{
cmSystemTools::Error(
@@ -1073,6 +1078,13 @@ void CMakeSetupDialog::OnSize(UINT nType, int cx, int cy)
0, 0,
SWP_NOCOPYBITS |
SWP_NOSIZE | SWP_NOZORDER);
+ m_SuppressDevWarningsControl.GetWindowRect(&cRect);
+ this->ScreenToClient(&cRect);
+ m_SuppressDevWarningsControl.SetWindowPos(&wndTop, cRect.left + deltax,
+ cRect.top,
+ 0, 0,
+ SWP_NOCOPYBITS |
+ SWP_NOSIZE | SWP_NOZORDER);
m_BrowseSource.GetWindowRect(&cRect);
this->ScreenToClient(&cRect);
m_BrowseSource.SetWindowPos(&wndTop, cRect.left + deltax,
@@ -1383,6 +1395,15 @@ void CMakeSetupDialog::RemoveAdvancedValues()
}
+void CMakeSetupDialog::OnSuppressDevValue()
+{
+}
+
+void CMakeSetupDialog::OnDoubleclickedSuppressDevValue()
+{
+ this->OnSuppressDevValue();
+}
+
void CMakeSetupDialog::OnAdvancedValues()
{
this->UpdateData();
diff --git a/Source/MFCDialog/CMakeSetupDialog.h b/Source/MFCDialog/CMakeSetupDialog.h
index 5311a84..d20a765 100644
--- a/Source/MFCDialog/CMakeSetupDialog.h
+++ b/Source/MFCDialog/CMakeSetupDialog.h
@@ -63,6 +63,7 @@ protected:
//{{AFX_DATA(CMakeSetupDialog)
enum { IDD = IDD_CMakeSetupDialog_DIALOG };
CButton m_AdvancedValuesControl;
+ CButton m_SuppressDevWarningsControl;
CButton m_BrowseSource;
CButton m_BrowseBuild;
CButton m_HelpButton;
@@ -80,6 +81,7 @@ protected:
CStatic m_StatusDisplay;
CButton m_Configure;
BOOL m_AdvancedValues;
+ BOOL m_SuppressDevValue;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
@@ -125,6 +127,8 @@ protected:
afx_msg void OnDeleteButton();
afx_msg void OnAdvancedValues();
afx_msg void OnDoubleclickedAdvancedValues();
+ afx_msg void OnSuppressDevValue();
+ afx_msg void OnDoubleclickedSuppressDevValue();
afx_msg void OnDropFiles(HDROP);
afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
//}}AFX_MSG
diff --git a/Source/MFCDialog/resource.h b/Source/MFCDialog/resource.h
index a4160a7..0395b76 100644
--- a/Source/MFCDialog/resource.h
+++ b/Source/MFCDialog/resource.h
@@ -33,6 +33,8 @@
#define IDC_AdvancedValues 1027
#define IDC_PROGRESS 1028
#define IDC_BuildForLabel 1029
+#define IDC_CHECK1 1030
+#define IDC_SUPPRESS_DEV_WARNINGS 1030
// Next default values for new objects
//
@@ -40,7 +42,7 @@
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 135
#define _APS_NEXT_COMMAND_VALUE 32771
-#define _APS_NEXT_CONTROL_VALUE 1030
+#define _APS_NEXT_CONTROL_VALUE 1031
#define _APS_NEXT_SYMED_VALUE 102
#endif
#endif