iup_widget_parent_dialog.e 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. deferred class IUP_WIDGET_PARENT_DIALOG
  2. -- Command to handle the parent dialog.
  3. inherit
  4. IUP_WIDGET_INTERNALS
  5. feature {ANY}
  6. set_parent_dialog (name: STRING)
  7. -- Name of a dialog to be used as parent.
  8. --
  9. -- This dialog will be always in front of the parent dialog. If the
  10. -- parent is minimized, this dialog is automatically minimized. The
  11. -- parent dialog must be mapped before mapping the child dialog.
  12. --
  13. -- If PARENTDIALOG is not defined then the NATIVEPARENT attribute is
  14. -- consulted. This one must be a native handle of an existing dialog.
  15. --
  16. -- Use set_widget_name to associate a dialog to a name.
  17. --
  18. -- IMPORTANT: When the parent is destroyed the child dialog is also
  19. -- destroyed, BUT the CLOSE_CB callback of the child dialog is NOT
  20. -- called. The application must take care of destroying the child dialogs
  21. -- before destroying the parent. This is usually done when CLOSE_CB of
  22. -- the parent dialog is called.
  23. do
  24. iup_open.set_attribute(Current, "PARENTDIALOG", name)
  25. end
  26. set_parent_dialog_widget (dlg: IUP_DIALOG)
  27. -- Like "set_parent_dialog" but using the widget.
  28. do
  29. iup_open.set_attribute_widget(Current, "PARENTDIALOG", dlg)
  30. end
  31. end
  32. -- The MIT License (MIT)
  33. -- Copyright (c) 2016, 2017, 2019 by German A. Arias
  34. -- Permission is hereby granted, free of charge, to any person obtaining a copy
  35. -- of this software and associated documentation files (the "Software"), to deal
  36. -- in the Software without restriction, including without limitation the rights
  37. -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  38. -- copies of the Software, and to permit persons to whom the Software is
  39. -- furnished to do so, subject to the following conditions:
  40. --
  41. -- The above copyright notice and this permission notice shall be included in
  42. -- all copies or substantial portions of the Software.
  43. --
  44. -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  45. -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  46. -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  47. -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  48. -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  49. -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  50. -- SOFTWARE.