From 75cedb45ce5353caf2b8cdd6c6f7fcff3b3a6555 Mon Sep 17 00:00:00 2001 From: Felipe Gonzalez Date: Fri, 9 Jan 2015 14:57:21 +0100 Subject: [PATCH] #2498 BBTK Feature New Normal - wt-version kernel --- CMakeLists.txt | 5 + kernel/cmake/BBTKConfigurePackage_src.cmake | 2 +- kernel/src/CMakeLists.txt | 11 +- kernel/src/bbtkBlackBoxDescriptor.cxx | 5 +- kernel/src/bbtkInterpreter.cxx | 13 + kernel/src/bbtkWt.cxx | 282 +++++++++++++++ kernel/src/bbtkWt.h | 227 ++++++++++++ kernel/src/bbtkWtBlackBox.cxx | 372 ++++++++++++++++++++ kernel/src/bbtkWtBlackBox.h | 133 +++++++ kernel/src/bbtkWx.cxx | 5 +- kernel/src/bbtkWxBlackBox.cxx | 14 +- packages/CMakeLists.txt | 7 + packages/wx/src/bbwxCheckBox.cxx | 3 + 13 files changed, 1074 insertions(+), 5 deletions(-) create mode 100644 kernel/src/bbtkWt.cxx create mode 100644 kernel/src/bbtkWt.h create mode 100644 kernel/src/bbtkWtBlackBox.cxx create mode 100644 kernel/src/bbtkWtBlackBox.h diff --git a/CMakeLists.txt b/CMakeLists.txt index bd3c079..5ced062 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,6 +82,11 @@ ADD_SUBDIRECTORY(packages) #----------------------------------------------------------------------------- # The samples + +#----JFGA ---- Por default. +SET(USE_WT OFF) + + # WARNING # Install the creaTools first # then build the 'samples' as a separate project diff --git a/kernel/cmake/BBTKConfigurePackage_src.cmake b/kernel/cmake/BBTKConfigurePackage_src.cmake index dc6700b..eab078a 100644 --- a/kernel/cmake/BBTKConfigurePackage_src.cmake +++ b/kernel/cmake/BBTKConfigurePackage_src.cmake @@ -132,7 +132,7 @@ FOREACH(xmlfile ${${BBTK_PACKAGE_NAME}_XML_SOURCES}) ADD_CUSTOM_COMMAND( OUTPUT ${BBFY_CXX_OUT} COMMAND - export LD_LIBRARY_PATH=${LD_LIBRARY_PATH} && ${BBTK_BBFY} ${xmlfile} ${BBTK_PACKAGE_NAME} ${CMAKE_CURRENT_BINARY_DIR}/ -q + export LD_LIBRARY_PATH=${LD_LIBRARY_PATH} && echo $ENV{LD_LIBRARY_PATH} && ${BBTK_BBFY} ${xmlfile} ${BBTK_PACKAGE_NAME} ${CMAKE_CURRENT_BINARY_DIR}/ -q DEPENDS ${xmlfile} ${BBTK_BBFY_DEPENDENCY} ) diff --git a/kernel/src/CMakeLists.txt b/kernel/src/CMakeLists.txt index 449e133..ae687e5 100644 --- a/kernel/src/CMakeLists.txt +++ b/kernel/src/CMakeLists.txt @@ -180,6 +180,15 @@ IF(BBTK_USE_QT) ) SET(SOURCES ${SOURCES} ${MOC_SOURCES} ${UI_SOURCES}) ENDIF(QT_FOUND) + +# JFGA 03/12/2014 -- Temporal configuration of WT +# *********Missing if conditional Wt******** + #find_package(Boost COMPONENTS system thread signals) + #find_library(wt wt) + #find_library(wthttp wthttp) + INCLUDE_DIRECTORIES(/usr/local/include/Wt) + + ENDIF(BBTK_USE_QT) #----------------------------------------------------------------------------- @@ -188,7 +197,7 @@ ENDIF(BBTK_USE_QT) # lib definition ADD_LIBRARY(bbtk SHARED ${SOURCES} ${SOURCES_H}) #----------------------------------------------------------------------------- -TARGET_LINK_LIBRARIES(bbtk ${BBTK_LINK_LIBRARIES} ${BOOST_LIBRARIES} ${crea_LIBRARIES}) +TARGET_LINK_LIBRARIES(bbtk ${BBTK_LINK_LIBRARIES} ${BOOST_LIBRARIES} ${crea_LIBRARIES} ${WT_LIBRARIES}) #----------------------------------------------------------------------------- IF(UNIX) SET_TARGET_PROPERTIES(bbtk PROPERTIES COMPILE_FLAGS -Wall) diff --git a/kernel/src/bbtkBlackBoxDescriptor.cxx b/kernel/src/bbtkBlackBoxDescriptor.cxx index 24e7024..6a2c7bc 100644 --- a/kernel/src/bbtkBlackBoxDescriptor.cxx +++ b/kernel/src/bbtkBlackBoxDescriptor.cxx @@ -45,6 +45,8 @@ #include "bbtkUtilities.h" #include "bbtkAtomicBlackBoxDescriptor.h" #include "bbtkWxBlackBox.h" +// JFGA 12/12/2014 Adding libraries for Wt +//#include "bbtkWtBlackBox.h" namespace bbtk { @@ -381,7 +383,8 @@ namespace bbtk std::string usercol("#FFFFFF"); std::string ubbcol("#DDFFFF"); std::string wxbbcol("#EEFFFF"); - +// JFGA 12/12/2014 Adding new variable +// std::string wtbbcol("#CCFFFF"); // (s) << "

