1
//! Native list view widget with column headers, row selection, and sorting indicators.
2

            
3
use alloc::vec::Vec;
4

            
5
use azul_core::{
6
    callbacks::{CoreCallback, CoreCallbackData, Update},
7
    dom::{
8
        Dom, DomVec, EventFilter, HoverEventFilter, IdOrClass, IdOrClass::Class, IdOrClassVec,
9
        TabIndex,
10
    },
11
    geom::{LogicalPosition, LogicalSize},
12
    menu::{Menu, OptionMenu},
13
    refany::{OptionRefAny, RefAny},
14
};
15
use azul_css::{
16
    corety::OptionUsize,
17
    dynamic_selector::{CssPropertyWithConditions, CssPropertyWithConditionsVec},
18
    props::{
19
        basic::*,
20
        layout::*,
21
        property::{CssProperty, *},
22
        style::*,
23
    },
24
    *,
25
};
26
use azul_css::css::BoxOrStatic;
27

            
28
use crate::callbacks::{Callback, CallbackInfo};
29

            
30
const STRING_16146701490593874959: AzString = AzString::from_const_str("system:ui");
31
const STYLE_BACKGROUND_CONTENT_661302523448178568_ITEMS: &[StyleBackgroundContent] =
32
    &[StyleBackgroundContent::Color(ColorU {
33
        r: 209,
34
        g: 232,
35
        b: 255,
36
        a: 255,
37
    })];
38
const STYLE_BACKGROUND_CONTENT_2444935983575427872_ITEMS: &[StyleBackgroundContent] =
39
    &[StyleBackgroundContent::Color(ColorU {
40
        r: 252,
41
        g: 252,
42
        b: 252,
43
        a: 255,
44
    })];
45
const STYLE_BACKGROUND_CONTENT_3010057533077499049_ITEMS: &[StyleBackgroundContent] =
46
    &[StyleBackgroundContent::Color(ColorU {
47
        r: 229,
48
        g: 243,
49
        b: 251,
50
        a: 255,
51
    })];
52
const STYLE_BACKGROUND_CONTENT_3839348353894170136_ITEMS: &[StyleBackgroundContent] =
53
    &[StyleBackgroundContent::Color(ColorU {
54
        r: 249,
55
        g: 250,
56
        b: 251,
57
        a: 255,
58
    })];
59
const STYLE_BACKGROUND_CONTENT_6112684430356720596_ITEMS: &[StyleBackgroundContent] =
60
    &[StyleBackgroundContent::LinearGradient(LinearGradient {
61
        direction: Direction::FromTo(DirectionCorners {
62
            dir_from: DirectionCorner::Top,
63
            dir_to: DirectionCorner::Bottom,
64
        }),
65
        extend_mode: ExtendMode::Clamp,
66
        stops: NormalizedLinearColorStopVec::from_const_slice(
67
            LINEAR_COLOR_STOP_10827796861537038040_ITEMS,
68
        ),
69
    })];
70
const STYLE_BACKGROUND_CONTENT_7422581697888665934_ITEMS: &[StyleBackgroundContent] =
71
    &[StyleBackgroundContent::LinearGradient(LinearGradient {
72
        direction: Direction::FromTo(DirectionCorners {
73
            dir_from: DirectionCorner::Top,
74
            dir_to: DirectionCorner::Bottom,
75
        }),
76
        extend_mode: ExtendMode::Clamp,
77
        stops: NormalizedLinearColorStopVec::from_const_slice(
78
            LINEAR_COLOR_STOP_513857305091467054_ITEMS,
79
        ),
80
    })];
81
const STYLE_BACKGROUND_CONTENT_11062356617965867290_ITEMS: &[StyleBackgroundContent] =
82
    &[StyleBackgroundContent::Color(ColorU {
83
        r: 240,
84
        g: 240,
85
        b: 240,
86
        a: 255,
87
    })];
88
const STYLE_BACKGROUND_CONTENT_11098930083828139815_ITEMS: &[StyleBackgroundContent] =
89
    &[StyleBackgroundContent::Color(ColorU {
90
        r: 184,
91
        g: 224,
92
        b: 243,
93
        a: 255,
94
    })];
95
const STYLE_TRANSFORM_6162542744002865382_ITEMS: &[StyleTransform] =
96
    &[StyleTransform::Translate(StyleTransformTranslate2D {
97
        x: PixelValue::const_px(7),
98
        y: PixelValue::const_px(0),
99
    })];
100
const STYLE_TRANSFORM_16978981723642914576_ITEMS: &[StyleTransform] =
101
    &[StyleTransform::Rotate(AngleValue::const_deg(45))];
102
const STYLE_TRANSFORM_17732691695785266054_ITEMS: &[StyleTransform] = &[
103
    StyleTransform::Rotate(AngleValue::const_deg(315)),
104
    StyleTransform::Translate(StyleTransformTranslate2D {
105
        x: PixelValue::const_px(0),
106
        y: PixelValue::const_px(2),
107
    }),
108
];
109
const STYLE_FONT_FAMILY_8122988506401935406_ITEMS: &[StyleFontFamily] =
110
    &[StyleFontFamily::System(STRING_16146701490593874959)];
111
const LINEAR_COLOR_STOP_513857305091467054_ITEMS: &[NormalizedLinearColorStop] = &[
112
    NormalizedLinearColorStop {
113
        offset: PercentageValue::const_new(0),
114
        color: ColorOrSystem::color(ColorU {
115
            r: 255,
116
            g: 255,
117
            b: 255,
118
            a: 255,
119
        }),
120
    },
121
    NormalizedLinearColorStop {
122
        offset: PercentageValue::const_new(50),
123
        color: ColorOrSystem::color(ColorU {
124
            r: 255,
125
            g: 255,
126
            b: 255,
127
            a: 255,
128
        }),
129
    },
130
    NormalizedLinearColorStop {
131
        offset: PercentageValue::const_new(51),
132
        color: ColorOrSystem::color(ColorU {
133
            r: 247,
134
            g: 248,
135
            b: 250,
136
            a: 255,
137
        }),
138
    },
139
    NormalizedLinearColorStop {
140
        offset: PercentageValue::const_new(100),
141
        color: ColorOrSystem::color(ColorU {
142
            r: 243,
143
            g: 244,
144
            b: 246,
145
            a: 255,
146
        }),
147
    },
148
];
149
const LINEAR_COLOR_STOP_10827796861537038040_ITEMS: &[NormalizedLinearColorStop] = &[
150
    NormalizedLinearColorStop {
151
        offset: PercentageValue::const_new(0),
152
        color: ColorOrSystem::color(ColorU {
153
            r: 247,
154
            g: 252,
155
            b: 254,
156
            a: 255,
157
        }),
158
    },
159
    NormalizedLinearColorStop {
160
        offset: PercentageValue::const_new(50),
161
        color: ColorOrSystem::color(ColorU {
162
            r: 247,
163
            g: 252,
164
            b: 254,
165
            a: 255,
166
        }),
167
    },
168
    NormalizedLinearColorStop {
169
        offset: PercentageValue::const_new(51),
170
        color: ColorOrSystem::color(ColorU {
171
            r: 232,
172
            g: 246,
173
            b: 254,
174
            a: 255,
175
        }),
176
    },
177
    NormalizedLinearColorStop {
178
        offset: PercentageValue::const_new(100),
179
        color: ColorOrSystem::color(ColorU {
180
            r: 206,
181
            g: 231,
182
            b: 244,
183
            a: 255,
184
        }),
185
    },
186
];
187

            
188
const CSS_MATCH_1085706216385961159_PROPERTIES: &[CssPropertyWithConditions] = &[
189
    // .__azul_native-list-header-arrow-down
190
    CssPropertyWithConditions::simple(CssProperty::Transform(StyleTransformVecValue::Exact(
191
        StyleTransformVec::from_const_slice(STYLE_TRANSFORM_6162542744002865382_ITEMS),
192
    ))),
193
    CssPropertyWithConditions::simple(CssProperty::Position(LayoutPositionValue::Exact(
194
        LayoutPosition::Absolute,
195
    ))),
196
    CssPropertyWithConditions::simple(CssProperty::PaddingRight(LayoutPaddingRightValue::Exact(
197
        LayoutPaddingRight {
198
            inner: PixelValue::const_px(3),
199
        },
200
    ))),
201
    CssPropertyWithConditions::simple(CssProperty::PaddingLeft(LayoutPaddingLeftValue::Exact(
202
        LayoutPaddingLeft {
203
            inner: PixelValue::const_px(3),
204
        },
205
    ))),
206
    CssPropertyWithConditions::simple(CssProperty::PaddingBottom(LayoutPaddingBottomValue::Exact(
207
        LayoutPaddingBottom {
208
            inner: PixelValue::const_px(3),
209
        },
210
    ))),
211
    CssPropertyWithConditions::simple(CssProperty::PaddingTop(LayoutPaddingTopValue::Exact(
212
        LayoutPaddingTop {
213
            inner: PixelValue::const_px(3),
214
        },
215
    ))),
216
    CssPropertyWithConditions::simple(CssProperty::JustifyContent(
217
        LayoutJustifyContentValue::Exact(LayoutJustifyContent::Center),
218
    )),
219
    CssPropertyWithConditions::simple(CssProperty::FlexDirection(LayoutFlexDirectionValue::Exact(
220
        LayoutFlexDirection::Row,
221
    ))),
222
];
223
const CSS_MATCH_1085706216385961159: CssPropertyWithConditionsVec =
224
    CssPropertyWithConditionsVec::from_const_slice(CSS_MATCH_1085706216385961159_PROPERTIES);
