iup_widget_ignoreradio.e 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. deferred class IUP_WIDGET_IGNORERADIO
  2. -- Command to handle the ignore radio status.
  3. inherit
  4. IUP_WIDGET_INTERNALS
  5. feature {ANY}
  6. set_ignore_radio (state: BOOLEAN)
  7. -- (non inheritable): when set the toggle will not behave as a radio
  8. -- when inside an IUP_RADIO hierarchy.
  9. do
  10. iup_open.set_attribute(Current, "IGNORERADIO", boolean_to_yesno(state))
  11. end
  12. is_ignore_radio: BOOLEAN
  13. local
  14. str: STRING
  15. do
  16. str := iup_open.get_attribute(Current, "IGNORERADIO")
  17. Result := yesno_to_boolean(str)
  18. end
  19. end
  20. -- The MIT License (MIT)
  21. -- Copyright (c) 2017, 2019 by German A. Arias
  22. -- Permission is hereby granted, free of charge, to any person obtaining a copy
  23. -- of this software and associated documentation files (the "Software"), to deal
  24. -- in the Software without restriction, including without limitation the rights
  25. -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  26. -- copies of the Software, and to permit persons to whom the Software is
  27. -- furnished to do so, subject to the following conditions:
  28. --
  29. -- The above copyright notice and this permission notice shall be included in
  30. -- all copies or substantial portions of the Software.
  31. --
  32. -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  33. -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  34. -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  35. -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  36. -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  37. -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  38. -- SOFTWARE.