Flags.go 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503
  1. package giu
  2. import "github.com/AllenDang/imgui-go"
  3. // InputTextFlags represents input text flags.
  4. type InputTextFlags int
  5. // input text flags.
  6. const (
  7. // InputTextFlagsNone sets everything default.
  8. InputTextFlagsNone InputTextFlags = imgui.InputTextFlagsNone
  9. // InputTextFlagsCharsDecimal allows 0123456789.+-.
  10. InputTextFlagsCharsDecimal InputTextFlags = imgui.InputTextFlagsCharsDecimal
  11. // InputTextFlagsCharsHexadecimal allow 0123456789ABCDEFabcdef.
  12. InputTextFlagsCharsHexadecimal InputTextFlags = imgui.InputTextFlagsCharsHexadecimal
  13. // InputTextFlagsCharsUppercase turns a..z into A..Z.
  14. InputTextFlagsCharsUppercase InputTextFlags = imgui.InputTextFlagsCharsUppercase
  15. // InputTextFlagsCharsNoBlank filters out spaces, tabs.
  16. InputTextFlagsCharsNoBlank InputTextFlags = imgui.InputTextFlagsCharsNoBlank
  17. // InputTextFlagsAutoSelectAll selects entire text when first taking mouse focus.
  18. InputTextFlagsAutoSelectAll InputTextFlags = imgui.InputTextFlagsAutoSelectAll
  19. // InputTextFlagsEnterReturnsTrue returns 'true' when Enter is pressed (as opposed to when the value was modified).
  20. InputTextFlagsEnterReturnsTrue InputTextFlags = imgui.InputTextFlagsEnterReturnsTrue
  21. // InputTextFlagsCallbackCompletion for callback on pressing TAB (for completion handling).
  22. InputTextFlagsCallbackCompletion InputTextFlags = imgui.InputTextFlagsCallbackCompletion
  23. // InputTextFlagsCallbackHistory for callback on pressing Up/Down arrows (for history handling).
  24. InputTextFlagsCallbackHistory InputTextFlags = imgui.InputTextFlagsCallbackHistory
  25. // InputTextFlagsCallbackAlways for callback on each iteration. User code may query cursor position, modify text buffer.
  26. InputTextFlagsCallbackAlways InputTextFlags = imgui.InputTextFlagsCallbackAlways
  27. // InputTextFlagsCallbackCharFilter for callback on character inputs to replace or discard them.
  28. // Modify 'EventChar' to replace or discard, or return 1 in callback to discard.
  29. InputTextFlagsCallbackCharFilter InputTextFlags = imgui.InputTextFlagsCallbackCharFilter
  30. // InputTextFlagsAllowTabInput when pressing TAB to input a '\t' character into the text field.
  31. InputTextFlagsAllowTabInput InputTextFlags = imgui.InputTextFlagsAllowTabInput
  32. // InputTextFlagsCtrlEnterForNewLine in multi-line mode, unfocus with Enter, add new line with Ctrl+Enter
  33. // (default is opposite: unfocus with Ctrl+Enter, add line with Enter).
  34. InputTextFlagsCtrlEnterForNewLine InputTextFlags = imgui.InputTextFlagsCtrlEnterForNewLine
  35. // InputTextFlagsNoHorizontalScroll disables following the cursor horizontally.
  36. InputTextFlagsNoHorizontalScroll InputTextFlags = imgui.InputTextFlagsNoHorizontalScroll
  37. // InputTextFlagsAlwaysInsertMode sets insert mode.
  38. InputTextFlagsAlwaysInsertMode InputTextFlags = imgui.InputTextFlagsAlwaysInsertMode
  39. // InputTextFlagsReadOnly sets read-only mode.
  40. InputTextFlagsReadOnly InputTextFlags = imgui.InputTextFlagsReadOnly
  41. // InputTextFlagsPassword sets password mode, display all characters as '*'.
  42. InputTextFlagsPassword InputTextFlags = imgui.InputTextFlagsPassword
  43. // InputTextFlagsNoUndoRedo disables undo/redo. Note that input text owns the text data while active,
  44. // if you want to provide your own undo/redo stack you need e.g. to call ClearActiveID().
  45. InputTextFlagsNoUndoRedo InputTextFlags = imgui.InputTextFlagsNoUndoRedo
  46. // InputTextFlagsCharsScientific allows 0123456789.+-*/eE (Scientific notation input).
  47. InputTextFlagsCharsScientific InputTextFlags = imgui.InputTextFlagsCharsScientific
  48. )
  49. // WindowFlags represents a window flags (see (*WindowWidget).Flags.
  50. type WindowFlags int
  51. // window flags.
  52. const (
  53. // WindowFlagsNone default = 0.
  54. WindowFlagsNone WindowFlags = imgui.WindowFlagsNone
  55. // WindowFlagsNoTitleBar disables title-bar.
  56. WindowFlagsNoTitleBar WindowFlags = imgui.WindowFlagsNoTitleBar
  57. // WindowFlagsNoResize disables user resizing with the lower-right grip.
  58. WindowFlagsNoResize WindowFlags = imgui.WindowFlagsNoResize
  59. // WindowFlagsNoMove disables user moving the window.
  60. WindowFlagsNoMove WindowFlags = imgui.WindowFlagsNoMove
  61. // WindowFlagsNoScrollbar disables scrollbars. Window can still scroll with mouse or programmatically.
  62. WindowFlagsNoScrollbar WindowFlags = imgui.WindowFlagsNoScrollbar
  63. // WindowFlagsNoScrollWithMouse disables user vertically scrolling with mouse wheel. On child window, mouse wheel
  64. // will be forwarded to the parent unless NoScrollbar is also set.
  65. WindowFlagsNoScrollWithMouse WindowFlags = imgui.WindowFlagsNoScrollWithMouse
  66. // WindowFlagsNoCollapse disables user collapsing window by double-clicking on it.
  67. WindowFlagsNoCollapse WindowFlags = imgui.WindowFlagsNoCollapse
  68. // WindowFlagsAlwaysAutoResize resizes every window to its content every frame.
  69. WindowFlagsAlwaysAutoResize WindowFlags = imgui.WindowFlagsAlwaysAutoResize
  70. // WindowFlagsNoBackground disables drawing background color (WindowBg, etc.) and outside border. Similar as using
  71. // SetNextWindowBgAlpha(0.0f).
  72. WindowFlagsNoBackground WindowFlags = imgui.WindowFlagsNoBackground
  73. // WindowFlagsNoSavedSettings will never load/save settings in .ini file.
  74. WindowFlagsNoSavedSettings WindowFlags = imgui.WindowFlagsNoSavedSettings
  75. // WindowFlagsNoMouseInputs disables catching mouse, hovering test with pass through.
  76. WindowFlagsNoMouseInputs WindowFlags = imgui.WindowFlagsNoMouseInputs
  77. // WindowFlagsMenuBar has a menu-bar.
  78. WindowFlagsMenuBar WindowFlags = imgui.WindowFlagsMenuBar
  79. // WindowFlagsHorizontalScrollbar allows horizontal scrollbar to appear (off by default). You may use
  80. // SetNextWindowContentSize(ImVec2(width,0.0f)); prior to calling Begin() to specify width. Read code in imgui_demo
  81. // in the "Horizontal Scrolling" section.
  82. WindowFlagsHorizontalScrollbar WindowFlags = imgui.WindowFlagsHorizontalScrollbar
  83. // WindowFlagsNoFocusOnAppearing disables taking focus when transitioning from hidden to visible state.
  84. WindowFlagsNoFocusOnAppearing WindowFlags = imgui.WindowFlagsNoFocusOnAppearing
  85. // WindowFlagsNoBringToFrontOnFocus disables bringing window to front when taking focus. e.g. clicking on it or
  86. // programmatically giving it focus.
  87. WindowFlagsNoBringToFrontOnFocus WindowFlags = imgui.WindowFlagsNoBringToFrontOnFocus
  88. // WindowFlagsAlwaysVerticalScrollbar always shows vertical scrollbar, even if ContentSize.y < Size.y .
  89. WindowFlagsAlwaysVerticalScrollbar WindowFlags = imgui.WindowFlagsAlwaysVerticalScrollbar
  90. // WindowFlagsAlwaysHorizontalScrollbar always shows horizontal scrollbar, even if ContentSize.x < Size.x .
  91. WindowFlagsAlwaysHorizontalScrollbar WindowFlags = imgui.WindowFlagsAlwaysHorizontalScrollbar
  92. // WindowFlagsAlwaysUseWindowPadding ensures child windows without border uses style.WindowPadding (ignored by
  93. // default for non-bordered child windows, because more convenient).
  94. WindowFlagsAlwaysUseWindowPadding WindowFlags = imgui.WindowFlagsAlwaysUseWindowPadding
  95. // WindowFlagsNoNavInputs has no gamepad/keyboard navigation within the window.
  96. WindowFlagsNoNavInputs WindowFlags = imgui.WindowFlagsNoNavInputs
  97. // WindowFlagsNoNavFocus has no focusing toward this window with gamepad/keyboard navigation
  98. // (e.g. skipped by CTRL+TAB).
  99. WindowFlagsNoNavFocus WindowFlags = imgui.WindowFlagsNoNavFocus
  100. // WindowFlagsUnsavedDocument appends '*' to title without affecting the ID, as a convenience to avoid using the
  101. // ### operator. When used in a tab/docking context, tab is selected on closure and closure is deferred by one
  102. // frame to allow code to cancel the closure (with a confirmation popup, etc.) without flicker.
  103. WindowFlagsUnsavedDocument WindowFlags = imgui.WindowFlagsUnsavedDocument
  104. // WindowFlagsNoNav combines WindowFlagsNoNavInputs and WindowFlagsNoNavFocus.
  105. WindowFlagsNoNav WindowFlags = imgui.WindowFlagsNoNav
  106. // WindowFlagsNoDecoration combines WindowFlagsNoTitleBar, WindowFlagsNoResize, WindowFlagsNoScrollbar and
  107. // WindowFlagsNoCollapse.
  108. WindowFlagsNoDecoration WindowFlags = imgui.WindowFlagsNoDecoration
  109. // WindowFlagsNoInputs combines WindowFlagsNoMouseInputs, WindowFlagsNoNavInputs and WindowFlagsNoNavFocus.
  110. WindowFlagsNoInputs WindowFlags = imgui.WindowFlagsNoInputs
  111. )
  112. // ComboFlags represents imgui.ComboFlags.
  113. type ComboFlags int
  114. // combo flags list.
  115. const (
  116. // ComboFlagsNone default = 0.
  117. ComboFlagsNone ComboFlags = imgui.ComboFlagsNone
  118. // ComboFlagsPopupAlignLeft aligns the popup toward the left by default.
  119. ComboFlagsPopupAlignLeft ComboFlags = imgui.ComboFlagsPopupAlignLeft
  120. // ComboFlagsHeightSmall has max ~4 items visible.
  121. // Tip: If you want your combo popup to be a specific size you can use SetNextWindowSizeConstraints() prior to calling BeginCombo().
  122. ComboFlagsHeightSmall ComboFlags = imgui.ComboFlagsHeightSmall
  123. // ComboFlagsHeightRegular has max ~8 items visible (default).
  124. ComboFlagsHeightRegular ComboFlags = imgui.ComboFlagsHeightRegular
  125. // ComboFlagsHeightLarge has max ~20 items visible.
  126. ComboFlagsHeightLarge ComboFlags = imgui.ComboFlagsHeightLarge
  127. // ComboFlagsHeightLargest has as many fitting items as possible.
  128. ComboFlagsHeightLargest ComboFlags = imgui.ComboFlagsHeightLargest
  129. // ComboFlagsNoArrowButton displays on the preview box without the square arrow button.
  130. ComboFlagsNoArrowButton ComboFlags = imgui.ComboFlagsNoArrowButton
  131. // ComboFlagsNoPreview displays only a square arrow button.
  132. ComboFlagsNoPreview ComboFlags = imgui.ComboFlagsNoPreview
  133. )
  134. // SelectableFlags represents imgui.SelectableFlags.
  135. type SelectableFlags int
  136. // selectable flags list.
  137. const (
  138. // SelectableFlagsNone default = 0.
  139. SelectableFlagsNone SelectableFlags = imgui.SelectableFlagsNone
  140. // SelectableFlagsDontClosePopups makes clicking the selectable not close any parent popup windows.
  141. SelectableFlagsDontClosePopups SelectableFlags = imgui.SelectableFlagsDontClosePopups
  142. // SelectableFlagsSpanAllColumns allows the selectable frame to span all columns (text will still fit in current column).
  143. SelectableFlagsSpanAllColumns SelectableFlags = imgui.SelectableFlagsSpanAllColumns
  144. // SelectableFlagsAllowDoubleClick generates press events on double clicks too.
  145. SelectableFlagsAllowDoubleClick SelectableFlags = imgui.SelectableFlagsAllowDoubleClick
  146. // SelectableFlagsDisabled disallows selection and displays text in a greyed out color.
  147. SelectableFlagsDisabled SelectableFlags = imgui.SelectableFlagsDisabled
  148. )
  149. // TabItemFlags represents tab item flags.
  150. type TabItemFlags int
  151. // tab item flags list.
  152. const (
  153. // TabItemFlagsNone default = 0.
  154. TabItemFlagsNone TabItemFlags = imgui.TabItemFlagsNone
  155. // TabItemFlagsUnsavedDocument Append '*' to title without affecting the ID, as a convenience to avoid using the
  156. // ### operator. Also: tab is selected on closure and closure is deferred by one frame to allow code to undo it
  157. // without flicker.
  158. TabItemFlagsUnsavedDocument TabItemFlags = imgui.TabItemFlagsUnsavedDocument
  159. // TabItemFlagsSetSelected Trigger flag to programmatically make the tab selected when calling BeginTabItem().
  160. TabItemFlagsSetSelected TabItemFlags = imgui.TabItemFlagsSetSelected
  161. // TabItemFlagsNoCloseWithMiddleMouseButton Disable behavior of closing tabs (that are submitted with
  162. // p_open != NULL) with middle mouse button. You can still repro this behavior on user's side with if
  163. // (IsItemHovered() && IsMouseClicked(2)) *p_open = false.
  164. TabItemFlagsNoCloseWithMiddleMouseButton TabItemFlags = imgui.TabItemFlagsNoCloseWithMiddleMouseButton
  165. // TabItemFlagsNoPushID Don't call PushID(tab->ID)/PopID() on BeginTabItem()/EndTabItem().
  166. TabItemFlagsNoPushID TabItemFlags = imgui.TabItemFlagsNoPushID
  167. )
  168. // TabBarFlags represents imgui.TabBarFlags.
  169. type TabBarFlags int
  170. // tab bar flags list.
  171. const (
  172. // TabBarFlagsNone default = 0.
  173. TabBarFlagsNone TabBarFlags = imgui.TabBarFlagsNone
  174. // TabBarFlagsReorderable Allow manually dragging tabs to re-order them + New tabs are appended at the end of list.
  175. TabBarFlagsReorderable TabBarFlags = imgui.TabBarFlagsReorderable
  176. // TabBarFlagsAutoSelectNewTabs Automatically select new tabs when they appear.
  177. TabBarFlagsAutoSelectNewTabs TabBarFlags = imgui.TabBarFlagsAutoSelectNewTabs
  178. // TabBarFlagsTabListPopupButton Disable buttons to open the tab list popup.
  179. TabBarFlagsTabListPopupButton TabBarFlags = imgui.TabBarFlagsTabListPopupButton
  180. // TabBarFlagsNoCloseWithMiddleMouseButton Disable behavior of closing tabs (that are submitted with p_open != NULL)
  181. // with middle mouse button. You can still repro this behavior on user's side with if
  182. // (IsItemHovered() && IsMouseClicked(2)) *p_open = false.
  183. TabBarFlagsNoCloseWithMiddleMouseButton TabBarFlags = imgui.TabBarFlagsNoCloseWithMiddleMouseButton
  184. // TabBarFlagsNoTabListScrollingButtons Disable scrolling buttons (apply when fitting policy is
  185. // TabBarFlagsFittingPolicyScroll).
  186. TabBarFlagsNoTabListScrollingButtons TabBarFlags = imgui.TabBarFlagsNoTabListScrollingButtons
  187. // TabBarFlagsNoTooltip Disable tooltips when hovering a tab.
  188. TabBarFlagsNoTooltip TabBarFlags = imgui.TabBarFlagsNoTooltip
  189. // TabBarFlagsFittingPolicyResizeDown Resize tabs when they don't fit.
  190. TabBarFlagsFittingPolicyResizeDown TabBarFlags = imgui.TabBarFlagsFittingPolicyResizeDown
  191. // TabBarFlagsFittingPolicyScroll Add scroll buttons when tabs don't fit.
  192. TabBarFlagsFittingPolicyScroll TabBarFlags = imgui.TabBarFlagsFittingPolicyScroll
  193. // TabBarFlagsFittingPolicyMask combines
  194. // TabBarFlagsFittingPolicyResizeDown and TabBarFlagsFittingPolicyScroll.
  195. TabBarFlagsFittingPolicyMask TabBarFlags = imgui.TabBarFlagsFittingPolicyMask
  196. // TabBarFlagsFittingPolicyDefault alias for TabBarFlagsFittingPolicyResizeDown.
  197. TabBarFlagsFittingPolicyDefault TabBarFlags = imgui.TabBarFlagsFittingPolicyDefault
  198. )
  199. // TreeNodeFlags represents tree node widget flags.
  200. type TreeNodeFlags int
  201. // tree node flags list.
  202. const (
  203. // TreeNodeFlagsNone default = 0.
  204. TreeNodeFlagsNone TreeNodeFlags = imgui.TreeNodeFlagsNone
  205. // TreeNodeFlagsSelected draws as selected.
  206. TreeNodeFlagsSelected TreeNodeFlags = imgui.TreeNodeFlagsSelected
  207. // TreeNodeFlagsFramed draws full colored frame (e.g. for CollapsingHeader).
  208. TreeNodeFlagsFramed TreeNodeFlags = imgui.TreeNodeFlagsFramed
  209. // TreeNodeFlagsAllowItemOverlap hit testing to allow subsequent widgets to overlap this one.
  210. TreeNodeFlagsAllowItemOverlap TreeNodeFlags = imgui.TreeNodeFlagsAllowItemOverlap
  211. // TreeNodeFlagsNoTreePushOnOpen doesn't do a TreePush() when open
  212. // (e.g. for CollapsingHeader) = no extra indent nor pushing on ID stack.
  213. TreeNodeFlagsNoTreePushOnOpen TreeNodeFlags = imgui.TreeNodeFlagsNoTreePushOnOpen
  214. // TreeNodeFlagsNoAutoOpenOnLog doesn't automatically and temporarily open node when Logging is active
  215. // (by default logging will automatically open tree nodes).
  216. TreeNodeFlagsNoAutoOpenOnLog TreeNodeFlags = imgui.TreeNodeFlagsNoAutoOpenOnLog
  217. // TreeNodeFlagsDefaultOpen defaults node to be open.
  218. TreeNodeFlagsDefaultOpen TreeNodeFlags = imgui.TreeNodeFlagsDefaultOpen
  219. // TreeNodeFlagsOpenOnDoubleClick needs double-click to open node.
  220. TreeNodeFlagsOpenOnDoubleClick TreeNodeFlags = imgui.TreeNodeFlagsOpenOnDoubleClick
  221. // TreeNodeFlagsOpenOnArrow opens only when clicking on the arrow part.
  222. // If TreeNodeFlagsOpenOnDoubleClick is also set, single-click arrow or double-click all box to open.
  223. TreeNodeFlagsOpenOnArrow TreeNodeFlags = imgui.TreeNodeFlagsOpenOnArrow
  224. // TreeNodeFlagsLeaf allows no collapsing, no arrow (use as a convenience for leaf nodes).
  225. TreeNodeFlagsLeaf TreeNodeFlags = imgui.TreeNodeFlagsLeaf
  226. // TreeNodeFlagsBullet displays a bullet instead of an arrow.
  227. TreeNodeFlagsBullet TreeNodeFlags = imgui.TreeNodeFlagsBullet
  228. // TreeNodeFlagsFramePadding uses FramePadding (even for an unframed text node) to
  229. // vertically align text baseline to regular widget height. Equivalent to calling AlignTextToFramePadding().
  230. TreeNodeFlagsFramePadding TreeNodeFlags = imgui.TreeNodeFlagsFramePadding
  231. // TreeNodeFlagsSpanAvailWidth extends hit box to the right-most edge, even if not framed.
  232. // This is not the default in order to allow adding other items on the same line.
  233. // In the future we may refactor the hit system to be front-to-back, allowing natural overlaps
  234. // and then this can become the default.
  235. TreeNodeFlagsSpanAvailWidth TreeNodeFlags = imgui.TreeNodeFlagsSpanAvailWidth
  236. // TreeNodeFlagsSpanFullWidth extends hit box to the left-most and right-most edges (bypass the indented area).
  237. TreeNodeFlagsSpanFullWidth TreeNodeFlags = imgui.TreeNodeFlagsSpanFullWidth
  238. // TreeNodeFlagsNavLeftJumpsBackHere (WIP) Nav: left direction may move to this TreeNode() from any of its child
  239. // (items submitted between TreeNode and TreePop).
  240. TreeNodeFlagsNavLeftJumpsBackHere TreeNodeFlags = imgui.TreeNodeFlagsNavLeftJumpsBackHere
  241. // TreeNodeFlagsCollapsingHeader combines TreeNodeFlagsFramed and TreeNodeFlagsNoAutoOpenOnLog.
  242. TreeNodeFlagsCollapsingHeader TreeNodeFlags = imgui.TreeNodeFlagsCollapsingHeader
  243. )
  244. // FocusedFlags represents imgui.FocusedFlags.
  245. type FocusedFlags int
  246. // focused flags list.
  247. const (
  248. FocusedFlagsNone = imgui.FocusedFlagsNone
  249. FocusedFlagsChildWindows = imgui.FocusedFlagsChildWindows // Return true if any children of the window is focused
  250. FocusedFlagsRootWindow = imgui.FocusedFlagsRootWindow // Test from root window (top most parent of the current hierarchy)
  251. FocusedFlagsAnyWindow = imgui.FocusedFlagsAnyWindow // Return true if any window is focused. Important: If you are trying to tell how to dispatch your low-level inputs do NOT use this. Use 'io.WantCaptureMouse' instead! Please read the FAQ!
  252. FocusedFlagsNoPopupHierarchy = imgui.FocusedFlagsNoPopupHierarchy // Do not consider popup hierarchy (do not treat popup emitter as parent of popup) (when used with ChildWindows or RootWindow)
  253. // FocusedFlagsDockHierarchy = 1 << 4 // Consider docking hierarchy (treat dockspace host as parent of docked window) (when used with ChildWindows or RootWindow).
  254. FocusedFlagsRootAndChildWindows = imgui.FocusedFlagsRootAndChildWindows
  255. )
  256. // HoveredFlags represents a hovered flags.
  257. type HoveredFlags int
  258. // hovered flags list.
  259. const (
  260. // HoveredFlagsNone Return true if directly over the item/window, not obstructed by another window,
  261. // not obstructed by an active popup or modal blocking inputs under them.
  262. HoveredFlagsNone HoveredFlags = imgui.HoveredFlagsNone
  263. // HoveredFlagsChildWindows IsWindowHovered() only: Return true if any children of the window is hovered.
  264. HoveredFlagsChildWindows HoveredFlags = imgui.HoveredFlagsChildWindows
  265. // HoveredFlagsRootWindow IsWindowHovered() only: Test from root window (top most parent of the current hierarchy).
  266. HoveredFlagsRootWindow HoveredFlags = imgui.HoveredFlagsRootWindow
  267. // HoveredFlagsAnyWindow IsWindowHovered() only: Return true if any window is hovered.
  268. HoveredFlagsAnyWindow HoveredFlags = imgui.HoveredFlagsAnyWindow
  269. // HoveredFlagsAllowWhenBlockedByPopup Return true even if a popup window is normally blocking access to this item/window.
  270. HoveredFlagsAllowWhenBlockedByPopup HoveredFlags = imgui.HoveredFlagsAllowWhenBlockedByPopup
  271. // HoveredFlagsAllowWhenBlockedByActiveItem Return true even if an active item is blocking access to this item/window.
  272. // Useful for Drag and Drop patterns.
  273. HoveredFlagsAllowWhenBlockedByActiveItem HoveredFlags = imgui.HoveredFlagsAllowWhenBlockedByActiveItem
  274. // HoveredFlagsAllowWhenOverlapped Return true even if the position is overlapped by another window.
  275. HoveredFlagsAllowWhenOverlapped HoveredFlags = imgui.HoveredFlagsAllowWhenOverlapped
  276. // HoveredFlagsAllowWhenDisabled Return true even if the item is disabled.
  277. HoveredFlagsAllowWhenDisabled HoveredFlags = imgui.HoveredFlagsAllowWhenDisabled
  278. )
  279. // ColorEditFlags for ColorEdit3V(), etc.
  280. type ColorEditFlags int
  281. // list of color edit flags.
  282. const (
  283. // ColorEditFlagsNone default = 0.
  284. ColorEditFlagsNone ColorEditFlags = imgui.ColorEditFlagsNone
  285. // ColorEditFlagsNoAlpha ignores Alpha component (read 3 components from the input pointer).
  286. ColorEditFlagsNoAlpha ColorEditFlags = imgui.ColorEditFlagsNoAlpha
  287. // ColorEditFlagsNoPicker disables picker when clicking on colored square.
  288. ColorEditFlagsNoPicker ColorEditFlags = imgui.ColorEditFlagsNoPicker
  289. // ColorEditFlagsNoOptions disables toggling options menu when right-clicking on inputs/small preview.
  290. ColorEditFlagsNoOptions ColorEditFlags = imgui.ColorEditFlagsNoOptions
  291. // ColorEditFlagsNoSmallPreview disables colored square preview next to the inputs. (e.g. to show only the inputs).
  292. ColorEditFlagsNoSmallPreview ColorEditFlags = imgui.ColorEditFlagsNoSmallPreview
  293. // ColorEditFlagsNoInputs disables inputs sliders/text widgets (e.g. to show only the small preview colored square).
  294. ColorEditFlagsNoInputs ColorEditFlags = imgui.ColorEditFlagsNoInputs
  295. // ColorEditFlagsNoTooltip disables tooltip when hovering the preview.
  296. ColorEditFlagsNoTooltip ColorEditFlags = imgui.ColorEditFlagsNoTooltip
  297. // ColorEditFlagsNoLabel disables display of inline text label (the label is still forwarded to the tooltip and picker).
  298. ColorEditFlagsNoLabel ColorEditFlags = imgui.ColorEditFlagsNoLabel
  299. // ColorEditFlagsNoDragDrop disables drag and drop target. ColorButton: disable drag and drop source.
  300. ColorEditFlagsNoDragDrop ColorEditFlags = imgui.ColorEditFlagsNoDragDrop
  301. // User Options (right-click on widget to change some of them). You can set application defaults using SetColorEditOptions().
  302. // The idea is that you probably don't want to override them in most of your calls, let the user choose and/or call SetColorEditOptions()
  303. // during startup.
  304. // ColorEditFlagsAlphaBar shows vertical alpha bar/gradient in picker.
  305. ColorEditFlagsAlphaBar ColorEditFlags = imgui.ColorEditFlagsAlphaBar
  306. // ColorEditFlagsAlphaPreview displays preview as a transparent color over a checkerboard, instead of opaque.
  307. ColorEditFlagsAlphaPreview ColorEditFlags = imgui.ColorEditFlagsAlphaPreview
  308. // ColorEditFlagsAlphaPreviewHalf displays half opaque / half checkerboard, instead of opaque.
  309. ColorEditFlagsAlphaPreviewHalf ColorEditFlags = imgui.ColorEditFlagsAlphaPreviewHalf
  310. // ColorEditFlagsHDR = (WIP) surrently only disable 0.0f..1.0f limits in RGBA edition (note: you probably want to use
  311. // ImGuiColorEditFlags_Float flag as well).
  312. ColorEditFlagsHDR ColorEditFlags = imgui.ColorEditFlagsHDR
  313. // ColorEditFlagsRGB sets the format as RGB.
  314. ColorEditFlagsRGB ColorEditFlags = imgui.ColorEditFlagsRGB
  315. // ColorEditFlagsHSV sets the format as HSV.
  316. ColorEditFlagsHSV ColorEditFlags = imgui.ColorEditFlagsHSV
  317. // ColorEditFlagsHEX sets the format as HEX.
  318. ColorEditFlagsHEX ColorEditFlags = imgui.ColorEditFlagsHEX
  319. // ColorEditFlagsUint8 _display_ values formatted as 0..255.
  320. ColorEditFlagsUint8 ColorEditFlags = imgui.ColorEditFlagsUint8
  321. // ColorEditFlagsFloat _display_ values formatted as 0.0f..1.0f floats instead of 0..255 integers. No round-trip of value via integers.
  322. ColorEditFlagsFloat ColorEditFlags = imgui.ColorEditFlagsFloat
  323. )
  324. // TableFlags represents table flags.
  325. type TableFlags int
  326. // Table flags enum:.
  327. const (
  328. TableFlagsNone TableFlags = TableFlags(imgui.TableFlags_None)
  329. TableFlagsResizable TableFlags = TableFlags(imgui.TableFlags_Resizable)
  330. TableFlagsReorderable TableFlags = TableFlags(imgui.TableFlags_Reorderable)
  331. TableFlagsHideable TableFlags = TableFlags(imgui.TableFlags_Hideable)
  332. TableFlagsSortable TableFlags = TableFlags(imgui.TableFlags_Sortable)
  333. TableFlagsNoSavedSettings TableFlags = TableFlags(imgui.TableFlags_NoSavedSettings)
  334. TableFlagsContextMenuInBody TableFlags = TableFlags(imgui.TableFlags_ContextMenuInBody)
  335. TableFlagsRowBg TableFlags = TableFlags(imgui.TableFlags_RowBg)
  336. TableFlagsBordersInnerH TableFlags = TableFlags(imgui.TableFlags_BordersInnerH)
  337. TableFlagsBordersOuterH TableFlags = TableFlags(imgui.TableFlags_BordersOuterH)
  338. TableFlagsBordersInnerV TableFlags = TableFlags(imgui.TableFlags_BordersInnerV)
  339. TableFlagsBordersOuterV TableFlags = TableFlags(imgui.TableFlags_BordersOuterV)
  340. TableFlagsBordersH TableFlags = TableFlags(imgui.TableFlags_BordersH)
  341. TableFlagsBordersV TableFlags = TableFlags(imgui.TableFlags_BordersV)
  342. TableFlagsBordersInner TableFlags = TableFlags(imgui.TableFlags_BordersInner)
  343. TableFlagsBordersOuter TableFlags = TableFlags(imgui.TableFlags_BordersOuter)
  344. TableFlagsBorders TableFlags = TableFlags(imgui.TableFlags_Borders)
  345. TableFlagsNoBordersInBody TableFlags = TableFlags(imgui.TableFlags_NoBordersInBody)
  346. TableFlagsNoBordersInBodyUntilResize TableFlags = TableFlags(imgui.TableFlags_NoBordersInBodyUntilResizeTableFlags)
  347. TableFlagsSizingFixedFit TableFlags = TableFlags(imgui.TableFlags_SizingFixedFit)
  348. TableFlagsSizingFixedSame TableFlags = TableFlags(imgui.TableFlags_SizingFixedSame)
  349. TableFlagsSizingStretchProp TableFlags = TableFlags(imgui.TableFlags_SizingStretchProp)
  350. TableFlagsSizingStretchSame TableFlags = TableFlags(imgui.TableFlags_SizingStretchSame)
  351. TableFlagsNoHostExtendX TableFlags = TableFlags(imgui.TableFlags_NoHostExtendX)
  352. TableFlagsNoHostExtendY TableFlags = TableFlags(imgui.TableFlags_NoHostExtendY)
  353. TableFlagsNoKeepColumnsVisible TableFlags = TableFlags(imgui.TableFlags_NoKeepColumnsVisible)
  354. TableFlagsPreciseWidths TableFlags = TableFlags(imgui.TableFlags_PreciseWidths)
  355. TableFlagsNoClip TableFlags = TableFlags(imgui.TableFlags_NoClip)
  356. TableFlagsPadOuterX TableFlags = TableFlags(imgui.TableFlags_PadOuterX)
  357. TableFlagsNoPadOuterX TableFlags = TableFlags(imgui.TableFlags_NoPadOuterX)
  358. TableFlagsNoPadInnerX TableFlags = TableFlags(imgui.TableFlags_NoPadInnerX)
  359. TableFlagsScrollX TableFlags = TableFlags(imgui.TableFlags_ScrollX)
  360. TableFlagsScrollY TableFlags = TableFlags(imgui.TableFlags_ScrollY)
  361. TableFlagsSortMulti TableFlags = TableFlags(imgui.TableFlags_SortMulti)
  362. TableFlagsSortTristate TableFlags = TableFlags(imgui.TableFlags_SortTristate)
  363. TableFlagsSizingMask TableFlags = TableFlags(imgui.TableFlags_SizingMask_)
  364. )
  365. // TableRowFlags represents table row flags.
  366. type TableRowFlags int
  367. // table row flags:.
  368. const (
  369. TableRowFlagsNone TableRowFlags = TableRowFlags(imgui.TableRowFlags_None)
  370. // Identify header row (set default background color + width of its contents accounted different for auto column width).
  371. TableRowFlagsHeaders TableRowFlags = TableRowFlags(imgui.TableRowFlags_Headers)
  372. )
  373. // TableColumnFlags represents a flags for table column (see (*TableColumnWidget).Flags()).
  374. type TableColumnFlags int
  375. // table column flags list.
  376. const (
  377. // Input configuration flags.
  378. TableColumnFlagsNone TableColumnFlags = TableColumnFlags(imgui.TableColumnFlags_None)
  379. TableColumnFlagsDefaultHide TableColumnFlags = TableColumnFlags(imgui.TableColumnFlags_DefaultHide)
  380. TableColumnFlagsDefaultSort TableColumnFlags = TableColumnFlags(imgui.TableColumnFlags_DefaultSort)
  381. TableColumnFlagsWidthStretch TableColumnFlags = TableColumnFlags(imgui.TableColumnFlags_WidthStretch)
  382. TableColumnFlagsWidthFixed TableColumnFlags = TableColumnFlags(imgui.TableColumnFlags_WidthFixed)
  383. TableColumnFlagsNoResize TableColumnFlags = TableColumnFlags(imgui.TableColumnFlags_NoResize)
  384. TableColumnFlagsNoReorder TableColumnFlags = TableColumnFlags(imgui.TableColumnFlags_NoReorder)
  385. TableColumnFlagsNoHide TableColumnFlags = TableColumnFlags(imgui.TableColumnFlags_NoHide)
  386. TableColumnFlagsNoClip TableColumnFlags = TableColumnFlags(imgui.TableColumnFlags_NoClip)
  387. TableColumnFlagsNoSort TableColumnFlags = TableColumnFlags(imgui.TableColumnFlags_NoSort)
  388. TableColumnFlagsNoSortAscending TableColumnFlags = TableColumnFlags(imgui.TableColumnFlags_NoSortAscending)
  389. TableColumnFlagsNoSortDescending TableColumnFlags = TableColumnFlags(imgui.TableColumnFlags_NoSortDescending)
  390. TableColumnFlagsNoHeaderWidth TableColumnFlags = TableColumnFlags(imgui.TableColumnFlags_NoHeaderWidth)
  391. TableColumnFlagsPreferSortAscending TableColumnFlags = TableColumnFlags(imgui.TableColumnFlags_PreferSortAscending)
  392. TableColumnFlagsPreferSortDescending TableColumnFlags = TableColumnFlags(imgui.TableColumnFlags_PreferSortDescending)
  393. TableColumnFlagsIndentEnable TableColumnFlags = TableColumnFlags(imgui.TableColumnFlags_IndentEnable)
  394. TableColumnFlagsIndentDisable TableColumnFlags = TableColumnFlags(imgui.TableColumnFlags_IndentDisable)
  395. // Output status flags read-only via TableGetColumnFlags().
  396. TableColumnFlagsIsEnabled TableColumnFlags = TableColumnFlags(imgui.TableColumnFlags_IsEnabled)
  397. TableColumnFlagsIsVisible TableColumnFlags = TableColumnFlags(imgui.TableColumnFlags_IsVisible)
  398. TableColumnFlagsIsSorted TableColumnFlags = TableColumnFlags(imgui.TableColumnFlags_IsSorted)
  399. TableColumnFlagsIsHovered TableColumnFlags = TableColumnFlags(imgui.TableColumnFlags_IsHovered)
  400. // [Internal] Combinations and masks.
  401. TableColumnFlagsWidthMask TableColumnFlags = TableColumnFlags(imgui.TableColumnFlags_WidthMask_)
  402. TableColumnFlagsIndentMask TableColumnFlags = TableColumnFlags(imgui.TableColumnFlags_IndentMask_)
  403. TableColumnFlagsStatusMask TableColumnFlags = TableColumnFlags(imgui.TableColumnFlags_StatusMask_)
  404. TableColumnFlagsNoDirectResize TableColumnFlags = TableColumnFlags(imgui.TableColumnFlags_NoDirectResize_)
  405. )
  406. // SliderFlags represents imgui.SliderFlags
  407. // TODO: Hard-reffer to these constants.
  408. type SliderFlags int
  409. // slider flags.
  410. const (
  411. SliderFlagsNone SliderFlags = 0
  412. // Clamp value to min/max bounds when input manually with CTRL+Click. By default CTRL+Click allows going out of bounds.
  413. SliderFlagsAlwaysClamp SliderFlags = 1 << 4
  414. // Make the widget logarithmic (linear otherwise). Consider using ImGuiSliderFlagsNoRoundToFormat with this if using
  415. // a format-string with small amount of digits.
  416. SliderFlagsLogarithmic SliderFlags = 1 << 5
  417. // Disable rounding underlying value to match precision of the display format string (e.g. %.3f values are rounded to those 3 digits).
  418. SliderFlagsNoRoundToFormat SliderFlags = 1 << 6
  419. // Disable CTRL+Click or Enter key allowing to input text directly into the widget.
  420. SliderFlagsNoInput SliderFlags = 1 << 7
  421. // [Internal] We treat using those bits as being potentially a 'float power' argument from the previous API that has got miscast
  422. // to this enum, and will trigger an assert if needed.
  423. SliderFlagsInvalidMask SliderFlags = 0x7000000F
  424. )
  425. // PlotFlags represents imgui.ImPlotFlags.
  426. type PlotFlags int
  427. // plot flags.
  428. const (
  429. PlotFlagsNone = PlotFlags(imgui.ImPlotFlags_None)
  430. PlotFlagsNoTitle = PlotFlags(imgui.ImPlotFlags_NoTitle)
  431. PlotFlagsNoLegend = PlotFlags(imgui.ImPlotFlags_NoLegend)
  432. PlotFlagsNoMenus = PlotFlags(imgui.ImPlotFlags_NoMenus)
  433. PlotFlagsNoBoxSelect = PlotFlags(imgui.ImPlotFlags_NoBoxSelect)
  434. PlotFlagsNoMousePos = PlotFlags(imgui.ImPlotFlags_NoMousePos)
  435. PlotFlagsNoHighlight = PlotFlags(imgui.ImPlotFlags_NoHighlight)
  436. PlotFlagsNoChild = PlotFlags(imgui.ImPlotFlags_NoChild)
  437. PlotFlagsEqual = PlotFlags(imgui.ImPlotFlags_Equal)
  438. PlotFlagsYAxis2 = PlotFlags(imgui.ImPlotFlags_YAxis2)
  439. PlotFlagsYAxis3 = PlotFlags(imgui.ImPlotFlags_YAxis3)
  440. PlotFlagsQuery = PlotFlags(imgui.ImPlotFlags_Query)
  441. PlotFlagsCrosshairs = PlotFlags(imgui.ImPlotFlags_Crosshairs)
  442. PlotFlagsAntiAliased = PlotFlags(imgui.ImPlotFlags_AntiAliased)
  443. PlotFlagsCanvasOnly = PlotFlags(imgui.ImPlotFlags_CanvasOnly)
  444. )
  445. // PlotAxisFlags represents imgui.ImPlotAxisFlags.
  446. type PlotAxisFlags int
  447. // plot axis flags.
  448. const (
  449. PlotAxisFlagsNone PlotAxisFlags = PlotAxisFlags(imgui.ImPlotAxisFlags_None)
  450. PlotAxisFlagsNoLabel PlotAxisFlags = PlotAxisFlags(imgui.ImPlotAxisFlags_NoLabel)
  451. PlotAxisFlagsNoGridLines PlotAxisFlags = PlotAxisFlags(imgui.ImPlotAxisFlags_NoGridLines)
  452. PlotAxisFlagsNoTickMarks PlotAxisFlags = PlotAxisFlags(imgui.ImPlotAxisFlags_NoTickMarks)
  453. PlotAxisFlagsNoTickLabels PlotAxisFlags = PlotAxisFlags(imgui.ImPlotAxisFlags_NoTickLabels)
  454. PlotAxisFlagsForeground PlotAxisFlags = PlotAxisFlags(imgui.ImPlotAxisFlags_Foreground)
  455. PlotAxisFlagsLogScale PlotAxisFlags = PlotAxisFlags(imgui.ImPlotAxisFlags_LogScale)
  456. PlotAxisFlagsTime PlotAxisFlags = PlotAxisFlags(imgui.ImPlotAxisFlags_Time)
  457. PlotAxisFlagsInvert PlotAxisFlags = PlotAxisFlags(imgui.ImPlotAxisFlags_Invert)
  458. PlotAxisFlagsNoInitialFit PlotAxisFlags = PlotAxisFlags(imgui.ImPlotAxisFlags_NoInitialFit)
  459. PlotAxisFlagsAutoFit PlotAxisFlags = PlotAxisFlags(imgui.ImPlotAxisFlags_AutoFit)
  460. PlotAxisFlagsRangeFit PlotAxisFlags = PlotAxisFlags(imgui.ImPlotAxisFlags_RangeFit)
  461. PlotAxisFlagsLockMin PlotAxisFlags = PlotAxisFlags(imgui.ImPlotAxisFlags_LockMin)
  462. PlotAxisFlagsLockMax PlotAxisFlags = PlotAxisFlags(imgui.ImPlotAxisFlags_LockMax)
  463. PlotAxisFlagsLock PlotAxisFlags = PlotAxisFlags(imgui.ImPlotAxisFlags_Lock)
  464. PlotAxisFlagsNoDecorations PlotAxisFlags = PlotAxisFlags(imgui.ImPlotAxisFlags_NoDecorations)
  465. )