225

            
226
const CSS_MATCH_12498280255863106397_PROPERTIES: &[CssPropertyWithConditions] = &[
227
    // .__azul_native-list-header-item:hover
228
    CssPropertyWithConditions::on_hover(CssProperty::BorderBottomWidth(
229
        LayoutBorderBottomWidthValue::Exact(LayoutBorderBottomWidth {
230
            inner: PixelValue::const_px(1),
231
        }),
232
    )),
233
    CssPropertyWithConditions::on_hover(CssProperty::BorderBottomStyle(
234
        StyleBorderBottomStyleValue::Exact(StyleBorderBottomStyle {
235
            inner: BorderStyle::Solid,
236
        }),
237
    )),
238
    CssPropertyWithConditions::on_hover(CssProperty::BorderBottomColor(
239
        StyleBorderBottomColorValue::Exact(StyleBorderBottomColor {
240
            inner: ColorU {
241
                r: 154,
242
                g: 223,
243
                b: 254,
244
                a: 255,
245
            },
246
        }),
247
    )),
248
    CssPropertyWithConditions::on_hover(CssProperty::BackgroundContent(
249
        StyleBackgroundContentVecValue::Exact(StyleBackgroundContentVec::from_const_slice(
250
            STYLE_BACKGROUND_CONTENT_6112684430356720596_ITEMS,
251
        )),
252
    )),
253
    // .__azul_native-list-header-item:active
254
    CssPropertyWithConditions::on_active(CssProperty::BoxShadowBottom(StyleBoxShadowValue::Exact(BoxOrStatic::Static(&
255
        StyleBoxShadow {
256
            offset_x: PixelValueNoPercent {
257
                inner: PixelValue::const_px(0),
258
            },
259
            offset_y: PixelValueNoPercent {
260
                inner: PixelValue::const_px(0),
261
            },
262
            color: ColorU {
263
                r: 206,
264
                g: 231,
265
                b: 244,
266
                a: 255,
267
            },
268
            blur_radius: PixelValueNoPercent {
269
                inner: PixelValue::const_px(5),
270
            },
271
            spread_radius: PixelValueNoPercent {
272
                inner: PixelValue::const_px(0),
273
            },
274
            clip_mode: BoxShadowClipMode::Inset,
275
        },
276
    )))),
277
    CssPropertyWithConditions::on_active(CssProperty::BoxShadowTop(StyleBoxShadowValue::Exact(BoxOrStatic::Static(&
278
        StyleBoxShadow {
279
            offset_x: PixelValueNoPercent {
280
                inner: PixelValue::const_px(0),
281
            },
282
            offset_y: PixelValueNoPercent {
283
                inner: PixelValue::const_px(0),
284
            },
285
            color: ColorU {
286
                r: 206,
287
                g: 231,
288
                b: 244,
289
                a: 255,
290
            },
291
            blur_radius: PixelValueNoPercent {
292
                inner: PixelValue::const_px(5),
293
            },
294
            spread_radius: PixelValueNoPercent {
295
                inner: PixelValue::const_px(0),
296
            },
297
            clip_mode: BoxShadowClipMode::Inset,
298
        },
299
    )))),
300
    CssPropertyWithConditions::on_active(CssProperty::BoxShadowRight(StyleBoxShadowValue::Exact(BoxOrStatic::Static(&
301
        StyleBoxShadow {
302
            offset_x: PixelValueNoPercent {
303
                inner: PixelValue::const_px(0),
304
            },
305
            offset_y: PixelValueNoPercent {
306
                inner: PixelValue::const_px(0),
307
            },
308
            color: ColorU {
309
                r: 206,
310
                g: 231,
311
                b: 244,
312
                a: 255,
313
            },
314
            blur_radius: PixelValueNoPercent {
315
                inner: PixelValue::const_px(5),
316
            },
317
            spread_radius: PixelValueNoPercent {
318
                inner: PixelValue::const_px(0),
319
            },
320
            clip_mode: BoxShadowClipMode::Inset,
321
        },
322
    )))),
323
    CssPropertyWithConditions::on_active(CssProperty::BoxShadowLeft(StyleBoxShadowValue::Exact(BoxOrStatic::Static(&
324
        StyleBoxShadow {
325
            offset_x: PixelValueNoPercent {
326
                inner: PixelValue::const_px(0),
327
            },
328
            offset_y: PixelValueNoPercent {
329
                inner: PixelValue::const_px(0),
330
            },
331
            color: ColorU {
332
                r: 206,
333
                g: 231,
334
                b: 244,
335
                a: 255,
336
            },
337
            blur_radius: PixelValueNoPercent {
338
                inner: PixelValue::const_px(5),
339
            },
340
            spread_radius: PixelValueNoPercent {
341
                inner: PixelValue::const_px(0),
342
            },
343
            clip_mode: BoxShadowClipMode::Inset,
344
        },
345
    )))),
346
    CssPropertyWithConditions::on_active(CssProperty::BorderBottomWidth(
347
        LayoutBorderBottomWidthValue::Exact(LayoutBorderBottomWidth {
348
            inner: PixelValue::const_px(1),
349
        }),
350
    )),
351
    CssPropertyWithConditions::on_active(CssProperty::BorderLeftWidth(
352
        LayoutBorderLeftWidthValue::Exact(LayoutBorderLeftWidth {
353
            inner: PixelValue::const_px(1),
354
        }),
355
    )),
356
    CssPropertyWithConditions::on_active(CssProperty::BorderRightWidth(
357
        LayoutBorderRightWidthValue::Exact(LayoutBorderRightWidth {
358
            inner: PixelValue::const_px(1),
359
        }),
360
    )),
361
    CssPropertyWithConditions::on_active(CssProperty::BorderTopWidth(
362
        LayoutBorderTopWidthValue::Exact(LayoutBorderTopWidth {
363
            inner: PixelValue::const_px(1),
364
        }),
365
    )),
366
    CssPropertyWithConditions::on_active(CssProperty::BorderBottomStyle(
367
        StyleBorderBottomStyleValue::Exact(StyleBorderBottomStyle {
368
            inner: BorderStyle::Solid,
369
        }),
370
    )),
371
    CssPropertyWithConditions::on_active(CssProperty::BorderLeftStyle(
372
        StyleBorderLeftStyleValue::Exact(StyleBorderLeftStyle {
373
            inner: BorderStyle::Solid,
374
        }),
375
    )),
376
    CssPropertyWithConditions::on_active(CssProperty::BorderRightStyle(
377
        StyleBorderRightStyleValue::Exact(StyleBorderRightStyle {
378
            inner: BorderStyle::Solid,
379
        }),
380
    )),
381
    CssPropertyWithConditions::on_active(CssProperty::BorderTopStyle(
382
        StyleBorderTopStyleValue::Exact(StyleBorderTopStyle {
383
            inner: BorderStyle::Solid,
384
        }),
385
    )),
386
    CssPropertyWithConditions::on_active(CssProperty::BorderBottomColor(
387
        StyleBorderBottomColorValue::Exact(StyleBorderBottomColor {
388
            inner: ColorU {
389
                r: 194,
390
                g: 205,
391
                b: 219,
392
                a: 255,
393
            },
394
        }),
395
    )),
396
    CssPropertyWithConditions::on_active(CssProperty::BorderLeftColor(
397
        StyleBorderLeftColorValue::Exact(StyleBorderLeftColor {
398
            inner: ColorU {
399
                r: 194,
400
                g: 205,
401
                b: 219,
402
                a: 255,
403
            },
404
        }),
405
    )),
406
    CssPropertyWithConditions::on_active(CssProperty::BorderRightColor(
407
        StyleBorderRightColorValue::Exact(StyleBorderRightColor {
408
            inner: ColorU {
409
                r: 194,
410
                g: 205,
411
                b: 219,
412
                a: 255,
413
            },
414
        }),
415
    )),
416
    CssPropertyWithConditions::on_active(CssProperty::BorderTopColor(
417
        StyleBorderTopColorValue::Exact(StyleBorderTopColor {
418
            inner: ColorU {
419
                r: 194,
420
                g: 205,
421
                b: 219,
422
                a: 255,
423
            },
424
        }),
425
    )),
426
    CssPropertyWithConditions::on_active(CssProperty::BackgroundContent(
427
        StyleBackgroundContentVecValue::Exact(StyleBackgroundContentVec::from_const_slice(
428
            STYLE_BACKGROUND_CONTENT_3839348353894170136_ITEMS,
429
        )),
430
    )),
431
    // .__azul_native-list-header-item
432
    CssPropertyWithConditions::simple(CssProperty::Position(LayoutPositionValue::Exact(
433
        LayoutPosition::Relative,
434
    ))),
435
    CssPropertyWithConditions::simple(CssProperty::PaddingLeft(LayoutPaddingLeftValue::Exact(
436
        LayoutPaddingLeft {
437
            inner: PixelValue::const_px(7),
438
        },
439
    ))),
440
    CssPropertyWithConditions::simple(CssProperty::MinWidth(LayoutMinWidthValue::Exact(
441
        LayoutMinWidth {
442
            inner: PixelValue::const_px(100),
443
        },
444
    ))),
445
    CssPropertyWithConditions::simple(CssProperty::FlexDirection(LayoutFlexDirectionValue::Exact(
446
        LayoutFlexDirection::Column,
447
    ))),
448
    CssPropertyWithConditions::simple(CssProperty::BorderRightWidth(
449
        LayoutBorderRightWidthValue::Exact(LayoutBorderRightWidth {
450
            inner: PixelValue::const_px(1),
451
        }),
452
    )),
453
    CssPropertyWithConditions::simple(CssProperty::BorderRightStyle(
454
        StyleBorderRightStyleValue::Exact(StyleBorderRightStyle {
455
            inner: BorderStyle::Solid,
456
        }),
457
    )),
458
    CssPropertyWithConditions::simple(CssProperty::BorderRightColor(
459
        StyleBorderRightColorValue::Exact(StyleBorderRightColor {
460
            inner: ColorU {
461
                r: 243,
462
                g: 244,
463
                b: 246,
464
                a: 255,
465
            },
466
        }),
467
    )),
468
];
469
const CSS_MATCH_12498280255863106397: CssPropertyWithConditionsVec =
470
    CssPropertyWithConditionsVec::from_const_slice(CSS_MATCH_12498280255863106397_PROPERTIES);
471

            
472
const CSS_MATCH_12980082330151137475_PROPERTIES: &[CssPropertyWithConditions] = &[
473
    // .__azul_native-list-rows-row-cell
474
    CssPropertyWithConditions::simple(CssProperty::PaddingLeft(LayoutPaddingLeftValue::Exact(
475
        LayoutPaddingLeft {
476
            inner: PixelValue::const_px(7),
477
        },
478
    ))),
479
    CssPropertyWithConditions::simple(CssProperty::MinWidth(LayoutMinWidthValue::Exact(
480
        LayoutMinWidth {
481
            inner: PixelValue::const_px(100),
482
        },
483
    ))),
484
    CssPropertyWithConditions::simple(CssProperty::FontSize(StyleFontSizeValue::Exact(
485
        StyleFontSize {
486
            inner: PixelValue::const_px(11),
487
        },
488
    ))),
489
    CssPropertyWithConditions::simple(CssProperty::FontFamily(StyleFontFamilyVecValue::Exact(
490
        StyleFontFamilyVec::from_const_slice(STYLE_FONT_FAMILY_8122988506401935406_ITEMS),
491
    ))),
492
];
493
const CSS_MATCH_12980082330151137475: CssPropertyWithConditionsVec =
494
    CssPropertyWithConditionsVec::from_const_slice(CSS_MATCH_12980082330151137475_PROPERTIES);
