message-window.cpp 975 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #if defined(Hiro_MessageWindow)
  2. MessageWindow::MessageWindow(const string& text) {
  3. state.text = text;
  4. }
  5. auto MessageWindow::error(Buttons buttons) -> Response {
  6. state.buttons = buttons;
  7. return pMessageWindow::error(state);
  8. }
  9. auto MessageWindow::information(Buttons buttons) -> Response {
  10. state.buttons = buttons;
  11. return pMessageWindow::information(state);
  12. }
  13. auto MessageWindow::question(Buttons buttons) -> Response {
  14. state.buttons = buttons;
  15. return pMessageWindow::question(state);
  16. }
  17. auto MessageWindow::setParent(shared_pointer<mWindow> parent) -> type& {
  18. state.parent = parent;
  19. return *this;
  20. }
  21. auto MessageWindow::setText(const string& text) -> type& {
  22. state.text = text;
  23. return *this;
  24. }
  25. auto MessageWindow::setTitle(const string& title) -> type& {
  26. state.title = title;
  27. return *this;
  28. }
  29. auto MessageWindow::warning(MessageWindow::Buttons buttons) -> Response {
  30. state.buttons = buttons;
  31. return pMessageWindow::warning(state);
  32. }
  33. #endif