iup_widget_parent_dialog.e 2.3 KB

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