495

            
496
const CSS_MATCH_13758717721055992976_PROPERTIES: &[CssPropertyWithConditions] = &[
497
    // .__azul_native-list-header-arrow-down-inner
498
    CssPropertyWithConditions::simple(CssProperty::Width(LayoutWidthValue::Exact(
499
        LayoutWidth::Px(PixelValue::const_px(6)),
500
    ))),
501
    CssPropertyWithConditions::simple(CssProperty::Transform(StyleTransformVecValue::Exact(
502
        StyleTransformVec::from_const_slice(STYLE_TRANSFORM_16978981723642914576_ITEMS),
503
    ))),
504
    CssPropertyWithConditions::simple(CssProperty::OverflowY(LayoutOverflowValue::Exact(
505
        LayoutOverflow::Hidden,
506
    ))),
507
    CssPropertyWithConditions::simple(CssProperty::OverflowX(LayoutOverflowValue::Exact(
508
        LayoutOverflow::Hidden,
509
    ))),
510
    CssPropertyWithConditions::simple(CssProperty::Height(LayoutHeightValue::Exact(
511
        LayoutHeight::Px(PixelValue::const_px(6)),
512
    ))),
513
];
514
const CSS_MATCH_13758717721055992976: CssPropertyWithConditionsVec =
515
    CssPropertyWithConditionsVec::from_const_slice(CSS_MATCH_13758717721055992976_PROPERTIES);
516

            
517
const CSS_MATCH_15295293133676720691_PROPERTIES: &[CssPropertyWithConditions] = &[
518
    // .__azul_native-list-header-dragwidth-drag
519
    CssPropertyWithConditions::simple(CssProperty::Width(LayoutWidthValue::Exact(
520
        LayoutWidth::Px(PixelValue::const_px(2)),
521
    ))),
522
    CssPropertyWithConditions::simple(CssProperty::Position(LayoutPositionValue::Exact(
523
        LayoutPosition::Absolute,
524
    ))),
525
];
526
const CSS_MATCH_15295293133676720691: CssPropertyWithConditionsVec =
527
    CssPropertyWithConditionsVec::from_const_slice(CSS_MATCH_15295293133676720691_PROPERTIES);
528

            
529
const CSS_MATCH_15315949193378715186_PROPERTIES: &[CssPropertyWithConditions] = &[
530
    // .__azul_native-list-header
531
    CssPropertyWithConditions::simple(CssProperty::Height(LayoutHeightValue::Exact(
532
        LayoutHeight::Px(PixelValue::const_px(25)),
533
    ))),
534
    CssPropertyWithConditions::simple(CssProperty::FlexDirection(LayoutFlexDirectionValue::Exact(
535
        LayoutFlexDirection::Row,
536
    ))),
537
    CssPropertyWithConditions::simple(CssProperty::BackgroundContent(
538
        StyleBackgroundContentVecValue::Exact(StyleBackgroundContentVec::from_const_slice(
539
            STYLE_BACKGROUND_CONTENT_7422581697888665934_ITEMS,
540
        )),
541
    )),
542
];
543
const CSS_MATCH_15315949193378715186: CssPropertyWithConditionsVec =
544
    CssPropertyWithConditionsVec::from_const_slice(CSS_MATCH_15315949193378715186_PROPERTIES);
545

            
546
const CSS_MATCH_15673486787900743642_PROPERTIES: &[CssPropertyWithConditions] = &[
547
    // .__azul_native-list-header .__azul_native-list-header-item p
548
    CssPropertyWithConditions::simple(CssProperty::FontSize(StyleFontSizeValue::Exact(
549
        StyleFontSize {
550
            inner: PixelValue::const_px(11),
551
        },
552
    ))),
553
    CssPropertyWithConditions::simple(CssProperty::FontFamily(StyleFontFamilyVecValue::Exact(
554
        StyleFontFamilyVec::from_const_slice(STYLE_FONT_FAMILY_8122988506401935406_ITEMS),
555
    ))),
556
    CssPropertyWithConditions::simple(CssProperty::FlexGrow(LayoutFlexGrowValue::Exact(
557
        LayoutFlexGrow {
558
            inner: FloatValue::const_new(1),
559
        },
560
    ))),
561
    CssPropertyWithConditions::simple(CssProperty::FlexDirection(LayoutFlexDirectionValue::Exact(
562
        LayoutFlexDirection::Column,
563
    ))),
564
    CssPropertyWithConditions::simple(CssProperty::TextColor(StyleTextColorValue::Exact(
565
        StyleTextColor {
566
            inner: ColorU {
567
                r: 0,
568
                g: 0,
569
                b: 0,
570
                a: 255,
571
            },
572
        },
573
    ))),
574
    CssPropertyWithConditions::simple(CssProperty::AlignItems(LayoutAlignItemsValue::Exact(
575
        LayoutAlignItems::Center,
576
    ))),
577
];
578
const CSS_MATCH_15673486787900743642: CssPropertyWithConditionsVec =
579
    CssPropertyWithConditionsVec::from_const_slice(CSS_MATCH_15673486787900743642_PROPERTIES);
580

            
581
const CSS_MATCH_1574792189506859253_PROPERTIES: &[CssPropertyWithConditions] = &[
582
    // .__azul_native-list-header-arrow-down-inner-deco
583
    CssPropertyWithConditions::simple(CssProperty::Width(LayoutWidthValue::Exact(
584
        LayoutWidth::Px(PixelValue::const_px(12)),
585
    ))),
586
    CssPropertyWithConditions::simple(CssProperty::Transform(StyleTransformVecValue::Exact(
587
        StyleTransformVec::from_const_slice(STYLE_TRANSFORM_17732691695785266054_ITEMS),
588
    ))),
589
    CssPropertyWithConditions::simple(CssProperty::Height(LayoutHeightValue::Exact(
590
        LayoutHeight::Px(PixelValue::const_px(12)),
591
    ))),
592
    CssPropertyWithConditions::simple(CssProperty::BoxShadowBottom(StyleBoxShadowValue::Exact(BoxOrStatic::Static(&
593
        StyleBoxShadow {
594
            offset_x: PixelValueNoPercent {
595
                inner: PixelValue::const_px(3),
596
            },
597
            offset_y: PixelValueNoPercent {
598
                inner: PixelValue::const_px(3),
599
            },
600
            color: ColorU {
601
                r: 60,
602
                g: 94,
603
                b: 114,
604
                a: 255,
605
            },
606
            blur_radius: PixelValueNoPercent {
607
                inner: PixelValue::const_px(10),
608
            },
609
            spread_radius: PixelValueNoPercent {
610
                inner: PixelValue::const_px(0),
611
            },
612
            clip_mode: BoxShadowClipMode::Inset,
613
        },
614
    )))),
615
    CssPropertyWithConditions::simple(CssProperty::BoxShadowTop(StyleBoxShadowValue::Exact(BoxOrStatic::Static(&
616
        StyleBoxShadow {
617
            offset_x: PixelValueNoPercent {
618
                inner: PixelValue::const_px(3),
619
            },
620
            offset_y: PixelValueNoPercent {
621
                inner: PixelValue::const_px(3),
622
            },
623
            color: ColorU {
624
                r: 60,
625
                g: 94,
626
                b: 114,
627
                a: 255,
628
            },
629
            blur_radius: PixelValueNoPercent {
630
                inner: PixelValue::const_px(10),
631
            },
632
            spread_radius: PixelValueNoPercent {
633
                inner: PixelValue::const_px(0),
634
            },
635
            clip_mode: BoxShadowClipMode::Inset,
636
        },
637
    )))),
638
    CssPropertyWithConditions::simple(CssProperty::BoxShadowRight(StyleBoxShadowValue::Exact(BoxOrStatic::Static(&
639
        StyleBoxShadow {
640
            offset_x: PixelValueNoPercent {
641
                inner: PixelValue::const_px(3),
642
            },
643
            offset_y: PixelValueNoPercent {
644
                inner: PixelValue::const_px(3),
645
            },
646
            color: ColorU {
647
                r: 60,
648
                g: 94,
649
                b: 114,
650
                a: 255,
651
            },
652
            blur_radius: PixelValueNoPercent {
653
                inner: PixelValue::const_px(10),
654
            },
655
            spread_radius: PixelValueNoPercent {
656
                inner: PixelValue::const_px(0),
657
            },
658
            clip_mode: BoxShadowClipMode::Inset,
659
        },
660
    )))),
661
    CssPropertyWithConditions::simple(CssProperty::BoxShadowLeft(StyleBoxShadowValue::Exact(BoxOrStatic::Static(&
662
        StyleBoxShadow {
663
            offset_x: PixelValueNoPercent {
664
                inner: PixelValue::const_px(3),
665
            },
666
            offset_y: PixelValueNoPercent {
667
                inner: PixelValue::const_px(3),
668
            },
669
            color: ColorU {
670
                r: 60,
671
                g: 94,
672
                b: 114,
673
                a: 255,
674
            },
675
            blur_radius: PixelValueNoPercent {
676
                inner: PixelValue::const_px(10),
677
            },
678
            spread_radius: PixelValueNoPercent {
679
                inner: PixelValue::const_px(0),
680
            },
681
            clip_mode: BoxShadowClipMode::Inset,
682
        },
683
    )))),
684
];
685
const CSS_MATCH_1574792189506859253: CssPropertyWithConditionsVec =
686
    CssPropertyWithConditionsVec::from_const_slice(CSS_MATCH_1574792189506859253_PROPERTIES);
687

            
688
const CSS_MATCH_17553577885456905601_PROPERTIES: &[CssPropertyWithConditions] = &[
689
    // .__azul_native_list-container
690
    CssPropertyWithConditions::simple(CssProperty::FlexGrow(LayoutFlexGrowValue::Exact(
691
        LayoutFlexGrow {
692
            inner: FloatValue::const_new(1),
693
        },
694
    ))),
695
    CssPropertyWithConditions::simple(CssProperty::BackgroundContent(
696
        StyleBackgroundContentVecValue::Exact(StyleBackgroundContentVec::from_const_slice(
697
            STYLE_BACKGROUND_CONTENT_2444935983575427872_ITEMS,
698
        )),
699
    )),
700
];
701
const CSS_MATCH_17553577885456905601: CssPropertyWithConditionsVec =
702
    CssPropertyWithConditionsVec::from_const_slice(CSS_MATCH_17553577885456905601_PROPERTIES);
703

            
704
const CSS_MATCH_2883986488332352590_PROPERTIES: &[CssPropertyWithConditions] = &[
705
    // body
706
    CssPropertyWithConditions::simple(CssProperty::PaddingRight(LayoutPaddingRightValue::Exact(
707
        LayoutPaddingRight {
708
            inner: PixelValue::const_px(5),
709
        },
710
    ))),
711
    CssPropertyWithConditions::simple(CssProperty::PaddingLeft(LayoutPaddingLeftValue::Exact(
712
        LayoutPaddingLeft {
713
            inner: PixelValue::const_px(5),
714
        },
715
    ))),
716
    CssPropertyWithConditions::simple(CssProperty::PaddingBottom(LayoutPaddingBottomValue::Exact(
717
        LayoutPaddingBottom {
718
            inner: PixelValue::const_px(5),
719
        },
720
    ))),
721
    CssPropertyWithConditions::simple(CssProperty::PaddingTop(LayoutPaddingTopValue::Exact(
722
        LayoutPaddingTop {
723
            inner: PixelValue::const_px(5),
724
        },
725
    ))),
726
    CssPropertyWithConditions::simple(CssProperty::BackgroundContent(
727
        StyleBackgroundContentVecValue::Exact(StyleBackgroundContentVec::from_const_slice(
728
            STYLE_BACKGROUND_CONTENT_11062356617965867290_ITEMS,
729
        )),
730
    )),
731
];
732
const CSS_MATCH_2883986488332352590: CssPropertyWithConditionsVec =
733
    CssPropertyWithConditionsVec::from_const_slice(CSS_MATCH_2883986488332352590_PROPERTIES);
734

            
735
const CSS_MATCH_4852927511892172364_PROPERTIES: &[CssPropertyWithConditions] = &[
736
    // .__azul_native-list-rows
737
    CssPropertyWithConditions::simple(CssProperty::FlexDirection(LayoutFlexDirectionValue::Exact(
738
        LayoutFlexDirection::Column,
739
    ))),
740
];
741
const CSS_MATCH_4852927511892172364: CssPropertyWithConditionsVec =
742
    CssPropertyWithConditionsVec::from_const_slice(CSS_MATCH_4852927511892172364_PROPERTIES);
743

            
744
const CSS_MATCH_6002662151290653203_PROPERTIES: &[CssPropertyWithConditions] = &[
745
    // .__azul_native-list-header-dragwidth
746
    CssPropertyWithConditions::simple(CssProperty::Width(LayoutWidthValue::Exact(
747
        LayoutWidth::Px(PixelValue::const_px(0)),
748
    ))),
749
    CssPropertyWithConditions::simple(CssProperty::Position(LayoutPositionValue::Exact(
750
        LayoutPosition::Relative,
751
    ))),
752
    CssPropertyWithConditions::simple(CssProperty::FlexGrow(LayoutFlexGrowValue::Exact(
753
        LayoutFlexGrow {
754
            inner: FloatValue::const_new(1),
755
        },
756
    ))),
757
];
758
const CSS_MATCH_6002662151290653203: CssPropertyWithConditionsVec =
759
    CssPropertyWithConditionsVec::from_const_slice(CSS_MATCH_6002662151290653203_PROPERTIES);
760

            
761
const CSS_MATCH_6827198030119836081_PROPERTIES: &[CssPropertyWithConditions] = &[
762
    // .__azul_native-list-rows-row.selected
763
    CssPropertyWithConditions::simple(CssProperty::BorderBottomWidth(
764
        LayoutBorderBottomWidthValue::Exact(LayoutBorderBottomWidth {
765
            inner: PixelValue::const_px(1),
766
        }),
767
    )),
768
    CssPropertyWithConditions::simple(CssProperty::BorderLeftWidth(
769
        LayoutBorderLeftWidthValue::Exact(LayoutBorderLeftWidth {
770
            inner: PixelValue::const_px(1),
771
        }),
772
    )),
773
    CssPropertyWithConditions::simple(CssProperty::BorderRightWidth(
774
        LayoutBorderRightWidthValue::Exact(LayoutBorderRightWidth {
775
            inner: PixelValue::const_px(1),
776
        }),
777
    )),
778
    CssPropertyWithConditions::simple(CssProperty::BorderTopWidth(
779
        LayoutBorderTopWidthValue::Exact(LayoutBorderTopWidth {
780
            inner: PixelValue::const_px(1),
781
        }),
782
    )),
783
    CssPropertyWithConditions::simple(CssProperty::BorderBottomStyle(
784
        StyleBorderBottomStyleValue::Exact(StyleBorderBottomStyle {
785
            inner: BorderStyle::Solid,
786
        }),
787
    )),
788
    CssPropertyWithConditions::simple(CssProperty::BorderLeftStyle(
789
        StyleBorderLeftStyleValue::Exact(StyleBorderLeftStyle {
790
            inner: BorderStyle::Solid,
791
        }),
792
    )),
793
    CssPropertyWithConditions::simple(CssProperty::BorderRightStyle(
794
        StyleBorderRightStyleValue::Exact(StyleBorderRightStyle {
795
            inner: BorderStyle::Solid,
796
        }),
797
    )),
798
    CssPropertyWithConditions::simple(CssProperty::BorderTopStyle(
799
        StyleBorderTopStyleValue::Exact(StyleBorderTopStyle {
800
            inner: BorderStyle::Solid,
801
        }),
802
    )),
803
    CssPropertyWithConditions::simple(CssProperty::BorderBottomColor(
804
        StyleBorderBottomColorValue::Exact(StyleBorderBottomColor {
805
            inner: ColorU {
806
                r: 102,
807
                g: 167,
808
                b: 232,
809
                a: 255,
810
            },
811
        }),
812
    )),
813
    CssPropertyWithConditions::simple(CssProperty::BorderLeftColor(
814
        StyleBorderLeftColorValue::Exact(StyleBorderLeftColor {
815
            inner: ColorU {
816
                r: 102,
817
                g: 167,
818
                b: 232,
819
                a: 255,
820
            },
821
        }),
822
    )),
823
    CssPropertyWithConditions::simple(CssProperty::BorderRightColor(
824
        StyleBorderRightColorValue::Exact(StyleBorderRightColor {
825
            inner: ColorU {
826
                r: 102,
827
                g: 167,
828
                b: 232,
829
                a: 255,
830
            },
831
        }),
832
    )),
833
    CssPropertyWithConditions::simple(CssProperty::BorderTopColor(
834
        StyleBorderTopColorValue::Exact(StyleBorderTopColor {
835
            inner: ColorU {
836
                r: 102,
837
                g: 167,
838
                b: 232,
839
                a: 255,
840
            },
841
        }),
842
    )),
843
    CssPropertyWithConditions::simple(CssProperty::BackgroundContent(
844
        StyleBackgroundContentVecValue::Exact(StyleBackgroundContentVec::from_const_slice(
845
            STYLE_BACKGROUND_CONTENT_661302523448178568_ITEMS,
846
        )),
847
    )),
848
    // .__azul_native-list-rows-row:hover
849
    CssPropertyWithConditions::on_hover(CssProperty::BorderBottomWidth(
850
        LayoutBorderBottomWidthValue::Exact(LayoutBorderBottomWidth {
851
            inner: PixelValue::const_px(1),
852
        }),
853
    )),
854
    CssPropertyWithConditions::on_hover(CssProperty::BorderLeftWidth(
855
        LayoutBorderLeftWidthValue::Exact(LayoutBorderLeftWidth {
856
            inner: PixelValue::const_px(1),
857
        }),
858
    )),
859
    CssPropertyWithConditions::on_hover(CssProperty::BorderRightWidth(
860
        LayoutBorderRightWidthValue::Exact(LayoutBorderRightWidth {
861
            inner: PixelValue::const_px(1),
862
        }),
863
    )),
864
    CssPropertyWithConditions::on_hover(CssProperty::BorderTopWidth(
865
        LayoutBorderTopWidthValue::Exact(LayoutBorderTopWidth {
866
            inner: PixelValue::const_px(1),
867
        }),
868
    )),
869
    CssPropertyWithConditions::on_hover(CssProperty::BorderBottomStyle(
870
        StyleBorderBottomStyleValue::Exact(StyleBorderBottomStyle {
871
            inner: BorderStyle::Solid,
872
        }),
873
    )),
874
    CssPropertyWithConditions::on_hover(CssProperty::BorderLeftStyle(
875
        StyleBorderLeftStyleValue::Exact(StyleBorderLeftStyle {
876
            inner: BorderStyle::Solid,
877
        }),
878
    )),
879
    CssPropertyWithConditions::on_hover(CssProperty::BorderRightStyle(
880
        StyleBorderRightStyleValue::Exact(StyleBorderRightStyle {
881
            inner: BorderStyle::Solid,
882
        }),
883
    )),
884
    CssPropertyWithConditions::on_hover(CssProperty::BorderTopStyle(
885
        StyleBorderTopStyleValue::Exact(StyleBorderTopStyle {
886
            inner: BorderStyle::Solid,
887
        }),
888
    )),
889
    CssPropertyWithConditions::on_hover(CssProperty::BorderBottomColor(
890
        StyleBorderBottomColorValue::Exact(StyleBorderBottomColor {
891
            inner: ColorU {
892
                r: 101,
893
                g: 181,
894
                b: 220,
895
                a: 255,
896
            },
897
        }),
898
    )),
899
    CssPropertyWithConditions::on_hover(CssProperty::BorderLeftColor(
900
        StyleBorderLeftColorValue::Exact(StyleBorderLeftColor {
901
            inner: ColorU {
902
                r: 101,
903
                g: 181,
904
                b: 220,
905
                a: 255,
906
            },
907
        }),
908
    )),
909
    CssPropertyWithConditions::on_hover(CssProperty::BorderRightColor(
910
        StyleBorderRightColorValue::Exact(StyleBorderRightColor {
911
            inner: ColorU {
912
                r: 101,
913
                g: 181,
914
                b: 220,
915
                a: 255,
916
            },
917
        }),
918
    )),
919
    CssPropertyWithConditions::on_hover(CssProperty::BorderTopColor(
920
        StyleBorderTopColorValue::Exact(StyleBorderTopColor {
921
            inner: ColorU {
922
                r: 101,
923
                g: 181,
924
                b: 220,
925
                a: 255,
926
            },
927
        }),
928
    )),
929
    CssPropertyWithConditions::on_hover(CssProperty::BackgroundContent(
930
        StyleBackgroundContentVecValue::Exact(StyleBackgroundContentVec::from_const_slice(
931
            STYLE_BACKGROUND_CONTENT_3010057533077499049_ITEMS,
932
        )),
933
    )),
934
    // .__azul_native-list-rows-row
935
    CssPropertyWithConditions::simple(CssProperty::PaddingRight(LayoutPaddingRightValue::Exact(
936
        LayoutPaddingRight {
937
            inner: PixelValue::const_px(0),
938
        },
939
    ))),
940
    CssPropertyWithConditions::simple(CssProperty::PaddingLeft(LayoutPaddingLeftValue::Exact(
941
        LayoutPaddingLeft {
942
            inner: PixelValue::const_px(0),
943
        },
944
    ))),
945
    CssPropertyWithConditions::simple(CssProperty::PaddingBottom(LayoutPaddingBottomValue::Exact(
946
        LayoutPaddingBottom {
947
            inner: PixelValue::const_px(2),
948
        },
949
    ))),
950
    CssPropertyWithConditions::simple(CssProperty::PaddingTop(LayoutPaddingTopValue::Exact(
951
        LayoutPaddingTop {
952
            inner: PixelValue::const_px(2),
953
        },
954
    ))),
955
    CssPropertyWithConditions::simple(CssProperty::FlexGrow(LayoutFlexGrowValue::Exact(
956
        LayoutFlexGrow {
957
            inner: FloatValue::const_new(1),
958
        },
959
    ))),
960
    CssPropertyWithConditions::simple(CssProperty::FlexDirection(LayoutFlexDirectionValue::Exact(
961
        LayoutFlexDirection::Row,
962
    ))),
963
    CssPropertyWithConditions::simple(CssProperty::BorderBottomWidth(
964
        LayoutBorderBottomWidthValue::Exact(LayoutBorderBottomWidth {
965
            inner: PixelValue::const_px(1),
966
        }),
967
    )),
968
    CssPropertyWithConditions::simple(CssProperty::BorderLeftWidth(
969
        LayoutBorderLeftWidthValue::Exact(LayoutBorderLeftWidth {
970
            inner: PixelValue::const_px(1),
971
        }),
972
    )),
973
    CssPropertyWithConditions::simple(CssProperty::BorderRightWidth(
974
        LayoutBorderRightWidthValue::Exact(LayoutBorderRightWidth {
975
            inner: PixelValue::const_px(1),
976
        }),
977
    )),
978
    CssPropertyWithConditions::simple(CssProperty::BorderTopWidth(
979
        LayoutBorderTopWidthValue::Exact(LayoutBorderTopWidth {
980
            inner: PixelValue::const_px(1),
981
        }),
982
    )),
983
    CssPropertyWithConditions::simple(CssProperty::BorderBottomStyle(
984
        StyleBorderBottomStyleValue::Exact(StyleBorderBottomStyle {
985
            inner: BorderStyle::Solid,
986
        }),
987
    )),
988
    CssPropertyWithConditions::simple(CssProperty::BorderLeftStyle(
989
        StyleBorderLeftStyleValue::Exact(StyleBorderLeftStyle {
990
            inner: BorderStyle::Solid,
991
        }),
992
    )),
993
    CssPropertyWithConditions::simple(CssProperty::BorderRightStyle(
994
        StyleBorderRightStyleValue::Exact(StyleBorderRightStyle {
995
            inner: BorderStyle::Solid,
996
        }),
997
    )),
998
    CssPropertyWithConditions::simple(CssProperty::BorderTopStyle(
999
        StyleBorderTopStyleValue::Exact(StyleBorderTopStyle {
            inner: BorderStyle::Solid,
        }),
    )),
    CssPropertyWithConditions::simple(CssProperty::BorderBottomColor(
        StyleBorderBottomColorValue::Exact(StyleBorderBottomColor {
            inner: ColorU {
                r: 255,
                g: 255,
                b: 255,
                a: 0,
            },
        }),
    )),
    CssPropertyWithConditions::simple(CssProperty::BorderLeftColor(
        StyleBorderLeftColorValue::Exact(StyleBorderLeftColor {
            inner: ColorU {
                r: 255,
                g: 255,
                b: 255,
                a: 0,
            },
        }),
    )),
    CssPropertyWithConditions::simple(CssProperty::BorderRightColor(
        StyleBorderRightColorValue::Exact(StyleBorderRightColor {
            inner: ColorU {
                r: 255,
                g: 255,
                b: 255,
                a: 0,
            },
        }),
    )),
    CssPropertyWithConditions::simple(CssProperty::BorderTopColor(
        StyleBorderTopColorValue::Exact(StyleBorderTopColor {
            inner: ColorU {
                r: 255,
                g: 255,
                b: 255,
                a: 0,
            },
        }),
    )),
];
const CSS_MATCH_6827198030119836081: CssPropertyWithConditionsVec =
    CssPropertyWithConditionsVec::from_const_slice(CSS_MATCH_6827198030119836081_PROPERTIES);
const CSS_MATCH_7894335449545988724_PROPERTIES: &[CssPropertyWithConditions] = &[
    // .__azul_native-list-rows-row.focused
    CssPropertyWithConditions::on_focus(CssProperty::BorderBottomWidth(
        LayoutBorderBottomWidthValue::Exact(LayoutBorderBottomWidth {
            inner: PixelValue::const_px(1),
        }),
    )),
    CssPropertyWithConditions::on_focus(CssProperty::BorderLeftWidth(
        LayoutBorderLeftWidthValue::Exact(LayoutBorderLeftWidth {
            inner: PixelValue::const_px(1),
        }),
    )),
    CssPropertyWithConditions::on_focus(CssProperty::BorderRightWidth(
        LayoutBorderRightWidthValue::Exact(LayoutBorderRightWidth {
            inner: PixelValue::const_px(1),
        }),
    )),
    CssPropertyWithConditions::on_focus(CssProperty::BorderTopWidth(
        LayoutBorderTopWidthValue::Exact(LayoutBorderTopWidth {
            inner: PixelValue::const_px(1),
        }),
    )),
    CssPropertyWithConditions::on_focus(CssProperty::BorderBottomStyle(
        StyleBorderBottomStyleValue::Exact(StyleBorderBottomStyle {
            inner: BorderStyle::Solid,
        }),
    )),
    CssPropertyWithConditions::on_focus(CssProperty::BorderLeftStyle(
        StyleBorderLeftStyleValue::Exact(StyleBorderLeftStyle {
            inner: BorderStyle::Solid,
        }),
    )),
    CssPropertyWithConditions::on_focus(CssProperty::BorderRightStyle(
        StyleBorderRightStyleValue::Exact(StyleBorderRightStyle {
            inner: BorderStyle::Solid,
        }),
    )),
    CssPropertyWithConditions::on_focus(CssProperty::BorderTopStyle(
        StyleBorderTopStyleValue::Exact(StyleBorderTopStyle {
            inner: BorderStyle::Solid,
        }),
    )),
    CssPropertyWithConditions::on_focus(CssProperty::BorderBottomColor(
        StyleBorderBottomColorValue::Exact(StyleBorderBottomColor {
            inner: ColorU {
                r: 38,
                g: 160,
                b: 218,
                a: 255,
            },
        }),
    )),
    CssPropertyWithConditions::on_focus(CssProperty::BorderLeftColor(
        StyleBorderLeftColorValue::Exact(StyleBorderLeftColor {
            inner: ColorU {
                r: 38,
                g: 160,
                b: 218,
                a: 255,
            },
        }),
    )),
    CssPropertyWithConditions::on_focus(CssProperty::BorderRightColor(
        StyleBorderRightColorValue::Exact(StyleBorderRightColor {
            inner: ColorU {
                r: 38,
                g: 160,
                b: 218,
                a: 255,
            },
        }),
    )),
    CssPropertyWithConditions::on_focus(CssProperty::BorderTopColor(
        StyleBorderTopColorValue::Exact(StyleBorderTopColor {
            inner: ColorU {
                r: 38,
                g: 160,
                b: 218,
                a: 255,
            },
        }),
    )),
    CssPropertyWithConditions::on_focus(CssProperty::BackgroundContent(
        StyleBackgroundContentVecValue::Exact(StyleBackgroundContentVec::from_const_slice(
            STYLE_BACKGROUND_CONTENT_11098930083828139815_ITEMS,
        )),
    )),
    // .__azul_native-list-rows-row:hover
    CssPropertyWithConditions::on_hover(CssProperty::BorderBottomWidth(
        LayoutBorderBottomWidthValue::Exact(LayoutBorderBottomWidth {
            inner: PixelValue::const_px(1),
        }),
    )),
    CssPropertyWithConditions::on_hover(CssProperty::BorderLeftWidth(
        LayoutBorderLeftWidthValue::Exact(LayoutBorderLeftWidth {
            inner: PixelValue::const_px(1),
        }),
    )),
    CssPropertyWithConditions::on_hover(CssProperty::BorderRightWidth(
        LayoutBorderRightWidthValue::Exact(LayoutBorderRightWidth {
            inner: PixelValue::const_px(1),
        }),
    )),
    CssPropertyWithConditions::on_hover(CssProperty::BorderTopWidth(
        LayoutBorderTopWidthValue::Exact(LayoutBorderTopWidth {
            inner: PixelValue::const_px(1),
        }),
    )),
    CssPropertyWithConditions::on_hover(CssProperty::BorderBottomStyle(
        StyleBorderBottomStyleValue::Exact(StyleBorderBottomStyle {
            inner: BorderStyle::Solid,
        }),
    )),
    CssPropertyWithConditions::on_hover(CssProperty::BorderLeftStyle(
        StyleBorderLeftStyleValue::Exact(StyleBorderLeftStyle {
            inner: BorderStyle::Solid,
        }),
    )),
    CssPropertyWithConditions::on_hover(CssProperty::BorderRightStyle(
        StyleBorderRightStyleValue::Exact(StyleBorderRightStyle {
            inner: BorderStyle::Solid,
        }),
    )),
    CssPropertyWithConditions::on_hover(CssProperty::BorderTopStyle(
        StyleBorderTopStyleValue::Exact(StyleBorderTopStyle {
            inner: BorderStyle::Solid,
        }),
    )),
    CssPropertyWithConditions::on_hover(CssProperty::BorderBottomColor(
        StyleBorderBottomColorValue::Exact(StyleBorderBottomColor {
            inner: ColorU {
                r: 101,
                g: 181,
                b: 220,
                a: 255,
            },
        }),
    )),
    CssPropertyWithConditions::on_hover(CssProperty::BorderLeftColor(
        StyleBorderLeftColorValue::Exact(StyleBorderLeftColor {
            inner: ColorU {
                r: 101,
                g: 181,
                b: 220,
                a: 255,
            },
        }),
    )),
    CssPropertyWithConditions::on_hover(CssProperty::BorderRightColor(
        StyleBorderRightColorValue::Exact(StyleBorderRightColor {
            inner: ColorU {
                r: 101,
                g: 181,
                b: 220,
                a: 255,
            },
        }),
    )),
    CssPropertyWithConditions::on_hover(CssProperty::BorderTopColor(
        StyleBorderTopColorValue::Exact(StyleBorderTopColor {
            inner: ColorU {
                r: 101,
                g: 181,
                b: 220,
                a: 255,
            },
        }),
    )),
    CssPropertyWithConditions::on_hover(CssProperty::BackgroundContent(
        StyleBackgroundContentVecValue::Exact(StyleBackgroundContentVec::from_const_slice(
            STYLE_BACKGROUND_CONTENT_3010057533077499049_ITEMS,
        )),
    )),
    // .__azul_native-list-rows-row
    CssPropertyWithConditions::simple(CssProperty::PaddingRight(LayoutPaddingRightValue::Exact(
        LayoutPaddingRight {
            inner: PixelValue::const_px(0),
        },
    ))),
    CssPropertyWithConditions::simple(CssProperty::PaddingLeft(LayoutPaddingLeftValue::Exact(
        LayoutPaddingLeft {
            inner: PixelValue::const_px(0),
        },
    ))),
    CssPropertyWithConditions::simple(CssProperty::PaddingBottom(LayoutPaddingBottomValue::Exact(
        LayoutPaddingBottom {
            inner: PixelValue::const_px(2),
        },
    ))),
    CssPropertyWithConditions::simple(CssProperty::PaddingTop(LayoutPaddingTopValue::Exact(
        LayoutPaddingTop {
            inner: PixelValue::const_px(2),
        },
    ))),
    CssPropertyWithConditions::simple(CssProperty::FlexGrow(LayoutFlexGrowValue::Exact(
        LayoutFlexGrow {
            inner: FloatValue::const_new(1),
        },
    ))),
    CssPropertyWithConditions::simple(CssProperty::FlexDirection(LayoutFlexDirectionValue::Exact(
        LayoutFlexDirection::Row,
    ))),
    CssPropertyWithConditions::simple(CssProperty::BorderBottomWidth(
        LayoutBorderBottomWidthValue::Exact(LayoutBorderBottomWidth {
            inner: PixelValue::const_px(1),
        }),
    )),
    CssPropertyWithConditions::simple(CssProperty::BorderLeftWidth(
        LayoutBorderLeftWidthValue::Exact(LayoutBorderLeftWidth {
            inner: PixelValue::const_px(1),
        }),
    )),
    CssPropertyWithConditions::simple(CssProperty::BorderRightWidth(
        LayoutBorderRightWidthValue::Exact(LayoutBorderRightWidth {
            inner: PixelValue::const_px(1),
        }),
    )),
    CssPropertyWithConditions::simple(CssProperty::BorderTopWidth(
        LayoutBorderTopWidthValue::Exact(LayoutBorderTopWidth {
            inner: PixelValue::const_px(1),
        }),
    )),
    CssPropertyWithConditions::simple(CssProperty::BorderBottomStyle(
        StyleBorderBottomStyleValue::Exact(StyleBorderBottomStyle {
            inner: BorderStyle::Solid,
        }),
    )),
    CssPropertyWithConditions::simple(CssProperty::BorderLeftStyle(
        StyleBorderLeftStyleValue::Exact(StyleBorderLeftStyle {
            inner: BorderStyle::Solid,
        }),
    )),
    CssPropertyWithConditions::simple(CssProperty::BorderRightStyle(
        StyleBorderRightStyleValue::Exact(StyleBorderRightStyle {
            inner: BorderStyle::Solid,
        }),
    )),
    CssPropertyWithConditions::simple(CssProperty::BorderTopStyle(
        StyleBorderTopStyleValue::Exact(StyleBorderTopStyle {
            inner: BorderStyle::Solid,
        }),
    )),
    CssPropertyWithConditions::simple(CssProperty::BorderBottomColor(
        StyleBorderBottomColorValue::Exact(StyleBorderBottomColor {
            inner: ColorU {
                r: 255,
                g: 255,
                b: 255,
                a: 0,
            },
        }),
    )),
    CssPropertyWithConditions::simple(CssProperty::BorderLeftColor(
        StyleBorderLeftColorValue::Exact(StyleBorderLeftColor {
            inner: ColorU {
                r: 255,
                g: 255,
                b: 255,
                a: 0,
            },
        }),
    )),
    CssPropertyWithConditions::simple(CssProperty::BorderRightColor(
        StyleBorderRightColorValue::Exact(StyleBorderRightColor {
            inner: ColorU {
                r: 255,
                g: 255,
                b: 255,
                a: 0,
            },
        }),
    )),
    CssPropertyWithConditions::simple(CssProperty::BorderTopColor(
        StyleBorderTopColorValue::Exact(StyleBorderTopColor {
            inner: ColorU {
                r: 255,
                g: 255,
                b: 255,
                a: 0,
            },
        }),
    )),
];
const CSS_MATCH_7894335449545988724: CssPropertyWithConditionsVec =
    CssPropertyWithConditionsVec::from_const_slice(CSS_MATCH_7894335449545988724_PROPERTIES);
