64 lines
1.8 KiB
C++
64 lines
1.8 KiB
C++
/**
|
|
* @file include/ActivMiddleware/ActivAgentApplication/UiLiteMainComponent.h
|
|
*
|
|
* @brief Header file for lite-style main ui component.
|
|
*/
|
|
|
|
#if (!defined ACTIV_AGENT_APPLICATION_UI_LITE_MAIN_COMPONENT_H)
|
|
#define ACTIV_AGENT_APPLICATION_UI_LITE_MAIN_COMPONENT_H
|
|
|
|
#include "ActivMiddleware/ActivAgentApplication/External.h"
|
|
#include "ActivMiddleware/ActivAgentApplication/UiMainComponent.h"
|
|
|
|
//! Activ namespace.
|
|
namespace Activ
|
|
{
|
|
|
|
/**
|
|
* @brief "Lite" main ui component.
|
|
*/
|
|
class UiLiteMainComponent : public 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 DisplayTitle(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 UiLiteMainComponent(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_LITE_MAIN_COMPONENT_H)
|