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