KeyboardApplet.hpp 810 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef FREESHOP_KEYBOARDAPPLET_HPP
  2. #define FREESHOP_KEYBOARDAPPLET_HPP
  3. #include <3ds.h>
  4. #include <cpp3ds/System/String.hpp>
  5. #include <vector>
  6. namespace FreeShop {
  7. class KeyboardApplet {
  8. public:
  9. enum InputType {
  10. Text,
  11. Number,
  12. URL,
  13. TitleID,
  14. };
  15. KeyboardApplet(InputType type = Text);
  16. ~KeyboardApplet();
  17. operator SwkbdState*();
  18. void addDictWord(const std::string &typedWord, const std::string &resultWord);
  19. cpp3ds::String getInput();
  20. SwkbdButton getButton() { return m_button; }
  21. std::basic_string<cpp3ds::Uint8> error;
  22. private:
  23. InputType m_type;
  24. SwkbdState m_swkbdState;
  25. SwkbdStatusData m_swkbdStatus;
  26. SwkbdLearningData *m_swkbdLearning;
  27. SwkbdButton m_button;
  28. std::vector<SwkbdDictWord> m_dictWords;
  29. };
  30. } // namespace FreeShop
  31. #endif //FREESHOP_KEYBOARDAPPLET_HPP