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
2255 2256 2257 |
# File 'lib/imgui.rb', line 2255 def self.create() return ImGuiInputTextCallbackData.new(ImGui::ImGuiInputTextCallbackData_ImGuiInputTextCallbackData()) end |
Instance Method Details
#ClearSelection ⇒ Object
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 |
#destroy ⇒ Object
2267 2268 2269 |
# File 'lib/imgui.rb', line 2267 def destroy() ImGui::ImGuiInputTextCallbackData_destroy(self) end |
#HasSelection ⇒ Object
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 |
#SelectAll ⇒ Object
2263 2264 2265 |
# File 'lib/imgui.rb', line 2263 def SelectAll() ImGui::ImGuiInputTextCallbackData_SelectAll(self) end |