1 /*
2  * DQt - D bindings for the Qt Toolkit
3  *
4  * GNU Lesser General Public License Usage
5  * This file may be used under the terms of the GNU Lesser
6  * General Public License version 3 as published by the Free Software
7  * Foundation and appearing in the file LICENSE.LGPL3 included in the
8  * packaging of this file. Please review the following information to
9  * ensure the GNU Lesser General Public License version 3 requirements
10  * will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
11  */
12 module qt.gui.textdocumentwriter;
13 extern(C++):
14 
15 import qt.config;
16 import qt.core.bytearray;
17 import qt.core.iodevice;
18 import qt.core.list;
19 import qt.core.string;
20 import qt.gui.textdocument;
21 import qt.gui.textdocumentfragment;
22 import qt.helpers;
23 
24 extern(C++, class) struct QTextDocumentWriterPrivate;
25 
26 /// Binding for C++ class [QTextDocumentWriter](https://doc.qt.io/qt-6/qtextdocumentwriter.html).
27 extern(C++, class) struct /+ Q_GUI_EXPORT +/ QTextDocumentWriter
28 {
29 public:
30     @disable this();
31     pragma(mangle, defaultConstructorMangling(__traits(identifier, typeof(this))))
32     ref typeof(this) rawConstructor();
33     static typeof(this) create()
34     {
35         typeof(this) r = typeof(this).init;
36         r.rawConstructor();
37         return r;
38     }
39 
40     this(QIODevice device, ref const(QByteArray) format);
41     /+ explicit +/this(ref const(QString) fileName, ref const(QByteArray) format = globalInitVar!QByteArray);
42     ~this();
43 
44     void setFormat (ref const(QByteArray) format);
45     QByteArray format () const;
46 
47     void setDevice (QIODevice device);
48     QIODevice device () const;
49     void setFileName (ref const(QString) fileName);
50     QString fileName () const;
51 
52     mixin(changeWindowsMangling(q{mangleClassesTailConst}, q{
53     bool write(const(QTextDocument) document);
54     }));
55     bool write(ref const(QTextDocumentFragment) fragment);
56 
57     static QList!(QByteArray) supportedDocumentFormats();
58 
59 private:
60     /+ Q_DISABLE_COPY(QTextDocumentWriter) +/
61 @disable this(this);
62 /+this(ref const(QTextDocumentWriter));+//+ref QTextDocumentWriter operator =(ref const(QTextDocumentWriter));+/    QTextDocumentWriterPrivate* d;
63     mixin(CREATE_CONVENIENCE_WRAPPERS);
64 }
65