The SnomIPPhoneMenu (or IPPhoneMenu) tag displays a Menu of selectable items. These items can either be sub-menus, containing items themselves, or items with a specific target (like URLs, key-events or internal callbacks) See examples for this tag below.
- SnomIPPhoneMenu can contain any of the attributes from the Main Attributes list
- has_scrollbar: Display a scrollbar. Valid values: true, false, yes, no, on, off.
- speedselect: If enabled, an item or line can be selected by entering the according number. If set to enter, the item is directly entered, as if the user pressed the OK button. If set to select, the item/line is only preselected. Valid values: off, select, enter.
- show_menu_arrow_right - By default, an arrow is displayed on the right side of the Menu subtags to indicate the user that a submenu is available. By setting show_menu_arrow_right="No" the phone no longer shows this arrow. You can also override this arrow with a custom icon, see the ExtraIconType subtag below.
- IconSize: size of the icons that will be used with the IconType subtag. Valid Values: XXS, XS, S, M, L, XL, XXL, XXXL. Default value: S. The meaning of the values refers to icon height in pixels and translates as follows:
The SnomIPPhoneMenu can contain any of the subtags from the Main Subtags list. In addition, it contains the following subtags: A sub-menu containing menu elements. -
A Menu tag supports the following attributes:
speedselect - Description: If enabled, an available item or line can be selected by entering the according number. If set to enter , the item is directly entered, as if the user pressed the OK button. If set to select , the item/line is only preselected.
- Valid values: off, select, enter
- has_scrollbar
- Description: Display a scrollbar.
- Valid Values: true, false, yes, no, on, off
- name
id - Description: Arbitrary id to make alternative (via if clause) menu entries with different names identifiable. This can be necessary for the internal XPath-based navigation mechanism in nested menus.
- Valid Values: Any text.
- on_selected
- on_deselected
Describes a menu entry that targets to either an URL, a key event or an internal callback. - A MenuItem tag can contain the following attributes:
- sel
- Description: Preselect this MenuItem
- Valid Values: true, false
- scroll_always (since 10.1.49.0)
- Description: If this attribute is enabled, activate the scrolling of the menu line text that doesn't fit, regardless of the common scrolling behavior. If the attribute is disabled the common scrolling behavior is used.
- Valid Values: off, on
- name
- Description: Name that is displayed for this menu entry in the parent menu. This attribute is required.
Valid Values: Any text. Warning |
---|
Don't use line break inside this attribute. |
- id
- Description: Arbitrary id to make alternative (via if clause) menu entries with different names identifiable. This can be necessary for the internal XPath-based navigation mechanism in nested menus.
- Valid Values: Any text.
- on_selected
- Description: Execute fragment URL when this element is selected. This will not fetch any external URLs, it only works to execute fragments (if trusted).
- Valid Values: Any URL containing fragments
Example: Code Block |
---|
<MenuItem name="Dial 300" on_selected="phone://mb_nop#numberdial=300"> |
- on_deselected
- Description: Execute fragment URL when this element is de-selected. This will not fetch any external URLs, it only works to execute fragments (if trusted).
- Valid Values: Any URL containing fragments
Example: Code Block |
---|
<MenuItem name="Dial 400" on_deselected="phone://mb_nop#numberdial=400"> |
- sort_key
- Description: Key by which the items get sorted if the main attribute sort is enabled. If this attribute is omitted the items will not be sorted (they will be displayed in the order in which they were entered in the XML code)
See InputField above.
Code Block |
---|
language | xml |
---|
title | XML code: |
---|
| <SnomIPPhoneMenu>
<Menu name="name attr menu">
<Title>2nd layer title tag</Title>
<MenuItem name="2nd,1st menuitem"/>
<MenuItem name="2nd,2nd menuitem"/>
</Menu>
<MenuItem name="name attr menuitem"/>
<MenuItem name="name tag menuitem"/>
</SnomIPPhoneMenu> |
Result:
Image Added
Code Block |
---|
language | xml |
---|
title | XML code: |
---|
| <SnomIPPhoneMenu>
<MenuItem name="local:snom photo unknown ">
<Image default="file:///bmp/colored/snom_photo_unknown.png">file:///bmp/colored/snom_photo_unknown.png</Image>
</MenuItem>
<MenuItem name="local:conference_one.png">
<Image default="file:///bmp/colored/snom_photo_unknown.png">File:///bmp/colored/input_info_images/conference_one.png</Image>
</MenuItem>
<MenuItem name="url image1">
<Image default="file:///bmp/colored/snom_photo_unknown.png">http://docs.snom.io/xml_minibrowser/examples/img/Icon_radiation.png</Image>
</MenuItem>
<MenuItem name="invalid url/image without default">
<Image>http://randomurl.com/random_image.png</Image>
</MenuItem>
<MenuItem name="invalid url/image">
<Image default="file:///bmp/colored/snom_photo_unknown.png">http://randomurl.com/random_image.png</Image>
</MenuItem>
</SnomIPPhoneMenu> |
Result:
Image Added
Code Block |
---|
language | xml |
---|
title | XML code: |
---|
| <SnomIPPhoneMenu>
<Title>Icon examples</Title>
<MenuItem name="Accept call icon">
<Icon>file:///bmp/colored/fkey_icons/24x24/accept_call.png</Icon>
</MenuItem>
<MenuItem name="Away icon">
<Icon>file:///bmp/colored/contact_state_icons/36x36/away.png</Icon>
</MenuItem>
<MenuItem name="Microphone example">
<Icon>file:///bmp/colored/settings_window_icons/30x30/microphone.png</Icon>
</MenuItem>
</SnomIPPhoneMenu> |
Result:
Image Added
Anchor |
---|
| IconTypeExample |
---|
| IconTypeExample |
---|
| This example shows the usage of IconSize and IconType. The example was tested on Snom D375 with firmware version 10.1.64.14.
The last two menu entries will show the default icon (Snom logo) instead of the inserted icon. The reason for this is because the IconSize is set to XXS, meaning the height of the icon used must be 18. But looking at the chosen icons:- kIconTypeContactStateDND exists in size 18, see contact_state_icons. The icon will work correctly
- kIconTypeSymbolHold also exists in size 18, see call_icons. The icon will work correctly
- kIconTypeCallHistoryMissed does not exist in size 18 - see icontype_icons. The icon will not work correctly with size 18, it needs IconSize to be 24 ( =XS)
kIconTypeOverlayHold also does not exist in size 18 - see call_overlay. The icon will not work correctly with size 18, it needs the size to be 96, 84, 72, 60, 48 or 36 Code Block |
---|
| <SnomIPPhoneMenu>
<IconSize>XXS</IconSize>
<MenuItem name="Example with correct IconSize">
<IconType>$(icon_type_enum:kIconTypeContactStateDND)</IconType>
</MenuItem>
<MenuItem name="Another example with correct IconSize">
<IconType>$(icon_type_enum:kIconTypeSymbolHold)</IconType>
</MenuItem>
<MenuItem name="Example with incorrect IconSize">
<IconType>$(icon_type_enum:kIconTypeCallHistoryMissed)</IconType>
</MenuItem>
<MenuItem name="Another example with incorrect IconSize">
<IconType>$(icon_type_enum:kIconTypeOverlayHold)</IconType>
</MenuItem>
</SnomIPPhoneMenu> |
Result:
Image Added
If we replace "<IconSize>XXS</IconSize>" with "<IconSize>XS</IconSize>", the third menu entry will work:
Image Added
ExtraIconType and ExtraIconType2 Anchor |
---|
| ExtraIconTypeExample |
---|
| ExtraIconTypeExample |
---|
|
This example shows the usage of Extra IconType and ExtraIconType2. The example was tested on Snom D375 with firmware version 10.1.64.14. In order for the ExtraIcons to work, the chosen icons must exist in size 18. In the below example, the second ExtraIconType2 ($(icon_type_enum:kIconTypeCallHistoryMissed)) does not work because kIconTypeCallHistoryMissed does not exist in size 18 (see icontype_icons) Code Block |
---|
| <SnomIPPhoneMenu name="ExtraIconTypes">
<MenuItem name="Example - correct">
<ExtraIconType>$(icon_type_enum:kIconTypeRinging)</ExtraIconType>
<ExtraIconType2>$(icon_type_enum:kIconTypeMenuReboot)</ExtraIconType2>
</MenuItem>
<MenuItem name="Example - ExtraIconType2 incorrect">
<ExtraIconType>$(icon_type_enum:kIconTypeRinging)</ExtraIconType>
<ExtraIconType2>$(icon_type_enum:kIconTypeCallHistoryMissed)</ExtraIconType2>
</MenuItem>
</SnomIPPhoneMenu> |
Result:
Image Added
SubText and ExtraText
Code Block |
---|
language | xml |
---|
title | XML code: |
---|
| <SnomIPPhoneMenu>
<MenuItem name="Text example">
<ExtraText>ExtraText here</ExtraText>
<SubText>SubText here</SubText>
</MenuItem>
</SnomIPPhoneMenu> |
Result:
Image Added
Anchor |
---|
| menucustomization |
---|
| menucustomization |
---|
|
Code Block |
---|
| <SnomIPPhoneMenu name="Menu customization">
<Menu name="Default Menu">
<MenuItem name="Some MenuItem">
</MenuItem>
</Menu>
<Menu name="Customized Menu">
<IconType>$(icon_type_enum:kIconTypeContactStateDND)</IconType>
<ExtraIconType>$(icon_type_enum:kIconTypeRinging)</ExtraIconType>
<ExtraIconType2>$(icon_type_enum:kIconTypeMenuReboot)</ExtraIconType2>
<MenuItem name="Some MenuItem">
</MenuItem>
</Menu>
</SnomIPPhoneMenu> |
Result:
Image Added
Code Block |
---|
language | xml |
---|
title | XML code: |
---|
| <SnomIPPhoneMenu>
<Menu name="normal menu" speedselect="off">
<Title>normal menu title</Title>
<InputField>
<Handler event="keypress">file:///xml/text.xml#var:text=$[current_input]</Handler>
<Handler event="timeout">file:///xml/text.xml#var:text=TIMEOUT:$[current_input]</Handler>
<Timeout>3000</Timeout>
<Minimum>3</Minimum>
<Prompt>Input:</Prompt>
<Key>ENTER</Key>
</InputField>
<Menuitem name="Judith Bernhardt" />
<Menuitem name="Leigh Vargas" />
<Menuitem name="William Kosinski" />
</Menu>
</SnomIPPhoneMenu> |
Result:
Image Added
Anchor |
---|
| ActionExample |
---|
| ActionExample |
---|
|
Code Block |
---|
| <SnomIPPhoneMenu>
<MenuItem name="show system information">
<Action>sysinfo</Action>
</MenuItem>
<MenuItem name="change handset volume">
<Action>vol_handset</Action>
</MenuItem>
</SnomIPPhoneMenu> |
Result: Image Added
Include Page |
---|
| Howto Footer - uni-en |
---|
| Howto Footer - uni-en |
---|
|
Content by Label |
---|
showLabels | false |
---|
max | 50 |
---|
showSpace | false |
---|
sort | title |
---|
cql | label = "xml-minibrowser" and label = "main-tags" and type = "page" |
---|
|
|