Class: ImGuiInputTextCallbackData
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- ImGuiInputTextCallbackData
- 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
- #ClearSelection ⇒ Object
- #DeleteChars(pos, bytes_count) ⇒ Object
- #destroy ⇒ Object
- #HasSelection ⇒ Object
- #InsertChars(pos, text, text_end = nil) ⇒ Object
- #SelectAll ⇒ Object
Class Method Details
.create ⇒ Object
2161 2162 2163 |
# File 'lib/imgui.rb', line 2161 def self.create() return ImGuiInputTextCallbackData.new(ImGui::ImGuiInputTextCallbackData_ImGuiInputTextCallbackData()) end |
Instance Method Details
#ClearSelection ⇒ Object
2149 2150 2151 |
# File 'lib/imgui.rb', line 2149 def ClearSelection() ImGui::ImGuiInputTextCallbackData_ClearSelection(self) end |
#DeleteChars(pos, bytes_count) ⇒ Object
2153 2154 2155 |
# File 'lib/imgui.rb', line 2153 def DeleteChars(pos, bytes_count) ImGui::ImGuiInputTextCallbackData_DeleteChars(self, pos, bytes_count) end |
#destroy ⇒ Object
2173 2174 2175 |
# File 'lib/imgui.rb', line 2173 def destroy() ImGui::ImGuiInputTextCallbackData_destroy(self) end |
#HasSelection ⇒ Object
2157 2158 2159 |
# File 'lib/imgui.rb', line 2157 def HasSelection() ImGui::ImGuiInputTextCallbackData_HasSelection(self) end |
#InsertChars(pos, text, text_end = nil) ⇒ Object
2165 2166 2167 |
# File 'lib/imgui.rb', line 2165 def InsertChars(pos, text, text_end = nil) ImGui::ImGuiInputTextCallbackData_InsertChars(self, pos, text, text_end) end |
#SelectAll ⇒ Object
2169 2170 2171 |
# File 'lib/imgui.rb', line 2169 def SelectAll() ImGui::ImGuiInputTextCallbackData_SelectAll(self) end |