]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkWt.h
#3472 merge vtk8itk5wx3-mingw64
[bbtk.git] / kernel / src / bbtkWt.h
index 5e3dd638e5d7b48847496d7e67db3cf00bea067f..011f5980a8f1d4a014c56afb81c67e0a009f5441 100644 (file)
 // SIGNAL/SLOT MECHANISM 
 // FOR bbtk WINDOWS CREATION/DESTRUCTION OBSERVATION 
 // BBTKWXSIG
-#include <boost/signal.hpp>
-#include <boost/bind.hpp>
 
+//EED 2020-03-17
+//#include <boost/signal.hpp>
+#include <boost/signals2/signal.hpp>
+
+#include <boost/bind.hpp>
 
-//TODO Include libs in the CMake escription
-#include <Wt/WApplication>
-#include <Wt/WEnvironment>
-#include <Wt/WContainerWidget>
-#include <Wt/WWidget>
-#include <Wt/WCheckBox>
 //typedef boost::signals::trackable SignalObserver;
 // \BBTKWXSIG
 //===========================================================================
 
 
 //===========================================================================
-// Qt headers
+// Wt headers
 // DEFINIR LOS HEADERS Wt que se necesitan  *-*-*-*-*-*-*-*-*-*
-/*
 #ifdef USE_WT
-#include "qwidget.h"
-// EO Qt headers
 
-#else //USE_QT
+//TODO Include libs in the CMake escription
+#include <Wt/WApplication>
+#include <Wt/WEnvironment>
+#include <Wt/WContainerWidget>
+#include <Wt/WWidget>
+#include <Wt/WCheckBox>
+#include <Wt/WServer>
+#include <Wt/WText>
+#include <Wt/WPushButton>
+#include <Wt/WSlider>
+#include <Wt/WHBoxLayout>
+#include <Wt/WVBoxLayout>
+#include <Wt/WBorderLayout>
+#include <Wt/WLineEdit>
+#include <Wt/WComboBox>
+#include <Wt/WSelectionBox>
+#include <Wt/WGroupBox>
+#include <Wt/WRadioButton>
+#include <Wt/WButtonGroup>
+#include <Wt/WLayout>
+#include <Wt/WHBoxLayout>
+#include <Wt/WVBoxLayout>
+#include <Wt/WRadioButton>
+#include <Wt/Ext/Splitter>
+#include <Wt/WTabWidget>
+#include <Wt/WFileUpload>
+#include <Wt/WLength>
+
+
+#else //USE_WT
+
+#endif // EO USE_WT
 
-// define QWidget
-typedef void QWidget;
-typedef void QBusyCursor;
 
-#endif // EO USE_WXWIDGETS
 
-//-*-*-*-* JFGA 
 
-*/
 #ifdef USE_WT
 
 
@@ -130,11 +149,17 @@ namespace bbtk
     // BBTKWXSIG
     // The keyword 'signals' is also a macro in qt
     //    typedef boost::signals::trackable SignalObserver;
-    typedef boost::signals::trackable SignalObserver;
-    typedef boost::signal<void ()>  Signal_type;
+
+//EED 2020-04-21
+//    typedef boost::signals::trackable SignalObserver;
+//    typedef boost::signal<void ()>  Signal_type;
+      
+    typedef boost::signals2::trackable SignalObserver;
+    typedef boost::signals2::signal<void ()>  Signal_type;
+
     typedef Signal_type::slot_function_type Slot_function_type;
     // \BBTKWXSIG
-
+               
     /*
     static void ResetCursor();
     static void BeginBusyCursor(); 
@@ -153,10 +178,13 @@ namespace bbtk
 
 
     static void ProcessPendingEvents();
+
+#ifdef USE_WT
     /// Sets the parent of all bbtk windows
     static void SetTopWindow(Wt::WContainerWidget*);
     /// Returns the parent of all bbtk windows 
     static Wt::WContainerWidget* GetTopWindow();
+#endif // EO USE_WT
 
     
     static void IncNbWindowsAlive();
@@ -180,6 +208,9 @@ namespace bbtk
   //==================================================================
   
 #ifdef USE_WT
+
+
+       static std::string jScript;
   //==================================================================
   /// Conversion std::string to wxString 
   inline Wt::WString std2wt(const std::string& s)