1 /****************************************************************************
2 **
3 ** DQt - D bindings for the Qt Toolkit
4 **
5 ** GNU Lesser General Public License Usage
6 ** This file may be used under the terms of the GNU Lesser
7 ** General Public License version 3 as published by the Free Software
8 ** Foundation and appearing in the file LICENSE.LGPL3 included in the
9 ** packaging of this file. Please review the following information to
10 ** ensure the GNU Lesser General Public License version 3 requirements
11 ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
12 **
13 ****************************************************************************/
14 module qt.gui.textlist;
15 extern(C++):
16 
17 import qt.config;
18 import qt.core.string;
19 import qt.gui.textdocument;
20 import qt.gui.textformat;
21 import qt.gui.textobject;
22 import qt.helpers;
23 
24 extern(C++, class) struct QTextListPrivate;
25 /+ class QTextCursor; +/
26 
27 class /+ Q_GUI_EXPORT +/ QTextList : QTextBlockGroup
28 {
29     mixin(Q_OBJECT);
30 public:
31     /+ explicit +/this(QTextDocument doc);
32     ~this();
33 
34     final int count() const;
35 
36 /+ #if QT_DEPRECATED_SINCE(5, 13) +/
37     /+ QT_DEPRECATED_X("Use count() instead") +/
38         pragma(inline, true) final bool isEmpty() const
39     { return count() == 0; }
40 /+ #endif +/
41 
42     final QTextBlock item(int i) const;
43 
44     final int itemNumber(ref const(QTextBlock) ) const;
45     final QString itemText(ref const(QTextBlock) ) const;
46 
47     final void removeItem(int i);
48     final void remove(ref const(QTextBlock) );
49 
50     final void add(ref const(QTextBlock) block);
51 
52     pragma(inline, true) final void setFormat(ref const(QTextListFormat) aformat)
53     { QTextObject.setFormat(aformat); }
54     final QTextListFormat format() const { return QTextObject.format().toListFormat(); }
55 
56 private:
57     /+ Q_DISABLE_COPY(QTextList) +/
58     /+ Q_DECLARE_PRIVATE(QTextList) +/
59 }
60