dear-imgui-raw-1.0.0: src/DearImGui/Raw/Enums/ImGuiInputTextFlags.hsc
{-# LANGUAGE CApiFFI #-}
{-# LANGUAGE PatternSynonyms #-}
-- This file was generated by dear-bindings-ffi. Do not edit by hand.
module DearImGui.Raw.Enums.ImGuiInputTextFlags
( ImGuiInputTextFlags
, pattern AllowTabInput
, pattern AlwaysOverwrite
, pattern AutoSelectAll
, pattern CallbackAlways
, pattern CallbackCharFilter
, pattern CallbackCompletion
, pattern CallbackEdit
, pattern CallbackHistory
, pattern CallbackResize
, pattern CharsDecimal
, pattern CharsHexadecimal
, pattern CharsNoBlank
, pattern CharsScientific
, pattern CharsUppercase
, pattern CtrlEnterForNewLine
, pattern DisplayEmptyRefVal
, pattern ElideLeft
, pattern EnterReturnsTrue
, pattern EscapeClearsAll
, pattern NoHorizontalScroll
, pattern NoUndoRedo
, pattern None
, pattern ParseEmptyRefVal
, pattern Password
, pattern ReadOnly
, pattern WordWrap
) where
import Foreign.C.Types
#include "dcimgui_nodefaultargfunctions.h"
-- typedefs
-- | Flags for ImGui::InputText()
-- (Those are per-item flags. There are shared flags in ImGuiIO: io.ConfigInputTextCursorBlink and io.ConfigInputTextEnterKeepActive)
type ImGuiInputTextFlags = CInt
-- enums
-- | Basic filters (also see ImGuiInputTextFlags_CallbackCharFilter)
pattern None :: ImGuiInputTextFlags
pattern None = #{const ImGuiInputTextFlags_None}
-- | Allow 0123456789.+-*/
pattern CharsDecimal :: ImGuiInputTextFlags
pattern CharsDecimal = #{const ImGuiInputTextFlags_CharsDecimal}
-- | Allow 0123456789ABCDEFabcdef
pattern CharsHexadecimal :: ImGuiInputTextFlags
pattern CharsHexadecimal = #{const ImGuiInputTextFlags_CharsHexadecimal}
-- | Allow 0123456789.+-*/eE (Scientific notation input)
pattern CharsScientific :: ImGuiInputTextFlags
pattern CharsScientific = #{const ImGuiInputTextFlags_CharsScientific}
-- | Turn a..z into A..Z
pattern CharsUppercase :: ImGuiInputTextFlags
pattern CharsUppercase = #{const ImGuiInputTextFlags_CharsUppercase}
-- | Filter out spaces, tabs
pattern CharsNoBlank :: ImGuiInputTextFlags
pattern CharsNoBlank = #{const ImGuiInputTextFlags_CharsNoBlank}
-- | Inputs
-- Pressing TAB input a '\t' character into the text field
pattern AllowTabInput :: ImGuiInputTextFlags
pattern AllowTabInput = #{const ImGuiInputTextFlags_AllowTabInput}
-- | Return 'true' when Enter is pressed (as opposed to every time the value was modified). Consider disabling LiveEdit! or using IsItemDeactivatedAfterEdit() instead!
pattern EnterReturnsTrue :: ImGuiInputTextFlags
pattern EnterReturnsTrue = #{const ImGuiInputTextFlags_EnterReturnsTrue}
-- | Escape key clears content if not empty, and deactivate otherwise (contrast to default behavior of Escape to revert)
pattern EscapeClearsAll :: ImGuiInputTextFlags
pattern EscapeClearsAll = #{const ImGuiInputTextFlags_EscapeClearsAll}
-- | In multi-line mode: validate with Enter, add new line with Ctrl+Enter (default is opposite: validate with Ctrl+Enter, add line with Enter). Note that Shift+Enter always enter a new line either way.
pattern CtrlEnterForNewLine :: ImGuiInputTextFlags
pattern CtrlEnterForNewLine = #{const ImGuiInputTextFlags_CtrlEnterForNewLine}
-- | Other options
-- Read-only mode
pattern ReadOnly :: ImGuiInputTextFlags
pattern ReadOnly = #{const ImGuiInputTextFlags_ReadOnly}
-- | Password mode, display all characters as '*', disable copy
pattern Password :: ImGuiInputTextFlags
pattern Password = #{const ImGuiInputTextFlags_Password}
-- | Overwrite mode
pattern AlwaysOverwrite :: ImGuiInputTextFlags
pattern AlwaysOverwrite = #{const ImGuiInputTextFlags_AlwaysOverwrite}
-- | Select entire text when first taking mouse focus
pattern AutoSelectAll :: ImGuiInputTextFlags
pattern AutoSelectAll = #{const ImGuiInputTextFlags_AutoSelectAll}
-- | InputFloat(), InputInt(), InputScalar() etc. only: parse empty string as zero value.
pattern ParseEmptyRefVal :: ImGuiInputTextFlags
pattern ParseEmptyRefVal = #{const ImGuiInputTextFlags_ParseEmptyRefVal}
-- | InputFloat(), InputInt(), InputScalar() etc. only: when value is zero, do not display it. Generally used with ImGuiInputTextFlags_ParseEmptyRefVal.
pattern DisplayEmptyRefVal :: ImGuiInputTextFlags
pattern DisplayEmptyRefVal = #{const ImGuiInputTextFlags_DisplayEmptyRefVal}
-- | Disable following the cursor horizontally
pattern NoHorizontalScroll :: ImGuiInputTextFlags
pattern NoHorizontalScroll = #{const ImGuiInputTextFlags_NoHorizontalScroll}
-- | Disable undo/redo. Note that input text owns the text data while active, if you want to provide your own undo/redo stack you need e.g. to call ClearActiveID().
pattern NoUndoRedo :: ImGuiInputTextFlags
pattern NoUndoRedo = #{const ImGuiInputTextFlags_NoUndoRedo}
-- | Elide display / Alignment
-- When text doesn't fit, elide left side to ensure right side stays visible. Useful for path/filenames. Single-line only!
pattern ElideLeft :: ImGuiInputTextFlags
pattern ElideLeft = #{const ImGuiInputTextFlags_ElideLeft}
-- | Callback features
-- Callback on pressing TAB (for completion handling)
pattern CallbackCompletion :: ImGuiInputTextFlags
pattern CallbackCompletion = #{const ImGuiInputTextFlags_CallbackCompletion}
-- | Callback on pressing Up/Down arrows (for history handling)
pattern CallbackHistory :: ImGuiInputTextFlags
pattern CallbackHistory = #{const ImGuiInputTextFlags_CallbackHistory}
-- | Callback on each iteration. User code may query cursor position, modify text buffer.
pattern CallbackAlways :: ImGuiInputTextFlags
pattern CallbackAlways = #{const ImGuiInputTextFlags_CallbackAlways}
-- | Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or return 1 in callback to discard.
pattern CallbackCharFilter :: ImGuiInputTextFlags
pattern CallbackCharFilter = #{const ImGuiInputTextFlags_CallbackCharFilter}
-- | Callback on buffer capacity changes request (beyond 'buf_size' parameter value), allowing the string to grow. Notify when the string wants to be resized (for string types which hold a cache of their Size). You will be provided a new BufSize in the callback and NEED to honor it. (see misc/cpp/imgui_stdlib.h for an example of using this)
pattern CallbackResize :: ImGuiInputTextFlags
pattern CallbackResize = #{const ImGuiInputTextFlags_CallbackResize}
-- | Callback on any edit. Note that InputText() already returns true on edit + you can always use IsItemEdited(). The callback is useful to manipulate the underlying buffer while focus is active.
pattern CallbackEdit :: ImGuiInputTextFlags
pattern CallbackEdit = #{const ImGuiInputTextFlags_CallbackEdit}
-- | Multi-line Word-Wrapping [BETA]
-- - Not well tested yet. Please report any incorrect cursor movement, selection behavior etc. bug to https://github.com/ocornut/imgui/issues/3237.
-- - Wrapping style is not ideal. Wrapping of long words/sections (e.g. words larger than total available width) may be particularly unpleasing.
-- - Wrapping width needs to always account for the possibility of a vertical scrollbar.
-- - It is much slower than regular text fields.
-- Ballpark estimate of cost on my 2019 desktop PC: for a 100 KB text buffer: +~0.3 ms (Optimized) / +~1.0 ms (Debug build).
-- The CPU cost is very roughly proportional to text length, so a 10 KB buffer should cost about ten times less.
-- InputTextMultiline(): word-wrap lines that are too long.
pattern WordWrap :: ImGuiInputTextFlags
pattern WordWrap = #{const ImGuiInputTextFlags_WordWrap}