Context for the "About" label
[inkscape.git] / src / ui / dialog / save-template-dialog.h
blob9703abac0fd23080040b304b2d98826feede55ab
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /** @file
3 * "Save document as template" dialog
4 *//*
5 * Authors: see git history
7 * Copyright (C) 2017 Authors
8 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
9 */
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 {
25 public:
26 SaveTemplate(Gtk::Window& parent);
28 static void save_document_as_template(Gtk::Window &parentWindow);
30 private:
31 void update_save_widgets();
32 void save_template(Gtk::Window &parent);
34 Gtk::Grid _content;
35 Gtk::CheckButton _set_as_default{_("Set as default template")};
36 Gtk::Label _name{_("_Name"), true};
37 Gtk::Entry _filename;
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
53 Local Variables:
54 mode:c++
55 c-file-style:"stroustrup"
56 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
57 indent-tabs-mode:nil
58 fill-column:99
59 End:
61 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :