Difference between revisions of "Skinning HowTo/XUI Menus"

From Second Life Wiki
Jump to navigation Jump to search
 
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{XUI Nav}}
{{TOClimit}}
== Overview ==
This page describes the XML attributes for the XUI menus.  They are used by the [[Skinning How To/The XML files and what they do | XUI files]] in the '''\skins\default\xui''' folders.  You can find attributes for other XUI elements at:
This page describes the XML attributes for the XUI menus.  They are used by the [[Skinning How To/The XML files and what they do | XUI files]] in the '''\skins\default\xui''' folders.  You can find attributes for other XUI elements at:
*[[Skinning HowTo/XUI Containers]]
*[[Skinning HowTo/XUI Widgets]]
and you can find more general information at [[Skinning HowTo/Basics]]


Many XUI elements share the same parameters.  Rather than repeatedly describing them, we just list their names here and describe them at [[Skinning HowTo/Common XUI XML parameters]].
Many XUI elements share the same attributes.  Rather than repeatedly describing them, we just list their names here and describe them at [[Skinning HowTo/Common XUI attributes]].
 
=== Example ===
 
<xml> <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater bottom="400" can_close="true" can_drag_on_left="false" can_minimize="true"
    can_resize="true" can_tear_off="false" enabled="true" follows="left|top"
    height="150" left="643" min_height="150" min_width="250" mouse_opaque="true"
    name="example_menu" tab_stop="false" title="menu" width="250">
    <menu_bar bottom="-50" drop_shadow="true" enabled="true" follows="left|top" height="30"
        left="20" mouse_opaque="false" name="menu_bar" opaque="false"
        tear_off="false" width="200">
        <menu drop_shadow="false" enabled="true" mouse_opaque="false"
        name="menu" label="menu label" opaque="false" tear_off="true">
            <menu_item_call enabled="true" label="menu_item_call label" mouse_opaque="true"
                name="menu_item_call" />
            <menu_item_separator enabled="true" label="menu_item_separator label"
                mouse_opaque="true" name="menu_item_separator" />
            <tearoff_menu label="tearoff_menu label" />
            <menu_item_check enabled="true" label="menu_item_check label" mouse_opaque="true"
                name="menu_item_check" />
        </menu>
    </menu_bar>
</floater></xml>
 
== menu_bar ==


=== menu_bar parameters ===
----
*Used by floater and panel.
*Used by floater and panel.
*Can contain menu.
*Can contain menu.
Line 13: Line 36:
*In source file llui/llmenugl.cpp
*In source file llui/llmenugl.cpp


====Common parameters====
===Common attributes===
*'''[[Skinning HowTo/Common XUI XML parameters#Used by all XUI elements|General]]:'''  name, mouse_opaque, tool_tip, control_name, enabled, visible, use_bounding_rect, default_tab_group
*'''[[Skinning HowTo/Common XUI attributes#General attributes|General]]:'''  name, mouse_opaque, tool_tip, control_name, enabled, visible, use_bounding_rect, default_tab_group
*'''[[Skinning HowTo/Common XUI XML parameters#Positioning|Positioning]]:'''  width, height, left, right, left_delta, bottom, top, bottom_delta, follows, rect_control
*'''[[Skinning HowTo/Common XUI attributes#Positioning and size attributes|Positioning and size]]:'''  width, height, left, right, left_delta, bottom, top, bottom_delta, follows, rect_control


====Specific parameters====
===Special attributes===


===== drop_shadow =====
==== drop_shadow ====
===== opaque =====
==== opaque ====
===== tear_off =====
==== tear_off ====
''Optional.''
''Optional.''


=== menu parameters ===
== menu ==
----
 
*Used by menu_bar and recursively by other menus.
*Used by menu_bar and recursively by other menus.
*Can contain menu, menu_item_call, menu_item_check, menu_item_separator, and tearoff_menu.
*Can contain menu, menu_item_call, menu_item_check, menu_item_separator, and tearoff_menu.
Line 31: Line 54:
*In source file llui/llmenugl.cpp
*In source file llui/llmenugl.cpp


====Common parameters====
===Common attributes===
*'''[[Skinning HowTo/Common XUI XML parameters#Used by all XUI elements|General]]:'''  name, mouse_opaque, tool_tip, control_name, enabled, visible, use_bounding_rect, default_tab_group
*'''[[Skinning HowTo/Common XUI attributes#General attributes|General]]:'''  name, mouse_opaque, tool_tip, control_name, enabled, visible, use_bounding_rect, default_tab_group
*'''[[Skinning HowTo/Common XUI XML parameters#Positioning|Positioning]]:'''  width, height, left, right, left_delta, bottom, top, bottom_delta, follows, rect_control
*'''[[Skinning HowTo/Common XUI attributes#Positioning and size attributes|Positioning and size]]:'''  width, height, left, right, left_delta, bottom, top, bottom_delta, follows, rect_control
*'''[[Skinning HowTo/Common XUI XML parameters#Text|Text]]:'''  label
*'''[[Skinning HowTo/Common XUI attributes#Text attributes|Text attributes]]:'''  label


====Specific parameters====
===Special attributes===


===== drop_shadow =====
==== drop_shadow ====
''Optional.''
''Optional.'' Boolean value.


===== opaque =====
==== opaque ====


===== tear_off =====
==== tear_off ====
''Optional.''
''Optional.''


===== color =====
==== color ====
''Optional.''
''Optional.''
===== create_jump_keys =====
==== create_jump_keys ====
''Optional.''
''Optional.''


===== hidden =====
==== hidden ====
''Optional.''
''Optional.''


=== pie_menu parameters ===
== menu_item_check ==
----
*Used recursively by other pie_menus.
*Can contain pie_menu.
 
====Common parameters====
*'''[[Skinning HowTo/Common XUI XML parameters#Used by all XUI elements|General]]:''' name, mouse_opaque, tool_tip, control_name, enabled, visible, use_bounding_rect
*'''[[Skinning HowTo/Common XUI XML parameters#Text|Text]]:'''  label
 
=== tearoff_menu parameters ===
----
Used by menu.
===== bottom =====
===== enabled =====
===== height =====
===== label =====
===== left =====
===== mouse_opaque =====
===== name =====
===== width =====


=== menu_item_check parameters ===
----
*Used by menu.
*Used by menu.
*Can contain on_check, on_click, and on_enable.
*Can contain on_check, on_click, and on_enable.
*Class MenuItemCheckGL
*Class MenuItemCheckGL
===== bottom_delta =====
 
''Optional.''
===Common attributes===
===== bottom =====
*'''[[Skinning HowTo/Common XUI attributes#General attributes|General]]:''' name, mouse_opaque, tool_tip, control_name, enabled, visible, use_bounding_rect, default_tab_group
''Optional.''
*'''[[Skinning HowTo/Common XUI attributes#Positioning and size attributes|Positioning and size]]:''' width, height, left, right, left_delta, bottom, top, bottom_delta, follows, rect_control
===== left =====
*'''[[Skinning HowTo/Common XUI attributes#Text attributes|Text attributes]]:''' label
===== control_name =====
===Special attributes===
''Optional.''
 
===== height =====
==== shortcut ====
===== width =====
===== label =====
===== mouse_opaque =====
===== name =====
===== enabled =====
''Optional.''
===== shortcut =====
''Optional.''
''Optional.''


=== menu_item_separator parameters ===
== menu_item_separator ==
----
 
Used by menu and pie_menu.
Used by menu and pie_menu.
===== bottom_delta =====
''Optional.''
===== bottom =====
''Optional.''
===== left =====
''Optional.''
===== height =====
''Optional.''
===== width =====
''Optional.''
===== label =====
''Optional.''
===== mouse_opaque =====
''Optional.''
===== name =====
''Optional.''
===== enabled =====
''Optional.''


=== menu_item_call parameters ===
===Common attributes===
----
*'''[[Skinning HowTo/Common XUI attributes#General attributes|General]]:'''  name, mouse_opaque, tool_tip, control_name, enabled, visible, use_bounding_rect, default_tab_group
*'''[[Skinning HowTo/Common XUI attributes#Positioning and size attributes|Positioning and size]]:'''  width, height, left, right, left_delta, bottom, top, bottom_delta, follows, rect_control
*'''[[Skinning HowTo/Common XUI attributes#Text attributes|Text attributes]]:'''  label
 
== menu_item_call ==
 
*Used by menu and pie_menu.
*Used by menu and pie_menu.
*Can contain on_click, on_enable, and on_visible.
*Can contain on_click, on_enable, and on_visible.
*Class LLMenuItemCallGL
*Class LLMenuItemCallGL
===== bottom_delta =====
 
===Common attributes===
*'''[[Skinning HowTo/Common XUI attributes#General attributes|General]]:'''  name, mouse_opaque, tool_tip, control_name, enabled, visible, use_bounding_rect, default_tab_group
*'''[[Skinning HowTo/Common XUI attributes#Positioning and size attributes|Positioning and size]]:'''  width, height, left, right, left_delta, bottom, top, bottom_delta, follows, rect_control
*'''[[Skinning HowTo/Common XUI attributes#Text attributes|Text attributes]]:'''  label
 
===Special attributes===
 
==== shortcut ====
''Optional.''
''Optional.''
===== bottom =====
==== useMacCtrl ====
''Optional.''
''Optional.''
===== left =====
==== hidden ====
''Optional.''
===== height =====
''Optional.''
===== width =====
''Optional.''
===== label =====
===== mouse_opaque =====
''Optional.''
===== name =====
===== enabled =====
''Optional.''
===== shortcut =====
''Optional.''
===== useMacCtrl =====
''Optional.''
===== visible =====
''Optional.''
===== hidden =====
''Optional.''
''Optional.''


=== on_check parameters ===
== on_check  ==
----
 
=== Attributes ===
Used by menu_item_check.
Used by menu_item_check.
===== function =====
==== function ====
''Optional.''
''Optional.''
===== userdata =====
==== userdata ====
''Optional.''
''Optional.''
===== control =====
==== control ====
''Optional.''
''Optional.''


=== on_click parameters ===
== on_click  ==
----
 
=== Attributes ===
Used by menu_item_call and menu_item_check.
Used by menu_item_call and menu_item_check.
===== filter =====
==== filter ====
''Optional.''
''Optional.''
===== function =====
==== function ====
===== userdata =====
==== userdata ====
===== name =====
==== name ====
''Optional.''
''Optional.''


=== on_visible parameters ===
== on_visible  ==
----
 
=== Attributes ===
Used by menu_item_call.
Used by menu_item_call.
===== function =====
==== function ====
 
== on_enable  ==


=== on_enable parameters ===
=== Attributes ===
----
Used by menu_item_call and menu_item_check.
Used by menu_item_call and menu_item_check.
===== function =====
==== function ====
===== userdata =====
==== userdata ====
''Optional.''
''Optional.''
===== name =====
==== name ====
''Optional.''
''Optional.''
== Deprecated elements ==
'''These elements are deprecated and not used by Viewer 2.'''
=== pie_menu  ===
*Used recursively by other pie_menus.
*Can contain pie_menu.
====Common attributes====
*'''[[Skinning HowTo/Common XUI attributes#General attributes|General]]:'''  name, mouse_opaque, tool_tip, control_name, enabled, visible, use_bounding_rect
*'''[[Skinning HowTo/Common XUI attributes#Text attributes|Text attributes]]:'''  label
=== tearoff_menu  ===
Used by menu.
====Common attributes====
*'''[[Skinning HowTo/Common XUI attributes#General attributes|General]]:'''  name, mouse_opaque, tool_tip, control_name, enabled, visible, use_bounding_rect, default_tab_group
*'''[[Skinning HowTo/Common XUI attributes#Positioning and size attributes|Positioning and size]]:'''  width, height, left, right, left_delta, bottom, top, bottom_delta, follows, rect_control
*'''[[Skinning HowTo/Common XUI attributes#Text attributes|Text attributes]]:'''  label

Latest revision as of 16:10, 26 May 2010

Overview

This page describes the XML attributes for the XUI menus. They are used by the XUI files in the \skins\default\xui folders. You can find attributes for other XUI elements at:

Many XUI elements share the same attributes. Rather than repeatedly describing them, we just list their names here and describe them at Skinning HowTo/Common XUI attributes.

Example

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

<floater bottom="400" can_close="true" can_drag_on_left="false" can_minimize="true"
    can_resize="true" can_tear_off="false" enabled="true" follows="left|top"
    height="150" left="643" min_height="150" min_width="250" mouse_opaque="true"
    name="example_menu" tab_stop="false" title="menu" width="250">
   <menu_bar bottom="-50" drop_shadow="true" enabled="true" follows="left|top" height="30"
        left="20" mouse_opaque="false" name="menu_bar" opaque="false"
        tear_off="false" width="200">
       <menu drop_shadow="false" enabled="true" mouse_opaque="false"
        name="menu" label="menu label" opaque="false" tear_off="true">
           <menu_item_call enabled="true" label="menu_item_call label" mouse_opaque="true"
                name="menu_item_call" />
           <menu_item_separator enabled="true" label="menu_item_separator label"
                mouse_opaque="true" name="menu_item_separator" />
           <tearoff_menu label="tearoff_menu label" />
           <menu_item_check enabled="true" label="menu_item_check label" mouse_opaque="true"
                name="menu_item_check" />
       </menu>
   </menu_bar>
</floater></xml>

menu_bar

  • Used by floater and panel.
  • Can contain menu.
  • Class LLMenuBarGL
  • In source file llui/llmenugl.cpp

Common attributes

  • General: name, mouse_opaque, tool_tip, control_name, enabled, visible, use_bounding_rect, default_tab_group
  • Positioning and size: width, height, left, right, left_delta, bottom, top, bottom_delta, follows, rect_control

Special attributes

drop_shadow

opaque

tear_off

Optional.

menu

  • Used by menu_bar and recursively by other menus.
  • Can contain menu, menu_item_call, menu_item_check, menu_item_separator, and tearoff_menu.
  • Class LLMenuGL
  • In source file llui/llmenugl.cpp

Common attributes

  • General: name, mouse_opaque, tool_tip, control_name, enabled, visible, use_bounding_rect, default_tab_group
  • Positioning and size: width, height, left, right, left_delta, bottom, top, bottom_delta, follows, rect_control
  • Text attributes: label

Special attributes

drop_shadow

Optional. Boolean value.

opaque

tear_off

Optional.

color

Optional.

create_jump_keys

Optional.

hidden

Optional.

menu_item_check

  • Used by menu.
  • Can contain on_check, on_click, and on_enable.
  • Class MenuItemCheckGL

Common attributes

  • General: name, mouse_opaque, tool_tip, control_name, enabled, visible, use_bounding_rect, default_tab_group
  • Positioning and size: width, height, left, right, left_delta, bottom, top, bottom_delta, follows, rect_control
  • Text attributes: label

Special attributes

shortcut

Optional.

menu_item_separator

Used by menu and pie_menu.

Common attributes

  • General: name, mouse_opaque, tool_tip, control_name, enabled, visible, use_bounding_rect, default_tab_group
  • Positioning and size: width, height, left, right, left_delta, bottom, top, bottom_delta, follows, rect_control
  • Text attributes: label

menu_item_call

  • Used by menu and pie_menu.
  • Can contain on_click, on_enable, and on_visible.
  • Class LLMenuItemCallGL

Common attributes

  • General: name, mouse_opaque, tool_tip, control_name, enabled, visible, use_bounding_rect, default_tab_group
  • Positioning and size: width, height, left, right, left_delta, bottom, top, bottom_delta, follows, rect_control
  • Text attributes: label

Special attributes

shortcut

Optional.

useMacCtrl

Optional.

hidden

Optional.

on_check

Attributes

Used by menu_item_check.

function

Optional.

userdata

Optional.

control

Optional.

on_click

Attributes

Used by menu_item_call and menu_item_check.

filter

Optional.

function

userdata

name

Optional.

on_visible

Attributes

Used by menu_item_call.

function

on_enable

Attributes

Used by menu_item_call and menu_item_check.

function

userdata

Optional.

name

Optional.

Deprecated elements

These elements are deprecated and not used by Viewer 2.

pie_menu

  • Used recursively by other pie_menus.
  • Can contain pie_menu.

Common attributes

  • General: name, mouse_opaque, tool_tip, control_name, enabled, visible, use_bounding_rect
  • Text attributes: label

tearoff_menu

Used by menu.

Common attributes

  • General: name, mouse_opaque, tool_tip, control_name, enabled, visible, use_bounding_rect, default_tab_group
  • Positioning and size: width, height, left, right, left_delta, bottom, top, bottom_delta, follows, rect_control
  • Text attributes: label