1 /* === S Y N F I G ========================================================= */
2 /*! \file uimanager.cpp
3 ** \brief Template File
5 ** $Id: uimanager.cpp,v 1.1.1.1 2005/01/07 03:34:37 darco Exp $
8 ** Copyright (c) 2002 Robert B. Quattlebaum Jr.
10 ** This software and associated documentation
11 ** are CONFIDENTIAL and PROPRIETARY property of
12 ** the above-mentioned copyright holder.
14 ** You may not copy, print, publish, or in any
15 ** other way distribute this software without
16 ** a prior written agreement with
17 ** the copyright holder.
20 /* ========================================================================= */
22 /* === H E A D E R S ======================================================= */
31 #include "uimanager.h"
37 /* === U S I N G =========================================================== */
41 using namespace synfig;
42 using namespace synfigapp;
44 /* === M A C R O S ========================================================= */
46 /* === M E T H O D S ======================================================= */
49 ConsoleUIInterface::yes_no(const std::string &title, const std::string &message,Response dflt)
51 cout<<title<<": "<<message<<' ';
53 cout<<_("(no/yes)")<<endl;
55 cout<<_("(yes/no)")<<endl;
76 ConsoleUIInterface::yes_no_cancel(const string &title, const string &message,Response dflt)
78 cout<<title<<": "<<message<<' ';
80 cout<<_("(no/yes)")<<endl;
82 cout<<_("(yes/no)")<<endl;
102 UIInterface::Response
103 ConsoleUIInterface::ok_cancel(const std::string &title, const std::string &message,Response dflt)
105 cout<<title<<": "<<message<<' ';
106 if(dflt==RESPONSE_CANCEL)
107 cout<<_("(cancel/ok)")<<endl;
109 cout<<_("(ok/cancel)")<<endl;
113 if(dflt==RESPONSE_CANCEL)
118 return RESPONSE_CANCEL;
123 return RESPONSE_CANCEL;
130 ConsoleUIInterface::task(const std::string &task)
137 ConsoleUIInterface::error(const std::string &task)
139 cout<<_("error: ")<<task<<endl;
144 ConsoleUIInterface::warning(const std::string &task)
146 cout<<_("warning: ")<<task<<endl;
151 ConsoleUIInterface::amount_complete(int current, int total)