if(firstTime == true)
{
+ firstTime = false;
if(bbGetInputIn1() != NULL)
{
bbSetOutputOut(bbGetInputIn1());
- firstTime = false;
- }
- else if(bbGetInputIn2() != NULL)
- {
+ } else if(bbGetInputIn2() != NULL) {
bbSetOutputOut(bbGetInputIn2());
- firstTime = false;
}
}
-
+
if(myTimer == NULL)
{
myTimer = new MyTimer(this);
if(!_on)
{
myTimer->Stop();
- }
- else if(!myTimer->IsRunning())
- {
+ } else if(!myTimer->IsRunning()) {
myTimer->Start(time);
oldTime = time;
- }
- else if(oldTime != time)
- {
+ } else if(oldTime != time) {
myTimer->Stop();
myTimer->Start(time);
oldTime=time;
}
}
+
+
void ImageSwitcherBox::CreateWidget(wxWindow* parent)
{
//Creates a simple text widget because it is necesary that a non-empty widget exists for creatingh the thread of the timer.
bbSetOutputWidget( new wxStaticText(parent, -1, _T("Image Switcher")) );
}
+
+
void ImageSwitcherBox::bbUserSetDefaultValues()
{
- myTimer = NULL;
- change = false;
- time = 500;
- oldTime = 500;
- firstTime = true;
- _on=false;
+ myTimer = NULL;
+ change = false;
+ time = 150;
+ oldTime = 150;
+ bbSetInputTime(time);
+ firstTime = true;
+ _on = false;
}
void ImageSwitcherBox::bbUserInitializeProcessing()
{
-
}
+
void ImageSwitcherBox::bbUserFinalizeProcessing()
{
myTimer->Stop();
delete myTimer;
}
-}
-// EO namespace bbPackRecalage
+
+} // EO namespace bbPackRecalage