1 #include "bbPackRecalageImageSwitcherBox.h"
2 #include "bbPackRecalagePackage.h"
3 namespace bbPackRecalage
5 MyTimer::MyTimer(ImageSwitcherBox *box): wxTimer()
15 void MyTimer::Notify()
17 //This will be called each time the timer finishes a countdown
19 _box->bbSignalOutputModification(std::string("Out"));
22 BBTK_ADD_BLACK_BOX_TO_PACKAGE(PackRecalage,ImageSwitcherBox)
23 BBTK_BLACK_BOX_IMPLEMENTATION(ImageSwitcherBox,bbtk::WxBlackBox);
25 void ImageSwitcherBox::Change()
27 //Just changes the images each time the timer finishes a countdown
31 bbSetOutputOut(bbGetInputIn2());
36 bbSetOutputOut(bbGetInputIn1());
41 void ImageSwitcherBox::Process()
43 time = bbGetInputTime();
48 if(bbGetInputIn1() != NULL)
50 bbSetOutputOut(bbGetInputIn1());
53 else if(bbGetInputIn2() != NULL)
55 bbSetOutputOut(bbGetInputIn2());
62 myTimer = new MyTimer(this);
71 else if(!myTimer->IsRunning())
76 else if(oldTime != time)
83 void ImageSwitcherBox::CreateWidget(wxWindow* parent)
85 //Creates a simple text widget because it is necesary that a non-empty widget exists for creatingh the thread of the timer.
86 bbSetOutputWidget( new wxStaticText(parent, -1, _T("Image Switcher")) );
88 void ImageSwitcherBox::bbUserSetDefaultValues()
97 void ImageSwitcherBox::bbUserInitializeProcessing()
101 void ImageSwitcherBox::bbUserFinalizeProcessing()
107 // EO namespace bbPackRecalage