1 // @file wxBindNewContext.cpp
3 // @author Charlie Frasch <cfrasch@atdesk.com>
5 #include "wxBindNewContext.h"
7 #include "wxNamingViewer.h"
11 void create_dialog_components( wxDialog
* dialog
)
13 wxBoxSizer
*topsizer
= new wxBoxSizer( wxVERTICAL
);
16 wxBoxSizer
*sizer
= new wxBoxSizer( wxHORIZONTAL
);
18 new wxStaticText( dialog
, -1, "ID:" ),
22 wxTextCtrl
* text
= new wxTextCtrl(
26 text
->SetName( "idText");
35 wxALIGN_LEFT
| wxEXPAND
);
39 wxBoxSizer
*sizer
= new wxBoxSizer( wxHORIZONTAL
);
41 new wxStaticText( dialog
, -1, "Kind:" ),
45 wxTextCtrl
* text
= new wxTextCtrl(
49 text
->SetName( "kindText");
58 wxALIGN_LEFT
| wxEXPAND
);
61 wxBoxSizer
*button_sizer
= new wxBoxSizer( wxHORIZONTAL
);
63 wxButton
* okButton
= new wxButton( dialog
, wxID_OK
, "OK" );
64 okButton
->SetName( "okButton");
73 new wxButton( dialog
, wxID_CANCEL
, "Cancel" ),
83 dialog
->SetSizer( topsizer
);
84 topsizer
->SetSizeHints( dialog
);
88 WxBindNewContext::WxBindNewContext( wxWindow
* parent
)
89 #if defined(wxUSE_RESOURCES) && (wxUSE_RESOURCES == 1)
98 wxRAISED_BORDER
| wxCAPTION
| wxTHICK_FRAME
| wxSYSTEM_MENU
,
100 #endif // defined(wxUSE_RESOURCES) && (wxUSE_RESOURCES == 1)
102 #if defined(wxUSE_RESOURCES) && (wxUSE_RESOURCES == 1)
103 LoadFromResource( parent
, "bindNewContext");
105 create_dialog_components( this);
106 #endif // defined(wxUSE_RESOURCES) && (wxUSE_RESOURCES == 1)
109 bool WxBindNewContext::TransferDataFromWindow()
112 wxTextCtrl
* ctrl
= static_cast<wxTextCtrl
*>( wxFindWindowByName(
116 name
[0].id
= CORBA::string_dup( ctrl
->GetValue());
118 ctrl
= static_cast<wxTextCtrl
*>( wxFindWindowByName(
122 name
[0].kind
= CORBA::string_dup( ctrl
->GetValue());