X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftags%2Fsynfigstudio_%40VERSION_MAJ%40_%40VERSION_MIN%40_%40VERSION_REV%40%2Fsrc%2Fsynfigapp%2Fuimanager.h;fp=synfig-studio%2Ftags%2Fsynfigstudio_%40VERSION_MAJ%40_%40VERSION_MIN%40_%40VERSION_REV%40%2Fsrc%2Fsynfigapp%2Fuimanager.h;h=0000000000000000000000000000000000000000;hb=aadb96df9b7cc6aaad86946cb009f2ee76398349;hp=d5cfbb8f3c119e4ed1d8ce8c09a99b4db636102b;hpb=7709250e1d6a698bdd72253219c498bf5b24e7f1;p=synfig.git diff --git a/synfig-studio/tags/synfigstudio_@VERSION_MAJ@_@VERSION_MIN@_@VERSION_REV@/src/synfigapp/uimanager.h b/synfig-studio/tags/synfigstudio_@VERSION_MAJ@_@VERSION_MIN@_@VERSION_REV@/src/synfigapp/uimanager.h deleted file mode 100644 index d5cfbb8..0000000 --- a/synfig-studio/tags/synfigstudio_@VERSION_MAJ@_@VERSION_MIN@_@VERSION_REV@/src/synfigapp/uimanager.h +++ /dev/null @@ -1,116 +0,0 @@ -/* === S Y N F I G ========================================================= */ -/*! \file uimanager.h -** \brief User Interface Manager Class -** -** $Id$ -** -** \legal -** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley -** -** This package is free software; you can redistribute it and/or -** modify it under the terms of the GNU General Public License as -** published by the Free Software Foundation; either version 2 of -** the License, or (at your option) any later version. -** -** This package is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** General Public License for more details. -** \endlegal -*/ -/* ========================================================================= */ - -/* === S T A R T =========================================================== */ - -#ifndef __SYNFIG_APP_UIMANAGER_H -#define __SYNFIG_APP_UIMANAGER_H - -/* === H E A D E R S ======================================================= */ - -#include -#include -#include -#include - -/* === M A C R O S ========================================================= */ - -/* === T Y P E D E F S ===================================================== */ - -/* === C L A S S E S & S T R U C T S ======================================= */ - -namespace synfigapp { - -class UIInterface : public etl::shared_object, public synfig::ProgressCallback, public sigc::trackable -{ -public: - enum Response - { - RESPONSE_CANCEL=-1, - RESPONSE_NO=0, - RESPONSE_YES=1, - RESPONSE_OK=2 - }; - virtual ~UIInterface() { } - 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 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) - { return dflt; } - Response ok_cancel(const std::string &/*title*/, const std::string &/*message*/,Response dflt) - { return dflt; } - - bool task(const std::string &/*task*/) - { return true; } - bool error(const std::string &/*task*/) - { return true; } - bool warning(const std::string &/*task*/) - { return true; } - bool amount_complete(int /*current*/, int /*total*/) - { return true; } -}; - -class ConfidentUIInterface : public UIInterface -{ -public: - 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*/) - { return RESPONSE_YES; } - Response ok_cancel(const std::string &/*title*/, const std::string &/*message*/,Response /*dflt*/) - { return RESPONSE_OK; } - - bool task(const std::string &/*task*/) - { return true; } - bool error(const std::string &/*task*/) - { return true; } - bool warning(const std::string &/*task*/) - { return true; } - bool amount_complete(int /*current*/, int /*total*/) - { return true; } -}; - -class ConsoleUIInterface : public UIInterface -{ -public: - 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); - - bool task(const std::string &task); - bool error(const std::string &task); - bool warning(const std::string &task); - bool amount_complete(int current, int total); -}; - -}; // END of namespace synfigapp - -/* === E N D =============================================================== */ - -#endif