easy_imgui/enums.rs
1// These enums have the same name as their C++ equivalent, do not warn about it
2#![allow(non_upper_case_globals)]
3
4use easy_imgui_sys::*;
5
6// In most API calls enums are passed as integers, but a few are true enums.
7// But since the code to wrap the enums is created by a macro, we use this trait
8// to do the necessary conversions.
9
10use std::ffi::c_int;
11
12trait BitEnumHelper {
13 fn to_bits(self) -> c_int;
14 fn from_bits(t: c_int) -> Self;
15}
16
17impl BitEnumHelper for c_int {
18 #[inline]
19 fn to_bits(self) -> c_int {
20 self
21 }
22 #[inline]
23 fn from_bits(t: c_int) -> Self {
24 t
25 }
26}
27
28macro_rules! impl_bit_enum_helper {
29 ($native_name:ident) => {
30 impl BitEnumHelper for $native_name {
31 #[inline]
32 fn to_bits(self) -> c_int {
33 self.0 as _
34 }
35 #[inline]
36 fn from_bits(t: c_int) -> Self {
37 Self(t as _)
38 }
39 }
40 };
41}
42
43macro_rules! imgui_enum_ex {
44 ($(#[$attr:meta])* $vis:vis $name:ident : $native_name:ident : $native_name_api:ty { $( $(#[$inner:ident $($args:tt)*])* $field:ident = $value:ident),* $(,)? }) => {
45 $(#[$attr])*
46 #[repr(i32)]
47 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
48 $vis enum $name {
49 $(
50 $(#[$inner $($args)*])*
51 $field = $native_name::$value.0 as i32,
52 )*
53 }
54 impl $name {
55 pub fn bits(self) -> $native_name_api {
56 <$native_name_api>::from_bits(self as c_int)
57 }
58 pub fn from_bits(bits: $native_name_api) -> Option<Self> {
59 $(
60 $(#[$inner $($args)*])*
61 const $field: c_int = $native_name::$value.0 as i32;
62 )*
63 let r = match <$native_name_api>::to_bits(bits) {
64 $(
65 #[allow(unused_doc_comments)]
66 $(#[$inner $($args)*])*
67 $field => Self::$field,
68 )*
69 _ => return std::option::Option::None,
70 };
71 Some(r)
72 }
73 }
74 };
75}
76
77macro_rules! imgui_enum {
78 ($(#[$attr:meta])* $vis:vis $name:ident: $native_name:ident { $( $(#[$inner:ident $($args:tt)*])* $field:ident ),* $(,)? }) => {
79 paste::paste! {
80 imgui_enum_ex! {
81 $(#[$attr])*
82 $vis $name: $native_name: i32 {
83 $( $(#[$inner $($args)*])* $field = [<$native_name $field>],)*
84 }
85 }
86 }
87 };
88}
89
90// Just like imgui_enum but for native strong C++ enums
91macro_rules! imgui_scoped_enum {
92 ($(#[$attr:meta])* $vis:vis $name:ident: $native_name:ident { $( $(#[$inner:ident $($args:tt)*])* $field:ident ),* $(,)? }) => {
93 impl_bit_enum_helper!{$native_name}
94 paste::paste! {
95 imgui_enum_ex! {
96 $(#[$attr])*
97 $vis $name: $native_name: $native_name {
98 $( $(#[$inner $($args)*])* $field = [<$native_name _ $field>],)*
99 }
100 }
101 }
102 };
103}
104
105macro_rules! imgui_flags_ex {
106 ($(#[$attr:meta])* $vis:vis $name:ident: $native_name:ident { $( $(#[$inner:ident $($args:tt)*])* $field:ident = $($value:ident)::*),* $(,)? }) => {
107 bitflags::bitflags! {
108 $(#[$attr])*
109 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
110 $vis struct $name : i32 {
111 $(
112 $(#[$inner $($args)*])*
113 const $field = imgui_flags_ex! { @FIELD $native_name :: $($value)::* };
114 )*
115 }
116 }
117 };
118 (@FIELD $native_name:ident :: $value:ident) => {
119 $native_name::$value.0 as i32
120 };
121 (@FIELD $native_name:ident :: $alt_native_name:ident :: $value:ident) => {
122 // ignore native_name, use alt_native_name instead
123 $alt_native_name::$value.0 as i32
124 };
125}
126
127macro_rules! imgui_flags {
128 ($(#[$attr:meta])* $vis:vis $name:ident: $native_name:ident { $( $(#[$inner:ident $($args:tt)*])* $field:ident),* $(,)? }) => {
129 paste::paste! {
130 imgui_flags_ex! {
131 $(#[$attr])*
132 $vis $name: $native_name {
133 $( $(#[$inner $($args)*])* $field = [<$native_name $field>],)*
134 }
135 }
136 }
137 };
138}
139
140imgui_flags! {
141 /// Dear ImGui (`ImDrawFlags`): Flags for `ImDrawList` functions
142 pub DrawFlags: ImDrawFlags_ {
143 /// Dear ImGui (`ImDrawFlags_None`): No flags
144 None,
145 /// Dear ImGui (`ImDrawFlags_Closed`): `PathStroke()`, `AddPolyline()`: specify that shape should be closed
146 Closed,
147 /// Dear ImGui (`ImDrawFlags_RoundCornersTopLeft`): `AddRect()`, `AddRectFilled()`, `PathRect()`: enable rounding top-left corner only
148 RoundCornersTopLeft,
149 /// Dear ImGui (`ImDrawFlags_RoundCornersTopRight`): `AddRect()`, `AddRectFilled()`, `PathRect()`: enable rounding top-right corner only
150 RoundCornersTopRight,
151 /// Dear ImGui (`ImDrawFlags_RoundCornersBottomLeft`): `AddRect()`, `AddRectFilled()`, `PathRect()`: enable rounding bottom-left corner only
152 RoundCornersBottomLeft,
153 /// Dear ImGui (`ImDrawFlags_RoundCornersBottomRight`): `AddRect()`, `AddRectFilled()`, `PathRect()`: enable rounding bottom-right corner only
154 RoundCornersBottomRight,
155 /// Dear ImGui (`ImDrawFlags_RoundCornersNone`): `AddRect()`, `AddRectFilled()`, `PathRect()`: disable rounding on all corners
156 RoundCornersNone,
157 /// Dear ImGui (`ImDrawFlags_RoundCornersTop`): `ImDrawFlags_RoundCornersTopLeft` | `ImDrawFlags_RoundCornersTopRight`
158 RoundCornersTop,
159 /// Dear ImGui (`ImDrawFlags_RoundCornersBottom`): `ImDrawFlags_RoundCornersBottomLeft` | `ImDrawFlags_RoundCornersBottomRight`
160 RoundCornersBottom,
161 /// Dear ImGui (`ImDrawFlags_RoundCornersLeft`): `ImDrawFlags_RoundCornersBottomLeft` | `ImDrawFlags_RoundCornersTopLeft`
162 RoundCornersLeft,
163 /// Dear ImGui (`ImDrawFlags_RoundCornersRight`): `ImDrawFlags_RoundCornersBottomRight` | `ImDrawFlags_RoundCornersTopRight`
164 RoundCornersRight,
165 /// Dear ImGui (`ImDrawFlags_RoundCornersAll`): All corners
166 RoundCornersAll,
167 }
168}
169
170imgui_enum! {
171 /// Dear ImGui (`ImGuiCond`): Condition for many Set*() functions
172 pub Cond: ImGuiCond_ {
173 /// Dear ImGui (`ImGuiCond_Always`): No condition (always set the variable)
174 Always,
175 /// Dear ImGui (`ImGuiCond_Once`): Set the variable once per runtime session
176 Once,
177 /// Dear ImGui (`ImGuiCond_FirstUseEver`): Set the variable if the object/window has no persistently saved data
178 FirstUseEver,
179 /// Dear ImGui (`ImGuiCond_Appearing`): Set the variable if the object/window is appearing after being hidden/inactive
180 Appearing,
181 }
182}
183
184imgui_enum! {
185 /// Dear ImGui (`ImGuiCol`): Color identifier for styling
186 pub ColorId: ImGuiCol_ {
187 /// Dear ImGui (`ImGuiCol_Text`): Text
188 Text,
189 /// Dear ImGui (`ImGuiCol_TextDisabled`): Text disabled
190 TextDisabled,
191 /// Dear ImGui (`ImGuiCol_WindowBg`): Background of normal windows
192 WindowBg,
193 /// Dear ImGui (`ImGuiCol_ChildBg`): Background of child windows
194 ChildBg,
195 /// Dear ImGui (`ImGuiCol_PopupBg`): Background of popups, menus, tooltips windows
196 PopupBg,
197 /// Dear ImGui (`ImGuiCol_Border`): Border
198 Border,
199 /// Dear ImGui (`ImGuiCol_BorderShadow`): Border shadow
200 BorderShadow,
201 /// Dear ImGui (`ImGuiCol_FrameBg`): Background of checkbox, radio button, plot, slider, text input
202 FrameBg,
203 /// Dear ImGui (`ImGuiCol_FrameBgHovered`): Frame background hovered
204 FrameBgHovered,
205 /// Dear ImGui (`ImGuiCol_FrameBgActive`): Frame background active
206 FrameBgActive,
207 /// Dear ImGui (`ImGuiCol_TitleBg`): Title bar
208 TitleBg,
209 /// Dear ImGui (`ImGuiCol_TitleBgActive`): Title bar when focused
210 TitleBgActive,
211 /// Dear ImGui (`ImGuiCol_TitleBgCollapsed`): Title bar when collapsed
212 TitleBgCollapsed,
213 /// Dear ImGui (`ImGuiCol_MenuBarBg`): Menu bar background
214 MenuBarBg,
215 /// Dear ImGui (`ImGuiCol_ScrollbarBg`): Scrollbar background
216 ScrollbarBg,
217 /// Dear ImGui (`ImGuiCol_ScrollbarGrab`): Scrollbar grab
218 ScrollbarGrab,
219 /// Dear ImGui (`ImGuiCol_ScrollbarGrabHovered`): Scrollbar grab hovered
220 ScrollbarGrabHovered,
221 /// Dear ImGui (`ImGuiCol_ScrollbarGrabActive`): Scrollbar grab active
222 ScrollbarGrabActive,
223 /// Dear ImGui (`ImGuiCol_CheckMark`): Checkbox tick and RadioButton circle
224 CheckMark,
225 /// Dear ImGui (`ImGuiCol_CheckboxSelectedBg`): Checkbox background when selected
226 CheckboxSelectedBg,
227 /// Dear ImGui (`ImGuiCol_SliderGrab`): Slider grab
228 SliderGrab,
229 /// Dear ImGui (`ImGuiCol_SliderGrabActive`): Slider grab active
230 SliderGrabActive,
231 /// Dear ImGui (`ImGuiCol_Button`): Button
232 Button,
233 /// Dear ImGui (`ImGuiCol_ButtonHovered`): Button hovered
234 ButtonHovered,
235 /// Dear ImGui (`ImGuiCol_ButtonActive`): Button active
236 ButtonActive,
237 /// Dear ImGui (`ImGuiCol_Header`): Header colors for CollapsingHeader, TreeNode, Selectable, MenuItem
238 Header,
239 /// Dear ImGui (`ImGuiCol_HeaderHovered`): Header hovered
240 HeaderHovered,
241 /// Dear ImGui (`ImGuiCol_HeaderActive`): Header active
242 HeaderActive,
243 /// Dear ImGui (`ImGuiCol_Separator`): Separator
244 Separator,
245 /// Dear ImGui (`ImGuiCol_SeparatorHovered`): Separator hovered
246 SeparatorHovered,
247 /// Dear ImGui (`ImGuiCol_SeparatorActive`): Separator active
248 SeparatorActive,
249 /// Dear ImGui (`ImGuiCol_ResizeGrip`): Resize grip
250 ResizeGrip,
251 /// Dear ImGui (`ImGuiCol_ResizeGripHovered`): Resize grip hovered
252 ResizeGripHovered,
253 /// Dear ImGui (`ImGuiCol_ResizeGripActive`): Resize grip active
254 ResizeGripActive,
255 /// Dear ImGui (`ImGuiCol_InputTextCursor`): InputText cursor/caret
256 InputTextCursor,
257 /// Dear ImGui (`ImGuiCol_TabHovered`): Tab background, when hovered
258 TabHovered,
259 /// Dear ImGui (`ImGuiCol_Tab`): Tab background, when tab-bar is focused & tab is unselected
260 Tab,
261 /// Dear ImGui (`ImGuiCol_TabSelected`): Tab background, when tab-bar is focused & tab is selected
262 TabSelected,
263 /// Dear ImGui (`ImGuiCol_TabSelectedOverline`): Tab horizontal overline, when tab-bar is focused & tab is selected
264 TabSelectedOverline,
265 /// Dear ImGui (`ImGuiCol_TabDimmed`): Tab background, when tab-bar is unfocused & tab is unselected
266 TabDimmed,
267 /// Dear ImGui (`ImGuiCol_TabDimmedSelected`): Tab background, when tab-bar is unfocused & tab is selected
268 TabDimmedSelected,
269 /// Dear ImGui (`ImGuiCol_TabDimmedSelectedOverline`): Tab horizontal overline, when tab-bar is unfocused & tab is selected
270 TabDimmedSelectedOverline,
271 /// Dear ImGui (`ImGuiCol_DockingPreview`): Preview overlay color when about to docking something
272 DockingPreview,
273 /// Dear ImGui (`ImGuiCol_DockingEmptyBg`): Background color for empty node
274 DockingEmptyBg,
275 /// Dear ImGui (`ImGuiCol_PlotLines`): Plot lines
276 PlotLines,
277 /// Dear ImGui (`ImGuiCol_PlotLinesHovered`): Plot lines hovered
278 PlotLinesHovered,
279 /// Dear ImGui (`ImGuiCol_PlotHistogram`): Plot histogram
280 PlotHistogram,
281 /// Dear ImGui (`ImGuiCol_PlotHistogramHovered`): Plot histogram hovered
282 PlotHistogramHovered,
283 /// Dear ImGui (`ImGuiCol_TableHeaderBg`): Table header background
284 TableHeaderBg,
285 /// Dear ImGui (`ImGuiCol_TableBorderStrong`): Table outer and header borders
286 TableBorderStrong,
287 /// Dear ImGui (`ImGuiCol_TableBorderLight`): Table inner borders
288 TableBorderLight,
289 /// Dear ImGui (`ImGuiCol_TableRowBg`): Table row background (even rows)
290 TableRowBg,
291 /// Dear ImGui (`ImGuiCol_TableRowBgAlt`): Table row background (odd rows)
292 TableRowBgAlt,
293 /// Dear ImGui (`ImGuiCol_TextLink`): Hyperlink color
294 TextLink,
295 /// Dear ImGui (`ImGuiCol_TextSelectedBg`): Selected text inside an InputText
296 TextSelectedBg,
297 /// Dear ImGui (`ImGuiCol_TreeLines`): Tree node hierarchy outlines
298 TreeLines,
299 /// Dear ImGui (`ImGuiCol_DragDropTarget`): Rectangle border highlighting a drop target
300 DragDropTarget,
301 /// Dear ImGui (`ImGuiCol_DragDropTargetBg`): Rectangle background highlighting a drop target
302 DragDropTargetBg,
303 /// Dear ImGui (`ImGuiCol_UnsavedMarker`): Unsaved marker color
304 UnsavedMarker,
305 /// Dear ImGui (`ImGuiCol_NavCursor`): Navigation cursor
306 NavCursor,
307 /// Dear ImGui (`ImGuiCol_NavWindowingHighlight`): Navigation windowing highlight
308 NavWindowingHighlight,
309 /// Dear ImGui (`ImGuiCol_NavWindowingDimBg`): Navigation windowing dim background
310 NavWindowingDimBg,
311 /// Dear ImGui (`ImGuiCol_ModalWindowDimBg`): Modal window dim background
312 ModalWindowDimBg,
313 }
314}
315
316imgui_enum! {
317 /// Dear ImGui (`ImGuiStyleVar`): Variable identifier for styling
318 pub StyleVar: ImGuiStyleVar_ {
319 /// Dear ImGui (`ImGuiStyleVar_Alpha`): Global alpha
320 Alpha,
321 /// Dear ImGui (`ImGuiStyleVar_DisabledAlpha`): Disabled alpha
322 DisabledAlpha,
323 /// Dear ImGui (`ImGuiStyleVar_WindowPadding`): Window padding
324 WindowPadding,
325 /// Dear ImGui (`ImGuiStyleVar_WindowRounding`): Window rounding
326 WindowRounding,
327 /// Dear ImGui (`ImGuiStyleVar_WindowBorderSize`): Window border size
328 WindowBorderSize,
329 /// Dear ImGui (`ImGuiStyleVar_WindowMinSize`): Window min size
330 WindowMinSize,
331 /// Dear ImGui (`ImGuiStyleVar_WindowTitleAlign`): Window title align
332 WindowTitleAlign,
333 /// Dear ImGui (`ImGuiStyleVar_ChildRounding`): Child rounding
334 ChildRounding,
335 /// Dear ImGui (`ImGuiStyleVar_ChildBorderSize`): Child border size
336 ChildBorderSize,
337 /// Dear ImGui (`ImGuiStyleVar_PopupRounding`): Popup rounding
338 PopupRounding,
339 /// Dear ImGui (`ImGuiStyleVar_PopupBorderSize`): Popup border size
340 PopupBorderSize,
341 /// Dear ImGui (`ImGuiStyleVar_FramePadding`): Frame padding
342 FramePadding,
343 /// Dear ImGui (`ImGuiStyleVar_FrameRounding`): Frame rounding
344 FrameRounding,
345 /// Dear ImGui (`ImGuiStyleVar_FrameBorderSize`): Frame border size
346 FrameBorderSize,
347 /// Dear ImGui (`ImGuiStyleVar_ItemSpacing`): Item spacing
348 ItemSpacing,
349 /// Dear ImGui (`ImGuiStyleVar_ItemInnerSpacing`): Item inner spacing
350 ItemInnerSpacing,
351 /// Dear ImGui (`ImGuiStyleVar_IndentSpacing`): Indent spacing
352 IndentSpacing,
353 /// Dear ImGui (`ImGuiStyleVar_CellPadding`): Cell padding
354 CellPadding,
355 /// Dear ImGui (`ImGuiStyleVar_ScrollbarSize`): Scrollbar size
356 ScrollbarSize,
357 /// Dear ImGui (`ImGuiStyleVar_ScrollbarRounding`): Scrollbar rounding
358 ScrollbarRounding,
359 /// Dear ImGui (`ImGuiStyleVar_ScrollbarPadding`): Scrollbar padding
360 ScrollbarPadding,
361 /// Dear ImGui (`ImGuiStyleVar_GrabMinSize`): Grab min size
362 GrabMinSize,
363 /// Dear ImGui (`ImGuiStyleVar_GrabRounding`): Grab rounding
364 GrabRounding,
365 /// Dear ImGui (`ImGuiStyleVar_ImageRounding`): Image rounding
366 ImageRounding,
367 /// Dear ImGui (`ImGuiStyleVar_ImageBorderSize`): Image border size
368 ImageBorderSize,
369 /// Dear ImGui (`ImGuiStyleVar_TabRounding`): Tab rounding
370 TabRounding,
371 /// Dear ImGui (`ImGuiStyleVar_TabBorderSize`): Tab border size
372 TabBorderSize,
373 /// Dear ImGui (`ImGuiStyleVar_TabMinWidthBase`): Tab min width base
374 TabMinWidthBase,
375 /// Dear ImGui (`ImGuiStyleVar_TabMinWidthShrink`): Tab min width shrink
376 TabMinWidthShrink,
377 /// Dear ImGui (`ImGuiStyleVar_TabBarBorderSize`): Tab bar border size
378 TabBarBorderSize,
379 /// Dear ImGui (`ImGuiStyleVar_TabBarOverlineSize`): Tab bar overline size
380 TabBarOverlineSize,
381 /// Dear ImGui (`ImGuiStyleVar_TableAngledHeadersAngle`): Table angled headers angle
382 TableAngledHeadersAngle,
383 /// Dear ImGui (`ImGuiStyleVar_TableAngledHeadersTextAlign`): Table angled headers text align
384 TableAngledHeadersTextAlign,
385 /// Dear ImGui (`ImGuiStyleVar_TreeLinesSize`): Tree lines size
386 TreeLinesSize,
387 /// Dear ImGui (`ImGuiStyleVar_TreeLinesRounding`): Tree lines rounding
388 TreeLinesRounding,
389 /// Dear ImGui (`ImGuiStyleVar_DragDropTargetRounding`): Drag drop target rounding
390 DragDropTargetRounding,
391 /// Dear ImGui (`ImGuiStyleVar_ButtonTextAlign`): Button text align
392 ButtonTextAlign,
393 /// Dear ImGui (`ImGuiStyleVar_SelectableTextAlign`): Selectable text align
394 SelectableTextAlign,
395 /// Dear ImGui (`ImGuiStyleVar_SeparatorSize`): Separator size
396 SeparatorSize,
397 /// Dear ImGui (`ImGuiStyleVar_SeparatorTextBorderSize`): Separator text border size
398 SeparatorTextBorderSize,
399 /// Dear ImGui (`ImGuiStyleVar_SeparatorTextAlign`): Separator text align
400 SeparatorTextAlign,
401 /// Dear ImGui (`ImGuiStyleVar_SeparatorTextPadding`): Separator text padding
402 SeparatorTextPadding,
403 /// Dear ImGui (`ImGuiStyleVar_DockingSeparatorSize`): Docking separator size
404 DockingSeparatorSize,
405 /// Dear ImGui (`ImGuiStyleVar_MenuItemRounding`): Radius of MenuItem, BeginMenu rounding
406 MenuItemRounding,
407 /// Dear ImGui (`ImGuiStyleVar_SelectableRounding`): Radius of Selectable rounding
408 SelectableRounding,
409 }
410}
411
412imgui_flags! {
413 /// Dear ImGui (`ImGuiWindowFlags`): Flags for `Begin()` and `BeginChild()`
414 pub WindowFlags: ImGuiWindowFlags_ {
415 /// Dear ImGui (`ImGuiWindowFlags_None`): No flags
416 None,
417 /// Dear ImGui (`ImGuiWindowFlags_NoTitleBar`): Disable title-bar
418 NoTitleBar,
419 /// Dear ImGui (`ImGuiWindowFlags_NoResize`): Disable user resizing with the lower-right grip
420 NoResize,
421 /// Dear ImGui (`ImGuiWindowFlags_NoMove`): Disable user moving the window
422 NoMove,
423 /// Dear ImGui (`ImGuiWindowFlags_NoScrollbar`): Disable scrollbars (window can still scroll with mouse or programmatically)
424 NoScrollbar,
425 /// Dear ImGui (`ImGuiWindowFlags_NoScrollWithMouse`): Disable user vertically scrolling with mouse wheel. On child window, mouse wheel will be forwarded to the parent unless NoScrollbar is also set.
426 NoScrollWithMouse,
427 /// Dear ImGui (`ImGuiWindowFlags_NoCollapse`): Disable user collapsing window by double-clicking on it. Also referred to as Window Menu Button (e.g. within a docking node).
428 NoCollapse,
429 /// Dear ImGui (`ImGuiWindowFlags_AlwaysAutoResize`): Resize every window to its content every frame
430 AlwaysAutoResize,
431 /// Dear ImGui (`ImGuiWindowFlags_NoBackground`): Disable drawing background color (WindowBg, etc.) and outside border. Similar as using SetNextWindowBgAlpha(0.0f).
432 NoBackground,
433 /// Dear ImGui (`ImGuiWindowFlags_NoSavedSettings`): Never load/save settings in .ini file
434 NoSavedSettings,
435 /// Dear ImGui (`ImGuiWindowFlags_NoMouseInputs`): Disable catching mouse, hovering test with pass through.
436 NoMouseInputs,
437 /// Dear ImGui (`ImGuiWindowFlags_MenuBar`): Has a menu-bar
438 MenuBar,
439 /// Dear ImGui (`ImGuiWindowFlags_HorizontalScrollbar`): Allow horizontal scrollbar to appear (off by default). You may use SetNextWindowContentSize(ImVec2(width,0.0f)); prior to calling Begin() to specify width.
440 HorizontalScrollbar,
441 /// Dear ImGui (`ImGuiWindowFlags_NoFocusOnAppearing`): Disable taking focus when transitioning from hidden to visible state
442 NoFocusOnAppearing,
443 /// Dear ImGui (`ImGuiWindowFlags_NoBringToFrontOnFocus`): Disable bringing window to front when taking focus (e.g. clicking on it or programmatically giving it focus)
444 NoBringToFrontOnFocus,
445 /// Dear ImGui (`ImGuiWindowFlags_AlwaysVerticalScrollbar`): Always show vertical scrollbar (even if ContentSize.y < Size.y)
446 AlwaysVerticalScrollbar,
447 /// Dear ImGui (`ImGuiWindowFlags_AlwaysHorizontalScrollbar`): Always show horizontal scrollbar (even if ContentSize.x < Size.x)
448 AlwaysHorizontalScrollbar,
449 /// Dear ImGui (`ImGuiWindowFlags_NoNavInputs`): No keyboard/gamepad navigation within the window
450 NoNavInputs,
451 /// Dear ImGui (`ImGuiWindowFlags_NoNavFocus`): No focusing toward this window with keyboard/gamepad navigation (e.g. skipped by Ctrl+Tab)
452 NoNavFocus,
453 /// Dear ImGui (`ImGuiWindowFlags_UnsavedDocument`): Display a dot next to the title. When used in a tab/docking context, tab is selected when clicking the X + closure is not assumed (will wait for user to stop submitting the tab).
454 UnsavedDocument,
455 /// Dear ImGui (`ImGuiWindowFlags_NoDocking`): Disable docking of this window
456 NoDocking,
457 /// Dear ImGui (`ImGuiWindowFlags_NoNav`): `ImGuiWindowFlags_NoNavInputs` | `ImGuiWindowFlags_NoNavFocus`
458 NoNav,
459 /// Dear ImGui (`ImGuiWindowFlags_NoDecoration`): `ImGuiWindowFlags_NoTitleBar` | `ImGuiWindowFlags_NoResize` | `ImGuiWindowFlags_NoScrollbar` | `ImGuiWindowFlags_NoCollapse`
460 NoDecoration,
461 /// Dear ImGui (`ImGuiWindowFlags_NoInputs`): `ImGuiWindowFlags_NoMouseInputs` | `ImGuiWindowFlags_NoNavInputs` | `ImGuiWindowFlags_NoNavFocus`
462 NoInputs,
463 }
464}
465
466imgui_flags! {
467 /// Dear ImGui (`ImGuiChildFlags`): Flags for `BeginChild()`
468 pub ChildFlags: ImGuiChildFlags_ {
469 /// Dear ImGui (`ImGuiChildFlags_None`): No flags
470 None,
471 /// Dear ImGui (`ImGuiChildFlags_Borders`): Show an outer border and enable WindowPadding. (IMPORTANT: this is always == 1 == true for legacy reason)
472 Borders,
473 /// Dear ImGui (`ImGuiChildFlags_AlwaysUseWindowPadding`): Pad with style.WindowPadding even if no border are drawn
474 AlwaysUseWindowPadding,
475 /// Dear ImGui (`ImGuiChildFlags_ResizeX`): Allow resize from right border (layout direction). Enable .ini saving (unless ImGuiWindowFlags_NoSavedSettings passed to window flags)
476 ResizeX,
477 /// Dear ImGui (`ImGuiChildFlags_ResizeY`): Allow resize from bottom border (layout direction).
478 ResizeY,
479 /// Dear ImGui (`ImGuiChildFlags_AutoResizeX`): Enable auto-resizing width. Read "IMPORTANT: Size measurement" details above.
480 AutoResizeX,
481 /// Dear ImGui (`ImGuiChildFlags_AutoResizeY`): Enable auto-resizing height. Read "IMPORTANT: Size measurement" details above.
482 AutoResizeY,
483 /// Dear ImGui (`ImGuiChildFlags_AlwaysAutoResize`): Combined with AutoResizeX/AutoResizeY. Always measure size even when child is hidden, always return true, always disable clipping optimization! NOT RECOMMENDED.
484 AlwaysAutoResize,
485 /// Dear ImGui (`ImGuiChildFlags_FrameStyle`): Style the child window like a framed item: use FrameBg, FrameRounding, FrameBorderSize, FramePadding instead of ChildBg, ChildRounding, ChildBorderSize, WindowPadding.
486 FrameStyle,
487 /// Dear ImGui (`ImGuiChildFlags_NavFlattened`): [BETA] Share focus scope, allow keyboard/gamepad navigation to cross over parent border to this child or between sibling child windows.
488 NavFlattened,
489 }
490}
491imgui_flags! {
492 /// Dear ImGui (`ImGuiButtonFlags`): Flags for `InvisibleButton()`
493 pub ButtonFlags: ImGuiButtonFlags_ {
494 /// Dear ImGui (`ImGuiButtonFlags_None`): No flags
495 None,
496 /// Dear ImGui (`ImGuiButtonFlags_MouseButtonLeft`): React on left mouse button (default)
497 MouseButtonLeft,
498 /// Dear ImGui (`ImGuiButtonFlags_MouseButtonRight`): React on right mouse button
499 MouseButtonRight,
500 /// Dear ImGui (`ImGuiButtonFlags_MouseButtonMiddle`): React on center mouse button
501 MouseButtonMiddle,
502 /// Dear ImGui (`ImGuiButtonFlags_EnableNav`): InvisibleButton(): do not disable navigation/tabbing. Otherwise disabled by default.
503 EnableNav,
504 /// Dear ImGui (`ImGuiButtonFlags_AllowOverlap`): Hit testing will allow subsequent widgets to overlap this one. Require previous frame HoveredId to match before being usable. Shortcut to calling SetNextItemAllowOverlap().
505 AllowOverlap,
506 }
507}
508
509imgui_scoped_enum! {
510 pub Dir: ImGuiDir {
511 /// Dear ImGui (`ImGuiDir_Left`): Left
512 Left,
513 /// Dear ImGui (`ImGuiDir_Right`): Right
514 Right,
515 /// Dear ImGui (`ImGuiDir_Up`): Up
516 Up,
517 /// Dear ImGui (`ImGuiDir_Down`): Down
518 Down,
519 }
520}
521
522imgui_flags! {
523 /// Dear ImGui (`ImGuiComboFlags`): Flags for `BeginCombo()`
524 pub ComboFlags: ImGuiComboFlags_ {
525 /// Dear ImGui (`ImGuiComboFlags_None`): No flags
526 None,
527 /// Dear ImGui (`ImGuiComboFlags_PopupAlignLeft`): Align popup left
528 PopupAlignLeft,
529 /// Dear ImGui (`ImGuiComboFlags_HeightSmall`): Height small
530 HeightSmall,
531 /// Dear ImGui (`ImGuiComboFlags_HeightRegular`): Height regular
532 HeightRegular,
533 /// Dear ImGui (`ImGuiComboFlags_HeightLarge`): Height large
534 HeightLarge,
535 /// Dear ImGui (`ImGuiComboFlags_HeightLargest`): Height largest
536 HeightLargest,
537 /// Dear ImGui (`ImGuiComboFlags_NoArrowButton`): No arrow button
538 NoArrowButton,
539 /// Dear ImGui (`ImGuiComboFlags_NoPreview`): No preview
540 NoPreview,
541 }
542}
543
544imgui_flags! {
545 /// Dear ImGui (`ImGuiSelectableFlags`): Flags for `Selectable()`
546 pub SelectableFlags: ImGuiSelectableFlags_ {
547 /// Dear ImGui (`ImGuiSelectableFlags_None`): No flags
548 None,
549 /// Dear ImGui (`ImGuiSelectableFlags_NoAutoClosePopups`): Do not close popup when clicked
550 NoAutoClosePopups,
551 /// Dear ImGui (`ImGuiSelectableFlags_SpanAllColumns`): Span all columns
552 SpanAllColumns,
553 /// Dear ImGui (`ImGuiSelectableFlags_AllowDoubleClick`): Allow double click
554 AllowDoubleClick,
555 /// Dear ImGui (`ImGuiSelectableFlags_Disabled`): Disabled
556 Disabled,
557 /// Dear ImGui (`ImGuiSelectableFlags_AllowOverlap`): Allow overlap
558 AllowOverlap,
559 /// Dear ImGui (`ImGuiSelectableFlags_Highlight`): Highlight
560 Highlight,
561 /// Dear ImGui (`ImGuiSelectableFlags_SelectOnNav`): Select on nav
562 SelectOnNav,
563 }
564}
565
566imgui_flags! {
567 /// Dear ImGui (`ImGuiSliderFlags`): Flags for `DragFloat()`, `DragInt()`, `SliderFloat()`, `SliderInt()`, etc.
568 pub SliderFlags: ImGuiSliderFlags_ {
569 /// Dear ImGui (`ImGuiSliderFlags_None`): No flags
570 None,
571 /// Dear ImGui (`ImGuiSliderFlags_Logarithmic`): Logarithmic
572 Logarithmic,
573 /// Dear ImGui (`ImGuiSliderFlags_NoRoundToFormat`): No round to format
574 NoRoundToFormat,
575 /// Dear ImGui (`ImGuiSliderFlags_NoInput`): No input
576 NoInput,
577 /// Dear ImGui (`ImGuiSliderFlags_WrapAround`): Wrap around
578 WrapAround,
579 /// Dear ImGui (`ImGuiSliderFlags_ClampOnInput`): Clamp on input
580 ClampOnInput,
581 /// Dear ImGui (`ImGuiSliderFlags_ClampZeroRange`): Clamp zero range
582 ClampZeroRange,
583 /// Dear ImGui (`ImGuiSliderFlags_NoSpeedTweaks`): No speed tweaks
584 NoSpeedTweaks,
585 /// Dear ImGui (`ImGuiSliderFlags_ColorMarkers`): Color markers
586 ColorMarkers,
587 /// Dear ImGui (`ImGuiSliderFlags_AlwaysClamp`): Always clamp
588 AlwaysClamp,
589 }
590}
591
592imgui_flags! {
593 /// Dear ImGui (`ImGuiInputTextFlags`): Flags for `InputText()`, `InputTextMultiline()`
594 pub InputTextFlags: ImGuiInputTextFlags_ {
595 // Basic filters
596 /// Dear ImGui (`ImGuiInputTextFlags_None`): No flags
597 None,
598 /// Dear ImGui (`ImGuiInputTextFlags_CharsDecimal`): Allow 0123456789.
599 CharsDecimal,
600 /// Dear ImGui (`ImGuiInputTextFlags_CharsHexadecimal`): Allow 0123456789ABCDEFabcdef
601 CharsHexadecimal,
602 /// Dear ImGui (`ImGuiInputTextFlags_CharsScientific`): Allow 0123456789.eE+-
603 CharsScientific,
604 /// Dear ImGui (`ImGuiInputTextFlags_CharsUppercase`): Turn character into upper case
605 CharsUppercase,
606 /// Dear ImGui (`ImGuiInputTextFlags_CharsNoBlank`): Filter out spaces
607 CharsNoBlank,
608
609 // Inputs
610 /// Dear ImGui (`ImGuiInputTextFlags_AllowTabInput`): Tab key enters a tab character
611 AllowTabInput,
612 /// Dear ImGui (`ImGuiInputTextFlags_EnterReturnsTrue`): Return 'true' when Enter is pressed
613 EnterReturnsTrue,
614 /// Dear ImGui (`ImGuiInputTextFlags_EscapeClearsAll`): Escape clears input
615 EscapeClearsAll,
616 /// Dear ImGui (`ImGuiInputTextFlags_CtrlEnterForNewLine`): Ctrl+Enter adds a new line
617 CtrlEnterForNewLine,
618
619 // Other options
620 /// Dear ImGui (`ImGuiInputTextFlags_ReadOnly`): Read-only mode
621 ReadOnly,
622 /// Dear ImGui (`ImGuiInputTextFlags_Password`): Password mode (mask characters)
623 Password,
624 /// Dear ImGui (`ImGuiInputTextFlags_AlwaysOverwrite`): Always overwrite mode
625 AlwaysOverwrite,
626 /// Dear ImGui (`ImGuiInputTextFlags_AutoSelectAll`): Auto-select all on focus
627 AutoSelectAll,
628 /// Dear ImGui (`ImGuiInputTextFlags_ParseEmptyRefVal`): Parse empty reference value
629 ParseEmptyRefVal,
630 /// Dear ImGui (`ImGuiInputTextFlags_DisplayEmptyRefVal`): Display empty reference value
631 DisplayEmptyRefVal,
632 /// Dear ImGui (`ImGuiInputTextFlags_NoHorizontalScroll`): No horizontal scroll
633 NoHorizontalScroll,
634 /// Dear ImGui (`ImGuiInputTextFlags_NoUndoRedo`): No undo/redo
635 NoUndoRedo,
636
637 // Elide display / Alignment
638 /// Dear ImGui (`ImGuiInputTextFlags_ElideLeft`): Elide left
639 ElideLeft,
640
641 // Callback features
642 /// Dear ImGui (`ImGuiInputTextFlags_CallbackCompletion`): Callback on completion
643 CallbackCompletion,
644 /// Dear ImGui (`ImGuiInputTextFlags_CallbackHistory`): Callback on history
645 CallbackHistory,
646 /// Dear ImGui (`ImGuiInputTextFlags_CallbackAlways`): Callback always
647 CallbackAlways,
648 /// Dear ImGui (`ImGuiInputTextFlags_CallbackCharFilter`): Callback on character filter
649 CallbackCharFilter,
650 /// Dear ImGui (`ImGuiInputTextFlags_CallbackResize`): Callback on resize
651 CallbackResize,
652 /// Dear ImGui (`ImGuiInputTextFlags_CallbackEdit`): Callback on edit
653 CallbackEdit,
654
655 // Multi-line Word-Wrapping [BETA]
656 /// Dear ImGui (`ImGuiInputTextFlags_WordWrap`): Word-wrap
657 WordWrap,
658 }
659}
660
661imgui_flags! {
662 /// Dear ImGui (`ImGuiHoveredFlags`): Flags for `IsItemHovered()`, `IsWindowHovered()` etc.
663 pub HoveredFlags: ImGuiHoveredFlags_ {
664 /// Dear ImGui (`ImGuiHoveredFlags_None`): Return true if directly over the item/window, not obstructed by another window, not obstructed by an active popup or modal blocking inputs under them.
665 None,
666 /// Dear ImGui (`ImGuiHoveredFlags_ChildWindows`): IsWindowHovered() only: Return true if any children of the window is hovered
667 ChildWindows,
668 /// Dear ImGui (`ImGuiHoveredFlags_RootWindow`): IsWindowHovered() only: Test from root window (top most parent of the current hierarchy)
669 RootWindow,
670 /// Dear ImGui (`ImGuiHoveredFlags_AnyWindow`): IsWindowHovered() only: Return true if any window is hovered
671 AnyWindow,
672 /// Dear ImGui (`ImGuiHoveredFlags_NoPopupHierarchy`): IsWindowHovered() only: Do not consider popup hierarchy (do not treat popup emitter as parent of popup) (when used with _ChildWindows or _RootWindow)
673 NoPopupHierarchy,
674 /// Dear ImGui (`ImGuiHoveredFlags_DockHierarchy`): IsWindowHovered() only: Consider docking hierarchy (treat dockspace host as parent of docked window) (when used with _ChildWindows or _RootWindow)
675 DockHierarchy,
676 /// Dear ImGui (`ImGuiHoveredFlags_AllowWhenBlockedByPopup`): Return true even if a popup window is normally blocking access to this item/window
677 AllowWhenBlockedByPopup,
678 /// Dear ImGui (`ImGuiHoveredFlags_AllowWhenBlockedByActiveItem`): Return true even if an active item is blocking access to this item/window. Useful for Drag and Drop patterns.
679 AllowWhenBlockedByActiveItem,
680 /// Dear ImGui (`ImGuiHoveredFlags_AllowWhenOverlappedByItem`): IsItemHovered() only: Return true even if the item uses AllowOverlap mode and is overlapped by another hoverable item.
681 AllowWhenOverlappedByItem,
682 /// Dear ImGui (`ImGuiHoveredFlags_AllowWhenOverlappedByWindow`): IsItemHovered() only: Return true even if the position is obstructed or overlapped by another window.
683 AllowWhenOverlappedByWindow,
684 /// Dear ImGui (`ImGuiHoveredFlags_AllowWhenDisabled`): IsItemHovered() only: Return true even if the item is disabled
685 AllowWhenDisabled,
686 /// Dear ImGui (`ImGuiHoveredFlags_NoNavOverride`): IsItemHovered() only: Disable using keyboard/gamepad navigation state when active, always query mouse
687 NoNavOverride,
688 /// Dear ImGui (`ImGuiHoveredFlags_AllowWhenOverlapped`): Allow when overlapped
689 AllowWhenOverlapped,
690 /// Dear ImGui (`ImGuiHoveredFlags_RectOnly`): Rect only
691 RectOnly,
692 /// Dear ImGui (`ImGuiHoveredFlags_RootAndChildWindows`): Root and child windows
693 RootAndChildWindows,
694 /// Dear ImGui (`ImGuiHoveredFlags_ForTooltip`): For tooltip
695 ForTooltip,
696 /// Dear ImGui (`ImGuiHoveredFlags_Stationary`): Stationary
697 Stationary,
698 /// Dear ImGui (`ImGuiHoveredFlags_DelayNone`): Delay none
699 DelayNone,
700 /// Dear ImGui (`ImGuiHoveredFlags_DelayShort`): Delay short
701 DelayShort,
702 /// Dear ImGui (`ImGuiHoveredFlags_DelayNormal`): Delay normal
703 DelayNormal,
704 /// Dear ImGui (`ImGuiHoveredFlags_NoSharedDelay`): No shared delay
705 NoSharedDelay,
706 }
707}
708
709#[repr(i32)]
710#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
711pub enum MouseButton {
712 Left,
713 Right,
714 Middle,
715 Other(u16),
716}
717
718impl MouseButton {
719 pub fn bits(self) -> i32 {
720 match self {
721 MouseButton::Left => ImGuiMouseButton_::ImGuiMouseButton_Left.0 as i32,
722 MouseButton::Right => ImGuiMouseButton_::ImGuiMouseButton_Right.0 as i32,
723 MouseButton::Middle => ImGuiMouseButton_::ImGuiMouseButton_Middle.0 as i32,
724 MouseButton::Other(x) => x as i32,
725 }
726 }
727}
728
729imgui_enum! {
730 /// Dear ImGui (`ImGuiMouseCursor`): Mouse cursor shape
731 pub MouseCursor : ImGuiMouseCursor_ {
732 /// Dear ImGui (`ImGuiMouseCursor_None`): No cursor
733 None,
734 /// Dear ImGui (`ImGuiMouseCursor_Arrow`): Arrow
735 Arrow,
736 /// Dear ImGui (`ImGuiMouseCursor_TextInput`): When hovering over InputText, etc.
737 TextInput,
738 /// Dear ImGui (`ImGuiMouseCursor_ResizeAll`): (Unused by Dear ImGui functions)
739 ResizeAll,
740 /// Dear ImGui (`ImGuiMouseCursor_ResizeNS`): When hovering over a horizontal border
741 ResizeNS,
742 /// Dear ImGui (`ImGuiMouseCursor_ResizeEW`): When hovering over a vertical border or a column
743 ResizeEW,
744 /// Dear ImGui (`ImGuiMouseCursor_ResizeNESW`): When hovering over the bottom-left corner of a window
745 ResizeNESW,
746 /// Dear ImGui (`ImGuiMouseCursor_ResizeNWSE`): When hovering over the bottom-right corner of a window
747 ResizeNWSE,
748 /// Dear ImGui (`ImGuiMouseCursor_Hand`): (Unused by Dear ImGui functions. Use for e.g. hyperlinks)
749 Hand,
750 /// Dear ImGui (`ImGuiMouseCursor_NotAllowed`): When hovering something with disallowed interaction
751 NotAllowed,
752 }
753}
754
755// ImGuiKey is named weirdly
756impl_bit_enum_helper! {ImGuiKey}
757
758imgui_enum_ex! {
759 pub Key: ImGuiKey: ImGuiKey {
760 None = ImGuiKey_None,
761 Tab = ImGuiKey_Tab,
762 LeftArrow = ImGuiKey_LeftArrow,
763 RightArrow = ImGuiKey_RightArrow,
764 UpArrow = ImGuiKey_UpArrow,
765 DownArrow = ImGuiKey_DownArrow,
766 PageUp = ImGuiKey_PageUp,
767 PageDown = ImGuiKey_PageDown,
768 Home = ImGuiKey_Home,
769 End = ImGuiKey_End,
770 Insert = ImGuiKey_Insert,
771 Delete = ImGuiKey_Delete,
772 Backspace = ImGuiKey_Backspace,
773 Space = ImGuiKey_Space,
774 Enter = ImGuiKey_Enter,
775 Escape = ImGuiKey_Escape,
776 LeftCtrl = ImGuiKey_LeftCtrl,
777 LeftShift = ImGuiKey_LeftShift,
778 LeftAlt = ImGuiKey_LeftAlt,
779 LeftSuper = ImGuiKey_LeftSuper,
780 RightCtrl = ImGuiKey_RightCtrl,
781 RightShift = ImGuiKey_RightShift,
782 RightAlt = ImGuiKey_RightAlt,
783 RightSuper = ImGuiKey_RightSuper,
784 Menu = ImGuiKey_Menu,
785 Num0 = ImGuiKey_0,
786 Num1 = ImGuiKey_1,
787 Num2 = ImGuiKey_2,
788 Num3 = ImGuiKey_3,
789 Num4 = ImGuiKey_4,
790 Num5 = ImGuiKey_5,
791 Num6 = ImGuiKey_6,
792 Num7 = ImGuiKey_7,
793 Num8 = ImGuiKey_8,
794 Num9 = ImGuiKey_9,
795 A = ImGuiKey_A,
796 B = ImGuiKey_B,
797 C = ImGuiKey_C,
798 D = ImGuiKey_D,
799 E = ImGuiKey_E,
800 F = ImGuiKey_F,
801 G = ImGuiKey_G,
802 H = ImGuiKey_H,
803 I = ImGuiKey_I,
804 J = ImGuiKey_J,
805 K = ImGuiKey_K,
806 L = ImGuiKey_L,
807 M = ImGuiKey_M,
808 N = ImGuiKey_N,
809 O = ImGuiKey_O,
810 P = ImGuiKey_P,
811 Q = ImGuiKey_Q,
812 R = ImGuiKey_R,
813 S = ImGuiKey_S,
814 T = ImGuiKey_T,
815 U = ImGuiKey_U,
816 V = ImGuiKey_V,
817 W = ImGuiKey_W,
818 X = ImGuiKey_X,
819 Y = ImGuiKey_Y,
820 Z = ImGuiKey_Z,
821 F1 = ImGuiKey_F1,
822 F2 = ImGuiKey_F2,
823 F3 = ImGuiKey_F3,
824 F4 = ImGuiKey_F4,
825 F5 = ImGuiKey_F5,
826 F6 = ImGuiKey_F6,
827 F7 = ImGuiKey_F7,
828 F8 = ImGuiKey_F8,
829 F9 = ImGuiKey_F9,
830 F10 = ImGuiKey_F10,
831 F11 = ImGuiKey_F11,
832 F12 = ImGuiKey_F12,
833 Apostrophe = ImGuiKey_Apostrophe,
834 Comma = ImGuiKey_Comma,
835 Minus = ImGuiKey_Minus,
836 Period = ImGuiKey_Period,
837 Slash = ImGuiKey_Slash,
838 Semicolon = ImGuiKey_Semicolon,
839 Equal = ImGuiKey_Equal,
840 LeftBracket = ImGuiKey_LeftBracket,
841 Backslash = ImGuiKey_Backslash,
842 RightBracket = ImGuiKey_RightBracket,
843 GraveAccent = ImGuiKey_GraveAccent,
844 CapsLock = ImGuiKey_CapsLock,
845 ScrollLock = ImGuiKey_ScrollLock,
846 NumLock = ImGuiKey_NumLock,
847 PrintScreen = ImGuiKey_PrintScreen,
848 Pause = ImGuiKey_Pause,
849 Keypad0 = ImGuiKey_Keypad0,
850 Keypad1 = ImGuiKey_Keypad1,
851 Keypad2 = ImGuiKey_Keypad2,
852 Keypad3 = ImGuiKey_Keypad3,
853 Keypad4 = ImGuiKey_Keypad4,
854 Keypad5 = ImGuiKey_Keypad5,
855 Keypad6 = ImGuiKey_Keypad6,
856 Keypad7 = ImGuiKey_Keypad7,
857 Keypad8 = ImGuiKey_Keypad8,
858 Keypad9 = ImGuiKey_Keypad9,
859 KeypadDecimal = ImGuiKey_KeypadDecimal,
860 KeypadDivide = ImGuiKey_KeypadDivide,
861 KeypadMultiply = ImGuiKey_KeypadMultiply,
862 KeypadSubtract = ImGuiKey_KeypadSubtract,
863 KeypadAdd = ImGuiKey_KeypadAdd,
864 KeypadEnter = ImGuiKey_KeypadEnter,
865 KeypadEqual = ImGuiKey_KeypadEqual,
866 AppBack = ImGuiKey_AppBack,
867 AppForward = ImGuiKey_AppForward,
868 Oem102 = ImGuiKey_Oem102,
869
870 GamepadStart = ImGuiKey_GamepadStart,
871 GamepadBack = ImGuiKey_GamepadBack,
872 GamepadFaceLeft = ImGuiKey_GamepadFaceLeft,
873 GamepadFaceRight = ImGuiKey_GamepadFaceRight,
874 GamepadFaceUp = ImGuiKey_GamepadFaceUp,
875 GamepadFaceDown = ImGuiKey_GamepadFaceDown,
876 GamepadDpadLeft = ImGuiKey_GamepadDpadLeft,
877 GamepadDpadRight = ImGuiKey_GamepadDpadRight,
878 GamepadDpadUp = ImGuiKey_GamepadDpadUp,
879 GamepadDpadDown = ImGuiKey_GamepadDpadDown,
880 GamepadL1 = ImGuiKey_GamepadL1,
881 GamepadR1 = ImGuiKey_GamepadR1,
882 GamepadL2 = ImGuiKey_GamepadL2,
883 GamepadR2 = ImGuiKey_GamepadR2,
884 GamepadL3 = ImGuiKey_GamepadL3,
885 GamepadR3 = ImGuiKey_GamepadR3,
886 GamepadLStickLeft = ImGuiKey_GamepadLStickLeft,
887 GamepadLStickRight = ImGuiKey_GamepadLStickRight,
888 GamepadLStickUp = ImGuiKey_GamepadLStickUp,
889 GamepadLStickDown = ImGuiKey_GamepadLStickDown,
890 GamepadRStickLeft = ImGuiKey_GamepadRStickLeft,
891 GamepadRStickRight = ImGuiKey_GamepadRStickRight,
892 GamepadRStickUp = ImGuiKey_GamepadRStickUp,
893 GamepadRStickDown = ImGuiKey_GamepadRStickDown,
894
895 MouseLeft = ImGuiKey_MouseLeft,
896 MouseRight = ImGuiKey_MouseRight,
897 MouseMiddle = ImGuiKey_MouseMiddle,
898 MouseX1 = ImGuiKey_MouseX1,
899 MouseX2 = ImGuiKey_MouseX2,
900 MouseWheelX = ImGuiKey_MouseWheelX,
901 MouseWheelY = ImGuiKey_MouseWheelY,
902
903 // These are better handled as KeyMod, but sometimes can be seen as regular keys.
904 ModCtrl = ImGuiMod_Ctrl,
905 ModShift = ImGuiMod_Shift,
906 ModAlt = ImGuiMod_Alt,
907 ModSuper = ImGuiMod_Super,
908 }
909}
910
911// ImGuiMod is not a real enum in the .h but are part of ImGuiKey.
912// We week them separated because they can be OR-combined with keys and between them.
913imgui_flags_ex! {
914 pub KeyMod: ImGuiKey {
915 None = ImGuiMod_None,
916 Ctrl = ImGuiMod_Ctrl,
917 Shift = ImGuiMod_Shift,
918 Alt = ImGuiMod_Alt,
919 Super = ImGuiMod_Super,
920 }
921}
922
923impl TryFrom<Key> for KeyMod {
924 type Error = ();
925 fn try_from(key: Key) -> Result<KeyMod, Self::Error> {
926 match key {
927 Key::ModCtrl => Ok(KeyMod::Ctrl),
928 Key::ModShift => Ok(KeyMod::Shift),
929 Key::ModAlt => Ok(KeyMod::Alt),
930 Key::ModSuper => Ok(KeyMod::Super),
931 // KeyMod is a bitflags, but only one can be converted to Key
932 _ => Err(()),
933 }
934 }
935}
936
937imgui_flags! {
938 /// Dear ImGui (`ImGuiViewportFlags`): Flags for `ImGuiViewport`
939 pub ViewportFlags: ImGuiViewportFlags_ {
940 /// Dear ImGui (`ImGuiViewportFlags_None`): No flags
941 None,
942 /// Dear ImGui (`ImGuiViewportFlags_IsPlatformWindow`): Is platform window
943 IsPlatformWindow,
944 /// Dear ImGui (`ImGuiViewportFlags_IsPlatformMonitor`): Is platform monitor
945 IsPlatformMonitor,
946 /// Dear ImGui (`ImGuiViewportFlags_OwnedByApp`): Owned by application
947 OwnedByApp,
948 /// Dear ImGui (`ImGuiViewportFlags_NoDecoration`): No decoration
949 NoDecoration,
950 /// Dear ImGui (`ImGuiViewportFlags_NoTaskBarIcon`): No task bar icon
951 NoTaskBarIcon,
952 /// Dear ImGui (`ImGuiViewportFlags_NoFocusOnAppearing`): No focus on appearing
953 NoFocusOnAppearing,
954 /// Dear ImGui (`ImGuiViewportFlags_NoFocusOnClick`): No focus on click
955 NoFocusOnClick,
956 /// Dear ImGui (`ImGuiViewportFlags_NoInputs`): No inputs
957 NoInputs,
958 /// Dear ImGui (`ImGuiViewportFlags_NoRendererClear`): No renderer clear
959 NoRendererClear,
960 /// Dear ImGui (`ImGuiViewportFlags_NoAutoMerge`): No auto merge
961 NoAutoMerge,
962 /// Dear ImGui (`ImGuiViewportFlags_TopMost`): Top most
963 TopMost,
964 /// Dear ImGui (`ImGuiViewportFlags_CanHostOtherWindows`): Can host other windows
965 CanHostOtherWindows,
966 /// Dear ImGui (`ImGuiViewportFlags_IsMinimized`): Is minimized
967 IsMinimized,
968 /// Dear ImGui (`ImGuiViewportFlags_IsFocused`): Is focused
969 IsFocused,
970 }
971}
972
973imgui_flags! {
974 /// Dear ImGui (`ImGuiPopupFlags`): Flags for `OpenPopup*()`, `BeginPopupContext*()`, `IsPopupOpen()`
975 pub PopupFlags: ImGuiPopupFlags_ {
976 /// Dear ImGui (`ImGuiPopupFlags_None`): No flags
977 None,
978 /// Dear ImGui (`ImGuiPopupFlags_MouseButtonLeft`): Left mouse button
979 MouseButtonLeft,
980 /// Dear ImGui (`ImGuiPopupFlags_MouseButtonRight`): Right mouse button
981 MouseButtonRight,
982 /// Dear ImGui (`ImGuiPopupFlags_MouseButtonMiddle`): Middle mouse button
983 MouseButtonMiddle,
984 /// Dear ImGui (`ImGuiPopupFlags_NoReopen`): No reopen
985 NoReopen,
986 /// Dear ImGui (`ImGuiPopupFlags_NoOpenOverExistingPopup`): No open over existing popup
987 NoOpenOverExistingPopup,
988 /// Dear ImGui (`ImGuiPopupFlags_NoOpenOverItems`): No open over items
989 NoOpenOverItems,
990 /// Dear ImGui (`ImGuiPopupFlags_AnyPopupId`): Any popup ID
991 AnyPopupId,
992 /// Dear ImGui (`ImGuiPopupFlags_AnyPopupLevel`): Any popup level
993 AnyPopupLevel,
994 /// Dear ImGui (`ImGuiPopupFlags_AnyPopup`): Any popup
995 AnyPopup,
996 }
997}
998
999imgui_flags! {
1000 /// Dear ImGui (`ImGuiConfigFlags`): Flags for `io.ConfigFlags`
1001 pub ConfigFlags: ImGuiConfigFlags_ {
1002 /// Dear ImGui (`ImGuiConfigFlags_None`): No flags
1003 None,
1004 /// Dear ImGui (`ImGuiConfigFlags_NavEnableKeyboard`): Master keyboard navigation enable
1005 NavEnableKeyboard,
1006 /// Dear ImGui (`ImGuiConfigFlags_NavEnableGamepad`): Master gamepad navigation enable
1007 NavEnableGamepad,
1008 /// Dear ImGui (`ImGuiConfigFlags_NoMouse`): Instruct backends to not pass mouse events
1009 NoMouse,
1010 /// Dear ImGui (`ImGuiConfigFlags_NoMouseCursorChange`): Instruct backends to not change mouse cursor shape
1011 NoMouseCursorChange,
1012 /// Dear ImGui (`ImGuiConfigFlags_NoKeyboard`): Instruct backends to not pass keyboard events
1013 NoKeyboard,
1014 /// Dear ImGui (`ImGuiConfigFlags_DockingEnable`): Docking enable
1015 DockingEnable,
1016 /// Dear ImGui (`ImGuiConfigFlags_ViewportsEnable`): Viewports enable
1017 ViewportsEnable,
1018 /// Dear ImGui (`ImGuiConfigFlags_IsSRGB`): Renderer is using sRGB
1019 IsSRGB,
1020 /// Dear ImGui (`ImGuiConfigFlags_IsTouchScreen`): Is touch screen
1021 IsTouchScreen,
1022 }
1023}
1024
1025imgui_flags! {
1026 /// Dear ImGui (`ImGuiTreeNodeFlags`): Flags for `TreeNode()`, `TreeNodeEx()`, `CollapsingHeader()`
1027 pub TreeNodeFlags: ImGuiTreeNodeFlags_ {
1028 /// Dear ImGui (`ImGuiTreeNodeFlags_None`): No flags
1029 None,
1030 /// Dear ImGui (`ImGuiTreeNodeFlags_Selected`): Draw as selected
1031 Selected,
1032 /// Dear ImGui (`ImGuiTreeNodeFlags_Framed`): Draw frame with background (e.g. CollapsingHeader)
1033 Framed,
1034 /// Dear ImGui (`ImGuiTreeNodeFlags_AllowOverlap`): Hit testing to allow following items to be overlapped
1035 AllowOverlap,
1036 /// Dear ImGui (`ImGuiTreeNodeFlags_NoTreePushOnOpen`): Don't do a TreePush() when open (e.g. CollapsingHeader)
1037 NoTreePushOnOpen,
1038 /// Dear ImGui (`ImGuiTreeNodeFlags_NoAutoOpenOnLog`): Don't automatically and temporarily open node when logging
1039 NoAutoOpenOnLog,
1040 /// Dear ImGui (`ImGuiTreeNodeFlags_DefaultOpen`): Default to open
1041 DefaultOpen,
1042 /// Dear ImGui (`ImGuiTreeNodeFlags_OpenOnDoubleClick`): Need double-click to open node
1043 OpenOnDoubleClick,
1044 /// Dear ImGui (`ImGuiTreeNodeFlags_OpenOnArrow`): Only open when clicking on the arrow part
1045 OpenOnArrow,
1046 /// Dear ImGui (`ImGuiTreeNodeFlags_Leaf`): No collapsing, no arrow
1047 Leaf,
1048 /// Dear ImGui (`ImGuiTreeNodeFlags_Bullet`): Display a bullet instead of arrow
1049 Bullet,
1050 /// Dear ImGui (`ImGuiTreeNodeFlags_FramePadding`): Use `FramePadding` (even for TreeNodeEx)
1051 FramePadding,
1052 /// Dear ImGui (`ImGuiTreeNodeFlags_SpanAvailWidth`): Extend hit box to the right-most edge, even if not framed
1053 SpanAvailWidth,
1054 /// Dear ImGui (`ImGuiTreeNodeFlags_SpanFullWidth`): Extend hit box to the left-most and right-most edges
1055 SpanFullWidth,
1056 /// Dear ImGui (`ImGuiTreeNodeFlags_SpanLabelWidth`): Only hit test the label
1057 SpanLabelWidth,
1058 /// Dear ImGui (`ImGuiTreeNodeFlags_SpanAllColumns`): Span all columns
1059 SpanAllColumns,
1060 /// Dear ImGui (`ImGuiTreeNodeFlags_LabelSpanAllColumns`): Label span all columns
1061 LabelSpanAllColumns,
1062 /// Dear ImGui (`ImGuiTreeNodeFlags_NavLeftJumpsToParent`): Nav left jumps to parent
1063 NavLeftJumpsToParent,
1064 /// Dear ImGui (`ImGuiTreeNodeFlags_CollapsingHeader`): `ImGuiTreeNodeFlags_Framed` | `ImGuiTreeNodeFlags_NoTreePushOnOpen` | `ImGuiTreeNodeFlags_NoAutoOpenOnLog`
1065 CollapsingHeader,
1066 /// Dear ImGui (`ImGuiTreeNodeFlags_DrawLinesNone`): Draw lines none
1067 DrawLinesNone,
1068 /// Dear ImGui (`ImGuiTreeNodeFlags_DrawLinesFull`): Draw lines full
1069 DrawLinesFull,
1070 /// Dear ImGui (`ImGuiTreeNodeFlags_DrawLinesToNodes`): Draw lines to nodes
1071 DrawLinesToNodes,
1072 }
1073}
1074
1075imgui_flags! {
1076 /// Dear ImGui (`ImGuiFocusedFlags`): Flags for `IsWindowFocused()`
1077 pub FocusedFlags: ImGuiFocusedFlags_ {
1078 /// Dear ImGui (`ImGuiFocusedFlags_None`): No flags
1079 None,
1080 /// Dear ImGui (`ImGuiFocusedFlags_ChildWindows`): Return true if any child window is focused
1081 ChildWindows,
1082 /// Dear ImGui (`ImGuiFocusedFlags_RootWindow`): Test from root of the window hierarchy
1083 RootWindow,
1084 /// Dear ImGui (`ImGuiFocusedFlags_AnyWindow`): Return true if any window is focused
1085 AnyWindow,
1086 /// Dear ImGui (`ImGuiFocusedFlags_NoPopupHierarchy`): Do not test if popup hierarchy is focused
1087 NoPopupHierarchy,
1088 /// Dear ImGui (`ImGuiFocusedFlags_DockHierarchy`): Do not test if dock hierarchy is focused
1089 DockHierarchy,
1090 /// Dear ImGui (`ImGuiFocusedFlags_RootAndChildWindows`): Test from root and child windows
1091 RootAndChildWindows,
1092 }
1093}
1094
1095imgui_flags! {
1096 /// Dear ImGui (`ImGuiColorEditFlags`): Flags for `ColorEdit4()`, `ColorPicker4()` etc.
1097 pub ColorEditFlags: ImGuiColorEditFlags_ {
1098 /// Dear ImGui (`ImGuiColorEditFlags_None`): No flags
1099 None,
1100 /// Dear ImGui (`ImGuiColorEditFlags_NoAlpha`): ColorEdit, ColorPicker, ColorButton: ignore Alpha component (will only read 3 components from the input pointer).
1101 NoAlpha,
1102 /// Dear ImGui (`ImGuiColorEditFlags_NoPicker`): ColorEdit: disable picker when clicking on color square.
1103 NoPicker,
1104 /// Dear ImGui (`ImGuiColorEditFlags_NoOptions`): ColorEdit: disable toggling options menu when right-clicking on inputs/small preview.
1105 NoOptions,
1106 /// Dear ImGui (`ImGuiColorEditFlags_NoSmallPreview`): ColorEdit, ColorPicker: disable color square preview next to the inputs. (e.g. to show only the inputs)
1107 NoSmallPreview,
1108 /// Dear ImGui (`ImGuiColorEditFlags_NoInputs`): ColorEdit, ColorPicker: disable inputs sliders/text widgets (e.g. to show only the small preview color square).
1109 NoInputs,
1110 /// Dear ImGui (`ImGuiColorEditFlags_NoTooltip`): ColorEdit, ColorPicker, ColorButton: disable tooltip when hovering the preview.
1111 NoTooltip,
1112 /// Dear ImGui (`ImGuiColorEditFlags_NoLabel`): ColorEdit, ColorPicker: disable display of inline text label (the label is still forwarded to the tooltip and picker).
1113 NoLabel,
1114 /// Dear ImGui (`ImGuiColorEditFlags_NoSidePreview`): ColorPicker: disable bigger color preview on right side of the picker, use small color square preview instead.
1115 NoSidePreview,
1116 /// Dear ImGui (`ImGuiColorEditFlags_NoDragDrop`): ColorEdit: disable drag and drop target/source. ColorButton: disable drag and drop source.
1117 NoDragDrop,
1118 /// Dear ImGui (`ImGuiColorEditFlags_NoBorder`): ColorButton: disable border (which is enforced by default)
1119 NoBorder,
1120 /// Dear ImGui (`ImGuiColorEditFlags_NoColorMarkers`): ColorEdit: disable rendering R/G/B/A color marker.
1121 NoColorMarkers,
1122 /// Dear ImGui (`ImGuiColorEditFlags_AlphaOpaque`): ColorEdit, ColorPicker, ColorButton: disable alpha in the preview,. Contrary to _NoAlpha it may still be edited when calling ColorEdit4()/ColorPicker4().
1123 AlphaOpaque,
1124 /// Dear ImGui (`ImGuiColorEditFlags_AlphaNoBg`): ColorEdit, ColorPicker, ColorButton: disable rendering a checkerboard background behind transparent color.
1125 AlphaNoBg,
1126 /// Dear ImGui (`ImGuiColorEditFlags_AlphaPreviewHalf`): ColorEdit, ColorPicker, ColorButton: display half opaque / half transparent preview.
1127 AlphaPreviewHalf,
1128 /// Dear ImGui (`ImGuiColorEditFlags_AlphaBar`): ColorEdit, ColorPicker: show vertical alpha bar/gradient in picker.
1129 AlphaBar,
1130 /// Dear ImGui (`ImGuiColorEditFlags_HDR`): (WIP) ColorEdit: Currently only disable 0.0f..1.0f limits in RGBA edition (note: you probably want to use ImGuiColorEditFlags_Float flag as well).
1131 HDR,
1132 /// Dear ImGui (`ImGuiColorEditFlags_DisplayRGB`): ColorEdit: override _display_ type among RGB/HSV/Hex. ColorPicker: select any combination using one or more of RGB/HSV/Hex.
1133 DisplayRGB,
1134 /// Dear ImGui (`ImGuiColorEditFlags_DisplayHSV`): [Display] // "
1135 DisplayHSV,
1136 /// Dear ImGui (`ImGuiColorEditFlags_DisplayHex`): [Display] // "
1137 DisplayHex,
1138 /// Dear ImGui (`ImGuiColorEditFlags_Uint8`): ColorEdit, ColorPicker, ColorButton: _display_ values formatted as 0..255.
1139 Uint8,
1140 /// Dear ImGui (`ImGuiColorEditFlags_Float`): ColorEdit, ColorPicker, ColorButton: _display_ values formatted as 0.0f..1.0f floats instead of 0..255 integers.
1141 Float,
1142 /// Dear ImGui (`ImGuiColorEditFlags_PickerHueBar`): ColorPicker: bar for Hue, rectangle for Sat/Value.
1143 PickerHueBar,
1144 /// Dear ImGui (`ImGuiColorEditFlags_PickerHueWheel`): ColorPicker: wheel for Hue, triangle for Sat/Value.
1145 PickerHueWheel,
1146 /// Dear ImGui (`ImGuiColorEditFlags_PickerNoRotate`): ColorPicker: disable rotating Sat/Value triangle
1147 PickerNoRotate,
1148 /// Dear ImGui (`ImGuiColorEditFlags_InputRGB`): ColorEdit, ColorPicker: input and output data in RGB format.
1149 InputRGB,
1150 /// Dear ImGui (`ImGuiColorEditFlags_InputHSV`): ColorEdit, ColorPicker: input and output data in HSV format.
1151 InputHSV,
1152 /// Dear ImGui (`ImGuiColorEditFlags_DefaultOptions_`): Default options
1153 DefaultOptions_,
1154 }
1155}
1156
1157imgui_flags! {
1158 /// Dear ImGui (`ImGuiTabBarFlags`): Flags for `BeginTabBar()`
1159 pub TabBarFlags: ImGuiTabBarFlags_ {
1160 /// Dear ImGui (`ImGuiTabBarFlags_None`): No flags
1161 None,
1162 /// Dear ImGui (`ImGuiTabBarFlags_Reorderable`): Allow reordering of tabs
1163 Reorderable,
1164 /// Dear ImGui (`ImGuiTabBarFlags_AutoSelectNewTabs`): Auto-select new tabs
1165 AutoSelectNewTabs,
1166 /// Dear ImGui (`ImGuiTabBarFlags_TabListPopupButton`): Tab list popup button
1167 TabListPopupButton,
1168 /// Dear ImGui (`ImGuiTabBarFlags_NoCloseWithMiddleMouseButton`): No close with middle mouse button
1169 NoCloseWithMiddleMouseButton,
1170 /// Dear ImGui (`ImGuiTabBarFlags_NoTabListScrollingButtons`): Disable scrolling buttons (e.g. arrows)
1171 NoTabListScrollingButtons,
1172 /// Dear ImGui (`ImGuiTabBarFlags_NoTooltip`): Disable tooltips when hovering a tab
1173 NoTooltip,
1174 /// Dear ImGui (`ImGuiTabBarFlags_DrawSelectedOverline`): Draw a horizontal line under the selected tab.
1175 DrawSelectedOverline,
1176 /// Dear ImGui (`ImGuiTabBarFlags_FittingPolicyMixed`): Growing tabs: automatically resize tabs to fit in width
1177 FittingPolicyMixed,
1178 /// Dear ImGui (`ImGuiTabBarFlags_FittingPolicyShrink`): Shrink tabs to fit in width
1179 FittingPolicyShrink,
1180 }
1181}
1182
1183imgui_flags! {
1184 /// Dear ImGui (`ImGuiTabItemFlags`): Flags for `BeginTabItem()`
1185 pub TabItemFlags: ImGuiTabItemFlags_ {
1186 /// Dear ImGui (`ImGuiTabItemFlags_None`): No flags
1187 None,
1188 /// Dear ImGui (`ImGuiTabItemFlags_UnsavedDocument`): Append '*' to title
1189 UnsavedDocument,
1190 /// Dear ImGui (`ImGuiTabItemFlags_SetSelected`): Set selected
1191 SetSelected,
1192 /// Dear ImGui (`ImGuiTabItemFlags_NoCloseWithMiddleMouseButton`): No close with middle mouse button
1193 NoCloseWithMiddleMouseButton,
1194 /// Dear ImGui (`ImGuiTabItemFlags_NoPushId`): Don't call PushID(tab->ID)/PopID() on tab items
1195 NoPushId,
1196 /// Dear ImGui (`ImGuiTabItemFlags_NoTooltip`): Disable tooltip for the given tab
1197 NoTooltip,
1198 /// Dear ImGui (`ImGuiTabItemFlags_NoReorder`): Disable reordering this tab or specifying some variables
1199 NoReorder,
1200 /// Dear ImGui (`ImGuiTabItemFlags_Leading`): Enforce the tab position to the left of the tab bar (after the tab list popup button)
1201 Leading,
1202 /// Dear ImGui (`ImGuiTabItemFlags_Trailing`): Enforce the tab position to the right of the tab bar (before the scrolling buttons)
1203 Trailing,
1204 }
1205}
1206
1207imgui_flags! {
1208 /// Dear ImGui (`ImGuiBackendFlags`): Flags for `io.BackendFlags`
1209 pub BackendFlags: ImGuiBackendFlags_ {
1210 /// Dear ImGui (`ImGuiBackendFlags_None`): No flags
1211 None,
1212 /// Dear ImGui (`ImGuiBackendFlags_HasGamepad`): Backend has gamepad
1213 HasGamepad,
1214 /// Dear ImGui (`ImGuiBackendFlags_HasMouseCursors`): Backend has mouse cursors
1215 HasMouseCursors,
1216 /// Dear ImGui (`ImGuiBackendFlags_HasSetMousePos`): Backend can set mouse position
1217 HasSetMousePos,
1218 /// Dear ImGui (`ImGuiBackendFlags_RendererHasVtxOffset`): Backend renderer has vertex offset
1219 RendererHasVtxOffset,
1220 /// Dear ImGui (`ImGuiBackendFlags_RendererHasTextures`): Backend renderer has textures
1221 RendererHasTextures,
1222 /// Dear ImGui (`ImGuiBackendFlags_RendererHasViewports`): Backend renderer has viewports
1223 RendererHasViewports,
1224 /// Dear ImGui (`ImGuiBackendFlags_PlatformHasViewports`): Backend platform has viewports
1225 PlatformHasViewports,
1226 /// Dear ImGui (`ImGuiBackendFlags_HasMouseHoveredViewport`): Backend has mouse hovered viewport
1227 HasMouseHoveredViewport,
1228 /// Dear ImGui (`ImGuiBackendFlags_HasParentViewport`): Backend has parent viewport
1229 HasParentViewport,
1230 }
1231}
1232
1233imgui_flags! {
1234 /// Dear ImGui (`ImGuiTableFlags`): Flags for `BeginTable()`
1235 pub TableFlags: ImGuiTableFlags_ {
1236 /// Dear ImGui (`ImGuiTableFlags_None`): No flags
1237 None,
1238
1239 // Features
1240 /// Dear ImGui (`ImGuiTableFlags_Resizable`): Enable resizing columns.
1241 Resizable,
1242 /// Dear ImGui (`ImGuiTableFlags_Reorderable`): Enable reordering columns in header row.
1243 Reorderable,
1244 /// Dear ImGui (`ImGuiTableFlags_Hideable`): Enable hiding/disabling columns in context menu.
1245 Hideable,
1246 /// Dear ImGui (`ImGuiTableFlags_Sortable`): Enable sorting. Call TableGetSortSpecs() to obtain sort specs.
1247 Sortable,
1248 /// Dear ImGui (`ImGuiTableFlags_NoSavedSettings`): Disable persisting columns order, width, visibility and sort settings in the .ini file.
1249 NoSavedSettings,
1250 /// Dear ImGui (`ImGuiTableFlags_ContextMenuInBody`): Right-click on columns body/contents will also display table context menu.
1251 ContextMenuInBody,
1252 /// Dear ImGui (`ImGuiTableFlags_RowBg`): Set each RowBg color with ImGuiCol_TableRowBg or ImGuiCol_TableRowBgAlt
1253 RowBg,
1254 /// Dear ImGui (`ImGuiTableFlags_BordersInnerH`): Draw horizontal borders between rows.
1255 BordersInnerH,
1256 /// Dear ImGui (`ImGuiTableFlags_BordersOuterH`): Draw horizontal borders at the top and bottom.
1257 BordersOuterH,
1258 /// Dear ImGui (`ImGuiTableFlags_BordersInnerV`): Draw vertical borders between columns.
1259 BordersInnerV,
1260 /// Dear ImGui (`ImGuiTableFlags_BordersOuterV`): Draw vertical borders on the left and right sides.
1261 BordersOuterV,
1262 /// Dear ImGui (`ImGuiTableFlags_BordersH`): Draw horizontal borders.
1263 BordersH,
1264 /// Dear ImGui (`ImGuiTableFlags_BordersV`): Draw vertical borders.
1265 BordersV,
1266 /// Dear ImGui (`ImGuiTableFlags_BordersInner`): Draw inner borders.
1267 BordersInner,
1268 /// Dear ImGui (`ImGuiTableFlags_BordersOuter`): Draw outer borders.
1269 BordersOuter,
1270 /// Dear ImGui (`ImGuiTableFlags_Borders`): Draw all borders.
1271 Borders,
1272 /// Dear ImGui (`ImGuiTableFlags_NoBordersInBody`): [ALPHA] Disable vertical borders in columns Body (borders will always appear in Headers).
1273 NoBordersInBody,
1274 /// Dear ImGui (`ImGuiTableFlags_NoBordersInBodyUntilResize`): [ALPHA] Disable vertical borders in columns Body until hovered for resize (borders will always appear in Headers).
1275 NoBordersInBodyUntilResize,
1276 /// Dear ImGui (`ImGuiTableFlags_SizingFixedFit`): Columns default to _WidthFixed or _WidthAuto, matching contents width.
1277 SizingFixedFit,
1278 /// Dear ImGui (`ImGuiTableFlags_SizingFixedSame`): Columns default to _WidthFixed or _WidthAuto, matching the maximum contents width of all columns.
1279 SizingFixedSame,
1280 /// Dear ImGui (`ImGuiTableFlags_SizingStretchProp`): Columns default to _WidthStretch with default weights proportional to each columns contents widths.
1281 SizingStretchProp,
1282 /// Dear ImGui (`ImGuiTableFlags_SizingStretchSame`): Columns default to _WidthStretch with default weights all equal.
1283 SizingStretchSame,
1284 /// Dear ImGui (`ImGuiTableFlags_NoHostExtendX`): Make outer width auto-fit to columns, overriding outer_size.x value.
1285 NoHostExtendX,
1286 /// Dear ImGui (`ImGuiTableFlags_NoHostExtendY`): Make outer height stop exactly at outer_size.y (prevent auto-extending table past the limit).
1287 NoHostExtendY,
1288 /// Dear ImGui (`ImGuiTableFlags_NoKeepColumnsVisible`): Disable keeping column always minimally visible when ScrollX is off and table gets too small.
1289 NoKeepColumnsVisible,
1290 /// Dear ImGui (`ImGuiTableFlags_PreciseWidths`): Disable distributing remainder width to stretched columns.
1291 PreciseWidths,
1292 /// Dear ImGui (`ImGuiTableFlags_NoClip`): No clip
1293 NoClip,
1294 /// Dear ImGui (`ImGuiTableFlags_PadOuterX`): Pad outer X
1295 PadOuterX,
1296 /// Dear ImGui (`ImGuiTableFlags_NoPadOuterX`): No pad outer X
1297 NoPadOuterX,
1298 /// Dear ImGui (`ImGuiTableFlags_NoPadInnerX`): No pad inner X
1299 NoPadInnerX,
1300 /// Dear ImGui (`ImGuiTableFlags_ScrollX`): Scroll X
1301 ScrollX,
1302 /// Dear ImGui (`ImGuiTableFlags_ScrollY`): Scroll Y
1303 ScrollY,
1304 /// Dear ImGui (`ImGuiTableFlags_SortMulti`): Sort multi
1305 SortMulti,
1306 /// Dear ImGui (`ImGuiTableFlags_SortTristate`): Sort tristate
1307 SortTristate,
1308 /// Dear ImGui (`ImGuiTableFlags_HighlightHoveredColumn`): Highlight hovered column
1309 HighlightHoveredColumn,
1310 }
1311}
1312
1313imgui_flags! {
1314 /// Dear ImGui (`ImGuiTableRowFlags`): Flags for `TableNextRow()`
1315 pub TableRowFlags: ImGuiTableRowFlags_ {
1316 /// Dear ImGui (`ImGuiTableRowFlags_None`): No flags
1317 None,
1318 /// Dear ImGui (`ImGuiTableRowFlags_Headers`): Row is a header
1319 Headers,
1320 }
1321}
1322
1323imgui_flags! {
1324 /// Dear ImGui (`ImGuiTableColumnFlags`): Flags for `TableSetupColumn()`
1325 pub TableColumnFlags: ImGuiTableColumnFlags_ {
1326 /// Dear ImGui (`ImGuiTableColumnFlags_None`): No flags
1327 None,
1328 /// Dear ImGui (`ImGuiTableColumnFlags_Disabled`): Overriding/master disable flag: hide column, won't show in context menu.
1329 Disabled,
1330 /// Dear ImGui (`ImGuiTableColumnFlags_DefaultHide`): Default as a hidden/disabled column.
1331 DefaultHide,
1332 /// Dear ImGui (`ImGuiTableColumnFlags_DefaultSort`): Default as a sorting column.
1333 DefaultSort,
1334 /// Dear ImGui (`ImGuiTableColumnFlags_WidthStretch`): Column will stretch.
1335 WidthStretch,
1336 /// Dear ImGui (`ImGuiTableColumnFlags_WidthFixed`): Column will not stretch.
1337 WidthFixed,
1338 /// Dear ImGui (`ImGuiTableColumnFlags_NoResize`): Disable manual resizing.
1339 NoResize,
1340 /// Dear ImGui (`ImGuiTableColumnFlags_NoReorder`): Disable manual reordering this column.
1341 NoReorder,
1342 /// Dear ImGui (`ImGuiTableColumnFlags_NoHide`): Disable ability to hide/disable this column.
1343 NoHide,
1344 /// Dear ImGui (`ImGuiTableColumnFlags_NoClip`): Disable clipping for this column.
1345 NoClip,
1346 /// Dear ImGui (`ImGuiTableColumnFlags_NoSort`): Disable ability to sort on this field.
1347 NoSort,
1348 /// Dear ImGui (`ImGuiTableColumnFlags_NoSortAscending`): Disable ability to sort in the ascending direction.
1349 NoSortAscending,
1350 /// Dear ImGui (`ImGuiTableColumnFlags_NoSortDescending`): Disable ability to sort in the descending direction.
1351 NoSortDescending,
1352 /// Dear ImGui (`ImGuiTableColumnFlags_NoHeaderLabel`): TableHeadersRow() will submit an empty label for this column.
1353 NoHeaderLabel,
1354 /// Dear ImGui (`ImGuiTableColumnFlags_NoHeaderWidth`): Disable header text width contribution to automatic column width.
1355 NoHeaderWidth,
1356 /// Dear ImGui (`ImGuiTableColumnFlags_PreferSortAscending`): Make the initial sort direction Ascending when first sorting on this column.
1357 PreferSortAscending,
1358 /// Dear ImGui (`ImGuiTableColumnFlags_PreferSortDescending`): Make the initial sort direction Descending when first sorting on this column.
1359 PreferSortDescending,
1360 /// Dear ImGui (`ImGuiTableColumnFlags_IndentEnable`): Use current Indent value when entering cell.
1361 IndentEnable,
1362 /// Dear ImGui (`ImGuiTableColumnFlags_IndentDisable`): Ignore current Indent value when entering cell.
1363 IndentDisable,
1364 /// Dear ImGui (`ImGuiTableColumnFlags_AngledHeader`): TableHeadersRow() will submit an angled header row for this column.
1365 AngledHeader,
1366 /// Dear ImGui (`ImGuiTableColumnFlags_IsEnabled`): Status: is enabled == not hidden by user/api.
1367 IsEnabled,
1368 /// Dear ImGui (`ImGuiTableColumnFlags_IsVisible`): Status: is visible == is enabled AND not clipped by scrolling.
1369 IsVisible,
1370 /// Dear ImGui (`ImGuiTableColumnFlags_IsSorted`): Status: is currently part of the sort specs.
1371 IsSorted,
1372 /// Dear ImGui (`ImGuiTableColumnFlags_IsHovered`): Status: is hovered by mouse.
1373 IsHovered,
1374 }
1375}
1376
1377imgui_enum! {
1378 /// Dear ImGui (`ImGuiTableBgTarget`): Color target for `TableSetBgColor()`
1379 pub TableBgTarget: ImGuiTableBgTarget_ {
1380 /// Dear ImGui (`ImGuiTableBgTarget_None`): None
1381 None,
1382 /// Dear ImGui (`ImGuiTableBgTarget_RowBg0`): Row background 0
1383 RowBg0,
1384 /// Dear ImGui (`ImGuiTableBgTarget_RowBg1`): Row background 1
1385 RowBg1,
1386 /// Dear ImGui (`ImGuiTableBgTarget_CellBg`): Cell background
1387 CellBg,
1388 }
1389}
1390
1391imgui_flags_ex! {
1392 /// Dear ImGui (`ImGuiDockNodeFlags`): Flags for `DockSpace()`
1393 pub DockNodeFlags: ImGuiDockNodeFlags_ {
1394 /// Dear ImGui (`ImGuiDockNodeFlags_None`): No flags
1395 None = ImGuiDockNodeFlags_None,
1396 /// Dear ImGui (`ImGuiDockNodeFlags_KeepAliveOnly`): Keep alive only
1397 KeepAliveOnly = ImGuiDockNodeFlags_KeepAliveOnly,
1398 /// Dear ImGui (`ImGuiDockNodeFlags_NoDockingOverCentralNode`): No docking over central node
1399 NoDockingOverCentralNode = ImGuiDockNodeFlags_NoDockingOverCentralNode,
1400 /// Dear ImGui (`ImGuiDockNodeFlags_PassthruCentralNode`): Passthru central node
1401 PassthruCentralNode = ImGuiDockNodeFlags_PassthruCentralNode,
1402 /// Dear ImGui (`ImGuiDockNodeFlags_NoDockingSplit`): No docking split
1403 NoDockingSplit = ImGuiDockNodeFlags_NoDockingSplit,
1404 /// Dear ImGui (`ImGuiDockNodeFlags_NoResize`): No resize
1405 NoResize = ImGuiDockNodeFlags_NoResize,
1406 /// Dear ImGui (`ImGuiDockNodeFlags_AutoHideTabBar`): Auto-hide tab bar
1407 AutoHideTabBar = ImGuiDockNodeFlags_AutoHideTabBar,
1408 /// Dear ImGui (`ImGuiDockNodeFlags_NoUndocking`): No undocking
1409 NoUndocking = ImGuiDockNodeFlags_NoUndocking,
1410 /// Dear ImGui (`ImGuiDockNodeFlags_DockSpace`): Internal: DockSpace
1411 DockSpace = ImGuiDockNodeFlagsPrivate_::ImGuiDockNodeFlags_DockSpace,
1412 /// Dear ImGui (`ImGuiDockNodeFlags_CentralNode`): Internal: Central node
1413 CentralNode = ImGuiDockNodeFlagsPrivate_::ImGuiDockNodeFlags_CentralNode,
1414 /// Dear ImGui (`ImGuiDockNodeFlags_NoTabBar`): Internal: No tab bar
1415 NoTabBar = ImGuiDockNodeFlagsPrivate_::ImGuiDockNodeFlags_NoTabBar,
1416 /// Dear ImGui (`ImGuiDockNodeFlags_HiddenTabBar`): Internal: Hidden tab bar
1417 HiddenTabBar = ImGuiDockNodeFlagsPrivate_::ImGuiDockNodeFlags_HiddenTabBar,
1418 /// Dear ImGui (`ImGuiDockNodeFlags_NoWindowMenuButton`): Internal: No window menu button
1419 NoWindowMenuButton = ImGuiDockNodeFlagsPrivate_::ImGuiDockNodeFlags_NoWindowMenuButton,
1420 /// Dear ImGui (`ImGuiDockNodeFlags_NoCloseButton`): Internal: No close button
1421 NoCloseButton = ImGuiDockNodeFlagsPrivate_::ImGuiDockNodeFlags_NoCloseButton,
1422 /// Dear ImGui (`ImGuiDockNodeFlags_NoResizeX`): Internal: No resize X
1423 NoResizeX = ImGuiDockNodeFlagsPrivate_::ImGuiDockNodeFlags_NoResizeX,
1424 /// Dear ImGui (`ImGuiDockNodeFlags_NoResizeY`): Internal: No resize Y
1425 NoResizeY = ImGuiDockNodeFlagsPrivate_::ImGuiDockNodeFlags_NoResizeY,
1426 /// Dear ImGui (`ImGuiDockNodeFlags_DockedWindowsInFocusRoute`): Internal: Docked windows in focus route
1427 DockedWindowsInFocusRoute = ImGuiDockNodeFlagsPrivate_::ImGuiDockNodeFlags_DockedWindowsInFocusRoute,
1428 /// Dear ImGui (`ImGuiDockNodeFlags_NoDockingSplitOther`): Internal: No docking split other
1429 NoDockingSplitOther = ImGuiDockNodeFlagsPrivate_::ImGuiDockNodeFlags_NoDockingSplitOther,
1430 /// Dear ImGui (`ImGuiDockNodeFlags_NoDockingOverMe`): Internal: No docking over me
1431 NoDockingOverMe = ImGuiDockNodeFlagsPrivate_::ImGuiDockNodeFlags_NoDockingOverMe,
1432 /// Dear ImGui (`ImGuiDockNodeFlags_NoDockingOverOther`): Internal: No docking over other
1433 NoDockingOverOther = ImGuiDockNodeFlagsPrivate_::ImGuiDockNodeFlags_NoDockingOverOther,
1434 /// Dear ImGui (`ImGuiDockNodeFlags_NoDockingOverEmpty`): Internal: No docking over empty
1435 NoDockingOverEmpty = ImGuiDockNodeFlagsPrivate_::ImGuiDockNodeFlags_NoDockingOverEmpty,
1436 /// Dear ImGui (`ImGuiDockNodeFlags_NoDocking`): Internal: No docking
1437 NoDocking = ImGuiDockNodeFlagsPrivate_::ImGuiDockNodeFlags_NoDocking,
1438 }
1439}
1440
1441// ImGuiDragDropFlags is split into two bitflags, one for the Source, one for the Accept.
1442imgui_flags_ex! {
1443 /// Dear ImGui (`ImGuiDragDropFlags`): Flags for `BeginDragDropSource()`
1444 pub DragDropSourceFlags: ImGuiDragDropFlags_ {
1445 /// Dear ImGui (`ImGuiDragDropFlags_None`): No flags
1446 None = ImGuiDragDropFlags_None,
1447 /// Dear ImGui (`ImGuiDragDropFlags_SourceNoPreviewTooltip`): No preview tooltip
1448 NoPreviewTooltip = ImGuiDragDropFlags_SourceNoPreviewTooltip,
1449 /// Dear ImGui (`ImGuiDragDropFlags_SourceNoDisableHover`): No disable hover
1450 NoDisableHover = ImGuiDragDropFlags_SourceNoDisableHover,
1451 /// Dear ImGui (`ImGuiDragDropFlags_SourceNoHoldToOpenOthers`): No hold to open others
1452 NoHoldToOpenOthers = ImGuiDragDropFlags_SourceNoHoldToOpenOthers,
1453 /// Dear ImGui (`ImGuiDragDropFlags_SourceAllowNullID`): Allow null ID
1454 AllowNullID = ImGuiDragDropFlags_SourceAllowNullID,
1455 /// Dear ImGui (`ImGuiDragDropFlags_SourceExtern`): Extern
1456 Extern = ImGuiDragDropFlags_SourceExtern,
1457 /// Dear ImGui (`ImGuiDragDropFlags_PayloadAutoExpire`): Payload auto expire
1458 PayloadAutoExpire = ImGuiDragDropFlags_PayloadAutoExpire,
1459 /// Dear ImGui (`ImGuiDragDropFlags_PayloadNoCrossContext`): Payload no cross context
1460 PayloadNoCrossContext = ImGuiDragDropFlags_PayloadNoCrossContext,
1461 /// Dear ImGui (`ImGuiDragDropFlags_PayloadNoCrossProcess`): Payload no cross process
1462 PayloadNoCrossProcess = ImGuiDragDropFlags_PayloadNoCrossProcess,
1463 }
1464}
1465imgui_flags_ex! {
1466 /// Dear ImGui (`ImGuiDragDropFlags`): Flags for `AcceptDragDropPayload()`
1467 pub DragDropAcceptFlags: ImGuiDragDropFlags_ {
1468 /// Dear ImGui (`ImGuiDragDropFlags_None`): No flags
1469 None = ImGuiDragDropFlags_None,
1470 /// Dear ImGui (`ImGuiDragDropFlags_AcceptBeforeDelivery`): Accept before delivery
1471 BeforeDelivery = ImGuiDragDropFlags_AcceptBeforeDelivery,
1472 /// Dear ImGui (`ImGuiDragDropFlags_AcceptNoDrawDefaultRect`): No draw default rect
1473 NoDrawDefaultRect = ImGuiDragDropFlags_AcceptNoDrawDefaultRect,
1474 /// Dear ImGui (`ImGuiDragDropFlags_AcceptNoPreviewTooltip`): No preview tooltip
1475 NoPreviewTooltip = ImGuiDragDropFlags_AcceptNoPreviewTooltip,
1476 /// Dear ImGui (`ImGuiDragDropFlags_AcceptDrawAsHovered`): Accept draw as hovered
1477 AcceptDrawAsHovered = ImGuiDragDropFlags_AcceptDrawAsHovered,
1478 /// Dear ImGui (`ImGuiDragDropFlags_AcceptPeekOnly`): Accept peek only
1479 PeekOnly = ImGuiDragDropFlags_AcceptPeekOnly,
1480 }
1481}
1482
1483imgui_flags! {
1484 /// Dear ImGui (`ImGuiInputFlags`): Flags for `Shortcut()`, `SetNextItemShortcut()`
1485 pub InputFlags: ImGuiInputFlags_ {
1486 /// Dear ImGui (`ImGuiInputFlags_None`): No flags
1487 None,
1488 /// Dear ImGui (`ImGuiInputFlags_Repeat`): Repeat
1489 Repeat,
1490 /// Dear ImGui (`ImGuiInputFlags_RouteActive`): Route active
1491 RouteActive,
1492 /// Dear ImGui (`ImGuiInputFlags_RouteFocused`): Route focused
1493 RouteFocused,
1494 /// Dear ImGui (`ImGuiInputFlags_RouteGlobal`): Route global
1495 RouteGlobal,
1496 /// Dear ImGui (`ImGuiInputFlags_RouteAlways`): Route always
1497 RouteAlways,
1498 /// Dear ImGui (`ImGuiInputFlags_RouteOverFocused`): Route over focused
1499 RouteOverFocused,
1500 /// Dear ImGui (`ImGuiInputFlags_RouteOverActive`): Route over active
1501 RouteOverActive,
1502 /// Dear ImGui (`ImGuiInputFlags_RouteUnlessBgFocused`): Route unless bg focused
1503 RouteUnlessBgFocused,
1504 /// Dear ImGui (`ImGuiInputFlags_RouteFromRootWindow`): Route from root window
1505 RouteFromRootWindow,
1506 /// Dear ImGui (`ImGuiInputFlags_Tooltip`): Tooltip
1507 Tooltip,
1508 }
1509}
1510
1511imgui_scoped_enum! {
1512 /// Dear ImGui (`ImGuiSortDirection`): Sorting direction (ascending or descending)
1513 pub SortDirection: ImGuiSortDirection {
1514 /// Dear ImGui (`ImGuiSortDirection_None`): No direction
1515 None,
1516 /// Dear ImGui (`ImGuiSortDirection_Ascending`): Ascending
1517 Ascending,
1518 /// Dear ImGui (`ImGuiSortDirection_Descending`): Descending
1519 Descending,
1520 }
1521}
1522
1523imgui_flags! {
1524 /// Dear ImGui (`ImGuiItemFlags`): Flags for `PushItemFlag()`, shared by all items
1525 pub ItemFlags: ImGuiItemFlags_ {
1526 /// Dear ImGui (`ImGuiItemFlags_None`): No flags
1527 None,
1528 /// Dear ImGui (`ImGuiItemFlags_NoTabStop`): No tab stop
1529 NoTabStop,
1530 /// Dear ImGui (`ImGuiItemFlags_NoNav`): No nav
1531 NoNav,
1532 /// Dear ImGui (`ImGuiItemFlags_NoNavDefaultFocus`): No nav default focus
1533 NoNavDefaultFocus,
1534 /// Dear ImGui (`ImGuiItemFlags_ButtonRepeat`): Button repeat
1535 ButtonRepeat,
1536 /// Dear ImGui (`ImGuiItemFlags_AutoClosePopups`): Auto-close popups
1537 AutoClosePopups,
1538 /// Dear ImGui (`ImGuiItemFlags_AllowDuplicateId`): Allow duplicate ID
1539 AllowDuplicateId,
1540 /// Dear ImGui (`ImGuiItemFlags_LiveEditOnInputText`): InputText: apply keyboard edits to backing value while typing
1541 LiveEditOnInputText,
1542 /// Dear ImGui (`ImGuiItemFlags_LiveEditOnInputScalar`): DragXXX, SliderXXX, InputScalar: apply keyboard edits to backing value while typing
1543 LiveEditOnInputScalar,
1544 /// Dear ImGui (`ImGuiItemFlags_LiveEditOnInput`): LiveEditOnInputText | LiveEditOnInputScalar
1545 LiveEditOnInput,
1546 }
1547}
1548
1549imgui_flags! {
1550 /// Dear ImGui (`ImGuiMultiSelectFlags`): Flags for `BeginMultiSelect()`
1551 pub MultiSelectFlags: ImGuiMultiSelectFlags_ {
1552 /// Dear ImGui (`ImGuiMultiSelectFlags_None`): No flags
1553 None,
1554 /// Dear ImGui (`ImGuiMultiSelectFlags_SingleSelect`): Single select
1555 SingleSelect,
1556 /// Dear ImGui (`ImGuiMultiSelectFlags_NoSelectAll`): No select all
1557 NoSelectAll,
1558 /// Dear ImGui (`ImGuiMultiSelectFlags_NoRangeSelect`): No range select
1559 NoRangeSelect,
1560 /// Dear ImGui (`ImGuiMultiSelectFlags_NoAutoSelect`): No auto select
1561 NoAutoSelect,
1562 /// Dear ImGui (`ImGuiMultiSelectFlags_NoAutoClear`): No auto clear
1563 NoAutoClear,
1564 /// Dear ImGui (`ImGuiMultiSelectFlags_NoAutoClearOnReselect`): No auto clear on reselect
1565 NoAutoClearOnReselect,
1566 /// Dear ImGui (`ImGuiMultiSelectFlags_BoxSelect1d`): Box select 1d
1567 BoxSelect1d,
1568 /// Dear ImGui (`ImGuiMultiSelectFlags_BoxSelect2d`): Box select 2d
1569 BoxSelect2d,
1570 /// Dear ImGui (`ImGuiMultiSelectFlags_BoxSelectNoScroll`): Box select no scroll
1571 BoxSelectNoScroll,
1572 /// Dear ImGui (`ImGuiMultiSelectFlags_ClearOnEscape`): Clear on escape
1573 ClearOnEscape,
1574 /// Dear ImGui (`ImGuiMultiSelectFlags_ClearOnClickVoid`): Clear on click void
1575 ClearOnClickVoid,
1576 /// Dear ImGui (`ImGuiMultiSelectFlags_ScopeWindow`): Scope window
1577 ScopeWindow,
1578 /// Dear ImGui (`ImGuiMultiSelectFlags_ScopeRect`): Scope rect
1579 ScopeRect,
1580 /// Dear ImGui (`ImGuiMultiSelectFlags_SelectOnAuto`): Select on auto
1581 SelectOnAuto,
1582 /// Dear ImGui (`ImGuiMultiSelectFlags_SelectOnClickAlways`): Select on click always
1583 SelectOnClickAlways,
1584 /// Dear ImGui (`ImGuiMultiSelectFlags_SelectOnClickRelease`): Select on click release
1585 SelectOnClickRelease,
1586 //RangeSelect2d,
1587 /// Dear ImGui (`ImGuiMultiSelectFlags_NavWrapX`): Nav wrap X
1588 NavWrapX,
1589 /// Dear ImGui (`ImGuiMultiSelectFlags_NoSelectOnRightClick`): No select on right click
1590 NoSelectOnRightClick,
1591 }
1592}
1593
1594imgui_scoped_enum! {
1595 /// Dear ImGui (`ImGuiSelectionRequestType`): Selection request type
1596 pub SelectionRequestType: ImGuiSelectionRequestType {
1597 /// Dear ImGui (`ImGuiSelectionRequestType_None`): None
1598 None,
1599 /// Dear ImGui (`ImGuiSelectionRequestType_SetAll`): Request app to clear or select all
1600 SetAll,
1601 /// Dear ImGui (`ImGuiSelectionRequestType_SetRange`): Request app to select/unselect range
1602 SetRange,
1603 }
1604}
1605
1606imgui_flags! {
1607 /// Dear ImGui (`ImFontAtlasFlags`): Flags for `ImFontAtlas`
1608 pub FontAtlasFlags: ImFontAtlasFlags_ {
1609 /// Dear ImGui (`ImFontAtlasFlags_None`): No flags
1610 None,
1611 /// Dear ImGui (`ImFontAtlasFlags_NoPowerOfTwoHeight`): No power of two height
1612 NoPowerOfTwoHeight,
1613 /// Dear ImGui (`ImFontAtlasFlags_NoMouseCursors`): No mouse cursors
1614 NoMouseCursors,
1615 /// Dear ImGui (`ImFontAtlasFlags_NoBakedLines`): No baked lines
1616 NoBakedLines,
1617 }
1618}
1619
1620imgui_flags! {
1621 /// Dear ImGui (`ImFontFlags`): Flags for `ImFont`
1622 pub FontFlags: ImFontFlags_ {
1623 /// Dear ImGui (`ImFontFlags_None`): No flags
1624 None,
1625 /// Dear ImGui (`ImFontFlags_NoLoadError`): No load error
1626 NoLoadError,
1627
1628 // internal but bound anyways
1629 /// Dear ImGui (`ImFontFlags_NoLoadGlyphs`): No load glyphs
1630 NoLoadGlyphs,
1631 /// Dear ImGui (`ImFontFlags_LockBakedSizes`): Lock baked sizes
1632 LockBakedSizes,
1633 }
1634}