const CSS_MATCH_7937682281721781688_PROPERTIES: &[CssPropertyWithConditions] = &[
    // .__azul_native-list-rows-row-cell
    CssPropertyWithConditions::simple(CssProperty::PaddingLeft(LayoutPaddingLeftValue::Exact(
        LayoutPaddingLeft {
            inner: PixelValue::const_px(7),
        },
    ))),
    CssPropertyWithConditions::simple(CssProperty::MinWidth(LayoutMinWidthValue::Exact(
        LayoutMinWidth {
            inner: PixelValue::const_px(100),
        },
    ))),
    CssPropertyWithConditions::simple(CssProperty::FontSize(StyleFontSizeValue::Exact(
        StyleFontSize {
            inner: PixelValue::const_px(11),
        },
    ))),
    CssPropertyWithConditions::simple(CssProperty::FontFamily(StyleFontFamilyVecValue::Exact(
        StyleFontFamilyVec::from_const_slice(STYLE_FONT_FAMILY_8122988506401935406_ITEMS),
    ))),
];
const CSS_MATCH_7937682281721781688: CssPropertyWithConditionsVec =
    CssPropertyWithConditionsVec::from_const_slice(CSS_MATCH_7937682281721781688_PROPERTIES);
const CSS_MATCH_8793836789597026811_PROPERTIES: &[CssPropertyWithConditions] = &[
    // .__azul_native-list-rows-row-cell
    CssPropertyWithConditions::simple(CssProperty::PaddingLeft(LayoutPaddingLeftValue::Exact(
        LayoutPaddingLeft {
            inner: PixelValue::const_px(7),
        },
    ))),
    CssPropertyWithConditions::simple(CssProperty::MinWidth(LayoutMinWidthValue::Exact(
        LayoutMinWidth {
            inner: PixelValue::const_px(100),
        },
    ))),
    CssPropertyWithConditions::simple(CssProperty::FontSize(StyleFontSizeValue::Exact(
        StyleFontSize {
            inner: PixelValue::const_px(11),
        },
    ))),
    CssPropertyWithConditions::simple(CssProperty::FontFamily(StyleFontFamilyVecValue::Exact(
        StyleFontFamilyVec::from_const_slice(STYLE_FONT_FAMILY_8122988506401935406_ITEMS),
    ))),
];
const CSS_MATCH_8793836789597026811: CssPropertyWithConditionsVec =
    CssPropertyWithConditionsVec::from_const_slice(CSS_MATCH_8793836789597026811_PROPERTIES);
const IDS_AND_CLASSES_790316832563530605: &[IdOrClass] = &[Class(AzString::from_const_str(
    "__azul_native-list-rows-row",
))];
const ROW_CLASS: IdOrClassVec = IdOrClassVec::from_const_slice(IDS_AND_CLASSES_790316832563530605);
const IDS_AND_CLASSES_3034181810805097699: &[IdOrClass] = &[Class(AzString::from_const_str(
    "__azul_native-list-rows-row-cell",
))];
const CELL_CLASS: IdOrClassVec =
    IdOrClassVec::from_const_slice(IDS_AND_CLASSES_3034181810805097699);
const IDS_AND_CLASSES_6012478019077291002: &[IdOrClass] =
    &[Class(AzString::from_const_str("__azul_native-list-rows"))];
const ROW_CONTAINER_CLASS: IdOrClassVec =
    IdOrClassVec::from_const_slice(IDS_AND_CLASSES_6012478019077291002);
const IDS_AND_CLASSES_10742579426112804392: &[IdOrClass] =
    &[Class(AzString::from_const_str("__azul_native-list-header"))];
const HEADER_CONTAINER_CLASS: IdOrClassVec =
    IdOrClassVec::from_const_slice(IDS_AND_CLASSES_10742579426112804392);
const IDS_AND_CLASSES_9205819539370539587: &[IdOrClass] = &[Class(AzString::from_const_str(
    "__azul_native_list-container",
))];
const LIST_VIEW_CONTAINER_CLASS: IdOrClassVec =
    IdOrClassVec::from_const_slice(IDS_AND_CLASSES_9205819539370539587);
const IDS_AND_CLASSES_18330792117162403422: &[IdOrClass] = &[Class(AzString::from_const_str(
    "__azul_native-list-header-item",
))];
const COLUMN_NAME_CLASS: IdOrClassVec =
    IdOrClassVec::from_const_slice(IDS_AND_CLASSES_18330792117162403422);
pub type ListViewOnLazyLoadScrollCallbackType =
    extern "C" fn(RefAny, CallbackInfo, ListViewState) -> Update;
impl_widget_callback!(
    ListViewOnLazyLoadScroll,
    OptionListViewOnLazyLoadScroll,
    ListViewOnLazyLoadScrollCallback,
    ListViewOnLazyLoadScrollCallbackType
);
azul_core::impl_managed_callback! {
    wrapper:        ListViewOnLazyLoadScrollCallback,
    info_ty:        CallbackInfo,
    return_ty:      Update,
    default_ret:    Update::DoNothing,
    invoker_static: LIST_VIEW_ON_LAZY_LOAD_SCROLL_INVOKER,
    invoker_ty:     AzListViewOnLazyLoadScrollCallbackInvoker,
    thunk_fn:       az_list_view_on_lazy_load_scroll_callback_thunk,
    setter_fn:      AzApp_setListViewOnLazyLoadScrollCallbackInvoker,
    from_handle_fn: AzListViewOnLazyLoadScrollCallback_createFromHostHandle,
    extra_args:     [ state: ListViewState ],
}
pub type ListViewOnColumnClickCallbackType =
    extern "C" fn(RefAny, CallbackInfo, ListViewState, column_clicked: usize) -> Update;
impl_widget_callback!(
    ListViewOnColumnClick,
    OptionListViewOnColumnClick,
    ListViewOnColumnClickCallback,
    ListViewOnColumnClickCallbackType
);
azul_core::impl_managed_callback! {
    wrapper:        ListViewOnColumnClickCallback,
    info_ty:        CallbackInfo,
    return_ty:      Update,
    default_ret:    Update::DoNothing,
    invoker_static: LIST_VIEW_ON_COLUMN_CLICK_INVOKER,
    invoker_ty:     AzListViewOnColumnClickCallbackInvoker,
    thunk_fn:       az_list_view_on_column_click_callback_thunk,
    setter_fn:      AzApp_setListViewOnColumnClickCallbackInvoker,
    from_handle_fn: AzListViewOnColumnClickCallback_createFromHostHandle,
    extra_args:     [ state: ListViewState, column_clicked: usize ],
}
pub type ListViewOnRowClickCallbackType =
    extern "C" fn(RefAny, CallbackInfo, ListViewState, row_clicked: usize) -> Update;
