2
0

DebuggerSystemInterface.cpp 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #include "DebuggerSystemInterface.h"
  2. #include "ElementLog.h"
  3. namespace Rml {
  4. namespace Debugger {
  5. DebuggerSystemInterface::DebuggerSystemInterface(Rml::SystemInterface* _application_interface, ElementLog* _log)
  6. {
  7. application_interface = _application_interface;
  8. log = _log;
  9. }
  10. DebuggerSystemInterface::~DebuggerSystemInterface()
  11. {
  12. application_interface = nullptr;
  13. }
  14. double DebuggerSystemInterface::GetElapsedTime()
  15. {
  16. return application_interface->GetElapsedTime();
  17. }
  18. int DebuggerSystemInterface::TranslateString(String& translated, const String& input)
  19. {
  20. return application_interface->TranslateString(translated, input);
  21. }
  22. void DebuggerSystemInterface::JoinPath(String& translated_path, const String& document_path, const String& path)
  23. {
  24. application_interface->JoinPath(translated_path, document_path, path);
  25. }
  26. bool DebuggerSystemInterface::LogMessage(Log::Type type, const String& message)
  27. {
  28. log->AddLogMessage(type, message);
  29. return application_interface->LogMessage(type, message);
  30. }
  31. void DebuggerSystemInterface::SetMouseCursor(const String& cursor_name)
  32. {
  33. application_interface->SetMouseCursor(cursor_name);
  34. }
  35. void DebuggerSystemInterface::SetClipboardText(const String& text)
  36. {
  37. application_interface->SetClipboardText(text);
  38. }
  39. void DebuggerSystemInterface::GetClipboardText(String& text)
  40. {
  41. application_interface->GetClipboardText(text);
  42. }
  43. void DebuggerSystemInterface::ActivateKeyboard(Rml::Vector2f caret_position, float line_height)
  44. {
  45. application_interface->ActivateKeyboard(caret_position, line_height);
  46. }
  47. void DebuggerSystemInterface::DeactivateKeyboard()
  48. {
  49. application_interface->DeactivateKeyboard();
  50. }
  51. } // namespace Debugger
  52. } // namespace Rml