File: ZCommon.rst

package info (click to toggle)
tuiwidgets 0.2.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 16,852 kB
  • sloc: cpp: 70,959; python: 655; sh: 39; makefile: 24
file content (245 lines) | stat: -rw-r--r-- 8,803 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
.. _ZCommon:

ZCommon
=======

The ``ZCommon.h`` header contains types, enums and constants shared by various classes in Tui Widgets.

.. rst-class:: tw-invisible
.. cpp:class:: Tui

   This is actually a namespace.

.. rst-class:: tw-invisible
.. cpp:class:: Tui::Misc

   This is actually a namespace.

.. rst-class:: tw-midspacebefore
.. cpp:enum:: Tui::ZItemDataRole

   .. cpp:enumerator:: LeftDecorationRole

      Item role used with :cpp:class:`Tui::ZListView` to indicate the contents of the left decoration.

      Type: :cpp:class:`QString`

   .. cpp:enumerator:: LeftDecorationFgRole

      Item role used with :cpp:class:`Tui::ZListView` to indicate the foreground color of the left decoration.

      Type: :cpp:class:`Tui::ZColor`

   .. cpp:enumerator:: LeftDecorationBgRole

      Item role used with :cpp:class:`Tui::ZListView` to indicate the background color of the left decoration.

      Type: :cpp:class:`Tui::ZColor`

   .. cpp:enumerator:: LeftDecorationSpaceRole

      Item role used with :cpp:class:`Tui::ZListView` to indicate amount of space between the left decoration (if any)
      and the item text.

      Type: int

.. rst-class:: tw-midspacebefore
.. cpp:enum-class:: Tui::CursorStyle

   .. cpp:enumerator:: Unset

      Use terminal default cursor style

   .. cpp:enumerator:: Block

      Use block cursor style if supported

   .. cpp:enumerator:: Underline

      Use underline cursor style if supported

   .. cpp:enumerator:: Bar

      Use bar cursor style if supported

.. rst-class:: tw-invisible
.. cpp:type:: Tui::ZTextAttributes = QFlags<Tui::ZTextAttribute>

.. rst-class:: tw-midspacebefore
.. cpp:enum-class:: Tui::ZTextAttribute

   .. cpp:enumerator:: Bold
   .. cpp:enumerator:: Italic
   .. cpp:enumerator:: Blink
   .. cpp:enumerator:: Overline
   .. cpp:enumerator:: Inverse
   .. cpp:enumerator:: Strike
   .. cpp:enumerator:: Underline
   .. cpp:enumerator:: UnderlineDouble
   .. cpp:enumerator:: UnderlineCurly


.. rst-class:: tw-midspacebefore
.. cpp:var:: static constexpr int Tui::Erased = 127

   Character value for the special erased state.

   On supported terminals trailing erased cells in a line will not add whitespace when copying text from the terminal.

.. rst-class:: tw-midspacebefore
.. cpp:enum-class:: Tui::ZTilingMode

   When drawing an image on a painter with double wide characters on the edges of the source rectangle, selects how to
   handle these characters.

   .. cpp:enumerator:: NoTiling

      Partial clusters in the source are copied to the destination as spaces for the part of the cluster that
      is inside the rectangle.
      If clusters in the destination cross the boundary they are erased before the copy is made.
      (The part of the cluster outside the rectangle preserves it’s attributes but the text is replaced by spaces)

   .. cpp:enumerator:: Preserve

      If clusters in the destination line up with clusters in source, the cluster in the destination is preserved.
      This allows seamlessly extending a copy made with TERMPAINT_COPY_TILE_PUT without overwriting previously
      copied cells.

   .. cpp:enumerator:: Put

      Clusters in the source will be copied into the destination even if that means modifying cells outside
      of the destination rectangle. This allows copying a larger region in multiple steps.

.. rst-class:: tw-midspacebefore
.. cpp:class:: Tui::WithMarkupTag
.. cpp:var:: constexpr Tui::WithMarkupTag Tui::withMarkup {}

   Marker tag for overloads using markup for the following string arguement.

