iup_widget_back_image_1.e 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. deferred class IUP_WIDGET_BACK_IMAGE_1
  2. -- Command to handle the additional features to back images in flat controls.
  3. inherit
  4. IUP_WIDGET_INTERNALS
  5. IUP_WIDGET_BACK_IMAGE_0
  6. insert
  7. IUP_INTERFACE
  8. feature {ANY}
  9. set_back_image_inactive (name: STRING)
  10. -- (non inheritable): background image name of the element when inactive.
  11. -- If it is not defined then the BACKIMAGE is used and its colors will be
  12. -- replaced by a modified version creating the disabled effect.
  13. do
  14. iup_open.set_attribute(Current, "BACKIMAGEINACTIVE", name)
  15. end
  16. set_fit_to_back_image (state: BOOLEAN)
  17. -- (non inheritable): enable the natural size to be computed from the
  18. -- BACKIMAGE. If BACKIMAGE is not defined will be ignored. Default: False.
  19. do
  20. iup_open.set_attribute(Current, "FITTOBACKIMAGE", boolean_to_yesno(state))
  21. end
  22. end
  23. -- The MIT License (MIT)
  24. -- Copyright (c) 2018, 2019 by German A. Arias
  25. -- Permission is hereby granted, free of charge, to any person obtaining a copy
  26. -- of this software and associated documentation files (the "Software"), to deal
  27. -- in the Software without restriction, including without limitation the rights
  28. -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  29. -- copies of the Software, and to permit persons to whom the Software is
  30. -- furnished to do so, subject to the following conditions:
  31. --
  32. -- The above copyright notice and this permission notice shall be included in
  33. -- all copies or substantial portions of the Software.
  34. --
  35. -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  36. -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  37. -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  38. -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  39. -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  40. -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  41. -- SOFTWARE.