InputSourceText.h 689 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * InputSourceText.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. VCMI_LIB_NAMESPACE_BEGIN
  12. class Rect;
  13. VCMI_LIB_NAMESPACE_END
  14. struct SDL_TextEditingEvent;
  15. struct SDL_TextInputEvent;
  16. /// Class that handles text input (e.g. IME or direct input from physical keyboard) from SDL events
  17. class InputSourceText
  18. {
  19. public:
  20. void handleEventTextInput(const SDL_TextInputEvent & current);
  21. void handleEventTextEditing(const SDL_TextEditingEvent & current);
  22. void startTextInput(const Rect & where);
  23. void stopTextInput();
  24. };