// +-------------------------------- DISCLAIMER ---------------------------------+
// |                                                                             |
// | This program is provided to you free of charge "as such".                   |
// | You should not assume that this program is error-free or suitable for any   |
// | purpose whatsoever.                                                         |
// |                                                                             |
// | EURESYS does not give any representation, warranty or undertaking that this |
// | program is free of any defect or error or suitable for any purpose. EURESYS |
// | shall not be liable, in contract, in torts or otherwise, for any damages,   |
// | loss, costs, expenses or other claims for compensation, including those     |
// | asserted by third parties, arising out of or in connection with the use of  |
// | this program.                                                               |
// +-----------------------------------------------------------------------------+

#pragma once

// AT grabber parameters dialog
class NerianDialog : public CDialog
{
public:
  NerianDialog(float maxd) : CDialog(IDD_NERIAN_PARAMETERS), max_distance(maxd)
  {}

protected:
  DECLARE_MESSAGE_MAP()

  virtual BOOL OnInitDialog()
  {
    CDialog::OnInitDialog();
    ((CEdit*)GetDlgItem(IDC_MAXDISTANCE))->SetWindowText(std::to_wstring(max_distance).c_str());

    return TRUE;
  }

  void OnOK()
  {
    CString str;
    ((CEdit*)GetDlgItem(IDC_MAXDISTANCE))->GetWindowText(str);
    max_distance = (float)_wtof(str);

    CDialog::EndDialog(1);
  }

public:
  float max_distance;
};

BEGIN_MESSAGE_MAP(NerianDialog, CDialog)
END_MESSAGE_MAP()
