95 const HDBManager& manager = *wxGetApp().mainFrame().hdbManager();
96 std::string hdbPath = manager.
fileName();
101 this, _T(
"Choose a file"), defaultDir, _T(
""),
102 _T(
"VHDL files (*.vhd;*.vhdl)|*.vhd;*.vhdl|Verilog files (*.v)|*.v| All files (*.*)|*.*"),
103 (wxOPEN | wxFILE_MUST_EXIST));
106 dialog.SetFilterIndex(hdl_type->GetCurrentSelection());
108 if (dialog.ShowModal() == wxID_OK) {
114 for (std::vector<std::string>::iterator it = vhdlPaths.begin();
115 it != vhdlPaths.end(); ++it) {
117 if (vhdlPath.substr(0, (*it).length()) == *it) {
119 filename = filename.substr((*it).length() + 1);
125 TransferDataToWindow();
186 wxWindow *parent,
bool call_fit,
bool set_sizer) {
188 wxBoxSizer *item0 =
new wxBoxSizer( wxVERTICAL );
190 wxFlexGridSizer *item1 =
new wxFlexGridSizer( 3, 0, 0 );
192 wxStaticText *item2 =
new wxStaticText( parent,
ID_LABEL_PATH, wxT(
"Path:"), wxDefaultPosition, wxDefaultSize, 0 );
193 item1->Add( item2, 0, wxALIGN_RIGHT|wxALL, 5 );
195 wxTextCtrl *item3 =
new wxTextCtrl( parent,
ID_PATH, wxT(
""), wxDefaultPosition, wxSize(200,-1), 0 );
196 item1->Add( item3, 0, wxALIGN_CENTER|wxALL, 5 );
198 wxButton *item4 =
new wxButton( parent,
ID_BROWSE, wxT(
"Browse..."), wxDefaultPosition, wxDefaultSize, 0 );
199 item1->Add( item4, 0, wxALIGN_CENTER|wxALL, 5 );
201 wxStaticText *item5 =
new wxStaticText( parent,
ID_LABEL_FORMAT, wxT(
"Format:"), wxDefaultPosition, wxDefaultSize, 0 );
202 item1->Add( item5, 0, wxALIGN_RIGHT|wxALL, 5 );
209 wxChoice *item6 =
new wxChoice( parent,
ID_FORMAT, wxDefaultPosition, wxSize(100,-1), 2, strs6, 0 );
210 item1->Add( item6, 0, wxGROW|wxALL, 5 );
212 item0->Add( item1, 0, wxALIGN_CENTER|wxALL, 5 );
214 wxStaticLine *item7 =
new wxStaticLine( parent,
ID_LINE, wxDefaultPosition, wxSize(20,-1), wxLI_HORIZONTAL );
215 item0->Add( item7, 0, wxGROW|wxALL, 5 );
217 wxBoxSizer *item8 =
new wxBoxSizer( wxHORIZONTAL );
219 wxButton *item9 =
new wxButton( parent, wxID_CANCEL, wxT(
"&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
220 item8->Add( item9, 0, wxALL, 5 );
222 wxButton *item10 =
new wxButton( parent, wxID_OK, wxT(
"&OK"), wxDefaultPosition, wxDefaultSize, 0 );
223 item8->Add( item10, 0, wxALIGN_CENTER|wxALL, 5 );
225 item0->Add( item8, 0, wxALIGN_CENTER|wxALL, 5 );
229 parent->SetSizer( item0 );
231 item0->SetSizeHints( parent );