RUBasePopup.cpp 754 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. //
  2. // RUBasePopup.cpp
  3. // red_utils
  4. //
  5. // Created by ZhengSong on 2023/6/9.
  6. //
  7. #include "RUBasePopup.h"
  8. #include "RUPopupMgr.h"
  9. NS_RU_BEGIN
  10. BasePopup::BasePopup()
  11. {
  12. }
  13. BasePopup::~BasePopup()
  14. {
  15. PopupMgr::getInstance()->checkPopupByDestruct(this);
  16. }
  17. void BasePopup::popup()
  18. {
  19. redutils::PopupMgr::getInstance()->openPopup(this);
  20. }
  21. void BasePopup::popupByQueue(int priority)
  22. {
  23. _priority = priority;
  24. redutils::PopupMgr::getInstance()->openPopupByQueue(this);
  25. }
  26. void BasePopup::_execCloseCb()
  27. {
  28. if (_closeCb) {
  29. _closeCb();
  30. _closeCb = nullptr;
  31. }
  32. }
  33. int BasePopup::_getPriority() const
  34. {
  35. return _priority;
  36. }
  37. const std::string& BasePopup::_getWindowName() const
  38. {
  39. return _windowName;
  40. }
  41. NS_RU_END