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