1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * "Save document as template" dialog
5 * Authors: see git history
7 * Copyright (C) 2017 Authors
8 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
10 #ifndef INKSCAPE_SEEN_UI_DIALOG_SAVE_TEMPLATE_H
11 #define INKSCAPE_SEEN_UI_DIALOG_SAVE_TEMPLATE_H
13 #include <gtkmm/dialog.h>
14 #include <glibmm/i18n.h>
15 #include <gtkmm/entry.h>
16 #include <gtkmm/sizegroup.h>
17 #include <ui/operation-blocker.h>
19 #include "ui/widget/document-templates.h"
20 #include "ui/widget/ink-spin-button.h"
22 namespace Inkscape::UI::Dialog
{
24 class SaveTemplate
: Gtk::Dialog
{
26 SaveTemplate(Gtk::Window
& parent
);
28 static void save_document_as_template(Gtk::Window
&parentWindow
);
31 void update_save_widgets();
32 void save_template(Gtk::Window
&parent
);
35 Gtk::CheckButton _set_as_default
{_("Set as default template")};
36 Gtk::Label _name
{_("_Name"), true};
38 Gtk::Label _desc_label
{_("_Description"), true};
39 Gtk::Entry _description
;
40 UI::Widget::DocumentTemplates _list
;
41 Gtk::Button _save
{_("Save")};
42 Gtk::Button _cancel
{_("Cancel")};
43 Glib::RefPtr
<Gtk::SizeGroup
> _btn_group
= Gtk::SizeGroup::create(Gtk::SizeGroup::Mode::HORIZONTAL
);
44 OperationBlocker _update
;
45 std::shared_ptr
<Extension::TemplatePreset
> _current_preset
;
48 } // namespace Inkscape:UI::Dialog
50 #endif // INKSCAPE_SEEN_UI_DIALOG_SAVE_TEMPLATE_H
55 c-file-style:"stroustrup"
56 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
61 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :