iup_space.e 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. class IUP_SPACE
  2. -- Creates void element, which occupies an empty space.
  3. --
  4. -- It does not have a native representation.
  5. --
  6. -- Notes:
  7. --
  8. -- When an IUP_FILL is inside a IUP_VBOX or IUP_HBOX it will affect the
  9. -- expansion of the box because it is always expandable. Even when you set its
  10. -- size to a given value, it will still affect the layout, because it is always
  11. -- marked as an expandable element.
  12. --
  13. -- IUP_SPACE will simply occupy a space in the layout. It does not have a
  14. -- natural size, it is 0x0 by default. It can be expandable or not, EXPAND will
  15. -- work as a regular element. The attributes SIZE and RASTERSIZE can be
  16. -- normally set.
  17. inherit
  18. IUP_WIDGET
  19. IUP_WIDGET_SIZE
  20. IUP_WIDGET_RASTERSIZE
  21. IUP_WIDGET_EXPAND
  22. IUP_WIDGET_FONT
  23. IUP_WIDGET_POSITION
  24. IUP_WIDGET_MAXMIN_SIZE
  25. IUP_WIDGET_WID
  26. create {ANY}
  27. space
  28. feature {ANY}
  29. space
  30. local
  31. a_space: POINTER
  32. do
  33. a_space := int_space
  34. set_widget(a_space)
  35. end
  36. feature {NONE}
  37. -- Internals
  38. int_space: POINTER
  39. external
  40. "C inline use %"eiffel-iup.h%""
  41. alias
  42. "return IupSpace();"
  43. end
  44. end -- class IUP_SPACE
  45. -- The MIT License (MIT)
  46. -- Copyright (c) 2019 by German A. Arias
  47. -- Permission is hereby granted, free of charge, to any person obtaining a copy
  48. -- of this software and associated documentation files (the "Software"), to deal
  49. -- in the Software without restriction, including without limitation the rights
  50. -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  51. -- copies of the Software, and to permit persons to whom the Software is
  52. -- furnished to do so, subject to the following conditions:
  53. --
  54. -- The above copyright notice and this permission notice shall be included in
  55. -- all copies or substantial portions of the Software.
  56. --
  57. -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  58. -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  59. -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  60. -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  61. -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  62. -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  63. -- SOFTWARE.