PlayerEditBoxServiceProtocol.h 1007 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef __PLAYER_EDITBOX_SERVICE_PROTOCOL_H_
  2. #define __PLAYER_EDITBOX_SERVICE_PROTOCOL_H_
  3. #include <string>
  4. #include "cocos2d.h"
  5. #include "PlayerMacros.h"
  6. #include "PlayerServiceProtocol.h"
  7. PLAYER_NS_BEGIN
  8. class PlayerEditBoxServiceProtocol : public PlayerServiceProtocol
  9. {
  10. public:
  11. static const int FORMAT_NONE = 0;
  12. static const int FORMAT_NUMBER = 1;
  13. virtual void showSingleLineEditBox(const cocos2d::Rect &rect) = 0;
  14. virtual void showMultiLineEditBox(const cocos2d::Rect &rect) = 0;
  15. virtual void hide() = 0;
  16. virtual void setText(const std::string &text) = 0;
  17. virtual void setFont(const std::string &name, int size) = 0;
  18. virtual void setFontColor(const cocos2d::Color3B &color) = 0;
  19. virtual void setFormator(int formator) = 0;
  20. void registerHandler(int handler) { _handler = handler; }
  21. int getHandler() { return _handler; }
  22. protected:
  23. int _handler;
  24. };
  25. PLAYER_NS_END
  26. #endif // __PLAYER_EDITBOX_SERVICE_PROTOCOL_H_