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
#![allow(non_upper_case_globals)]
use bitflags::bitflags;
use std::os::raw::c_int;
use crate::string::ImStr;
use crate::widget::tree::{CollapsingHeader, TreeNode, TreeNodeFlags};
use crate::Ui;
bitflags!(
#[repr(C)]
pub struct ImGuiDragDropFlags: c_int {
const SourceNoPreviewTooltip = 1;
const SourceNoDisableHover = 1 << 1;
const SourceNoHoldToOpenOthers = 1 << 2;
const SourceAllowNullID = 1 << 3;
const SourceExtern = 1 << 4;
const SourceAutoExpirePayload = 1 << 5;
const AcceptBeforeDelivery = 1 << 10;
const AcceptNoDrawDefaultRect = 1 << 11;
const AcceptNoPreviewTooltip = 1 << 12;
const AcceptPeekOnly = ImGuiDragDropFlags::AcceptBeforeDelivery.bits
| ImGuiDragDropFlags::AcceptNoDrawDefaultRect.bits;
}
);
bitflags!(
#[repr(C)]
pub struct ImDrawCornerFlags: c_int {
const TopLeft = 1;
const TopRight = 1 << 1;
const BotLeft = 1 << 2;
const BotRight = 1 << 3;
const Top = ImDrawCornerFlags::TopLeft.bits
| ImDrawCornerFlags::TopRight.bits;
const Bot = ImDrawCornerFlags::BotLeft.bits
| ImDrawCornerFlags::BotRight.bits;
const Left = ImDrawCornerFlags::TopLeft.bits
| ImDrawCornerFlags::BotLeft.bits;
const Right = ImDrawCornerFlags::TopRight.bits
| ImDrawCornerFlags::BotRight.bits;
const All = 0xF;
}
);
bitflags!(
#[repr(C)]
pub struct ImDrawListFlags: c_int {
const AntiAliasedLines = 1;
const AntiAliasedFill = 1 << 1;
}
);
bitflags!(
#[repr(C)]
pub struct ImGuiInputTextFlags: c_int {
const CharsDecimal = 1;
const CharsHexadecimal = 1 << 1;
const CharsUppercase = 1 << 2;
const CharsNoBlank = 1 << 3;
const AutoSelectAll = 1 << 4;
const EnterReturnsTrue = 1 << 5;
const CallbackCompletion = 1 << 6;
const CallbackHistory = 1 << 7;
const CallbackAlways = 1 << 8;
const CallbackCharFilter = 1 << 9;
const AllowTabInput = 1 << 10;
const CtrlEnterForNewLine = 1 << 11;
const NoHorizontalScroll = 1 << 12;
const AlwaysInsertMode = 1 << 13;
const ReadOnly = 1 << 14;
const Password = 1 << 15;
const NoUndoRedo = 1 << 16;
const CharsScientific = 1 << 17;
const CallbackResize = 1 << 18;
}
);
pub type ImGuiTreeNodeFlags = TreeNodeFlags;
impl<'ui> Ui<'ui> {
#[deprecated(
since = "0.4.0",
note = "use imgui::TreeNode::new(...), and build() instead"
)]
pub fn tree_node<'a>(&self, id: &'a ImStr) -> TreeNode<'a> {
TreeNode::new(id)
}
#[deprecated(
since = "0.4.0",
note = "use imgui::CollapsingHeader::new(...), and build() instead"
)]
pub fn collapsing_header<'a>(&self, label: &'a ImStr) -> CollapsingHeader<'a> {
CollapsingHeader::new(label)
}
}