summaryrefslogtreecommitdiff
path: root/examples/ConfigViewer/ValueDlg.cpp
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-05-17 15:48:13 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-05-17 15:48:13 +0000
commitf9a45a841f6c33779a06fb75cc9ea4b20b5db462 (patch)
tree8752f0d420ba6188c5d4bf97b9d643353656cd29 /examples/ConfigViewer/ValueDlg.cpp
parent3e118b94046220b2322660fffbc4618b46346a8f (diff)
downloadATCD-f9a45a841f6c33779a06fb75cc9ea4b20b5db462.tar.gz
Chris Hafey's ACE_Configuration viewer for vxWindows.
Diffstat (limited to 'examples/ConfigViewer/ValueDlg.cpp')
-rw-r--r--examples/ConfigViewer/ValueDlg.cpp63
1 files changed, 63 insertions, 0 deletions
diff --git a/examples/ConfigViewer/ValueDlg.cpp b/examples/ConfigViewer/ValueDlg.cpp
new file mode 100644
index 00000000000..16ec9c34b22
--- /dev/null
+++ b/examples/ConfigViewer/ValueDlg.cpp
@@ -0,0 +1,63 @@
+// $Id$
+#include "stdafx.h"
+#include "ValueDlg.h"
+
+ValueDlg::ValueDlg(wxWindow* pParent, bool String)
+: wxDialog(pParent, -1, String ? "New String" : "New Value", wxDefaultPosition, wxSize(300,140))
+{
+ m_pName= new wxStaticText(this, -1, "Name:", wxPoint(20, 20));
+ m_pNameText = new wxTextCtrl(this, -1, "", wxPoint(60, 20), wxDefaultSize, 0, wxTextValidator(wxFILTER_NONE, &m_Name));
+ m_pValue = new wxStaticText(this, -1, "Value:", wxPoint(20, 50));
+ m_pValueText = new wxTextCtrl(this, -1, "", wxPoint(60, 50), wxDefaultSize, 0, wxTextValidator(String ? wxFILTER_NONE : wxFILTER_NUMERIC, &m_Value));
+ m_pOK = new wxButton(this, wxID_OK, "OK", wxPoint(60, 80));
+ m_pCancel = new wxButton(this, wxID_CANCEL, "Cancel", wxPoint(160, 80));
+}
+
+ValueDlg::ValueDlg(wxWindow* pParent, wxString& Name, wxString& Value)
+: wxDialog(pParent, -1, "Edit String", wxDefaultPosition, wxSize(300,140))
+{
+ m_Name = Name;
+ m_Value = Value;
+ m_pName= new wxStaticText(this, -1, "Name:", wxPoint(20, 20));
+ m_pNameText = new wxTextCtrl(this, -1, "", wxPoint(60, 20), wxDefaultSize, 0, wxTextValidator(wxFILTER_NONE, &m_Name));
+ m_pNameText->SetEditable(false);
+ m_pValue = new wxStaticText(this, -1, "Value:", wxPoint(20, 50));
+ m_pValueText = new wxTextCtrl(this, -1, Value, wxPoint(60, 50), wxDefaultSize, 0, wxTextValidator(wxFILTER_NONE, &m_Value));
+ m_pOK = new wxButton(this, wxID_OK, "OK", wxPoint(60, 80));
+ m_pCancel = new wxButton(this, wxID_CANCEL, "Cancel", wxPoint(160, 80));
+}
+
+ValueDlg::ValueDlg(wxWindow* pParent, wxString& Name, u_int Value)
+: wxDialog(pParent, -1, "Edit String", wxDefaultPosition, wxSize(300,140))
+{
+ m_Name = Name;
+ m_Value.sprintf("%d", Value);
+ m_pName= new wxStaticText(this, -1, "Name:", wxPoint(20, 20));
+ m_pNameText = new wxTextCtrl(this, -1, "", wxPoint(60, 20), wxDefaultSize, 0, wxTextValidator(wxFILTER_NONE, &m_Name));
+ m_pNameText->SetEditable(false);
+ m_pValue = new wxStaticText(this, -1, "Value:", wxPoint(20, 50));
+ m_pValueText = new wxTextCtrl(this, -1, m_Value, wxPoint(60, 50), wxDefaultSize, 0, wxTextValidator(wxFILTER_NUMERIC, &m_Value));
+ m_pOK = new wxButton(this, wxID_OK, "OK", wxPoint(60, 80));
+ m_pCancel = new wxButton(this, wxID_CANCEL, "Cancel", wxPoint(160, 80));
+}
+
+
+ValueDlg::~ValueDlg()
+{
+}
+
+const wxString& ValueDlg::GetName()
+{
+ return m_Name;
+}
+
+const wxString& ValueDlg::GetStringValue()
+{
+ return m_Value;
+}
+
+u_int ValueDlg::GetUINTValue()
+{
+ return atoi(m_Value);
+}
+