bbwx::InputTextWidget Class Reference

#include <bbwxInputText.h>

Collaboration diagram for bbwx::InputTextWidget:

Collaboration graph
[legend]

List of all members.

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

InputTextmBox
wxTextCtrl * mwxTextCtrl
wxStaticText * mwxTitle


Detailed Description

Definition at line 67 of file bbwxInputText.h.


Constructor & Destructor Documentation

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 (  ) 

Definition at line 90 of file bbwxInputText.cxx.

00091   {
00092   }


Member Function Documentation

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   }


Member Data Documentation

Definition at line 80 of file bbwxInputText.h.

Referenced by OnTextUpdate().

wxTextCtrl* bbwx::InputTextWidget::mwxTextCtrl [private]

Definition at line 81 of file bbwxInputText.h.

Referenced by GetValue(), and InputTextWidget().

wxStaticText* bbwx::InputTextWidget::mwxTitle [private]

Definition at line 82 of file bbwxInputText.h.

Referenced by InputTextWidget(), and SetTitle().


The documentation for this class was generated from the following files:

Generated on Tue Oct 21 16:06:53 2008 for wx by  doxygen 1.5.6