Inputs

\n"; (s) << "

\n"; diff --git a/kernel/src/bbtkInterpreter.cxx b/kernel/src/bbtkInterpreter.cxx index 04dcfdf..e57717e 100644 --- a/kernel/src/bbtkInterpreter.cxx +++ b/kernel/src/bbtkInterpreter.cxx @@ -2020,8 +2020,21 @@ void Interpreter::commandNewGUI(const std::string& boxname, ( d->GetCreatorTypeInfo() == typeid(WxBlackBoxDescriptor)) ) continue; #else +// JFGA 12/12/2014 Adding WT options for compile with it. + +/*#if USE_WT + + if ( ( d->GetCreatorTypeInfo() == typeid(AtomicBlackBoxDescriptor)) || + ( d->GetCreatorTypeInfo() == typeid(WtBlackBoxDescriptor)) ) + continue; + + +#else +*/ if ( ( d->GetCreatorTypeInfo() == typeid(AtomicBlackBoxDescriptor)) ) continue; +//#endif + #endif bool widok = true; std::string widget,adaptor; diff --git a/kernel/src/bbtkWt.cxx b/kernel/src/bbtkWt.cxx new file mode 100644 index 0000000..a0db910 --- /dev/null +++ b/kernel/src/bbtkWt.cxx @@ -0,0 +1,282 @@ +/* + # --------------------------------------------------------------------- + # + # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image + # pour la SantÈ) + # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton + # Previous Authors : Laurent Guigues, Jean-Pierre Roux + # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil + # + # This software is governed by the CeCILL-B license under French law and + # abiding by the rules of distribution of free software. You can use, + # modify and/ or redistribute the software under the terms of the CeCILL-B + # license as circulated by CEA, CNRS and INRIA at the following URL + # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html + # or in the file LICENSE.txt. + # + # As a counterpart to the access to the source code and rights to copy, + # modify and redistribute granted by the license, users are provided only + # with a limited warranty and the software's author, the holder of the + # economic rights, and the successive licensors have only limited + # liability. + # + # The fact that you are presently reading this means that you have had + # knowledge of the CeCILL-B license and that you accept its + terms. + # ------------------------------------------------------------------------ */ + + +/*========================================================================= + Program: bbtk + Module: $RCSfile: bbtkQt.cxx,v $ + Language: C++ + Date: $Date: 2012/11/16 08:49:01 $ + Version: $Revision: 1.4 $ +=========================================================================*/ + + +#include "bbtkWt.h" +#include "bbtkMessageManager.h" + +#ifdef USE_WT + + + + +namespace bbtk +{ + //========================================================================= + class WtApp; + Wt::WApplication *createApplication(const Wt::WEnvironment& env); + //========================================================================= + + //========================================================================= + static WtApp* mgWtApp = 0; + static Wt::WContainerWidget* mgTopWindow = 0; + static int mgNbWindowsAlive = 0; + //========================================================================= + + //========================================================================= + // BBTKWXSIG + static WWt::Signal_type mgWtSignal; + // \BBTKWXSIG + //========================================================================= + + + //========================================================================= + // The wxApp class which is used when no user wxApp was created + // The application creates itself completly empty. +// The default values for the port and address are port:8080 address 0.0.0.0 + class WtApp : public Wt::WApplication + { + public: + WtApp(const Wt::WEnvironment& env); + ~WtApp(); + static int WtWRun(); + //WtWApplication *createApplication(const WtWEnvironment& env); + + }; + + WtApp::WtApp(const Wt::WEnvironment& env): + Wt::WApplication(env) + { + Wt::WApplication::root()->addWidget(WWt::GetTopWindow()); + // There is not additional configuration. The new WtApp must have the same behavior that one Wt::WApplication. + + } + + WtApp::~WtApp() + { + + } + + int WtApp::WtWRun() + { + char *argv[7] = {"./WtTest","--docroot",".","--http-address","0.0.0.0","--http-port","8080"}; + int argc = 7; + return Wt::WRun(argc,argv,&createApplication); + } + + + Wt::WApplication *createApplication(const Wt::WEnvironment& env) + { + return new WtApp(env); + } + + + + + //========================================================================= + + //========================================================================= + void WWt::CreateWtAppIfNeeded() + { + std::cout<<"CREATING APP IF NEEDED --------- DELETE ME ------- bbtkWt.cxx"< Creating bbtk WtApp"< Destructing bbtk WxApp"<DestroyChildren(); + } + */ + + /* + wxApp* a = (wxApp*)wxApp::GetInstance(); + if (a==0) return; + + std::cout << "$$$$$$$$$$$$$$ PROCESS PENDING "<Pending()) + a->Dispatch(); + std::cout << "$$$$$$$$$$$$$$ PROCESS PENDING DONE"< +#include + + +//TODO Include libs in the CMake escription +#include +#include +#include +#include +#include +//typedef boost::signals::trackable SignalObserver; +// \BBTKWXSIG +//=========================================================================== + + +//=========================================================================== +// Qt headers +// DEFINIR LOS HEADERS Wt que se necesitan *-*-*-*-*-*-*-*-*-* +/* +#ifdef USE_WT +#include "qwidget.h" +// EO Qt headers + +#else //USE_QT + +// define QWidget +typedef void QWidget; +typedef void QBusyCursor; + +#endif // EO USE_WXWIDGETS + +//-*-*-*-* JFGA + +*/ +#ifdef USE_WT + + +// Definition of some classes used in tehe code +typedef Wt::WEnvironment WtWEnvironment; +typedef Wt::WWidget WtWWidget; +//typedef Wt::WContainerWidget WtWContainerWidget; +typedef Wt::WApplication WtWApplication; +typedef Wt::WString WtWString; + + + +#else // EO_USE_WT + + +typedef void WtWidget; +typedef void WtWContainerWidget; +typedef void WtWApplication; +typedef void WtBusyCursor; + +#endif // EO USE_WT + + +//========================================================================== + +//=========================================================================== +#include "bbtkSystem.h" +//=========================================================================== + + + + + +namespace bbtk +{ + + //================================================================== + /// Global wt handlers (cursor...) + + +// BBTKWXSIG BBTK_ADD_BLACK_BOX_TO_PACKAGE(MyProjectWT,Testing) + +#define bbtkAddWtSignalObserver(METHOD) \ + WWt::AddSignalObserver(boost::bind(&METHOD, this)) +// \BBTKWXSIG + +#define BBTK_BUSY_CURSOR bbtk::WWt::BusyCursor __bbtk_dummy_busy_cursor; + + struct BBTK_EXPORT WWt + { + public: + // BBTKWXSIG + // The keyword 'signals' is also a macro in qt + // typedef boost::signals::trackable SignalObserver; + typedef boost::signals::trackable SignalObserver; + typedef boost::signal Signal_type; + typedef Signal_type::slot_function_type Slot_function_type; + // \BBTKWXSIG + + /* + static void ResetCursor(); + static void BeginBusyCursor(); + static void EndBusyCursor(); + */ + + static void LoopUntilAllWindowsClose(); + + class BusyCursor + { + public: + BusyCursor(); + ~BusyCursor(); + //wxBusyCursor* mCursor; The wxBusyCursor is only for comunicate to the client/user that the program is busy. + }; + + + static void ProcessPendingEvents(); + /// Sets the parent of all bbtk windows + static void SetTopWindow(Wt::WContainerWidget*); + /// Returns the parent of all bbtk windows + static Wt::WContainerWidget* GetTopWindow(); + + + static void IncNbWindowsAlive(); + static void DecNbWindowsAlive(); + static int GetNbWindowsAlive(); + static bool IsSomeWindowAlive(); + + + // BBTKWXSIG + static void AddSignalObserver(Slot_function_type); + // \BBTKWXSIG + + + + + //private: + static void CreateWtAppIfNeeded(); + static void DestroyWtAppIfNeeded(); + + }; // struct Wt + //================================================================== + +#ifdef USE_WT + //================================================================== + /// Conversion std::string to wxString + inline Wt::WString std2wt(const std::string& s) + { + // Wt::WString wt; +/* + const char* my_string=s.c_str(); + wxMBConvUTF8 *wxconv= new wxMBConvUTF8(); + wx=wxString(wxconv->cMB2WC(my_string),wxConvUTF8); + delete wxconv; + // test if conversion works of not. In case it fails convert from Ascii + if(wx.length()==0) + wx=wxString(wxString::FromAscii(s.c_str())); +*/ + return Wt::WString::fromUTF8(s,false); + //return new Wt::WString(s);//wt; + } + //================================================================== + + //================================================================== + /// Conversion wxString to std::string + inline std::string wt2std(const Wt::WString& s){ + /* std::string s2; + if(s.wxString::IsAscii()) { + s2=s.wxString::ToAscii(); + } else { + const wxWX2MBbuf tmp_buf = wxConvCurrent->cWX2MB(s); + const char *tmp_str = (const char*) tmp_buf; + s2=std::string(tmp_str, strlen(tmp_str)); + } + + return s2;*/ + return s.toUTF8(); + } + //================================================================== +#endif // EO _USE_WXWIDGETS + + + + + +} // namespace bbtk + + +#endif // EO __bbtkWt_h_INCLUDED__ diff --git a/kernel/src/bbtkWtBlackBox.cxx b/kernel/src/bbtkWtBlackBox.cxx new file mode 100644 index 0000000..cdb6b79 --- /dev/null +++ b/kernel/src/bbtkWtBlackBox.cxx @@ -0,0 +1,372 @@ +/* + # --------------------------------------------------------------------- + # + # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image + # pour la SantÈ) + # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton + # Previous Authors : Laurent Guigues, Jean-Pierre Roux + # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil + # + # This software is governed by the CeCILL-B license under French law and + # abiding by the rules of distribution of free software. You can use, + # modify and/ or redistribute the software under the terms of the CeCILL-B + # license as circulated by CEA, CNRS and INRIA at the following URL + # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html + # or in the file LICENSE.txt. + # + # As a counterpart to the access to the source code and rights to copy, + # modify and redistribute granted by the license, users are provided only + # with a limited warranty and the software's author, the holder of the + # economic rights, and the successive licensors have only limited + # liability. + # + # The fact that you are presently reading this means that you have had + # knowledge of the CeCILL-B license and that you accept its terms. + # ------------------------------------------------------------------------ */ + + +/*========================================================================= + Program: bbtk + Module: $RCSfile: bbtkWxBlackBox.cxx,v $ + Language: C++ + Date: $Date: 2012/11/16 08:49:01 $ + Version: $Revision: 1.45 $ +=========================================================================*/ + + + +#ifdef _USE_WT_ + +/** + * \file + * \brief + */ + +#include "bbtkWtBlackBox.h" +#include "bbtkBlackBoxOutputConnector.h" +//DELETE ME +#include + +//#include "bbtkWxContainerBlackBox.h" +//#include + +//#include "bbtkData.h" +//#include "bbtkFactory.h" + +namespace bbtk +{ + //========================================================================= + // WxFrame + //========================================================================= + + //================================================================== + class WtWContainer : public Wt::WContainerWidget + { + public: + WtWContainer(WtBlackBox::Pointer b, + Wt::WContainerWidget *parent, + Wt::WString title/*, + wxSize size);*/ + ); + ~WtWContainer(); + // void OnCloseWindow(wxCloseEvent& event); + + + WtBlackBox::WeakPointer mBox; + // DECLARE_EVENT_TABLE(); + + }; + + // BEGIN_EVENT_TABLE(WxFrame, wxFrame) + // EVT_CLOSE(WxFrame::OnCloseWindow) + //END_EVENT_TABLE(); + //================================================================== + + //================================================================== + + WtWContainer::WtWContainer(WtBlackBox::Pointer b, + Wt::WContainerWidget *parent, + Wt::WString title/*, + wxSize size) */ + ) + : + Wt::WContainerWidget( parent), + mBox(b) + { + bbtkDebugMessage("widget",9,"["<bbGetName()<<"] Wt::Widget()" + <bbSetWindow(this); + // Insert the widget into the window + //wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL); + std::cout<<"Creando WebWIDGET DELETE ME ---- bbtkWtBlackBox.cxx.................30%"<objectName()<addWidget(new Wt::WContainerWidget()); + std::cout<<"Creando WebWIDGET DELETE ME ---- bbtkWtBlackBox.cxx.................58%"<bbUserCreateWidget(this); + Wt::WContainerWidget* widget = b->bbGetOutputWidget(); + this->addWidget(widget); + /* Wt::WWidget* widget = b->bbGetOutputWidget(); + sizer->Add( widget, 1, wxALL|wxGROW, 2); + SetSizer(sizer); + Layout(); +*/ + } + //================================================================== + //================================================================== + WtWContainer::~WtWContainer() + { + if (mBox.lock()) + bbtkDebugMessage("widget",9,"["<bbGetName() + <<"] $$$$$$$$$$$$$$$$$$$ ~W()" + <bbSetWindow(0); + WWt::DecNbWindowsAlive(); + } + + + + //================================================================== + + //========================================================================= + // WxDialog + //========================================================================= + + //================================================================== + // Dialog window which is modal + /* class BBTK_EXPORT WxDialog : public wxDialog + { + public: + WxDialog(WxBlackBox::Pointer box, + wxWindow *parent, + wxString title, + wxSize size); + ~WxDialog(); + void OnCloseWindow(wxCloseEvent& event); + + + WxBlackBox::WeakPointer mBox; + DECLARE_EVENT_TABLE(); + + }; + + BEGIN_EVENT_TABLE(WxDialog, wxDialog) + EVT_CLOSE(WxDialog::OnCloseWindow) + END_EVENT_TABLE(); + //========================================================================= + + //========================================================================= + WxDialog::WxDialog(WxBlackBox::Pointer b, + wxWindow *parent, + wxString title, + wxSize size) + : + wxDialog( parent, + -1, + title, + wxDefaultPosition, + size, + wxRESIZE_BORDER | + wxSYSTEM_MENU | + wxCLOSE_BOX | + wxMAXIMIZE_BOX | + wxMINIMIZE_BOX | + wxCAPTION + ), + mBox(b) + { + bbtkDebugMessage("widget",9,"WxDialog::WxDialog ["<bbGetName()<<"]" + <bbSetWindow(this); + // Insert the widget into the window + wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL); + b->bbUserCreateWidget(this); + wxWindow* widget = b->bbGetOutputWidget(); + sizer->Add( widget, 1, wxALL|wxGROW, 2); + SetSizer(sizer); + Layout(); + } + //================================================================== + //================================================================== + WxDialog::~WxDialog() + { + bbtkDebugMessage("widget",9,"WxDialog::~WxDialog()"<bbSetWindow(0); + // Wx::DecNbWindowsAlive(); + } + //================================================================== + //================================================================== + void WxDialog::OnCloseWindow(wxCloseEvent& event) + { + bbtkDebugMessage("widget",9,"WxDialog::OnCloseWindow()"<bbSetWindow(0); + Wx::DecNbWindowsAlive(); + this->Destroy(); + } + //================================================================== + +*/ + //========================================================================= + // WxBlackBox + //========================================================================= + + //========================================================================= + //========================================================================= + //========================================================================= + //========================================================================= + BBTK_BLACK_BOX_IMPLEMENTATION(WtBlackBox,WidgetBlackBox); + //========================================================================= + + //========================================================================= + void WtBlackBox::bbUserSetDefaultValues() + { + bbtkBlackBoxDebugMessage("widget",5,"WtBlackBox::bbUserSetDefaultValues()"< WtBlackBox::bbUserFinalizeProcessing()"< WtBlackBox::bbCreateDialogWindow() - No Dialog must be created, it is a web app" + <(), + Wx::GetTopWindow(), + std2wx( bbGetInputWinTitle() + + " - bbtk (c) CREATIS"), + wxSize( bbGetInputWinWidth() , + bbGetInputWinHeight() ) ); + w->Show(false); + // w->ShowModal(); +*/ + } + //========================================================================= + + //================================================================== + + //================================================================== + /// Callback for creating a Frame window + void WtBlackBox::bbCreateFrameWindow() + { + + std::cout<<"Creating Container WT -- DELETE THIS MESSAGE bbtkWTBlackBox.cxx"< WtBlackBox::bbCreateFrameWindow() - parent = " + <(), + WWt::GetTopWindow(), + std2wt( bbGetInputWinTitle() + + " - bbtk (c) CREATIS") + ); + std::cout<<"Container created succesfully -- DELETE THIS MESSAGE bbtkWTBlackBox.cxx"<(), + Wx::GetTopWindow(), + std2wx( bbGetInputWinTitle() + + " - bbtk (c) CREATIS"), + wxSize( bbGetInputWinWidth() , + bbGetInputWinHeight() ) ); + + w->Show(); +*/ + WWt::CreateWtAppIfNeeded(); + } + + //================================================================== + + //================================================================== + void WtBlackBox::bbSetWindow(Wt::WContainerWidget* w) + { + bbtkBlackBoxDebugMessage("widget",9,"==> WtBlackBox::bbSetWindow("< WtBlackBox::bbShowWindow()" + <ShowModal(); + } + else + { + // There is not such a thing like show becouse it is a webapp + // bbGetWindow()->Show(); + WWt::CreateWtAppIfNeeded(); + bbSetShown(true); + } + } + } + //================================================================== + + //================================================================== + void WtBlackBox::bbDestroyWindow() + { + bbtkBlackBoxDebugMessage("widget",3,"==> WtBlackBox::bbDestroyWindow("<Close(true); + // + delete bbGetWindow(); + bbSetShown(false); + } + bbtkBlackBoxDebugMessage("widget",3,"<== WtBlackBox::bbDestroyWindow("< + { + public: + BBTK_BLACK_BOX_INTERFACE(WtBlackBox,bbtk::WidgetBlackBox); + + + // protected: + + public: + + //================================================================== + /// Callback for creating a Dialog window (modal) + /// ** Must be defined ** in toolkit specific descendants + virtual void bbCreateDialogWindow(); + //================================================================== + + //================================================================== + /// Callback for creating a Frame window + /// ** Must be defined ** in toolkit specific descendants + virtual void bbCreateFrameWindow(); + //================================================================== + + + //================================================================== + Wt::WContainerWidget* bbGetWindow() { return bbmWindow; } + void bbSetWindow(Wt::WContainerWidget*) ; + bool bbWindowIsCreated() { return (bbGetWindow() != 0); } + //================================================================== + + + //================================================================== + virtual void bbShowWindow(); + //================================================================== + + //================================================================== + virtual void bbDestroyWindow(); + //================================================================== + + private: + + Wt::WContainerWidget* bbmWindow; + + }; + //================================================================= + + + //================================================================= + // WxBlackBoxDescriptor declaration + class WtBlackBoxDescriptor : public WidgetBlackBoxDescriptor + BBTK_BEGIN_DESCRIBE_BLACK_BOX_BODY(WtBlackBox); + BBTK_NAME("WtBlackBox"); + BBTK_END_DESCRIBE_BLACK_BOX(WtBlackBox); + //================================================================= + + +} //namespace bbtk + +#endif //__bbtkWxBlackBox_h__ + +#endif //USE_WXWIDGETS diff --git a/kernel/src/bbtkWx.cxx b/kernel/src/bbtkWx.cxx index 69cfc4d..78848c1 100644 --- a/kernel/src/bbtkWx.cxx +++ b/kernel/src/bbtkWx.cxx @@ -71,7 +71,8 @@ namespace bbtk IMPLEMENT_APP_NO_MAIN(WxApp); //========================================================================= bool WxApp::OnInit( ) - { + { + std::cout<<"Testing OnINIT Wx ---- JFGA !!!DELETE ME!!! bbtkWx"<GetName())<bbGetName()<<"] WxFrame()" <bbGetName()<<"]" <Show(); } @@ -308,6 +316,8 @@ namespace bbtk { std::cout << "ERRRRRRRROOOOR"<GetName())< WxBlackBox::bbShowWindow()" @@ -323,8 +334,9 @@ namespace bbtk { ((WxDialog*)bbmWindow)->ShowModal(); } - else + else { + std::cout<<"--!!--JFGA Testing bbShowWindow "<Show(); bbSetShown(true); } diff --git a/packages/CMakeLists.txt b/packages/CMakeLists.txt index 2b86b39..07e15f4 100644 --- a/packages/CMakeLists.txt +++ b/packages/CMakeLists.txt @@ -39,6 +39,13 @@ ADD_SUBDIRECTORY(appli) ADD_SUBDIRECTORY(gdcmvtk) + + + +IF(BBTK_USE_WT) + ADD_SUBDIRECTORY(wt) +ENDIF(BBTK_USE_WT) + IF(BBTK_USE_KWWIDGETS) ADD_SUBDIRECTORY(kw) ENDIF(BBTK_USE_KWWIDGETS) diff --git a/packages/wx/src/bbwxCheckBox.cxx b/packages/wx/src/bbwxCheckBox.cxx index 0b7297e..28c0ec9 100644 --- a/packages/wx/src/bbwxCheckBox.cxx +++ b/packages/wx/src/bbwxCheckBox.cxx @@ -242,6 +242,9 @@ namespace bbwx bbGetInputReactiveOnKeystroke() ); bbSetOutputWidget( w ); +//GetName + std::cout<<"TESTING.... DELETE ME!!!!! bbwxCheckBox.cxx ---- PARENT : "<GetName())<