Class: ImGuiInputTextCallbackData

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/imgui.rb

Overview

Shared state of InputText(), passed as an argument to your callback when a ImGuiInputTextFlags_Callback* flag is used. The callback function should return 0 by default. Callbacks (follow a flag name and see comments in ImGuiInputTextFlags_ declarations for more details)

  • ImGuiInputTextFlags_CallbackEdit: Callback on buffer edit (note that InputText() already returns true on edit, the callback is useful mainly to manipulate the underlying buffer while focus is active)

  • ImGuiInputTextFlags_CallbackAlways: Callback on each iteration

  • ImGuiInputTextFlags_CallbackCompletion: Callback on pressing TAB

  • ImGuiInputTextFlags_CallbackHistory: Callback on pressing Up/Down arrows

  • ImGuiInputTextFlags_CallbackCharFilter: Callback on character inputs to replace or discard them. Modify ‘EventChar’ to replace or discard, or return 1 in callback to discard.

  • ImGuiInputTextFlags_CallbackResize: Callback on buffer capacity changes request (beyond ‘buf_size’ parameter value), allowing the string to grow.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.createObject



2255
2256
2257
# File 'lib/imgui.rb', line 2255

def self.create()
  return ImGuiInputTextCallbackData.new(ImGui::ImGuiInputTextCallbackData_ImGuiInputTextCallbackData())
end

Instance Method Details

#ClearSelectionObject



2243
2244
2245
# File 'lib/imgui.rb', line 2243

def ClearSelection()
  ImGui::ImGuiInputTextCallbackData_ClearSelection(self)
end

#DeleteChars(pos, bytes_count) ⇒ Object



2247
2248
2249
# File 'lib/imgui.rb', line 2247

def DeleteChars(pos, bytes_count)
  ImGui::ImGuiInputTextCallbackData_DeleteChars(self, pos, bytes_count)
end

#destroyObject



2267
2268
2269
# File 'lib/imgui.rb', line 2267

def destroy()
  ImGui::ImGuiInputTextCallbackData_destroy(self)
end

#HasSelectionObject



2251
2252
2253
# File 'lib/imgui.rb', line 2251

def HasSelection()
  ImGui::ImGuiInputTextCallbackData_HasSelection(self)
end

#InsertChars(pos, text, text_end = nil) ⇒ Object



2259
2260
2261
# File 'lib/imgui.rb', line 2259

def InsertChars(pos, text, text_end = nil)
  ImGui::ImGuiInputTextCallbackData_InsertChars(self, pos, text, text_end)
end

#SelectAllObject



2263
2264
2265
# File 'lib/imgui.rb', line 2263

def SelectAll()
  ImGui::ImGuiInputTextCallbackData_SelectAll(self)
end