1 //####COPYRIGHTBEGIN####
3 // ----------------------------------------------------------------------------
4 // Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
6 // This program is part of the eCos host tools.
8 // This program is free software; you can redistribute it and/or modify it
9 // under the terms of the GNU General Public License as published by the Free
10 // Software Foundation; either version 2 of the License, or (at your option)
13 // This program is distributed in the hope that it will be useful, but WITHOUT
14 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
18 // You should have received a copy of the GNU General Public License along with
19 // this program; if not, write to the Free Software Foundation, Inc.,
20 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 // ----------------------------------------------------------------------------
24 //####COPYRIGHTEND####
25 // OutputPage.cpp : implementation file
28 //===========================================================================
29 //===========================================================================
30 //#####DESCRIPTIONBEGIN####
37 // Description: This is the implementation of the Configuration -> Options View tab
44 //####DESCRIPTIONEND####
46 //===========================================================================
50 #include "ConfigTool.h"
51 #include "ConfigToolDoc.h"
52 #include "CTOptionsDialog.h"
53 #include "ConfigItem.h"
58 static char THIS_FILE[] = __FILE__;
61 /////////////////////////////////////////////////////////////////////////////
62 // CToolsOptionsDialog property page
64 CToolsOptionsDialog::CToolsOptionsDialog()
65 : CeCosDialog(IDD, NULL)
67 //{{AFX_DATA_INIT(CToolsOptionsDialog)
71 CToolsOptionsDialog::~CToolsOptionsDialog()
75 void CToolsOptionsDialog::DoDataExchange(CDataExchange* pDX)
77 CeCosDialog::DoDataExchange(pDX);
78 //{{AFX_DATA_MAP(CToolsOptionsDialog)
83 BEGIN_MESSAGE_MAP(CToolsOptionsDialog, CeCosDialog)
84 //{{AFX_MSG_MAP(CToolsOptionsDialog)
85 ON_BN_CLICKED(IDC_DEFERRED, OnDeferred)
86 ON_BN_CLICKED(IDC_IMMEDIATE, OnImmediate)
90 /////////////////////////////////////////////////////////////////////////////
91 // CToolsOptionsDialog message handlers
94 BOOL CToolsOptionsDialog::OnInitDialog()
96 CeCosDialog::OnInitDialog();
97 CConfigToolDoc*pDoc=CConfigTool::GetConfigToolDoc();
98 ((CButton *)GetDlgItem(IDC_IMMEDIATE))->SetCheck(pDoc->m_nRuleChecking&CConfigToolDoc::Immediate);
99 ((CButton *)GetDlgItem(IDC_DEFERRED ))->SetCheck(pDoc->m_nRuleChecking&CConfigToolDoc::Deferred);
100 ((CButton *)GetDlgItem(IDC_SUGGEST_FIXES ))->SetCheck(pDoc->m_nRuleChecking&CConfigToolDoc::SuggestFixes);
103 return TRUE; // return TRUE unless you set the focus to a control
104 // EXCEPTION: OCX Property Pages should return FALSE
107 void CToolsOptionsDialog::OnDeferred()
112 void CToolsOptionsDialog::OnImmediate()
117 void CToolsOptionsDialog::OnOK()
119 CConfigToolDoc *pDoc=CConfigTool::GetConfigToolDoc();
121 pDoc->m_nRuleChecking=
122 (CConfigToolDoc::SuggestFixes * ((CButton *)GetDlgItem(IDC_SUGGEST_FIXES))->GetCheck())|
123 (CConfigToolDoc::Immediate * ((CButton *)GetDlgItem(IDC_IMMEDIATE))->GetCheck())|
124 (CConfigToolDoc::Deferred * ((CButton *)GetDlgItem(IDC_DEFERRED))->GetCheck());
131 void CToolsOptionsDialog::SetButtons()
133 GetDlgItem(IDC_SUGGEST_FIXES)->EnableWindow(((CButton *)GetDlgItem(IDC_IMMEDIATE))->GetCheck()|((CButton *)GetDlgItem(IDC_DEFERRED))->GetCheck());