iup_message.e 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. class IUP_MESSAGE
  2. -- Shows a dialog centralized on the screen, showing the message and the “OK”
  3. -- button. The ‘%N’ character can be added to the message to indicate line
  4. -- change.
  5. --
  6. -- The dialog uses a global attribute called "PARENTDIALOG" as the parent
  7. -- dialog if it is defined. It also uses a global attribute called "ICON" as
  8. -- the dialog icon if it is defined (used only in Motif, in Windows MessageBox
  9. -- does not have an icon in the title bar).
  10. inherit
  11. IUP_WIDGET
  12. create {ANY}
  13. message
  14. feature {ANY}
  15. message (title: STRING; text: STRING)
  16. -- Create a message dialog with title and text provided
  17. do
  18. int_message (title.to_external, text.to_external)
  19. end
  20. feature {}
  21. -- Internal
  22. int_message (title: POINTER; text: POINTER)
  23. external "plug_in"
  24. alias "{
  25. location: "${sys}/plugins"
  26. module_name: "iup"
  27. feature_name: "IupMessage"
  28. }"
  29. end
  30. end -- class IUP_MESSAGE
  31. -- The MIT License (MIT)
  32. -- Copyright (c) 2016, 2017 by German A. Arias
  33. -- Permission is hereby granted, free of charge, to any person obtaining a copy
  34. -- of this software and associated documentation files (the "Software"), to deal
  35. -- in the Software without restriction, including without limitation the rights
  36. -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  37. -- copies of the Software, and to permit persons to whom the Software is
  38. -- furnished to do so, subject to the following conditions:
  39. --
  40. -- The above copyright notice and this permission notice shall be included in
  41. -- all copies or substantial portions of the Software.
  42. --
  43. -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  44. -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  45. -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  46. -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  47. -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  48. -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  49. -- SOFTWARE.