37 : wxDialog(NULL, -1, "Add Variable for
Operation Implementation",
38 wxDefaultPosition, wxSize(360, 140), wxRESIZE_BORDER),
39 varList_(list), language_(language) {
41 wxButton* okButton =
new wxButton(
42 this, wxID_OK, wxT(
"Ok"), wxDefaultPosition, wxSize(70, 30));
44 wxButton* closeButton =
new wxButton(
45 this, wxID_CANCEL, wxT(
"Cancel"), wxDefaultPosition, wxSize(70, 30));
47 wxBoxSizer* hbox1 =
new wxBoxSizer(wxHORIZONTAL);
48 hbox1->Add(okButton, 1);
49 hbox1->Add(closeButton, 1, wxLEFT, 5);
51 nameCtrl_ =
new wxTextCtrl(
this, -1);
52 widthCtrl_ =
new wxTextCtrl(
this, -1);
53 if (language_ ==
"VHDL") {
54 wxString strs[] = {wxT(
"Logic"), wxT(
"Unsigned"), wxT(
"Signed")};
55 typeCtrl_ =
new wxComboBox(
this, -1, wxT(
""), wxDefaultPosition,
56 wxDefaultSize, 3, strs, wxCB_READONLY);
58 wxString strs[] = {wxT(
"Unsigned"), wxT(
"Signed")};
59 typeCtrl_ =
new wxComboBox(
this, -1, wxT(
""), wxDefaultPosition,
60 wxDefaultSize, 2, strs, wxCB_READONLY);
62 typeCtrl_->SetSelection(0);
64 wxStaticText* title1 =
new wxStaticText(
this, -1, wxT(
"Name"));
65 wxStaticText* title2 =
new wxStaticText(
this, -1, wxT(
"Width"));
66 wxStaticText* title3 =
new wxStaticText(
this, -1, wxT(
"Type"));
68 wxFlexGridSizer* flex1 =
new wxFlexGridSizer(2, 3, 9, 25);
72 flex1->Add(nameCtrl_);
73 flex1->Add(widthCtrl_);
74 flex1->Add(typeCtrl_);
76 wxBoxSizer* vbox =
new wxBoxSizer(wxVERTICAL);
77 vbox->Add(flex1, 0, wxALIGN_LEFT | wxLEFT | wxTOP | wxBOTTOM, 10);
78 vbox->Add(hbox1, 0, wxALIGN_CENTER | wxTOP | wxBOTTOM, 10);