iup_widget_title.e 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. deferred class IUP_WIDGET_TITLE
  2. -- Commands to handle the attributes related with title.
  3. inherit
  4. IUP_WIDGET_INTERNALS
  5. feature {ANY}
  6. set_title (name: STRING)
  7. -- Element’s title. It is often used to modify some static text of
  8. -- the element (which cannot be changed by the user). Default: ""
  9. --
  10. -- The '\n' character usually is accepted for line change (except for
  11. -- menus).
  12. --
  13. -- The "&" character can be used to define a MNEMONIC, use "&&" to show
  14. -- the "&" character instead on defining a mnemonic.
  15. --
  16. -- If a mnemonic is defined then the character relative to it is
  17. -- underlined and a key is associated so that when pressed together with
  18. -- the Alt key activates the control.
  19. --
  20. -- In GTk, if you define a mnemonic using "&" and the string has an
  21. -- underscore, then make sure that the mnemonic comes before the
  22. -- underscore.
  23. --
  24. -- In GTK, if the MARKUP attribute is defined then the title string can
  25. -- contains pango markup commands. Works only if a mnemonic is NOT
  26. -- defined in the title. Not valid for menus.
  27. do
  28. iup_open.set_attribute(Current, "TITLE", name)
  29. end
  30. get_title: STRING
  31. -- Return the title of the element.
  32. do
  33. Result := iup_open.get_attribute(Current, "TITLE")
  34. end
  35. end
  36. -- The MIT License (MIT)
  37. -- Copyright (c) 2016, 2017, 2019 by German A. Arias
  38. -- Permission is hereby granted, free of charge, to any person obtaining a copy
  39. -- of this software and associated documentation files (the "Software"), to deal
  40. -- in the Software without restriction, including without limitation the rights
  41. -- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  42. -- copies of the Software, and to permit persons to whom the Software is
  43. -- furnished to do so, subject to the following conditions:
  44. --
  45. -- The above copyright notice and this permission notice shall be included in
  46. -- all copies or substantial portions of the Software.
  47. --
  48. -- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  49. -- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  50. -- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  51. -- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  52. -- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  53. -- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  54. -- SOFTWARE.