1#pragma once
2// This file is auto-generated from api/cpp/cbindgen.rs
3#include "slint_enums.h"
4namespace slint::cbindgen_private {
5/// This enum describes the different types of alignment of text along the horizontal axis of a [`Text`](elements.md#text) element.
6enum class TextHorizontalAlignment {
7 /// The text will be aligned with the left edge of the containing box.
8 Left,
9 /// The text will be horizontally centered within the containing box.
10 Center,
11 /// The text will be aligned to the right of the containing box.
12 Right,
13};
14/// This enum describes the different types of alignment of text along the vertical axis of a [`Text`](elements.md#text) element.
15enum class TextVerticalAlignment {
16 /// The text will be aligned to the top of the containing box.
17 Top,
18 /// The text will be vertically centered within the containing box.
19 Center,
20 /// The text will be aligned to the bottom of the containing box.
21 Bottom,
22};
23/// This enum describes the how the text wrap if it is too wide to fit in the [`Text`](elements.md#text) width.
24enum class TextWrap {
25 /// The text won't wrap, but instead will overflow.
26 NoWrap,
27 /// The text will be wrapped at word boundaries.
28 WordWrap,
29};
30/// This enum describes the how the text appear if it is too wide to fit in the [`Text`](elements.md#text) width.
31enum class TextOverflow {
32 /// The text will simply be clipped.
33 Clip,
34 /// The text will be elided with `…`.
35 Elide,
36};
37/// This enum describes whether an event was rejected or accepted by an event handler.
38enum class EventResult {
39 /// The event is rejected by this event handler and may then be handled by the parent item
40 Reject,
41 /// The event is accepted and won't be processed further
42 Accept,
43};
44/// This enum describes the different ways of deciding what the inside of a shape described by a path shall be.
45enum class FillRule {
46 /// The ["nonzero" fill rule as defined in SVG](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule#nonzero).
47 Nonzero,
48 /// The ["evenodd" fill rule as defined in SVG](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule#evenodd)
49 Evenodd,
50};
51/// Use this enum to add standard buttons to a [`Dialog`](elements.md#dialog). The look and positioning
52/// of these [`StandardButton`](../widgets/standardbutton.md)s depends on the environment
53/// (OS, UI environment, etc.) the application runs in.
54enum class StandardButtonKind {
55 /// A "OK" button that accepts a [`Dialog`](elements.md#dialog), closing it when clicked.
56 Ok,
57 /// A "Cancel" button that rejects a [`Dialog`](elements.md#dialog), closing it when clicked.
58 Cancel,
59 /// A "Apply" button that should accept values from a
60 /// [`Dialog`](elements.md#dialog) without closing it.
61 Apply,
62 /// A "Close" button, which should close a [`Dialog`](elements.md#dialog) without looking at values.
63 Close,
64 /// A "Reset" button, which should reset the [`Dialog`](elements.md#dialog) to its initial state.
65 Reset,
66 /// A "Help" button, which should bring up context related documentation when clicked.
67 Help,
68 /// A "Yes" button, used to confirm an action.
69 Yes,
70 /// A "No" button, used to deny an action.
71 No,
72 /// A "Abort" button, used to abort an action.
73 Abort,
74 /// A "Retry" button, used to retry a failed action.
75 Retry,
76 /// A "Ignore" button, used to ignore a failed action.
77 Ignore,
78};
79/// This enum represents the value of the `dialog-button-role` property which can be added to
80/// any element within a [`Dialog`](elements.md#dialog) to put that item in the button row, and its exact position
81/// depends on the role and the platform.
82enum class DialogButtonRole {
83 /// This isn't a button meant to go into the bottom row
84 None,
85 /// This is the role of the main button to click to accept the dialog. e.g. "Ok" or "Yes"
86 Accept,
87 /// This is the role of the main button to click to reject the dialog. e.g. "Cancel" or "No"
88 Reject,
89 /// This is the role of the "Apply" button
90 Apply,
91 /// This is the role of the "Reset" button
92 Reset,
93 /// This is the role of the "Help" button
94 Help,
95 /// This is the role of any other button that performs another action.
96 Action,
97};
98/// The enum reports what happened to the `PointerEventButton` in the event
99enum class PointerEventKind {
100 /// The action was cancelled.
101 Cancel,
102 /// The button was pressed.
103 Down,
104 /// The button was released.
105 Up,
106 /// The pointer has moved,
107 Move,
108};
109using slint::PointerEventButton;
110/// This enum represents different types of mouse cursors. It's a subset of the mouse cursors available in CSS.
111/// For details and pictograms see the [MDN Documentation for cursor](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#values).
112/// Depending on the backend and used OS unidirectional resize cursors may be replaced with bidirectional ones.
113enum class MouseCursor {
114 /// The systems default cursor.
115 Default,
116 /// No cursor is displayed.
117 None,
118 /// A cursor indicating help information.
119 Help,
120 /// A pointing hand indicating a link.
121 Pointer,
122 /// The program is busy but can still be interacted with.
123 Progress,
124 /// The program is busy.
125 Wait,
126 /// A crosshair.
127 Crosshair,
128 /// A cursor indicating selectable text.
129 Text,
130 /// An alias or shortcut is being created.
131 Alias,
132 /// A copy is being created.
133 Copy,
134 /// Something is to be moved.
135 Move,
136 /// Something can't be dropped here.
137 NoDrop,
138 /// An action isn't allowed
139 NotAllowed,
140 /// Something is grabbable.
141 Grab,
142 /// Something is being grabbed.
143 Grabbing,
144 /// Indicating that a column is resizable horizontally.
145 ColResize,
146 /// Indicating that a row is resizable vertically.
147 RowResize,
148 /// Unidirectional resize north.
149 NResize,
150 /// Unidirectional resize east.
151 EResize,
152 /// Unidirectional resize south.
153 SResize,
154 /// Unidirectional resize west.
155 WResize,
156 /// Unidirectional resize north-east.
157 NeResize,
158 /// Unidirectional resize north-west.
159 NwResize,
160 /// Unidirectional resize south-east.
161 SeResize,
162 /// Unidirectional resize south-west.
163 SwResize,
164 /// Bidirectional resize east-west.
165 EwResize,
166 /// Bidirectional resize north-south.
167 NsResize,
168 /// Bidirectional resize north-east-south-west.
169 NeswResize,
170 /// Bidirectional resize north-west-south-east.
171 NwseResize,
172};
173/// This enum defines how the source image shall fit into an [`Image`](elements.md#image) element.
174enum class ImageFit {
175 /// Scales and stretches the source image to fit the width and height of the [`Image`](elements.md#image) element.
176 Fill,
177 /// The source image is scaled to fit into the [`Image`](elements.md#image) element's dimension while preserving the aspect ratio.
178 Contain,
179 /// The source image is scaled to cover into the [`Image`](elements.md#image) element's dimension while preserving the aspect ratio.
180 /// If the aspect ratio of the source image doesn't match the element's one, then the image will be clipped to fit.
181 Cover,
182 /// Preserves the size of the source image in logical pixels.
183 /// The source image will still be scaled by the scale factor that applies to all elements in the window.
184 /// Any extra space will be left blank.
185 Preserve,
186};
187/// This enum specifies the horizontal alignment of the source image.
188enum class ImageHorizontalAlignment {
189 /// Aligns the source image at the center of the [`Image`](elements.md#image) element.
190 Center,
191 /// Aligns the source image at the left of the [`Image`](elements.md#image) element.
192 Left,
193 /// Aligns the source image at the right of the [`Image`](elements.md#image) element.
194 Right,
195};
196/// This enum specifies the vertical alignment of the source image.
197enum class ImageVerticalAlignment {
198 /// Aligns the source image at the center of the [`Image`](elements.md#image) element.
199 Center,
200 /// Aligns the source image at the top of the [`Image`](elements.md#image) element.
201 Top,
202 /// Aligns the source image at the bottom of the [`Image`](elements.md#image) element.
203 Bottom,
204};
205/// This enum specifies how the source image will be scaled.
206enum class ImageRendering {
207 /// The image is scaled with a linear interpolation algorithm.
208 Smooth,
209 /// The image is scaled with the nearest neighbor algorithm.
210 Pixelated,
211};
212/// This enum specifies how the source image will be tiled.
213enum class ImageTiling {
214 /// The source image will not be tiled.
215 None,
216 /// The source image will be repeated to fill the [`Image`](elements.md#image) element.
217 Repeat,
218 /// The source image will be repeated and scaled to fill the [`Image`](elements.md#image) element, ensuring an integer number of repetitions.
219 Round,
220};
221/// This enum is used to define the type of the input field.
222enum class InputType {
223 /// The default value. This will render all characters normally
224 Text,
225 /// This will render all characters with a character that defaults to "*"
226 Password,
227 /// This will only accept and render number characters (0-9)
228 Number,
229 /// This will accept and render characters if it's valid part of a decimal
230 Decimal,
231};
232/// Enum representing the [alignment](../concepts/layouting.md#alignment) property of a
233/// [`HorizontalBox`](../widgets/horizontalbox.md), a [`VerticalBox`](../widgets/verticalbox.md),
234/// a [`HorizontalLayout`, or `VerticalLayout`](elements.md#verticallayout-and-horizontallayout).
235enum class LayoutAlignment {
236 /// Use the minimum size of all elements in a layout, distribute remaining space
237 /// based on `*-stretch` among all elements.
238 Stretch,
239 /// Use the preferred size for all elements, distribute remaining space evenly before the
240 /// first and after the last element.
241 Center,
242 /// Use the preferred size for all elements, put remaining space after the last element.
243 Start,
244 /// Use the preferred size for all elements, put remaining space before the first
245 /// element.
246 End,
247 /// Use the preferred size for all elements, distribute remaining space evenly between
248 /// elements.
249 SpaceBetween,
250 /// Use the preferred size for all elements, distribute remaining space evenly before the
251 /// first element, after the last element and between elements.
252 SpaceAround,
253};
254/// PathEvent is a low-level data structure describing the composition of a path. Typically it is
255/// generated at compile time from a higher-level description, such as SVG commands.
256enum class PathEvent {
257 /// The beginning of the path.
258 Begin,
259 /// A straight line on the path.
260 Line,
261 /// A quadratic bezier curve on the path.
262 Quadratic,
263 /// A cubic bezier curve on the path.
264 Cubic,
265 /// The end of the path that remains open.
266 EndOpen,
267 /// The end of a path that is closed.
268 EndClosed,
269};
270/// This enum represents the different values for the `accessible-role` property, used to describe the
271/// role of an element in the context of assistive technology such as screen readers.
272enum class AccessibleRole {
273 /// The element isn't accessible.
274 None,
275 /// The element is a [`Button`](../widgets/button.md) or behaves like one.
276 Button,
277 /// The element is a [`CheckBox`](../widgets/checkbox.md) or behaves like one.
278 Checkbox,
279 /// The element is a [`ComboBox`](../widgets/combobox.md) or behaves like one.
280 Combobox,
281 /// The element is a [`Slider`](../widgets/slider.md) or behaves like one.
282 Slider,
283 /// The element is a [`SpinBox`](../widgets/spinbox.md) or behaves like one.
284 Spinbox,
285 /// The element is a [`Tab`](../widgets/tabwidget.md) or behaves like one.
286 Tab,
287 /// The role for a [`Text`](elements.md#text) element. It's automatically applied.
288 Text,
289 /// The element is a [`ProgressIndicator`](../widgets/progressindicator.md) or behaves like one.
290 ProgressIndicator,
291};
292/// This enum represents the different values of the `sort-order` property.
293/// It's used to sort a [`StandardTableView`](../widgets/standardtableview.md) by a column.
294enum class SortOrder {
295 /// The column is unsorted.
296 Unsorted,
297 /// The column is sorted in ascending order.
298 Ascending,
299 /// The column is sorted in descending order.
300 Descending,
301};
302/// Represents the orientation of an element or widget such as the [`Slider`](../widgets/slider.md).
303enum class Orientation {
304 /// Element is oriented horizontally.
305 Horizontal,
306 /// Element is oriented vertically.
307 Vertical,
308};
309}
310

source code of slint/target/debug/build/slint-cpp-d3acc71f258707cf/out/generated_include/slint_enums_internal.h