/********************************************************************
*
* Created: 24/3/2014 12:15
*
* File: fsCConfirmBoxGui.h
*
* Author: Mick Waites
*
* Purpose: Displays a message box with Yes/No buttons.
*
*********************************************************************/
#ifndef fsCConfirmBoxGuihdr
#define fsCConfirmBoxGuihdr
#include <fsCore/src/fsCUniqueId.h>
#include "fsIGuiComponent.h"
class fsCEntity;
class fsINode;
class fsCConfirmBoxGui : public fsIGuiComponent
{
friend class fsCComponentFactory;
friend class fsIDebug;
public:
static const fsCUniqueId mEventConfirmYesMsg;
static const fsCUniqueId mEventConfirmNoMsg;
static fsCEntity* okBoxCreate(fsINode* pParent, const fsStr& pMessageStr);
static fsCEntity* debugOkBoxCreate(fsINode* pParent, const fsStr& pMessageStr);
static fsCEntity* confirmBoxCreate(fsINode* pParent, const fsStr& pMessageStr);
static const fsCUniqueId mTypeId;
fsStr messageTextGet() const;
protected:
static fsIComponent* create(fsCEntity* pParent);
fsBool onButtonClicked(fsCButtonComponent* pButtonComp) override;
fsCConfirmBoxGui(fsCEntity* pParent);
virtual ~fsCConfirmBoxGui();<--- Destructor in derived class
private:
static void messageTextSet(fsCEntity* pMessageBox, const fsStr& pMessageStr);
};
#endif