Skip to content
Snippets Groups Projects
Commit cd406389 authored by Julien Michel's avatar Julien Michel
Browse files

TEST: (Visu Refactoring) Adding a widget controller

parent fdd7383e
No related branches found
No related tags found
No related merge requests found
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#include "otbImageWidgetController.h"
#include "otbImageWidgetActionHandler.h"
int otbImageWidgetController( int argc, char * argv[] )
{
// Typedefs
typedef otb::ImageWidgetController ControllerType;
typedef otb::ImageWidgetActionHandler ActionHandlerType;
// Instantiate the controller
ControllerType::Pointer controller = ControllerType::New();
// Adding three action handler
controller->AddActionHandler(ActionHandlerType::New());
controller->AddActionHandler(ActionHandlerType::New());
controller->AddActionHandler(ActionHandlerType::New());
// Clearing
controller->ClearAllActionHandlers();
// Adding three handlers again
controller->AddActionHandler(ActionHandlerType::New());
controller->AddActionHandler(ActionHandlerType::New());
controller->AddActionHandler(ActionHandlerType::New());
// Remove the third
controller->RemoveActionHandler(2);
// Simulate an event from a widget
controller->HandleWidgetEvent("default",10);
// Simulate a resize from a widget
controller->HandleWidgetResize("default",0,0,0,0);
return EXIT_SUCCESS;
}
/*=========================================================================
Program: ORFEO Toolbox
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#include "otbImageWidgetController.h"
int otbImageWidgetControllerNew( int argc, char * argv[] )
{
typedef otb::ImageWidgetController ControllerType;
ControllerType::Pointer controller = ControllerType::New();
return EXIT_SUCCESS;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment