Imprudence:XML skin formats

XML skin floater format
Windows and dialogs in the viewer are implemented as LLFloater objects. The class hierarchy of some LLFloaterFoo object is:

LLView - Base class, container for UI widget children. LLUICtrl - Any widget that can take keyboard focus. LLPanel - Rectangular area with dark background, has functions like childSetText, childGetValue. LLFloater - Generic window or dialog with close box, minimize box, etc. LLFloaterFoo - A "Foo" dialog.

The XML files describing these floaters reside in. The format of all files is:





{LLView attributes}
The following  are defined in.


 * rect_control="FloaterFooRect"
 * is a  Setting defined in   and sets the values (x, y, w, h). If rect_control is omitted or when w is 0, then the default width is such that the right side is FLOATER_H_MARGIN from the right side of the containing parent view. If h is 0 it is set to the required height (passed to  ) but never less than MIN_WIDGET_HEIGHT.


 * width=" "
 * A S32 value that overrides the w value of rect_control.


 * height=" "
 * A S32 value that overrides the h value of rect_control.


 * left=" "
 * A S32 value that overrides the x value of rect_control. A negative value means that left is specified in pixels from the right side of the parent view (even after resizing the parent view).


 * right=" "
 * A S32 value to position right-side of the floater. If left and right are both specified, they are used to determine the width (ignoring 'width' above), otherwise if left is not specified, x is set to right - width. A negative value means that right is specified as the number of pixels left of the right side of the parent view.


 * bottom=" "
 * A S32 value that overrides the y value of rect_control. A negative value means that bottom is specified in pixels below the top of the parent view (even after resizing the parent view).


 * top=" "
 * A S32 value that overrides h above by setting h to top - y. A negative value means that top is specified in pixels below the top of the parent view. Note that a negative value only overrides 'h' (the height) it does not cause the widget to follow the top of the parent view (see the attribute  for that, or use a negative  ).


 * left_delta=" "
 * A S32 value that causes a subsequent floater to be opened this number of pixels more to the right than the previous floater.


 * bottom_delta=" "
 * A S32</tt> value that causes a subsequent floater to be opened this number of pixels lower than the previous floater.

The following  are defined in.


 * control_name=" "
 * is a Setting defined in  which keeps track of some value. Only used by derived classes (check_box, spinner, slider, line_editor, radio_group, multi_slider, text, combo_box, menu_item_check. However, if this is not a class derived from one of those then it appears that control might be a   that is automatically set/unset as function of whether this widget is visible (which seems only interesting for singletons?)


 * default_tab_group=" "
 * Some string that is used to set.


 * enabled=" "
 * A boolean which determines if the widget starts enabled by default.


 * hover_cursor=" "
 * Valid values are for example "UI_CURSOR_ARROW", "UI_CURSOR_HAND", "UI_CURSOR_CROSS", etc. See the function  for a full list. Causes the cursor to change to this icon when hovering over the widget.


 * mouse_opaque=" "
 * Start value of.


 * tool_tip=" "
 * String used for the tool tip.


 * use_bounding_rect=" "
 * Start value of.


 * visible=" "
 * Start value of.

The following  are defined in.


 * follows=" "
 * A 'bit-mask' for up to four values: left, right, top, bottom, separated by a vertical bar (|). For example, . This influences how a child view is resized and positioned when it's parent view is resized. The default value is   for a positive value 'x' value (see above) and   for a negative 'x' value, and   for a positive value of 'y' and   when 'y' is negative. Note that it is possible to specify   (and  ) in which case the widget will change width (height) when the parent view is resized.

The following  are defined in.


 * font_size=" "
 * Valid values appear to be: Small, Medium, Large, Huge and Monospace. The default is Medium. See.


 * font_style=" "
 * A 'bit-mask' for up to six values: NORMAL, BOLD, ITALIC, UNDERLINE, SHADOW and SOFT_SHADOW. For example, . See.


 * font-style=
 * Deprecated, see font_style. However, if both exist then this one overrules.


 * font=" "
 * See font names in . For example, default, Monospace, DejaVu, DroidSans, Helvetica,...

The following  are defined in.


 * halign=" "
 * Horizontal alignment. See.

The following  are defined in.


 * valign=" "
 * Vertical alignment. See.

The following  are defined in.


 * style=" "
 * Deprecated. Old style, only allows one value. See font_style. These values are defined in, not.

The following  is generated in.


 * sound_flags=
 * This appears not to be used anywhere though.

{LLUICtrl attributes}
The following  are defined in.


 * tab_stop=" "
 * A BOOL</tt> type. True means that the UI control should honor TAB stops. The default is false.

<panel {LLPanel attributes}>
The following  are defined in.


 * filename=" "
 * The XML panel_*.xml filename to use for embedded panels. For example, a floater that uses  as child widget. Such widgets are derived from   and not from , and their XML file looks like the following:

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>

<panel >

The following  are defined in.


 * background_opaque=" "
 * Start value of.


 * background_visible=" "
 * Start value of.


 * border=" "
 * Whether or not the border is visible.


 * border_style=" "
 * Whether to use a line style, or a texture. Default is line. The value texture appears not to be implemented, see.


 * border_thickness=" "
 * A S32</tt> value for the border thickness in pixels.


 * label=" "
 * Set the value of.

The following  is generated in.


 * string=
 * This appears not to be used anywhere though.

<floater {LLFloater attributes}>
The following  are defined in.


 * can_close=" "
 * Whether or not the floater has a close button. Default is true.


 * can_drag_on_left=" "
 * Whether or not the floater can be dragged with the left mouse button. Default is true.


 * can_minimize=" "
 * Whether or not the floater has a minimize button. Default is true.


 * can_resize=" "
 * Whether or not the floater is resizable. Default is false.


 * can_tear_off=" "
 * Whether or not the floater has a tear-off button. Only makes sense for an embedded floater.


 * min_height=" "
 * A S32</tt> value for the minimum allowed height of the floater.


 * min_width=" "
 * A S32</tt> value for the minimum allowed height of the floater.


 * short_title=" "
 * Title used in the TAB of a tabbed floater.


 * title=" "
 * Title used for a (torn off) floater. This causes a title bar to appear with the same height as the close and minimize buttons (12 pixels). However, the top of the parent view remains the top of the title bar, so you'll have to subtract 12 from the 'y' values of every widget or they will overlap with the title bar.

class LLLayoutStack : LLView {
<layout_stack >

or

<layout_panel >

<layout_stack|layout_panel {LLLayoutStack attributes}>
The following  are defined in.


 * auto_resize=


 * border_size=


 * min_height=


 * min_width=


 * orientation=


 * user_resize=

class LLMenuItemGL : LLView {
<menu_item >

class LLMenuItemCallGL : LLMenuItemGL, LLObservable {
<menu_item_call >

class LLMenuItemCheckGL : LLMenuItemCallGL {
<menu_item_check >

class LLMenuItemSeparatorGL : LLMenuItemGL {
<menu_item_separator >

class LLMenuItemTearOffGL : LLMenuItemGL {
<tearoff_menu >

class LLProgressBar : LLView {
<progress_bar >

<progress_bar {LLProgressBar attributes}>
The following  are defined in.


 * color_bar=


 * color_bar2=


 * color_bg=


 * color_shadow=


 * image_bar=


 * image_shadow=

class LLViewBorder : LLView {
<view_border >

<view_border {LLViewBorder attributes}>
The following  are defined in.


 * bevel_style=

class LLButton : LLUICtrl {
<button >

<button {LLButton attributes}>
The following  are defined in.


 * halign=


 * help_url=


 * image_disabled_selected=


 * image_disabled=


 * image_hover_selected=


 * image_hover_unselected=


 * image_overlay_alignment=


 * image_overlay=


 * image_selected=


 * image_unselected=


 * label_selected=


 * label=


 * pad_left=


 * pad_right=


 * scale_image=


 * toggle=

{LLJoystick attributes}
The following  are defined in.


 * quadrant=

= {LLJoystickAgentSlide attributes}
=

The following  are defined in.


 * halign=


 * image_selected=


 * image_unselected=


 * quadrant=


 * scale_image=

= {LLJoystickAgentTurn attributes}
=

The following  are defined in.


 * halign=


 * image_selected=


 * image_unselected=


 * quadrant=


 * scale_image=

class LLCheckBoxCtrl : LLUICtrl {
<check_box >

<check_box {LLCheckBoxCtrl attributes}>
The following  are defined in.


 * initial_value=


 * label=


 * radio_style=

class LLRadioCtrl : LLCheckBoxCtrl
<radio_item >

class LLColorSwatchCtrl : LLUICtrl {
<color_swatch >

<color_swatch {LLColorSwatchCtrl attributes}>
The following  are defined in.


 * can_apply_immediately=


 * initial_color=


 * label=

class LLComboBox : LLUICtrl, LLCtrlListInterface
<combo_box >

<combo_box {LLComboBox attributes}>
The following  are defined in.


 * allow_text_entry=


 * label=


 * max_chars=


 * value=

class LLFlyoutButton : LLComboBox
<flyout_button >

or

<flyout_button_item >

<flyout_button|flyout_button_item {LLFlyoutButton attributes}>
The following  are defined in.


 * label=


 * list_position=


 * value=

class LLIconCtrl : LLUICtrl {
<icon >

<icon {LLIconCtrl attributes}>
The following  are defined in.


 * image_name=

class LLLineEditor : LLUICtrl, LLEditMenuHandler, protected LLPreeditor {
<line_editor >

<line_editor {LLLineEditor attributes}>
The following  are defined in.


 * allow_translate=


 * border_style=


 * border_thickness=


 * commit_on_focus_lost=


 * handle_edit_keys_directly=


 * label=


 * max_length=


 * prevalidate=


 * select_all_on_focus_received=


 * select_on_focus=


 * spell_check=

The following  are defined in.


 * bg_readonly_color=


 * bg_writeable_color=


 * text_color=


 * text_readonly_color

class LLNameEditor : LLLineEditor
<name_editor >

<name_editor {LLNameEditor attributes}>
The following  are defined in.


 * label=


 * max_length=

class LLMediaCtrl : LLUICtrl, LLViewerMediaObserver, LLViewerMediaEventEmitter
<web_browser >

<web_browser {LLMediaCtrl attributes}>
The following  are defined in.


 * border_visible=


 * caret_color=


 * ignore_ui_scale=


 * start_url=

class LLMenuGL : LLUICtrl {
<menu >

<menu {LLMenuGL attributes}>
The following  are defined in.


 * create_jump_keys=


 * drop_shadow=


 * label=


 * opaque=


 * tear_off=

The following  are defined in.


 * control_name=


 * control=


 * function=


 * label=


 * shortcut_linux=


 * shortcut=


 * type=


 * useMacCtrl=


 * userdata=

class LLMenuBarGL : LLMenuGL {
<menu_bar >

<menu_bar {LLMenuBarGL attributes}>
The following  are defined in.


 * create_jump_keys=


 * drop_shadow=


 * opaque=

class LLPieMenu : LLMenuGL {
<pie_menu >

<pie_menu {LLPieMenu attributes}>
The following  are defined in.


 * label=

class LLMultiSliderCtrl : LLUICtrl {
<multi_slider >

<multi_slider {LLMultiSliderCtrl attributes}>
The following  are defined in.


 * allow_overlap=


 * can_edit_text=


 * decimal_digits=


 * draw_track=


 * increment=


 * initial_val=


 * label_width=


 * label=


 * max_sliders=


 * max_val=


 * min_val=


 * show_text=


 * use_triangle=

class LLMultiSlider : LLUICtrl {
<multi_slider_bar >

<multi_slider_bar {LLMultiSlider attributes}>
The following  are defined in.


 * allow_overlap=


 * draw_track=


 * increment=


 * initial_val=


 * max_sliders=


 * max_val=


 * min_val=


 * use_triangle=

class LLRadioGroup : LLUICtrl, LLCtrlSelectionInterface {
<radio_group >

<radio_group {LLRadioGroup attributes}>
The following  are defined in.


 * draw_border=


 * initial_value=

class LLScrollableContainerView : LLUICtrl {
<scroll_container >

<scroll_container {LLScrollableContainerView attributes}>
The following  are defined in.


 * opaque=

class LLScrollingPanelList : LLUICtrl {
<scrolling_panel_list >

class LLScrollListCtrl : LLUICtrl, LLEditMenuHandler, LLCtrlListInterface, LLCtrlScrollInterface
<scroll_list >

<scroll_list {LLScrollListCtrl attributes}>
The following  are defined in.


 * background_visible=


 * bg_read_only_color=


 * bg_selected_color=


 * bg_writeable_color=


 * column_padding=


 * draw_stripes=


 * fg_disable_color=


 * fg_selected_color=


 * fg_unselected_color=

The following  are defined in.


 * draw_border=


 * draw_heading=


 * dynamicwidth=


 * font=


 * font-style=


 * heading_height=


 * id=


 * image=


 * label=


 * multi_select=


 * relwidth=


 * search_column=


 * sort=


 * sort_ascending=


 * sort_column=


 * tool_tip=


 * width=

class LLNameListCtrl : LLScrollListCtrl
<name_list >

<name_list {LLNameListCtrl attributes}>
The following  are defined in.


 * allow_calling_card_drop=


 * draw_border=


 * draw_heading=


 * dynamicwidth=


 * font=


 * font-style=


 * heading_height=


 * id=


 * label=


 * multi_select=


 * name_column_index=


 * relwidth=


 * sort=


 * width=

class LLSearchEditor : LLUICtrl {
<search_editor >

<search_editor {LLSearchEditor attributes}>
The following  are defined in.


 * label=


 * max_length=

class LLSliderCtrl : LLUICtrl {
<slider >

<slider {LLSliderCtrl attributes}>
The following  are defined in.


 * can_edit_text=


 * decimal_digits=


 * increment=


 * initial_val=


 * label=


 * label_width=


 * max_val=


 * min_val=


 * show_text=


 * volume=

class LLSlider : LLUICtrl {
<slider_bar >

or

<volume_slider >

<slider_bar|volume_slider {LLSlider attributes}>
The following  are defined in.


 * increment=


 * initial_val=


 * max_val=


 * min_val=


 * volume=

class LLSpinCtrl : LLUICtrl {
<spinner >

<spinner {LLSpinCtrl attributes}>
The following  are defined in.


 * allow_text_entry=


 * decimal_digits=


 * increment=


 * initial_val=


 * label=


 * label_width=


 * max_val=


 * min_val=

class LLTextBox : LLUICtrl {
<text >

<text {LLTextBox attributes}>
The following  are defined in.


 * font-style=


 * hover=


 * hover_color=


 * line_spacing=


 * mouse_opaque=


 * text_color=

class LLTextEditor : LLUICtrl, LLEditMenuHandler, protected LLPreeditor {
<simple_text_editor >

<simple_text_editor {LLTextEditor attributes}>
The following  are defined in.


 * embedded_items=


 * hide_scrollbar=


 * max_length=

The following  are defined in.


 * allow_translate=


 * show_line_numbers=


 * spell_check=


 * track_bottom=


 * word_wrap=

class LLViewerTextEditor : LLTextEditor {
<text_editor >

<text_editor {LLViewerTextEditor attributes}>
The following  are defined in.


 * allow_html=


 * embedded_items=


 * hide_border=


 * hide_scrollbar=


 * ignore_tab=


 * max_length=

class LLTextureCtrl : LLUICtrl {
<texture_picker >

<texture_picker {LLTextureCtrl attributes}>
The following  are defined in.


 * allow_invisible_texture=


 * allow_no_texture=


 * can_apply_immediately=


 * default_image=


 * default_image_name=


 * image=


 * label=

class LLUICtrlLocate : LLUICtrl {
<locate >

class LLInventoryPanel : LLPanel {
<inventory_panel >

<inventory_panel {LLInventoryPanel attributes}>
The following  are defined in.


 * allow_multi_select=


 * sort_order=

class LLTabContainer : LLPanel {
<tab_container >

<tab_container {LLTabContainer attributes}>
The following  are defined in.


 * border=


 * hide_tabs=


 * label=


 * placeholder=


 * tab_max_width=


 * tab_min_width=


 * tab_position=


 * tab_width=

class LLMultiFloater : LLFloater {
<multi_floater >