Program: bbtk
Module: $RCSfile: bbwxInputText.cxx,v $
Language: C++
- Date: $Date: 2009/05/15 14:58:03 $
- Version: $Revision: 1.6 $
+ Date: $Date: 2009/12/02 15:13:25 $
+ Version: $Revision: 1.7 $
=========================================================================*/
/* ---------------------------------------------------------------------
* \brief
*/
-
#ifdef _USE_WXWIDGETS_
-
#include "bbwxInputText.h"
#include "bbwxPackage.h"
//#include <wx/dialog.h>
-
-
-
namespace bbwx
{
-
-
-
-
-
+
//--------------------------------------------------------------------------
class InputTextWidget : wxPanel
{
//------------------------------------------------------------------------
//------------------------------------------------------------------------
-
-
-
InputTextWidget::InputTextWidget(InputText* box,
wxWindow *parent,
wxString In,
mwxTextCtrl = new wxTextCtrl( panel, -1, In,
wxDefaultPosition, wxSize(800,20));
+
Connect( mwxTextCtrl->GetId(), wxEVT_COMMAND_TEXT_UPDATED,
(wxObjectEventFunction)
(wxEventFunction)
(wxCommandEventFunction)
(void (wxPanel::*)(wxCommandEvent&))
&InputTextWidget::OnTextUpdate );
-
-
+
wxFlexGridSizer *sizer = new wxFlexGridSizer(1);
/*
if (title!=_T(""))
{
*/
- mwxTitle = new wxStaticText(panel,-1, title );
- sizer -> Add( mwxTitle );
+ mwxTitle = new wxStaticText(panel, -1, title );
+ sizer-> Add( mwxTitle );
// }
- sizer -> Add( mwxTextCtrl,1,wxGROW );
- sizer -> AddGrowableCol(0);
+ sizer-> Add( mwxTextCtrl, 1, wxGROW );
+ sizer-> AddGrowableCol(0);
- panel -> SetSizer(sizer);
- panel -> SetAutoLayout(true);
- panel -> Layout();
+ panel-> SetSizer(sizer);
+ panel-> SetAutoLayout(true);
+ panel-> Layout();
}
//-------------------------------------------------------------------------
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
- BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,InputText);
- BBTK_BLACK_BOX_IMPLEMENTATION(InputText,bbtk::WxBlackBox);
+ BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx, InputText);
+ BBTK_BLACK_BOX_IMPLEMENTATION(InputText, bbtk::WxBlackBox);
//-----------------------------------------------------------------
{
bbSetOutputWidget
( (wxWindow*) new InputTextWidget(this, //bbGetWxParent(),
- parent,
- bbtk::std2wx ( bbGetInputIn() ) ,
- bbtk::std2wx ( bbGetInputTitle() ) ) );
-
+ parent,
+ bbtk::std2wx ( bbGetInputIn() ) ,
+ bbtk::std2wx ( bbGetInputTitle() ) ) );
}
-
-
-
}//namespace bbtk
#endif // _USE_WXWIDGETS_
Program: bbtk
Module: $RCSfile: bbwxInputText.h,v $
Language: C++
- Date: $Date: 2009/05/15 14:58:03 $
- Version: $Revision: 1.7 $
+ Date: $Date: 2009/12/02 15:13:25 $
+ Version: $Revision: 1.8 $
=========================================================================*/
/* ---------------------------------------------------------------------
* knowledge of the CeCILL-B license and that you accept its terms.
* ------------------------------------------------------------------------ */
-
/**
* \brief Short description in one line
*
* \brief Pattern for the definition of a new type of Node
*/
-
#ifdef _USE_WXWIDGETS_
namespace bbwx
{
-
-
+
//=================================================================
class bbwx_EXPORT InputText : public bbtk::WxBlackBox
{
};
//=================================================================
-
-
+
//=================================================================
// BlackBox description
BBTK_BEGIN_DESCRIBE_BLACK_BOX(InputText,bbtk::WxBlackBox);
BBTK_OUTPUT(InputText,Out,"Current text",std::string,"");
BBTK_END_DESCRIBE_BLACK_BOX(InputText);
+
//=================================================================
-
-
}