Aliases from Qt
---------------

Tui Widgets shares some enums with Qt.
For many enums commonly used with widgets they are reexported in ``Tui`` namespace for more consistent usage.
In some cases Qt defines more choices than what is supported with Tui Widgets, in these cases only the supported
choices are reexported here.

.. cpp:type:: Tui::CheckState = Qt::CheckState
.. cpp:enumerator:: Tui::Unchecked = Qt::Unchecked
.. cpp:enumerator:: Tui::PartiallyChecked = Qt::PartiallyChecked
.. cpp:enumerator:: Tui::Checked = Qt::Checked

.. cpp:type:: Tui::KeyboardModifier = Qt::KeyboardModifier
.. cpp:type:: Tui::KeyboardModifiers = Qt::KeyboardModifiers
.. cpp:enumerator:: Tui::NoModifier = Qt::NoModifier
.. cpp:enumerator:: Tui::ShiftModifier = Qt::ShiftModifier
.. cpp:enumerator:: Tui::AltModifier = Qt::AltModifier
.. cpp:enumerator:: Tui::ControlModifier = Qt::ControlModifier
.. cpp:enumerator:: Tui::KeypadModifier = Qt::KeypadModifier


.. cpp:type:: Tui::Key = Qt::Key
.. cpp:enumerator:: Tui::Key_0 = Qt::Key_0
.. cpp:enumerator:: Tui::Key_1 = Qt::Key_1
.. cpp:enumerator:: Tui::Key_2 = Qt::Key_2
.. cpp:enumerator:: Tui::Key_3 = Qt::Key_3
.. cpp:enumerator:: Tui::Key_4 = Qt::Key_4
.. cpp:enumerator:: Tui::Key_5 = Qt::Key_5
.. cpp:enumerator:: Tui::Key_6 = Qt::Key_6
.. cpp:enumerator:: Tui::Key_7 = Qt::Key_7
.. cpp:enumerator:: Tui::Key_8 = Qt::Key_8
.. cpp:enumerator:: Tui::Key_9 = Qt::Key_9
.. cpp:enumerator:: Tui::Key_Backspace = Qt::Key_Backspace
.. cpp:enumerator:: Tui::Key_Delete = Qt::Key_Delete
.. cpp:enumerator:: Tui::Key_Down = Qt::Key_Down
.. cpp:enumerator:: Tui::Key_End = Qt::Key_End
.. cpp:enumerator:: Tui::Key_Enter = Qt::Key_Enter
.. cpp:enumerator:: Tui::Key_Escape = Qt::Key_Escape
.. cpp:enumerator:: Tui::Key_F1 = Qt::Key_F1
.. cpp:enumerator:: Tui::Key_F2 = Qt::Key_F2
.. cpp:enumerator:: Tui::Key_F3 = Qt::Key_F3
.. cpp:enumerator:: Tui::Key_F4 = Qt::Key_F4
.. cpp:enumerator:: Tui::Key_F5 = Qt::Key_F5
.. cpp:enumerator:: Tui::Key_F6 = Qt::Key_F6
.. cpp:enumerator:: Tui::Key_F7 = Qt::Key_F7
.. cpp:enumerator:: Tui::Key_F8 = Qt::Key_F8
.. cpp:enumerator:: Tui::Key_F9 = Qt::Key_F9
.. cpp:enumerator:: Tui::Key_F10 = Qt::Key_F10
.. cpp:enumerator:: Tui::Key_F11 = Qt::Key_F11
.. cpp:enumerator:: Tui::Key_F12 = Qt::Key_F12
.. cpp:enumerator:: Tui::Key_Home = Qt::Key_Home
.. cpp:enumerator:: Tui::Key_Insert = Qt::Key_Insert
.. cpp:enumerator:: Tui::Key_Left = Qt::Key_Left
.. cpp:enumerator:: Tui::Key_Menu = Qt::Key_Menu
.. cpp:enumerator:: Tui::Key_Minus = Qt::Key_Minus
.. cpp:enumerator:: Tui::Key_PageDown = Qt::Key_PageDown
.. cpp:enumerator:: Tui::Key_PageUp = Qt::Key_PageUp
.. cpp:enumerator:: Tui::Key_Period = Qt::Key_Period
.. cpp:enumerator:: Tui::Key_Plus = Qt::Key_Plus
.. cpp:enumerator:: Tui::Key_Right = Qt::Key_Right
.. cpp:enumerator:: Tui::Key_Space = Qt::Key_Space
.. cpp:enumerator:: Tui::Key_Tab = Qt::Key_Tab
.. cpp:enumerator:: Tui::Key_Up = Qt::Key_Up
.. cpp:enumerator:: Tui::Key_division = Qt::Key_division
.. cpp:enumerator:: Tui::Key_multiply = Qt::Key_multiply
.. cpp:enumerator:: Tui::Key_unknown = Qt::Key_unknown


