Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
template-from-file.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Collect templates as svg documents and express them as usable
4 * templates to the user with an icon.
5 *
6 * Authors:
7 * Martin Owens <doctormo@geek-2.com>
8 *
9 * Copyright (C) 2022 Authors
10 *
11 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
12 */
13
14#ifndef EXTENSION_INTERNAL_TEMPLATE_FROM_FILE_H
15#define EXTENSION_INTERNAL_TEMPLATE_FROM_FILE_H
16
17#include <string> // for string
18#include "extension/implementation/implementation.h" // for Implementation
19#include "extension/template.h" // for Template (ptr o...
20
21class SPDocument;
22namespace Inkscape::XML { class Node; }
23
25
27{
28public:
29 TemplatePresetFile(Template *mod, std::string const &filename);
30
31private:
33};
34
36{
37public:
38 static void init();
39 bool check(Inkscape::Extension::Extension *module) override { return true; };
40 std::unique_ptr<SPDocument> new_from_template(Inkscape::Extension::Template *tmod) override;
41
42 void get_template_presets(const Template *tmod, TemplatePresets &presets) const override;
43};
44
45} // namespace Inkscape::Extension::Internal
46
47#endif /* EXTENSION_INTERNAL_TEMPLATE_FROM_FILE_H */
48
49/*
50 Local Variables:
51 mode:c++
52 c-file-style:"stroustrup"
53 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
54 indent-tabs-mode:nil
55 fill-column:99
56 End:
57*/
58// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
The object that is the basis for the Extension system.
Definition extension.h:133
Base class for all implementations of modules.
bool check(Inkscape::Extension::Extension *module) override
Verify any dependencies.
std::unique_ptr< SPDocument > new_from_template(Inkscape::Extension::Template *tmod) override
void get_template_presets(const Template *tmod, TemplatePresets &presets) const override
Generate a list of available files as selectable presets.
void _load_data(const Inkscape::XML::Node *root)
Interface for refcounted XML nodes.
Definition node.h:80
Typed SVG document implementation.
Definition document.h:103
RootCluster root
std::vector< std::shared_ptr< TemplatePreset > > TemplatePresets
@Inkscape XML tree.