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



1960
1961
1962
# File 'lib/imgui.rb', line 1960

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

Instance Method Details

#ClearSelectionObject



1948
1949
1950
# File 'lib/imgui.rb', line 1948

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

#DeleteChars(pos, bytes_count) ⇒ Object



1952
1953
1954
# File 'lib/imgui.rb', line 1952

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

#destroyObject



1972
1973
1974
# File 'lib/imgui.rb', line 1972

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

#HasSelectionObject



1956
1957
1958
# File 'lib/imgui.rb', line 1956

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

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



1964
1965
1966
# File 'lib/imgui.rb', line 1964

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

#SelectAllObject



1968
1969
1970
# File 'lib/imgui.rb', line 1968

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