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.statictext;
13 extern(C++):
14 
15 import qt.config;
16 import qt.core.global;
17 import qt.core.namespace;
18 import qt.core.shareddata;
19 import qt.core.size;
20 import qt.core.string;
21 import qt.core.typeinfo;
22 import qt.gui.font;
23 import qt.gui.textoption;
24 import qt.gui.transform;
25 import qt.helpers;
26 
27 extern(C++, class) struct QStaticTextPrivate;
28 /// Binding for C++ class [QStaticText](https://doc.qt.io/qt-6/qstatictext.html).
29 @Q_RELOCATABLE_TYPE extern(C++, class) struct /+ Q_GUI_EXPORT +/ QStaticText
30 {
31 public:
32     enum PerformanceHint {
33         ModerateCaching,
34         AggressiveCaching
35     }
36 
37     @disable this();
38     pragma(mangle, defaultConstructorMangling(__traits(identifier, typeof(this))))
39     ref typeof(this) rawConstructor();
40     static typeof(this) create()
41     {
42         typeof(this) r = typeof(this).init;
43         r.rawConstructor();
44         return r;
45     }
46 
47     /+ explicit +/this(ref const(QString) text);
48     @disable this(this);
49     this(ref const(QStaticText) other);
50     /+ QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QStaticText) +/
51     /+ref QStaticText operator =(ref const(QStaticText) );+/
52     ~this();
53 
54     /+ void swap(QStaticText &other) noexcept { qSwap(data, other.data); } +/
55 
56     void setText(ref const(QString) text);
57     QString text() const;
58 
59     void setTextFormat(/+ Qt:: +/qt.core.namespace.TextFormat textFormat);
60     /+ Qt:: +/qt.core.namespace.TextFormat textFormat() const;
61 
62     void setTextWidth(qreal textWidth);
63     qreal textWidth() const;
64 
65     void setTextOption(ref const(QTextOption) textOption);
66     QTextOption textOption() const;
67 
68     QSizeF size() const;
69 
70     void prepare(ref const(QTransform) matrix/* = globalInitVar!QTransform*/, ref const(QFont) font/* = globalInitVar!QFont*/);
71 
72     void setPerformanceHint(PerformanceHint performanceHint);
73     PerformanceHint performanceHint() const;
74 
75     /+bool operator ==(ref const(QStaticText) ) const;+/
76     /+bool operator !=(ref const(QStaticText) ) const;+/
77 
78 private:
79     void detach();
80 
81     QExplicitlySharedDataPointer!(QStaticTextPrivate) data;
82     /+ friend class QStaticTextPrivate; +/
83     mixin(CREATE_CONVENIENCE_WRAPPERS);
84 }
85 
86 /+ Q_DECLARE_SHARED(QStaticText)
87 
88 
89 Q_DECLARE_METATYPE(QStaticText) +/
90