UIDialogElement.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #pragma once
  2. #include "UIElement.h"
  3. class UIReference;
  4. class UIDialogElement : public UIContainerElement
  5. {
  6. private:
  7. Framework::Text title;
  8. UIReference* notifyOnClose;
  9. public:
  10. UIDialogElement();
  11. ~UIDialogElement();
  12. void setTitle(const Framework::Text& title);
  13. const Framework::Text& getTitle() const;
  14. void setNotifyOnClose(UIReference* notifyOnClose);
  15. UIReference* zNotifyOnClose() const;
  16. Framework::XML::Element* toUIML(Framework::Either<Block*, Entity*> zTarget,
  17. Entity* zActor) const override;
  18. };
  19. class UIDialogElementFactory : public UIContainerElementFactory<UIDialogElement>
  20. {
  21. public:
  22. UIDialogElementFactory();
  23. JSONObjectValidationBuilder* addToValidator(
  24. JSONObjectValidationBuilder* builder) const override;
  25. UIDialogElement* fromJson(
  26. Framework::JSON::JSONObject* zJson) const override;
  27. Framework::JSON::JSONObject* toJsonObject(
  28. UIDialogElement* zObject) const override;
  29. UIDialogElement* createElement(
  30. Framework::JSON::JSONObject* zJson) const override;
  31. const char* getTypeToken() const override;
  32. };