OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-2.0/] [tools/] [src/] [tools/] [configtool/] [common/] [win32/] [ConfigViewOptionsDialog.cpp] - Diff between revs 26 and 174

Only display areas with differences | Details | Blame | View Log

Rev 26 Rev 174
//####COPYRIGHTBEGIN####
//####COPYRIGHTBEGIN####
//                                                                          
//                                                                          
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
// Copyright (C) 1998, 1999, 2000 Red Hat, Inc.
//
//
// This program is part of the eCos host tools.
// This program is part of the eCos host tools.
//
//
// This program is free software; you can redistribute it and/or modify it 
// This program is free software; you can redistribute it and/or modify it 
// under the terms of the GNU General Public License as published by the Free 
// under the terms of the GNU General Public License as published by the Free 
// Software Foundation; either version 2 of the License, or (at your option) 
// Software Foundation; either version 2 of the License, or (at your option) 
// any later version.
// any later version.
// 
// 
// This program is distributed in the hope that it will be useful, but WITHOUT 
// This program is distributed in the hope that it will be useful, but WITHOUT 
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for 
// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for 
// more details.
// more details.
// 
// 
// You should have received a copy of the GNU General Public License along with
// You should have received a copy of the GNU General Public License along with
// this program; if not, write to the Free Software Foundation, Inc., 
// this program; if not, write to the Free Software Foundation, Inc., 
// 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
// 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
//
//
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
//                                                                          
//                                                                          
//####COPYRIGHTEND####
//####COPYRIGHTEND####
// ConfigViewOptionsDialog.cpp : implementation file
// ConfigViewOptionsDialog.cpp : implementation file
//
//
 
 
#include "stdafx.h"
#include "stdafx.h"
#include "ConfigViewOptionsDialog.h"
#include "ConfigViewOptionsDialog.h"
#include "ConfigTool.h"
#include "ConfigTool.h"
#include "ConfigToolDoc.h"
#include "ConfigToolDoc.h"
#include "resource.h"
#include "resource.h"
 
 
#ifdef _DEBUG
#ifdef _DEBUG
#define new DEBUG_NEW
#define new DEBUG_NEW
#undef THIS_FILE
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
static char THIS_FILE[] = __FILE__;
#endif
#endif
 
 
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// CConfigViewOptionsDialog dialog
// CConfigViewOptionsDialog dialog
 
 
 
 
CConfigViewOptionsDialog::CConfigViewOptionsDialog()
CConfigViewOptionsDialog::CConfigViewOptionsDialog()
        : CeCosDialog(IDD_CONFIGURATION_VIEW_OPTIONS_DIALOG, NULL)
        : CeCosDialog(IDD_CONFIGURATION_VIEW_OPTIONS_DIALOG, NULL)
{
{
        //{{AFX_DATA_INIT(CConfigViewOptionsDialog)
        //{{AFX_DATA_INIT(CConfigViewOptionsDialog)
                // NOTE: the ClassWizard will add member initialization here
                // NOTE: the ClassWizard will add member initialization here
        //}}AFX_DATA_INIT
        //}}AFX_DATA_INIT
}
}
 
 
 
 
void CConfigViewOptionsDialog::DoDataExchange(CDataExchange* pDX)
void CConfigViewOptionsDialog::DoDataExchange(CDataExchange* pDX)
{
{
        CeCosDialog::DoDataExchange(pDX);
        CeCosDialog::DoDataExchange(pDX);
        //{{AFX_DATA_MAP(CConfigViewOptionsDialog)
        //{{AFX_DATA_MAP(CConfigViewOptionsDialog)
                // NOTE: the ClassWizard will add DDX and DDV calls here
                // NOTE: the ClassWizard will add DDX and DDV calls here
        //}}AFX_DATA_MAP
        //}}AFX_DATA_MAP
}
}
 
 
 
 
BEGIN_MESSAGE_MAP(CConfigViewOptionsDialog, CeCosDialog)
BEGIN_MESSAGE_MAP(CConfigViewOptionsDialog, CeCosDialog)
        //{{AFX_MSG_MAP(CConfigViewOptionsDialog)
        //{{AFX_MSG_MAP(CConfigViewOptionsDialog)
        //}}AFX_MSG_MAP
        //}}AFX_MSG_MAP
END_MESSAGE_MAP()
END_MESSAGE_MAP()
 
 
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// CConfigViewOptionsDialog message handlers
// CConfigViewOptionsDialog message handlers
 
 
BOOL CConfigViewOptionsDialog::OnInitDialog()
BOOL CConfigViewOptionsDialog::OnInitDialog()
{
{
  CeCosDialog::OnInitDialog();
  CeCosDialog::OnInitDialog();
  CConfigToolDoc *pDoc=CConfigTool::GetConfigToolDoc();
  CConfigToolDoc *pDoc=CConfigTool::GetConfigToolDoc();
  ((CButton *)GetDlgItem(IDC_RADIO_DECIMAL))->SetCheck(!pDoc->m_bHex);
  ((CButton *)GetDlgItem(IDC_RADIO_DECIMAL))->SetCheck(!pDoc->m_bHex);
  ((CButton *)GetDlgItem(IDC_RADIO_DESCRIPTIVE_NAMES))->SetCheck(!pDoc->m_bMacroNames);
  ((CButton *)GetDlgItem(IDC_RADIO_DESCRIPTIVE_NAMES))->SetCheck(!pDoc->m_bMacroNames);
  ((CButton *)GetDlgItem(IDC_RADIO_HEXADECIMAL))->SetCheck(pDoc->m_bHex);
  ((CButton *)GetDlgItem(IDC_RADIO_HEXADECIMAL))->SetCheck(pDoc->m_bHex);
  ((CButton *)GetDlgItem(IDC_RADIO_MACRO_NAMES))->SetCheck(pDoc->m_bMacroNames);
  ((CButton *)GetDlgItem(IDC_RADIO_MACRO_NAMES))->SetCheck(pDoc->m_bMacroNames);
  return TRUE;  // return TRUE unless you set the focus to a control
  return TRUE;  // return TRUE unless you set the focus to a control
  // EXCEPTION: OCX Property Pages should return FALSE
  // EXCEPTION: OCX Property Pages should return FALSE
}
}
 
 
void CConfigViewOptionsDialog::OnOK()
void CConfigViewOptionsDialog::OnOK()
{
{
  bool bHex=((CButton *)GetDlgItem(IDC_RADIO_HEXADECIMAL))->GetCheck();
  bool bHex=((CButton *)GetDlgItem(IDC_RADIO_HEXADECIMAL))->GetCheck();
  CConfigToolDoc *pDoc=CConfigTool::GetConfigToolDoc();
  CConfigToolDoc *pDoc=CConfigTool::GetConfigToolDoc();
  if(bHex!=pDoc->m_bHex){
  if(bHex!=pDoc->m_bHex){
    pDoc->m_bHex=bHex;
    pDoc->m_bHex=bHex;
    pDoc->UpdateAllViews(0,CConfigToolDoc::IntFormatChanged);
    pDoc->UpdateAllViews(0,CConfigToolDoc::IntFormatChanged);
  }
  }
 
 
  bool bMacros=((CButton *)GetDlgItem(IDC_RADIO_MACRO_NAMES))->GetCheck();
  bool bMacros=((CButton *)GetDlgItem(IDC_RADIO_MACRO_NAMES))->GetCheck();
  if(bMacros!=pDoc->m_bMacroNames){
  if(bMacros!=pDoc->m_bMacroNames){
    pDoc->m_bMacroNames=bMacros;
    pDoc->m_bMacroNames=bMacros;
    pDoc->UpdateAllViews(0,CConfigToolDoc::NameFormatChanged);
    pDoc->UpdateAllViews(0,CConfigToolDoc::NameFormatChanged);
  }
  }
  CeCosDialog::OnOK();
  CeCosDialog::OnOK();
}
}
 
 
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.