![Obihai Technology OBi1032 Скачать руководство пользователя страница 161](http://html2.mh-extra.com/html/obihai-technology/obi1032/obi1032_administration-manual_3151346161.webp)
Copyright 2010-2017 Obihai Technology, Inc.
161
-
border: Draw a 1-pixel width border around the bounding box
-
bordercolor: Draw the border in black
-
font: Specifies to use bold face font (to render the tab number) when the tab number (@p) matches the current tab
($lkeys.page), otherwise use simple face font
-
textcolor: Render text (tab number) in white
-
size: Use textsize 16 when the tab number (@p) matches the current tab ($lkeys.page), otherwise use textsize 12
Here is another example on how to reduce the width the Line Key Tabs area, thus making more room available to
display the notification icons:
<
TitleBarStyle
size
=
'
10
'
bgcolor
=
'
0x444444,white,0
'
textcolor
=
'
blue
'
font
=
'
@gfont-bold
'
>
<
time
xpos
=
'
2
'
/>
<
date
xpos
=
'
68
'
/>
<
text
xpos
=
'
2
'
ypos
=
'
16
'
>
600 888 111 ($prod.mac)
</
text
>
<
Notifications
list
=
'
*,my-mic,my-trash
'
width
=
'
$eval($sys.hidetabs?@dispW,($sys.ntabs==4)?(@dispW-96),(@dispW-24))
align
=
'
right
'
xpos
=
'
0
'
base-url
=
'
http://192.168.15.149/icons/
'
>
<
my-trash
icon
=
'
trash.png
'
refresh-id
=
'
mytrash
'
xspace
=
'
60
'
width
=
'
34
'
height
=
'
34
'
/>
<
my-mic
icon
=
'
mic.png
'
refresh-id
=
'
mymic
'
xspace
=
'
45
'
width
=
'
35
'
height
=
'
35
'
/>
</
Notifications
>
<
LineKeyTabs
bgimg
=
''
bgcolor
=
'
white,red
'
xpos
=
'
$eval(@dispW-96)
'
width
=
'
96
'
>
<
tab-style
xpos
=
'
$eval((@p-1)*24)
'
width
=
'
24
'
valign
=
'
top
'
border
=
'
1
'
bordercolor
=
'
black
'
font
=
'
$eval(($lkeys.page==@p)?{@gfont-bold}:{@gfont})
'
textcolor
=
'
white
'
size
=
'
$eval(($lkeys.page==@p)?16:12)
'
/>
</
LineKeyTabs
>
</
TitleBarStyle
>
And below is the result of rendering the above XML. Note that the xpos in <tab-style> is relative to the left side of Line
Key Tabs area, while the xpos in <LineKeyTabs> is relative to the left side of the Title Bar (same as the left side of the
LCD).
Trigger update of a notification icon with an ObihaiIPPhoneExecute XML
You can push an <ObihaiIPPhoneExecute> XML to the phone (using SIP/NOTIFY or HTTP/Port) to trigger a redraw of a
notification icon. Here is a simple example:
<
ObihaiIPPhoneExecute
beep
=
'
yes
'
>
<
ExecuteItem
base-url
=
'
http://192.168.15.149/icons/
'
URL
=
'
ClearDownloadedDataCache:trash.png
'
/>
<
ExecuteItem
URL
=
'
RefreshWidget:mytrash
'
/>
</
ObihaiIPPhoneExecute
>
In this XML, the first <ExecuteItem> tells the phone to clear the cache entry for the icon that it gets from the URL
http://192.168.15.149/icons/trahs.png
. This is just to make sure the phone will fetch the icon again from the server
when redrawing the icon. The second <ExecuteItem> tells the phone to redraw the icon with the reference refresh-id
mytrash
.
Refer
for more information on writing Obihai IP Phone XML and how to push the XML to the phone.