// SPDX-License-Identifier: GPL-2.0-or-later /** @file * @brief Object for managing a set of dialogs, including their signals and * construction/caching/destruction of them. */ /* Author: * Bryce W. Harrington * Jon Phillips * * Copyright (C) 2004, 2005 Authors * * Released under GNU GPL v2+, read the file 'COPYING' for more information. */ #ifndef INKSCAPE_UI_DIALOG_MANAGER_H #define INKSCAPE_UI_DIALOG_MANAGER_H #include "dialog.h" #include namespace Inkscape { namespace UI { namespace Dialog { class DialogManager { public: typedef Dialog *(*DialogFactory)(); DialogManager(); virtual ~DialogManager(); static DialogManager &getInstance(); // sigc::signal show_dialogs; // sigc::signal show_f12; // sigc::signal hide_dialogs; // sigc::signal hide_f12; // sigc::signal transientize; /* generic dialog management start */ typedef std::map FactoryMap; typedef std::map DialogMap; void registerFactory(gchar const *name, DialogFactory factory); void registerFactory(GQuark name, DialogFactory factory); Dialog *getDialog(gchar const* dlgName); Dialog *getDialog(GQuark dlgName); void showDialog(gchar const *name, bool grabfocus=true); void showDialog(GQuark name, bool grabfocus=true); protected: DialogManager(DialogManager const &d); // no copy DialogManager& operator=(DialogManager const &d); // no assign FactoryMap _factory_map; //< factories to create dialogs DialogMap _dialog_map; //< map of already created dialogs }; } // namespace Dialog } // namespace UI } // namespace Inkscape #endif //INKSCAPE_UI_DIALOG_MANAGER_H /* Local Variables: mode:c++ c-file-style:"stroustrup" c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) indent-tabs-mode:nil fill-column:99 End: */ // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :