wxrust 0.0.1-alpha

Binding for the wxCore library of the wxWidgets toolkit.
Documentation
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
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
use super::*;

// wxMask
wxwidgets! {
    /// This class encapsulates a monochrome mask bitmap, where the masked area is black and the unmasked area is white.
    /// - [`Mask`] represents a C++ `wxMask` class instance which your code has ownership, [`MaskIsOwned`]`<false>` represents one which don't own.
    /// - Use [`Mask`]'s `new()` or [`Buildable::builder()`] (if available) to create an instance of this class.
    /// - See [C++ `wxMask` class's documentation](https://docs.wxwidgets.org/3.2/classwx_mask.html) for more details.
    #[doc(alias = "wxMask")]
    #[doc(alias = "Mask")]
    class Mask
        = MaskIsOwned<true>(wxMask) impl
        MaskMethods,
        ObjectMethods
}
impl<const OWNED: bool> MaskIsOwned<OWNED> {
    /// Default constructor.
    ///
    /// See [C++ `wxMask::wxMask()`'s documentation](https://docs.wxwidgets.org/3.2/classwx_mask.html#aea603d0c86c663653d9c8d44db6b5a52).
    pub fn new() -> MaskIsOwned<OWNED> {
        unsafe { MaskIsOwned(ffi::wxMask_new()) }
    }
    /// Constructs a mask from a bitmap and a palette index that indicates the background.
    ///
    /// See [C++ `wxMask::wxMask()`'s documentation](https://docs.wxwidgets.org/3.2/classwx_mask.html#a79aeae2ab235833def3e83bc8284bf10).
    pub fn new_with_bitmap_int<B: BitmapMethods>(bitmap: &B, index: c_int) -> MaskIsOwned<OWNED> {
        unsafe {
            let bitmap = bitmap.as_ptr();
            MaskIsOwned(ffi::wxMask_new1(bitmap, index))
        }
    }
    /// Constructs a mask from a monochrome bitmap.
    ///
    /// See [C++ `wxMask::wxMask()`'s documentation](https://docs.wxwidgets.org/3.2/classwx_mask.html#a42712a00244539d25bbc2535c0e6c6c4).
    pub fn new_with_bitmap<B: BitmapMethods>(bitmap: &B) -> MaskIsOwned<OWNED> {
        unsafe {
            let bitmap = bitmap.as_ptr();
            MaskIsOwned(ffi::wxMask_new2(bitmap))
        }
    }
    /// Constructs a mask from a bitmap and a colour that indicates the background.
    ///
    /// See [C++ `wxMask::wxMask()`'s documentation](https://docs.wxwidgets.org/3.2/classwx_mask.html#a4ee5ba148d135c1c512aab5d099b5dc5).
    pub fn new_with_bitmap_colour<B: BitmapMethods, C: ColourMethods>(
        bitmap: &B,
        colour: &C,
    ) -> MaskIsOwned<OWNED> {
        unsafe {
            let bitmap = bitmap.as_ptr();
            let colour = colour.as_ptr();
            MaskIsOwned(ffi::wxMask_new3(bitmap, colour))
        }
    }
    pub fn none() -> Option<&'static Self> {
        None
    }
}
impl Clone for MaskIsOwned<false> {
    fn clone(&self) -> Self {
        Self(self.0)
    }
}
impl<const OWNED: bool> From<MaskIsOwned<OWNED>> for ObjectIsOwned<OWNED> {
    fn from(o: MaskIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> DynamicCast for MaskIsOwned<OWNED> {
    fn class_info() -> ClassInfoIsOwned<false> {
        unsafe { ClassInfoIsOwned::from_ptr(ffi::wxMask_CLASSINFO()) }
    }
}
impl<const OWNED: bool> Drop for MaskIsOwned<OWNED> {
    fn drop(&mut self) {
        if OWNED {
            unsafe { ffi::wxObject_delete(self.0) }
        }
    }
}

// wxMaximizeEvent
wxwidgets! {
    /// An event being sent when a top level window is maximized.
    /// - [`MaximizeEvent`] represents a C++ `wxMaximizeEvent` class instance which your code has ownership, [`MaximizeEventIsOwned`]`<false>` represents one which don't own.
    /// - Use [`MaximizeEvent`]'s `new()` or [`Buildable::builder()`] (if available) to create an instance of this class.
    /// - See [C++ `wxMaximizeEvent` class's documentation](https://docs.wxwidgets.org/3.2/classwx_maximize_event.html) for more details.
    #[doc(alias = "wxMaximizeEvent")]
    #[doc(alias = "MaximizeEvent")]
    class MaximizeEvent
        = MaximizeEventIsOwned<true>(wxMaximizeEvent) impl
        MaximizeEventMethods,
        EventMethods,
        ObjectMethods
}
impl<const OWNED: bool> MaximizeEventIsOwned<OWNED> {
    /// Constructor.
    ///
    /// See [C++ `wxMaximizeEvent::wxMaximizeEvent()`'s documentation](https://docs.wxwidgets.org/3.2/classwx_maximize_event.html#ac10b3d281efd119efcd700af7ed902f5).
    pub fn new(id: c_int) -> MaximizeEventIsOwned<OWNED> {
        unsafe { MaximizeEventIsOwned(ffi::wxMaximizeEvent_new(id)) }
    }
    pub fn none() -> Option<&'static Self> {
        None
    }
}
impl Clone for MaximizeEventIsOwned<false> {
    fn clone(&self) -> Self {
        Self(self.0)
    }
}
impl<const OWNED: bool> From<MaximizeEventIsOwned<OWNED>> for EventIsOwned<OWNED> {
    fn from(o: MaximizeEventIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> From<MaximizeEventIsOwned<OWNED>> for ObjectIsOwned<OWNED> {
    fn from(o: MaximizeEventIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> DynamicCast for MaximizeEventIsOwned<OWNED> {
    fn class_info() -> ClassInfoIsOwned<false> {
        unsafe { ClassInfoIsOwned::from_ptr(ffi::wxMaximizeEvent_CLASSINFO()) }
    }
}
impl<const OWNED: bool> Drop for MaximizeEventIsOwned<OWNED> {
    fn drop(&mut self) {
        if OWNED {
            unsafe { ffi::wxObject_delete(self.0) }
        }
    }
}

// wxMemoryDC
wxwidgets! {
    /// A memory device context provides a means to draw graphics onto a bitmap.
    /// - [`MemoryDC`] represents a C++ `wxMemoryDC` class instance which your code has ownership, [`MemoryDCIsOwned`]`<false>` represents one which don't own.
    /// - Use [`MemoryDC`]'s `new()` or [`Buildable::builder()`] (if available) to create an instance of this class.
    /// - See [C++ `wxMemoryDC` class's documentation](https://docs.wxwidgets.org/3.2/classwx_memory_d_c.html) for more details.
    #[doc(alias = "wxMemoryDC")]
    #[doc(alias = "MemoryDC")]
    class MemoryDC
        = MemoryDCIsOwned<true>(wxMemoryDC) impl
        MemoryDCMethods,
        DCMethods,
        ObjectMethods
}
impl<const OWNED: bool> MemoryDCIsOwned<OWNED> {
    /// Constructs a new memory device context.
    ///
    /// See [C++ `wxMemoryDC::wxMemoryDC()`'s documentation](https://docs.wxwidgets.org/3.2/classwx_memory_d_c.html#a381e4c13a2df5b4915789b26fe43fd8b).
    pub fn new() -> MemoryDCIsOwned<OWNED> {
        unsafe { MemoryDCIsOwned(ffi::wxMemoryDC_new()) }
    }
    /// Constructs a new memory device context having the same characteristics as the given existing device context.
    ///
    /// See [C++ `wxMemoryDC::wxMemoryDC()`'s documentation](https://docs.wxwidgets.org/3.2/classwx_memory_d_c.html#aaa30d5e8f9caa2a3a727296226488a8d).
    pub fn new_with_dc<D: DCMethods>(dc: Option<&D>) -> MemoryDCIsOwned<OWNED> {
        unsafe {
            let dc = match dc {
                Some(r) => r.as_ptr(),
                None => ptr::null_mut(),
            };
            MemoryDCIsOwned(ffi::wxMemoryDC_new1(dc))
        }
    }
    /// Constructs a new memory device context and calls SelectObject() with the given bitmap.
    ///
    /// See [C++ `wxMemoryDC::wxMemoryDC()`'s documentation](https://docs.wxwidgets.org/3.2/classwx_memory_d_c.html#ab6d6febe55bb6fbbac655cdaf1a719d2).
    pub fn new_with_bitmap<B: BitmapMethods>(bitmap: &B) -> MemoryDCIsOwned<OWNED> {
        unsafe {
            let bitmap = bitmap.as_ptr();
            MemoryDCIsOwned(ffi::wxMemoryDC_new2(bitmap))
        }
    }
    pub fn none() -> Option<&'static Self> {
        None
    }
}
impl Clone for MemoryDCIsOwned<false> {
    fn clone(&self) -> Self {
        Self(self.0)
    }
}
impl<const OWNED: bool> From<MemoryDCIsOwned<OWNED>> for DCIsOwned<OWNED> {
    fn from(o: MemoryDCIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> From<MemoryDCIsOwned<OWNED>> for ObjectIsOwned<OWNED> {
    fn from(o: MemoryDCIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> DynamicCast for MemoryDCIsOwned<OWNED> {
    fn class_info() -> ClassInfoIsOwned<false> {
        unsafe { ClassInfoIsOwned::from_ptr(ffi::wxMemoryDC_CLASSINFO()) }
    }
}
impl<const OWNED: bool> Drop for MemoryDCIsOwned<OWNED> {
    fn drop(&mut self) {
        if OWNED {
            unsafe { ffi::wxObject_delete(self.0) }
        }
    }
}

// wxMenu
wxwidgets! {
    /// A menu is a popup (or pull down) list of items, one of which may be selected before the menu goes away (clicking elsewhere dismisses the menu).
    /// - [`Menu`] represents a C++ `wxMenu` class instance which your code has ownership, [`MenuIsOwned`]`<false>` represents one which don't own.
    /// - Use [`Menu`]'s `new()` or [`Buildable::builder()`] (if available) to create an instance of this class.
    /// - See [C++ `wxMenu` class's documentation](https://docs.wxwidgets.org/3.2/classwx_menu.html) for more details.
    #[doc(alias = "wxMenu")]
    #[doc(alias = "Menu")]
    class Menu
        = MenuIsOwned<true>(wxMenu) impl
        MenuMethods,
        EvtHandlerMethods,
        ObjectMethods
}
impl<const OWNED: bool> MenuIsOwned<OWNED> {
    /// Constructs a wxMenu object.
    ///
    /// See [C++ `wxMenu::wxMenu()`'s documentation](https://docs.wxwidgets.org/3.2/classwx_menu.html#af8b5588bdd1ef7c94ac542adf91915ed).
    pub fn new() -> MenuIsOwned<OWNED> {
        unsafe { MenuIsOwned(ffi::wxMenu_new()) }
    }
    /// Constructs a wxMenu object.
    ///
    /// See [C++ `wxMenu::wxMenu()`'s documentation](https://docs.wxwidgets.org/3.2/classwx_menu.html#a462f0ad758ef3d32b8a6a2a1d9c5c43f).
    pub fn new_with_long(style: c_long) -> MenuIsOwned<OWNED> {
        unsafe { MenuIsOwned(ffi::wxMenu_new1(style)) }
    }
    /// Constructs a wxMenu object with a title.
    ///
    /// See [C++ `wxMenu::wxMenu()`'s documentation](https://docs.wxwidgets.org/3.2/classwx_menu.html#a9a6afd553257ebd8040305f21ec6094e).
    pub fn new_with_str(title: &str, style: c_long) -> MenuIsOwned<OWNED> {
        unsafe {
            let title = WxString::from(title);
            let title = title.as_ptr();
            MenuIsOwned(ffi::wxMenu_new2(title, style))
        }
    }
    pub fn none() -> Option<&'static Self> {
        None
    }
}
impl<const OWNED: bool> Clone for MenuIsOwned<OWNED> {
    fn clone(&self) -> Self {
        Self(self.0)
    }
}
impl<const OWNED: bool> From<MenuIsOwned<OWNED>> for EvtHandlerIsOwned<OWNED> {
    fn from(o: MenuIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> From<MenuIsOwned<OWNED>> for ObjectIsOwned<OWNED> {
    fn from(o: MenuIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> DynamicCast for MenuIsOwned<OWNED> {
    fn class_info() -> ClassInfoIsOwned<false> {
        unsafe { ClassInfoIsOwned::from_ptr(ffi::wxMenu_CLASSINFO()) }
    }
}

// wxMenuBar
wxwidgets! {
    /// A menu bar is a series of menus accessible from the top of a frame.
    /// - [`MenuBar`] represents a C++ `wxMenuBar` class instance which your code has ownership, [`MenuBarIsOwned`]`<false>` represents one which don't own.
    /// - Use [`MenuBar`]'s `new()` or [`Buildable::builder()`] (if available) to create an instance of this class.
    /// - See [C++ `wxMenuBar` class's documentation](https://docs.wxwidgets.org/3.2/classwx_menu_bar.html) for more details.
    #[doc(alias = "wxMenuBar")]
    #[doc(alias = "MenuBar")]
    class MenuBar
        = MenuBarIsOwned<true>(wxMenuBar) impl
        MenuBarMethods,
        WindowMethods,
        EvtHandlerMethods,
        ObjectMethods
}
impl<const OWNED: bool> MenuBarIsOwned<OWNED> {
    /// Construct an empty menu bar.
    ///
    /// See [C++ `wxMenuBar::wxMenuBar()`'s documentation](https://docs.wxwidgets.org/3.2/classwx_menu_bar.html#aebc5627ed35e364d6a9785e22c0dde85).
    pub fn new(style: c_long) -> MenuBarIsOwned<OWNED> {
        unsafe { MenuBarIsOwned(ffi::wxMenuBar_new(style)) }
    }
    // NOT_SUPPORTED: fn wxMenuBar1()
    pub fn none() -> Option<&'static Self> {
        None
    }
}
impl<const OWNED: bool> Clone for MenuBarIsOwned<OWNED> {
    fn clone(&self) -> Self {
        Self(self.0)
    }
}
impl<const OWNED: bool> From<MenuBarIsOwned<OWNED>> for WindowIsOwned<OWNED> {
    fn from(o: MenuBarIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> From<MenuBarIsOwned<OWNED>> for EvtHandlerIsOwned<OWNED> {
    fn from(o: MenuBarIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> From<MenuBarIsOwned<OWNED>> for ObjectIsOwned<OWNED> {
    fn from(o: MenuBarIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> DynamicCast for MenuBarIsOwned<OWNED> {
    fn class_info() -> ClassInfoIsOwned<false> {
        unsafe { ClassInfoIsOwned::from_ptr(ffi::wxMenuBar_CLASSINFO()) }
    }
}

// wxMenuEvent
wxwidgets! {
    /// This class is used for a variety of menu-related events.
    /// - [`MenuEvent`] represents a C++ `wxMenuEvent` class instance which your code has ownership, [`MenuEventIsOwned`]`<false>` represents one which don't own.
    /// - Use [`MenuEvent`]'s `new()` or [`Buildable::builder()`] (if available) to create an instance of this class.
    /// - See [C++ `wxMenuEvent` class's documentation](https://docs.wxwidgets.org/3.2/classwx_menu_event.html) for more details.
    #[doc(alias = "wxMenuEvent")]
    #[doc(alias = "MenuEvent")]
    class MenuEvent
        = MenuEventIsOwned<true>(wxMenuEvent) impl
        MenuEventMethods,
        EventMethods,
        ObjectMethods
}
impl<const OWNED: bool> MenuEventIsOwned<OWNED> {
    // NOT_SUPPORTED: fn wxMenuEvent()
    pub fn none() -> Option<&'static Self> {
        None
    }
}
impl Clone for MenuEventIsOwned<false> {
    fn clone(&self) -> Self {
        Self(self.0)
    }
}
impl<const OWNED: bool> From<MenuEventIsOwned<OWNED>> for EventIsOwned<OWNED> {
    fn from(o: MenuEventIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> From<MenuEventIsOwned<OWNED>> for ObjectIsOwned<OWNED> {
    fn from(o: MenuEventIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> DynamicCast for MenuEventIsOwned<OWNED> {
    fn class_info() -> ClassInfoIsOwned<false> {
        unsafe { ClassInfoIsOwned::from_ptr(ffi::wxMenuEvent_CLASSINFO()) }
    }
}
impl<const OWNED: bool> Drop for MenuEventIsOwned<OWNED> {
    fn drop(&mut self) {
        if OWNED {
            unsafe { ffi::wxObject_delete(self.0) }
        }
    }
}

// wxMenuItem
wxwidgets! {
    /// A menu item represents an item in a menu.
    /// - [`MenuItem`] represents a C++ `wxMenuItem` class instance which your code has ownership, [`MenuItemIsOwned`]`<false>` represents one which don't own.
    /// - Use [`MenuItem`]'s `new()` or [`Buildable::builder()`] (if available) to create an instance of this class.
    /// - See [C++ `wxMenuItem` class's documentation](https://docs.wxwidgets.org/3.2/classwx_menu_item.html) for more details.
    #[doc(alias = "wxMenuItem")]
    #[doc(alias = "MenuItem")]
    class MenuItem
        = MenuItemIsOwned<true>(wxMenuItem) impl
        MenuItemMethods,
        ObjectMethods
}
impl<const OWNED: bool> MenuItemIsOwned<OWNED> {
    /// Constructs a wxMenuItem object.
    ///
    /// See [C++ `wxMenuItem::wxMenuItem()`'s documentation](https://docs.wxwidgets.org/3.2/classwx_menu_item.html#a6e9b0e1b786fa84250a42c88d84aed2b).
    pub fn new<M: MenuMethods, M2: MenuMethods>(
        parent_menu: Option<&M>,
        id: c_int,
        text: &str,
        help_string: &str,
        kind: c_int,
        sub_menu: Option<&M2>,
    ) -> MenuItemIsOwned<OWNED> {
        unsafe {
            let parent_menu = match parent_menu {
                Some(r) => r.as_ptr(),
                None => ptr::null_mut(),
            };
            let text = WxString::from(text);
            let text = text.as_ptr();
            let help_string = WxString::from(help_string);
            let help_string = help_string.as_ptr();
            let sub_menu = match sub_menu {
                Some(r) => r.as_ptr(),
                None => ptr::null_mut(),
            };
            MenuItemIsOwned(ffi::wxMenuItem_new(
                parent_menu,
                id,
                text,
                help_string,
                kind,
                sub_menu,
            ))
        }
    }
    pub fn none() -> Option<&'static Self> {
        None
    }
}
impl Clone for MenuItemIsOwned<false> {
    fn clone(&self) -> Self {
        Self(self.0)
    }
}
impl<const OWNED: bool> From<MenuItemIsOwned<OWNED>> for ObjectIsOwned<OWNED> {
    fn from(o: MenuItemIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> DynamicCast for MenuItemIsOwned<OWNED> {
    fn class_info() -> ClassInfoIsOwned<false> {
        unsafe { ClassInfoIsOwned::from_ptr(ffi::wxMenuItem_CLASSINFO()) }
    }
}
impl<const OWNED: bool> Drop for MenuItemIsOwned<OWNED> {
    fn drop(&mut self) {
        if OWNED {
            unsafe { ffi::wxObject_delete(self.0) }
        }
    }
}

// wxMessageDialog
wxwidgets! {
    /// This class represents a dialog that shows a single or multi-line message, with a choice of OK, Yes, No and Cancel buttons.
    /// - [`MessageDialog`] represents a C++ `wxMessageDialog` class instance which your code has ownership, [`MessageDialogIsOwned`]`<false>` represents one which don't own.
    /// - Use [`MessageDialog`]'s `new()` or [`Buildable::builder()`] (if available) to create an instance of this class.
    /// - See [C++ `wxMessageDialog` class's documentation](https://docs.wxwidgets.org/3.2/classwx_message_dialog.html) for more details.
    #[doc(alias = "wxMessageDialog")]
    #[doc(alias = "MessageDialog")]
    class MessageDialog
        = MessageDialogIsOwned<true>(wxMessageDialog) impl
        MessageDialogMethods,
        DialogMethods,
        TopLevelWindowMethods,
        NonOwnedWindowMethods,
        WindowMethods,
        EvtHandlerMethods,
        ObjectMethods
}
impl<const OWNED: bool> MessageDialogIsOwned<OWNED> {
    /// Constructor specifying the message box properties.
    ///
    /// See [C++ `wxMessageDialog::wxMessageDialog()`'s documentation](https://docs.wxwidgets.org/3.2/classwx_message_dialog.html#a444cfa18ba33da6cfe81d6a93c737d24).
    pub fn new<W: WindowMethods, P: PointMethods>(
        parent: Option<&W>,
        message: &str,
        caption: &str,
        style: c_long,
        pos: &P,
    ) -> MessageDialogIsOwned<OWNED> {
        unsafe {
            let parent = match parent {
                Some(r) => r.as_ptr(),
                None => ptr::null_mut(),
            };
            let message = WxString::from(message);
            let message = message.as_ptr();
            let caption = WxString::from(caption);
            let caption = caption.as_ptr();
            let pos = pos.as_ptr();
            MessageDialogIsOwned(ffi::wxMessageDialog_new(
                parent, message, caption, style, pos,
            ))
        }
    }
    pub fn none() -> Option<&'static Self> {
        None
    }
}
impl<const OWNED: bool> Clone for MessageDialogIsOwned<OWNED> {
    fn clone(&self) -> Self {
        Self(self.0)
    }
}
impl<const OWNED: bool> From<MessageDialogIsOwned<OWNED>> for DialogIsOwned<OWNED> {
    fn from(o: MessageDialogIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> From<MessageDialogIsOwned<OWNED>> for TopLevelWindowIsOwned<OWNED> {
    fn from(o: MessageDialogIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> From<MessageDialogIsOwned<OWNED>> for NonOwnedWindowIsOwned<OWNED> {
    fn from(o: MessageDialogIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> From<MessageDialogIsOwned<OWNED>> for WindowIsOwned<OWNED> {
    fn from(o: MessageDialogIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> From<MessageDialogIsOwned<OWNED>> for EvtHandlerIsOwned<OWNED> {
    fn from(o: MessageDialogIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> From<MessageDialogIsOwned<OWNED>> for ObjectIsOwned<OWNED> {
    fn from(o: MessageDialogIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> DynamicCast for MessageDialogIsOwned<OWNED> {
    fn class_info() -> ClassInfoIsOwned<false> {
        unsafe { ClassInfoIsOwned::from_ptr(ffi::wxMessageDialog_CLASSINFO()) }
    }
}

// wxMessageOutputMessageBox
wxwidgets! {
    /// Output messages by showing them in a message box.
    /// - [`MessageOutputMessageBox`] represents a C++ `wxMessageOutputMessageBox` class instance which your code has ownership, [`MessageOutputMessageBoxIsOwned`]`<false>` represents one which don't own.
    /// - Use [`MessageOutputMessageBox`]'s `new()` or [`Buildable::builder()`] (if available) to create an instance of this class.
    /// - See [C++ `wxMessageOutputMessageBox` class's documentation](https://docs.wxwidgets.org/3.2/classwx_message_output_message_box.html) for more details.
    #[doc(alias = "wxMessageOutputMessageBox")]
    #[doc(alias = "MessageOutputMessageBox")]
    class MessageOutputMessageBox
        = MessageOutputMessageBoxIsOwned<true>(wxMessageOutputMessageBox) impl
        MessageOutputMessageBoxMethods,
        MessageOutputMethods
}
impl<const OWNED: bool> MessageOutputMessageBoxIsOwned<OWNED> {
    /// Default constructor.
    ///
    /// See [C++ `wxMessageOutputMessageBox::wxMessageOutputMessageBox()`'s documentation](https://docs.wxwidgets.org/3.2/classwx_message_output_message_box.html#a3ce6041a24205714d3a446f43850d08b).
    pub fn new() -> MessageOutputMessageBoxIsOwned<OWNED> {
        unsafe { MessageOutputMessageBoxIsOwned(ffi::wxMessageOutputMessageBox_new()) }
    }
    pub fn none() -> Option<&'static Self> {
        None
    }
}
impl Clone for MessageOutputMessageBoxIsOwned<false> {
    fn clone(&self) -> Self {
        Self(self.0)
    }
}
impl<const OWNED: bool> From<MessageOutputMessageBoxIsOwned<OWNED>>
    for MessageOutputIsOwned<OWNED>
{
    fn from(o: MessageOutputMessageBoxIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> Drop for MessageOutputMessageBoxIsOwned<OWNED> {
    fn drop(&mut self) {
        if OWNED {
            unsafe { ffi::wxMessageOutputMessageBox_delete(self.0) }
        }
    }
}

// wxMiniFrame
wxwidgets! {
    /// A miniframe is a frame with a small title bar.
    /// - [`MiniFrame`] represents a C++ `wxMiniFrame` class instance which your code has ownership, [`MiniFrameIsOwned`]`<false>` represents one which don't own.
    /// - Use [`MiniFrame`]'s `new()` or [`Buildable::builder()`] (if available) to create an instance of this class.
    /// - See [C++ `wxMiniFrame` class's documentation](https://docs.wxwidgets.org/3.2/classwx_mini_frame.html) for more details.
    #[doc(alias = "wxMiniFrame")]
    #[doc(alias = "MiniFrame")]
    class MiniFrame
        = MiniFrameIsOwned<true>(wxMiniFrame) impl
        MiniFrameMethods,
        FrameMethods,
        // TopLevelWindowMethods,
        NonOwnedWindowMethods,
        WindowMethods,
        EvtHandlerMethods,
        ObjectMethods
}
impl<const OWNED: bool> MiniFrameIsOwned<OWNED> {
    /// Default ctor.
    ///
    /// See [C++ `wxMiniFrame::wxMiniFrame()`'s documentation](https://docs.wxwidgets.org/3.2/classwx_mini_frame.html#a10802f0d5e950024ea3d234974675679).
    pub fn new_2step() -> MiniFrameIsOwned<OWNED> {
        unsafe { MiniFrameIsOwned(ffi::wxMiniFrame_new()) }
    }
    /// Constructor, creating the window.
    ///
    /// See [C++ `wxMiniFrame::wxMiniFrame()`'s documentation](https://docs.wxwidgets.org/3.2/classwx_mini_frame.html#a19c1a9008b86260bd8e95c824df39cb9).
    pub fn new<W: WindowMethods, P: PointMethods, S: SizeMethods>(
        parent: Option<&W>,
        id: c_int,
        title: &str,
        pos: &P,
        size: &S,
        style: c_long,
        name: &str,
    ) -> MiniFrameIsOwned<OWNED> {
        unsafe {
            let parent = match parent {
                Some(r) => r.as_ptr(),
                None => ptr::null_mut(),
            };
            let title = WxString::from(title);
            let title = title.as_ptr();
            let pos = pos.as_ptr();
            let size = size.as_ptr();
            let name = WxString::from(name);
            let name = name.as_ptr();
            MiniFrameIsOwned(ffi::wxMiniFrame_new1(
                parent, id, title, pos, size, style, name,
            ))
        }
    }
    pub fn none() -> Option<&'static Self> {
        None
    }
}
impl<const OWNED: bool> Clone for MiniFrameIsOwned<OWNED> {
    fn clone(&self) -> Self {
        Self(self.0)
    }
}
impl<const OWNED: bool> From<MiniFrameIsOwned<OWNED>> for FrameIsOwned<OWNED> {
    fn from(o: MiniFrameIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> From<MiniFrameIsOwned<OWNED>> for TopLevelWindowIsOwned<OWNED> {
    fn from(o: MiniFrameIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> From<MiniFrameIsOwned<OWNED>> for NonOwnedWindowIsOwned<OWNED> {
    fn from(o: MiniFrameIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> From<MiniFrameIsOwned<OWNED>> for WindowIsOwned<OWNED> {
    fn from(o: MiniFrameIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> From<MiniFrameIsOwned<OWNED>> for EvtHandlerIsOwned<OWNED> {
    fn from(o: MiniFrameIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> From<MiniFrameIsOwned<OWNED>> for ObjectIsOwned<OWNED> {
    fn from(o: MiniFrameIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> DynamicCast for MiniFrameIsOwned<OWNED> {
    fn class_info() -> ClassInfoIsOwned<false> {
        unsafe { ClassInfoIsOwned::from_ptr(ffi::wxMiniFrame_CLASSINFO()) }
    }
}
impl<const OWNED: bool> TopLevelWindowMethods for MiniFrameIsOwned<OWNED> {
    /// Used in two-step frame construction.
    ///
    /// See [C++ `wxMiniFrame::Create()`'s documentation](https://docs.wxwidgets.org/3.2/classwx_mini_frame.html#a6091c19ff1f45bf4c0315b8bfbecc4a8).
    fn create_str<W: WindowMethods, P: PointMethods, S: SizeMethods>(
        &self,
        parent: Option<&W>,
        id: c_int,
        title: &str,
        pos: &P,
        size: &S,
        style: c_long,
        name: &str,
    ) -> bool {
        unsafe {
            let parent = match parent {
                Some(r) => r.as_ptr(),
                None => ptr::null_mut(),
            };
            let title = WxString::from(title);
            let title = title.as_ptr();
            let pos = pos.as_ptr();
            let size = size.as_ptr();
            let name = WxString::from(name);
            let name = name.as_ptr();
            ffi::wxMiniFrame_Create(self.as_ptr(), parent, id, title, pos, size, style, name)
        }
    }
}

// wxMirrorDC
wxwidgets! {
    /// wxMirrorDC is a simple wrapper class which is always associated with a real wxDC object and either forwards all of its operations to it without changes (no mirroring takes place) or exchanges x and y coordinates which makes it possible to reuse the same code to draw a figure and its mirror  i.e.
    /// - [`MirrorDC`] represents a C++ `wxMirrorDC` class instance which your code has ownership, [`MirrorDCIsOwned`]`<false>` represents one which don't own.
    /// - Use [`MirrorDC`]'s `new()` or [`Buildable::builder()`] (if available) to create an instance of this class.
    /// - See [C++ `wxMirrorDC` class's documentation](https://docs.wxwidgets.org/3.2/classwx_mirror_d_c.html) for more details.
    #[doc(alias = "wxMirrorDC")]
    #[doc(alias = "MirrorDC")]
    class MirrorDC
        = MirrorDCIsOwned<true>(wxMirrorDC) impl
        MirrorDCMethods,
        DCMethods,
        ObjectMethods
}
impl<const OWNED: bool> MirrorDCIsOwned<OWNED> {
    /// Creates a (maybe) mirrored DC associated with the real dc.
    ///
    /// See [C++ `wxMirrorDC::wxMirrorDC()`'s documentation](https://docs.wxwidgets.org/3.2/classwx_mirror_d_c.html#a9d3738dc3c28391d9bdcfaabf7bc1ed4).
    pub fn new<D: DCMethods>(dc: &D, mirror: bool) -> MirrorDCIsOwned<OWNED> {
        unsafe {
            let dc = dc.as_ptr();
            MirrorDCIsOwned(ffi::wxMirrorDC_new(dc, mirror))
        }
    }
    pub fn none() -> Option<&'static Self> {
        None
    }
}
impl Clone for MirrorDCIsOwned<false> {
    fn clone(&self) -> Self {
        Self(self.0)
    }
}
impl<const OWNED: bool> From<MirrorDCIsOwned<OWNED>> for DCIsOwned<OWNED> {
    fn from(o: MirrorDCIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> From<MirrorDCIsOwned<OWNED>> for ObjectIsOwned<OWNED> {
    fn from(o: MirrorDCIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> DynamicCast for MirrorDCIsOwned<OWNED> {
    fn class_info() -> ClassInfoIsOwned<false> {
        unsafe { ClassInfoIsOwned::from_ptr(ffi::wxMirrorDC_CLASSINFO()) }
    }
}
impl<const OWNED: bool> Drop for MirrorDCIsOwned<OWNED> {
    fn drop(&mut self) {
        if OWNED {
            unsafe { ffi::wxObject_delete(self.0) }
        }
    }
}

// wxMouseCaptureChangedEvent
wxwidgets! {
    /// A mouse capture changed event is sent to a window that loses its mouse capture.
    /// - [`MouseCaptureChangedEvent`] represents a C++ `wxMouseCaptureChangedEvent` class instance which your code has ownership, [`MouseCaptureChangedEventIsOwned`]`<false>` represents one which don't own.
    /// - Use [`MouseCaptureChangedEvent`]'s `new()` or [`Buildable::builder()`] (if available) to create an instance of this class.
    /// - See [C++ `wxMouseCaptureChangedEvent` class's documentation](https://docs.wxwidgets.org/3.2/classwx_mouse_capture_changed_event.html) for more details.
    #[doc(alias = "wxMouseCaptureChangedEvent")]
    #[doc(alias = "MouseCaptureChangedEvent")]
    class MouseCaptureChangedEvent
        = MouseCaptureChangedEventIsOwned<true>(wxMouseCaptureChangedEvent) impl
        MouseCaptureChangedEventMethods,
        EventMethods,
        ObjectMethods
}
impl<const OWNED: bool> MouseCaptureChangedEventIsOwned<OWNED> {
    /// Constructor.
    ///
    /// See [C++ `wxMouseCaptureChangedEvent::wxMouseCaptureChangedEvent()`'s documentation](https://docs.wxwidgets.org/3.2/classwx_mouse_capture_changed_event.html#aefe355de68756bc9e396bca92d9a65c7).
    pub fn new<W: WindowMethods>(
        window_id: c_int,
        gained_capture: Option<&W>,
    ) -> MouseCaptureChangedEventIsOwned<OWNED> {
        unsafe {
            let gained_capture = match gained_capture {
                Some(r) => r.as_ptr(),
                None => ptr::null_mut(),
            };
            MouseCaptureChangedEventIsOwned(ffi::wxMouseCaptureChangedEvent_new(
                window_id,
                gained_capture,
            ))
        }
    }
    pub fn none() -> Option<&'static Self> {
        None
    }
}
impl Clone for MouseCaptureChangedEventIsOwned<false> {
    fn clone(&self) -> Self {
        Self(self.0)
    }
}
impl<const OWNED: bool> From<MouseCaptureChangedEventIsOwned<OWNED>> for EventIsOwned<OWNED> {
    fn from(o: MouseCaptureChangedEventIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> From<MouseCaptureChangedEventIsOwned<OWNED>> for ObjectIsOwned<OWNED> {
    fn from(o: MouseCaptureChangedEventIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> DynamicCast for MouseCaptureChangedEventIsOwned<OWNED> {
    fn class_info() -> ClassInfoIsOwned<false> {
        unsafe { ClassInfoIsOwned::from_ptr(ffi::wxMouseCaptureChangedEvent_CLASSINFO()) }
    }
}
impl<const OWNED: bool> Drop for MouseCaptureChangedEventIsOwned<OWNED> {
    fn drop(&mut self) {
        if OWNED {
            unsafe { ffi::wxObject_delete(self.0) }
        }
    }
}

// wxMouseCaptureLostEvent
wxwidgets! {
    /// A mouse capture lost event is sent to a window that had obtained mouse capture, which was subsequently lost due to an "external" event (for example, when a dialog box is shown or if another application captures the mouse).
    /// - [`MouseCaptureLostEvent`] represents a C++ `wxMouseCaptureLostEvent` class instance which your code has ownership, [`MouseCaptureLostEventIsOwned`]`<false>` represents one which don't own.
    /// - Use [`MouseCaptureLostEvent`]'s `new()` or [`Buildable::builder()`] (if available) to create an instance of this class.
    /// - See [C++ `wxMouseCaptureLostEvent` class's documentation](https://docs.wxwidgets.org/3.2/classwx_mouse_capture_lost_event.html) for more details.
    #[doc(alias = "wxMouseCaptureLostEvent")]
    #[doc(alias = "MouseCaptureLostEvent")]
    class MouseCaptureLostEvent
        = MouseCaptureLostEventIsOwned<true>(wxMouseCaptureLostEvent) impl
        MouseCaptureLostEventMethods,
        EventMethods,
        ObjectMethods
}
impl<const OWNED: bool> MouseCaptureLostEventIsOwned<OWNED> {
    /// Constructor.
    ///
    /// See [C++ `wxMouseCaptureLostEvent::wxMouseCaptureLostEvent()`'s documentation](https://docs.wxwidgets.org/3.2/classwx_mouse_capture_lost_event.html#aa769021cc73f8d63a752143f2e6467e9).
    pub fn new(window_id: c_int) -> MouseCaptureLostEventIsOwned<OWNED> {
        unsafe { MouseCaptureLostEventIsOwned(ffi::wxMouseCaptureLostEvent_new(window_id)) }
    }
    pub fn none() -> Option<&'static Self> {
        None
    }
}
impl Clone for MouseCaptureLostEventIsOwned<false> {
    fn clone(&self) -> Self {
        Self(self.0)
    }
}
impl<const OWNED: bool> From<MouseCaptureLostEventIsOwned<OWNED>> for EventIsOwned<OWNED> {
    fn from(o: MouseCaptureLostEventIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> From<MouseCaptureLostEventIsOwned<OWNED>> for ObjectIsOwned<OWNED> {
    fn from(o: MouseCaptureLostEventIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> DynamicCast for MouseCaptureLostEventIsOwned<OWNED> {
    fn class_info() -> ClassInfoIsOwned<false> {
        unsafe { ClassInfoIsOwned::from_ptr(ffi::wxMouseCaptureLostEvent_CLASSINFO()) }
    }
}
impl<const OWNED: bool> Drop for MouseCaptureLostEventIsOwned<OWNED> {
    fn drop(&mut self) {
        if OWNED {
            unsafe { ffi::wxObject_delete(self.0) }
        }
    }
}

// wxMouseEvent
wxwidgets! {
    /// This event class contains information about the events generated by the mouse: they include mouse buttons press and release events and mouse move events.
    /// - [`MouseEvent`] represents a C++ `wxMouseEvent` class instance which your code has ownership, [`MouseEventIsOwned`]`<false>` represents one which don't own.
    /// - Use [`MouseEvent`]'s `new()` or [`Buildable::builder()`] (if available) to create an instance of this class.
    /// - See [C++ `wxMouseEvent` class's documentation](https://docs.wxwidgets.org/3.2/classwx_mouse_event.html) for more details.
    #[doc(alias = "wxMouseEvent")]
    #[doc(alias = "MouseEvent")]
    class MouseEvent
        = MouseEventIsOwned<true>(wxMouseEvent) impl
        MouseEventMethods,
        EventMethods,
        ObjectMethods
}
impl<const OWNED: bool> MouseEventIsOwned<OWNED> {
    // NOT_SUPPORTED: fn wxMouseEvent()
    pub fn none() -> Option<&'static Self> {
        None
    }
}
impl Clone for MouseEventIsOwned<false> {
    fn clone(&self) -> Self {
        Self(self.0)
    }
}
impl<const OWNED: bool> From<MouseEventIsOwned<OWNED>> for EventIsOwned<OWNED> {
    fn from(o: MouseEventIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> From<MouseEventIsOwned<OWNED>> for ObjectIsOwned<OWNED> {
    fn from(o: MouseEventIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> DynamicCast for MouseEventIsOwned<OWNED> {
    fn class_info() -> ClassInfoIsOwned<false> {
        unsafe { ClassInfoIsOwned::from_ptr(ffi::wxMouseEvent_CLASSINFO()) }
    }
}
impl<const OWNED: bool> Drop for MouseEventIsOwned<OWNED> {
    fn drop(&mut self) {
        if OWNED {
            unsafe { ffi::wxObject_delete(self.0) }
        }
    }
}

// wxMouseEventsManager
wxwidgets! {
    /// Helper for handling mouse input events in windows containing multiple items.
    /// - [`MouseEventsManager`] represents a C++ `wxMouseEventsManager` class instance which your code has ownership, [`MouseEventsManagerIsOwned`]`<false>` represents one which don't own.
    /// - Use [`MouseEventsManager`]'s `new()` or [`Buildable::builder()`] (if available) to create an instance of this class.
    /// - See [C++ `wxMouseEventsManager` class's documentation](https://docs.wxwidgets.org/3.2/classwx_mouse_events_manager.html) for more details.
    #[doc(alias = "wxMouseEventsManager")]
    #[doc(alias = "MouseEventsManager")]
    class MouseEventsManager
        = MouseEventsManagerIsOwned<true>(wxMouseEventsManager) impl
        MouseEventsManagerMethods,
        EvtHandlerMethods,
        ObjectMethods
}
impl<const OWNED: bool> MouseEventsManagerIsOwned<OWNED> {
    // BLOCKED: fn wxMouseEventsManager()
    // BLOCKED: fn wxMouseEventsManager1()
    pub fn none() -> Option<&'static Self> {
        None
    }
}
impl<const OWNED: bool> Clone for MouseEventsManagerIsOwned<OWNED> {
    fn clone(&self) -> Self {
        Self(self.0)
    }
}
impl<const OWNED: bool> From<MouseEventsManagerIsOwned<OWNED>> for EvtHandlerIsOwned<OWNED> {
    fn from(o: MouseEventsManagerIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> From<MouseEventsManagerIsOwned<OWNED>> for ObjectIsOwned<OWNED> {
    fn from(o: MouseEventsManagerIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> DynamicCast for MouseEventsManagerIsOwned<OWNED> {
    fn class_info() -> ClassInfoIsOwned<false> {
        unsafe { ClassInfoIsOwned::from_ptr(ffi::wxMouseEventsManager_CLASSINFO()) }
    }
}

// wxMoveEvent
wxwidgets! {
    /// A move event holds information about window position change.
    /// - [`MoveEvent`] represents a C++ `wxMoveEvent` class instance which your code has ownership, [`MoveEventIsOwned`]`<false>` represents one which don't own.
    /// - Use [`MoveEvent`]'s `new()` or [`Buildable::builder()`] (if available) to create an instance of this class.
    /// - See [C++ `wxMoveEvent` class's documentation](https://docs.wxwidgets.org/3.2/classwx_move_event.html) for more details.
    #[doc(alias = "wxMoveEvent")]
    #[doc(alias = "MoveEvent")]
    class MoveEvent
        = MoveEventIsOwned<true>(wxMoveEvent) impl
        MoveEventMethods,
        EventMethods,
        ObjectMethods
}
impl<const OWNED: bool> MoveEventIsOwned<OWNED> {
    /// Constructor.
    ///
    /// See [C++ `wxMoveEvent::wxMoveEvent()`'s documentation](https://docs.wxwidgets.org/3.2/classwx_move_event.html#a420c53b7c6d48578a638f9b3d3a208ad).
    pub fn new<P: PointMethods>(pt: &P, id: c_int) -> MoveEventIsOwned<OWNED> {
        unsafe {
            let pt = pt.as_ptr();
            MoveEventIsOwned(ffi::wxMoveEvent_new(pt, id))
        }
    }
    pub fn none() -> Option<&'static Self> {
        None
    }
}
impl Clone for MoveEventIsOwned<false> {
    fn clone(&self) -> Self {
        Self(self.0)
    }
}
impl<const OWNED: bool> From<MoveEventIsOwned<OWNED>> for EventIsOwned<OWNED> {
    fn from(o: MoveEventIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> From<MoveEventIsOwned<OWNED>> for ObjectIsOwned<OWNED> {
    fn from(o: MoveEventIsOwned<OWNED>) -> Self {
        unsafe { Self::from_ptr(o.as_ptr()) }
    }
}
impl<const OWNED: bool> DynamicCast for MoveEventIsOwned<OWNED> {
    fn class_info() -> ClassInfoIsOwned<false> {
        unsafe { ClassInfoIsOwned::from_ptr(ffi::wxMoveEvent_CLASSINFO()) }
    }
}
impl<const OWNED: bool> Drop for MoveEventIsOwned<OWNED> {
    fn drop(&mut self) {
        if OWNED {
            unsafe { ffi::wxObject_delete(self.0) }
        }
    }
}