#include <bbwxInputText.h>
Public Member Functions | |
InputTextWidget (InputText *box, wxWindow *parent, wxString In, wxString title) | |
~InputTextWidget () | |
std::string | GetValue () |
void | OnTextUpdate (wxCommandEvent &event) |
void | SetTitle (wxString) |
Private Attributes | |
InputText * | mBox |
wxTextCtrl * | mwxTextCtrl |
wxStaticText * | mwxTitle |
Definition at line 67 of file bbwxInputText.h.
bbwx::InputTextWidget::InputTextWidget | ( | InputText * | box, | |
wxWindow * | parent, | |||
wxString | In, | |||
wxString | title | |||
) |
Definition at line 53 of file bbwxInputText.cxx.
References mwxTextCtrl, mwxTitle, and OnTextUpdate().
00057 : wxPanel( parent, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL), 00058 mBox(box) 00059 { 00060 wxPanel *panel = this; 00061 00062 mwxTextCtrl = new wxTextCtrl( panel, -1, In, 00063 wxDefaultPosition, wxSize(800,20)); 00064 Connect( mwxTextCtrl->GetId(), wxEVT_COMMAND_TEXT_UPDATED, 00065 (wxObjectEventFunction) 00066 (wxEventFunction) 00067 (wxCommandEventFunction) 00068 (void (wxPanel::*)(wxCommandEvent&)) 00069 &InputTextWidget::OnTextUpdate ); 00070 00071 00072 wxFlexGridSizer *sizer = new wxFlexGridSizer(1); 00073 /* 00074 if (title!=_T("")) 00075 { 00076 */ 00077 mwxTitle = new wxStaticText(panel,-1, title ); 00078 sizer -> Add( mwxTitle ); 00079 // } 00080 sizer -> Add( mwxTextCtrl,1,wxGROW ); 00081 sizer -> AddGrowableCol(0); 00082 00083 panel -> SetSizer(sizer); 00084 panel -> SetAutoLayout(true); 00085 panel -> Layout(); 00086 00087 }
bbwx::InputTextWidget::~InputTextWidget | ( | ) |
std::string bbwx::InputTextWidget::GetValue | ( | ) |
Definition at line 103 of file bbwxInputText.cxx.
References mwxTextCtrl.
Referenced by OnTextUpdate(), and bbwx::InputText::Process().
00104 { 00105 return bbtk::wx2std ( mwxTextCtrl->GetValue() ); 00106 }
void bbwx::InputTextWidget::OnTextUpdate | ( | wxCommandEvent & | event | ) |
Definition at line 109 of file bbwxInputText.cxx.
References GetValue(), and mBox.
Referenced by InputTextWidget().
00110 { 00111 mBox->bbSetOutputOut( GetValue() ); 00112 mBox->bbSetInputIn( GetValue() ); 00113 mBox->bbSignalOutputModification("Out"); 00114 }
void bbwx::InputTextWidget::SetTitle | ( | wxString | s | ) |
Definition at line 97 of file bbwxInputText.cxx.
References mwxTitle.
Referenced by bbwx::InputText::Process().
00098 { 00099 mwxTitle->SetLabel(s); 00100 }
InputText* bbwx::InputTextWidget::mBox [private] |
wxTextCtrl* bbwx::InputTextWidget::mwxTextCtrl [private] |
wxStaticText* bbwx::InputTextWidget::mwxTitle [private] |