titlebox.xml 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  2. <WinampAbstractionLayer version="0.7">
  3. <groupdef id="wasabi.titlebox">
  4. <layer
  5. id="groupbox.bottom.stretch"
  6. x="3" y="-3"
  7. w="-6"
  8. relaty="1" relatw="1"
  9. image="wasabi.groupbox.bottom"
  10. />
  11. <layer
  12. id="groupbox.left.stretch"
  13. x="0" y="9"
  14. h="-12"
  15. relath="1"
  16. image="wasabi.groupbox.left"
  17. />
  18. <layer
  19. id="groupbox.right.stretch"
  20. x="-3" y="9"
  21. h="-12"
  22. relatx="1" relath="1"
  23. image="wasabi.groupbox.right"
  24. />
  25. <layer
  26. id="groupbox.bottom.left.corner"
  27. x="0" y="-3"
  28. relaty="1"
  29. image="wasabi.groupbox.bottom.left"
  30. />
  31. <layer
  32. id="groupbox.bottom.right.corner"
  33. x="-3" y="-3"
  34. relatx="1" relaty="1"
  35. image="wasabi.groupbox.bottom.right"
  36. />
  37. </groupdef>
  38. <!-- =================================================================================================== -->
  39. <!-- This is the group that holds the content of the TitleBox (what was specified using the content="some.group.id"
  40. parameter in <TitleBox />). The CustomObject (which must have "titlebox.content" id) is the one ending up
  41. holding the content so you can change the coordinates or add decorations around it here -->
  42. <groupdef id="wasabi.titlebox.main.group" inherit_group="wasabi.titlebox" autoheightsource="titlebox.content" autowidthsource="titlebox.content">
  43. <CustomObject id="titlebox.content" x="8" y="16" w="-16" h="-23" relatw="1" relath="1" />
  44. </groupdef>
  45. <!-- =================================================================================================== -->
  46. <!-- This group appears on the left of the title in the TitleBox object. if centered="1" was specified, this
  47. group will be strecthed so as to have the label group (see below) in the center of the titlebar.
  48. Otherwise, its width is fixed -->
  49. <groupdef id="wasabi.titlebox.left.group" w="6" h="13">
  50. <layer
  51. id="groupbox.top.left.corner"
  52. x="0" y="6"
  53. image="wasabi.groupbox.top.left"
  54. />
  55. <layer
  56. id="groupbox.top.stretch"
  57. x="3" y="6"
  58. w="3"
  59. image="wasabi.groupbox.top"
  60. />
  61. </groupdef>
  62. <!-- =================================================================================================== -->
  63. <!-- This group is the one holding the label for the TitleBox object, it should contain a Text object with
  64. id="titlebox.text". The group will be stretched automatically to the size it needs to hold the full text -->
  65. <groupdef id="wasabi.titlebox.center.group" h="13" autowidthsource="titlebox.text" >
  66. <text
  67. id="titlebox.text"
  68. default="ERROR"
  69. x="0" y="-1"
  70. w="0" relatw="1" h="0" relath="1"
  71. font="tahoma" fontsize="14"
  72. color="wasabi.text.color"
  73. />
  74. </groupdef>
  75. <!-- =================================================================================================== -->
  76. <!-- This is the last of the title groups for the TitleBox object, this one is on the right and is stretched
  77. all the way to the right of the content area. -->
  78. <groupdef id="wasabi.titlebox.right.group" w="0" relatw="1" h="13">
  79. <layer
  80. id="groupbox.top.stretch"
  81. x="0" y="6"
  82. w="-3"
  83. relatw="1"
  84. image="wasabi.groupbox.top"
  85. />
  86. <layer
  87. id="groupbox.top.right.corner"
  88. x="-3" y="6"
  89. relatx="1"
  90. image="wasabi.groupbox.top.right"
  91. />
  92. </groupdef>
  93. <!-- =================================================================================================== -->
  94. <!-- This is an example of how to use this control -->
  95. <!-- First the content -->
  96. <groupdef id="example.titlebox.content" autoheightsource="lastitem" w="300">
  97. <Wasabi:CheckBox x="0" y="0" text="This is a config option"/>
  98. <Wasabi:CheckBox x="0" y="16" text="This is another config option"/>
  99. <Wasabi:CheckBox x="0" y="32" text="This is yet another config option"/>
  100. <Wasabi:CheckBox x="0" y="48" id="lastitem" text="This is another damn config option"/>
  101. </groupdef>
  102. <!-- Then the object itself, with the content as parameter.
  103. add register_autopopup="1" to the groupdef to test -->
  104. <groupdef id="example.titlebox.main" name="TitleBox Example" >
  105. <Wasabi:TitleBox x="50" y="50" title="Group title" content="example.titlebox.content" />
  106. </groupdef>
  107. </WinampAbstractionLayer>