KeyboardApplet.hpp 792 B

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