SUBDIRS(bbCreatePackage)
+# Utility that creates the file architecture for a new user package
+SUBDIRS(bbCreateBlackBox)
+
--- /dev/null
+# Installs bbCreatePackage.bat/.sh
+# used to creates the file architecture for a new user package
+
+# go to data which install the input data to the script
+#SUBDIRS(data)
+
+# Sets the data install path
+
+# Relative path to the data used by bbCreatePackage from data root folder
+SET(bbCreateBlackBox_DATA_REL_PATH_FROM_DATA kernel/bbCreateBlackBox)
+
+# Configure / Install the empty package structure used by bbCreatePackage
+# Copy it into build tree
+FILE(GLOB_RECURSE LST_FILE_VOID_CREATE_PACKAGE RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/xml-templates *.xml )
+FOREACH( iLST ${LST_FILE_VOID_CREATE_PACKAGE})
+ STRING(SUBSTRING ${iLST} 0 3 subStrTmp )
+ IF( ${subStrTmp} STREQUAL "../" )
+ # ...
+ ELSE( ${subStrTmp} STREQUAL "../" )
+ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/xml-templates/${iLST}
+ ${BBTK_DATA_BUILD_PATH}/${bbCreateBlackBox_DATA_REL_PATH_FROM_DATA}/xml-templates/${iLST}
+ COPYONLY )
+ ENDIF( ${subStrTmp} STREQUAL "../" )
+ENDFOREACH(iLST)
+# Install the build tree folder
+INSTALL(
+ DIRECTORY ${BBTK_DATA_BUILD_PATH}/${bbCreateBlackBox_DATA_REL_PATH_FROM_DATA}/xml-templates
+ DESTINATION ${BBTK_DATA_INSTALL_PATH}/${bbCreateBlackBox_DATA_REL_PATH_FROM_DATA}
+ )
+
+# Configure / Install the script bbCreatePackage
+SET(bbCreateBlackBox_DATA_REL_PATH_FROM_BIN ../${BBTK_DATA_REL_PATH}/${bbCreateBlackBox_DATA_REL_PATH_FROM_DATA})
+FILE(TO_NATIVE_PATH ${bbCreateBlackBox_DATA_REL_PATH_FROM_BIN} bbCreateBlackBox_DATA_REL_PATH_FROM_BIN)
+IF(WIN32)
+ # Build tree
+ CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/bbCreateBlackBox.bat.in
+ ${BBTK_BINARY_DIR}/Debug/bbCreateBlackBox.bat
+ @ONLY IMMEDIATE
+ )
+ CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/bbCreateBlackBox.bat.in
+ ${BBTK_BINARY_DIR}/Release/bbCreateBlackBox.bat
+ @ONLY IMMEDIATE
+ )
+ # install tree
+ INSTALL(
+ PROGRAMS ${BBTK_BINARY_DIR}/Debug/bbCreateBlackBox.bat
+ DESTINATION bin
+ )
+ENDIF(WIN32)
+
+
+IF(UNIX)
+ # Build tree
+ CONFIGURE_FILE(
+ ${CMAKE_CURRENT_SOURCE_DIR}/bbCreateBlackBox.sh.in
+ ${BBTK_BINARY_DIR}/bin/bbCreateBlackBox
+ @ONLY IMMEDIATE
+ )
+ # Install tree
+ INSTALL(
+ PROGRAMS ${BBTK_BINARY_DIR}/bin/bbCreateBlackBox
+ DESTINATION bin
+ )
+ENDIF(UNIX)
+
+
+
+
--- /dev/null
+@echo off
+
+echo creates the file architecture for a new blackbox
+
+
+if %0%5==%0 goto ERROR01
+
+
+rem bbCreatePackage path
+set BINPATH=%~dp0
+rem Input data path
+set INPUT="%BINPATH%\@bbCreateBlackBox_DATA_REL_PATH_FROM_BIN@\xml-templates"
+
+set OUTPUT=%1
+set PACK=%2
+set BLACKBOX=%3
+set TYPE=%4
+set FORMAT=%5
+set AUTHOR=%6
+set DESCRIPTION=%7
+set FILENAME=bb%PACK%%BLACKBOX%
+
+echo output= %OUTPUT%
+echo bin = %BINPATH%
+echo input = %INPUT%
+echo pack = %PACK%
+echo blackbox = %BLACKBOX%
+echo type = %TYPE%
+echo format = %FORMAT%
+echo author = %AUTHOR%
+echo description = %DESCRIPTION%
+echo filename = %FILENAME%
+
+echo "** Creating new black box '%BLACKBOX%' xml/c++ in folder '%OUTPUT%'"
+
+echo Creating XML file..
+echo copy %INPUT%\%type%-template.xml %OUTPUT%\%FILENAME%.xml
+copy %INPUT%\%type%-template.xml %OUTPUT%\%FILENAME%.xml_tmp
+%BINPATH%\bbSed %OUTPUT%\%FILENAME%.xml_tmp __BLACKBOXNAME__ %BLACKBOX% > %OUTPUT%\%FILENAME%_1.xml
+%BINPATH%\bbSed %OUTPUT%\%FILENAME%_1.xml __AUTHOR__ %AUTHOR% > %OUTPUT%\%FILENAME%_2.xml
+%BINPATH%\bbSed %OUTPUT%\%FILENAME%_2.xml __DESCRIPTION__ %DESCRIPTION% > %OUTPUT%\%FILENAME%.xml_tmp
+del %OUTPUT%\%FILENAME%_1.xml
+del %OUTPUT%\%FILENAME%_2.xml
+
+
+IF %FORMAT%==XML GOTO module_XML
+IF %FORMAT%==C++ GOTO module_C++
+
+goto ERROR03
+
+:module_XML
+ IF EXIST %OUTPUT%\%FILENAME%.xml GOTO ERROR02
+ move %OUTPUT%\%FILENAME%.xml_tmp %OUTPUT%\%FILENAME%.xml
+goto END
+
+:module_C++
+ IF EXIST %OUTPUT%\%FILENAME%.cxx GOTO ERROR02
+ echo %BINPATH%\bbfy %OUTPUT%\%FILENAME%.xml_tmp %PACK% %OUTPUT%
+ %BINPATH%\bbfy %OUTPUT%\%FILENAME%.xml_tmp %PACK% %OUTPUT%\
+ del %OUTPUT%\%FILENAME%.xml_tmp
+goto END
+
+
+
+:ERROR01
+echo -----------------------------------------------------------------------------
+echo bbCreateBlackBox.bat "<dir-path> <package-name> <blackbox-name> <type> <format> [author] [description] "
+echo type:
+echo std
+echo VTK_ImageAlgorithm
+echo VTK_PolyDataAlgorithm
+echo widget
+echo format:
+echo XML
+echo C++
+echo -----------------------------------------------------------------------------
+goto END
+
+:ERROR02
+echo "ERROR : File '%OUTPUT%\%FILENAME%' %FORMAT% already exists !"
+del %OUTPUT%\%FILENAME%.xml_tmp
+goto end
+
+:ERROR03
+echo "ERROR : format not match '%FORMAT%' "
+del %OUTPUT%\%FILENAME%.xml_tmp
+goto end
+
+
+:END
+
--- /dev/null
+@echo off
+
+echo creates the file architecture for a new blackbox
+
+
+if %0%5==%0 goto ERROR01
+
+
+rem bbCreatePackage path
+set BINPATH=%~dp0
+rem Input data path
+set INPUT="%BINPATH%\@bbCreateBlackBox_DATA_REL_PATH_FROM_BIN@\xml-templates"
+
+set OUTPUT=%1
+set PACK=%2
+set BLACKBOX=%3
+set TYPE=%4
+set FORMAT=%5
+set AUTHOR=%6
+set DESCRIPTION=%7
+set FILENAME=bb%PACK%%BLACKBOX%
+
+echo output= %OUTPUT%
+echo bin = %BINPATH%
+echo input = %INPUT%
+echo pack = %PACK%
+echo blackbox = %BLACKBOX%
+echo type = %TYPE%
+echo format = %FORMAT%
+echo author = %AUTHOR%
+echo description = %DESCRIPTION%
+echo filename = %FILENAME%
+
+echo "** Creating new black box '%BLACKBOX%' xml/c++ in folder '%OUTPUT%'"
+
+echo Creating XML file..
+echo copy %INPUT%\%type%-template.xml %OUTPUT%\%FILENAME%.xml
+copy %INPUT%\%type%-template.xml %OUTPUT%\%FILENAME%.xml_tmp
+%BINPATH%\bbSed %OUTPUT%\%FILENAME%.xml_tmp __BLACKBOXNAME__ %BLACKBOX% > %OUTPUT%\%FILENAME%_1.xml
+%BINPATH%\bbSed %OUTPUT%\%FILENAME%_1.xml __AUTHOR__ %AUTHOR% > %OUTPUT%\%FILENAME%_2.xml
+%BINPATH%\bbSed %OUTPUT%\%FILENAME%_2.xml __DESCRIPTION__ %DESCRIPTION% > %OUTPUT%\%FILENAME%.xml_tmp
+del %OUTPUT%\%FILENAME%_1.xml
+del %OUTPUT%\%FILENAME%_2.xml
+
+
+IF %FORMAT%==XML GOTO module_XML
+IF %FORMAT%==C++ GOTO module_C++
+
+goto ERROR03
+
+:module_XML
+ IF EXIST %OUTPUT%\%FILENAME%.xml GOTO ERROR02
+ move %OUTPUT%\%FILENAME%.xml_tmp %OUTPUT%\%FILENAME%.xml
+goto END
+
+:module_C++
+ IF EXIST %OUTPUT%\%FILENAME%.cxx GOTO ERROR02
+ echo %BINPATH%\bbfy %OUTPUT%\%FILENAME%.xml_tmp %PACK% %OUTPUT%
+ %BINPATH%\bbfy %OUTPUT%\%FILENAME%.xml_tmp %PACK% %OUTPUT%\
+ del %OUTPUT%\%FILENAME%.xml_tmp
+goto END
+
+
+
+:ERROR01
+echo -----------------------------------------------------------------------------
+echo bbCreateBlackBox.bat "<dir-path> <package-name> <blackbox-name> <type> <format> [author] [description] "
+echo type:
+echo std
+echo VTK_ImageAlgorithm
+echo VTK_PolyDataAlgorithm
+echo widget
+echo format:
+echo XML
+echo C++
+echo -----------------------------------------------------------------------------
+goto END
+
+:ERROR02
+echo "ERROR : File '%OUTPUT%\%FILENAME%' %FORMAT% already exists !"
+del %OUTPUT%\%FILENAME%.xml_tmp
+goto end
+
+:ERROR03
+echo "ERROR : format not match '%FORMAT%' "
+del %OUTPUT%\%FILENAME%.xml_tmp
+goto end
+
+
+:END
+
--- /dev/null
+<?xml version="1.0" encoding="iso-8859-1"?>
+
+<blackbox name="__BLACKBOXNAME__" type="VTK_ImageAlgorithm">
+
+<author>__AUTHOR__</author>
+<description><PRE>__DESCRIPTION__</PRE></description>
+<category>__CategoryBlackBox__</category>
+
+<include>vtkImageAnisotropicDiffusion3D.h</include>
+<include>vtkImageData.h</include>
+<vtkparent>vtkImageAnisotropicDiffusion3D</vtkparent>
+
+<input name="In" type="vtkImageData*" special="vtk input" description="Input image"/>
+<output name="Out" type="vtkImageData*" special="vtk output" description="Output image"/>
+<input name="DiffusionThreshold" type="double" special="vtk parameter" description="Difference threshold that stops diffusion"/>
+
+</blackbox>
+
+
--- /dev/null
+<?xml version="1.0" encoding="iso-8859-1"?>
+
+
+<blackbox name="__BLACKBOXNAME__" type="VTK_PolyDataAlgorithm">
+
+<author>__AUTHOR__</author>
+<description><PRE>__DESCRIPTION__</PRE></description>
+<category>__CategoryBlackBox__</category>
+
+<include>vtkAppendPolyData.h</include>
+<vtkparent>vtkAppendPolyData</vtkparent>
+
+<output name="Out" type="vtkPolyData*" special="vtk output" description="Output Mesh"/>
+<input name="In1" type="vtkPolyData *" description="PolyData 1"/>
+<input name="In2" type="vtkPolyData *" description="PolyData 2"/>
+<input name="In3" type="vtkPolyData *" description="PolyData 3"/>
+<input name="In4" type="vtkPolyData *" description="PolyData 4"/>
+<input name="In5" type="vtkPolyData *" description="PolyData 5"/>
+
+<process>
+<PRE>
+ SetInput(bbGetInputIn1());
+ SetInput(bbGetInputIn2());
+ SetInput(bbGetInputIn3());
+ SetInput(bbGetInputIn4());
+ SetInput(bbGetInputIn5());
+
+ Update();
+</PRE>
+</process>
+
+<constructor>
+<PRE>
+ bbSetInputIn1((vtkPolyData *)0);
+ bbSetInputIn2((vtkPolyData *)0);
+ bbSetInputIn3((vtkPolyData *)0);
+ bbSetInputIn4((vtkPolyData *)0);
+ bbSetInputIn5((vtkPolyData *)0);
+ bbSetOutputOut((vtkPolyData *)0);
+</PRE>
+</constructor>
+
+
+</blackbox>
+
+
--- /dev/null
+<?xml version="1.0" encoding="iso-8859-1"?>
+
+<blackbox name="__BLACKBOXNAME__">
+
+ <author>__AUTHOR__</author>
+ <description>__DESCRIPTION__</description>
+ <category>__CategoryBlackBox__</category>
+
+ <input name="In1" type="double" description="First number to add"/>
+ <input name="In2" type="double" description="Second number to add"/>
+ <output name="Out" type="double" description="Result"/>
+
+ <process><PRE>
+ bbSetOutputOut( bbGetInputIn1() + bbGetInputIn2() );
+ </PRE></process>
+
+ <constructor><PRE>
+ bbSetInputIn1(0);
+ bbSetInputIn2(0);
+ bbSetOutputOut(0);
+ </PRE></constructor>
+
+</blackbox>
+
--- /dev/null
+<?xml version="1.0" encoding="iso-8859-1"?>
+
+<blackbox name="__BLACKBOXNAME__" widget>
+
+ <author>__AUTHOR__</author>
+ <description>__DESCRIPTION__</description>
+ <category>__CategoryBlackBox__</category>
+
+ <input name="Title" type="std::string" description="Title prepended to the text"/>
+ <input name="In" type="std::string" description="Text"/>
+
+ <createwidget><PRE>
+ bbSetOutputWidget( new wxStaticText ( bbGetWxParent() , -1 , _T("") ) );
+ Process();
+ </PRE></createwidget>
+
+ <process><PRE>
+ std::string msg;
+ if (bbGetInputTitle()!="")
+ {
+ msg = bbGetInputTitle()+": " + bbGetInputIn();
+ }
+ else
+ {
+ msg = bbGetInputIn();
+ }
+ ((wxStaticText*)bbGetOutputWidget())->SetLabel( bbtk::std2wx( msg ) );
+ </PRE></process>
+
+ <constructor><PRE>
+ bbSetInputIn("");
+ bbSetInputTitle("");
+ </PRE></constructor>
+
+
+</blackbox>
+
# Configure / Install the script bbCreatePackage
SET(bbCreatePackage_DATA_REL_PATH_FROM_BIN ../${BBTK_DATA_REL_PATH}/${bbCreatePackage_DATA_REL_PATH_FROM_DATA})
+FILE(TO_NATIVE_PATH ${bbCreatePackage_DATA_REL_PATH_FROM_BIN} bbCreatePackage_DATA_REL_PATH_FROM_BIN)
IF(WIN32)
# Build tree
CONFIGURE_FILE(
@ONLY IMMEDIATE
)
# install tree
- INSTALL_FILES(/bin .bat bbCreatePackage)
+ INSTALL(
+ PROGRAMS ${BBTK_BINARY_DIR}/Debug/bbCreatePackage.bat
+ DESTINATION bin
+ )
ENDIF(WIN32)
if %0%1==%0 goto ERROR01
-set BBTKINPUT="@bbCreatePackage_DATA_PATH@"
-set BBTKOUTPUT=%1
-
-
-echo %0
-echo %PWD%
-
-# bbCreatePackage path
-##EED TMP=$(which $0|rev)
-##EED BINPATH=$(echo ${TMP#*/}|rev)
-# Input data path
-set INPUT="${BINPATH}/@bbCreatePackage_DATA_REL_PATH_FROM_BIN@/void-Package"
-
-
+rem bbCreatePackage path
+set BINPATH=%~dp0
+rem Input data path
+set INPUT="%BINPATH%\@bbCreatePackage_DATA_REL_PATH_FROM_BIN@\void-Package"
set OUTPUT=%1
set PACK=%2
set AUTHOR=%3
set DESCRIPTION=%4
-echo "output= " %OUTPUT%
-echo "bin = " %BINPATH%
-echo "input = " %INPUT%
-echo "pack = " %PACK%
-
+echo output= %OUTPUT%
+echo bin = %BINPATH%
+echo input = %INPUT%
+echo pack = %PACK%
+echo author = %AUTHOR%
+echo description = %DESCRIPTION%
-echo "----- Creating black box package '%BBTKNAME%' in repository '%BBTKOUTPUT%' -----"
+IF EXIST %OUTPUT%\%PACK% GOTO ERROR02
+echo "** Creating new black box package '%PACK%' in folder '%OUTPUT%'"
-IF EXIST %BBTKOUTPUT% GOTO ERROR02
+mkdir %OUTPUT%\%PACK%
+xcopy %INPUT% %OUTPUT%\%PACK% /S
+%BINPATH%\bbSed %OUTPUT%\%PACK%\CMakeLists.txt WITHOUT_NAME "%PACK%" > %OUTPUT%\%PACK%\CMakeLists2.txt
+%BINPATH%\bbSed %OUTPUT%\%PACK%\CMakeLists2.txt WITHOUT_AUTHOR %AUTHOR% > %OUTPUT%\%PACK%\CMakeLists3.txt
+%BINPATH%\bbSed %OUTPUT%\%PACK%\CMakeLists3.txt WITHOUT_DESCRIPTION %DESCRIPTION% > %OUTPUT%\%PACK%\CMakeLists.txt
+del %OUTPUT%\%PACK%\CMakeLists2.txt
+del %OUTPUT%\%PACK%\CMakeLists3.txt
+echo "Done !"
+echo "Edit the file '%OUTPUT%\%PACK%\CMakeLists.txt' to customize your package"
-echo "-> Packages repository '%BBTKOUTPUT%' does not exist : creating it"
-mkdir %BBTKOUTPUT%
-
-
-
- echo "-> Creating file '%BBTKOUTPUT%/CMakeLists.txt' "
- copy %BBTKINPUT%\PackageCMakeLists.txt %BBTKOUTPUT%\CMakeLists.txt
- echo "-> Creating file directory '%BBTKOUTPUT%/cmake' "
- mkdir %BBTKOUTPUT%\cmake
- echo "-> Coping files in '%BBTKOUTPUT%/cmake' "
- copy %BBTKINPUT%\cmake\*.cmake %BBTKOUTPUT%\cmake
- copy %BBTKINPUT%\cmake\*.in %BBTKOUTPUT%\cmake
-
-echo "Done !"
-echo "Edit the file '%BBTKOUTPUT%/CMakeLists.txt' to customize your package"
goto END
-
-
:ERROR01
-echo bbCreatePackage.bat "<path-to-package-repository>"
+echo bbCreatePackage.bat "<package-path> <package-name> [author] [description] "
goto END
:ERROR02
-echo "ERROR : Directory '%BBTKOUTPUT%/%BBTKNAME%' already exists !"
+echo "ERROR : Directory '%OUTPUT%/%PACK%' already exists !"
goto end
# from build tree root or install tree root
# (different on win/lin)
IF(WIN32)
- SET(BBTK_SHARE_REL_PATH " ")
+ SET(BBTK_SHARE_REL_PATH "/")
SET(BBTK_DOC_REL_PATH doc)
SET(BBTK_BBS_REL_PATH bbs)
SET(BBTK_DATA_REL_PATH data)
# Recurse it bbtkWebSite dir
SUBDIRS(bbtkWebSite)
+
INSTALL(
DIRECTORY ${BBTK_BINARY_DIR}/${BBTK_DOC_REL_PATH}
DESTINATION ${BBTK_SHARE_REL_PATH}
Program: bbtk
Module: $RCSfile: bbtkInterpreter.cxx,v $ $
Language: C++
- Date: $Date: 2008/03/14 14:58:53 $
- Version: $Revision: 1.44 $
+ Date: $Date: 2008/03/17 07:04:08 $
+ Version: $Revision: 1.45 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
info.help = "Creates an html index of known boxes. If filename is provided then save it to the file 'filename'. The default index entries are the initial letters of the names of the boxes. If 'Packages' or 'Categories' is provided then the entries are either the packages names or the categories. If 'Adaptors' is provided then an alphabetical index of all adaptors is created.";
mCommandDict[info.category] = info;
- info.category = "reset"; //EED
+ info.category = "reset";
info.argmin = 0;
info.argmax = 0;
info.code = cReset;
*/
Interpreter::~Interpreter()
{
-
-std::cout << "=========================================~Interpreter()" << std::endl;
bbtkDebugMessageInc("Interpreter",9,"Interpreter::~Interpreter()" <<std::endl);
delete mExecuter;
std::cout << "B=== [" << (*it) << "]" << std::endl;
}
*/
-//printf("EED --- %s --- Interpreter::InterpretFile \n", mFileName[0].c_str() );
- //printf("EED --- %s --- Interpreter::InterpretFile \n", mFileName[0].c_str() );
//while ((mFile.size()>0) && !mFile.back()->eof() )
//{
// std::cout << "mFile.size() "<< mFile.size() << " mFileName.back() [" << mFileName.back() << "]" << std::endl;
-
while (!mFile.back()->eof()) {
mLine.back()++;
char buf[500];
str.erase(size-1,1);
}
- InterpretLine(str, insideComment);
-
-//printf("EED Interpreter::InterpretFile %s\n", str.c_str() );
+ InterpretLine(str, insideComment);
- }
- //if (mFile.size()>0)
- CloseCurrentFile();
+ }//while
+ //if (mFile.size()>0)
+ CloseCurrentFile();
}
}
catch (QuitException e)
*/
void Interpreter::InterpretLine( const std::string& line, bool &insideComment )
{
-
bbtkDebugMessageInc("Interpreter",9,"Interpreter::InterpretLine(\""<<line<<"\")"<<std::endl);
bbtkMessage("Echo",2,"\""<<line<<"\""<<std::endl);
Config();
break;
- case cReset : // EED
+ case cReset :
this->mExecuter->Reset();
break;
continue; // ignore '-appli.bbs' files
}
*/
- (*stream) << "include " << *i << "\n";
+
+ (*stream) << "include " << *i << "\n";
+//EED InterpretFile(*i);
+
nbBssFiles++;
- }
- if (nbBssFiles==0)
+ } // for vector
+ if (nbBssFiles==0){
bbtkMessage("Interpreter",2,
"WARNING : No '.bbs' file found in ["
<< upath << "]" << std::endl);
- else
- SwitchToStream(stream);
+ } else {
+ SwitchToStream(stream);
+ }
return;
- }
+ } // if upath
std::string path;
std::vector<std::string>::iterator i;
char * currentDir = getcwd(buf, 2048);
std::string cwd(currentDir);
path = currentDir;
- }
+ } // if path
fullDirectoryName = Utilities::MakePkgnameFromPath(path, upath, false);
- //EED 18 Fev 2008
// without last slash "\"
std::string fullDirectoryNameClean = fullDirectoryName.substr(0,fullDirectoryName.size()-1);
bbtkMessage("Interpreter",1," [" <<fullDirectoryName
<<"] : doesn't exist" <<std::endl);
continue; // try next path
- }
+ } // if IsDirectory
foundFile = true;
Filenames.clear();
nbBssFiles = 0;
for (std::vector<std::string>::iterator i = Filenames.begin(); i!= Filenames.end(); ++i)
{
-//EEDprintf("EED Interpreter::SwitchToFile %s\n",(*i).c_str() );
// std::cout << "JPR================== iterate [" << *i << "]" << std::endl;
int lgr = (*i).size();
if (lgr < 5)
continue; // ignore '-appli.bbs' files
}
*/
- (*stream) << "include " << *i << "\n";
+
+ (*stream) << "include " << *i << "\n";
+//EED InterpretFile(*i);
+
nbBssFiles++;
- }
- if (nbBssFiles==0)
+ } // for vector
+ if (nbBssFiles==0){
bbtkMessage("Interpreter",1,
"WARNING : No '.bbs' file found in ["
<< fullDirectoryName << "]" << std::endl);
- else
+ } else {
SwitchToStream(stream);
+ }
//break; // a directory was found; we stop iterating
// LG : No! We want all files included !
- }
+ } // for vector
return;
- }
+ } // if *
//std::string::size_type slash_position = name.find_last_of("/\\");
void Interpreter::SwitchToStream( std::stringstream* stream )
{
//std::cout << "== 1 Entry in Interpreter::SwitchToStream " << std::endl;
- mFile.push_back(stream);
+
+ mFile.push_back(stream);
//std::cout << " mFile.size() " << mFile.size() << std::endl;
std::ostringstream buffer_name;
bufferNb++;
void Interpreter::LoadScript( std::string fullPathScriptName,
std::string includeScriptName)
{
-//std::cout << "--------------------------EED Interpreter::LoadScript >>01\n" << std::endl;
Utilities::replace( fullPathScriptName , INVALID_FILE_SEPARATOR , VALID_FILE_SEPARATOR);
bool okScriptExist=false;
int iStrScript,sizeVecStricpt=mFileName.size();
for ( iStrScript=0;iStrScript<sizeVecStricpt;iStrScript++)
{
-//EED printf(" EED %d Interpreter::LoadScript %s __>>__ %s\n", iStrScript,mFileName[iStrScript].c_str(),fullPathScriptName.c_str() );
-
if (mFileName[iStrScript] == fullPathScriptName )
{
- printf(" EED %d Interpreter::LoadScript iguales\n",iStrScript );
okScriptExist=true;
} // if
} // for
if (find(mFileName.begin(),mFileName.end(),fullPathScriptName)!=mFileName.end())
// if (okScriptExist==true)
{
-//EED printf("EED Interpreter::LoadScript Exit method\n");
bbtkMessage("Interpreter",1,"file '"<<fullPathScriptName
<<"' already open : I do not open it once more to prevent recursive inclusion"<<std::endl);
return;
mFileName.push_back(fullPathScriptName);
mIncludeFileName.push_back(includeScriptName);
mLine.push_back(0);
-//EED printf("EED Interpreter::LoadScript >>02\n");
return;
}
mFileName.pop_back();
mIncludeFileName.pop_back();
mLine.pop_back();
-/*EED3
- bbtkDebugMessage("Interpreter",9," Closing file '"<<mFileName[0]<<"'"<<std::endl);
- mFile[0]->close();
- delete mFile[0];
- mFile.erase( mFile.begin() );
- mFileName.erase( mFileName.begin() );
- mIncludeFileName.erase( mIncludeFileName.begin() );
- mLine.erase( mLine.begin() );
-*/
bbtkDebugMessage("Interpreter",9," Remains "
<<mFile.size()
//========================================================================
void WxBrowser::OnURLEnter( wxCommandEvent&)
{
- std::cout << "OnURL"<<std::endl;
- printf ( "EED > WxBrowser::OnURLEnter URL(%s) \n ", (const char*) mwxURL->GetValue().mb_str() );
mwxHtmlWindow->LoadPage(mwxURL->GetValue());
}
//========================================================================
//========================================================================
void WxBrowser::OnLinkClicked(wxHtmlLinkEvent& e)
{
- std::cout << "WxBrowser::OnLinkClicked"<<std::endl;
- std::cout << e.GetLinkInfo().GetHref()<<std::endl;
- printf ( "EED > WxBrowser::OnLinkClicked eve(%s) \n ", (const char*) e.GetLinkInfo().GetHref().mb_str() );
mwxHtmlWindow->LoadPage( e.GetLinkInfo().GetHref() );
UpdateURL();
- printf ( "EED > WxBrowser::OnLinkClicked URL(%s) \n ", (const char*) mwxURL->GetValue().mb_str() );
mwxHtmlWindow->LoadPage( mwxURL->GetValue() );
}
//========================================================================
Program: bbtk
Module: $RCSfile: bbtkWxConsole.cxx,v $
Language: C++
- Date: $Date: 2008/03/14 14:58:53 $
- Version: $Revision: 1.13 $
+ Date: $Date: 2008/03/17 07:04:08 $
+ Version: $Revision: 1.14 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
WxConsole::WxConsole( wxWindow *parent, wxString title, wxSize size)
: wxFrame((wxFrame *)parent, -1, title, wxDefaultPosition, size)
{
+// m_mgr = new wxAuiManager(this);
+ m_mgr.SetManagedWindow(this);
mInterpreter = new bbtk::Interpreter();
mInterpreter->SetWxConsole(this);
menuAbout->Append( ID_Menu_About, _T("&About...") );
wxMenu *menuTools = new wxMenu;
- menuTools->Append( ID_Menu_CreatePackage, _T("&Create package") );
- menuTools->Append( ID_Menu_CreateBlackBox, _T("&Create blackbox") );
+ menuTools->Append( ID_Menu_EditConfig, _T("&Edit bbtk config") );
+ menuTools->Append( ID_Menu_CreatePackage, _T("Create &package") );
+ menuTools->Append( ID_Menu_CreateBlackBox, _T("Create &blackbox") );
menuTools->Append( ID_Menu_ShowImageGraph, _T("&Show last image graph") );
+ menuTools->Append( ID_Menu_CreateIndex, _T("&Generate index") );
wxMenuBar *menuBar = new wxMenuBar;
wxSize(500,500),
wxAUI_NB_TAB_SPLIT | wxAUI_NB_TAB_EXTERNAL_MOVE | wxNO_BORDER);
- mwxPageCommand = new wxPanel(mwxNotebook,-1);
- mwxNotebook->AddPage( mwxPageCommand, _T("Command"));
-
+ mwxPageCommand = new wxPanel(mwxNotebook,-1);
mwxPageHelp = new wxPanel(mwxNotebook,-1);
- mwxNotebook->AddPage( mwxPageHelp, _T("Help"));
-
-
-//EED sizer->Add ( mwxNotebook, 1, wxEXPAND /*| wxALIGN_BOTTOM*/ );
- wxAuiManager *m_mgr = new wxAuiManager(this);
- m_mgr->AddPane(mwxNotebook, wxAuiPaneInfo().Name(wxT("notebook_content")).CenterPane().PaneBorder(false));
- m_mgr->Update();
wxBoxSizer *cmdsizer = new wxBoxSizer(wxVERTICAL);
mwxTextCommand =
new wxComboBox(mwxPageCommand,
ID_Text_Command,
- _T("")
-// wxDefaultPosition,
-// wxDefaultSize,
-// wxTE_PROCESS_ENTER
+ _T(""),
+ wxDefaultPosition,
+ wxDefaultSize,
+ 0, NULL,
+ wxTE_PROCESS_ENTER
// | wxTE_PROCESS_TAB
// | wxWANTS_CHARS
// //| wxTAB_TRAVERSAL
// Events connection
// COMMAND
// ENTER
- /*
Connect( mwxTextCommand->GetId(),
wxEVT_COMMAND_TEXT_ENTER,
(wxObjectEventFunction)& WxConsole::OnCommandEnter );
+ /*
Connect( mwxTextCommand->GetId(),
wxEVT_CHAR,
//wxEVT_COMMAND_TEXT_UPDATED,
// Layout
//EED SetSizer(sizer);
- SetAutoLayout(true);
+
+ mwxNotebook->AddPage( mwxPageCommand, _T("Command"));
+ mwxNotebook->AddPage( mwxPageHelp, _T("Help"));
+ m_mgr.AddPane(mwxNotebook, wxAuiPaneInfo().Name(wxT("notebook_content")).CenterPane().PaneBorder(false));
+ m_mgr.Update();
+
+
+ SetAutoLayout(true);
Layout();
- Refresh();
+// Refresh();
+// m_mgr.Update();
}
//================================================================
//================================================================
WxConsole::~WxConsole()
{
+ m_mgr.UnInit();
delete mRedirect_cout;
delete mRedirect_cerr;
}
{
bool insideComment = false;
-printf("WxConsole::CommandString 04 \n");
mInterpreter->InterpretLine( wx2std(line), insideComment );
-printf("WxConsole::CommandString 05 \n");
}
catch (bbtk::QuitException)
{
//================================================================
void WxConsole::OnMenuAbout(wxCommandEvent& WXUNUSED(event))
{
-
- wxMessageBox(_T(" bbi\nThe Black Box Toolkit interpreter\n(c) CREATIS-LRMN 2007"),
+ m_mgr.Update();
+ Refresh();
+ wxMessageBox(_T(" bbi\nThe Black Box Toolkit interpreter\n(c) CREATIS-LRMN 2008"),
_T("About ..."), wxOK | wxICON_INFORMATION,
this);
}
//================================================================
-
+
+ //================================================================
+ void WxConsole::OnMenuEditConfig(wxCommandEvent& WXUNUSED(event))
+ {
+ std::string commandStr;
+ std::string configFile = ConfigurationFile::GetInstance().Get_config_xml_full_path();
+#ifdef WIN32
+ commandStr = "notepad.exe ";
+#else
+ commandStr = "gedit ";
+#endif
+ commandStr = commandStr + configFile;
+ std::cout << "system: " << commandStr << std::endl;
+ system ( commandStr.c_str() );
+ }
+ //================================================================
+
+
//================================================================
void WxConsole::OnMenuCreatePackage(wxCommandEvent& WXUNUSED(event))
{
-
- wxMessageBox(_T(" Creating Package"),
- _T("Creating Package ..."), wxOK | wxICON_INFORMATION,
- this);
+ std::cout << "bbi: include CreatePackage" << std::endl;
+ Interpreter* I = new Interpreter;
+ I->InterpretFile("CreatePackage");
+ delete I;
}
//================================================================
//================================================================
void WxConsole::OnMenuCreateBlackBox(wxCommandEvent& WXUNUSED(event))
{
-
- wxMessageBox(_T(" Creating blackbox"),
- _T("Creating blackbox ..."), wxOK | wxICON_INFORMATION,
- this);
+ std::cout << "bbi: include CreateBlackBox" << std::endl;
+ Interpreter* I = new Interpreter;
+ I->InterpretFile("CreateBlackBox");
+ delete I;
}
//================================================================
//================================================================
void WxConsole::OnMenuShowImageGraph(wxCommandEvent& WXUNUSED(event))
{
- std::string default_doc_dir = ConfigurationFile::GetInstance().Get_default_temp_dir();
+ std::string default_temp_dir = ConfigurationFile::GetInstance().Get_default_temp_dir();
#if defined(WIN32)
std::string strappli="start ";
#else
std::string strappli="gnome-open ";
#endif
- std::string strcommand = strappli +default_doc_dir+"/temp_dir/workspace_workspacePrototype.png";
+ std::string strcommand = strappli +default_temp_dir+"/temp_dir/workspace_workspacePrototype.png";
+ std::cout << "system: " << strcommand << std::endl;
system ( strcommand.c_str() );
+
}
//================================================================
-
+
+ //================================================================
+ void WxConsole::OnMenuCreateIndex(wxCommandEvent& WXUNUSED(event))
+ {
+ std::string doc_path = ConfigurationFile::GetInstance().Get_doc_path();
+ std::string filepath = doc_path+"/bbdoc/make-index.bbs";
+ Interpreter* I = new Interpreter;
+
+//EED std::cout << "bbi: include "<<filepath<<std::endl;
+//EED I->InterpretFile( filepath );
+
+ bool insideComment = false; // for multiline comment
+ I->InterpretLine( "exec freeze" ,insideComment );
+ I->InterpretLine( "include *" ,insideComment );
+ I->InterpretLine( "index "+doc_path+"/bbdoc/index-alpha.html Initials" ,insideComment );
+ I->InterpretLine( "index "+doc_path+"/bbdoc/index-package.html Packages" ,insideComment );
+ I->InterpretLine( "index "+doc_path+"/bbdoc/index-category.html Categories" ,insideComment );
+ I->InterpretLine( "index "+doc_path+"/bbdoc/index-adaptors.html Adaptors",insideComment );
+
+ delete I;
+ }
+ //================================================================
+
+
+
//================================================================
void WxConsole::OnCommandChar(wxCommandEvent& event)
wxButton *btnInclude = new wxButton( btnsCtrlPanel,-1,_T("Include") );
wxButton *btnReset = new wxButton( btnsCtrlPanel,-1,_T("Reset") );
wxButton *btnConfig = new wxButton( btnsCtrlPanel,-1,_T("Config") );
- wxButton *btnGraphS = new wxButton( btnsCtrlPanel,-1,_T("Graph S.") );
- wxButton *btnGraphD = new wxButton( btnsCtrlPanel,-1,_T("Graph D.") );
+ wxButton *btnGraphS = new wxButton( btnsCtrlPanel,-1,_T("Graph simple") );
+ wxButton *btnGraphD = new wxButton( btnsCtrlPanel,-1,_T("Graph detailed") );
wxButton *btnHelp = new wxButton( btnsCtrlPanel,-1,_T("Help") );
+ btnsSizer->Add( btnInclude );
+ btnsSizer->Add( btnReset );
+ btnsSizer->Add( btnConfig );
+ btnsSizer->Add( btnGraphS );
+ btnsSizer->Add( btnGraphD );
+ btnsSizer->Add( btnHelp );
+ btnsCtrlPanel->SetSizer(btnsSizer);
+
Connect(btnInclude->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WxConsole::OnBtnInclude );
Connect(btnReset->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WxConsole::OnBtnReset );
Connect(btnConfig->GetId() , wxEVT_COMMAND_BUTTON_CLICKED , (wxObjectEventFunction) &WxConsole::OnBtnConfig );
//================================================================
void WxConsole::OnBtnReset(wxCommandEvent& event)
{
-printf("WxConsole::OnBtnReset 01 \n");
CommandString(_T("reset"));
-printf("WxConsole::OnBtnReset 02 \n");
}
//================================================================
BEGIN_EVENT_TABLE(WxConsole, wxFrame)
EVT_MENU(WxConsole::ID_Menu_Quit, WxConsole::OnMenuQuit)
EVT_MENU(WxConsole::ID_Menu_About, WxConsole::OnMenuAbout)
+ EVT_MENU(WxConsole::ID_Menu_EditConfig, WxConsole::OnMenuEditConfig)
EVT_MENU(WxConsole::ID_Menu_CreatePackage, WxConsole::OnMenuCreatePackage)
EVT_MENU(WxConsole::ID_Menu_CreateBlackBox, WxConsole::OnMenuCreateBlackBox)
EVT_MENU(WxConsole::ID_Menu_ShowImageGraph, WxConsole::OnMenuShowImageGraph)
+ EVT_MENU(WxConsole::ID_Menu_CreateIndex, WxConsole::OnMenuCreateIndex)
EVT_TEXT_ENTER(WxConsole::ID_Text_Command, WxConsole::OnCommandEnter)
- // EVT_CHAR(WxConsole::ID_Text_Command, WxConsole::OnCommandChar)
+// EVT_CHAR(WxConsole::ID_Text_Command, WxConsole::OnCommandChar)
END_EVENT_TABLE()
//================================================================
Program: bbtk
Module: $RCSfile: bbtkWxConsole.h,v $
Language: C++
- Date: $Date: 2008/03/07 11:37:48 $
- Version: $Revision: 1.7 $
+ Date: $Date: 2008/03/17 07:04:08 $
+ Version: $Revision: 1.8 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
void OnMenuQuit(wxCommandEvent& event);
void OnMenuAbout(wxCommandEvent& event);
+ void OnMenuEditConfig(wxCommandEvent& WXUNUSED(event));
void OnMenuCreatePackage(wxCommandEvent& WXUNUSED(event));
void OnMenuCreateBlackBox(wxCommandEvent& WXUNUSED(event));
void OnMenuShowImageGraph(wxCommandEvent& WXUNUSED(event));
+ void OnMenuCreateIndex(wxCommandEvent& WXUNUSED(event));
void OnBtnGo(wxCommandEvent& event);
void OnCommandEnter(wxCommandEvent& event);
void ShowHtmlPage(std::string&);
private:
+ wxAuiManager m_mgr;
Interpreter* mInterpreter;
wxTextCtrl* mwxTextHistory;
//EED wxTextCtrl* mwxTextCommand;
wxPanel* CreateBtnsCtrlPanel(wxWindow *parent);
void CommandString(wxString line );
-
public:
enum
{
ID_Menu_Quit = 1,
ID_Menu_About,
+ ID_Menu_EditConfig,
ID_Menu_CreatePackage,
ID_Menu_CreateBlackBox,
ID_Menu_ShowImageGraph,
+ ID_Menu_CreateIndex,
ID_Text_Command,
ID_Text_History,
--- /dev/null
+description "Creates the XML or C++ code for a new black box"
+author "eduardo.davila at creatis.insa-lyon.fr"
+category "toolsbbtk"
+
+load std
+load wx
+
+new OutputText windowTitle
+ set windowTitle.In "- - - - - - - - - - - - - - Create Blackbox - - - - - - - - - - - - - -"
+
+new DirectorySelector dir
+ set dir.Title "Select the location of your new package"
+
+new InputText nameBlackbox
+ set nameBlackbox.Title "Blackbox name (1 word)"
+ set nameBlackbox.In "NEW_BLACKBOX"
+
+new InputText namePackage
+ set namePackage.Title "Package name (1 word)"
+ set namePackage.In "__PACKAGE__"
+
+
+new InputText author
+ set author.Title "Author(s) (caracters '<', '>' not accepted...)"
+ set author.In "_author_"
+
+new InputText description
+ set description.Title "Description (caracters '<', '>' not accepted...)"
+ set description.In "_description_"
+
+#---------------------------------------------------------------------
+
+
+new RadioButton typeBlackbox
+ set typeBlackbox.Title "Type of the blackbox :"
+ set typeBlackbox.In0 "std-template"
+ set typeBlackbox.In1 "VTK_PolyDataAlgorithm-template"
+ set typeBlackbox.In2 "VTK_ImageAlgorithm-template"
+ set typeBlackbox.In3 "widget-template "
+
+new StringSelect stringselectorType
+ set stringselectorType.In0 "std"
+ set stringselectorType.In1 "VTK_PolyDataAlgorithm"
+ set stringselectorType.In2 "VTK_ImageAlgorithm"
+ set stringselectorType.In3 "widget"
+ connect typeBlackbox.Out stringselectorType.In
+
+#---------------------------------------------------------------------
+
+new RadioButton formatBlackbox
+ set formatBlackbox.Title "Format of the output file :"
+ set formatBlackbox.In 0
+ set formatBlackbox.In0 "C++"
+ set formatBlackbox.In1 "XML"
+
+new StringSelect stringselectorFormat
+ set stringselectorFormat.In0 "C++"
+ set stringselectorFormat.In1 "XML"
+ connect formatBlackbox.Out stringselectorFormat.In
+
+#---------------------------------------------------------------------
+
+new LayoutLine layoutHor
+ set layoutHor.Orientation H
+ connect typeBlackbox.Widget layoutHor.Widget1
+ connect formatBlackbox.Widget layoutHor.Widget2
+
+new LayoutLine info
+ connect windowTitle.Widget info.Widget1
+ connect nameBlackbox.Widget info.Widget2
+ connect namePackage.Widget info.Widget3
+ connect author.Widget info.Widget4
+ connect description.Widget info.Widget5
+ connect layoutHor.Widget info.Widget6
+ set info.WinDialog true
+ set info.WinWidth 350
+ set info.WinHeight 500
+exec info
+
+
+#---------------------------------------------------------------------
+
+new ConcatStrings dirStr
+ connect dir.Out dirStr.In1
+ set dirStr.In2 " "
+
+new ConcatStrings packageNameStr
+ connect namePackage.Out packageNameStr.In1
+ set packageNameStr.In2 " "
+
+new ConcatStrings blackboxNameStr
+ connect nameBlackbox.Out blackboxNameStr.In1
+ set blackboxNameStr.In2 " "
+
+new ConcatStrings typeStr
+ connect stringselectorType.Out typeStr.In1
+ set typeStr.In2 " "
+
+new ConcatStrings formatStr
+ connect stringselectorFormat.Out formatStr.In1
+ set formatStr.In2 " "
+
+new ConcatStrings authorStr
+ connect author.Out authorStr.In1
+ set authorStr.In2 " "
+
+new ConcatStrings descriptionStr
+ connect description.Out descriptionStr.In1
+ set descriptionStr.In2 " "
+
+new Configuration conf
+
+new ConcatStrings commandStr
+ set commandStr.In1 "."
+ connect conf.FileSeparator commandStr.In2
+ set commandStr.In3 "bbCreateBlackBox "
+
+new ConcatStrings concatStr
+ connect commandStr.Out concatStr.In1
+ connect dirStr.Out concatStr.In2
+ connect packageNameStr.Out concatStr.In3
+ connect blackboxNameStr.Out concatStr.In4
+ connect typeStr.Out concatStr.In5
+ connect formatStr.Out concatStr.In6
+ connect authorStr.Out concatStr.In7
+ connect descriptionStr.Out concatStr.In8
+
+
+new ExecSystemCommand command
+ connect concatStr.Out command.In
+ print $concatStr.Out$
+
+exec command
+
+#seg fault :
+#quit
\ No newline at end of file
+++ /dev/null
-description "Creates the XML or C++ code for a new black box"
-author "laurent.guigues at creatis.insa-lyon.fr"
-category "bbtk tool"
-
-print "Not implemented yet !!!"
load wx
load std
+new OutputText windowTitle
+ set windowTitle.In "- - - - - - - - - - - - - - Create Blackbox - - - - - - - - - - - - - -"
+
new DirectorySelector dir
-set dir.Title "Select the location of your new package"
+ set dir.Title "Select the location of your new package"
new InputText name
-set name.Title "Name"
-set name.In "NEW_PACKAGE"
+ set name.Title "Name (1 word)"
+ set name.In "NEW_PACKAGE"
new InputText author
-set author.Title "Author(s)"
-set author.In "<author>"
+ set author.Title "Author(s) (caracters '<', '>' not accepted...)"
+ set author.In "_author_"
new InputText description
-set description.Title "Description"
-set description.In "<description>"
+ set description.Title "Description (caracters '<', '>' not accepted...)"
+ set description.In "_description_"
new LayoutLine info
-connect name.Widget info.Widget1
-connect author.Widget info.Widget2
-connect description.Widget info.Widget3
-
-set info.WinDialog true
+ connect windowTitle.Widget info.Widget1
+ connect name.Widget info.Widget2
+ connect author.Widget info.Widget3
+ connect description.Widget info.Widget4
+ set info.WinDialog true
+ set info.WinWidth 400
+ set info.WinHeight 250
exec info
+
+new Configuration conf
+new ConcatStrings concatStrCommand
+ set concatStrCommand.In1 "."
+ connect conf.FileSeparator concatStrCommand.In2
+ set concatStrCommand.In3 "bbCreatePackage "
new ConcatStrings concatStr
-set concatStr.In1 "./bbCreatePackage "
-connect dir.Out concatStr.In2
-set concatStr.In3 " "
-connect name.Out concatStr.In4
-set concatStr.In5 " '"
-connect author.Out concatStr.In6
-set concatStr.In7 "' '"
-connect description.Out concatStr.In8
-set concatStr.In9 "'"
+ connect concatStrCommand.Out concatStr.In1
+ connect dir.Out concatStr.In2
+ set concatStr.In3 " "
+ connect name.Out concatStr.In4
+ set concatStr.In5 " '"
+ connect author.Out concatStr.In6
+ set concatStr.In7 "' '"
+ connect description.Out concatStr.In8
+ set concatStr.In9 "'"
new ExecSystemCommand command
-connect concatStr.Out command.In
-print $concatStr.Out$
+ connect concatStr.Out command.In
+ print $concatStr.Out$
+
exec command
+
#seg fault :
#quit
Program: bbtk
Module: $RCSfile: bbwxDirectorySelector.cxx,v $
Language: C++
- Date: $Date: 2008/02/15 13:52:44 $
- Version: $Revision: 1.2 $
+ Date: $Date: 2008/03/17 07:04:09 $
+ Version: $Revision: 1.3 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
bbtk::std2wx(bbGetInputMessage()),
bbtk::std2wx(bbGetInputDefaultDir()));
- FD->ShowModal();
-
- if (FD->GetReturnCode()==wxID_OK)
+ if (FD->ShowModal()==wxID_OK)
{
bbSetOutputOut( bbtk::wx2std (FD->GetPath()) );
bbSetInputDefaultDir( bbtk::wx2std (FD->GetPath()) );
category "example"
## THE APPLICATION BOX
-include /home/guigues/coding/Sofa/bbtk/packages/wxvtk/bbs/boxes/bbBasicImageApplication
-#include wxvtk/boxes/bbBasicImageApplication
+include wxvtk/boxes/bbBasicImageApplication
new BasicImageApplication appli
set appli.WinTitle "ExampleBasicImageApplication"