iup_widget_back_image_1.e 1.9 KB

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