Program: bbtk
Module: $RCSfile: bbtkInterpreter.cxx,v $
Language: C++
- Date: $Date: 2008/12/12 12:11:21 $
- Version: $Revision: 1.79 $
+ Date: $Date: 2008/12/12 12:56:28 $
+ Version: $Revision: 1.80 $
=========================================================================*/
/* ---------------------------------------------------------------------
void Interpreter::InterpretLine( const std::string& line, bool &insideComment )
{
bbtkDebugMessageInc("Interpreter",9,"Interpreter::InterpretLine(\""<<line<<"\")"<<std::endl);
- bbtkMessage("echo",2,line<<std::endl);
std::vector<std::string> words;
SplitLine(line,words);
int level=0;
std::string left,right,left2,right2;
std::string filename;
+ if (command.code==cMessage)
+ {
+ if (words.size()<3)
+ {
+ mVirtualExecuter->HelpMessages();
+ }
+ else
+ {
+ sscanf(words[2].c_str(),"%d",&level);
+ mVirtualExecuter->SetMessageLevel(words[1],level);
+ }
+ }
+ else
+ {
+ bbtkMessage("echo",2,line<<std::endl);
+ }
+
switch (command.code)
{
+ case cMessage :
+
+ break;
case cNew :
mVirtualExecuter->Create(words[1],words[2]);
break;
Help(words);
break;
- case cMessage :
- if (words.size()<3)
- {
- mVirtualExecuter->HelpMessages();
- }
- else
- {
- sscanf(words[2].c_str(),"%d",&level);
- mVirtualExecuter->SetMessageLevel(words[1],level);
- }
- break;
case cGraph :
Graph(words);
Program: bbtk
Module: $RCSfile: bbtkWxBlackBox.cxx,v $
Language: C++
- Date: $Date: 2008/12/11 09:50:35 $
- Version: $Revision: 1.35 $
+ Date: $Date: 2008/12/12 12:56:28 $
+ Version: $Revision: 1.36 $
=========================================================================*/
/* ---------------------------------------------------------------------
bbtkDebugMessage("wx",9,"WxBlackBoxWindow::bbShow()"<<std::endl);
Wx::IncNbWindowsShown();
mShown = true;
+ if (bbGetBlackBox()) bbGetBlackBox()->bbUserOnShow();
}
//=========================================================================
bbtkDebugMessage("wx",5,"WxBlackBoxFrame::bbShow("
<<bbGetBlackBox()->bbGetFullName()<<")"<<std::endl);
WxBlackBoxWindow::bbShow();
- wxFrame::Show();
+ wxFrame::Show();
// This Update is ** MANDATORY **
// to synchronize wxvtkRenderWindowInteractor objects
// (force wx objects creation **NOW**)
-
-
+
+
#if defined(_WIN32)
- wxFrame::Refresh();
+ wxFrame::Refresh();
#endif
-
- wxFrame::Update();
- wxFrame::SetFocus();
- if (bbGetBlackBox()) bbGetBlackBox()->bbUserOnShow();
+
+ wxFrame::Update();
+ wxFrame::SetFocus();
+ // if (bbGetBlackBox()) bbGetBlackBox()->bbUserOnShow();
}
//=========================================================================
include wx
#==================================================================
print " "
-print "===================================================="
+print "============================"
print "A Slider whose output is plugged into an OutputText"
message echo 2
message echo 0
clear
print " "
-print "===================================================="
+print "============================"
print "Splitting a window into two adjustable parts"
#==================================================================
message echo 2
new LayoutSplit main
-set main.WinDialog true
+set main.WinDialog true
exec main
#==================================================================
Program: bbtk
Module: $RCSfile: bbwxLayoutSplit.cxx,v $
Language: C++
- Date: $Date: 2008/11/24 15:45:51 $
- Version: $Revision: 1.8 $
+ Date: $Date: 2008/12/12 12:56:33 $
+ Version: $Revision: 1.9 $
=========================================================================*/
/* ---------------------------------------------------------------------
// when window is shown
void LayoutSplit::OnShowWidget()
{
+ // std::cout << "LayoutSplit::OnShowWidget()" << std::endl;
if (bbGetOutputWidget()==0)
{
return;
description "Simple viewer displaying the same slice of two images. The slice is controlled by a slider. See <a href='#exampleDoubleSlicer'>exampleDoubleSlicer.bbs</a>."
author "laurent.guigues at creatis.insa-lyon.fr"
- new LayoutLine main
+ new LayoutSplit main
new LayoutLine slicers
new Viewer2D slicer1
new Viewer2D slicer2
new Slider slider
+ set main.Proportion 80
+ set slicers.Orientation HORIZONTAL
+
connect slicers.Widget main.Widget1
connect slicer1.Widget slicers.Widget1
connect slicer2.Widget slicers.Widget2
input In1 slicer1.In "Left (or top) image"
input In2 slicer2.In "Right (or bottom) image"
+ input WinDialog main.WinDialog "Execute in dialog mode"
input WinTitle main.WinTitle "Title of the window"
input WinWidth main.WinWidth "Width of the window"
input WinHeight main.WinHeight "Width of the window"
#set main.Proportion 80
input In viewer2D.In "Input image"
+ input WinDialog main.WinDialog "Execute in dialog mode"
input WinTitle main.WinTitle "Title of the window"
input WinWidth main.WinWidth "Width of the window"
input WinHeight main.WinHeight "Height of the window"