1#![allow(non_upper_case_globals)]
3
4use easy_imgui_sys::*;
5
6use 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 ($vis:vis $name:ident : $native_name:ident : $native_name_api:ty { $( $(#[$inner:ident $($args:tt)*])* $field:ident = $value:ident),* $(,)? }) => {
45 #[repr(i32)]
46 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
47 $vis enum $name {
48 $(
49 $(#[$inner $($args)*])*
50 $field = $native_name::$value.0 as i32,
51 )*
52 }
53 impl $name {
54 pub fn bits(self) -> $native_name_api {
55 <$native_name_api>::from_bits(self as c_int)
56 }
57 pub fn from_bits(bits: $native_name_api) -> Option<Self> {
58 $(
59 $(#[$inner $($args)*])*
60 const $field: c_int = $native_name::$value.0 as i32;
61 )*
62 let r = match <$native_name_api>::to_bits(bits) {
63 $(
64 $(#[$inner $($args)*])*
65 $field => Self::$field,
66 )*
67 _ => return std::option::Option::None,
68 };
69 Some(r)
70 }
71 }
72 };
73}
74
75macro_rules! imgui_enum {
76 ($vis:vis $name:ident: $native_name:ident { $( $(#[$inner:ident $($args:tt)*])* $field:ident ),* $(,)? }) => {
77 paste::paste! {
78 imgui_enum_ex! {
79 $vis $name: $native_name: i32 {
80 $( $(#[$inner $($args)*])* $field = [<$native_name $field>],)*
81 }
82 }
83 }
84 };
85}
86
87macro_rules! imgui_scoped_enum {
89 ($vis:vis $name:ident: $native_name:ident { $( $(#[$inner:ident $($args:tt)*])* $field:ident ),* $(,)? }) => {
90 impl_bit_enum_helper!{$native_name}
91 paste::paste! {
92 imgui_enum_ex! {
93 $vis $name: $native_name: $native_name {
94 $( $(#[$inner $($args)*])* $field = [<$native_name _ $field>],)*
95 }
96 }
97 }
98 };
99}
100
101macro_rules! imgui_flags_ex {
102 ($vis:vis $name:ident: $native_name:ident { $( $(#[$inner:ident $($args:tt)*])* $field:ident = $value:ident),* $(,)? }) => {
103 bitflags::bitflags! {
104 #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
105 $vis struct $name : i32 {
106 $(
107 $(#[$inner $($args)*])*
108 const $field = $native_name::$value.0 as i32;
109 )*
110 }
111 }
112};
113}
114
115macro_rules! imgui_flags {
116 ($vis:vis $name:ident: $native_name:ident { $( $(#[$inner:ident $($args:tt)*])* $field:ident),* $(,)? }) => {
117 paste::paste! {
118 imgui_flags_ex! {
119 $vis $name: $native_name {
120 $( $(#[$inner $($args)*])* $field = [<$native_name $field>],)*
121 }
122 }
123 }
124 };
125}
126imgui_flags! {
127 pub DrawFlags: ImDrawFlags_ {
128 None,
129 Closed,
130 RoundCornersTopLeft,
131 RoundCornersTopRight,
132 RoundCornersBottomLeft,
133 RoundCornersBottomRight,
134 RoundCornersNone,
135 RoundCornersTop,
136 RoundCornersBottom,
137 RoundCornersLeft,
138 RoundCornersRight,
139 RoundCornersAll,
140 }
141}
142
143imgui_enum! {
144 pub Cond: ImGuiCond_ {
145 Always,
146 Once,
147 FirstUseEver,
148 Appearing,
149 }
150}
151
152imgui_enum! {
153 pub ColorId: ImGuiCol_ {
154 Text,
155 TextDisabled,
156 WindowBg,
157 ChildBg,
158 PopupBg,
159 Border,
160 BorderShadow,
161 FrameBg,
162 FrameBgHovered,
163 FrameBgActive,
164 TitleBg,
165 TitleBgActive,
166 TitleBgCollapsed,
167 MenuBarBg,
168 ScrollbarBg,
169 ScrollbarGrab,
170 ScrollbarGrabHovered,
171 ScrollbarGrabActive,
172 CheckMark,
173 SliderGrab,
174 SliderGrabActive,
175 Button,
176 ButtonHovered,
177 ButtonActive,
178 Header,
179 HeaderHovered,
180 HeaderActive,
181 Separator,
182 SeparatorHovered,
183 SeparatorActive,
184 ResizeGrip,
185 ResizeGripHovered,
186 ResizeGripActive,
187 InputTextCursor,
188 TabHovered,
189 Tab,
190 TabSelected,
191 TabSelectedOverline,
192 TabDimmed,
193 TabDimmedSelected,
194 TabDimmedSelectedOverline,
195 DockingPreview,
196 DockingEmptyBg,
197 PlotLines,
198 PlotLinesHovered,
199 PlotHistogram,
200 PlotHistogramHovered,
201 TableHeaderBg,
202 TableBorderStrong,
203 TableBorderLight,
204 TableRowBg,
205 TableRowBgAlt,
206 TextLink,
207 TextSelectedBg,
208 TreeLines,
209 DragDropTarget,
210 NavCursor,
211 NavWindowingHighlight,
212 NavWindowingDimBg,
213 ModalWindowDimBg,
214 }
215}
216
217imgui_enum! {
218 pub StyleVar: ImGuiStyleVar_ {
219 Alpha,
220 DisabledAlpha,
221 WindowPadding,
222 WindowRounding,
223 WindowBorderSize,
224 WindowMinSize,
225 WindowTitleAlign,
226 ChildRounding,
227 ChildBorderSize,
228 PopupRounding,
229 PopupBorderSize,
230 FramePadding,
231 FrameRounding,
232 FrameBorderSize,
233 ItemSpacing,
234 ItemInnerSpacing,
235 IndentSpacing,
236 CellPadding,
237 ScrollbarSize,
238 ScrollbarRounding,
239 GrabMinSize,
240 GrabRounding,
241 ImageBorderSize,
242 TabRounding,
243 TabBorderSize,
244 TabMinWidthBase,
245 TabMinWidthShrink,
246 TabBarBorderSize,
247 TabBarOverlineSize,
248 TableAngledHeadersAngle,
249 TableAngledHeadersTextAlign,
250 TreeLinesSize,
251 TreeLinesRounding,
252 ButtonTextAlign,
253 SelectableTextAlign,
254 SeparatorTextBorderSize,
255 SeparatorTextAlign,
256 SeparatorTextPadding,
257 DockingSeparatorSize,
258 }
259}
260
261imgui_flags! {
262 pub WindowFlags: ImGuiWindowFlags_ {
263 None,
264 NoTitleBar,
265 NoResize,
266 NoMove,
267 NoScrollbar,
268 NoScrollWithMouse,
269 NoCollapse,
270 AlwaysAutoResize,
271 NoBackground,
272 NoSavedSettings,
273 NoMouseInputs,
274 MenuBar,
275 HorizontalScrollbar,
276 NoFocusOnAppearing,
277 NoBringToFrontOnFocus,
278 AlwaysVerticalScrollbar,
279 AlwaysHorizontalScrollbar,
280 NoNavInputs,
281 NoNavFocus,
282 UnsavedDocument,
283 NoDocking,
284 NoNav,
285 NoDecoration,
286 NoInputs,
287 }
288}
289
290imgui_flags! {
291 pub ChildFlags: ImGuiChildFlags_ {
292 None,
293 Borders,
294 AlwaysUseWindowPadding,
295 ResizeX,
296 ResizeY,
297 AutoResizeX,
298 AutoResizeY,
299 AlwaysAutoResize,
300 FrameStyle,
301 NavFlattened,
302 }
303}
304imgui_flags! {
305 pub ButtonFlags: ImGuiButtonFlags_ {
306 None,
307 MouseButtonLeft,
308 MouseButtonRight,
309 MouseButtonMiddle,
310 }
311}
312
313imgui_scoped_enum! {
314 pub Dir: ImGuiDir {
315 Left,
316 Right,
317 Up,
318 Down,
319 }
320}
321
322imgui_flags! {
323 pub ComboFlags: ImGuiComboFlags_ {
324 None,
325 PopupAlignLeft,
326 HeightSmall,
327 HeightRegular,
328 HeightLarge,
329 HeightLargest,
330 NoArrowButton,
331 NoPreview,
332 }
333}
334
335imgui_flags! {
336 pub SelectableFlags: ImGuiSelectableFlags_ {
337 None,
338 NoAutoClosePopups,
339 SpanAllColumns,
340 AllowDoubleClick,
341 Disabled,
342 AllowOverlap,
343 Highlight,
344 }
345}
346
347imgui_flags! {
348 pub SliderFlags: ImGuiSliderFlags_ {
349 None,
350 Logarithmic,
351 NoRoundToFormat,
352 NoInput,
353 WrapAround,
354 ClampOnInput,
355 ClampZeroRange,
356 AlwaysClamp,
357 NoSpeedTweaks,
358 }
359}
360
361imgui_flags! {
362 pub InputTextFlags: ImGuiInputTextFlags_ {
363 None,
365 CharsDecimal,
366 CharsHexadecimal,
367 CharsScientific,
368 CharsUppercase,
369 CharsNoBlank,
370
371 AllowTabInput,
373 EnterReturnsTrue,
374 EscapeClearsAll,
375 CtrlEnterForNewLine,
376
377 ReadOnly,
379 Password,
380 AlwaysOverwrite,
381 AutoSelectAll,
382 ParseEmptyRefVal,
383 DisplayEmptyRefVal,
384 NoHorizontalScroll,
385 NoUndoRedo,
386
387 ElideLeft,
389
390 CallbackCompletion,
392 CallbackHistory,
393 CallbackAlways,
394 CallbackCharFilter,
395 CallbackResize,
396 CallbackEdit,
397 }
398}
399
400imgui_flags! {
401 pub HoveredFlags: ImGuiHoveredFlags_ {
402 None,
403 ChildWindows,
404 RootWindow,
405 AnyWindow,
406 NoPopupHierarchy,
407 DockHierarchy,
408 AllowWhenBlockedByPopup,
409 AllowWhenBlockedByActiveItem,
411 AllowWhenOverlappedByItem,
412 AllowWhenOverlappedByWindow,
413 AllowWhenDisabled,
414 NoNavOverride,
415 AllowWhenOverlapped,
416 RectOnly,
417 RootAndChildWindows,
418 ForTooltip,
419 Stationary,
420 DelayNone,
421 DelayShort,
422 DelayNormal,
423 NoSharedDelay,
424 }
425}
426
427#[repr(i32)]
428#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
429pub enum MouseButton {
430 Left,
431 Right,
432 Middle,
433 Other(u16),
434}
435
436impl MouseButton {
437 pub fn bits(self) -> i32 {
438 match self {
439 MouseButton::Left => ImGuiMouseButton_::ImGuiMouseButton_Left.0 as i32,
440 MouseButton::Right => ImGuiMouseButton_::ImGuiMouseButton_Right.0 as i32,
441 MouseButton::Middle => ImGuiMouseButton_::ImGuiMouseButton_Middle.0 as i32,
442 MouseButton::Other(x) => x as i32,
443 }
444 }
445}
446
447imgui_enum! {
448 pub MouseCursor : ImGuiMouseCursor_ {
449 None,
450 Arrow,
451 TextInput,
452 ResizeAll,
453 ResizeNS,
454 ResizeEW,
455 ResizeNESW,
456 ResizeNWSE,
457 Hand,
458 NotAllowed,
459 }
460}
461
462impl_bit_enum_helper! {ImGuiKey}
464
465imgui_enum_ex! {
466 pub Key: ImGuiKey: ImGuiKey {
467 None = ImGuiKey_None,
468 Tab = ImGuiKey_Tab,
469 LeftArrow = ImGuiKey_LeftArrow,
470 RightArrow = ImGuiKey_RightArrow,
471 UpArrow = ImGuiKey_UpArrow,
472 DownArrow = ImGuiKey_DownArrow,
473 PageUp = ImGuiKey_PageUp,
474 PageDown = ImGuiKey_PageDown,
475 Home = ImGuiKey_Home,
476 End = ImGuiKey_End,
477 Insert = ImGuiKey_Insert,
478 Delete = ImGuiKey_Delete,
479 Backspace = ImGuiKey_Backspace,
480 Space = ImGuiKey_Space,
481 Enter = ImGuiKey_Enter,
482 Escape = ImGuiKey_Escape,
483 LeftCtrl = ImGuiKey_LeftCtrl,
484 LeftShift = ImGuiKey_LeftShift,
485 LeftAlt = ImGuiKey_LeftAlt,
486 LeftSuper = ImGuiKey_LeftSuper,
487 RightCtrl = ImGuiKey_RightCtrl,
488 RightShift = ImGuiKey_RightShift,
489 RightAlt = ImGuiKey_RightAlt,
490 RightSuper = ImGuiKey_RightSuper,
491 Menu = ImGuiKey_Menu,
492 Num0 = ImGuiKey_0,
493 Num1 = ImGuiKey_1,
494 Num2 = ImGuiKey_2,
495 Num3 = ImGuiKey_3,
496 Num4 = ImGuiKey_4,
497 Num5 = ImGuiKey_5,
498 Num6 = ImGuiKey_6,
499 Num7 = ImGuiKey_7,
500 Num8 = ImGuiKey_8,
501 Num9 = ImGuiKey_9,
502 A = ImGuiKey_A,
503 B = ImGuiKey_B,
504 C = ImGuiKey_C,
505 D = ImGuiKey_D,
506 E = ImGuiKey_E,
507 F = ImGuiKey_F,
508 G = ImGuiKey_G,
509 H = ImGuiKey_H,
510 I = ImGuiKey_I,
511 J = ImGuiKey_J,
512 K = ImGuiKey_K,
513 L = ImGuiKey_L,
514 M = ImGuiKey_M,
515 N = ImGuiKey_N,
516 O = ImGuiKey_O,
517 P = ImGuiKey_P,
518 Q = ImGuiKey_Q,
519 R = ImGuiKey_R,
520 S = ImGuiKey_S,
521 T = ImGuiKey_T,
522 U = ImGuiKey_U,
523 V = ImGuiKey_V,
524 W = ImGuiKey_W,
525 X = ImGuiKey_X,
526 Y = ImGuiKey_Y,
527 Z = ImGuiKey_Z,
528 F1 = ImGuiKey_F1,
529 F2 = ImGuiKey_F2,
530 F3 = ImGuiKey_F3,
531 F4 = ImGuiKey_F4,
532 F5 = ImGuiKey_F5,
533 F6 = ImGuiKey_F6,
534 F7 = ImGuiKey_F7,
535 F8 = ImGuiKey_F8,
536 F9 = ImGuiKey_F9,
537 F10 = ImGuiKey_F10,
538 F11 = ImGuiKey_F11,
539 F12 = ImGuiKey_F12,
540 Apostrophe = ImGuiKey_Apostrophe,
541 Comma = ImGuiKey_Comma,
542 Minus = ImGuiKey_Minus,
543 Period = ImGuiKey_Period,
544 Slash = ImGuiKey_Slash,
545 Semicolon = ImGuiKey_Semicolon,
546 Equal = ImGuiKey_Equal,
547 LeftBracket = ImGuiKey_LeftBracket,
548 Backslash = ImGuiKey_Backslash,
549 RightBracket = ImGuiKey_RightBracket,
550 GraveAccent = ImGuiKey_GraveAccent,
551 CapsLock = ImGuiKey_CapsLock,
552 ScrollLock = ImGuiKey_ScrollLock,
553 NumLock = ImGuiKey_NumLock,
554 PrintScreen = ImGuiKey_PrintScreen,
555 Pause = ImGuiKey_Pause,
556 Keypad0 = ImGuiKey_Keypad0,
557 Keypad1 = ImGuiKey_Keypad1,
558 Keypad2 = ImGuiKey_Keypad2,
559 Keypad3 = ImGuiKey_Keypad3,
560 Keypad4 = ImGuiKey_Keypad4,
561 Keypad5 = ImGuiKey_Keypad5,
562 Keypad6 = ImGuiKey_Keypad6,
563 Keypad7 = ImGuiKey_Keypad7,
564 Keypad8 = ImGuiKey_Keypad8,
565 Keypad9 = ImGuiKey_Keypad9,
566 KeypadDecimal = ImGuiKey_KeypadDecimal,
567 KeypadDivide = ImGuiKey_KeypadDivide,
568 KeypadMultiply = ImGuiKey_KeypadMultiply,
569 KeypadSubtract = ImGuiKey_KeypadSubtract,
570 KeypadAdd = ImGuiKey_KeypadAdd,
571 KeypadEnter = ImGuiKey_KeypadEnter,
572 KeypadEqual = ImGuiKey_KeypadEqual,
573 AppBack = ImGuiKey_AppBack,
574 AppForward = ImGuiKey_AppForward,
575 Oem102 = ImGuiKey_Oem102,
576
577 GamepadStart = ImGuiKey_GamepadStart,
578 GamepadBack = ImGuiKey_GamepadBack,
579 GamepadFaceLeft = ImGuiKey_GamepadFaceLeft,
580 GamepadFaceRight = ImGuiKey_GamepadFaceRight,
581 GamepadFaceUp = ImGuiKey_GamepadFaceUp,
582 GamepadFaceDown = ImGuiKey_GamepadFaceDown,
583 GamepadDpadLeft = ImGuiKey_GamepadDpadLeft,
584 GamepadDpadRight = ImGuiKey_GamepadDpadRight,
585 GamepadDpadUp = ImGuiKey_GamepadDpadUp,
586 GamepadDpadDown = ImGuiKey_GamepadDpadDown,
587 GamepadL1 = ImGuiKey_GamepadL1,
588 GamepadR1 = ImGuiKey_GamepadR1,
589 GamepadL2 = ImGuiKey_GamepadL2,
590 GamepadR2 = ImGuiKey_GamepadR2,
591 GamepadL3 = ImGuiKey_GamepadL3,
592 GamepadR3 = ImGuiKey_GamepadR3,
593 GamepadLStickLeft = ImGuiKey_GamepadLStickLeft,
594 GamepadLStickRight = ImGuiKey_GamepadLStickRight,
595 GamepadLStickUp = ImGuiKey_GamepadLStickUp,
596 GamepadLStickDown = ImGuiKey_GamepadLStickDown,
597 GamepadRStickLeft = ImGuiKey_GamepadRStickLeft,
598 GamepadRStickRight = ImGuiKey_GamepadRStickRight,
599 GamepadRStickUp = ImGuiKey_GamepadRStickUp,
600 GamepadRStickDown = ImGuiKey_GamepadRStickDown,
601
602 MouseLeft = ImGuiKey_MouseLeft,
603 MouseRight = ImGuiKey_MouseRight,
604 MouseMiddle = ImGuiKey_MouseMiddle,
605 MouseX1 = ImGuiKey_MouseX1,
606 MouseX2 = ImGuiKey_MouseX2,
607 MouseWheelX = ImGuiKey_MouseWheelX,
608 MouseWheelY = ImGuiKey_MouseWheelY,
609
610 ModCtrl = ImGuiMod_Ctrl,
612 ModShift = ImGuiMod_Shift,
613 ModAlt = ImGuiMod_Alt,
614 ModSuper = ImGuiMod_Super,
615 }
616}
617
618imgui_flags_ex! {
621 pub KeyMod: ImGuiKey {
622 None = ImGuiMod_None,
623 Ctrl = ImGuiMod_Ctrl,
624 Shift = ImGuiMod_Shift,
625 Alt = ImGuiMod_Alt,
626 Super = ImGuiMod_Super,
627 }
628}
629
630impl TryFrom<Key> for KeyMod {
631 type Error = ();
632 fn try_from(key: Key) -> Result<KeyMod, Self::Error> {
633 match key {
634 Key::ModCtrl => Ok(KeyMod::Ctrl),
635 Key::ModShift => Ok(KeyMod::Shift),
636 Key::ModAlt => Ok(KeyMod::Alt),
637 Key::ModSuper => Ok(KeyMod::Super),
638 _ => Err(()),
640 }
641 }
642}
643
644imgui_flags! {
645 pub ViewportFlags: ImGuiViewportFlags_ {
646 None,
647 IsPlatformWindow,
648 IsPlatformMonitor,
649 OwnedByApp,
650 NoDecoration,
651 NoTaskBarIcon,
652 NoFocusOnAppearing,
653 NoFocusOnClick,
654 NoInputs,
655 NoRendererClear,
656 NoAutoMerge,
657 TopMost,
658 CanHostOtherWindows,
659 IsMinimized,
660 IsFocused,
661 }
662}
663
664imgui_flags! {
665 pub PopupFlags: ImGuiPopupFlags_ {
666 None,
667 MouseButtonLeft,
668 MouseButtonRight,
669 MouseButtonMiddle,
670 MouseButtonMask_,
671 MouseButtonDefault_,
672 NoReopen,
673 NoOpenOverExistingPopup,
674 NoOpenOverItems,
675 AnyPopupId,
676 AnyPopupLevel,
677 AnyPopup,
678 }
679}
680
681imgui_flags! {
682 pub ConfigFlags: ImGuiConfigFlags_ {
683 None,
684 NavEnableKeyboard,
685 NavEnableGamepad,
686 NoMouse,
687 NoMouseCursorChange,
688 DockingEnable,
689 ViewportsEnable,
690 IsSRGB,
691 IsTouchScreen,
692 }
693}
694
695imgui_flags! {
696 pub TreeNodeFlags: ImGuiTreeNodeFlags_ {
697 None,
698 Selected,
699 Framed,
700 AllowOverlap,
701 NoTreePushOnOpen,
702 NoAutoOpenOnLog,
703 DefaultOpen,
704 OpenOnDoubleClick,
705 OpenOnArrow,
706 Leaf,
707 Bullet,
708 FramePadding,
709 SpanAvailWidth,
710 SpanFullWidth,
711 SpanLabelWidth,
712 SpanAllColumns,
713 LabelSpanAllColumns,
714 NavLeftJumpsToParent,
715 CollapsingHeader,
717 DrawLinesNone,
718 DrawLinesFull,
719 DrawLinesToNodes,
720 }
721}
722
723imgui_flags! {
724 pub FocusedFlags: ImGuiFocusedFlags_ {
725 None,
726 ChildWindows,
727 RootWindow,
728 AnyWindow,
729 NoPopupHierarchy,
730 DockHierarchy,
731 RootAndChildWindows,
732 }
733}
734
735imgui_flags! {
736 pub ColorEditFlags: ImGuiColorEditFlags_ {
737 None,
738 NoAlpha,
739 NoPicker,
740 NoOptions,
741 NoSmallPreview,
742 NoInputs,
743 NoTooltip,
744 NoLabel,
745 NoSidePreview,
746 NoDragDrop,
747 NoBorder,
748 AlphaOpaque,
749 AlphaNoBg,
750 AlphaPreviewHalf,
751 AlphaBar,
752 HDR,
753 DisplayRGB,
754 DisplayHSV,
755 DisplayHex,
756 Uint8,
757 Float,
758 PickerHueBar,
759 PickerHueWheel,
760 InputRGB,
761 InputHSV,
762 DefaultOptions_,
763 }
764}
765
766imgui_flags! {
767 pub TabBarFlags: ImGuiTabBarFlags_ {
768 None,
769 Reorderable,
770 AutoSelectNewTabs,
771 TabListPopupButton,
772 NoCloseWithMiddleMouseButton,
773 NoTabListScrollingButtons,
774 NoTooltip,
775 DrawSelectedOverline,
776 FittingPolicyMixed,
777 FittingPolicyShrink,
778 FittingPolicyScroll,
779 FittingPolicyMask_,
780 FittingPolicyDefault_,
781 }
782}
783
784imgui_flags! {
785 pub TabItemFlags: ImGuiTabItemFlags_ {
786 None,
787 UnsavedDocument,
788 SetSelected,
789 NoCloseWithMiddleMouseButton,
790 NoPushId,
791 NoTooltip,
792 NoReorder,
793 Leading,
794 Trailing,
795 }
796}
797
798imgui_flags! {
799 pub BackendFlags: ImGuiBackendFlags_ {
800 None,
801 HasGamepad,
802 HasMouseCursors,
803 HasSetMousePos,
804 RendererHasVtxOffset,
805 RendererHasTextures,
806 PlatformHasViewports,
807 HasMouseHoveredViewport,
808 RendererHasViewports,
809 }
810}
811
812imgui_flags! {
813 pub TableFlags: ImGuiTableFlags_ {
814 None,
815 Resizable,
817 Reorderable,
818 Hideable,
819 Sortable,
820 NoSavedSettings,
821 ContextMenuInBody,
822 RowBg,
824 BordersInnerH,
825 BordersOuterH,
826 BordersInnerV,
827 BordersOuterV,
828 BordersH,
829 BordersV,
830 BordersInner,
831 BordersOuter,
832 Borders,
833 NoBordersInBody,
834 NoBordersInBodyUntilResize,
835 SizingFixedFit,
837 SizingFixedSame,
838 SizingStretchProp,
839 SizingStretchSame,
840 NoHostExtendX,
842 NoHostExtendY,
843 NoKeepColumnsVisible,
844 PreciseWidths,
845 NoClip,
847 PadOuterX,
849 NoPadOuterX,
850 NoPadInnerX,
851 ScrollX,
853 ScrollY,
854 SortMulti,
856 SortTristate,
857 HighlightHoveredColumn,
859 }
860}
861
862imgui_flags! {
863 pub TableRowFlags: ImGuiTableRowFlags_ {
864 None,
865 Headers,
866 }
867}
868
869imgui_flags! {
870 pub TableColumnFlags: ImGuiTableColumnFlags_ {
871 None,
873 Disabled,
874 DefaultHide,
875 DefaultSort,
876 WidthStretch,
877 WidthFixed,
878 NoResize,
879 NoReorder,
880 NoHide,
881 NoClip,
882 NoSort,
883 NoSortAscending,
884 NoSortDescending,
885 NoHeaderLabel,
886 NoHeaderWidth,
887 PreferSortAscending,
888 PreferSortDescending,
889 IndentEnable,
890 IndentDisable,
891 AngledHeader,
892
893 IsEnabled,
895 IsVisible,
896 IsSorted,
897 IsHovered,
898 }
899}
900
901imgui_enum! {
902 pub TableBgTarget: ImGuiTableBgTarget_ {
903 None,
904 RowBg0,
905 RowBg1,
906 CellBg,
907 }
908}
909
910imgui_flags! {
911 pub DockNodeFlags: ImGuiDockNodeFlags_ {
912 None,
913 KeepAliveOnly,
914 NoDockingOverCentralNode,
916 PassthruCentralNode,
917 NoDockingSplit,
918 NoResize,
919 AutoHideTabBar,
920 NoUndocking,
921 }
922}
923
924imgui_flags_ex! {
926 pub DragDropSourceFlags: ImGuiDragDropFlags_ {
927 None = ImGuiDragDropFlags_None,
928 NoPreviewTooltip = ImGuiDragDropFlags_SourceNoPreviewTooltip,
929 NoDisableHover = ImGuiDragDropFlags_SourceNoDisableHover,
930 NoHoldToOpenOthers = ImGuiDragDropFlags_SourceNoHoldToOpenOthers,
931 AllowNullID = ImGuiDragDropFlags_SourceAllowNullID,
932 Extern = ImGuiDragDropFlags_SourceExtern,
933 PayloadAutoExpire = ImGuiDragDropFlags_PayloadAutoExpire,
934 PayloadNoCrossContext = ImGuiDragDropFlags_PayloadNoCrossContext,
935 PayloadNoCrossProcess = ImGuiDragDropFlags_PayloadNoCrossProcess,
936 }
937}
938imgui_flags_ex! {
939 pub DragDropAcceptFlags: ImGuiDragDropFlags_ {
940 None = ImGuiDragDropFlags_None,
941 BeforeDelivery = ImGuiDragDropFlags_AcceptBeforeDelivery,
942 NoDrawDefaultRect = ImGuiDragDropFlags_AcceptNoDrawDefaultRect,
943 NoPreviewTooltip = ImGuiDragDropFlags_AcceptNoPreviewTooltip,
944 PeekOnly = ImGuiDragDropFlags_AcceptPeekOnly,
945 }
946}
947
948imgui_flags! {
949 pub InputFlags: ImGuiInputFlags_ {
950 None,
951 RouteActive,
952 RouteFocused,
953 RouteGlobal,
954 RouteAlways,
955 RouteOverFocused,
956 RouteOverActive,
957 RouteUnlessBgFocused,
958 RouteFromRootWindow,
959 Tooltip,
960 }
961}
962
963imgui_scoped_enum! {
964 pub SortDirection: ImGuiSortDirection {
965 None,
966 Ascending,
967 Descending,
968 }
969}
970
971imgui_flags! {
972 pub ItemFlags: ImGuiItemFlags_ {
973 None,
974 NoTabStop,
975 NoNav,
976 NoNavDefaultFocus,
977 ButtonRepeat,
978 AutoClosePopups,
979 AllowDuplicateId,
980 }
981}
982
983imgui_flags! {
984 pub MultiSelectFlags: ImGuiMultiSelectFlags_ {
985 None,
986 SingleSelect,
987 NoSelectAll,
988 NoRangeSelect,
989 NoAutoSelect,
990 NoAutoClear,
991 NoAutoClearOnReselect,
992 BoxSelect1d,
993 BoxSelect2d,
994 BoxSelectNoScroll,
995 ClearOnEscape,
996 ClearOnClickVoid,
997 ScopeWindow,
998 ScopeRect,
999 SelectOnClick,
1000 SelectOnClickRelease,
1001 NavWrapX,
1003 }
1004}
1005
1006imgui_scoped_enum! {
1007 pub SelectionRequestType: ImGuiSelectionRequestType {
1008 None,
1009 SetAll,
1010 SetRange,
1011 }
1012}
1013
1014imgui_flags! {
1015 pub FontAtlasFlags: ImFontAtlasFlags_ {
1016 None,
1017 NoPowerOfTwoHeight,
1018 NoMouseCursors,
1019 NoBakedLines,
1020 }
1021}
1022
1023imgui_flags! {
1024 pub FontFlags: ImFontFlags_ {
1025 None,
1026 NoLoadError,
1027
1028 NoLoadGlyphs,
1030 LockBakedSizes,
1031 }
1032}