SET(USE_KWWIDGETS OFF)
SET(USE_VTK ON)
SET(USE_ITK OFF)
-SET(USE_BOOST OFF)
+SET(USE_BOOST ON)
# Note : Set USE_DOXYGEN to ON
# if you think you will ask, some day,
SUBDIRS(lib)
SUBDIRS(appli)
SUBDIRS(doc)
+SUBDIRS(data)
SUBDIRS(install)
#==================================
)
INCLUDE_DIRECTORIES(../../lib/EditorGraphicBBS/bbsWxGUIEditorGraphic)
+INCLUDE_DIRECTORIES(../../lib/EditorGraphicBBS/bbsKernelEditorGraphic)
+INCLUDE_DIRECTORIES(../../lib/EditorGraphicBBS/bbsVtkGUIEditorGraphic)
+INCLUDE_DIRECTORIES(../../data/icons)
IF(BBTK_USE_WXWIDGETS AND WIN32)
ADD_EXECUTABLE(bbEditor WIN32 ${SOURCES})
TARGET_LINK_LIBRARIES(bbEditor
- bbsWxGUIEditorGraphic
+ bbsWxGUIEditorGraphic
+ bbsKernelEditorGraphic
${VTK_LIBRARIES}
${WXWIDGETS_LIBRARIES}
${creaMaracasVisu_LIBRARIES}
class wxBBEditorApp : public wxApp
{
public:
- bool OnInit( );
+ bool OnInit( );
int OnExit() { return true; }
-
+
};
-
+
IMPLEMENT_APP(wxBBEditorApp);
-
-
+
// ----------------------------------------------------------------------------
--- /dev/null
+
+SET(INPUT_DATA_DIR ${PROJECT_SOURCE_DIR}/data)
+
+FILE(GLOB CONFIGURE_DATA_FILES *.*)
+
+IF(WIN32)
+ SET(OUTPUT_DATA_DIR ${PROJECT_BINARY_DIR}/Debug/data)
+ CREA_CPDIR(${INPUT_DATA_DIR} ${OUTPUT_DATA_DIR})
+ SET(OUTPUT_DATA_DIR ${PROJECT_BINARY_DIR}/Release/data)
+ CREA_CPDIR(${INPUT_DATA_DIR} ${OUTPUT_DATA_DIR})
+ SET(OUTPUT_DATA_DIR ${PROJECT_BINARY_DIR}/RelWithDebInfo/data)
+ CREA_CPDIR(${INPUT_DATA_DIR} ${OUTPUT_DATA_DIR})
+ELSE(WIN32)
+ SET(OUTPUT_DATA_DIR ${PROJECT_BINARY_DIR}/data)
+ CREA_CPDIR(${INPUT_DATA_DIR} ${OUTPUT_DATA_DIR})
+ENDIF(WIN32)
\ No newline at end of file
--- /dev/null
+/* XPM */
+static const char *new_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"16 15 29 1",
+"* c #97C4E7",
+"- c #72A8D2",
+": c #FFFFFF",
+"9 c #839CB5",
+"o c #6B98B8",
+"X c #5A89A6",
+"# c #3A749C",
+", c #D1E5F5",
+"0 c #85A7BC",
+"$ c #C3DDF1",
+"8 c #749BB4",
+"; c #5F9BC8",
+" c None",
+"+ c #538DB3",
+"= c #85BBE2",
+"3 c #EFF6FC",
+"O c #6591AE",
+"5 c #F7FBFD",
+"7 c #FAFCFE",
+"< c #DAEAF7",
+"4 c #E9F3FA",
+"6 c #FDFDFE",
+"1 c #E2EFF8",
+". c #8EA9BC",
+"% c #B6D5EE",
+"& c #A5CCEA",
+"> c #ACE95B",
+"2 c #F4F9FD",
+"@ c #4581AA",
+/* pixels */
+" .XoOO+@#. ",
+" .$$%&*=O-; ",
+" @@@@$%&*O:*o ",
+" @>>@$$%&O::*o ",
+"@@@>>@@@$%OOoO+ ",
+"@>>>>>>@,$%&*=+ ",
+"@>>>>>>@<,$%&*+ ",
+"@@@>>@@@1<,$%&O ",
+" @>>@2341<,$%O ",
+" @@@@52341<,$o ",
+" .:6752341<,8 ",
+" .::6752341<8 ",
+" .:::67523419 ",
+" .::::6752340 ",
+" ............ "
+};
+#-----------------------------------------------------------------------------
+# INSTALL FILES
+#-----------------------------------------------------------------------------
+SET(DATA_DIR ${PROJECT_SOURCE_DIR}/data )
+FILE(GLOB DATA_FILES "${DATA_DIR}/*.*")
+FOREACH( iLST ${DATA_FILES} )
+ INSTALL(
+ FILES ${iLST}
+ DESTINATION bin/data
+ )
+ENDFOREACH(iLST)
+SET(DATA_DIR ${PROJECT_SOURCE_DIR}/data/icons )
+FILE(GLOB DATA_FILES "${DATA_DIR}/*.*")
+FOREACH( iLST ${DATA_FILES} )
+ INSTALL(
+ FILES ${iLST}
+ DESTINATION bin/data/icons
+ )
+ENDFOREACH(iLST)
+
+#-----------------------------------------------------------------------------
+
+
+
#-----------------------------------------------------------------------------
# CPACK+NSIS PACKAGING
#-----------------------------------------------------------------------------
-#
\ No newline at end of file
+
+
+FILE(GLOB bbsKernelEditorGraphic_CXX_SOURCES "." "*.cxx")
+FILE(GLOB bbsKernelEditorGraphic_H_SOURCES "." "*.h")
+
+INCLUDE_DIRECTORIES(../bbsWxGUIEditorGraphic)
+INCLUDE_DIRECTORIES(../bbsVtkGUIEditorGraphic)
+
+ADD_LIBRARY(bbsKernelEditorGraphic
+ ${bbsKernelEditorGraphic_CXX_SOURCES}
+ ${bbsKernelEditorGraphic_H_SOURCES} )
+
--- /dev/null
+/*=========================================================================
+Program: bbtk
+Module: $RCSfile$
+Language: C++
+Date: $Date$
+Version: $Revision$
+=========================================================================*/
+
+/* ---------------------------------------------------------------------
+
+* Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale)
+* Authors : Eduardo Davila, Laurent Guigues, Jean-Pierre Roux
+*
+* 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.
+* ------------------------------------------------------------------------ */
+
+/**
+* \file
+* \brief Class bbtk::wxVtkSceneManager .
+*/
+
+
+#include "wxVtkSceneManager.h"
+#include <vtkInteractorStyleBaseView2D.h>
+
+#include "vtkConeSource.h"
+#include "vtkPolyDataMapper.h"
+#include "vtkActor.h"
+#include "vtkRenderer.h"
+
+namespace bbtk
+{
+
+
+ //=========================================================================
+ wxVtkSceneManager::wxVtkSceneManager(wxVtk3DBaseView *baseView,int id)
+ {
+ _id=id;
+ _baseView=baseView;
+ if( _baseView!=NULL )
+ {
+ vtkInteractorStyleBaseView* baseViewControlManager = (vtkInteractorStyleBaseView*)_baseView->GetInteractorStyleBaseView();
+ baseViewControlManager->AddInteractorStyleMaracas( this );
+
+ configureBaseView();
+
+ vtkRenderer *ren1 =_baseView->GetRenderer();
+ vtkConeSource *cone = vtkConeSource::New();
+
+ cone->SetResolution(8);
+
+ vtkPolyDataMapper *map = vtkPolyDataMapper::New();
+ map->SetInput(cone->GetOutput());
+
+ vtkActor *act = vtkActor::New();
+
+ act->SetMapper(map);
+
+ ren1->AddActor(act);
+
+ ren1->Render();
+ }
+ }
+
+ //=========================================================================
+ wxVtkSceneManager::~wxVtkSceneManager()
+ {
+ }
+ //=========================================================================
+
+ void wxVtkSceneManager::configureBaseView()
+ {
+ vtkInteractorStyleBaseView2D *temp = new vtkInteractorStyleBaseView2D();
+ _baseView->SetInteractorStyleBaseView(temp);
+ }
+
+ //=========================================================================
+
+} // EO namespace bbtk
+
+// EOF
+
--- /dev/null
+/*=========================================================================
+Program: bbtk
+Module: $RCSfile$
+Language: C++
+Date: $Date$
+Version: $Revision$
+=========================================================================*/
+
+/* ---------------------------------------------------------------------
+
+* Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale)
+* Authors : Eduardo Davila, Laurent Guigues, Jean-Pierre Roux
+*
+* 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.
+* ------------------------------------------------------------------------ */
+
+
+
+/**
+* \file
+* \brief Class bbtk::BlackBox : abstract black-box interface.
+*/
+
+/**
+* \class bbtk::wxVtkSceneManager
+* \brief
+*/
+
+#ifndef __wxVtkSceneManager_h__
+#define __wxVtkSceneManager_h__
+
+//Includes creaMaracasVisu
+#include <wxVtk3DBaseView.h>
+#include <InteractorStyleMaracas.h>
+
+//Includes std
+#include <iostream>
+
+namespace bbtk
+{
+
+ class wxVtkSceneManager : public InteractorStyleMaracas
+ {
+ public:
+ wxVtkSceneManager(wxVtk3DBaseView *baseView, int id);
+ ~wxVtkSceneManager();
+
+ void configureBaseView();
+ //void addGBox(double x=0, double y=0);
+
+ private:
+
+ int _id;
+ wxVtk3DBaseView *_baseView;
+
+ protected:
+
+ };
+
+
+}
+// namespace bbtk
+#endif
+
INCLUDE_DIRECTORIES(../bbsKernelEditorGraphic)
INCLUDE_DIRECTORIES(../bbsVtkGUIEditorGraphic)
+INCLUDE_DIRECTORIES(../../../data/icons)
ADD_LIBRARY(bbsWxGUIEditorGraphic
${bbsWxGUIEditorGraphic_CXX_SOURCES}
${bbsWxGUIEditorGraphic_H_SOURCES} )
-#TARGET_LINK_LIBRARIES(bbsWxGUIEditorGraphic bbtk )
/*=========================================================================
- Program: bbtk
- Module: $RCSfile$
- Language: C++
- Date: $Date$
- Version: $Revision$
+Program: bbtk
+Module: $RCSfile$
+Language: C++
+Date: $Date$
+Version: $Revision$
=========================================================================*/
/* ---------------------------------------------------------------------
* ------------------------------------------------------------------------ */
/**
- * \file
- * \brief Class bbtk::WxInterfaceEditorGraphicBBS .
- */
-
-
+* \file
+* \brief Class bbtk::WxInterfaceEditorGraphicBBS .
+*/
#include "bbtkwxGUIEditorGraphicBBS.h"
-#include "bbtkwxGUIEditorGraphicContainer.h"
-
-#include <bbtkWxGUIPackageBrowser2.h>
-
namespace bbtk
{
- //=========================================================================
+ //=========================================================================
wxGUIEditorGraphicBBS::wxGUIEditorGraphicBBS(wxFrame *parent)
- : wxFrame(parent, -1, _T("bbEditor"),wxDefaultPosition, wxSize(1200,800))
- {
- m_mgr.SetManagedWindow(this);
- editorgraphiccontainer = new wxGUIEditorGraphicContainer(this);
-
- wxPanel *mWxGUIGrapphicEditorPanel = new wxPanel(this,-1);
- wxPanel *mWxGUIBoxBrowserPanel = new wxPanel(this,-1);
- wxPanel *mWxGUIConfigurationGraphicEditorPanel = new wxPanel(this,-1);
-
- mWxGUIGrapphicEditorPanel->SetBackgroundColour( wxColor(255,0,0) );
- mWxGUIBoxBrowserPanel->SetBackgroundColour( wxColor(0,255,0) );
- mWxGUIConfigurationGraphicEditorPanel->SetBackgroundColour( wxColor(255,0,255) );
-
- //
- m_mgr.AddPane(mWxGUIGrapphicEditorPanel,
- wxAuiPaneInfo().Name(wxT("graphic_editor_content"))
- .Caption(wxT("Graphic editor"))
- .MinimizeButton(true)
- .MaximizeButton(true)
- .Center()
- .MinSize(wxSize(100,100))
- );
-
- m_mgr.AddPane(mWxGUIBoxBrowserPanel,
- wxAuiPaneInfo().Name(wxT("box_browser_content"))
- .Caption(wxT("Box browser"))
- .MinimizeButton(true)
- .MaximizeButton(true)
- .Right()
- .Layer(2)
- .MinSize(wxSize(400,100))
- );
-
- m_mgr.AddPane(mWxGUIConfigurationGraphicEditorPanel,
- wxAuiPaneInfo().Name(wxT("configuration_graphic_editor_content"))
- .Caption(wxT("Messages"))
- .MinimizeButton(true)
- .MaximizeButton(true)
- .Bottom()
- .MinSize(wxSize(100,100))
- );
-
- SetAutoLayout(true);
- Layout();
- m_mgr.Update();
-
- WxGUIPackageBrowser2 *bb= new WxGUIPackageBrowser2(this);
+ : wxFrame(parent, -1, _T("bbtkGEditor"),wxDefaultPosition, wxSize(1200,800))
+ {
+ _frameAUIMgr = new wxAuiManager(this);
+
+
+ //std::string datadir( crea::System::GetExecutablePath() );
+ std::string datadir (".");
+ cout<<"RaC //------------------"<<endl;
+ cout<<"RaC //TODO wxGUIEditorGraphicBBS constructor.Initialize datadir with crea::System::GetExecutablePath() ."<<endl;
+ cout<<"RaC //------------------"<<endl;
+
+ #ifdef LINUX /* assume this is OSX */
+ datadir=datadir+"/../share/creaContours";
+ #endif // MACOSX
- }
+ #ifdef MACOSX /* assume this is OSX */
+ datadir=datadir+"/../../../../share/creaContours";
+ #endif // MACOSX
+
+ _dataDir = datadir;
+
+ initMenu();
+ initToolbar();
+ initPackageBrowser();
+ initTabPanelsManager();
+
+ CreateStatusBar();
+ _frameAUIMgr->Update();
+ }
+
+
+ //=========================================================================
+ wxGUIEditorGraphicBBS::~wxGUIEditorGraphicBBS()
+ {
+ _frameAUIMgr->UnInit();
+ }
+
+ //=========================================================================
+ void wxGUIEditorGraphicBBS::initToolbar()
+ {
+ //std::string filename= _dataDir + "/data/icons/wxart_new.xpm";
+ wxBitmap bmp_new(new_xpm);
+
+ wxToolBar *_toolbar = new wxToolBar(this, wxID_ANY);
+
+ //Adds a tool btn to the toolbar
+ _toolbar->AddTool(wxID_NEW,_T("New"),bmp_new, wxNullBitmap, wxITEM_NORMAL,_T("New tab"), _T("Create a new panel tab"));
- //=========================================================================
- wxGUIEditorGraphicBBS::~wxGUIEditorGraphicBBS()
- {
- delete editorgraphiccontainer;
- m_mgr.UnInit();
- }
- //=========================================================================
+ ////////////////////
+ // TEMP to avoid drag and drop
+
+ _toolbar->AddTool(wxID_NEW+1,_T("New Box"),bmp_new, wxNullBitmap, wxITEM_NORMAL,_T("New Box"), _T("Create a new Box"));
+
+
+ //
+ ////////////////////
+
+ _toolbar->SetMargins( 2, 2 );
+ _toolbar->Realize();
+ SetToolBar(_toolbar);
+
+ // connect command event handlers
+ Connect(wxID_NEW,wxEVT_COMMAND_TOOL_CLICKED,wxCommandEventHandler(wxGUIEditorGraphicBBS::OnToolLeftClick));
+
+ }
+
+ //=========================================================================
+ void wxGUIEditorGraphicBBS::initMenu()
+ {
+ // create a menu bar
+ wxMenu *fileMenu = new wxMenu;
+
+ // the "About" item should be in the help menu
+ wxMenu *helpMenu = new wxMenu;
+ helpMenu->Append(wxID_ABOUT, _T("&About..."), _T("About"));
+ fileMenu->Append(wxID_EXIT, _T("E&xit"), _T("Exit"));
+
+ // now append the freshly created menu to the menu bar...
+ wxMenuBar *menuBar = new wxMenuBar();
+ menuBar->Append(fileMenu, _T("&File"));
+ menuBar->Append(helpMenu, _T("&Help"));
+
+ // attach this menu bar to the frame
+ SetMenuBar(menuBar);
+ }
+
+ //=========================================================================
+ void wxGUIEditorGraphicBBS::initTabPanelsManager()
+ {
+ wxAuiNotebook *notebook = new wxAuiNotebook(this,wxID_ANY,wxDefaultPosition,wxDefaultSize,wxAUI_NB_TOP|wxAUI_NB_TAB_MOVE|wxAUI_NB_CLOSE_ON_ACTIVE_TAB|wxAUI_NB_TAB_FIXED_WIDTH|wxAUI_NB_WINDOWLIST_BUTTON);
+ _tabsMgr = new wxTabPanelsManager(notebook);
+ _frameAUIMgr->AddPane(notebook,wxAuiPaneInfo().CenterPane());
+
+ }
+
+ //=========================================================================
+ void wxGUIEditorGraphicBBS::initPackageBrowser()
+ {
+ _pkgBrowser = new WxGUIPackageBrowser2(this);
+ _pkgBrowser->IncludeAll();
+ _frameAUIMgr->AddPane(_pkgBrowser,wxAuiPaneInfo().Left().MinSize(200,200).CloseButton(false));
+
+ //FIXME - Just the first tab with drop target event
+ //_pkgBrowser->SetBoxListDropTarget((wxDropTarget*)_tabsMgr->getActualTabPanel());
+ }
+
+ /*****************************************************
+ /* HANDLERS
+ /*****************************************************/
+
+ void wxGUIEditorGraphicBBS::OnToolLeftClick(wxCommandEvent& event)
+ {
+ switch (event.GetId())
+ {
+ case wxID_NEW :
+ std::cout<<"RaC New"<<std::endl;
+ _tabsMgr->addNewTab();
+ break;
+ case wxID_NEW+1 :
+ //BlackBoxDescriptor* desc = _pkgBrowser->GetActualSelected();
+ //cout<<"RaC GetActualSelected desc:"<<desc->GetAuthor()<<endl;
+ }
+ }
} // EO namespace bbtk
#include <wx/frame.h>
#include <wx/aui/aui.h>
+#include <wx/aui/auibook.h>
+#include <bbtkWxGUIPackageBrowser2.h>
+#include <wx/panel.h>
+#include <wx/toolbar.h>
+#include <wx/bitmap.h>
+#include <wx/menu.h>
+#include "wxart_new.xpm"
+#include <bbtkBlackBoxDescriptor.h>
+
+#include "wxTabPanelsManager.h"
namespace bbtk
{
-
- class wxGUIEditorGraphicContainer;
class wxGUIEditorGraphicBBS : public wxFrame
{
public:
wxGUIEditorGraphicBBS(wxFrame *parent );
~wxGUIEditorGraphicBBS();
- private:
- wxAuiManager m_mgr;
- wxGUIEditorGraphicContainer *editorgraphiccontainer;
-
- protected:
+
+ void initToolbar();
+ void initMenu();
+ void initTabPanelsManager();
+ void initPackageBrowser();
+
+ void OnToolLeftClick(wxCommandEvent& event);
+
+
+ private:
+ wxAuiManager *_frameAUIMgr;
+ wxTabPanelsManager *_tabsMgr;
+ wxAuiNotebook *_notebook;
+ WxGUIPackageBrowser2 *_pkgBrowser;
+
+ std::string _dataDir;
+
+ protected:
+
};
--- /dev/null
+/*=========================================================================
+Program: bbtk
+Module: $RCSfile$
+Language: C++
+Date: $Date$
+Version: $Revision$
+=========================================================================*/
+
+/* ---------------------------------------------------------------------
+
+* Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale)
+* Authors : Eduardo Davila, Laurent Guigues, Jean-Pierre Roux
+*
+* 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.
+* ------------------------------------------------------------------------ */
+
+/**
+* \file
+* \brief Class bbtk::wxGEditorTabPanel .
+*/
+
+
+#include "wxGEditorTabPanel.h"
+
+
+namespace bbtk
+{
+ //=========================================================================
+ wxGEditorTabPanel::wxGEditorTabPanel()
+ {
+ }
+
+ //=========================================================================
+ wxGEditorTabPanel::wxGEditorTabPanel(wxWindow *parent,int id):wxPanel(parent)
+ {
+ _id=id;
+ _panelAUIMgr = new wxAuiManager(this);
+ _sceneManager = NULL;
+
+ initWxVtkCanvas();
+ }
+
+ //=========================================================================
+ wxGEditorTabPanel::~wxGEditorTabPanel()
+ {
+ }
+
+ //=========================================================================
+ void wxGEditorTabPanel::initWxVtkCanvas()
+ {
+ wxVtk3DBaseView *baseview = new wxVtk3DBaseView(this);
+ baseview->Configure();
+ _sceneManager=new wxVtkSceneManager(baseview,_id);
+
+ _panelAUIMgr->AddPane((wxWindow*)baseview->GetWxVTKRenderWindowInteractor(),wxAuiPaneInfo().Fixed().CenterPane());
+ _panelAUIMgr->Update();
+ }
+
+ //=========================================================================
+
+ bool wxGEditorTabPanel::OnDropText(wxCoord x, wxCoord y, const wxString& data)
+ {
+
+ cout<<"RaC DyD:"<<data<<" x:"<<x<<" y:"<<y<<endl;
+ return true;
+
+ }
+
+ //=========================================================================
+
+} // EO namespace bbtk
+
+// EOF
+
--- /dev/null
+/*=========================================================================
+Program: bbtk
+Module: $RCSfile$
+Language: C++
+Date: $Date$
+Version: $Revision$
+=========================================================================*/
+
+/* ---------------------------------------------------------------------
+
+* Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale)
+* Authors : Eduardo Davila, Laurent Guigues, Jean-Pierre Roux
+*
+* 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.
+* ------------------------------------------------------------------------ */
+
+
+
+/**
+* \file
+* \brief Class bbtk::BlackBox : abstract black-box interface.
+*/
+
+/**
+* \class bbtk::wxGEditorTabPanel
+* \brief
+*/
+
+#ifndef __wxGEditorTabPanel_h__
+#define __wxGEditorTabPanel_h__
+
+#include <wx/panel.h>
+#include <wx/aui/aui.h>
+#include <wx/dnd.h>
+
+#include <wxVtk3DBaseView.h>
+
+#include <iostream>
+
+#include "wxVtkSceneManager.h"
+
+namespace bbtk
+{
+
+ class wxGEditorTabPanel : public wxTextDropTarget, public wxPanel
+ {
+ public:
+ wxGEditorTabPanel();
+ wxGEditorTabPanel(wxWindow *parent, int id);
+ ~wxGEditorTabPanel();
+
+ void initWxVtkCanvas();
+ virtual bool OnDropText(wxCoord x, wxCoord y, const wxString& data);
+
+ private:
+
+ int _id;
+ wxAuiManager *_panelAUIMgr;
+ wxVtkSceneManager *_sceneManager;
+
+ protected:
+
+ };
+
+
+}
+// namespace bbtk
+#endif
+
--- /dev/null
+/*=========================================================================
+Program: bbtk
+Module: $RCSfile$
+Language: C++
+Date: $Date$
+Version: $Revision$
+=========================================================================*/
+
+/* ---------------------------------------------------------------------
+
+* Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale)
+* Authors : Eduardo Davila, Laurent Guigues, Jean-Pierre Roux
+*
+* 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.
+* ------------------------------------------------------------------------ */
+
+/**
+* \file
+* \brief Class bbtk::wxTabPanelsManager .
+*/
+
+
+#include "wxTabPanelsManager.h"
+
+
+namespace bbtk
+{
+
+
+ //=========================================================================
+ wxTabPanelsManager::wxTabPanelsManager(wxAuiNotebook *notebook)
+ {
+ _lastId = 0;
+ _notebook = notebook;
+ addNewTab();
+ }
+
+ //=========================================================================
+ wxTabPanelsManager::~wxTabPanelsManager()
+ {
+ }
+
+ //=========================================================================
+ void wxTabPanelsManager::addNewTab()
+ {
+ _lastId++;
+
+ wxPanel *newPanel = new wxGEditorTabPanel(_notebook,_lastId);
+ _panels[_lastId]=newPanel;
+ _actual = newPanel;
+
+ _notebook->AddPage(newPanel,_T("Diagram"),true);
+ }
+
+ //=========================================================================
+ wxAuiNotebook* wxTabPanelsManager::getAuiNotebook()
+ {
+ return _notebook;
+ }
+
+ //=========================================================================
+ wxPanel* wxTabPanelsManager::getActualTabPanel()
+ {
+ return _actual;
+ }
+
+ /*****************************************************
+ /* HANDLERS
+ /*****************************************************/
+
+
+} // EO namespace bbtk
+
+// EOF
+
--- /dev/null
+/*=========================================================================
+Program: bbtk
+Module: $RCSfile$
+Language: C++
+Date: $Date$
+Version: $Revision$
+=========================================================================*/
+
+/* ---------------------------------------------------------------------
+
+* Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale)
+* Authors : Eduardo Davila, Laurent Guigues, Jean-Pierre Roux
+*
+* 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.
+* ------------------------------------------------------------------------ */
+
+
+
+/**
+* \file
+* \brief Class bbtk::BlackBox : abstract black-box interface.
+*/
+
+/**
+* \class bbtk::wxTabPanelsManager
+* \brief
+*/
+
+#ifndef __wxTabPanelsManager_h__
+#define __wxTabPanelsManager_h__
+
+#include <wx/aui/auibook.h>
+#include <wx/panel.h>
+#include <map>
+#include <iostream>
+
+#include "wxGEditorTabPanel.h"
+
+using namespace std;
+
+namespace bbtk
+{
+
+ class wxTabPanelsManager
+ {
+ public:
+ wxTabPanelsManager(wxAuiNotebook *notebook);
+ ~wxTabPanelsManager();
+
+ virtual void addNewTab();
+ wxAuiNotebook* getAuiNotebook();
+ wxPanel* getActualTabPanel();
+
+ private:
+
+ /**
+ ** The map
+ */
+ map<int, wxPanel*> _panels;
+ wxPanel* _actual;
+ wxAuiNotebook *_notebook;
+ int _lastId;
+
+ protected:
+
+ };
+
+
+}
+// namespace bbtk
+#endif
+