/** * @file include/ActivMiddleware/ActivAgentApplication/UiStandardMainComponent.h * * @brief Header file for standard-style main ui component. */ #if (!defined ACTIV_AGENT_APPLICATION_UI_STANDARD_MAIN_COMPONENT_H) #define ACTIV_AGENT_APPLICATION_UI_STANDARD_MAIN_COMPONENT_H #include "ActivMiddleware/ActivAgentApplication/External.h" #include "ActivMiddleware/ActivAgentApplication/UiMainComponent.h" #include "ActivMiddleware/ActivAgentApplication/AgentApplication.h" //! Activ namespace. namespace Activ { /** * @brief Standard main menu component. */ class UiStandardMainComponent : public Activ::UiMainComponent { public: /** * @brief Lite main menu. */ class UiMenu : public UiMainComponent::UiMenu { public: /** * @brief Constructor. * * @param uiComponent * @param name * @param uiUser */ ACTIV_AGENT_APPLICATION_API UiMenu(UiMainComponent &uiComponent, const String &name, UiUser &uiUser); protected: ACTIV_AGENT_APPLICATION_API virtual void DisplayFooter(const UiIo &uiIo) const ACTIV_OVERRIDE; }; /** * @brief Constructor. * * @param application AgentApplication to attach to. * @param managedEndPoint endpoint to attach to - must be singly threaded. * @param uiComponentName name of the ui component. This name is used to register the component with the main menu. * @param uiServiceName name of the ui service. * * @throw Exception. */ ACTIV_AGENT_APPLICATION_API UiStandardMainComponent(AgentApplication &application, ManagedEndPoint &managedEndPoint, const String &uiComponentName, const String &uiServiceName = Application::GetUiServiceName()); ACTIV_AGENT_APPLICATION_API virtual void Run(UiUser &uiUser) ACTIV_OVERRIDE; protected: ACTIV_AGENT_APPLICATION_API virtual bool IsValidRegistrationType(const UnderlyingType type) const ACTIV_OVERRIDE; }; } // namespace Activ #endif // (!defined ACTIV_AGENT_APPLICATION_UI_STANDARD_MAIN_COMPONENT_H)