packages feed

dear-imgui-raw-internal-1.0.0: src/DearImGui/Raw/Internal/Enums/ImGuiButtonFlags.hsc

{-# LANGUAGE CApiFFI #-}
{-# LANGUAGE PatternSynonyms #-}

-- This file was generated by dear-bindings-ffi. Do not edit by hand.

module DearImGui.Raw.Internal.Enums.ImGuiButtonFlags
  ( pattern AlignTextBaseLine
  , pattern FlattenChildren
  , pattern NoFocus
  , pattern NoHoldingActiveId
  , pattern NoHoveredOnFocus
  , pattern NoKeyModsAllowed
  , pattern NoNavFocus
  , pattern NoSetKeyOwner
  , pattern NoTestKeyOwner
  , pattern PressedOnClick
  , pattern PressedOnClickRelease
  , pattern PressedOnClickReleaseAnywhere
  , pattern PressedOnDefault_
  , pattern PressedOnDoubleClick
  , pattern PressedOnDragDropHold
  , pattern PressedOnMask_
  , pattern PressedOnRelease
  ) where

import DearImGui.Raw.Enums.ImGuiButtonFlags (ImGuiButtonFlags)

#include "dcimgui_nodefaultargfunctions_internal.h"

-- enums

-- | return true on click (mouse down event)
pattern PressedOnClick :: ImGuiButtonFlags
pattern PressedOnClick = #{const ImGuiButtonFlags_PressedOnClick}

-- | [Default] return true on click + release on same item <-- this is what the majority of Button are using
pattern PressedOnClickRelease :: ImGuiButtonFlags
pattern PressedOnClickRelease = #{const ImGuiButtonFlags_PressedOnClickRelease}

-- | return true on click + release even if the release event is not done while hovering the item
pattern PressedOnClickReleaseAnywhere :: ImGuiButtonFlags
pattern PressedOnClickReleaseAnywhere = #{const ImGuiButtonFlags_PressedOnClickReleaseAnywhere}

-- | return true on release (default requires click+release). Prior to 2026/03/20 this implied ImGuiButtonFlags_NoHoldingActiveId but they are separate now.
pattern PressedOnRelease :: ImGuiButtonFlags
pattern PressedOnRelease = #{const ImGuiButtonFlags_PressedOnRelease}

-- | return true on double-click (default requires click+release)
pattern PressedOnDoubleClick :: ImGuiButtonFlags
pattern PressedOnDoubleClick = #{const ImGuiButtonFlags_PressedOnDoubleClick}

-- | return true when held into while we are drag and dropping another item (used by e.g. tree nodes, collapsing headers)
pattern PressedOnDragDropHold :: ImGuiButtonFlags
pattern PressedOnDragDropHold = #{const ImGuiButtonFlags_PressedOnDragDropHold}

-- | ImGuiButtonFlags_Repeat               = 1 << 10,  // hold to repeat -> use ImGuiItemFlags_ButtonRepeat instead.
-- allow interactions even if a child window is overlapping
pattern FlattenChildren :: ImGuiButtonFlags
pattern FlattenChildren = #{const ImGuiButtonFlags_FlattenChildren}

-- | ImGuiButtonFlags_DontClosePopups      = 1 << 13,  // disable automatically closing parent popup on press
-- ImGuiButtonFlags_Disabled             = 1 << 14,  // disable interactions -> use BeginDisabled() or ImGuiItemFlags_Disabled
-- vertically align button to match text baseline - ButtonEx() only // FIXME: Should be removed and handled by SmallButton(), not possible currently because of DC.CursorPosPrevLine
pattern AlignTextBaseLine :: ImGuiButtonFlags
pattern AlignTextBaseLine = #{const ImGuiButtonFlags_AlignTextBaseLine}

-- | disable mouse interaction if a key modifier is held
pattern NoKeyModsAllowed :: ImGuiButtonFlags
pattern NoKeyModsAllowed = #{const ImGuiButtonFlags_NoKeyModsAllowed}

-- | don't set ActiveId while holding the mouse (ImGuiButtonFlags_PressedOnClick only)
pattern NoHoldingActiveId :: ImGuiButtonFlags
pattern NoHoldingActiveId = #{const ImGuiButtonFlags_NoHoldingActiveId}

-- | don't override navigation focus when activated (FIXME: this is essentially used every time an item uses ImGuiItemFlags_NoNav, but because legacy specs don't requires LastItemData to be set ButtonBehavior(), we can't poll g.LastItemData.ItemFlags)
pattern NoNavFocus :: ImGuiButtonFlags
pattern NoNavFocus = #{const ImGuiButtonFlags_NoNavFocus}

-- | don't report as hovered when nav focus is on this item
pattern NoHoveredOnFocus :: ImGuiButtonFlags
pattern NoHoveredOnFocus = #{const ImGuiButtonFlags_NoHoveredOnFocus}

-- | don't set key/input owner on the initial click (note: mouse buttons are keys! often, the key in question will be ImGuiKey_MouseLeft!)
pattern NoSetKeyOwner :: ImGuiButtonFlags
pattern NoSetKeyOwner = #{const ImGuiButtonFlags_NoSetKeyOwner}

-- | don't test key/input owner when polling the key (note: mouse buttons are keys! often, the key in question will be ImGuiKey_MouseLeft!)
pattern NoTestKeyOwner :: ImGuiButtonFlags
pattern NoTestKeyOwner = #{const ImGuiButtonFlags_NoTestKeyOwner}

-- | [EXPERIMENTAL: Not very well specced]. Don't focus parent window when clicking.
pattern NoFocus :: ImGuiButtonFlags
pattern NoFocus = #{const ImGuiButtonFlags_NoFocus}

pattern PressedOnMask_ :: ImGuiButtonFlags
pattern PressedOnMask_ = #{const ImGuiButtonFlags_PressedOnMask_}

pattern PressedOnDefault_ :: ImGuiButtonFlags
pattern PressedOnDefault_ = #{const ImGuiButtonFlags_PressedOnDefault_}