PageRenderTime 36ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

/indra/newview/skins/default/xui/en/floater_test_widgets.xml

https://bitbucket.org/lindenlab/viewer-beta/
XML | 443 lines | 376 code | 8 blank | 59 comment | 0 complexity | 55caf54236a0502bdb91736e093bd7db MD5 | raw file
Possible License(s): LGPL-2.1
  1. <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
  2. <!-- Sample "floater" window with examples of common widgets.
  3. Notes:
  4. XML UI (XUI) files use spaces for indentation, not tabs.
  5. All position values are in pixels.
  6. For now, each widget must contain attribute layout="topleft".
  7. 0,0 is the top-left corner of the floater.
  8. Each widget must have a unique name attribute.
  9. If a widget is aligned with the one before it, use relative positioning:
  10. top_pad
  11. top_delta
  12. left_pad
  13. left_delta
  14. Otherwise specify location with left and top attributes.
  15. -->
  16. <floater
  17. legacy_header_height="18"
  18. can_dock="true"
  19. can_resize="true"
  20. title="TEST FLOATER"
  21. height="500"
  22. min_width="850"
  23. min_height="500"
  24. layout="topleft"
  25. name="floater_test_widgets"
  26. help_topic="floater_test_widgets"
  27. translate="false"
  28. width="850">
  29. <!-- Strings are used by C++ code for localization. They are not visible
  30. unless the C++ code uses them to fill in another widget. -->
  31. <floater.string
  32. name="sample_string"
  33. value="Sample String" />
  34. <floater.string
  35. name="other_string"
  36. value="Other String" />
  37. <!-- Floaters can contain drop-down menus.
  38. The menu_bar widget contains the inividual menus.
  39. The width is automatically computed to fit the labels. -->
  40. <menu_bar
  41. height="18"
  42. layout="topleft"
  43. follows="top|left"
  44. tool_tip="menu"
  45. left="2"
  46. name="test_menu_bar"
  47. top="16">
  48. <menu
  49. label="Menu"
  50. layout="topleft"
  51. tear_off="true"
  52. name="Menu"
  53. width="128">
  54. <!-- menu_item_call will trigger a function call in the C++ code -->
  55. <menu_item_call
  56. label="Menu Item 1"
  57. layout="topleft"
  58. name="test_menu_item_1" />
  59. <!-- menu_item_separator is a horizontal line used to separate sections
  60. of a menu. In general, menus should be divided into chunks of
  61. no more than 7 items separated by menu_item_separators. -->
  62. <menu_item_separator/>
  63. <menu_item_call
  64. label="Menu Item 2"
  65. layout="topleft"
  66. name="test_menu_item_2" />
  67. </menu>
  68. </menu_bar>
  69. <!-- "text" is one or more read-only lines of text.
  70. It can be made clickable but this requires C++ code
  71. support. URLs are not automatically underlined. -->
  72. <text
  73. bottom="55"
  74. layout="topleft"
  75. follows="top|left"
  76. left="10"
  77. height="16">
  78. For widget list see http://wiki.secondlife.com/wiki/XUI_Reference
  79. </text>
  80. <!-- First column -->
  81. <button
  82. follows="top|left"
  83. label="Button"
  84. layout="topleft"
  85. left_delta="0"
  86. name="test_button"
  87. tool_tip="button"
  88. top="80"
  89. width="100" />
  90. <!-- "flyout_button" is a button that can spawn a menu -->
  91. <flyout_button
  92. follows="top|left"
  93. label="Flyout"
  94. layout="topleft"
  95. left_delta="0"
  96. name="fly_btn"
  97. top_pad="15"
  98. tool_tip="flyout button"
  99. width="100">
  100. <flyout_button.item
  101. label="Item 1"
  102. value="shout" />
  103. <flyout_button.item
  104. label="Item 2"
  105. value="say" />
  106. <flyout_button.item
  107. label="Item 3"
  108. value="whisper" />
  109. </flyout_button>
  110. <check_box
  111. bottom_delta="35"
  112. label="Checkbox"
  113. layout="topleft"
  114. tool_tip="checkbox"
  115. name="test_checkbox" />
  116. <check_box
  117. top_pad="5"
  118. enabled="false"
  119. label="Checkbox Disabled"
  120. tool_tip="checkbox disabled"
  121. name="test_checkbox_disabled" />
  122. <!-- "combo_box" is a pop-menu of items. Optionally the box itself can
  123. contain a general purpose line input editor, allowing the user to
  124. provide input that is not a list item. -->
  125. <combo_box
  126. bottom_delta="35"
  127. follows="top|left"
  128. width="150"
  129. label="Combobox"
  130. layout="topleft"
  131. tool_tip="combo box"
  132. name="test_combo_box">
  133. <combo_box.item
  134. name="item1"
  135. label="Combobox Item 1" />
  136. <combo_box.item
  137. name="item2"
  138. label="Combobox Item 2" />
  139. </combo_box>
  140. <!-- "icon" is a read-only image. The image_name must match an entry
  141. in textures.xml. We support TGA and PNG for UI images. -->
  142. <icon
  143. height="16"
  144. image_name="icon_avatar_online.tga"
  145. layout="topleft"
  146. left_delta="0"
  147. tool_tip="icon"
  148. name="test_icon"
  149. top_pad="40"
  150. width="16" />
  151. <!-- "line_editor" allows a single line of editable text input.
  152. The contents of this XML node are used as the initial value for
  153. the text. -->
  154. <line_editor
  155. height="20"
  156. follows="top|left"
  157. layout="topleft"
  158. left_delta="0"
  159. name="test_line_editor"
  160. top_pad="20"
  161. tool_tip="line editor"
  162. width="200">
  163. Line Editor Sample Text
  164. </line_editor>
  165. <!-- "filter_editor" is a specialized line_editor that shows read-only
  166. help text until the user clicks in the widget. -->
  167. <filter_editor
  168. follows="left|top"
  169. height="20"
  170. label="Type here to search"
  171. layout="topleft"
  172. left_delta="0"
  173. name="search editor"
  174. tool_tip="search editor"
  175. top_pad="30"
  176. width="200" />
  177. <!-- "progress_bar" percent completed gets set in C++ code -->
  178. <progress_bar
  179. height="16"
  180. follows="top|left"
  181. layout="topleft"
  182. left_delta="0"
  183. name="test_progress_bar"
  184. top_pad="30"
  185. tool_tip="progress bar"
  186. width="200" />
  187. <!-- "stat_view" is a container for statistics graphs. It is only used
  188. for debugging/diagnostic displays. -->
  189. <stat_view
  190. height="250"
  191. label="Statistics View"
  192. layout="topleft"
  193. left_delta="0"
  194. name="axis_view"
  195. show_label="true"
  196. top_pad="30"
  197. tool_tip="stat view"
  198. width="200">
  199. <stat_bar
  200. width="100"
  201. bar_max="100"
  202. bottom_delta="30"
  203. label="Test Stat"
  204. layout="topleft"
  205. stat="stat"
  206. bar_min="20"
  207. name="test_stat_bar" />
  208. </stat_view>
  209. <!-- New column -->
  210. <!-- "radio_group" is a set of mutually exclusive choices, like the buttons
  211. on a car radio that allow a single radio station to be chosen. -->
  212. <radio_group
  213. height="40"
  214. layout="topleft"
  215. left_pad="90"
  216. name="size_radio_group"
  217. tool_tip="radio group"
  218. top="80"
  219. width="200">
  220. <radio_item
  221. bottom="20"
  222. label="Radio 1"
  223. layout="topleft"
  224. name="small_radio_item" />
  225. <radio_item
  226. label="Radio 2"
  227. layout="topleft"
  228. name="large_radio_item" />
  229. </radio_group>
  230. <!-- "scroll_list" is a scrolling list of columnar data. -->
  231. <scroll_list
  232. bottom_delta="100"
  233. follows="top|left"
  234. height="80"
  235. draw_heading="true"
  236. tool_tip="scroll list"
  237. layout="topleft">
  238. <scroll_list.columns
  239. dynamic_width="true"
  240. name="first_column"
  241. label="Column A"/>
  242. <scroll_list.columns
  243. dynamic_width="true"
  244. name="second_column"
  245. label="Column B"/>
  246. <row>
  247. <column column="first_column">short text</column>
  248. <column column="second_column">more short text</column>
  249. </row>
  250. <row>
  251. <column column="first_column">this is some longer text</column>
  252. <column column="second_column">and here is some more long text</column>
  253. </row>
  254. </scroll_list>
  255. <!-- "slider" is a horizontal input widget for numerical data. -->
  256. <slider
  257. bottom_delta="45"
  258. follows="top|left"
  259. layout="topleft"
  260. min_val="0"
  261. max_val="100"
  262. initial_value="20"
  263. label="Slider"
  264. name="test_slider"
  265. tool_tip="slider"
  266. width="200" />
  267. <!-- "spinner" is a numerical input widget with an up and down arrow to
  268. change the value. -->
  269. <spinner
  270. bottom_delta="35"
  271. follows="top|left"
  272. label="Spinner"
  273. layout="topleft"
  274. label_width="45"
  275. name="test_spinner"
  276. tool_tip="spinner"/>
  277. <text
  278. bottom_delta="50"
  279. follows="top|left"
  280. font.name="SansSerifSmall"
  281. font.style = "UNDERLINE"
  282. layout="topleft"
  283. name="test_text"
  284. tool_tip="text">
  285. Text (underlined)
  286. </text>
  287. <text
  288. top_pad="10"
  289. follows="top|left"
  290. layout="topleft"
  291. width="60"
  292. use_ellipses="true"
  293. name="test_text"
  294. tool_tip="text">
  295. Truncated text here
  296. </text>
  297. <!-- "text_editor" is a multi-line text input widget, similar to
  298. textarea in HTML. -->
  299. <text_editor
  300. height="40"
  301. follows="top|left|bottom"
  302. layout="topleft"
  303. left_delta="0"
  304. name="test_text_editor"
  305. tool_tip="text editor"
  306. top_pad="25"
  307. width="200">
  308. Text Editor
  309. </text_editor>
  310. <text
  311. height="40"
  312. follows="top|left|bottom"
  313. layout="topleft"
  314. name="test_text_box"
  315. tool_tip="text box"
  316. top_pad="5"
  317. width="200">
  318. Text box
  319. with
  320. multiple lines
  321. and too
  322. many
  323. line to actually fit
  324. </text>
  325. <!-- And a third column -->
  326. <!-- "tab_container" is a holder for multiple panels of UI widgets.
  327. Tabs can appear at the top, bottom, or left of the container. -->
  328. <tab_container
  329. follows="all"
  330. height="400"
  331. layout="topleft"
  332. left="525"
  333. name="group_tab_container"
  334. tab_position="top"
  335. tool_tip="tab container"
  336. top="80"
  337. width="300">
  338. <!-- "panel" is a container for widgets. It is automatically resized to
  339. fit the parent tab_container. -->
  340. <panel
  341. border="true"
  342. label="Tab 1 - Color"
  343. layout="topleft"
  344. name="panel2">
  345. <!-- "color_swatch" displays a color and spawns a color picker when
  346. clicked. -->
  347. <color_swatch
  348. can_apply_immediately="true"
  349. color="0.3 0.6 0.9 1"
  350. follows="left|top"
  351. height="90"
  352. layout="topleft"
  353. left="10"
  354. label="Color Swatch 1"
  355. name="swatch1"
  356. tool_tip="Color Swatch: Click to open Color Picker"
  357. top="10"
  358. width="80" />
  359. <color_swatch
  360. can_apply_immediately="true"
  361. color="1 0 1 1"
  362. follows="left|top"
  363. height="90"
  364. label="Color Swatch 2"
  365. layout="topleft"
  366. left_pad="10"
  367. name="swatch2"
  368. tool_tip="Color Swatch: Click to open Color Picker"
  369. top_delta="0"
  370. width="80" />
  371. <text
  372. top_pad="10"
  373. left="10"
  374. width="250"
  375. follows="top|left"
  376. font.name="Monospace"
  377. name="test_text10"
  378. tool_tip="text">
  379. Monospace Button Flyout Checkbox
  380. </text>
  381. <text
  382. top_pad="10"
  383. left="10"
  384. width="250"
  385. follows="top|left"
  386. font.name="SansSerifSmall"
  387. name="test_text10"
  388. tool_tip="text">
  389. SansSerifSmall. ??????? ?? (??)
  390. </text>
  391. <text
  392. top_pad="10"
  393. left="10"
  394. width="250"
  395. follows="top|left"
  396. font.name="SansSerif"
  397. name="test_text11"
  398. tool_tip="text">
  399. SansSerif. ??????? ?? (??)
  400. </text>
  401. <text
  402. top_pad="10"
  403. left="10"
  404. width="250"
  405. follows="top|left"
  406. font.name="SansSerifLarge"
  407. name="test_text12"
  408. tool_tip="text">
  409. SansSerifLarge. ??????? ?? (??)
  410. </text>
  411. <text
  412. top_pad="10"
  413. left="10"
  414. width="250"
  415. follows="top|left"
  416. font.name="SansSerifHuge"
  417. name="test_text13"
  418. tool_tip="text">
  419. SansSerifHuge. ??????? ?? (??)
  420. </text>
  421. </panel>
  422. <!-- panels can also refer to other floaters or panels -->
  423. <panel
  424. border="true"
  425. filename="floater_test_checkbox.xml"
  426. height="225"
  427. label="Tab 2 - Checkbox"
  428. layout="topleft"
  429. left_delta="0"
  430. name="tab2"
  431. top_delta="159"
  432. width="250" />
  433. </tab_container>
  434. </floater>