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-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"
38 /* === U S I N G =========================================================== */
42 using namespace synfig;
43 using namespace synfigapp;
45 /* === M A C R O S ========================================================= */
47 /* === M E T H O D S ======================================================= */
50 ConsoleUIInterface::yes_no(const std::string &title, const std::string &message,Response dflt)
52 cout<<title<<": "<<message<<' ';
54 cout<<_("(no/yes)")<<endl;
56 cout<<_("(yes/no)")<<endl;
77 ConsoleUIInterface::yes_no_cancel(const string &title, const string &message,Response dflt)
79 cout<<title<<": "<<message<<' ';
81 cout<<_("(no/yes)")<<endl;
83 cout<<_("(yes/no)")<<endl;
103 UIInterface::Response
104 ConsoleUIInterface::ok_cancel(const std::string &title, const std::string &message,Response dflt)
106 cout<<title<<": "<<message<<' ';
107 if(dflt==RESPONSE_CANCEL)
108 cout<<_("(cancel/ok)")<<endl;
110 cout<<_("(ok/cancel)")<<endl;
114 if(dflt==RESPONSE_CANCEL)
119 return RESPONSE_CANCEL;
124 return RESPONSE_CANCEL;
131 ConsoleUIInterface::task(const std::string &task)
138 ConsoleUIInterface::error(const std::string &task)
140 cout<<_("error: ")<<task<<endl;
145 ConsoleUIInterface::warning(const std::string &task)
147 cout<<_("warning: ")<<task<<endl;
152 ConsoleUIInterface::amount_complete(int current, int total)