impl_widget_callback!(
    ListViewOnRowClick,
    OptionListViewOnRowClick,
    ListViewOnRowClickCallback,
    ListViewOnRowClickCallbackType
);
azul_core::impl_managed_callback! {
    wrapper:        ListViewOnRowClickCallback,
    info_ty:        CallbackInfo,
    return_ty:      Update,
    default_ret:    Update::DoNothing,
    invoker_static: LIST_VIEW_ON_ROW_CLICK_INVOKER,
    invoker_ty:     AzListViewOnRowClickCallbackInvoker,
    thunk_fn:       az_list_view_on_row_click_callback_thunk,
    setter_fn:      AzApp_setListViewOnRowClickCallbackInvoker,
    from_handle_fn: AzListViewOnRowClickCallback_createFromHostHandle,
    extra_args:     [ state: ListViewState, row_clicked: usize ],
}
/// State of the ListView, but without row data
#[derive(Debug, Clone)]
#[repr(C)]
pub struct ListViewState {
    /// Copy of the current column names
    pub columns: StringVec,
    /// Which column the rows are currently sorted by
    pub sorted_by: OptionUsize,
    /// Row count of rows currently loaded in the DOM
    pub current_row_count: usize,
    /// Y-offset currently applied to the rows
    pub scroll_offset: PixelValueNoPercent,
    /// Current position where the user has scrolled the ListView to
    pub current_scroll_position: LogicalPosition,
    /// Current height of the row container
    pub current_content_height: LogicalSize,
}
/// List view, optionally able to lazy-load data
#[derive(Debug, Clone)]
#[repr(C)]
pub struct ListView {
    /// Column names
    pub columns: StringVec,
    /// Currently rendered rows. Note that the ListView does not
    /// have to render all rows at once, usually you'd only render
    /// the top 100 rows
    pub rows: ListViewRowVec,
    /// Which column is the list view sorted by (default = None)?
    pub sorted_by: OptionUsize,
    /// Offset to add to the rows used when layouting row positions
    /// during lazy-loaded scrolling. Also affects the scroll position
    pub scroll_offset: PixelValueNoPercent,
    /// Height of the content, if not all rows are loaded
    pub content_height: OptionPixelValueNoPercent,
    /// Context menu for the columns (usually opens a context menu
    /// to select which columns to show)
    pub column_context_menu: OptionMenu,
    /// Indicates that this ListView is being lazily loaded, allows
    /// control over what happens when the user scrolls the ListView.
    pub on_lazy_load_scroll: OptionListViewOnLazyLoadScroll,
    /// What to do when the user left-clicks the column
    /// (usually used for storing which column to sort by)
    pub on_column_click: OptionListViewOnColumnClick,
    /// What to do when the user left-clicks a row
    /// (usually used for selecting the row depending on the state)
    pub on_row_click: OptionListViewOnRowClick,
}
impl Default for ListView {
2
    fn default() -> Self {
2
        Self {
2
            columns: StringVec::from_const_slice(&[]),
2
            rows: ListViewRowVec::from_const_slice(&[]),
2
            sorted_by: None.into(),
2
            scroll_offset: PixelValueNoPercent {
2
                inner: PixelValue::const_px(0),
2
            },
2
            content_height: None.into(),
2
            column_context_menu: None.into(),
2
            on_lazy_load_scroll: None.into(),
2
            on_column_click: None.into(),
2
            on_row_click: None.into(),
2
        }
2
    }
}
/// Row of the ListView
#[derive(Debug, Clone)]
#[repr(C)]
pub struct ListViewRow {
    /// Each cell is an opaque Dom object
    pub cells: DomVec,
    /// Height of the row, if known beforehand
    pub height: OptionPixelValueNoPercent,
}
impl_option!(ListViewRow, OptionListViewRow, copy = false, [Debug, Clone]);
impl_vec!(ListViewRow, ListViewRowVec, ListViewRowVecDestructor, ListViewRowVecDestructorType, ListViewRowVecSlice, OptionListViewRow);
impl_vec_clone!(ListViewRow, ListViewRowVec, ListViewRowVecDestructor);
impl_vec_mut!(ListViewRow, ListViewRowVec);
impl_vec_debug!(ListViewRow, ListViewRowVec);
impl ListView {
    pub fn create(columns: StringVec) -> Self {
        Self {
            columns,
            ..Default::default()
        }
    }
    pub fn swap_with_default(&mut self) -> Self {
        let mut m = Self::default();
        core::mem::swap(&mut m, self);
        m
    }
    pub fn with_columns(mut self, columns: StringVec) -> Self {
        self.set_columns(columns);
        self
    }
    pub fn set_columns(&mut self, columns: StringVec) {
        self.columns = columns;
    }
    pub fn with_rows(mut self, rows: ListViewRowVec) -> Self {
        self.set_rows(rows);
        self
    }
    pub fn set_rows(&mut self, rows: ListViewRowVec) {
        self.rows = rows;
    }
    /// The half-open range `[first, last)` of row indices visible in a
    /// vertically-scrolled, fixed-row-height list — the windowing core for
    /// virtualizing a long `ListView` (render only these rows instead of all of
    /// them, the way the MapWidget's VirtualView renders only visible tiles).
    /// `scroll_y` is pixels scrolled past the top, `viewport_height` the visible
    /// height; one extra row is included so a row straddling the bottom edge
    /// still renders. Returns `(0, 0)` for degenerate input (no rows, a
    /// non-positive/non-finite height, or non-finite scroll), and an empty range
    /// `(total, total)` once scrolled past the end.
7
    pub fn visible_row_range(
7
        scroll_y: f32,
7
        viewport_height: f32,
7
        row_height: f32,
7
        total_rows: usize,
7
    ) -> (usize, usize) {
7
        if total_rows == 0
6
            || !row_height.is_finite()
6
            || row_height <= 0.0
5
            || !viewport_height.is_finite()
5
            || viewport_height <= 0.0
5
            || !scroll_y.is_finite()
        {
3
            return (0, 0);
4
        }
4
        let first = (scroll_y.max(0.0) / row_height).floor() as usize;
4
        if first >= total_rows {
1
            return (total_rows, total_rows);
3
        }
3
        let visible = (viewport_height / row_height).ceil() as usize + 1;
3
        let last = (first + visible).min(total_rows);
3
        (first, last)
7
    }
    pub fn with_sorted_by(mut self, sorted_by: OptionUsize) -> Self {
        self.set_sorted_by(sorted_by);
        self
    }
    pub fn set_sorted_by(&mut self, sorted_by: OptionUsize) {
        self.sorted_by = sorted_by;
    }
    pub fn with_scroll_offset(mut self, scroll_offset: PixelValueNoPercent) -> Self {
        self.set_scroll_offset(scroll_offset);
        self
    }
    pub fn set_scroll_offset(&mut self, scroll_offset: PixelValueNoPercent) {
        self.scroll_offset = scroll_offset;
    }
    pub fn with_content_height(mut self, content_height: PixelValueNoPercent) -> Self {
        self.set_content_height(content_height);
        self
    }
    pub fn set_content_height(&mut self, content_height: PixelValueNoPercent) {
        self.content_height = Some(content_height).into();
    }
    pub fn with_column_context_menu(mut self, context_menu: Menu) -> Self {
        self.set_column_context_menu(context_menu);
        self
    }
    pub fn set_column_context_menu(&mut self, column_context_menu: Menu) {
        self.column_context_menu = Some(column_context_menu).into();
    }
    pub fn with_on_column_click<C: Into<ListViewOnColumnClickCallback>>(
        mut self,
        refany: RefAny,
        on_column_click: C,
    ) -> Self {
        self.set_on_column_click(refany, on_column_click);
        self
    }
    pub fn set_on_column_click<C: Into<ListViewOnColumnClickCallback>>(
        &mut self,
        refany: RefAny,
        on_column_click: C,
    ) {
        self.on_column_click = Some(ListViewOnColumnClick {
            refany,
            callback: on_column_click.into(),
        })
        .into();
    }
    pub fn with_on_row_click<C: Into<ListViewOnRowClickCallback>>(
        mut self,
        refany: RefAny,
        on_row_click: C,
    ) -> Self {
        self.set_on_row_click(refany, on_row_click);
        self
    }
1
    pub fn set_on_row_click<C: Into<ListViewOnRowClickCallback>>(
1
        &mut self,
1
        refany: RefAny,
1
        on_row_click: C,
1
    ) {
1
        self.on_row_click = Some(ListViewOnRowClick {
1
            refany,
1
            callback: on_row_click.into(),
1
        })
1
        .into();
1
    }
2
    pub fn dom(self) -> Dom {
        // Snapshot the state handed to row/column click callbacks. Runtime-only
        // fields (scroll position / content height) aren't known at build time,
        // so they default to zero; columns/sorted_by/row-count/scroll-offset are.
2
        let state = ListViewState {
2
            columns: self.columns.clone(),
2
            sorted_by: self.sorted_by,
2
            current_row_count: self.rows.as_ref().len(),
2
            scroll_offset: self.scroll_offset,
2
            current_scroll_position: LogicalPosition::zero(),
2
            current_content_height: LogicalSize::zero(),
2
        };
2
        let on_column_click = self.on_column_click.clone();
2
        let on_row_click = self.on_row_click.clone();
2
        Dom::create_div()
2
            .with_css_props(CSS_MATCH_17553577885456905601)
2
            .with_ids_and_classes(LIST_VIEW_CONTAINER_CLASS)
2
            .with_children(DomVec::from_vec(vec![
                // header
2
                Dom::create_div()
2
                    .with_css_props(CSS_MATCH_15315949193378715186)
2
                    .with_ids_and_classes(HEADER_CONTAINER_CLASS)
2
                    .with_children(
2
                        self.columns
2
                            .iter()
2
                            .enumerate()
2
                            .map(|(col_index, col)| {
                                let col_dom = Dom::create_div()
                                    .with_css_props(CSS_MATCH_12498280255863106397)
                                    .with_ids_and_classes(COLUMN_NAME_CLASS)
                                    .with_child({
                                        Dom::create_text(col.clone())
                                            .with_css_props(CSS_MATCH_15673486787900743642)
                                    });
                                // Wire the click only when the app set a handler.
                                match &on_column_click {
                                    OptionListViewOnColumnClick::Some(_) => col_dom.with_callbacks(
                                        vec![CoreCallbackData {
                                            event: EventFilter::Hover(HoverEventFilter::MouseUp),
                                            refany: RefAny::new(ColumnClickData {
                                                col_index,
                                                state: state.clone(),
                                                on_column_click: on_column_click.clone(),
                                            }),
                                            callback: CoreCallback {
                                                cb: on_list_view_column_click as usize,
                                                ctx: OptionRefAny::None,
                                            },
                                        }]
                                        .into(),
                                    ),
                                    OptionListViewOnColumnClick::None => col_dom,
                                }
                            })
2
                            .collect::<Vec<_>>()
2
                            .into(),
                    ),
                // rows
2
                Dom::create_div()
2
                    .with_css_props(CSS_MATCH_4852927511892172364)
2
                    .with_ids_and_classes(ROW_CONTAINER_CLASS)
2
                    .with_children(
2
                        self.rows
2
                            .into_iter()
2
                            .enumerate()
3
                            .map(|(row_index, row)| {
3
                                let row_dom = Dom::create_div()
3
                                    .with_css_props(CSS_MATCH_7894335449545988724)
3
                                    .with_ids_and_classes(ROW_CLASS.clone())
3
                                    .with_tab_index(TabIndex::Auto)
3
                                    .with_children(
3
                                        row.cells
3
                                            .as_ref()
3
                                            .iter()
3
                                            .map(|cell| {
                                                Dom::create_div()
                                                    .with_css_props(CSS_MATCH_12980082330151137475)
                                                    .with_ids_and_classes(CELL_CLASS)
                                                    .with_child(cell.clone())
                                            })
3
                                            .collect::<Vec<_>>()
3
                                            .into(),
                                    );
3
                                match &on_row_click {
2
                                    OptionListViewOnRowClick::Some(_) => row_dom.with_callbacks(
2
                                        vec![CoreCallbackData {
2
                                            event: EventFilter::Hover(HoverEventFilter::MouseUp),
2
                                            refany: RefAny::new(RowClickData {
2
                                                row_index,
2
                                                state: state.clone(),
2
                                                on_row_click: on_row_click.clone(),
2
                                            }),
2
                                            callback: CoreCallback {
2
                                                cb: on_list_view_row_click as usize,
2
                                                ctx: OptionRefAny::None,
2
                                            },
2
                                        }]
2
                                        .into(),
                                    ),
1
                                    OptionListViewOnRowClick::None => row_dom,
                                }
3
                            })
2
                            .collect::<Vec<_>>()
2
                            .into(),
                    ),
            ]))
2
    }
}
/// Per-row data carried to the internal MouseUp handler (the row index plus a
/// snapshot of the list state and the app's `on_row_click` hook).
struct RowClickData {
    row_index: usize,
    state: ListViewState,
    on_row_click: OptionListViewOnRowClick,
}
/// Per-column equivalent of [`RowClickData`].
struct ColumnClickData {
    col_index: usize,
    state: ListViewState,
    on_column_click: OptionListViewOnColumnClick,
}
/// MouseUp on a row → invoke the app's `on_row_click(state, row_index)`.
extern "C" fn on_list_view_row_click(mut refany: RefAny, info: CallbackInfo) -> Update {
    let data = match refany.downcast_ref::<RowClickData>() {
        Some(d) => d,
        None => return Update::DoNothing,
    };
    match data.on_row_click.as_ref() {
        Some(ListViewOnRowClick { refany: user_data, callback }) => {
            (callback.cb)(user_data.clone(), info.clone(), data.state.clone(), data.row_index)
        }
        None => Update::DoNothing,
    }
}
/// MouseUp on a column header → invoke the app's `on_column_click(state, col_index)`.
extern "C" fn on_list_view_column_click(mut refany: RefAny, info: CallbackInfo) -> Update {
    let data = match refany.downcast_ref::<ColumnClickData>() {
        Some(d) => d,
        None => return Update::DoNothing,
    };
    match data.on_column_click.as_ref() {
        Some(ListViewOnColumnClick { refany: user_data, callback }) => {
            (callback.cb)(user_data.clone(), info.clone(), data.state.clone(), data.col_index)
        }
        None => Update::DoNothing,
    }
}
#[cfg(test)]
mod list_view_click_tests {
    use super::*;
    /// The windowing core for ListView virtualization: only the visible rows
    /// (+1 straddling the bottom) are in range, the range tracks scroll, clamps
    /// to the row count, and degenerate input yields an empty range.
    #[test]
1
    fn visible_row_range_windows_correctly() {
        // 100 rows × 20px, 200px viewport → 10 full rows + 1 partial.
1
        assert_eq!(ListView::visible_row_range(0.0, 200.0, 20.0, 100), (0, 11));
        // Scrolled 50px → first row = floor(50/20) = 2.
1
        assert_eq!(ListView::visible_row_range(50.0, 200.0, 20.0, 100), (2, 13));
        // Near the end → clamped to the row count.
1
        assert_eq!(ListView::visible_row_range(1900.0, 200.0, 20.0, 100), (95, 100));
        // Scrolled past the end → empty range at the tail.
1
        assert_eq!(ListView::visible_row_range(5000.0, 200.0, 20.0, 100), (100, 100));
        // Degenerate inputs → empty.
1
        assert_eq!(ListView::visible_row_range(0.0, 200.0, 20.0, 0), (0, 0));
1
        assert_eq!(ListView::visible_row_range(0.0, 200.0, 0.0, 100), (0, 0));
1
        assert_eq!(ListView::visible_row_range(f32::NAN, 200.0, 20.0, 100), (0, 0));
1
    }
    extern "C" fn noop_row(_: RefAny, _: CallbackInfo, _: ListViewState, _: usize) -> Update {
        Update::DoNothing
    }
3
    fn empty_row() -> ListViewRow {
3
        ListViewRow {
3
            cells: DomVec::from_const_slice(&[]),
3
            height: None.into(),
3
        }
3
    }
    /// Rows must carry a click callback exactly when `on_row_click` is set —
    /// previously `dom()` wired nothing, so the hook was dead.
    #[test]
1
    fn rows_get_a_click_callback_only_when_on_row_click_is_set() {
1
        let mut lv = ListView::default();
1
        lv.rows = ListViewRowVec::from_vec(vec![empty_row(), empty_row()]);
1
        lv.set_on_row_click(RefAny::new(()), noop_row as ListViewOnRowClickCallbackType);
1
        let dom = lv.dom();
        // children = [header, rows]; each row div carries the MouseUp callback.
1
        let rows = dom.children.as_ref()[1].children.as_ref();
1
        assert_eq!(rows.len(), 2);
3
        for row in rows {
2
            assert_eq!(
2
                row.root.callbacks.as_ref().len(),
                1,
                "row must carry the click callback when on_row_click is set"
            );
        }
        // Without the hook → no callbacks (opt-in, no wasted dispatch).
1
        let mut bare = ListView::default();
1
        bare.rows = ListViewRowVec::from_vec(vec![empty_row()]);
1
        let dom2 = bare.dom();
1
        let rows2 = dom2.children.as_ref()[1].children.as_ref();
1
        assert_eq!(rows2.len(), 1);
1
        assert!(
1
            rows2[0].root.callbacks.as_ref().is_empty(),
            "no callback when on_row_click is unset"
        );
1
    }
}