#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
-PROJECT(BBTK)
+PROJECT(bbtk)
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# Build tree
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/bbCreateBlackBox.bat.in
- ${BBTK_BINARY_DIR}/RelWithDebInfo/bbCreateBlackBox.bat
+ ${bbtk_BINARY_DIR}/RelWithDebInfo/bbCreateBlackBox.bat
@ONLY IMMEDIATE
)
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/bbCreateBlackBox.bat.in
- ${BBTK_BINARY_DIR}/Debug/bbCreateBlackBox.bat
+ ${bbtk_BINARY_DIR}/Debug/bbCreateBlackBox.bat
@ONLY IMMEDIATE
)
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/bbCreateBlackBox.bat.in
- ${BBTK_BINARY_DIR}/Release/bbCreateBlackBox.bat
+ ${bbtk_BINARY_DIR}/Release/bbCreateBlackBox.bat
@ONLY IMMEDIATE
)
# install tree
INSTALL(
- PROGRAMS ${BBTK_BINARY_DIR}/Debug/bbCreateBlackBox.bat
+ PROGRAMS ${bbtk_BINARY_DIR}/Debug/bbCreateBlackBox.bat
DESTINATION bin
)
ENDIF(WIN32)
# Build tree
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/bbCreateBlackBox.sh.in
- ${BBTK_BINARY_DIR}/bin/bbCreateBlackBox
+ ${bbtk_BINARY_DIR}/bin/bbCreateBlackBox
@ONLY IMMEDIATE
)
# Install tree
INSTALL(
- FILES ${BBTK_BINARY_DIR}/bin/bbCreateBlackBox
+ FILES ${bbtk_BINARY_DIR}/bin/bbCreateBlackBox
DESTINATION bin
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE
)
# Build tree
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/bbCreatePackage.bat.in
- ${BBTK_BINARY_DIR}/RelWithDebInfo/bbCreatePackage.bat
+ ${bbtk_BINARY_DIR}/RelWithDebInfo/bbCreatePackage.bat
@ONLY IMMEDIATE
)
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/bbCreatePackage.bat.in
- ${BBTK_BINARY_DIR}/Debug/bbCreatePackage.bat
+ ${bbtk_BINARY_DIR}/Debug/bbCreatePackage.bat
@ONLY IMMEDIATE
)
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/bbCreatePackage.bat.in
- ${BBTK_BINARY_DIR}/Release/bbCreatePackage.bat
+ ${bbtk_BINARY_DIR}/Release/bbCreatePackage.bat
@ONLY IMMEDIATE
)
# install tree
INSTALL(
- PROGRAMS ${BBTK_BINARY_DIR}/Debug/bbCreatePackage.bat
+ PROGRAMS ${bbtk_BINARY_DIR}/Debug/bbCreatePackage.bat
DESTINATION bin
)
ELSE(WIN32)
# Build tree
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/bbCreatePackage.sh.in
- ${BBTK_BINARY_DIR}/bin/bbCreatePackage
+ ${bbtk_BINARY_DIR}/bin/bbCreatePackage
@ONLY IMMEDIATE
)
# Install tree
INSTALL(
- FILES ${BBTK_BINARY_DIR}/bin/bbCreatePackage
+ FILES ${bbtk_BINARY_DIR}/bin/bbCreatePackage
DESTINATION bin
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
# Build tree
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/bbPostInstallPackage.bat.in
- ${BBTK_BINARY_DIR}/RelWithDebInfo/bbPostInstallPackage.bat
+ ${bbtk_BINARY_DIR}/RelWithDebInfo/bbPostInstallPackage.bat
@ONLY IMMEDIATE
)
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/bbPostInstallPackage.bat.in
- ${BBTK_BINARY_DIR}/Debug/bbPostInstallPackage.bat
+ ${bbtk_BINARY_DIR}/Debug/bbPostInstallPackage.bat
@ONLY IMMEDIATE
)
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/bbPostInstallPackage.bat.in
- ${BBTK_BINARY_DIR}/Release/bbPostInstallPackage.bat
+ ${bbtk_BINARY_DIR}/Release/bbPostInstallPackage.bat
@ONLY IMMEDIATE
)
# install tree
INSTALL(
- PROGRAMS ${BBTK_BINARY_DIR}/Debug/bbPostInstallPackage.bat
+ PROGRAMS ${bbtk_BINARY_DIR}/Debug/bbPostInstallPackage.bat
DESTINATION bin
)
ELSE(WIN32)
# Build tree
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/bbPostInstallPackage.sh.in
- ${BBTK_BINARY_DIR}/bin/bbPostInstallPackage
+ ${bbtk_BINARY_DIR}/bin/bbPostInstallPackage
@ONLY IMMEDIATE
)
# Install tree
INSTALL(
- FILES ${BBTK_BINARY_DIR}/bin/bbPostInstallPackage
+ FILES ${bbtk_BINARY_DIR}/bin/bbPostInstallPackage
DESTINATION bin
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
)
IF(UNIX)
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/bbc.sh.in
- ${BBTK_BINARY_DIR}/bin/bbc
+ ${bbtk_BINARY_DIR}/bin/bbc
@ONLY IMMEDIATE
)
INSTALL(
- PROGRAMS ${BBTK_BINARY_DIR}/bin/bbc
+ PROGRAMS ${bbtk_BINARY_DIR}/bin/bbc
DESTINATION bin
)
ELSE(UNIX)
INSTALL(
- DIRECTORY ${BBTK_BINARY_DIR}/${BBTK_BBS_REL_PATH}
+ DIRECTORY ${bbtk_BINARY_DIR}/${BBTK_BBS_REL_PATH}
DESTINATION ${BBTK_SHARE_REL_PATH}
)
INSTALL(
- DIRECTORY ${BBTK_BINARY_DIR}/${BBTK_DATA_REL_PATH}
+ DIRECTORY ${bbtk_BINARY_DIR}/${BBTK_DATA_REL_PATH}
DESTINATION ${BBTK_SHARE_REL_PATH}
)
Program: bbtk
Module: $RCSfile: bbwxInputText.cxx,v $
Language: C++
- Date: $Date: 2010/04/08 14:36:32 $
- Version: $Revision: 1.9 $
+ Date: $Date: 2010/04/09 14:02:15 $
+ Version: $Revision: 1.10 $
=========================================================================*/
/* ---------------------------------------------------------------------
~InputTextWidget();
std::string GetValue();
+ void OnTextEnter(wxCommandEvent& event);
void OnTextUpdate(wxCommandEvent& event);
void SetTitle(wxString);
{
wxPanel *panel = this;
- mwxTextCtrl = new wxTextCtrl( panel, -1, In,
- wxDefaultPosition, wxSize(800,20));
+ mwxTextCtrl = new wxTextCtrl( panel, -1, In,wxDefaultPosition, wxSize(800,20),wxTE_PROCESS_ENTER);
+ Connect( mwxTextCtrl->GetId(), wxEVT_COMMAND_TEXT_ENTER,
+ (wxObjectEventFunction)
+ (wxEventFunction)
+ (wxCommandEventFunction)
+ (void (wxPanel::*)(wxCommandEvent&))
+ &InputTextWidget::OnTextEnter );
- // The following was supposed to generate an event, only on ENTER key ...
- // ... but nothing happens (no event at all ?!?)
- //Connect( mwxTextCtrl->GetId(), wxEVT_COMMAND_TEXT_ENTER,
-
- Connect( mwxTextCtrl->GetId(), wxEVT_COMMAND_TEXT_UPDATED,
+ 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 );
- // }
sizer-> Add( mwxTextCtrl, 1, wxGROW );
sizer-> AddGrowableCol(0);
//--------------------------------------------------------------------------
void InputTextWidget::OnTextUpdate(wxCommandEvent& event)
{
- mBox->bbSetOutputOut( GetValue() );
- mBox->bbSetInputIn( GetValue() );
- mBox->bbSignalOutputModification("Out");
+ if (mBox->bbGetInputReactiveOnKeystroke()==2){
+ mBox->bbSetOutputOut( GetValue() );
+ mBox->bbSetInputIn( GetValue() );
+ mBox->bbSignalOutputModification("Out");
+ }
}
+ //--------------------------------------------------------------------------
+ void InputTextWidget::OnTextEnter(wxCommandEvent& event)
+ {
+ if (mBox->bbGetInputReactiveOnKeystroke()==1){
+ mBox->bbSetOutputOut( GetValue() );
+ mBox->bbSetInputIn( GetValue() );
+ mBox->bbSignalOutputModification("Out");
+ }
+ }
+
+
//--------------------------------------------------------------------------
//-------------------------------------------------------------------------
//--------------------------------------------------------------------------
bbSetInputTitle("");
bbSetInputIn("");
bbSetOutputWidget(0);
+ bbSetInputReactiveOnKeystroke(2);
}
//-----------------------------------------------------------------
Program: bbtk
Module: $RCSfile: bbwxInputText.h,v $
Language: C++
- Date: $Date: 2009/12/02 15:13:25 $
- Version: $Revision: 1.8 $
+ Date: $Date: 2010/04/09 14:02:15 $
+ Version: $Revision: 1.9 $
=========================================================================*/
/* ---------------------------------------------------------------------
BBTK_BLACK_BOX_INTERFACE(InputText,bbtk::WxBlackBox);
BBTK_DECLARE_INPUT(In,std::string);
BBTK_DECLARE_INPUT(Title,std::string);
+ BBTK_DECLARE_INPUT(ReactiveOnKeystroke,int);
BBTK_DECLARE_OUTPUT(Out,std::string);
BBTK_PROCESS(Process);
void Process();
BBTK_DESCRIPTION("A zone in which the user can enter a text (wxTextCtrl)");
BBTK_INPUT(InputText,In,"Initial text (default '')",std::string,"");
- BBTK_INPUT(InputText,Title,"Title of the input zone (default '') ",
- std::string,"");
+ BBTK_INPUT(InputText,Title,"Title of the input zone (default '') ", std::string,"");
+ BBTK_INPUT(InputText,ReactiveOnKeystroke,"0 not event generated, 1 Enter event genereated, 2 All keys, (default '2') ", int,"");
BBTK_OUTPUT(InputText,Out,"Current text",std::string,"");
BBTK_END_DESCRIBE_BLACK_BOX(InputText);