.. cpp:type:: Tui::FocusReason = Qt::FocusReason
.. cpp:enumerator:: Tui::TabFocusReason = Qt::TabFocusReason
.. cpp:enumerator:: Tui::BacktabFocusReason = Qt::BacktabFocusReason
.. cpp:enumerator:: Tui::ActiveWindowFocusReason = Qt::ActiveWindowFocusReason
.. cpp:enumerator:: Tui::ShortcutFocusReason = Qt::ShortcutFocusReason
.. cpp:enumerator:: Tui::OtherFocusReason = Qt::OtherFocusReason


.. cpp:type:: Tui::FocusPolicy = Qt::FocusPolicy
.. cpp:enumerator:: Tui::NoFocus = Qt::NoFocus
.. cpp:enumerator:: Tui::StrongFocus = Qt::StrongFocus
.. cpp:enumerator:: Tui::TabFocus = Qt::TabFocus


.. cpp:type:: Tui::Alignment = Qt::Alignment
.. cpp:enumerator:: Tui::AlignHorizontal_Mask = Qt::AlignHorizontal_Mask
.. cpp:enumerator:: Tui::AlignLeft = Qt::AlignLeft
.. cpp:enumerator:: Tui::AlignRight = Qt::AlignRight
.. cpp:enumerator:: Tui::AlignVertical_Mask = Qt::AlignVertical_Mask
.. cpp:enumerator:: Tui::AlignTop = Qt::AlignTop
.. cpp:enumerator:: Tui::AlignBottom = Qt::AlignBottom
.. cpp:enumerator:: Tui::AlignVCenter = Qt::AlignVCenter
.. cpp:enumerator:: Tui::AlignHCenter = Qt::AlignHCenter


.. cpp:type:: Tui::ShortcutContext = Qt::ShortcutContext
.. cpp:enumerator:: Tui::WidgetShortcut = Qt::WidgetShortcut
.. cpp:enumerator:: Tui::WindowShortcut = Qt::WindowShortcut
.. cpp:enumerator:: Tui::ApplicationShortcut = Qt::ApplicationShortcut
.. cpp:enumerator:: Tui::WidgetWithChildrenShortcut = Qt::WidgetWithChildrenShortcut


.. cpp:type:: Tui::Edges = Qt::Edges
.. cpp:enumerator:: Tui::TopEdge = Qt::TopEdge
.. cpp:enumerator:: Tui::LeftEdge = Qt::LeftEdge
.. cpp:enumerator:: Tui::RightEdge = Qt::RightEdge
.. cpp:enumerator:: Tui::BottomEdge = Qt::BottomEdge


Private Types
-------------

.. cpp:class:: template<> Tui::Private::ZMoFunc<void(QEvent*)>
.. cpp:class:: template<> Tui::Private::ZMoFunc<bool()>

   This private type is used to store callable objects internally.

.. cpp:class:: Tui::Private

   Namespace for private objects.

   Do not use members of this namespace in application code.


.. rst-class:: tw-invisible
.. cpp:class:: uint32_t

   Figure out how to suppress missing type warning regarding this