RESPONSE_OK=2
};
virtual ~UIInterface() { }
+ virtual Response confirmation(const std::string &title, const std::string &primaryText,
+ const std::string &secondaryText, const std::string &confirmPhrase,
+ const std::string &cancelPhrase, Response dflt=RESPONSE_OK)=0;
virtual Response yes_no(const std::string &title, const std::string &message,Response dflt=RESPONSE_YES)=0;
virtual Response yes_no_cancel(const std::string &title, const std::string &message,Response dflt=RESPONSE_YES)=0;
virtual Response ok_cancel(const std::string &title, const std::string &message,Response dflt=RESPONSE_OK)=0;
class DefaultUIInterface : public UIInterface
{
public:
+ Response confirmation(const std::string &/*title*/, const std::string &/*primaryText*/,
+ const std::string &/*secondaryText*/, const std::string &/*confirmPhrase*/,
+ const std::string &/*cancelPhrase*/, Response dflt)
+ { return dflt; }
Response yes_no(const std::string &/*title*/, const std::string &/*message*/,Response dflt)
{ return dflt; }
Response yes_no_cancel(const std::string &/*title*/, const std::string &/*message*/,Response dflt)
class ConfidentUIInterface : public UIInterface
{
public:
+ Response confirmation(const std::string &/*title*/, const std::string &/*primaryText*/,
+ const std::string &/*secondaryText*/, const std::string &/*confirmPhrase*/,
+ const std::string &/*cancelPhrase*/, Response /*dflt*/)
+ { return RESPONSE_OK; }
Response yes_no(const std::string &/*title*/, const std::string &/*message*/,Response /*dflt*/)
{ return RESPONSE_YES; }
Response yes_no_cancel(const std::string &/*title*/, const std::string &/*message*/,Response /*dflt*/)
class ConsoleUIInterface : public UIInterface
{
public:
+ Response confirmation(const std::string &title, const std::string &primaryText,
+ const std::string &secondaryText, const std::string &confirmPhrase,
+ const std::string &cancelPhrase, Response dflt);
Response yes_no(const std::string &title, const std::string &message,Response dflt);
Response yes_no_cancel(const std::string &title, const std::string &message,Response dflt);
Response ok_cancel(const std::string &title, const std::string &message,Response dflt);