1 /* === S Y N F I G ========================================================= */
2 /*! \file uimanager.cpp
3 ** \brief Template File
8 ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
10 ** This package is free software; you can redistribute it and/or
11 ** modify it under the terms of the GNU General Public License as
12 ** published by the Free Software Foundation; either version 2 of
13 ** the License, or (at your option) any later version.
15 ** This package is distributed in the hope that it will be useful,
16 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ** General Public License for more details.
21 /* ========================================================================= */
23 /* === H E A D E R S ======================================================= */
32 #include "uimanager.h"
40 /* === U S I N G =========================================================== */
44 using namespace synfig;
45 using namespace synfigapp;
47 /* === M A C R O S ========================================================= */
49 /* === M E T H O D S ======================================================= */
52 ConsoleUIInterface::yes_no(const std::string &title, const std::string &message,Response dflt)
54 cout<<title<<": "<<message<<' ';
56 cout<<_("(no/yes)")<<endl;
58 cout<<_("(yes/no)")<<endl;
79 ConsoleUIInterface::yes_no_cancel(const std::string &title, const std::string &message, Response dflt)
81 cout<<title<<": "<<message<<' ';
83 cout<<_("(no/yes)")<<endl;
85 cout<<_("(yes/no)")<<endl;
105 UIInterface::Response
106 ConsoleUIInterface::ok_cancel(const std::string &title, const std::string &message,Response dflt)
108 cout<<title<<": "<<message<<' ';
109 if(dflt==RESPONSE_CANCEL)
110 cout<<_("(cancel/ok)")<<endl;
112 cout<<_("(ok/cancel)")<<endl;
116 if(dflt==RESPONSE_CANCEL)
121 return RESPONSE_CANCEL;
126 return RESPONSE_CANCEL;
133 ConsoleUIInterface::task(const std::string &task)
140 ConsoleUIInterface::error(const std::string &task)
142 cout<<_("error: ")<<task<<endl;
147 ConsoleUIInterface::warning(const std::string &task)
149 cout<<_("warning: ")<<task<<endl;
154 ConsoleUIInterface::amount_complete(int /*current*/, int /*total*/)