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
use super::*;
// wxOverlay
/// This trait represents [C++ `wxOverlay` class](https://docs.wxwidgets.org/3.2/classwx_overlay.html)'s methods and inheritance.
///
/// See [`OverlayIsOwned`] documentation for the class usage.
pub trait OverlayMethods: WxRustMethods {
// DTOR: fn ~wxOverlay()
/// Clears the overlay without restoring the former state.
///
/// See [C++ `wxOverlay::Reset()`'s documentation](https://docs.wxwidgets.org/3.2/classwx_overlay.html#a1e3141974ae247441862ab3604dfff2f).
fn reset(&self) {
unsafe { ffi::wxOverlay_Reset(self.as_ptr()) }
}
}
// wxOwnerDrawnComboBox
/// This trait represents [C++ `wxOwnerDrawnComboBox` class](https://docs.wxwidgets.org/3.2/classwx_owner_drawn_combo_box.html)'s methods and inheritance.
///
/// See [`OwnerDrawnComboBoxIsOwned`] documentation for the class usage.
pub trait OwnerDrawnComboBoxMethods: ComboCtrlMethods {
// DTOR: fn ~wxOwnerDrawnComboBox()
// NOT_SUPPORTED: fn Create1()
///
/// See [C++ `wxOwnerDrawnComboBox::Create()`'s documentation](https://docs.wxwidgets.org/3.2/classwx_owner_drawn_combo_box.html#a8117083f01a57671d333d6df72d23abf).
fn create_str_arraystring<
W: WindowMethods,
P: PointMethods,
S: SizeMethods,
A: ArrayStringMethods,
V: ValidatorMethods,
>(
&self,
parent: Option<&W>,
id: c_int,
value: &str,
pos: &P,
size: &S,
choices: &A,
style: c_long,
validator: &V,
name: &str,
) -> bool {
unsafe {
let parent = match parent {
Some(r) => r.as_ptr(),
None => ptr::null_mut(),
};
let value = WxString::from(value);
let value = value.as_ptr();
let pos = pos.as_ptr();
let size = size.as_ptr();
let choices = choices.as_ptr();
let validator = validator.as_ptr();
let name = WxString::from(name);
let name = name.as_ptr();
ffi::wxOwnerDrawnComboBox_Create2(
self.as_ptr(),
parent,
id,
value,
pos,
size,
choices,
style,
validator,
name,
)
}
}
/// Returns true if the list of combobox choices is empty.
///
/// See [C++ `wxOwnerDrawnComboBox::IsListEmpty()`'s documentation](https://docs.wxwidgets.org/3.2/classwx_owner_drawn_combo_box.html#a71dd15c398465339e360cf12d73361e1).
fn is_list_empty(&self) -> bool {
unsafe { ffi::wxOwnerDrawnComboBox_IsListEmpty(self.as_ptr()) }
}
/// Returns true if the text of the combobox is empty.
///
/// See [C++ `wxOwnerDrawnComboBox::IsTextEmpty()`'s documentation](https://docs.wxwidgets.org/3.2/classwx_owner_drawn_combo_box.html#a09355ba2a58d49676661ea85c0b0c3fe).
fn is_text_empty(&self) -> bool {
unsafe { ffi::wxOwnerDrawnComboBox_IsTextEmpty(self.as_ptr()) }
}
/// Returns index to the widest item in the list.
///
/// See [C++ `wxOwnerDrawnComboBox::GetWidestItem()`'s documentation](https://docs.wxwidgets.org/3.2/classwx_owner_drawn_combo_box.html#aada8ca321c213d2e4a28c01aa1c56c35).
fn get_widest_item(&self) -> c_int {
unsafe { ffi::wxOwnerDrawnComboBox_GetWidestItem(self.as_ptr()) }
}
/// Returns width of the widest item in the list.
///
/// See [C++ `wxOwnerDrawnComboBox::GetWidestItemWidth()`'s documentation](https://docs.wxwidgets.org/3.2/classwx_owner_drawn_combo_box.html#a6bff15424b9ea43df6c4b9efe7bc1a78).
fn get_widest_item_width(&self) -> c_int {
unsafe { ffi::wxOwnerDrawnComboBox_GetWidestItemWidth(self.as_ptr()) }
}
}