TreeNodeFlags.go 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. package imgui
  2. const (
  3. // TreeNodeFlagsNone default = 0
  4. TreeNodeFlagsNone = 0
  5. // TreeNodeFlagsSelected draws as selected.
  6. TreeNodeFlagsSelected = 1 << 0
  7. // TreeNodeFlagsFramed draws full colored frame (e.g. for CollapsingHeader).
  8. TreeNodeFlagsFramed = 1 << 1
  9. // TreeNodeFlagsAllowItemOverlap hit testing to allow subsequent widgets to overlap this one.
  10. TreeNodeFlagsAllowItemOverlap = 1 << 2
  11. // TreeNodeFlagsNoTreePushOnOpen doesn't do a TreePush() when open
  12. // (e.g. for CollapsingHeader) = no extra indent nor pushing on ID stack.
  13. TreeNodeFlagsNoTreePushOnOpen = 1 << 3
  14. // TreeNodeFlagsNoAutoOpenOnLog doesn't automatically and temporarily open node when Logging is active
  15. // (by default logging will automatically open tree nodes).
  16. TreeNodeFlagsNoAutoOpenOnLog = 1 << 4
  17. // TreeNodeFlagsDefaultOpen defaults node to be open.
  18. TreeNodeFlagsDefaultOpen = 1 << 5
  19. // TreeNodeFlagsOpenOnDoubleClick needs double-click to open node.
  20. TreeNodeFlagsOpenOnDoubleClick = 1 << 6
  21. // TreeNodeFlagsOpenOnArrow opens only when clicking on the arrow part.
  22. // If TreeNodeFlagsOpenOnDoubleClick is also set, single-click arrow or double-click all box to open.
  23. TreeNodeFlagsOpenOnArrow = 1 << 7
  24. // TreeNodeFlagsLeaf allows no collapsing, no arrow (use as a convenience for leaf nodes).
  25. TreeNodeFlagsLeaf = 1 << 8
  26. // TreeNodeFlagsBullet displays a bullet instead of an arrow.
  27. TreeNodeFlagsBullet = 1 << 9
  28. // TreeNodeFlagsFramePadding uses FramePadding (even for an unframed text node) to
  29. // vertically align text baseline to regular widget height. Equivalent to calling AlignTextToFramePadding().
  30. TreeNodeFlagsFramePadding = 1 << 10
  31. // TreeNodeFlagsSpanAvailWidth extends hit box to the right-most edge, even if not framed.
  32. // This is not the default in order to allow adding other items on the same line.
  33. // In the future we may refactor the hit system to be front-to-back, allowing natural overlaps
  34. // and then this can become the default.
  35. TreeNodeFlagsSpanAvailWidth = 1 << 11
  36. // TreeNodeFlagsSpanFullWidth extends hit box to the left-most and right-most edges (bypass the indented area).
  37. TreeNodeFlagsSpanFullWidth = 1 << 12
  38. // TreeNodeFlagsNavLeftJumpsBackHere (WIP) Nav: left direction may move to this TreeNode() from any of its child
  39. // (items submitted between TreeNode and TreePop)
  40. TreeNodeFlagsNavLeftJumpsBackHere = 1 << 13
  41. // TreeNodeFlagsCollapsingHeader combines TreeNodeFlagsFramed and TreeNodeFlagsNoAutoOpenOnLog.
  42. TreeNodeFlagsCollapsingHeader = TreeNodeFlagsFramed | TreeNodeFlagsNoTreePushOnOpen | TreeNodeFlagsNoAutoOpenOnLog
  43. )