1 /* === S Y N F I G ========================================================= */
3 ** \brief User Interface Manager Class
5 ** $Id: uimanager.h,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 /* === S T A R T =========================================================== */
24 #ifndef __SYNFIG_APP_UIMANAGER_H
25 #define __SYNFIG_APP_UIMANAGER_H
27 /* === H E A D E R S ======================================================= */
30 #include <synfig/general.h>
31 #include <synfig/string.h>
32 #include <sigc++/object.h>
34 /* === M A C R O S ========================================================= */
36 /* === T Y P E D E F S ===================================================== */
38 /* === C L A S S E S & S T R U C T S ======================================= */
42 class UIInterface : public etl::shared_object, public synfig::ProgressCallback, public sigc::trackable
52 virtual ~UIInterface() { }
53 virtual Response yes_no(const std::string &title, const std::string &message,Response dflt=RESPONSE_YES)=0;
54 virtual Response yes_no_cancel(const std::string &title, const std::string &message,Response dflt=RESPONSE_YES)=0;
55 virtual Response ok_cancel(const std::string &title, const std::string &message,Response dflt=RESPONSE_OK)=0;
58 class DefaultUIInterface : public UIInterface
61 Response yes_no(const std::string &title, const std::string &message,Response dflt)
63 Response yes_no_cancel(const std::string &title, const std::string &message,Response dflt)
65 Response ok_cancel(const std::string &title, const std::string &message,Response dflt)
68 bool task(const std::string &task)
70 bool error(const std::string &task)
72 bool warning(const std::string &task)
74 bool amount_complete(int current, int total)
78 class ConfidentUIInterface : public UIInterface
81 Response yes_no(const std::string &title, const std::string &message,Response dflt)
82 { return RESPONSE_YES; }
83 Response yes_no_cancel(const std::string &title, const std::string &message,Response dflt)
84 { return RESPONSE_YES; }
85 Response ok_cancel(const std::string &title, const std::string &message,Response dflt)
86 { return RESPONSE_OK; }
88 bool task(const std::string &task)
90 bool error(const std::string &task)
92 bool warning(const std::string &task)
94 bool amount_complete(int current, int total)
98 class ConsoleUIInterface : public UIInterface
101 Response yes_no(const std::string &title, const std::string &message,Response dflt);
102 Response yes_no_cancel(const std::string &title, const std::string &message,Response dflt);
103 Response ok_cancel(const std::string &title, const std::string &message,Response dflt);
105 bool task(const std::string &task);
106 bool error(const std::string &task);
107 bool warning(const std::string &task);
108 bool amount_complete(int current, int total);
111 }; // END of namespace synfigapp
113 /* === E N D =============================================================== */