iup_message_error.e 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. class IUP_MESSAGE_ERROR
  2. -- Shows a modal dialog containing an error message.
  3. create {ANY}
  4. message_error_with_parent,
  5. message_error
  6. feature {ANY}
  7. message_error_with_parent (parent: IUP_DIALOG; message: STRING)
  8. -- Shows a modal dialog containing an error message:
  9. --
  10. -- parent: parent dialog.
  11. -- message: text message contents. It can be a language pre-defined
  12. -- string without the "_@" prefix.
  13. --
  14. -- The dialog is shown centered relative to its parent.
  15. do
  16. int_message_error (parent.widget, message.to_external)
  17. end
  18. message_error (message: STRING)
  19. -- Like "message_error_with_parent" but without a parent dialog.
  20. -- The title defaults to "Error!" and tries the global attribute
  21. -- "PARENTDIALOG" as the parent dialog. The dialog title will be the same
  22. -- title of the parent dialog.
  23. local
  24. p: POINTER
  25. do
  26. int_message_error (p, message.to_external)
  27. end
  28. feature {}
  29. -- Internal
  30. int_message_error (wgt, m: POINTER)
  31. external "plug_in"
  32. alias "{
  33. location: "${sys}/plugins"
  34. module_name: "iup"
  35. feature_name: "IupMessageError"
  36. }"
  37. end
  38. end -- class IUP_MESSAGE_ERROR
  39. -- The MIT License (MIT)
  40. -- Copyright (c) 2017 by German A. Arias
  41. -- Permission is hereby granted, free of charge, to any person obtaining a copy
  42. -- of this software and associated documentation files (the "Software"), to deal
  43. -- in the Software without restriction, including without limitation the rights
  44. -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  45. -- copies of the Software, and to permit persons to whom the Software is
  46. -- furnished to do so, subject to the following conditions:
  47. --
  48. -- The above copyright notice and this permission notice shall be included in
  49. -- all copies or substantial portions of the Software.
  50. --
  51. -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  52. -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  53. -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  54. -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  55. -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  56. -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  57. -- SOFTWARE.